Where the Variable values are stored?


I would like to analyze some data from laser scanner, which is just 1D array as defined below:

PERS num n_GI_Left_Array{n_NUM_SAMPLES_BW}

         n_GI_Left_Array{i} := GInput(gi_Sensor);

I wonder if someone could tell me how I could find, save or retrieve the values in the array for analysis.

Much appreciated in advance!


Best Answers

  • Micky
    Micky ✭✭✭
    Answer ✓
    Hello Donald,

    Persistent can be defined with and without initial value.

    If the initial values are not used, as in your case, the current values are only stored within the robot memory but not written back to the program.

    For persistent with an initial value, the current values are stored in the robot program and can be reused.

    The initial values must be assigned to the data declaration and the number of data must correspond to the data field size "n_NUM_SAMPLES_BW".

    PERS num n_GI_Left_Array{n_NUM_SAMPLES_BW}:=[0,0,0,0,0,0,0,...,0,0];
  • Elderwild
    Answer ✓

    I don't know what system you are using or how it is set up, but in the old days, you could hook up a printer to print out this kind of thing using the serial port. Serial ports are becoming harder to find now days with networks so readily available. So, if you are on a network, you should be able to do the same thing digitally. If you are stand alone, then you will need to write some Rapid to tell the controller to save the data to a file by part, hour, shift, job, day. etc.... I would think this could be done using the service port, but if not, then the Lan port would be an option. Either way you will need to collect the data often and store in a different local or you will fill up your memory with clutter. 


  • Hi Micky and Elderwild , Thank you very much for your answers. 

    My problem was solved by defining them as System Global PERS to get around with the initial values sytex errors. 

    According to technical reference manual : "Since PERS can be declared in 3 different types: System Global, Task Global, and Local. The first one can be initialized with Omitted values, but not the later two. "

    To used them after declaration, simply follow the  arrayName{#} format.