47
asyril sa z.i. le vivier ch-1690 villaz-st-pierre switzerland tel. +41 26 653 71 90 fax +41 26 653 71 91 [email protected] www.asyril.ch Programming Manual Document Programming Manual Version 1.10 Date 24.10.2011

Programming Manual - Asyril

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

asyril sa z.i. le vivier ch-1690 villaz-st-pierre switzerland tel. +41 26 653 71 90 fax +41 26 653 71 91 [email protected] www.asyril.ch

Programming Manual

Document Programming Manual

Version 1.10

Date 24.10.2011

Programming manual Desktop & PocketDelta Robot by Asyril SA 2/47

Programming manual Desktop & PocketDelta Robot by Asyril SA 3/47

Table of Contents

1. Introduction to the robot software .................................................................. 4 1.1. Overview ........................................................................................................... 4 1.2. State machine ................................................................................................... 5 1.3. Robot Motion ..................................................................................................... 5

1.3.1. Point to point trajectory .............................................................................................5 1.3.2. Workspace objects ...................................................................................................7 1.3.3. IO Action Code ...................................................................................................... 11

1.4. Path planning .................................................................................................. 14 1.5. Task planner ................................................................................................... 15 1.6. Text Protocol ................................................................................................... 16 1.7. Communication with the robot ......................................................................... 17

2. Programming using the embedded TCP/IP server ...................................... 18 2.1. Working principle ............................................................................................. 18 2.2. Connection procedure of a TCP/IP client ........................................................ 18 2.3. Example of a simple C# TCP/IP client ............................................................. 19

3. Programming using ARL (Asyril Robotics Language) .................................. 21 3.1. Access Web based Editor ............................................................................... 21 3.2. Using the programming page .......................................................................... 22 3.3. Using the workspace page .............................................................................. 23

4. ARL - Programming Language .................................................................... 24 4.1. Expressions .................................................................................................... 24 4.2. Operators ........................................................................................................ 24 4.3. Operands ........................................................................................................ 25 4.4. Statements ...................................................................................................... 25 4.5. Mathematics functions..................................................................................... 26 4.6. Robot Commands .......................................................................................... 26 4.7. Module Commands ......................................................................................... 28

4.7.1. Asyview module commands .................................................................................. 28 4.7.2. IOMODULE commands ......................................................................................... 32 4.7.3. RotatingPlatform commands ................................................................................. 32

4.8. ARL Instruction ............................................................................................... 36 4.9. Examples ........................................................................................................ 37

5. Robot Text Commands ................................................................................ 38 5.1. State Commands ............................................................................................ 38 5.2. Motion Commands .......................................................................................... 38 5.3. IO Commands ................................................................................................. 40 5.4. Others Commands .......................................................................................... 40 5.5. Process Commands ........................................................................................ 41

6. Enumeration and return codes ..................................................................... 42 6.1. Return codes ................................................................................................... 42 6.2. Enumerations .................................................................................................. 42

7. Figures ......................................................................................................... 44 8. Tables .......................................................................................................... 44

9. Revisions ..................................................................................................... 45

Programming manual Desktop & PocketDelta Robot by Asyril SA 4/47

1. Introduction to the robot software

1.1. Overview The Figure 1 shows the working principle of the robot software.

Figure 1: Robot software

The communication with the robot software is made through an Ethernet connection. The robot implements 2 embedded servers. This allows communicating with it through the HTTP/XML (GUI), TCP/IP protocol. Both servers are directly bound with the Text Protocol block, which is responsible for the execution of the command and for giving the response. There are mainly two types of commands: state commands and task commands. The Text Protocol redirects the command to the right place. The Task Planner is responsible for the communication with the hardware of the robot, using the path planner to compute the trajectory or directly by using the IO Interface. As guardian of the robot security, the State Machine communicates with all the blocks of the program.

Programming manual Desktop & PocketDelta Robot by Asyril SA 5/47

1.2. State machine The robot contains a state machine which ensures the safety of the robot. Each state can be described as indicated below:

State Code Description

EMERGENCY -2 The emergency button has been pressed. COMMENT: When the emergency button is released, the robot goes in state ERROR.

ERROR -1 An error has occurred on the robot. Possible causes are:

- Motion too fast - Collision with an object

COMMENT: If an error appears, you must set the robot to OFF state to be able to continue.

OFF 0 In this state the robot is OFF but ready to start up.

HOMING 1 The robot is executing its homing sequence.

ON 2 The robot is ON when it is initialized and the motors are regulated. In this state, no motions are possible. The path and task planner is not working.

IDLE 3 The robot is ready to move.

Table 1: State of the robot

1.3. Robot Motion The platform of the robot executes interpolated motions along a line. All the motion parameter units are given for this trajectory in XYZ coordinates. Presently, two standard motions are possible:

1.3.1. Point to point trajectory

X

YZ

X1Y1Z1RZ1

X0Y0Z0RZ0

Figure 2: Point to point trajectory

While executing a point to point trajectory, the robot follows a straight line defined in a Cartesian coordinate system from its current position (X0Y0Z0RZ0) to the desired position (X1Y1Z1RZ1).

Programming manual Desktop & PocketDelta Robot by Asyril SA 6/47

Blend The robot includes a blend parameter which allows changing form one target position to the next without stopping the robot motion and by providing curved direction changes. The blend factor represents a radius around the target position. Once the robot reaches the circle, the following target position, saved in the buffer of the task planer, is computed. The result is represented on the image below:

X1Y1Z1RZ1

X

YZ X2Y2Z2RZ2

X0Y0Z0RZ0

X3Y3Z3RZ3

Figure 3: Multi points trajectories with blend

Programming manual Desktop & PocketDelta Robot by Asyril SA 7/47

1.3.2. Workspace objects

The workspace of the robot can be configured with 4 types of objects such as frames, points, tools or motion sequences. It is possible to save these objects in the robot controller and then to work with them. All the workspace objects are represented in a XML structure. Motion Sequences The motion sequence is an object that allows defining a sequence of motion in the workspace. Using the “Move” command enables the user to call a motion sequence, passing some parameters. The motion sequence contains the following parameters:

X,Y,Z,RZ: desired Cartesian position in [m and rad]

Point, tool, frame id: id of the desired workspace object

Speed, acc, dec, jerk factors: factor of the maximal corresponding values

Blend: value of the blend factor

ActionCode : action code to execute during the motion

Wait: time to wait after the motion in [s] XML structure: <motiondescriptor>

<sequence id='1'> <motion x='x' y='y' z='0' rz='rz' pointid='5' toolid='0' frameid='1' speedfactor='1' accfactor='1' decfactor='1' jerkfactor='1' blend='0.005' actioncode='0' wait=’0’/>

<motion x='x' y='y' z='0' rz='rz' pointid='5' toolid='0' frameid='1' speedfactor='1' accfactor='1' decfactor='1' jerkfactor='1' blend='0.005' actioncode='0' wait=’1’/>

</sequence> </motiondescriptor> There are 3 methods to assign the value to X,Y,Z and RZ. The example shown for X is the same for Y, Z and RZ.

x=’x’ : the value of x will be equal to the desired value of X given with the motion command

x=’xact’ : X equals the actual X coordinate value of the robot

x=’number’: X equals the number given in parameters. Frames The frame is an object that allows defining a new referential (X’, Y’, Z’) in the workspace (X, Y, Z) of the robot. To define a frame, three methods are defined: Type 0 Type 0 is used to define the orientation of a plane in the robot workspace. To create a frame type 0, three points are needed defined as shown on the image below (Figure 4).

Point 0: Origin of the new Cartesian system

Point 1: X direction of the frame

Point 2: orientation of the plane in the robot workspace

ID: Id of the frame

Programming manual Desktop & PocketDelta Robot by Asyril SA 8/47

X

Y

ZX’

Y’

Z’

Pt: 2

Pt: 1

Pt: 0

Figure 4 : Definition of a frame type 0

XML structure: <world>

<frame id='' type='0'> <ptconfig id='0' x='' y='' z='' rz=''>

<ptconfig id='1' x='' y='' z='' rz=''> <ptconfig id='2' x='' y='' z='' rz=''>

</frame> </world> Type 1 Type 1 allows to define a new referential for which the x- and y- directions are defined by 3 points as shown in Figure 5. The x- and y- distances allow fixing the scale in both directions of the new referential. The z-scale stays as in the robot workspace (metric) with z-direction defined perpendicular to the x- and y- frame axis. To define a frame type 1, 3 points are needed, defined as show on the image below:

Point 0: Origin of the new Cartesian system

Point 1: X direction of the frame

Point 2: Y direction of the frame

ID: Id of the frame

X distance (xdw): distance between the point 0 & 1

Y distance (ydw): distance between the point 0 & 2

X

Y

ZX’

Y’

Z’

Pt: 2

Pt: 1

Pt: 0

xdw

ydw

Figure 5 : Definition of frame type 1

XML structure: <world>

<frame id='' type='1'> <ptconfig id='0' x='' y='' z='' rz=''/> <ptconfig id='1' x='' y='' z='' rz=''/> <ptconfig id='2' x='' y='' z='' rz=''/> <calib xdw='0' ydw='0'/>

</frame>

Programming manual Desktop & PocketDelta Robot by Asyril SA 9/47

</world> Type 2 Type 2 can be defined by at least 3 points for which their position in the robot workspace (ptconfig) as well as their position in the new frame (ptcalib) as to be given. These last ones correspond to the theoretical position in the new frame. The frame is then defined by fitting the positions with a plane (Figure 6). The number of input points is free but a minimum of 3 points is necessary. In that case the defined referential will be the same as with a frame of type 1.

ptconfig: coordinates of each points in the workspace of the robot

ptcalib: theoretical coordinates of the corresponding points in the x’y’-plane of the new referential (X’, Y’, Z’).

ID: Id of the frame

X

Y

ZX’

Y’

Z’

X’

Y’

Z’pt

conf

ig

ptcalib

Figure 6 : Definition of frame type 2

XML structure: <world>

<frame id='' type='2'> <ptconfig id='0' x='' y='' z='' rz=''/> <ptconfig id='1' x='' y='' z='' rz=''/> <ptconfig id='2' x='' y='' z='' rz=''/> <ptcalib id='0' x='' y='' z='' rz=''/> <ptcalib id='1' x='' y='' z='' rz=''/> <ptcalib id='2' x='' y='' z='' rz=''/> </frame> </world> Tools The tool allows defining the offset that results when using different tools on the robot. The tool parameters are the followings:

X: Offset along the X axis of the robot

Y: Offset along the Y axis of the robot

Z: Offset along the Z axis of the robot

RZ: Offset around the RZ axis of the robot

ID: Id of the tool

Programming manual Desktop & PocketDelta Robot by Asyril SA 10/47

A tool is always defined in the root Cartesian system of the robot. XML structure: <world> <tool id='' x='' y='' z='' rz=''/> </world> Points A point is an object representing a position in the workspace of the robot. The point parameters are the following:

X: Position in the X axis

Y: Position in the Y axis

Z: Position in the Z axis

RZ: Position in the RZ axis

ID: Id of the point XML structure: <world> <pt id='' x='' y='' z='' rz=''/> </world> Important:

It is possible to define frames in frames.

Frame, point, tool with ID 0 represents the world coordinate of the robot

Accepted ID’s are between 1…99

Programming manual Desktop & PocketDelta Robot by Asyril SA 11/47

1.3.3. IO Action Code

To synchronize digital outputs with the trajectory of the robot, it is possible to use the action code and value features. The action code and the value are given with the command of the robot. The action code defines what to do, while the action value tells when to do it. The action code contains always 3 digits encoding while the action value is a float number. The code looks as follows: ABC.xxxxx

Code Description Value Description

A Main code 0 no action

1 single output

2 trig output

3 pick action

4 place action

5 check input

6 mutli output

B Desired channel 0-9

C Desired boolean state 0 false

1 true

Action Value : 0.xxxxx [m or s]

Table 2 : Action Code lists

Single Output This action enables to synchronize a single output action with the distance remaining to the target position of the robot. Examples:

Code: 121.001 Sets the output 2 to state 1 when the robot is at 1 mm (0.001) of its target position.

Code 130.00001 Sets the output 3 to state 0 when the robot is at 10 µm of its target position.

Trigg Output This action enables to trig a given output for 100 ms. The action is executed in synchronization with the remaining distance to the target position. Possible use of this action code is to synchronize a vision system with the robot. Examples

Code: 211.001 Sets the output 1 to state 1 when the robot is at 1mm (0.001) of its target position. After 100ms, the output 1 is inverted (set to state 0)

Code: 230.001 Sets the output 3 to state 0 when the robot is at 1mm (0.001) of its target position. After 100ms, the output 3 is inverted (set to state 1).

Pick Action The pick action sets the output 0 to state 1 at a given distance of the target position. Important:

The output 0 is fixed and cannot be changed.

Programming manual Desktop & PocketDelta Robot by Asyril SA 12/47

Using a vacuum gripper, the activation of the vacuum shall be connected to this output 0.

Using this code executes always the same action, independently of the desired channel and state parameters.

Examples

Code: 300.001 Sets the output 0 to state 1 at 1 mm when the robot is at 1mm (0.001) of its target position.

Code: 311.00001 Sets the output 0 to state 1 at 1 mm when the robot is at 10 µm of its target position.

Place Action The place action sets the output 0 to state 1 and the output 1 to state 1 when the robot reaches its target position. After the given time, the output 1 is set to 0. Important:

The output 0 & 1 are fixed and cannot be changed.

Using a vacuum gripper, the vacuum shall be connected to the output 0 and the ejector shall be connected to the output 1

Using this code executes always the same action, independently of the desired channel and state parameters.

Maximum ejector time is 0.999 seconds. Examples

Code: 400.030 Sets the output 0 to state 0 and the output 1 to state 1. After 30 ms (0.030) the output 1 is set to 0.

Code: 421.100 Sets the output 0 to state 0 and the output 1 to state 1. After 100 ms (0.100) the output 1 is set to 0.

Check input This action enables to check a input while the robot is moving. If the input state doesn’t correspond to the desired value, the robot will stop and erase the task planner list. Important:

The action code is always immediately executed. The action value doesn’t influence the action.

To release a task error, send a new task to the robot using the SET option of the task planner.

Examples

Code: 510.00 Once the motion started, the robot checks if the input state 1 is false (0). If not, the robot stops immediately its motion, and the task state is set to TASK_ERROR.

Code: 521.100 Once the motion started, the robot checks if the input state 2 is true (1). If not, the robot stops immediately its motion, and the task state is set to TASK_ERROR.

Multi Output This action enables to synchronize up to 3 single output ation with the distance remaining to the target position of the robot.

Code Output 0 Output 1 Output 2

600.xx False False False

601.xx True False False

602.xx False True False

603.xx True True False

Programming manual Desktop & PocketDelta Robot by Asyril SA 13/47

604.xx False False True

605.xx True False True

606.xx False True True

607.xx True True True

Examples:

Code: 600.001 Sets the output 0, 1, 2 to state 0 when the robot is at 1 mm (0.001) of its target position.

Code: 600.001 Sets the output 0, 1, 2 to state 0 when the robot is at 1 mm (0.001) of its target position.

Programming manual Desktop & PocketDelta Robot by Asyril SA 14/47

1.4. Path planning The robot executes a trajectory using the motion parameters, which are the speed, the acceleration and deceleration. These parameters are the maximum values that the robot can follow. The dynamic factor multiplies the maximum desired velocity. Finally the values transmitted to the path planner are a multiple of the dynamic factors, the motion parameters. WARNING: By default, the robot is in slow speed mode. This means that the speed is limited.

Figure 7: Dynamic factors

The dynamic factors are the following:

SpeedFactor: factor of the maximal speed.

AccFactor: factor on the maximal acceleration.

DecFactor: factor on the maximal deceleration.

JerkFactor: factor on the maximal jerk.

The computed path planner limits speed, acceleration, deceleration and jerk according to the maximal value of the motion parameters. The path planner generates motions as shown in the next picture.

Figure 8: Path planning with limited acceleration, deceleration and jerk

Programming manual Desktop & PocketDelta Robot by Asyril SA 15/47

1.5. Task planner The robot software includes a task planner. The task planner is a FIFO list (first in first out) of tasks that the robot has to execute and is active only when the robot is in state IDLE. Otherwise, all tasks are erased. While the robot state is IDLE, the task planner executes its tasks list. There is two ways to put task in the task planner:

SET task

Setting a new task in the task planner ERASES all the previous tasks in the list and FORCES the robot to execute the new task.

Input

Output

Ta

sk

Pla

nne

r

Exec.

Set a new task

Output

Ta

sk

Pla

nne

rExec.

Figure 9: Set a new task

APPEND task Appending a new task in the task planner, ADDS the new task on the top of list. While appending a task, the robot still executes the list.

Input

Output

Task

Pla

nner

Exec.

Append a new task

Output

Task

Pla

nner

Exec.

Figure 10: Append a new task

Programming manual Desktop & PocketDelta Robot by Asyril SA 16/47

1.6. Text Protocol The Text Protocol is responsible for the communication to the robot. The Text Protocol includes also the access limitations (login) to the system. It ensures that only the users with the correct access level can accede to the desired command. The Text Protocol implements a specific syntax based on ASCII code able to check if the received command is ok. This check is performed on the following levels:

- command: check if the command is valid - parameters: check if the parameter is valid and if all the needed parameters to

execute the command are present - values: check if the value type corresponds to the desired type (bool, int, float,

string) The command for the Text Protocol is built as shown below:

Prefix Parameters Suffix

Command parameterX=valueX Carriage Return & LineFeed (ASCII Char 13 & Char 10)

Table 3 : Syntax of a text command

The response of the robot is built as follows:

Prefix Parameters Suffix

Code parameterX=valueX Carriage Return & LineFeed (ASCII Char 13 & Char 10)

Table 4: Syntax of a text response

The number of parameters for the command and for the response may change between zero and N depending on the command. If no parameter is given, the command or the code is directly followed by the carriage return, without blank space. All the commands are describe at the end of this current document. Examples MoveTO x=0.010 y=0.010 z=0.03 speedfactor=0.1CRLF 0CRLF GetRobotPosition frameID=1 toolID=0CRLF 0 x0=0.010 x1=0.010 x2=0.003 x3=0.0CRLF Important:

Between all the parameters a blank space is necessary.

Programming manual Desktop & PocketDelta Robot by Asyril SA 17/47

1.7. Communication with the robot The communication with the robot is done using the embedded servers. The function of the servers is to catch the request of the user, to transmit it to the Text Protocol and to compute the response. Both servers are able to perform the same task, only the protocol is different. The HTTP/XML server is reserved by the embedded graphical user interface. By default, the ports of the server are configured as follows:

- HTTP/XML: 8080 - TCP/IP: 8181

Any web browser, TCP/IP client can be used to communicate with the robot. The robot can also be integrated in your own application using one of the three protocols. Some implementation examples are presented in the section programming using the embedded servers.

Programming manual Desktop & PocketDelta Robot by Asyril SA 18/47

2. Programming using the embedded TCP/IP server

2.1. Working principle The robot can be integrated in your application using the TCP/IP server. The robot implements only a server, working as a slave station. This means that it is not able to send actively data to the master application. All the data needs to be asked to the robot by sending a command and waiting for its response. A way to implement such a master application is shown on the graphic below. In this illustration two TCP clients are shown, a first using a polling client to get the value of the robot up to date and a second client sending process commands to the robot.

GetState

0 p0=v0 … pN=vNPolling

Thread TCP serverTCPClient1

TCPClient2

cmd

0 p0=v0 … pN=vN

Process

Text Protocol

Master application PocketDelta Robot

Figure 11: Master application program

2.2. Connection procedure of a TCP/IP client The robot can accept an unlimited number of clients accessing simultaneously the servers. The steps to establish a connection are always the same and are described in the following:

1. Create a socket and try to connect the client to the robot server. 2. Once the connection is established, the robot sends a welcome message

0 Connected. RobotType=…. SerialNumber=xxx. Use ‘login’ to begin.

3. The first command to send to the robot is the ‘login’ command. login user=user passwd=user If the login is valid the robot sends the following response: 72 Logged as ‘User’.

4. The connection is now open and active. The robot accepts all other commands

using the Text Protocol.

Programming manual Desktop & PocketDelta Robot by Asyril SA 19/47

2.3. Example of a simple C# TCP/IP client The code below is a simple console program to connect a robot using the TCP/IP server. using System; using System.IO; using System.Net; using System.Net.Sockets; using System.Text; namespace TCPClient { public class TCPClient { public static TcpClient tcpClient = null; public static void Main(string[] args) { try { bool keepRunning = true; //IP of the robot String IP = "10.0.0.70"; //TCP port of the robot int port = 8181; Stream stream = null; //To create the tcpClient tcpClient = new TcpClient(); tcpClient.Connect(IP, port); stream = tcpClient.GetStream(); //To read and print to the console the welcome message byte[] byteArray = new byte[1024]; int n = stream.Read(byteArray, 0, byteArray.Length); for (int i = 0; i < n; i++) { Console.Write(Convert.ToChar(byteArray[i])); } //Main loop while (keepRunning) { //To read the input of the console String input = Console.ReadLine(); //To quit the programm if (input.StartsWith("quit"))

{ keepRunning = false; } //To send the input to the robot else { //To add the carriage return input += "\n";

//To encode the input in ASCII byteArray = new ASCIIEncoding().GetBytes(input); stream.Write(byteArray, 0, byteArray.Length); //To print the response on the console byteArray = new byte[1024]; n = stream.Read(byteArray, 0, byteArray.Length); for (int i = 0; i < n; i++) { Console.Write(Convert.ToChar(byteArray[i]));

Programming manual Desktop & PocketDelta Robot by Asyril SA 20/47

} } } //To close the tcpClient tcpClient.Close(); } catch (Exception) { //Exception handling } } } }

Programming manual Desktop & PocketDelta Robot by Asyril SA 21/47

3. Programming using ARL (Asyril Robotics Language)

3.1. Access Web based Editor Once the robot is started, the Web graphical user interface is accessible using a web browser. As URL type the robot IP address as shown on the image below.

Figure 12 : Access the Web Browser

The IP address depends on the robot type as following:

Robot type IP address

Pocket Delta 192.168.0.10

Power Delta 192.168.0.20

Desktop Delta 192.168.0.30

The port is always 8080. So for example type the URL 192.168.0.10:8080 to be connected with a pocket delta. If you are logged remotely on the DesktopDelta, its own address is 127.0.0.1. The login page will appear. You need administrator rights to access the programming interface.

Figure 13 : Login screen

After a successful login, the following page appears. The programming interface is accessible by clicking on the “Prg” menu.

Figure 14 : Screen navigation

Programming manual Desktop & PocketDelta Robot by Asyril SA 22/47

3.2. Using the programming page The programming interface looks like shown on the image below. From this interface, following actions are possible:

Select and edit a program and a points list.

Save or delete a program or a points list.

Execute / stop a program

Figure 15 : Programming screen To perform these actions, the page contains the following objects: 1. List box containing your own written programs. 2. Save the selected program. To create a new program, set new in the first thumb index then click the ‘Save’ button and write the name of your program. Then, write your program in the text box.

3. Select a program to be deleted in the first or second list box and press the ‘Del’ button. 4. Execute your program. The program will be executed only when no syntax error is detected. Otherwise an error message showing the syntax error will appear. After pressing the ‘Execute’ button, the button will change to a ‘Stop’ button which will allow you to stop the running program before its end. 5. This text box has 2 functions. It acts as editor to write your program and as console when you are executing a program. Important

If you write a program and you change to another page, the program changes will not be saved. You have to press on the button save to keep the changes.

1 2 3 4 5 6 7

Programming manual Desktop & PocketDelta Robot by Asyril SA 23/47

6 & 7. The list box (7) enables to select one of the ARL function. Once the function is selected click in the program editor box at the place where the function is to be inserted and then click on the button “Insert function” (6) to insert the desired function.

3.3. Using the workspace page This page enables to configure easily the workspace of the robot, using the objects “Frames”, “Tools” and “Point”. The functionalities of theses 3 objects are describe upon. This page looks as shown in the picture below.

Figure 16 : Workspace screen

1. List box to select which kind of object to work with. Select between “Frames”, “Tools”,

“Points” and “Motion Sequences”. 2. Create the edited objects 3. Save permanently the file to the robot controller 4. Click on this button insert automatically a preformed objects in the workspace editor.

When the chosen object (1) is “Frames”, this insert a frame of the chosen type (4) 5. List box to select the type of frame to insert 6. Workspace editor 7. Click on this button insert automatically the actual position of the robot transformed in the

chosen frame (7) with the chosen tool (8). 8. List box to select a frame 9. List box to select a tool

1 2 4 6 9 8 7 5 3

Programming manual Desktop & PocketDelta Robot by Asyril SA 24/47

4. ARL - Programming Language The ARL (Asyril Robotics Language) is an IEC 1131 based language, using the ST (Structured Text) syntax. It contains the standard expressions, operators, operands and statements. Some commands specifically dedicated to Asyril’s Delta robots have been added. They offer the possibility to move the robot, communicate with the IO’s and read some robot controller values (position, state, …).

4.1. Expressions An expression is a construction which, when evaluated, yields a value corresponding to one of the data types. Expressions are built up of operators and operands. An operand can be a variable, a function call or another expression. The operators of the ARL language are summarized in a table below. The evaluation of an expression consists of applying the operators to the operands in a sequence defined by the operator precedence. The operator with highest priority in an expression shall be applied first, followed by the operator with next lower precedence, etc., until evaluation is complete. Operators of equal precedence shall be applied as written in the expression from left to right. For example, if A, B, C, and D are of type VAR with values 1, 2, 3, and 4, respectively, then

A+B-C*D shall evaluate to -9, and

(A+B-C)*D shall evaluate to 0 . Boolean expressions may be evaluated only to the extent necessary to determine the resultant value. For instance, if A<=B, then only the expression (A>B) will be evaluated to determine that the value of the expression

(A>B) & (C<D) is Boolean zero. Functions shall be invoked as elements of expressions consisting of the function name followed by a parenthesized list of arguments. When an operator in an expression can be represented as one of the overloaded functions, conversion of operands and results shall follow the rule and examples given in the standard.

4.2. Operators

Operator Description Example Results

() Parentherisation Var := (2*5)+(10/2); 15

** Exponentiation Var := 2**10; 1024

- Negation Var := -15; -15

NOT Complement Var := NOT TRUE; FALSE

* Multiplication Var := 2*20; 40

/ Division Var := 10 / 5; 2

MOD Modulo Var := 15 MOD 10; 5

+ Addition Var := 1 + 2; 3

- Subtraction Var := 10 - 5; 5

< Comparison smaller than IF 10 < 20 TRUE

> Comparison bigger than IF 10 > 20 FALSE

<= Comparison equals/smaller than IF 10 <= 20 TRUE

Programming manual Desktop & PocketDelta Robot by Asyril SA 25/47

>= Comparison equals/bigger than IF 10 >= 20 FALSE

<> Inequality IF TRUE <> FALSE TRUE

= Equality IF TRUE = FALSE FALSE

AND Boolean AND Var := TRUE AND FALSE; FALSE

OR Boolean OR Var := TRUE OR FALSE; TRUE

XOR Boolean exclusive OR Var := TRUE XOR FALSE; TRUE

Table 5 : ARL Operators

4.3. Operands

Operand Example

Number 1324

String 'Arl'

Variable iCounter, iVar

Vector (1,3,1,iVar)

Table 6 : ARL Operands

4.4. Statements

Statement Example

Assignment Var1 := 10;

IF IF iVar1 = iVar2 THEN iVar := 1;

ELSEIF iVar1 < iVar2 THEN iVar3 :=2;

ELSE iVar3 := 3;

END_IF

SWITCH SWITCH iVar4 OF

CASE 1: iVar5 := 10;

CASE 2: iVar5 := 20;

ELSE iVar5 := 30;

END_SWITCH

FOR FOR iVar6 := 6 TO 10 BY 2

DO

iVar7 := iVar6 * 2;

END_FOR

WHILE WHILE iVar9 > 1 DO

iVar9 := iVar9 / 2;

END_WHILE

REPEAT REPEAT

iVar1 := iVar1 + 1;

UNTIL iVar1 < 4096;

END_REPEAT

EXIT EXIT;

PRINT PRINT 'Actual value: '+ iVar5;

Table 7 : ARL Statements

Programming manual Desktop & PocketDelta Robot by Asyril SA 26/47

4.5. Mathematics functions

Statement Syntax / Example

COS var := COS 90;

ACOS var := ACOS 120;

SIN var := SIN 180;

ASIN var := ASIN 1;

TAN var := TAN 120;

ATAN var := ATAN 0.5;

ABS var := ABS -12;

PI varPI := PI;

Table 8 : ARL Mathematics functions

4.6. Robot Commands

Statement Description Example

AUTOEXEC To start automatically the program when the robot starts.

autoexec;

DIN Read a digial input. din0 := DIN 0;

- channel: number or variable

Return the boolean value of the desired digital input.

DOUT Write a value to a digital output. DOUT 0 TRUE;

- channel: number or variable

- value: boolean

GETSTATE Get the actual robot state. state := GETSTATE;

Return the robot state (-2 …. 4)

GETPOSITION Get the actual robot position. position := GETPOSITION;

Return a vector containing the robot position.

GETPOINT Get a point: point12 := GETPOINT 12;

- point id: id of the desired point

GETTIME Get the current time in ms. time:= GETTIME;

MOVEMS Move within the given motion sequence:

desPos := (0.02,-0.012,0.02,0);

- pos: vector for the desired position msid = 1;

- msid: id of the desired motion sequence.

MOVEMS desPos msid;

MOVETO Move the robot along a pick and place motion:

desPos0 := (0.02,-0.012,0.02,0);

- pos: vector for the desired position desPos1 := GETPOINT 12;

- frameid: id of the desired target frame

desFrame := 1;

- toolid: id of the desired tool desTool := 2;

- speedfactor: the desired dynamic factor

speedFactor :=0.1;

- blend: parameters to define the blend of the robot

MOVETO desPos0 desFrame desTool speedfactor;

Programming manual Desktop & PocketDelta Robot by Asyril SA 27/47

- actioncode:number representing the IO action code

SETPOINT Set a value to a point: - PointID: id of the desired point - Point: vector or variable with the

new value to set

point1 := (0.03,0.02,0.01,0); pointID := 1; SETPOINT pointID point1;

SETSLOWSPEED Set or release the slow speed mode SETSLOWSPEED TRUE;

- value: boolean

SETSTATE Set a new state to the robot. SETSTATE 0;

- desiredState: number (0, 2, 3, 4)

0 --> OFF

2 --> ON

3 --> IDLE

SLEEP The program sleeps for the given time in milisecond.

SLEEP 100;

- time: number [ms]

STOP To stop any robot motion. STOP;

WAITFORMOTIONEND Wait until all the tasks of robot have been executed. (End of any planned motion)

WAITFORMOTIONEND;

Table 9 : ARL Robot Commands

Programming manual Desktop & PocketDelta Robot by Asyril SA 28/47

4.7. Module Commands Syntax: ModuleCmd <moduleName> <moduleCommand> <OptionalArgs>

moduleName: name of the concern module (string)

moduleCommand: command sent to the module (string)

OptionalArgs: optional arguments. Depending the command, some optional arguments could be necessary (see for example the command “removePosition” in the Asyview module below).

Return: Depend of the moduleCommand

Modules Commands

Asyview

SetFovLock SearchPosition RemovePosition GetState GetPositionNumber ClearPositionBufferTriggVisionSensor GetPositionOffset StartVisionCalibration SetCalibrationPoint CreateVisionCalibration

IOWAGO Read Write

RotatingPlatform

StartHoming GetHomingStatus Move ReadHeightSensor ReadHeightSensorState ResetHeightSensor ReadErrorCode

4.7.1. Asyview module commands

SetFovLock Give the value to lock or unlock the field of view (Fov). The locker can take the two values LOCKED or FREE. There is a separate locker for each device (or camera). The state LOCKED indicates to the Asyview that the field of view is occupied (for example when the robot is in the camera field of view). The state FREE indicates to the Asyview that the concerned field of view is free so that an image acquisition can occur. Syntax: <SetFovLock> < deviceID =*> <lock= (locked | unlocked) >

deviceID: Identifying number of the concerned vision system in the Asyview ([0 …])

lock: state of the locker. Only the two values LOCKED and FREE are accepted Return:

Programming manual Desktop & PocketDelta Robot by Asyril SA 29/47

– Example: ModuleCmd 'Asyview' 'SetFovLock deviceID=1 lock=locked’; Give the value “locked” to the locker of the device number 1. Mean to the Asyview that the field of view of this particular device is occupied by the robot. SearchPosition Ask for a position research on a particular device of the Asyview. The respond is instantaneous if a position is available. If no position is available, the position research process starts in the Asyview and the execution of the ARL program is blocked until reception of a position. Syntax: <searchPosition> <deviceID=*> <positionNbr=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …])

positionNbr : amount of desired positions (optional argument) o 1 (default) o 0 (ask for a preparation sequence on the Asyview)

Return: (posX, posY, posZ, posTheta, deviceID, positionID) 6-dimensional vector included the four position values x, y, z, theta as well as the device and position ID. Example: pickPos = ModuleCmd 'Asyview' 'SearchPosition deviceID=1’; Ask for the research of only one position on the device number 1 and store the information in pickPos. RemovePosition Ask to remove a particular position on the Asyview. The position is identified by its “ID” (integer). Syntax: <RemovePosition> <positionVector>

positionVector: 6-dimensional vector (posX, posY, posZ, posTheta, deviceID, positionID) Only the value in deviceID and positionID are really used by the aysview as positionID is sufficient to identify the particular position. Return:

– Example: pickPos = ModuleCmd 'Asyview' 'SearchPosition deviceID=1’; modulecmd 'asyview' 'removeposition' pickPos; GetState Ask for the AsyView state. Syntax: <GetState> <deviceID=*> <name=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …])

name : amount of desired positions (optional argument) o searchrunning

Return: “true” or “false” Boolean value Example:

Programming manual Desktop & PocketDelta Robot by Asyril SA 30/47

IsSearching:= ModuleCmd 'Asyview' 'GetState deviceid=1 name=searchrunning'; (if the AsyView is analysing an image the value returned by the SearchRunning will be “true”) GetPositionNumber Ask for the number of available position in the Asyview’s buffer. Syntax: <GetPositionNumber> <deviceID=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …]) Return: 0,1,2,3… integer value Example: NombrePos:=ModuleCmd 'Asyview' 'GetPositionNumber deviceid=1'; This command will return the number of position available in the AsyView Buffer (that is to say the number of accepted parts after analyzing the image) ClearPositionBuffer Clear all the positions in the Asyview’s buffer. Syntax: <ClearPositionBuffer> <deviceID=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …]) Return: - No return - Example: ModuleCmd 'asyview' 'ClearPositionBuffer deviceid=1'; This command will clear all the position available in the AsyView Buffer. TriggVisionSensor Trigg the vision sensor to order an image acquisition. Syntax: <TriggVisionSensor> <deviceID=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …]) Return:

- No return - Example: ModuleCmd ‘asyview’ ‘TriggVisionSensor deviceid=2’; This command will order an image acquisition on the second vision system (deviceid = 2). GetPositionOffset If a position was found, this command return the position offset between the taught model (reference image) and the found one (actual image). Syntax: <getPositionOffset> <deviceID=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …]) Return:

(offsetX, offsetY, offsetZ, offsetTheta, deviceID, positionID) 6-dimensional vector included the four position offset values x, y, z, theta as well as the device and position ID. Example: offset = ModuleCmd 'Asyview' ‘GetPositionOffset deviceID=2’;

Programming manual Desktop & PocketDelta Robot by Asyril SA 31/47

This command will return the computed position offset between the reference image used during the teaching and the actual found position. This command is usually used on a control camera to get the position correction to apply before to place a component. StartVisionCalibration Initiate a calibration process on the specified vision system. Syntax: <startVisionCalibration> <deviceID=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …]) Return: - No return – Example: ModuleCmd 'asyview' 'StartVisionCalibration DeviceID=2'; SetCalibrationPoint Set the corresponding position to the last position found by the vision system. Syntax: <setCalibrationPoint> <deviceID=*> <position>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …])

position : 4-dimensional vector position (x, y, z, theta) Return: - No return – Example: ActualPos:=GETPOSITION; ModuleCmd 'asyview' SetCalibrationPoint DeviceID=2' ActualPos; This set of commands will first activate an image acquisition, then obtain the actual robot position and finally set the actual robot position as the corresponding position to the one found by the vision system for the calibration procedure. CreateVisionCalibration After starting the calibration process, this command launch the calculation of the calibration matrix based on the calibration points set. Syntax: <createVisionCalibration> <deviceID=*>

deviceID : Identifying number of the concerned vision system in the Asyview ([0 …]) Return: - No return – Example: ModuleCmd 'Asyview' 'StartVisionCalibration DeviceID=1'; ModuleCmd 'Asyview' 'TriggVisionSensor DeviceID=1'; SearchRunning:= ModuleCmd 'Asyview' 'GetState DeviceID=1 name=searchrunning'; WHILE SearchRunning = true DO SearchRunning:= ModuleCmd 'Asyview' 'GetState DeviceID=1 name=searchrunning'; SLEEP 100; END_WHILE PosNbr:=ModuleCmd 'Asyview' 'GetPositionNumber DeviceID=1'; IF PosNbr=4 THEN

Programming manual Desktop & PocketDelta Robot by Asyril SA 32/47

ModuleCmd 'Asyview' 'SetCalibrationPoint DeviceID=1' (1,1,0,0); ModuleCmd 'Asyview' 'SetCalibrationPoint DeviceID=1' (0,1,0,0); ModuleCmd 'Asyview' 'SetCalibrationPoint DeviceID=1' (1,0,0,0); ModuleCmd 'Asyview' 'SetCalibrationPoint DeviceID=1' (0,0,0,0); ModuleCmd 'Asyview' 'CreateVisionCalibration DeviceID=1'; SLEEP 100; END_IF This set of command can be used with a calibration grid of 4 positions that are first located by vision and then set as calibration points with normalized position before the created the calibration matrix.

4.7.2. IOMODULE commands

Read Read a digital input Syntax: <Cmd=Read> <name=Input_Name>

cmd : Identifying the command : read

name : identify the input name. Return: Input state as a Boolean value. True or False Example: InputState:= fasle; inputState:= ModuleCmd 'IOMODULE' 'cmd=Read name=My_Digital_Input'; Write Write to a digital output Syntax: <Cmd=Write> <name=Output_Name> <value=true | false>

cmd : Identifying the command : write

name : identify the output name

value : command value : true, false Return: - No return - Example: ModuleCmd 'IOMODULE' 'cmd=write name=DoIonEnable value=true'; This command will activate the ionizer. ModuleCmd 'IOMODULE' 'cmd=write name=DoIonEnable value=false'; This command will disactivate the ionizer.

4.7.3. RotatingPlatform commands

StartHoming Start the rotating platform homing sequence Syntax: <Cmd=StartHoming> [<blocking=true|false> <homingOffset=Offset_Angle_value>

cmd : Identifying the command : StartHoming

Programming manual Desktop & PocketDelta Robot by Asyril SA 33/47

blocking : Optional argument. Define if the command will block the execution of the ARL program while doing the homing or not.

default value for this parameter is true. homingOffset: Optional argument. Define the homing offset (in degree) that will be applied when the homing reference is found. This parameter, if present, is replacing the corresponding "HomingOffset" parameter in the "process.ar" configuration file.

Return: none Example: In this example

ModuleCmd 'Rotating_Platform' 'cmd=StartHoming blocking=false '; GetHomingStatus Get the current homing status: True if the homing is finished. False if the homing as began but is not completed yet. This command is intended to be use together with the command "startHoming" with the argument "blocking=false". This allow to launch a homing sequence as a "background" task. Syntax: <Cmd=GetHomingStatus>

cmd : Identifying the command : GetHomingStatus Return: True if the homing is done. False if the homing has began but is not completed yet. Example: homingStatusVar:= false ModuleCmd 'RotatingPlatform' 'cmd=StartHoming blocking=false'; WHILE homingStatusVar = false DO homingStatusVar:= ModuleCmd 'IOMODULE' 'cmd=GetHomingStatus '; END_WHILE Move Start a relative move of the given angle in degree Syntax: <Cmd=Move> [<value=AngleValue>

cmd : Identifying the command : StartHoming

value : Relative length of the movement in degree

Return:

none Example: Moving the platform of 45 [°] ModuleCmd 'Rotating_Platform' 'cmd=Move value=45.0 ';

Programming manual Desktop & PocketDelta Robot by Asyril SA 34/47

ReadHeightSensor Return the height value measured by the sensor Syntax: <Cmd=ReadHeightSensor>

cmd : Identifying the command : ReadHeightSensor

Return: Height in [mm] Example: ReadValueVar:= 0.0; ReadValueVar:= ModuleCmd 'Rotating_Platform' 'cmd=ReadHeightSensor '; ReadHeightSensorState Return the height sensor state: Syntax: <Cmd=ReadHeightSensorState>

Cmd : Identifying the command : ReadHeightSensorState

Return: An integer value in [0,1,2,3] range representing the sensor state: 0 : Height sensor in error 1: Height sensor is working correctly 2: Out of scale down. The value is under the minimum allow 3: Out of scale up. The value is over the maximum allow Example: ReadValueVar:= ModuleCmd 'Rotating_Platform' 'cmd=ReadHeightSensorState ';

Programming manual Desktop & PocketDelta Robot by Asyril SA 35/47

ResetHeightSensor Reset the height sensor Syntax: <Cmd=ResetHeightSensor>

cmd : Identifying the command : ResetHeightSensor

Return: None Example:

ReadValueVar:= ModuleCmd 'Rotating_Platform' 'cmd=ResetHeightSensor '; ReadErrorCode Return the Wago iomodule error code. Syntax: <Cmd=ReadErrorCode>

cmd : Identifying the command : ReadErrorCode

Return: A four digit integer number Example: ErrorCodeVar := ErrorCodeVar:= ModuleCmd 'Rotating_Platform' 'cmd=ReadErrorCode ';

Programming manual Desktop & PocketDelta Robot by Asyril SA 36/47

4.8. ARL Instruction loadValue This instruction allows modifying dynamically the values of ARL variables. It returns the value of a “data” integrated in an ARL program. The integrated data are defined and saved in the same file as the program itself. They are always memorized as data string but are used with three predefined types:

1. Data string 2. Boolean value defined by the string “true” or “false” 3. Double value

The typical use in an ARL program is as following: my_var:= loadValue ‘value_name’; This instruction can only be used on the ARL program from the HMI of the Asyfeed Module and Cell. Syntax: loadValue ‘valueName’

valueName: the identifier (name) of the data. Return:

Value of the data with the concerned type (Boolean/Double/String). Example: pickPosition:= (0,0,0,0) ; speed := loadValue ‘data_speed’ ; moveto pickPosition 1 1 speed In this example the ARL variable “speed” is load with the data named “data_speed”. The variable is then used to modify the speed of the robot in the command “moveto”. setVectorValue This instruction allows to give a specified value to one components of a vector. Syntax: setVectorPosition <Vector> <Position> <Value> Return: - No return - Example: desPos := (0.02,-0.012,0.02,0); posX:=0.005; SETVECTORVALUE desPos 1 posX; After this set of commands, the first component of the vector desPos will get the value of posX. getVectorValue This instruction allows to give a specified value to one components of a vector. Syntax: getVectorPosition <Vector> <Position> Return:

Value of the data at the nth

position of the vector Example: desPos := (0.02,-0.012,0.02,0); posY:=GETVECTORVALUE desPos 2;

Programming manual Desktop & PocketDelta Robot by Asyril SA 37/47

4.9. Examples To set automatically the robot in state ‘IDLE’ AUTOEXEC; VAR state:= GETSTATE; If state <> 3 THEN SETSTATE 3; END_IF To wait on a digital input and then start a motion VAR state := GETSTATE; VAR pickPos := (0.01,0.02,0.00,0); VAR placePos := (-0.01,0.015,0.02,0); VAR frameID := 1; VAR toolID :=43; VAR speedFactor :=1; VAR actionCodePick := 300.001; VAR actionCodePlace := 400.040; WHILE state = 3 DO state := GETSTATE; IF DIN 0 = 1 THEN MOVETO pickPos frameID toolID speedFactor actionCodePick; MOVETO placePos frameID toolID speedFactor actionCodePlace; END_IF END_WHILE

Programming manual Desktop & PocketDelta Robot by Asyril SA 38/47

5. Robot Text Commands Symbol:

[parameters] = facultative parameters

(z) = Variable type “Boolean”

(i) = Variable type “integer”

(f) = Variable type “float”

(s) = Variable type “string”

(l) = Variable type “long”

5.1. State Commands GetState Get the robot's state. Syntax: GetState [frameid=(i)] [toolid=(i)]

frameid: the desired frame ID.

toolid: the desired tool ID Return:

0 current=(i) desired=(i) motionstate=(i) outofworkspace=(i) x=(f) y=(f) z=(f) rz=(f) frameid=(i) toolid=(i) q0=(f) q1=(f) q2=(f) q3=(f) xdes=(f) ydes=(f) zdes=(f) rzdes=(f) tasklistsize=(i) taskliststate=(i) slowSpeed=(i) digitalinput=(i)(i)(i)(i)(i)(i)(i)(i) digitaloutput=(i)(i)(i)(i)(i)(i)(i)(i) axissmoot=(i)(i)(i)(i) axiscompliant=(i)(i)(i)(i) errorcode=(i) prgstate=(i) prgname=(s)

40 Not permitted. SetState Set the desired state to the robot. Syntax: SetState state=(s)

state: desired state [OFF/ON/IDLE]. Return:

0

30 Wrong state

40 Not permitted

5.2. Motion Commands MoveTo Move the robot. Syntax: MoveTo [x=(f)] [y=(f)] [z=(f)] [rz=(f)] [speedfactor(f)] [accfactor(f)] [decfactor(f)] [jerkfactor(f)] [blend=(f)] [actioncode=(f)] [pointid=(i)] [toolid=(i)] [frameid=(i)] [additive=(i)] [append=(i)] [log=(i)] [taskid=(l)]

x: X coordinate in [m].

y: Y coordinate in [m].

z: Z coordinate in [m].

rz: RZ coordinate in [rad].

speedfactor: range [0...1].

accfactor: range [0...1].

decfactor: range [0...1].

Programming manual Desktop & PocketDelta Robot by Asyril SA 39/47

jerkfactor: range [0...1].

blend: range [0/1].

actioncode: activating code for IO's.

motionsequenceid: ID of the motion sequence

toolid: ID of the tools to use.

pointid: ID of the point to use.

frameid: ID of the frame to use.

additive: Add the desired position to the actual position.

append: append or set the motion [0/1].

log: logging the value during the motion [0/1].

taskid: index of the motion. Return:

0

30 Wrong state

32 Brakes engaged

33 Out of workspace

40 Not permitted

60 Wrong value Stop Stop the robot motion. Syntax: Stop [append=(i)]

append: append or set the stop command [0/1]. Return:

0

30 Wrong state

40 Not permitted Wait Wait for the desired duration [s]. Syntax: Wait duration=(f) [append=(i)]

duration: time to wait [s]

append: append or set the wait action [0/1] Return:

0

30: Wrong state

40: Not permitted SetSlowSpeed Set or release slow speed mode. Syntax: SetSlowSpeed slowspeed=(i)

slowSpeed: Set or release slow speed mode. [0/1] Return:

0

40 Not permitted

Programming manual Desktop & PocketDelta Robot by Asyril SA 40/47

5.3. IO Commands SetBrakes Engage or release the brakes. Syntax: SetBrakes release=(i) [force=(i)]

release: release or engage all brakes. [0/1]

force: force the action without changing the state of the robot. [0/1] Return:

0

40 Not permitted SetDigitalOutput Set digital output to the specified value. Syntax: SetDigitalOutput channel=(i) value=(i) [duration=(f)] [append=(i)]

channel: the desired output channel

value: the desired output state [0/1]

duration: the desired duration and then inverse the state [s]

append: append or set the action [0/1] Return:

0

40 Not permitted WaitDigitalInput Wait for a digital input. Syntax: WaitDigitalInput channel=(i) value=(i) timeout=(f) [append=(i)]

channel: desired input channel

value: desired state to wait for [0/1]

timeout: timeout [s]

append: append or set the action [0/1] Return:

0

30 Wrong state

40 Not permitted

5.4. Others Commands Help Lists all commands. Syntax: Help [command=(s)]

command: the desired command Return:

99 Help on the command. Login Log in Syntax: Login user(s) [passwd=(s)] [timeout=(f)]

user: username.

passwd: password.

timeout: timeout for the session. [s]

Programming manual Desktop & PocketDelta Robot by Asyril SA 41/47

Return:

0

20 Invalid arguments

50 Internal error

70 Wrong login

72 Logged as 'User'

73 Logged as 'Admin'

Logout Logout. Syntax: Logout Return:

0 GetVersion Get the version of the system. Syntax: GetVersion Return:

0

40 Not permitted

5.5. Process Commands Process Start/stop a defined process Syntax: Process cmd=(s) [programid=(s)]

cmd: start – stop programid : name of the corresponding process to start

Return:

0

1 returninfo= Program: programid can not start : current program is not stopped

2 returninfo= Program: programid is not found Example: Process cmd=start programid=demoprocess Process cmd=stop

Programming manual Desktop & PocketDelta Robot by Asyril SA 42/47

6. Enumeration and return codes

6.1. Return codes

0 Command OK. (Single line response)

2 Wrong number of args

5 Syntax error

10 Cannot give help

20 Invalid arguments

30 Wrong state

32 Brakes engaged

33 Out of workspace

40 Not permitted

50 Internal error

60 Wrong value

70 Wrong login

72 Logged as 'User'

73 Logged as 'Admin'

6.2. Enumerations

Robot State: STATE_EMERGENCY_PRESSED = -2; STATE_ERROR = -1; STATE_OFF = 0; STATE_HOMING = 1; STATE_ON = 2; STATE_IDLE = 3; Error Code: CONTROLLER_NO_ERROR = 0; CONTROLLER_POSITION_TRACKING_ERROR = 1; CONTROLLER_CURRENT_TRACKING_ERROR = 2; CONTROLLER_HOMING_ERROR = 3; Task State: TASK_ERROR = -1; TASK_DONE = 0; TASK_BUFFERING = 1; TASK_INPROGRESS = 2; TASK_NOT_STARTED = 3; Task List State: TASK_LIST_DONE = 0; TASK_LIST_PROCESSING = 1; Homning Mode: HOMING_NORMAL = 0; HOMING_NORMAL_ONLY_ONCE = 1; HOMING_WITHOUT_SENSORS = 2; HOMING_WITHOUT_SENSORS_ONLY_ONCE = 3;

Programming manual Desktop & PocketDelta Robot by Asyril SA 43/47

HOMING_ONLY_SENSORS = 4; HOMING_ONLY_SENSORS_ONLY_ONCE = 5; NO_HOMING = 6; HOMING_ALL_TOGETHER = 10; HOMING_ALL_TOGETHER_ONLY_ONCE = 11; HOMING_ALL_TOGETHER_FORCE_INITSENSOR = 12; HOMING_ALL_TOGETHER_FORCE_INITSENSOR_ONLY_ONCE = 13; Motion State: TRAJ_ERROR = -1; INPOSITION = 0; MOVING_BUFF = 1; MOVING = 2; MOVING_BLENDING = 3; Program/Process State: PRG_ERROR = -1; PRG_STOPPED = 0; PRG_STOPPING = 1; PRG_RUNNING = 2;

Programming manual Desktop & PocketDelta Robot by Asyril SA 44/47

7. Figures Figure 1: Robot software .................................................................................................... 4 Figure 2: Point to point trajectory ....................................................................................... 5

Figure 3: Multi points trajectories with blend ..................................................................... 6 Figure 4 : Definition of a frame type 0 ............................................................................... 8 Figure 5 : Definition of frame type 1 .................................................................................. 8 Figure 6 : Definition of frame type 2 .................................................................................. 9 Figure 7: Dynamic factors ................................................................................................ 14

Figure 8: Path planning with limited acceleration, deceleration and jerk ......................... 14

Figure 9: Set a new task .................................................................................................... 15

Figure 10: Append a new task .......................................................................................... 15 Figure 11: Master application program ............................................................................. 18 Figure 12 : Access the Web Browser ................................................................................ 21 Figure 13 : Login screen ................................................................................................... 21

Figure 14 : Screen navigation ........................................................................................... 21 Figure 15 : Programming screen ....................................................................................... 22

Figure 16 : Workspace screen ........................................................................................... 23

8. Tables Table 1: State of the robot ................................................................................................... 5

Table 2 : Action Code lists ................................................................................................ 11 Table 3 : Syntax of a text command ................................................................................. 16 Table 4: Syntax of a text response .................................................................................... 16

Table 5 : ARL Operators ................................................................................................... 25 Table 6 : ARL Operands ................................................................................................... 25

Table 7 : ARL Statements ................................................................................................. 25 Table 8 : ARL Mathematics functions .............................................................................. 26 Table 9 : ARL Robot Commands ..................................................................................... 27

Programming manual Desktop & PocketDelta Robot by Asyril SA 45/47

9. Revisions

Date Revision Author Comments

19.01.2009 1.0 PeS Initial revision

18.09.2009 1.1 PeS Add doc on frame, blend & actioncode

06.10.2009 1.2 PeS Add doc on action code (check input)

08.01.2010 1.3 DaM Add doc on frame definition

11.01.2010 1.4 PeS Change the “MoveTo” command, update figure 1.1

20.05.2010 1.5 PeS Add doc on “Motion sequences”

29.06.2010 1.6 PeS Update doc on arl

29.06.2011 1.7 DaM Update doc on arl for communication with module

09.09.2011 1.8 SiA Update Doc on arl for communication with module

23.09.2011 1.9 DaM Add enumerations, process command. Correct text protocol

24.10.2011 1.10 ZuM/DaM Add doc on arl module commands and instructions

Programming manual Desktop & PocketDelta Robot by Asyril SA 46/47

Programming manual Desktop & PocketDelta Robot by Asyril SA 47/47

This document is the property of Asyril S.A. and may not be copied or circulated without

permission. The information contained in this document is subject to change without

notice for the purpose of product improvement.

asyril sa

z.i. le vivier

ch-1690 villaz-st-pierre

switzerland

tel. +41 26 653 71 90

fax +41 26 653 71 91

[email protected]

www.asyril.ch