RobotStudio event

Is it possible to trigger saving PERS values from RAPID?

Hello everyone,

I am new to RAPID programming and am struggling with the safe storing of PERS-values - especially robtargets.
In my application the values are initialized by declaring the robtargets with values 
in a module which is used to store all positions that the operator may have to teach during operation.

The teaching process also is based on assigning new values to those PERS-values from rapid code.
The code works fine, but when reading the handbook I stumbled across a passage that states that
the assignment of new values to persistants only takes place in memory while the program  is being executed.

As far as I understand, the new values are only saved back to the program on disk when the following happens:
-backup
-module is saved to disk
-program is saved
-program is edited

Since none of these events is supposed to be done by the operator, I now am wondering if the values, that are assigned to the persistants during operation (new positions) will be lost in case of a controller reboot/ power loss.

Is there any possibility to trigger the store-procedure for the persistants from RAPID-code?
Is there a best practice to make sure PERS-values are written back to the disk after being manipulated?

I tried the "save"-"startload" instruction for saving the module and loading it back at startup, but since the program is already running when the load is called and the PERS are already loaded, I get an error-message.
Since the program loads the module automatically, I also cannot unload it before using startload.

Thank you so much for your help.

Best Answer

  • lemster68
    lemster68 ✭✭✭
    Answer ✓
    Use the IPers interrupt to trigger a trap in which you save the data containing module to where it needs to be on the storage media.
    Lee Justice

Answers

  • Thanks for the reply - this works for me. 

    I was hoping there is a better way to do it without having to watch each PERS seperately, but nevertheless I can proceed with it.


  • Persistant values are not lost due to a reboot or power loss, neither are variables or constants. When the robot loses power or reboots it hibernates its current state and then wakes up back to exactly where it was before the reboot/power loss.
  • Another option is to run abb's IOT Gateway on a server that can connect to the IRC5. Then use an OPC-UA client to log changes to the tag created from the PERS var.  IPers is probably the more robust solution with fewer moving parts.