
Brktman (Customer) asked a question.
I need help with an off delay timer code issue.
I am trying to keep an output on for a few seconds after a sensor turns off the output. I added a delay timer and thought that would work in keeping the output on for a few seconds after the sensor is tripped. The delay happens but only delays the time to the next step in the drum. I want to keep the output on not delay the next step in the drum. What am I missing and doing wrong?
I tried to zoom into your image and it just blurs. Are you attempting to control Y105 within and out of the drum instruction? If so, that's not a good idea. Use a C bit in the drum and use it in a N.O. contact and your timer's contact in an "OR" branch to operate the Y105 output. I would also recommend making the Y105 not a Set/Reset output.
This should be easier to see above..
+1 @Todd Dice (Customer)
The following code should do what you require.
Once the timer expires, the conveyor (Y015) and C1 are reset.
I hope this helps you out.
Regards,
Garry
https://accautomation.ca/series/click-plc/
Awesome, thank you! That makes sense to use the C bit to turn on with the through beam then use an ON delay instead of the Off delay like I was trying. This also has to return to the drum at step 8 after the T2 is complete. Is the red mark the proper location to accomplish this?
I still have to clean up the drum and remove Y105 and another output that has been removed. I used timed output in the drum to operate Y105 in the previous program.
Hi @Brktman (Customer)
"This also has to return to the drum at step 8 after the T2 is complete." You could just use a not C1 as an enable on the Drum instruction. This will then resume after the delay.
Just a thought.
Regards,
Garry
https://accautomation.ca/click-plc-drum-instruction/
@birktman I'd change the compare from Equal to Greater Than, so if the drum is at any step above 7 it will reset as long as the timer is timed out.
Thanks guys. This should help with an issue I’m having still. The X004 is being used as a bag sensor. The issue I’m encountering is the bag is still in front of the sensor at step 1 of the drum. There is only a short period where X004 is not true (probably between step 2 and 3). I suppose I could change the order of drum but then it would start out of the proper sequence. Is there a way to render X004 inactive until what is now step 7 (which sounds like Todd’s suggestion because it would be in the reset until step 7), would I still need to reorder the drum still for that solution?Hopefully I explained that well enough.
Without knowing the process you're attempting to control, I can only guess and give suggestions. You could add a compare condition to the Y105 SET so the X4 contact is limited to a certain point in your drum.
Another suggestion I have is describe "what" the sensor does in addition to what type it is. For example, "Reflective sensor detects bag." It adds additional clarity to what the things do.
It is a bag opener and sealer. There’s an actuator with a cylinder that has suction cups attached. Cylinder extends grabs a bag and retracts, actuator turns 180 and cylinder extends pushing bag against additional cups. Cylinder retracts again to open bag (step 7 in drum). Product is dropped in via conveyor- activated by x004, bag gets closed by x003 and stopping conveyor. Sealer bars extend sealing the bag. While bag is sealing, machine is in the process of grabbing another bag via actuator turning etc. This is step one of the drum.
The problem is the cups once in while don’t pull a bag down. So that’s why I’m trying to add the bag sensor reflective x004. And use it to start the conveyor. Then use the through beam x003 to stop the conveyor after contents flow past.
So the issue is the bag is still being sensed (x003 reflective) while the drum resets at step 1 because it is in the process of being sealed and still detected. Hopefully it’s clearer now. Let me know if I left out anything critical.