Delaying and sequencing outputs

Okie, only problem I see (unless I'm missing something) with your setup is that if more than 1 input comes on during the 5 second period, then when the timer is done, all those outputs (however many it may be) will come on at the same time. It would work great if inputs become true at least 5 seconds apart from one another.

Why won't this work??
 
If the PLC goes rung by rung, then everytime an output goes on the delay timer is set, and the next rung wont be able to switch the output on. Which is not the case with my PLC.

btw what can I use to view .RSS files? I don't have RSLogix.
 
I have been playing with the FIFO...

So I'm watching the stored wanted output states for rising edges, which one-shots FIFO PUSH, and that same pulse conects value x to FIFO IN, x being 1,2,3...depending on the wanted output.

If FIFO is not empty, a clock ( period = delay time ) ticks at FIFO PULL.

I compare FIFO OUT to 1,2,3,..., which turns on the outputs.

And it doesn't work. :oops:

http://bayimg.com/NAeHjaaCO

This is a test, bits 7,8,9 are rising-edge one-shots of the wanted output states.

Anyway, the FIFO solution is only good if the inputs are going to be sequential?

I can get all inputs ON at the same time...
 
Okie, only problem I see (unless I'm missing something) with your setup is that if more than 1 input comes on during the 5 second period, then when the timer is done, all those outputs (however many it may be) will come on at the same time. It would work great if inputs become true at least 5 seconds apart from one another.

Why won't this work??

I tested my example with RSLogix500 Emulate. Only one output can come on at a time. Each output rung is followed by a reset rung which will drop out the DN bit of the timer, so the next output rung can't do true, unless it was already turned on.

Your program works (after changing all the EQU Source A from T4:0.PRE to .ACC) to turn them on with one second delays...just needs logic added to turn them off when not needed...

Paul
 
I have been playing with the FIFO...

So I'm watching the stored wanted output states for rising edges, which one-shots FIFO PUSH, and that same pulse conects value x to FIFO IN, x being 1,2,3...depending on the wanted output.

If FIFO is not empty, a clock ( period = delay time ) ticks at FIFO PULL.

I compare FIFO OUT to 1,2,3,..., which turns on the outputs.

Robert13_cro,

Are you saying that you can see the data move in the fifo on each clock pulse? And that it turns on all of the outputs in your diagram?

Just looking at your pic, I'm curious that your fifo accepts digital contacts at the "in". I would think that the proper syntax would be a word.

Does the "pull" make the fifo stack larger?

Does the "push" make the fifo stack smaller?

On a side note maybe one of the RSS file providers will make a PDF for you.
 
I tested my example with RSLogix500 Emulate. Only one output can come on at a time. Each output rung is followed by a reset rung which will drop out the DN bit of the timer, so the next output rung can't do true, unless it was already turned on.

Your program works (after changing all the EQU Source A from T4:0.PRE to .ACC) to turn them on with one second delays...just needs logic added to turn them off when not needed...

Paul

Sorry, I forgot that every output in your setup was followed by a reset. My mistake. And, I didn't realize that I used the PRE value. Good call! And yes, I know logic needs to be added to turn them off. I think I wrote that in the rung comment at the beginning.
 
My PLC doesn't go through the program rung by rung, I dont have any rungs at all, so a solution can't be as simple as Okie's for example.

I gave up on the FIFO because, as I said, I don't know how to get all the outputs to go ON, if all the inputs receive impulses at the same time, and that must be possible.

I probably messed something up with the type of data I'm pushing in, and the way I'm checking the output, so it isn't working even if the inputs go ON one by one.
 
Without a direct reference to information concerning your controller I think we are all just guessing. More information and links to manuals would help.
 
One of those things that make you think. I have attached an idea that might do the job but I don't have a system or emulator to try it on. I hope it helps or gives you an idea of how to go.
 
Thank you for your effort, I took a look at it, I will go through it in detail tomorrow.

I don't understand the input rungs, the change must be recorded unconditionally.

Then those stored wanted output states must be executed with a delay.

So, the program starts, if all of the inputs get a pulse, all the stored wanted states go ON, and the outputs start going ON one by one, sequence not important.

Switching off must be unconditional.
 
My PLC doesn't go through the program rung by rung, I dont have any rungs at all

Until the precise nature of his controller is cleared up even referencing the most generic PLC type functions is an exercise in futility. We don't know how his controller processes logic!
 
The PLC runtime environment is firmware which provides the operating systemservices and library functions associated with the PLC. In the RUN mode,the PLC firmware runs as real-time executive which processes the (LadderLogic) instructions that have been loaded into the program RAM area. The program runs in a continuous loop which consists of the following major phases:


· Input read and output write scan

· Housekeeping

· Program scan (logic solve).

During the input/output (I/O) scan, the processor updates its internal input and output buffers with data being read from or written to I/O devices. Local I/O devices are the input and output cards residing in the same physical chassis as the PLC processor. Remote I/Odevices reside external to this chassis and are communicated with the processor's peer communications interface port.

I/O data for input and output cards used in the application are maintained in input and output image tables. Typically the PLC will organize the I/O image tables. This means that the inputs which are present will read into an area in memory. The program will write into another area of memory which is used to represent the outputs. It can be said that the input image table is representative of 'how the inputs are perceived', and the output image table is 'the desired state' of the outputs. These tables are accessible to the Ladder Logic program as data files. During the I/O scan, data read from input cards are placed in appropriate locations in the input image table. At the same time, output data written to the output image table by the Ladder Logic are transferred to the appropriate output cards.

Following the I/O scan, the PLC performs what is referred to as "housekeeping."This portion of the program cycle is used by the real-time executive to maintain and update its own internal state.

The program scan is the portion of the overall cycle where Ladder Logic instructions of the user's application software are executed. Here, the embedded firmware program operates on the portions of memory (RAM) that have been loaded previously with the application software from the binary file.
Program files contain the actual instructions to be executed. Data files are used to maintain program variables and other data structures required by the logic. It is the responsibility of the firmware program to properly decode and execute instructions in the program files. The program must also properly update the contents of the data files based on these instructions.

 
http://bayimg.com/KAECPaaCp

Here's something that works partially.

BIT's 15-18 are one-shots, 5 seconds apart ( the delay time ), 15 is first, 18 is last.

BIT's 1,3,5 & 7 are stored wanted output states (w.o.s., which can change at any time ).

One-shot at BIT's 11-14 will turn on the outputs ( the DO6_1_OUTx ).

If all the wanted states are ON, and the shooting sequence starts, the outputs will go ON one by one, as wanted.

Let's say only the 4th output wanted state is ON.When the first one-shot occurs, It will skip to the 4th output and turn it on.

Problem:

Let's say the 2nd and 4th w.o.s. are ON.
First one-shot turns on Output2.
Second one-shot can't skip to Output4, it tries to turn on Output2, but it's already on.

If I add the skip case with 2nd w.o.s. ON and Output2 ON, so it can skip to the next one, my PLC will do it immediately while the first one-shot is active, after turning ON Output2.

http://bayimg.com/KaecJaacP
 

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,426
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,420
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