s7 question

L 80
T DIW 196
SET
S DIX 198.0
NOP 0

with the above code the load and transfer function is straight forward and the " S DIX 198.0" sets bit zero in byte 198 but what does the term" SET" actually do ive looked in the book and it refers to setting the "RLO" but i still dont understand what this function is doing there.
what would happen to this logic if the word "set" was not there.
thanks in advance
 
Hello darren.s;

In the short example you give, SET has no consequences. But if in the next few lines you have RLO-dependent logic, such as =M2.1 or JC M001 or JCN M001, then having set the RLO to 1 would have an impact.
Maybe you could post the whole rung so we could examine it.

Hope this helps,
Daniel Chartier
 
The "S DBX198.0" function only works if the RLO is on. RLO = "Result of Logic Operation". So the code in front of the "S" determines if the bit will be set. The SET instruction sets the RLO. Therefor the bit DBX198.0 will be set to 1, recardsless of any logic before the sets. I know programmers that always use the SET instruction before any bit S/R commands. This way the don't have to think about RLO's. I had it once that a bit was not set evethough I used the "S" instruction. The machine was not responding in a way I would have expected. Nowadays I only use the SET instruction if the logic in front is complex and the bits are very powerfull. (In a robot program enable move diagonal for instance)
 

Similar Topics

Just did some conversion and was stumped for a minute on this. I don't want to count it as some kind of faulty component because it's most likely...
16
Replies
441
Views
Do I have any friends who have worked on big stacker cranes moving loaded pallets? If so, did the PLC or servo controller handle compensating for...
19
Replies
519
Views
Currently this system isn't having any issues, but I ran across this and now I am questioning how these BTR/BTW work. How is this working with a...
3
Replies
195
Views
Hello, I'm very used to building machine Profinet or EthernetIP set up the local machine network so that I can plug into the programming port on...
6
Replies
388
Views
So I started a new job and I inherited a frankenstein's monster of a project. I just stumbled on to something that I don't know if it's an issue...
6
Replies
426
Views
Top