PDL2 Language Programming Manual PDF
PDL2 Language Programming Manual PDF
PDL2 Language Programming Manual PDF
Comau Robotics
Instruction Handbook
PDL2
Programming Language Manual
System Software Rel. 3.1x
CR00757508_en-01/0208
The information contained in this manual is the property of COMAU S.p.A.
Reproduction of text and illustrations is not permitted without prior written approval by COMAU S.p.A.
COMAU S.p.A. reserves the right to alter product specifications at any time without notice or obligation.
PREFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .XXVII
Symbols used in the manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXVII
Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXVIII
Modification History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXIX
lb-0-0-pdlTOC.fm
I
XTNDPOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11
NODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11
PATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12
SEMAPHORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13
Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13
CONSTANT declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13
TYPE declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14
VARIABLE declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.16
Shared types, variables and routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.18
EXPORTED FROM clause. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.18
GLOBAL attribute and IMPORT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.19
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.20
Arithmetic Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.21
Relational Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.22
Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.22
Bitwise Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.23
VECTOR Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.24
POSITION Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.24
Data Type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.25
Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.25
Assignment Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.26
Typecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.26
lb-0-0-pdlTOC.fm
II
WITH Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.18
Continuous Motion (MOVEFLY). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.20
Stopping and Restarting motions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.20
CANCEL MOTION Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.20
LOCK, UNLOCK, and RESUME Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.21
SIGNAL SEGMENT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.22
HOLD Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.22
ATTACH and DETACH Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.22
HAND Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.23
lb-0-0-pdlTOC.fm
III
SELECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4
FOR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5
WHILE Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.7
REPEAT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8
GOTO Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8
Program Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.9
PROG_STATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.11
ACTIVATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.11
PAUSE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.11
UNPAUSE Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.12
DEACTIVATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.12
CYCLE and EXIT CYCLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.13
DELAY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.13
WAIT FOR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.14
BYPASS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.14
Program Synchronization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.14
Program Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.16
7. ROUTINES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7.1
Procedures and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2
Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3
Declaring a Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4
Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4
Parameter List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4
Constant and Variable Declarations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5
Stack Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6
Function Return Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6
Functions as procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6
RETURN Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6
Shared Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7
Passing Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.8
Passing By Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.8
Passing By Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.8
Optional parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.9
Variable arguments (Varargs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.10
Argument identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.10
lb-0-0-pdlTOC.fm
IV
Variable References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5
Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5
RELATIONAL States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6
BOOLEAN State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6
DIGITAL PORT States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7
DIGITAL PORT Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7
SYSTEM Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.8
USER Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.11
ERROR Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.12
PROGRAM Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.13
Event on Cancellation of a Suspendable Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.13
MOTION Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.15
Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.17
ASSIGNMENT Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.17
INCREMENT and DECREMENT Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.17
BUILT-IN Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.18
SEMAPHORE Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.18
MOTION and ARM Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.18
ALARM Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.19
PROGRAM Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.19
CONDITION HANDLER Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.19
DETACH Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.20
PULSE Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.20
HOLD Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.20
SIGNAL EVENT Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.20
ROUTINE CALL Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.20
Execution Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.21
lb-0-0-pdlTOC.fm
V
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1
ACTIVATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2
ATTACH Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3
BEGIN Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.5
BYPASS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.5
CALLS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6
CANCEL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.7
CLOSE FILE Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.8
CLOSE HAND Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.9
CONDITION Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.9
CONST Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.10
CYCLE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.11
DEACTIVATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.12
DECODE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.13
DELAY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.14
DETACH Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.14
DISABLE CONDITION Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.15
DISABLE INTERRUPT Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.16
ENABLE CONDITION Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.17
ENCODE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.18
END Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.18
EXIT CYCLE Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.19
FOR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.20
GOTO Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.21
HOLD Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.21
IF Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.22
IMPORT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.23
LOCK Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.23
MOVE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.24
MOVE ALONG Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.26
OPEN FILE Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.27
OPEN HAND Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.28
PAUSE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.29
PROGRAM Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.30
PULSE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.31
PURGE CONDITION Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.32
lb-0-0-pdlTOC.fm
VI
READ Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.32
RELAX HAND Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.34
REPEAT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.34
RESUME Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.35
RETURN Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.35
ROUTINE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.36
SELECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.37
SIGNAL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.38
TYPE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.39
UNLOCK Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.40
UNPAUSE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.41
VAR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.41
WAIT Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.42
WAIT FOR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.43
WHILE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.43
WRITE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.44
lb-0-0-pdlTOC.fm
VII
ARRAY_DIM2 Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.15
ASIN Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.16
ATAN2 Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.16
AUX_COOP Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.17
AUX_DRIVES Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.17
AUX_SET Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.18
BIT_ASSIGN Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.18
BIT_CLEAR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.20
BIT_FLIP Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.20
BIT_SET Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.21
BIT_TEST Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.21
CHR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.22
CLOCK Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.22
COND_ENABLED Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.23
COND_ENBL_ALL Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.23
CONV_SET_OFST Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.24
COS Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.25
DATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.25
DIR_GET Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.26
DIR_SET Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.26
DRIVEON_DSBL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.27
DV4_CNTRL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.27
DV4_STATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.32
EOF Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.33
ERR_POST Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.33
ERR_STR Built-In Function v3.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.35
ERR_TRAP Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.36
ERR_TRAP_OFF Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.36
ERR_TRAP_ON Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.37
EXP Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.37
FL_BYTES_LEFT Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.38
FL_GET_POS Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.38
FL_SET_POS Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.39
FL_STATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.40
FLOW_MOD_ON Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.41
FLOW_MOD_OFF Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.41
lb-0-0-pdlTOC.fm
VIII
HDIN_READ Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.41
HDIN_SET Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.42
IP_TO_STR Built-in Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.43
IS_FLY Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.44
JNT Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.44
JNT_SET_TAR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.45
JNTP_TO_POS Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.46
KEY_LOCK Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.46
LN Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.47
MEM_SPACE Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.47
NODE_APP Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.48
NODE_DEL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.48
NODE_GET_NAME Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.49
NODE_INS Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.49
NODE_SET_NAME Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.49
ON_JNT_SET Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.50
ON_JNT_SET_DIG Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.52
ON_POS Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.53
ON_POS_SET Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.55
ON_POS_SET_DIG Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.55
ON_TRAJ_SET Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.56
ON_TRAJ_SET_DIG Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.56
ORD Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.56
PATH_GET_NODE Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.57
PATH_LEN Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.58
POS Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.58
POS_COMP_IDL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.59
POS_CORRECTION Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.59
POS_FRAME Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.60
POS_GET_APPR Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.60
POS_GET_CNFG Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.60
POS_GET_LOC Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.61
POS_GET_NORM Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.61
POS_GET_ORNT Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.62
POS_GET_RPY Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.62
POS_IDL_COMP Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.62
lb-0-0-pdlTOC.fm
IX
POS_IN_RANGE Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.63
POS_INV Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.64
POS_MIR Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.64
POS_SET_APPR Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.65
POS_SET_CNFG Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.65
POS_SET_LOC Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.66
POS_SET_NORM Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.66
POS_SET_ORNT Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.67
POS_SET_RPY Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.67
POS_SHIFT Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.67
POS_TO_JNTP Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.68
POS_XTRT Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.68
PROG_OWNER Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.69
PROG_STATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.69
RANDOM Built-in Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.71
ROUND Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.71
RPLC_GET_IDX Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.71
SCRN_ADD Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.72
SCRN_CLEAR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.72
SCRN_CREATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.73
SCRN_DEL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.74
SCRN_GET Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.74
SCRN_REMOVE Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.75
SCRN_SET Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.75
SENSOR_GET_DATA Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.76
SENSOR_GET_OFST Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.76
SENSOR_SET_DATA Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.77
SENSOR_SET_OFST Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.77
SENSOR_TRK Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.77
SIN Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.78
SQRT Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.79
STANDBY Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.79
STR_CAT Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.79
STR_CODING Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.80
STR_CONVERT Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.80
STR_DEL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.81
lb-0-0-pdlTOC.fm
X
STR_EDIT Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.81
STR_GET_INT Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.82
STR_GET_REAL Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.82
STR_INS Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.83
STR_LEN Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.83
STR_LOC Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.84
STR_OVS Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.84
STR_SET_INT Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.85
STR_SET_REAL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.85
STR_TO_IP Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.86
STR_XTRT Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.86
SYS_ADJUST Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.87
SYS_CALL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.87
SYS_SETUP Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.88
TABLE_ADD Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.88
TABLE_DEL Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.89
TAN Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.89
TRUNC Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.90
VAR_INFO Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.90
VAR_UNINIT Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.91
VEC Built-In Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.91
VOL_SPACE Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.92
WIN_ATTR Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.92
WIN_CLEAR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.93
WIN_COLOR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.94
WIN_CREATE Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.95
WIN_DEL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.96
WIN_DISPLAY Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.97
WIN_GET_CRSR Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.97
WIN_LINE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.98
WIN_LOAD Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.99
WIN_POPUP Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.100
WIN_REMOVE Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.101
WIN_SAVE Built-In Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.102
WIN_SEL Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.103
WIN_SET_CRSR Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.104
lb-0-0-pdlTOC.fm
XI
WIN_SIZE Built-In Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.104
WIN_STATE Built-In Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.105
lb-0-0-pdlTOC.fm
XII
$ARM_SIMU: Arm simulate flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.34
$ARM_SPACE: current Arm Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.34
$ARM_SPD_OVR: Arm speed override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.35
$ARM_USED: Program use of arms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.35
$ARM_VEL: Arm velocity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.36
$AUX_BASE: Auxiliary base for a positioner of an arm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.36
$AUX_KEY: TP4i/WiTP AUX-A and AUX-B keys mapping . . . . . . . . . . . . . . . . . . . . . . . . . . 12.36
$AUX_MASK: Auxiliary arm mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.37
$AUX_OFST: Auxiliary axes offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.37
$AUX_SIK_DRVON_ENBL: Auxiliary axes provided of SIK . . . . . . . . . . . . . . . . . . . . . . . . . 12.37
$AUX_SIK_MASK: Auxiliary axes provided of SIK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.38
$AUX_TYPE: Positioner type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.38
$AX_CNVRSN: Axes conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.38
$AX_INF: Axes inference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.39
$AX_LEN: Axes lengths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.40
$AX_OFST: Axes offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.40
$A_ALONG_1D: Internal arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.40
$A_ALONG_2D: Internal arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.40
$A_AREAL_1D: Internal arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.41
$A_AREAL_2D: Internal arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.41
$B_ASTR_1D_NS: Board string data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.41
$BACKUP_SET: Default devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.42
$BASE: Base of arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.42
$BIT: PLC BIT data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.42
$BOARD_DATA: Board data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.43
$BOOTLINES: Bootline read-only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.43
$BREG: Boolean registers - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.43
$BREG_NS: Boolean registers - not saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.44
$B_ALONG_1D: Internal arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.44
$B_ALONG_1D_NS: Internal arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.44
$B_NVRAM: NVRAM data of the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.45
$C4GOPEN_JNT_MASK: C4G Open Joint arm mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.45
$C4GOPEN_MODE: C4G Open modality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.45
$C4G_RULES: C4G Save & Load rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.46
$CAL_DATA: Calibration data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.46
$CAL_SYS: System calibration position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.46
lb-0-0-pdlTOC.fm
XIII
$CAL_USER: User calibration position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.47
$CAUX_POS: Cartesian positioner position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.47
$CIO_AIN: Configuration for AIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.48
$CIO_AOUT: Configuration for AOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.48
$CIO_CAN: Configuration for Can Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.48
$CIO_CROSS: Configuration for I/O cross copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.49
$CIO_DIN: Configuration for DIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.49
$CIO_DOUT: Configuration for DOUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.50
$CIO_FMI: Configuration for $FMI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.50
$CIO_FMO: Configuration for $FMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.50
$CIO_GIN: Configuration for GIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.51
$CIO_GOUT: Configuration for GOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.51
$CIO_IN_APP: Configuration for IN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.51
$CIO_OUT_APP: Configuration for OUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.52
$CIO_SDIN: Configuration for the system digital inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.52
$CIO_SDOUT: Configuration for the system digital outputs . . . . . . . . . . . . . . . . . . . . . . . . . 12.52
$CIO_SYS_CAN: Configuration of the system modules on Can Bus . . . . . . . . . . . . . . . . . . 12.53
$CNFG_CARE: Configuration care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.53
$CNTRL_CNFG: Controller configuration mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.53
$CNTRL_INIT: Controller initialization mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.54
$CNTRL_OPTIONS: Controller Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.55
$CNTRL_TZ: Controller Time Zone. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.56
$COLL_EFFECT: Collision Effect on the arm status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.56
$COLL_ENBL: Collision enabling flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.56
$COLL_SOFT_PER: Collision compliance percentage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.57
$COLL_TYPE: Type of collision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.57
$COND_MASK: PATH segment condition mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.58
$COND_MASK_BACK: PATH segment condition mask in backwards . . . . . . . . . . . . . . . . . 12.59
$CONV_ACC_LIM: Conveyor acceleration limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.59
$CONV_BASE: Conveyor base frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.60
$CONV_CNFG: Conveyor tracking configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.60
$CONV_DIST: Conveyor shift in micron (mm/1000) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.60
$CONV_SHIFT: Conveyor shift in mm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.61
$CONV_SPD: Conveyor speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.61
$CONV_SPD_LIM: Conveyor speed limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.61
$CONV_TBL: Conveyor tracking table data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.62
lb-0-0-pdlTOC.fm
XIV
$CONV_TYPE: Element in the Conveyor Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.62
$CONV_WIN: Conveyor Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.62
$CONV_ZERO: Conveyor Position Transducer Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.63
$CRNT_DATA: Current Arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.63
$CT_JNT_MASK: Conveyor Joint mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.63
$CT_RADIUS: Conveyor radius in mm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.64
$CT_RES: Conveyor position in motor turns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.64
$CT_SCC: Conveyor SCC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.64
$CT_TX_RATE: Transmission rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.65
$CUSTOM_ARM_ID: Identificator for the arm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.65
$CUSTOM_CNTRL_ID: Identificator for the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.65
$CYCLE: Program cycle count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.66
$C_ALONG_1D: Internal current arm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.66
$C_AREAL_1D: Internal current arm data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.66
$C_AREAL_2D: Internal current arm data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.67
$DEPEND_DIRS: Dependancy path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.67
$DFT_ARM: Default arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.67
$DFT_DV: Default devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.68
$DFT_LUN: Default LUN number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.68
$DFT_SPD: Default devices speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.69
$DIN: Digital input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.69
$DNS_DOMAIN: DNS Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.69
$DNS_ORDER: DNS Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.70
$DNS_SERVERS: DNS Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.70
$DOUT: Digital output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.70
$DSA_DATA: DSA data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.71
$DV_STS: the status of DV4_CNTRL call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.71
$DV_TOUT: Timeout for asynchronous DV4_CNTRL calls . . . . . . . . . . . . . . . . . . . . . . . . . 12.71
$DYN_COLL_FILTER: Dynamic Collision Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.72
$DYN_DELAY: Dynamic model delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.72
$DYN_FILTER: Dynamic Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.72
$DYN_FILTER2: Dynamic Filter for dynamic model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.73
$DYN_GAIN: Dynamic gain in inertia and viscous friction. . . . . . . . . . . . . . . . . . . . . . . . . . . 12.73
$DYN_MODEL: Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.73
$DYN_WRIST: Dynamic Wrist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.74
$DYN_WRISTQS: Dynamic Theta carico . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.74
lb-0-0-pdlTOC.fm
XV
$D_ALONG_1D: Internal DSA data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.74
$D_AREAL_1D: Internal DSA data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.74
$D_AXES: Internal DSA data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.75
$D_CTRL: Internal DSA data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.75
$D_HDIN_SUSP: DSA_DATA field for HDIN suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.75
$D_MTR: Internal DSA data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.76
$EMAIL_INT: Email integer configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.76
$EMAIL_STR: Email string configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.77
$ERROR: Last PDL2 Program Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.77
$EXE_HELP: Help on Execute command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.77
$FBP_TBL: Field Bus Table data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.78
$FB_ADDR: Field Bus ADDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.78
$FB_CNFG: Controller fieldbuses configuration mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.78
$FB_INIT: Controller fieldbuses initialization mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.79
$FB_MA_INIT: Field bus master init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.80
$FB_MA_SLVS: Field bus master slaves init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.80
$FB_SLOT: field bus slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.81
$FB_SL_INIT: Field bus slave init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.82
$FB_TYPE: Field bus type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.84
$FDIN: Functional digital input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.84
$FDOUT: Functional digital output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.84
$FL_ADLMT: Array of delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.84
$FL_BINARY: Text or character mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.85
$FL_CNFG: Configuration file name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.85
$FL_COMP: Compensation file name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.85
$FL_DLMT: Delimiter specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.86
$FL_ECHO: Echo characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.86
$FL_NUM_CHARS: Number of chars to be read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.86
$FL_PASSALL: Pass all characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.87
$FL_RANDOM: Random file access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.87
$FL_RDFLUSH: Flush on reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.87
$FL_STS: Status of last file operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.88
$FL_SWAP: Low or high byte first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.88
$FLOW_TBL: Flow modulation algorithm table data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.88
$FLY_DBUG: Cartesian Fly Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.89
$FLY_DIST: Distance in fly motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.89
lb-0-0-pdlTOC.fm
XVI
$FLY_PER: Percentage of fly motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.89
$FLY_TRAJ: Type of control on cartesian fly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.90
$FLY_TYPE: Type of fly motion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.90
$FMI: Flexible Multiple Analog/Digital Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.90
$FMO: Flexible Multiple Analog/Digital Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.91
$FOLL_ERR: Following error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.91
$FUI_DIRS: Installation path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.91
$FW_ARM: Arm under flow modulation algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.92
$FW_AXIS: Axis under flow modulation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.92
$FW_CNVRSN: Conversion factor in case of Flow modulation algorithm. . . . . . . . . . . . . . . 12.92
$FW_ENBL Flow modulation algorithm enabling indicator. . . . . . . . . . . . . . . . . . . . . . . . . . 12.93
$FW_FLOW_LIM Flow modulation algorithm flow limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.93
$FW_SPD_LIM Flow modulation algorithm speed limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.93
$FW_START Delay in flow modulation algorithm application after start . . . . . . . . . . . . . . . . 12.94
$FW_VAR: flag defining the variable to be considered when flow modulate is used . . . . . . 12.94
$GEN_OVR: General override. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.94
$GIN: Group input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.95
$GOUT: Group output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.95
$GUN: Electrical welding gun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.95
$HAND_TYPE: Type of hand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.96
$HDIN: High speed digital input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.96
$HDIN_SUSP: HDIN Suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.96
$HLD_DEC_PER: Hold deceleration percentage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.97
$HOME: Arm home position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.97
$IN: IN digital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.97
$IPERIOD: Interpolator period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.98
$IREG: Integer register - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.98
$IREG_NS: Integer registers - not saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.98
$JERK: Jerk control values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.98
$JNT_LIMIT_AREA: Joint limits of the work area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.99
$JNT_MASK: Joint arm mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.99
$JNT_MTURN: Check joint Multi-turn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.99
$JNT_OVR: joint override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.100
$JOG_INCR_DIST: Increment Jog distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.100
$JOG_INCR_ENBL: Jog incremental motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.100
$JOG_INCR_ROT: Rotational jog increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.101
lb-0-0-pdlTOC.fm
XVII
$JOG_SPD_OVR: Jog speed override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.101
$JPAD_DIST: Distance between user and Jpad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.101
$JPAD_ORNT:TP4i/WiTP Angle setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.102
$JPAD_TYPE: TP4i/WiTP Jpad modality rotational or translational . . . . . . . . . . . . . . . . . . 12.102
$JREG: Jointpos registers - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.102
$JREG_NS: Jointpos register - not saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.103
$LATCH_CNFG: Latched alarm configuration setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.103
$LIN_ACC_LIM: Linear acceleration limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.103
$LIN_DEC_LIM: Linear deceleration limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.104
$LIN_SPD: Linear speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.104
$LIN_SPD_LIM: Linear speed limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.104
$LIN_SPD_RT_OVR: Run-time Linear speed override . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.104
$LOG_TO_DSA: Logical to physical DSA relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.105
$LOG_TO_PHY: Logical to physical relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.105
$MAIN_JNTP: PATH node main jointpos destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.105
$MAIN_POS: PATH node main position destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.106
$MAIN_XTND: PATH node main xtndpos destination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.106
$MAN_SCALE: Manual scale factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.106
$MCP_BOARD: Motion Control Process board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.107
$MCP_DATA: Motion Control Process data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.107
$MDM_INT: Modem Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.107
$MDM_STR: Modem Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.108
$MOD_ACC_DEC: Modulation of acceleration and deceleration . . . . . . . . . . . . . . . . . . . . 12.108
$MOD_MASK: Joint mod mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.108
$MOVE_STATE: Move state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.108
$MOVE_TYPE: Type of motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.109
$MTR_ACC_TIME: Motor acceleration time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.109
$MTR_CURR: Motor current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.110
$MTR_DEC_TIME: Motor deceleration time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.110
$MTR_SPD_LIM: Motor speed limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.110
$M_ALONG_1D: Internal motion control data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.110
$NET_B: Ethernet Boot Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.111
$NET_B_DIR: Ethernet Boot Setup Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.111
$NET_C_CNFG: Ethernet Client Setting Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.111
$NET_C_DIR: Ethernet Client Setup Default Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.112
$NET_C_HOST: Ethernet Client Setup Remote Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.112
lb-0-0-pdlTOC.fm
XVIII
$NET_C_PASS: Ethernet Client Setup Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.112
$NET_C_USER: Ethernet Client Setup Login Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.113
$NET_HOSTNAME: Ethernet network hostnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.113
$NET_I_INT: Ethernet Network Information (integers) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.113
$NET_I_STR: Ethernet Network Information (strings). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.114
$NET_L: Ethernet Local Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.114
$NET_MOUNT: Ethernet network mount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.115
$NET_Q_STR: Ethernet Remote Interface Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.115
$NET_R_STR: Ethernet Remote Interface Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.116
$NET_S_INT: Ethernet Network Server Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.116
$NET_T_HOST: Ethernet Network Time Protocol Host . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.117
$NET_T_INT: Ethernet Network Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.117
$NOLOG_ERROR: Exclude messages from logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.117
$NUM_ALOG_FILES: Number of action log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.118
$NUM_ARMS: Number of arms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.118
$NUM_AUX_AXES: Number of auxiliary axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.118
$NUM_DEVICES: Number of devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.118
$NUM_DSAS: Number of DSAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.119
$NUM_JNT_AXES: Number of joint axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.119
$NUM_LUNS: Number of LUNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.119
$NUM_MB: Number of motion buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.120
$NUM_MB_AHEAD: Number of motion buffers ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.120
$NUM_MCPS: Number of Motion Control Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.120
$NUM_PROGS: Number of active programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.121
$NUM_SCRNS: Number of screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.121
$NUM_TIMERS: Number of timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.121
$NUM_VP2_SCRNS: Number of Visual PDL2 screens . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.122
$NUM_WEAVES: Number of weaves (WEAVE_TBL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.122
$ODO_METER: average TCP space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.122
$ON_POS_TBL: ON POS table data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.123
$OP_JNT: On Pos jointpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.123
$OP_JNT_MASK: On Pos Joint Mask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.123
$OP_POS: On Pos position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.124
$OP_REACHED: On Posposition reached flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.124
$OP_TOL_DIST: On Pos-Jnt Tolerance distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.124
$OP_TOL_ORNT: On Pos-Jnt Tolerance Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.125
lb-0-0-pdlTOC.fm
XIX
$OP_TOOL: The On Pos Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.125
$OP_TOOL_DSBL: On Pos tool disable flag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.125
$OP_TOOL_RMT: On Pos Remote tool flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.126
$OP_UFRAME: The On Pos Uframe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.126
$ORNT_TYPE: Type of orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.126
$OT_COARSE: On Trajectory indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.127
$OT_JNT: On Trajectory joint position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.127
$OT_POS: On Trajectory position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.127
$OT_TOL_DIST: On Trajectory Tolerance distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.128
$OT_TOL_ORNT: On Trajectory Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.128
$OT_TOOL: On Trajectory TOOL position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.128
$OT_TOOL_RMT: On Trajectory remote tool flag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.129
$OT_UFRAME: On Trajectory User frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.129
$OT_UNINIT: On Trajectory position uninit flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.129
$OUT: OUT digital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.129
$PAR: Nodal motion variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.130
$PGOV_ACCURACY: required accuracy in cartesian motions . . . . . . . . . . . . . . . . . . . . . . 12.131
$PGOV_MAX_SPD_REDUCTION: Maximum speed scale factor . . . . . . . . . . . . . . . . . . . 12.132
$PGOV_ORNT_PER: percentage of orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.132
$POS_LIMIT_AREA: Cartesian limits of work area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.132
$PPP_INT: PPP Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.133
$PREG: Position registers - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.133
$PREG_NS: Position registers - not saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.133
$PROG_ACC_OVR: Program acceleration override. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.134
$PROG_ARG: Program's activation argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.134
$PROG_ARM: Arm of program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.134
$PROG_CNFG: Program configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.135
$PROG_CONDS: Defined conditions of a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.135
$PROG_DEC_OVR: Program deceleration override. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.136
$PROG_NAME: Executing program name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.136
$PROG_SPD_OVR: Program speed override. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.136
$PROG_UADDR: Address of program user-defined memory access variables . . . . . . . . . 12.137
$PROG_UBIT: Program user-defined bit memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.137
$PROG_UBYTE: Program user-defined byte memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.138
$PROG_ULEN: Length of program memory access user-defined variables . . . . . . . . . . . . 12.138
$PROG_ULONG: Program user-defined long word memory . . . . . . . . . . . . . . . . . . . . . . . 12.138
lb-0-0-pdlTOC.fm
XX
$PROG_UWORD: Program user-defined word memory. . . . . . . . . . . . . . . . . . . . . . . . . . . 12.139
$PWR_RCVR: Power failure recovery mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.139
$RAD_IDL_QUO: Radiant ideal quote. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.139
$RAD_TARG: Radiant target. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.140
$RAD_VEL: Radiant velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.140
$RBT_CNFG: Robot board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.140
$RB_FAMILY: Family of the robot arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.141
$RB_MODEL: Model of the robot arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.141
$RB_NAME: Name of the robot arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.142
$RB_STATE: State of the robot arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.142
$RB_VARIANT: Variant of the robot arm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.142
$RCVR_DIST: Distance from the recovery position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.143
$RCVR_LOCK: Change arm state after recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.143
$RCVR_TYPE: Type of motion recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.143
$READ_TOUT: Timeout on a READ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.144
$REC_SETUP: RECord key setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.144
$REF_ARMS: Reference arms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.145
$REMOTE: Functionality of the key in remote. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.145
$REM_I_STR: Remote connections Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.145
$REM_TUNE: Internal remote connection tuning parameters. . . . . . . . . . . . . . . . . . . . . . . 12.146
$RESTART: Restart Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.146
$RESTART_MODE: Restart mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.146
$RESTORE_SET: Default devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.147
$ROT_ACC_LIM: Rotational acceleration limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.147
$ROT_DEC_LIM: Rotational deceleration limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.147
$ROT_SPD: Rotational speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.148
$ROT_SPD_LIM: Rotational speed limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.148
$RPLC_DATA: Data of PLC resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.148
$RPLC_STS: Status of PLC resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.149
$RREG: Real registers - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.149
$RREG_NS: Real registers - not saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.150
$SAFE_ENBL: Safe speed enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.150
$SDIN: System digital input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.150
$SDOUT: System digital output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.151
$SEG_DATA: PATH segment data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.151
$SEG_FLY: PATH segment fly or not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.151
lb-0-0-pdlTOC.fm
XXI
$SEG_FLY_DIST: Parameter in segment fly motion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.152
$SEG_FLY_PER: PATH segment fly percentage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.152
$SEG_FLY_TRAJ: Type of fly control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.152
$SEG_FLY_TYPE: PATH segment fly type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.153
$SEG_OVR: PATH segment override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.153
$SEG_REF_IDX: PATH segment reference index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.153
$SEG_STRESS_PER: Percentage of stress required in fly . . . . . . . . . . . . . . . . . . . . . . . . 12.154
$SEG_TERM_TYPE: PATH segment termination type. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.154
$SEG_TOL: PATH segment tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.155
$SEG_TOOL_IDX: PATH segment tool index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.155
$SEG_WAIT: PATH segment WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.156
$SENSOR_CNVRSN: Sensor Conversion Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.157
$SENSOR_ENBL: Sensor Enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.157
$SENSOR_GAIN: Sensor Gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.157
$SENSOR_OFST_LIM: Sensor Offset Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.158
$SENSOR_TIME: Sensor Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.158
$SENSOR_TYPE: Sensor Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.158
$SERIAL_NUM: Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.159
$SFRAME: Sensor frame of an arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.159
$SING_CARE: Singularity care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.160
$SM4C_STRESS_PER: Maximum Stress allowed in Cartesian SmartMove4 . . . . . . . . . . 12.160
$SM4_SAT_SCALE: SmartMove4 saturation thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . 12.160
$SPD_OPT: Type of speed control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.161
$SREG: String registers - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.161
$SREG_NS: String registers - not saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.161
$STARTUP: Startup program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.162
$STARTUP_USER: Startup user. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.162
$STRESS_PER: Stress percentage in cartesian fly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.162
$STRK_END_N: User negative stroke end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.163
$STRK_END_P: User positive stroke end. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.163
$STRK_END_SYS_N: System stroke ends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.163
$STRK_END_SYS_P: System stroke ends. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.163
$SWIM_ADDR: SWIM address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.164
$SWIM_CNFG: SWIM configuration mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.164
$SWIM_INIT: SWIM Board initialization parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.164
$SYNC_ARM: Synchronized arm of program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.165
lb-0-0-pdlTOC.fm
XXII
$SYS_CALL_OUT: Output lun for SYS_CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.165
$SYS_CALL_STS: Status of last SYS_CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.166
$SYS_CALL_TOUT: Timeout for SYS_CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.166
$SYS_ERROR: Last system error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.166
$SYS_ID: Robot System identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.167
$SYS_INP_MAP: Configuration for system bits in Input on fieldbuses . . . . . . . . . . . . . . . . 12.167
$SYS_OUT_MAP: Configuration for system bits in Output on fieldbuses . . . . . . . . . . . . . . 12.167
$SYS_PARAMS: Robot system identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.168
$SYS_STATE: State of the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.168
$TERM_TYPE: Type of motion termination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.169
$THRD_CEXP: Thread Condition Expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.170
$THRD_ERROR: Error of each thread of execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.170
$THRD_PARAM: Thread Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.171
$TIMER: Clock timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.171
$TOL_ABT: Tolerance anti-bouce time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.171
$TOL_COARSE: Tolerance coarse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.172
$TOL_FINE: Tolerance fine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.172
$TOL_JNT_COARSE: Tolerance for joints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.172
$TOL_JNT_FINE: Tolerance for joints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.173
$TOL_TOUT: Tolerance timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.173
$TOOL: Tool of arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.173
$TOOL_CNTR: Tool center of mass of the tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.174
$TOOL_FRICTION: Tool Friction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.174
$TOOL_INERTIA: Tool Inertia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.174
$TOOL_MASS: Mass of the tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.175
$TOOL_RMT: Fixed Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.175
$TOOL_XTREME: Extreme Tool of the Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.175
$TP_ARM: Teach Pendant current arm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.175
$TP_GEN_INCR: Incremental value for general override . . . . . . . . . . . . . . . . . . . . . . . . . . 12.176
$TP_MJOG: Type of TP jog motion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.176
$TP_ORNT: Orientation for jog motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.176
$TP_SYNC_ARM: Teach Pendant’s synchronized arms . . . . . . . . . . . . . . . . . . . . . . . . . . 12.177
$TUNE: Internal tuning parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.177
$TURN_CARE: Turn care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.178
$TX_RATE: Transmission rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.179
$UFRAME: User frame of an arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.179
lb-0-0-pdlTOC.fm
XXIII
$USER_ADDR: Address of user-defined variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.179
$USER_BIT: User-defined bit memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.180
$USER_BYTE: User-defined byte memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.180
$USER_LEN: Length of User-defined variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.180
$USER_LONG: User-defined long word memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.181
$USER_WORD: User-defined word memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.181
$VERSION: Software version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.181
$VP2_SCRN_ID: Executing program VP2 Screen Identifier . . . . . . . . . . . . . . . . . . . . . . . . 12.182
$VP2_TOUT: Timeout value for asynchronous VP2 requests. . . . . . . . . . . . . . . . . . . . . . . 12.182
$VP2_TUNE: Visual PDL2 tuning parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.182
$WEAVE_MODALITY: Weave modality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.183
$WEAVE_MODALITY_NOMOT: Weave modality (only for no arm motion) . . . . . . . . . . . . 12.183
$WEAVE_NUM: Weave table number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.183
$WEAVE_NUM_NOMOT: Weave table number (only for no arm motion) . . . . . . . . . . . . . 12.184
$WEAVE_PHASE: Index of the Weaving Phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.184
$WEAVE_TBL: Weave table data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.184
$WEAVE_TYPE: Weave type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.185
$WEAVE_TYPE_NOMOT: Weave type (only for no arm motion) . . . . . . . . . . . . . . . . . . . . 12.185
$WFR_IOTOUT: Timeout on a WAIT FOR when IO simulated . . . . . . . . . . . . . . . . . . . . . . 12.185
$WFR_TOUT: Timeout on a WAIT FOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.186
$WORD: PLC WORD data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.186
$WRITE_TOUT: Timeout on a WRITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.186
$WV_AMP_PER: Weave amplitude percentage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.187
$WV_CNTR_DWL: Weave center dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.187
$WV_END_DWL Weave end dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.187
$WV_LEFT_AMP: Weave left amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.188
$WV_LEFT_DWL: Weave left dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.188
$WV_LENGTH_WAVE: Wave length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.188
$WV_ONE_CYCLE: Weave one cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.189
$WV_PLANE: Weave plane angle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.189
$WV_RIGHT_AMP: Weave right amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.189
$WV_RIGHT_DWL: Weave right dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.190
$WV_SMOOTH: Weave smooth enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.190
$WV_SPD_PROFILE: Weave speed profile enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.190
$WV_TRV_SPD: Weave transverse speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.191
$WV_TRV_SPD_PHASE: Weave transverse speed phase . . . . . . . . . . . . . . . . . . . . . . . . 12.191
lb-0-0-pdlTOC.fm
XXIV
$XREG: Xtndpos registers - saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.191
$XREG_NS: Xtndpos registers - not saved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.192
lb-0-0-pdlTOC.fm
XXV
15. APPENDIX A -
CHARACTERS SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15.1
Characters Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.2
16. APPENDIX B -
CUSTOMIZATIONS ON THE TP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.1
User table creation from DATA environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.1
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2
Table (global) Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2
Field Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.6
Field of a POSITION Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.8
Variable <type>_signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.9
Example program for a table creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.10
Handling TP4i/WiTP right menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.11
XML Tag Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.12
Softkey Pressure and Release events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.13
Example of XML configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.14
Example of right menu configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.15
Customizing the PDL2 Statements insertion, in IDE environment. . . . . . . . . . . . . . . . . . . . . 16.16
Adding User Instructions to the PDL2 menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.17
Adding a Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.17
Adding a Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.18
Adding a Built-in Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.18
Creating a “virtual” Numeric Keypad to insert User Instructions . . . . . . . . . . . . . . . . . . . . 16.20
17. APPENDIX C -
E-MAIL FUNCTIONALITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1
Configuration of SMTP and POP3 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1
Sending/receiving e-mails on C4G Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.2
“email” program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.2
Sending PDL2 commands via e-mail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.5
lb-0-0-pdlTOC.fm
XXVI
Preface
PREFACE
pr-0-0-0_01.fm
00/1207 XXVII
Preface
Reference documents
This document refers to the C4G Control Unit.
The complete set of manuals for the C4G consists of:
pr-0-0-0_01.fm
XXVIII 00/1207
Preface
Modification History
– The VP2 chapter has been removed from the current Manual, and a new
VP2 - Visual PDL2 Manual has been created.
– The following Built-ins have been added:
• POS_COMP_IDL
• POS_IDL_COMP.
– In System Software version 3.12, the following paragraphs have been added:
• User table creation from DATA environment
• Customizing the PDL2 Statements insertion, in IDE environment.
pr-0-0-0_01.fm
00/1207 XXIX
Preface
pr-0-0-0_01.fm
XXX 00/1207
General Safety Precautions
1. GENERAL SAFETY
PRECAUTIONS
1.1 Responsibilities
– The system integrator is responsible for ensuring that the Robot and Control
System are installed and handled in accordance with the Safety Standards in force
in the country where the installation takes place. The application and use of the
protection and safety devices necessary, the issuing of declarations of conformity
and any CE markings of the system are the responsibility of the Integrator.
– COMAU Robotics & Service shall in no way be held liable for any accidents caused
by incorrect or improper use of the Robot and Control System, by tampering with
circuits, components or software, or the use of spare parts that are not originals or
that have not been defined as equivalent by COMAU Robotics & Service
ge-0-0-0_01.FM
07/1007 1-1
General Safety Precautions
1.2.1 Purpose
These safety precautions are aimed to define the behaviour and rules to be observed
when performing the activities listed in the Applicability section.
1.2.2 Definitions
Robot and Control System
The Robot and Control System consists of all the functions that cover: Control Unit,
robot, hand held programming unit and any options.
Protected Area
The protected area is the zone confined by the safety barriers and to be used for the
installation and operation of the robot
Authorised Personnel
Authorised personnel defines the group of persons who have been trained and assigned
to carry out the activities listed in the Applicability section.
Assigned Personnel
The persons assigned to direct or supervise the activities of the workers referred to in
the paragraph above.
Programming Mode
Operating mode under the control of the operator, that excludes automatic operation
and allows the following activities: manual handling of robot axes and programming of
work cycles at low speed, programmed cycle testing at low speed and, when allowed,
at the working speed.
ge-0-0-0_01.FM
1-2 07/1007
General Safety Precautions
Integrator
The integrator is the professional expert responsible for the installation and putting into
service of the Robot and Control System.
Incorrect Use
Incorrect use is when the system is used in a manner other than that specified in the
Technical Documentation.
Range of Action
The robot range of action is the enveloping volume of the area occupied by the robot
and its fixtures during movement in space.
1.2.3 Applicability
These Specifications are to be applied when executing the following activities:
– Installation and Putting into Service;
– Programming Mode;
– Auto / Remote Automatic Mode;
– Robot axes release;
– Stop distances (threshold values)
– Maintenance and Repairs;
– Putting Out of Service and Dismantling
ge-0-0-0_01.FM
07/1007 1-3
General Safety Precautions
– Connection between the Control Unit and the three-phase supply mains at the
works, is to be with a four-pole (3 phases + earth) armoured cable dimensioned
appropriately for the power installed on the Control Unit. See the product
Technical Documentation.
– The power supply cable is to enter the Control Unit through the specific fairlead and
be properly clamped.
– Connect the earth conductor (PE) then connect the power conductors to the main
switch.
ge-0-0-0_01.FM
1-4 07/1007
General Safety Precautions
– Connect the power supply cable, first connecting the earth conductor to the circuit
breaker on the mains line, after checking with a tester that the circuit breaker
terminals are not powered. Connect the cable armouring to the earth.
– Connect the signals and power cables between the Control Unit and the robot.
– Connect the robot to earth or to the Control Unit or to a nearby earth socket.
– Check that the Control Unit door (or doors) is/are locked with the key.
– A wrong connection of the connectors could cause permanent damage to the
Control Unit components.
– The C4G Control Unit manages internally the main safety interlocks (gates,
enabling pushbuttons, etc.). Connect the C4G Control Unit safety interlocks to the
line safety circuits, taking care to connect them as required by the Safety
standards. The safety of the interlock signals coming from the transfer line
(emrgency stop, gates safey devices etc) i.e. the realisation of correct and safe
circuits, is the responsibility of the Robot and Control System integrator.
In the cell/line emergency stop circuit the contacts must be included of the control
unit emergency stop buttons, which are on X30. The push buttons are not
interlocked in the emergency stop circuit of the Control Unit.
– The safety of the system cannot be guaranteed if these interlocks are wrongly
executed, incomplete or missing.
– The safety circuit executes a controlled stop (IEC 60204-1 , class 1 stop) for the
safety inputs Auto Stop/ General Stop and Emergency Stop. The controlled stop is
only active in Automatic states; in Programming the power is cut out (power
contactors open) immediately. The procedure for the selection of the controlled
stop time (that can be set on ESK board) is contained in the Installation manual .
– When preparing protection barriers, especially light barriers and access doors,
bear in mind that the robot stop times and distances are according to the stop
category (0 or 1) and the weight of the robot..
Check that the controlled stop time is consistent with the type of Robot connected
to the Control Unit. The stop time is selected using selector switches SW1 and
SW2 on the ESK board.
– Check that the environment and working conditions are within the range specified
in the specific product Technical Documentation.
– The calibration operations are to be carried out with great care, as indicated in the
Technical Documentation of the specific product, and are to be concluded
checking the correct position of the machine.
– To load or update the system software (for example after replacing boards), use
only the original software handed over by COMAU Robotics & Service.
Scrupulously follow the system software uploading procedure described in the
Technical Documentation supplied with the specific product. After uploading,
always make some tests moving the robot at slow speed and remaining outside the
protected area.
– Check that the barriers of the protected area are correctly positioned.
ge-0-0-0_01.FM
07/1007 1-5
General Safety Precautions
Programming Mode
– The robot is only to be programmed by the authorised personnel.
– Before starting to program, the operator must check the Robot and Control System
to make sure that there are no potentially hazardous irregular conditions, and that
there is nobody inside the protected area.
– When possible the programming should be controlled from outside the protected
area.
– Before operating inside the Protected Area, the operator must make sure from
outside that all the necessary protections and safety devices are present and in
working order, and especially that the hand-held programming unit functions
correctly (slow speed, emergency stop, enabling device, etc.).
– During the programming session, only the operator with the hand-held terminal is
allowed inside the Protected Area.
– If the presence of a second operator in the working area is necessary when
checking the program, this person must have an enabling device interlocked with
the safety devices.
– Activation of the motors (Drive On) is always to be controlled from a position
outside the range of the robot, after checking that there is nobody in the area
involved. The Drive On operation is concluded when the relevant machine status
indication is shown.
– When programming, the operator is to keep at a distance from the robot to be able
to avoid any irregular machine movements, and in any case in a position to avoid
the risk of being trapped between the robot and structural parts (columns, barriers,
etc.), or between movable parts of the actual robot.
– When programming, the operator is to avoid remaining in a position where parts of
the robot, pulled by gravity, could execute downward movements, or move
upwards or sideways (when installed on a sloped plane).
– Testing a programmed cycle at working speed with the operator inside the
protected area, in some situations where a close visual check is necessary, is only
to be carried out after a complete test cycle at slow speed has been executed. The
test is to be controlled from a safe distance.
– Special attention is to be paid when programming using the hand-held terminal: in
this situation, although all the hardware and software safety devices are active, the
robot movement depends on the operator.
– During the first running of a new program, the robot may move along a path that is
not the one expected.
– The modification of program steps (such as moving by a step from one point to
another of the flow, wrong recording of a step, modification of the robot position out
of the path that links two steps of the program), could give rise to movements not
envisaged by the operator when testing the program.
– In both cases operate cautiously, always remaining out of the robot’s range of
action and test the cycle at slow speed.
ge-0-0-0_01.FM
1-6 07/1007
General Safety Precautions
Before using the manual release devices, it is strongly recommended to sling the
robot, or hook to an overhead travelling crane.
ge-0-0-0_01.FM
07/1007 1-7
General Safety Precautions
After replacement of the ESK module, check on the new module that the setting
of the stop time on selector switches SW1 and SW2 is consistent with the type of
Robot connected to the Control Unit.
ge-0-0-0_01.FM
1-8 07/1007
General Safety Precautions
ge-0-0-0_01.FM
07/1007 1-9
General Safety Precautions
ge-0-0-0_01.FM
1-10 07/1007
Introduction to PDL2
2. INTRODUCTION TO PDL2
pr-0-0-pdl_01.fm
00/0607 2-1
Introduction to PDL2
item1 item3
item1 item2 item3
– items that occur one or more times are followed by three dots. For example, the
description:
item1 item2...
item1 item2
item1 item2 item2
item1 item2 item2 item2 etc.
– vertical bars separate choices. If at least one item must be chosen, the whole set
of choices is enclosed in double vertical bars. For example, the description:
|| item1 | item2 ||
has the following possible results:
item1
item2
Combinations of these notations provide powerful, but sometimes tricky, syntax
descriptions. They are extremely helpful in understanding what can be done in the PDL2
language. A few examples follow
Note that when the repeating dots come right after the optional brackets, the items inside
the brackets can be repeated zero or more times. However, when they come after
double vertical bars, the items inside the bars can be repeated one or more times.
pr-0-0-pdl_01.fm
2-2 00/0607
Introduction to PDL2
@ < > = / * + - _ , ; . # $ [] % {}
Symbols:
\ : ! ()
Special Characters: blank (space), tab
pr-0-0-pdl_01.fm
00/0607 2-3
Introduction to PDL2
pr-0-0-pdl_01.fm
2-4 00/0607
Introduction to PDL2
pr-0-0-pdl_01.fm
00/0607 2-5
Introduction to PDL2
Program identifiers, which are also used to name the file in which the program is
stored, cannot exceed eight characters.
A user-defined variable is a name that can represent any value of a particular type. The
programmer declares a variable by associating a name with a data type. That name can
then be used in the program to represent any value of that type.
A user-defined constant is a name that represents a specific value. The programmer
pr-0-0-pdl_01.fm
2-6 00/0607
Introduction to PDL2
declares a constant by equating a name to a value. That name can then be used in the
program to represent the value. Data Representation chapter explains variable and
constant declarations.
A user-defined routine is a set of instructions represented by a single name. The
programmer can define routines that handle specific parts of the overall job. The routine
name can be used in a program to represent the actual instructions. Routines chapter
describes user-defined routines.
User-defined labels are used to mark the destination of a GOTO statement. Execution
Control chapter describes the use of labels and GOTO statements.
A user-defined type is a set of field definitions represented by a single name. The
programmer declares a type in order to define a new data type which is a sequence of
existing data types. The type name can then be used in the declaration of a variable or
routine. Data Representation chapter explains type and field declarations.
2.3 Statements
PDL2 programs are composed of statements. Statements are a combination of the
following:
– reserved words, symbols, and operators;
– predefined identifiers;
– user-defined identifiers.
Statements must be syntactically correct; that is, they must be constructed according to
the syntax rules of PDL2. The program editor helps provide the correct syntax as
statements are entered. Statements List chapter contains an alphabetical reference of
PDL2 statements.
2.3.2 Comments
A comment is text in a program that is not part of the program instructions. Comments
have no effect on how the controller executes statements. A comment begins with two
hyphens (—). The controller will ignore any text that follows the two hyphens, up to a
maximum length of 255 characters. Typically, comments are used by a programmer to
explain something about the program.
pr-0-0-pdl_01.fm
00/0607 2-7
Introduction to PDL2
A program starts with the PROGRAM statement. This statement identifies the program
with a user-defined name. The same name identifies the file in which the program is
stored. Optional program attributes, explained with the PROGRAM statement in
Statements List chapter, can also be included.
Programs are divided into a declaration section and an executable section. The
declaration section is a list of all the user-defined data items and routines the program
will use. The executable section is a list of statements the controller will execute to
perform a task.
The BEGIN statement separates the declaration section from the executable section.
The programmer can include the CYCLE option with the BEGIN statement to create a
continuous cycle. The END statement marks the end of the program and also includes
the program name.
In this manual, reserved words and predefined identifiers are capitalized, user-defined
identifiers are italicized, and optional items are enclosed in angle brackets <>. A
complete description of syntax notation is provided at the end of this chapter.
PROGRAM pack
VAR
perch, feeder, table, discard : POSITION
BEGIN CYCLE
MOVE TO perch
OPEN HAND 1
WAIT FOR $DIN[1] = ON
-- signals feeder ready
MOVE TO feeder
CLOSE HAND 1
IF $DIN[2] = OFF THEN
-- determines if good part
MOVE TO table
ELSE
MOVE TO discard
ENDIF
OPEN HAND 1
-- drop part on table or in bin
END pack
pr-0-0-pdl_01.fm
2-8 00/0607
Introduction to PDL2
1. Feeder
2. Robot
3. Discard Bin
4. Table
pr-0-0-pdl_01.fm
00/0607 2-9
Introduction to PDL2
pr-0-0-pdl_01.fm
2-10 00/0607
Data Representation
3. DATA REPRESENTATION
This chapter explains each PDL2 data type, how data is declared, and how it can be
manipulated within a program.
Data Types determine the following:
– the kinds of values associated with a data item;
– the operations that can be performed on the data.
PDL2 programs can include the following kinds of data items:
– variables, representing values that can change;
– constants, representing values that cannot change;
– literals, actual values.
The following information are supplied:
– Data Types
– Declarations
– Expressions
– Assignment Statement
– Typecasting
Variables and constants are defined by an identifier and a data type. Declaring a
variable associates an identifier with a data type. Different values of that type can be
assigned to the identifier throughout the program (unless they have been declared with
the CONST attribute - see par. – CONST attribute on page 3-17). Variables can be
declared to be of any data type.
Declaring a constant associates a value with an identifier. That value cannot be changed
within the program. The data type of the identifier is determined by the value. INTEGER,
REAL, BOOLEAN, and STRING values can be associated with constant identifiers.
Literal values are actual values used in the program. They can be INTEGER, REAL, or
STRING values.
PDL2 uses expressions to manipulate data in a program. Expressions are composed of
operands and operators. Operands are the data items being manipulated. Operators
indicate what kind of manipulation is performed.
pr-0-0-pdl_02.fm
00/0607 3-1
Data Representation
– ARRAY
– RECORD
– VECTOR
– POSITION
– JOINTPOS
– XTNDPOS
– NODE
– PATH
– SEMAPHORE
3.1.1 INTEGER
The INTEGER data type represents whole number values in the range -2147483647
through +2147483647. The following predefined constants represent the maximum and
minimum INTEGER values:
– MAXINT;
– MININT.
An INTEGER can be represented as decimal (base 10), octal (base 8), hexadecimal (base
16) or binary (base 2). The default base for INTEGERs is decimal. To represent a based
INTEGER literal, precede the number with 0o to specify octal (0o72), Ox to specify
hexadecimal (0xFF), or Ob to specify binary (0b11011).
PDL2 can perform the following operations on INTEGER data:
– arithmetic (+, -, *, /, DIV, MOD, **, +=, -=);
– relational (<, >, =, <>, <=, >=);
– bitwise (AND, OR, XOR, NOT, SHR, SHL, ROR, ROL).
The += and -= operators are used for incrementing and decrementing integer program
variables. They are not permitted to be used on system variables.
The amount of increment can be espressed by a constant or by another integer variable.
For example:
VAR i, j: INTEGER
i += 5 -- It is equivalent to i:=i+5
i -= j -- It is equivalent to i:=i-j
This operator can also be used in condition actions.
At run time, an INTEGER PDL2 variable will assume the value of uninitialized if it
becomes greater than MAXINT.
In addition, PDL2 provides built-in routines to access individual bits of an INTEGER
value and to perform other common INTEGER functions (refer to BUILT-IN Routines list
chapter).
3.1.2 REAL
The REAL data type represents numeric values that include a decimal point and a
fractional part or numbers expressed in scientific notation. Fig. 3.1 - Range of REAL
Data shows the range for REAL data.
pr-0-0-pdl_02.fm
3-2 00/0607
Data Representation
3.1.3 BOOLEAN
The BOOLEAN data type represents the Boolean predefined constants TRUE (ON) and
FALSE (OFF).
PDL2 can perform the following operations on BOOLEAN data:
– relational (=, <>);
– Boolean (AND, OR, XOR, NOT).
3.1.4 STRING
The STRING data type represents a series of ASCII characters, treated as a single unit
of data. Single quotes mark the beginning and the end of a string value. For example:
All nonprintable characters in a STRING value not represented in the above format, are
replaced with blanks. Note that, when working in PROGRAM EDIT or in MEMORY
DEBUG, control sequences for printable characters are viewed in the corresponding
printable character itself.
To produce either the backslash (\) or the single quotes (‘) characters in a STRING literal, use
two in a row. For example:
Literal: ‘Single quote’’ ‘
Value: Single quote ‘
The actual length of a string value can be from 0 to 2048 characters.
An actual length of 0 represents an empty STRING value.
PDL2 can perform the following operations on STRING data:
– relational (<, >, =, <>, <=, >=)
In addition, PDL2 provides built-in routines to perform common STRING manipulations
pr-0-0-pdl_02.fm
00/0607 3-3
Data Representation
In addition to printable characters, strings can contain control sequences. The control
sequence for UNICODE consists of \u followed by the requested UNICODE code.
For example:
All nonprintable characters in a STRING value, not represented in the above format, are
replaced with blanks.
To produce either the backslash (\) or the double quotes (“) characters in a STRING literal, use
two in a row. For example:
Note that for UNICODE strings, the required length is double + 2, compared with
ASCII strings.
UNICODE characters are internally represented by means of 2 bytes, whereas
ASCII characters are represented by means of 1 byte only.
3.1.5 ARRAY
The ARRAY data type represents an ordered collection of data items, all of the same
type. The programmer can declare that type to be one of the following:
INTEGER VECTOR
REAL POSITION
BOOLEAN JOINTPOS
STRING XTNDPOS
RECORD SEMAPHORE
pr-0-0-pdl_02.fm
3-4 00/0607
Data Representation
The programmer can declare an ARRAY to have one or two dimensions. The
programmer also declares the maximum number of items for each dimension, up to
65535 for each. (Note: The actual size might be limited by the amount of available
system memory.)
Individual items in an ARRAY are referenced by index numbers. For one dimensional
arrays, a single INTEGER expression represents the row position of the item in the
ARRAY. For two dimensional arrays, two INTEGER expressions, separated by a
comma, represent the row and column position. Index numbers follow the ARRAY name
and are enclosed in square brackets.
In Fig. 3.2 - Representing Arrays, the third item in the one dimensional ARRAY is
referenced as parts[3]. The item in the second row, third column in the two dimensional
array is referenced as bin[2,3].
All of the operations that are available for a particular data type can be performed on
individual ARRAY items of that type. An entire ARRAY can be used as an argument in
a routine call or in an assignment statement. When using arrays in assignment
statements, both arrays must be of the same data type, size, and dimension.
SEMAPHORE arrays cannot be used in an assignment statement.
3.1.6 RECORD
The RECORD data type represents a collection of one or more data items grouped
together using a single name. Each item of a record is called a field and can be of any
PDL2 data type except SEMAPHORE, RECORD, NODE, or PATH.
The predefined data types VECTOR, POSITION, and XTNDPOS are examples of
record types. The user can define new record data types in the TYPE section of a
program.
A RECORD type definition creates a user-defined data type that is available to the entire
system. This means that it is possible to have conflicts between RECORD definitions
that have the same name but different fields. Such conflicts are detected when the
programs are loaded. It is recommended that the programmer use a unique naming
convention for RECORD definitions.
A RECORD type definition can be referred to in other programs if it is defined with the
GLOBAL attribute and if it is IMPORTed in such programs by means of the IMPORT
statement (for further details see par. 3.2.2 TYPE declarations on page 3-14 and
par. 3.2.4.2 GLOBAL attribute and IMPORT statement on page 3-19)
pr-0-0-pdl_02.fm
00/0607 3-5
Data Representation
The programmer can define a RECORD to have as many fields as needed, however,
the maximum size for a record value is 65535 bytes.
Individual fields in a RECORD are referenced by separating the record variable name
and the field name by a period. This is called field notation. For example:
rec_var.field_name := exp
All of the operations that are available for a particular data type can be performed on
individual fields of that type. An entire RECORD can be used as an argument in a routine
call or used in an assignment statement. When using records in assignment statements,
both records must be of the same RECORD definition.
3.1.7 VECTOR
The VECTOR data type represents a quantity having both direction and magnitude. It
consists of three REAL components. Vectors usually represent a location or direction in
Cartesian space, with the components corresponding to x, y, z coordinates. Fig. 3.3
- Representing Vectors shows an example of a vector.
PDL2 can perform the following operations on VECTOR data:
– arithmetic (+, -);
– arithmetic (*, /) VECTOR-INTEGER, VECTOR-REAL, and vice-versa;
– relational (=, <>);
– vector (#, @).
Individual components of a VECTOR are referenced using field notation with the
predefined fields X, Y, and Z. For example:
vec_var.X := 0.65
pr-0-0-pdl_02.fm
3-6 00/0607
Data Representation
3.1.8 POSITION
The POSITION data type is used to describe the position of a Cartesian frame of
reference with respect to another (called starting frame).
Generally a position is used to specify the final point for a MOVE statement that is the
position to be reached by the end-of-arm tooling with respect to the user frame.
POSITIONs also define the system frames of reference: for example the position of the
base of the robot ($BASE), the dimensions of the end-of-arm tooling ($TOOL) and the
user frame linked to the workpiece ($UFRAME) (see par. 3.1.8.1 Frames of reference
on page 3-10 for a general definition of frames).
Note that the POSITION defines not only the location but also the orientation and, only
for the final points, the configuration of the robot. Therefore POSITION data type
consists of three REAL location components, three REAL orientation components, and
a STRING that contains the configuration components.
The location components represents distances, measured in millimeters, along the x, y,
z axes of the starting frame of reference. As with vectors, the x, y, z components can be
referenced using the predefined fields x, y and z.
The orientation components represent three rotation angles, measured in degrees,
called Euler angles. They allow to univocally define the final orientation of a frame of
reference by applying to the starting frame three consecutive rotations. The first rotation
(first Euler angle E1) is around the Z axis of the starting frame, the second is around the
Y axis of the resulting frame (angle E2), the third is around the Z axis of the final frame
(angle E3). The limits for the first and third Euler angle are from -180 to 180; the limits
for the second are from 0 to 180 (always positive value). Euler angles can be referenced
using the predefined constants A, E and R
Fig. 3.4 - Euler Angles of Rotation shows an example of a POSITION used to describe
a final point for a MOVE statement.
When the POSITION is used to define a final point for a MOVE statement the
configuration component is necessary to represent a unique set of the robot joint angles
that bring the TCP on that position. The set of possible components is related to the
family of robots. Note that the configuration string is automatically assigned by the
system when teaching a final point so that generally they are not to be written explicitly
in a program.
The configuration string can contain two type of information: the attitude flags and the
turn flags.
The letters used as attitude flags in the configuration string are S, E, W, A and B. Some
of these flags may be invalid on some robot arms. The entire set of components only
apply to the SMART family of robots. The arm shoulder, elbow and wrist configuration
are represented by the characters S, E and W. Here follows for example the description
of the attitude flags for the SMART robots:
– S, if present in the configuration string, indicates that the robot must reach the final
point with the WCP (Wrist Center Point) in the hinder space with respect to the
plane defined by the first and second axes;
– E, if present, indicates that the WCP must be in the zone lying behind the extension
of the second axis;
– W, if present, indicates that the robot must reach the final point with a negative
value for the fifth axis.
The characters A and B represent the configuration flags for the wrist-joint motions (that
are cartesian trajectories with $ORNT_TYPE=WRIST_JNT). These flags are ignored
pr-0-0-pdl_02.fm
00/0607 3-7
Data Representation
when performing non-wrist-joint motions, just like the S, E and W flags are ignored
during wrist-joint motions. The meaning of the attitude flags for a SMART robot follows:
– the character A, if present, indicates that the robot must reach the final point with
the TCP (Tool Center Point) in the hinder space with respect to the plane defined
by the second and third axes;
– the character B, if present, indicates that the robot must reach the final point with
the TCP in the hinder space with respect to the plane defined by the first and
second axes.
The turn flags are useful for robot axes that can rotate for more than one turn (multi-turn
axes). For this type of robots the same position can be reached in different axis
configurations that differ for one or more turns (360 degrees). There are four turn flags
called: T1, T2, T3, T4.
The syntax inside the configuration string is Ta:b, where ‘a’ represents the flag code (1
to 4) and ‘b’ represents the number of turns (-8 to +7).
The link between the flag name and the axis is shown in the following table:
Tab. 3.1 - Link between flags and axes for different robots
NORMAL CONFIGURATION
Any combination of S, E, W, A, B and Ta:b can be used in the configuration string and
in any order.
An example of valid configuration string follows.
pr-0-0-pdl_02.fm
3-8 00/0607
Data Representation
pr-0-0-pdl_02.fm
00/0607 3-9
Data Representation
PROGRAM postest
VAR
pos_var : POSITION
BEGIN
pos_var := POS(294, 507, 1492, 13, 29, 16, )
END pos
The world frame is predefined for each arm. The programmer can define the base frame
($BASE) as a position, relative to the world frame. The programmer also can define the
end-of-arm tooling ($TOOL) as a position, relative to the faceplate of the arm.
$UFRAME is a transformation used to describe the position of the workpiece with
respect to the world.
Relative frames can be used to compensate for changes in the workcell, without having
to reteach positional data. For example, $BASE can be changed if the arm is relocated
in the workcell or $TOOL can be changed if the end-of-arm tooling changes. Relative
frames can also be assigned to parts, such as a car body. Positional data can then be
taught relative to that part, for example, particular weld spots. If the position of the car
body changes, only the frame needs to be retaught to correct all of the weld spots.
3.1.9 JOINTPOS
The JOINTPOS data type represents actual arm joint positions, in degrees. One real
component corresponds to each joint of the arm. JOINTPOS data is used to position the
end-of-arm tooling using a particular set of joint movements. Each real value is the
actual distance a joint must move from its predefined “zero” position. Each JOINTPOS
pr-0-0-pdl_02.fm
3-10 00/0607
Data Representation
variable is associated with a particular arm and cannot be used with a different arm.
Individual components of a JOINTPOS, like ARRAY components, are referenced by
index numbers. For example:
PROGRAM jnttest
VAR
real_var : REAL
jointpos_var : JOINTPOS
BEGIN
real_var := jointpos_var[5]
jointpos_var[3] := real_exp
END jnttest
There are no operations for the entire JOINTPOS data type. PDL2 provides built-in
routines to perform JOINTPOS manipulations (refer to BUILT-IN Routines list chapter).
3.1.10 XTNDPOS
The XTNDPOS data type represents an arm position that involves a greater number of
axes than is included in the basic configuration of the robot. It is used for integrated
motion of a group of axes, made up of a robot arm and some additional auxiliary axes,
treated as a single unit in the system. For example, an XTNDPOS could be used to
represent a robot mounted on a rail. The robot and rail would be treated as a single arm
by the system. Each XTNDPOS variable is associated with a particular arm and cannot
be used with a different arm.
The XTNDPOS data type is composed of a Cartesian position for the robot and an
ARRAY of joint values for the remaining axes.
Individual components of an XTNDPOS are referenced using field notation with the
predefined fields POS, a POSITION, and AUX, an ARRAY of REAL. For example:
PROGRAM auxaxis
VAR
plxtn : XTNDPOS
BEGIN
plxtn.POS := POS(294, 507, 1492, 13, 29, 16, )
plxtn.AUX[1] := 100
plxtn.AUX[2] := 150
END auxaxis
There are no operations for the entire XTNDPOS data type.
3.1.11 NODE
The NODE data type is similar to a RECORD in that it represents a collection of one or
more data items grouped together using a single name. Each item of a node is called a
field and can be of any PDL2 data type except SEMAPHORE, RECORD, NODE, or
PATH.
The difference between a NODE and a RECORD is that a NODE can include a group
of predefined node fields in addition to user-defined fields. The predefined node fields
begin with a $ and have a meaning known to the system identical to the corresponding
predefined variable. The collection of predefined node fields contains a destination and
description of a single motion segment (motion segments are described in Chap.4. -
pr-0-0-pdl_02.fm
00/0607 3-11
Data Representation
Motion Control).
Node data types are defined in the TYPE section of a program. A node type definition
creates a user-defined data type that is available to the entire system. This means that
it is possible to have conflicts between RECORD and NODE definitions that have the
same name but different fields. Such conflicts are detected when the programs are
loaded. It is recommended that the programmer use a unique naming convention for
RECORD and NODE definitions.
Like for RECORD data types, a NODE type definition can be referred to in other
programs if it is defined with the GLOBAL attribute and if it is IMPORTed in such
programs by means of the IMPORT statement (for further details see par. 3.2.2 TYPE
declarations on page 3-14 and par. 3.2.4.2 GLOBAL attribute and IMPORT statement
on page 3-19)
The programmer can define a node to have as many fields as needed, however, the
maximum size for a node value is 65535 bytes.
Individual fields in a node are referenced by separating the node variable name and the
field name by a period. This is called field notation. For example:
3.1.12 PATH
The PATH data type represents a sequence of nodes to be interpreted in a single
motion. The PATH data type is a predefined record containing the fields NODE,
FRM_TBL, and COND_TBL.
The NODE field is an ARRAY of nodes representing the sequence of nodes. It is
dynamic in length which means nodes can be added and deleted from the table during
execution. The maximum number of nodes in a path is 65535 but the amount of memory
on the system may not permit this many nodes.
The structure of the nodes in the NODE array is determined by the user-defined node
definition declared in the TYPE section of the program. Each node contains a
destination and description for a single motion segment (motion is described in Motion
Control chapter). This provides the programmer with the ability to customize the node
definitions for different applications. Please note that it is possible to have different paths
use different node definitions, however, all nodes within the same path will have the
same node definition.
The node type is available to the entire system. This means that it is possible to have
conflicts between node types that have the same name but different field definitions. It
is recommended that the programmer use a unique naming convention for node
definitions in order to avoid such conflicts.
Individual nodes of a path are referenced by indexing the NODE field of the path
variable.
pr-0-0-pdl_02.fm
3-12 00/0607
Data Representation
For example:
path_var.NODE[3] := path_var.NODE[5]
path_var.NODE[4] := node_var
Individual fields in a path node are referenced using field notation. For example:
path_var.NODE[3].field_name := exp
All of the operations that are available for a particular data type can be performed on
individual fields of that type.
The FRM_TBL field is an ARRAY of POSITIONs representing reference and/or tool
frames to be used during the processing of the path nodes. The FRM_TBL array
contains 7 elements. The usage of the FRM_TBL field is described in the PATH Motion
section of Chap.4. - Motion Control.
The COND_TBL field is an ARRAY of INTEGERs representing condition handler
numbers to be used during the processing of the path nodes. The COND_TBL array
contains 32 elements. The usage of the COND_TBL field is described in the PATH
Motion section of Chap.4. - Motion Control.
There are no operations for the entire PATH type. An entire path can be used in the
MOVE ALONG statement or as an argument in a routine call. PDL2 provides built-in
routines to insert, delete, and append nodes to a path. Additional built-ins are provided
to obtain the number of nodes in a path and assign/obtain a node identifier (refer to
Chap.4. - Motion Control).
3.1.13 SEMAPHORE
The SEMAPHORE data type represents an aid for synchronization when there are
multiple programs running that share the same resources. The SEMAPHORE, or an
array of SEMAPHOREs is used to provide mutual exclusion of a resource so that
separate programs cannot act on that resource at the same time.
There are no operations for the SEMAPHORE data type, but the following statements
use SEMAPHORE variables:
– WAIT Statement;
– SIGNAL Statement.
Execution Control chapter provides more information about using SEMAPHOREs.
3.2 Declarations
This section describes
– CONSTANT declarations,
– VARIABLE declarations,
– TYPE declarations.
– Shared types, variables and routines
pr-0-0-pdl_02.fm
00/0607 3-13
Data Representation
two attributes; a name and an unchanging value. A constant’s data type is understood
by its assigned value, which can be an INTEGER, a REAL, a BOOLEAN, or a STRING.
Within the program, the identifier can be used in place of the value.
The syntax for declaring a constant is as follows:
CONST
num_parts = 4
max_angle = 180.0
part_mask = 0xF3
test_flag = TRUE
error = ‘An error has occurred.’
PDL2 provides predefined constants for representing commonly used values. These
predefined constants are listed in Tab. 2.3 - Predefined Constants of Introduction to
PDL2 chapter.
pr-0-0-pdl_02.fm
3-14 00/0607
Data Representation
The meaning of each predefined node field is identical to the predefined variable having
the same name. These are described in the Motion Control chapter and Predefined
Variables List chapter.
The $MAIN_POS, $MAIN_JNTP, and $MAIN_XTND fields indicate the main destination
of a motion segment. A node definition can include only one of the $MAIN_ predefined
fields. The particular one chosen indicates the data type of the main destination.
If a predefined node field is used in the program and not included in the node definition,
the program editor will automatically insert that field in the declaration. This is called an
implicit declaration.
The NOTEACH clause is used to indicate that the fields declared in that declaration
should not be permitted to be changed while a path is being modified in the teaching
environment (MEMORY TEACH Command). (Refer to the Use of C4G Controller Unit
manual for more information on the teaching environment.)
Type declarations appear in a type declaration section, following the reserved word
TYPE. For example:
TYPE
ddd_part = RECORD GLOBAL -- declared to be IMPORTable by
-- other programs
name : STRING[15]
count : INTEGER
params : ARRAY[5] OF REAL
ENDRECORD
lapm_pth1 = NODEDEF
$MAIN_POS, $SEG_TERM_TYPE
$MOVE_TYPE
$SEG_WAIT NOTEACH
weld_sch : ARRAY[8] OF REAL
gun_on : BOOLEAN
ENDNODEDEF
The type declaration is just a definition for a new data type. This new data type can be
used for variable and parameter declarations.
pr-0-0-pdl_02.fm
00/0607 3-15
Data Representation
INTEGER
REAL
BOOLEAN
STRING [length]
ARRAY [rows <, columns>] OF item_type (see par. 3.1.5 ARRAY on
page 3-4)
record_type
node_type
VECTOR
POSITION
JOINTPOS <FOR ARM[number]>
XTNDPOS <FOR ARM[number]>
PATH OF node_type
SEMAPHORE
The possible values and ranges for length, rows, columns, and item_type are explained
in par. 3.1 Data Types on page 3-1 of current chapter.
The length of a STRING or the size(s) of an ARRAY can be specified with an * instead
of an actual value. If the * notation is used with a two-dimensional ARRAY, then two *
must be used (*, *). The * notation is used when importing STRING or ARRAY variables
from another program. The program owning the variable should specify the actual size
of the variable while the importing program(s) use the * notation (refer to the example in
the Shared Variables and Routines section of this chapter). If the variable is accessed
before an actual size for it has been determined, an error will occur. The actual size is
determined when a program or variable file specifying the actual size is loaded. The
importing programs can obtain the actual size using built-in routines (refer to BUILT-IN
Routines list chapter).
The * notation is not allowed in local routine variables or field definitions.
Arm designations are set up at the system level by associating an arm number with a
group of axes. They are not required for single arm systems (refer to the Use of C4G
Controller Unit manual).
If an arm designation is not specified in the declaration of a JOINTPOS or XTNDPOS,
the program attribute PROG_ARM is used. If PROG_ARM is not specified in the
program, the default arm ($DFT_ARM) is used.
The valid var_options are as follows:
– EXPORTED FROM clause and GLOBAL attribute
See par. 3.2.4 Shared types, variables and routines on page 3-18 for full details.
– initial_value
The initial_value clause is permitted on both program and routine variable
pr-0-0-pdl_02.fm
3-16 00/0607
Data Representation
declarations. However, it is only valid when the data type is INTEGER, REAL,
BOOLEAN, or STRING. This option specifies an initial value for all variables
declared in that declaration statement. For program variables, the initial value is
given to the variables at the beginning of each program activation and for routine
variables at the beginning of each routine call (refer to Routines chapter for more
information on routine variables.)
The initial value can be a literal, a predefined constant identifier, or a user-defined
constant identifier. The data type of the initial value must match the data type of the
variable declaration with the exception that an INTEGER literal may be used as the
initial value in a REAL variable declaration.
– NOSAVE attribute
The values of program variables may be saved in a variable file so that they can
be used the next time the program is activated. (Refer to the Use of C4G Controller
Unit manual for more information on variable files) The NOSAVE clause is used to
indicate that the variables declared in that declaration should not be saved to or
loaded from the variable file. This option is only permitted on program variable
declarations and applies to all variables declared in the declaration.
The NOSAVE clause is automatically added to all SEMAPHORE variable
declarations since they are never permitted in a variable file.
The NOSAVE option should be used on all program variable declarations that
include the initial value clause. If not specified, the program editor will give the user
a warning. The reason is that initialized variables will be given the initial value each
time the program is activated which, in effect, overrides any value loaded from the
variable file.
– CONST attribute
The CONST attribute can be applied to a variable to mean that it has privileged
write access and any read access: non-privileged users can neither set a value to
such a variable, nor pass it by reference to a routine. The only way to set a value
to it is to load it from a file by means of the ML/V Command
(Memory Load / Variables - for further details see System Commands chapter in
C4G Control Unit Use manual).
Variable declarations appear in a variable declaration section, following the reserved
word VAR. For example:
VAR
count, total : INTEGER (0) NOSAVE
timing : INTEGER (4500)
angle, distance : REAL
job_complete, flag_check, flag_1, flag_2 : BOOLEAN
error_msg : STRING[30] GLOBAL
menu_choices : ARRAY[4] OF STRING[30]
matrix : ARRAY[2, 10] OF INTEGER
offset : VECTOR
part_rec : ddd_part
pickup, perch : POSITION
safety_pos : JOINTPOS FOR ARM[2]
door_frame : XTNDPOS FOR ARM[3]
weld_node : lapm_pth1
weld_pth : PATH OF lapm_pth1
work_area : SEMAPHORE NOSAVE
default_part : INTEGER (OxFF) NOSAVE
pr-0-0-pdl_02.fm
00/0607 3-17
Data Representation
PROGRAM a PROGRAM b
VAR VAR
x : INTEGER EXPORTED FROM a y : REAL EXPORTED FROM b
y : REAL EXPORTED FROM b x : INTEGER EXPORTED FROM a
ary: ARRAY[5] OF REAL EXPORTED FROM a ary: ARRAY[*] OF REAL EXPORTED FROM a
BEGIN BEGIN
. . . . . .
END a END b
-- x and ary are open for other programs -- y is open for other programs to use
to use
-- y is owned by program b -- x and ary are owned by program a
pr-0-0-pdl_02.fm
3-18 00/0607
Data Representation
The EXPORTED FROM clause does not apply to routine local variables. In
addition, the initial value clause cannot be included when the EXPORTED FROM
clause specifies a program name different from the name of the program in which
the statement resides.
PROGRAM a
ROUTINE rout_a(x : INTEGER) EXPORTED FROM a
ROUTINE rout_b(x, y : INTEGER) EXPORTED FROM b
ROUTINE rout_a(x:INTEGER)
BEGIN
. . .
END rout_a
BEGIN
. . .
END a
-- rout_a is open for other programs to use
-- rout_b is owned by program b
variable_name GLOBAL
variable_name indicates the name of the declared variable. In such a way, the
declared variable can be accessed by other programs.
– The syntax for declaring a routine to be public, is as follows:
pr-0-0-pdl_02.fm
00/0607 3-19
Data Representation
The IMPORT statement must be used to import ANY GLOBAL types, variables and/or
routines from another program (see par. 10.27 IMPORT Statement on page 10-23).
The syntax for importing them is as follows:
IMPORT ‘prog_name’
prog_name is the name of the program which owns the types, variables and routines to
be imported. They all are imported in the current program without explicitly declaring
them.
The following example shows how to use the IMPORT clause and the GLOBAL
attribute, for shared variables.
PROGRAM a
IMPORT ‘b’ -- causes just y to be imported from program b
VAR
x : INTEGER GLOBAL -- declared to be public
ary : ARRAY [5] OF REAL GLOBAL -- declared to be public
ROUTINE rout(x:REAL) EXPORTED FROM a GLOBAL -- declared to be
-- public
BEGIN
. . .
END rout
BEGIN
. . .
END a
PROGRAM b
IMPORT ‘a’ -- causes x, ary and rout to be imported from program a
VAR
y : REAL GLOBAL -- declared to be public
i : INTEGER -- declared to be local to program b (not public)
BEGIN
. . .
END b
3.3 Expressions
Expressions are combinations of any number of constants, variables, function routines,
and literals joined with operators to represent a value. For example:
count + 1 -- arithmetic
VEC(a, b, c) * 2 -- arithmetic
count >= total -- relational
flag_1 AND flag_2 -- BOOLEAN
An expression has both a type and a value. The type is determined by the operators and
operands used to form it. Tab. 3.2 - Operation Result Types shows which operand data
types are allowed for which operators and what data types result. The resulting value
can be assigned to a variable of the same type using an assignment statement.
In Tab. 3.2 - Operation Result Types, the following abbreviations are used:
pr-0-0-pdl_02.fm
3-20 00/0607
Data Representation
I INTEGER V VECTOR
R REAL P POSITION
B BOOLEAN
(1) Only the operators = and <> may be used to compare VECTOR values.
pr-0-0-pdl_02.fm
00/0607 3-21
Data Representation
+= INTEGER increment
-= INTEGER decrement
VECTOR addition and subtraction require VECTOR operands and produce a VECTOR
result whose components are the sum or difference of the corresponding elements of
the operands.
VECTOR scaler multiplication and division require a VECTOR operand and an
INTEGER or REAL operand and produce results obtained by performing the operation
on each element in the vector (an INTEGER operand is treated as a REAL). If an
INTEGER or REAL number is divided by the VECTOR, that value is multiplied by the
reciprocal of each element of the VECTOR.
PDL2 provides built-in routines to perform common mathematical manipulations,
including rounding and truncating, trigonometric functions, and square roots (refer to
BUILT-IN Routines list chapter).
= equal
pr-0-0-pdl_02.fm
3-22 00/0607
Data Representation
x := -122704229 SHL 1
x := -122704229 ROL 1
NOTE that the Shift Left operation might cause the variable to become UNINIT: at
run time, an INTEGER PDL2 variable will assume the value of UNINIT
(uninitialized) if it becomes greater than MAXINT.
x := -122704229 SHR 1
pr-0-0-pdl_02.fm
00/0607 3-23
Data Representation
The operations performed by BOOLEAN, rotation, and shift operators are listed below.
Refer to BUILT-IN Routines list chapter for explanations of BIT_TEST, BIT_SET, and
BIT_CLEAR.
pr-0-0-pdl_02.fm
3-24 00/0607
Data Representation
Two POSITION operands result in a POSITION equivalent to the right hand operand,
but relative to the coordinate frame of the left hand operand. For example:
If parentheses are not used in an expression, the user should be aware of the
exact order in which the operators are performed. In addition, those parentheses
that are not required in the expression will automatically be removed by the
system. For example, the first IF statement below will actually produce the
following IF statement because the parentheses do not override normal operator
precedence
pr-0-0-pdl_02.fm
00/0607 3-25
Data Representation
ENDIF
If the FALSE test of $DIN[6] is to be ANDed with $DIN[5], parentheses must be used to
override operator precedence:
variable := expression
Examples of assignment statements:
count := count + 1
offset := VEC(a, b, c) * 2
menu_choices[7] := 7. Return to previous menu
part_rec.params[1] := 3.14
part_mask := 0xE4
weld_pth.NODE[3].$SEG_WAIT := FALSE
$MOVE_TYPE := LINEAR
The PATH and SEMAPHORE data types cannot be assigned values.
If the same value is assigned to more than one user-defined variable of the same data
type, multiple assignements can be put on the same line. System variables, predefined
node fields and path nodes are not allowed. For example:
3.5 Typecasting
This PDL2 feature involves INTEGER, BOOLEAN and REAL variables and values. It is
a very specific feature and it is used in very particular applications.
The case in which only INTEGER and REAL data types are involved differs from the one
in which also BOOLEAN data type is used. In both cases typecasting is expressed by
specifying in round brackets the data type to apply to the casting operation.
In case of typecasting between INTEGER and REAL data types, the variable or value
associated to the casting operation is read in the Controller memory and the bit pattern
that forms this value is considered; this bit pattern is then assigned to the destination of
the assignement or compared with the other operator of the expression.
pr-0-0-pdl_02.fm
3-26 00/0607
Data Representation
Then used in assignements, casting can only be specified on the right hand side. When
used in relational expressions, it can be specified in any side. This feature is allowed in
program statements, condition actions and condition expressions. INTEGER variables,
ports or values, and REAL variables or values are used.
Consider for example the numbers 0x40600000 and 0x3f99999A that are the
hexadecimal representation of the bit pattern of 3.5 and 1.2 numbers in the C3G
memory.
CONDITION[5] :
-- if real_var values 5.5 and int_var 0x3f99999A
-- the condition will trigger
WHEN (INTEGER)real_var> int_var DO
real_var := (REAL)3
WHEN $AOUT[13] < (INTEGER) real_var DO
int_var := (INTEGER)5.6
WHEN real_var > (REAL)int_var DO
$AOUT[7] := (INTEGER)5.6
WHEN real_var > (REAL)$AOUT[4] DO
int_var := (INTEGER)real_var
ENDCONDITION
In case of typecasting between INTEGER and BOOLEAN or REAL and BOOLEAN data
types, the typecasting consists in assigning the value of 1 or 1.0 to the destination
INTEGER or REAL variable respectively if the BOOLEAN variable (or port or value) is
TRUE, 0 otherwise.
This aspect of typecasting is not allowed in conditions handlers.
For example:
int_var := (INTEGER)bool_var
int_var := (INTEGER)$DOUT[5]
real_var := (REAL)bool_var
real_var := (REAL)$FDOUT[6]
pr-0-0-pdl_02.fm
00/0607 3-27
Data Representation
pr-0-0-pdl_02.fm
3-28 00/0607
Motion Control
4. MOTION CONTROL
This chapter describes the PDL2 statements that control arm motion and direct hand
operations.
Information are supplied about the following topics:
– MOVE Statement
– Motion along a PATH
– Stopping and Restarting motions
– ATTACH and DETACH Statements
– HAND Statements
pr-0-0-pdl_03.fm
00/0607 4-1
Motion Control
LINEAR
CIRCULAR
JOINT
The trajectory when specified with the MOVE statement, only affects the motion for
which it is designated.
If a trajectory clause is not included in the MOVE statement, the value of the predefined
variable $MOVE_TYPE is used. The programmer can change the value of
$MOVE_TYPE (JOINT by default) by assigning one of the trajectory predefined
constants, as follows:
pr-0-0-pdl_03.fm
4-2 00/0607
Motion Control
reach the final position. The trajectory of each motion can be specified as either JOINT,
LINEAR or CIRCULAR. A motion that is specified as having a JOINT trajectory will
cause all axis of the robot arm to start and stop moving at the same time. A motion with
a LINEAR trajectory will move the Tool Center Point of the robot arm in a straight line
from the start position to the end position. A motion that has a CIRCULAR trajectory will
move the Tool Center Point of the robot arm in an arc. The described below MOVE TO,
MOVE NEAR, MOVE AWAY, MOVE RELATIVE, MOVE ABOUT, MOVE BY, and
MOVE FOR statements all require a LINEAR or JOINT trajectory type, and cannot be
used with the CIRCULAR trajectory. For more information on the trajectories and
motion characteristics, refer to the Motion Programming manual.
4.1.3.1 MOVE TO
MOVE TO moves the designated arm to a specified destination. The destination can be
any expression resulting in one of the following types:
POSITION
JOINTPOS
XTNDPOS
For example:
pr-0-0-pdl_03.fm
00/0607 4-3
Motion Control
MOVE TO initial
MOVE CIRCULAR TO destination VIA arc
POSITION
JOINTPOS
XTNDPOS
For example:
pr-0-0-pdl_03.fm
4-4 00/0607
Motion Control
Fig. 4.2 - MOVE NEAR, TO, and AWAY shows an example of moving near, to, and
away from a position.
pr-0-0-pdl_03.fm
00/0607 4-5
Motion Control
4.1.3.7 MOVE BY
MOVE BY allows the programmer to specify a destination as a list of REAL expressions,
with each item corresponding to an incremental move for the joint of an arm.
For rotational axes, the units are degrees, and for transitional, they are millimeters.
For example:
pr-0-0-pdl_03.fm
4-6 00/0607
Motion Control
POSITION
JOINTPOS
XTNDPOS
Fig. 4.5 - MOVE FOR and MOVE TO shows an example of a MOVE FOR followed by a
MOVE TO.
pr-0-0-pdl_03.fm
00/0607 4-7
Motion Control
the motion starts. When ADVANCE is not specified, the interpreter waits for the motion
to be completed before continuing execution. Program execution can continue up to the
next programmed motion for the same arm.
For example:
AT VIA
TIME n AFTER START -- n is a time in milliseconds
TIME n BEFORE END
DISTANCE n AFTER START -- in cartesian movement only
DISTANCE n BEFORE END -- n is a distance in millimiters
DISTANCE n AFTER VIA
DISTANCE n BEFORE VIA
PERCENT n AFTER START -- in joint movement only
PERCENT n BEFORE END -- n is a number expressing a percentage
-- digital port events digital port states
pr-0-0-pdl_03.fm
4-8 00/0607
Motion Control
Any condition handler that has been defined can be included in a WITH clause. The
condition handler is enabled when the motion starts or restarts and disabled when the
motion is suspended, canceled, or completed. For further information on condition
handlers, refer to Chap. Condition Handlers.
For example:
pr-0-0-pdl_03.fm
00/0607 4-9
Motion Control
It is not necessary for the two trajectories of the fly motion to have the same Base
or Frame, but it is necessary to have the same Tool!
For example:
MOVE TO a
MOVEFLY TO b ADVANCE
MOVE TO c
Fig. 4.6 - MOVEFLY Between two Cartesian Motions shows the MOVEFLY example.
pr-0-0-pdl_03.fm
4-10 00/0607
Motion Control
The predefined variable $FLY_TYPE is used to control the speed of the arm during the
fly motion. If the predefined variable $FLY_TYPE is set to FLY_NORM (normal fly), the
speed of the arm will vary during fly. The FLY_CART modality provides a method of
achieving constant speed with an optimal trajectory between two cartesian motions.
This option is explained in detail in the Motion Programming manual.
The predefined variable, $FLY_PER, can be used to reduce the time in fly and to bring
the trajectory closer to the taught position. The predefine variable $FLY_PER only
effects the arm speed if the predefine variable $FLY_TYPE is set to FLY_NORM. When
$FLY_PER is in effect, the fly motion will begin at the start of normal deceleration for the
motion plus a time equal to 100% minus the percentage specified in $FLY_PER. For
example, if the value of $FLY_PER is 100%, the fly begins at the start of deceleration of
the fly motion. If $FLY_PER is 75%, then fly will begin after 25% of the decleration is
finished (75% will be combined with the next motion.) For more information refer to the
Motion Programming manual.
When normal non-fly motions are used (MOVE), the stopping characteristics of the
motion are determined by the predefined variable, $TERM_TYPE.
The FLY option must be specified using MOVEFLY. It cannot be specified in the
SYNCMOVE section. The program editor will replace SYNCMOVEFLY with
SYNCMOVE in the event of a mismatch.
pr-0-0-pdl_03.fm
00/0607 4-11
Motion Control
PROGRAM flycond1
VAR p1, p2, p3 : POSITION
BEGIN
$DOUT[17] := FALSE
CONDITION[1] :
WHEN AT END DO
$DOUT[17] := TRUE
ENDCONDITION
p1 := POS(400, -400, 1900, -93, 78, -62, ‘’)
p2 := POS(400, 400, 1900, -92, 79, -64, ‘’)
p3 := POS(800, 400, 1900, -92, 79, -64, ‘’)
MOVE LINEAR TO p1
MOVEFLY LINEAR TO p2 ADVANCE WITH CONDITION[1]
MOVE LINEAR TO p3
END flycond1
The output will not be set at p2 because the MOVEFLY does not reach this position.
Instead, the output will be set where the fly movement ends.
To set an output when the fly starts, use a WITH clause on the next MOVE statement to
activate a condition handler that sets the output at the start of a fly motion. For example:
PROGRAM flycond2
VAR p1, p2, p3 : POSITION
BEGIN
$DOUT[17] := FALSE
CONDITION[1] :
WHEN AT START DO
$DOUT[17] := TRUE
ENDCONDITION
p1 := POS(400, -400, 1900, -93, 78, -62, ‘’)
p2 := POS(400, 400, 1900, -92, 79, -64, ‘’)
p3 := POS(800, 400, 1900, -92, 79, -64, ‘’)
MOVE LINEAR TO p1
MOVEFLY LINEAR TO p2 ADVANCE
MOVE LINEAR TO p3 WITH CONDITION[1]
END flycond2
The output will not be set at p2, but at the beginning of the fly motion.
pr-0-0-pdl_03.fm
4-12 00/0607
Motion Control
If the node definition does not include a predefined node field, the value specified in a
WITH clause is used at each node. If a value is also not specified in a WITH clause, the
current value of the corresponding predefined motion variable is used. For example:
PROGRAM pth_motn
TYPE lapm_pth = NODEDEF
$MAIN_POS
$SEG_OVR
. . .
ENDNODEDEF
VAR pth1 : PATH OF lapm_pth
pr-0-0-pdl_03.fm
00/0607 4-13
Motion Control
BEGIN
. . .
$TERM_TYPE := COARSE
$MOVE_TYPE := LINEAR
MOVE ALONG pth1 WITH $SEG_TERM_TYPE = FINE
. . .
END pth_motn
In the above example, the segment override ($SEG_OVR) used in each path segment
will be obtained from each path node since this field is included in the node definition.
The termination type used in each path segment will be FINE due to the WITH clause.
However, the termination type of the last node segment will be COARSE since the value
of $TERM_TYPE applies to the last path node. The motion type ($MOVE_TYPE) will be
LINEAR for the entire path since $MOVE_TYPE is not a field in the node definition and
it is not specified in the WITH clause.
The $MAIN_POS, $MAIN_JNTP, and $MAIN_XTND fields indicate the main destination
of a path segment. A node definition can include only one of the $MAIN_ predefined
fields. The particular one chosen indicates the data type of the main destination. In order
to use a path in the MOVE ALONG statement, the node definition must include a main
destination predefined field.
The $CNFG_CARE, $LIN_SPD, $MOVE_TYPE, $ORNT_TYPE, $ROT_SPD,
$SING_CARE, $SPD_OPT, $TURN_CARE, and $WEAVE_NUM fields have the same
meaning as the predefined motion variables with the same name. Including them in a
node definition permits these motion parameters to be changed for each path segment.
The $SEG_TERM_TYPE, $SEG_FLY_TYPE, and $SEG_FLY_PER fields have
meanings corresponding to the non-segment predefined motion variables. The
difference is that they apply to each path segment. The corresponding non-segment
predefined motion variables apply to the last node only. If these fields are not included
in the node definition and the WITH clause, the corresponding non-segment predefined
motion variable is used.
For example:
PROGRAM pth_motn
TYPE lapm_pth = NODEDEF
$MAIN_POS
$SEG_OVR
. . .
ENDNODEDEF
VAR pth1 : PATH OF lapm_pth
BEGIN
. . .
$TERM_TYPE := FINE
MOVE ALONG pth1
. . .
END pth_motn
In the above shown example, since $SEG_TERM_TYPE is not a field of lapm_pth and
it is not included in a WITH clause, the value of $TERM_TYPE (FINE) is used at each
segment of the path motion.
The $SEG_FLY field has the same meaning as the FLY option on the MOVE keyword.
It is a boolean and if the value is TRUE, motion to the next node will FLY. This field does
not apply to the last node since the FLY option on the MOVE ALONG statement is used.
pr-0-0-pdl_03.fm
4-14 00/0607
Motion Control
PROGRAM pth
TYPE nd = NODEDEF -- PATH node definition
$MAIN_POS
$MOVE_TYPE
pr-0-0-pdl_03.fm
00/0607 4-15
Motion Control
$COND_MASK
$COND_MASK_BACK
i : INTEGER
b : BOOLEAN
ENDNODEDEF
-- The nodes of this path should either be taught or NODE_APPended
VAR p : PATH OF nd
BEGIN
CONDITION[10]:
WHEN TIME 10 AFTER START DO
......
ENDCONDITION
CONDITION[30] :
WHEN TIME 20 BEFORE END DO
......
ENDCONDITION
CONDITION[20] :
WHEN AT START DO
......
ENDCONDITION
......
p.COND_TBL[1] := 10 -- Initialization of COND_TBL
p.COND_TBL[2] := 15
p.COND_TBL[3] := 20
p.NODE[1].$COND_MASK := 5
p.NODE[4].$COND_MASK_BACK := 2
CYCLE
....
MOVE ALONG p -- move forward
MOVE ALONG p[5..1] -- move backward
....
END pth
In the example above, node 1 has the $COND_MASK set to 5. Bit 1 and 3 form the value
of 5. Therefore, for node 1, the conditions specified in element 1 and 3 of COND_TBL
(condition 10 and 20) will be used when moving forward from node 1 to node 2. Node 4
has the $COND_MASK_BACK set to 2. This means that the condition 15 specified in
COND_TBL element 2 will be used when moving backward from node 5 to node 4. Note
that the condition handler that are enabled are those corresponding to the program
executing the MOVE ALONG statement and not the program containing the MOVE
ALONG statement.
Refer also to Chap. Condition Handlers.
The $SEG_WAIT field is a boolean indicating whether or not processing of the path
should be suspended until the path is signalled. This field is used to obtain
synchronization between path segment processing and other aspects of the application
such as sensor detection, mutual exclusion, etc. If the value of the $SEG_WAIT field is
FALSE, path processing is not suspended at that node. If the value is TRUE, motion for
that node will complete but processing of following nodes will be suspended until the
path is signalled.
The $SEG_OVR field indicates the acceleration, deceleration, and speed override for
the path segment in a similar way as the $PROG_ACC_OVR, $PROG_DEC_OVR and
$PROG_SPD_OVR variables. If $SEG_OVR is not included in the node definition and
the WITH clause of the MOVE ALONG statement, the values of $PROG_ACC_OVR,
pr-0-0-pdl_03.fm
4-16 00/0607
Motion Control
$PROG_DEC_OVR, and $PROG_SPD_OVR are used for each segment of the path
motion.
The $SEG_TOL field indicates the tolerance for the path segment. This has the same
meaning as $TOL_FINE or $TOL_COARSE depending on whether the termination type
of the path segment is FINE or COARSE. This field does not apply to the last node since
the $TOL_FINE or $TOL_COARSE will be used based on the value of $TERM_TYPE
which is also applied to the last node.
The $SEG_DATA field indicates whether the data of the node should be used for the
last node segment. If the value is TRUE, the values of the $SEG_TERM_TYPE,
$SEG_FLY_TYPE, $SEG_FLY_PER, $SEG_FLY, and $SEG_TOL fields are used for
the last node segment instead of the values of the corresponding predefined variables.
pr-0-0-pdl_03.fm
00/0607 4-17
Motion Control
This format allows a path to be executed in any order desired. For example,
pr-0-0-pdl_03.fm
4-18 00/0607
Motion Control
motion_variable = value
The following predefined motion variables can be used in a WITH clause of a MOVE
ALONG statement (refer to the Chap. Predefined Variables List for their meanings):
The WITH clause affects only the motion caused by the MOVE ALONG statement. The
results of setting the segment related predefined variables will be seen at each path
segment only if the corresponding predefined node field is not included in the path node
definition. For example:
pr-0-0-pdl_03.fm
00/0607 4-19
Motion Control
$MOVE_TYPE = LINEAR,
ENDMOVE
CANCEL CURRENT
CANCEL CURRENT SEGMENT
CANCEL CURRENT FOR ARM[1], ARM[2]
CANCEL CURRENT SEGMENT FOR ARM[3]
CANCEL CURRENT FOR ALL
pr-0-0-pdl_03.fm
4-20 00/0607
Motion Control
CANCEL ALL
CANCEL ALL SEGMENT
CANCEL ALL FOR ARM[1], ARM[2]
CANCEL ALL SEGMENT FOR ARM[3]
CANCEL ALL FOR ALL
CANCEL ALL SEGMENT FOR ALL
LOCK
LOCK ARM[1], ARM[2]
LOCK ALL
Unlike CANCEL, LOCK prevents pending motions or new motions from starting on the
locked arm. The motion can be resumed only by issuing an UNLOCK statement from
the same program that issued the LOCK followed by a RESUME statement. The
RESUME can be issued from any program. Please note that there shouldn’t be any
program which attached the arm!
For example:
pr-0-0-pdl_03.fm
00/0607 4-21
Motion Control
ATTACH ARM
ATTACH ARM[1], ARM[2]
ATTACH ARM ALL
Once a program has attached an arm, only that program can initiate motion for the
attached arm. If a MOVE or RESUME statement is issued from a different program, it
is an error causing the program to be paused.
In addition to the ATTACH statement, a program can attach an arm using the ATTACH
attribute on the PROGRAM statement. In this case, the PROG_ARM is attached when
the program is activated. If that arm is currently attached to another program or it is
currently being used in a motion, the program will not be activated. If the programmer
doesn’t want the PROG_ARM to be attached when the program is activated, the
DETACH attribute must be specified on the PROGRAM statement. The default is to
attach the PROG_ARM. (Refer to Statements List chapter for further details on the
PROGRAM statement and its attributes.)
pr-0-0-pdl_03.fm
4-22 00/0607
Motion Control
The DETACH statement terminates exclusive motion control of the default arm, a list of
arms, or all arms currently attached by the program.
DETACH ARM
DETACH ARM[1], ARM[2]
DETACH ARM ALL
CANCEL motion statements can be issued by any program while the arm is attached.
OPEN HAND 1
CLOSE HAND 2
RELAX HAND 2
The programmer can also designate a particular arm, a list of arms, or all arms as
follows:
Note that, if the HAND has not been configured yet, the pressure of T1 and T2 will
not set any output by default.
pr-0-0-pdl_03.fm
00/0607 4-23
Motion Control
– OPEN sets line 1 to the active value, waits a delay time, and sets line 1 to the
inactive value;
– CLOSE sets line 2 to the active value, waits a delay time, and sets line 2 to the
inactive value;
– RELAX is the same as CLOSE.
Step
– OPEN sets line 1 to the active value, waits a delay time, and sets line 2 to the active
value;
– CLOSE sets line 2 to the inactive value, waits a delay time, and sets line 1 to the
inactive value;
– RELAX is the same as CLOSE.
pr-0-0-pdl_03.fm
4-24 00/0607
INPUT/OUTPUT Port Arrays
5.1 General
Current chapter explains the following types of port arrays used in PDL2:
– digital, group, flexible, and analog port arrays, configured by the user to
accommodate specific application I/O (par. 5.2 User-defined and Appl-defined Port
I/O on page 5-4);
– system-defined port arrays, internally mapped for system devices such as operator
devices, arms, and timers (par. 5.3 System-defined Port Arrays on page 5-5);
– shared memory port arrays used by PDL2 programs to communicate one another
(par. 5.4 Shared Memory Port Arrays on page 5-16);
– user-defined port arrays used for user-defined device access (par. 5.6
User-defined Device Access on page 5-18).
Tab. 5.1 - Port Arrays lists the I/O-related port arrays used by PDL2.
pr-0-0-pdl_05.fm
00/0607 5-1
INPUT/OUTPUT Port Arrays
REPEAT
check_routine
UNTIL $AIN[34] > max
body_type := $GIN[3]
SELECT body_type OF
CASE(1):
$GOUT[1] := four_door
CASE(2):
$GOUT[2] := two_door
CASE(3):
$GOUT[3] := hatch_back
ELSE:
type_error
ENDSELECT
A program can always obtain the value of a port array. The value received from reading
an output port corresponds to the last value that was written to that port.
A program can assign values to user-defined output port arrays and the system-defined
$FDOUT port array.
When the Controller is in PROGR state, additional checks are performed before
allowing an output to be set. The additional rules for setting the outputs of a digital,
analog or group port are listed below. If any of these conditions are met, the output
cannot be set:
– by an active program;
pr-0-0-pdl_05.fm
5-2 00/0607
INPUT/OUTPUT Port Arrays
– when executing a statement that sets an output from the PC keyboard (WinC4G
Program is active) while the Teach Pendant is out of the cabinet. An exception to
this rule exists if a PDL2 program has bit 3 of $PROG_CNFG set to 0; in this case
all output settings are allowed. ($PROG_CNFG is a program system variable that
defaults to the current value of $CNTRL_CNFG when the program is activated);
– when executing under the PROGRAM EDIT or the MEMORY DEBUG Commands
from the PC video/keyboard (WinC4G Program) and the Teach Pendant is out of
the cabinet.
In addition, these outputs cannot be set in AUTO mode with the Teach Pendant out of
the cabinet.
(3) A A A A $DOUT
A A A A Sys_call
Tab. 5.2 - Protection on I/O shows the cases in which the setting of these outputs is
allowed or disallowed when operating in PROGR state. Here follow some notes useful
for understanding Tab. 5.2 - Protection on I/O:
– ‘A’ indicates the operation is allowed, ‘D’ means disallowed. The position of A or
D depends on the variable whose value allows or disallows the setting of the I/O.
For example, if ‘A’ is below $CNTRL_CNFG, this means that the operation
described at that line is based on the value of that variable. If only a ‘A’ or ‘D’ is
present, the operation is always allowed/disallowed independent of the value of the
variable. It remains in the column to indicate that the variable can determine the
permission of the operation in other circumstances. When ‘A’ or ‘D’ is in the middle
of the box, it means that the operation is independent from the value of
$PROG_CNFG and $CNTRL_CNFG. When the space is blank, it means that the
protection is not related to the corresponding variable ($PROG_CNFG or
$CTRL_CNFG);
– (1): Case of Operations Panel switch turned to T1, TP out of cabinet. Operations
performed from the PC keyboard (WinC4G tool active);
– (2): Case of Operations Panel switch turned to T1, TP out of cabinet. Operations
performed from TP;
– (3): Case of Operations Panel switch turned to T1, TP on cabinet. Operations
performed from the PC keyboard (WinC4G tool active);
– (*): This situation occurs when, starting with the TP out of the cabinet in PROGR
state, the Operations Panel switch is turned to REMOTE without putting the TP on
the cabinet. This situation is reported in bit 7 of the $SYS_STATE system variable;
pr-0-0-pdl_05.fm
00/0607 5-3
INPUT/OUTPUT Port Arrays
– Execute is the command available at the system menu for executing a PDL2
statement at the command level;
– SetOutputF is an abbreviation of the SetOutputForce/Unforce commands and
identifies an example of all the commands that act on outputs in the system;
– PDL2 Prog refers to the state when the action on an output is performed from a
PDL2 program;
– PE/MD indicates PROGRAM EDIT and MEMORY DEBUG. This column illustrates
what happens when a PDL2 statement that acts on an output is executed when
operating in the environments shown;
– $DOUT indicates a PDL2 statement acting on an output (i.e. $DOUT(XX) := ON);
– Sys_call indicates a SYS_CALL of a command that acts on an output, for example
SYS_CALL(‘SOFD, ‘17’, ‘T’), and not another SYS_CALL such as
SYS_CALL(‘E’,’$DOUT(17) := T’).
pr-0-0-pdl_05.fm
5-4 00/0607
INPUT/OUTPUT Port Arrays
Any association between digital and group I/O is done at the system level as part of the
user-defined I/O configuration. An input or output port that is associated with a group
input or output can be accessed using the $DIN or $DOUT or $IN or $OUT port array.
Each $GIN/$GOUT can be composed by a maximum of two groups of the same port
type. For example, $GOUT[3] can include $DOUT[3..7] and $DOUT[12..14].
pr-0-0-pdl_05.fm
00/0607 5-5
INPUT/OUTPUT Port Arrays
$SDIN Meaning
1 reserved
2 TP inserted (°)
3-4 reserved
5 AUTO selector position
6 T1 selector position
7 reserved
8 T2 selector position
9 DRIVE ON from remote
10 Not DRIVE OFF from remote
11 Start from remote
12 Not Hold from remote
13 U1 from remote
14 U2 from remote
15 U3 from remote
16 U4 from remote
17..21 reserved
22 REMOTE selector position
23-32 reserved (*)
pr-0-0-pdl_05.fm
5-6 00/0607
INPUT/OUTPUT Port Arrays
145 DRIVE ON
146 No DRIVE OFF
147 Start
148 Not hold
149 U1
150 U2
151 U3
152 U4
153 Cancel alarm
pr-0-0-pdl_05.fm
00/0607 5-7
INPUT/OUTPUT Port Arrays
pr-0-0-pdl_05.fm
5-8 00/0607
INPUT/OUTPUT Port Arrays
Note: “Application dependent” bits are only used after a call, by a PDL2 program, to ON_POS_SET_DIG
(followed by ON_POS) or ON_TRAJ_SET_DIG built-in.
(*) When Sik devices are present in the System, in order to handle the SIK feature, these signals are reserved
by the System for I/O configuration of the Sik device. For further details about Sik device and how to use it,
refer to AUX_DRIVES Built-In Procedure in current manual, Use of C4G Controller manual - IO_TOOL
Program - IO_INST Program - SETUP Page chapters, Integration guidelines Safeties, I/O,
Communications manual.
(°) Note that if the ESM safety module is present, the information related to $SDIN[56] is “Wired TP” (1 = TP4i,
0 = WiTP)
$SDOUT Meaning
2
WiTP pairing available (if ESM safety module is present)
3 reserved
4 Not Alarm to remote
5..8 reserved
9 DRIVE ON / Not OFF to remote
10 Start / Not Hold in running to remote
11 Not AUTO / REMOTE to remote
12 Teach Enable (DRIVE ON + T1 or T2) / Not Disable to remote
13 U1 to remote (LED)
14 U2 to remote (LED)
15 U3 to remote (LED)
16 U4 to remote (LED)
17 T2
18 Panel Start
19 Panel reset
20 Local emergency stop
21 System I/O simulated
22-32 reserved (*)
pr-0-0-pdl_05.fm
00/0607 5-9
INPUT/OUTPUT Port Arrays
97 Standby
98 Jog active
99 Holdable programs running
100 Em/Auto/Gen stop alarm active
101 winC4G on PC connected
102 reserved
103 TP disconnected in PROGR state
104 State selector on T2
105 Power Failure recovery in progress
106 Teach Pendant on cabinet
107 Enabling device activated
108 - 109 reserved
110 State selector on REMOTE
111 State selector on AUTO
112 State selector on T1
113 Hold request to remote
114 Hold button latched on TP
115 reserved
116 DRIVE OFF to remote
117 DRIVE OFF button latched on
118 reserved
119 TP connected
120 Alarm due to high severity error
121 System in REMOTE
122 Start button pressed
123 System in alarm
124 System in PROGR / AUTO-T
125 System in AUTO / REMOTE
126 System in Hold
127 Drives status
128 reserved
pr-0-0-pdl_05.fm
5-10 00/0607
INPUT/OUTPUT Port Arrays
(*) When Sik devices are present in the System, in order to handle the SIK feature, these signals are reserved
by the System for I/O configuration of the Sik device. For further details about Sik device and how to use it,
refer to AUX_DRIVES Built-In Procedure in current manual, Use of C4G Controller manual - IO_INST
Program - IO_TOOL Program - SETUP Page chapters, Integration guidelines Safeties, I/O,
Communications manual - Axes expansion chapter.
pr-0-0-pdl_05.fm
00/0607 5-11
INPUT/OUTPUT Port Arrays
REC key that can also be selected using either the Setup Page on TP4i/WiTP or the
menus of IDE, PROGRAM EDIT and MEMORY DEBUG environments.
The FDOUTs related to the TP cannot be assigned at the PDL2 program level. Some
led’s are handled ONLY when working in the IDE, I/O Page, PROGRAM EDIT,
MEMORY DEBUG, and EZ environments. These are marked with an asterisk in the
“Element” column.
pr-0-0-pdl_05.fm
5-12 00/0607
INPUT/OUTPUT Port Arrays
pr-0-0-pdl_05.fm
00/0607 5-13
INPUT/OUTPUT Port Arrays
(**) In case of TP4i/WiTP Teach Pendant, these $FDIN/$FDOUT detect variations only if TPINT Page or
Virtual Keyboard are active.
pr-0-0-pdl_05.fm
5-14 00/0607
INPUT/OUTPUT Port Arrays
(**) In case of TP4i/WiTP Teach Pendant, these $FDIN/$FDOUT detect variations only if TPINT Page or
Virtual Keyboard are active.
5.3.3 $HDIN
The $HDIN port array allows a program read-only access to a motion event port. Items
in the array correspond to high speed digital input signals.
$HDIN is a special port monitored by the motion environment. Any input on one of these
lines triggers a hardware interrupt signal. The motion environment reacts according to
how the port is set up. For example, it could cause an arm to stop and/or record its
current position.
The array index for the $HDIN port array corresponds to the DSA board number.
The user is responsible for installing the connection from the $HDIN port to detection
devices to use with this port.
The HDIN_SET and HDIN_READ built-in routines are used for handing the $HDIN from
a PDL2 program. Also the $HDIN_SUSP (field of $DSA_DATA) system variable must
be considered.
pr-0-0-pdl_05.fm
00/0607 5-15
INPUT/OUTPUT Port Arrays
Refer to the BUILT-IN Routines list and Predefined Variables List chapters for further
details.
5.3.4 $TIMER
The $TIMER port ARRAY allows a program read and write access to a system timer.
The array index corresponds to individual timers. Their values are expressed as
INTEGER values measured in milliseconds. The system timers run continuously.
$TIMER is accessible by all running programs. The ATTACH statement can be used to
disallow read and write access to a timer by other program code. When a timer is
attached, only code belonging to the same program containing the ATTACH statement
can access the timer. The DETACH statement is used to release exclusive control of a
timer. The value of the timer is not changed when it is attached or detached. For more
information, refer to the description of the ATTACH & DETACH statements in
Statements List chapter.
$TIMER values are preserved during Power Failure Recovery: no $TIMER value is lost.
A timer overflow generates trappable error 40077.
5.4.1 $BIT
The $BIT port array allows a program access to a bit array, PDL2 treats this as
BOOLEAN data. The maximum index value for $BIT port array is 200.
5.4.2 $WORD
The $WORD port array allows a program to access to a word. PDL2 treats this as an
INTEGER data, where only the 16th significative bits of each word are meaningful.
The first 20 elements of $WORD have predefined meanings of usage and The first 20
elements of $WORD are mapped to specific system inputs and outputs. Note that these
$WORDs can be used by PDL2 programs as temporary integer storage locations in read
and write access, but some of them are continuously updated by the system.
The elements starting at $WORD[21] are available to the user.
pr-0-0-pdl_05.fm
5-16 00/0607
INPUT/OUTPUT Port Arrays
pr-0-0-pdl_05.fm
00/0607 5-17
INPUT/OUTPUT Port Arrays
$DIN/$DOUT/$IN/$OUT/$FMI/$FMO cleared
$BIT cleared
$AIN/$AOUT cleared
$GIN/$GOUT cleared
$WORD cleared
PDL2 program deactivated and erased from memory
Note that forced $DIN, $DOUT, $IN, $OUT, $GIN, $GOUT, $AIN, $AOUT, $FMI, $FMO
are cleared also if they were previously forced.
$DIN/$DOUT/$IN/$OUT/$FMI/$FMO cleared
$BIT retentive bits (1-512) frozen, non-retentive
bits cleared
$AIN/$AOUT frozen
$GIN/$GOUT frozen
$WORD frozen
PDL2 program saved (a non-holdable program continues
where it left off; for an holdable program, you
must also turn the drives ON and press the
START key to resume motion)
$TIMER frozen
Forced $DIN, $DOUT, $IN, $OUT, $AIN, $AOUT, $GIN, $GOUT, $FMI, $FMO are
frozen upon a power failure.
pr-0-0-pdl_05.fm
5-18 00/0607
INPUT/OUTPUT Port Arrays
– $USER_LEN
– $PROG_UBIT
– $PROG_UBYTE
– $PROG_UWORD
– $PROG_ULONG
– $PROG_UADDR
– $PROG_ULEN
5.6.1 $USER_BIT
The $USER_BIT port array allows a program to access bits in memory at an address
defined by the user. PDL2 treats this variable as an array of BOOLEAN data.
The starting address from which bits are counted is specified in $USER_ADDR [1]. Note
that the bits numbering considers the byte in memory to which each bit belongs. For
example, $USER_BIT[4] is the 4th bit, starting from the right, inside the first byte respect
to the address specified in $USER_ADDR[1]; $USER_BIT[10] is the 2nd bit, starting
from the right, of the second byte respect to the address specified in $USER_ADDR[1].
5.6.2 $USER_BYTE
The $USER_BYTE port array allows a program to access bytes in memory at an
address defined by the user. PDL2 treats this variable as an array of INTEGER data.
5.6.3 $USER_WORD
The $USER_WORD port array allows a program to access words (2 bytes) in memory
at an address defined by the user. PDL2 treats this variable as an array of INTEGER
data.
5.6.4 $USER_LONG
The $USER_LONG port array allows a program to access longwords (4 bytes) in
memory at an address defined by the user. PDL2 treats this variable as an array of
INTEGER data.
A precise sequence of operations need to be followed for correctly using these
variables. Two other predefined variables must be considered: $USER_ADDR and
$USER_LEN.
Before using $USER_BIT, $USER_BYTE, $USER_WORD, $USER_LONG, the
corresponding $USER_ADDR and $USER_LEN element must be properly initialized in
order to determine the range of memory that user programs are allowed to access.
5.6.5 $USER_ADDR
It is an array of four elements where each one defines the starting memory address for:
$USER_ADDR[1] : starting memory address for $USER_BIT
$USER_ADDR[2] : starting memory address for $USER_BYTE
$USER_ADDR[3] : starting memory address for $USER_WORD
pr-0-0-pdl_05.fm
00/0607 5-19
INPUT/OUTPUT Port Arrays
5.6.6 $USER_LEN
It is an array of four elements where each one defines the length of memory for each:
$USER_LEN[1] : length of memory for $USER_BIT
$USER_LEN[2] : length of memory for $USER_BYTE
$USER_LEN[3] : length of memory for $USER_WORD
$USER_LEN[4] : length of memory for $USER_LONG
Depending on the user-defined port array, the index defines a different offset respect to
the first array element.
For example,
$USER_BYTE[5] will access the fifth byte starting from
$USER_ADDR[2];
$USER_LONG[5] will access to the fifth longword starting from
$USER_ADDR[4].
If, for example, a portion of 100 bytes of memory need to be accessed starting from the
address defined in variable adr_var, the PDL2 program should be structured like:
PROGRAM example NOHOLD
VAR int_var, adr_var : INTEGER
VAR bool_var : BOOLEAN
BEGIN
-- assign the memory address to adr_var
adr_var := .....
-- set the starting address and length of memory for BYTE
-- memory access
$USER_LEN[2] := 100
$USER_ADDR[2] := adr_var
....
-- read the first byte from address adr_var
int_var := $USER_BYTE[1]
-- read the fifth byte at address adr_var
int_var := $USER_BYTE[5]
-- write a value in the third byte respect to adr_var
$USER_BYTE[3] :=25
-- set the starting address and length of memory for BIT
-- memory access
$USER_ADDR[1] := adr_var
$USER_LEN[1] := 100
-- access to the fifth bit starting from adr_var address
bool_var := $USER_BIT[5]
END example
The previously described user-defined port arrays are available to the entire system and
any PDL2 program can use them. This means that multiple programs can
contemporarely access these variables and it is therefore important to avoid
interferences in memory access. If for example one program assigns a certain value to
$USER_ADDR[2] and then another program defines it again with another value, the first
program will access to a different memory location when using $USER_BYTE.
For solving this kind of problems, another set of user-defined port array variables can be
used:
pr-0-0-pdl_05.fm
5-20 00/0607
INPUT/OUTPUT Port Arrays
5.6.7 $PROG_UBIT
The $PROG_UBIT port array allows a program to access bits in memory at an address
defined by the user. PDL2 treats this variable as an array of BOOLEAN data.
The starting address from which bits are counted is specified in $PROG_UADDR[1].
Note that the bits numbering considers the byte in memory to which each bit belongs
to. For example, $PROG_UBIT[4] is the 4th bit, starting from the right, inside the first
byte respect to the address specified in $PROG_UADDR[1]; $PROG_UBIT[10] is the
2nd bit, starting from the right, of the second byte respect to the address specified in
$PROG_UADDR[1].
5.6.8 $PROG_UBYTE
It is used for accessing bytes in memory at an address defined by the user. PDL2 treats
this variable as an array of INTEGER data.
5.6.9 $PROG_UWORD
It is used for accessing words (2 bytes) in memory at an address defined by the user.
PDL2 treats this variable as an array of INTEGER data.
5.6.10 $PROG_ULONG
It is used for accessing longwords (4 bytes) in memory at an address defined by the
user. PDL2 treats this variable as an array of INTEGER data. The difference respect to
$USER_xxx predefined set of variables is that the starting address and the length of
memory that can be accessed with $PROG_Uxxx variables is local to programs. Each
PDL2 program has its own $PROG_UADDR and $PROG_ULEN and programs cannot
interfere each other in the definition of these variables:
5.6.11 $PROG_UADDR
It is an array of four elements where each one defines the starting memory address for:
$PROG_UADDR[1] : starting memory address for $PROG_UBIT
$PROG_UADDR[2] : starting memory address for $PROG_UBYTE
$PROG_UADDR[3] : starting memory address for $PROG_UWORD
$PROG_UADDR[4] : starting memory address for $PROG_ULONG
5.6.12 $PROG_ULEN
It is an array of four elements where each one defines the length of memory for:
$PROG_ULEN[1] : length of memory for $PROG_UBIT
$PROG_ULEN[2] : length of memory for $PROG_UBYTE
$PROG_ULEN[3] : length of memory for $PROG_UWORD
$PROG_ULEN[4] : length of memory for $PROG_ULONG
Also for this set of variables it is necessary to first define the starting address and length
before using $PROG_UBIT, $PROG_UBYTE, $PROG_UWORD, $PROG_ULONG.
Also refer to Predefined Variables List chapter.
pr-0-0-pdl_05.fm
00/0607 5-21
INPUT/OUTPUT Port Arrays
pr-0-0-pdl_05.fm
5-22 00/0607
Execution Control
6. EXECUTION CONTROL
Current chapter describes PDL2 statements that control the order in which statements
are executed within a program and the order in which multiple programs are executed.
Statements that control execution within a program are called Flow Control Statements.
The following Flow Control Statements are available:
– IF Statement
– SELECT Statement
– FOR Statement
– WHILE Statement
– REPEAT Statement
– GOTO Statement
It is strongly recommended to avoid using cycles in the program which stress too
much the CPU. For example, REPEAT..UNTIL cycle with the UNTIL condition
which is always FALSE (so that the cycle is always releated) and WAIT FORs
inside which condition is always true. A simplified representation of such
situation is :
vb_flag := TRUE
vb_flag2 := FALSE
REPEAT
WAIT FOR vb_flag -- condition always true
UNTIL vb_flag2 -- infinite loop
Cycles like this can cause a nested activity of the processes in the system
software making it difficult to get the CPU by low priority tasks. If this situation
lasts for a long period, the error “65002-10 : system error Par 2573” can occur. It
is recommended, in this case, to change the logic of the program.
Statements that control execution of entire programs are called Program Control
Statements.
The following Program Control Statements are available:
– ACTIVATE Statement
– PAUSE Statement
– UNPAUSE Statement
– DEACTIVATE Statement
– CYCLE and EXIT CYCLE Statements
– DELAY Statement
– WAIT FOR Statement
pr-0-0-pdl_06.fm
00/0607 6-1
Execution Control
– BYPASS Statement
Statements that control multiple programs execution are called Program
Synchronization Statements.
A detailed description of Program Scheduling is also available.
6.1.1 IF Statement
The IFstatement allows a program to choose between two possible courses of action,
based on the result of a BOOLEAN expression. If the expression is TRUE, the
statements following the IF clause are executed. Program control is then transferred to
the statement following the ENDIF. If the expression is FALSE, the statements following
the IF clause are skipped and program control is transferred to the statement following
the ENDIF. Fig. 6.1 - IF Statement Execution shows the execution of an IF statement.
An optional ELSE clause, placed between the last statement of the IF clause and the
ENDIF, can be used to execute a series of statements if the BOOLEAN expression is
FALSE. Fig. 6.2 - ELSE Clause Execution shows the execution of an IF statement with
the optional ELSE clause.
The syntax for an IF statement is as follows:
IF bool_exp THEN
<statement>...
<ELSE
<statement>...>
ENDIF
pr-0-0-pdl_06.fm
6-2 00/0607
Execution Control
Any executable PDL2 statements can be nested inside of IF or ELSE clauses, including
other IF statements.
Examples of the IF statement:
IF car_num =3 THEN
num_wheels :=4
ENDIF
pr-0-0-pdl_06.fm
00/0607 6-3
Execution Control
IF part_ok THEN
good_parts := good_parts + 1
ELSE
bad_parts := bad_parts + 1
ENDIF
pr-0-0-pdl_06.fm
6-4 00/0607
Execution Control
An optional ELSE clause, placed between the last case and the ENDSELECT
statement, can be used to execute a series of statements if the INTEGER expression
does not match any of the case values. Without this ELSE clause, a failure to match a
case value results in an error.
The syntax for a SELECT statement is as follows:
SELECT int_exp OF
CASE (int_val <, int_val>...):
<statement>...
<CASE (int_val <, int_val>...):
<statement>... >...
<ELSE:
<statement>...>
ENDSELECT
The INTEGER values in each case can be predefined or user-defined constants or
literals. Expressions are not allowed. In addition, the same INTEGER value cannot be
used in more than one case.
Example of a SELECT statement:
SELECT tool_type OF
CASE (1):
$TOOL := utool_weld
style_weld
CASE (2):
$TOOL := utool_grip
style_grip
CASE (3):
$TOOL := utool_paint
style_paint
ELSE:
tool_error
ENDSELECT
Before each loop iteration, the value of the INTEGER variable is compared to the ending
value. If the loop is written to count up, from the starting value TO the ending value, then
a test of less than or equal is used. If this test initially fails, the loop is skipped. If the
STEP value is one, the loop is executed the absolute value of (the ending value - the
starting value + 1) times.
pr-0-0-pdl_06.fm
00/0607 6-5
Execution Control
If the loop is written to count down, from the starting value DOWNTO the ending value,
a test of greater than or equal is used. If this test initially fails, the loop is skipped. If the
STEP value is one, the loop is executed the absolute value of (the ending value - the
starting value - 1) times.
Even if the starting and ending values are equal, the loop is still executed one time
An optional STEP clause can be used to change the stepping value from one to a
different value. If specified, the INTEGER variable is incremented or decremented by
this value instead of by one each time through the loop. The STEP value, when using
either the TO or DOWNTO clause, should be a positive INTEGER expression to ensure
that the loop is interpreted correctly.
pr-0-0-pdl_06.fm
6-6 00/0607
Execution Control
WHILE bool_exp DO
<statement>...
ENDWHILE
Example of a WHILE statement:
pr-0-0-pdl_06.fm
00/0607 6-7
Execution Control
REPEAT
<statement>...
UNTIL bool_exp
Example of a REPEAT statement:
REPEAT
WRITE (Exiting program, NL) -- statement list 1
WRITE (Are you sure? (Y/N) : )
READ (ans)
UNTIL (ans = Y) OR (ans = N)
IF ans = Y THEN
DEACTIVATE prog_1 -- statement list 2
ENDIF
GOTO statement_label
pr-0-0-pdl_06.fm
6-8 00/0607
Execution Control
GOTO statements should be used with caution. The label must be within the same
routine or program body as the GOTO statement. Do not use a GOTO statement to jump
into or out of a structured statement, especially a FOR loop, because this will cause a
run-time error.
PROGRAM prog_1
VAR jump : BOOLEAN
BEGIN
. . .
IF jump THEN
GOTO ex
ENDIF
. . .
ex:: WRITE (This is where the GOTO transfers to.)
. . .
END prog_1
pr-0-0-pdl_06.fm
00/0607 6-9
Execution Control
PROGR = programming
AUTO = AUTO-T, AUTO, REMOTE
pr-0-0-pdl_06.fm
6-10 00/0607
Execution Control
PROG_STATE (prog_name_str)
prog_name_str can be any valid string expression. This function returns an INTEGER
value indicating the program state of the program specified by prog_name_str. For a list
of the values returned by this function, refer to the “Built-In Routine List” chapter.
pr-0-0-pdl_06.fm
00/0607 6-11
Execution Control
and ready programs are paused. The statement has no effect on programs that are not
executing.
For example:
PAUSE
PAUSE weld_main, weld_util, weld_cntrl
PAUSE ALL
pr-0-0-pdl_06.fm
6-12 00/0607
Execution Control
DEACTIVATE
DEACTIVATE weld_main, weld_util, weld_cntrl
DEACTIVATE ALL
CYCLE
The BEGIN statement syntax using the CYCLE option is as follows:
BEGIN CYCLE
The EXIT CYCLE statement causes program execution to skip the remainder of the
current cycle and immediately begin the next cycle. An exited cycle cannot be resumed.
Exiting a cycle cancels all pending and current motion, cancels all outstanding
asynchronous statements, and resets the program stack.
NOTE that the EXIT CYCLE statement does NOT reset the current working
directory and the $PROG_ARG predefined variable (which contains the line
argument passed in when the program was activated).
Exiting a cycle does NOT close files, detach resources, disable or purge condition
handlers, or unlock arms. Consequently, it is more powerful than a simple GOTO
statement. The EXIT CYCLE statement can be used in the main program as well as
routines.
The EXIT CYCLE statement syntax is as follows:
pr-0-0-pdl_06.fm
00/0607 6-13
Execution Control
DELAY int_expr
The int_expr indicates the time to delay in milliseconds.
pr-0-0-pdl_06.fm
6-14 00/0607
Execution Control
WAIT semaphore_var
SIGNAL semaphore_var
When a program wants a resource, it uses the WAIT statement. When the program
finishes with the resource it uses the SIGNAL statement. If another program is waiting
for that resource, that program can resume executing. Synchronization is done on a first
in first out basis.
Since PDL2 semaphores count, it is important to have a matching number of SIGNALs
and WAITs. Too many signals will violate mutual exclusion of the resource (unless
multiple instances of the resource exist). For example, when programs badsem1 and
badsem2 outlined below are activated, the mutual exclusion will function properly for the
first cycle. However, upon the second cycle of the programs, we lose mutual exclusion
because there is one too many SIGNALs in badsem1.
If the first SIGNAL statement of badsem1 were above the CYCLE statement, all would
be ok for the following cycles.
PROGRAM badsem1
VAR resource : SEMAPHORE EXPORTED FROM badsem1
BEGIN
CYCLE
SIGNAL resource --to initialize semaphore
. . .
WAIT resource
-- mutual exclusive area
SIGNAL resource
. . .
END badsem1
PROGRAM badsem2
VAR resource : SEMAPHORE EXPORTED FROM badsem1
BEGIN
CYCLE
. . .
WAIT resource
-- mutual exclusive area
SIGNAL resource
. . .
END badsem2
Another situation to avoid is called a deadlock. A deadlock occurs when all of the
programs are waiting for the resource at the same time. This means none of them can
signal to let a program go. For example, if there is only one program and it starts out
waiting for a resource, it will be deadlocked.
pr-0-0-pdl_06.fm
00/0607 6-15
Execution Control
It is also important to reset semaphores when execution begins. This is done with the
CANCEL semaphore statement. The syntax is as follows:
CANCEL semaphore_var
The CANCEL semaphore statement resets the signal counter to 0. It results in an error
if programs are currently waiting on the SEMAPHORE variable. This statement is useful
for clearing out unused signals from a previous execution.
pr-0-0-pdl_06.fm
6-16 00/0607
Routines
7. ROUTINES
PROGRAM arm_check
-- checks three arm positions and digital outputs
VAR
perch, checkpt1, checkpt2, checkpt3 : POSITION
pr-0-0-pdl_07.fm
00/0707 7-1
Routines
PDL2 also includes built-in routines. These are predefined routines that perform
commonly needed tasks. They are listed and described in Chap.11. - BUILT-IN
Routines list.
PROGRAM input_check
7.2 Parameters
To make routines more general for use in different circumstances, the programmer can
use routine parameters rather than using constants or program variables directly.
Parameters are declared as part of the routine declaration. When the routine is called,
data is passed to the routine parameters from a list of arguments in the routine call. The
number of arguments passed into a routine must equal the number of parameters
pr-0-0-pdl_07.fm
7-2 00/0707
Routines
declared for the routine. Arguments also must match the declared data type of the
parameters.
The following example shows how the time_out routine can be made more general by
including a parameter for the input signal index. The modified routine can be used for
checking any input signal.
PROGRAM input_check
7.3 Declarations
PDL2 uses two different methods of declaring a routine, depending on whether the
routine is a procedure or function.
It is also allowed to implement Shared Routines.
The following topics are fully described in current paragraph:
– Declaring a Routine
– Parameter List
– Constant and Variable Declarations
– Function Return Type
– RETURN Statement
– Shared Routines
pr-0-0-pdl_07.fm
00/0707 7-3
Routines
7.3.1.1 Procedure
The syntax of a procedure declaration is as follows:
7.3.1.2 Function
The syntax of a function declaration includes a return data type and must include at least
one RETURN statement that will be executed, as follows:
pr-0-0-pdl_07.fm
7-4 00/0707
Routines
PROGRAM example
VAR
x : INTEGER
ROUTINE test_a
VAR
x : INTEGER
BEGIN
x := 4
WRITE(Inside test_a x = , x, NL)
END test_a
ROUTINE test_b
BEGIN
WRITE(Inside test_b x = , x, NL)
END test_b
BEGIN
x := 10
WRITE(The initial value of x is , x, NL)
test_a
WRITE(After test_a is called x = , x, NL)
test_b
WRITE(After test_b is called x = , x, NL)
END example
pr-0-0-pdl_07.fm
00/0707 7-5
Routines
The distinction of belonging to the main program context versus local to a routine, is
referred to as the scope of a data item.
RETURN <(value)>
pr-0-0-pdl_07.fm
7-6 00/0707
Routines
The RETURN statement, with a return value, is required for functions. The value must
be an expression that matches the return data type of the function. If the program
interpreter does not find a RETURN while executing a function, an error will occur when
the interpreter reaches the END statement.
The RETURN statement can also be used in procedures. RETURN statements used in
procedures cannot return a value. If a RETURN is not used in a procedure, the END
statement transfers control back to the calling point.
prog_name indicates the name of the current program, which owns the
specified routine.
For example:
PROGRAM utilities
ROUTINE error_check EXPORTED FROM utilities
PROGRAM prog_1
ROUTINE error_check EXPORTED FROM utilities -- error_check routine
-- is imported from program utilities
prog_name indicates the name of the current program, which owns the
specified routine. This routine can be imported by another program, by means
of the IMPORT Statement.
For example:
PROGRAM utilities
. . .
ROUTINE error_check EXPORTED FROM utilities
PROGRAM prog_1
IMPORT ‘utilities’ -- any variables and routines
-- are imported from program utilities,
-- including error_check routine
pr-0-0-pdl_07.fm
00/0707 7-7
Routines
The declaration and executable sections of the routine appear only in the program
that owns the routine.
Refer to par. 3.2.4 Shared types, variables and routines on page 3-18 for more
information.
Note that a variable which has been declared with the CONST attribute cannot be
passed by reference to a routine!
The routine itself is executed in the same manner regardless of how the
arguments were passed to it
pr-0-0-pdl_07.fm
7-8 00/0707
Routines
The following is an example of routines that use pass by reference and pass by value:
PROGRAM example
VAR
x : INTEGER
BEGIN
x := 10
WRITE(The initial value of x is , x, NL)
test_a((x)) -- pass by value
WRITE(After pass by value x = , x, NL)
test_a(x) -- pass by reference
WRITE(After pass by reference x = , x, NL)
END example
Results of the output:
The initial value of x is 10
Inside test_a param1 = 14
After pass by value x = 10
Inside test_a param1 = 14
After pass by reference x = 14
NOTEs:
– the values for optional parameters, when not passed as an argument, are
uninitialized except for arrays in which the dimensions are 0. For jointpos
and xtndpos the program’s executing Arm is used to initialize the value;
– the optional values in all declarations of the routines must be the same
unless the optional value is not defined in the EXPORTED FROM Clause;
– optional arguments can be used with CALLS Statement;
– optional arguments can be specified in Interrupt Service Routines (ISR); note
that value is setup when the routine is called.
pr-0-0-pdl_07.fm
00/0707 7-9
Routines
r2(5, mypos)
r2(5, mypos, , 6)
To handle the information about the variable arguments, inside the routine, some
specific built-ins are available:
– ARG_COUNT Built-In Function - to get the total amount of arguments supplied to
the routine
– ARG_INFO Built-In Function - to get information about the indexed argument
– ARG_GET_VALUE Built-in Procedure - to obtain the value of the indexed
argument
– ARG_SET_VALUE Built-in Procedure - to set a value to the indexed argument.
NOTEs:
– Optional parameters can be passed in Varargs routines; in this case the
returned datatype from ARG_INFO is 0;
– the ergument can be an ARRAY;
– Varargs routines can be used in Interrupt Service Routines and in CALLS
Statement, but only the defined arguments;
– Argument identifiers cannot be used as argument switch (because there is
no identifiers!) in Varargs routines.
pr-0-0-pdl_07.fm
7-10 00/0707
Routines
This is possible by means of using the argument identifier. It must be preceded by ‘/’
(slash) and followed by ‘=’, as shown in the below examples.
Examples:
NOTEs:
– all parameters preceding this argument must have been provided or must be
optional;
– argument identifiers cannot be used in Interrupt Service Routines.
pr-0-0-pdl_07.fm
00/0707 7-11
Routines
pr-0-0-pdl_07.fm
7-12 00/0707
Condition Handlers
8. CONDITION HANDLERS
8.1 Operations
As shown in the previous example, using condition handlers is a two-step process. First
the condition handler is defined, and then it can be enabled. Condition handlers can also
be disabled and purged.
– Defining Condition Handlers
– Enabling, Disabling, and Purging
pr-0-0-pdl_08.fm
00/0607 8-1
Condition Handlers
CONDITION[24]:
WHEN DISTANCE 60 BEFORE END DO
LOCK
ENDCONDITION
In CONDITION[23], the first WHEN clause and the LOCK apply to arm 2 as designated
by the FOR ARM clause. The second WHEN and LOCK apply to arm 4, as explicitly
designated in the condition and action.
In CONDITION[24], WHEN and LOCK clauses apply to the arm of the MOVE statement
pr-0-0-pdl_08.fm
8-2 00/0607
Condition Handlers
VAR a, b: INTEGER
CONDITION[55] SCAN(2):
WHEN a = b DO
ENABLE CONDITION[4]
ENDCONDITION
If the regular scan time of condition handlers in 20 milliseconds (default value for
$TUNE[1]), the above defined condition is monitored every 40 milliseconds.
pr-0-0-pdl_08.fm
00/0607 8-3
Condition Handlers
The SCAN clause is only useful if applied to conditions that are states and that do not
require to be scanned very frequently. The SCAN clause acts as a filter for reducing the
system overhead during the monitoring.
Note that, when the condition triggers, it is automatically disabled. Either use the
NODISABLE clause (trapping on the error 40016) or the ENABLE CONDITION
statement for mantaining the condition always enabled.
Events are not influenced by the SCAN clause.
Refer to other sections of this chapter for the definitions of states and events.
PROGRAM example
. . .
BEGIN
CONDITION[1]:
WHEN AT START DO
$DOUT[22] := ON
ENDCONDITION
. . .
MOVE TO p1 WITH CONDITION[1]
. . .
END example
Condition handlers are disabled automatically when they are triggered (unless the
NODISABLE clause is specified).
ly enabled condition handlers can be disabled using the DISABLE CONDITION
statement or action. The syntax is as follows:
pr-0-0-pdl_08.fm
8-4 00/0607
Condition Handlers
8.3 Conditions
A condition can be a state or an event. States remain satisfied as long as the state
exists. They are monitored at fixed intervals by a process called scanning. Events are
satisfied only at the instant the event occurs. Consequently, event conditions cannot be
joined by the AND operator in a condition expression.
The user should take care of the way in which his conditions are structured. Events must
be preferred to states; if a state, a condition should remain enabled only when needed,
because it is polled each scan time (10 or 20 ms); in case of events, the NODISABLE
clause is preferred to an ENABLE CONDITION action.
Multiple conditions can be combined into a single condition expression using the
BOOLEAN operators AND and OR The AND operator has a higher precedence which
means the condition expression
pr-0-0-pdl_08.fm
00/0607 8-5
Condition Handlers
– RELATIONAL States
– BOOLEAN State
– DIGITAL PORT States
– DIGITAL PORT Events
– SYSTEM Events
– USER Events
– ERROR Events
– PROGRAM Events
– Event on Cancellation of a Suspendable Statement
– MOTION Events
WHEN bool_var DO
The BOOLEAN operator NOT can be used to specify the condition is satisfied when the
variable is FALSE. For example:
pr-0-0-pdl_08.fm
8-6 00/0607
Condition Handlers
bool_var can also be the result of the BIT_TEST built-in function. This function tests
whether a specified bit of an INTEGER is ON or OFF. The first argument is the variable
to be tested, the second argument indicates the bit to be tested, and the third argument
indicates whether the bit is to be tested for ON or OFF. When used in a condition
expression, the third argument of BIT_TEST must be specified. In addition, variables
used as arguments must not be local or parameters. (Refer to the BIT_TEST section of
Chap.11. - BUILT-IN Routines list for additional information on BIT_TEST.) The
following is an example using BIT_TEST in a condition expression:
WHEN a AND b DO
WHEN $DIN[1] DO
WHEN $DOUT[22] DO
The BOOLEAN operator NOT can be used to specify the condition is satisfied if the
signal is OFF during the scan. For example:
WHEN $DIN[1]+ DO
WHEN $DOUT[22]- DO
The BIT_FLIP built-in function can be used for monitoring the event of positive or
negative transition of a bit inside one of the following analogue port arrays : $AIN,
$AOUT, $GIN, $GOUT, $WORD, $USER_BYTE, $USER_WORD, $USER_LONG,
$PROG_UBYTE, $PROG_UWORD, $PROG_ULONG. For further details about this
pr-0-0-pdl_08.fm
00/0607 8-7
Condition Handlers
pr-0-0-pdl_08.fm
8-8 00/0607
Condition Handlers
pr-0-0-pdl_08.fm
00/0607 8-9
Condition Handlers
pr-0-0-pdl_08.fm
8-10 00/0607
Condition Handlers
WHEN POWERUP DO
WHEN HOLD DO
WHEN START DO
WHEN EVENT AE_CALL DO
WHEN SEGMENT WAIT weld_path DO
WHEN WINDOW SELECT SCRN_USER DO
The AC_CALL_TP, AC_CALL_CRT, AC_ABORT events are used for the application
aid environment, that is a mechanism that can be used for activating and deactivating
an application session by issuing the UTILITY APPLICATION command from the
system command menu. This implies the existence of an active PDL2 program with
enabled conditions containing the following events:
pr-0-0-pdl_08.fm
00/0607 8-11
Condition Handlers
CONDITION[90]:
WHEN EVENT 50100 DO
$DOUT[25] := OFF
ENDCONDITION
<statements..>
SIGNAL EVENT 50100 -- this triggers condition[90]
The programmer can specify a program name or use the reserved word ANY to specify
which program the event must be caused by to trigger the user events.
The syntax is as follows:
WinC4G Program that runs on PC can be used for getting the documentation related to
C4G errors.
pr-0-0-pdl_08.fm
8-12 00/0607
Condition Handlers
The programmer can specify a program name or use the reserved word ANY to specify
which program the error must be caused by to trigger the error events.
The syntax is as follows:
WHEN ANYERROR DO
WHEN ERRORCLASS EC_FILE BY ANY DO
WHEN ERRORNUM 36939 BY weld_prog DO
The value of $THRD_ERROR for interrupt service routines initiated as actions of error
events will be set to the error number that triggered the event.
WHEN ACTIVATE DO
WHEN DEACTIVATE weld_prog DO
WHEN PAUSE ANY DO
WHEN UNPAUSE DO
WHEN EXIT CYCLE DO
pr-0-0-pdl_08.fm
00/0607 8-13
Condition Handlers
CONDITION [1]:
WHEN ERRORNUM 52230 BY pippo DO -- ^C or Bypass on READ
executed from pippo
PAUSE pluto -- pause program pluto
WHEN ERRORNUM 52225 BY ANY DO -- ^C or Bypass on MOVE on
ARM 2 executed by any
PAUSE -- pause this program
ENDCONDITION
ENABLE CONDITION [1]
Obviously, it is possible to use this events in a WAIT FOR statement too.
For example:
pr-0-0-pdl_08.fm
8-14 00/0607
Condition Handlers
pr-0-0-pdl_08.fm
00/0607 8-15
Condition Handlers
For example:
PROGRAM example
TYPE ndef = NODEDEF
$MAIN_POS
$MOVE_TYPE
$COND_MASK
ENDNODEDEF
VAR path_var : PATH OF ndef
int_var: INTEGER
BEGIN
CONDITION[5] : -- define the AT VIA condition
WHEN AT VIA DO
$FDOUT[5] := ON
ENDCONDITION
NODE_APP(path_var, 10) -- append 10 nodes to the PATH path_var
path_var.COND TBL[2] := 5 -- fill a condition table element
FOR int var := 1 TO 10 DO
-- assign values to path nodes using the POS built-in function
path_var.NODE[int_var].$MAIN_POS := POS(...)
path_var.NODE[int_var].$MOVE_TYPE := LINEAR
path_var.NODE[int_var].$COND_MASK := 0
ENDFOR
-- associate the AT VIA condition to node 5
path_var.NODE[5].$COND_MASK := 2
-- define node 4 as the VIA point
path_var.NODE[4].$MOVE_TYPE := SEG_VIA
-- define the circolar motion between node 3 and 5
path_var.NODE[5].$MOVE_TYPE := CIRCULAR
CYCLE
-- execute the move along the path.
-- The interpolation through nodes will be LINEAR except
-- between nodes 3.. 5 that will be CIRCULAR.
MOVE ALONG path_var[1..9]
END example
Also refer to Chap.4. - Motion Control for further detail about conditions in PATH.
STOP, RESUME, AT START, and AT END motion event conditions can be used in
condition handlers which are ly enabled. An error is detected if the ENABLE statement
or action includes a condition handler containing other motion events. ly enabled motion
events apply to all motion segments. This means they apply to each MOVE statement
and to each node segment of a path motion.
Note that STOP, RESUME, and AT END, if used locally in a MOVE statement, will not
trigger upon recovery of an interrupted trajectory if the recovery operation is done on the
final point.
To detect when the robot stops after a motion statement deactivation (^C or Bypass), it is
necessary that the WHEN STOP condition be ly enabled. If it is locally used with the MOVE
statement, the condition would not trigger.
When the motion event triggers, the predefined variable $THRD_PARAM is set to the
node number associated to the triggered motion event.
pr-0-0-pdl_08.fm
8-16 00/0607
Condition Handlers
8.4 Actions
The following actions can be included in an action_list:
– ASSIGNMENT Action
– INCREMENT and DECREMENT Action
– BUILT-IN Actions
– SEMAPHORE Action
– MOTION and ARM Actions
– ALARM Actions
– PROGRAM Actions
– CONDITION HANDLER Actions
– DETACH Action
– PULSE Action
– HOLD Action
– SIGNAL EVENT Action
– ROUTINE CALL Action
int_var := 4
$DOUT[22] := ON
int_var := other_int_var
In the example above, if other_int_var is uninitialized when the action takes place, int_var
will be set to uninitialized.
If an uninitialized boolean variable is assigned to an output port ($DOUT, $FDOUT, etc.)
the port is automatically set to TRUE. The example below is valid only inside condition
actions — an error would be returned in a normal program statement.
pr-0-0-pdl_08.fm
00/0607 8-17
Condition Handlers
If a variable is used as the right operand of the += or -= operator, it does not have to be
initialized when the condition handler is defined or when the action takes place.
For example:
int_var += 4
int_var -= 4
int_var += other_int_var
int_var -= other_int_var
BIT_SET(int_var, 1)
BIT_CLEAR($WORD[12], int_var)
BIT_ASSIGN(int_var, 4, bool_var, TRUE, FALSE)
SIGNAL semaphore_var
CANCEL semaphore_var
The semaphore_var cannot be a local variable or parameter.
pr-0-0-pdl_08.fm
8-18 00/0607
Condition Handlers
CANCEL CURRENT
CANCEL CURRENT SEGMENT
SIGNAL SEGMENT weld_path
DETACH ARM[1]
LOCK ARM[1], ARM[2]
RESUME ARM[1], ARM[2]
UNLOCK ALL
CANCEL ALARM
PAUSE
UNPAUSE
DEACTIVATE weld_prog
ACTIVATE util_prog
EXIT CYCLE prog_1, prog_2, prog_3
pr-0-0-pdl_08.fm
00/0607 8-19
Condition Handlers
pr-0-0-pdl_08.fm
8-20 00/0607
Condition Handlers
– the routine cannot have more than 16 parameters and must be a procedure;
– all arguments must be passed by reference except INTEGER, REAL, and
BOOLEAN arguments;
– all arguments passed by reference must have a main program context scope (not
local to a routine);
– the calling program is suspended while the interrupt routine is executed;
– interrupt routines can be interrupted by other interrupt routines.
Arguments passed by value to an interrupt routine use the value at the time the condition
handler is defined (not when it triggers).
Each interrupt routine gets a new copy of the $THRD_ERROR predefined variable. It is
initialized to 0 unless the interrupt routine is activated as an action of an error event. If
the interrupt is caused by an error event, $THRD_ERROR is initialized to the error
number causing the event to trigger.
Interrupt service routines use the same arm, priority, stack, program-specific predefined
variable values, and trapped errors as the program which they are interrupting.
Interrupt service routines should be written as short as possible and should not use
suspendable statements (WAIT FOR, DELAY, etc). Interrupt service routines are
executed by the interpreter and are multi-tasked with all other programs running in the
system. If another running program has a higher priority than the program being
interrupted the routine will not execute until the higher priority program is suspended. An
interrupt service routine can also be interrupted by other condition handlers being
activated. Interrupt service routines that are suspendable or require a long time to
execute can cause the program stack to become full or drain the system of vital
resources.
A way to disallow the interruption of execution by another interrupt service routine is
given by the DISABLE INTERRUPT statement. Refer to Chap.10. - Statements List.
CONDITION[1] :
WHEN $DIN[1] DO
UNLOCK ARM[1] -- Unlock arm to allow restart of motion
RESUME ARM[1] -- Resume motion on the arm
$DOUT[1] := ON -- Signal the outside world we started motion
user_isr -- User defined routine
ENDCONDITION
The shown above example, if executed outside of a condition handler, would produce
the results expected by unlocking the arm, resuming the motion, setting the signal, and
then calling the routine. When such a code segment is executed inside the condition
statement, the digital output will be set before the RESUME action is executed. This is
because the RESUME action is always executed after all other actions except the
routine call.
pr-0-0-pdl_08.fm
00/0607 8-21
Condition Handlers
pr-0-0-pdl_08.fm
8-22 00/0607
Serial INPUT/OUTPUT
9. SERIAL INPUT/OUTPUT
This chapter explains the PDL2 facilities for handling stream input and output. Stream
I/O includes reading input from and writing output to operator devices, data files, and
communication ports. Depending on the device, the input and output can be in the form
of ASCII text or binary data.
A tool, called WinC4G, is provided by COMAU to be run on a PC (for further information
see Chapter WinC4G Program in the Use of C4G Control Unit Manual). One of the
features of such a Program is the possibility of opening a Terminal that allows to issue
commands and view information about the Robot Controller Unit.
pr-0-0-pdl_04.fm
00/0607 9-1
Serial INPUT/OUTPUT
CRT: and TP: indicate the scrolling window on the system screen. TP0: indicates the
Teach Pendant character menu window which can be popped up on windows of the user
screen. (Refer to BUILT-IN Routines list chapter for a description of the window related
predefined routines.) The other windows, CRT1-3 and TP1-3, indicate windows on
WinC4G and TP4i/WiTP user screen. The user screen is divided into three areas,
numbered 1 through 3 from top to bottom.
The Screen key switches between the system and user screens. Screen built-in routines
can be used to determine which screen is currently displayed and force a particular
screen to be displayed (refer to BUILT-IN Routines list chapter).
PDL2 provides built-in routines to perform window operations, including creating and
displaying user-defined windows, positioning the cursor, clearing windows, and setting
window attributes (refer to BUILT-IN Routines list chapter). The first element of the
predefined array variable $DFT_DV indicates the default window used in the window
related built-in routines.
When the selected window is ‘TP:’ on the system screen, and there is a read active on
that window, the user is sent the message “Input directed to other window. Press SEL
key.” This indicates that the input is directed to a window other than the command menu.
The user must press the SEL key to get back to the command menu.
WINDOW SELECT condition can be used in a condition handler or WAIT FOR
Statement to determine when a specific window has been selected for input. Refer to
Chap.8. - Condition Handlers for more information on conditions and condition handlers.
Some tests can be performed on the CRT device since it is a disconnectable device, and
the CRT could be absent when accessing it. A problem can develop when the CRT
connection is disconnected when a read is pending on it. To prevent this, the PDL2
programmer can determine the presence of the CRT emulator by testing the value of the
$SYS_STATE predefined variable. It is also possible to define a condition handler to
trigger when the CRT emulator protocol is connected and disconnected. Please refer to
Chap.8. - Condition Handlers for more information on using condition handlers in this
way.
pr-0-0-pdl_04.fm
9-2 00/0607
Serial INPUT/OUTPUT
– XD: is an eXternal device which is recognized by the system when the disk on key
is inserted in the USB port.
The TD: file device refers to the Controller RAM disk.
PDL2 provides built-in routines to perform file operations such as positioning a file
pointer or determining the number of remaining bytes in a file (refer to Chap.11. -
BUILT-IN Routines list).
pr-0-0-pdl_04.fm
00/0607 9-3
Serial INPUT/OUTPUT
pr-0-0-pdl_04.fm
9-4 00/0607
Serial INPUT/OUTPUT
and, if the resulting value stays in the range 32-126, the whole
character, 8th bit included, is read.
COM_CHAR and COM_PASAL are not mutually exclusive; if they are put in OR
together, the characters read are included in the range 0-127 of ASCII characters table.
The following table gives a clearer representation of the effect of these attributes (“yes”
means that the character is read; “no” that the character is ignored):
COM_CHAR
Received
COM_CHARNO COM_CHAR COM_PASAL OR
Characters
COM_PASAL
00-31, 127 no no yes yes
32-126 yes yes yes yes
128-159,255 no no yes no
160-254 yes no yes no
pr-0-0-pdl_04.fm
00/0607 9-5
Serial INPUT/OUTPUT
LUN Devices
LUN_TP TP:
LUN_CRT CRT:
LUN_NULL NULL:
The predefined variable $DFT_LUN indicates the default LUN for I/O operations.
The default LUN is the Teach Pendant, and remains the Teach Pendant even if the
Terminal of WinC4G is active. CRT emulator protocol is mounted on a port. If the PDL2
programmer wants to redirect the output to the CRT: device on the Terminal, the
$DFT_LUN predefined variable can be set to LUN_CRT value.
pr-0-0-pdl_04.fm
9-6 00/0607
Serial INPUT/OUTPUT
communication, or file device). File devices also include a file name and file extension.
The default file device is ‘UD:’.
The access_str can be any string expression representing the access with which the
device is to be opened. The following types of access are allowed:
R -- read only
W -- write only
RW -- read and write
WA -- write append
RWA -- read and write append
If a file is opened with write access (W or RW), other programs will be denied access to
that file. If a file is opened with read only access (R), other programs will also be allowed
to open that file with read only access. Write operations will be denied. If a file already
exists on the device and an OPEN FILE on that file is done, the same file is opened and
its contents can be added to if ‘RWA’ was specified. If opened with the ‘RW’ attributes,
the file must be present on the device upon which the file is being opened.
Examples of the OPEN FILE statement follow:
$FL_ADLMT $FL_NUM_CHARS
$FL_BINARY $FL_PASSALL
$FL_DLMT $FL_RANDOM
$FL_ECHO $FL_RDFLUSH
$FL_SWAP
For example:
pr-0-0-pdl_04.fm
00/0607 9-7
Serial INPUT/OUTPUT
INTEGER VECTOR
REAL POSITION
BOOLEAN JOINTPOS
STRING XTNDPOS
However, the var_id cannot be a predefined variable which requires limit checking.
Chap.12. - Predefined Variables List describes each predefined variable including
whether or not it requires limit checking.
The reserved word NL (new line) can also be used in the list of identifiers to force the
pr-0-0-pdl_04.fm
9-8 00/0607
Serial INPUT/OUTPUT
body_type := 4
total_units := 50
operator_id := JOE
The following examples indicate how to read data from a window and a file:
pr-0-0-pdl_04.fm
00/0607 9-9
Serial INPUT/OUTPUT
REAL: The format specifier indicates the maximum number of characters to be read.
Only one specifier is allowed.
BOOLEAN: The data must be one of the Boolean predefined constants (TRUE, ON,
FALSE, OFF). The format specifier indicates the maximum number of characters to be
read. Only one specifier is allowed.
STRING: The format specifier indicates the maximum number of characters to be read.
Only one specifier is allowed.
VECTOR, POSITION, JOINTPOS, and XTNDPOS: The formats in which data must be
entered for each data type are as follows:
– in all cases, the left angle bracket (<) starts the value and the right angle bracket
(>) ends the value. The commas in each value are required;
– for vectors and positions, x, y, and z represent Cartesian location components.
VECTOR: <x, y, z>
For positions, e1, e2, and e3 represent Euler angle components and cnfg_str
represents a configuration string. The configuration string is not enclosed in
quotes.
POSITION: <x, y, z, e1, e2, e3, cnfg_str>
For jointpos, components that have no meaning with the current arm are left blank,
but commas must be used to mark the place. The arm number ‘n’ for jointpos and
xtndpos is preceded by the character ‘A’.
JOINTPOS: <j1, j2, j3, j4, j5, j6, An>
XTNDPOS: <<x, y, z, e1, e2, e3, cnfg_str> <x1, ...> An>
The format specifier indicates the maximum number of characters to be read for each
component of the item. Only one specifier is allowed.
INTEGER VECTOR
REAL POSITION
BOOLEAN JOINTPOS
STRING XTNDPOS
pr-0-0-pdl_04.fm
9-10 00/0607
Serial INPUT/OUTPUT
The reserved word NL (new line) can also be used as a data item. NL causes a new line
to be output.
Each data item is written out in the order that it is listed. Data items can be written in
ASCII or binary format, depending on how the LUN has been opened.
For example, the following statement writes out a string literal followed by a new line to
the default output device:
WRITE (‘Enter body style, units to process, and operator id.’, NL)
Notice the string literal is enclosed in single quotes (‘), which are not written as part of
the output.
The WRITE statement is executed asynchronously when writing to certain types of
devices such as communication devices. This is done so other programs can execute
simultaneously without having to wait for the statement to be completed. The predefined
variable $WRITE_TOUT indicates a timeout period for asynchronous writes.
pr-0-0-pdl_04.fm
00/0607 9-11
Serial INPUT/OUTPUT
pr-0-0-pdl_04.fm
9-12 00/0607
Statements List
10.1 Introduction
This chapter is an alphabetical reference of PDL2 statements. The following information
is provided for each statement:
– short description;
– syntax;
– comments concerning usage;
– example;
– list of related statements.
This chapter uses the syntax notation explained in the “Introduction to PDL2" chapter to
represent PDL2 statements.
The available PDL2 statements are:
– ACTIVATE Statement
– ATTACH Statement
– BEGIN Statement
– BYPASS Statement
– CALLS Statement
– CANCEL Statement
– CLOSE FILE Statement
– CLOSE HAND Statement
– CONDITION Statement
– CYCLE Statement
– CONST Statement
– DEACTIVATE Statement
– DECODE Statement
– DELAY Statement
– DETACH Statement
– DISABLE CONDITION Statement
– DISABLE INTERRUPT Statement
– ENABLE CONDITION Statement
– ENCODE Statement
– END Statement
– EXIT CYCLE Statement
– FOR Statement
pr-0-0-pdl_10.fm
00/0607 10-1
Statements List
– GOTO Statement
– HOLD Statement
– IF Statement
– IMPORT Statement
– LOCK Statement
– MOVE Statement
– MOVE ALONG Statement
– OPEN FILE Statement
– OPEN HAND Statement
– PAUSE Statement
– PROGRAM Statement
– PULSE Statement
– PURGE CONDITION Statement
– READ Statement
– RELAX HAND Statement
– REPEAT Statement
– RESUME Statement
– RETURN Statement
– ROUTINE Statement
– SELECT Statement
– SIGNAL Statement
– TYPE Statement
– UNLOCK Statement
– UNPAUSE Statement
– VAR Statement
– WAIT Statement
– WAIT FOR Statement
– WHILE Statement
– WRITE Statement
pr-0-0-pdl_10.fm
10-2 00/0607
Statements List
placed in the ready state and non-holdable programs are placed in the running
state. If the statement is issued from a holdable program, the programs are placed
in the running state.
The programs must be loaded in memory or an error results.Only one activation of
a given program is allowed at a given time.
When a program is activated, the following occurs for that program:
– initialized variables are set to their initial values.
– if prog_name is holdable and does not have the DETACH attribute, the arm
will be attached. If prog_name is non-holdable and has the ATTACH attribute
then the arm will be attached.
The ACTIVATE statement is permitted as a condition handler action. Refer to the
Condition Handlers chapter for further information.
Examples:
ACTIVATE weld_prog, weld_util, weld_cntrl
See also:
DEACTIVATE Statement
pr-0-0-pdl_10.fm
00/0607 10-3
Statements List
PROGRAM p1 PROGRAM p2
ROUTINE r2 EXPORTED FROM p2 ROUTINE r2 EXPORTED FROM p2
ROUTINE r1 ROUTINE r2
BEGIN BEGIN
r2 -- ATTACH statement
END r1 END r2
BEGIN BEGIN
r1 END p2
END p1
Examples:
ATTACH ‘COM1:’ -- attach a communication device
pr-0-0-pdl_10.fm
10-4 00/0607
Statements List
See also:
CYCLE Statement
DEACTIVATE Statement
END Statement
EXIT CYCLE Statement
pr-0-0-pdl_10.fm
00/0607 10-5
Statements List
flags is an integer mask used for indicating which kind of suspendable statement
should be bypassed. Possible mask values are:
These integer values are the same as those returned by the PROG_STATE built-in
function.
After having bypassed a MOVE statement, the START button need to be pressed
for continuing the execution of the bypassed program.
If prog_name or a list of names is specified, those programs are paused. If no
name is included, the suspendable statement of the program issuing the BYPASS
is bypassed.
In this case, the BYPASS should be issued from a condition handler action when
the main of the program is stopped on a suspendable statement.
The BYPASS statement is permitted as a condition handler action. Refer to the
Condition Handlers chapter for further details.
Examples:
BYPASS 0 ALL -- bypassed all programs that are executing a
-- suspendable statement
state:=PROG_STATE (pippo)
IF state = 2048 THEN
BYPASS state pippo -- bypasses pippo if it is waiting on a
semaphore
ENDIF
See also:
PROG_STATE Built-In Function
Condition Handlers chapter
pr-0-0-pdl_10.fm
10-6 00/0607
Statements List
pr-0-0-pdl_10.fm
00/0607 10-7
Statements List
CANCEL CURRENT
CANCEL CURRENT SEGMENT
CANCEL CURRENT FOR ARM[3]
CANCEL CURRENT SEGMENT FOR ARM[3], ARM[2]
CANCEL CURRENT FOR ALL
CANCEL ALARM
CANCEL resource
See also:
LOCK Statement
HOLD Statement
SIGNAL Statement
WAIT Statement
Motion Control Chapter
pr-0-0-pdl_10.fm
10-8 00/0607
Statements List
pr-0-0-pdl_10.fm
00/0607 10-9
Statements List
pr-0-0-pdl_10.fm
10-10 00/0607
Statements List
Comments:
A constant declaration establishes a constant identifier with a name and an
unchanging value.
name can be any user-defined identifier.
The data type of the constant is determined by its value, as follows:
pr-0-0-pdl_10.fm
00/0607 10-11
Statements List
When the program END statement is encountered, execution continues back at the
CYCLE statement. This continues until the program is deactivated or an EXIT
CYCLE statement is executed. When an EXIT CYCLE statement is executed, the
current cycle is terminated and execution immediately continues back at the
CYCLE statement.
Examples:
See also:
BEGIN Statement
EXIT CYCLE Statement
pr-0-0-pdl_10.fm
10-12 00/0607
Statements List
DEACTIVATE ALL
See also:
ACTIVATE Statement
BOOLEAN INTEGER
JOINTPOS POSITION
REAL STRING
VECTOR XTNDPOS
pr-0-0-pdl_10.fm
00/0607 10-13
Statements List
Examples:
MOVE TO pickup
DELAY 200
CLOSE HAND 1
See also:
WAIT FOR Statement
pr-0-0-pdl_10.fm
10-14 00/0607
Statements List
When an I/O device is detached, other programs can open a LUN on that device
and if it is a window device, the window related built-ins can be applied to that
device.
An error occurs if a program attempts to detach a device that is currently attached
by another program.
When a condition handler is detached, other programs can enable, disable, purge,
or redefine the condition handler.
When a timer is detached, other programs will be permitted read and write access
to that timer.
The DETACH statement used to detach a condition handler or timer must be
contained in the same program owning the corresponding ATTACH statement. An
error occurs if the program attempts to execute a DETACH statement contained in
a different program. It is also an error if a program attempts to detach a condition
handler that does not exist.
When a program terminates or is deactivated, all attached resources are
automatically detached.
The DETACH statement is permitted as a condition handler action. Refer to
Condition Handlers chapter for further information.
Examples:
DETACH COM1: -- detach a communication device
DETACH CRT2: -- detach a window device
pr-0-0-pdl_10.fm
00/0607 10-15
Statements List
pr-0-0-pdl_10.fm
10-16 00/0607
Statements List
This statement should only be used when really necessary so to avoid the nesting
of thread levels in the program call chain. It is important to specify a minimum
amount of statements for not compromissing a correct program interpretation.
PROGRAM example
ROUTINE user_isr
BEGIN
-- Interrupt Service routine statements
<statements....>
DISABLE INTERRUPT
ENABLE CONDITION[13]
$BIT[100] := ON
RETURN
ENABLE INTERRUPT
END user_isr
BEGIN -- main
CONDITION[13] :
WHEN $DIN[18] DO
user_isr
ENDCONDITION
ENABLE CONDITION[13]
-- Main statements
<statements..>
END example
See also:
Condition Handlers chapter.
pr-0-0-pdl_10.fm
00/0607 10-17
Statements List
BOOLEAN INTEGER
JOINTPOS POSITION
REAL STRING
VECTOR XTNDPOS
Optional Format Specifiers can be used with expr as they are used in a WRITE
statement (refer to Serial INPUT/OUTPUT chapter). Note that, if expr is not left
justified, the first character in string_id is a blank one.
The maximum length of the STRING is determined by the declared length of
string_id. If the new STRING is longer then the declared length, then the new
STRING is truncated to fit into string_id.
Examples:
PROGRAM sample
VAR
str : STRING[20]
x,y : INTEGER
z : REAL
BEGIN
x := 23
y := 1234567
z := 32.86
ENCODE (str, x, y, z)
WRITE (str) -- outputs ‘23’ ‘1234567’ ‘32.860’
ENCODE (str, x::4, y::8, z::4::1)
WRITE (str) -- outputs ‘23’ ‘123456732.9’
END sample
See also:
DECODE Statement
WRITE Statement
Serial INPUT/OUTPUT Chapter
pr-0-0-pdl_10.fm
10-18 00/0607
Statements List
END name
Comments:
name is the user-defined identifier used to name the program or routine.
If the END is in a procedure routine, it returns program control to the calling
program or routine.
It is an error if the END of a function routine is executed. A function routine must
execute a RETURN statement to return program control to the calling program or
routine.
If the CYCLE option was used with the BEGIN statement or the CYCLE statement
is used in the program, the END statement transfers control to the CYCLE and the
statements between CYCLE and END execute again. This keeps a program
running until it is deactivated.
Examples:
See also:
BEGIN Statement
CYCLE Statement
EXIT CYCLE Statement
RETURN Statement
pr-0-0-pdl_10.fm
00/0607 10-19
Statements List
pr-0-0-pdl_10.fm
10-20 00/0607
Statements List
WHILE Statement
REPEAT Statement
pr-0-0-pdl_10.fm
00/0607 10-21
Statements List
Comments:
The HOLD statement works exactly like the HOLD button on the TP and control
panel.
A HOLD causes the arm to decelerate smoothly until the motion ceases. The
predefined variable $HLD_DEC_PER indicates the rate of deceleration.
START must be pressed to place holdable programs back into a running state.
The HOLD statement can be used in both holdable and non-holdable programs.
HOLD is an asynchronous statement which means it continues while the program
is paused and condition handlers continue to be scanned. However, if a condition
handler triggers while a program is held, the actions are not performed until the
program is unheld.
The HOLD statement is permitted as a condition handler action. Refer to Condition
Handlers chapter for further information.
Examples:
HOLD
See also:
CANCEL Statement
LOCK Statement
PAUSE Statement
10.26 IF Statement
The IF statement is used to choose between two possible courses of action, based on
the result of a Boolean expression.
Syntax:
IF bool_expr THEN
<statement>...
<ELSE
<statement>... >
ENDIF
Comments:
bool_expr is any expression that yields a Boolean result.
If bool_expr is TRUE, the statement(s) following the IF clause are executed. If
bool_expr is FALSE, program control is transferred to the first statement after the
ENDIF.
If the ELSE clause is specified and bool_expr is FALSE, the statement(s) between
the ELSE and ENDIF are executed.
Examples:
IF (file_error) THEN
WRITE (‘***ERROR*** data file not found.’)
ELSE
WRITE (‘Loading data. . .’)
ENDIF
See also:
SELECT Statement
pr-0-0-pdl_10.fm
10-22 00/0607
Statements List
NOTE THAT:
the IMPORT clause must be after the PROGRAM clause and before any
declaration clause.
In general the order is:
– PROGRAM
– IMPORT
– TYPE
– VAR
– ROUTINES
– code.
Comments:
Importing from a program, causes the current program to be able to make use of
any GLOBAL identifiers (types, variables and routines) belonging to another
program.
prog_name is a STRING representing the name of the owning program (program
which owns the being imported GLOBAL variables and/or routines). It can also
contain a relative or absolute path.
Local variables of a global routine cannot be declared with the GLOBAL attribute.
Examples:
IMPORT ‘tv_move’
IMPORT ‘sys\util\tv_move’
See also:
– par. 3.2.4 Shared types, variables and routines on page 3-18
pr-0-0-pdl_10.fm
00/0607 10-23
Statements List
LOCK ALL
CONDITION[3]:
WHEN $DIN[3]+ DO
LOCK ARM[3]
ENDCONDITION
See also:
UNLOCK Statement
RESUME Statement
CANCEL Statement
pr-0-0-pdl_10.fm
10-24 00/0607
Statements List
JOINT
LINEAR
CIRCULAR
If the trajectory clause is not included, the value of $MOVE_TYPE is used.
opt_clauses provide more detailed instructions for the motion. Optional clauses
include the following:
ADVANCE
TIL cond_expr <, TIL cond_expr>...
WITH designations <, designations>...
If both the TIL and WITH clauses are specified, all TIL clauses must be specified
before the WITH clauses.
The sync_clause allows two arms to be moved simultaneously using SYNCMOVE.
The arms start and stop together. The optional WITH and TIL clauses can be
included as part of a SYNCMOVE clause.
The TIL clause can only be specified on the MOVE side.
MOVEFLY can be used in place of the reserved word MOVE to specify continuous
motion. To execute the FLY, the ADVANCE clause must also be included in the
MOVEFLY statement. If a sync_clause is specified, it must be SYNCMOVEFLY,
and the ADVANCE clause must be part of the MOVEFLY.
If a MOVE statement needs more than a single line, commas must be used to end
a line after the dest_clause or after each optional clause. The reserved word
ENDMOVE must then be used to indicate the end of the statement. Refer to the
examples below.
MOVE is an asynchronous statement which means it continues while the program
is paused and interrupt service routines can begin before the statement completes.
Examples:
MOVE NEAR pick_up BY 200.0
MOVE TO pick_up
MOVE AWAY 400.0
MOVE RELATIVE VEC(100, 0, 100) IN TOOL
MOVE ABOUT VEC(0, 100, 0) BY 90 IN BASE
MOVE BY {alpha, beta, gamma, delta, omega}
MOVE FOR dist TO destination
pr-0-0-pdl_10.fm
00/0607 10-25
Statements List
MOVE TO slot
See also:
MOVE ALONG Statement
Chap.4. - Motion Control
pr-0-0-pdl_10.fm
10-26 00/0607
Statements List
Opt_clauses provide more detailed instructions for the motion. Optional clauses
include the following:
ADVANCE
WITH designations <, designations>...
MOVEFLY can be used in place of the reserved word MOVE to specify continuous
motion. To execute the fly, the ADVANCE clause must also be included with the
MOVEFLY statement. Specifying MOVEFLY applies to the end of the path, not for
each node. In addition, $TERM_TYPE applies to the end of the path and not for
each node.
If a MOVE ALONG statement needs more than a single line, commas must be
used to end a line after the path_var or after each optional clause. The reserved
word ENDMOVE must then be used to indicate the end of the statement. Refer to
the examples below.
MOVE ALONG is an asynchronous statement which means it continues while the
program is paused and interrupt service routines can begin before the statement
completes.
Examples:
MOVE ALONG pth
MOVE ALONG pth.NODE[1..5]
MOVE ARM[2] ALONG pth
pr-0-0-pdl_10.fm
00/0607 10-27
Statements List
device_str can be any STRING expression representing a device. File devices also
include a file name and extension. The default file device is ‘UD:’.
access_str can be any STRING expression representing the access with which the
device is to be opened. Valid access designations are as follows:
R -- read only
W -- write only
RW -- read and write
WA -- write append
RWA -- read and write append
Note that in case of RW, the file must already exist, otherwise an error is returned.
A LUN remains opened until it is closed with a CLOSE FILE statement, program
execution is completed, or the program is deactivated.
The optional WITH clause can designate temporary values for predefined variables
related to LUNs (listed in Chap.9. - Serial INPUT/OUTPUT).
pr-0-0-pdl_10.fm
10-28 00/0607
Statements List
pr-0-0-pdl_10.fm
00/0607 10-29
Statements List
pr-0-0-pdl_10.fm
10-30 00/0607
Statements List
EZ Syntax:
EZ
pr-0-0-pdl_10.fm
00/0607 10-31
Statements List
information.
Examples:
PULSE $DOUT[i] FOR 300
pr-0-0-pdl_10.fm
10-32 00/0607
Statements List
INTEGER VECTOR
REAL POSITION
BOOLEAN JOINTPOS
STRING XTNDPOS
pr-0-0-pdl_10.fm
00/0607 10-33
Statements List
pr-0-0-pdl_10.fm
10-34 00/0607
Statements List
pr-0-0-pdl_10.fm
00/0607 10-35
Statements List
pr-0-0-pdl_10.fm
10-36 00/0607
Statements List
pr-0-0-pdl_10.fm
00/0607 10-37
Statements List
See also:
IF Statement
pr-0-0-pdl_10.fm
10-38 00/0607
Statements List
type_name = NODEDEF
<predefined_name <, predefined_name>... <NOTEACH> >...
<name <, name>... : data_type <NOTEACH> >...
ENDNODEDEF
Comments:
A type declaration establishes a new user-defined data type that can be used when
declaring variables and parameters.
type_name can be any user-defined identifier.
User-defined data types are available to the whole system. Make sure that unique
names are used to avoid conflicts.
Field names are local to the user-defined data type. This means two different
user-defined types can contain a field having the same name.
Valid field data types are explained in Chap.3. - Data Representation.
The TYPE statement is not allowed in ROUTINES.
The TYPE statement must come before any variable declaration that uses
user-defined fields.
A NODEDEF type defines a structure including both predefined_name fields and
user defined fields. Note that it could be very useful to define the structure of a
PATH NODE.
A NODEDEF type can contain any number of predefined_name fields and any
number of name fields. However, the NODEDEF must contain at least one field.
predefined_name is a standard node field having the same meaning as the
corresponding predefined variable. For example, $MOVE_TYPE can be used and
has the same meaning as described in Chap.12. - Predefined Variables List.
The NOTEACH option in a NODEDEF type indicates that those fields are not
displayed in the teach environment. This disables the user from modifying those
fields while teaching.
Refer to Chap.3. - Data Representation for a list of valid predefined_name fields
and further information about RECORD and NODEDEF type definitions.
Examples:
PROGRAM main
TYPE
ddd_part = RECORD
name: STRING[15]
count: INTEGER
params: ARRAY[5] OF REAL
ENDRECORD
pr-0-0-pdl_10.fm
00/0607 10-39
Statements List
lapm_pth1 = NODEDEF
$MAIN_POS
$MOVE_TYPE
$ORNT_TYPE
$SPD_OPT
$SEG_TERM_TYPE
$SING_CARE
weld_sch : ARRAY[8] OF REAL
gun_on : BOOLEAN
ENDNODEDEF
VAR
count, index : INTEGER
part_rec : ddd_part
weld_pth : PATH OF lapm_pth1
BEGIN
-- Executable section
END main
See also:
VAR Statement
Chap.3. - Data Representation
UNLOCK ALL
See also:
LOCK Statement
RESUME Statement
pr-0-0-pdl_10.fm
10-40 00/0607
Statements List
UNPAUSE ALL
See also:
PAUSE Statement
pr-0-0-pdl_10.fm
00/0607 10-41
Statements List
variables, prog_name indicates the name of the program owning the variable.
If the NOSAVE clause is specified, the variables included in that declaration are not
saved to the variable file (.VAR file).
The NOSAVE and EXPORTED FROM clauses are not permitted on routine VAR
declarations.
The initial_value option is permitted on REAL, INTEGER, BOOLEAN, and STRING
declarations. It is used to indicate a value to be assigned to the variable before the
BEGIN of the program or routine is executed.
Examples:
PROGRAM main
VAR
count, index : INTEGER (0) NOSAVE
angle, dist : REAL
job_complete : BOOLEAN EXPORTED FROM main
error_msg : STRING[30] EXPORTED FROM error_chk
menu_choices : ARRAY[4] OF STRING[30]
matrix : ARRAY[2,10] OF INTEGER
offset : VECTOR
pickup, perch : POSITION EXPORTED FROM data1
option : STRING[10] (backup) NOSAVE
safety_pos : JOINTPOS FOR ARM[2]
door_frame : XTNDPOS FOR ARM[3]
work_area : SEMAPHORE NOSAVE
default_part : INTEGER (0xFF) NOSAVE
BEGIN
-- Executable section
END main
See also:
CONST Statement
TYPE Statement
Chap.3. - Data Representation
pr-0-0-pdl_10.fm
10-42 00/0607
Statements List
SIGNAL Statement
pr-0-0-pdl_10.fm
00/0607 10-43
Statements List
INTEGER VECTOR
REAL POSITION
BOOLEAN JOINTPOS
STRING XTNDPOS
The reserved word NL can also be used. When specified, a carriage return is
written so the following items begin on the next line of output.
Each expr is written out in the order that it is listed.
Optional Format Specifiers can be used with each expr to format output as
explained in Chap.9. - Serial INPUT/OUTPUT.
Writing to certain types of devices (i.e. communication port) is done
asynchronously so other programs can execute simultaneously. The predefined
variable $WRITE_TOUT specifies the time out period for asynchronous writes.
Examples:
WRITE (x, y, z) -- lun_var defaults to $DFT_LUN
WRITE LUN_TP (‘The value of x is ‘, x)
WRITE LUN_NULL (‘This string will disappear’)
OPEN FILE crt1_lun (‘CRT1:’, ‘RW’)
WRITE crt1_lun (num, NL, error_msg)
See also:
OPEN FILE Statement
READ Statement
Chap.9. - Serial INPUT/OUTPUT
pr-0-0-pdl_10.fm
10-44 00/0607
BUILT-IN Routines list
As far as concerns VP2 built-in routines, please refer to VP2 - Visual PDL2 Manual,
chapter 6.
pr-0-0-pdl_11.fm
00/1207 11-1
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-2 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-3
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-4 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-5
BUILT-IN Routines list
Parameters: none
VAR
vi : INTEGER
vr : REAL (3.1415901) NOSAVE
vs : STRING[10] ('variable') NOSAVE
vb : BOOLEAN (TRUE) NOSAVE
vp : POSITION
vx : XTNDPOS
vj : JOINTPOS
vm : SEMAPHORE NOSAVE
ve : aRec
wi : ARRAY[5] OF INTEGER
wr : ARRAY[5] OF REAL
ws : ARRAY[5] OF STRING[10]
wb : ARRAY[5] OF BOOLEAN
wp : ARRAY[5] OF POSITION
wx : ARRAY[5] OF XTNDPOS
wj : ARRAY[5] OF JOINTPOS
wm : ARRAY[5] OF SEMAPHORE
we : PATH OF aNode
vi_value : INTEGER
pr-0-0-pdl_11.fm
11-6 00/1207
BUILT-IN Routines list
BEGIN
WRITE LUN_CRT ('In r2. Number of arguments', ARG_COUNT, NL)
FOR li := 1 TO ARG_COUNT DO
li_dtype := ARG_INFO(li,lb_byref, li_array_dim1,
li_array_dim2)
WRITE LUN_CRT ('Index:', li, ' Datatype = ', li_dtype, '[',
li_array_dim1, ',', li_array_dim2, ']. By ref:', lb_byref, NL)
SELECT ARG_INFO(li) OF
CASE (1):
ARG_GET_VALUE(li, li_value)
WRITE LUN_CRT ('Int Value = ', li_value, NL)
ARG_GET_VALUE(li, ai_value)
WRITE LUN_CRT ('Int Value = ', ai_value, NL)
ARG_GET_VALUE(li, vi_value)
WRITE LUN_CRT ('Int Value = ', vi_value, NL)
li_value += 10
ARG_SET_VALUE(li, li_value)
CASE (2): -- Real
ARG_GET_VALUE(li, lr_value)
WRITE LUN_CRT ('Rea Value = ', lr_value, NL)
CASE (3): -- Boolean
ARG_GET_VALUE(li, lb_value)
WRITE LUN_CRT ('Boo Value = ', lb_value, NL)
CASE (4): -- String
ARG_GET_VALUE(li, ls_value)
WRITE LUN_CRT ('Str Value = ', ls_value, NL)
CASE (5): -- Vector
ARG_GET_VALUE(li, lv_value)
WRITE LUN_CRT ('Vec Value = ', lv_value, NL)
CASE (6): -- Position
ARG_GET_VALUE(li, lp_value)
WRITE LUN_CRT ('Pos Value = ', lp_value, NL)
lp_value := POS(0)
ARG_SET_VALUE(li, lp_value)
pr-0-0-pdl_11.fm
00/1207 11-7
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-8 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-9
BUILT-IN Routines list
NOTE THAT, for time parameter, starting from system software 2.42 and
subsequent versions, values 1 and 0 have a special meaning:
– 1 - is used to start the data acquisition to calculate the Collision
Detection sensitivity thresholds
– 0 - is used to stop the data acquisition and assign the Collision
Detection sensitivity thresholds.
safety_gap is an optional flag which defines if the thresholds should be
calculated under a variability margin (TRUE (default value)) or exactly on an
assigned path (FALSE). $A_ALONG_2D[10, ax] predefined variable contains
the variability margin value which is initialized in the configuration file.
Example: ARM_COLL_THRS(1,COLL_USER7,1)
MOVE ...
....
MOVE ...
ARM_COLL_THRS(1,COLL_USER7,0)
See also: Motion Programming Manual - chapter COLLISION DETECTION for a
sample program (Program ‘soglia’)
pr-0-0-pdl_11.fm
11-10 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-11
BUILT-IN Routines list
MOVE TO zero
END reset
pr-0-0-pdl_11.fm
11-12 00/1207
BUILT-IN Routines list
Comments: arm_value is the JOINTPOS or XTNDPOS for which the arm number is to be
returned
Examples: ROUTINE loader (dest:JOINTPOS)
BEGIN
...
MOVE ARM[ARM_NUM(dest)] TO dest
...
END loader
Comments: The returned value is relative to the current value of $BASE, $TOOL,
$UFRAME.
If arm_num is not specified, the default arm is used.
Examples: PROGRAM main
VAR
source : POSITION EXPORTED FROM supply
dest : POSITION
ROUTINE get_part EXPORTED FROM part_util
ROUTINE paint_part EXPORTED FROM part_util
ROUTINE release_part EXPORTED FROM part_util
BEGIN
dest := ARM_POS(3)
MOVE NEAR source
get_part
paint_part
MOVE TO dest
release_part
END main
pr-0-0-pdl_11.fm
00/1207 11-13
BUILT-IN Routines list
Calling Sequence: ARM_SOFT (flag <, ax1, ax2, ax3, ax4, ax5, ax6, arm_num>)
pr-0-0-pdl_11.fm
11-14 00/1207
BUILT-IN Routines list
$TOOL_MASS: Mass of the tool and $TOOL_CNTR: Tool center of mass of the tool
of the related arm must be properly initialized before enabling the Soft Servo
modality otherwise the correctness of robot movements are not guaranteed.
pr-0-0-pdl_11.fm
00/1207 11-15
BUILT-IN Routines list
Comments: array_val must be a two dimensional array. If a one dimensional array is used an
error occurs.
Examples: ROUTINE print_2dim_ary(matrix : ARRAY[*, *] OF INTEGER)
VAR i, j, size1, size2 : INTEGER
BEGIN
size1 := ARRAY_DIM1(matrix)
size2 := ARRAY_DIM2(matrix)
FOR i := 1 TO size1 DO
FOR j := 1 TO size2 DO
WRITE(‘Element ‘, i, ‘ ‘, j, ‘ --> ‘, matrix[i, j], NL)
ENDFOR
END print_2dim_ary
pr-0-0-pdl_11.fm
11-16 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-17
BUILT-IN Routines list
Note that the program which switches to DRIVE ON must be the same which switches
to DRIVE OFF.
The AUX_DRIVES built-in Procedure can be used only if the Sik Device associated
to the involved axes/arms has been properly configured. For further details refer
to the Use of C4G Controller Unit manual (IO_TOOL Program, IO_INST Program,
Setup Page chapters), Integration guidelines Safeties, I/O, Communications manual,
and par. 5.3.1 $SDIN and $SDOUT on page 5-6 in current manual.
pr-0-0-pdl_11.fm
11-18 00/1207
BUILT-IN Routines list
variable or port. The value to be assigned to the bit is the result of a comparison between
BOOLEAN parameters passed to this built-in.
pr-0-0-pdl_11.fm
00/1207 11-19
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-20 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-21
BUILT-IN Routines list
Comments: The current time is returned in seconds counted from January 1, 1980. For
example, a value of 0 indicates midnight on December 31, 1979. CLOCK is typically
used to measure differences in time. If the value is negative, the hardware clock
has never been set. The value is actually incremented every other second.
Examples: cur_time := CLOCK
WRITE(CLOCK, NL) -- say time is 1514682000
-- 30 second time interval
WRITE(CLOCK, NL) -- now time is 1514682030
pr-0-0-pdl_11.fm
11-22 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-23
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-24 00/1207
BUILT-IN Routines list
x := SIN(angle1) * COS(angle2)
Comments: The date is returned in the format day-month-year. Where day is 2 characters,
month is 3 characters and year is 2 characters. Each group of characters are
separated by a hyphen (‘-’). The minimum string size is 9 characters, needed for
storing the day, the month and the year. For getting also hour, or minutes and
seconds, the string must be declared of 20 characters. If the return value is
assigned to a variable whose maximum length is less than 9, the result will be
truncated.
date_in must be passed in integer format according to the table shown below.
See the example to better understand how to set up an input date value
YEAR: The passed value represents the desired year minus 1980. (To pass
1994 for example, the year field woud be 1994-1980, or 14. To pass
1980, the year field should be zero.)
MONTH: A value from 1 to 12
DAY: A value from 1 to 31
HOUR: A value from 0 to 23
MINS: A value from 0 to 59
SECS: A value from 0 to 29, the effective numbers of seconds divided by 2
pr-0-0-pdl_11.fm
00/1207 11-25
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-26 00/1207
BUILT-IN Routines list
DIR_SET(‘UD:’)
SYS_CALL(‘FUDM’,’prova’)
will create UD:\appl\arc\prova.
For creating a directory at the root of UD:, the user will have to write
DIR_SET(‘UD:\\’)
In the example, a statement
SYS_CALL(‘FUDM’,’prova’)
will create the directory UD:\prova.
The following outlines the valid values for code and their expected parameters:
1 Create a PIPE
Parameters:
– a STRING for the pipe name
– an INTEGER for the buffer size (default = 512)
– an INTEGER for the number of senders (default = 1)
– an INTEGER for the number of readers (default = 1)
– an INTEGER for flags (0x1 means deleting the pipe when no longer
opened)
2 Delete a PIPE
Parameters:
– a STRING for the pipe name
pr-0-0-pdl_11.fm
00/1207 11-27
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-28 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-29
BUILT-IN Routines list
Parameters:
– An INTEGER containing the configuration ID
– An INTEGER containing the index of the message to be deleted
25 Get an e-mail header. This command reads the e-mail header without
downloading the message from the server.
Parameters:
– An INTEGER containing the configuration ID
– An INTEGER containing the index of the e-mail whose header is to
be read
– A STRING[63] containing the "From:" field address
– A STRING[1023] containing the e-mail title
– An INTEGER containing the server receipt date (ANSI TIME)
– An ARRAY[2,8] of STRINGs[63] which include "To:" and "CC:"
fields contents:
• [1] array of "To:" contents
• [2] array of "CC:" contents
26 Close the e-mail channel (e-mail ID).
Parameters:
– An INTEGER containing the configuration ID
27 Get information about a network connection.
Parameters:
– An INTEGER which is the LUN (see OPEN FILE Statement)
associated to the channel of interest
– A STRING (by reference) for the session peer
– A STRING (by reference) for the accept peer
– A STRING (by reference) for the connect address
– An INTEGER (by reference) for the remote port
– An INTEGER (by reference) for the local port
– An INTEGER (by reference) for options
– An INTEGER (by reference) for the linger time
28 This code can be used for configuring different aspects of a TCP/IP
channel. The parameters to the routine are used for specifying which
feature is to be enabled or cleared or in fact not touched at all.
Parameters:
– An INTEGER which is the LUN (see OPEN FILE Statement)
associated to the channel of interest
– An INTEGER which is the value (either 0 or 1) to be assigned to the
current bit. See the Examples below.
– An INTEGER which indicates the features involved in the required
modification (-1 means restore to default values); see the Examples
below. The following bits are available:
• 1 - NO_DELAY
• 2 - NOT_KEEPALIVE - do NOT send challenge packets to
peer, if idle
• 4 - LINGER
• 8 - UDP_BROADCAST - permit sending of broadcast
messages
• 16 - OOB - send out-of-band data
• 32 -DONT_ROUT - send without using routing tables
pr-0-0-pdl_11.fm
11-30 00/1207
BUILT-IN Routines list
where:
– 0x3 means that the features which are involved in the modification are:
NO_DELAY (1) and NOT_KEEPALIVE (2); note that the other bits are ignored.
– 0x1 means bit 1 is to be set and bit 2 is to be cleared.
pr-0-0-pdl_11.fm
00/1207 11-31
BUILT-IN Routines list
0: Default protocol
1: reserved
3: 3964r
6-8 -- reserved
2 a file device
4 reserved
6 reserved
7 a pipe device
9 3964r protocol
16-32 reserved
pr-0-0-pdl_11.fm
11-32 00/1207
BUILT-IN Routines list
Comments: lun_id can be any user-defined variable that represents an open logical unit
number (LUN).
TRUE will be returned if the last operation on lun_id was a READ and the end of
file was reached before all specified variables were read.
If the end of file is reached before the READ statement completed, all variables
not yet read are set to uninitialized.
If lun_id is associated to a communication port, the end-of-file is not recognized,
and in this case it is necessary to define in the program which character is
assumed as file terminator and check when this character is encountered.
Examples: OPEN FILE lun_id (‘data.txt’, ‘R’)
READ lun_id (str)
WHILE NOT EOF(lun_id)
WRITE (str, NL)
READ lun_id (str)
ENDWHILE
pr-0-0-pdl_11.fm
00/1207 11-33
BUILT-IN Routines list
Comments: error_num can be any INTEGER expression whose value is in the range of
43008 to 44031. Such errors correspond to EC_USR1 and EC_USR2 class.
error_str is a STRING expression that contains an error message to be
displayed.
error_sev is an INTEGER expression whose value is in the range of 2 to 12.
These values represent the following error severities:
– 2 : Warning
– 4 : Pause, hold if holdable
– 6 : Pause all, hold if holdable
– 8 : Hold
– 10 : DRIVE OFF, pause all, deactivate
– 12 : DRIVE OFF, deactivate all
When ERR_POST is executed, the error is treated like any system error. The
error is posted to the error log and any error-specific condition handlers are
scanned. The $ERROR variable is not set for the program that calls the
ERR_POST built-in. For testing if the error specified in the ERR_POST
occurred, the $SYS_ERROR predefined variable can be used.
post_flags is an INTEGER expression whose value consists of the following
masks:
– Bit 1: Do not post in the ERROR.LOG file
– Bit 2: Do not post on the status window of the system screen
– Bit 3: Do not post to condition handler scanning process
– Bit 4: Do not post on the scrolling window of the TP system screen
– Bit 5: Do not post on the scrolling window of the PC screen
– Bit 6: Do not post to the system state machine
– Bit 7: Cause program state transition based on error severity (if bit 7 isn’t set
the transition won’t take place)
– Bit 10: Automatic return from current routine (Bit 7 must also be set)
– Bit 12: Do not post to error logger task
– Bit 13: Add to binary log even if severity 2
– Bit 15: A latched ALARM
– Bit 16: A latched ALARM with disabled DRIVE ON
– Bit 17: A latched ALARM with disabled AUTO state trasition
resp_flags : An array of integers with a min. size of 4 elements:
– [1] : A mask with the available responses that the user can select (see
constant ERR_OK etc)
– [2] : Default response
– [3] : Action to be performed when the user has acknowledged the alarm eg.
Signal event or set a variable
• 0 = Cancel the active alarm
• 1 = Post an event with data the event to be raised
• 2 = Set a variable. When the active alarm is acknowledged the variable
is with the low word the alarm id, high word the response
– [4] : The data associated with the action eg. variable to be set or event id to
be raised
alarm_id : Optional variable (by reference) that will contain the alarm identifier
after the alarm has become active
resp_data : optional variable (by reference) that will contain the response made
by the user with low word the alarm_id and high word the response.
pr-0-0-pdl_11.fm
11-34 00/1207
BUILT-IN Routines list
BEGIN
CYCLE
--First of all configure how the alarm is to be displayed
--Options to be displayed on menu
wi_conf[1] := (1 SHL ERR_OK - 1) OR (1 SHL ERR_CANCEL -
1) OR (1 SHL ERR_RETRY - 1) OR (1 SHL ERR_ABORT - 1) OR (1
SHL ERR_SKIP - 1)
wi_conf[2] := ERR_OK -- Default
wi_conf[3] := 1 -- Post an event
wi_conf[4] := 49152 -- Event code
vi_data := 0
--Raise the error
ERR_POST(43009 + $CYCLE, 'Sample error', 4, 0, wi_conf,
vi_id, vi_data)
--Wait for the user response
WAIT FOR EVENT 49152
WRITE LUN_CRT ('User responded. Id=', vi_data AND
0xFFFF::8::2, 'Response=', vi_data SHR 8::8::2, NL)
--Now cancel the alarm
CANCEL ALARM vi_id
END actalarm
pr-0-0-pdl_11.fm
00/1207 11-35
BUILT-IN Routines list
• 8 = Chinese.
Comments: error_num1..error_num8 indicate the numbers of the errors to be trapped off. While error
trapping is turned off, error checking is performed by the system. This is the normal case.
The maximum number is 8; negative numbers are allowed to invert the ON/OFF.
Examples: PROGRAM flib NOHOLD
VAR s : STRING[30]
ROUTINE filefound(as_name : STRING) : BOOLEAN EXPORTED FROM flib
ROUTINE filefound(as_name : STRING) : BOOLEAN
BEGIN
ERR_TRAP_ON(39960) -- trap SYS_CALL errors
SYS_CALL(‘fv’, as_name)
ERR_TRAP_OFF(39960)
IF $SYS_CALL_STS > 0 THEN -- check status of SYS_CALL
RETURN(FALSE)
ELSE
RETURN(TRUE)
ENDIF
END filefound
BEGIN
CYCLE
WRITE (‘Enter file name: ’ )
READ (s)
IF filefound(s) = TRUE THEN
WRITE (‘*** file found ***’, NL)
ELSE
WRITE (‘*** file NOT found ***’, NL)
ENDIF
END flib
See also: ERR_TRAP_ON Built-In Procedure
pr-0-0-pdl_11.fm
11-36 00/1207
BUILT-IN Routines list
Comments: error_num1..error_num8 indicate the numbers of the errors to be trapped on. Only those
errors in the EC_TRAP group (from 39937 to 40075) can be used.
The maximum number is 8; negative numbers are allowed to invert the ON/OFF.
While error trapping is turned on, the program is expected to handle the specified errors.
$ERROR or other status predefined variables ($SYS_CALL_STS, etc.) will indicate the
error that occurred even if the error is currently being trapped
Examples: PROGRAM flib NOHOLD
VAR s : STRING[30]
ROUTINE filefound(as_name : STRING) : BOOLEAN EXPORTED FROM flib
ROUTINE filefound(as_name : STRING) : BOOLEAN
BEGIN
ERR_TRAP_ON(39960) -- trap SYS_CALL errors
SYS_CALL(fv, as_name)
ERR_TRAP_OFF(39960)
IF $SYS_CALL_STS > 0 THEN -- check status of SYS_CALL
RETURN(FALSE)
ELSE
RETURN(TRUE)
ENDIF
END filefound
BEGIN
CYCLE
WRITE (‘Enter file name: ‘)
READ (s)
IF filefound(s) = TRUE THEN
WRITE (‘*** file found ***’, NL)
ELSE
WRITE (‘*** file not found ***’, NL)
ENDIF
END flib
pr-0-0-pdl_11.fm
00/1207 11-37
BUILT-IN Routines list
Comments: lun_id can be any user-defined variable that represents an open logical unit
number (LUN).
lun_id must have been opened for random access and read or an error occurs.
End of line markers are counted in the returned value
Examples: OPEN FILE file_lun (‘data.txt’, ‘RWA’),
WITH $FL_RANDOM = TRUE,
ENDOPEN
FL_SET_POS(file_lun, 0) -- beginning of the file
...
IF FL_BYTES_LEFT(file_lun) > 0 THEN
get_next_value
ELSE
write_error
ENDIF
Comments: lun_id can be any user-defined variable that represents an open logical unit
number (LUN).
lun_id must have been opened for random access and read or an error results.
End of line markers are counted in the returned value
Examples: PROGRAM test NOHOLD
VAR i, lun : INTEGER
arr : ARRAY[20] OF REAL
ROUTINE write_values(values : ARRAY[*] OF REAL; lun : INTEGER)
VAR i : INTEGER
back_patch : INTEGER
total : INTEGER (0) -- initialize to 0
BEGIN
pr-0-0-pdl_11.fm
11-38 00/1207
BUILT-IN Routines list
back_patch := FL_GET_POS(lun)
WRITE lun (0, NL)
FOR i := 1 TO ARRAY_DIM1(values) DO
IF values[i] <> 0 THEN
total := total + 1
WRITE lun (values[i], NL)
-- fill the array
FOR i := 1 TO 20 DO
arr[i] := i
ENDFOR
OPEN FILE lun (‘temp.txt’, ‘rw’),
WITH $FL_RANDOM = TRUE,
ENDOPEN
write_values(arr, lun)
CLOSE FILE lun
END test
ELSE
ENDIF
ENDFOR
-- backup and output number of values written to the file
FL_SET_POS(lun, back_patch)
WRITE lun (total)
FL_SET_POS(lun, 1) -- return to end of file
END write_values
pr-0-0-pdl_11.fm
00/1207 11-39
BUILT-IN Routines list
FOR i := 1 TO ARRAY_DIM1(values) DO
IF values[i] <> 0 THEN
total := total + 1
WRITE lun (values[i], NL)
ELSE
ENDIF
ENDFOR
-- backup and output number of values written to the file
FL_SET_POS(lun, back_patch)
WRITE lun (total)
FL_SET_POS(lun, 1) -- return to end of file
END write_values
BEGIN
-- fill the array
FOR i := 1 TO 20 DO
arr[i] := i
ENDFOR
OPEN FILE lun (‘temp.txt’, ‘rw’),
WITH $FL_RANDOM = TRUE,
ENDOPEN
write_values(arr, lun)
CLOSE FILE lun
END test
pr-0-0-pdl_11.fm
11-40 00/1207
BUILT-IN Routines list
Comments: flow_tbl_idx: is the index of the $FLOW_TBL that contains all the settings to be
used during the algorithm application.
pr-0-0-pdl_11.fm
00/1207 11-41
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-42 00/1207
BUILT-IN Routines list
HDIN_READ(lp_hdin_pos, 1)
-- get the offset between the first location of the workpiece
-- and the position where the HDIN triggered
lv_diff := POS_GET_LOC(lp_hdin_pos) - POS_GET_LOC (wp_siding[1])
-- disable the HDIN reading
HDIN_SET (1, FALSE, FALSE, FALSE)
FOR lv_i :=1 TO ki_siding DO
-- shift all motions on the workpiece by the difference
-- previously calculated offsets
lp_shift := wp_siding[lv_i]
POS_SHIFT(lp_shift, lv_diff)
MOVE LINEAR TO lp_shift
ENDFOR
END isr_siding
BEGIN
CONDITION[1] NODISABLE:
WHEN HOLD DO -- temporarely disable the HDIN triggering
-- when the system goes in HOLD state
$DSA_DATA[1].HDIN_SUSP:=1
WHEN START DO -- reenable the HDIN triggering when motion
-- restarts (START button)
$DSA_DATA[1].HDIN_SUSP:= 0
ENDCONDITION
CONDITION[2]:
WHEN EVENT 121 DO -- triggering of HDIN (negative transition)
CANCEL ALL
UNLOCK
RESUME
DISABLE CONDITION[1]
isr_siding
ENDCONDITION
CONDITION[3]: -- enable the HDIN when the motion starts
WHEN AT START DO
$DSA_DATA[1].HDIN_SUSP :=0
ENABLE CONDITION[1], CONDITION[2]
ENDCONDITION
MOVE TO pnt0001j
CYCLE
RESUME -- in case the arm is locked
MOVE TO pnt0002j
-- setup the HDIN to lock the arm and record the position
HDIN_SET(1, TRUE, FALSE, TRUE)
$DSA_DATA[1].HDIN_SUSP := 1
-- pnt0004j is the first point of research of the workpiece
MOVE LINEAR TO pnt0004j WITH CONDITION[3]
....
END hdin_ex
pr-0-0-pdl_11.fm
00/1207 11-43
BUILT-IN Routines list
Comments: prog_name is the name of the program that is interpreting the MOVE to be checked.
pr-0-0-pdl_11.fm
11-44 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-45
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-46 00/1207
BUILT-IN Routines list
Parameters: number :
REAL [IN]
Comments: number must be greater than zero or an error results.
pr-0-0-pdl_11.fm
00/1207 11-47
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-48 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-49
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-50 00/1207
BUILT-IN Routines list
CONDITION[1] NODISABLE:
WHEN EVENT 134 DO
$FDOUT[21] := TRUE
WHEN EVENT 135 DO
$FDOUT[22] := TRUE
WHEN EVENT 136 DO
$FDOUT[23] := TRUE
ENCONDITION
CONDITION[2] NODISABLE :
WHEN EVENT 142 DO
$FDOUT[21] := FALSE
WHEN EVENT 143 DO
$FDOUT[22]:= FALSE
WHEN EVENT 144 DO
$FDOUT [23] := FALSE
ENDCONDITION
ENABLE CONDITION[1], CONDITION[2]
$TOOL_RMT := TRUE
$BASE := POS(0, 0, 0, 0, 0, 0, ‘’)
$TOOL := POS(1000, 3000, -1000, 180, 0, 0, ‘’)
$UFRAME := POS(0, 0, 50, 0, 90, 0, ‘’)
-- On Pos definition on POSITIONs for the first 3
elements
-- of $ON_POS_TBL
ON_POS_SET($WORD[20], 1, 1) -- element 1 uses bit 1
of
-- $WORD[20]
ON_POS_SET($WORD[20], 2, 2) -- element 2 uses bit 3
of
-- $WORD[20]
ON_POS_SET($WORD[20], 3, 3) -- element 3 uses bit 3
of
-- $WORD[20]
-- On Pos definition on JOINTPOS
ON_JNT_SET($WORD[20], 4, 4, j1, $JNT_MASK) --
element 4
-- uses bit 4 of
$WORD[20]
pr-0-0-pdl_11.fm
00/1207 11-51
BUILT-IN Routines list
MOVE TO p1
DELAY 1000
MOVE TO p2
DELAY 1000
MOVE LINEAR TO p3
DELAY 1000
MOVE TO j1
DELAY 1000
MOVE LINEAR TO j2
DELAY 1000
END op45
See also: ON_POS Built-In Procedure, ON_POS_SET Built-In Procedure,
On Position Feature in Motion Programming Manual and
$ON_POS_TBL: ON POS table data.
pr-0-0-pdl_11.fm
11-52 00/1207
BUILT-IN Routines list
the calling.
Its use is very similar to ON_JNT_SET. The difference is only related to the port data
type: ON_JNT_SET refers to an INTEGER port while the ON_JNT_SET_DIG refers to
a digital (BOOLEAN) port.
pr-0-0-pdl_11.fm
00/1207 11-53
BUILT-IN Routines list
After the ON_POS (ON, …), the On Pos feature remains enabled until the next
ON_POS (OFF, …) on the same $ON_POS_TBL element or the next controller
restart. Note that, upon ON_POS (OFF, ...) the related bit assumes the value
of 0).
Examples: PROGRAM op44
VAR p1, p2, p3, p4 : POSITION
VAR i : INTEGER
BEGIN
-- definition of condition that monitor the entering and
-- the exiting from the sphere defined in the $ON_POS_TBL.
CONDITION[1] NODISABLE:
WHEN EVENT 134 DO
$FDOUT[21] := TRUE
WHEN EVENT 135 DO
$FDOUT[22] := TRUE
WHEN EVENT 136 DO
$FDOUT[23] := TRUE
ENDCONDITION
CONDITION[2] NODISABLE :
WHEN EVENT 142 DO
$FDOUT[21] := FALSE
WHEN EVENT 143 DO
$FDOUT[22] := FALSE
WHEN EVENT 144 DO
$FDOUT[23] := FALSE
ENDCONDITION
ENABLE CONDITION[1], CONDITION[2]
-- definition of bits 1, 2, 3 of $WORD[5]
-- associated to element 1,2,3 of the $ON_POS_TBL
ON_POS_SET($WORD[5], 1, 1); ON_POS_SET($WORD[5], 2, 2)
ON_POS_SET($WORD[5], 3, 3)
FOR i := 1 TO 3 DO
$ON_POS_TBL[i].OP_TOOL := $TOOL
$ON_POS_TBL[i].OP_UFRAME := $UFRAME
$ON_POS_TBL[i].OP_TOOL_DSBL:= FALSE
$ON_POS_TBL[i].OP_TOOL_RMT := FALSE
ENDFOR
-- Home Position
$ON_POS_TBL[1].OP_POS := p1
-- Enabling of ON POS feature on element 1 of the
-- $ON_POS_TBL
ON_POS(TRUE, 1, 1)
pr-0-0-pdl_11.fm
11-54 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-55
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-56 00/1207
BUILT-IN Routines list
PROGRAM e NOHOLD
VAR s : STRING[20] NOSAVE
VAR vi_value, vi_j, vi_len : INTEGER NOSAVE
BEGIN
s := '\199A\127\129\000N'
vi_len := STR_LEN(s)
FOR vi_j := 1 TO vi_len DO
vi_value := ORD(s, vi_j)
IF vi_value < 0 THEN
vi_value += 256 -- Correct the value
ENDIF
WRITE LUN_CRT ('Index ', vi_j, ' Value: ',
vi_value::3::-5, NL)
ENDFOR
END e
pr-0-0-pdl_11.fm
00/1207 11-57
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-58 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-59
BUILT-IN Routines list
Comments: The approach vector represents the positive z direction of the frame of
reference defined by source_pos.
Examples: ROUTINE rotate_orient (posn : POSITION)
VAR
temp : VECTOR
BEGIN
temp := POS_GET_APPR(posn)
POS_SET_APPR(posn, POS_GET_NORM(posn))
POS_SET_NORM(posn, temp)
END rotate_orient
pr-0-0-pdl_11.fm
11-60 00/1207
BUILT-IN Routines list
POSITION variable.
Comments: The maximum length of a configuration string is 33. Therefore, if the return
value of POS_GET_CNFG is assigned to a string variable, that variable should
have a maximum length of at least 33 characters to avoid truncation.
Refer to Data Representation chapter for a description of the configuration
string.
Examples: cnfg_str := POS_GET_CNFG(cur_pos)
Comments: The normal vector represents the positive x axis of the frame of reference
specified by a source_pos.
pr-0-0-pdl_11.fm
00/1207 11-61
BUILT-IN Routines list
Comments: The orientation vector represents the positive y axis of the frame of reference
defined by source_pos.
Examples: ROUTINE rotate_approach (posn : POSITION)
VAR temp : VECTOR
BEGIN
temp := POS_GET_NORM(posn)
POS_SET_NORM(posn, POS_GET_ORNT(posn))
POS_SET_ORNT(posn, temp)
END rotate_approach
pr-0-0-pdl_11.fm
11-62 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-63
BUILT-IN Routines list
$ERROR:=0
POS_IN_RANGE(p, boo)
IF boo THEN
MOVE TO p
ELSE
IF $ERROR = 40028 THEN -- inverse kinematic not
available
-- cannot determine if the position was in range
ELSE
-- position not in range
ENDIF
pr-0-0-pdl_11.fm
11-64 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-65
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-66 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-67
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-68 00/1207
BUILT-IN Routines list
Parameters: None
Comments: The returned value is the code of the EZ program that owns the Built-In.
If the program isn’t an EZ program, the Built-In returns -1; if it is an EZ program
but it isn’t possible to find any number in the program name, the Built-In returns
-3; if the conversion fails the Built-In returns -2.
Examples: Prog_20 EZ
ROUTINE seam (i : INTEGER) EXPORTED FROM wa_appl
ROUTINE call_prog_20 EXPORTED FROM prog_20
BEGIN
seam (PROG_OWNER) -- the PROG_OWNER Built-In returns
20
END call_prog_20
BEGIN
call_prog_20
END call_prog_20
pr-0-0-pdl_11.fm
00/1207 11-69
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-70 00/1207
BUILT-IN Routines list
Comments: max_num is an optional parameter that indicates the maximum limit for the
generated number. If not specified, the limit range is between 0 and 99.
Comments: The returned value is rounded down if num has a decimal value greater than 0.0
and less than 0.5. If the value is greater than or equal to 0.5 it will be rounded up
(see diagram).
This function can be used to convert a REAL expression into
an INTEGER value.
pr-0-0-pdl_11.fm
00/1207 11-71
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-72 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-73
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-74 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-75
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-76 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-77
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-78 00/1207
BUILT-IN Routines list
x := SIN(angle1) * COS(angle2)
x := SIN(60) -- x = 0.866025
x := SQRT(276.971) -- x = 16.6424
pr-0-0-pdl_11.fm
00/1207 11-79
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-80 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-81
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-82 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-83
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-84 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-85
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-86 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-87
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-88 00/1207
BUILT-IN Routines list
BEGIN
TABLE_ADD('userTable', $PROG_NAME, 'TabUser')
END exampletable
See also: TABLE_DEL Built-In Procedure.
Use of C4G manual, DATA page section
par. 16.2 User table creation from DATA environment on page 16-1.
Comments: The parameter table_name is the name of the TYPEDEF which defines the
table elements.
Examples: TABLE_DEL('userTable')
pr-0-0-pdl_11.fm
00/1207 11-89
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-90 00/1207
BUILT-IN Routines list
variable could not be determined; this can happen, for example, if the parameter
to the routine is an expression)
1: program variable found
2: local variable found
3: parameter variable found.
pr-0-0-pdl_11.fm
00/1207 11-91
BUILT-IN Routines list
Comments: device specifies the name of the device containing the volume to be checked.
The following device names can be used:
UD:, TD:
A volume is the media on a device. For example a particular disk in a disk drive
device.
total is set to the total number of bytes used on the volume.
free is set to the total number of unused bytes on the volume.
volume is set to the volume label. An empty STRING indicates the volume is not
labeled.
Examples: VOL_SPACE(‘UD:’, total, free, volume)
pr-0-0-pdl_11.fm
11-92 00/1207
BUILT-IN Routines list
attributes are to be set. If it is not specified, the default window indicated by $DFT_DV[1]
is used.
win_name can be one of the following system defined window names or any user-defined
window name:
– ‘TP:‘ -- scrolling window on system screen
– ‘TP1:‘ -- window 1 on user screen on Teach Pendant
– ‘TP2:’ -- window 2 on user screen on Teach Pendant
– ‘TP3:’ -- window 3 on user screen on Teach Pendant
– ‘CRT:’ -- scrolling window on system screen of the PC video
-- (when Winc4g program is active)
– ‘CRT1:’ -- window 1 on user screen on PC video
– ‘CRT2:’ -- window 2 on user screen on PC video
– ‘CRT3:’ -- window 3 on user screen on PC video
Examples: PROGRAM wattr NOHOLD
VAR lun : INTEGER
BEGIN
OPEN FILE lun (‘crt2:’, ‘rw’) Window 2 on user screen of the PC
WRITE lun (‘This is ‘)
WIN_ATTR(WIN_BLINK_ON, ‘crt2:’) Turn blink on
WRITE lun (BLINK, NL)
WIN_ATTR(WIN_BLINK_OFF, ‘crt2:’) Turn blink off
Reverse video and bold
WIN_ATTR(WIN_REVERSE OR WIN_BOLD_ON, ‘crt2:’)
WRITE lun (‘This is REVERSE and BOLD’, )
WIN_ATTR(WIN_REVERSE, ‘crt2:’) Reverse video back to normal
WRITE lun (‘this is only BOLD.’, NL)
WIN_ATTR(WIN_BOLD_OFF, ‘crt2:’) Turn bold off
CLOSE FILE lun
END wattr
The output from the example program is show below:
pr-0-0-pdl_11.fm
00/1207 11-93
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-94 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-95
BUILT-IN Routines list
Comments: win_name can be any user-defined window name (created using the
WIN_CREATE built-in routine).
A window can be deleted only after it has been removed from the screen.
Deleting a window means the window name can no longer be used in
window-related built-in routines.
An error occurs if a window is deleted before all LUNs opened on the window
are closed. In addition, it must also be detached.
System defined windows cannot be deleted.win_name is not permitted to be
deleted if the alphabetical menu window (‘TP0:’) is currently a popup window on
win_name.
Examples: WIN_DEL (‘menu:’)
-- popup window over window USR1
WIN_POPUP(‘POP1:’, ‘USR1:’)
-- open a lun on window POP1
OPEN FILE lun (‘POP1:’, ‘rw’)
FOR i := 1 TO 10 DO
WRITE lun (i, ‘: This is an example of a popup window’, NL)
ENDFOR
CLOSE FILE lun
-- let user read the message
DELAY 5000
Remove and delete window POP1 from user screen
WIN_REMOVE(‘POP1:’)
WIN_DEL(‘POP1:’)
pr-0-0-pdl_11.fm
11-96 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-97
BUILT-IN Routines list
Calling Sequence: WIN_LINE <(row <, column <, num_chars <, win_name)>>>>
pr-0-0-pdl_11.fm
11-98 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-99
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-100 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-101
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-102 00/1207
BUILT-IN Routines list
pr-0-0-pdl_11.fm
00/1207 11-103
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-104 00/1207
BUILT-IN Routines list
Calling Sequence: WIN_STATE (win_name <, scrn_num <, parent <, num_rows>>>)
pr-0-0-pdl_11.fm
00/1207 11-105
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-106 00/1207
BUILT-IN Routines list
WRITE (‘X’::3)
ELSE
WRITE (‘ ‘::3)
ENDIF
WRITE (NL)
END write_state
pr-0-0-pdl_11.fm
00/1207 11-107
BUILT-IN Routines list
pr-0-0-pdl_11.fm
11-108 00/1207
Predefined Variables List
This chapter is a reference of PDL2 predefined variables. They are available in the
following lists:
– Predefined Variables groups
– Alphabetical Listing
The following information is provided for each predefined variable:
– Memory Category
– Load Category
– Data Type
– Limits (“none” indicates no limits);
– Attributes (“none” indicates no special attributes);
– S/W Version
– Unparsed
– Description.
Predefined variables begin with a dollar sign ($) to easily distinguish them from user
defined variables.
pr-0-0-pdl_12.fm
00/0607 12-1
Predefined Variables List
For further information see also Control Unit Use Manual - Chap. SYSTEM
COMMANDS.
12.4 Attributes
The attributes section lists access information.
– Read-only. Usually, PDL2 programs can assign (write ) a value to a predefined
variable and can examine (read) the current value of a variable. The “read-only”
attribute indicates that a predefined variable can only be read .
– WITH MOVE, WITH MOVE ALONG, WITH OPEN FILE: some predefined
variables can assume a specific value that is assigned during a statement
execution using the WITH clause.
– Limited Access. Some predefined variables can only be accessed using the WITH
clause.
– Field node: the predefined variable can be used as a predefined field of a path
node (NODEDEF data type definition).
– Pulse usable : the predefined variable can be used in a PULSE statement.
pr-0-0-pdl_12.fm
12-2 00/0607
Predefined Variables List
– Priviledged read-write: only COMAU technicians or COMAU programs can set this
variables by means of a special mechanism.
12.5 Limits
This indication is present if the value of a predefined variable should be included in a
specific range of values.
12.7 Unparsed
If this information is present, it specifies the format (e.g. hexadecimal) in which the value
of the predefined variable is shown when the configuration file (.C4G) is converted in an
ASCII format (.PDL).
pr-0-0-pdl_12.fm
00/0607 12-3
Predefined Variables List
pr-0-0-pdl_12.fm
12-4 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-5
Predefined Variables List
pr-0-0-pdl_12.fm
12-6 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-7
Predefined Variables List
pr-0-0-pdl_12.fm
12-8 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-9
Predefined Variables List
pr-0-0-pdl_12.fm
12-10 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-11
Predefined Variables List
pr-0-0-pdl_12.fm
12-12 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-13
Predefined Variables List
pr-0-0-pdl_12.fm
12-14 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-15
Predefined Variables List
pr-0-0-pdl_12.fm
12-16 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-17
Predefined Variables List
pr-0-0-pdl_12.fm
12-18 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-19
Predefined Variables List
pr-0-0-pdl_12.fm
12-20 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-21
Predefined Variables List
pr-0-0-pdl_12.fm
12-22 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-23
Predefined Variables List
pr-0-0-pdl_12.fm
12-24 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-25
Predefined Variables List
pr-0-0-pdl_12.fm
12-26 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-27
Predefined Variables List
pr-0-0-pdl_12.fm
12-28 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-29
Predefined Variables List
pr-0-0-pdl_12.fm
12-30 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-31
Predefined Variables List
pr-0-0-pdl_12.fm
12-32 00/0607
Predefined Variables List
Description: It represents the deceleration override percentage for motions issued to a particular
arm. There is one value per arm. Acceleration and maximum speed are not affected
by changes in its value. Changes in $ARM_DEC_OVR take effect on the next motion
and for the entire motion
pr-0-0-pdl_12.fm
00/0607 12-33
Predefined Variables List
Attributes: none
Limits 1..100
S/W Version: 1.00
Description: $ARM_OVR is similar to $GEN_OVR but is accessible from a PDL2 program, whereas
$GEN_OVR is accessible from the Teach Pendant. The variable scales speed,
acceleration and deceleration, so that the trajectory remains constant with changes in its
value. A change to $ARM_OVR immediately effects the shape of the velocity profile.
pr-0-0-pdl_12.fm
12-34 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-35
Predefined Variables List
pr-0-0-pdl_12.fm
12-36 00/0607
Predefined Variables List
Description: This variable contains the indication of the auxiliary axis that is associated to thte
corresponding key on the Teach Pendant. On TP4i/WiTP, element 1 is related to the
AUX-A key and element 2 is related to AUX-B key.
pr-0-0-pdl_12.fm
00/0607 12-37
Predefined Variables List
pr-0-0-pdl_12.fm
12-38 00/0607
Predefined Variables List
Limits none
S/W Version: 1.00
Description: It represents the conversion factor between radians and degrees for each rotational axis
and between millimeters and millimeters for each linear axis. There is an array element for
each axis.
PROGRAM quo NOHOLD
VAR i : INTEGER
gr_quo : ARRAY [6] OF REAL
BEGIN
FOR i := 1 TO 6 DO
-- Conversion of the quote
-- measured with axes
-- radiant in axes degrees
gr_quo[i] :=
$CRNT_DATA[1].RAD_IDL_QUO[i] *
$ARM_DATA[1].AX_CNVRSN[i]
ENDFOR
END quo
pr-0-0-pdl_12.fm
00/0607 12-39
Predefined Variables List
pr-0-0-pdl_12.fm
12-40 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-41
Predefined Variables List
pr-0-0-pdl_12.fm
12-42 00/0607
Predefined Variables List
Description: This structure is a boolean port array; the size of each element is 1 bit. For further
information see also par. 5.4.1 $BIT on page 5-16 and Control Unit Use Manual -
Chapters IO_INST Program and IO_TOOL Program.
pr-0-0-pdl_12.fm
00/0607 12-43
Predefined Variables List
pr-0-0-pdl_12.fm
12-44 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-45
Predefined Variables List
pr-0-0-pdl_12.fm
12-46 00/0607
Predefined Variables List
Description: It represents the system calibration position. For each new machine the user must jog the
robot to the calibration position, based on calipers or stamps, and then follow the
calibration procedure before using the robot in AUTO mode.
pr-0-0-pdl_12.fm
00/0607 12-47
Predefined Variables List
pr-0-0-pdl_12.fm
12-48 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-49
Predefined Variables List
pr-0-0-pdl_12.fm
12-50 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-51
Predefined Variables List
pr-0-0-pdl_12.fm
12-52 00/0607
Predefined Variables List
Description: This table contains information about the configuration of the system digital outputs:
[1] - description of the fieldbus type
[2] - Index
[3] - details about where this outputs is physically going to
pr-0-0-pdl_12.fm
00/0607 12-53
Predefined Variables List
Attributes: none
Limits none
S/W Version: 1.00
Description: Different bits of this predefined variable are used for setting the
configuration and startup of the controller:
– Bit 1: If set, the pop-up window containing informations on the
system configuration is not displayed at system restart.
– Bit 2: reserved
– Bit 3: If set, all the programs activated in the system will have bit 3 in $PROG_CNFG
set, which disables the setting of an output in these circumstances:
• a: if in PROGR state from an active program.
• b: if in PROGR state executing the statement from the WINC4G program running
on the PC when the Teach Pendant is recognised to be out of cabinet.
• c: if in PROGR state under MEMORY DEBUG or PROGRAM EDIT from the
WINC4G program running on the PC when the Teach Pendant is recognised to
be out of cabinet.
• d: if the state selector was turned out of the T1 position when the Teach Pendant
• is recognised to be out of cabinet.
– Bit 4: reserved
– Bit 5: If set, the WAIT FOR does not trigger if the program is in the held state (due to
HOLD or to an error)
– Bit 6: reserved
– Bit 7: If set, the communication protocol for WINC4G program is automatically
mounted on COMP: port after a restart.
– Bit 8: reserved
– Bit 9: If set, the EZ emulator does not automatically start when EZ is activated.
– Bit 10: If set, EZ does not wait for the UTILITY APPLICATION command or the EZ key
to be pressed.
– Bit 11: If set, EZ does not load in memory the programs that are referenced in the main
program.
– Bit 12: If set, EZ does not make any checks about the applications during the
installation phase
– Bit 13: Set to 1 for handling MOVE WITH $PAR.
– Bit 14-15: reserved to EZ
– Bit 16-22
– Bit 23: set to 1 to enable Autosave in IDE
– Bit 24: Set to 1 if the system is configured to handle the Customized Nodal Move
– Bit 25: Set to 1 if the UNICODE characters coding is handled by the system
– Bit 26-32: reserved
pr-0-0-pdl_12.fm
12-54 00/0607
Predefined Variables List
Description: Each bit represents how different aspects of the controller behave upon initialization:
– Bit 1..6: reserved
– Bit 7: If set, remote signals are ignored in AUTO, PROGR and AUTO-T state.
– Bit 8..10: reserved
– Bit 11: This bit configures the remote output as a copy of the state selector in REMOTE
position.
– Bit 12: reserved
– Bit 13: This bit configures the enabling device switch as the DRIVE OFF button, when
released in PROGR instead of HOLD.
– Bit 14: This bit enables warnings generated when a command is received from a
REMOTE device (Remote CAN I/O, FieldBus)
– Bit 15..16: reserved
– Bit 17: Enables software timer (1.4 sec.) that activate motors brake after remote
DRIVE OFF command (used as CONTROLLED EMERGENCY).
– Bit 18: If set, it disables multiarm command forcing.
– Bit 19..20: reserved
– Bit 21: If set, it means the loading system software is running.
– Bit 22: If set, CAC and CAT commands are disabled.
– Bit 23: If set, the precision (via the ‘:’ operator), in small orientation variations, around
X and Y axes, is of 0.2 degrees (instead of the default of 0.02 degrees). The precision
obtained is lower in this case.
pr-0-0-pdl_12.fm
00/0607 12-55
Predefined Variables List
pr-0-0-pdl_12.fm
12-56 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-57
Predefined Variables List
– ...
– COLL_USER10.
In the PROGR state, the COLL_MANUAL sensitivity is always used (no informational is
prompted to the user), no matter what is the current value of $COLL_TYPE. If one of the
values COLL_USER1 .. COLL_USER10 is assigned to $COLL_TYPE, it is responsability
of the user to initialise the corresponding table of $ARM_SENSITIVITY
PROGRAM pth
TYPE nd = NODEDEF
$MAIN_POS
$MOVE_TYPE
$COND_MASK
i : INTEGER
b : BOOLEAN
ENDNODEDEF
-- The nodes of this path should either be taught or NODE_APPended
VAR p : PATH OF nd
BEGIN
CONDITION[10]:
WHEN TIME 10 AFTER START DO
......
ENDCONDITION
CONDITION[30] :
WHEN TIME 20 BEFORE END DO
......
ENDCONDITION
CONDITION[20] :
WHEN AT START DO
......
ENDCONDITION
......
p.COND_TBL[1] := 10 -- Initialization of COND_TBL
pr-0-0-pdl_12.fm
12-58 00/0607
Predefined Variables List
p.COND_TBL[2] := 20
p.COND_TBL[3] := 30
-- on node 1, condition 10 and 30 will trigger, as 5 is equal
-- to bit 1 and 3, and elements 1 and 3 of COND_TBL
-- contain number 10 and 30.
p.NODE[1].$COND_MASK := 5
-- on node 4, condition 20 will trigger
p.NODE[4].$COND_MASK := 2
CYCLE
....
MOVE ALONG p
....
END p
pr-0-0-pdl_12.fm
00/0607 12-59
Predefined Variables List
pr-0-0-pdl_12.fm
12-60 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-61
Predefined Variables List
Description: It represents the maximum speed used by the arm to track the conveyor
pr-0-0-pdl_12.fm
12-62 00/0607
Predefined Variables List
Description: It defines the tracking window that is a region where conveyor tracking can be performed.
$CONV_WIN[1] contains the distance of the inbound boundary from the conveyor base
frame and $CONV_WIN[2] contains the distance of the outbound boundary. If the robot
attempts to move a position when the part has not yet come within the window, the
Controller Unit waits until the part enters the window. If the robot attempts to move to a
position when the part has moved out of the window then the Controller Unit generates an
error.
pr-0-0-pdl_12.fm
00/0607 12-63
Predefined Variables List
Limits 0..1023
S/W Version: 1.00
Description: It is used in conveyor tracking applications where an external resolver is connected to the
conveyor motor. The variable is a bit mask specifying the physical axis where the resolver
is connected
pr-0-0-pdl_12.fm
12-64 00/0607
Predefined Variables List
Description: It is used in conveyor tracking applications where an external resolver is connected to the
conveyor motor. The variable indicates the number of the servo control card to which the
resolver is connected
pr-0-0-pdl_12.fm
00/0607 12-65
Predefined Variables List
PROGRAM tcycle
ROUTINE do_clean_gun EXPORTED FROM gun
BEGIN
-- $CYCLE value is 0
CYCLE
-- $CYCLE is incremented every CYCLE
IF $CYCLE MOD 10 = 0 THEN
WRITE (CYCLE=,$CYCLE,NL)
do_clean_gun
ENDIF
END tcycle
pr-0-0-pdl_12.fm
12-66 00/0607
Predefined Variables List
Limits none
S/W Version: 1.00
Description: There are certain fields of $CRNT_DATA which do not have corresponding predefined
variables, but instead can be referenced using these general arrays. The format and
meaning of the data within these fields is reserved
pr-0-0-pdl_12.fm
00/0607 12-67
Predefined Variables List
pr-0-0-pdl_12.fm
12-68 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-69
Predefined Variables List
pr-0-0-pdl_12.fm
12-70 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-71
Predefined Variables List
pr-0-0-pdl_12.fm
12-72 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-73
Predefined Variables List
pr-0-0-pdl_12.fm
12-74 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-75
Predefined Variables List
pr-0-0-pdl_12.fm
12-76 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-77
Predefined Variables List
pr-0-0-pdl_12.fm
12-78 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-79
Predefined Variables List
pr-0-0-pdl_12.fm
12-80 00/0607
Predefined Variables List
Limits none
S/W Version: 1.00
Description: the variable contains initialization and setup information for the slaves on a fieldbus when
the C4G is a master.
The following table shows the meaning of each element:
[1]: configuration flags
– Bit 1..3: reserved
– Bit 4: if 0 there is the digital copy in the $DIN, $DOUT. If 1 the copy is on $WORD.
– Bit 5: if 0 the node is active as default; if 1 the node is active
– Bit 6: for Profibus only. If 0 the node inputs and outputs are handled as single bytes; if
1 they are treated as words (2 bytes)
– Bit 7: for Profibus only. If 0 the word consistency is disabled; if 1 it is enabled
– Bit 8: for profibus only. If 0 the blocks consistency is disabled if 1 it is enabled
– Bit 9..32: reserved
[2]: number of input bytes
[3]: Network address
[4]: node identifier for Profibus and Interbus; Vendor ID for DeviceNet
[5]: product code for DeviceNet only
[6..7]: reserved
[8]: start index of user $WORDs
[9]: number of output bytes
[10]: for Profibus only. First set of configuration parameters. The least significant byte
indicates the number of parameters (possible value from 0 to 7). The remaining bytes hold
the parameters
[11]: for Profibus only. Second set of configuration parameters
[12]: for Profibus only. First set of user parameters The least significant byte indicates the
number of parameters (possible value from 0 to 7). The remaining bytes hold the
parameters
[13]: for Profibus only. Second set of user parameters
[14..16]: reserved
pr-0-0-pdl_12.fm
00/0607 12-81
Predefined Variables List
pr-0-0-pdl_12.fm
12-82 00/0607
Predefined Variables List
For DeviceNet:
[1]: this is a bit mask where :
– Bit 1: if set to 1, it indicates that the protocol is enabled. Otherwise the Controller
assumes that the board is not present. For making operative the changes on this bit,
it is needed to restart the Controller.
– Bit 2: if set to 1, it allows to logically unlink the remote PLC from the Controller,
although the communication is still active. System outputs only are updated, no
updating on inputs. This bit is dinamically active.
– Bit 3: reserved
– Bit 4: if 0 the copy is done on $DIN and $DOUT; if 1 the copy is done on $WORDs.
– Bit 5..9: reserved
– Bit 10: if set to 1, the Controller sends the input and output data to the remote PLC
without swapping the bytes. If set to 0, the swap operation is done.
– Bit 11..32: reserved
[2]: baud rate. 1: 125 Kbit, 2: 250 Kbit; 3: 500 Kbit
[3]: net address (MAC ID)
[4]: vendor ID
[5]: Product Code
[6]: number of input and output bytes exchanged
[7]: reserved
[8]: $WORD start index (if used)
[9]: Serial Number
[10]:reserved
For INTERBUS:
[1]: this is a bit mask where :
– Bit 1: if set to 1, it indicates that the protocol is enabled. Otherwise the Controller
assumes that the board is not present. For making operative the changes on this bit,
it is needed to restart the Controller.
– Bit 2: if set to 1, it allows to logically unlink the remote PLC from the Controller,
although the communication is still active. System outputs only are updated, no
updating on inputs. This bit is dinamically active.
– Bit 3: reserved
– Bit 4: if 0 the copy is done on $DIN and $DOUT; if 1 the copy is done of $WORDs.
– Bit 5..9: reserved
– Bit 10: if set to 1, the Controller sends the input and output data to the remote PLC
without swapping the bytes. If set to 0, the swap operation is done.
– Bit 11..32: reserved
[2]: reserved
[3]: net position
[4]: device code
[5]: reserved
[6]: number of input and output bytes exchanged
[7]: reserved
[8]: $WORD start index (if used)
[9..10]:reserved
pr-0-0-pdl_12.fm
00/0607 12-83
Predefined Variables List
pr-0-0-pdl_12.fm
12-84 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-85
Predefined Variables List
Limits none
S/W Version: 1.00
Description: It represents the compensation file name used by the compensation algorithm. There is
one of this variable for each arm. The user can assign to this variable the name of the
compensation file to be used for that arm. The name should NOT include the file extension
and the device specification. If this variable is not initialized or is set to the null string (''),
the algorithm looks in UD: for a file with extension .ROB and with the arm number as last
character of the file name. Note that, if more than one file are present in UD: with this
characteristic, the first one (non necessarily in alphabetical order) is taken. For disabling
the algorithm, it is needed to set this variable to the null string and to remove the .ROB file
from the UD:. The system returns an error only in case $FL_COMP is set to a certain value
(different from NULL string) and the corresponding file is not present in UD:
pr-0-0-pdl_12.fm
12-86 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-87
Predefined Variables List
Limits none
S/W Version: 1.00
Description: It represents whether the input buffer is flushed before a READ is issued. This can be
changed by setting this variable in the WITH clause of the OPEN FILE Statement. This is
useful when reading from a serial device or from a window when there is to be no
type-ahead.
pr-0-0-pdl_12.fm
12-88 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-89
Predefined Variables List
pr-0-0-pdl_12.fm
12-90 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-91
Predefined Variables List
pr-0-0-pdl_12.fm
12-92 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-93
Predefined Variables List
pr-0-0-pdl_12.fm
12-94 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-95
Predefined Variables List
pr-0-0-pdl_12.fm
12-96 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-97
Predefined Variables List
pr-0-0-pdl_12.fm
12-98 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-99
Predefined Variables List
pr-0-0-pdl_12.fm
12-100 00/0607
Predefined Variables List
Limits none
S/W Version: 1.0
Description: When the value is TRUE, the jog motion starts to be executed in an incremental way. This
means that, upon each pressure of one of the jog keys, a motion similar to what specified
in $JOG_INCR_ROT (in case of rotational movements) and $JOG_INCR_DIST (in case of
translational movements) is executed.
pr-0-0-pdl_12.fm
00/0607 12-101
Predefined Variables List
pr-0-0-pdl_12.fm
12-102 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-103
Predefined Variables List
pr-0-0-pdl_12.fm
12-104 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-105
Predefined Variables List
pr-0-0-pdl_12.fm
12-106 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-107
Predefined Variables List
pr-0-0-pdl_12.fm
12-108 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-109
Predefined Variables List
pr-0-0-pdl_12.fm
12-110 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-111
Predefined Variables List
Description: It is an array of two elements: the first one is mapped on NET1:, the second one on NET2:
. The bits of each element assume the following meaning:
– Bit 1: if set, the transfer is done in Binary mode otherwise in ASCII mode
– Bit 2: if set, some additional information are sent to the user (Verbose)
– Bit 3: if set, the overwrite modality is activated
– Bit 4-8: reserved
pr-0-0-pdl_12.fm
12-112 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-113
Predefined Variables List
pr-0-0-pdl_12.fm
12-114 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-115
Predefined Variables List
pr-0-0-pdl_12.fm
12-116 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-117
Predefined Variables List
pr-0-0-pdl_12.fm
12-118 00/0607
Predefined Variables List
Attributes: none
Limits 4..30
S/W Version: 1.00
Description: It represents the number of devices which can be defined at any one time. The default
value is 20
pr-0-0-pdl_12.fm
00/0607 12-119
Predefined Variables List
pr-0-0-pdl_12.fm
12-120 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-121
Predefined Variables List
pr-0-0-pdl_12.fm
12-122 00/0607
Predefined Variables List
Description: it represents the total arm space. It is only in used in cartesian motions for indicating the
average TCP space expressed in millimeters.
This variable is updated every tick (default 2 milliseconds) in case of linear or circular
motions and every 5 ticks in case of joint movements.
It is zeroed in the following situations: restart, reset from pdl2 , when the variable
overflows its numerical value
pr-0-0-pdl_12.fm
00/0607 12-123
Predefined Variables List
Description: This is the mask of joints that are checked when the On Pos feature uses the
$ON_POS_TBL[on_pos_idx].OP_JNT variable. If this mask is 0,
$ON_POS_TBL[on_pos_idx].OP_POS will be used. This mask assumes the value that is
passed as parameter to the ON_JNT_SET built-in routine
pr-0-0-pdl_12.fm
12-124 00/0607
Predefined Variables List
Description: This variable contains a tolerance in millimeters. The value is related to: X,Y,Z coordinates
of the actual Cartesian robot POSITION in respect with the
$ON_POS_TBL[on_pos_idx].OP_POS; linear joints of the actual JOINTPOS in respect
with the $ON_POS_TBL[on_pos_idx].OP_JNT. The ON POS feature must be enabled
(ON_POS(ON,..)) after having been defined on the position (ON_POS_SET) or on the
jointpos (ON_JNT_SET)
pr-0-0-pdl_12.fm
00/0607 12-125
Predefined Variables List
Attributes: none
Limits none
S/W Version: 1.00
Description: If this variable is TRUE, the tool is not considered for validating the reaching of the
$ON_POS_TBL[on_pos_idx].OP_POS position
pr-0-0-pdl_12.fm
12-126 00/0607
Predefined Variables List
Description: It represents the type of evolution to be used for motion orientation. Valid values are
represented by the predefined constants EUL_WORLD (3 angle), RS_WORLD (2 angle
relative to world), RS_TRAJ (2 angle relative to trajectory) and WRIST_JNT (wrist). The
default value is RS_WORLD
pr-0-0-pdl_12.fm
00/0607 12-127
Predefined Variables List
pr-0-0-pdl_12.fm
12-128 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-129
Predefined Variables List
Note that in this section (“$PAR: Nodal motion variable”) , any occurrence of the
word ‘nodal’ always refers to the MOVE WITH $PAR nodal approach.
pr-0-0-pdl_12.fm
12-130 00/0607
Predefined Variables List
With the $PAR it is suggested not to use the following names as they are reserved
for a specific application: tf, rtf, v, vl, zone, gp, mp, ap, orn.
The function WITHed with the $PAR (function func in the above example) should
always return zero.
If the $PAR is adopted for the MOVE Statements, it is a good rule of programming
to use it in each move. A mixed way of programming (nodal and modal) is not
recommended.
If the MOVE Statement includes multiple WITH clauses (not recommended way of
programming), the WITH $PAR should be the first one, otherwise the other WITH
clauses would have no effect.
The MOVE Statement should always have the trajectory specified (LINEAR, JOINT,
CIRCULAR)
pr-0-0-pdl_12.fm
00/0607 12-131
Predefined Variables List
pr-0-0-pdl_12.fm
12-132 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-133
Predefined Variables List
pr-0-0-pdl_12.fm
12-134 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-135
Predefined Variables List
pr-0-0-pdl_12.fm
12-136 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-137
Predefined Variables List
pr-0-0-pdl_12.fm
12-138 00/0607
Predefined Variables List
Description: This variable has the same meaning as $USER_LONG and is used for accessing one long
word (4 bytes) of a memory location. The difference between $USER_LONG and
$PROG_ULONG is the fact that there is one $PROG_ULONG per-program while there is
only one $USER_LONG in the whole system
pr-0-0-pdl_12.fm
00/0607 12-139
Predefined Variables List
Description: It represents the ideal position in radians or millimeters. It does not take into consideration
the coupling effect between axes
pr-0-0-pdl_12.fm
12-140 00/0607
Predefined Variables List
Description: It represents the different robot configuration and options present in the system:
– Bit 1..8: reserved
– Bit 9..12: Loaded language:
• 0: English
• 1: Italian
• 2: French
• 3: German
• 4: Spanish
• 5: Portoguese
• 6: Turkish
• 7: Chinese
– Bit 13..16: reserved
– Bit 17: System variables initialized
– Bit 18: XD: device connected
– Bit 19: TX: device connected
– Bit 20..21: reserved
– Bit 22: PROFIBUS DP Slave interface present
– Bit 23: InterBus-s Slave interface present
– Bit 24: InterBus-S Master interface present
– Bit 25..26: reserved
– Bit 27: Device Net Slave board present
– Bit 28..30: reserved
– Bit 31: system in minimal configuration
– Bit 32: reserved
pr-0-0-pdl_12.fm
00/0607 12-141
Predefined Variables List
pr-0-0-pdl_12.fm
12-142 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-143
Predefined Variables List
Limits 0..10
S/W Version: 1.00
Description: It represents the type of motion recovery after a motion has been interrupted. The
possible values and their recovery types actions are listed below.
– 0: Recovery to the interrupted trajectory with a joint interpolation.
– 1: Recovery to the initial position of the interrupted move with a joint interpolation.
– 2: Recovery to the final position of the interrupted move with a joint interpolation.
– 3: Do not recover; an error message is returned to the user.
– 4: Recovery on the interrupted trajectory, with the same move type of the interrupted
trajectory. The orientation type is WRIST_JNT if implemented, else RS_WORLD.
– 5: Recovery on the initial position of the interrupted trajectory, with the same move
type of the interrupted trajectory. The orientation type is WRIST_JNT if implemented,
else RS_WORLD.
– 6: Recovery on the final position of the interrupted trajectory, with the same move type
of the interrupted trajectory. The orientation type is WRIST_JNT if implemented, else
RS_WORLD.
– 7: Reserved.
– 8: Reserved.
– 9: automatic recovery of the process. The functionality is the same as modality 4 but
the distance undertaken in the movement of return is the result of the sum of
$RCVR_DIST value and the covered distance in manual motion after the robot
stopping on the planned movement
pr-0-0-pdl_12.fm
12-144 00/0607
Predefined Variables List
Description: It contains information on the current setup of the REC key. This information can only be
changed via the IDE Page, Select (F4) menu, REC setup function. For forther information
see Control Unit Use manual - IDE Page paragraph
pr-0-0-pdl_12.fm
00/0607 12-145
Predefined Variables List
Description: It is a 2 dimensional array with each element containing the information of who is
connected to the controller. The first dimension can assume: value 1 for the host, value 2
for the user. The second dimension identifies the program used for connecting to the
controller: value 1 is for WinC4G, value 3 is for TP4i/WiTP and other values are used for
external connections. Example: $REM_I_STR[1,1] shows the computer that is connected
via WINC4G to the controller. $REM_I_STR[2,1] shows the user that is connected via
WinC4G to the controller
pr-0-0-pdl_12.fm
12-146 00/0607
Predefined Variables List
Description: during the Restart operation (cold, reload or shutdown) this value is set to the type of
restart. A program can abort the restart by setting the flag to -1.
pr-0-0-pdl_12.fm
00/0607 12-147
Predefined Variables List
pr-0-0-pdl_12.fm
12-148 00/0607
Predefined Variables List
Description: This array contains data related to the PLC resource environment.
The first array dimension identifies the resource; the index associated to a resource can
either be viewed by the proper View command under the Resplc menu or can be read via
PDL2 by means of the RPLC_GET_IDX Built-In Procedure.
The second array dimension identifies the information of the selected resource:
[1]: cycle time in kernel real-time modality (default 300 microseconds)
[2]: cycle time in kernel cycle-to-cycle modality (default 100 microseconds)
[3]: cycle time in resource stopped modality (default 300 microseconds)
[4]: percentage of cycle time for activating external communications (default 70%)
[5..16]: reserved
At the moment, only the elements related to the first resource are used
pr-0-0-pdl_12.fm
00/0607 12-149
Predefined Variables List
Description: Real registers are "" variables that can be used by users instead of having to define
variables. For the different datatypes of Integer, Real, String, Boolean, Jointpos, Position &
Xtndpos there are saved and non-saved registers
pr-0-0-pdl_12.fm
12-150 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-151
Predefined Variables List
pr-0-0-pdl_12.fm
12-152 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-153
Predefined Variables List
Description: Each PATH contains a frame table (FRM_TBL) of 7 positional elements that can be used
either as a tool or a reference frame in a node which contains the MAIN_POS standard
field. $SEG_REF_IDX represents the FRM_TBL index of the reference frame to be used
by a particular node; if $SEG_REF_IDX is not included in the node definition or has value
of zero (default value), no reference frame is applied to the path segment. As there is just
one FRM_TBL in each path, it is suggested to use elements 1 to 3 inclusive for reference
frames and elements 4 to 7 for tools.
TYPE frm = NODEDEF
$MOVE_TYPE
$MAIN_POS
$SEG_REF_IDX
$SEG_TOOL_IDX
ENDNODEDEF
-- The nodes of this path should either be taught or NODE_APPended
VAR frmpth: PATH OF frm
.....
BEGIN
frmpth.FRM_TBL[1] := POS(1000, 200, 1000, 0, 180, 0, '')
frmpth.FRM_TBL[4] := POS(100, -200, 0, 0, -90, 0, '')
frmpth.NODE[5].$MOVE_TYPE := LINEAR
frmpth.NODE[5].$MAIN_POS := POS(100, -200, 300, 0, 180, 0, '')
frmpth.NODE[5].$SEG_REF_IDX := 1
frmpth.NODE[6].$MOVE_TYPE := LINEAR
frmpth.NODE[6].$MAIN_POS := POS(-1000, -1000, 1000, 0, 180, 0, '')
frmpth.NODE[6].$SEG_TOOL_IDX := 4
pr-0-0-pdl_12.fm
12-154 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-155
Predefined Variables List
pr-0-0-pdl_12.fm
12-156 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-157
Predefined Variables List
pr-0-0-pdl_12.fm
12-158 00/0607
Predefined Variables List
Description: It is a coded value used for configuring Sensor Tracking. It defines three characteristics:
where the information of the sensor can be read and what is the format of the data; in what
frame of reference the corrections must be applied; if the corrections must be applied in a
relative or absolute way.
A list of valid values follows:
– 0: Sensor suspended;
– 1..4: Reserved
– 5: External sensor in TOOL frame, relative mode;
– 6: External sensor in UFRAME frame, relative mode;
– 7: External sensor in WORLD frame, relative mode;
– 8: External sensor in WEAVE frame, relative mode;
– 9: External sensor in TOOL frame, absolute mode;
– 10: External sensor in UFRAME frame, absolute mode;
– 11: External sensor in WORLD frame, absolute mode;
– 12: External sensor in WEAVE frame, absolute mode;
– 13..30: Reserved.
External sensors are not integrated in the controller and can be managed by a PDL2 user
program
pr-0-0-pdl_12.fm
00/0607 12-159
Predefined Variables List
pr-0-0-pdl_12.fm
12-160 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-161
Predefined Variables List
pr-0-0-pdl_12.fm
12-162 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-163
Predefined Variables List
pr-0-0-pdl_12.fm
12-164 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-165
Predefined Variables List
Description: It represents the LUN (logical unit number) where the output of a SYS_CALL request is
directed. This variable assumes by default the current value of $DFT_LUN
pr-0-0-pdl_12.fm
12-166 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-167
Predefined Variables List
pr-0-0-pdl_12.fm
12-168 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-169
Predefined Variables List
pr-0-0-pdl_12.fm
12-170 00/0607
Predefined Variables List
Description: It represents the number of the last error in this thread of execution. There is a
$THRD_ERROR for every thread of execution. A new thread is started when an Interrupt
Service Routine (routine that is an action of a condition) is activated. If the Interrupt
Service Routine is an action of an error event condition, this variable is initialized to the
error number causing the condition to trigger. Otherwise, it is initialized to zero
pr-0-0-pdl_12.fm
00/0607 12-171
Predefined Variables List
Attributes: none
Limits 0..2000
S/W Version: 1.00
Description: It represents the time, in milliseconds, in which the motion is defined to be completed after
the tool center point (TCP) has first entered the tolerance sphere. Due to the effects of
inertia, the TCP may enter the sphere of tolerance and immediately leave the sphere. The
time is measured from the first time the tolerance sphere is entered. The default value is 0
milliseconds
pr-0-0-pdl_12.fm
12-172 00/0607
Predefined Variables List
Description: It represents the tolerance in degrees for each rotating joint and in millimeters for each
traslating joint. This parameter is used when $TERM_TYPE is JNT_COARSE. There are
no limit checks performed on these values. Any change to the value of this variable
immediately takes effect on the next movement.
pr-0-0-pdl_12.fm
00/0607 12-173
Predefined Variables List
pr-0-0-pdl_12.fm
12-174 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-175
Predefined Variables List
pr-0-0-pdl_12.fm
12-176 00/0607
Predefined Variables List
Limits WRIST_JNT..RPY_WORLD
S/W Version: 1.00
Description: It represents the type of orientation used when jog keys 4, 5, and 6 are pressed and the
type of motion selected on the teach pendant is not JOINT. If $TP_ORNT is set to
RPY_WORLD, these keys determine the rotation along axes X, Y, Z respectively in the
selected frame of reference (BAS, TOL or USR). If $TP_ORNT is set to WRIST_JNT,
these keys determine the movement of axes 4, 5 and 6 in joint mode, regardless of the
active frame of reference. Note that $TP_ORNT can be changed either from PDL2 or from
the teach pendant
For further information about how to select an Arm, see Control Unit Use Manual,
par. 6.5.1.4 Right Menu.
pr-0-0-pdl_12.fm
00/0607 12-177
Predefined Variables List
[8]: reserved
[9]: Drives enable delay in msecs. The default value is 400
[10]: Slow speed, brake, DSA on/off delay in msecs. The default value is 2000 (2 seconds)
[11]: teach pendant connection delay in msecs. The default value is 3000 (3 seconds)
[12]: reserved
[13]: Alarm exclusion delay in msecs. The default value is 60000 (60 seconds)
[14]: Startup delay time for REMOTE command in msecs. The default value is 5000 (5
seconds)
[15]: DISPLAY command refresh time in msecs. The default value is 1000 (1 second)
[16]: Maximum number of lines available to the DISPLAY group of commands when
issued on the Terminal window of WinC4G program that runs on the PC. The default value
is 16 lines
[17]: Maximum number of lines available to the DISPLAY group of commands when
issued on the programming terminal. The default value is 10 lines
[18]: reserved
[19]: Timeout for TP4i/WiTP backlight. The default value is 180 seconds (3 minutes).
Allowed values:
-1 - the TP4i/WiTP will never switch;
0 - it is automatically set by the system to 180.
[20]: Refresh time, in msecs, for the FOLLOW command of the PROGRAM EDIT and
MEMORY DEBUG environments. The default value is every half second
[21]: Status line refresh time in msecs. The default value is 500
[22..23]: reserved
[24]: During PowerFailureRecovery, this is the lag in some error logging. The default is
800 msecs.
[25]: reserved
[26]: Software timer that activates the motors brake when time expires after the controlled
emergency. The default value is 1400 msecs
[27]: Energy saving timeout expressed in seconds. The default is 120
[28]: reserved
[29]: size, in bytes, of the stack to be allocated for PDL2 programs. The default is 1000
[30]: Maximum size, in bytes, for read-ahead buffer. The default is 4096
[31]: Maximum execution time, in msecs, for the calibration program. The default is 10000
[32..41]: reserved
[42]: Default stack size, in bytes, for EXECUTE command. The default is 300
[43..50]: reserved
[54]: Number of default characters read. Default 256
pr-0-0-pdl_12.fm
12-178 00/0607
Predefined Variables List
Limits none
S/W Version: 1.00
Description: The Cartesian trajectory usually follows the shortest path for the joints, so the
configuration string of the final position reached can be different from the one present in
the move statement. $TURN_CARE represents a flag to determine whether the system
must check the configuration turn numbers. If the flag is FALSE no check is done. If the
flag is TRUE the system sends an error message if the Cartesian trajectory tries to move
the robot to a final position having a configuration number of turns different from the
number of turns present in the move statement
pr-0-0-pdl_12.fm
00/0607 12-179
Predefined Variables List
pr-0-0-pdl_12.fm
12-180 00/0607
Predefined Variables List
Description: It represents the length of the memory which can be accessed using $USER_BIT,
$USER_BYTE, $USER_WORD, $USER_LONG starting from the address contained in
$USER_ADDR
pr-0-0-pdl_12.fm
00/0607 12-181
Predefined Variables List
pr-0-0-pdl_12.fm
12-182 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-183
Predefined Variables List
pr-0-0-pdl_12.fm
12-184 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-185
Predefined Variables List
pr-0-0-pdl_12.fm
12-186 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-187
Predefined Variables List
pr-0-0-pdl_12.fm
12-188 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-189
Predefined Variables List
pr-0-0-pdl_12.fm
12-190 00/0607
Predefined Variables List
pr-0-0-pdl_12.fm
00/0607 12-191
Predefined Variables List
pr-0-0-pdl_12.fm
12-192 00/0607
Power Failure Recovery
This appendix describes the features available in the PDL2 programming language to
detect and recover from a power failure. These features should allow an application
program to gracefully recover from a power failure and continue exactly where the power
failure occurred.
The following list describes the behavior of the system during a power failure and the
PDL2 language components that can be used to detect and recover from the failure.
– the power failure recovery performance is enabled by default. To disable it,
$PWR_RCVR system variable is to be set to FALSE:
$PWR_RCVR := FALSE
– while power failure recovery is enabled, the startup program will not be executed
every time the power switch is turned on. The name of the startup program is
stored in the $STARTUP predefined variable;
– a PDL2 program can detect the power failure recover event by using the WHEN
POWERUP DO event in a condition handler. This event is triggered only when the
system restarts in power failure recovery mode. It will not be triggered when the
system restarts due to a CONFIGURE CNTRLER RESTART COLD command.
Refer to the Chap.8. - Condition Handlers for more information on the POWERUP
event and the use of condition handlers;
– when a power failure occurs, the HOLD system event and the DRIVEs turned OFF
events are triggered. A PDL2 program can use these events to perform the same
actions that are normally performed during a HOLD and DRIVEs turned OFF
events;
– when the DRIVEs are turned ON, it is possible that the system will log some errors
from the RSM board. These errors are caused by the 24 volt supply disappears
before the SMP board power supply, which causes the alarm to be read. The
system can only recover from this condition after it is restarted. The system can not
delete the alarm logged in the ERROR.LOG file and displayed on the screen;
– a READ statement will return an error if it is pending on the TP or a serial
communications line;
– a WRITE statement to a serial communications line will return an error. A WRITE
statement to the TP will not return an error and the window will contain the correct
display data after the system is restarted;
– some of the devices in the system require several seconds to perform their
diagnostic and startup procedures. While these operations are being performed,
the PDL2 program will begin to execute. Some of the PDL2 language statements
and built-in routines will fail if they are executed before these devices have
completed their startup procedures. Built-in routines, like the ARM_POS built-in, or
pressing the DRIVE ON or START button will fail if the startup procedures have not
been completed. A PDL2 program should wait until the power failure recovery has
completed before continuing execution. To cause a PDL2 program to wait until the
power failure recover has completed, create a condition handler that triggers on the
POWERUP event and then waits until bit number 9 of the $SYS_STATE
predefined variable is cleared. This procedure is shown in an example program at
the end of this appendix;
pr-0-0-pdl_16.fm
00/0607 13-1
Power Failure Recovery
– removing boards from the rack when the Controller is switched off can cause
problems during recovery from power failure at the system restart. The system
cannot support all deriving problems;
– if a certain board must be extracted from the rack for changing the system
configuration, it is recommended to issue a CONFIGURE CONTROLLER
RESTART COLD command and then, without waiting the restart of the controller,
the power should be switched off using the electronics power switch on the
Operator Panel. At this point the specific board can be removed and the system
can be restarted using the electronic switch;
– in this way, the power failure recovery is not performed by the controller that
accepts the new configuration, eventually signalling the absence of the previously
configured board(s);
It is also suggested to check that the TP4i/WiTP Teach Pendant is connected after
the power failure recovery.
Please use the proper event (EVENT 116) inside a CONDITION or a WAIT FOR
statement.
The following PDL2 program demonstrate how to recover from a power failure during a
READ or WRITE statement.
Waiting until the power failure recovery is complete is shown in the next example
program.
pr-0-0-pdl_16.fm
13-2 00/0607
Power Failure Recovery
pr-0-0-pdl_16.fm
00/0607 13-3
Power Failure Recovery
pr-0-0-pdl_16.fm
13-4 00/0607
Transition from C3G to C4G Controller
14.1 Introduction
This chapter reports a list of the main differences in PDL2 language (and not only in the
language) that should be considered before running on C4G Control Unit a PDL2
program written in the past for C3G Control Unit.
Detailed information is supplied about the following topics:
– System parameters values
– Terminology
– Old programs compatibility with the new Controller Unit
– Devices and Directories
– System Variables
– Predefined constants
– Built-in routines and functions
– Open File Statement
– Conditions
– Swapping to a foreign language
– System menu Commands
– Compressed files
– Error and action Logging
– PC interface
– Fieldbuses configuration
– MMUX (motor multiplexer)
pr-0-0-pdl_17.fm
00/0607 14-1
Transition from C3G to C4G Controller
14.3 Terminology
SCC board is now identified by the Motion Control Process.
RBC board is now identified with SMP board.
The main storage device is now UD: it corresponds to RD: of C3G Controller.
FD: is no more handled. If using the disk on key, it should be changed with XD:
pr-0-0-pdl_17.fm
14-2 00/0607
Transition from C3G to C4G Controller
pr-0-0-pdl_17.fm
00/0607 14-3
Transition from C3G to C4G Controller
– $MASTER_INIT
– $MTR_RES
– $NET_S_STR
– $NIO_INIT,
– $OFF_AREA
– $OFF_LIM_MAX
– $OFF_LIM_MIN
$RIO_INIT
– $PROFDP_INIT
– $NUM_ELOG
– $NUM_MB( see $NUM_DSAS)
– $PIO_ GINTBL, $PIO_GOUTTBL, $PIO_LOGTBL, $PLCSTW
– $PWR_ADDR
– $RPT_ADDR
– $RESOLVER
– $RB_MARK
– $S_ALONG1
– $SYS_PROT
– $SYS_PROT_STATE
– $SWIM_INIT
– $WORK_AREA
pr-0-0-pdl_17.fm
14-4 00/0607
Transition from C3G to C4G Controller
14.6.7 Miscellaneous
– $RB_FAMILY Only the robots supported by C4G Controller are handled. Please
refer to Chap. Predefined Variables List for further details.
pr-0-0-pdl_17.fm
00/0607 14-5
Transition from C3G to C4G Controller
14.8.2 SYS_CALL
The syntax of such a built-in procedure is still the same of C3G Controller. However,
passing on C4G Controller, some commands have been removed, some other have
been added and some more have been moved from a command branch to another.
It is recommended to check all sys_calls that are written in the programs in oder to
determine:
– if the command sigla is still supported;
– if it has the same meaning.
Also a check on parameters and options is recommended.
Please refer to the Use of C4G Control Unit Manual, System Commands section, and
to SYS_CALL Built-In Procedure description.
pr-0-0-pdl_17.fm
14-6 00/0607
Transition from C3G to C4G Controller
For file related commands, the directory specification and setting of the default directory
should be considered.
14.8.3 WIN_LOAD
Binary files containing windows previously created on C3G Controller by means of
WIN_CREATE and WIN_SAVE procedures, cannot be directly loaded on C4G
Controller. It is needed to re-create the windows on C4G Controller and issue
WIN_SAVE built-in procedure directly on C4G Controller.
14.10 Conditions
Handling of conditions is the same as for C3G Controller. Some events have been
added in the list of system events.
As far as concerns the class of user error events, the predefined constant EC_USER
has been replaces by EC_USR1 and EC_USR2. They identify the range of errors from
43008 to 43519 (EC_USR1) and from 43520 to 44031 (EC_USR2).
Please refer to ERROR Events section for further details.
Due to the fact that the value of some predefined constants changed, it is strongly
recommended never to use the predefined value, but the identifier. For example , do not
write WHEN ERROR CLASS 78, but WHEN ERROR CLASS EC_TRAP.
pr-0-0-pdl_17.fm
00/0607 14-7
Transition from C3G to C4G Controller
Page of TP4i/WiTP Teach Pendant, and choosing the required language. It is not
needed to restart the system. The effect is immediate. At the PDL2 level, changing of a
language is detected by the system event WHEN EVENT 154.
pr-0-0-pdl_17.fm
14-8 00/0607
Transition from C3G to C4G Controller
pr-0-0-pdl_17.fm
00/0607 14-9
Transition from C3G to C4G Controller
14.15 PC interface
The PC interface to the C4G controller is the WINC4G program. It is the correspondent
to the WINPCINT/PCINT of C3G Controller Unit but with much more features. Please
refer to Use of C4G Control Unit Manual, for further details.
pr-0-0-pdl_17.fm
14-10 00/0607
Appendix A - Characters Set
15. APPENDIX A -
CHARACTERS SET
Current chapter lists the ASCII numeric decimal codes and their corresponding
hexadecimal codes, character values, and graphics characters, used by TP4i/WiTP
Teach Pendant.
Character values enclosed in parentheses ( ) are ASCII control characters, which are
displayed as graphics characters when printed to the screen of TP4i/WiTP Teach
Pendant.
In the next section (called Characters Table) a list of all characters, together with the
corresponding numeric value in both decimal and hexadecimal representation, follows.
The decimal or hexadecimal numeric value for a character can be used in a STRING
value to indicate the corresponding character (for example, ‘\003 is a graphic
character’).
pr-0-0-pdl_13.fm
00/0607 15-1
Appendix A - Characters Set
pr-0-0-pdl_13.fm
15-2 00/0607
Appendix A - Characters Set
pr-0-0-pdl_13.fm
00/0607 15-3
Appendix A - Characters Set
pr-0-0-pdl_13.fm
15-4 00/0607
Appendix A - Characters Set
pr-0-0-pdl_13.fm
00/0607 15-5
Appendix A - Characters Set
pr-0-0-pdl_13.fm
15-6 00/0607
Appendix B - Customizations on the TP
16. APPENDIX B -
CUSTOMIZATIONS ON THE TP
16.1 Introduction
Current chapter contains information about the following topics:
– User table creation from DATA environment
– Handling TP4i/WiTP right menu
– Customizing the PDL2 Statements insertion, in IDE environment.
Please, refer to Use of C4G manual in DATA Page section, for further information.
The PDL2 language allows the user to create a table and add it to the TP4i/WiTP
interface in the DATA page.
The operation to be done are as follows:
a. Table type definition: a RECORD must be defined which fields are the columns of
the table.
b. Table elements definition: the rows of the table are variables declared of the above
type.
pr-0-0-pdl_14.fm
00/0208 16-1
Appendix B - Customizations on the TP
END exampletable
– The table contents are stored in a .VAR file specified in the TABLE_ADD Built-In
Procedure.
– The table is removed from the DATA Page issuing the TABLE_DEL Built-In
Procedure.
In the following paragraphs detailed information is given about:
– Properties
– Variable <type>_signal
– Example program for a table creation.
16.2.1 Properties
It is possible to associate some properties to the whole table or to fields of it. Detailed
information is provided in the following paragraphs.
For doing it, some variables have to be defined in the program header, according to the
following syntax:
<type_name>_<operation> : when the operation is applied to the table.
<type_name>_<field_name>_<operation> : when the operation is applied to a field of
the table.
<type_name>_<field_name>_<field_of_a_position>_<operation> : when the
operation is applied to a field of a positional variable belonging to the table.
<type_name> is the table;
<field_name> is the field of the table;
<field_of_a_position> is a field of a positional variable belonging to the table;
<operation> is one of the predefined functions listed here below.
They are grouped as follows:
– Table (global) Properties
– Field Properties
– Field of a POSITION Properties.
NOTE that the Table Property Name must always be preceeded by <type_name>
(i.e. the table name).
Example:
if the table name is “table”, the “_get_title” property must be written as
table_get_title
– _get_active_element
– _get_auto_editable
pr-0-0-pdl_14.fm
16-2 00/0208
Appendix B - Customizations on the TP
– _get_can_auto_apply
– _get_max_entries
– _get_msg_on_save
– _get_title
– _get_var_path
– _integer_get_max
– _integer_get_min
– _integer_get_step
– _real_get_max
– _real_get_min
– _real_get_step.
16.2.1.1.1 _get_active_element
Name _get_active_element
Description Get the active element in the table
Data type STRING
Read upon modifying the value of the variable (it is used for monitoring a variable)
Default value none
16.2.1.1.2 _get_auto_editable
Name _get_auto_editable
Description Enabling flag for the table modification when the state of the controller is LOCAL. It is checked
before enabling the modification of a field.
Data type BOOLEAN
Read upon table modification (of a field)
Default value modifying is not enabled in LOCAL state
16.2.1.1.3 _get_can_auto_apply
Name _get_can_auto_apply
Description Enabling flag for the automatic apply function, which consists in the copy of the data viewed, in
the table, directly in variables loaded in execution memory.
Data type BOOLEAN
Read upon table opening
Default value Auto apply is enabled by default
pr-0-0-pdl_14.fm
00/0208 16-3
Appendix B - Customizations on the TP
16.2.1.1.4 _get_max_entries
Name _get_max_entries
Description Maximum number of rows in the table
Data type INTEGER
Read upon adding a new row to the table
Default value none
16.2.1.1.5 _get_msg_on_save
Name _get_msg_on_save
Description Generation of a message upon the event of table saving
Data type STRING
Read upon table saving
Default value none
16.2.1.1.6 _get_title
Name _get_title
Description Table name
Data type STRING
Read upon table opening
Default value table name
16.2.1.1.7 _get_var_path
Name _get_var_path
Description Path (directory and file name) in which saving the .VAR file containing the table data.
The ‘\’ character used in the directory path specification must be replaced by ‘\\'
Data type STRING
Read upon table saving
Default value the same path used upon table load
16.2.1.1.8 _integer_get_max
Name _integer_get_max
Description Maximum value for INTEGER fields
Data type INTEGER
Read upon table opening
pr-0-0-pdl_14.fm
16-4 00/0208
Appendix B - Customizations on the TP
16.2.1.1.9 _integer_get_min
Name _integer_get_min
Description Minimum value for INTEGER fields
Data type INTEGER
Read upon table opening
Default value none
16.2.1.1.10 _integer_get_step
Name _integer_get_step
Description Incremental and decremental step for INTEGER fields
Data type INTEGER
Read upon table opening
Default value 1
16.2.1.1.11 _real_get_max
Name _real_get_max
Description Maximum value for REAL fields
Data type REAL
Read upon table opening
Default value none
16.2.1.1.12 _real_get_min
Name _real_get_min
Description Minimum value for REAL fields
Data type REAL
Read upon table opening
Default value none
16.2.1.1.13 _real_get_step
Name _real_get_step
Description Incremental and decremental step for REAL fields
pr-0-0-pdl_14.fm
00/0208 16-5
Appendix B - Customizations on the TP
NOTE that the Field Property Name must always be preceeded by both
<type_name> and <field_name> (i.e. the table name and name of the field which
it applies to), separated by the ‘_’ character.
Example:
if the table name is “table”, and the field name is “curr”, the “_get_title” field
property must be written as
table_curr_get_title
– _get_editable
– _get_item_list
– _get_item_values
– _get_max
– _get_min
– _get_msg_on_change
– _get_step
– _get_tip
– _get_title
– _get_visible.
16.2.1.2.1 _get_editable
Name _get_editable
Description Read-only flag for the field
Data type BOOLEAN
Read upon enabling the field modification
Default value FALSE, which means that the field is enabled to the modification
16.2.1.2.2 _get_item_list
Name _get_item_list
Description List of possibile items associated to a field of the table
Data type ARRAY OF STRING
Read upon table opening
Default value none
pr-0-0-pdl_14.fm
16-6 00/0208
Appendix B - Customizations on the TP
16.2.1.2.3 _get_item_values
Name _get_item_values
Description List of values related to each item listed with the _get_item_list property
Data type ARRAY OF INTEGER
Read upon table opening
Default value 0 .. [max_items-1]
16.2.1.2.4 _get_max
Name _get_max
Description Maximum value for the field
Data type INTEGER or REAL
Read upon selecting the field for being modified
Default value maximum limit of the PDL2 data type
16.2.1.2.5 _get_min
Name _get_min
Description Minimum value for the field
Data type INTEGER or REAL
Read upon selecting the field for being modified
Default value minimum limit of the PDL2 data type
16.2.1.2.6 _get_msg_on_change
Name _get_msg_on_change
Description Prompt a message after a field modification
Data type STRING
Read upon Apply command is issued on the field
Default value none
16.2.1.2.7 _get_step
Name _get_step
Description Incremental/decremental step for the field
Data type INTEGER or REAL
Read upon selecting the field for being modified
pr-0-0-pdl_14.fm
00/0208 16-7
Appendix B - Customizations on the TP
16.2.1.2.8 _get_tip
Name _get_tip
Description Help string assignement
Data type STRING
Read upon table opening
Default value no Help string
16.2.1.2.9 _get_title
Name _get_title
Description Field name
Data type STRING
Read upon table opening
Default value field name
16.2.1.2.10 _get_visible
Name _get_visible
Description Flag for enabling the viewing of a field of the table
Data type BOOLEAN
Read upon table opening
Default value TRUE, which means that the field is always viewed
NOTE that the Positional Fields Property Name must always be preceeded by
<type_name>, <field_name> and <field_of_a_position> (i.e. the table name, the
name of the field and the name of the positional field, which it applies to),
separated by the ‘_’ character.
Example:
if the table name is “table”, the field name is “pos1” and the field of the position
is “x”, the “_get_max” field property must be written as
table_pos1_x_get_max
– _get_max
– _get_step
– _get_min.
pr-0-0-pdl_14.fm
16-8 00/0208
Appendix B - Customizations on the TP
16.2.1.3.1 _get_max
Name _get_max
Description Maximum value for a field of a POSITION
Data type INTEGER or REAL
Read upon selecting a field for being modified
Default value max limit of the PDL2 data type
16.2.1.3.2 _get_step
Name _get_step
Description Increment of a POSITION field
Data type INTEGER or REAL
Read upon selecting a field for being modified
Default value 1 for INTEGERs and 0.1 for REALs
16.2.1.3.3 _get_min
Name _get_min
Description Minimum value for a field of a POSITION
Data type INTEGER or REAL
Read upon selecting a field for being modified
Default value minimum limit of the PDL2 data type
It is up to the PDL2 program to reset the variable (to the default value of 0) at the end of
the event service routine, otherwise a further event of the same type could be not
detected (since the value of the variable wouldn’t change!).
If such a variable is not in the table, the user interface doesn’t handle it at all.
pr-0-0-pdl_14.fm
00/0208 16-9
Appendix B - Customizations on the TP
VAR
tab_def_get_title : STRING[13] ('Tabella test ') NOSAVE
tab_def_max_entries : INTEGER (5)
tab_def_get_msg_on_save : STRING[44] ('Messaggio di prova per
salvataggio') NOSAVE
tab_def_curr_get_title : STRING[7] ('Current') NOSAVE
tab_def_curr_get_tip : STRING[13] ('Total current') NOSAVE
tab_def_curr_get_max_value : REAL (3.0)
tab_def_curr_get_min_value : REAL (-3.0)
tab_def_curr1_get_visible : BOOLEAN (FALSE)
tab_def_get_auto_editable : BOOLEAN (FALSE)
tab_def_spd_get_item_list : ARRAY[3] OF STRING[10]
tab_def_mass_get_editable : BOOLEAN (TRUE)
tab_def_mass_get_msg_on_change : STRING[30] ('Messaggio di
modifica di prova') NOSAVE
tab_def_curr_get_editable : BOOLEAN (TRUE)
tab1 : tab_def
tab2 : tab_def
tab3 : tab_def
tab4 : tab_def
tab5 : tab_def
tab6 : tab_def
tab7 : ARRAY[3] OF tab_def
BEGIN
TABLE_ADD('tab_def', $PROG_NAME)
tab_def_spd_get_item_list[1] := 'low'
tab_def_spd_get_item_list[2] := 'medium'
tab_def_spd_get_item_list[3] := 'high'
END test_tab
pr-0-0-pdl_14.fm
16-10 00/0208
Appendix B - Customizations on the TP
Please, refer to Use of C4G manual in Chap.6 - Use of the Teach Pendant, DISPLAY
section, for further information.
There are 6 keys on the TP4i/WiTP that can be programmed by the user basing on the
application to be developed.
Each page of the application could need more than 6 keys; pressing MORE key (on the
right of the right menu) the remaining softkeys of the current page are displayed.
The changing from one page to another is circularly handled via the MORE key and the
swapping occurs when the last softkey of the page has been displayed.
It is possibile to disable a softkey but it is not allowed to disable a page of softkeys.
Each softkey can be in the following status:
– Enabled or disabled.
– The pressure of a disabled softkey does not have any effect. Please note that the
key aspect remains unchanged in respect to when it is enabled: the PDL2 softkey
handler program has to modify the key in terms of color, icon, text so to underline
the disabled key status.
– Pressed or Released
– When the softkey is in the pressed state, the softkey is represented like if it were
embedded.
A configuration file in XML format has to be written containing the definition of the
softkeys; this file must be stored in a predefined location of the file system. Please
contact COMAU at [email protected] for further details. The user should
have the access rights for accessing to the LD: device.
Upon the Controller restart, all the files contained in the above directory are
automatically loaded, in alphabetical order, on the TP4i/WiTP.
Each page corresponds to the definition of a group of softkeys, which can be more than
6. The syntax is as follows:
<?xml version="1.0"?>
<NewMenu>
<group>
<progName>GroupName</progName>
<numItems>Number</numItems>
<arName>Names</arName>
<arIconName>Icons</arIconName>
<arStatus>Colours</arStatus>
<arEnabled>Enabled</arEnabled>
<evPressed>NumberOfEvent</evPressed>
<evLongPressed> NumberOfEvent </evLongPressed>
<evReleased> NumberOfEvent </evReleased>
</group>
</NewMenu>
pr-0-0-pdl_14.fm
00/0208 16-11
Appendix B - Customizations on the TP
The words included between < > should always be present. The words specified in bold
have to be replaced by a true parameter.
Example: 2 XML files are defined. In the first file, one group with 8 softkeys is defined;
in the second one, 2 groups with 3 softkeys each are defined. TP4i/WiTP will create the
following pages:
– One page with the first 6 softkeys of the group of the first file
– One page with the remaining 2 softkeys of the group of the first file
– One page with the 3 softkeys of the first group of the second file
– One page with the 3 softkeys of the second group of the second file.
A detailed description follows about the following topics:
– XML Tag Parameters
– Softkey Pressure and Release events
– Example of XML configuration file
– Example of right menu configuration
pr-0-0-pdl_14.fm
16-12 00/0208
Appendix B - Customizations on the TP
The TP4i/WiTP continuously monitors the content of the array, and if it changes, the
effect on the softkey is immediate.
pr-0-0-pdl_14.fm
00/0208 16-13
Appendix B - Customizations on the TP
<?xml version="1.0"?>
<NewMenu>
<group>
<progName>group1</progName>
<numItems>4</numItems>
<arName>nomi</arName>
<arIconName>icone</arIconName>
<arStatus>colori</arStatus>
<arEnabled>en</arEnabled>
<evPressed>50100</evPressed>
<evLongPressed>50120</evLongPressed>
<evReleased>50130</evReleased>
</group>
<group>
<progName>group2</progName>
<numItems>2</numItems>
<arName>nomi</arName>
<arIconName>icone</arIconName>
<arStatus>colori</arStatus>
<arEnabled>en</arEnabled>
<evPressed>50150</evPressed>
<evLongPressed>50160</evLongPressed>
<evReleased>50170</evReleased>
</group>
</NewMenu>
This example program, assigns a colour to the key which has been pressed and
disables the other softkey.
pr-0-0-pdl_14.fm
16-14 00/0208
Appendix B - Customizations on the TP
CONDITION[1] NODISABLE :
WHEN EVENT 50100 DO -- press. of the 1st softkey of the group
colori[1] := WIN_RED -- make RED the first softkey
en[2] := FALSE -- disable the second softkey
WHEN EVENT 50101 DO -- press. of the 2nd softkey of the group
colori[2] := WIN_GREEN -- make GREEN the first softkey
en[1] := FALSE -- disable the first softkey
ENDCONDITION
ENABLE CONDITION[1]
CYCLE
---
DELAY 1000
---
END group1
<?xml version="1.0"?>
<RightMenu>
<group>
<progName>rightmenu</progName>
<numItems>5</numItems>
<arName>nomi</arName>
<arIconName>icone</arIconName>
<arStatus>colori</arStatus>
<arEnabled>en</arEnabled>
<evPressed>50100</evPressed>
<evLongPressed>50120</evLongPressed>
<evReleased>50130</evReleased>
<evShow>50000</evShow>
</group>
</RightMenu>
pr-0-0-pdl_14.fm
00/0208 16-15
Appendix B - Customizations on the TP
nomi[3] := 'S3'
icone[3] := 'i1'
en[3] := TRUE
colori[3] := WIN_YELLOW
nomi[4] := 'S4'
icone[4] := 'i1'
en[4] := TRUE
colori[4] := WIN_GREEN
CONDITION[1] NODISABLE :
WHEN EVENT 50100 DO
colori[1] := WIN_RED
colori[2] := WIN_GREEN
WHEN EVENT 50101 DO
colori[1] := WIN_PINK
colori[2] := WIN_RED
ENDCONDITION
ENABLE CONDITION[1]
CYCLE
DELAY 1000
icone[2] := 'i2'
DELAY 1000
icone[2] := 'i1'
END rightmenu
pr-0-0-pdl_14.fm
16-16 00/0208
Appendix B - Customizations on the TP
To know how to quickly insert the added User Instruction, see next par. 16.4.2
Creating a “virtual” Numeric Keypad to insert User Instructions on page 16-20.
The xml file must be included in the suitable directory of the Controller, so that it is listed
together with all the already available instructions (see Fig. 16.1).
<keyword>
<text>DELAY % </text>
<param>
<text>time</text>
<keymode>num</keymode>
</param>
</keyword>
pr-0-0-pdl_14.fm
00/0208 16-17
Appendix B - Customizations on the TP
<keyword>
<import>
<prog_name>tt_tool</prog_name>
<type>
<type_name>routines</type_name>
<name>a_tool</name>
</type>
</import>
– the section between <import> and </import>, describes any information which is
needed to EXPORT the routine FROM
– <prog_name>tt_tool</prog_name> is the name of the owning program (tt_tool)
the routine is to be EXPORTED FROM
– <type_name>routines</type_name> indicates the type of the object to be
EXPORTED FROM
– <name>a_tool</name> is the routine name
– <text>A_TOOL (%) </text> states that a string will be displayed in the template,
containing the routine name (A_TOOL), with one parameter
– The section included between <param> and </param> describes the structure of
parameter:
• the field name displayed in the template (<text>index</text>),
• the alphanumeric keypad modality (<keymode>num</keymode>),
associated to such a parameter.
<keyword>
<text>AUX_COOP (%, %, %) </text>
pr-0-0-pdl_14.fm
16-18 00/0208
Appendix B - Customizations on the TP
<param>
<text>flag</text>
<keymode>alpha</keymode>
<context>ON</context>
<context>OFF</context>
</param>
<param>
<text>aux_joint</text>
<keymode>num</keymode>
</param>
<param>
<text>arm_num</text>
<keymode>num</keymode>
</param>
</keyword>
When the AUX_COOP.xml file is created in the suitable directory, the AUX_COOP
built-in routine is immediately available, as shown in Fig. 16.6.
pr-0-0-pdl_14.fm
00/0208 16-19
Appendix B - Customizations on the TP
To know how to add a User Instruction to the PDL2 menu, see previous par. 16.4.1
Adding User Instructions to the PDL2 menu on page 16-17.
<numpad>
<header>
<title>COOP</title>
</header>
<shortcut>
<numkey>2</numkey>
<statement>AUX_COOP</statement>
<help>
<it>ab./disab. movimento cooperativo</it>
<en>en./dis. cooperative motion</en>
</help>
<path>IDE\PDL2\keywords\Coop-Motion\AUX_COOP.xml</path>
</shortcut>
</numpad>
– <title>COOP</title> states that the string ‘COOP’ will be displayed as the title of
the table (red highlighted string in Fig. 16.7);
– <numkey>2</numkey> states that the numeric key which is involved in the
current shortcut definition, is key no.’2’ (green highlighted in Fig. 16.7);
pr-0-0-pdl_14.fm
16-20 00/0208
Appendix B - Customizations on the TP
When a Numeric Keypad does exist, including a specified instruction, pressing SHIFT+1
opens such a Numeric Keypad.
As soon as the numeric key (in our example is 2) is pressed, the corresponding template
is inserted in the PDL2 program (in our example the one shown in Fig. 16.4), ready to
be edited.
For further information, refer to Use of C4G Unit manual, IDE Page, par.6.11.4
Numeric Keypad.
pr-0-0-pdl_14.fm
00/0208 16-21
Appendix B - Customizations on the TP
pr-0-0-pdl_14.fm
16-22 00/0208
Appendix C - E-Mail Functionality
17. APPENDIX C -
E-MAIL FUNCTIONALITY
17.1 Introduction
Current chapter describes the e-mail functionality which allows to send/receive e-mails
by means of the C4G Controller Unit. The currently supported protocols are SMTP and
POP3.
To use the e-mail capability, the following parameters are needed:
– name / IP address of the SMTP server
– name / IP address of the POP3 server
– login and password of the POP3 server
A detailed description is supplied about the following topics:
– Configuration of SMTP and POP3 clients
– Sending/receiving e-mails on C4G Controller
– Sending PDL2 commands via e-mail
pr-0-0-pdl_19.fm
00/0607 17-1
Appendix C - E-Mail Functionality
See DV4_CNTRL Built-In Procedure in Chap. BUILT-IN Routines list section for
further information about the e-mail functionality parameters.
pr-0-0-pdl_19.fm
17-2 00/0607
Appendix C - E-Mail Functionality
pr-0-0-pdl_19.fm
00/0607 17-3
Appendix C - E-Mail Functionality
vi_i := 1
vi_skip := 0
WHILE vi_i <= ai_n DO
IF vi_skip = 0 THEN
WRITE LUN_CRT (as_prompt2, '(', vi_i, ')', ': ')
READ LUN_CRT (aw_input[2,vi_i])
IF aw_input[2,vi_i] = '' THEN
vi_skip := 1
ENDIF
ELSE
aw_input[2,vi_i] := ''
ENDIF
vi_i += 1
ENDWHILE
END pu_getstrmatrix2
BEGIN
ERR_TRAP_ON(40024)
ERR_TRAP_ON(39990)
ERR_TRAP_ON(39995)
vi_ext := 0
vi_first := 1
DELAY 1000
ws_cfg[1] := '192.168.9.244'
ws_cfg[2] := '192.168.9.244'
ws_cfg[3] := '[email protected]'
ws_cfg[4] := 'proto1'
ws_cfg[5] := 'proto1'
ws_cfg[6] := 'pdl2'
wi_cfg[1] := 0
wi_cfg[2] := 0
wi_cfg[3] := 0
wi_cfg[4] := 0
wi_cfg[5] := 0
si_handle := 0
WHILE vi_ext = 0 DO
IF vi_first = 1 THEN
vi_first := 0
pu_help
pr-0-0-pdl_19.fm
17-4 00/0607
Appendix C - E-Mail Functionality
ENDIF
WRITE LUN_CRT (NL, 'Command > ')
READ LUN_CRT (vs_input)
vi_ans := pu_getmenu(vs_input)
IF NOT VAR_UNINIT(vi_ans) THEN
SELECT vi_ans OF
CASE (1): -- Number of emails
DV4_CNTRL(ki_email_num, (si_handle), vi_num)
WRITE LUN_CRT (vi_num, ' E-mail waiting on server.', NL)
WRITE LUN_CRT ('*Mail num OK.', NL)
CASE (2): -- Send
pu_getstrmatrix2('To ', 'Cc ', ws_to_cc, 8)
pu_getstr ('Subj', vs_subj)
pu_getstrarray('Att ', ws_attachments, 10)
pu_getstr ('Body', vs_body)
DV4_CNTRL(ki_email_send, (si_handle), ws_to_cc, (vs_subj), (vs_body), ws_attachments, 1)
WRITE LUN_CRT ('*Mail send OK.', NL)
CASE (3): -- Recv
DV4_CNTRL(ki_email_recv, (si_handle), 1, vs_from, vs_subj, vs_body, vi_date, ws_to_cc,
ws_attachments)
WRITE LUN_CRT ('Received mail:', NL)
WRITE LUN_CRT (' Date:', vi_date, NL)
WRITE LUN_CRT (' From: ', vs_from, NL)
WRITE LUN_CRT (' To: ', ws_to_cc[1,1], ' ', ws_to_cc[1,2], ' ', ws_to_cc[1,3], ' ', ws_to_cc[1,4], ' ',
ws_to_cc[1,5], ' ', ws_to_cc[1,6], ' ', ws_to_cc[1,7], ' ', ws_to_cc[1,8], NL)
WRITE LUN_CRT (' Cc: ', ws_to_cc[2,1], ' ', ws_to_cc[2,2], ' ', ws_to_cc[2,3], ' ', ws_to_cc[2,4], ' ',
ws_to_cc[2,5], ' ', ws_to_cc[2,6], ' ', ws_to_cc[2,7], ' ', ws_to_cc[2,8], NL)
WRITE LUN_CRT (' Subj: ', vs_subj, NL)
WRITE LUN_CRT (' Att.: ', ws_attachments[1], ' ', ws_attachments[2], ' ', ws_attachments[3], ' ',
ws_attachments[4], ' ', ws_attachments[5], ' ', ws_attachments[6], ' ', ws_attachments[7], ' ',
ws_attachments[8], ' ', ws_attachments[9], ' ', ws_attachments[10], NL)
WRITE LUN_CRT (' Body: ', NL, vs_body, NL)
WRITE LUN_CRT ('*Mail recv OK.', NL)
CASE (4): -- Header
DV4_CNTRL(ki_email_hdr, (si_handle), 1, vs_from, vs_subj, vi_date, ws_to_cc)
WRITE LUN_CRT ('Header:', NL)
WRITE LUN_CRT (' Date:', vi_date, NL)
WRITE LUN_CRT (' From: ', vs_from, NL)
WRITE LUN_CRT (' To: ', ws_to_cc[1,1], ' ', ws_to_cc[1,2], ' ', ws_to_cc[1,3], ' ', ws_to_cc[1,4], ' ',
ws_to_cc[1,5], ' ', ws_to_cc[1,6], ' ', ws_to_cc[1,7], ' ', ws_to_cc[1,8], NL)
WRITE LUN_CRT (' Cc: ', ws_to_cc[2,1], ' ', ws_to_cc[2,2], ' ', ws_to_cc[2,3], ' ', ws_to_cc[2,4], ' ',
ws_to_cc[2,5], ' ', ws_to_cc[2,6], ' ', ws_to_cc[2,7], ' ', ws_to_cc[2,8], NL)
WRITE LUN_CRT (' Subj: ', vs_subj, NL)
CASE (5): -- Delete
DV4_CNTRL(ki_email_del, (si_handle), 1)
WRITE LUN_CRT ('*Delete OK.', NL)
CASE (6): -- Help
pu_help
CASE (7): -- Exit
DV4_CNTRL(ki_email_close, si_handle)
WRITE LUN_CRT ('*Program exit.', NL)
vi_ext := 1
ELSE:
pu_help
ENDSELECT
ELSE
ENDIF
ENDWHILE
END email
pr-0-0-pdl_19.fm
00/0607 17-5
Appendix C - E-Mail Functionality
pr-0-0-pdl_19.fm
17-6 00/0607
COMAU Robotics services
Repair: [email protected]
Training: [email protected]
Spare parts: [email protected]
Technical service: [email protected]