I’ve been asked to look at a programming problem with a Siemens PLC, and don’t have a great deal of experience with them.
The problem is as follows:
You have four toggle switches (normally open) that control four pieces of separate machinery.
The PLC is to be used to introduce a delay between the switch being switched on, and the equipment receiving the signal from the PLC to start.
The tricky part is that the delay needs to ensure there is a 10 second spacing between each piece of equipment starting to prevent a sudden load on the electrical system.
Switch #2 is switched on, 10 second delay before motor #1 turns on.
Switch #4 is switched on after Switch #2, so it needs a 10 second delay after the timer for switch #2 finishes.
Switch #3 is switched on after Switch #4, so it needs a 10 second delay after the timer for switch #4 finishes.
Finally, Switch #1 is switched on after Switch #3, so it needs a 10 second delay after the timer for switch #3 finishes.
In terms of a sequence diagram:
Switch #2 ON — 10 sec —> Motor #2 ON
Switch #4 ON —> Motor #2 ON — 10 sec —> Motor #4 ON
Switch #3 ON —> Motor #2 ON --> Motor #4 ON — 10 sec —> Motor #3 ON
Switch #1 ON —> Motor #2 ON --> Motor #4 ON —> Motor #3 ON — 10 sec —> Motor #1 ON -> DONE
So the design problem include:
- Switches going on in an arbitrary order
- Operator may switch off an arbitrary switch while operating the device.
To me, this looks like a basic queue, where each “pop” from the queue takes 10 seconds. Also, switching off a switch deletes the device it corresponds to from the queue, and switching it on adds the device it corresponds to the back of the queue.
The Question: is this possible to implement with the device we’re looking at? I am attaching a picture of it.
I don’t expect anyone to code this for me, but if it’s a common pattern I’d appreciate a gentle nudge in the right direction.