6/6/2010 12:01 AM | |
Joined: 9/27/2006 Last visit: 9/16/2024 Posts: 12282 Rating: (2683)
|
Hello ashwani; RLO means "Result of Logical Operation". It is one bit of the Step 7 Status Word, and is used to evaluate every STL statement in your program (all code devolves to STL before becoming machine code for transfer to the PLC). When you write A M0,0 ... you are asking the CPU to proceed with a logicalAND between the RLO bit and the value of M0.0 and placing the value back in the RLO bit. You can manipulate the RLO bit with speciific STL instructions: if you wrote SET A M0.0 ... then you would have made sure that the RLO at the beginning of your code was equal to 1. Further reading suggestionsfor more information: From the STL manual: You can use one of the following instructions to change the result of logic operation (RLO): • NOT Negate RLO • SET Set RLO (=1) • CLR Clear RLO (=0) • SAVE Save RLO in BR Registerhttp://support.automation.siemens.com/WW/view/en/18653496 See Frtiz' post in this discussion: https://www.automation.siemens.com/tf/WW/en/Posts/38369 Daniel Chartier
|
This contribution was helpful to2 thankful Users |
6/6/2010 3:02 AM | |
Joined: 9/27/2006 Last visit: 9/16/2024 Posts: 12282 Rating: (2683)
|
Hello ashwani; I think that you understand the use of RLO pretty well. What you need to realize is that program flow is not controlled only by the RLO, but by all bits in the Status Word in combiation (it took me a while to understand this, documentation is not easily available with all details). Have a look at the article "What is the meaning of the BR bit in the status word in STEP 7?"in the following collective FAQ on creating Step 7program sequences, it might help: http://support.automation.siemens.com/WW/view/en/21554306 Hope this helps, Daniel Chartier |
This contribution was helpful to1 thankful Users |
6/6/2010 3:53 PM | |
Joined: 10/7/2005 Last visit: 9/16/2024 Posts: 3020 Rating: (1054)
|
Hello ashwani allow me to addone supplementary piece of advice to Daniel's very usefulones and it relates to the "/FC" bit (First Check bit, which is bit0 inthe Status Word). The status of the "/FC" determines if - a new RLObegins (if /FC = 0) OR - if the instruction is to to be combined with the current RLO to form a new RLO (if /FC = 1). I know it sounds all a bit weird, but it isn't all that complicated and worthwhile trying to understand, so here are the rules: "=", "S", "R",all RLO and BR dependant Jumps (e.g. JC, JCN, JBI etc.)"close" the RLO (i.e./FC is reset to0), so that the next instruction creates a new RLO and does NOT depend on a previous RLO. Example: Assumend start condition: /FC = 0, RLO = N/A (because /FC=0) M7.0 = 1 M8.0 = 0 A M 7.0 //NEW RLO is formed, because /FC was zero // --> Result: RLO = 1 (M 7.0 is 1), /FC = 1 ("A" instruction sets it to 1) A M 8.0 //existing RLO combined with RLO of this instruction // Result:RLO = 0 (M 8.0 is0, which is "AND'ed" with existing RLO), /FC stays1 Asfor yourquestion of "the value of rlo before step 1", I must say that it will be whatever it will be (depending on the preceding logic). As you can see from the above though, it will NOTmatter as long as it was "closed" (i.e. /FC = 0). I hope this helps |
Cheers |
|
This contribution was helpful to11 thankful Users |
6/7/2010 8:19 AM | |
Posts: 11 Rating: (0) |
thnx fritz, for the beautiful write up
|
This contribution was helpful to1 thankful Users |
Follow us on