RobotStudio event

Messaging domain, Guidelines / sample needed

I need to send multiple bool commands to an IRC5 controller, and I am a bit confused, since the samples provided does not bother with showing multiple bool io operations.

I would like to be able to signal "Stop" & "GoHome" &" EngageTool" as boolean variables. These should in turn trigger special PROCs in the main task.

How to do this? It looks like the messaging domain is not prepared for identifiers of the variables. I was hoping to find something simple like a "Name" of an RmqMessage.

Is there some recommendations available for some a bit more complex messaging?

Regards

Comments

  • You can not get the name of the data that is sent.
    But, you can solve this in 2 ways.

    1) Create alias datatypes
     ALIAS bool stopdata;
     ALIAS bool gohomedata;
     ALIAS bool engagetooldata;

     VAR stopdata mystop:=FALSE;
     VAR gohomedata homedata:=FALSE;
     VAR engagetooldata engagetool:=FALSE;

     Then you have different datatypes to react on.

    2) Create a new RECORD

     RECORD mymessage
       bool orderstop;
       bool gohome;
       bool engagetool;
     ENDRECORD
     
    Then you can evaluate the different booleans when receiving the message.


    Good luck