fundamental misunderstanding of scans

Tom Kazakoff

Member
Join Date
May 2004
Location
Boulder Creek, Ca.
Posts
26
This is a very fundamental scan question. I am not clear as to what the
PLC does in the following situation:
I have a Home routine that moves 11 valves to their "Home" state. Each
valve takes about 4 seconds for the move to complete. Each valve has it's
own timer. So when I turn on the output "open valve 1" the valve code
starts the move, waits 4 seconds, then verifies that the valve got to the
commanded position. The valve routine also sets a status bit after the
timer expires, so that the caller or user can determine if the move was
successful or not. The moves are initiated in the home routine by turning
on an output. Assume all moves will complete successfully.
Home routine:
---[valve 1 closed]----------------------------------------(open valve 1)
---[valve 1 opened OK]----[valve 2 closed]-----------(open valve2)
---[valve 1 opened OK]----[valve 2 opened OK]----(allValvesOK)
---[not allValvesOK]--------------------------------------(error)
I think this code will take a lot of scans to complete, since each move
takes 4 seconds, so I assume the last rung will get scaned a lot before
the valve moves are complete. Will the last rung give me a false error
until the output "allValvesOK" gets turned on?
 
What plc are you using, I have an AOI for Rslogix 5k, it's just for valves like yours. If you need it or just for the sake to take a look at it, just send me a PM and it will be yours.
 
Tom_Kazakoff said:
Will the last rung give me a false error
until the output "allValvesOK" gets turned on?

Yes, it will. The simplest modification to your existing logic would be to include a "timer done" bit for the final timer on your rung. i.e.:

[valve2openedtimer done] AND NOT [allvalves OK] -----(error)

Depending on your application, you may need to latch your alarm.
 
I’d do something along these lines. Keep in mind that this was created in RSlogix 500 and that it’s a basic program but the concept is the same as if done in RSLogix 5000.
With this you don't have to worry about false errors regardless of how many scans it takes.

 
I think this code will take a lot of scans to complete, since each move
takes 4 seconds,
A big important question: Do the valves HAVE to open in sequence?

If yes, then continue with your whittling.

If not, give all of them an OPEN command, then wait 5 seconds to see if all eleven are OPEN. If not, set the proper alarm or whatever. This requires much less time.
 
Use the timer only as alarm and use the endcontacts to go to next step needed.Make a diagram of the minimum requirement of the sequence.
 

Similar Topics

Hello everyone, I have a fundamental question about typical A/B PLC rung scans. Consider the following: A B ---][-------()---...
Replies
12
Views
6,166
Dear all. Everyone know about website or document for Fundamental question about automation?. Help me. Thanks. Huynt.
Replies
30
Views
9,776
In Logix Designer, I'm just not understanding how to compare a bit to 0: CMP: bHoldAnalogsDuringCal = 0 returns Invalid expression. This...
Replies
5
Views
3,303
Cant decide if this will take a 100 scans or 1 scan to complete - my thoughts are that if the internal memory in the plc is updated and available...
Replies
29
Views
8,017
It appears to me that Logix is improperly executing sheets of an AOI in sequential scans instead of the same scan as the main program. To test...
Replies
4
Views
1,676
Back
Top Bottom