Asyfeed module
Programming Guide

Document

MODULE_ASYFEED_Programming_Guide_EN
000.100.498

VersionC

Robot controller
version

Since V4.6.0

Asyview controller
version

Since V4.0.0

Date

06.04.2018

Asyfeed module
Programming Guide
Table of Contents© Copyright Asyril S.A.
Version: C

Table of Contents
TABLE OF CONTENTS ........................................................................................................................................... 2
1.

INTRODUCTION .............................................................................................................................................. 3

1.1.
2.

RELATED MANUALS .................................................................................................................................. 4

GENERAL INFORMATION .............................................................................................................................. 5

2.1.

ARL, DEFINITIONS AND MAIN CHARACTERISTICS .................................................................................... 5

2.2.

ARL FILES ................................................................................................................................................ 5

2.3.

ARL PROGRAM SYNTAX ........................................................................................................................... 6

3.

TYPES OF DATA ............................................................................................................................................. 6

4.

OPERATORS ................................................................................................................................................... 7

4.1.

SUMMARY TABLE ...................................................................................................................................... 7

4.2.

DETAILED DESCRIPTION ........................................................................................................................... 9

5.

CONTROL INSTRUCTIONS .......................................................................................................................... 146.

"MATHS" INSTRUCTIONS............................................................................................................................ 18

7.

INSTRUCTIONS BY MODULE ...................................................................................................................... 20

8.

7.1.

"MODULE" CONCEPT .............................................................................................................................. 20

7.2.

ROBOT MODULE ..................................................................................................................................... 21

7.2.1.

Robot movements ...................................................................................................................... 21

7.2.2.

Position in the work volume ...................................................................................................... 22

7.2.3.

I/O Action codes ......................................................................................................................... 30

7.2.4.

"Robot" module instructions ...................................................................................................... 32

7.1.

"ASYVIEW" MODULE INSTRUCTIONS....................................................................................................... 43

7.2.

I/O EXTENSION MODULE INSTRUCTIONS ................................................................................................ 51

7.2.1.

Digital I/O ..................................................................................................................................... 52

7.2.2.

Analog I/O .................................................................................................................................... 53

7.3.

TURNING TABLE MODULE INSTRUCTIONS .............................................................................................. 55

7.4.

MATH MODULE INSTRUCTION ............................................................................................................... 60

TECHNICAL SUPPORT................................................................................................................................. 62

8.1.1.

For a better service … ............................................................................................................... 62

8.1.2.

Contact ......................................................................................................................................... 62

ALPHABETICAL INDEX ........................................................................................................................................ 63
THEMATIC INDEX ................................................................................................................................................. 65
REVISION TABLE ................................................................................................................................................. 67000.100.498

2/68

Asyfeed module
Programming Guide
Introduction© Copyright Asyril S.A.
Version: C

1. Introduction
This document is the property of Asyril S.A.; it may not be reproduced, modified orcommunicated, in whole or in part, without our prior written authorisation. Asyril S.A. reserves
the right to modify any information contained in this document for reasons related to productimprovements without prior notice. Before using the product, please read this entire document
in order to ensure that the product is used correctly. However, if you encounter difficulties
when using the product, do not hesitate to contact our customer service department.
In this manual, the safety information that must be respected is split into three types:"Danger", "Important" and "Note". These messages are identified as follows:
DANGER!
Failure to respect this instruction may result in serious physical injury.
DANGER!
This instruction identifies an electrical hazard. Failure to respect this instruction may
result in electrocution or serious physical injury due to an electric shock.
IMPORTANT!
Failure to respect this instruction may result in serious damage to equipment.
NOTE:
The reader's attention is drawn to this point in order to ensure that the product is usedcorrectly. However, failure to respect this instruction does not pose a danger.
Reference …
For more information on a specific topic, the reader is invited to refer to another manual oranother page of the current manual.

IMPORTANT!
Asyril cannot be held responsible for damage to property or persons caused by the failure torespect the instructions contained in the manual for your machine.
NOTE:
All dimensions and values are expressed in millimetres (mm) in this manual.

000.100.498

3/68

Asyfeed module
Programming Guide
Introduction

1.1.

© Copyright Asyril S.A.
Version: C

Related manuals
As described in the Table 1-1, this manual is an integral part of the Asyfeed Pocket Module
documentation set. This manual covers the different instructions and their syntax which canbe used to program the pick & place application within the Asyfeed Pocket Module.

Manual Title

Manual reference

Description of the content

Operating

MODULE_ASYFEED_Operating_Manual_EN

Technical description of themanualMODULE_ASYFEED_Manuel_Instructions_FR

product, electrical and

MODULE_ASYFEED_Bedienungsanleitung_DE

mechanical interfaces,
maintenance and transport
information.

HMI manual
Programming

Accessible directly via the HMI
MODULE_ASYFEED_Programming_Guide_EN

THIS MANUALMODULE_ASYFEED_User_Guide_EN

Description of the main

MODULE_ASYFEED_Manuel_Utilisation_FR

functionalities of the machine

Guide
User Guide

and of the standard P&P andcalibration cycles
User Guide

SMARTSIGHT_User_Guide_EN

Describes how to configure the

SMARTSIGHT_Manuel_Utilisation_FR

feeding and the vision

SMARTSIGHT_Benutzerhandbuch_DE

detection

Table 1-1 : Related manuals

000.100.498

4/68

Asyfeed module
Programming Guide
General information© Copyright Asyril S.A.
Version: C

2. General information
2.1.

ARL, definitions and main characteristics
ARL (Asyril Robotics Language) is the programming language for the Asyril robot controller. It
is a structured language, the syntax of which is derived from normalised language (IEC
61131-3 ST - Structured Text). Its role is to provide a means to automate any task performedby the controller. It is used to define sequences of actions performed during a recipe.
There are various types of data, (NUMBER, STRING, BOOLEAN, VECTOR,…) as well as
conditional test instructions (IF, SWITCH), loops (FOR, WHILE, REPEAT) and calculation
possibilities with expressions and mathematical functions (SIN, COS, etc.)
A set of commands enables various software modules to be controlled (robot, vision system,
inputs/outputs, etc.)

2.2.

ARL files
ARL is a language that is compiled in a format specific to the Asyril platform.
The compilation chain is set out below.
The ARL source program file in XML format is preprocessed and compiled in order to obtainan executable file that is stored in the random access memory.
Execution is ensured by the ARL interpreter integrated into the robot controller.

General compilation diagram:

XML

Exec

SourceSourcePreprocessing(.arl file)

Text

Compilation(.pp file)

ARL interpreter

Obj

Exec

(RAM)

(RAM)

Figure 2-1: Compilation chain

Source file (.arl extension)
This XML file contains the text for the program as well as a set of "data" (resource) that canbe accessed whilst the program is being executed.

000.100.498

5/68

Asyfeed module
Programming Guide
Types of data

© Copyright Asyril S.A.
Version: C

Preprocessed file (.pp extension)
Files with the ".pp" extension are intermediate files that result from the compilation process
for .arl programs. They are the result of the preprocessing operation for each program. Thesefiles are in plain text format.
Preprocessing covers operations associated with handling the program text. It includes
processing macros (substitution) and removing comments from the source code.
These files are only created on the file system as a "trace" of the compilation process. They
are not used directly by the compiler.

Executable file
Executable files are only stored in the memory. They are in a Asyril platform-specific format.
They are the result of the actual compilation operation.
Only programs that successfully complete the compilation step are saved in the memory.

2.3.

ARL program syntax

An ARL program is composed of one or more instructions that are evaluated and executed inturn; each instruction is a string of characters terminating in a semicolon ( ; ). Comments
identified by (* … *) are not evaluated.

3. Types of data
There are several types of data in ARL:

Data type

ExampleAbbreviation usedin this manual

Notation of variables
used in this manual

Number125,458

realr, for example rValue

String'Arl'

Strings, for example sChain

Vector(1,3,1,1,Var)

Vectorv, example vPosition

Boolean

true

bool

b, example bSlowSpeed

The type is determined once a variable has been assigned. However, when a type has been
assigned to a variable, it cannot be modified.
For example, the sequence of instructions below will generate a runtime error.
var:=1;
var:=(0.5,0.5,0.5);
The names of the variables must begin with an alphabetical character and contain no special
characters (punctuation, etc.).
000.100.498

6/68

Asyfeed module
Programming Guide
Operators© Copyright Asyril S.A.
Version: C

4. Operators
4.1.

Summary table
The table below gives an exhaustive list of the operators that may be used in ARL. It
describes the syntax and the type of variable that can be used for each of the operators
described. A more precise description of each operator is given after this summary table.

Operator:=

Description

Assignation

SyntaxType of
V1

Type of
V2

Type ofresult

real

-

real

Vector-VectorString-String

bool

-

bool

Var:= <V1>

**

Power

<V1> ** <V2>

real

real

real

-

Negation- <V1>

real

-

real

NOT

Complement

NOT <V1>

bool

-

bool

*

Multiplication<V1> * <V2>

real

real

real

/

Division<V1> / <V2>

real

real

real

MOD

Modulo<V1>MOD<V2>

real

real

real

real

real

real

VectorVectorVectorStringStringString

real

real

real

VectorVectorVectorArithmetic addition+

Vector addition<V1> + <V2>

Concatenation
Arithmetic subtraction
Vector subtraction<V1> - <V2><

"Less than" comparison<V1> < <V2>

real

real

bool

>

"Greater than" comparison<V1> > <V2>

real

real

bool

<=

"Less than or equal" comparison<V1> <= <V2>

real

real

bool

>=

"Greater than or equal"
comparison<V1> >= <V2>

real

real

bool

real

real

bool

VectorVectorbool

StringString

bool

bool

bool

bool

-

<>

Different from000.100.498<V1> <> <V2>

7/68

Asyfeed module
Programming Guide
Operators

Version: C

Operator=© Copyright Asyril S.A.

Description

Equal toSyntaxType of
V1

Type of
V2

Type ofresult

real

real

bool

VectorVectorbool

StringString

bool

bool

bool

bool

<V1> = <V2>

AND

"and" logic<V1> AND <V2>

bool

bool

bool

OR

"or" logic<V1> OR <V2>

bool

bool

bool

XOR

"exclusive or" logic<V1> XOR <V2>

bool

bool

bool

000.100.498

8/68

Asyfeed module
Programming Guide
Operators

4.2.

© Copyright Asyril S.A.
Version: C

Detailed description

ASSIGNATION
Syntax:Function:

Variable:= <rValue>
Assigns the rValue value to the Variable variable.
NOTE:
the value and the variables must be of the same type: boolean, vector withsame number of coordinates, character string, number, etc.

Example:PICKPOS:= (0.5,0.5,0,0,0,0);

See also:
POWER
Syntax:Function:
Parameters:

Example:<rValue> ** <rPower>
Used to raise the rValue to the rPower power.
rValuenumerical expression

rPowernumerical expression

Val:= 2**10; (* result: val = 210 = 1024*)

See also:
NEGATION
Syntax:Function:
Parameters:
Example:- <rValue>
Used to return the opposite of the numerical expression rValuerValuenumerical expression

Val:= -2; (* result: val = -2 *)See also:
COMPLEMENT
Syntax:Function:
Parameters:
Example:NOT <rValue>
Used to establish the logical negation of bValuebValueboolean expression

A:= true;
B:= 5;
C:= 10;
Val:= NOT A; (* result: val = false *)Val:= NOT (B > C); (* result: val = true *)Val:= NOT (NOT A); (* result: val = true *)See also:

000.100.498

9/68

Asyfeed module
Programming Guide
Operators© Copyright Asyril S.A.
Version: C

MULTIPLICATION
Syntax:Function:
Parameters:

Example:<rValue1> * < rValue2>
Used to calculate the product of rValue1 and rValue2
rValue1numerical expression

rValue2

numerical expression

Val:= 2 * 2; (* result: val = 4 *)See also:

DIVISION
Syntax:Function:
Parameters:

Example:<rValue1> / < rValue2>
Used to calculate the quotient of rValue1 and rValue2
rValue1numerical expression

rValue2

numerical expression

Val:= 5/2; (* result: val = 2.5 *)
val:= 1/3; (* result: val = 0.3333333333333333 *)See also:
MODULO
Syntax:Function:
Parameters:

Example:<rValue> MOD <rModulo>
Used to return rValue modulo rModulo. i.e. the rest of the euclidean division ofrValue by rModulo. An error is generated if rModulo is zero.
rValuenumerical expression

rModulonumerical expression

Val:= 15 MOD 10; (* result: val = 5 *)See also:

ARITHMETIC ADDITION, VECTOR ADDITION or CONCATENATION
Syntax:Function:
Parameters:

Example:<rvsValue1> + < rvsValue2>
Used to add two real numbers, two vectors (member to member addition) or toconcatenate two character strings.
rvsValue1

numerical expression, vector or character string

rvsValue2of the same type as rvsValue1

Val:= 5 + 3; (* result: val = 8 *)Val:= (1,0,1,1)+(1,1,5,1); (* result: val = (2,1,6,2) *)Val:= ‘abc’ + ‘def’;(* result: val = ‘abcdef’ *)See also:

000.100.498

10/68

Asyfeed module
Programming Guide
Operators© Copyright Asyril S.A.
Version: C

ARITHMETIC SUBTRACTION or VECTOR SUBTRACTION
Syntax:Function:
Parameters:

Example:<rValue1> - < rValue2>
Used to subtract two real numbers or two vectors (member to member subtraction)rValue1numerical expression

rValue2

numerical expression

Val:= 5 - 3; (* result: val = 2 *)Val:= (1,0,1,1)-(1,1,5,1); (* result: val = (0,-1,-4,0) *)See also:"LESS THAN"COMPARISON
Syntax:Function:
Parameters:

Example:<rValue1> < < rValue2>
Used to compare two numerical expressions. An instruction using this operator
returns true if rValue1 is strictly less than rValue2 and false if not.
rValue1numerical expression

rValue2

numerical expression

Val:= 3 < 5; (* result: val = true *)(*false if the result is greater than or equal to*)See also:"GREATER THAN" COMPARISON
Syntax:Function:
Parameters:

Example:<rValue1> > < rValue2>
Used to compare two numerical expressions. An instruction using this operator
returns true if rValue1 is strictly greater than rValue2 and false if not.
rValue1numerical expression

rValue2

numerical expression

Val:= 5 > 5; (* result: val = false *)(*false if the result is less than or equal to*)See also:"LESS THAN OR EQUAL TO" COMPARISON
Syntax:Function:
Parameters:

Example:<rValue1> <= < rValue2>
Used to compare two numerical expressions. An instruction using this operator
returns true if rValue1 is less than or equal to rValue2 and false if not.
rValue1numerical expression

rValue2

numerical expression

Val:= 3 <= 5; (* result: val = true *)(*false if the result is strictly greater than*)See also:

000.100.498

11/68

Asyfeed module
Programming Guide
Operators© Copyright Asyril S.A.
Version: C"GREATER THAN OR EQUAL TO" COMPARISON
Syntax:Function:
Parameters:

Example:<rValue1> >= < rValue2>
Used to compare two numerical expressions. An instruction using this operator
returns true if rValue1 is greater than or equal to rValue2 and false if not.
rValue1numerical expression

rValue2

numerical expression

Val:= 5 >= 5; (* result: val = true *)(*false if the result is strictly less than*)See also:

DIFFERENT FROM
Syntax:Function:
Parameters:

Example:<rbvsValue1> <> < rbvsValue2>
Used to compare two numerical expressions. An instruction using this operator
returns true if rValue1 differs from rValue2 and false if not.
rbvsValue1

numerical expression, boolean, vector or character string

rbvsValue2of the same type as rbvsValue1

Val:= 5 <> 5; (* result: val = false *)Val:= true <> false; (* result: val = true *)Val:= ‘test’ <> ‘test1’; (* result: val = true *)Val:= (0,0,1,0) <> (0,0,0,0); (* result: val = true *)See also:

EQUAL TO
Syntax:Function:
Parameters:

Example:<rValue1> = < rValue2>
Used to compare two numerical expressions. An instruction using this operator
returns true if rValue1 is equal to rValue2 and false if not.
rValue1numerical expression

rValue2

numerical expression

Val:= 5 = 5; (* result: val = true *)Val:= true = false; (* result: val = false *)Val:= ‘test’ = ‘test1’; (* result: val = false *)Val:= (0,0,1,0) = (0,0,0,0); (* result: val = false *)See also:

000.100.498

12/68

Asyfeed module
Programming Guide
Operators© Copyright Asyril S.A.
Version: C

AND LOGIC
Syntax:Function:

Parameters:

Example:<bValue1> AND < bValue2>
Used to establish the logical conjunction "and" between two expressions:bValue1booleanbValue2booleanbValue1bValue2result

true

false

false

true

true

true

false

true

false

false

false

false

Val:= true AND true; (* result: val = true *)See also:

OR LOGIC
Syntax:Function:

Parameters:

Example:<bValue1> OR < bValue2>
Used to establish the logical disjunction "or" between two expressions:bValue1booleanbValue2booleanbValue1bValue2result

true

false

true

true

true

true

false

true

true

false

false

false

Val:= true OR false; (* result: val = true *)See also:

EXCLUSIVE OR LOGIC
Syntax:Function:

Parameters:

Example:<bValue1> XOR < bValue2>
Used to establish the logical exclusion "exclusive or" between two expressions:bValue1booleanbValue2booleanbValue1bValue2result

true

false

true

true

true

false

false

true

true

false

false

false

Val:= true XOR true; (* result: val = false *)See also:

000.100.498

13/68

Asyfeed module
Programming Guide
Control instructions© Copyright Asyril S.A.
Version: C

5. Control instructions(* COMMENT *)Syntax:Function:(* <string> *)Any character string flanked by the opening symbol (parenthesis star) and closing
symbol (star parenthesis) will not be evaluated and the execution process continues
after this string.
NOTE:
The use of comments is not authorised during programming from the robot
web interface. Only the HMI interface enables comments to be used.

Example:(* this is an example of a comment *)See also:

Control instruction IF
Syntax:Function:IF <bool bCondition> THEN
<instructions>
ELSEIF <bool bCondition1> THEN
<instructions>[…]
ELSEIF <bool bConditionN> THEN
<instructions>
ELSE<instructions>
END_IF
This IF, THEN ELSEIF, THEN, ELSE, END_IF sequence successively evaluates thebCondition conditions. If the result of the evaluation is true, the instruction sequencethat follows is performed up to the next keyword (ELSEIF, ELSE or END_IF). If noneof the ELSEIF conditions are met, the instructions following the keyword ELSE will be
evaluated. The program then resumes after END_IF.
NOTE:
when different instructions are to be executed according to several possible
values for one parameter, it is preferable to use the SWITCH OF, CASE,
ELSE, END_SWITCH sequence.

Example:IF ((i<>0 OR j<>0) AND (i<>14 OR j<>0)) THEN(* do whatever you want *)ELSEIF ((i <> 2) AND (j <> 2)) THEN(* do something else *)ELSE(*do something else again *)END_IF

See also:

SWITCH

000.100.498

14/68

Asyfeed module
Programming Guide
Control instructions© Copyright Asyril S.A.
Version: C

Control instruction SWITCH
Syntax:Function:

SWITCH <Variable> OF
CASE <value1>: <instructions1>[…]
CASE <valueN>: <instructionsN>
ELSE<default instruction>
END_SWITCHThis SWITCH, OF, CASE, ELSE, END_SWITCH sequence successively evaluates
the expressions indicated by the keyword CASE until a value equal to the initialvariable is found between the keywords SWITCH and OF. The instructions that follow
are then evaluated. If none of the CASE conditions are met, the instructions following
the keyword ELSE will be evaluated. The program then resumes after
END_SWITCH.
NOTE:
the values or variables following CASE must be of the same types as
those following SWITCH.

Example:(* take a part, wait or move to trash depending on the valueof a flag *)SWITCH PickFlag OF
CASE 0: MOVETO Pick World ToolID HighSpeed NoBlend NoAction;
CASE 1: SLEEP 200;
ELSE MOVETO Trash World ToolID HighSpeed NoBlend NoAction;
END_SWITCH

See also:IF

Control instruction FOR
Syntax:

FOR <nCounter>:= <nStart> TO <nEnd> BY <nStep>
DO<instructions>
END_FOR

Function:

This sequence executes the instructions between DO and END_FOR until thecounter nCounter is equal to its end value nEnd. The counter is initialised by thenStart value and increased by nStep each time it passes through the loop.

Example:(* fill a pallet of x_max * y_max positions *)FOR x:=init_x TO x_max BY 1
DO
FOR y:=init_y TO y_max BY 1
DO(* pick parts, transport and place *)END_FOREND_FORSee also:

000.100.498

15/68

Asyfeed module
Programming Guide
Control instructions© Copyright Asyril S.A.
Version: C

Control instruction WHILE
Syntax:

WHILE <bCondition> DO<instructions>
END_WHILE

Function:

This sequence executes the instructions between DO and END_WHILE while theboolean condition bCondition is evaluated as true. If the condition is false after the
first evaluation, the instructions are not executed, unlike the control instruction
REPEAT.

Example:(* fill a tube of 500 positions *)PlaceCapacity:=500;
PlaceCounter:=0;
WHILE PlaceCounter <= PlaceCapacity DO(* pick part *)(* transport *)(* place part *)PlaceCounter:=PlaceCounter+1;
END_WHILE

See also:

REPEAT

Control instruction REPEAT
Syntax:REPEAT<instructions>
UNTIL <bCondition>
END_REPEAT

Function:

This sequence executes the instructions between REPEAT and UNTIL, while theboolean condition bCondition is evaluated as true. If the condition is false after the
first evaluation, the instructions will still be executed once, unlike the control
instruction WHILE.

Example:(* wait until the image has finished being analysed by Asyview*)
REPEAT
sleep 20;
S:=ModuleCmd'AsyView''GetState DeviceID=1 Name=SearchRunning‘;
UNTIL S=true;
END_REPEAT;

See also:

000.100.498

WHILE

16/68

Asyfeed module
Programming Guide
Control instructions© Copyright Asyril S.A.
Version: C

Control instruction EXIT
Syntax:EXIT

Function:

Exit the function currently being executed

Example:(* exit "while" if val:=1 *)WHILE true DO
IF val:=1 THEN(*do something *)EXIT;
END_IF(*do something else *)END_WHILE

See also:

WHILE

000.100.498

17/68

Asyfeed module
Programming Guide"Maths" instructions© Copyright Asyril S.A.
Version: C

6. "Maths" instructions
real COS rAngle
Syntax:Function:
Parameters:

COS <rAngle>
This function returns the cosine of rAngle. The result is between -1 and 1
rAngleangle in radians

Example:Val:= COS Pi/2; (* result: val = 0 *)See also:

ACOS

real ACOS rValue
Syntax:Function:
Parameters:

ACOS <rValue>
This function returns the reverse cosine of rValue in radians. The result is between 0and π radian. An error is generated if rValue is not between -1 and 1.
rValuenumerical expression

Example:Val:= ACOS 0; (* result: val = π/2

See also:

COS*)

real SIN rAngle
Syntax:Function:
Parameters:

SIN <rAngle>
This function returns the sine of rAngle. The result is between -1 and 1
rAngleangle in radians

Example:Val:= SIN Pi/2; (* result: val=1 *)See also:

ASIN

real ASIN rValue
Syntax:Function:
Parameters:

ASIN <rValue>
This function returns the reverse sine of rValue in radians. The result is between π/2 and + π/2 radians. An error is generated if rValue is not between -1 and 1.
rValuenumerical expression

Example:Val:= ASIN 1; (* result: val = π/2 *)See also:

SIN

real TAN rAngle
Syntax:Function:
Parameters:

TAN <rAngle>
This function returns the tangent of rAngle. An error is generated if rAngle is π/2
or - π/2.
rAngle, real typeangle in radians

Feedback:
Example:Val:= TAN Pi/4; (* val: alpha = 1 *)See also:

ATAN

000.100.498

18/68

Asyfeed module
Programming Guide"Maths" instructions© Copyright Asyril S.A.
Version: Creal ATAN rValue
Syntax:Function:
Parameters:

ATAN <rValue>
This function returns the reverse tangent of rValue in radians. The result is strictly
between - π/2 and + π/2 degrees.
rValuenumerical expression

Example:Val:= ATAN 1; (* result: val = π/4 *)See also:

TAN

real ABS rValue
Syntax:Function:
Parameters:
Example:ABS <rValue>
This function returns the absolute value of the numerical expression rValuerValuenumerical expression

Val:= ABS -90; (* result: val = 90 *)See also:

void SETVECTORVALUE vVector rPosition nValue
Syntax:SETVECTORVALUE <vVector> <rPosition> <rValue>

Function:

Assigns the value of nValue to the position rPosition of the vector vVector

Example:(* modify the z coordinate by one point *)desPos:= (0.2,-0.12,0,0);Height:=0.05;
SETVECTORVALUE desPos 3 Height;
after this sequence, the vector desPos is: (0.2,-0.12,0.05,0)

See also:

GETVECTORVALUE

real GETVECTORVALUE vVector rPosition
Syntax:GETVECTORVALUE <vVector> <rPosition>

Function:

This function reads and sends the value of the n-th coordinate (rPosition) for thevector vVector

Example:(* store the z coordinate for a point *)ActualPos:= GETPOSITION;
Height:= GETVECTORVALUE ActualPos 3;
after this sequence, the Height variable will contain the actual coordinate of therobot for Z.

See also:

000.100.498

GETPOSITION

19/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

7. Instructions by module
7.1.

"Module" concept
It is possible to send a command to various modules via ARL. These modules are:-

The ROBOT module-

The ASYVIEW module-

The IOWAGO module-

The TURNING TABLE module-

The MATH module

Each module has specific instructions, which must be written using appropriate syntax. The
following chapters describe each module, as well as the associated objects and instructions.

000.100.498

20/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

7.2. Robot module
7.2.1. Robot movements
The robot's platform executes the interpolated movements along a line. All the movement
parameters associated with a trajectory are given in the system of coordinates (X,Y,Z). Twotypes of movement are possible:"Point to point" trajectory
X1Y1Z1RZ1

X0Y0Z0RZ0Z
YX

Figure 7-1: "Point to point" trajectory
During a point to point trajectory, the robot follows a straight line defined in a Cartesianreference from its current position (X0Y0Z0RZ0) up to the desired position (X1Y1Z1RZ1).


Trajectory with blend
X1Y1Z1RZ1

X3Y3Z3RZ3

X0Y0Z0RZ0
X2Y2Z2RZ2ZYXFigure 7-2: Multi-point trajectory with "blend"
A "blend" parameter is used to go from one target position to another without the robot
stopping, thanks to curved trajectories during changes in direction. The "blend" factor
represents a radius around the target position. When the robot enters the circle defined bythis radius, the next position, stored in the task planner buffer, is calculated. The result isrepresented on the figure above.

000.100.498

21/68

Asyfeed module
Programming Guide© Copyright Asyril S.A.

Instructions by module

Version: C

7.2.2. Position in the work volume
The work volume of the robot may be subdivided thanks to four types of object:The frames, used to describe a geometric sub-reference (X’ Y’ Z’) in the work volume of
the robot (X Y Z).

The points, used to represent a specific position in the work volume of the robot

The tools, used to define the offsets caused by using a tool in relation to the robot's
platform.



The motion sequence, used to define a sequence of movements

Each of these objects can be saved in the robot controller so that they can be subsequently
used. All of these elements are represented and defined in XML format.

IMPORTANT NOTE:

It is possible to define frames within frames

The identifier 0 (frame, tool, point) represents the robot's worldThe identifiers permitted range from 1 to 99

Type 0 FRAME
Definition:

The type 0 frame is used to define an orthonormal reference from a vector and aplane as shown on the figure below:

Z’
Y’

Pt: 0

Z
Y

X’

Pt: 2
Pt: 1

X
Figure 7-3: Defining a type 0 frame
Parameters:

XML structure:

000.100.498

ptconfig id='0'

defines the origin of the Cartesian system

ptconfig id='1'

defines the direction of the x axis of the reference

ptconfig id='2'

defines the orientation of the plane in the work volumeidframe identifier<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>

22/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

Type 1 FRAME
Definition:

The type 1 frame enables a reference to be defined from two vectors (i.e. threepoints). The reference is not necessarily orthonormal; the scales for the x and y axes
are defined by the parameters xdw and ydw. The scale for the z axis remains metric(scale of the global robot reference). The direction of the z axis is definedorthogonally to the x and y axes, as shown on the figure below:

Z’
ydw

Pt: 0
xd
w

Z
Y

Pt: 2

Y’
X’

Pt: 1

X
Figure 7-4: Defining a type 1 frame
Parameters:

XML structure:

000.100.498

ptconfig id='0'

defines the origin of the Cartesian system

ptconfig id='1'

defines the direction of the x axis of the reference

ptconfig id='2'

defines the orientation of the plane in the work volume

frame idframe identifier

xwd

distance between points 0 & 1

ywd
distance between points 0 & 2<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></world>

23/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

Type 2 FRAME
Definition:

The type 2 frame is used to define a reference from a list of at least three points forwhich the coordinates in the work volume (ptconfig) and in the new reference (ptcalib)
must be provided. The reference is defined by adjusting the positions on a plane asshown in the figure below:

Z’
ptca

co
pt

Z

Y’

nf
ig

lib

Y

X’

X
Figure 7-5: Defining a type 2 frame
Parameters:

XML structure:

000.100.498

ptconfig

Coordinates of each point in the robot's work volume

ptcalib

Theoretical coordinates for the corresponding point in the plane(x;y) of the new reference (X’ Y’ Z’)

idframe identifier<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>

24/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

Type 3 FRAME
Definition:

The type 3 frame called a "meshframe" is a specific frame that is designed to correct thedifferences between a setpoint position and the final position of the robot in a plane.
It is used to define a "corrective chart" formed by a mesh of points.
This chart will be applied to any position included in the mesh by linear interpolation.
The frame is composed of three elements. Two "internal" frames and a mesh of points.
1) The internal calibration frameThis defines the mesh plane. It must be type 0 and defined in relation to the frame world.
It defines the frame in which the mesh positions are expressed.
2) The internal work frameThis is optional and does not influence the correction quality. It is defined as a
sub-frame of the calibration frame. It enables a work system to be freely defined.
It may be type 0, 1 or 2.
3) Point meshThis defines a set of points, each of which must be located at an intersection of arectangular grid having fixed dimensions. The points are defined in the internal
calibration frame.
Each mesh point must be located exactly at the intersection of the grid but all of thepoints may form any surface without any restriction in size or "type" (with or withoutholes, etc.)
The origin of the calibration frame itself is not required to be joined with an intersection.

Mesh of point at the intersection of a dimension grid(SizeX,SizeY)

Calibration
frame

z
y
x

Figure 7-6: Defining a type 3 frame

000.100.498

25/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

Correction/interpolation principle

Work frame-> calibration frametransformation

Search for the encompassing

Setpoint
Internal meshposition?

no

Error
Position "outside mesh"

yesCorrespondencewith a node?

yes

Direct application of the corrective chartnoSearch for the best origin

Error
Correction"outside
limits"Inclusion in the "circle ofproximity"?
noLinear interpolation
yes
Setpoint corrected

1

0

v1

1

1

0

0

v1

v2

3

2

Fig 8.7
Direct application of thecorrective chart.
The setpoint position
corresponds exactly to node 0of the mesh.
The correction is obtained
directly by searching for thecorresponding measured
position.

000.100.498

3

2

3

v2

2

Fig 8.8
Linear interpolation case 1

Fig 8.9
Linear interpolation case 2

The setpoint position does
not form part of the chart.
Mesh node 0 is chosen as
the origin as it is the closest.
The position is interpolated in
the reference (v1,v2)

The setpoint position does
not form part of the chart.
Mesh node 2 is chosen as
the origin as it is the closest.
The position is interpolated in
the reference (v1,v2)

26/68

Asyfeed module
Programming Guide
Instructions by module

Parameters:

Version: C

ptconfig

Coordinates of each point in the robot's work volume

ptcalib

Theoretical coordinates for the corresponding point in the plane (x;y) of
the new reference (X’ Y’ Z’)

Idframe identifier.

mesh

Definition of global mesh characteristics.
#

Attribute

1

type

2

sizex, sizey

3

4000.100.498© Copyright Asyril S.A.

Signification
Determines the type of mesh.
The only value permitted with the current
version is "constant". This corresponds to arectangular mesh having a fixed dimension =sizex and sizey
Dimension of the mesh in direction x
respectively yfilterSpatial "filter" parameter for the mesh positions.
Enables just some of the points defined in themesh to be taken into account temporarily.
The parameter is formed by a string ofcharacters that defines the centre and thedimensions of the filter. The separator is thecolon character ":".
Two types of filter are currently possible.
1) ring – Corresponding to a ring.
syntax:<centerX:centerY:innerRadius:OuterRadius>
Example: "0.0:0.0:0.005:0.010"
2) rectangle – Corresponding to a rectangular
window.
syntax:<centerX:centerY:sizeX:sizeY>
Example: "0.0:0.005:0.020:0.020"

proxradius

Proximity radius.
Defines an upper limit for the difference(Euclidean standard) between the setpoint
position (Src) and the measured position (Dst)

Node

Point doublet (src, dst) defining a vertex of a mesh

Src

(Source) Target position (setpoint) in the calibration frame reference.

Dst(Destination) Measured position that corresponds to the setpoint
position Src

27/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

XML structure:<frame id='<MeshFrameid>' type='3'><frame id='<calibFrameId>' type='0' ><frame id='70' type='0' ><ptconfig id='0' x='' y='' z='' rz='' /><ptconfig id='1' x='' y='' z='' rz='' /><ptconfig id='2' x='' y='' z='' rz='' /><frame id='<workingFrameId>' type='0'<ptconfig id='0' x='' y='' z='' rz='' /><ptconfig id='1' x='' y='' z='' rz='' /><ptconfig id='2' x='' y='' z='' rz='' /></frame></frame><mesh type='constant' sizex='' sizey='' filter=''proxradius=''><node id='0' teached='' proxdistance='' ><srcpos x='' y='' z='' rz='' /><dstpos x='' y='' z='' rz='' /></node><node id='1' teached='' proxdistance='' ><srcpos x='' y='' z='' rz='' /><dstpos x='' y='' z='' rz='' /></node>.
.
.
</mesh></frame>000.100.498

28/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

TOOLDefinition:
Parameters:

XML structure:

TOOLs are used to define the offsets caused by using a tool in relation to the robot's
platform.
x='_'

Offset according to robot axis X

y='_'Offset according to robot axis Yz=’_’Offset according to robot axis Z

rz='_'

Offset around robot axis RZ

idTool identifier<world><tool id='' x='' y='' z='' rz=''/></world>

POINTS
Definition:
Parameters:

XML structure:

000.100.498

POINTS are objects used to represent a specific position in the work volume of therobot. They are not related to a specific frame, but they must be used in a frame.
x='_'

Position according to the X axisy='_'Position according to the Y axisz=’_’

Position according to the Z axis

rz='_'

Position around the RZ axis

id
Tool identifier<world><pt id='' x='' y='' z='' rz=''/></world>

29/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

7.2.3. I/O Action codes
It is possible to synchronise the digital outputs with the movements of the robot using "ActionCodes". The action-codes are sent with the robot command; they define what it must do andat what moment. The action to be performed is always coded using three digits and the valueof the action (action duration, distance before action, etc.) is defined by a real number. An
action code always takes the following format: XXX.XXXXXX

7.2.3.1. General tableaction-codest

1 digit

nd

2

digit

Action valuerd

3 digit.

No action000

enter the value of an
output, x metres before thetarget position

1

output toactivate:
0 to 9output value:
0 or 1

Trigger an output x metres
before the target position
for 100 ms

2

output totrigger:
0 to 9output value
for 100 ms:
0 or 1.

Distance (in [m]) to the target
position at which the output istriggeredpick action: trigger suction
x metres before the target
position

3

0

0

.

Distance (in [m]) to the target
position at which suction is
activated (output 0)

place action: stop suction
and blow for x
milliseconds once inposition

400. Time (in [ms]) during which blowing

Check the status of an
input and stop the
movement if the status of
the input is not the desired
status5

input tocheck: 0 to
9desired input
value:
0 or 1.

none

Synchronise the values ofthree outputs x metres
before the target position

6

0

0 to 7.

Distance (in [m]) to the target
position at which the output istriggered"Two-stage" place action
with flow limitation

7*(not used)(not used)000.100.498.
.

0Distance (in [m]) to the target
position at which the output isactivated

is activated (output 1)

Delay (in [ms]) between activationof blowing and activation of flow
limitation.

30/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

IMPORTANT NOTE:
Outputs 0 and 1 are fixed and cannot be modified. If a vacuum gripper is used, output 0 must
be connected to the suction and output 1 to the blowing.
Details of action-code 60X.XXX:
Code
600.xxx
601.xxx
602.xxx
603.xxx
604.xxx
605.xxx
606.xxx
607.xxx

Output 0
False
True
False
True
False
True
False
True

Output 1
False
False
True
True
False
False
True
True

Output 2
False
False
False
False
True
True
True
True

Details of action-code 7X.XXX:
Warning: action code 7 is only active for Desktop type robots for which the "flow limitation"
option has been installed.
This code works in a similar way to code 4 "place action". It works simultaneously on 3
dedicated outputs (0=vacuum, 1=blowing, 2=flow limiter) to create a two-stage blowing
process.
The sequence is as follows:
1) the vacuum is deactivated and blowing triggered simultaneously.
2) after the given time frame, the flow limiter is triggered.

7.2.3.2. Examples
Code

Effect121.001

sets output 2 to true when the robot is 1 mm from its target position

130.00001

sets output 3 to false when the robot is 10µm from its target position

211.001

sets output 1 to true when the robot is 1 mm from its target position. After 100 ms, output
1 is inverted (set to false)

230.00001

sets output 3 to false when the robot is 10µm from its target position. After 100 ms,
output 3 is inverted (set to true)

300.001

sets output 0 to true when the robot is 1 mm from its target position

311.001

sets output 0 to true when the robot is 1 mm from its target position

400.030

sets output 0 to false and output 1 to true when the robot has reached its target
position. After 30 ms, output 1 is inverted (set to false)

451.150

sets output 0 to false and output 1 to true when the robot has reached its target
position. After 150 ms, output 1 is inverted (set to false)

510.010after movement has begun, the robot controls whether the state of output 1 is false.
Otherwise, the movement is stopped.

521.100

after movement has begun, the robot controls whether the state of output 2 is true.
Otherwise, the movement is stopped.

600.001

sets outputs 0, 1 and 2 to false when the robot is 1 mm from its target position

607.00001

sets outputs 0, 1 and 2 to true when the robot is 10 µm from its target position

000.100.498

31/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

7.2.4. "Robot" module instructions
void ALARMMESSAGE ‘sUserDefineMessage’
Syntax:Function:

ALARMMESSAGE ‘sUserDefineMessage’This instruction generates a "warning" type information message which is added to
the list of errors.
NOTE:
This instruction has no influence on the execution of the program.
A message is generated but the program continues to run normally after
this.

Parameters:
Example:sUserDefineMessage
Message to be displayed(* Warning if the robot is faulty *)State:= GetState;
IF State = 0 THEN
AlarmMessage 'Warning: the robot is faulty!';
END_IF

See also:bool DIN rInput
Syntax:Function:
Parameters:

DIN <rInput>
This instruction reads and sends the value of a specified digital input nInput.
nInputnumerical value referencing the input number read.

Example:(* read the state of input 0 *)Var:= DIN 0;

See also:

DOUTbool DOUT rOutput bValue
Syntax:Function:
Parameters:

DOUT <rOutput> <bValue>
This instruction sets the value bValue for a specified digital output nOutput.
nOutput

numerical value referencing the number of the output set.

bValueboolean corresponding to the value of the output set.

Example:(* set output 3 to false *)DOUT 3 false;

See also:

DIN

000.100.498

32/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

vector GETFRAMEPARAMS nFrameID sParamType nParamID
Syntax:Function:

GETFRAMEPARAMS
This instruction reads and sends the value for a particular parameter of a frame. The value
sent depends on the type of parameter requested with sParamType.
NOTE:This instruction can only currently be used with a type 3 frame = "meshFrame"

Parameters:

nFrameID

Frame identifier (ID).

sParamsType

Character string determining the type of parameter desired.
The only possible value is: "mesh". Which corresponds to the meshof a type 3 frame = "meshFrame"nParamID

Mesh source "point" identifier

Example:(* obtain "source" coordinate no 123 for frame 11 *)Src:=GEFRAMEPARAMS 11 'mesh' 123;

See also:

SETFRAMEPARAMS

vector SETFRAMEPARAMS nFrameID sParamType vParam
Syntax:Function:

SETFRAMEPARAMS
This instruction enables the value of one of the parameters of a frame to be modified.
NOTE:
Warning: the value is only modified in the memory. To save the value to thedisk, refer to the SAVEFRAME instruction.

Parameters:

nFrameID

Frame identifier (ID).

sParamsType

Character string determining the type of parameter desired.
The possible values are:#Significance1"config""ptConfig" type parameter2"calib""ptCalib" type parameter3"scale""xdw, ydw" type parameter for
type 1 frames.

"mesh""dst" type parameter (destination
position for a node belonging to amesh of a type 3 frame"meshFrame")

4

vParamValue

Parameter to be modified. May be a value (real) or a vector dependingon the type of parameter modified.

Example:(* modify the value of ptcalib no 1 of frame 11 *)SEFRAMEPARAMS 11 'calib' (1,2,3,4);

See also:

GETFRAMEPARAMS, SAVEFRAME

000.100.498

33/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: Creal GETFRAMEPARAMSNUMBER nFrameID sParamType
Syntax:Function:

GETFRAMEPARAMSNUMBER
This instruction sends the total number of parameters belonging to the frame.
The value depends on the type of parameter requested with sParamType.
NOTE:This instruction can only currently be used with a type 3 frame = "meshFrame"

Parameters:

nFrameID

Frame identifier (ID).

sParamsType

Character string determining the type of parameter desired.
The only possible value is: "mesh". Which corresponds to the meshof a type 3 frame = "meshFrame"

Example:(* get the total number of mesh nodes for frame 11 *)TotalNodeNumber:=GETFRAMEPARAMSNUMBER 11 'mesh';

See also:

SETFRAMEPARAMS

real GETNEXTFRAMEPARAMSINDEX nFrameID sParamType
Syntax:Function:

GETNEXTFRAMEPARAMSINDEXThis instruction moves the collection index to the next valid element. Only applicable with atype 3 frame = "meshFrame". The current implementation results in the next node being
searched for, for which the attribute "teached" = false.
NOTE:
This instruction can only currently be used with a type 3 frame = "meshFrame"

Parameters:

nFrameID

Frame identifier (ID).

sParamsType

Character string determining the type of parameter desired.
The only possible value is: "mesh". Which corresponds to the meshof a type 3 frame = "meshFrame"

Example:(* move the index to the next element for frame 11 *)idxValue:=GETNEXTFRAMEPARAMSINDEX 11 'mesh';

See also:

SETFRAMEPARAMSINDEX

void SETFRAMEPARAMSINDEX nFrameID nIndexValue
Syntax:Function:

SETFRAMEPARAMSINDEXThis instruction is used to set the current value for the collection index.
NOTE:
This instruction can only currently be used with a type 3 frame = "meshFrame"

Parameters:

nFrameID

Frame identifier (ID).

sParamsType

Character string determining the type of parameter desired.
The only possible value is: "mesh". Which corresponds to the meshof a type 3 frame = "meshFrame"

Example:(* reset the index of frame 11 *)SETFRAMEPARAMSINDEX 11 'mesh' 0;

See also:

GETFRAMEPARAMSINDEX

000.100.498

34/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

vector GETPOINT nPointID
Syntax:Function:
Parameters:

GETPOINT
This instruction reads and sends the coordinates for a point defined by its identifier.
nPointID

numerical value referencing the identifier (ID) of the point for which thecoordinates are desired.

Example:(* get the coordinates of point 5 *)pos:=GETPOINT 5;

See also:

SETPOINT

vector GETPOSITION frameID toolID
Syntax:Function:
Parameters:

Example:GETPOSITION
This instruction reads the current position of the robot in the global reference system(frame 0).
nFrameIDnumerical value referencing the identifier (ID) of the frame in which wewant to read the coordinates. The parameter is optional; the default
value is 0 (frame world).

nToolID

numerical value referencing the identifier (ID) of the tool with which wewant to read the coordinates. The parameter is optional. There are nodefault values; the tool correction is not applied if the parameter isabsent.

(* set the current position in frame 1 with tool 2 in thevariable pos *)
pos:=GETPOSITION 1 2;

See also:

real GETTIME
Syntax:Function:
Parameters:
Example:GETTIME
This instruction reads and sends the current time in milliseconds [ms]none(* calculate the duration of a pick - place cycle *)Tstart:= GETTIME;(* pick - place loop *)Tend:= GETTIME;
Ttotal:= Tend - Tstart;

See also:

000.100.498

35/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: Creal GETSTATE
Syntax:Function:

Parameters:
Example:GETSTATE
This instruction reads and return the state of the robot:
Ref

State

Description

-2

Alarm

The emergency stop button is triggered.
NOTE: When the button is released, the robot switches
to the "error" state.

-1

Error

An error has occurred on the robot;
The possible causes are:- Movement too fast
- Collision with an object
NOTE: if an error occurs, the robot must be put in the"off" state in order to continue.

0

Off

In this state, the robot is "off" but ready to start1

Initialisation

The robot is in an initialisation phase

2

On

The robot is initialised and its motors are regulated. But
in this status, movements are not yet possible as the"path planner" and "task planner" are not in operation.

3

Idle

The robot is ready to move.

nOutput

numerical value referencing the number of the output set(* initialise the robot *)state:=getstate;
IF state<3 ThenSETSTATE 0;
WHILE state<>0 DO
state:=getstate;
sleep 20;
END_WHILESETSTATE 3;
state:=getstate;
WHILE state<>3 DO
state:=getstate;
sleep 20;
END_WHILE
END_IF

See also:

000.100.498

SETSTATE

36/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: Cbool HOLDIFREQUESTED
Syntax:Function:

HOLDIFREQUESTEDThis instruction triggers the OMAC "Holding" state, only when a pause request is inprogress. ("pause" button pressed)
In this case it sends the "true" value.
If no request is in progress, the instruction has no effect and sends the "false" value
NOTE:

Parameters:
Example:none(* Message *)Pause:= false;
Pause:= HoldIfRequested;
IF pause = TRUE THEN
AlarmMessage 'The program resumes after being paused!';ELSE
AlarmMessage 'The program has not been interrupted…';
END_IFvalue LOADDATA ‘sNameToDisplay’Syntax:Function:

LOADDATA ‘sDataName’
This instruction enables data contained in the "data" part of an ARL program to beloaded into a variable.
NOTE:
This instruction can only be used in ARL programs from the HMI of an
MFEED or AFEED module. It returns the value of the variable recorded in
the table of dynamic values.

Parameters:
Example:sDataName
Name of the resource(* move to the pick position with an adjustable speed *)pickPosition:= (0,0,0,0);speed:= ‘Pick_speed’ loadValue;
moveto pickPosition 1 1 speed;

See also:
void SAVEFRAME nFrameID
Syntax:Function:
Parameters:

SAVEFRAME <nFrameID>
This instruction saves all of the parameters for the designated frame to the disk.
nFrameIDframe identifier.

Example:(* Modification and saving of ptconfig no 0 of frame 11 *)SETFRAMEPARAMS 11 'config" 0 (1,2,3,4);
SAVEFRAME 11; // optional, save the frame to the disk

See also:

SETFRAMEPARAMS

000.100.498

37/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

vector TRANSFORMPOINTvPosition posFrameId transFrameId
Syntax:Function:
Parameters:

TRANSFORMPOINT <vPosition> <nPosFrameId> <nTransFrameId>
This instruction enables the coordinates of a point of a frame to be transformed toanother.
vPosition

position to be transformed

nPosFrameId

Id of the frame of the position to be transformed (vPosition)transFrameId

Id of the destination frame

Example:(* transform the position (1,2,3,4) of frame 11 to frame 22 *)pos:= TRANSFORMPOINT (1,2,3,4) 11 22;

See also:

TRANSFORMVECTOR

vector TRANSFORMVECTOR vPosition posFrameId transFrameId
Syntax:Function:

Parameters:

TRANSFORMVECTOR <vPosition> <nPosFrameId> <nTransFrameId>⃗ = (x,y,z) from one frame to another.
This instruction is used to transform a vector 𝑉⃗
This means that the origin 𝑂 = (0,0,0,0) of the starting frame reference is also
⃗ that is sent by the⃗ −𝑂transformed in the incoming frame and it is the subtraction 𝑉
instruction.
vPosition

vector to be transformed

nPosFrameId

Id of the frame of the position to be transformed (vPosition)transFrameId

Id of the destination frame

Example:(* transform the position (1,2,3,4) of frame 11 to frame 22 *)pos:= TRANSFORMVECTOR (1,2,3,4) 11 22;

See also:

TRANSFORMPOINT

void MOVEMS vPos rMotionSequenceID
Syntax:Function:

MOVEMS <vPos> <rMotionSequenceID>
This instruction causes the robot to move to the vPosition point by executing the
movements programmed in the nMotionID movement sequence beforehand.
NOTE:
The robot must be in the "idle" state to accept movement commands.

Parameters:

Example:vPos

vector representing the coordinates of the final target position.
in which frame??

nMSID

numerical value referencing the identifier of the movement sequence tobe performed.

(* perform a movement sequence *)desPos:= (0.02,0.012,0.02,0);MotionID:= 1;
MOVEMS desPos MotionID;

See also:

000.100.498

38/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void MOVETO vPos rFrameID rToolID rSpeedFactor rBlend rActionCode bRZtarget rRZspeedFactor
Syntax:MOVETO <vPos> <rFrameID> <rToolID> <rSpeedFactor> <rBlend> <rActionCode><bRZtarget> <rRZspeedFactor>

Function:

This instruction causes the robot to move to the vPos point in the nFrameID referencewith the nToolID tool.
NOTE:
The robot must be in the "idle" state to accept movement commands.

Parameters:

Example:vPos

vector representing the coordinates of the final target position.

rFrameIDnumerical value referencing the identifier for the frame in which tointerpret the vPos vector.

rToolID

numerical value of the identifier for the tool loaded on the robot.

rSpeedFactor

dynamic multiplication factor between 0 and 1.
𝑆𝑝𝑒𝑒𝑑𝑑𝑒𝑠𝑖𝑟𝑒𝑑 = 𝑆𝑝𝑒𝑒𝑑𝑚𝑎𝑥 ∗ 𝒏𝑺𝒑𝒆𝒆𝒅𝑭𝒂𝒄𝒕𝒐𝒓

rBlendOptional parameter.
Numerical value in metres [m] of the blend curve radius.

rActionCode

Optional parameter
Numerical value representing the IO code to be performed.

bRZtarget

Optional parameter. ! [Valid only for the robot type Desktop with ath
4 axis working with the "end to end" mode.]thBoolean value indicating if the 4 axis will be synchronized or notwith that movement final position.

rRZSpeedratio

Optional parameter. ! [Valid only for the robot type Desktop with ath
4 axis working with the "end to end" mode.]
Numerical value in the range [0..1] representing the dynamicth
traveling time factor for the 4 axis speed.
4thAxis travel time = MaxSpeedTime * rRZSpeedRatio.

(* perform a movement sequence *)Pick:= GETPOINT 5PickHeight:= Pick + (0,0,0.0001,0);
FrameID:= 3;
ToolID:= 1;
HighSpeed:= 0.7;
RZSynchro := True;
RzSpeed:= 0.8;
Vacuum:= 300.050;
MOVETO PickHeight FrameID ToolID HighSpeed;
MOVETO Pick FrameID ToolID HighSpeed 0 Vacuum;
MOVETO Pick FrameID ToolID HighSpeed 0 Vacuum RZSynchro RzSpeed;
MOVETO PickHeight FrameID ToolID HighSpeed;
See also:

000.100.498

39/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void SETPOINTPARAMS rPointID vPoint
Syntax:Function:
Parameters:

SETPOINTPARAMS <nPointID> <vPoint>
This instruction sets the coordinates for a point referenced by its nPointID identifier
at a specified value.
rPointID

numerical value referencing the identifier (ID) of the point for which thecoordinates are to be set.

vPointvector of coordinates to be set in point nPointID

Example:(* store the value of point1 in ID point n°1 *)point1:= (0.03,0.02,0.01,0);
pointID:= 1;
SETPOINTPARAMS pointID point1;

See also:

GETPOINT

void SETSLOWSPEED bSlowSpeed
Syntax:Function:
Parameters:

Example:SETSLOWSPEED <bSlowSpeed>This instruction enables the robot to be set at slow speed.
bSlowSpeedboolean indicating whether the robot should move at slow speed:- True: movement at slow speed- False: movement at programmed speed(* set the robot at slow speed *)SETSLOWSPEED true;

See also:

void SETSTATE rState
Syntax:Function:
Parameters:
Example:SETSTATE <rState>This instruction change the robot staterStatenumerical value indicating the desired state of the robot:0 for "off", 2 for"on" and 3 for "idle"(* initialise the robot *)state:=getstate;
IF state<3 ThenSETSTATE 0;
WHILE state<>0 DO
state:=getstate;
END_WHILESETSTATE 3;
state:=getstate;
WHILE state<>3 DO
state:=getstate;
END_WHILE
END_IF

See also:

000.100.498

GETSTATE

40/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void SLEEP rTime
Syntax:Function:
Parameters:
Example:SLEEP <rTime>
This instruction is used to pause the program being executed for a certain duration in
milliseconds [ms]rTimeNumerical value indicating a waiting time in [ms](*trigger output 0, 200 ms after movement has begun*)
MOVETO PickHeight FrameID ToolID HighSpeed NoBlend NoAction;
SLEEP 200;
DOUT 0 true;

See also:

WAITFORMOTIONEND

void STOP
Syntax:Function:
Parameters:
Example:STOP
This instruction enables any robot movement in progress to be stopped.
none(* stop the program according to the value of a variable*)
IF var=5 THEN
MOVETO Trash FrameID ToolID HighSpeed NoBlend PlaceAction;
STOP;
END_IF;

See also:

void WAITFORMOTIONEND
Syntax:Function:
Parameters:
Example:WAITFORMOTIONENDThis instruction is used to pause the execution of a task until all of the tasks inprogress have finished.
none(* wait one second between two movements *)MOVETO PickHeight FrameID ToolID HighSpeed NoBlend NoAction;
WaitForMotionEnd;
SLEEP 1000;
MOVETO Pick FrameID ToolID HighSpeed NoBlend Vacuum;

See also:

000.100.498

SLEEP

41/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd 'Robot' 'SetEnable value=<true|false> [timeout=<delay>] [settling=<delay>]'
Syntax:Function:

SetEnable value=<true|false> [timeout=<delay>] [settling=<delay>]
This instruction set the robot state to "IDLE" or "OFF".
This is meant to shorten the typical sequence of commands used to "initialize" therobot. It handles internally error clearing and timeout exception if the target state is
not reached after a certain limit of time.

Parameters:value

True = Clear error and block until state = "IDLE"
False = block until state = "OFF"timeout

Optional parameter that specifies the maximum delay allowed for thestate to be reached. Unit: [ms]. Default value = 6000[ms]Settling
Warning:
This is an advance optional parameter. Do not modify that value unlessspecified by Asyril.
Optional parameter that specify the "settling time" applying to statechange. This represent the minimum delay before a robot state isconsidered stable.
Unit: [ms]. Default value = 50[ms]Example:(* Set the robot state to IDLE *)ModuleCmd 'Robot' 'SetEnable value=true';

See also:

SETSTATE

000.100.498

42/68

Asyfeed module
Programming Guide
Instructions by module

7.1.

© Copyright Asyril S.A.
Version: C"Asyview" module instructions

The Asyview module is the component that manages the communication with the Asyril’s
vision system SmartSight. (Asyview is the software controller that runs on a SmartSight)
The commands detailed here after describe the syntax of a subset of the SmartSight
functions. These are the commands used in a typical pick and place application. For more
information see the “SmartSight programming manual”.

void ModuleCmd ‘AsyView‘ ‘<modulePath> START‘
Syntax:Function:
Parameters:
Example:<modulePath> START
This instruction starts the related module.
modulePath

Path of an Asyview module.

This instruction starts the first module of the first cell.
ModuleCmd 'Asyview' 'A[0]/C[0]/M[0] Start';

See also:

STOP

void ModuleCmd ‘AsyView‘ ‘<modulePath> SETPARAMETER name=WORKINGMODE
WorkingMode=<Wm>’
Syntax:Function:
Parameters:

Example:<modulePath> SetParameter WORKGINMODE workingMode=< active | passive >This instruction sets the working mode of a module
modulePath

Path of an Asyview module.

workingMode

Working mode keyword = "active" or "passive".

This instruction set the first module to the “active” working mode
ModuleCmd 'Asyview' 'A[0]/C[0]/M[0] SetParameter
name=WorkingMode WorkingMode=active';

See also:

FIELDOFVIEW

void ModuleCmd ‘AsyView‘ ‘<modulePath> STOP‘‘
Syntax:Function:
Parameters:
Example:<modulePath> STOPThis instruction stops the related module.
modulePath

Path of an Asyview module.

This instruction starts the first module of the first cell.
ModuleCmd 'Asyview' 'A[0]/C[0]/M[0] Stop';

See also:

000.100.498

START

43/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘AsyView‘ ‘<imgAcqPath> SETPARAMETER name=FIELDOFVIEW
imageConfigurationName=<ImgConfigNm> locked=<True|False>‘
Syntax:Function:<imgAcqPath> SETPARAMETER name=FIELDOFVIEWImageConfigurationName=<ImgConfigNm> locked=<True|False>
This instruction locks or unlocks the field of view (FieldOfView) of the vision system
When the field of view is locked, it prevents image acquisition. It is possible tolock/unlock the field of view of each device separately.

Parameters:

Example:imgAcqPath
ImgConfigNm

Path of an Asyview image acquisition manager.

lockedBoolean argument. “true” to lock. “false” to unlock.

This instruction locks the field of view for the image of the first module. This meansthat it will not be possible to acquire an image while the field of view remains locked.
ModuleCmd 'Asyview' 'A[0]/C[0]/M[0]/I[0] SetParameter
name=FieldOfView ImageConfigurationName=default Locked=true';

See also:

GETRESULT

vector ModuleCmd ‘AsyView‘ ‘<modulePath> GETRESULT ModelName=<modelID>‘
Syntax:Function:<modulePath> GETRESULT ModelName=<modelID>
This instruction triggers a position search on a particular module. The response isinstantaneous if a position is already available. Otherwise, the instruction blocks until
a position is found.

Parameters:

Feedback:

modulePath(modelID)

Path of an Asyview module.
Optional: Identifier of the part model (it comes from the teachinginterface).
Note: modelId needs to be a number.

This function returns a vector of six coordinates: For compatibility reason with theprevious versions, some vector coordinate may be set to zero.
(posX, posY, 0, posTheta, modelID, positionID)

Example:A position search is requested on the first module. When a position is available, thevector of six coordinates corresponding to it is stored in the "pickPos" variable
pickPos:= ModuleCmd 'Asyview' 'A[0]/C[0]/M[0] GetResult';
pickPos:= ModuleCmd 'Asyview' 'A[0]/C[0]/M[0] GetResult
ModelName=3';

See also:

000.100.498

REMOVERESULT

44/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘AsyView‘ ‘REMOVERESULT NextModelName=<modelID>’ vPosition
Syntax:Function:

REMOVERESULT NextModelName=<modelID> <vPosition>
Requires one particular position to be removed from the Asyview's position buffer.
The position to be removed must be given by a variable containing a vector returnedby the GetResult instruction.

Parameters:(modelID)

Optional: Identifier of the part model (it comes from the teachinginterface).

vPosition

Vector with six coordinates returned by the "getResult" command(posX, posY, 0, posTheta, modelID, positionID)
There is no need to specify a module path because it isembedded into the position vector returned by the getResultcommand. That path and the positionID are enough tounequivocally determine which position must be removed fromthe buffer.

Example:This instruction removes the "pickPos" vector from the position buffer.
ModuleCmd 'Asyview' 'RemoveResult' pickPos;
ModuleCmd 'Asyview' 'RemoveResult NextModelName=3' pickPos;

See also:

GETRESULT

void ModuleCmd ‘AsyView‘ ‘<imgAcqPath> ACQUIRE‘
Syntax:Function:
Parameters:
Example:<imgAcqPath> ACQUIRETriggers the camera to order an image capture
imgAcqPath

Path of the image acquisition manager

This instruction triggers an image acquisition on the first module
ModuleCmd 'AsyView' 'A[0]/C[0]/M[0]/I[0] Acquire';

See also:

000.100.498

PROCESSMANAGERSTATE

45/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

String ModuleCmd ‘AsyView‘ ‘<modulePath> GETPARAMETER name=PROCESSMANAGERSTATEmodelName=<modelID>‘
Syntax:Function:
Parameters:

Feedback:<modulePath> GETPARAMETER name=PROCESSMANAGERSTATEmodelName=<PartId>
This instruction reads the state of the process manager
modulePath

Path of an asyview module.

modelID

Identifier of the part model (it comes from the teaching interface).

The state keyword of the process manager as a string:
The list of possible keyword is listed here after. See the SmartSight documentation
for the signification of each state.
"Unknown", "Error","Unconfigured","IDLE","Starting","Running""Aborting","Stopping","Stopped","Resetting","Loading","Saving""Calibrating","Teaching","Configuring","Mixed","Reading","Writing","Clearing","Acquiring","NotDefined","Preparing","OpeningTeaching","ClosingTeaching"

Example:This series of instructions is used to acquire an image and to wait until the image has
been analysed before continuing the rest of the program
ModuleCmd 'AsyView' 'A[0]/C[0]/M[0]/I[0] Acquire';processMgmtState:= 'running';
WHILE processMgmtState = 'running' DO
processMgmtState:= ModuleCmd 'Asyview' 'A[0]/C[0]/M[0]GetParameter name=ProcessManagerState modelName=3';
Sleep 100;
END_WHILE

See also:

000.100.498

ACQUIRE

46/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: Creal ModuleCmd ‘AsyView‘ ‘ <modulePath> GETPARAMETER name=AVAILABLERESULTS
imageConfigurationName=<ImgConfigNm>’
Syntax:Function:<modulePath> GETPARAMETER name=AVAILABLERESULTS
imageConfigurationName=<ImgConfigNm>
This instruction counts the number of positions available (i.e. the parts accepted andnot yet deleted) in the buffer of the device requested.

Parameters:

modulePath

Path of an Asyview module.

ImgConfigNm

Identifier of the image configuration.

Feedback:

Number of positions still available in the buffer

Example:This program example is used to perform a specific series of instructions if only one
position remains in the buffer.
PositionNbr:=ModuleCmd 'AsyView''A[0]/C[0]/M[0] GetParameter
name=AvailableResults imageConfigurationName=Default';
IF PositionNbr=1 THEN(* … *)
END_IF

See also:

ACQUIREobj ModuleCmd ‘AsyView‘ ‘ <modulePath> GETPARAMETER name=<parameterName>’ resultName
Syntax:Function:
Parameters:<modulePath> GETPARAMETER name=<parameterName> resultName
This generic instruction can be used to get the return value of any parameter.
modulePath

Path of an Asyview module.

parameterName

Name of the requested parameter.

resultName

Name of the String to look for in the response.

Feedback:

Result value (it can be a String, a vector, a number, etc.).

Example:This instruction asks for the quantity of parts on the feeder (feeding information).
quantity:=ModuleCmd 'AsyView' 'A[0]/C[0]/M[0] GetParameter
name=PartsOnFeeder' 'PartsOnFeeder';See also:

000.100.498

other GETPARAMETER commands

47/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘AsyView‘ ‘<modulePath> UNCALIBRATE imageConfigurationName=<ImgConfigNm>’
Syntax:<modulePath> UNCALIBRATE imageConfigurationName=<ImgConfigNm>

Function:

This command reset the coordinate transformation associated with the current
calibration. It sets an identity transformation.

Parameters:

Example:modulePath

Path of an asyview module.

ImgConfigNm

Identifier of the image configuration.

This command resets the calibration data of the first module
ModuleCmd 'asyview' 'A[0]/C[0]/M[0] Uncalibrate
imageConfigurationName=Default';

See also:

000.100.498

ADDPOINTPAIR

48/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘AsyView‘ ‘<modulePath> ADDPOINTPAIR imageConfigurationName=<ImgConfigNm>‘
vPosition rPosition
Syntax:Function:<modulePath> ADDPOINTPAIR imageConfigurationName=<ImgConfigNm><vPosition> <rPosition>
This instruction sets the correspondence between a vision and a robot position for
calibration purpose.

Parameters:

modulePath

Path of an asyview module.

ImgConfigNm

Identifier of the image configuration.

vPosition

Vision position as a vector of at least 2 dimension(VisXPos, VisYPos, … )rPosition

Robot position as a vector of at least 2 dimensions(RobotXPos, RobotYPos, … )Example:This sequence of instructions firstly reads the current vision result and then set thecorrespondence with the robot position = (1.0,1.0,0.0,0.0)
VisionPos := ModuleCmd 'AsyView' 'A[0]/C[0]/M[0] GetResult';
ModuleCmd 'AsyView' A[0]/C[0]/M[0] AddPointPair
imageConfigurationName=Default' VisionPos (1.0,1.0,0.0,0.0);

See also:

000.100.498

CALIBRATE

49/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘AsyView‘ ‘<modulePath> CALIBRATE imageConfigurationName=<ImgConfigNm>‘
Syntax:Function:<modulePath> CALIBRATE imageConfigurationName=<ImgConfigNm>
This command calibrates by computing the coordinate transformation associatedwith the current calibration data.

Parameters:

Example:modulePath

Path of an asyview module.

ImgConfigNm

Identifier of the image configuration.

This command initiates a calibration process on the first module
ModuleCmd 'asyview' 'A[0]/C[0]/M[0] Calibrate
imageConfigurationName=Default';

See also:

SAVECALIBRATION

void ModuleCmd ‘AsyView‘ ‘<modulePath> SAVECALIBRATION
imageConfigurationName=<ImgConfigNm>‘
Syntax:Function:
Parameters:

Example:<modulePath> SAVECALIBRATION imageConfigurationName=<ImgConfigNm>
This command save the calibration data into the disk
modulePath

Path of an asyview module.

ImgConfigNm

Identifier of the image configuration.

This command saves the calibration data of the first module
ModuleCmd 'asyview' 'A[0]/C[0]/M[0] SaveCalibration
imageConfigurationName=Default';

See also:

CALIBRATE

void ModuleCmd ‘AsyView‘ ‘<modulePath> <FUNCTION> arguments‘
Syntax:Function:
Parameters:

Example:<modulePath> <FUNCTION> <arguments>
This generic command can be used to send almost any instruction to the Asyview
modulePath
FUNCTION

Path of an asyview module.
Generic Asyview instruction (refer to the specific documentation).

arguments

Generic optional arguments of the function.

This command saves the latest images in BMP format in the D:\AsyrilData folder
ModuleCmd 'asyview' 'A[0] SaveLatestImages
folderpath=D&#58\AsyrilData:format=BMP';

000.100.498

50/68

Asyfeed module
Programming Guide
Instructions by module

7.2.

© Copyright Asyril S.A.
Version: C

I/O extension module instructions

The I/O extension module is an optional item that helps integrating the Asyfeed Module into amachine by increasing the number of digital I/O and having the possibility to use analog I/O.
Inside the operating manual and inside the electrical diagram given with the module, more
information can be found on how to interface the module and how to wire it.

Figure 7-6 – Example of I/O Extension module
Each I/O terminal has an identifier given by the electrical diagram. For each type of terminal,
the first two digits will give the type and the last two are incremental for each terminal of agiven type.
In order to be able to communicate with the system, the name of the contact must be given.
The string identifying the contact of one terminal will start with 200AH, then add the terminal
identifier and finish with _XX1 where XX will be DI, DO, AI or AO depending of the type of theterminal and the number will be the position of the contact inside the terminal, see Figure 7-7
and the table below for examples.

Table 2 - Example of IO name for ARL

000.100.498

Terminal Type

Label on I/O extension module

IO name for ARL

8DI PNP

200AH1201 Input N°1

200AH1201_DI1

8DO PNP

200AH5201 Output N°8

200AH5201_DO8

2AI 4-20mA

200AH2201 Input n°1

200AH2201_AI1

2AO 4-20mA

200AH6201 Output n°2

200AH2201_AO2

51/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

Position of thecontact

Type of I/O

Terminal Identifier

Terminal Name

IO module Name

200AH5201_DO1

Figure 7-7 - Representation of the contact 200AH5201_DO1

7.2.1. Digital I/Obool ModuleCmd ‘iomodule‘ ‘cmd=READ name=sDigitalInput‘
Syntax:Function:<cmd=READ> <name = sDigitalInput>
This instruction reads and sends the state of a digital input identified by its
sDigitalInput name.
NOTE:
The same command also enables the state of a digital input to be read.

Parameters:sDigitalInput

character string identifying the name of the digital input.

Feedback:

boolean corresponding to the state of the input at the time of interrogation.

Example:This instruction reads the state of the door sensor digital input which is wired to the
input 1 of the card 1201 :DoorsOpen:= ModuleCmd 'IOMODULE' 'cmd=Read name=200AH1201_DI1;

See also:

000.100.498

WRITE

52/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘iomodule‘ ‘cmd=WRITE name= sDigitalOutput value=bValue‘
Syntax:Function:<cmd=WRITE> <name= sDigitalOutput> <value= bValue>
This instruction sets the state of a digital output identified by its sDigitalOutput nameat a chosen bValue value.

Parameters:

Example:sDigitalOutput

character string identifying the name of the digital output.

bValueboolean corresponding to the desired state of the output.

If we want to enable and disable the ionizer which is wired to the output 8 of the card
5201 :(* enable the ionizer *)ModuleCmd 'IOMODULE' 'cmd=Write name=200AH5201_DO8 value=true;(* disable the ionizer *)ModuleCmd 'IOMODULE' 'cmd=Write name=200AH5201_DO8 value=false;

See also:

READ

7.2.2. Analog I/O
The commands used for the analog I/O are the same as the ones for the digital, but the typeof the data will differ.
real ModuleCmd ‘iomodule‘ ‘cmd=READ name=sAnalogInput‘
Syntax:Function:<cmd=READ> <name = sAnalogInput >This instruction reads and sends the state of an analog input identified by its
sAnalogInput name.
NOTE:
The same command also enables the state of an analog input to be read.

Parameters:
Feedback:sAnalogInput

character string identifying the name of the analog input.

Real number corresponding to the state of the input at the time of interrogation.
This number is given in raw value and must be converted into interpretable value by
using the following formula :𝑟𝑎𝑤𝑣𝑎𝑙𝑢𝑒∗ 𝑟𝑎𝑛𝑔𝑒 + 𝑜𝑓𝑓𝑠𝑒𝑡
215

Example:This instruction reads the state of the analog pressure sensor connected to the input
1 of the card 2201 (2AI 4-20mA) :(* Get the raw value from sensor*)
sensor_raw:= ModuleCmd 'IOMODULE' 'cmd=Read name=200AH2201_AI1;(* Convert this value into mA*)
sensor_mA:= (PSensor/32768)*16+4;

See also:
000.100.498

WRITE
53/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘iomodule‘ ‘cmd=WRITE name= sAnalogOutput value=bValue‘
Syntax:Function:<cmd=WRITE> <name= sAnalogOutput > <value= bValue>
This instruction sets the state of an analog output identified by its sAnalogOutput
name at a chosen bValue value.

Parameters:

Example:sAnalogOutput

character string identifying the name of the analog output.

bValuereal number corresponding to the desired state of the output.
The value is given in mA or V depending on the type of the output

If we want to inject 10.4mA to a device connected to the output 2 of the card 6201
(2AO 4-20mA) :ModuleCmd 'IOMODULE' 'cmd=Write name=200AH6201_AO2 value=10.4;

See also:

000.100.498

READ

54/68

Asyfeed module
Programming Guide
Instructions by module

7.3.

© Copyright Asyril S.A.
Version: C

Turning table module instructions

void ModuleCmd ‘TurningTable‘ ‘cmd=STARTHOMING blocking=bBlock homingOffset=rAngle‘
Syntax:<cmd=STARTHOMING> <blocking= bBlock> <homingOffset= rAngle>

Function:

This instruction launches an initialisation sequence for the turning table.

Parameters:

bBlockoptional boolean type argument, defining whether the execution of therest of the ARL program should be blocked during the initialisation phaseof the table or not.

rAngleoptional number type argument, defining the offset applied in degrees
after the reference is found
NOTE:
If this argument is used, the offset value chosen replaces anyother value defined in a machine configuration file. (*.arc file)

Example:The example below launches an initialisation sequence for the turning table bypreventing execution of the ARL program from continuing until the initialisation
sequence is complete.
ModuleCmd 'TurningTable' 'cmd=startHoming blocking=false';

See also:

GETHOMINGSTATUS; MOVE

bool ModuleCmd ‘TurningTable‘ ‘cmd=GETHOMINGSTATUS‘
Syntax:<cmd= GETHOMINGSTATUS>

Function:

This instruction is sent to establish the initialisation state of the turning table.

Return value:boolean corresponding to the initialisation state at the time of interrogation:

Example:-True: "homing" is complete.

-False: "homing" has begun, but is not yet complete.

The example below loops until the homing is done:
Status:=false;
WHILE hoStatus = FALSE DO
Status:=ModuleCmd 'TurningTable''cmd=getHomingStatus';
Dbg 'homing loop...';
END_WHILE

See also:

000.100.498

STARTHOMING; MOVE

55/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C<height> ModuleCmd ‘TurningTable‘ ‘cmd=READHEIGHTSENSOR‘
Syntax:Function:
Return value:<cmd= READHEIGHTSENSOR>This instruction is sent to the height measurement sensor.
value in millimetres of the height read by the sensor. (the zero is defined by the
RESETHEIGHTSENSOR command)

Example:The example below reads the value of the height sensor:
H1:= 0.0;
H1:= ModuleCmd 'TurningTable' 'cmd=ReadHeightSensor';IF H1 > 0.5 THEN(* do what you want *)END_IF

See also:

READHEIGHTSENSORSTATE ; RESETHEIGHTSENSOR

void ModuleCmd ‘TurningTable‘ ‘cmd=ENABLEHEIGHTSENSOR value=bEnable'
Syntax:Function:
Parameters:
Example:<cmd= ENABLEHEIGHTSENSOR>This instruction turn on or off the laser beam of the height sensor.
rEnableboolean value defining if the laser beam should be active or not.

The example below turns off the height sensor laser beam.
ModuleCmd 'TurningTable' 'cmd=EnableHeightSensor value=false;

See also:

READHEIGHTSENSOR<state> ModuleCmd ‘TurningTable‘ ‘cmd= READHEIGHTSENSORSTATE‘
Syntax:Function:
Return value:

Example:<cmd= READHEIGHTSENSORSTATE>This instruction is sent to establish the state of the height sensor.
Integer between 0, 1, 2 and 3 corresponding to the state of the sensor:
Ref

State

0

Sensor faulty

1Normal operation2

Sensor below lower level (the value is below theminimum value)

3

Sensor exceeds upper level (the value is above themaximum value)

The example below reads the state of the sensor:
State:=ModuleCmd'TurningTable''cmd=ReadHeightSensorState';

See also:

000.100.498

READHEIGHTSENSOR

56/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: Cbool ModuleCmd ‘TurningTable‘ ‘cmd= RESETHEIGHTSENSOR‘
Syntax:Function:<cmd= RESETHEIGHTSENSOR>This instruction resets the height sensor in the current state to zero.
The values subsequently measured using command READHEIGHTSENSOR will be
the heights relative to this zero.

Return value:
Example:none
The example below resets the sensor.
ModuleCmd 'TurningTable''cmd=ResetHeightSensor ';See also:

READHEIGHTSENSOR

void ModuleCmd ‘TurningTable‘ ‘cmd=MOVE value=rAngle | sectorNo=iSectorNo‘
Syntax:Function:
Parameters:<cmd= MOVE> <value= rAngle>
This instruction causes the turning table to pivot by a given angle in degrees.
rAnglenumerical value defining the relative angle of rotation desired.
The value is interpreted differently depending of the table type.
Table of type "indexed" (stepper motor and mechanical index)
The angle is given as a set point to the stepper motor controller.
Table of type "servo" (servo motor workgin with absolute positioning)
The angle is translated (rounded) into an absolute sector number andadded to the current sector value.
The move will always be an integer multiple of the angle between two
sectors.

iSectorNo

Apply only for the turning table of type "servo".
Integer value representing an absolute move to the given sector.
The keyword "current" can be use instead of a numerical value to moveto the current sector. (when the table was move manually for ex.)

Example:The example below rotates the table by 45°:
ModuleCmd 'TurningTable' 'cmd=Move value=45.0';
The example below make an absolute move to the sector no=5.
ModuleCmd 'TurningTable' 'cmd=Move sectorNo=5';
The example below make an absolute move to the current sector
ModuleCmd 'TurningTable' 'cmd=Move sectorNo=Current';

See also:

000.100.498

GETCURRENTSECTORNO

57/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C

void ModuleCmd ‘TurningTable‘ ‘cmd=STOP'
Syntax:Function:
Parameters:
Example:<cmd= STOP>This instruction causes the turning table to stop the current movement.
None
The example below stop the current movement
ModuleCmd 'TurningTable' 'cmd=Stop';

See also:

MOVEbool ModuleCmd ‘TurningTable‘ ‘cmd= READERRORCODE‘
Syntax:Function:<cmd= READERRORCODE>! Apply only to the table of type "servo"
This instruction is sent to the wago module and, where applicable, returns a specificerror code.
NOTE:
for more information about the meaning of these error codes, please refer tothe Wago documentation.

Return value:
Example:four-digit integer corresponding to a Wago error.
The example below creates a line in the console during the initialisation phase:
ErrorCode:= ModuleCmd 'TurningTable' 'cmd=ReadErrorCode ';See also:

void ModuleCmd ‘TurningTable‘ ‘cmd=ENABLE value=bSTATE'
Syntax:Function:<cmd= ENABLE>! Apply only to the table of type "servo"
This instruction turns on or off the position control of the table.

Parameters:

bStateBoolean value representing the control state
True: Turn the control on
False: Turn the control off.

Example:The example below turns the control on
ModuleCmd 'TurningTable' 'cmd=Enable value=true';

See also:

000.100.498

MOVE

58/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: Cbool ModuleCmd ‘TurningTable‘ ‘cmd= GETCURRENTSECTORNO‘
Syntax:Function:<cmd= GETCURRENTSECTORNO>! Apply only to the table of type "servo"
Return the current sector no.

Parameter
Return value:

None
The current sector number. Range from [0…<SectorNbr>]<SectorNbr> The total number of sectors is a configuration setting that must matchthe actual mechanical design of the table. Due to I/O limitation the maximum
manageable sector number is 16.

Example:The example below
CurSecNo:= ModuleCmd 'TurningTable' 'cmd=GetCurrentSectorNo';

See also:

000.100.498

MOVE

59/68

Asyfeed module
Programming Guide
Instructions by module

7.4.

© Copyright Asyril S.A.
Version: C

MATH module instruction<ret> ModuleCmd ‘MATH‘ ‘cmd=CIRCLECENTER func=<FunctionCode>‘ bSTATE'
Syntax:Function:<cmd=CIRLCECENTER> <func=FunctionCode>This instruction is used to calculate the centre of a circle passing through three points.
The centre calculated will be in the plane passing through the three points.
The instruction is used to accumulate the points (vector) into a "collection" in the memory tofacilitate future calculations.
p1
center
p3
p2
y

z

x

NOTE:
The calculation only takes into account the first three points of that collection.
The additional points are ignored.
Parameters:functionCode

Return value:

Depends on the function code

Example:Function code. May take the following values:
1) "clearPoints" – Reset the collection of points in the memory.
2) "addPoint" – Add a point to the collection.
3) "computeCenter" – Calculate the centre taking into account the first 3
collection points

Function code

Type of returnclearPoints<void>

addPoint<void>

computeCenter<vector>Complete example of calculating the centre of a circle
center:= (0,0,0,0);
p1:= (1,2,3,4); p2:= (5,6,7,8); p3:= (9,10,11,12);
ModuleCmd 'MATH' 'cmd=CIRCLECENTER func=clearpoints';
ModuleCmd 'MATH' 'cmd=CIRCLECENTER func=addPoint' p1;
ModuleCmd 'MATH' 'cmd=CIRCLECENTER func=addPoint' p2;
ModuleCmd 'MATH' 'cmd=CIRCLECENTER func=addPoint' p3;
center:= ModuleCmd 'MATH' 'cmd=CIRCLECENTER func=computeCenter';

See also:

000.100.498

LINEINTERSECT

60/68

Asyfeed module
Programming Guide
Instructions by module© Copyright Asyril S.A.
Version: C<ret> ModuleCmd ‘MATH‘ ‘cmd=LINEINTERSECT func=<FunctionCode>‘
Syntax:Function:<cmd=LINEINTERSECT> <func=FunctionCode>This instruction is used to calculate the point of intersection of two straight lines defined byfour points. The calculation is performed in two dimensions along the x-y plane
The instruction is used to accumulate the points (vector) into a "collection" in the memory tofacilitate future calculations.

p1

p4

y
z

p3

Intersection

p2

x

NOTE:
The calculation only takes into account the first four points of that collection.
The additional points are ignored.
Parameters:functionCode

Return value:

Depends on the function code

Example:Function code. May take the following values:
1) "clearPoints" – Reset the collection of points in the memory.
2) "addPoint" – Add a point to the collection.
3) "computeIntersect" – Calculation of the intersection taking into accountthe first 4 points

Function code

Type of returnclearPoints<void>

addPoint<void>

computeCenter<vector>Complete example of calculating the centre of a circle
intersect:= (0,0,0,0);
p1:= (1,2,3,4); p2:= (5,6,7,8); p3:= (9,10,11,12);
ModuleCmd 'MATH' 'cmd=LINEINTERSECT func=clearpoints';
ModuleCmd 'MATH' 'cmd=LINEINTERSECT func=addPoint' p1;
ModuleCmd 'MATH' 'cmd=LINEINTERSECT func=addPoint' p2;
ModuleCmd 'MATH' 'cmd=LINEINTERSECT func=addPoint' p3;
intersect:= ModuleCmd 'MATH' 'cmd=LINEINTERSECT
func=computeIntersect';

See also:

000.100.498

CIRCLECENTER

61/68

Asyfeed module
Programming Guide
Technical Support© Copyright Asyril S.A.
Version: C

8. Technical Support
8.1.1. For a better service …
Have you read the FAQ and the check-list and still not found an answer your questions?
Before contacting us, please note down the following information concerning your product:-

Serial number and product key for your equipment-

Software version(s) used-

Error message, alarm, or visual signals displayed by the interface.

8.1.2. Contact
You can find extensive information on our website: www.asyril.com
You can also contact our Customer Service department:
support@asyril.com+41 26 653 7190

000.100.498

62/68

Asyfeed module
Programming Guide
Alphabetical index© Copyright Asyril S.A.
Version: C

Alphabetical index

A

G

ACQUIRE ............................. 45

GETCURRENTSECTORNO . 59

ADDPOINTPAIR .................. 49

GETFRAMEPARAMS ........... 33

ALARMMESSAGE ............... 32

GETFRAMEPARAMSNUMBER

AND ...................................... 13.......................................... 34

ARITHMETIC ADDITION . 7, 10

GETHOMINGSTATUS ......... 55

ARITHMETIC SUBTRACTIONGETNEXTFRAMEPARAMSIN..................................... 7, 11

DEX .................................. 34

ASSIGNATION....................... 9

GETPOINT ........................... 35

AVAILABLERESULTS ........ 47

GETPOSITION ..................... 35
GETRESULT ........................ 44

C

GETSTATE ........................... 36
GETTIME .............................. 35

N
NEGATION ............................ 9O
OR........................................ 13P
POWER ................................. 9
PROCESSMANAGERSTATE......................................... 46

R

CALIBRATE ......................... 50

GREATER THAN ................. 11

CIRCLECENTER ................. 60

GREATER THAN OR EQUALCOMMENT ........................... 14

READ ............................. 52, 53

TO ..................................... 12

READERRORCODE............ 58

COMPLEMENT ...................... 9
CONCATENATION .............. 10D
DIFFERENT ......................... 12H
HOLDIFREQUESTED .......... 37

I

DIN ....................................... 32
DIVISION .............................. 10

IF 14

DOUT ................................... 32

E

L

READHEIGHTSENSOR ...... 56
READHEIGHTSENSORSTATE......................................... 56
REMOVERESULT ............... 45
REPEAT .............................. 16
RESETHEIGHTSENSOR .... 57

S
SAVECALIBRATION ........... 50

LESS THAN ......................... 11

SAVEFRAME ...................... 37

ENABLE ............................... 58

LESS THAN OR EQUAL TO 11

SETENABLE ....................... 42

ENABLEHEIGHTSENSOR .. 56

LINEINTERSECT ................. 61

SETFRAMEPARAMS .......... 33

EQUAL TO ........................... 12

LOADDATA .......................... 37

SETFRAMEPARAMSINDEX 34
SETPOINTPARAMS............ 40

EXCLUSIVE OR ................... 13
EXIT ..................................... 17

M

SETSLOWSPEED ............... 40
SETSTATE .......................... 40

F

MODULO .............................. 10

SLEEP ................................. 41

MOVE ................................... 57

START ................................. 43

FIELDOFVIEW ..................... 44

MOVEMS .............................. 38

STARTHOMING .................. 55

FOR ...................................... 15

MOVETO .............................. 39

STOP ................................... 43

MULTIPLICATION................ 10

STOP ................................... 41
STOP ................................... 58000.100.498

63/68

Asyfeed module
Programming Guide
Alphabetical index
SWITCH ............................... 15

T
TRANSFORMPOINT ............ 38

Version: CU
UNCALIBRATE .................... 48

V

TRANSFORMVECTOR ........ 38

VECTOR SUBTRACTION ... 11W
WAITFORMOTIONEND ...... 41
WHILE ................................. 16

VECTOR ADDITION......... 7, 10000.100.498© Copyright Asyril S.A.

WRITE ........................... 53, 54

64/68

Asyfeed module
Programming Guide
Thematic index© Copyright Asyril S.A.
Version: C

Thematic index
OPERATORSADDITION ARITHMETIQUE...................................... 7
ADDITION VECTORIELLE ........................................ 7

ROBOT

SOUSTRACTION ARITHMETIQUE ......................... 7
ASSIGNATION ............................................................ 9
PUISSANCE................................................................. 9
NEGATION ................................................................... 9
COMPLEMENT ........................................................... 9
MULTIPLICATION ..................................................... 10
DIVISION .................................................................... 10
MODULO .................................................................... 10
ADDITION ARITHMETIQUE.................................... 10
ADDITION VECTORIELLE ...................................... 10
CONCATENATION ................................................... 10
SOUSTRACTION ARITHMETIQUE ....................... 11
SOUSTRACTION VECTORIELLE .......................... 11
INFERIEUR ................................................................ 11
SUPERIEUR .............................................................. 11
INFERIEUR OU EGAL ............................................. 11
SUPERIEUR OU EGAL ............................................ 12
DIFFERENT ............................................................... 12
EGALITE ..................................................................... 12
ET ................................................................................ 13
OU ............................................................................... 13
OU EXCLUSIF ........................................................... 13

ALARMMESSAGE.................................................... 32
DIN .............................................................................. 32
DOUT ......................................................................... 32
GETFRAMEPARAMS .............................................. 33
SETFRAMEPARAMS .............................................. 33
GETFRAMEPARAMSNUMBER ............................. 34
GETNEXTFRAMEPARAMSINDEX ....................... 34
SETFRAMEPARAMSINDEX .................................. 34
GETPOINT ................................................................ 35
GETPOSITION .......................................................... 35
GETTIME ................................................................... 35
GETSTATE ................................................................ 36
HOLDIFREQUESTED .............................................. 37
LOADDATA ............................................................... 37
SAVEFRAME ............................................................ 37
TRANSFORMPOINT................................................ 38
TRANSFORMVECTOR ........................................... 38
MOVEMS ................................................................... 38
MOVETO.................................................................... 39
SETPOINTPARAMS ................................................ 40
SETSLOWSPEED .................................................... 40
SETSTATE ................................................................ 40
SLEEP ........................................................................ 41

LOOPS

STOP .......................................................................... 41
WAITFORMOTIONEND .......................................... 41

COMMENTAIRE ........................................................ 14

SETENABLE ............................................................. 42

IF .................................................................................. 14
SWITCH ...................................................................... 15
FOR ............................................................................. 15
WHILE ......................................................................... 16
REPEAT...................................................................... 16
EXIT............................................................................. 17000.100.498

65/68

Asyfeed module
Programming Guide
Thematic index© Copyright Asyril S.A.
Version: CASYVIEWWRITE ........................................................................ 54

START ........................................................................ 43

TURNINGTABLE

STOP........................................................................... 43
FIELDOFVIEW ........................................................... 44
GETRESULT .............................................................. 44

STARTHOMING ....................................................... 55
GETHOMINGSTATUS ............................................. 55

REMOVERESULT ..................................................... 45

READHEIGHTSENSOR .......................................... 56

ACQUIRE ................................................................... 45

ENABLEHEIGHTSENSOR ..................................... 56

PROCESSMANAGERSTATE ................................. 46

READHEIGHTSENSORSTATE ............................. 56

AVAILABLERESULTS .............................................. 47

RESETHEIGHTSENSOR ........................................ 57

AVAILABLERESULTS .............................................. 47

MOVE ......................................................................... 57

UNCALIBRATE .......................................................... 48

STOP .......................................................................... 58

ADDPOINTPAIR ........................................................ 49

READERRORCODE ..................................................... 58

CALIBRATE ............................................................... 50

ENABLE ..................................................................... 58

SAVECALIBRATION ................................................ 50

GETCURRENTSECTORNO ................................... 59

SAVECALIBRATION ................................................ 50

IOWAGO

MATH module instructions

READ .......................................................................... 52

CIRCLECENTER ...................................................... 60

WRITE......................................................................... 53

LINEINTERSECT ..................................................... 61

READ .......................................................................... 53000.100.498

66/68

Asyfeed module
Programming Guide
Revision table© Copyright Asyril S.A.
Version: C

Revision table
Rev.

Date

AuthorComments

A

31.07.2012

SiA

Initial version

A2

03.12.2012

ZuM

Addition of information related to the mesh frame, maths module andvarious other modifications

A3

13.02.2013

ZuM

Addition of the type 7xx.xxx action code

A4

26.01.2015

ZuM

Addition according to the software updates.
New IODevice of type "Cylinder" and update of the MoveTo documentingth

the new 4 axis related arguments.
B

25.06.2015

ZuM

Adding the complete new set of Asyview module commands to match thechanges brought by the Asyview since version 3 (Asyview V3)
Adding the new "setEnable" robot command.

B1

25.08.2016

DaM

Documentation and product name update

B2

03.02.2017

BeJ

Modification of §7.2 relating to the I/O extension moduleC

13.02.2018

PeD

Modification of the Asyview module commands for the Asyview V4. It
requires the robot ≥V4.6.0.

000.100.498

67/68

Asyfeed module
Programming Guide
Revision table© Copyright Asyril S.A.
Version: C

This document is the property of Asyril S.A.; it may not be reproduced, modified or communicated, inwhole or in part, without our prior written authorisation. Asyril S.A. reserves the right to modify any
information contained in this document for reasons related to product improvements without priornotice.

Asyril SA
Z.I. le Vivier 22
Ch-1690 Villaz-St-Pierre
Switzerland
Tel. +41 26 653 71 90
Fax +41 26 653 71 91
info@asyril.com
www.asyril.com

000.100.498

68/68