RobotStudio event

HELP! Get data from RECORD array

Options

I need some urgent help!

I am developing a FP application and i want to display the data from a data type i created as a RECORD and is in fact a [1,3] array shown below.

From my user.sys....

  RECORD boxdata
    string name;
    num mass;
    num length;
    num width;
    num height;
    num maxLayers;
  ENDRECORD


  RECORD linedata
   boxdata lineboxdata;
   string palletType;
   num BoxCount;
   num LayerCount;
   num LayerOffset;
  ENDRECORD

From my program....

  PERS linedata curr_linedata{3}:=[[["No",0,0,0,0,0],"No",0,0,0],
                                                   [["No",0,0,0,0,0],"No",0,0,0],
                                                   [["No",0,0,0,0,0],"No",0,0,0]];

I want to be able to update labels on the FlexPendant display which refer to the elements in the above array as they change.

I have devloped a substantial amount of my program being able to hanlde change events for IO signals but i cant get this to work at all.

I've tried creating a new linedata ==>  

PERS linedata linedata1:=[["No",1,2,3,4,5],"No",6,7,8];

to see if i can access this first before i handle the array but no luck.

I have a sub called "UpdateData" which i formed from examples and the RAB 5.10 user guide but keep getting null exception errors.

 

My VB code is attached for any to help.

2008-07-11_104430_tabcontrolapp.rar

Thanks in advance  image

BigM

Comments

  • BigM
    Options

    An Update....

    I have successfully been able to obtain all the elements from the array of "linedata" and update my screen with it. (Refer to Updatedata sub in link below for obtaining data and parsing strings)

    The only problem now is that I can not get any eventhandlers to work on updating the screen when data in the array changes.

    I know this sounds like it should be simple but i can never get any code to reference the arrays data elements.  Any attempts like looking at rd datavalue changed or ld datavalue changed or even making the data an arraydata and then trying fails  image

    Can anyone help as I'm well versed in RAPID but this is my first week at teaching myself RAB and visual studio .Net so i'm only going off examples from the user guide and the internet and have no deep understanding of .Net programming???

    Updated code is attached...

    2008-07-12_143928_update1.rar