delay an input

danfman

Member
Join Date
Mar 2015
Location
madison
Posts
3
What would the logic look like to delay an input? I have a prox switch about 1/2 a second upstream of a solenoid. When the prox senses a part I'd like the solenoid to start 1/2 a second later. When it stop sensing a part, I'd like the solenoid to stop 1/2 a second later.
 
The "Done" bit of an On-delay timer enabled by the prox and with a preset of 1/2 second will turn on 1/2 second after the prox. It will turn as soon as the prox does.

The "Done" bit of an Off-delay timer enabled by the prox and with a preset of 1/2 second will turn on at the same time as the prox and remain on for 1/2 second after the prox turns off.

Be sure to double check the operation of the Off-delay timer in the PLC you are actually using. Not all PLC models support an Off-delay timer instruction. I gave you the operation of the Off-delay timer in the brands I am familiar with, but the implementation could be different in your brand.
 
I should have mentioned this earlier... this is the part that is giving me trouble. The gaps between parts are less than 1/2 a second. Therefore the off-delay timer will never count all the way up to 1/2 a second and thus never enable the 'Done' bit.

While the off-delay or on-delay will delay 1/2 a second before coming on they will instantly go off once the prox changes state... no 1/2 off delay.
 
I would use two on-delay timers. The input to the first timer would be the normally open of the proximity. The input to the second timer would be a normally closed for the proximity. The first timer would set the solenoid and the second timer would reset the solenoid.

Regards,
Garry
http://www.accautomation.ca
 
What would the logic look like to delay an input? I have a prox switch about 1/2 a second upstream of a solenoid. When the prox senses a part I'd like the solenoid to start 1/2 a second later. When it stop sensing a part, I'd like the solenoid to stop 1/2 a second later.

If you enable the solenoid after a 1/2 of sensing the part, and turn off a 1/2 second after losing the part-this must be a long part?

I should have mentioned this earlier... this is the part that is giving me trouble. The gaps between parts are less than 1/2 a second. Therefore the off-delay timer will never count all the way up to 1/2 a second and thus never enable the 'Done' bit.

While the off-delay or on-delay will delay 1/2 a second before coming on they will instantly go off once the prox changes state... no 1/2 off delay.

Use the on delays timers "timer not timing" bit in the off delay timer enable branch also. This way, if a new part turns the prox on, the TT bit disables the off timer.
 
I should have mentioned this earlier... this is the part that is giving me trouble. The gaps between parts are less than 1/2 a second. Therefore the off-delay timer will never count all the way up to 1/2 a second and thus never enable the 'Done' bit.

While the off-delay or on-delay will delay 1/2 a second before coming on they will instantly go off once the prox changes state... no 1/2 off delay.

You need fifo, copy with timebase 0,1sec input to different bits. 5th bit will set solenoid.
(you have 5 bits, each have input state on 0,1s steps. bit0 is input state now and 5th bit have state which was half second before)
 
You need a latch to use a timer. With AB, you could latch an on delay timer with the .EN bit and unlatch with the .DN bit. This will allow your timer to continue timing after the proximity switch pulse turns off.

However, if the proximity switch is able to pulse again prior to the 1/2 second timer being done, then you will need to use a bit shift function or a FIFO stack triggered by a clock pulse to transfer the switch status forward in time.
 
Will this work?

Prox Gap
|/|-----------------(L)

Prox Part
| |-----------------(L)

Gap T1
| |-----------------|Pre=0.5sec|

Part T2
| |-----------------|Pre=0.5sec|

T2.DN Gap
| |-----------------(U)

T1.DN Part
| |-----------------(U)
 
Your situation sounds like you only need to turn off the solenoid if you see a 1/2 second gap. So 2 timers. prox blocked and prox clear. Logic would be: If prox blocked for 1/2 second then activate solenoid. Then when prox clear for 1/2 second de-activate solenoid.
 
I thinked something like this:




input ----------
-| |-----------------------------| prox=1 |
---------
input ----------
-|/|-----------------------------| prox=0 |
----------




0,1s ---------------------------
-|P|----------------------| state_0_5s = state_0_4s |
| ---------------------------
|
| ---------------------------
|-------------| state_0_4s = state_0_3s |
| ---------------------------
|
| ---------------------------
|-------------| state_0_3s = state_0_2s |
| ---------------------------
|
| ---------------------------
|-------------| state_0_2s = state_0_1s |
| ---------------------------
|
| ---------------------------
|-------------| state_0_1s = prox |
---------------------------



---------------- solenoid
---------|state_0_5_s=1 |------------------------( )
----------------



 

Another method

input ----------
-| |-----------------------------| prox=1 |
---------
input ----------
-|/|-----------------------------| prox=0 |
----------


0,1s -----------
-|P|-----------------------------| SHL |
| |
1 -| |--- PROX_MEM
-----------


0,1s -----------
-|P|-----------------------------| ADD |
PROX_MEM -| |
PROX -| |--- PROX_MEM
-----------


PROX_MEM:X5 solenoid
-| |--------------------------------( )



 
Lare's example shows Siemen's instructions - just to help you out, in AB the -|P|- contact (rising edge trigger) is represented by a standard -| |- followed by an ONS. The SHL (shift left) instruction is BSL in AB.
 

Similar Topics

Can anyone help with this in Automation Direct Directsoft 6. I am trying to use an input X1 as a busy signal. When X1 comes on I want to have a...
Replies
5
Views
1,793
I'm doing a small project to count misloads on a machine. Three consecutive misloads from any feeder will result in the machine stopping. The...
Replies
0
Views
1,695
How do I delay my input reading for a few second. example my input is A and I wanted to delay the input to my plc to wait for 5s before turns on...
Replies
2
Views
1,794
Build error occurs with TON ladder logic command. Time Input expected on block. Using Integer Tag under Control Local, and then hard number 19...
Replies
2
Views
753
I have an SLC 503 running a machine with a scanner and 1794 RIO. One of the functions is a register motor on a printing cylinder. The manual 3...
Replies
3
Views
1,273
Back
Top Bottom