Smart Component Get/Set Rapid Variable

MikaHyde
MikaHyde United States
Is it possible to create smart components using the out of the box tools to read/write rapid variables on the VC?
image

Comments

  • John Wiberg
    John Wiberg Sweden admin


    Not out of the box, no.
     
    The workaround for "num" values is to set up an Analog signal in the controller. Then have a backgound task or a trap that catches the change and updates the RAPID. While in RobotStudio you have a smartcomponent which maches it.
    Let me know if you want an example.
  • John Wiberg
    John Wiberg Sweden admin


    Thought about this one again and I can really see the potential in this, so I'm putting it into the UpFeed instead as a suggestion.
  • MikaHyde
    MikaHyde United States
    Thanks. It would be nice not having to run a separate VB program to simulate components like this. I had considered the analog approach but I'm working with POS data types so it would have been a little messy.
    image
  • j_proulx
    j_proulx United States ✭✭

    Has anything been done with this? Customer would like to read / write variable in VC while simulation is running. Thanks

  • jhegle2
    jhegle2 United States
    I would be interested to know if there is any progress made on this request?  I have a simulation that I would like to be able to display the current value of several variables in the RAPID code.  This can be done with the RAPID watch window, but, is not saved when the station is closed, nor is it recorded.
  • Jshelson
    Jshelson Windsor
    Hey all, i am having issue with Get/Set Rapid Component.

    I am trying to read a variable that is part of a Record.

    Interlocks_FromMH.Tool2Motion1Adv.

    When this tag becomes TRUE then i would like to put a mechanism (EOAT) joist to a certain position. The issue is that i get the error that the program could not locate this tag. Below are is the data i am trying to reference. I have already tripple checked the other parameters inisde the Component Properties.

    The odd thing is when i read the tag without the sub structure part  - Interlocks_FromMH - then it the result reads back the full structure of the tag, listed directly below.

    PERS RobotInterlocks Interlocks_FromMH:= [0,1,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE];


    RECORD RobotInterlocks
            num Style;
            num Tool;
            num X;
            num Y;
            num Z;
            num EaxA;
            num EaxB;
            num EaxC;
            num EaxD;
            num EaxE;
            num EaxF;
            num RackCount;
            bool NegX;
            bool NegY;
            bool NegZ;
            bool NegEaxA;
            bool NegEaxB;
            bool NegEaxC;
            bool NegEaxD;
            bool NegEaxE;
            bool NegEaxF;
            bool LeftApporach;
            bool RightApporach;
            bool StraightApporach;
            bool DataRequested;
            bool DataDelivered;
            bool Position1;
            bool Position2;
            bool Position3;
            bool Position4;
            bool Position5;
            bool Position6;
            bool Position7;
            bool Position8;
            bool Position9;
            bool Position10;
            bool Tool1Motion1Adv;
            bool Tool1Motion2Adv;
            bool Tool2Motion1Adv;
            bool Tool2Motion2Adv;
            bool Tool3Motion1Adv;
            bool Tool3Motion2Adv;
            bool Tool4Motion1Adv;
            bool Tool4Motion2Adv;
            bool Tool5Motion1Adv;
            bool Tool5Motion2Adv;
            bool Tool6Motion1Adv;
            bool Tool6Motion2Adv;
        ENDRECORD