9/27/2021 12:49 PM | |
Posts: 1 Rating:
|
Hello, I am also converting a program from S5 to S7 for the first time, and I dont fully understand how JC is working with a FB, because when I declare like that in TiaPortal it tells me that the FB is not defined. Similarly I get an error with Name: XXX. The code I have in S5 is: FB 2 Segmento 1 SHIFT DETECTION Name :LIBRETTO :A M56.0 :JC FB 20 Name: SHIFT L :A M100.2 :O M100.3 :A E 9.2 = M203.0 :BE Would anyone be so kind to explain to me how to declare JC FB## and Name: xxx in TiaPortal? ------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 09/28/2021 05:54:58New subject after splitting |
|
10/1/2021 4:49 PM | |
Joined: 9/27/2006 Last visit: 9/8/2025 Posts: 12401 Rating:
|
Hello David; JC is a conditional jump in Step 5. as explained by DennsLu in Step 7 STL you must first satisfy a logical condition (A M0.0, for example) then CALL FB20, DB20 (if that is the name you gabe the function block in Step 7). Note that all S5 FBs need to be translated to a FB with assocated DB in Step 7, some may require only an FC, you will have to decide. In S5, when openig a block in your program, the Name of the function is attached by S5 in the code. This is nt required in S7 programs, so do not put much energy in that aspect of the conversion. Hope this helps, Daniel Chartier |
Follow us on