RobotStudio event

Monitoring CtlState on S4 OPC Server

 

We are using interlink to communicate with a robot in our system. At the moment we lack the functionality to monitor the health of the robot from the overlying system so that when we for example get an alarm for robot engine overload the system stops without knowing more than that the robot did not perform the last order. We now want to add monitoring of the robot and have so far understood that in our version of interlink we should watch the  "AliasName.CtlState" variable in the S4 OPC Server.

We know that that variable can have 9 different states depending on the status of the robot...

0 - State Unknown
1 - Initialization
2 - Stand-by
3 - Power On
4 - Run
5 - Power Off
6 - Guard Stop
7 - Emergency Stop
8 - Guard Emergency Reset
9 - Stand-by Emergency Reset

Our question is which of these states that are considered to be normal operation or states that the robot can recover from without any outside interaction.

Thank you,

Tobias

Comments

  • There are only two states that are writable via the RAP protocol, Stand-by (motors off) and Run (motors on), so these are the only ones that allow programmatic interaction.

    States like emergency stop or guard stop require manual user interaction, like resetting the e-stop or putting the controller into auto, to leave.

    Finally, several of the states like PowerOn, PowerOff, and Initialization are transitional, i.e. the controller passes briefly through this state to get to a steady state. You might not see these because they happen so fast.

    I think states 8 and 9 occur when you reset the e-stop, but before you press motors on, depending on whether you are in teach or auto.

     

    Russell Drown
  • Thank you for a fast reply,

    If i understand correct we can let the robot run as usual as long as it is in a state that is writable via the RAP protocol or in a transitional state and only signal a warning to the overlying system when it enters a state that requires manual interaction?

    /Tobias Scherman

  • What I was trying to say is that all you can do interactively with CtlState is to request motors on or off, all of the other conditions are read-only and result from the operation of the robot. I have never tried doing this from OPC Server, I guess it works. Most people do this either with the system inputs or with the Helper control.

    The most common usage of CtlState information is in WebWare SDK, where people will use the StatusChanged event of the Helper control to update whatever controller status information they display on their UI. You might be able to give a better display of what's going on if you monitor all of the parameters that are returned by the StatusChanged event. They are:

    Private Sub object_StatusChanged(OprState As Integer, CtlState As Integer, PgmCtlState As Integer, PgmState As Integer)

    Also you can get LogEvent events from the helper and use them to determine exactly what error occured, I don't know if this is available from the OPC Server or not.

    Russell Drown
  • All we want to do is to monitor the variable so we know when we need to halt our overlying program(not robot program) and wait for the robot and when we need to signal that manual interaction is needed at the robot.

    The system is built with a thirdparty opc library to read from OPC so we are not using Webware but we are monitoring the same variables as the method you sugested does.

    Thank you for your replies. The first one answered most of our questions.

    Tobias Scherman

     

  • Good Evening,
    Need help...
     I'm developing an application for ABB IRB1400, the controller is the S4.
    I already can read/write the on the I/O, and send strings, num or bool, but I can not power on or power off on the engines? In CtlState only can monitor the states. I'm using Interlink to communicate with the Controller.
    Best regards,
    Jose Dias