Basic Question: --()-- vs. --(s)---

quadPLC

Member
Join Date
Feb 2010
Location
Milwuakee
Posts
51
Hi guys,
I am fairly new to PLC programming and am developing a program for a SIEMENS S7-300.

I am wondering: what is the difference between using just a standard coil --()-- and using a "set" coil --(s)-- ?

Thanks guys!
 
--( )-- If rung=true then out:= 1 else out:= 0
Output state matches the rung state


--(S)-- If rung=true then out:= 1
Once output is set it stays that way until something else somewhere else in the program clears it.
 
Last edited:
You can usually use Set and Reset as synonyms for Latch and Unlatch. You do have to be careful about whether or not the coils are retentive when you cycle power to the PLC or stop/restart the program. Different brands handle those events differently. Don't assume that the rules you learned for one brand carry over to the new brand.
 
You can usually use Set and Reset as synonyms for Latch and Unlatch. You do have to be careful about whether or not the coils are retentive when you cycle power to the PLC or stop/restart the program. Different brands handle those events differently. Don't assume that the rules you learned for one brand carry over to the new brand.

Yeah. Actually, I am converting an AB program to Siemens and am rapidly learning that same fact. I now see instances of --(L)-- and --(U)-- in the AB program and see how that compares to set and reset in the Siemens app.

It was difficult for me to discern the difference from the documentation alone. I've got it now and also have bookmarked the PLC tutorials on the site for future reference.

This is certainly quite a difference from programming .net!
 
Steve brings up a good point.

In an AB PLC a prescan of the program is made at power up. Any memory address that is addressed by a retentive instruction is retained and any memory address that is addressed by a non-retentive instruction is cleared.

In many brands of PLCs areas of memory are designated as retentive and non-retentive. The state of any tag in a retentive memory area is retained and any tag in a non-retentive memory area is cleared without regard to what kind of instruction originally set the value.

The second method is probably more common.
 
oh ok starting to make sense (a bit). So when you have a retentive bit in AB, is this the latch bit. So for instance if the bit is latched when the machine is powered down, upon power up the latched bit is still latched. is this correct? vise versa for unlatched bits?

thanks for all the enjoyable reading everyone
 
oh ok starting to make sense (a bit). So when you have a retentive bit in AB, is this the latch bit. So for instance if the bit is latched when the machine is powered down, upon power up the latched bit is still latched. is this correct? vise versa for unlatched bits?

thanks for all the enjoyable reading everyone


Correct - almost....

Please try to think that the bits in memory are not "latched" in any way, and that all data is naturally retentive.

It is the instruction type that influences it's response to a power-cycle.

The processor pre-scans the logic looking for "non-retentive" type instructions, to ensure that the first (real) scan asserts the logic correctly and in the right sequence.

During the pre-scan, the processor will turn off BOOL tags that are referenced by an OTE instruction, even if they are also referenced by an OTL or OTU. Timer tags referenced by TON and TOF instructions are reset, but those referenced by RTO are not.

In summary, it is what you use in the code that determines if a bit or data is retentive, not the data itself.
 

Similar Topics

Hi all, I have a noob question regarding data handling from sensors. I understand configurations and I/O mapping sensor input/output variables...
Replies
2
Views
220
GE 90-30 using ME 6.0 - Newbie question... Let's say on rung 10 I set a coil (S) with a one-shot. Input to coil drops out, but coil stays...
Replies
30
Views
11,087
Dear experts, i have pretty basic/ dump question, can someone help me to figure out how to read/ what is this? i assume it is solenoid vavle...
Replies
4
Views
1,059
Create ladder logic program to count 4 on pulses (not using a counter) and then turn the output on if the on pulse input signal can look like the...
Replies
105
Views
36,433
Im looking to hook up a 3 wire PNP photocell to an Allen Bradley 1746IV 16 module. Ive watched videos about hooking up DC sensors, but they show...
Replies
3
Views
2,956
Back
Top Bottom