I_rock_well

Trigger button using OSR doesn't work consistently

8 posts in this topic

I am working on my first project involving a PLC, and am trying to implement a trigger button. I attached the program I have created so far. Strangely, it works only about half of the time. Sometimes the output energizes/deenergizes (in my case a solenoid valve which opens/closes a gripper) for a split second, but than returns to the previous state, kind of as if the osr triggered twice in rapid succession.

I am using Rslogix Micro with a Micrologix 1100 (1763-L16AWA) if that makes a difference.

Any help is greatly appreciated.56f87ab8caa60_misbehavingtrigger.thumb.P

Share this post


Link to post
Share on other sites

It may be more likely that the analog value is fluctuating rapidly above and below the trigger point during the half second the button press is active. As long as it is not a safety problem bypass around the GRT box once the Gripper has been activated.

 

What is the usual sequence? Is the analog value above the trigger point before the anti-tie-down inputs turn off or is it the other way around?

This system does not seem to allow for quick deactivation if the anti-tie-down inputs are released. How is the Gripper normally deactivated?

Edited by b_carlton
1 person likes this

Share this post


Link to post
Share on other sites

That seems to be a plausible explanation, I will check that out tomorrow. Bypassing would just be a examine if closed for the O:0/1 in parallel with the grt, right?  Opening the gripper with a low analog (=air pressure ) value should not be a safety concern. 

The pressure drops everytime the gripper opens or closes. I am unsure how fast it recovers. I hope it is sort of slow, as the gripper seemed to "malfunction" more often when I waited a few seconds before reopening/reclosing it.

I am unsure what you mean by quick deactivation. I am a senior ME student, I'm probably missing something and just stating something obvious: all I want is two press the two buttons simultaneously once to close, another time to open the gripper. 

If this doesn't solve the problem, is was thinking that I try to implement a latch/unlatch sequence with two osr, would that be a possibility?

Thanks for your help, in hope one day I can give something back up this awesome community. 

Share this post


Link to post
Share on other sites

As your inputs are arranged a quick release and re-apply of one button during the 1/2 second will re-fire the one shot. Once the gripper is energized, if EITHER button is released then set a latch which can only be cleared by releasing both buttons. Only after that latch is released will the buttons be recognized again.

As this is a student exercise it may be acceptable to use the double press method to release the gripper. But typically any release of an input would be a command to de-activate motion. And typically two-hand safety is not allowed to be implemented in a standard PLC, only with dedicated two-hand safety control hardware.

1 person likes this

Share this post


Link to post
Share on other sites

Currently, when both PBs have been actuated for more than 30ms, each PB timer will time out and each associated timer output will go high. If the comparator condition is true, the one-shot bits will be executed. If the comparator conditions change while the two PBs are held, the one-shot will retrigger as many times as the comparator logic becomes true.

This is easily resolved by moving the comparator instruction from rung 0003 to rung 0004 (in series with the one-shot/flip-flop logic). It is acceptable (good programming practice) to conditionalize the execution of the output with the comparator instruction. It is not acceptable (not good programming practice) to conditionalize the the two-hand logic with the comparator instruction. Think about it this way: would you place the comparator instruction in the output of a two-hand safety control?

Second, I noticed that you have annotated each PB timer as anti-tie down. This is incorrect. The timers are functioning as debounce timers. Ant-tie down means that if one PB is released, both PBs must be released to restart the PB actuation logic. This is not what happens with the current logic. To make this an anti-tie down, both timers must be used as 'OR' conditions to start a third timer. This third timer would be used to limit the actuation time window of the two PBs. There is some additional logic that would need to be implemented as well (only one more rung).

Please don't be discouraged with my comments. It certainly isn't intended. You've made a good start. Like all of us when we started, you need some guidance. You've done well by yourself.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks again for your help, I assume placing the comparator on rung 4 should do what I indented the plc to do. 

Now to the question of what I intended to do is enough. This is for a senior design project, so it will eventually be used in industry. The sponsoring company will have safety people look over it, but frankly I don't know how professional they are. The problem with the current setup is that operators could jump the two inputs to circumvent the two hand control, and a dedicated safety relay would prevent that,  correct? My understanding is that a safety relay takes the two inputs from the buttons, has some internals that make sure that the output of that relay only triggers when both inputs energize (or deenergize I my case). Couldn't an operator just as easily wire the output of a single button switch to the input of the plc, bypassing the relay altogether? 

Or would the relay be used after the plc, with plc outputs as inputs? 

 

Another question, which I know is know might not be answerable due to legal reasons: is a dedicated safety relay neccesary for a non life threatening device? The only OSHA standard I found is for mechanical presses, which I don't think this falls under. It's a parallel gripper delivering 500 pounds force, with a stroke of ~3 inches.  I do not have a problem purchasing a relay, but I need to convince my partner who works for the company who sponsors our senior design who wants to show how economical he is by keeping everything cheap. 

 

And I'm not discouraged, I spend 4 years doing heavy math by hand for stuff that could  be better done with software. My only programming class was c+, all this is new and self taught, I'm even a little proud of myself and find it very rewarding as I see results quickly. 

Edited by I_rock_well

Share this post


Link to post
Share on other sites

So I moved the comparator to rung 4 and bypassed the analog input if the gripper is closed. I think this actually a feature, not a bug.

However, I found out I have a safety issue that I personally think is more important than the 2 hand stuff being tamper proof.

When the PLC loses power, and the gripper is closed, the valve loses power and the gripper opens. I assume there is nothing I can do with the PLC and need a different valve, right? If anything this project taught me the importance of a good salesperson who knows his stuff and identifies problems before the customer does :)

Share this post


Link to post
Share on other sites

2-hand safety relays...monitor both input channels (button 1, button 2) and go into a fault condition if either or both are bypass wired (i.e., boot-strapped).  If operators/electricians try to hardwire around a pushbutton (or splice the same pushbutton into both channels), the safety relay will go into a faulted state.

Most safety equipment manufacturers have nifty machine safety guidelines.  These informative documents end up being the design engineer's manual for application of their hardware.  Follow "the book"; keep in mind you could be called into a civil lawsuit to argue your design.

http://literature.rockwellautomation.com/idc/groups/literature/documents/at/safety-at071_-en-e.pdf

http://www.toptier.com/download/sick_im0032606.pdf

There are many safety risk analysis tools and documents out there.  What is the safety risk if the operator reaches in too quick or bypasses the redundant start pushbuttons?  Typically, least injury is strain/sprain.  Some end-customers may still require a high level of safety control (i.e., safety relay). 

Most industry standards, such as OSHA safety guidelines, often are not readily accessible on the internet but purchased documents that a safety manager would purchase.  What you can find though is manufacturer safety documents, as noted above.

My last plug...flowcharting.  I have found the most thorough PLC program development method, for me, is to flowchart the application first.  If you identify all failure modes, and have alarms associated as such, a concise flowcharted application coded into PLC often achieves high-level of startup success with few edits needed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now