Sets and Resets

thejoker954

Member
Join Date
Mar 2009
Location
somewhere
Posts
5
Hi all, I was wondering if Sets and Resets are a good thing or bad, because someone told my boss that having multiple sets and resets in a plc program is not a good thing. But I am of the opinion that they are an important part of the program and necessary to do what we need to. I'm a beginning plc programmer and I don't want to attempt rewriting our programs from scratch unless it's actually necessary.
 
the CORRECT answer depends on what type of processor you're using ...

next, are you familiar with the terms "retentive" and "non-retentive" and EXACTLY what they mean? ...

quick question just to get us on track:

suppose that something is ON - and the processor shuts down due to a power failure, etc. ... do you want that "something" to automatically come right back ON again when the power is restored - or do you want it to stay OFF until the operator pushes the start button again? ...

once you've thought that through, then you're ready to decide whether "retentive" is a good idea or not ...

big picture idea: using "sets" and "resets" - or "latches" and "unlatches" - is MUCH more than just a design feature - or a personal programming preference ... they have specific functions ... SOMEtimes you NEED them ... SOMEtimes using them is a VERY BAD idea ... tell us more about your hardware and about your system, and we'll try to help you nail this down ...
 
Last edited:
Sets and resets are like any instruction, they have their uses. However, that being said, they tend to make troubleshooting a horrible mess with multiple sets/resets of the same bit.

Personally I try to limit their use to status monitoring and leave the controlling to regular coils. If I need latching, I do it with logic in the run, rather than a set/reset.
 
thanks for the fast responses. I currently use IDEC FC5A PLCs. We make Domestic water booster pumps which for the most part are automated-if the power goes out I do need the system to resume from where it left off. The previous programmer used a lot of sets and resets because of this, the safety features, and the fact that we only have a couple of different base programs containing all features that any of our systems may use even if the current system its going into does not use that particular feature. One such base feature is model selection - one pump, two pumps, three pumps, or four. We also have a auto/manual feature. in auto the system tracks pressure and adjusts motor speed accordingly and the pump will only run for so long whether it shuts down on time or by temp. in manual the system runs at the speed you tell it to regardless of pressure and runs untill you tell it to stop. manual basically bypasses all safety features. sorry if this is a bit disjointed but im running around like a chicken with my head cut off. but later I will check out those links you gave me
 
Most European rograms I dealt with (especially German ones with Siemens) use S/R a lot (STL too).
There's no issue with the use of S/R from what I've seen, though, as mentioned above it may make troubleshooting a bit tricky.
I was also told when I started out in the field many moons ago by older people that S/R is "a bad thing". I assume people who only worked on AB and strickly ladder logic had a real issue of sorts with S/R.
Use it wisely, remember to Reset when need to and you'l be fine.
 
Hi all, I was wondering if Sets and Resets are a good thing or bad, because someone told my boss that having multiple sets and resets in a plc program is not a good thing. But I am of the opinion that they are an important part of the program and necessary to do what we need to. I'm a beginning plc programmer and I don't want to attempt rewriting our programs from scratch unless it's actually necessary.

HMMM? Nothing should bypass safety features. NOTHING.
I agree with Mickey.
And if you manage to bypass safety in the PLC, that means your safety system isn't a hardwired one?
Thats a big no-no.Can't rely on the PLC/software only (unless it is a Safety PLC & modules) to do safety.
 
the saftey features WILL shut the system down. If we have a system on the other side of the country and the system shuts down and we didn't have a bypass feature do you really think that the people would be happy to wait untill a technician who knows what their doing can get there? as my earlier post states i deal with domestic water pumps which basically means getting pressure to the top floor of high rise buildings. So you can imagine what would happen if people were without water for any amount of time.

and we do have hardwired saftey that can't be bypassed but it only comes into play when something is seriously wrong.

for example we use pressure transducers to track pressure in auto. if this transducer fails the system shuts down, now people don't have any water. the soonest anyone can get there is 24 hrs. so now you have no water past the first couple of floors. what can you do? go down to the system and place it in manual. the system runs to a predetermined frequency. maybe not enough to feed the whole building at once, but enough to give some water. if something happens where its putting out more pressure than the builing can handle we have a redundent hi alarm that kills the system automatically whether in auto or manual. and requires someone to actually go to the system and reset it.
 
I thought your original use of the word safety was meant in reference to normal permissives and such within the PLC program.

I suspected there would be some comments like you saw above. All too often, there are new people on this forum who have great power and not enough understanding of the danger, so we tend to always comment about safety. Better to scold unnecessarily than to say nothing and let someone end up getting hurt.

IMHO, the use of sets and resets is best applied when it can simplify and clarify logic. Of course, there are situation where they are just plain necessary to record states that must be maintained through a power cycle.

I have seen them abused by programmers in the past, so I can relate to your boss's comments.

Paul
 
I thought your original use of the word safety was meant in reference to normal permissives and such within the PLC program.

I suspected there would be some comments like you saw above. All too often, there are new people on this forum who have great power and not enough understanding of the danger, so we tend to always comment about safety. Better to scold unnecessarily than to say nothing and let someone end up getting hurt.

Paul

Well said, OkiePC.
 
To clarify a little, (and I don't mean to SPEAK for anyone but I see a little communication issue here) in the water/pumping industry it is not uncommon to refer to "alarm" systems as "safeties". It refers to the "safety" of the system, NOT the safety of personnel.

I try to stay away from that terminology in the systems I build to try to avoid the exact communication issue that seems to be happening here.

I WHOLE-HEARTEDLY agree that "personal safety" devices or systems should never be bypassed or disabled. But with a pump station, it is common protocol to have the "HAND" selection of the "HAND-OFF-AUTO" switch wired so that it runs the pump without using the PLC at all. Therefore, the equipment "safeties" go out the window.

I don't necessarily agree with doing that from across town where you can't hear the grinding equipment, see the spray, and smell the smoke.... It is TYPICALLY reserved for "attended" operation. But at ANY rate it doesn't mean you are putting PEOPLE at risk, only your equipment.

Stationmaster
 
Ok I am understanding more and more and I would just like to say thanks to everyone for your posts and help. I will also try to stay away from that terminology.
 
thanks for the fast responses. I currently use IDEC FC5A PLCs. We make Domestic water booster pumps which for the most part are automated-

I am using the same PLC, as well other equipment from the IDEC line, to do multi-pump irrigation pump stations for irrigation. I ALSO use them in automated packing plants.

My big push right now is developing real time, web based monitoring, email notification, and remote alarm resetting. I tried to use the IDEC "web server" module, but have found it to be too limiting. I am now in the process of developing software for an IPC that will perform the desired functions but in a much more efficient and stremlined way.

There aren't many members here that use mostly IDEC stuff, though I've run across a few. I'll be glad to help where I can. (No trade secrets, lol)

I do use "sets" and "resets" as needed, and agree with the other comments about them being a double-edged sword. I will say that I usually try to use only one "set" and one "reset" per coil in the main body of the program, with SOMETIMES another "reset" in a section that deals with resetting the entire machine. This game plan helps me keep things straight, and keeps trouble-shooting from being quite so cumbersome.

Stationmaster
 

Similar Topics

Hello all, I am trying to improve my skills, so I decided instead of moving a value into every single .PRE of an array of timers, I thought I...
Replies
6
Views
333
Hello, Does anyone know the preset thermal limits for SEW Movigear SNI B drives. Randomly experience overtemperatures of the heatsink of the...
Replies
0
Views
717
I want to have two displays that uses the same VBA variable "vbaint". But when I change between them, the variable seems to reset. How can I do...
Replies
4
Views
2,808
I'm loading bulk tankers with dry powder using a 1769-L33ER. Product is fed through gates, and close to the end of the load the system jogs...
Replies
11
Views
3,080
For a week now, my coworker and I have been troubleshooting a machine which has been displaying some crazy behavior. HMI values were changing on...
Replies
19
Views
4,246
Back
Top Bottom