When the outputs are actualizated?

darlam

Member
Join Date
Nov 2007
Location
Toulouse
Posts
2
Hi everbody,
I'm working with automatic verifcation of PLC programs written in Ladder language.
Knowing that the real outputs of the PLC are only updated after the execution of all rungs I have the following questions.
If the value of a bit variable V is actualized in Rung N, and the same variable is used as an input in the Rung N+1, which will be the value of V used in Rung N+1 (during the same execution cycle), the old one obtained during the input reading cycle or the new one calculated in Rung N.
I would like to know the answer in both cases, Where V is a input/output variable, and where V is a PLC memory location variable.
I would apreciatte any help.
Darlam Bender
IRIT - ENSEEIHT
 
Its also very confusing the way you've written the question.

darlam said:
If the value of a bit variable V is actualized in Rung N,

Is this variable supposed to be an OUTPUT?

darlam said:
and the same variable is used as an input in the Rung N+1, which will be the value of V used in Rung N+1 (during the same execution cycle), the old one obtained during the input reading cycle or the new one calculated in Rung N.

The value would be what you set it to last. ie Rung N (Modicons may have a different answer if they sit in the same network)
 
Greetings darlam ...



and welcome to the forum ...



let’s assume (gosh, I hate that word) that you’re working with an Allen-Bradley PLC-5 or SLC-500 - but NOT with a ControlLogix ...



and let’s also assume that I fully understand your question ...



If the value of a bit variable V is actualized in Rung N, and the same variable is used as an input in the Rung N+1, which will be the value of V used in Rung N+1 (during the same execution cycle), the old one obtained during the input reading cycle or the new one calculated in Rung N.



the answer would be: “the new value calculated in Rung N” ...



I would like to know the answer in both cases, Where V is a input/output variable, and where V is a PLC memory location variable.



with the PLC-5 or SLC-500 platforms, it won’t make any difference ... the answer is the same regardless of whether the bit has an Input address (I:xxxxx) or an Output address (O:xxxxx) or the address of an internal bit (B3:xxxx) ...



BUT ...



with a ControlLogix platform for an INPUT memory location it is POSSIBLE (but NOT probable) that the input memory location MIGHT be “refreshed” or “updated” between the execution of rung N and the execution of rung N+1 ... specifically, the update/refresh of the INPUT memory locations is NOT synchronized to the processor’s execution of the ladder logic ... now if you’re asking about rung N+1000 then we’ve got more CHANCES (but no ASSURANCE) that the input might be “refreshed” or “updated” from the real-world field device before the execution of the N+1000 rung ... place your bets and spin the wheel ...



sorry if I’ve guessed wrong about your system - or if I’ve somehow misinterpreted your question ...



and if you’re really interested in this type of stuff, I recommend that you click the link under my signature and visit the “Sample Lessons” area of my website ... download the questions and the answers for the “Beginner Level Quiz #110” and have fun ... the background for the questions that you’re asking should be covered in that material - as long as it’s an Allen-Bradley system ... as others have posted, some other brands might work differently ...
 
Also note that most PLCs have an immediate command that will update an input or output in the middle of the scan, as soon as the rung is enbountered, without waiting for the table update at the end of the scan.
 
First of all, thanks for the quick answers.
I'm actually realizing an academic work, so I don't want to take into account a specific PLC hardware, but how woult it be the execution in a PLC according to the standard IEC 61131-3. I'm not taking into account yet the fast input reading functionality.
I've read the standard and I didn't find a clear answer to this.

The variable V couldn't be an OUTPUT, cause it will be used later in the program as a "contact", so it has to be IN_OUT or a memory bit, Am I right?

Back to the question, I will try to clarify it.

What I thought that could happen is the following:
VARIABLE START = INPUT
VARIABLE RUN_MOTOR = OUTPUT
VARIABLE RUN_LAMP = IN_OUT

INPUT REDING CYCLE -> START = T, RUN_LAMP = F
input table copied to memory
PRGRAM:
| START RUN_LAMP |
RUNG 1 |---||--------()---- |
| RUN_LAMP RUN_MOTOR |
RUNG 2 |---||--------()-----|
after the execution of rung 1 the value of RUN_LAMP will be true in the output table but not in the input table.
when the the Rung 2 is executed, it takes the value of RUN_LAMP from the input table that is False, and RUN_MOTOR will be false.
Then, only in the next PLC input reading cycle the new value of RUN_LAMP will be copied to the input table and then will activate the RUN_MOTOR output.

Based on the answers I received i would guess that what i just said is not true. But since my question was not clear, maybe it was misinterpreted.

For the ControlLogix plataform, if the inputs can change their values during the same PLC cycle without an specific command to do that, then this system doesn't respect the IEC standard, so it's not of my interest in the moment.

Thank you for your help.
 
In all of the plc products I have worked with (IEC 61131 compliant and otherwise) the output image table is treated no differently than any other memory location. You can read from it and write to it without restriction. The only difference is that the contents of this portion of memory are sent to the required output device(s) at the appropriate point in the scan.

In other words when you use the status of a specific output in the program the status is the last logical status from earier in the program, not the actual physical status at the output device.

I didn't know that IEC 61131 dealt with the fine details of plc platform operation such as I/O image table update. I thought it was just limited to programming form and organization. You learn something new every day.
Keith
 
In your example: RUN_MOTOR = T

There are PLC's where this might not be true on some occasions. But thats brand related (I think)
 

Similar Topics

Problem: Our PLC can only output 4-20mA, but the actuators it needs to control, modulate based on a 0-135Ohm signal. Buying 4 or 8 individual...
Replies
7
Views
267
Does anybody know how 'timestamp output' functionality internally works in a controller? I do not mean the instructions you use as a programmer...
Replies
0
Views
65
Hello, I am stuck on trying to get an ArmorBlock, 1732E-16CFGM12QCR to respond to EIP outputs. My PLC is Panasonic FP0H-C32ET. I Registered the...
Replies
1
Views
122
Hi all so i have a robot project im working on were i need to set the layers. using the hmi screen i would like to use the numeric data display to...
Replies
11
Views
805
I'm building a hydraulically-operated tractor-mounted boom that will be used to read temperatures within bulk material piles. To simplify the...
Replies
10
Views
657
Back
Top Bottom