UnderAutomation
Une question ?

[email protected]

Contactez-nous
UnderAutomation
⌘Q
Cette page est disponible uniquement en anglais.

Send a VAL 3 application

Send the folder of a VAL 3 application to /usr/usrapp on the controller in one call, then load and start it with the SOAP methods.

  • Where the applications are
  • Send, load and start
  • What the method does
  • Before and after
  • Errors

This page shows how to send a complete VAL 3 application from a PC to a Staubli CS8 or CS9 controller, real or emulated by Staubli Robotics Suite, then load and start it. One call copies the folder of the application with all its files and sub-folders.

Where the applications are

The VAL 3 applications are in the folder /usr/usrapp of the controller (FileClientBase.USER_APP_FOLDER). Each application has its own sub-folder, named as the application, with its project file inside:

On the PCOn the controllerFor the SOAP methods
C:\MyApps\myApp\myApp.pjx/usr/usrapp/myApp/myApp.pjxDisk://myApp/myApp.pjx
C:\MyApps\myApp\start.pgx/usr/usrapp/myApp/start.pgx

Send, load and start

UploadApplicationToController(localAppFolder) takes the local folder of the application. The name of the folder is the name of the application.

var controller = new StaubliController();
controller.Connect(parameters);
// The application must not be in memory while its files are replaced
controller.Soap.StopAndUnloadAll();
// Copies C:\MyApps\myApp and its sub-folders to /usr/usrapp/myApp on the controller
string remoteFolder = controller.File.UploadApplicationToController(@"C:\MyApps\myApp",
progress => Console.WriteLine($"{progress:0}%"));
// /usr/usrapp/myApp/myApp.pjx is Disk://myApp/myApp.pjx for the SOAP methods
controller.Soap.LoadProject("Disk://myApp/myApp.pjx");
controller.Soap.StartApplication("Disk://myApp/myApp.pjx");
controller.Disconnect();
}
Click to see the full code

What the method does

  1. When /usr/usrapp/myApp exists on the controller, it deletes it with all its content. The files that are not in the local folder do not stay on the controller.
  2. It creates the folder of the application and all its sub-folders, also the empty ones.
  3. It uploads every file. progress receives the percentage of all the files, from 0 to 100.
  4. It returns the folder of the application on the controller, for example /usr/usrapp/myApp.

UploadApplicationToControllerAsync does the same, with a CancellationToken.

Before and after

  • An application in memory can be refused by the controller while its files are replaced. Call StopAndUnloadAll() first.
  • After the upload, load the project with LoadProject("Disk://myApp/myApp.pjx"), then start it with StartApplication. See VAL 3 applications.
  • A running application can move the arm: check the state of the cell before you start it from a PC.

Errors

  • DirectoryNotFoundException: the local folder does not exist.
  • FileException: the controller refused a file or a folder, for example because the application is still loaded, or the user has no right to write. The message gives the path and the reply of the controller.

See Files overview for the connection and the other errors.


Intégrez facilement les robots Universal Robots, Fanuc, Yaskawa, ABB ou Staubli dans vos applications .NET, Python, LabVIEW ou Matlab

UnderAutomation
Contactez-nousLegal

© All rights reserved.