RobotStudio event

parameter

Options
hi, i heve a problem using parameter. I use then num type for save  my parameter, but the value that I save to this num is gone when I start the program from main.
Can I save a parameter always exist, wheter i move the PP to main or not? What data type that I should use?

 

Thanks before

Carmila
indah carmila

Comments

  • j_proulx
    Options
    Hello,
    You should make sure your num data is declared as a PERS persistant and not a VAR variable.


    Variable characteristics

    A variable contains a data value. If the program is stopped and started the variable keeps its
    value, but if the program pointer is moved to main the variable data value is lost.

    What is a persistent variable

    A persistent variable is basically the same as an ordinary variable, but with one important
    difference. A persistent variable remembers the last value it was assigned, even if the program
    is stopped and started from the beginning again.
    BR Jim Proulx
  • Dear Jim,
     

    Thank you for your reply. it's work. thank you. Finally I know the differences between var and pers (I don't know the differences before).

     

    Thank youTongue

     

    Carmila
    indah carmila