scan order problem

chad k

Member
Join Date
Aug 2005
Location
edmonton
Posts
16
Tons of thanks to you for your any input.

my question is: what the difference if I switch the order of these two rungs? The fact is(using emulator) it doesn't work when the Timer is scanned first.

NOT(T4:22/DN)----------T4:22
T4:22/DN ----------SQO


 
I think the emulator is trying to be too clever. I think this will work in a real PLC. In fact I know it will as I have done this many times.


In a plc the timer status bits are not updated until the time instruction is executed. So in the scan where the timer expires and the done bit is set the scan is already past the NOT(T4:22/dn) preceeding the timer. The plc can't go back and evaluate the bit. So the done bit will remain set fo a full scan until the scan gets back to the timer rung and sees the timer is no longer enabled. At thiat point the done bit is reset.

The emulator is apparently updating the timer status outside of the virtual scan. So it knows before the timer rung is even executed what the state of the done bit will be after execution of the timer rung. Then I suspect the emulator double dips; running the timer instruction and setting the timer bits as required by the instruction. In this case the done bit is reset so the rest of your program won't see it.

Keith
 
Thank you for your resonable explaination.

so, the emulator just do some basic logic check. For some time analysis, Block transfer, PID, etc, it is no use anymore. Any comment about the RS emulator?
 

Similar Topics

I'm writing a program that determines the first outage in a series of limits. E-stop - Hi Limit - LGPS - HGPS - Exhaust Input Are all...
Replies
7
Views
8,454
Hi everyone, I'm trying to simulate any program in control expert and see a register in Modscan32 or any software to do that (Like ModbusPoll). I...
Replies
0
Views
94
I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
218
I have a Type C to RS485 adapter connect to my Siemens RWF55. I use modscan to scan it to get a value from the Siemens controller. In the...
Replies
4
Views
102
Back
Top Bottom