RobotStudio event

Backup failure with pcsdk

I use the following codes to do the backup:
----------------------------------------------------------
controller.Backup( "TempBackup");
                        // Wait for the backup to be completed
                        while (controller.BackupInProgress) ;
----------------------------------------------------------
It throws out the following errors:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-04-02 15:21:15: ABB.Robotics.GenericControllerException: C0040403 : No response from controller.
Timeout
Url:  Cmd:Get  Prop:BackupState  Args:  Elapsed:21005  CurrentCmds:0
History:
-00:01:23.2774629 [7] SendCommand url: cmd:Get prop:IsOptionPresent arg:-Option PCIN
-00:01:23.2617030 [7] status:294912 data:-OptionPresent 1
-00:01:23.2617030 [8] SendCommand url:/RAPID cmd:GET prop:TaskPanel arg:-mark 0 -noelts -1
-00:01:23.2617030 [9] SendCommand url:/CONFIG/MMC/IOVIEW_BLOCK/IOViewBlockIfMotorsOff/enabled cmd:Get prop:Value arg:
-00:01:23.2617030 [9] status:294912 data:0
-00:01:23.2617030 [8] status:294912 data:-noelts,all,mark,cc     5,1,         0, ...
-00:01:23.2617030 [10] SendCommand url: cmd:Set prop:LogoffUser arg:-Uid 90
-00:01:23.2617030 [10] status:294912 data:
-00:00:21.0262026 [41] SendCommand url: cmd:Set prop:LogonUser arg:-name "Default User" -pwd "08;sqepvldu" -locale Remote -app "" -loc "DESKTOP-1N95AR6" -alias "SYSTEM"
-00:00:21.0262026 [41] status:294912 data:-Uid 94
-00:00:21.0262026 [42] SendCommand url: cmd:Get prop:IsOptionPresent arg:-Option PCIN
-00:00:21.0262026 [42] status:294912 data:-OptionPresent 1
-00:00:21.0262026 [43] SendCommand url:/CONFIG/MMC/IOVIEW_BLOCK/IOViewBlockIfMotorsOff/enabled cmd:Get prop:Value arg:
-00:00:21.0262026 [43] status:294912 data:0
-00:00:21.0262026 [44] SendCommand url:/DHROOT cmd:Get prop:EnvironmentVar arg:HOME
-00:00:21.0106704 [44] status:294912 data:/hd0a/K1A1A1425280R04/HOME
-00:00:21.0106704 [45] SendCommand url: cmd:Set prop:Backup arg:-Path "TempBackup"
-00:00:21.0106704 [45] status:294912 data:
-00:00:21.0106704 [46] SendCommand url: cmd:Get prop:BackupState arg:
00:00:00 [46] status:-1073478653 data:Timeout TIMEOUT
 ---> RobotStudio.Services.RobApi.RobApiException: C0040403 : No response from controller.
Timeout
Url:  Cmd:Get  Prop:BackupState  Args:  Elapsed:21005  CurrentCmds:0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Does anyone have such problem?
Tagged:

Answers

  • Have you tried performing an I-start and then reloading everything from a backup? Beware, I-Start will completely remove system parameters and RAPID programs so be sure to make a backup before you do this so you can restore everything back to its original state. 
  • I can't do this action.The robot is running with jobs.
    After our debuging ,we found the the "   while (controller.BackupInProgress) ;" is the problem maker.Actully ,the backup action goes successfully,we can get all the backup files.The above error information was thrown when runing the code "   while (controller.BackupInProgress) ;". The purpose we use this code is to determine whether the backup action was finished,is any other method we can take?
    Thanks a lot.
  • You can trigger an event if the backup is successfull.
    https://developercenter.robotstudio.com/api/pcsdk/api/ABB.Robotics.Controllers.BackupEventArgs.html

    Here is an example from my program.
    (c is controller object)
    c.BackupCompleted += new EventHandler<BackupEventArgs>(aController_BackupCompleted);
    c.Backup(DIR_BACKUP_CTRL);
    
    
            private static async void aController_BackupCompleted(object sender, ABB.Robotics.Controllers.BackupEventArgs e)
            {
                if (!e.Succeeded) {
                    //Backup failed
                }
                else {
                   //Backup complete
                }
            }

    Goodluck with your program. 
    Systemintegrator - Web / C# / Rapid / Robotstudio

    If I helped, please press Vote Up  :smile:

    ☑️2024 - RobotStudio® User Group
  • You can trigger an event if the backup is successfull.
    https://developercenter.robotstudio.com/api/pcsdk/api/ABB.Robotics.Controllers.BackupEventArgs.html

    Here is an example from my program.
    (c is controller object)
    c.BackupCompleted += new EventHandler<BackupEventArgs>(aController_BackupCompleted);
    c.Backup(DIR_BACKUP_CTRL);
    
    
            private static async void aController_BackupCompleted(object sender, ABB.Robotics.Controllers.BackupEventArgs e)
            {
                if (!e.Succeeded) {
                    //Backup failed
                }
                else {
                   //Backup complete
                }
            }

    Goodluck with your program. 
    Thanks a lot.We will try your code.