UnderAutomation
質問ですか?

[email protected]

お問い合わせ
UnderAutomation
⌘Q
このページは英語でのみ提供されています。

VAL 3 applications

List the VAL 3 applications of a Staubli controller, load a project from its disk, start it, stop it and unload it from a PC.

  • List the applications
  • Load and start a project
  • Stop and unload
  • Try it in the demo application
  • Reference

This page shows how to manage the VAL 3 applications of a Staubli CS8 or CS9 controller from a PC: list them, load a project from the disk of the controller, start it, stop it and unload it. The tasks that an application creates are on the page VAL 3 tasks.

List the applications

GetValApplications() returns the VAL 3 applications of the controller.

var controller = new StaubliController();
controller.Connect("192.168.0.254");
ValApplication[] applications = controller.Soap.GetValApplications();
foreach (ValApplication application in applications)
{
Console.WriteLine($"{application.Name}: loaded={application.Loaded} running={application.IsRunning} encrypted={application.IsCrypted}");
}
controller.Disconnect();
}
Click to see the full code
PropertyMeaning
NameName of the application
LoadedThe application is in memory
IsRunningThe application runs
IsCryptedThe application is encrypted

Load and start a project

LoadProject(path) loads a project from the disk of the controller, without starting it. StartApplication(path) starts it. The path is the one of the project file on the controller, for example Disk://myProject/myProject.pjx.

var controller = new StaubliController();
controller.Connect("192.168.0.254");
// Path of the project on the disk of the controller
string project = "Disk://myProject/myProject.pjx";
// Load the application in memory, without starting it
controller.Soap.LoadProject(project);
// Start it
controller.Soap.StartApplication(project);
controller.Disconnect();
}
Click to see the full code

When the controller refuses, the method throws a CustomSoapException. Its ErrorCode tells why, for example ApplicationNotFound or CannotStartApplication. See Connect to your robot for the errors.

Stop and unload

var controller = new StaubliController();
controller.Connect("192.168.0.254");
// Stop the running application. It stays in memory.
controller.Soap.StopApplication();
// Or stop every application and remove them from memory
controller.Soap.StopAndUnloadAll();
controller.Disconnect();
}
Click to see the full code
  • StopApplication() stops the running application. It stays in memory.
  • StopAndUnloadAll() stops every application and removes them from memory.

A running application can move the arm: check the state of the cell before you start or stop one from a PC.

Try it in the demo application

Everything on this page can be tried without writing code, in the VAL Applications page of the demo application.

VAL Applications page of the Staubli SDK demo application

The demo application is open source. The C# source of this page is ValApplicationsControl.cs.

Reference

Methods of SoapClientBase :
C#
// Get all the VAL applications available on the controller
ValApplication[] GetValApplications();
// Load a project in memory from disk (does not start it)
void LoadProject(string projectPath);
// Start a VAL application on the controller
void StartApplication(string applicationPath);
// Stop all VAL applications on the controller
void StopAndUnloadAll();
// Stop application on the controller
void StopApplication();
Class
ValApplication
C#Python

Represents a VAL3 application on the controller.

MemberTypeDescription
ValApplication()
Constructor
IsCrypted
Property
bool
Indicates whether the application is encrypted.
IsRunning
Property
bool
Indicates whether the application is currently running.
Loaded
Property
bool
Indicates whether the application is loaded in memory.
Name
Property
string
Name of the application.
Equals(object)
Method
bool
GetHashCode()
Method
int
ToString()
Method
string

Universal Robots、Fanuc、Yaskawa、ABB、Staubli ロボットを .NET、Python、LabVIEW、または Matlab アプリケーションに簡単に統合

UnderAutomation
お問い合わせLegal

© All rights reserved.