s7 question

darren.s

Member
Join Date
Apr 2005
Posts
46
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)
 
Last edited:
Thanks for making that clear, Werner. I had forrgotten that S and R instructions were RLO dependant.

Daniel Chartier
 

Similar Topics

Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
166
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
0
Views
68
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
91
I have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
80
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
81
Back
Top Bottom