arthurb4x Posted April 13, 2020 Report Posted April 13, 2020 Hello , I dont have much experience in PLC coding but need to remove an old Fx1N with a QCPU . The program has several STL statements as State relays and dont know how to convert them for the new QCPU . I did export the old program as cvs and then imported it to a new project but I got many yellow code ( Errors I assume ). So far I managed to find the corresponding Special registers needed M8002 to SM402 and for [ ZRST M3 M200 ] used the [FMOV K0 K1M3 K200] but I am stuck at [ZRST S0 S100] asit gives me error plus it gives me yellow on each line there is a S device plus there are many STL that I dont know the equivalent of in QCPU . Help and guidance is needed, Thank you in advance Arthur PS. Please forgive me for my bad English as is not my first language . Attached is the full program in GXWorks2 1.91V me commente_greasepump_91_X15.gxw
Ron_S Posted April 13, 2020 Report Posted April 13, 2020 You are not going to be able to convert the stl to a Q Or in fact many instructions. Stl in the fx is a set of conditional steps where only the active step is scanned. You would be better with an fx3 or fx5....Or it's a rewrite. 1
arthurb4x Posted April 13, 2020 Author Report Posted April 13, 2020 Just now, Ron_S said: You are not going to be able to convert the stl to a Q Or in fact many instructions. Stl in the fx is a set of conditional steps where only the active step is scanned. You would be better with an fx3 or fx5....Or it's a rewrite. Thank you Ron So how are "sets of conditional steps where only the active step is scanned" expressed in Q ?
Ron_S Posted April 13, 2020 Report Posted April 13, 2020 In short, they aren't. The Q doesn't have that function. In the fx, individual steps are defined by a line -----------------[ STL S20] etc (program for s20 here) STL S30 and so on If stl s30 is active, none of the other steps are scanned 1
Gambit Posted April 14, 2020 Report Posted April 14, 2020 The system Q supports SFC that 's why it's not needed. 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 So the only way is to rewrite it based on SFC , If I understand correctly . I find the manual for SFC programming https://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080041/sh080041x.pdf very intimidating for a noob like myself . Can someone help/guide me thru this process of converting the program to Q , and maybe some tutorials about mitsubishi SFC . Thank you in advance, Arthur
Gambit Posted April 14, 2020 Report Posted April 14, 2020 Just read your FX code and make write down the SFC chart on paper. Than recreate it in SFC. For all the transitions use ----(TRAN) as an output. 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 (edited) What should I use as input for the (TRAN) the FX code is just some initial conditions and a section of manual use for the outputs then 5 STL statements and some Error routines on the end . for as I understand it . Edited April 14, 2020 by arthurb4x
Gambit Posted April 14, 2020 Report Posted April 14, 2020 (edited) That would be the part in front it the ----[SET Sxxx] in your FX code. You can also recreate the STL yourself with SET RST instructions i suppose. Edited April 14, 2020 by Gambit 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 What should I do about the [ ZRST S0 S30 ] that cant be converted . It gives me error when I try ..( The Sxx are the STL statements ).I have already started the SFC prog
Gambit Posted April 14, 2020 Report Posted April 14, 2020 Is that a Reset of the whole SFC ? If it programmed at the beginning you wouldn't need that. If it is part of the SFC than you can make a R block and use 999 to reset all SFC's or just define the ones needed to be deactivated 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 (edited) I am finding it very hard to implement TRAN . Can I just remove them altogether ? QCPU_test_1.gxw Since S0 was taken I had to rename them S0 is now S1 S1 ----> S2 S10 --->S3 S11 ---->S5 S20 ---->S4 QCPU_test_1.gxw Edited April 14, 2020 by arthurb4x upload file
Gambit Posted April 14, 2020 Report Posted April 14, 2020 (edited) What is the problem with TRAN (transistion) Edited April 14, 2020 by Gambit 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 (edited) I mean between Block1 and 3 or 2 and 4 ... https://gyazo.com/2199e28037e5d08094fa4eb867baba21 Edited April 14, 2020 by arthurb4x
Gambit Posted April 14, 2020 Report Posted April 14, 2020 No these are the conditions for going to the next Step/Block 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 https://gyazo.com/ec37642468fc8f11685c99c5181914a5 In this case . Does the block ends at line 336 ? Are the conditions M12 and X011 to go to S20 block ?
Gambit Posted April 14, 2020 Report Posted April 14, 2020 (edited) yes. so M12 and X11 should be your condition before TRAN You can find this example in the FX programming manual Edited April 14, 2020 by Gambit 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 (edited) Yes I assumed that but why I am getting this Error ? https://gyazo.com/8d49c89b1a288946f5ec1977320c3bb2 Edited April 14, 2020 by arthurb4x
Gambit Posted April 14, 2020 Report Posted April 14, 2020 don''t use the brackets. Juts type TRAN or use the drop down button and remove the -[ ]- 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 Oh .Thank you Gambit . It worked .
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 Why I am getting these errors ? https://gyazo.com/3ba0c52dde0a5be42ecb532bac16c3a3
Gambit Posted April 14, 2020 Report Posted April 14, 2020 You can remove the S4 as you are already in S4. You are using the SFC so all the -[Set S...]- and -| |- S.. at the beginning are no longer needed. 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 (edited) Still the same thing https://gyazo.com/aa92b4e7c0551c96779caf0870431758 but all other blocks have the S in start and S1 S2 S3 give no errors QCPU_test_1.gxw Edited April 14, 2020 by arthurb4x
Gambit Posted April 14, 2020 Report Posted April 14, 2020 Your problem is not in the code but your SF structure 1
arthurb4x Posted April 14, 2020 Author Report Posted April 14, 2020 (edited) Thank you very much Gambit !! Yes , you are correct , this one works . https://gyazo.com/e1548da7578e6f03824608209be175c8 QCPU_test_2.gxw Edited April 14, 2020 by arthurb4x upload file
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now