6/13/2010 6:13 PM | |
Joined: 9/18/2006 Last visit: 5/29/2023 Posts: 586 Rating:
|
Hi. Probably it is feature of the compiler. Best regards. |
6/13/2010 6:37 PM | |
Joined: 2/6/2009 Last visit: 4/19/2023 Posts: 932 Rating:
|
DearKriztof, Every instruction in STL needs the RLO of the previous line to execute the operation. For Ex: Wrong Logic: A M0.0 = Q0.0 A M0.1 = Q0.1 NOP 0 In the above logic, if the first operation is notsuccess (i.e Q0.0 is false). The Q0.1will not get on even the M0.1 is High. Because the RLO of the previous is 0. Correct Logic: A M0.0 = Q0.0 SET A M0.1 = Q0.1 NOP 0 In the above logic Q0.1 will get ON if M0.1 is high irrespective of Q0.0, because the RLO of the previous line is set by the SET instruction. The set instruction to be used inside the network, But it is not necessary to use in the starting of the network/ |
Last edited by: Saravana kumar at: 6/13/2010 6:41 PMLast edited by: Saravana kumar at: 6/13/2010 6:40 PM_______________________________________________________________ |
|
6/13/2010 8:57 PM | |
Joined: 3/24/2009 Last visit: 1/5/2023 Posts: 535 Rating:
|
Dear Kriztof, after the '='-instruction, the SET-instruction is not required necessarily, because it sets the /FC-bit (First Check Bit) to 0. So the next instruction-string will start with a first-check.
However the SET makes the logic clearly arranged. Best regards, yy1 |
This contribution was helpful to
1 thankful Users |
6/13/2010 10:58 PM | |
Joined: 10/7/2005 Last visit: 6/3/2023 Posts: 2966 Rating:
|
Hello Kriztof here's my two cents worth on this subject: Whoever programmed it, did it"to be sure to be sure". Similar to what yy1already explained, as long as the previous RLO is "closed" (which an "=", "S", "R" and/or conditional Jump instruction will do), there is no need to additionally use a "SET" (to "force" the RLO) before you start a new RLO (it is an overkill, albeit one that does not do any harm other than costing memoryandscan time). Have a look at THIS thread too for some more detailed info on the subject of the "/FC" bit. I hope this helps |
Last edited by: fritz at: 6/13/2010 10:59 PMCheers |
|
This contribution was helpful to
2 thankful Users |
Follow us on