RobotStudio event

Motors on and Start at Main from single input

Jaycephus
Jaycephus United States ✭✭
edited February 23 in RAPID Programming
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,
- Jay

Comments

  • bwinter714
    bwinter714 Saratoga Springs, New York
    edited February 24
    That sounds doable to me, I don't see why that wouldn't work. So a single input (someone pressing fault reset) would start the robot in essence?

    The only thing I'm thinking about, is if they want the system to start when the safety goes ON+, that implies that it is off and you're in a guard-stop state. And I am pretty sure that it is against RIA specs to automatically start motion based solely on the resetting of a safety circuit, which is what going from low-high implies to me, and what you seem to be trying to accomplish with your code. This isn't an E-stop is it? I definitely know that isn't OK, but I'm a bit more fuzzy if it was a fence circuit or an area scanner for example. 
  • Jaycephus
    Jaycephus United States ✭✭
    It's an authorization from a Safety PLC through CIP safety.
    Not the way we would have done it, but the safety system, gates, and light-curtains are not ours. 
    - Jay