General > General Discussions
Generic ladder logic question
(1/1)
Joel Moore:
I'm looking for some advice on how to accomplish the following in ladder logic:
I have 3 inputs that are being used to command the PLC to move to 1 of 8 predefined positions. I'm trying to figure out a robust way to respond to those inputs. Ideally I want to make sure that whatever external system is controlling the inputs has plenty of time to make its changes before I start to move. For example if the inputs are currently "0,0,0" and the external system is in the process of changing to "0,1,1" I don't want to initiate a move while the inputs are in the intermediate state of "0,0,1".
Currently I just have a 1s timer that checks the state of the inputs but that still leaves the possibility that I check the state while the inputs are in the middle of changing.
The best way, in my opinion, would be for a timer to start when the system sees an input change and the PLC won't initiate the move until the timer expires. However there are a total of six events that could trigger the timer (3 inputs, either on or off). I have no idea how to design this using ladder logic.
garysdickinson:
The following logic will detect when the 3 inputs have been stable for the minimum time determined by the SetValue of TIMER, InputChange.
I'd give this logic a try,
Gary D.
Detect Input Change. Have any of the inputs changed
since the previous scan through the ladder logic?
Input1 Latched1 InputChange
-----||-----|\|--------+--------------------------(RLY)
|
Input1 Latched1 |
-----|\|-----||--------+
|
Input2 Latched2 |
-----||-----|\|--------+
|
Input2 Latched2 |
-----|\|-----||--------+
|
Input3 Latched3 |
-----||-----|\|--------+
|
Input3 Latched3 |
-----|\|-----||--------+
When Inputs have remained stable longer than the
SetValue of the InputStable TIMER then InputStable will
be TRUE.
InputChange InputStable
-----|\|------------------------------------------(TIM)
Remember Input state for comparison on
Next scan of logic.
Input1 Latched1
-----||-------------------------------------------(RLY)
Input2 Latched2
-----||-------------------------------------------(RLY)
Input3 Latched3
-----||-------------------------------------------(RLY)
Navigation
[0] Message Index
Go to full version