RobotStudio event

Fail to use PC SDK to backup for the real controller

Options
I have completed the backup in the virtual controller, but when I tried this method for the real controller, it failed and did not show any exception, is there anybody know how to backup for the real controller and storage the backup in pc by pcsdk, thanks!

This is the program I wrote by pcsdk, which has completed backup function for the virtual controller.

using (m = Mastership.Request(controller.Rapid))
{
//choose the backup file storage directory in my pc
FolderBrowserDialog dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
try
{
controller.Backup(dialog.SelectedPath);
}
catch (BaseException baseexception)
{
MessageBox.Show(baseexception.Message);
}
}
}

Answers

  • scottdf93
    Options
    You need to backup locally to the controller (hd0a:HOME) then copy the file over to a PC using Controller.FileSystem methods namely FileSystem.BeginCopyDirectory.

    Don't forget to request mastership first!