Delaying and sequencing outputs

Robert13_cro

Member
Join Date
Nov 2009
Location
Rijeka, Croatia
Posts
19
Hello there, newbie here.

Fresh to PLC's, starting with some ladder logic, about to buy your books đź“š

And as all newbies starting with a question.

I have multiple digital inputs, and multiple corresponding outputs.

Inputs receive impulses which switch the outputs on/off.

The outputs must not be turned on simultaneously, there has to be a delay.So if all the inputs receive impulses, the outputs must go on one by one with a delay in between, the order isn't important.

I got this far, 2 inputs/outputs for testing.

http://bayimg.com/oAeCEaaco

The inputs one-shot flip-flops, which save the wanted output state.

I use a Ton timer to start the delay if an output gets turned on.

If the wanted state is ON, if the output is OFF, and if the delay isn't active, the output flip-flop gets switched.

Don't mind the Out's 4,5,6.

The problem is if both inputs receive an impulse while the delay is active, when the delay runs out both outputs turn on.

I tryed something with the 1sec delay block, but it does more harm then help, because if I turn on Out2 first, I can still turn on Out1 while the 1sec delay is active.

Thank you for your help,
Robert
 
I'm sorry for not making it clear.

It's simply switching outputs on/off with impulses at the corresponding inputs, but the outputs should not be turned on simultaneously, so I need to memorize which outputs should be ON, and then set them ON one by one, the sequence doesn't matter.

If all the inputs receive impulses, the outputs must go ON one by one with a delay in between.

Shuting them off should be immediate.

It doesn't have to be direct, I can memorize the wanted output states first, then start switching them.

Example, I've got 5 outputs, I set them "10101" ( 1 to 5 ), and then start the sequence which turns on 1,3 and 5, one by one, with a delay time.
 
Is this sequence you are considering to be used after a power failure, so that all outputs do not try to come on at the same time, creating a large load after that power failure.

What I use in the above situation is a bit shift of a 16 bit word, triggered from a timer that increments once per second after a fist pass reset, then select one of those bits to delay the start ups of motor loads in multiple chillers over the next 15 seconds, this takes the edge right off power surge at start ups.
 
Last edited:
Yes, one of the requirements is to prevent a large sudden load, thus the sequenced switching-on of the outputs. Switching off doesn't have to be sequenced.

It's not just for startup, and not a fixed sequence.

Can you show me an example?

Thanks,
Robert
 
It sounds like all you need is a delay among the outputs. This example will only let one output be added to the load each time T4:0 expires. They can turn off instantly. If a switch is turned on and off during the delay, it's corresponding output will not be energized.

out_delay_000.jpg
 
Nope, they still all go ON at the timer, not one by one.

It is basicaly the same thing I did, but simplifyed.

The top part is the delay timer, the left is the input one-shots, the middle are the flip-flops, and right is the output assignment.

 
Last edited:
I can try to help you ... if you have binary outputs ( imagine 1 byte = 8 bits )
So you have Q0.0 = 0, Q0.1 = 0, ... , Q0.7 = 0.
It looks like 0 0 0 0 0 0 0 0 ... in decimal its 0
if you have 0 0 1 0 0 0 0 0 in decimal is 4
so you can write bits like Q0.0 , but you can write also a QB0

so if you need 0 1 0 1 0 0 0 0 ... you can write QB0= 10
after some time 1 1 1 1 0 0 0 0 ... you write QB0 = 15
 
Nope, they still all go ON at the timer, not one by one.

It is basicaly the same thing I did, but simplifyed...

It's not the same at all. The reset logic must follow each output rung in order for it to work correctly.

Order of operations is critical in many PLC programs...be careful how you simplify.
 
Hm, well, the software uses "combined ladder logic and function blocks", so I don't have rungs, but, as you can see from the pics, a working sheet.

The PLC, or LPC as the manufacturer calls them, goes through:


· Input read and output write scan

· Housekeeping

· Program scan (logic solve).

And it works as I described, the moment the delay runs out, all outputs whose wanted states are ON, go ON :(

I'm going to go with the additional "start" input, so the PLC doesn't do anything until it gets the signal to start switching the outputs, and then it goes through a defined sequence.

Thanks for your help!
 
I'll take a shot at it

Does your processor have a FIFO instruction or, failing that, a way to construct one?
 
It does have a FIFO instruction.
OK
Whenever an input goes high PUSH that change, in the form of some kind of numeric code into the FIFO. This way changes can come in one right after another or be separated by many seconds.

As long as the FIFO is NOT empty a self-resetting one-second timer runs which PULLs the next code from the FIFO when the timer times out. The code pulled operates the designated output.

Note that this is just a rough outline, you'll have to adapt the concept to your situation.
 

Similar Topics

Hello, I am written a POU controlled by task that runs every 30 seconds. What I want is that task should be delayed by 15 sec before its first...
Replies
3
Views
1,425
I'm trying to take an input signal (boolean, not analog), delay it for a configurable amount of time, then output it via an AOI using as little...
Replies
2
Views
2,419
Does anyone know if there is a way to delay a ML1500 from going into run mode throu programming. Thomas
Replies
8
Views
2,145
Does anyone have sample logic with conveyors that start and stop according to product on the line?
Replies
1
Views
114
Hello, I am struggling to figure out some logic. I have an analog pressure sensor coming into the PLC and would like to have multiple timing...
Replies
4
Views
162
Back
Top Bottom