RobotStudio event

How to set a digital output low when error occurs

rakshithb174
edited March 2022 in RAPID Programming
Hello,

I have multi-tasking option. I want to set a particular output low when robot enters error state. This could be any error. Are there any instructions to check current robot state? I want to set the output low irrespective of type of error. In any case the robot comes to a stop due to error this should work.

A little more info: The robot is dispensing a paste. I want the flow to stop when robot stops due to error. There is a main program that calls several sub-programs since the all the dispensing can't fit into a single module. 

Where and how should I include this error handling?

Comments

  • Is there a system output that goes high when robot is stopped due to an error? If yes, what is the easiest way to set a particular digital output low when the system output for the error goes high?
  • lemster68
    lemster68 ✭✭✭
    There is a system output for execution error state.  That would go high when true, but you could invert it.  However, if you are dispensing, why not cross connect the signals for motors on, program executing and execution error (inverted)?  After all, if someone pushes the stop button on the pendant, the robot is not faulted.  Or, they could switch it into teach, still not faulted.  But in either case the program is no longer running.
    Lee Justice
  • @lemster68 agree with different scenarios you mentioned. Could you share more info on cross connecting signals please?
  • lemster68
    lemster68 ✭✭✭
    You can read up on cross connections in the system parameter manual.  Additionally I think I may have already posted some examples.  A search could serve you well, quite possible other users have also posted examples.
    Lee Justice
  • @lemster68 I went through the system parameter manual for cross connections and I have setup a cross connection as follows:



    The Digital Output signal DO1_1 (from IRC5) is connected to a PLC and is used to control flow (start / stop). When DO1_1 is SET (HIGH), the flow starts and vice versa. I want the DO1_1 to go LOW when an error occurs during execution so that the flow stops. As you mentioned, there might be multiple scenarios when I want the flow to stop:
    1. When operator presses emergency stop
    2. When there is program execution error
    3. When operator presses stop button on teach pendant
    4. Or any other error such as 

    I have 5 actors in cross connection:
    Actor1: System Input - Stop

    Actor 2: System Output - Production Execution Error

    Actor 3: System Output - Path Return Region Error 

    Actor 4: System Output - Execution Error

    Actor 5: System Output - Emergency Stop

    When any of these go HIGH (OR condition), the digital output DO1_1 should go LOW. However, the opposite seems to occur. When e-stop is ON, the DO1_1 goes high. I tried inverting all the actors in the first picture but it still doesn't work. Also, is there a system output for when operator presses stop button on the flexpendant? 

    "However, if you are dispensing, why not cross connect the signals for motors on, program executing and execution error (inverted)?"

    This would cause the Flow to start immediately when program starts executing. The flow start/top is controlled in RAPID code and flow is programmed to start only after a certain location is reached. 

    Any suggestions on how to implement this? 
  • graemepaulin
    edited March 2022
    Invert the Digital Output DO1_1 (in the setup for DO1_1).
  • lemster68
    lemster68 ✭✭✭
    I think that the path return error is not necessary.
    Lee Justice
  • Invert the Digital Output DO1_1 (in the setup for DO1_1).
    But wouldn't this cause problems in normal operations? The digital output DO1_1 is connected to the PLC. Is inverting this just a software fix or does it affect the actual logic level of the signal? If the logic level gets inverted, there would be considerable changes in PLC code. 
  • Also, is there a system output for pressing stop on the flexpendant?
  • It will invert the logic of the output - so setting it to 1 the output would be 0 and vice versa.
    If that causes you an issue you could invert each of the actors in you cross connection.

    You do not need a system output for pressing stop on the pendant as this is the same as the inverse of the Cycle On system output (that is if this output is low the program is not running).