What they want:
When safety enable goes high (CIP Safety input), run the robot.
What I plan to do.
Make internal DOs and DIs to link to the System I/O (labeled SI and SO).
Cross-connect internal DOs to the SIs.
Make a background task.
Create an interrupt and trap routine linked to the Safety enable input
Make a ‘state machine’ in the trap (while loop with case statement)
State machine always starts at first state upon entering the trap routine.
1st state: dwell for a moment, such as .55 seconds. (possibly add check for sys input busy?)
2nd state: Set the Motors On DO to on. Wait until Motors On SO is on.
3rd state: Set Motors On DO off. Wait for sys input busy SO to be off.
4th state: Set PP to Main DO to on. Wait until PP-moved SO is on.
5th state: Set PP to Main DO to off. Wait for sys input busy SO to be off.
6th state: Set Start DO to on. Wait for Task Executing SO to be on.
7th state: Set Start DO to off.
END, exit While loop, return.
Is there anything I am missing? Write Access?
I also have some checks for other SO, like ‘RunChainOK,’ so that anything that would obviously prevent the routine from succeeding can be communicated to the operator on the Flex pendant.
Thanks,