Backing up a controller via an Addin
scottMHA
✭
I have an addin with a button to be able to backup all controller found on a network scan.
This works perfectly for virtual controllers but i get a generic error when attempting to backup online (real world) controllers. See below for how i currently do it. Any suggestions on another approach?
This works perfectly for virtual controllers but i get a generic error when attempting to backup online (real world) controllers. See below for how i currently do it. Any suggestions on another approach?
NetworkScanner runningcontrollers = new NetworkScanner(); runningcontrollers.Scan(); ControllerInfo[] aCollection = runningcontrollers.GetControllers(); int NumOfActiveControllers = aCollection.Count(); if (NumOfActiveControllers != 0) { for (int i = 0; i < aCollection.Count(); i++) { systemId = aCollection[i].SystemId; Controller con = new Controller(systemId); con.BackupCompleted += Con_BackupCompleted; con.Logon(UserInfo.DefaultUser); con.Backup("C:\temp\backups");
0
Comments
-
Hello!
When you backup using con.Backup the path you specify as an argument is the path on the remote controller and not the path on your local machine. It could for example be
/hd0a/XXX-XXXXX/HOME/MyBackup.
If you want to save the backup to your local machine you could first copy it over from the remote controller to your local machine and then remove the backup from the controller.—Adam GustavssonPC Software Support Engineer0 -
thanks0
-
AdamSG said:Hello!
When you backup using con.Backup the path you specify as an argument is the path on the remote controller and not the path on your local machine. It could for example be
/hd0a/XXX-XXXXX/HOME/MyBackup.
If you want to save the backup to your local machine you could first copy it over from the remote controller to your local machine and then remove the backup from the controller.
You mention above that i need to copy the backup from the remote controller but when attempting to do so using both the FileSystem.GetDirectory and FileSystem.CopyDirectory i get the exception "Object reference not set to an instance of an object".
Both the remote file and destination exists, any ideas on this?0 -
What version of PCSDK are you using?
Johannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0 -
Johannes Weiman said:What version of PCSDK are you using?0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings