RobotStudio event

Create a new "SpeedData" from SDK

Hi to all, I would like create a SpeedData value different form the standard, defined in the system module. In a Rapid module this is to easy, but i have to do this from the pc SDK. Can anyone help me? Is there a an interface to make a new RAPID var from SDK and insert this into a module? Thanks to everybody.

Comments

  • Can't you make a variable, that you write to from SDK, like any other variable?
  • If I use something like this...

    RsGenericDataDeclaration speed15 = new RsGenericDataDeclaration("V15", "speedata", new [] {15, 500,5000, 1000});
          speed15.ModuleName = _rsProcedure.Name;
          speed15.Synchronize = true;
          speed15.StorageType = RapidStorageType.Constant;
    It creates a RsGenericDataDeclaration of type speeddata?  Could be inserted into a RAPID module?
  • Hi,

    Do you need to create a new speeddata or can you simply write the new value for each component?

    From RAPID it would be the following (have not used PC SDK so do not know the syntax you would use for it):

    MODULE mMain

               PERS speeddata speed15:=[15,500,5000,1000];

              PROC main()

                          speed15.v_tcp:=15;

                         speed15.v_ori:=500;

                         speed15.v_leax:=5000;

                          speed15.v_reax:=1000;

                 ENDPROC

    ENDMODULE


    Regards

    Graeme