0% found this document useful (0 votes)
39 views345 pages

4607K - Rev08 - Programming Manual V3.3.3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views345 pages

4607K - Rev08 - Programming Manual V3.3.3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 345

OPENcontrol

Programming Manual

DOCUMENT NUMBER: 45004607K


RELEASE REF.: V 3.3.3
EDITION: 08
AUTHOR: Prima Electro S.p.A.
DATE: February 2016

PRIMA ELECTRO reserves the right to modify and improve the product described in this manual at any
time and without prior notice. The application of this manual is under customer responsibility. No
further guarantees will be given by PRIMA ELECTRO, in particular for any possible faults, incompleteness
and/or difficulties in the operation. In no event will PRIMA ELECTRO ever be responsible or liable for
indirect or consequential damages that may result from the use of such documentation.

COPYRIGHT 2016- Prima Electro S.p.A.


All rights reserved. Reproduction, use or disclosure to third parties without express authority is strictly
forbidden.
Prima Electro S.p.A. OPENcontrol – Programming manual

Edition Date Notes Author

08 February 2016 Prima Electro S.p.A

45004607K 2
Prima Electro S.p.A. OPENcontrol – Programming manual

Contents

1. Preface ......................................................................................................................................... 9
1.1 Introduction ................................................................................................................................................................................. 9
1.1.1 References .................................................................................................................................................. 9
1.1.2 Commands .................................................................................................................................................. 9
1.1.3 Syntax conventions ..................................................................................................................................... 9
1.1.4 Terminology .............................................................................................................................................. 10
1.2 Warnings and Notes ................................................................................................................................................................ 10

1.3 Reading keys and security instructions ............................................................................................................................... 10

1.4 Updates to present edition .................................................................................................................................................... 11

2. PROGRAMMING WITH OPENcontrol SYSTEMS .................................................................. 12


2.1 The program files ...................................................................................................................................................................... 12

2.2 ISO Program Components..................................................................................................................................................... 13

2.3 Block Types ................................................................................................................................................................................ 15


2.3.1 Comment blocks ....................................................................................................................................... 15
2.3.2 Alias definition blocks ............................................................................................................................... 15
2.3.3 Motion blocks ........................................................................................................................................... 16
2.3.4 Assignment blocks .................................................................................................................................... 16
2.3.5 Three-letter command blocks ................................................................................................................... 16

2.4 Programmable Functions ........................................................................................................................................................ 17


2.4.1 Axis coordinates ........................................................................................................................................ 17
2.4.2 R coordinate .............................................................................................................................................. 17
2.4.3 I J coordinates – K Function ...................................................................................................................... 17
2.4.4 t function................................................................................................................................................... 18
2.4.5 F function and dynamic parameters ......................................................................................................... 19
2.4.6 M function ................................................................................................................................................ 19
2.4.7 S function .................................................................................................................................................. 19
2.4.8 T function .................................................................................................................................................. 20
2.4.9 h functions ................................................................................................................................................ 20
2.4.10 G functions ................................................................................................................................................ 20

2.5 G Codes ...................................................................................................................................................................................... 21

2.6 ISO program synchronization and execution .................................................................................................................... 26


2.6.1 Default Synchronisation ............................................................................................................................ 26
2.6.2 Overriding Default Synchronisation .......................................................................................................... 27
2.6.3 Part Program Interpreter .......................................................................................................................... 27
2.6.4 ISO commands execution sequence ......................................................................................................... 28
2.6.5 Double numbers programming restrictions.............................................................................................. 28
2.6.6 TRACE – Mask to trace log information on a file ...................................................................................... 28

45004607K 3
Prima Electro S.p.A. OPENcontrol – Programming manual

3. PROGRAMMING THE AXES ................................................................................................... 29


3.1 AXIS MOTION ......................................................................................................................................................................... 29
3.1.1 Defining Axis Motion ................................................................................................................................. 29
3.1.2 ACCUR – Calculation accuracy .................................................................................................................. 30
3.1.3 MOVNULL – Null movement threshold .................................................................................................... 30
3.1.4 ISOCOMP – Compatibilities mask ............................................................................................................. 30
3.1.5 G93 G94 G95 – Feed programming modes ............................................................................................... 31
3.1.6 F – Dynamic parameter and work Feed setting ........................................................................................ 32
3.1.7 G00 – Rapid axes positioning .................................................................................................................... 34
3.1.8 G01 – Linear interpolation ........................................................................................................................ 35
3.1.9 G10 – Linear interpolation with rapid dynamic parameters ..................................................................... 36
3.1.10 G02 G03 – Circular interpolation .............................................................................................................. 37
3.1.11 G12 G13 – Circular interpolation clockwise and anticlockwise in space .................................................. 40
3.1.12 G14 – Circular interpolation for three points in space ............................................................................. 43
3.1.13 CET – Circular Endpoint Tolerance ............................................................................................................ 45
3.1.14 FCT – Full Circle Threshold ........................................................................................................................ 46
3.1.15 ARM – Defining Arc Normalisation Mode ................................................................................................. 47
3.1.16 SHAPERR – Circular interpolation speed reduction threshold / KVGAIN – Circular interpolation speed
reduction constant.................................................................................................................................................... 51
3.1.17 Helical interpolation ................................................................................................................................. 52
3.1.18 G33 – Constant or variable pitch threading .............................................................................................. 54
3.1.19 Rotary axes................................................................................................................................................ 58
3.1.20 Axes with Rollover .................................................................................................................................... 59
3.1.21 ROLLOPT – Optimized movement for rollover axes.................................................................................. 62
3.1.22 Pseudo axes .............................................................................................................................................. 62
3.1.23 Movement attributes ................................................................................................................................ 62
3.1.24 Diametral axes .......................................................................................................................................... 63
3.1.25 UDA – Dual axes ........................................................................................................................................ 66
3.1.26 SDA – Special Dual Axes ............................................................................................................................ 68
3.1.27 XDA – Master/Slave axes ......................................................................................................................... 70
3.1.28 Releasing the Slave(s) from the Master .................................................................................................... 74
3.1.29 Defining/Changing the following ratio ...................................................................................................... 75
3.1.30 Activating the following function .............................................................................................................. 76
3.1.31 Disabling the following function ............................................................................................................... 77
3.1.32 AXT – Tangential axis control .................................................................................................................... 79
3.1.33 AXS – Axes shared with PLC ...................................................................................................................... 80
3.1.34 AXF – Dynamic tracking axes definition .................................................................................................... 81
3.1.35 CAM - Electronic CAM ............................................................................................................................... 83
3.2 Coordinates and dynamics control ...................................................................................................................................... 91
3.2.1 G17 G18 G19 – Selecting the interpolation plane .................................................................................... 92
3.2.2 G16 – Defining the interpolation plan ...................................................................................................... 93
3.2.3 G31 – Preparation of the movement for the function ActiveReset .......................................................... 94
3.2.4 G26 G27 G28 G29 – Defining the dynamic mode ..................................................................................... 95
3.2.5 Automatic deceleration on bevels in G27 mode .................................................................................... 100
3.2.6 UDR/UVR – Dynamic force/rapid feed .................................................................................................... 100
3.2.7 DLA – Deceleration Look Ahead .............................................................................................................. 101
3.2.8 LKH – Access to the dimension of the Look Ahead queue ...................................................................... 102

45004607K 4
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.9 CRV – Feed optimization parameter ....................................................................................................... 103


3.2.10 MDA – Maximum Deceleration Angle .................................................................................................... 105
3.2.11 MOM – Manual Operating Modality ...................................................................................................... 106
3.2.12 EMGERR – Emergency to Error ............................................................................................................... 108
3.2.13 MOA – Motion Auxiliary ......................................................................................................................... 109
3.2.14 ERF – Error Form ..................................................................................................................................... 109
3.2.15 Jerk Limitation ......................................................................................................................................... 111
3.2.16 RAMP – Movement mode....................................................................................................................... 112
3.2.17 JRK Jerk Constant .................................................................................................................................... 118
3.2.18 FEEDROT – Feed rate programmed on linear axes only ......................................................................... 119
3.2.19 RAPSTOP – Rapid stop activation ............................................................................................................ 120
3.2.20 ODH – Online Debug Help ....................................................................................................................... 121
3.2.21 MBA – Multi-Block retrace Auxiliary functions ....................................................................................... 123
3.2.22 REM – Automatic return to profile at end of move ................................................................................ 123
3.2.23 G70 G71 – Measuring units..................................................................................................................... 124
3.2.24 G90 G91 G78 G79 – Absolute, incremental programming referred to machine positions (ABSOLUTE) or
referred to the tool tip (WORK) .............................................................................................................................. 125
3.2.25 G92 G98 G99 – Axis pre-setting .............................................................................................................. 128
3.2.26 G04 G09 – Dynamic mode attributes...................................................................................................... 129
3.2.27 G05 G06 –FeedHold at end / beginning of the movement ..................................................................... 130
3.2.28 t- Block execution time ........................................................................................................................... 130
3.2.29 DWT –Dwell Time ................................................................................................................................... 131
3.2.30 G93 – V/D Feed rate ............................................................................................................................... 131
3.2.31 VFF – Velocity Feed Forward .................................................................................................................. 132
3.2.32 FOP – Feed Override on Programmed Feed ........................................................................................... 132

3.3 Codes that modify the axes reference system................................................................................................................ 133


3.3.1 SCF – Scale Factors .................................................................................................................................. 134
3.3.2 MIR – Using Mirror Machining ................................................................................................................ 135
3.3.3 ROT – Interpolation plane rotation ......................................................................................................... 137
3.3.4 UAO – Using Absolute Origins................................................................................................................. 141
3.3.5 UTO – Using Temporary Origins.............................................................................................................. 142
3.3.6 UIO – Using Incremental Origins ............................................................................................................. 144
3.3.7 RQO – Requalifying origins ..................................................................................................................... 145

3.4 Overtravels and protected areas ........................................................................................................................................ 146


3.4.1 SOL – Software over travel ..................................................................................................................... 147
3.4.2 DPA – Define Protected Area .................................................................................................................. 149
3.4.3 PAE – Protected Area Enable .................................................................................................................. 151
3.4.4 PAD – Protected area disable ................................................................................................................. 153

3.5 Changing drive and axes parameters ................................................................................................................................. 154


3.5.1 CPA – Reading/writing of an axis parameter .......................................................................................... 154
3.5.2 CPD – Reading/writing of a drive parameter .......................................................................................... 159

4. TOOL AND TOOL OFFSETS PROGRAMMING ................................................................... 161


4.1 T address for tool programming ........................................................................................................................................ 162

4.2 T address for multi–tool programming ............................................................................................................................. 163

4.3 TMT – Tool parameter for PLC ......................................................................................................................................... 164

45004607K 5
Prima Electro S.p.A. OPENcontrol – Programming manual

4.4 h address ................................................................................................................................................................................... 165

4.5 AXO – Axis Offset Definition ............................................................................................................................................. 167

4.6 RQT – Requalifying Tool Offset ......................................................................................................................................... 169

4.7 RQP – Requalifying Tool Offset (pre-setting values)..................................................................................................... 170

4.8 TOU – Tool Expiry Declaration ......................................................................................................................................... 171

5. TOOL DIAMETER COMPENSATION ................................................................................... 172


5.1 TTC – Tool compensation type ......................................................................................................................................... 173

5.2 G40 G41 G42 – Tool compensation ................................................................................................................................. 174


5.2.1 Enabling Tool Compensation .................................................................................................................. 174
5.2.2 Tool diameter compensation (TTC, 0)..................................................................................................... 175
5.2.3 Tool thickness compensation (TTC, 1) .................................................................................................... 177
5.2.4 Notes on using tool compensation ......................................................................................................... 180
5.2.5 Tool Path Optimization ........................................................................................................................... 180
5.2.6 Disabling Tool Diameter Compensation ................................................................................................. 181
5.2.7 Disabling Compensation with TPO active ............................................................................................... 182
5.2.8 Disabling Disk Thickness Compensation ................................................................................................. 183
5.2.9 Tool compensation change (during machining)...................................................................................... 184
5.2.10 Linear/Linear tool path ........................................................................................................................... 184
5.2.11 Linear/Circular, Circular/Linear, Circular/Circular tool paths ................................................................. 186

5.3 r – Radii in compensated profiles ....................................................................................................................................... 188

5.4 b – Bevels in compensated profiles .................................................................................................................................... 189

5.5 IBSIZE – Interference correction in G41/G42 ................................................................................................................ 192


5.5.1 Interference generated by a single circular movement .......................................................................... 193
5.5.2 Interference generated by a combination of linear and/or circular movements ................................... 194
5.6 TPO – Tool Path Optimization with G41/G42 .............................................................................................................. 197
5.6.1 TPO=1, TPO=33 and TPO=65 modes ....................................................................................................... 198
5.6.2 Examples of profile optimisation with TPO=2......................................................................................... 202
5.6.3 TPO=3 mode ........................................................................................................................................... 203
5.6.4 TPO=8 and TPO=16 modes ..................................................................................................................... 205
5.6.5 TPO=32 mode and 64 mode ................................................................................................................... 205
5.7 TPA – Threshold angle for TPO ......................................................................................................................................... 206

5.8 TPT – Tool Path Threshold ................................................................................................................................................. 207

5.9 u v w – Paraxial compensation ............................................................................................................................................ 208


5.9.1 Examples of compensation factor applications u, v, w ........................................................................... 209

5.10 UVW – Definition of axes for paraxial compensation .................................................................................................. 212

5.11 MSA – Defining a Machining Stock Allowance ................................................................................................................ 213

6. PROGRAMMING THE SPINDLE ........................................................................................... 214


6.1 G96 G97 – CSS and RPM Programming ........................................................................................................................... 215
6.1.1 Changing the S address during G96. Cancelling CSS mode ..................................................................... 216
6.2 SSL – Spindle Speed Limit ..................................................................................................................................................... 217

45004607K 6
Prima Electro S.p.A. OPENcontrol – Programming manual

6.3 M19 –Spindle rotation stop with orientation .................................................................................................................. 218

6.4 GTS – Spindle sharing ............................................................................................................................................................ 219

7. AUXILIARY M FUNCTIONS ................................................................................................... 221


7.1 Standard M functions ............................................................................................................................................................. 221

7.2 M Function (prelude, expedite, postlude) ........................................................................................................................ 223

7.3 Parametric M functions ......................................................................................................................................................... 224

8. PARAMETRIC PROGRAMMING ........................................................................................... 225


8.1 Trigonometric functions ....................................................................................................................................................... 226

8.2 Mathematical functions .......................................................................................................................................................... 226

8.3 Logarithmic and exponential functions ............................................................................................................................. 226

8.4 Boolean functions ................................................................................................................................................................... 227

8.5 Local variables.......................................................................................................................................................................... 227


8.5.1 E parameters .......................................................................................................................................... 227
8.5.2 ! – User variables .................................................................................................................................... 229
8.5.3 Real time variables – RTV........................................................................................................................ 231
8.5.4 LINENO – Number of the program string selected ................................................................................. 231
8.5.5 $BRK – Point of break-point for partial execution of a program ............................................................ 232
8.5.6 GPRG – Status of the programmed G codes ........................................................................................... 233
8.5.7 RCD – Disable counter for RCM .............................................................................................................. 234
8.5.8 CTV – CYCTIME – Cycle time variables .................................................................................................... 235

8.6 System variables ...................................................................................................................................................................... 236


8.6.1 SN – System Number .............................................................................................................................. 236
8.6.2 SC – System Character ............................................................................................................................ 237
8.6.3 LS – System Strings ................................................................................................................................. 239
8.6.4 TIM – System Timer ................................................................................................................................ 240

8.7 @ - WinPLUS variables ........................................................................................................................................................ 241

8.8 L variables ................................................................................................................................................................................. 242

8.9 Multiple assignments .............................................................................................................................................................. 243

9. PARAMACRO .......................................................................................................................... 244


9.1 Paramacro definition .............................................................................................................................................................. 244

9.2 HC parameters........................................................................................................................................................................ 246

9.3 DAN – Define axis name ...................................................................................................................................................... 249

9.4 SCRLPAR – Scrolling paramacro status ............................................................................................................................ 250

9.5 DGM – Disable paramacro scrolling ................................................................................................................................. 251

9.6 PMS – S as paramacro / PMT – T as paramacro / PMM – M as paramacro ............................................................ 252


9.6.1 Auxiliary functions S, T, M executed as paramacros ............................................................................... 252

10. MODIFYING THE PROGRAM EXECUTION SEQUENCE ............................................... 256

45004607K 7
Prima Electro S.p.A. OPENcontrol – Programming manual

10.1 General ...................................................................................................................................................................................... 256


10.1.1 Block repetition commands .................................................................................................................... 256
10.1.2 Commands for executing subprograms .................................................................................................. 256
10.1.3 Commands for modifying program flow ................................................................................................. 257
10.1.4 Commands for delaying program execution and disabling blocks ......................................................... 257
10.1.5 Commands for the releasing or suspending the execution of a program .............................................. 257
10.2 RPT and ERP – Commands for program blocks repetition ......................................................................................... 258
10.2.1 Machining Equidistant Holes .................................................................................................................. 260
10.2.2 Machining with Roughing and Finishing Cuts ......................................................................................... 260
10.3 Commands for subroutines execution.............................................................................................................................. 262
10.3.1 CLS – CLD – CLT – $() Call subroutines .................................................................................................... 262
10.3.2 PTH – Declaration of the default pathname ........................................................................................... 269
10.3.3 EPP – Executing a Portion of Program .................................................................................................... 270
10.3.4 EPB – Execute Part-Program Block ......................................................................................................... 273

10.4 Jump and delay commands ................................................................................................................................................... 275


10.4.1 GTO - Jump command ............................................................................................................................ 275
10.4.2 IF ELSE ENDIF .......................................................................................................................................... 279
10.4.3 DLY – Defining delay time ....................................................................................................................... 281
10.4.4 DSB – Disable Slashed Blocks .................................................................................................................. 281
10.4.5 REL – Releasing the part program ........................................................................................................... 281
10.4.6 WOS – Wait on signal .............................................................................................................................. 282

11. APPENDIX A: character and command list ....................................................................... 283


11.1 Table of characters ................................................................................................................................................................. 283

11.2 G codes ..................................................................................................................................................................................... 286

11.3 Mathematical and logical functions .................................................................................................................................... 288

11.4 Local and system variables modifiable from a program ................................................................................................ 289

11.5 Three-letter codes ................................................................................................................................................................. 292

11.6 ASCII codes .............................................................................................................................................................................. 301

12. APPENDIX B: Error messages ............................................................................................. 303


12.1 Description of error messages and remedial actions .................................................................................................... 303
12.1.1 Error generated by PLC – Interpolator library ........................................................................................ 303
12.1.2 Errors generated by Process library ........................................................................................................ 319
12.1.3 Errors in tables library ............................................................................................................................. 340
12.1.4 Errors generated by geometrical library ................................................................................................. 342
12.1.5 Security library errors ............................................................................................................................. 343
12.1.6 Errors in the 3D transformations library ................................................................................................. 344

45004607K 8
Prima Electro S.p.A. OPENcontrol – Programming manual

1. Preface

1.1 Introduction
This manual describes the procedures used for writing part programs with the OPENcontrol system. It
provides programmers with all the information they need for creating machine control programs.

1.1.1 References
For additional information refer to:
OPENcontrol Software characterization manual
OPENcontrol End User Manual

The chapters in this manual are organised in sections. They describe the language elements (commands
and functions) used for managing a specific task, e.g. axis programming, tool programming, probe
management. Programming examples have been introduced in the command description.

1.1.2 Commands
Commands are dealt with in the chapters that describe the specific task. A common structure has been
adopted in the command description. For each command, the following information is provided:
Command name
Command function
Command syntax
Parameters
Characteristics and notes
Examples
Where possible, the examples report parts of program and diagrams that show how the commands work.

1.1.3 Syntax conventions


Use the following conventions with the commands:
SYMBOL MEANING
[] Brackets enclose optional entries. Do not enter the brackets.
{} Braces enclose entries which may be repeated more than once. This could also
be described as a series of alternative entries, i.e. only one of these may be
entered. Alternative entries are separated by a vertical bar (|). Do not enter
the braces in the command itself.

| A vertical bar separates alternative entries. Do not enter the bar.

Key-words are written in bold. They must be entered exactly as they are represented in the syntax
description. Parameters that must be passed with commands are indicated by a mnemonic written in
italics. Appropriate values must be entered in place of the mnemonic. Leading zeroes can be omitted.
For example, you can program G00 as G, G01 as G1.

45004607K 9
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
(SCF,[value])
SCF, the comma and parenthesis are key-words and must be written as described. value is a parameter
name and must be replaced by an appropriate value. The brackets indicate that value is an optional
value.

1.1.4 Terminology
Some terms appearing throughout the manual are explained here below.

Control Refers to the OPEN numerical control unit comprising front panel unit and basic unit.

Front Panel Is the interface module between machine and operator; it has a monitor where
messages are output and a keyboard to input the data. It is connected to the basic unit.

Basic Unit Is the hardware-software unit handling all the machine functions. It is connected to the
front panel and to the machine tool.

1.2 Warnings and Notes


This manual makes a distinction between two types of security instructions:
WARNING is used to recall the attention on situation which may lead to serious error conditions, physical
injuries and death.
NOTES are made to recall reader’s attention or to supply useful info on a specific topic. NOTES are less
critical than WARNINGS, but they should not be ignored.

1.3 Reading keys and security instructions


ATTENTION! Reader is informed about situation which may cause serious physical injuries and/or serious
damages to machineries with the following symbols:

WARNING! Dangerous Voltage: This symbol is associated with dangerous high voltages which
could cause serious physical injuries and/or damages to the machineries. Text nearby the
symbol explains how to avoid this danger.

WARNING! Danger: Advises about situation which may cause physical injuries and/or serious
damages to the machineries, not for electrical problems. Text nearby the symbol explains
how to avoid this danger.

NOTE: supplies or highlights further information about a specific topic.

45004607K 10
Prima Electro S.p.A. OPENcontrol – Programming manual

1.4 Updates to present edition


The following updates have been added to this manual with reference to version 3.3.3 of OPENcontrol

CHAPTER UPDATE

Chapter 2
2.2 Updated description of the field label
2.5 Added G78 in the table of G codes
2.6.6 Added description to access the file cncdebug_log.txt
Added statement for variable TRACE

Chapter 3
3.1.15 Added figure description of new values of ARM 4 and 5
3.2 Added code G78
3.2.8 Added description of tri-literal LKH
3.2.14 Completed description of variable ERF
3.2.24 Added description of G78
3.2.26 Revised description of G5 and G6
3.4.1 Extended description of tri-literal SOL

Chapter 4
4.2 Revised syntax of command T multi tool

Chapter 8
8.2 Corrected typing error in the description of command MOD
8.5.8 Added variable CTV

Chapter 10
10.3.3 Updated description of syntax command EPP
10.4.1 Updated description of syntax command GTO

Chapter 11
11.5 Added tri-literal LKH in the tables

Chapter 12
12.1.1 Added error 22/226
12.1.2 Extended comment for errors: 23/16, 23/17, 23/69
Added errors 23/195 and 23/196
Added error 23/373
Modified comment of error 23/570
12.1.3 Added errors of table library

45004607K 11
Prima Electro S.p.A. OPENcontrol – Programming manual

2. PROGRAMMING WITH OPENcontrol SYSTEMS

OPENcontrol part programs are written with a specific language defined by the ISO standard or by using
XML commands associated to paramacros. This chapter describes the elements of the two languages,
introducing also the relevant programming topics.

2.1 The program files


OPENcontrol part programs are stored in files which may be identified with a physical address, either
through a logic DRIVE or directly by specifying their respective names.

Physical names have a maximum length of 127 characters, including extension and path, as
applicable, and they identify files stored in the system’s physical directories.

The names specified through a logic DRIVE identify the programs saved in the logic directories
configured on the machine. The configuration of logic directories or DRIVES takes place at the
machine characterisation stage in AMP. Given a file path containing a DRIVE, the system
determines automatically the physical address associated with it, which must comply with the
length requirement mentioned above.

From the programs identified simply with a file name, the system works out the relevant
physical path by searching for it among the default paths specified in AMP during machine
characterisation.

When using Windows Editors, remember to press the “enter” command after the last line of the
program. Quitting the program without this command gives a specific error message during
program execution.

Program activation/deactivation may be executed by specifying the name of the program, either through
a physical address or a DRIVE, or directly, by specifying its name, while the names of subroutines and
those of all the ISO instructions for which a file has to be specified must be supplied directly or through
a logic address by means of a DRIVE.

45004607K 12
Prima Electro S.p.A. OPENcontrol – Programming manual

2.2 ISO Program Components


Address
An address is a letter that identifies the type of instruction. For example, these are addresses:

G, X, Y, F

Word
A word is an address followed by a numerical value. For example, these are words:

G1 X50.5 Z-3.15 F200 T1.1

When you assign a numeric value to a word, no zeroes must precede or follow the value. Insert decimal
values after the decimal point.

Blocks
A program block comprises a set of words that identify an operation or a series of operations to be
performed. When several fields are used in the same block, they must appear in the order shown in the
following table:
block sequence sequence Words synchronization
label
delete number synchronisation codes
/ LABEL NUMBER # or & CHARACTERS ALL ALLOWED

The maximum length of a block is 256 characters.


A technological program is a sequence of blocks that describe a machining operation.
Each block must end with: <CR> <LF>.

Comment blocks
It can be inserted in any position within the current block.
The following strings identify the comment start:
;
//
(*
Any character after ";" icomment start are considered parts of the comment.

Alias block definition


By defining an alias it is possible to associate a customized string to a code instruction. Within an alias
block definition, there should not be any instructions except for the comment.
An alias is defined with the following syntax:
{define} {alias name} {code instruction}

45004607K 13
Prima Electro S.p.A. OPENcontrol – Programming manual

Block delete
The block delete field is optional. It allows the operator to choose whether to execute program blocks
that begin with the "/" character that are called slashed blocks.

Example:
/N100 G00 X100

The block shown in the example can be enabled or disabled using the user interface or by typing the
three-letter code DSB on the keyboard.

Label
The label field is optional. It allows the programmer to assign a symbolic name to a block. A label can
have up to sixteen alphanumeric characters which must be between positions. In case of a slashed block,
the label must be inserted after the slash.

A special label type known as marker can be defined. The markers are used in the memory search and
identify a point from which the search will be started/finished. For additional details see the
OPENcontrol User manual.
To define a marker, precede the label name with a $ character.

Example:
"START"
/"END"
$"MARKER"
When a label field is used in a 'GTO' command, the label defines the block that the control should jump
to.
In case of an EPP command labels are useful to limit part program section which will have to be
executed.

Sequence number
The "sequence number" field is optional. It allows the programmer to number each program block. A
sequence number begins with the letter N and is followed by an integer number. Sequence number
belongs to the following range: 01999999999.
The sequence number must appear in front of the first operand and after the label.

Example:
N125 X0
"START" N125 X0
"END" N125 X0

Synchronisation/asynchronisation
Characters # and & are used to override the default synchronisation/asynchronisation status. For further
information on synchronisation, see "Synchronisation and Program Execution".
This field must appear in front of the first operand and after block delete, label and sequence number.

Example:
#(GTO,START, @PL1=1)

45004607K 14
Prima Electro S.p.A. OPENcontrol – Programming manual

2.3 Block Types


Four types of blocks can be used in a part program:
Comment blocks
Alias definition blocks
Motion blocks
Assignment blocks
Three-letter command blocks

2.3.1 Comment blocks


A comment block allows the programmer to insert free text in the program. This text may describe the
function to be executed or provide other pieces of information that make the program more
understandable and documented.
A comment block does not produce messages for the operator. The control ignores a comment block
during execution of the program.

The first character of a comment block must be one of these three characters (;) or ‘//’ or ‘(*’. The rest
of the comment block is a sequence of alphanumeric characters. For example:

;THIS IS AN EXAMPLE OF COMMENT BLOCK

A comment can be inserted not only in a dedicated block, but also in other types of blocks after the
character aforementioned. All characters after a ; are considered as a comment.

Example:
G1 X100 Y50 ; Motion block
E1=10 //; Local variable E
(ROT,45) (*;Rotation command

2.3.2 Alias definition blocks


An alias definition block associates an instruction or a frequently used constant to a string. During the
program execution, the instructions and the corresponding constants replace the alias. An alias
definition block does not generate the operating code; during the program execution, the control ignores
the alias definition blocks.

An alias block definition has the following structure: {define} {alias name} {alias value}.

In the parameters alias name and alias value all the characters are accepted, including spaces and
single and double quotes. Only curly brackets are not accepted.

An alias can be defined only by a comment, but not by other instructions. The string “alias value”, has
to contain instructions and/or values understood by the control.

Valid examples:
{define} {LINEAR} {G1} ; Associate the LINEAR string to the instruction G1
{define} {RESET} {E100=0} // Associate the RESET string to the cancellation of the variable E100
{define} {MSG} {“MIO MSG”} ; Associate the string “MIO MSG” to the alias MSG.

45004607K 15
Prima Electro S.p.A. OPENcontrol – Programming manual

Invalid example:
{define} {LINEAR} {G1} E100=0 // An alias definition can not be followed by other instructions.

2.3.3 Motion blocks


Motion blocks conform to ISO and ASCII standards for programming blocks. There is no particular order
for programming the components of a motion block.

Example:
G1 X500 Y20 F200

2.3.4 Assignment blocks


Assignment blocks are used to write variables' values directly from the program. Several types of
assignments are possible as shown in the following table:
TYPE OF ASSIGNMENT EXAMPLE
Simple assignment E10=123.567
Multiple assignment E1=10, 15.5, 123.467
In multiple assignments values are loaded as follows:
10 E1
15.5 to E2
123.467 to E3
Math expression assignment E20=(E10+125*SQR(E23))
System number SN=1.5

2.3.5 Three-letter command blocks


Three-letter command blocks define an operation with a three-letter instruction in conformity with the
RS-447 standard.

Example:

(ROT,45)
(DIS,"message text")

45004607K 16
Prima Electro S.p.A. OPENcontrol – Programming manual

2.4 Programmable Functions


Programmed values for the functions can be preceded the symbol =.

Example:
The following blocks are equivalent
G1X100 G1X=100
G2X10Y10R200 G2X=10Y10R=200

2.4.1 Axis coordinates


Axis coordinates can be named with letters ABCUVWXYZPQD (according to the configuration set in AMP)
and can be programmed in the following ranges:

-99999.99999 -0.00001 mm/inch

+0.00001 +99999.99999 mm/inch

NOTE:
It is impossible to program coordinates in the +0.00001 range because 0.00001 is the minimum value
accepted by the control.

2.4.2 R coordinate
In a circular interpolation (G02-G03- G12-G13) R represents the radius of the circle.
In a threading block (G33), the R coordinate represents the offset from the zero angular position of the
spindle for multi-start threads.
In a standard canned cycle (G81-G89), the R coordinate defines the initial position value and retract
value. This function is programmable in the following ranges:

-99999.99999 -0.00001 mm/inch

+0.00001 +9999 mm/inch


9.999
99

NOTE:
It is impossible to program values in the +0.00001 range because 0.00001 is the minimum value
accepted by the control.

2.4.3 I J coordinates – K Function


In circular interpolation (G02-G03), when bit 0 of ISOCOMP is not set (ISO commands are set as to comply
with 10 Series in AMP) I and J values indicate abscissa and ordinate coordinates of the arc centre, no
matter which interpolation plane is active. In circular interpolation (G02-G03), when bit 0 of ISOCOMP is
set to 1 (ISO commands are set to comply with 10 Series in AMP) I and J values indicate the centre
coordinates referred to the current point. Their use must be coherent with the interpolation plane
active at that moment.
In the spatial circular interpolation programmed used the centre (G12-G13), I, J and K values indicate
the centre active coordinates with reference to the abscissa, to the ordinate and to the third axis. In the
circular interpolation for three points (G14) I, J and K indicate the coordinates of the third point of the
circle.

45004607K 17
Prima Electro S.p.A. OPENcontrol – Programming manual

I and J coordinates are also used in the deep hole drilling cycle (G83).
In a threading block (G33), the I address defines the pitch variation for variable pitch threads:

I+ Increasing pitch
I- Decreasing pitch

In the deep drilling cycle (G83) K defines the incremental value to apply in order to reduce to the
minimum depth value (J) the starting pitch depth (I). In a threading block (G83) or in a tapping cycle
(G84), K defines the thread pitch. In the helical interpolation (G02-G03), K defines the helix pitch.

This function is programmable in the following ranges:

-99999.99999 -0.00001 mm/inch

+0.00001 +99999.99999 mm/inch

NOTE:
It is impossible to program values in the +0.00001 range because 0.00001 is the minimum value
accepted by the control. When the values of the corresponding axis are expressed in diametrical units
(according to the configuration set in AMP), the values of the centre coordinates (I and J) are also
expressed in diametrical units.

2.4.4 t function
The t function defines the time needed to complete the move defined in the block.
The function is programmable in the following range:

+0.00001 +99999.99999 S

When a “t” function is programmed the block federate will be:


total distance
F= * 60
time

A "t" value is valid only in the block in which it is programmed.

45004607K 18
Prima Electro S.p.A. OPENcontrol – Programming manual

2.4.5 F function and dynamic parameters


The F code corresponds to two different function: to adjust work feed and to set modal or local
dynamic parameters. In the first case the F function defines the axes feedrate. This function is
programmable in the following range:

+0.00001 +99999.99999 mm/inch

In G94, F function defines the feedrate in millimetres per minute (G71) or inches per minute (G70).
In G93, the F function defines the inverse of the necessary time in minutes to complete the movement:

speed
F= = 1/t (minutes)
total distance

The F function is mandatory in the blocks when G93 is active and only affects that block.
In G95, F specifies the axes feedrate in millimetres per revolution (G71) or inches per revolution of the
spindle (G70). The syntax needed when F code is used to set dynamic attributes is described in Chapter
2 of this manual.

2.4.6 M function
The M address can activate various machine operations. The programmable range goes from 0 to 999.
See Chapter 8 for further information about these functions.

2.4.7 S function
The S function specifies the spindle rotation speed. It is programmable in the following range:

+0.001 999999.999 rpm/fpm

In G97, the S function defines spindle rotation speed expressed in revolutions per minute.
In G96, the S function defines the cutting surface speed expressed in metres per minute (G71) or feet
per minute (G70). The above cutting speed remains constant on the surface.
Refer to Chapter 5 for further information about S function programming.

45004607K 19
Prima Electro S.p.A. OPENcontrol – Programming manual

2.4.8 T function
The T function defines the tool and tool offset needed for machining. The tool code is programmable
over 32 alphanumerical characters, and the offset can be programmed in a range from 0 to 300.

Chapter 4 provides a detailed description of T functions.

M, S and T functions vary according to their characterisation in AMP.


It is possible for the system to execute these functions inside a continuous move (G27-G28).

When planning an application the manufacturer must:


Configure the desired function as "ALLOWED IN CONTINUOUS" in AMP.
Write a machine logic to handle such a function.
In turn, the programmer must remember that these functions produce different
effects depending on how they are programmed:
In continuous mode a function configured as "ALLOWED IN CONTINUOUS" will be
executed in the sequence in which it has been programmed. In order not to lock the
program the function will be executed in "NO WAIT" mode.
In point-to-point mode a function configured as "ALLOWED IN CONTINUOUS" will be
executed in standard mode.

2.4.9 h functions
h functions permit to alter an offset during both continuous and point to point moves.
An h function must be programmed by itself in a block. Its value may range from 0 to 300 and it may be
either an integer or an E variable.

2.4.10 G functions
G codes program preparatory functions for machining. The following section deals with this codes.

45004607K 20
Prima Electro S.p.A. OPENcontrol – Programming manual

2.5 G Codes
This section shows how to write preparatory G codes in part program blocks. A preparatory G code is
identified by the G address followed by one or two digits (G00-G99). At present, only some of the 100
possible G codes are available.

Paramacro subroutines can be called with a three-digit G code. This class of G codes is described in
Chapter 10. Three-digit G codes are classified as follows:

G100 - G299 Reserved


G300 - G699 Non modal paramacro range
G700 - G998 Modal paramacro range
G999 Reset modal paramacro

The G code must be programmed after the sequence number (if defined) and before any other operand
in the block.

For example:
N100 G01 X0 - operand

It is possible to program several G codes in the same block, provided they are compatible with each
other. Table below defines compatibility between G codes. Zero indicates that the G codes are
compatible and can be programmed in the same block; 1 means that the G codes are not compatible and
cannot be programmed in the same block without generating an error.

Compatible G Codes
G 00 01 02 12 33 35 60 81 80 72 93 96 41 40 27 29 04 09 90 79 70 16 92 31
10 03 13 36 67 89 73 94 97 42 28 05 91 78 71 17 99
14 37 74 95 26 06 18 98
38 19
39
G00 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0

G01 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0

G02 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0

G03 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0

G04 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0

G05 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 0

G06 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 0

G09 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 0

G10 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0

G12 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0

G13 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0

45004607K 21
Prima Electro S.p.A. OPENcontrol – Programming manual

G 00 01 02 12 33 35 60 81 80 72 93 96 41 40 27 29 04 09 90 79 70 16 92 31
10 03 13 36 67 89 73 94 97 42 28 05 91 78 71 17 99
14 37 74 95 26 06 18 98
38 19
39
G14 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0

G16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G26 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0

G27 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0

G28 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0

G29 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0

G31 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1

G33 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0

G35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G36 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G37 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G38 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G40 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 0

G41 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 0

G42 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 0

G60 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G61 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G62 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G63 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G66 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G67 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

45004607K 22
Prima Electro S.p.A. OPENcontrol – Programming manual

G 00 01 02 12 33 35 60 81 80 72 93 96 41 40 27 29 04 09 90 79 70 16 92 31
10 03 13 36 67 89 73 94 97 42 28 05 91 78 71 17 99
14 37 74 95 26 06 18 98
38 19
39
G70 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0

G71 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0

G72 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G73 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G74 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G78 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0

G79 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0

G80 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 1

G81 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 0 1 1 1

G82 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1

G83 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1

G84 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1

G85 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1

G86 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1

G89 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1

G90 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0

G91 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0

G92 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G93 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0

G94 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0

G95 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0

G96 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0

G97 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0

G98 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

G99 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

45004607K 23
Prima Electro S.p.A. OPENcontrol – Programming manual

NOTE: 0 means compatible G codes - 1 means incompatible G codes

The following table gives a summary of the G codes available in the control. This default configuration
can be modified through the AMP utility.

G code summary
CODE GROUP MODAL DESCRIPTION POWER UP
G00 a YES Rapid axes positioning YES
G01 a YES Linear interpolation NO
G10 a YES Linear interpolation with rapid dynamic parameters. NO
G02 a YES Circular interpolation CW NO
G03 a YES Circular interpolation CCW NO
G12 a YES 3D circular interpolation CW NO
G13 a YES 3D circular interpolation CCW NO
G14 a YES 3D circular interpolation for 3 points NO
G33 a YES Constant or variable pitch thread NO
Circular interpolation and cutter diameter
G16 b YES NO
compensation on a defined plane
Circular interpolation and cutter diameter
G17 b YES NO
compensation on 1st-2nd axes plane
Circular interpolation and cutter diameter
G18 b YES YES
compensation on 3rd-1st axes plane
Circular interpolation and cutter diameter
G19 b YES NO
compensation on 2nd-3rd axes plane
G26 c YES Continuous sequence with null feed at the end of block NO
Continuous sequence operation with automatic speed
G27 c YES YES
reduction on corners
Continuous sequence operation without speed
G28 c YES NO
reduction on corners
G29 c YES Point-to-point operation NO
G92 d NO Axis pre-setting without mirror NO
G98 d NO Axis pre-setting with mirror NO
G99 d YES Delete G92 YES
G40 e YES Cutter diameter compensation disabling YES
G41 e YES Cutter diameter compensation-tool left NO
G42 e YES Cutter diameter compensation-tool right NO
G70 f YES Programming in inches NO
G71 f YES Programming in millimetres YES
G80 g YES Disable canned cycles YES
G81 g YES Drilling cycle NO
G82 g YES Spot-facing cycle NO
G83 g YES Deep hole drilling cycle NO
G84 g YES Tapping cycle NO
G85 g YES Reaming cycle NO
G86 g YES Boring cycle NO
G89 g YES Boring cycle with dwell NO
G90 h YES Absolute programming YES
G91 h YES Incremental programming NO

45004607K 24
Prima Electro S.p.A. OPENcontrol – Programming manual

CODE GROUP MODAL DESCRIPTION POWER UP


G78 k NO Programming referred to the tool tip and motion NO
referred to the machine zero
G79 K NO Programming and motion referred to machine zero NO
G04 j NO Dwell at end of block NO
G05 i NO FeedHold at the end of the movement NO
G06 i NO FeedHold at the beginning of the movement NO
G09 j NO Deceleration at end of block NO
G72 k NO Point probing with probe tip radius compensation NO
G73 k NO Hole probing with probe tip radius compensation NO
Probing for theoretical deviation from a point without
G74 k NO NO
probe tip radius compensation
G93 l YES Inverse time (V/D) feed rate programming mode NO
G94 l YES Feedrate programming in ipm or mmpm NO
G95 l YES Feedrate programming in ipr or mmpr YES
Constant surface speed (feet per minute or metres per
G96 m YES YES
minute)
G97 m YES Spindle speed programming in rpm NO
G35 YES Absolute roto-translation of a linear axes tern NO
Roto-translation on a linear axes tern towards the
G36 YES NO
active origin.
Coordinates of the teorethical points for the definition
G37 NO NO
of the roto translation by three points
Coordinates of the measured points for the definition
G38 NO NO
of the roto-translation by three points
G39 YES Activation of rototranslation defined by three points NO
G60 YES Closes spline profile (HSM) YES
G61 YES Opens spline profile (HSM) NO
G62 NO Divides the spline profile in two continuous units NO
G63 NO Divides spline profile in two units with connector NO
G66 NO Divides spline profile in two units with edge NO
Divides spline profile in two units with speed rate
G67 NO NO
reduced on the edge.
Identifies a movement that can be stopped with Active
G31 NO
Reset

45004607K 25
Prima Electro S.p.A. OPENcontrol – Programming manual

2.6 ISO program synchronization and execution


The terms "synchronised" and "asynchronous" apply only to part program blocks not implying a
movement, that is, assignment or calculation blocks. A motion block is any block containing axes motion
together with other actions:

Axis moves
M codes
S codes
T codes

A synchronisation block is taken into consideration and executed only after the motion block that
precedes it in the program is completed, that is after the axis move has been executed. On the other
hand, a non-synchronised block is executed as soon as it is read by the part program interpreter, i.e.
when perhaps the previous move is still in progress.

The advantage of asynchronous block execution is that variable assignments and complex calculations
can be made between moves. This allows reduction of waiting time between two motion blocks caused
by calculations.

2.6.1 Default Synchronisation


At power up, the following commands and codes are automatically synchronised:
G16, G17, G18, G19, G35, G36, G80
AXF, AXT, AXS, CAM, CPA, CPD, DER, DEW, DLY, FLT, GTA, GTS, INP, PAD, PAE, REL, RQO, SCF,
SDA, SND, TCP, TTC, UDA, UPR, UVA, UVC, UVP, LTH, XDA, WAI, WOS
All the other commands are not synchronised.

This default assignment can be changed. This means that the commands that are synchronised by default
at power-up can become asynchronous and that the commands that are not synchronised by default at
power-up can become synchronous. The next section explains how to override default synchronisation.

NOTE:
Default synchronisation cannot be modified for tri-literal codes AXF, AXS, AXT, CAM, FLT, GTA, GTS, INP,
LKH, LTH, TCP, TTC, UPR, UVA, UVC, UVP, LTH, XDA and for G35 and G36 codes.

45004607K 26
Prima Electro S.p.A. OPENcontrol – Programming manual

2.6.2 Overriding Default Synchronisation


Under certain circumstances, the part program may request modification of the default synchronisation.
If the command is synchronised by default and the programmer wants it to be executed by the
interpreter as soon as it is read (asynchronous operation), an "&" must be programmed in the first
position of the block, immediately after the "n" number.
If the command is asynchronous and you wish to activate synchronous operation, the first character in
the block must be #.

Both # and & are active only in the block where they are programmed.

To avoid possible damage to the workpiece, note that programming synchronised blocks
between contouring blocks clears the motion buffer at each synchronised block. This will result
in dwells while the buffer is reloaded and all the calculations are performed.

2.6.3 Part Program Interpreter


When the system reads a part program block it executes various activities, depending on the type of
block:
A motion block will be loaded in the motion buffer queue. The buffer size is configurable from 2
to 1024 blocks through AMP.

An asynchronous assign or calculation block will be executed.

Three factors cause the part program interpreter to stop reading blocks:
The motion buffer is full. When the active motion block is completed, the interpreter will read
another motion block and load it in the buffer queue.

A non-motion block that contains a synchronised command or a code that forces synchronisation
is read. The interpreter does not start again until the last loaded motion block is completed. At
this point the block calling for synchronisation is executed and the interpreter starts reading the
following blocks.

Error conditions

45004607K 27
Prima Electro S.p.A. OPENcontrol – Programming manual

2.6.4 ISO commands execution sequence


1. Diameter axes
2. Scale factor (SCF)
3. Measuring units (G70 G71)
4. Paraxial compensation ( u v w )
5. Programming mode (G90 G91)
6. Mirror machining (MIR)
7. Plane rotation (ROT)
8. Origins (UAO UTO UIO G92)

2.6.5 Double numbers programming restrictions


Double numbers are represented according to the IEEE numerical standard through 32 bit floating-point
numbers.
The precision of these numbers is therefore limited to 17 digits in all, with a maximum of 17 digits for
whole numbers and 16 digits for decimal numbers.
If more numbers are programmed, the system does not display any error; it expresses the value in the
scientific format (number with exponent) truncating the programmed number at the 17th digit, thereby
losing precision.

2.6.6 TRACE – Mask to trace log information on a file


The instruction TRACE defines a variable of 4 bytes that allows to track on a file information related to
positions or commands executed by the process. If the TRACE variable is different from 0, the file
CNCdebug_log.txt is created in the temporary folder of Windows of the OPENcontrol system.
This file is common to all the configured processes so that it is possible to keep track of the sequence of
commands exchanged between the processes. After a RESET command on whichever Process, if all the
TRACE variables of all the processes are 0, the file is closed.
A logical drive must be created to enter a file, with a generical name and path “\temp”. Drag the file
CNCdebug_log.txt in another carpet, within which it will be possible to enter the file bot in reading
and/or writing. For further information about the configuration of logical drives please refer to the user
manual.

The meaning of the bit of the variable TRACE is as follows:

Bit 0: if this bit is set to 1, all the external commands received from that process with the
relative sender are saved on the file.

Bit 1: if this bit is set to 1, all the commands and subcommands received from tasks SPV, ELB
and SYNC with their related status and sub-status are saved on the file.

Bit 2: if this bit is set to 1, information related to the program block being analyzed, calculated
movement positions and synchronization between process and interpolator are saved on the file.

45004607K 28
Prima Electro S.p.A. OPENcontrol – Programming manual

3. PROGRAMMING THE AXES

3.1 AXIS MOTION


3.1.1 Defining Axis Motion
In this manual axes motion directions are defined in compliance with EIA standard RS-267. By
convention, we always assume that the tool moves towards the part, no matter whether the tool moves
towards the part or the part moves towards the tool in the actual process.

The control has four levels of definition of dynamic parameters (acceleration, deceleration, jerk,
negative jerk, ramp time in acceleration and ramp time in deceleration) for the movements: default
parameters, on the profile (modal) parameters, local (related to the current block) parameters and axis
related parameters.

Default and axis related parameters are set in AMP, on profile and local parameters are set using the F
function.

Work feed can be programmed in different ways.

The G code in the following table activates the available ways:


G CODE FUNCTION
G93 Feed is defined as the inverse time needed to complete the movement
G94 Feed is defined in millimetres (G71) per minute or inches (G70) per minute
G95 Feed is defined in millimetres (G71) or inches (G70) per revolution of the spindle

Basic movements can be defined with the motion G codes listed in the following table:
G CODE FUNCTION
G00 Rapid axes positioning
G01 Linear interpolation
G10 Linear interpolation with rapid dynamic parameters
G02 Circular interpolation clockwise
G03 Circular interpolation anticlockwise
G12 Circular interpolation clockwise in the space
G13 Circular interpolation anticlockwise in the space
G14 Circular interpolation for three points in the space
G33 Constant or variable pitch threading

45004607K 29
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.2 ACCUR – Calculation accuracy


ACCUR code defines the internal calculation accuracy.

Syntax

ACCUR = value

where:
value indicates the calculation accuracy value using the unit of measurement active (mm or
inches. It can be programmed by a real number or by an E parameter.

Characteristics:
Accuracy value indicates the lowest numerical value after which all real numbers are =0. Usually, the
calculation accuracy has an internal use identifying edges, lengths and distances that can be considered
as null.

3.1.3 MOVNULL – Null movement threshold


The code MOVNULL defines the null movement threshold.

Syntax

MOVNULL = value

where:
value it is a values that indicates the null movement threshold value using the active unit of
measurement (mm or inch). It can be directly programmed using a real number or
indirectly using an E parameter.

Characteristics:
The null movement threshold value indicates the minimum length of a movement to be performed. All
the movements having a length lower of the null movement threshold are rejected.

3.1.4 ISOCOMP – Compatibilities mask


ISOCOMP defines a read only variable containing in one byte the compatibility information.
The variable bits have the following meaning:

Bit 0: if bit is set, G2 and G3 work in compatible ISO mode. If bit is not set, G2 and G3 work as
on the OSAI 10/Series controls.
Bit 1: if bit is set, H variables type are local, therefore each execution level has its’ own H
variables group. If bit is not set, all the paramacro levels have only one group of H variables. Bit
not set correspond to OSAI 10 series systems behave.

45004607K 30
Prima Electro S.p.A. OPENcontrol – Programming manual

Bit 2: if bit is set to 1, the reading access to the extended technolgical table is allowed only for
elements belonging to a line defined as “valid” (value 1 for the first element of the string). If bit
is set to 0, no control on the data validity is done.
Bit 3: if bit is set to 0, the calculation of the origins riqualification is considered as referred to
the origins (as per the OSAI 10Series CNC). If bit is set to 1, the calculation of the origins
riqualification is considered as referred to the axis.
Bit 4: if bit is set to 1 and the H variables are local type (bit 1 set to 1), during the level passage
to a subroutine/paramacro, the H variables not assigned are reset. On the contrary, H variables
not assigned get the value of the H variables belonging to the calling program, but the
corresponding HF control variable remains at 0.

The compatibility information is set in the active AMP via ODM and corresponds to different
parameters in the ‘Process Configuration’ in ODM.
ISOCOMP bit 0 corresponds to the parameter ‘ISO commands compatibility’.
ISOCOMP bits 1 and 4 are controlled by the parameter ‘Scope of H variables’.
ISOCOMP bit 2 corresponds to the parameter ‘Check access on $PTECH’.
ISOCOMP bit 3 corresponds to the parameter ‘Origins preset modality’

3.1.5 G93 G94 G95 – Feed programming modes


The G codes G93, G94 and G95 define three different modes for feed programming.

Syntax

G93[G-codes]
G94[G-codes]
G95[G-codes]

where:
G-codes Other G codes that are compatible with G93, G94 and G95 (See "Compatible G codes"
in Chapter 2).

Characteristics:
In G93, the F function defines the inverse of the time in minutes necessary to complete the movement:

speed
F= = 1/t (minutes)
total distance

The work feed is mandatory in the blocks when G93 is active and only affects that block.
In G94, F function defines the feed rate in millimetres per minute (G71) or inches per minute (G70).
In G95, F specifies the axes feed rate in millimetres per revolution (G71) or inches per revolution of the
spindle (G70).

45004607K 31
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.6 F – Dynamic parameter and work Feed setting


Depending on the syntax, the F code allows setting the value of work feed on the profile only or setting
of the values of the dynamic parameters. The dynamic parameters, that contain the work feed, can also
be defined as parameters valid for the whole profile or for the current block only.

Syntax

Fvalue

where:
F identify work feed on profile

value is a positive real number that can be programmed directly or indirectly with an E
parameter. It specifies the work feed value on profile. Measuring unit depends the
characterised measuring unit (G70/G71) and on the programmed feed type
(G93/G94/G95).

Syntax

{F|f}[%][[FvalF][,AvalA] [,DvalD] [,JvalJ] [,KvalK] [,TvalT] [,BvalB]]

where:
{F|f} Flag identifying when the dynamic parameters are applied. F specifies that the parameters
refer to the whole profile, while f specifies parameters referring to the current block only.

% optional parameter. If present then values for dynamic parameters are a percentage of
the corresponding default parameters defined in the process dynamic parameters of the
active AMP.

F id for parameter: work feed


A id for parameter: acceleration
D id for parameter: deceleration
J id for parameter: jerk
K id for parameter: negative jerk
T id for parameter: ramp time (acceleration)
B id for parameter: ramp time (deceleration)

valF
valA
valD
valJ
valK
valT
valB are positive real numbers that can be programmed directly or indirectly with E parameters.
They specify the value for the corresponding parameter. The unit of measurement depends
on the active unit of measurement and on the type of active G code (G93-G94-G95).

45004607K 32
Prima Electro S.p.A. OPENcontrol – Programming manual

Characteristics:
The syntax for assigning the dynamic parameters allows four types of values to be specified:
Absolute value on the profile (modal values).
F[[FvalF][,AvalA] [,DvalD] [,JvalJ] [,KvalK] [,TvalT] [,BvalB]]
The parameter will acquire the value specified in the command. The value will be valid until a
RESET command or until the next assignment.

Percentage on the profile (modal values).


F%[[FpercF][,ApercA] [,DpercD] [,JpercJ] [,KpercK] [,TpercT] [,BpercB]]
The parameters specified in the command correspond to a percentage of the default value as
defined in AMP. The value will be valid until a RESET command or until the next assignment.

Absolute value for current block.


f[[FvalF][,AvalA] [,DvalD] [,JvalJ] [,KvalK] [,TvalT] [,BvalB]]
The parameter will acquire the values specified in the command. This value will be applied only
to the block to which the command belongs.

Percentage for current block.


f%[[FpercF][,ApercA] [,DpercD] [,JpercJ] [,KpercK] [,TpercT] [,BpercB]]
The parameters specified in the command correspond to a percentage of the default value as
defined in AMP. This value will be applied only to the block to which the command belongs.

Both modal blocks (preceded by F []) and non-modal blocks (preceded by f[]) can be
programmed in the same block.

For each dynamic parameter (e.g. acceleration) up to four levels of definition can exist:
1. Local value for the block (identified by the syntax f[Avalue])
2. Value on the profile, or modal value (specified by the syntax F[Avalue])
3. Default value (specified in AMP, in process configuration)
4. Physical value for the axis (specified in AMP, in axis configuration)

The priority between levels corresponds to the order of the levels: local value for the block overrides all
other values. RESET command resets all values to default values as defined in AMP.

Example 1
This example shows how to program a work Feed on the profile (modal ) and an acceleration valid only
on the programmed movement (non-modal) in the same block:

G90 X100 F1000 f[A20000]

Example 2:
G71
G90 X100 F[A2000, T200] ; Modal feed is set to 2000 mm / min, the minimum ramp time in acceleration
;at 200 ms

45004607K 33
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 3:
G70
G91 X200 f%[F50] ; The feed applied to this block is equal to the 50% of the default feed defined
; AMP,expressed in inch / min.

3.1.7 G00 – Rapid axes positioning


G00 defines a linear movement at rapid feedrate that is simultaneous and coordinated for all the axes
programmed in the block.

Syntax

G00 [G-codes] [axes] [offset ] [F..] [a] [d] [auxiliary]

where:
G-codes Other G codes that are compatible with G00 (see "Compatible G codes" table in
Chapter 2).

axes Axis name followed by a numerical value. The numerical value can be programmed
directly with a decimal value or indirectly with an E parameter. Up to twelve axes can be
written in a block.

offset Offset factors on the profile. For three axes these factors are entered with u, v, and w
respectively. See "Paraxial compensation" in Chapter 4 for further information.

F Feedrate for coordinated moves. It is given with the F address followed by the feedrate
value. This parameter does not affect the move of the axes programmed in the G00 block,
but is retained for subsequent feedrate moves. The rapid feedrate forced by G00 is a
velocity along the vector of the axes programmed in the block. The maximum rapid
feedrate is defined during characterisation with ODM utility.

auxiliary Programmable M, S, and T auxiliary functions. Up to four M functions, one S (spindle


speed) and one T (tool selection) can be programmed in the block.

Example:
G90 G0 X100 f[A2000, T200] ; the rapid movement is execuded with acceleration of 2000 mm/min and
minimum acceleration ramp time of 200ms

45004607K 34
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.8 G01 – Linear interpolation


G01 defines a linear move at machining feedrate that is simultaneous and coordinated on all the axes
programmed in the block.

Syntax

G01 [G-codes] [axes] [offset ] [F..] [auxiliary]

where:
G-codes Other G codes compatible with G01 (See "Compatible G codes" table in Chapter 2).

axes Axis name followed by a numerical value. The numerical value can be programmed
directly with a decimal value or indirectly with an E parameter. Up to twelve axes can be
written in a block.

offset Offset factors on the profile. These factors are entered for three axes with the characters
u, v, w respectively. See "Paraxial compensation" in Chapter 5 for further information.

F Dynamic parameters used for the move. It is given with the F (or f in case of parameters
referring to the current block only) address followed by the feed rate value.

auxiliary Programmable M, S, T auxiliary functions. Up to four M functions, one S (spindle speed)


and one T (tool selection) can be programmed in the block.

Example:
This example shows how to program a G01 code.

Y Program:

N70 G0 X10 Y10


N80 G01 X90 Y40 F200
40

10

x
0
90
10
0

45004607K 35
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.9 G10 – Linear interpolation with rapid dynamic parameters


G10 defines, on all axes programmed within the block, a linear, concurrent and coordinated motion
using rapid dynamic parameters ( feed, acceleration, jerk…) for the calculation.

Syntax

G10 [G-codes] [axes] [offset ] [F|f..] [auxiliary]

where:
G-codes G codes compatible with G10 (see table “Compatible G codes” Chapter 2)

axes Character corresponding to an axis name followed by a numerical value. The numerical
value can be programmed using a decimal value or an E parameter. Up to 12 axes
can be defined.

offset Offset factors on profile. These factors are introduced for three axes namely with u, v, w
characters. Additional information can be found on the “Paraxial compensation” section
in Chapter 5.

F
f Dynamic parameters coordinate movements: defines in the F address complying with their
syntax. This parameter doesn’t affect the motion of the axes programmed with G10
active, defining instead the dynamic parameters for following motions at working feed
rate. Rapid dynamic parameters forced by G10 represent the vector composition of the
axes rapid dynamic parameters programmed in the bock. Maximum values for each axis
are defined in AMP during the ODM characterization.

auxiliary Programmable auxiliary functions M, S, T. Up to four M functions can be programmed in


the block, one S (spindle rotation speed) and one T (tool selection)

45004607K 36
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.10 G02 G03 – Circular interpolation


These codes define the following circular movements:

G02 Circular interpolation clockwise (CW)


G03 Circular interpolation counter-clockwise (CCW)

The circular move is performed at machining feed rate and is coordinated and simultaneous with all the
axes programmed in the block.

Syntax

G02 [G-codes] [axes] I.. J.. K.. [F|f..] [auxiliary]


or
G02 [G-codes] [axes] R.. [[F|f..] [auxiliary]

G03 [G-codes] [axes] I.. J.. K.. [F|f..] [auxiliary]


or
G03 [G-codes] [axes] R.. [F|f..] [auxiliary]

where:
G-codes Other G codes that are compatible with G02 and G03 (See "Compatible G codes" table in
Chapter 2).

axes Axis name followed by a numerical value programmed directly with a decimal value or
indirectly with an E parameter.
If no axes are programmed in the block, the move is a complete circle in the active
interpolation plane.

I Parameter meaning changes according to the ISO compatibility variable (ISOCOMP):


OSAI 10 Series compatibility: parameter corresponds to the abscissa of the circle
centre. Symbol used is always I no matter which interpolation plane is active.
Standard ISO compatibility: parameter corresponds to the coordinate of the circle
centre towards the first axis of the process. Value corresponds to the incremental
shift from the current point. It can be omitted if the first axis does not belong to
the interpolation plan.
This is a value in millimetres or inches that can be programmed directly or indirectly with
an E parameter. The abscissa is expressed as a diameter unit when the corresponding axis
is a diameter axis.

45004607K 37
Prima Electro S.p.A. OPENcontrol – Programming manual

J Parameter meaning changes according to the ISO compatibility variable (ISOCOMP):


OSAI 10 Series compatibility: parameter corresponds to the ordinate of the circle
centre. Symbol used is always J no matter which interpolation plane is active.
Standard ISO compatibility: parameter corresponds to the coordinate of the circle
centre towards the second axis of the process. Value corresponds to the
incremental shift from the current point. It can be omitted if the first axis does
not belong to the interpolation plan.
This is a value in millimetres or inches that can be programmed directly or indirectly with
an E parameter. The ordinate is expressed as a diameter unit when the corresponding axis
is a diameter axis.

K Parameter is used only if the ISO variable (ISOCOMP) is set as ISO standard compatible. It
corresponds to the coordinate of the circle centre towards the third axis of the process
and can be omitted if the third axis does not belong to the interpolation plane. This is a
value in millimetres or inches that can be programmed directly or indirectly with an E
parameter. The ordinate is expressed as a diameter unit when the corresponding axis is a
diameter axis.

R Circle radius alternative to the I and J coordinates. If the arc of a circle is less than or
equal to 180 degrees, the radius must be programmed with positive sign; if the arc of a
circle is greater than 180 degrees the radius must be programmed with negative sign.

NOTE: R is not allowed with arc of 360 degrees.

F
f Feed rate used for the move. It is given with the F address (or f in case of parameters
referring to the current block only) followed by the feed rate value.

auxiliary Programmable auxiliary functions M, S, T. Up to four M functions, one S (spindle speed


rotation) and one T (tool selection) can be programmed in the block.

Characteristics:
The maximum programmable arc is 360 degrees, i.e. a full circle. Before programming a circular
interpolation block, the interpolation plane must be defined with G16, G17, G18, G19. The interpolation
plane after reboot/reset can be configured in AMP using ODM. The coordinates of the start point
(determined from the previous block), the end point and the centre of the circle must be calculated so
that the difference between start and end radius is less than the default value (0.01 mm or 0.00039
inches). If this difference is equal or greater than the default value, the control displays an error
message and the circular move is not performed.
Incremental programming (G91) can be used in conjunction with circular interpolation. With G91 the end
point and the centre point of the circular move are referenced to the start point programmed in the
previous block.

Circular interpolation can also be programmed in incremental mode (G91), that is with the coordinates
of the final point and of the circle centre referred to the start point of the previous circular movement.

45004607K 38
Prima Electro S.p.A. OPENcontrol – Programming manual

If in the AMP configuration, the parameter “ISO commands compatibility” is set to “ISO standard”, the
parameters I, J and K are always considered as incremental values referred to the start point of the
circular motion.

The direction (CW or CCW) of a circular interpolation is defined by looking in the positive direction of
the axis that is perpendicular to the active interpolation plane.
The following examples show the directions for circular interpolation on the active planes.

G03
G02
XY
Y

G02
G02

G03
G03

Z
Y
ZX

Directions of a circular interpolation

Circular interpolation in absolute programming with the I and J coordinates of the centre of the circle.
N14 X10 Y20
N15 G2 X46 Y20 I28 J20 F200
N16 G3 X64 Y38 I46 J38

Y
G02
38

G03
20

X
46

64
28
0

Circular interpolation in absolute programming with the value R of the radius of the circle.
N14 X10 Y20
N15 G2 X46 Y20 R18 F200
N16 G3 X64 Y38 R18

Circular interpolation in incremental programming with the coordinates J and I.


N14 X10 Y20
N15 G2 G91 X36 I18 J0 F200
N16 G3 X18 Y18 I0 J18

45004607K 39
Prima Electro S.p.A. OPENcontrol – Programming manual

Circular interpolation in incremental programming with the value of the radius R.


N14 X10 Y20
N15 G2 G91 X36 R18 F200
N16 G3 X18 Y18 R18

3.1.11 G12 G13 – Circular interpolation clockwise and anticlockwise in space


Circular movements in space with a definite direction of rotation are defined by the following codes:

G12 Circular interpolation clockwise in space


G13 Circular interpolation anticlockwise in space

Circular movement is executed with a programmed working velocity and is co-ordinated and concurrent
on all axes programmed in the block.

Syntax:

G12 [G-codes] [axes] I.. J.. K.. [x.. y.. z..] [F|f..] [auxiliary]

G13 [G-codes] [axes] I.. J.. K.. [x.. y.. z..] [F|f..] [auxiliary]

where:
G-codes Other G-codes that are compatible with G12 and G13 (see “Compatible G codes” in
Chapter 2)

axes Axis name followed by a numerical value. The numerical value can be programmed
directly with a decimal value or indirectly with an E parameter. If there are no
programmed axes within the block, the following movement is a complete circle in the
active interpolation plan.

I Abscissa of the circle centre. This is a value in millimetres or inches that can be
programmed directly or indirectly with an E parameter. The abscissa is expressed as a
diameter unit when the corresponding axis is a diameter axis. No matter what
interpolation plane you are using, the symbol for the abscissa is always I.

J Ordinate of the circle centre. This is a value in millimetres or inches that can be
programmed directly or indirectly with an E parameter. When the correspondant axis is a
diamentral axis, the ordinate is expressed in diamentral mode too. No matter what
interpolation plane is active, the symbol for the ordinate is always J.

K Third axis coordinate of the circle centre. This is a value in millimetres or inches that can
be programmed directly or indirectly with an E parameter. The ordinate is expressed as a
diameter unit when the corresponding axis is a diameter axis. No matter what
interpolation plan you are using, the symbol for the third axis coordinate is always K.

45004607K 40
Prima Electro S.p.A. OPENcontrol – Programming manual

xyz Identify three components of a versor orthogonal to the plane to which the programmed
circle movement belongs. These parameters are required only if the movement is a
circumference or a semi-circle these parameters.

F
f Feed rate used for the move. It is given with the F address followed by the feed rate
value. If omitted, the system will use the programmed value. If no feed rate has been
programmed an error will occur.

auxiliary Programmable auxiliary functions M, S, T. Up to four M functions, one S (spindle rotation


speed) and one T (tool selection) can be programmed in the block.

Characteristics:
The maximum programmable arc is 360 degrees, i.e. a full circle. Before programming a circular
interpolation block, the interpolation plane must be defined with G16, G17, G18, G19. The interpolation
plane after reboot/reset can be configured in AMP using ODM.

The coordinates of the start point (determined from the previous block), the end point and the centre of
the circle must be calculated so that the difference between start and end radius is less than the default
value (0.01 mm or 0.00039 inches). If this difference is equal or greater than the default value, the
control displays an error message and the circular move is not performed.
The circular interpolation can also be programmed in incremental mode (G91), that is with the
coordinates of the final point and with the circle centre referred to those of the start point of the
previous circular movement.

If in the AMP configuration the parameter “ISO commands compatibility” is set “ISO standard”, the
parameters I, J and K are always considered as incremental values referred to the start point of the
circular motion.

The programmed arc of the plane matches the plane obtained as following:
rotating the Cartesian plane as to superimpose the abscissa axis on the segment connecting the
centre of the arc with the interpolation starting point
fixing the final point as part of that plane
As in the case of complete or half circles if the three points of the circumference arc (namely starting
point, final point and centre) are aligned, the components of a versor orthogonal to the interpolation
plane must be defined using x, y, z addresses.

The direction (CW or CCW) of a circular interpolation is defined by looking in the positive direction of
the axis that is perpendicular to the active interpolation plane.

45004607K 41
Prima Electro S.p.A. OPENcontrol – Programming manual

If the tangential control (corresponding to three-letter code AXT) is active, the circular
movement in the space will be considered as a rectilinear movement in the plane pre-set for
the control.
If there is any protected area active, circular movement in the space is approximated by two
rectilinear movements in the protected area plane. Movements will correspond to the
movement between the starting point and the point in the semi-break of the arc and the
movement between the point in the semi-break of the arc and the circle movement final
point. Cutter diameter compensation (G41-G42) is incompatible with circular moves in space.

Examples:

G17
G1X10Y5Z0 F[F2000, A3000,D3000] Z
G13X15Y10Z5I15J10K0

Programmed profile

G17
G1X10Y5Z0 F[F2000, A3000,D3000] Z
G12X20I15J10K0y1

Programmed profile

45004607K 42
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.12 G14 – Circular interpolation for three points in space


This code defines a circular movement in space identifying a third point in addition to the final one.
As these three points are not aligned, code G doesn’t perform a complete circle.

Syntax:

G14 [G-codes] [axes] I.. J.. K.. [F|f..] [auxiliaries]

where:
G-codes Other G-codes compatible with G14 (see “Compatible G codes” in paragraph 2.5)

axes Axis name followed by a numerical value. The numerical value can be programmed
directly with a decimal value or indirectly with an E parameter. If there are no
programmed axes within the block, the following movement is a complete circle in the
active interpolation plan.

I Abscissa of the third point of the circle. This is a value in millimetres or inches that can be
programmed directly or indirectly with an E parameter. The abscissa is expressed as a
diameter unit when the corresponding axis is a diameter axis. No matter what
interpolation plane you are using, the symbol for the abscissa is always I.

J Ordinate of the third point of the circle. This is a value in millimetres or inches that can
be programmed directly or indirectly with an E parameter. When the corresponding axis is
a diameter, ordinate has a diametrical value. No matter what interpolation plane you are
using, the symbol of the ordinate is always J.

K Third axis coordinate of the circle centre. This is a value in millimetres or inches that can
be programmed directly or indirectly with an E parameter. The ordinate is expressed as a
diameter unit when the corresponding axis is a diameter axis. No matter what
interpolation plan you are using, the symbol for the third axis coordinate is always K.

F
f Feed rate used for the move. It is given with the F address followed by the feed rate
value. If omitted, the system will use the programmed value. If no feed rate has been
programmed an error will occur.

auxiliary Programmable auxiliary functions M, S, T. Up to four M functions, one S (spindle speed)


and one T (tool selection) can be programmed in the block.

45004607K 43
Prima Electro S.p.A. OPENcontrol – Programming manual

Characteristics:
The Cartesian plane is defined using the G16, G17, G18, G19 codes. The starting Cartesian tern is
defined by AMP using ODM. The third point used to define the circumference, must be between the start
and the final point of the circle. Its position defines the direction of the circumference as well.
The coordinates of the start point (determined from the previous block), the end point and the third
point of the circle must be calculated so that the difference between start and end radius is less than
the default value (0.01 mm or 0.00039 inches). If this difference is equal or greater than the default
value, the control displays an error message and the circular move is not performed.

When the final point coordinates and the coordinates of the circumference centre refer to those of the
starting point in the previous block, circular interpolation can be programmed incrementally (G91). The
direction (CW or CCW) of a circular interpolation is defined by looking in the positive direction of the
axis that is normal to it (see example).

If the tangential control (corresponding to triliteral AXT) is active, the circular movement in
the space will be considered as a rectilinear movement in the plane pre-set for the control.
If there are any protected areas active, circular movement in the space is approximated by
two rectilinear movements in the protected area plane.
Movements will correspond to the movement between the starting point and the point in the
semi-break of the arc and the movement between the point in the semi-break of the arc and
the circle movement final point.
Cutter diameter compensation (G41-G42) is incompatible with circular moves in space.

Example:

G17 Z
G1X10Y5Z0F[F2000, A3000,D3000]
G14 X20Y15Z0 I15J12.5K5
Y

Programmed profile

45004607K 44
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.13 CET – Circular Endpoint Tolerance


In circular interpolations, CET defines the tolerance for the variance between the starting and final
radiuses of the circle arc.

Syntax:

CET=value

where:
value Tolerance expressed in millimetres (inches). The default value is 0.01 mm (0.000039 in).

Characteristics:
If the difference between starting and final radius is smaller than the tolerance but not zero, the system
normalises the circle data according to the values specified in CET and ARM.
If the difference is equal to or greater than the value assigned to CET, an error occurs and the
programmed final points will not be executed. In this case, you must either modify the program or
increase the CET tolerance.

The value assigned to CET can be modified as follows:


In the AMP configuration using ODM tool
By means of a specific data entry
By writing a new CET in the part program.

CET tolerance is defined in configured inch or metric units.

If the variance between programmed start and final radius is higher than the CET value, the circle arc
can be executed as follows:
By making the CET value greater than current variance
By programming the arc with the circle radius rather than with the centre using the format:
G2/G3, final point and R radius

A RESET instruction re-establishes the default tolerance.

Example:
G71
CET=0.02 defines a 0.02 mm tolerance

45004607K 45
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.14 FCT – Full Circle Threshold


In a circular interpolation, the FCT instruction defines a threshold for the distance between the first and
the last point in an arc. Within this distance the arc is considered a full circle.

Syntax:

FCT=value

where:
value Threshold expressed in millimetres (inches).
The default value is 0.001 mm (0.000039 in).

Characteristics:
The FCT command allows dealing with inaccurate program data that would otherwise prevent the system
from forcing a complete circle. In other words, if the distance from the first to the last point is less than
FCT, the system uses the points as if they were overlapping and forces a full circle.
FCT thresholds can be modified as follows:
In the AMP configuration using ODM tool
By user interface
By writing a new CET value in the part program.

The FCT threshold is always expressed in the characterised measuring unit (G70/G71 apply).

A RESET instruction re-establishes the default threshold.

Example:
G71
FCT=0.005
In this example, FCT defines a threshold 0.005 millimetres.

45004607K 46
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.15 ARM – Defining Arc Normalisation Mode


The ARM code defines the method the system uses to normalise an arc (programmed with the centre
coordinates I and J and a final point) in order to render it geometrically congruent. An arc is normalised
when the difference between initial and final radius is less than the characterised accuracy tolerance or
than the tolerance programmed with the CET command.

Before executing an arc, the system calculates the difference between initial and final radiuses.
If the difference is zero, the control will execute the programmed arc without normalising it.
Except for ARM=4 and ARM=5, if the difference is greater than the CET value, the control will
stop without executing the move, and display a profile error message.
Except for ARM=4 and ARM=5, if the difference is less than the CET value, the control will
execute the move normalising the arc with the method specified by ARM.
If the distance between the starting point and the final point is less than the FCT threshold, the
system will force the complete circle.

Syntax:

ARM=arc mode

where:
arc mode Is the numerical value that defines the arc normalisation mode.
Accepted values are:
0 Uses the medium radius and displaces the centre; it checks the CET on radiuses
difference and on centre displacement.
1 Uses the final radius and displaces the starting point; it checks the CET on radiuses
difference.
2 Uses the medium radius and displaces the centre; it checks the CET on radiuses
difference.
3 Uses the medium radius and displaces the starting and end points; it checks the
CET on radiuses difference.
4 Uses the optimal radius, which minimizes centre displacement; it checks the CET
on centre displacement.
5 Uses the optimal radius, which minimizes centre displacement; it does not take
the CET into account.
Default value is 2.

Characteristics:
The arc normalisation mode can be modified as follows:
In the AMP configuration using ODM tool
By user interface
By writing a new CET in the part program.

Examples below illustrate normalisation modes.

45004607K 47
Prima Electro S.p.A. OPENcontrol – Programming manual

ARM=0
This is an arc through the initial and final programmed points whose centre is displaced within the
tolerance defined by CET. The arc is executed with averaged radius.

starting point

CET

averaged radius

C = programmed center
CS final point
C CET CS= displaced center

ARM=1
This is an arc through the programmed final point and the starting point displaced within the CET
tolerance. The arc is executed with final radius.

starting point

CET

final point
C C= programmed center

ARM=2
This is an arc whose centre is displaced irrespective of the tolerance defined with CET. In this case the
arc is executed with averaged radius, while starting and final points are respected.

CET starting point

arc with averaged radius

CET

final point
C C= programmed center
CS = displaced center
CS

45004607K 48
Prima Electro S.p.A. OPENcontrol – Programming manual

ARM=3
If the displacement of the centre arc is within the tolerance defined with CET, the arc centre will be
displaced and the arc will pass through the programmed starting and final points. If the displacement of
the centre is not within the CET tolerance, the arc will use the programmed centre and pass through the
displaced starting and final points (both points are displaced within the CET/2 tolerance).
In this case the arc is executed with averaged radius.

A B

C = programmed center
CS = displaced center

starting point

CET CET starting point

averaged radius
arc with averaged
radius plus initial
and final steps

CET

CS final point final point


C CET C

CS

When ARM = 1 or ARM = 3 the resultant profile can show inaccuracies ("steps"), as shown in the
examples.
When ARM = 1 there will be a step at circle start equal to the difference between starting and
final radiuses.
When ARM = 3 there will be a step both at circle arc start and end.
To prevent these steps from causing a servo error, program a CET value smaller than the
characterised servo error threshold.

45004607K 49
Prima Electro S.p.A. OPENcontrol – Programming manual

ARM=4 e ARM=5
Indipendently from radiuses error, the optimal centre is calculated allowing the union of starting and end
points with a circle, minimizing the distance between the calculated and the requested centre.
In case of ARM=4, the arc is executed only if the distance between displaced and requested centre is
lower than CET value.
In case of ARM=5, the arci s executed indipendently from the centre displacement.

CET starting point

median line

Arc with optimal radius


CET

end point C= programmed centre


C
finale
CS CS =optimal displaced centre

Line orthogonal to the median passing from C

45004607K 50
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.16 SHAPERR – Circular interpolation speed reduction threshold / KVGAIN – Circular


interpolation speed reduction constant
The variables SHAPERR (Circle Reduction Threshold (CRT) in OSAI 10 Series) and KVGAIN (Circle
Reduction K-Constant (CRK) in OSAI 10 Series) are used to reduce the speed on circular elements by
applying an algorithm which is a function of the radius and the admissible servo error.

Syntax:

SHAPERR = value

where:
value It is the maximum departure in mm (inches) desired between the programmed and the
actual path. A value of 0 (zero), which is the default value, cancels this operation.

KVGAIN = value

where:
value Is the axis position interlocking gain (Kv). The value to be specified must be the same as
that configured in AMP in the corresponding axis field.

If both SHAPERR and KVGAIN are nil, then no reduction speed is applied to the circular elements.

Characteristics:
If SHAPERR is not zero, the speed is reduced on all circular elements as a function of the radius of
curvature of the path in order to make sure the error does not exceed the specified limit. If KVGAIN is
zero, the system uses the value configured in AMP.
Hence, maximum admissible speed will be a function of the radius, the error specified by SHAPERR and
the interlocking gain KVGAIN, according to the following formula:

Vmax  KVGAIN * 2 * R * SHAPERR * f (VFF , FLT _ 2)

Where f (VFF , FLT _ 2) is a function that depends on the Velocity Feed Forward (VFF) set and the type
2 filter, if any, activated (centripetal acceleration compensation filter). For further details, see the Chapter
on filters in this manual.

NOTE: Since speed on circles is limited as a function of the percentage of VFF, it is necessary, when
working with VFF, to have enabled the process variable VFF and configured the same percentage value
both on the drives and on the axes.

45004607K 51
Prima Electro S.p.A. OPENcontrol – Programming manual

Values assigned to variables SHAPERR and KVGAIN may be modified as follows:


by means of ODM during AMP configuration
from the part program with the specified syntax.

The values assigned to SHAPERR are always expressed in the current unit of measurement of the process
(programmed with G70/G71).

RESET command restores the characterization value.

3.1.17 Helical interpolation


G02 and G03 program an helical path in only one block. The system performs the helical path by moving
the plane axes in a circular interpolation while the axis that is perpendicular to the interpolation plane
moves linearly.
To program an helical path, simply add a depth coordinate and the helix pitch (K) to the parameters
specified in the circular interpolation block.

Syntax:

G02 [G-codes] [axes] I.. J.. K.. [F..] [auxiliary]


or
G02 [G-codes] [axes] R.. K.. [F..] [auxiliary]

G03 [G-codes] [axes ] I.. J.. K.. [F..] [auxiliary]


or
G03 [G-codes] [axes ] R.. K.. [F..] [auxiliary]

where:
G-codes Other G codes compatible with G02 and G03 (See "Compatible G codes").

axes An axis letter followed by a numerical value programmed (either decimal value or E
parameter). If no axes are programmed in the block, the move will generate a full circle
on the active interpolation plane.
I Abscissa of the circle centre. This is a value in millimetres or inches (decimal number or E
parameter). The abscissa is expressed as a diameter unit when the corresponding axis is a
diameter axis. No matter what the interpolation plane, the symbol for the abscissa is
always I.
J Ordinate of the circle centre. This is a value in millimetres or inches (decimal number or E
parameter). The ordinate is expressed as a diameter unit when the corresponding axis is a
diameter axis. No matter what the interpolation plane, the symbol for the ordinate is
always J.
R Circle radius. It is specified with the R address followed by a length value, and is
alternative to the I and J coordinates.

45004607K 52
Prima Electro S.p.A. OPENcontrol – Programming manual

K Helix pitch. This parameter is specified with the K address followed by the pitch value. It
can be omitted if the helix depth is less than one pitch.
F Feed rate. It is specified by the F address followed by a value. If it is omitted, the system
will use the previously programmed feed rate. If no feed rate has been programmed, the
system will signal an error.

auxiliary Programmable M, S, and T functions. Up to four M functions, one S (spindle speed) and one
T (tool selection) can be programmed in the block.

Characteristics:
If helix length is a multiple of K, it is not necessary to program the final point.
If the depth is not an integer number of pitches, i.e. if the movement on the third axis is not equal to n *
K), the length of the circle arc must be calculated with the decimal remainder of the pitch number. For
example, if Z = 2.7 * K, then the arc that must be programmed is 360 * (2.7 - 2) = 252 degrees.

Example:
G2 X . . Y. . Z . . I . . J . . K . . F. .
In this example, addresses X, Y, I, and J refer to circle programming; addresses Z and K refer to helix
programming and are respectively the depth and the helix pitch. The figure below shows the typical
dimensions of an helical interpolation.

Helix Dimensions

45004607K 53
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.18 G33 – Constant or variable pitch threading


G33 defines a cylindrical, taper, or face threading movement with constant or variable pitch. The
threading move is synchronised to spindle rotation. The parameters programmed in the block identify
the type of thread.

Syntax:

G33 [axes] K.. [I..] [R..]

where:
axes An axis letter followed by a numerical value. It can be programmed directly or indirectly
using an E parameter.

K Thread pitch (mandatory). For variable pitch threads, K is the initial pitch. It is
programmed using K address followed by increment value.

I Pitch variation for variable pitch threading. For increasing pitch threading, I must be
positive; for decreasing pitch threading I must be negative. It is programmed using I
address followed by increment value.

R Deviation from the zero spindle angular position in degrees. R is used in multi-start
threading to avoid displacing the starting point. It is programmed using R address followed
by increment value.

Characteristics:
All these numerical values can be programmed directly with decimal numbers or indirectly with E
parameters. In decreasing pitch threads, the initial pitch, the pitch variation, and the thread length
must be calculated so that the pitch is greater than zero before reaching the final coordinate. Use the
following formula:

I< K2
2 (Zf - Zi)

where:
I Is the maximum pitch variation
K Is the initial pitch
(Zf - Zi) Is the thread length.

During the threading cycle the control ignores the CYCLE STOP button and the FEEDRATE
OVERRIDE selector/softkey, but the SPINDLE SPEED OVERRIDE selector must be disabled by the
PLC. VFF may be disabled using user interface or with a VFF command.

45004607K 54
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.18.1 Constant Pitch Threading

The figures that follow illustrate examples of constant pitch threading. Note that the U axis is a
diameter axis.

3.1.18.2 Cylindrical threading

Part program block: G33 Z-100 K2


Z
U

K2

Z-100

3.1.18.3 Tapered threading

Z
U Part program block: G33 U40 Z-80 K3
K3

Z-80
U40

3.1.18.4 Cylindrical-conical threading

Part program blocks: G33 Z-95 K2 .5


Z-100 U52 K2.5
U52

3.1.18.5 Variable Pitch Threading

The figures that follow illustrate variable pitch threading. Note that the U axis is a diameter axis.

45004607K 55
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.18.6 Cylindrical threading with increasing pitch

Part program block: G33 Z-50 K4 I1


Z
U
4
5
6
7

3.1.18.7 Conical threading with increasing pitch

U
Part program block: G33 U50 Z-40 K4 I1
4
5

3.1.18.8 Cylindrical thread with decreasing pitch

Z
U
Part program block: G33 Z-50 K10 I-1
10

7
6
5
4

45004607K 56
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.18.9 Multi-start threading

An R word in a G33 block makes the control start moving the axes from an angular position that varies
according to the programmed R value.
This allows the same start point for all threads to be programmed, rather than moving the start point of
each thread by a distance equal to the pitch divided by the number of starts.

Example:
Three-start threading
N37 G33 Z3 K6 1st thread
.
.
.
N41 G33 Z3 K6 R120 2nd thread
.
.
.
N45 G33 Z3 K6 R240 3rd thread

45004607K 57
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.19 Rotary axes


In the system characterisation, axes can be configured as rotary axes, i.e. a rotary table.
To program rotary axis moves simultaneously and coordinated with the axes programmed in the same
block:
Always use decimal degrees (from +0.00001 to +99999.99999 degrees) starting from a pre-
selected origin.
Select either the rapid rate (G00) or the feed rate (G10). In a rotary move rates are always
expressed in degrees per minute (dpm, F5.5 format). For example, with F75.5 the axis moves at
75.5 dpm.

To perform milling operations on a circle with a rotary table, calculate the rotary rate with the following
formula:

F = 360 * A = 114,64 * A
pi D D
where:
F Is the rotary rate in dpm
A Is the linear rate on the arc in millimetres or inches per minute
D Is the diameter on which the milling operation is performed (in mm or inches).

To move rotary and linear axes simultaneously in the same block, you may calculate the feed rate with
one of the following formulas.
With G94:

where:
F Is the feed rate
A Is the feed rate on the part (in mm/min or inches/min)
XYZBC Is the actual travel performed by each axis (in mm or inches for linear axes, in degrees for
rotary axes)
L Is the resultant path length (in mm or inches).

With G93:

where:
F Is the feed rate
A Is the desired feed rate (in mm/min or inches/min) on the part
X Is the X axis incremental distance
Y Is the Y axis incremental distance
B Is the B axis incremental distance

The control cannot calculate the desired tool feed rate directly because the radius is not programmed.
In these cases, the feed rate can be specified as inverse time with G93.
A block moving only the rotary axes generates an arc. If rotary and linear moves are combined, the
resulting path may be an Archimedean spiral, a cylindrical helix or more complex curves, depending on
the programmed number of linear axes.

45004607K 58
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.20 Axes with Rollover


Axes with rollover are rotary or linear axes whose position is controlled between zero and a positive
value configured in the rollover pitch parameter.
In the following description the axis with rollover is rotary and has a 360 degree rollover pitch. We
assume that the axis position is controlled in the 0 to 359.9999 degree range. That is, when the axis
reaches 360 degrees, the displayed position rolls over to zero degrees.

An axis with rollover can be programmed in a block or in a MDI in two different modes:
absolute mode (G90) programs the move in degrees.
incremental mode (G91) programs the move as increments in degrees from current axis position.

3.1.20.1 G90 - Absolute mode

If a rollover axis is programmed in absolute mode, the following conditions will be applied:
Displayed position is from 0 to +359.99999 degrees
Programmed range is from 0 to ± 359.99999 degrees
Direction of axis rotation depends on the sign of the programmed move. By convention, a
positive move is clockwise and a negative move is counter clockwise. If an absolute movement is
not preceded by a minus sign and the ROLLOPT variable is set to 1, then the movement of the
rollover axis will be optimized.

For example, if rotary axis B is positioned at 90 degrees and the following block is written in the part
program or in MDI:

G90 B45
ROLLOPT = 0

359.999
180
0

45

90

Clockwise Rotation

The B axis rotates 315 degrees clockwise from the 90 degree position to reach the absolute position of 45
degrees (the sign of the move is positive).

45004607K 59
Prima Electro S.p.A. OPENcontrol – Programming manual

ROLLOPT=1

180.0 359.99
0.0

45

90

Counter clockwise Rotation

B axis has a 45° clockwise rotation, from the 90° degree position to reach the absolute position of 45°.
using the shortest path

If the rotary B axis is placed at 90° and the following block is entered from keyboard or part program,:

G90 B-0

90

Counter clockwise Rotation

The B axis rotates by 90 degrees counter clockwise to absolute position 0 degrees because the sign of the
move is negative. In this case, as a counter clockwise movement has been requested, the value of the
ROLLOPT variable is not taken into account.

45004607K 60
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.20.2 G91 - Incremental mode

When an axis with rollover is programmed in incremental (G91) mode, the following conditions apply:
Displayed position is from 0 to +359.99999 degrees.
Program range is from +/-0.00001 to +/-99999.99999 degrees.
Direction of axis rotation depends upon the sign of the programmed move. By convention, a
positive move is clockwise and a negative move is counter clockwise.
The value of the variable ROLLOPT is not taken into account.

The displayed position is beyond the programmed range when the programmed range is greater
than +359.999 degrees.

For example, if the absolute zero position of the B rotary axis is 0 degrees and the following block is
written in the part program or in MDI:

G91 B765

45

90

Incremental clockwise revolution

The B axis makes two complete clockwise revolutions plus 45 degrees (360 + 360 + 45 = 765).

45004607K 61
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.21 ROLLOPT – Optimized movement for rollover axes


The variable ROLLOPT enables shortest path motion for axes with rollover. When this mode is enabled,
in certain conditions, the control can force the axis movement direction.

Syntax:

ROLLOPT = value

where:
value indicates whether the optimization function is enabled (value=1) or not (value=0). It can
be specified directly and/or via a local or system variable. The default value is 0
(optimization disabled).

Characteristics:
The shortest path movement for rollover axes is enabled if:
the variable ROLLOPT= 1
the rollover axis is moved in absolute mode (G90 code is enabled)
the programmed movement does not have unsigned or has a positive sign

If the above conditions are satisfied, the control optimizes the movement of the axis using the shortest
path to the programmed point.

3.1.22 Pseudo axes


The pseudo axes are auxiliary functions that are addressed in the same way as axes and are managed by
the PLC. Example: jet adjustment for water cutting, secondary spindle management. The name of a
pseudo axis can be any of the letters available for normal axes (X,Y,Z,A,B,C,U,V,W,P,Q,D). Up to three
pseudo axes can be programmed in a part-program block. In the characterization (AMP) up to 6 pseudo-
axes can be declared.

3.1.23 Movement attributes


It is possible to associate every movement generated by the control up to 8 attributes, that are real type
values.

Syntax:

a[ param1 [, param2, [, param3, [, param4, [, param5, [, param6, [, param7, [, param8]]]]]]] ]

where:
paramn: value of the n- position parameter. It can be directly specified with a real number or via a
variable.

Characteristics:
The attributes can be associated to any type of linear or circular movement. For movements in Splines,
the attributes are ignored. The values of the attributes are synchronized with the movements and are
valid since de beginning of the following movements.

45004607K 62
Prima Electro S.p.A. OPENcontrol – Programming manual

In case the programmed movemet is not performed, for example, if the machine is already in the
programmed point or if the generated entity is shorter than the null movement threshold, the attributes
are ignored.

The attribute values can be accessed by the PLC using the process status reading function and are stored
in PLC type variables. For more info, refer to the “OPENcontrol Application Manual”.

Examples
Command Attributes value Note
G0G91 X10 a[1,2,3,4,5,6,7,8] 1, 2, 3, 4, 5, 6, 7, 8
X20 a[10,12] 10, 12, 0, 0, 0, 0 ,0, 0 Only the first attributes are updated
(DIS, ‘Test’) 10, 12, 0, 0, 0, 0, 0, 0 As the block does not contain
movements, the attributes are not
updated.
X-4 0, 0, 0, 0, 0, 0, 0, 0 No attributes have been specified,
the same as assign all to 0.
X3 a[42, 21, 24, 3, 4, 5, 6 ,17, 18] 42, 21, 24, 3, 4, 5, 6 ,17, 18
X0 a[-12, 25.6] 42, 21, 24, 3, 4, 5, 6 ,17, 18 As G91 modality is active
(incremental movements) no
movement is generated and the
attributes are not updated.

3.1.24 Diametral axes


A reaming/facing head can be mounted on the spindle and controlled simultaneously with other axes. By
programming such an axis (typically a U axis) as a diameter, the following can be obtained:
Boring operations on cylindrical or conical holes
Circular radiuses (concave or convex)
Bevel
Grooves
Facing operations
Threads

Programming a U (diameter) axis is similar to programming other linear axes; however, its coordinates
must be expressed in diameters. The measuring units can be inches or millimetres according to the
current mode ( G70/G71). When the U axis is programmed in the same block as an X, Y or Z move, it is
simultaneous with and coordinated to the other axes. U axis moves can be performed at rapid rate (G00)
or feed rate (G01) with F in ipm or mmpm. Before executing a profile with the U axis, the interpolation
plane must be defined with the following command:

G16 Z U

The order of Z and U in this command is critical, i.e. G16 UZ and G16 ZU define two different
interpolation planes.
Cutter diameter compensation (G41 or G42) and a machining allowance (MSA) can be applied to
profiles programmed with U.

45004607K 63
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
This is an example reaming/facing head used in a finishing operation.

N116 (DIS, "FINISHING WITH R/F HEAD")


N117 F60 S630 T9 .9 M6
N118 G16 Z U ;Defines interpolation plane
N119 (UAO, 2) ;Calls absolute origin for the head
N120 (UTO, 1, Z-200) ;Temporary origin for Z (skimming the part)
N121 X Y160 M3 ;Position to hole 1
N122 G41 Z2 U51
N123 G1 Z-1 U44 .98 ;Executes the bevel
N124 Z-44 ;Executes hole diameter 45
N125 G G40 U40
N126 Z2 F40 S380
N127 G41 Y U106 ;Positions to hole 2
N128 G1 Z-1 U99 .975 ;Executes the bevel
N129 Z-15 ;Executes hole diameter 100
N130 r5 ;Executes radius R = 5
N131 U60 ;Executes counter boring
N132 r-3 ;Executes radius R = 3
N133 Z-40 U40 ;Executes taper
N134 G40 Z-44 ;Continues Z axis travel
N135 G U35
N136 Z100 M5
N137 G16 X Y
N138 (UAO,1)

45004607K 64
Prima Electro S.p.A. OPENcontrol – Programming manual

The direction of the arcs programmed with G02/G03 or with the r address and the direction for cutter
diameter compensation (G41/G42) can be determined by looking at the profile on the Z-U plane. Since
negative diameters are usually not programmed, you must consider only the first two quadrants of the
plane.

45004607K 65
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.25 UDA – Dual axes


Note: this command is not available in OPEN-10, it requires the option A35 in OPEN-20
and OPEN-30

It is possible to treat one or more axes as slaves or subordinate to another defined as the master. In this
way only the movements of the Master need be programmed as the movement of the slaves is
determined by those of the Master with which they are associated and by whether or not reverse mirror
movement has been applied.

Syntax:

(UDA,master1/slave1[slave2..slaven][,master2/[slave2..slaven],…,master6/[slave2..slaven]])
(UDA)

where:
master1. . . master6 Are the master axis names (one ASCII character per axis). Up to 6 master axes are
allowed.

slave1. . . slave17 Are the slave axis and they can be:
one ASCII character if axis is programmed by name
a ′/′ character if axis is programmed by ID
Slave axes programmed by ID can be axes that do not belong to the current
process. They can be axes belonging to the PLC or axes belonging to other
processes and shared with PLC. Up to 17 slaves are allowed, 6 of them can be
external to the process.

If slave axis is preceded by a ′-′, then the axis will move opposite to its master.
no parameters (UDA) without parameters disables the dual axes mode (UDA)

Characteristics:
Dual axes management does not require any special setting in the system using ODM.
After an (UDA...) command, the positive operating limit is the minimum between the positive limit of
the master axis and the current position of the master plus the distance that may be covered by the
slave axis. In short:
PositiveLim = min(Master PositiveLim, MasterPosition + Slave PositiveLim - SlavePosition)

In the case of a "mirror", the distance that may be covered by the slave refers to its negative limit, so it
will be:
PositiveLim = min(Master PositiveLim, MasterPosition - Slave NegativeLim + SlavePosition)

The considerations made for the positive limit also apply to the negative limit:
NegativeLim = max(Master NegativeLim, MasterPosition + Slave NegativeLim - SlavePosition)

In the case of a mirror, it will be:


NegativeLim = max(Master NegativeLim, MasterPosition - Slave PositiveLim + SlavePosition)

45004607K 66
Prima Electro S.p.A. OPENcontrol – Programming manual

When the (UDA...) command is executed, made both to the master axis and the slave axes have to be
referenced (homing cycle already performed).
Programming a UDA command will disable any previously programmed UDA or SDA command.
The RESET command does not cancel the association between the master and slave axes.

NOTE:
The names of masters and slaves must be separated by a / (slash).

To mirror the slave axis movement, you must program the - operator before the axis name.
This rule does not apply to master axes.

Example:
(UDA,X/-U) U is slaved and mirrored to X
(UDA,Z//12) Axis with ID 12 is slaved to a Z.
(UDA, A/B - CD) B, C and D are slaved to A and C is mirrored to A
(UDA,X/AB/-14) A and B are slaved to X, moreover axis with id 14 is slaved and specular to X.

45004607K 67
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.26 SDA – Special Dual Axes


Note: this command is not available in OPEN-10, it requires the option A35 in OPEN-20
and OPEN-30

It is possible to treat one or more axes as slaves or subordinate to another defined as the master. In this
way only the movements of the Master need be programmed as the movement of the slaves is
determined by those of the Master to which they are associated and by whether or not reverse mirror
movement has been applied. The movement of the master and slave axes can occur even if the axes are
not referenced.

Syntax:

(SDA, master1/slave1[slave1..slaven][,master2/[slave1..slaven],…,master6/[slave1..slaven]])
(SDA)

where:
master1. . . master6 Are the master axis names (one ASCII character per axis). Up to 6 master axes are
allowed.

slave1. . . slave17 Are the slave axis and they can be:
one ASCII character if axis is programmed by name
a ′/′ character if axis is programmed by ID
Slave axes programmed by ID can be axes that do not belong to the current
process. They can be axes belonging to the PLC or axes belonging to other
processes and shared with the PLC.
Up to 17 slaves are allowed, 6 of them can be external to the process.
If slave axis is preceded by a ′-′, then the axis will move opposite to its master.

no parameters (SDA) without parameters disables the special dual axes mode (SDA)

Characteristics:
Dual axes do not require any special setting during the system characterization with ODM.
After an (SDA...) command, the positive operating limit is the minimum between the positive limit of the
master axis and the current position of the master plus the distance that may be covered by the slave
axis. In short:
PositiveLim = min(Master PositiveLim, MasterPosition + Slave PositiveLim - SlavePosition)

In the case of a "mirror", the distance that may be covered by the slave refers to its negative limit, so it
will be:
PositiveLim = min(Master PositiveLim, MasterPosition - Slave NegativeLim + SlavePosition)

The considerations made for the positive limit also apply to the negative limit:
NegativeLim = max(Master NegativeLim, MasterPosition + Slave NegativeLim - SlavePosition)

In the case of a mirror, it will be:


NegativeLim = max(Master NegativeLim, MasterPosition - Slave PositiveLim + SlavePosition)

Upon activating the (SDA,...) command the master and the slaves do not need to be referenced.
Programming an SDA command will disable any previously programmed UDA or SDA command

45004607K 68
Prima Electro S.p.A. OPENcontrol – Programming manual

The RESET command does not remove the master/slave association.

This gives the possibility to search the zero limit switch with the dualization active.
In this case, performing the homing cycle of the master axis, the system will move all the associated
slave axes. At the end of the homing procedure the master axis is referred while the slave axes are not.
To refer the slave axes is needed to swap them one at the time with the master axis through new SDA
commands and repeat the homing cycle for each of them re-declared as master axis.
However, the homing of the slave axes is not necessary if only the master axis is programmed with SDA
active.

The use of the SDA function is recommended in cases where a zero point micro-search cycle is required
after a shutdown of the system with the work still on the work-table.

NOTE:
The names of masters and slaves must be separated by a / (slash).

To mirror the slave axis movement, you must program the - operator before the axis name. This
rule does not apply to master axes.

Example:
(SDA,X/-U) U is slaved and mirrored to X
(SDA, A/B - CD) B, C and D are slaved to A and C is mirrored to A
(SDA,X/AB/-14) A,B are slaved to X, moreover axis with id 14 is slaved and mirrored to X

45004607K 69
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.27 XDA – Master/Slave axes


Note: this command requires the option A36 in OPEN-10, OPEN-20 and OPEN-30

One or more axes can be used as “slave” axes, i.e. subordinate to another axis, defined as “master”. In
this way, you only need to program the movements of the master, since the movements of the slaves are
determined by the master they are associated with and by a following factor, which is defined
specifically for each individual slave. Commands of different types can be imparted with this feature,
each of them having a specific syntax.

Master/Slave Association
This instruction defines the association between a master axis and its slaves (up to 17 axes). This
instruction does NOT activate the “following” function, whose activation is done by means of a specific
command. This means that after this instruction a movement of the master does not bring about a
movement of the slave(s). After this instruction and until the slave is released from the master, slave
movements cannot be programmed.

Syntax:

(XDA, 1, master/slave1[slave2[..]], mode, ratio, space)

where:
master Is the name of the master axis and is denoted by a single ASCII character.

slave1…slave17 Are the slave axis and they can be:


one ASCII character if axis is programmed by name
a ′/′ character if axis is programmed by ID
Slave axis programmed by ID can be axis that do not belong to current process.
They can belong to PLC or axis belonging to other processes and shared with PLC.

Up to 17 slaves are allowed, 6 of them can be external to the process.


If slave axis is preceded by a ′-′, then the axis will move opposite to its master.

mode Defines the master axis following mode used by the slave(s). It can be:
0 The slave follows the master point by point
1 The slave follows the master in terms of speed
2 The slave follows the master in terms of position
3 The slave follows the master in terms of position, and the
synchronisation distance is taken up

ratio This is the specified master / slave(s) following ratio . It must be viewed as a
multiplication factor for the feed rate of the master or the distance covered by it.
If the value of this ratio is 1.0, the motion of the master is reproduced exactly by
the slave; if it is smaller than 1.0, feed rate/distance are reduced, if it is greater
than 1.0 they are increased. This value can be preceded by a sign.

distance This is the distance to be covered by the slave to synchronise with the motion of
the master.

45004607K 70
Prima Electro S.p.A. OPENcontrol – Programming manual

Characteristics:
A slave axis can be a shared axis, i.e. an axis shared with the PLC environment. In this case, the axis may
continue to be moved by PLC even after the association with the master, however it cannot be moved
while it is following the master.
Master axis identifies an axis in the process where XDA is activated and a non-existing axis as well. In the
latter case the process creates a “virtual axis” having the name specified.
The axis has poor dynamic characteristics as, for example, its maximum feed will be equal to the lowest
feed of the slave axes. This axis could be part of TCP/virtualizations and can’t be homed.
RESET command does not remove master / slave association
The various following modes available are:

Mode 0
In this mode, the slave axis follows the master proportionately to the value of the ratio (if the ratio = 1,
the slave reproduces the movement of the master axis), synchronisation is instantaneous and the
variation in the feed rate of the slave is “in steps”. Slave position and feed rate values are calculated,
instant by instant, according to the following formulas:

Vslave = Vmaster * FollowRate


PosSlave = PosSlavet0 + (PosMaster – PosMaster t0) * FollowRate

V V master

V slave

Activation =
Synchronisation

t0 t
If the speed specified for the slave axis as a result of the following command exceeds the maximum
admissible value for this axis, the system will reduce the feed rate requested accordingly and will give
out an emergency (servo error) message, since the slave is unable to follow the required position.

Mode 1
In this mode, the slave follows the feed rate of the master proportionately to the value of the ratio (if
the ratio = 1, the slave copies the movement of the master axis exactly); the synchronisation depends on
the dynamic characteristics of the slave axis and/or the distance parameter which defines the
synchronisation distance. If the distance value = 0, the slave will synchronise with the master based on
its maximum acceleration and using linear ramps only.

V V master

Synchronisation
V slave

Activation

t0 t1 t

45004607K 71
Prima Electro S.p.A. OPENcontrol – Programming manual

If the value is not 0, the slave will synchronise with the master based on an acceleration calculated as a
function of the synchronisation distance and using linear ramps only. The acceleration will be
calculated again with each sampling process based on the following formula:

Aslave = ((Vmaster * FollowRate)2 + Vslave 2 ) / 2 * Distance

where the value of the distance is gradually reduced based on the distance covered during the
synchronisation stage. No check is made on the ensuing acceleration value, and therefore servo errors
may arise if the acceleration exceeds the maximum value that can be withstood by the axis.

V master
Synchronisation

V slave

Activation Distance

t0 t1 t

Once the synchronisation with the master has taken place, the slave will move according to this formula:

Vslave = Vmaster * FollowRate

The feed rate (Vslave) determined in this manner is “theoretical”, since it is necessary to determine
whether this request is compatible with the dynamic characteristics of the axis (maximum feed rate and
maximum acceleration). The moment the feed rate of the master varies, the slave will follow this
variation based on its acceleration value. If the feed rate requested of the slave exceeds its maximum
admissible feed rate, the system will reduce the feed rate requested accordingly. Hence, the feed rate
and acceleration values with which the slave has to be moved, Vslave i and Aslave i, will be determined
instant by instant. The position of the slave will therefore be calculated on the basis of these values:

PosSlave tn+1 = PosSlave tn + Vslave i + Aslave i

Mode 2
In this mode, the slave follows the position of the master proportionately to the value of the ratio (if the
ratio = 1 the slave reproduces exactly the movement of the master); synchronisation depends on the
dynamic characteristics of the slave axis and/or the distance parameter which defines the
synchronisation distance.
If the distance value is 0, the slave will synchronise with the master based on its maximum acceleration
and using linear ramps only.

V V master

Synchronisation
V slave

Activation

t0 t1 t
45004607K 72
Prima Electro S.p.A. OPENcontrol – Programming manual

If the value of distance is not 0, the slave axis will synchronise with the master axis based on an
acceleration calculated as a function of the synchronisation distance and using linear ramps only. The
acceleration value will be calculated again with each sampling step according to this formula

Aslave = ((Vmaster * FollowRate)2 + Vslave 2 ) / 2 * Distance

where the value of the distance is gradually reduced based on the distance covered during the
synchronisation stage. No check is made on the ensuing acceleration value and therefore servo error
messages may be generated the moment the acceleration exceeds the maximum value that the axis can
withstand.

V master

Synchronisation
V slave

Activation Distance

t0 t1 t

Once the synchronisation with the master axis has occurred, the slave will move according to the
following formulas:

PosSlave = PosSlavet1 + (PosMaster – PosMaster t1) * FollowRate


Vslave = Vmaster * FollowRate

The position, PosSlave, and the feed rate, Vslave, determined in this manner should be rated as
“theoretical” values, since it is necessary to determine whether the values requested are compatible
with the dynamic characteristics of the axis (Maximum feed rate and maximum acceleration). The
moment the feed rate of the master varies, the slave will follow this variation according to its own
acceleration value. If the feed rate requested for the slave exceeds the maximum value admissible for
this axis, the system will reduce the feed rate accordingly. To this end, the two values with which to
move the slave, Vslave i and Aslave i will be calculated instant by instant. The actual position of the
slave axis will therefore be calculated on the basis of these values:

PosSlave tn+1 = PosSlave tn + Vslave i + Aslave i

The difference between the actual and the theoretical position of the axis is taken up by the slave
during its motion (even when the master has stopped moving) by moving, to the extent feasible, at a
rate higher than the theoretical value (Vslave).

45004607K 73
Prima Electro S.p.A. OPENcontrol – Programming manual

Mode 3
In this mode, the slave follows the position and feed rate of the master proportionately to the value of
the ratio (if the ratio = 1, the slave reproduces exactly the movement of the master); synchronisation
depends on the dynamic characteristics of the slave axis.

V master

V slave

Activation= Distance
Synchronisation Distance lost recovered after
during acceleration synchronisation
t stage with Master
0

t0 t

During the entire movement of the slave (i.e. both during and after the synchronisation stage), the
motion of the axis is according to the following formulas (always using linear ramps):

PosSlave = PosSlaveto + (PosMaster – PosMaster t0) * FollowRate


Vslave = Vmaster * FollowRate

The position (PosSlave) and the feed rate (Vslave) determined in this manner should be rated as
“theoretical” values, in that it is necessary to determine whether these requests are compatible with
the dynamic characteristics of the axis (max admissible feed rate and max admissible acceleration). The
moment the feed rate of the master varies, the slave follows the variation according to its own
acceleration value. If the feed rate requested of the slave is higher than its maximum admissible feed
rate, the system reduces the feed rate requested accordingly. To this end, the two values with which
the axis is to be moved (Vslave i and Aslave i) will be calculated instant by instant. The actual position of
the slave will therefore be calculated on the basis of these values:

PosSlave tn+1 = PosSlave tn + Vslave i + Aslave i

The difference between the actual and the theoretical position of the axis is taken up by the slave
during its motion (even when the master has stopped moving) by moving, to the extent feasible, at a
rate higher than the theoretical value (Vslave).

3.1.28 Releasing the Slave(s) from the Master


This instruction removes the association between the master and the slave(s). Following this instruction
it will be possible to program any movement of the slave axis.

Syntax:

(XDA)

45004607K 74
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.29 Defining/Changing the following ratio


This instruction defines/changes the parameter that determines the ratio according to which the master
is followed by the slave(s) concerned.

Syntax:

(XDA, 2, slave1[slave2[..]], ratio)


(xda, 2, slave1[slave2[..]], ratio)

where:
slave1…slave17 Are the slave axis and they can be:
one ASCII character if axis is programmed by name
a ′/′ character if axis is programmed by ID
Slave axes programmed by ID can be axes that do not belong to the current
process. They can be axes belonging to the PLC or axes belonging to other
processes and shared with the PLC.
Up to 17 slaves are allowed, 6 of them can be external to the process.
If slave axis is preceded by a ′-′, then the axis will move opposite to its master.

ratio This is the specified master/slave(s) following ratio. It must be viewed as a


multiplication factor for the feed rate of the master or the distance covered by it.
If the value of this ratio is 1.0, the motion of the master is reproduced exactly by
the slave; if it is smaller than 1.0, feed rate/distance are reduced, if it is greater
than 1.0 they are increased. This value can be preceded by a sign.

Characteristics:
The command can be used both when a slave is already following the master axis (it then brings about
the release of the slave from the master and activates a new synchronisation stage using the new
following parameter) and when the following function is not active (the command activates the following
value to be used in the next movement stage).
If the uppercase syntax is used, the movement is stopped and the continuous command underway, if
any, is terminated. If the lowercase syntax is used, instead, a continuous mode command is given out; at
any rate, the axes are stopped at zero speed and after that are restarted immediately. If you do not
want the movement to stop, this can be accomplished by having the PLC execute a similar command.

45004607K 75
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.30 Activating the following function


The following of the Master axis by the slave(s) is immediately activated. The following mode is defined
by the “mode” parameter contained in the master/slave association command.

Syntax

(XDA, 3, slave1[slave2[..]])
(xda, 3, slave1[slave2[..]])

where:
slave1…slave17 Are the slave axis and they can be:
one ASCII character if axis is programmed by name
a ′/′ character followed by an integer if axis is programmed by ID

Slave axis programmed by ID can be axis that do not belong to current process.
They can be axis belonging to PLC or axis belonging to other processes and shared
with PLC.
Up to 17 slaves are allowed, 6 of them can be external to the process.

Characteristics:
If the uppercase syntax is used, the movement is stopped and the continuous command underway, if
any, is terminated. If the lowercase syntax is used, instead, a continuous mode command is given out; at
any rate, the axes are stopped at zero speed and are restarted immediately. If you do not want the
movement to stop, this can be accomplished by having the PLC execute a similar command.

45004607K 76
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.31 Disabling the following function


The following of the Master axis by the slave(s) is immediately deactivated. The release modality is
defined by the “mode” parameter contained in the master/slave association command.

Syntax

(XDA, 4, slave1[slave2[..]])
(xda, 4, slave1[slave2[..]])

where:
slave1…slave17 Are the slave axis and they can be:
one ASCII character if axis is programmed by name
a ′/′ character followed by an integer if axis is programmed by ID
Slave axes programmed by ID can be axes that do not belong to the current
process. They can be axes belonging to the PLC or axes belonging to other
processes and shared with the PLC.
Up to 17 slaves are allowed, 6 of them can be external to the process.

Characteristics:
The slave axis remains associated with the master, it just does not follow it any longer. Depending on
the “mode” parameter defined in the master/slave association command, either of the following will
occur:

0 The slave changes abruptly from the current feed rate to zero.
others The slave comes to a halt according to its deceleration ramp.

If uppercase syntax is used, the movement is stopped and the continuous command underway, if any, is
terminated. If lowercase syntax is used, instead, a continuous mode command is given out; at any rate,
the axes are stopped at zero speed and are then restarted immediately. If you do not want the
movement to stop, this can be accomplished by having the PLC execute a similar command.

Example:
N10 (XDA,1,X/ZA,3,0.8,0.0) Activates master X and slaves Z and A
N20 (XDA,3,ZA) Activates following mode by A and Z
N30 G1X100F2000
N40 X300
N50 (xda,4,Z) Deactivates following mode by Z in continuous mode
N60 X400
N70 X500
N80 (xda,4,A) Deactivates following mode by A in continuous mode
N90 X660
N100 X700
N110 (xda,3,ZA) Reactivates following mode by A and Z in continuous mode
N120 GX0
N130 (XDA) Removes association of slaves Z and A with master X
N140 GX

45004607K 77
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 2:
Let axes XYZAB be configured with id 1 2 3 4 5 respectively, and the axes belonging to the PLC (a and b)
with IDs 14 and 20, respectively).

N10 (XDA,1,X/14A/20,3,0.8,0.0) Activates master X and slave A from process and a & b from PLC
N20 (XDA,3,A/14/20) Activates the following mode by A, a, and b
N30 G1X100F2000
N40 X300
N50 (xda,4,/14) Deactivates following mode by a in continuous mode
N60 X400
N70 X500
N80 (xda,4,A) Deactivates following mode by A in continuous mode
N90 X660
N100 X700
N110 (xda,3,/14A) Reactivates following mode by A and a in continuous mode
N120 GX0
N130 (XDA) Removes association of slaves A, a, and b with master X
N140 GX

45004607K 78
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.32 AXT – Tangential axis control


Note: this command is not available in OPEN-10, it requires the option A51 in OPEN-20
and OPEN-30

This command activates the tangential control on a rotary axis. The tangential control automatically
introduces a movement on the rotary axes so its inclination will not change along the profile.
This command replaces TCP of type 2 of the OSAI S10 controls.

Syntax

(AXT, axp1axp2axr, direction, min angle [,null angle][, rotary feed [, mode]]])
(AXT)

where:
axp1axp2axr These are the names of the two axes of the plane where the profile is defined
(abscissa and ordinate respectively) and the rotary axis that will be controlled.

direction Indicates the rotary axis direction for positive motions. It has a positive value (+) if
the rotation is CW, while the value is negative (-) during CCW rotation.

min angle It is the amplitude of the threshold angle between two elements that make it
necessary to introduce a move of the rotary axis at the end of the first element.

null angle It is the threshold for the minimum angle between two elements. If an angle
between elements is smaller than null angle, then the tangential control does not
activate and the rotary axis does not move. If this value is not provided than it is
assumed to be the same as the value for null angle configured in AMP.

Rotary feed Feed when the rotary axis moves between two elements (angle between elements
bigger than min angle). If not provided than programmed feed is used

Mode Indicates if an approaching element is needed before function is enabled.


Valid values are:
0 an approaching element has to be defined
1 it is not necessary to define an approaching element
Parameter default value is 0.
(no parameter) The command without parameters disables tangential control

45004607K 79
Prima Electro S.p.A. OPENcontrol – Programming manual

Characteristics:
This function introduces a movement of the specified rotary axis, so that its inclination will not change
along the profile. The profile is defined in the plane identified by the two linear axis specified in
command.

The movement is introduced:


between two elements to rotate between edges:
If the angle between the current element and the following one is bigger than min angle,
rotation movement is added between the current element and the beginning of the following
one. If the angle is smaller than min angle, the rotation is executed during following element
execution
on a circular element to maintain the same inclination on the element. In this case the rotation
movement runs simultaneously with the circular element.

If mode value is 0, all previous considerations applies to all elements of the profile following the
command excluding the first one. In this case, the first element is considered as the in feed element, so
even if it is a circular element, no movement is applied to the rotary axis. System will start to generate
movements for the rotary axis starting from the second element after the AXT command. If a movement
block contains an explicit movement of the rotary axis, then the tangential control will be disabled to
let the axis move as programmed. It will be re-enabled on the first movement block with no explicit
movement for the rotary axis.

3.1.33 AXS – Axes shared with PLC


This command allows the PLC to share one or more axes belonging to the process.

Syntax

(AXS, type, axis1 [[, axis2] … [, axis12]])


(AXS)

where:
type It is a parameter specifying the operation requested on the axes.
There two allowed values:
S: The axes, belonging to the process, will be shared with PLC.
R: The axes, belonging to the process, currently shared with PLC will
be released.

axis1…axis12 ASCII characters identifying an axis name belonging to the process. Up to 12


parameters can be shared with PLC.

(no parameters) If the command is executed with no parameter, then all axes currently shared will
be released.

Characteristics:
Part program cannot move axes shared with PLC.
Any attempt to move an axis shared with PLC from part program will trigger an error.
The RESET does not delete any axes sharing.

45004607K 80
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.34 AXF – Dynamic tracking axes definition


Note: this command is not available in OPEN-10, it requires the option A37 in OPEN-20
and OPEN-30

From a dynamic point of view, this command allows the definition of some axes to be managed
separately from others. The axes in that triliteral delineate the programmed geometry, but their
movement is independent from other axes in the process.

Syntax

(AXF, axes_names)
(AXF)

where:
axes_names Is the list of the axes names to which the tracking algorithm will be applied
(no parameter) If the command is executed with no parameters, all the axes will be interpolated
together

Characteristics:
The axes on which the dynamic tracking algorithm is applied (tracking axes) are interpolated separately
from the others as this triliteral creates an interpolator for each axis to be followed. As a result, profile
velocity won’t reach zero where the axes begin or finish their movement, making all the processing more
fluid (see example).
Tracking axes have to be programmed anyway. Only if there is at least one axis on which the algorithm is
applied this command is active. Programming a new three-letter codes deactivates a previous tracking
axes configuration.

Tracking axes are moved according to the setup dynamic parameters. If the programmed velocity
value is higher than the maximum velocity, the velocity value will be automatically reduced to
observe the dynamic parameters of the tracking axes.

Example:
Given a process with 3 linear axes (XYZ) and 1 rotary axis (B), programmed as follows:
Following this command, B axis is enabled to dynamically follow all the
(AXF, B)
axes in the process.
A rounded edge is programmed on which a rotary movement is
inserted:

G17 without the AXF command is not used, linear axes at


G1 X100 YZB F5000 the beginning and at the end of the block stop as B axis
G3 X150 Y50 I100 J50 B90 is added to the interpolation. At the end of the block, B
G1 Y150 axis will have finished the movement as well.

with the AXF command, the B movement doesn’t limit the linear
axis dynamic and so the velocity on the profile doesn’t reach 0.
After this command, rotary B is interpolated with other axes of the
(AXF)
process.

45004607K 81
Prima Electro S.p.A. OPENcontrol – Programming manual

The diagram below shows trend velocity on the profile and on the B axis, for both the aforementioned
cases.

V on profile

on B axis

on profile
V
on B axis

block t

45004607K 82
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.35 CAM - Electronic CAM


Note: this command requires the option A41 in OPEN-10, OPEN-20 and OPEN-30

The concept of electronic cam is based on a master axis moving in a controlled mode and one or more
slave axes following a position profile, as a function of the master axis position.
The slave axes follow movements that are pre-defined in tables as positions that the axes have to move
to according to the position of the Master axis. When the CAM is enabled, the master axis position is
searched for in the table and the slave axis position is calculated by linearly interpolating (or via
polynomials) two points including the master position.
The master axis positions have to be monotonic i.e. increasing or decreasing continuously. The master is
an interpolated axis. In addition, a master axis can set and reset outputs at certain positions. In this
case, a table has to be created that contains the master position and the corresponding output in each
line.
The tables are created from a file in .csv format. The file is organized as strings, where each string
refers to a position of the cam.
The first string contains information on the type of file and of the number of strings compiled, on the
type of positioning for the master axis and on the type of positioning for the slave axis. There can be
three types of files, and depending on that, the fields related to the type of positioning will or will not
be taken into account:

A file with two columns in which the first contains the master axis positions and the second the
corresponding positions of the slave axis.
0;4;MRel;SRel First StringFileType; StringNum;TypePosMaster;TypePosSlave
100;10 Other StringsMaster;Slave
150;13
200;18
250;10

A file with two columns in which the first contains the master axis positions and the second
polynomial coefficients from which are taken the corresponding positions of the slave axis.
1;4;MRel;SRel First StringFileType; StringNum;TypePosMaster;TypePosSlave
100;1;0.2;3.3;4;5 Other Strings Master;pS0;pS1;pS2;pS3;pS4;pS5
150;;;;;;
200;;;;;;
250;;;;;;

A file with two columns in which the first contains the master axis positions and the second the
information on the digital outputs:
2;3;MRel First StringFileType; StringNum;TypePosMaster
100;OW(12,0xF000,0xFF00) Other StringsMaster;Output
200;OF(0x01,0x03)
300;MW(1000,0xF000,0xFF00)

OW(index,value,mask) = Standard output


OF(value,mask) = FastOutput
MW(index,value,mask) = Ouptut MW

45004607K 83
Prima Electro S.p.A. OPENcontrol – Programming manual

The fields related to the type of positioning determine if the positions contained into the subsequent
strings must be considered absolute or relative. When the fields MRel and/or Srel are 0, the positions
defined in the file are referred to the Home Position: the activation of origins to the master and/or slave
axes before the execution of the cam, must be taken into account when activating the cam calculating
the proper parameters OffMast and OffSlav described later.
When the fields MRel and/or Srel are 1, each record of the file represents the displacement of the axis
related to the activation position of the electronic cam (in the first record there must be always a null
displacement)
Then:
MRel = 0  PtabM = PaxM + OffsM
Srel = 0  PaxS = PtabS + OffsS
MRel = 1  PtabM = PaxM + OffsM – PactM
Srel = 1  PaxS = PtabS + OffsS + PactS
where:
PtabM it is the value of the position of the master axis to be searched into the table
PtabS it is the value of the slave position derived from the table lookup
PaxM it is the value of the filtered current position of the master axis
PaxS it is the value of the coupling position to assign to the slave axis (if filters are activated on the slave
axis this position will be further filtered)
PactM it is the value of the filtered position of the master axis when activating the cam
PactS it is the value of the filtered position of the slave axis when activating the cam
The absence of the above fields from the cam file sets MRel = SRel = 0;
The input positions have to be dynamically checked to avoid the slave axes being required to run at very
high speed or to accelerate too much. There are different types of command to be applied to this
feature, each command has a different syntax.

3.1.35.1 Master/Slave association

This instruction defines the association.

Syntax

(CAM, 1, AxMast, AxSlave, FileName, out)

where:
AxMast It’s the name of the master axis and is a single ASCII character.
AxSlave Indicates the slave axis of the master and it can be:
a single ASCII character, if the axis is programmed by name
a character ′/′ followed by an integer, if programmed by identifier
The slave programmed by identifier may refer to an axis not belonging to the active
process and therefore it can be a logical axis or an axis belonging to another process, but
shared with the logic.
FileName It’s the name of the file containing the association between the master positions and the
slave positions.
out Identifier of the cam created.

45004607K 84
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.35.2 Master/Output association

This instruction defines the association.

Syntax

(CAM, 2, AxMast, FileName, out)

where:
AxMast It’s the name of the master axis and is a single ASCII character.
FileName It’s the name of the file containing the association between the master positions and the
output values.
out Identifier of the cam created.

Definition characteristics:
Up to 64 electronic cams can be defined. Several electronic cams can be associated with a master axis
only executing the association command several times while changing the file and/or the slave axis.
After this instruction, it’s still possible to program the slave movement and the master movement does
not have any effect on the slave or on the outputs.

3.1.35.3 Electronic cam enabling (derived from the Master/Slave association)

This instruction enables the previously defined electronic cams.

Syntax

(CAM, 3 OffsMast, Mode, Roll [,CamId, OffsSlav, out ]+)

where:
OffsMast Translation value (early or delayed) on the application of the slave position.
Mode Indicates the type of tracking of the slave:
0 Interpolated tracking
1 AXF
Roll If =0 the cam is executed only once. If different from 0, it represents the module
of a rollover cam that will be repeated until a stop command is found. To realize a
rollover cam, the modulus can be different from 360 and the master axis can also
be non-rotary.
CamId Identifier of the cam previously created.
OffsSlav Translation value applied to the slave position.
out Identifier (ActionId) associated with the activation just executed. It has to be used
with the following stop command.

45004607K 85
Prima Electro S.p.A. OPENcontrol – Programming manual

When activating the cam, the position of the master searched for in table will be given by the following
relation:
𝑃𝑚 = 𝑃𝑚𝑎𝑡𝑡 + 𝑂𝑓𝑓𝑠𝑒𝑡𝑀𝑎𝑠𝑡𝑒𝑟
where: Slav
e
𝑃𝑚𝑎𝑡𝑡 present filtered position of the master axis

Mast
er

When the cam is enabled, the position of the slave derived by the table search will be added to the
OffsSlav value as follow:
Slav
e

Mast
er

3.1.35.4 Electronic cam enabling (derived by the Master/Output association)

This instruction enables the electronic cam previously defined..

Syntax:

(CAM, 4 OffsMast, Roll ,CamId, out)

where:
OffsMast Translation value (early or delayed) on the application of the slave position.
Roll If =0 the cam is executed only once. If different from 0, it represents the modulus
of a rollover cam that will be repeated until a stop command is done. To realize a
rollover cam, the module can be different from 360 and the master axis can also
be non-rotary.
CamId Identifier of the cam previously created.
OffsSlav Translation value applied to the slave position.
out Identifier (ActionId) associated with the activation just executed. It has to be used
in the following stop command.

When activating the cam, the position of the master searched in table will be given by the following
relation:
𝑃𝑚 = 𝑃𝑚𝑎𝑡𝑡 + 𝑂𝑓𝑓𝑠𝑒𝑡𝑀𝑎𝑠𝑡𝑒𝑟
dove:
𝑃𝑚𝑎𝑡𝑡 present filtered position of the axis

45004607K 86
Prima Electro S.p.A. OPENcontrol – Programming manual

Characteristics of enabling:
Up to 128 activations can be enabled simultaneously. The same cam can be enabled several times, for
example, changing the values of OffsSlav and/or OffsMast. After this instruction, it is no longer
possible to program the movement of the slave.
It’s important to distinguish between the enabled cam status and the status of released slave axis. The
cam is enabled following to a start command. The slave axis is released only when the master in within
the synchronisation range defined in its table. The slaving and release positions are the first and the last
point of the table.
When enabling the electronic cam, the real-time software searches for the master position in the table
and calculates the point to be passed to the slave. At this moment, the slave may not be close to the
first point of the cam profile therefore it must move at the maximum of its dynamic characteristics to
reach the position required. If Mode = 1 the error between the real position and the theoretical one is
regained during the movement going – if possible – to a speed higher than the programmed one (see
master-slave). This problem also occurs when cams repeat.
It can be necessary to pass “on the fly” from a cam profile to another on the same slave axis. In order to
make this, the cam in execution must be stopped and the new one enabled. The execution of the new
profile will be enabled only when the slave axis is released, therefore - in case of a rollover cam – the
new profile will be made in the same cycle if the new start position is higher than the position where the
axis is released. In case of a one-shot cam, the new profile will be realized only if the new start position
is higher than the position where the slave axis is released.
If the RESET command is performed a during the execution of the cam, the active cams are neither
disabled nor deleted but remain in waiting for a restart of the master. To disable and delete all the
cams of the process, it is necessary to launch (after the RESET) the command (CAM) with no parameters.

45004607K 87
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.35.5 Electronic cam stop

This instruction stops the execution of one or more electronic cams and these are disabled.

Syntax

(CAM, 9 Mode, [,ActionId]+)

where:
Mode Indicates the cams stop modality. It has different meanings according to the type of cam
to stop.
Master/Slave cam
0 The slave axis stops with its deceleration ramp even if the cam profile is not complete
1 The slave axis stops only when the cam profile is finished (it stops the cyclic cams). In
case of non-cyclic cam, this command is redundant because the cam is automatically
disabled at the end of the profile.
Master/Output cam
0 Outputs do not change
1 Outputs are reset
ActionId Identifier of the action previously created.

Characteristics:
At the end of the command execution, the “Action” is automatically deleted. Note that the Reset
command does not delete the activation, but only interrupts the electronic cams execution (as the
explicit Stop).

3.1.35.6 Electronic cam delete

This instruction deletes the associations with Master/Slave or Master/Output.

Syntax

(CAM, 0, [,CamId]+)

where:
CamId Identifier of the cam previously created.

45004607K 88
Prima Electro S.p.A. OPENcontrol – Programming manual

3.1.35.7 Deactivating and deleting all the electronic cams of the process

This instruction deactivates all the electronic cams and deletes all the associations Master/Slave or
Master/Output

Syntax

(CAM)

Example:
Cam file.csv
0;9
0;0
100;100
200;200
300;300
400;400
500;300
600;200
700;100
800;0

N10 (CAM,1,X,Y,"camma.csv", E0) Defines the electronic cam between X and Y axes
N20 (CAM,1,X,Z,"camma.csv", E1) Defines the electronic cam between X and Z axes
N30 (CAM,1,X,A,"camma.csv", E2) Defines the electronic cam between X and A axes
N40 G0Y0Z0A0 Moves the slave axes until the first point of the file
N50 (CAM, 3, 0, 0, 0 ,E0, 0, E10, E1, 0, E11, E2, 0, E12) Enables the 3 cams in one-shot modality
N60 G1X1000F4000 Moves master axis
N70 (CAM, 9, 0, E10,E11,E12) Stops the active cams (unnecessary command)
N80 (CAM,0,E0,E1,E2) Deletes the cams

Example:
N10 (CAM,1,X,Y,"camma.csv", E0) Defines the electronic cam between X and Y axes
N20 (CAM,1,X,Z,"camma.csv", E1) Defines the electronic cam between X and Z axes
N30 (CAM,1,X,A,"camma.csv", E2) Defines the electronic cam between X and A axes
N40 G0X0Y0Z0A0 Moves the slave axes until the first point of the file
N50 (CAM, 3, 0, 0, 0 ,E0, 0, E10) Enables cam 1 with master offset 0
N60 (CAM, 3, -810, 0, 0 ,E0, 0, E10) Enables cam 2 with master offset -810
N70 (CAM, 3, -920, 0, 0 ,E0, 0, E10) Enables cam 3 with master offset -920
N80 G1X2000F4000 Moves the master axis
N90 (CAM, 9, 0, E10,E11,E12) Stops the active cams
N100 (CAM,0,E0,E1,E2) Deletes the cams

45004607K 89
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
camPEG file.csv
2;12
10;OW(13,61440,65280)
20;OW(14,0xF000,0xFF00)
30;OW(13,3840,65280)
40;OW(14,0x0F00,0xFF00)
50;OW(13,61440,65280)
60;OW(14,0xF000,0xFF00)
70;OW(13,3840,65280)
80;OW(14,0x0F00,0xFF00)
90;OW(13,61440,65280)
100;OW(14,0xF000,0xFF00)
110;OW(13,3840,65280)
120;OW(14,0x0F00,0xFF00)

N10 (CAM, 2, X, "cammaPEG.csv", E0) Defines the electronic cam


N20 (CAM, 4, 0, 0, E0, E10) Enables the cam in one-shot
N30 G1X2000F4000 Moves the master axis
N40 (CAM, 9, 0, E10) Stops the enabled cam
N50 (CAM,0,E0) Deletes the cam

45004607K 90
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2 Coordinates and dynamics control


The functions in this class perform the following operations:

G CODE FUNCTION
G04 Dwell at end of block
G05 Feed Hold at the end of the movement
G06 Feed Hold at the beginning of the movement
G09 Deceleration at end of step
G16 Define interpolation plane and Cartesian tern for circular interpolation in
space.
G17 Circular interpolation and cutter diameter compensation on the plane defined
by first and second axes defined in AMP. Cartesian tern for circles in space
formed by three axes in AMP.
G18 Circular interpolation and cutter diameter compensation on plane defined by
third and first axes defined in AMP. Cartesian tern for circles in space formed
by three axes in AMP.
G19 Circular interpolation and cutter diameter compensation on plane defined by
second and third axes defined in AMP. Cartesian tern for circles in space formed
by three axes in AMP.
G26 Continuous operation with transition to zero speed at the end of block
G27 Continuous movement with automatic velocity reduction on bevel
G28 Continuous movement without automatic velocity reduction on bevel
G29 Point-to-point movements
G31 Movement preparation for ActiveReset function
G70 Programming in inches
G71 Programming in millimetres
G78 Programming referred to the tool tip and motion referred to the machine zero
G79 Programming and motion referred to machine zero
G90 Absolute programming
G91 Incremental programming
G92 Axis pre-setting
G93 Inverse time (V/D) feed rate programming mode
G94 Feed rate programming in ipm or mmpm
G95 Feed rate programming in ipr or mmpr
G98 Axis pre-setting It functions like G92 but also applies when mirror is active.
G99 Cancel Axis pre-set

NOTE:
The planes specified in G17, G18, G19 are valid if at least three axes have been configured in AMP.

45004607K 91
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.1 G17 G18 G19 – Selecting the interpolation plane


These G codes are used for defining the interpolation plane as and the Cartesian tern described below:

G17 Active interpolation plane formed by axes 1 and 2 (usually XY) and third tern axis (axis 3,
usually Z).

G18 Active interpolation plane formed by axes 3 and 1 (usually ZX) and third tern axis (axis 2,
usually Y).

G19 Active interpolation plane formed by axes 2 and 3 (usually YZ) and third tern axis (axis 1,
usually X).

Axes 1 (X), 2 (Y), and 3 (Z) are the first three axes declared in AMP configuration.

Syntax

G17
G18
G19

The syntax for each function is simply the G code by itself in one block without parameters or other
pieces of information.

Characteristics:
G17, G18, G19 cannot be used if the following G codes are active:
Cutter compensation (G41-G42)
Standard canned cycles (G81-G89)
High- speed programming (G61)

45004607K 92
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.2 G16 – Defining the interpolation plan


Like G17, G18, and G19, G16 defines the abscissa and the ordinate of the interpolation plane but it is
not linked to the first and second configured axes.

Syntax

G16 axis1 axis2 [axis3]

where:
axis1 Is the name of the abscissa of the interpolation plane (typically X). It must be one of the
configured axes in the system.

axis2 Is the name of the ordinate of the interpolation plane (typically Y). It must be one of the
configured axes in the system.

axis3 Is the name of the third axis in the Cartesian tern (typically Z). It is used to program the
circular interpolation in space. It must be one of the configured axes in the system.

Characteristics:
G1 cannot be used if the following G codes are active:
Cutter compensation (G41-G42)
Standard canned cycles (G81-G89)
High- speed programming (G61)

Example:
G16 X A specifies the interpolation plane formed by axes X and A .

45004607K 93
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.3 G31 – Preparation of the movement for the function ActiveReset


The code G31 identifies a movement block that can be stopped by an ActiveReset command.

As shown below, the code G31, together with the external command Active Reset (from PLC) carries out
the following functionalities:
stop the running axes movement and restart from the following programmed block, getting the present
position as starting point.

P0
Programmed profile:
Executed profile after

Active Reset command P2
G1 X0Y0 (P0)
G31 X1Y1 (P1)
G1 X2Y2 (P2)
… Programmed profile

Active Reset P1

Syntax:

G31 [codes-G] [operands ]

where:
codes-G Other G codes compatible with G31 (see paragraph 2.5 “G Codes”).

operands All the operands and the codes that can be used in G function blocks.

Charatceristics:
This functionality can be executed also in continuous (G27)

G31 stops the continuous at the end of the movement imposing the synchronism

Geometrical element executed during G31 can be programmed in the same block or keep the
one active at that moment. It can also be a circular (in the plane or in the space) while it cannot
be a spline or a canned cycle

Following the external command ActiveReset, received during a movement in G31, the system
stops this movement and automatically restarts with the following one without cycle start

The restart movement depends on the element type programmed on the block after G31 or
maintains the one active at that moment

Note: due to the ActiveReset, the starting condition of the recovery element is unspecified
and a circular movement could signal the error of circle not congruent.

45004607K 94
Prima Electro S.p.A. OPENcontrol – Programming manual

The postlude M functions (if any) associated with the interrupted movement are ignored

If the system variable ERR is enabled, then the variable STE is initialized at 0 at the beginning of
the movement in G31 and then set to 45when the command ActiveReset finishes

You can start from n successive blocks: simply enter a GTO in the program after the G31 and
condition it to the variabile STE. As alternative, program the code G31 before the blocks to skip
and manage the ActiveReset during the consent to move also for these movement

The function ActiveReset deletes the Retarace queue

The communication with the PLC to signal the function ActiveReset: available, to be executed,
finished, is made using the variable WinPLUS SW32 (field S_nFIXSTA)

If the system switches in HOLD during a G31 and there is an ActiveReset, the movement restarts
from the following block in the HOLD output, even if in the meanwhile another movement or a
program is HOLD status have been executed

For more details on the ActiveReset function PLC side, refer to the paragraph “process Variables” in
the OPENcontrol Application Manual.

3.2.4 G26 G27 G28 G29 – Defining the dynamic mode


The G functions in this class define how the axis moves on the profile and positions at profile end. These
codes are always accepted by the control.

G26 Continuous operation with transition to zero speed at the end of block.

G27 Specifies a continuous move with automatic velocity reduction on bevels. At the end of each
element velocity is automatically calculated by the control and optimised according to the profile
shape. This calculation is based on DLA and MDA values and the maximum velocity step configured
on the axes.

G28 Specifies a continuous move without automatic velocity reduction on bevels. At the end of each
element the velocity on the profile is equal to the programmed feed rate.

G29 Determines a point-to-point movement, that forces synchronisation (the look-ahead queue is
emptied, PLC movement is permitted, enters into tolerance) independent of the programmed
trajectory type (G01 - G02 - G03 – G12 – G13). The output feed at the end of each motion block of
the profile is =0.

Syntax:

G26 [G-codes] [operands]


G27 [G-codes] [operands]
G28 [G-codes] [operands]
G29 [G-codes] [operands]

where:
G-codes Other G codes that are compatible with G27, G28 and G29 (See "Compatible G codes" table
in Chapter 2).

operands Any operand or code that can be used in a G function block.

45004607K 95
Prima Electro S.p.A. OPENcontrol – Programming manual

Characteristics:
The following diagram shows how G26, G27, G28 and G29 operate when the programmed feed rate is
constant throughout the profile.

FEED

G27

1 2 3 Blocks

G28

1 2 3 Blocks

G26

1 2 3 Blocks

G29

1 2 3 Blocks

45004607K 96
Prima Electro S.p.A. OPENcontrol – Programming manual

The following diagrams show how G26, G27, G28, G29 codes work when the programmed feed changes
on each block of the profile.

G27

1 2 3 Blocks

G28

1 2 3 Blocks

G26

Blocks
1 2 3

G29

Blocks
1 2 3

In each block the move is divided into three steps:


1) Acceleration
2) Constant move at programmed feed rate
3) Decelerated motion

G27 and G28 differ only for the type of deceleration (as shown in previous diagram).
Positioning at the machining rate (G1, G2, G3) is available in continuous mode (G27, G28 and G29)
whereas rapid positioning (G0) is always point to point, i.e. with deceleration down to null velocity and
accurate positioning regardless of the system status.

45004607K 97
Prima Electro S.p.A. OPENcontrol – Programming manual

With G26, G27-or G28 (continuous mode) the control explores and executes the profile as if it were a
single block.
For this reason, auxiliary functions S and T are not allowed within the profile executed in G27-G28.
M functions can be executed if in AMP the parameter “allowed in continuous” is set.
Continuous mode can be temporarily closed by a G00 move that is still part of the profile. The allowed
M, S and T functions may therefore be programmed in a block following G00.

NOTE:
The G code that has been configured in AMP (typically G27) is automatically selected at power-up or
after a reset.

Example:
This is a contouring example in continuous and point-to-point mode.
Y

25.65 4
0 3

230 1 2

295 5
187

0
235

75
70.477

45004607K 98
Prima Electro S.p.A. OPENcontrol – Programming manual

Program 1 (continuous mode):


N9 (DIS,"MILL DIA. 16")
N10 T4.4 M6 S800
1 N11 G X-235 Y-230 M13
N12 Z-10
2 N13 G27 G1 X75 F500 ;Continuous mode starts (G27)
3 N14 Y .
4 N15 G3 X-70.477 Y25.651 I J
5 N16 G1 X-187 Y-295
N17 G Z5 M5 ;Temporary shift to point to point mode (G00) when reaching
position 25
N18 (DIS,"MILL DIA. 28") ;for spindle stop, tool change and S functions
N19 T5.5 M6 S1200
N20 X.. Y.. M13
N21 Z-..
N22 G1 X.. Y.. ;Continuous mode restarts

If G29 were programmed in block N17, continuous mode would stop when movement finishes
(Z=5) and subsequent moves in G1-G2-G3 would be performed in point-to-point mode.

Program 2 (point-to-point mode):

N9 (DIS, "MILL DIA. 16")


N10 T4.4 M6 S800
1 N11 G29 G X-235 Y-230 M13 ;Point-to-point operation starts
N12 Z-10
2 N13 G1 X75 F500 M5 ;Spindle stop
3 N14 Y S1200 M13 ;Spindle CW with coolant
4 N15 G3 X-70.477 Y25.651 I J
N16 DWT=2
5 N17 G1 G4 X-187 Y-295 ;Dwell at the end of the element
N18 G Z5 M5
N19 (DIS,"MILL DIA. 28")
N20 T5.5 M6 S1200
N21 G X.. Y.. M13
N22 Z-..
N23 G1 X.. Y..

By programming point-to-point with G29 in block N11, M and S functions have been included
in the profile (blocks N13 and N14). The dwell at the end of the element (block N17),
however, can also be programmed in continuous mode.

45004607K 99
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.5 Automatic deceleration on bevels in G27 mode


When G27 mode is active, the control automatically calculates the vector velocity on the bevels (i.e.
between two subsequent moves) using a two-step algorithm.
During the first step the vector velocity is calculated with a formula based on profile variations.

The variation of the profile is associated with the angle formed by two subsequent moves.
The control compares the actual angle with the MDA value; if the angle is greater, the vector velocity is
put to zero as in G29 mode; otherwise, the control calculates a velocity for this bevel that is based on
the angle, MDA variable and the maximum velocity step configured on the axes.
The second step of the algorithm, called "look ahead", is optional. It can be enabled or disabled
according to the value of the DLA variable.

The "look ahead" step is an optimisation of the first step. In fact, in order to provide a correct stop at
the profile end, the calculated vector velocity is re-processed taking into account the total distance to
be covered in G27 mode and the acceleration configured for each axis.

The look ahead feature (G1 G27) does not handle feed rate override. In fact, at this stage a
100% feed rate is assumed. Higher feed rates may generate SERVO ERRORS.

3.2.6 UDR/UVR – Dynamic force/rapid feed


The code UDR enables/disables the use of the rapid dynamics for all movements, regardless of the type
of element programmed.
The code UVR enables/disables the use of the rapid feed for all movements, regardless of the type of
element programmed.

Syntax

UDR = value
UVR = value

where:
value It is a numerical value that can be:
0 to disable the use of dynamics/rapid feed (default)
1 to enable the use of dynamics/rapid feed

Characteristics:
This variable allows the execution of the same profile twice: the first time is faster for the roughing, the
sencod time is set to maching speed for finishing.

45004607K 100
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.7 DLA – Deceleration Look Ahead


The DLA code enables/disables look ahead calculation in G27 dynamic mode. The control reads the
motion blocks that make up the profile and those that follow the block in execution in order to
recalculate the exit feed rate for the various blocks. It also calculates the deceleration on the bevels
according to the profile. If the profile includes sudden trajectory variations and there are not enough
block lengths to ensure appropriate deceleration, it is critical for the system to anticipate these events
so that velocities can be adjusted. The number of motion blocks the system can look ahead after the
current block can be specified in AMP characterisation. It ranges from 2 to 255 blocks.

Syntax

DLA=value

where:
value can be: 0 disables look ahead
1 enables look ahead

NOTE:
If DLA=1 system block time increases because the control must execute a greater number of calculations
for each instruction. This results in greater accuracy.

It is advisable to set DLA=0 when it is clear that the programmed feed rate and the total distance to be
covered in continuous mode are such as to provide a good stop at the end of the profile.

With DLA=0 the control will consider only the deviations from the theoretical profile on bevels.

Characteristics:
The default value of this variable is configurable in ODM.

45004607K 101
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.8 LKH – Access to the dimension of the Look Ahead queue


The tri-literal LKH allows executing reading or writing Look Ahead queue dimension operating on the
precalculation blocks number set in AMP.

Syntax:

(LKH, mode, value)

where:
mode: represents access mode to precalculation queue, valid values:
R: reading access
W: writing access

value: depending on the requested access mode, it represents the variable where the
precalculation queue dimension will be written (access in reading) or the value with which
to modify precalculation queue (access in writing).
In case of access in reading, value must be a variable, while in case of access in writing it
can be equally a number or a variable.

Characteristics:
During work in continuous, access in reading or writing to the Look Ahead queue, executed by part
program, determines the emptying of the entities in queue imposing the synchronism at 0 speed.

On the RESET it is restored the default dimension configured in AMP.

Example:

(LKH, R, E0) ; with this command it is possible to read the number of precalculation blocks
and to save it in the variable E0
; with this command it is possible to set ast 100 the number of precalculation
(LKH, W, 100)
blocks
(LKH, W, E0) ; with this command it is possible to restore the previous number of
precalculation blocks

45004607K 102
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.9 CRV – Feed optimization parameter


CRV variable is used to optimise feed value for curves described using a sequence of small lines or when
noise affects smooth trajectories.

Syntax:

CRV = value

where:
value Is a positive real number. It fixes the time (in ms) used for curve computation.
If 0 no optimisation will be performed.

Characteristics:
The numerical control computes feed on profile depending on the angle between elements and it does
not take into account the length of the elements.

Sometimes, when a part program is generated by points, curves are described by a relevant number of
small segments with small angles between them. In this case computed speed is high and the segments
are travelled in a very small time, or can even be skipped; as a consequence the final profile could be
inaccurate.

When CRV variable is set, the control takes into account the length of segments and their shared angles
during feed computation, in this way it can control the feed value on curves. To define the space used
for curve computation it is compulsory to define an “observation” time. Defining an “observation” makes
it possible to take into account ratios between speed and the lengths of the element defining the
trajectory. In this way it is possible to control both curves made up by very short segments travelled at
reduced feed and curves made up by longer segments travelled at high feed.

Variable CRV can also be used to remove hard braking where “calculation noise” appears on smooth
profiles. Usually a value for CRV between 4.0 and 6.0 assures good results.
Higher values could generate problems of missing elements, since many elements would need to be
analysed before a movement could start.

This function is available in continuous mode (G27 / G28), only.


Default value for CRV is configured in AMP.

45004607K 103
Prima Electro S.p.A. OPENcontrol – Programming manual

This profile shows the case where a curve is described


using multiple segments. The amplitude of the angle
they share is 11.25°, while the amplitude of the
global angle is 90°. If optimization is not enabled
(CRV =0), computed feed could be too high, since the
α= 11.25° numerical control could not properly identify the
Virtual movement used profile. When optimization is enabled the control
to compute dynamics identifies the curve and it can subsequently reduce
speed.

β= 90°

This profile shows the other use of the feed


optimization function. In this case the desired profile
Virtual movement
is linear, but generated points are affected by “noise”
used to compute due to computation errors. When optimization is not
dynamics
enabled the control reduces feed when it finds the “steps”
in the profile. If the function is enabled feed is not
reduced.

45004607K 104
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.10 MDA – Maximum Deceleration Angle


The MDA code defines the maximum angular axis departure in which G27 is active. The selected value
(from 0 to 180 degrees) defines an angle that is the limit of G27 operation.

Syntax:

MDA=value

where:
value is an angle between 0° and 360°

Characteristics:
In order to alter the default value (MDA = 90 degrees) you may assign MDA in the configuration or enter
it through a specific data entry or a part program block.

The system forces the axis to decelerate to zero velocity when the direction is greater than
the angle defined by the MDA value. The system calculates a deceleration ramp for the
programmed axis if the direction is less than or equal to the angle defined by the MDA value.
Since the system calculates deceleration on bevels from the actual angle and the MDA value, it
is possible to alter velocity reduction by changing the MDA value and the maximum velocity
step configured on the axes. Small values of MDA generate dramatic deceleration on bevels.
The system RESET restores the configured MDA value.

Examples:
MDA=90°
MDA=180°

45004607K 105
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.11 MOM – Manual Operating Modality


MOM variable is used to configure the modality for the execution of manual movements (JOG). Different
operating modes correspond to different modes of axis control during manual movements.

Syntax:

MOM = value

where:
value is an integer that identifies the mode for movement execution. It can be programmed
directly with a decimal number or indirectly with E parameters.

The available modes are defined in the following table:


Mode Description

In this mode the resulting movement depends on whether one or multiple axes
are manually moved; in both cases axes can be moved within their operating
range (if activated)
For manual movements concerning a single real axis (meaning a non-virtual axis
or tool direction axis), the resulting movement is set into the range of the
operating limits, meaning that the limits are included in movement parameters
and they can be checked before the actual movement starts. The axis, when and
if it reaches the limit, stops in a controlled way, stops using its value for
deceleration in manual. This mode is activated after the axis has been selected
using the human interface (e.g. WinNBI, Human Interface, …).
For manual movements concerning multiple real axes or for movements along a
0 virtual axis and/or tool direction axis, the resulting movement has no limit for
axes movement, a specific look-ahead algorithm checks if the axis exceeds the
operating limits. When the algorithm estimates that the limit will be exceeded
the system generates an emergency and each axis stops using its rapid
deceleration. This implies that, if a virtual axis (for instance W axis in tool
direction) was moving, the corresponding stop cannot happen along the (virtual)
axis direction, since each axis stops using its deceleration value, so the original
trajectory CANNOT be respected. This type of axes selection can be enabled only
by the PLC.
After the operating limits are reached, all the types of deceleration use
“trapezoidal” ramps, and a maximum deceleration is maintained equal to the
emergency deceleration.

In the case of movement of a single real axis, nothing changes compared to mode
0; in all other cases (i.e. manual movements with selection of several real axes
or movements along virtual axes and/or tool direction) new lookahead algorithms
are enabled, together with stop when reaching operating limits.
1
When moving along the tool direction axes, the moment when the operating limit
is reached is calculated according to the direction of the movement along the
virtual axis in use. When the lookahead starts, the deceleration is made along the
virtual axis in a controlled way using the manual acceleration of the virtual axis.
In this case, the original trajectory defined by the virtual axis does not change.

45004607K 106
Prima Electro S.p.A. OPENcontrol – Programming manual

Mode Description
When the operating limit is reached, it does not generate an emergency but a
controlled stop (with manual acceleration) only of the individual axis reaching
the operating limits. Any other axes continue their movement.
For example, moving axis W (TCP tool direction) together with the rotary axis A,
when reaching the W operating limit (for real axes XYZ) will lead to the stop of
only the W axis (XYZ) and not A.
If TCP is enabled, the operating limit of the movement (axes or tool direction) is
usually controlled according to the physical position of the axes. The control can
also be enabled toward the tool tip activating the operating limits on the tool tip
as well.
The algorithm for the lookahead of the operating limits being reached on single
physical axes, remains active so as to control the limits when the axis movement
is generated by several components (i.e. in case of TCP, to the movement of the
linear axis the offset due to the movement of the rotary axis is added).
The behaviour of this algorithm is changed to:

stop only the movements leading to a movement of the axis exceeding the
operating limits.
For example, in case of TCP, if the limit is set to the linear X axis, in addition to
the linear axis itself, the rotary axes are stopped as lead to a movement of the X
axis, but not of Y and Z a axes. In case of TCP,5, the movement along W will stop
when the operating limit of one of the TCP linear axes is reached.

stop without generating emergency.


The axes selected for the manual movement, (that have to be stopped as
aforementioned) will decelerate using their rapid acceleration.

If (TCP, 5) is enabled, it is possible to move the tool direction axes (axis W and
other axes of the plane defining the head or the XY plane) when moving the
other axes, whether or not associated to the TCP except for the TCP linear axes.
In case simultaneous movement of virtual axes and rotary TCPs is required, the
movement is enabled only on virtual or rotary axes, forcing on the excluded axes
a “Manual Override” equal to 0%.
For example, by selecting W (tool direction) and A (rotary TCP,) the manual
movement starts by moving only the W axis; if trying to move A also, this won’t
move until axis W is set to 0% feed. Once the A axis starts to move, axis W cannot
be moved until axis A has 0% feed.
All the types of stop for operating limits reached, use “trapezoidal” ramps with
acceleration equal to the manual acceleration.
It behaves like mode 1, in this case all axes are stopped when any one of them
2
reaches its operating limits.

45004607K 107
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.12 EMGERR – Emergency to Error


The variable EMGERR is used to change the emergencies on the operating limits to error.

Syntax

EMGERR = value

where:
value Can be 0 or 1. It can be programmed directly or through a E parameter. Value 0 enables
the management of the emergency reaching the operating limits (standard behavior),
value 1 change the emergency to error

Characteristics:
Reaching an operating limit generates an emergency and it can happen in the following cases:

 During a movement with TCP when the phisical positions of the axes (not the ones of the tool
tip) reach the software limits
 During a manual movement if a protected area is violated
 During a movement in polar coordinates going within the “minimum radius” area

With the parameter EMGERR equal to 0 the emergency 120 “SW overtravel reached” is generated; with
EMGERR equal to 1 the error 22/150 (151) “End of the movement on the operating limit” is generated.

In both cases a RESET is necessary to resume normal activity

45004607K 108
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.13 MOA – Motion Auxiliary


MOA variable is used to activate some options related to axis movement.

Syntax

MOA = value

where:
value It can have value =0 or value =1, and it can be programmed directly or indirectly via an E
parameter. It enables or disables the management of null movement on the axes.

Characteristics:
Allows the dynamic filtering of small movements programmed on the axis, via the three-letter code CPA
with parameter 117 or in ODM (minimum axis position threshold), in order to avoid decelerations
guaranteeing to reach the programmed position. If MOA is active, the feed rate is not reduced even if
(according to the MDA values and the maximum jump in feed on the edge) required in case of angular
deviation of two adjoining movements.
The performance does not apply between two movements having a continuous change of the rotary
planes (lowercase upr).

3.2.14 ERF – Error Form


ERF variable checks the value of shape error during the execution of a profile while a moving average on
the command is running.

Syntax

ERF = value

where:
value is a positive real number that can be programmed directly or indirectly with E parameters.
It defines the maximum shape error with respect to the programmed profile.

Characteristics:
If the points sent to the axis are filtered (FLT,1) this introduces an error on the profile: the moving
average, computed to smooth the path, applied to the computed points produces a distortion to the
path geometry. This distortion can be controlled using the ERF variable, that modulates the feed (mainly
on corners) in order to limit the shape error, generated by the floating average algorithm, within the
requested tolerance. Furthermore, the ERF determines, the maximum admitted error during the
execution of a circular motion; this error is managed checking the execution speed of the circular
motion, so the value of ERF limits the execution speed of a circumference.

45004607K 109
Prima Electro S.p.A. OPENcontrol – Programming manual

In general, with the presence of a corner, the distortion to the path geometry generates a form error on
the part which is function of:
Angle on the corner
Velocity passing on the corner
Number of points of the filter

Given the angle between two contiguous movements and the number of points of the filter, the ERF
algorithm calculates the velocity at which the corner must be addressed starting from the (maximum)
error set with this parameter
Then, with a simple change of this parameter (indicatively by a few thousandths to a few millimeters) it
is possible to see significant changes in the dynamic behavior of the machine.

It is possible to vary ERF value during continuous execution. On the edge, it will be applied the ERF value
active on the first of the two movements generating the edge.

Example:

ERF = 0.5
G1 X100 Y0 F10000
ERF = 0.1
G2 Y-100I100J-50

On the edge with coordinates (100,0) i twill be applied ERF= 0.5 while on the circular motion i twill be
applied ERF = 0.1

45004607K 110
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.15 Jerk Limitation


The speed diagram shown in the previous sections show the continuity of the speed function V(t), while
the acceleration function a(t) has a step pattern. Depending on the characteristics of the machine and
the type of machining process, this may cause defects in the finish of the part.

This problem may be solved using an acceleration function a(t) with a continuous pattern.

The purpose of the "Jerk Limitation" function is to limit variations in acceleration, so as to control its
maximum value, resulting in smoother movement and, consequently, a better surface finish.

V(t)

45004607K 111
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.16 RAMP – Movement mode


The RAMP code is used to define some characteristics of the movement management.

Syntax:

RAMP = value

where:
value movement behaviour to be enabled. The value to be specified is obtained from the sum of
the values corresponding to each of the desired features.
Uses the ramp configured on the axes
1 Linear ramp
2 S non -linear ramp
3 Trapezoidal ramp
4 Ramp with Jerk limitation (Controllare numerazione)

Characteristics:
The RAMP value can be configured in AMP.
RESET restores default value.

Non-linear ramps work both on point to point movements (G29) and continuous movements (G27 and
G28). The activation or deactivation of non-linear ramps in a continuous movement is not perceived, it is
only perceived in point by point movement mode.

It is recommended to use value 4 for machines with high dynamic levels (high jerks), while value 3
should be used in machines where dynamic levels have to be reduced (low jerks). Configured jerk being
the same, value 3 performs better (in terms of execution times) than value 4, but engenders more
“abrupt” movements.

45004607K 112
Prima Electro S.p.A. OPENcontrol – Programming manual

S non-linear ramp:
Enables the non-linear ramps (S ramps) where the execution mode is characterised by the value of the
JRK variable. The system continuously modulates the acceleration value between 0 and a maximum
whose value is given by A/JRK, so that, with JRK=1 the nominal acceleration value is reached, with
JRK=2 half the nominal acceleration value is reached, with JRK=0.5 twice the nominal acceleration value
is reached. The ensuing jerk values on the movement will NOT be controlled and will range from 0 to an
undetermined value.

Jerk

Velo
c

Accel

In the example above, a movement at a speed of 20000 mm/min with an acceleration of 1500 mm/sec2
has been programmed. The maximum acceleration value is reached only at a time halfway between the
acceleration stage and the deceleration stage. For JRK=1 the acceleration value reached corresponds to
the value requested.

The execution time of the acceleration stage corresponds to the time it would have taken using a linear
acceleration ramp, multiplied by the value of JRK and constant 1.485.

Tramp = T linear ramp * JRK * 1.485.

Ramp time is also affected by the “minimum ramp time” parameter configured in AMP for each axis. If
the time calculated for the ramp does not meet the minimum ramp time limit, the ramp will be
recalculated to comply with this requirement.

N.B. The minimum ramp time is time it takes to reach the maximum acceleration value (Jerk application
time) so that, as can be seen from the chart below, the total ramp time corresponds to twice the
minimum time.

45004607K 113
Prima Electro S.p.A. OPENcontrol – Programming manual

Speed

Acce
l

Jerk

Jerk application
time

Trapezoidal ramp
Acceleration ramps are calculated on the basis of the jerk parameters configured in AMP. The jerk value
used within a movement is calculated by the system so as to ensure that the movement complies with
the jerk characteristics specified for each axis. The jerk value configured for each axis must be
construed as the value that can be used during the acceleration stage. The system keeps the jerk value
continuously during the acceleration stage.

Jerk Speed

Accel

45004607K 114
Prima Electro S.p.A. OPENcontrol – Programming manual

In the example above, a movement at a speed of 20000 mm/min with an acceleration of 1500 mm/sec2
and with jerk of 15000 mm/sec3 has been programmed. The maximum acceleration value is reached and
maintained for a certain time in the central part of the acceleration or deceleration stage; it may or
may not reach the maximum value requested as a function of speed step to be made.

Movements, as well as by the jerk parameter, are also affected by the minimum ramp time configured in
AMP for each axis. If the time calculated for the ramp does not comply with the minimum ramp time (is
lower) the ramp is recalculated in order to respect this last constraint.

N.B. The minimum ramp time is the necessary time to reach the maximum acceleration value (Jerk
application time).

Speed

Accel

Jerk

Jerk application
time

45004607K 115
Prima Electro S.p.A. OPENcontrol – Programming manual

Ramp with jerk limitation


Acceleration ramps are calculated on the basis of the jerk parameters configured in AMP. The jerk value
used within a movement is calculated by the system so as to ensure that the movement complies with
the jerk characteristics specified for each axis. The jerk value configured for each axis must be
construed as the maximum value that can be reached during the acceleration stage. The system
modulates the jerk value continuously between 0 and its maximum value, and it will modulate in the
same manner the acceleration value, which will not necessarily reach the maximum configured value.

Speed
Jerk

Accel

In the example above, a movement at a speed of 20000 mm/min with an acceleration of 1500 mm/sec2
and with jerk of 15000 mm/sec3 has been programmed. The maximum acceleration value is reached only
at a time halfway between the acceleration stage or the deceleration stage and it is below the maximum
value that is requested. Only with a higher jerk will it be possible to reach the maximum acceleration.

Movements, as well as by the jerk parameter, are also affected by the minimum ramp time configured in
AMP for each axis. If the time calculated for the ramp does not comply with the minimum ramp time (is
lower) the ramp is recalculated in order to respect this last constraint.

45004607K 116
Prima Electro S.p.A. OPENcontrol – Programming manual

N.B. The minimum ramp time is time it takes to reach the maximum acceleration value (Jerk application
time) so that, as can be seen from the chart below, the total ramp time corresponds to twice the
minimum time.

Speed

Accel

Jerk

Jerk application
time

45004607K 117
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.17 JRK Jerk Constant


The JRK code defines the acceleration management mode during the execution of movements with S
ramps (RAMP=1).

Syntax:

JRK = value

where:
value a numeric value greater than 0.5, which is used to define the acceleration management
mode in a non-linear ramp

Characteristics:
The default value is 1. The JRK value can be configured in AMP. RESET restores the default value. By
setting JRK = 1, the acceleration ramp retains the values configured for axis accelerations. Acceleration
increases with a value lower than 1, and decreases with a value higher than 1.

If an acceleration of 1500 mm/sec² is necessary in both movements. In the first case JRK=1 has been
used so that the nominal acceleration value is reached, in the second case JRK=2 has been used so that
half the nominal acceleration value is reached. In the next example JRK=0.5 has been used so that twice
the nominal acceleration value is reached.

45004607K 118
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.18 FEEDROT – Feed rate programmed on linear axes only


This system variable enables the programmed feed rate to be applied for linear axes only. It is the
equivalent of bit 6 in the Series 10 MOV variable.

Syntax:

FEEDROT = value

where:
value 0: Feed rate programmed on all movement axes
1: Feed rate programmed on linear axes, only

Characteristics:
If this flag is set to 1, the feed rate programmed in a movement block applies to the linear axes. If a
rotary axis is programmed in addition to the linear axes, feed rate is recalculated automatically so as to
ensure that it remains the same on the linear axes. The newly calculated speed is applied only if a
movement includes both linear and rotary axes. It is not applied to the circular motions
(G2/G3/G12/G13/G14), in which a rotary axis is included in the interpolation plan.

45004607K 119
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.19 RAPSTOP – Rapid stop activation


Enables the rapid stop mode in case of RESET, HOLD, FeedHold.

Syntax:

RAPSTOP = value

where:
value: 0: rapid stop disabled
1: rapid stop enabled with trapezoidal ramps
2: rapid stop enabled via “reduced” trapezoidal ramps
3: rapid stop enabled via linear ramps f

Characteristics:
When the rapid brake is enabled, the movement stop uses the ramps associated to the RAPSTOP
modality selected. If on the process the linear ramps are activated, the rapid brake (if enabled) always
uses the linear ramps (RAPSTOP=3).

In case of trapezoidal ramps (normal or reduced) only the deceleration parameters and the dejerk along
the profile are considered, ignoring – if present –the minimum ramp times.

The difference between trapezoidal ramps and reduced trapezoidal ramps is:
the trapezoidal ramps have a start and an end phase of the stop movement where the Jerk is
taken into account, therefore, both the beginning and the ned of the stop a phase are “soft”.
the “reduced” trapezoidal ramps apply the Jerk only in the final phase of the stop movement,
therefore start to brake with a ramp similar to the linear one and finish the stop with a ramp
where the Jerk is controlled. This turns out to have a stop faster than the “pure” trapezoidal
ramps.

45004607K 120
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.20 ODH – Online Debug Help


This system variable is used to check whether the part program includes continuous moves (G28) in
which the velocities programmed on the profile are too high and may generate path errors.

Syntax:

ODH = value

Characteristics:
To obtain reliable results from the use of ODH, the variable itself must be reset before it is used in the
part program: that is, ODH must be forced to zero before the blocks to be tested. This variable is
normally used when the Part Program is debugged: the system modifies the ODH variable when it detects
critical conditions.

This information is coded in bits with the following meanings:


Bit 0: Indicates that the queue of the elements processed continuously is too short. It occurs
when, in G28 (and in some cases in G27), the machining speed is too high with respect to
the value set in AMP as the number of blocks to be processed during continuous motion.
The possible solutions are to decrease the speed or increase the size of the queue of pre-
calculated elements.

Bit 1: Indicates an excessively high speed and occurs when elements in the profile are too short,
and are skipped due to the excessively high speed. In this case, the machined profile is
deformed. The possible solutions are to reduce the speed, or to recalculate the points in
the program.

Bit 3: Occurs when the system has forced deceleration to avoid deforming the profile when it
cannot completely calculate the acceleration/deceleration ramps for the movement
elements analysed, during machining with non-linear ramps enabled. The possible
solutions are to reduce the speed or to increase the size of the queue of pre-calculation
elements.

45004607K 121
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
........
........
ODH=0 ;the variable is set to zero for velocity verification
G1G28F1000 ;continuous mode starts
........
........
........
........ ;continuous mode blocks
........
........
........
G29M5 ;continuous mode end
(GTO,KO,ODH=1) ;branches if ODH=1
(DIS;"VEL.WITHIN SYSTEM LIMITS")
(GTO,CONT)
........
"KO"
(DIS,"VELOCITY TOO HIGH")
........
........
"CONT"

45004607K 122
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.21 MBA – Multi-Block retrace Auxiliary functions


The MBA (Boolean) variable makes it possible to enable/disable the auxiliary functions (M functions)
during Retrace operations:

Syntax:

MBA = value

where:
value 0 emission of auxiliary functions disabled
1 emission of auxiliary functions enabled

Characteristics:
The emission of auxiliary functions is performed only during forward retrace
(see User Manual)

After RESET, the variable is reset with the value configured in AMP.

3.2.22 REM – Automatic return to profile at end of move


The REM (Boolean) variable determines the Jog return mode.
If the variable is set to 0 the return point is the point at which the hold stage begins (standard
execution).
If the variable is set on 1 the return point is the final point of the movement in which the hold stage
begins. The return movement is performed automatically, without manual movements (JOG).

Syntax:

REM = value

where
value 0 Return to input point in hold
1 Return to end point of movement

RESET does not modify the value of the variable.

45004607K 123
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.23 G70 G71 – Measuring units


The G70 and G71 codes define the measuring unit used by the control.

G70 specifies inch programming


G71 specifies millimetre programming

Syntax

G70 [G-codes] [operands]


G71 [G-codes] [operands]

where:
G-codes Other G codes that are compatible with G70 and G71 (See "Compatible G codes" table in
Chapter 2).

operands Any operand or code allowed in a G function block.

Characteristics:
If neither G70 nor G71 is programmed, the system will assume the default measuring unit stored in the
system configuration (typically G71).

When the system switches from G71 to G70 or from G70 to G71 it also converts all position and feed rate
information into the relevant unit.

Offsets and origins tables are not automatically converted into the alternative unit
when the system switches between G71 and G70.

When the system switches from G71 to G70 or vice versa, the value for machining
stock allowance (MSA variable) is set to zero.

45004607K 124
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.24 G90 G91 G78 G79 – Absolute, incremental programming referred to machine
positions (ABSOLUTE) or referred to the tool tip (WORK)
G90 Sets absolute programming, i.e. moves referred to the current origin (position to move).

G91 Sets programming in the incremental system, i.e. moves referred to the position reached
with the previous move.

G78 It defines the programming in workpiece positions, that is referred to the tool tip (WORK),
but with movements in joint positions (executed as if the TCP is disabled), that is without
turning around the tool tip.
It is valid only on the block where it has been programmed.

G79 Sets programming in machine positions (ABSOLUTE). It is valid only in the block in which it
is programmed.

Syntax

G90 [G-codes] [operands ]


G91 [G-codes] [operands ]
G78 [G-codes] [operands ]
G79 [G-codes] [operands ]

where:
G-codes Other G codes that are compatible with G90, G91 G78 and G79 (See "Compatible G codes"
table in Chapter 2).

operands Any operand or code that can be used in G function blocks.

Characteristics:
If none of these codes is programmed, the default programming mode is absolute (G90), i.e. coordinates
referred to the programmed origin.

G90 and G91 are modal whereas G78 and G79 are not, that is to say they are active only in the block
where they are programmed: in the following block this mode is automatically disabled.

Using characters >> allow mixed incremental/absolute programming in the same block.

Characters >> positioned before the numeric value of an operand, indicate that it must be considered as
an incremental value and that it is valid for that operand only. Characters >> have a meaning only if G90
absolute programming is active. They may be used for all operands on which it is possible to use G91
function.

Movements associated to G78 and G79 codes, if executed with TCP, or with UPR, or with active
virtualizations, will be then executed in point to point mode.

45004607K 125
Prima Electro S.p.A. OPENcontrol – Programming manual

The use of mode G78 allows programming final part positions (WORK) so that they can be
reached avoiding those wide movements of the head around the tool tip which are typical of the
movements when TCP is active, making instead a direct movement between the initial and final
position. This allows to accelerate some types of positionings.

On the other hand, a five axis motion in G78 or G79 mode, as it is not executed moving around
the tool tip (that is, moving as if the TCP is disabled, although active), could result in tool
shakings due to the rotary axes movement with possible collision between the tool and the
piece: for this reason this type of programming is suitable only for positioning movements in the
air at a safe positions.

As an example, the following figure represents the movement of a head with active TCP but in
G78 mode: the direct movement between the initial point (P1j) and the final point (P2j)
programming the points P1w and P2w in workpiece positions (WORK) is highlighted. However
during the movement the tool tip escapes from the profile due to the rotary axis movement.

To execute the same movement in G79 mode, it would be necessary to program the final point
in joint positions (ABSOLUTE) that is the point P2j. This would require the knowledge of the
head geometry in order to calculate the joint positions (P2j) so that at the end of the movement
the tool tip would be in the required point (P2w). For this reason, G79 mode is normally used for
simple movements like head lifting at a safety position of Z, even with active TCP.

Movement executed
in G78 or G79

P1j P2j

P1w P2w

Obtained profile

Indicating with P1w the initial programmed point and P1j its corresponding mill centre, the final point
P2j can be reached by the machine through a linear motion from P1j to P2j and from A to A1 to A2,
following the programming:

(TCP,1)
; joint point of coordinates X2j, Y2j, Z2j, A2
G79 P2j
or
G78 P2w ; piece point of coordinates X2w, Y2w, Z2w, A2

45004607K 126
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
G90 G1 X + 80 Y >> + 35 Z-70
The value associated with Y is considered as incremental.

Example:
This example shows how to use the different reference systems: absolute, incremental and HOME
position.

Absolute Origin 1

HOME
"HOME"
Position

Machine Zero

Program:

(UAO, 1) ;Enables absolute origin 1


N1 G X Y ;X and Y positioned to absolute origin 1 (assuming default mode G90)
N2 X30 Y40 ;X and Y positioned to point 1
N3 G91 X50 Y25 ;Incremental mode positioning to point 2 ( X+50, Y+25 from point 1)
N4 X-71 Y12 ;Incremental mode positioning to point 3 ( X-71, Y+12 from point 2)
N5 G90 X110 Y35 ;Absolute mode positioning to point 4 ( X+110, Y+35 from the origin)
N6 G79 X70 Y55 ;Positioning referred to home position on point 5 (X+70, Y+55 from home position)

45004607K 127
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.25 G92 G98 G99 – Axis pre-setting


G92 and G98 represent an alternative method for introducing axis offsets. Since G92/G98 define the
reference position, they are used in a part program block by themselves. The difference between
current and new position is stored in a separate G92/G98 offset register. In this way, other active offsets
such as tool offset and origins, will not be destroyed when a G92/G98 offset is introduced. The G99 code
resets the G92/G98 code.

Syntax:

G92 axes
G98 axes
G99

where:
axes Are fields containing axes name-value. Up to 12 couples axes-value can be specified.

Characteristics:
G98 works the same way as G92, except that G92 does not take into account the MIRROR applied to the
programmed axes and G98 does.
Codes G92 and G98 are cancelled by the following functions:
G99
M30
System reset
Machine logic (PLC)

The G92 or G98 offset shifts the origin for a part program but does not cause any axis motion. When the
axis value is entered in a G92 or G98 block it becomes the current axis position.

Example:

........
Y
........
G0 X100 Y80
G92 X0 Y0
........
80 ........

100 X

45004607K 128
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.26 G04 G09 – Dynamic mode attributes


Two G codes belong to this class:

G04 Dwell at end of block


G09 Deceleration at end of block

Syntax:

G04 [G-codes] [operands ]


G09 [G-codes] [operands ]

where:
G-codes Other G codes that are compatible with G4, G9 (See "Compatible G codes" table in Ch. 2)
operands Any operand or codes allowed in a G function block.

Characteristics:
G04 causes a dwell at motion end in a block. The DWT command must be programmed in a block that
precedes G04. If no DWT is be programmed, the system assumes the characterised dwell.
G04 is allowed only when the control is in point-to-point (G29) and is valid only in the block in which it is
programmed. The value set in DWT may be expressed in seconds (G94 or G95 with G0 active) or
revolutions (G95).

G09 forces a feed rate equal to zero at the end of the block in which it is programmed, but does not vary
the machining status of the profile in progress. If control is in point-to-point mode (G29) or is
programmed at the end of a block, G09 does not cause any change in the control status and is valid only
in the block in which it is programmed.

G4

DWT t
V

G9

45004607K 129
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.27 G05 G06 –FeedHold at end / beginning of the movement


These two G codes activate the feedhold at the beginning (G6) or at the end (G5) of the movement.

Syntax:

G05 [G-codes] [operands ]


G06 [G-codes] [operands ]

where:
G-codes Other compatible G-codes with G05, G06 (see chapter 2 Compatible G-Codes).

operands All the operands and codes allowed in the G function blocks

Characteristics:
Code G05 puts the process in Feedhold state at the end of the programmed movement.
Code G06 puts the process in Feedhold state at the beginning of the programmed movement.
Both G codes can be programmed either in blocks that include a movement or in blocks not containing
programmed movements. In the second case the two codes behave the same way.

G05 in a block containing movement: during the movement it is possible to deactivate (by PLC with
specific call) the enter in feedhold at the end of the movement; in this case the passage between two
movements will take place in velocity (if allowed by the dynamics of the two movements).

G05 in a block without movement: system always enters the feedhold.

G06 in a block including movement: during the execution of the movement that preceedes the G06 it is
possible to deactivate (by PLC with specific call) the enter in feedhold at the start of the movement; in
this case the passage between two movements will take place in velocity (if allowed by the dynamics of
the two movements). If in the previous block G05 was programmed, the G06 of the current block is
automatically deactivated performing the feedhold exit request at the end of the previous block.

G06 in a block without movement: system always enters the feedhold.

3.2.28 t- Block execution time


Both in G93 and G94 it is possible to establish the block execution time by programming the t function at
the end of the block.

Example:
G1 X10 Y1 t6

Characteristics:
The t function is valid only for the block in which it is programmed. The time is expressed in seconds and
the control automatically calculates the feed rate at which the moves of the axes programmed in the
block will be executed.

45004607K 130
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.29 DWT –Dwell Time


The DWT command lets you assign a dwell time at block end. This dwell time is used by G04 and canned
cycle blocks. Although the DWT command can be programmed anywhere in the part program, but must
come before any G04 or fixed cycle linked to it.

Syntax:

DWT=value

where:
value Is a time in seconds or revolutions. It can be programmed directly with a decimal number
or indirectly with E parameters.
Example:
DWT = 12.5 assigns a dwell time of 12.5 seconds
E32 = 13.4 assigns the value 13.4 to the E32 variable
DWT = E32 assigns a dwell time of 13.4 seconds

3.2.30 G93 – V/D Feed rate


G93 defines the axes feed rate (F) as the inverse time (in minutes) required to execute the entity:

1
𝑭=
𝑇

Linear interpolation:

𝐹𝑒𝑒𝑑𝑟𝑎𝑡𝑒
𝑭=
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒

Circular interpolation:

𝐹𝑒𝑒𝑑𝑟𝑎𝑡𝑒
𝑭=
𝐴𝑟𝑐

where:
Feed rate linear or circular speed expressed in mmpm (G71) or ipm (G70)
Distance vector distance of linear motion expressed in inches or mm
Arc arc length expressed in inches or mm.

With G93 active, the F function is valid only in the block in which it is programmed

Example:
G93 X. . Y. . F. .
G1
X. . Y. . F. .

45004607K 131
Prima Electro S.p.A. OPENcontrol – Programming manual

3.2.31 VFF – Velocity Feed Forward


This command enables/disables VFF. VFF has an effect on the interlocking of the axes allowing the
speed to be controlled as well as the position.

Syntax

VFF=values

where:
value Can be:

0: disables VFF: (only the position of the axes is controlled, that is taking into
consideration the error margin between the tracking and its theoretical position)
1: enables VFF: (the speed of the axes is also controlled). The control is made only for
movements in AUTO or MDI
2: similar to mode 1, but only for manual movements
3: similar to mode 1, but for all movements

NOTE:
The VFF default value is 0 and can be configured in AMP using ODM tool.

3.2.32 FOP – Feed Override on Programmed Feed


Using this variable it is possible to decide if the value of the active feed override has to be applied to
the programmed feed or to the calculated one.

Syntax

FOP=value

where:
value this is a value that can be:
0: applies the override feed on the feed value calculated
1: applies the override feed on the feed value programmed
Characteristics:
FOP is a read-only variable, its value can be changed in the AMP using the ODM or the dedicated PLC
command.

Example:
FeedOverride set to 50%.
Maximum working feed of the X axis: 6000 mm / min
Programmed block:
G1 X1000 F16000
If FOP = 0:
Feed applied: 3000 mm / min: first, the control limits the feed at the maximum accepted by the
axis, then it applies a 50% feed override
If FOP = 1:
Feed applied: 6000 mm / min: first, the control calculates the feed with 50% override feed (8000
mm /min), then it applies the limitation due to the axis feed limit.

45004607K 132
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3 Codes that modify the axes reference system


The commands in this class allow the change of the Cartesian reference system in which the profile is
programmed.

COMMAND FUNCTION

SCF Scale factor


MIR Mirror machining
ROT Active plane rotation
UAO Absolute origin
UTO Temporary origin
UIO Incremental origin
RQO Origin requalification

When active, the following functions are executed in this sequence:


SCF - G70/G71 - MIR - ROT – MODIFY ORIGINS.

45004607K 133
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.1 SCF – Scale Factors


The SCF command assigns a scale factor to programmed axis dimensions. The control applies the scale
factors to the axes specified in the SCF command.

Syntax

(SCF [axis1value1, . . . , axis12value12])


Or
(SCF [,value])

where:
value1 . . .value12 Programs the scale factor. Scale factor can be programmed directly with a decimal
number or indirectly with an E parameter.

axis1 . . . axis12 Axis name and value. It must be one of the axes configured on the system. The
control will apply the scale factor on the specified axis.

Characteristics:
You can specify up to twelve axes in the SCF command. The control cancels scaling for axes that are not
specified in the command. A SCF command programmed without a scale factor or axes cancels scaling
for all axes.

Example:
.
.
.
(SCF, 3) Applies a 3 scale factor to the programmed dimensions for all configured axes.
.
.
(SCF, X2.5, Y3) Applies a scale factor of 2.5 to the programmed dimensions of the X axis and 3 to
the Y axis and deactivates scaling for all other axes.
(SCF) Deactivates scaling for all axes.

The system RESET disables the scale factor for all axes

45004607K 134
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.2 MIR – Using Mirror Machining


The MIR command reverses (mirrors) the programmed direction of motion for the axes you specify in the
command referred to the current origin.

Syntax

(MIR [, axis1, . . . , axis12])

where:
axis1. . .axis12 Is the name of the axis to be moved in mirror.

Characteristics:
You can program up to twelve axes in the MIR command. Program an axis only once per each MIR
command. If a given axis is not programmed in MIR, any mirror function for that axis will be turned off.
If no axis is programmed in the MIR command, the mirror function will be reset for all configured axes.
The control mirrors the programmed axis move with respect to the current origin, applying the mirror
function from the first motion block including that axis after the MIR command.
If you use plane rotation (ROT) in conjunction with the mirror (MIR) command, the control processes
them in the following order: MIR then ROT.

The system RESET disables the MIR command for all axes. It is equivalent to programming (MIR)
without parameters.

Example 1:

The following example shows how mirror machining works.

(MIR,X) (MIR)
3 4 4 3

2 1 1 2

0 X
2 1 1 2

3 4 4 3
(MIR,X,Y) (MIR,Y)

. Mirroring not active. Moves occurring the first quadrant. Moves referred to the
current origin.
.
N24 (MIR,X) Mirroring active for the X axis only. Programmed +X moves generate a move shown
in the 2nd quadrant.
.

45004607K 135
Prima Electro S.p.A. OPENcontrol – Programming manual

.
.
N42 (MIR, X, Y) Mirroring active for the X and Y axes. Result of programmed moves
. shown in the 3rd quadrant.
.
.
N84 (MIR, Y) Mirroring active for the Y axis and inactive for the X axis. Moves in the 4th quadrant.
.
.
.
N99 (MIR) Mirroring inactive for all axes. Moves in the 1st quadrant.

Example 2:
This example shows how to use the MIR command. Also note the use of RPT and ERP.

90 40 40 90

Program:
N199 (DIS."MILLING CUTTER D =16")
N200 S1500 T8.8 M6
N201 (RPT, 2)
N202 G X90 Y20 M3
N203 Z-100
N204 G1 Z-105 F150
N205 X40 F200
N206 G2 Y60 I40 J40
N207 G1 X90
N208 G Z-100
N209 (MIR, X)
N210 (ERP)
N211 (MIR)
N212 Z

45004607K 136
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.3 ROT – Interpolation plane rotation


ROT is a part program command that rotates the active interpolation plane by a programmed angular
value. The centre of rotation is the current origin. ROT can be activated through MDI or as a part
program code.

Syntax

(ROT, angle [, mode])

where:
angle Represents the value of an angle expressed in decimal degrees. You can program the angle
directly with a numerical value or indirectly with an E parameter. Positive angles are
measured CCW from the abscissa of the current interpolation plane. Negative angles are
CW. If the angle is zero plane rotation is disabled.

mode Optional parameter. If mode is set to 0 or not specified the rotation does not interfere
with temporary (UTO) and incremental (UIO) origins applied after the rotation. If it is set
to 1 the rotation does interfere with temporary (UTO) and incremental (UIO) origins
applied after the rotation, meaning that the origin rotates, too.

Characteristics:
The control rotates programmed coordinates beginning with the first block after the ROT command.
Coordinates referred to the machine zero (G79) are not rotated.
If you use axes rotation (ROT) in conjunction with mirroring (MIR), the control performs them in the
following order: MIR first then ROT.

The system RESET disables the plane rotation. It is equivalent to programming (ROT,0).

45004607K 137
Prima Electro S.p.A. OPENcontrol – Programming manual

Example using Mode 0 (or without mode)

Y
(UAO, 1)
(ROT, 30)
(UIO, X100, Y50)

Origin is applied with respect to point 30


100,50 referred to origin 1, the rotation

50
is applied on this new origin.

100 X

Example using Mode 1

Y
(UAO, 1)
(ROT, 30, 1)
(UIO, X100, Y50)

30
Origin is applied with respect to point
100,50 rotated with respect origin 1, the
100
50

rotation is applied on this new origin .

45004607K 138
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 1:
Y

30

50
100 X

Program:
(UTO, 1, X100, Y50) Activates absolute origin 1 with temporary origin (absolute offset)
X100 and Y50
(ROT, 30) Specifies 30 degree rotation CCW referred to temporary origin
.
. Moves in this portion of the program are referred to the temporary
origin and rotated 30 degrees CCW
(UAO, 1) Reactivates absolute origin 1
(ROT, 0) Deactivates rotation by specifying a 0 degree rotation around origin 1

Example 2:
Y

70

25
25
10

20

40
55
22

30 X

Program:
N99 (DIS, "DRILLING D=6")
N100 S2000 F200 T3. 03 M6
N101 (UTO , 1, X30, Y22)
N102 (ROT, 20)
N103 G81 R-90 Z-110 M3
N104 X25 Y25
N105 X40 Y10
N106 X55
N107 X70 Y25
N108 G80 Z
N109 (UAO, 1)
N110 (ROT, 0)
N111 S1000 T4.4 M6

45004607K 139
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 3:
This example shows how to use Plane Rotation (ROT) with Repeat (RPT) and Parametric Programming.

Program:
N148 (DIS, " ...")
N149 S1500 T5.5 M6
N150 E25 =0
N151 (RPT, 8)
N152 ( ROT, E25)
N153 G X40 Y M3
N154 Z0
N155 G29 G1 Z-10 F150
N156 X80 F200
N157 Z-18 F150
N158 X40
N159 G Z0
N160 E25 =E25 + 45
N161 (ERP)
N162 (ROT, 0)

45004607K 140
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.4 UAO – Using Absolute Origins


The UAO command lets you activate and use one of the absolute origins stored in memory.

Syntax:

(UAO, n [,axis1, . . . , axis12])

where:
n Defines the absolute origin number. It may be an integer between 0 and 100 or an
E parameter. 0 enables the Home Position.
axis1,...,axis12 Is the name of the axis referred to absolute origin n.

Characteristics:
The UAO command allows up to twelve axes. Only one absolute origin can be active at a time for a
specific axis.
When an axis is not specified in the UAO command, it continues to use its currently active absolute
origin. A UAO command programmed without axes (UAO, n) activates origin n for all axes. At power-up,
after a control reset, or with n=0 and no axes, all axes are referred to the home position.
If the program requires different origins for different axes, program a separate UAO command for each
origin required.

The origin values are automatically converted into and displayed in the unit of the current active mode
(G70/G71). The origins are referred to the HOME position that has been characterised in AMP.

Example:

(UAO,1) Activates origin 1 for all axes.


.
. This portion of the program uses origin 1 for all axes.
.
(UAO, 2, X, Y) Activates absolute origin 2 for axes X and Y only.
(UAO, 3, Z) Activates origin 3 for the Z axis.
.
. This portion of the program uses origin 2 for X and Y, origin 3 for Z,
. and origin 1 for all other axes.
(UAO, 1) Reactivates origin 1 for all axes.
.
.
.
(UAO, 0) Reactivates Home position for all axes.

45004607K 141
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.5 UTO – Using Temporary Origins


The UTO command temporarily increments the position of the specified absolute origin by a programmed
amount for each declared axis.

Syntax:

(UTO, n ,axis1 [,axis2 , . . . , axis12])

where:
n Defines the number of the absolute origin to be temporarily modified. It is an
integer from 0 to 100. If n=0, the programmed offset is added to the home position
value.

axis1,...axis12 Is an axis and a dimension. The control treats the dimension as an absolute offset
and adds it to the value of the absolute origin for that axis.

Characteristics:
You must declare at least one axis with a dimension in the UTO block but may declare up to twelve axes
with dimensions. An axis can only be declared once in each UTO command.
The axis dimension in the UTO command must be programmed in the currently active measuring unit
(G70/ G71).
If an axis is omitted from in the UTO block, the current absolute origin for that axis stays active.

Once you activate a temporary origin it stays active until you:


activate a new temporary origin with the UTO command
activate a new absolute origin with the UAO command
perform a control RESET.

If a scale factor (SCF) is set, the control applies it to the UTO temporary origin.

Example 1:
Dimensions can be E parameters as shown in the block below:
(UTO,1,XE100)

45004607K 142
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 2:

Y Y

100

N20

100
N10
01

X
Y
Y
250
50

N30
X 02
N40 X

Program:
N10 (UAO,1) Activates absolute origin 1 for all axes.
.
. In this portion of the program all axes use origin 1.
.
N20 (UTO, 1, X100, Y100) Applies a temporary origin (absolute offset) to origin 1, X100 and
Y100.
.
. In this portion of the program axes use origin 1, with X100
as temporary origin.
N30 (UTO, 2, X-250, Y50) Activates a temporary origin (absolute offset) to origin 2, X-250
and Y50.
.
. This portion of the program uses absolute origin 2, with X- 250
. and Y50 as temporary origin and origin 1 for the other axes.
N40 (UAO, 2) Re-establishes absolute origin 2 for all axes.

45004607K 143
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.6 UIO – Using Incremental Origins


The UIO command causes an incremental shift of the currently active origin for each axis specified in the
command.

Syntax:

(UIO, axis1 [,axis2, . . . , axis12])

where:
axis1,...axis12 Is an axis and a dimension. The control treats the dimension as an incremental
offset and adds it to the value of the current origin for that axis.
Characteristics:
You must declare at least one axis in the UIO command, but you may declare up to twelve axes. The axis
dimension in the UIO command must be programmed with the current measuring unit (G70/ G71).If an
axis is omitted from in the UIO block, the current absolute origin for that axis stays active.

Once you activate an incremental origin for an axis it stays active until you:
activate a new incremental origin for the axis with the UIO command
activate an absolute origin with the UAO command
perform a control reset.
close the plane roto-translation using UPR or UPR, 99 instructions.

If a scale factor (SCF) is set, the control applies it to a UIO incremental origin.

Example:

Program:
N12 (UAO,1) Activates absolute origin 1 for all axes.
N65 (UIO, X20, Y20) Applies an incremental offset of X20 and Y20 from origin 1. Absolute origin 1 for
other axes remains in effect.
N121 (UIO, Y-40) Applies a Y-40 increment to the last origin. The X20 incremental origin remains in
effect.
N180 (UIO, X-45) Applies an X-45 increment to the last origin. The Y-40 incremental origin remains
in effect.
N230 (UIO, Y35) Applies a Y35 increment to the last origin. The X-45 increment remains in effect.
N300 (UAO,1) Restores absolute origin 1 for all axes.

45004607K 144
Prima Electro S.p.A. OPENcontrol – Programming manual

3.3.7 RQO – Requalifying origins


The RQO command lets you requalify, i.e. update and modify, an absolute origin from program. The RQO
command modifies the specified origin by the specified amount for each axis you declare in the block.
The origin must be stored in the origins table.

Syntax:

(RQO, n ,axis1 [,axis2, . . . , axis12])

where:
n Defines the absolute origin number (1 to 100). The absolute origin must have been
stored via user interface. n can be programmed directly with a positive integer
number, or indirectly with an E parameter.

axis1,...axis12 Is an axis address and a dimension. The dimension is the increment added to the
specified absolute origin of the specified axis and can be programmed directly with
a decimal number, or indirectly with an E parameter.

Characteristics:
You must specify at least one axis and its dimension in the RQO command. Up to twelve axes with their
dimensions can be programmed. Program a specific axis only once for each RQO command.
The dimensions specified in the RQO command must be in the default measuring unit. No scale factor
(SCF) must be applied to dimensions programmed in an RQO command.
The origin is requalified both in the origins file (so that the requalification becomes permanent) and in
memory (if the origin is active when the requalification is applied).
In the table of the origins the requalification values are applied in the unit of measure in which the
selected origin is expressed.

In the case of a diametrical axis, the requalification dimension must be programmed in radial terms,
since the dimension is an increment to be added to the value already present in the origin, which is a
radial value.

Example:
(RQO, 3, X (E31)) Modifies absolute origin no 3 for axis X of the value contained in E31.

45004607K 145
Prima Electro S.p.A. OPENcontrol – Programming manual

3.4 Overtravels and protected areas


The commands in this class define the over travel limits and the protected areas as described below.

COMMAND FUNCTION

SOL Defines software over travels

DPA Defines protected area

PAE Enables protected area

PAD Disable protected area

45004607K 146
Prima Electro S.p.A. OPENcontrol – Programming manual

3.4.1 SOL – Software over travel


The SOL command defines the axis travel limits, that is the positions over which the axes can not be
programmed. The limits are measured from the current origin. Operating limits defined with the tri-
literal SOL are valid only for programmed axes movements, that is in MDI, AUTO or SEMIAUTO mode and
as a consequence they are not valid for MANUAL axes movement.

Syntax:

(SOL,axis-name,lower-limit,upper-limit[,TCP lower-limit,TCP upper-limit])

where:
axis-name It is the name of the axis whose travel limits must be defined.

lower-limit It is a position for the lower limit. It can be programmed directly with a real
number or through a variable

upper-limit It is a position for the upper limit and it must be greater than the lower limit. It
can be programmed directly with a real number or through a variable

TCP lower-limit It defines the lower operating limit on the tool tip. It can be programmed directly
with a real number or through a variable

TCP upper-limit It defines the upper operating limit on the tool tip and it must be greater than the
lower limit. It can be programmed directly with a real number or through a
variable

Characteristics:
This command can be executed only if the physical operating limits are already active, if not the system
will report the error 23/355.
If the programmed software overtravels exceed the physical operating limits an error is generated
Software overtravels must be programmed in the measuring unit (G70/G71) that is active when the SOL
command is programmed. Active scale factors (SCF) are applied to the operating limits.

The system RESET cancels the command SOL restoring the limits defined in
AMP.

45004607K 147
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:

Program:
(SOL, X, -300, 300)
200
.
.
0 .
X (SOL, Y, -200, 200)

200
300

300
0

45004607K 148
Prima Electro S.p.A. OPENcontrol – Programming manual

3.4.2 DPA – Define Protected Area


DPA command defines a protected area, that is to say it defines an area inside which (or outside which)
no movement can be programmed. At activation time is possible to choose whether the area extends
into the third dimension or not.

Syntax

(DPA, n, name, value)

where:
n identification number for the area (1-4)

name name of the file containing area description.


Name is specified directly using a string of characters, or indirectly using a string variable
preceded by the key ‘?’

value specifies if the tool is confined inside the protected area or outside of it.
0: the tool cannot exit from protected area
1: the tool cannot enter the protected area

Characteristics:
Up to four protected areas can be defined either by part program or by the PLC.
Each area is defined with respect to an absolute reference system. At activation time the area will be
linked to the current reference system.
The part program describing the protected area has to respect the following rules:
The X axis describes the abscissas and the Y axis describes the ordinates. It is not necessary to
define X and Y axes within the process.
The first block of the part program defines the starting point of the protected area. This block
should contain both abscissa and ordinate of the point. No G2 or G3 code is allowed in this block.
G0, G1, G2 and G3 are the G codes allowed in the part program. No other G codes can be used
No three-literal or PLC commands are allowed
If no G code has been specified, then all blocks are assumed to describe linear elements
If the distance between two following points is lower than the null movement threshold the area
is not valid

The surface describing the protected area has to:


be convex
be closed. If the surface described in the part program is not closed, the control will add a
movement between the first and last point to close it. If the distance between the starting point
of the area and the last of the final entity is lower than the null movement threshold, the
surface is considered closed and the final point is considered equal to the starting one.
be defined by no more than 10 circular or linear elements. When the described profile is open
the number of allowed elements is reduced to 9, since the control will add a tenth “closing”
element

45004607K 149
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:

Y
150

100
Protected area

Closing element

30

0
X
0 100 150 170 220

Program:
....
N10(DPA,1,PROGRAMS\PUNCH.TXT,1) PUNCH.TXT
.... N1 X100Y30
N2 Y100
N3 G3X150Y150R50
N4 G1X170
N5 G3X220Y100R50
N6 Y30

45004607K 150
Prima Electro S.p.A. OPENcontrol – Programming manual

3.4.3 PAE – Protected Area Enable


PAE command activates checks for violation of a protected area.
When check of a protected area is enabled the control verifies, before starting a programmed linear or
circular movement, that it will not interfere with the enable protected areas.

Syntax:

(PAE, n [,comp] [,origin] [,axis3 inf, axis3 limit sup] [,ax1 transl] [,ax2 transl] [,ax3 transl])

where:
n identification number for the area already defined using DPA command (1-4)

comp Specifies if the protected area should take into account current tool radius (or machining
allowance):
0: tool radius and machining allowance are ignored
1: protected area should be “adjusted” to take into account tool radius and machining
allowance
By default protected areas are not adjusted.

origin Specifies the reference origin of the protected area.


If the parameter is not specified, the control assumes that the area is defined with respect
to the current origin.

axis3 inf
axis3 sup Name of the axis used to extend the area in the third dimension and upper and lower
bounds of the area. If this pair of parameters is specified then the area has bounds in the
third dimension and violation checks are performed in space.
By default the violation check is performed by projecting the movement onto the
interpolation plane.

ax1 transl
ax2 transl
ax3 transl Axis name and translation value. It specifies the value of a translation of the protected
area. The axes names have to correspond to current abscissa and ordinate and to the axis
optionally specified in the parameters couple axis3.

Characteristics:
At activation time the protected area is referred to the active interpolation plane and to the origin and
translation optionally specified. For instance if the active plane is YX, then the system will associate the
abscissas of the protected area to Y axis and the ordinates to the X axis.
If the parameter compens is enabled (set to 1) then the extension of the protected area will change
depending on tool radius and/or machining allowance.
If the parameters axis3 inf and axis3 sup are not specified the system will check for violation of the
protected area by projecting every movement on the current interpolation plane.

45004607K 151
Prima Electro S.p.A. OPENcontrol – Programming manual

Examples:
(PAE,2,,,C-10,C20) it enables a check for violations on protected area number 2. Tool radius
will not be taken into account, area is referred to the current origin, there
is no translation of the area. The area is considered as a 3D area, its limits
are -10 and 20 along C axis.

AREA.TXT
Y
N1 X40 Y10
45
N2 X100
35 N3 Y35
N4 X80 Y45
N5 X60
N6 X40 Y35
10 N7 Y10

0 X

0 40 60 80 10
0
(PAE,4,,6) it enables a check for violations of protected area number 4. Tool radius
will not be taken into account, area is referred to origin number 6, there is
no translation of the area.
AREA.TXT
N1 X40 Y10
N2 X100
N3 Y35
N4 X80 Y45
Y
N5 X60
0 20 40 60 80 N6 X40 Y35
N7 Y10
40
30

20 5
X
5 0
Origin 6

(PAE,1,1,,,,X-5) it enables a check for violations of protected area number 1. Tool radius
will be taken into account, area is referred to current origin, the area is
translated by 5 (mm or inches depending on current configuration).
AREA.TXT
Compensated area
N1X40Y10
Rtool = 5
Y N2X100
45 N3Y35
35 N4X80Y45
N5X60
N6X40Y35
10 N7Y10

X
0
0 35 55 75 95

45004607K 152
Prima Electro S.p.A. OPENcontrol – Programming manual

3.4.4 PAD – Protected area disable


PAD command disables check for violation on one or all the protected areas.

Syntax:

(PAD[, n])

where:
n Is the identification number of an area already defined by a DPA command and
enabled via a PAE command.
Characteristics:
This command disables the check for violation of an active protected area.
If no parameter is given all enabled areas are disabled.

The RESET command does not disable the enabled protected area. Protected areas have to be
disabled explicitly.

Example:
(PAD,3)
This command disables checks on protected area number 3.

45004607K 153
Prima Electro S.p.A. OPENcontrol – Programming manual

3.5 Changing drive and axes parameters


The commands in this class allow the CNC read/write parameters associated with the axis configuration
and the drive associated with the axis itself.

COMMAND FUNCTION

CPA Reads/writes a CNC parameter associated with an axis


CPD Reads/writes a parameter associated with the axis drive

3.5.1 CPA – Reading/writing of an axis parameter


The three-letter code CPA reads/writes an axis parameter. The available parameters are both those
configured in the AMP and additional parameters not configured in AMP.

Syntax:

(CPA, mode, axis, parameter, value)

where:
mode is the mode used to access the parameter, the valid values are:
R: read
W: write

axis It can be the numerical axis identifier or the axis name. When axis is specified by name
(alphabetical character), the axis must belong to the current process, otherwise the
system displays a format error. If the axis is specified using the identifier, it can be
specified directly with an using an integer value or indirectly with a variable.

parameter Is the number identifying the axis parameter. The list of numbers available and the
corresponding parameters are specified below.

value Depending on the required access mode, it is the variable where the value read from the
specified axis parameter (read access) will be stored or the value to be written to the
selected axis parameter (write access).
For read access, value must be a variable, but for write access it can be either a number
or a variable.

Characteristics:
The parameter change made by part program is enabled starting from the following line. The parameter
change is temporary as the default values defined in AMP are restored when the control is rebooted.
The Reset command does NOT restore the configured value of a parameter changed with the CPA
command.
Some parameters are read only, the table below specifies which parameters are read and write or read
only.

45004607K 154
Prima Electro S.p.A. OPENcontrol – Programming manual

Parameter Access
Mnemonic PLC Parameter description
code type
1 fn_AXTYPE Axis type R
2 fn_AXCLOCK Axis clock time R
Ratio between the frequency of the
3 fn_CLOCKRAT interpolator clock associated with the axis R
and the axis clock frequency
Indicates if the axis is digital (value 1) or
4 fn_DIGITAL_AXIS R
analog (value 0).
5 fn_LINEAR_OPTICAL_ENCODER Linear scale present R/W
Indicates if the channel A polarity of the
6 fn_CHANNEL_A_POLARITY_INV R/W
encoder is inverted or not.
Indicates if the channel B polarity of the
7 fn_CHANNEL_B_POLARITY_INV R/W
encoder is inverted or not.
Indicates if the channel Z polarity of the
8 fn_CHANNEL_Z_POLARITY_INV R/W
encoder is inverted or not.
Indicates if the direction count is inverted or
9 fn_DIRECTION_COUNT R/W
not.
Method for detecting the zero marker. It can
10 fn_MARKER_DETECTION R/W
be a level (value 0) or an edge (value 1)
11 fn_RAPID_TRAVERSE_FEED Rapid traverse feed R/W
12 fn_RAPID_ACCELERATION Rapid acceleration R/W
13 fn_MANUAL_FEED Manual or G1, G2, G3 Feedrate R/W
14 fn_MANUAL_ACCELERATION Manual acceleration R/W
15 fn_RAPID_JERK Rapid jerk R/W
16 fn_WORKING_JERK Working jerk R/W
17 fn_ELECTRICAL_PITCH Electrical pitch value R/W
18 fn_MECHANICAL_PITCH Mechanical pitch value R/W
19 fn_ROLLOVER_PITCH Rollover pitch R/W
Maximum voltage for rapid traverse
20 fn_RAPID_TRAVERSE_VOLTAGE R/W
(maximum axis feed)
21 fn_MAXIMUM_FEED Maximum axis feed R/W
22 fn_HOME_POSITION_FEED Feedrate for marker search after limit switch R/W
23 fn_NULL_OFFSET_VALUE Null Offset value R/W
24 fn_HOME_POSITION_VALUE Home position value R/W
25 fn_HOMING_DIRECTION Homing direction search R/W
26 fn_PERCENT_OF_VFF VFF percentage R/W
27 fn_UPPER_SW_OVERTRAVEL Upper software overtravel R/W
28 fn_LOWER_SW_OVERTRAVEL Lower software overtravel R/W
29 fn_SERVO_LOOP_GAIN Servo loop gain R/W
30 fn_STAND_STILL_LOOP_GAIN Loop gain position at standstill R/W
31 fn_POS_ERROR_STAND_STILL Position error at standstill R/W
32 fn_POS_ERROR_WITH_VFF Error position with VFF R/W
33 fn_POS_ERROR_WITHOUT_VFF Error position without VFF R/W
34 fn_IN_POSITION_BAND Position tolerance R/W
35 fn_IN_POSITION_WAIT Input threshold tolerance R/W
36 fn_IN_POSITION_WINDOW Maximum waiting time for input tolerance R/W
37 fn_AXIS_BACKLASH Backlash value R/W

45004607K 155
Prima Electro S.p.A. OPENcontrol – Programming manual

Parameter Access
Mnemonic PLC Parameter description
code type
38 fn_DEAD_ZONE Dead zone value R/W
39 fn_DRIVER_ADDRESS Drive address R
40 fn_HOMING_TYPE Homing cycle type selected R/W
41 fn_ADDITIONAL_SERVICE Additional services R/W
42 fn_MOTOR_TRANSDUCER Motor transducer R
43 fn_PROBING_CONFIGURATION Probing configuration R/W
44 fn_SPINDLE_ZERO_OFFSET Determines the spindle orientation position R/W
45 fn_SPINDLE_WITH_RAMPS Determines spindle with ramp R/W
Determines the axis whose position will
46 fn_SPINDLE_CSS_MASTER R/W
control the constant speed
47 fn_SPINDLE_REV_TIME_GEAR1 Maximum time for spindle reversal (Gear 1) R/W
48 fn_SPINDLE_REV_TIME_GEAR2 Maximum time for spindle reversal (Gear 2) R/W
49 fn_SPINDLE_REV_TIME_GEAR3 Maximum time for spindle reversal (Gear 3) R/W
50 fn_SPINDLE_REV_TIME_GEAR4 Maximum time for spindle reversal (Gear 4) R/W
51 fn_SPIN_POSERR_STANDSTILL Position error at spindle zero speed R/W
52 fn_SPINDLE_SPEED_GEAR1 Spindle speed (Gear 1) R/W
53 fn_SPINDLE_SPEED_GEAR2 Spindle speed (Gear 2) R/W
54 fn_SPINDLE_SPEED_GEAR3 Spindle speed (Gear 3) R/W
55 fn_SPINDLE_SPEED_GEAR4 Spindle speed (Gear 4) R/W
56 fn_SPINDLE_VOLTAGE_GEAR1 Voltage for maximum spindle speed (Gear 1) R/W
57 fn_SPINDLE_VOLTAGE_GEAR2 Voltage for maximum spindle speed (Gear 2) R/W
58 fn_SPINDLE_VOLTAGE_GEAR3 Voltage for maximum spindle speed (Gear 3) R/W
59 fn_SPINDLE_VOLTAGE_GEAR4 Voltage for maximum spindle speed (Gear 4) R/W
60 fn_SPINDLE_GAIN_GEAR1 Spindle servo loop gain (Gear 1) R/W
61 fn_SPINDLE_GAIN_GEAR2 Spindle servo loop gain (Gear 2) R/W
62 fn_SPINDLE_GAIN_GEAR3 Spindle servo loop gain (Gear 3) R/W
63 fn_SPINDLE_GAIN_GEAR4 Spindle servo loop gain (Gear 4) R/W
64 fn_OFFSET_BETWEEN_MARKERS Offset between Markers R/W
65 fn_SKEW_ERROR_MIN Skew error R/W
66 fn_SKEW_ERROR_MAX Maximum skew error R/W
67 fn_SKEW_GAIN Skew gain R/W
68 fn_DRIVE_STATUSW Drive status word R
69 fn_OS3_DRIVE_WARNINGS Drive warning R
70 fn_AXIS_IOSTAT Status of the I/O associated with the drive R/W
71 fn_ACT_MICRO_MARKER_DIST Distance between markers and zero switch R
Maximum allowable distance between zero
72 fn_MAX_MICRO_MARKER_DIST R/W
switch and marker
Identifier of the process to which the axis
73 fn_PROCESS_NUMBER R
belongs
74 fn_AXIS_SHARING Axis shared or exclusive R
75 fn_TRANSDUCER_CONFIG Determines transducer configuration R/W
76 fn_ACTIVE_GEAR_NUMBER Active spindle gear range R
77 fn_ZEROSHIFT1 Zeroshift 1 value R/W
78 fn_ZEROSHIFT2 ZeroShift 2 value R/W
79 fn_AXIS_BACKLASH_TIME Application time for backlash R/W
80 fn_TRANSDUCER_ID Axis transducer identifier R

45004607K 156
Prima Electro S.p.A. OPENcontrol – Programming manual

Parameter Access
Mnemonic PLC Parameter description
code type
81 fn_CONVERTER_ID Axis converter identifier R
82 fn_SETRESRIF Reported Axis status R/W
83 fn_RAPID_TIME_MIN_RAMP Ramp time rapid acceleration R/W
84 fn_WORKING_TIME_MIN_RAMP Ramp time working acceleration R/W
85 fn_RAPID_DECELERATION Rapid deceleration value R/W
86 fn_MANUAL_DECELERATION Manual deceleration value R/ W
87 fn_RAMP_MODALITY Axis ramp type R/W
88 fn_GET_MASTER_SLAVE Master axis identifier associated with slave R
89 fn_AXIS_INTERFACE_TYPE Axis interface type R
90 fn_BW_ENABLE Broken wire enabled or disabled R/W
91 fn_BW_TIME Broken wire application time R/W
92 fn_EDGE_LEAP_FEED Maximum velocity jump on corner value R/W
93 fn_GET_LAST_ERROR real-time axis error value R
94 fn_SPINDLE_SS_GAIN_GEAR1 Spindle stand still servo loop gain (Gear 1) R/W
95 fn_SPINDLE_SS_GAIN_GEAR2 Spindle stand still servo loop gain (Gear 2) R/W
96 fn_SPINDLE_SS_GAIN_GEAR3 Spindle stand still servo loop gain (Gear 3) R/W
97 fn_SPINDLE_SS_GAIN_GEAR4 Spindle stand still servo loop gain (Gear 4) R/W
98 fn_SPIN_ORIENT_SPEED_GEAR1 Speed for spindle orientation (Gear 1) R/W
99 fn_SPIN_ORIENT_SPEED_GEAR2 Speed for spindle orientation (Gear 2) R/W
100 fn_SPIN_ORIENT_SPEED_GEAR3 Speed for spindle orientation (Gear 3) R/W
101 fn_SPIN_ORIENT_SPEED_GEAR4 Speed for spindle orientation (Gear 4) R/W
102 fn_SPIN_ORIENT_ACCEL_GEAR1 Acceleration for spindle orientation (Gear 1) R/W
103 fn_SPIN_ORIENT_ACCEL_GEAR2 Acceleration for spindle orientation (Gear 2) R/W
104 fn_SPIN_ORIENT_ACCEL_GEAR3 Acceleration for spindle orientation (Gear 3) R/W
105 fn_SPIN_ORIENT_ACCEL_GEAR4 Acceleration for spindle orientation (Gear 4) R/W
106 fn_SPIN_STOP_THRESH_GEAR1 Speed threshold for spindle stop (Gear 1) R/W
107 fn_SPIN_STOP_THRESH_GEAR2 Speed threshold for spindle stop (Gear 2) R/W
108 fn_SPIN_STOP_THRESH_GEAR3 Speed threshold for spindle stop (Gear 3) R/W
109 fn_SPIN_STOP_THRESH_GEAR4 Speed threshold for spindle stop (Gear 4) R/W
110 fn_SPIN_IN_POS_BAND Spindle in position band value R/W
111 fn_SPIN_IN_POS_WAIT Spindle in position wait time R/W
112 fn_SPIN_IN_POS_WINDOW Spindle in position window wait time R/W
113 fn_ ENABLE_SERVO_MODE Servo loop type for axis enabling R/W
114 fn_SKEW_RECOVERY_VEL Split axis skew recovery velocity R/W
115 fn_DRIVE_CONTROLW Drive Control Word R/W
116 fn_MIN_AX_VELOCITY Minimum axis velocity R/W
117 fn_MIN_AX_POSITION Minimum axis position threshold R/W
118 fn_DEN_MEC_PITCH Mechanical pitch denominator R/W
119 fn_ZEROSHIFT1_SETUP Zeroshift 1 value setup R/W
120 fn_ZEROSHIFT2_SETUP Zeroshift 2 value setup R/W
121 fn_RAPID_DJERK Rapid DeJerk value R/W
122 fn_WORKING_DJERK Working DeJerk value R/W
123 fn_RAPID_TIME_MIN_DRAMP Rapid deceleration ramp time R/W
124 fn_WORKING_TIME_MIN_DRAMP Work deceleration ramp time R/W
125 fn_REFERENCE_OFFSET Converter offset R/W
126 fn_EMERG_DECELERATION Emergency deceleration value R/W

45004607K 157
Prima Electro S.p.A. OPENcontrol – Programming manual

Parameter Access
Mnemonic PLC Parameter description
code type
127 fn_UPPER_SW_OVERT_TTIP Upper tool tip software overtravel R/W
128 fn_LOWER_SW_OVERT_TTIP Lower tool tip software overtravel R/W
129 fn_DRIVER_SUBADDRESS Drive sub-address R
130 fn_INTERP_POINT Interpolated point (for simulation) R/W
131 fn_LEAP_ACCE Maximum acceleration leap on tangent R/W
Time required to calculate the new position
132 fn_SPINDLE_SYNCH_DELAY target during the transition phase from feed
loop to position loop
133 fn_ECAT_BRIDGE_PED_MODE Pilot mode for Pulse & Direction axes
Enables the use of flags to control
134 fn_ENAB_TGS_FOR_DRIVE Mechatrolink III axes (parametersi
135/136/137/138)
Enables the passage to the drive of the
135 fn_ENAB_VFF_FOR_DRIVE contribution of VFF calculated by the
inerpolator
Enables the passage to the drive of the
136 fn_ENAB_AFF_FOR_DRIVE contribution of VFF calculated by the
inerpolator
137 fn_CONV_AFF_FOR_DRIVE AFF conversion factor
138 fn_PERC_AFF_FOR_DRIVE Percentage of value applied for AFF
In the axes mechatrolink III and OS-Wire
enables the passage to the drive of the
139 fn_CORR_VFF_FOR_DRIVE contribution of feed and acceleration due to
the application of backlash, zeroshift and
geometric offset
In the axes mechatrolink III and OS-Wire
140 fn_OEMC_VFF_FOR_DRIVE enables the passage to the drive of an feed
contribution
In the axes mechatrolink III and OS-Wire
141 fn_OEMC_AFF_FOR_DRIVE enables the passage to the drive of an
acceleration contribution
142 fn_AXIS_BOARD_INDEX Index of the board to which belongs the axis

45004607K 158
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 1:
To change the rapid acceleration (RAPID_ACCELERATION) configured in AMP by writing 2500 mm/sec2 for
the Y axis identified as 2 in the current process. The following commands are equivalent:

(CPA, W, E0, E1, E2) where E0 = 2, E1 = 12 and E2 = 2500


(CPA, W, 2, 12 , E2)
(CPA, W, Y, 12 , 2500)

3.5.2 CPD – Reading/writing of a drive parameter


The CPD command reads or writes a drive parameter associated with a digital axis.

Syntax:

(CPD, mode, axis, parameter, value, format , mask])

where:
mode represents the access mode parameter, the valid values are:
R: read access
W: write access

axis It can be the numerical axis identifier or the axis name. where axis is specified by name
(alphabetical character), this must belong to the current process, otherwise the system
displays a format error. If the axis is specified using the identifier, it can be specified
directly with an integer or indirectly with a variable.

parameter Is the numerical code identifying the parameter drive. The list of valid codes is available
on the drive manual.

value Depending on the requested access mode it represents the variable where to write the
value of the read value of therequested parameter axis (access in reading) or the value
written on the axis (access in writing).
In case of access in reading, value must be a variable, while in case of access in writing it
can be indifferently a number or a variable.

format For drives with interface Mechatrolink™, set as follow:


Value(DEC) Description
33 Integer format not signed on 16 bits sequence
34 Integer format with sign on 16 bits sequence
49 Integer format not signed on 32 bits sequence
50 Integer format with sign on 32 bits sequence

Setting bit 7 to 1 (mask 0x80) of format, the parameter will be written in the EEPROM of
the drive.
For drives with different interface this field has no meaning, set value 0

45004607K 159
Prima Electro S.p.A. OPENcontrol – Programming manual

mask It can be used for YASKAWA drives having a Mechatrolink interface. This is the mask for
writing the drive parameter. It is an optional field, if programmed it must be an
hexadecimal code of 8 characters maximum, preceded with 0x. If the mask is specified,
the parameter will be written only where the corresponding bits are set to 1; if all the
mask bits are 0, the parameter will be completely reset; if the mask value is 0xFFFFFFFF,
the entire parameter will be written.
The default value is 0xFFFFFFFF, therefore if a mask is not specified, all parameter bits
will be written.
For other drive types, the mask has no effect.

Example 1:
e.g. to read the speed loop proportional loop gain parameter (cod. param. = 5004) configured for the Z
axis (id = 3) on an OS-Wire drive. The following commands are equivalent:
(CPD, R, E0, E1, E2, E3) where E0 = 3, E1 = 5004 and E3 = 0
(CPD, R, 3, 5004, E2, 0)
With this command:
(CPD, R, 3, 5004, 2.5, 0) -> the system displays a format error because there is no variable specified for
the destination.

Example 2
e.g. to write the Pn50A parameter “Input Signal Selection 1” of the Sigma-V drive connected to the Z
axis:
(CPD, W, Z, 1290, 32768, 0, 0XF000)
The “P-OT Signal Mapping” field is set to 8 (fourth nibble corresponding to 32768) of the Pn50A
parameter (1290 in decimal) without changing other fields, writing is to RAM and the parameter is 2
bytes long (format = 0).

45004607K 160
Prima Electro S.p.A. OPENcontrol – Programming manual

4. TOOL AND TOOL OFFSETS PROGRAMMING

This chapter explains how to program tools and tool offsets. All the functions described in this chapter
must be handled by the PLC.

The system integrator develops the interface between the control and the machine tool, as well
as the application-specific T and M functions and also the code of the function used for
requalifying and pre-setting: RQT and RQP.
For more information about these T functions you must refer to the machine tool documentation
provided by the machine manufacturer.

You can also find further information about M functions in Chapter 7.

Neither “RESET” nor “system power off” disable the offset values applied using "h" or
T functions.
The PLC decides whether the offset values are disabled by the RESET procedure.

45004607K 161
Prima Electro S.p.A. OPENcontrol – Programming manual

4.1 T address for tool programming


The T address defines the tool and the tool offset used in a given machining process.

Syntax:

T [tool] [.tool offset]

where:
tool is the ASCII code of the tool, it is maximum of 32 characters long. This can be programmed
explicitly (with an integer) or implicitly with a local or system variable. If you program it
as a whole number, the system converts it automatically into a string.

tool offset is the tool offset number and ranges from 0 to 300.
It can be an integer or an E parameter

Characteristics:
For the sake of compatibility with OSAI Series 10, the tool code can be programmed in numerical format
of up to 12 digits. The numerical format may be programmed implicitly.

The following examples show different ways of programming tools and offsets.

The following examples show different ways to program tools and offsets.

T1 Selects tool 1 and the tool offset defined in the tool table.
T "U01".1 Selects tool U01 and tool offset 1.
T(SC.5).0 Selects the tool whose name is specified in the five SC variables,
starting from address 0, and without offset.
T.0 Removes the tool offset from the active tool.
T0 Disables the active tool and tool offset.
T.1 Enables tool offset 1 with the active tool.
T1234567890123 Shows a syntax error: tool code programmed in numerical format with more than
12 digits.
T”1234567890123” Selects tool 1234567890123 and the offset given in the tool table.
T(!VbUser).1 Selects the tool identified by user variable !VbUser, string type, and an offset of 1.
T(LS).2 Selects the tool identified by user variable LS and the offset of 2.
TE0.1 Selects the tool identified by user variable E0 and the offset of 1.

45004607K 162
Prima Electro S.p.A. OPENcontrol – Programming manual

4.2 T address for multi–tool programming


The T address defines the tools to be used simultaneously for a given machining process.

Syntax:

T [master] [.tooloffset] / { slave | [slaveini , slavefin] ] | [[ varname, num_var ]] } ,... { slave | [slave ini ,
slavefin] ] | [[ varname, num_var ]] }

where:
master is the ASCII code of the tool, it is 32 characters maximum long. This code can be
programmed in implicit way (with a local or a system string variable) or in explicit
way with a string or with an integer. If an integer is programmed, whose variation
field must be between 0 and 999999999999, the system will immediately convert it
into a string.

tool offset is the tool offset number associated to the toll master. It can be an integer or a
local or system variable ranging from 0 to 300.

slave is a tool number. It can be an integer or a local or system variable.

slaveini is a tool number representing the first of a series of tools. This can be an integer
or a local or system variable.

slavefin is a tool number representing the last of a series of tools. This can be an integer or
a local or system variable.

varname is a local or system variable containing the first of a series of tools.

num_varie is an integer or a local or system variable representing the number of variables to


take into consideration starting from "variable".

Characteristics:
Multi-tool programming is used on perforating machines.
The management of tools associated with the T code is handled by PLC that receives the values of the
programmed tools. Accepted values for the slave tool codes vary from 0 to 65535. Maximum number of
slave tools that can be simultaneously programmed is 64.

As showed above, the list of tools to be used can be specified in three different formats:

1.Single Format
Examples:
T1.2/ 50 tools 1, 50
offset 2
T1.2 /20,33,45,46 tools 1,20,33,45,46
offset 2

45004607K 163
Prima Electro S.p.A. OPENcontrol – Programming manual

2. Numerical Sequence Format


This simplifies programming of multiple tools by using sequential code.

Examples:
T1.3 /[ 30, 35 ] equivalent to T1.3 /30,31,32,33,34,35
T1.3 /[ 56, 51 ] equivalent to T1.3 /56,55,54,53,52,51
T1.3 /[ 50, 52 ], [ 10,13 ] equivalent to T1.3 /50,51,52,10,11,12,13

As you can see, the starting tool number can be > or < the final tool number. In the first instance the
tools codes are considered in ascending order while in the second instance in descending order.

3. Variable Sequence Format


This is based on an array of variables from which to select the tool numbers.

Example:
E0 = 1, 30, 45 load in E0, E1, E2 the values 1, 30, 45
T1.2 /{ E0, 3 } equivalent to T1.2 /E0, E1, E2 & to T1.2 /1, 30, 45
E0 = 1, 30, 45 load in E0, E1, E2, E3 the values 1, 30, 45
SN0 = 4, 77 load in SN0, SN1 the values 4, 77
SN4 = 3 load in SN4 the value 3
T1.2 /{ E0, SN4 }, { SN0,2 } equivalent to T1.2 /E0, E1, E2, SN0, SN1 & to T1.2 /1,30,45,4,77

The three formats shown above may be mixed.

Example:
E0 = 29, 56 load in E0, E1 the values 29, 56
SN6 = 2 load in SN6 the value 2
T1.3 /[ 7, 10 ], 15, { E0, SN6 } equivalent to T1.3 /7,8,9,10,15,29,56

4.3 TMT – Tool parameter for PLC


The variable TMT is a real type variable passed to the PLC during the execution of a T code.

Syntax

TMT = value

where:
value it is a real value expressed directly using a real number or indirectly using a local or
system variable.

Characteristics:
The variable TMT contains the real numerical value passed to the PLC, together with other information,
when executing a T code.

45004607K 164
Prima Electro S.p.A. OPENcontrol – Programming manual

4.4 h address
The h address permits the application of a tool offset both in point-to-point (G29) and in continuous
(G26-G27-G28) modes.

Syntax

h [tool offset]

where:
tool offset is the tool offset number. It can be an integer or a local or system variable between 0 and
300.

Characteristics:
The "h" address must be programmed by itself in the part program block. An "h" address disables the
active offsets programmed with a "T" command.

The axes to which tool offset is applied are those programmed in a "T tool.offset" command. The offset
values are applied to the axes when the system reads the "h" address in the part program. The "h"
address does not need synchronisation either with the logic or with the axes moves.

If “h” is not synchronized, it is displayed when it is read by the part program and not when it is
implemented.
The same occurs in the case of synchronous uses of “h”, as in G96. In this case, the application
of “h” must be synchronized with “#” for the spindle revolutions to function correctly.

Programming "h" without tool offset or with tool offset=0 will disable the tool offset value programmed
with previous "h tool offset" command.
RESET does not disable the correction values applied with "h" address.

The PLC decides whether or not to apply offset values after a RESET.

The offset values programmed with h address are usually displayed in the field reserved for the T
address.

The offset table fields from which offset values are read are as follows:
Offset value Offset table fields
Length 1 Length 1 + Current requalification length 1
Length 2 Length 2 + Current requalification length 2
Length 3 Length 3 + Current requalification length 3
Length 4 Length 4 + Current requalification length 4
Length 5 Length 5 + Current requalification length 5
Diameter 1 Diameter 1 + Current requalification diameter 1
Diameter 2 Diameter 2 + Current requalification diameter 2

45004607K 165
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 1:
.
.
.
T[n].x programs a tool and a tool offset
.
.
hy cancels the x tool offset and enables the y tool offset
.
.

Example 2:
.
.
.
hy enables y tool offset
.
.
T[n].x cancels the y tool offset enabled by h
.
.

Example 3:
.
.
.
hx
.
.
hy cancels the programmed x tool offset and enables y
.
.

45004607K 166
Prima Electro S.p.A. OPENcontrol – Programming manual

4.5 AXO – Axis Offset Definition


This command associates the length offset values contained in the offset table with the machine axes.

Syntax

(AXO, [[-] [axis1]] [, [ [-] [axis2] ] [, [ [-] [axis3] ] [,[ [-] [axis4] ] [,[ [-] [axis5] ] ] ] ])
(AXO)

where:
axis1 name of the axis associated with length offset 1 in the offsets table. If the "-" sign
is written before the name, the offset value is used with the inverse sign.
If omitted, length 1 of the offset is not associated with any axis.

axis2 name of the axis associated with length offset 2 in the offsets table. If the "-" sign
is written before the name, the offset value is used with the inverse sign.
If omitted, length 2 of the offset is not associated with any axis.

axis3 name of the axis associated with length offset 3 in the offsets table. If the "-" sign
is written before the name, the offset value is used with the inverse sign.
If omitted, length 3 of the offset is not associated with any axis.

axis4 name of the axis associated with length offset 4 in the offsets table. If the "-" sign
is written before the name, the offset value is used with the inverse sign.
If omitted, length 4 of the offset is not associated with any axis.

axis5 name of the axis associated with length offset 5 in the offsets table. If the "-" sign
is written before the name, the offset value is used with the inverse sign.
If omitted, length 5 of the offset is not associated with any axis.

no parameter (AXO) without parameters restores the default association configured in AMP

Characteristics:
The default association between length offsets and characterised axes is made in the AXIS GENERAL INFO
page of the AMP configuration.
This association can be changed with the AXO command.
The pre-set values introduced in the offset tables always have a positive sign. The AXO command can
associate these values with axes bearing negative signs.

45004607K 167
Prima Electro S.p.A. OPENcontrol – Programming manual

ATTENTION: The association axis/length offset characterized with the AMP is restored
following the command (AXO) or after the control reboot.
RESET does not delete the association axis/tool offset

If the control is rebooted after an AXO command and having an active tool, some misalignemnts
between the axes position seen on the screen and the tool offset can occur. This misalignment
can be avoided reprogramming the AXO command enabled before the shutdown and disabling
the tool offset.

The following are examples of length offset values applied with and without AXO commands:

Example 1:
.
.
.
N1 T1.4 M6 Enables the offset 4 of the tool 1 on the axis associated in characterization to the
length 1 of the offset.
.
.

N100 T0 M6 disables the length offset value applied to the axis.

Example 2:
.
.
.
N1 (AXO,-X,Z) Associates: the value of the length 1 of the offset with negative sign to the X axis, the
value of the length 2 of the offset with positive sign to the Z axis

.
.
N50 T1.4 M6 applies length offset values 1 and 2 from offset 4 to axes X and Z as defined in the AXO
command. Length offset 1 will be applied to the X axis with negative sign.
.
.
N100 T0 M6 disables the length offset applied to axes X and Z.

Example 3:
.
.
N1 (AXO,,,,Z) associates the length 4 of the offset to axis Z.

45004607K 168
Prima Electro S.p.A. OPENcontrol – Programming manual

4.6 RQT – Requalifying Tool Offset


The RQT command requalifies the length and/or diameter dimensions stored in the offset tables.

Syntax:

(RQT,tool,offset [,Lval1][,lval2][,dval3] [,L(n)valn] [,d(m)valm])

where:
tool is the tool ASCII code

offset is the number of the offset to be requalified. The offset number is a value between 1 and
300.

val1 Requalification value for the associate length/radius.

val2 The values can be either numbers or specified as variables.


val3
valn
valm

L value to be added to offset length 1.


L(1)
l value to be added to offset length 2.
L(2)
n Ranges from 1 to 5 and is one of the five possible offset lengths.
m Ranges from 1 to 2 and is one of the two possible offset diameters.
L(n) value to be added to the n-th offset length.
d offset increment to be added to diameter 1.
d(1)
d(m) offset increment to be added to the m-th diameter.

In the event of overlap between “L” and “L(1)”, “l” and “L(2)” or “d” and “d(1)”, the values are
assigned in the order in which they are written (from left to right) without any error message being
displayed.

Characteristics:
You must specify the length and diameter increments in the RQT command with the currently active
measuring unit (inches or millimetres, G70/G71). These values cannot be associated with a scale factor
(SCF).

Examples:

(RQT,10,1,L E40,d E41) This block requalifies tool 10, offset 1. The length 1 increment is contained
in E40 and the diameter increment is contained in E41.

(RQT,10,1,L E50,L(4) E51) This block requalifies tool 10, offset 1. The length 2 increment is contained
in E50 and the length 4 increment is contained in E51.

45004607K 169
Prima Electro S.p.A. OPENcontrol – Programming manual

4.7 RQP – Requalifying Tool Offset (pre-setting values)


The RQP command requalifies and pre-sets a specific tool offset according to programmed length and
diameter dimensions. When the control executes this command, it writes the corresponding dimensions
in the tool offset table by adding the specified length and diameter values. All the offset values are
reset.

Syntax:

(RQP,tool,offset [,Lval1][,lval2][,dval3] [,L(n)valn] [,d(m)valm])

where:
tool is the tool ASCII code

offset number of the offset to pre-set. It is a value between 1 and 300. The upper limit of the
offset number depends on the number of records in the tool offset file.

L value to be added to offset length 1.


L(1)
l value to be added to offset length 2.
L(2)
n ranges from 1 to 5 and is one of the five possible lengths of the offset.
m ranges from 1 to 2 and is one of the two possible diameters of the offset.
L(n) value to be added to the n-th length of the offset.
d offset increment to be added to the diameter 1.
d(1)
d(m) offset increment to be added to the m-th diameter.

Characteristics:
You must specify the values of length and diameter increments in the RQP command with the currently
active measuring units (inches or millimetres, with G70/G71). These values cannot be associated with a
scale factor (SCF).

Example:
(RQP,10,1,L E40, L(3) E41, d E42) This block pre-sets offset 1 of tool 10. The value of length 1 is
contained in E40, the value of length 3 is contained in E41 and the value of diameter is contained in E42.

45004607K 170
Prima Electro S.p.A. OPENcontrol – Programming manual

4.8 TOU – Tool Expiry Declaration


The TOU command is used to declare the specified tool’s life has expired.

Syntax:

(TOU,tool)

where:
tool is the ASCII code of the tool to be declared as expired. It can be a local or a system
variable.

Example:
(TOU,5) ;Declares tool “5” in the tool table expired
E1=10;
(TOU,E1) ;Declares tool “10” in the tool table expired

45004607K 171
Prima Electro S.p.A. OPENcontrol – Programming manual

5. TOOL DIAMETER COMPENSATION

Tool compensation is based on the tool geometry and is applied to a programmed profile defined by
segments and arcs.

There are two kinds of compensation available


Tool diameter compensation: it is perpendicular to a programmed profile (fig 1). Since the
typical tool section is a circle, the correction is applied to the circle diameter.

Tool thickness compensation: it is tangential to a programmed profile (fig 2). Usually the tool
direction is in the same plane as the profile

The following figures show how tool compensation acts in the previously described cases-

Programmed path

Compensated path
Fig.1 Tool Positioning for Tool Diameter Compensation

Programmed path

Compensated path

Fig.2 Tool Positioning for Tool Thickness Compensation

45004607K 172
Prima Electro S.p.A. OPENcontrol – Programming manual

5.1 TTC – Tool compensation type


TTC command configures the type of cutter compensation required.

Syntax

(TTC [, type [,cos(a),sin(a)]])

where:
type type of cutter compensation that will be applied, it can assume the following
values:
0. Enables cutter diameter compensation. It is the default value.
1. Enables cutter thickness compensation.
The default value for this value can be configured in AMP.

cos(a),sin(a) versor indicating tool direction. It consist of the sine and cosine of the angle
between the tool and the abscissa axis of the interpolation plane.
Default values are 0.0 and 1.0 meaning that the tool is “vertical” and its point is
down.

Ordinate

Tool versor

Sin(a)

a
Abscissa
Cos(a)

no parameters Disables cutter thickness compensation and enables default compensation


(diameter).

A RESET command restores default values, if modified by the program.

45004607K 173
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2 G40 G41 G42 – Tool compensation


These G codes disable or enable cutter compensation:
G40 Disables cutter compensation
G41 Enables cutter compensation when the tool travels left of the profile
G42 Enables cutter compensation with the tool travels right of the profile

Syntax:

G40 [G-codes] [operands]


G41 [G-codes] [operands]
G42 [G-codes] [operands]

where:
G-codes Other G codes that are compatible with G41, G42 and G40 (see “Compatible G codes”
table in Chapter 2).

operands Any operand or code allowed in a G function block.

When cutter compensation is active, the tool is positioned on the intersection or tangency point of the
two geometrical elements translated by a value depending on the requested compensation type.

5.2.1 Enabling Tool Compensation


Cutter compensation is enabled by codes G41 or G42, compensation type (diameter or thickness)
depends on the TTC command. The movement to the first point in the profile must be linear (G00-G01).

45004607K 174
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.2 Tool diameter compensation (TTC, 0)


On the first point in the profile, cutter diameter compensation is perpendicular to the first linear or
circular move programmed after G41 or G42 on the active plane.
The examples below show how cutter diameter compensation is applied.

Linear move first in the profile

20

0
50

45

G41

G42

15
0
X

Program:
Tool diameter compensation on the right of the profile:
G1 G42 X-50 Y15 F200
X-20 Y45

Tool diameter compensation on the left of the profile:


G1 G41 X-50 Y15 F200
X-20 Y45

45004607K 175
Prima Electro S.p.A. OPENcontrol – Programming manual

Circular move first in the profile

33.541
31.622
Y

0
G41 35

G42

40
35
25

0 0

Program:
Cutter diameter compensation on the right of the profile:
G1 G42 X-31.622 Y40 F200
G2 X33.541 Y35 I J25
G1 X.....

Cutter diameter compensation on the left of the profile:


G1 G41 X-31.622 Y40 F200
G2 X33.541 Y35 I J25
G1 X....

45004607K 176
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.3 Tool thickness compensation (TTC, 1)


When compensation is enabled using G41 and G42 functions the system automatically computes the
component of the tool direction on the working plane and, depending on its value, it compensates the
programmed profile.
If no versor is specified in the TTC command, then the system assumes the tool is vertical.
The interpolation plane is specified with G code (G16, G17, G18, G19), the system computes the
component, lying in that plane, normal to the tool direction. On this component it will apply the offset
due to tool thickness.
If the tool is vertical, tool centre will move to the left, when G41 is the current programmed code, or to
the right, when G42 is the current programmed code, of an amount equal to half the thickness of the
tool. When the tool is not vertical the behaviour will be similar, but the offsetting movement will
happen along the tool direction.

Tool direction

Element direction

Computed point 1° contact point between 1° contact point between Computed point
tool and workpiece tool and workpiece

In the case of a linear movement normal to the tool direction tool compensation is applied in
this direction. Offset direction does not depend on G41/G42, it is assumed to be opposite to the
element direction:
Compensation is performed in the plane and assumes a fixed tool inclination. So while
compensation is working (G41 / G42) tool inclination must not be changed. If tool
inclination has to change, the compensation must be stopped using a G40 command.

The following examples show the compensation with a circular and with a linear starting point.

45004607K 177
Prima Electro S.p.A. OPENcontrol – Programming manual

First movement on the profile is linear


A linear element, in compensation, is transformed into another linear movement. This movement is
translated depending on its direction, on tool direction and in the presence of mirroring.

tool

45

G41

G42
15

-50 -20 0 X

Program:
Cutter thickness compensation on the right of the profile:
(TTC, 1)
G1 G42 X-50 Z15 F200
X-20 Z45
X10 Z15

Cutter thickness compensation on the left of the profile


(TTC, 1)
G1 G41 X-50 Z15 F200
X-20 Z45
X10 Z15

45004607K 178
Prima Electro S.p.A. OPENcontrol – Programming manual

First movement on profile is circular


A circular element, in cutter thickness compensation, can be divided in one or more elements depending
if the tangential point (PT) position between tool and circle is external or internal to the movement
limits Ps and Pe (Fig. 3).

- PT external: the system creates the first circle, only. It is centred in c’, identified translating c with a
value equal to tool thickness in the correct direction and the circle radius is the same radius as the
programmed movement.

- PT internal: the system creates the first cycle as in the case of external P T, then it creates the line
through PT tangential to the circle (when compensation is external to the circle) and a second circle,
centred in c’’ translated in the opposite direction with respect to the first one and with the same radius.

When PT corresponds to the limits of the arc (Ps or Pe) the system creates an arc and the line
tangential to PT.

PT
G41

G42

c’ c c”
5
Pi Pf
0
15 65 115 X
Fig. 3. Cutter thickness compensation on a circular profile

Program:
Cutter thickness compensation on the right Cutter thickness compensation on the left
of the profile: of the profile:
(TTC, 1) (TTC, 1)
G1 G42 X15 Z5 F200 G1 G41 X15 Z5 F200
G2 X115 I65 J5 G2 X115 I65 J5
G1 X..... G1 X.....

45004607K 179
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.4 Notes on using tool compensation


Once enabled, cutter compensation is applied to all the moves programmed at machining or rapid feed
rate. Once cutter compensation has been enabled by G41 or G42, the following G functions cannot be
programmed:
G81 - G89 (canned cycles)
G70 - G71 (mm/inch programming)
G79 (programming referred to machine zero)
G33 (threading)
G72 - G73 - G74 (measuring cycles)
G16 - G17 - G18 - G19 (change of interpolation plane)
G12 – G13 – G14 (circular interpolation in space)

When cutter compensation is active, the control displays an error message if:
the programmed internal radius is shorter than the tool radius.
the execution of a compensated linear move would reverse the tool direction with respect to the
original profile.
programming a synchronization code (#) or a synchronous function

Within a compensated profile with G41 and G42 it is possible to program the movement of those axes not
belonging to the profile. The number of programmable movements depends on the use (or not) of
interferences correction (variable); the maximunm number of consecutive movements extra
compensation plane is of 128 consecutive movements.

5.2.5 Tool Path Optimization


Within the cutter diameter compensation programming, the Tool Path Optimization can be activated
either by MDI or by part program. This function is enabled and configured using TPO variable. Further
configuration can be done with the TPT system variable.

TPO can define two optimisation modes:


automatic “reduction” of the tool path on corners between two linear or circular blocks
infeed/exit tangent to the profile (on a circle arc).

TPO and TPT are discussed in detail later in this chapter.

45004607K 180
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.6 Disabling Tool Diameter Compensation


Cutter diameter compensation is disabled by the G40 code.
The cutter can exit from the part with the following modes:
if TPO is not active (standard offset mode), the move programmed by G40 is still considered as
an offset;
if TPO is active, the move programmed by G40 is considered as the exit move from the offset.

These options are illustrated in the examples below.

The last move in the profile is linear (TPO=0)


Y
Program:
N88 G1 G40 X50 Y15
N100 G X.. Y..
G41

G42

15

0
x
50
0

The last move in the profile is circular (TPO=0)

Program:
N99 G2 G40 X36.62 Y40 I J25
N100 G X.. Y..

45004607K 181
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.7 Disabling Compensation with TPO active


With TPO active, the cutter diameter is always compensated through G40; the only difference with
respect to the standard procedure is how the last block is executed.

These options are illustrated in the examples below.

The last move in the profile is linear (TPO active)

Program:
N87 G1 X20 Y40
N88 G1 G40 X50 Y15
N100 G X.. Y..

The last move in the profile is circular (TPO active)

Program:
N98 G1X-33.541 Y35
N99 G2 G40 X36.62 Y40 I J25
N100 G X.. Y..

If a block is programmed including G40 only (i.e. not associated with any final point),
the same result would be obtained as with standard diameter compensation (TPO=0).
Prior to writing a program read this section and the descriptions of TPO and TPT
carefully.

45004607K 182
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.8 Disabling Disk Thickness Compensation


Disk thickness compensation is disabled by the G40 code
The cutter exits always in standard offset mode, it is not affected by TPO values, this mean that the
block where G40 is programmed, is considered as compensated.

The following examples show different cases:

Last movement on the profile is linear

Z Z

95

G41 G41
G42
G42

15

50
50

0 x 0 x

Program: Program:
N88 G1 G40 X50 Z15 N88 G1 G40 X50 Z95
N100 G X.. Z.. N100 G X.. Z..

Last movement on profile is circular

G41
Program:
N99 G2 G40 X86.6 Z50 R100
N100 G X.. Z..
G42 50
86.6

45004607K 183
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.9 Tool compensation change (during machining)


This section describes how changes of compensation type (G41  G42 and vice versa) are handled during
offset profile machining. Compensation type changes may occur at the point of intersection of the
programmed paths (with left/right or right/left compensation) or by the automatic addition of a new
movement block by the system.

Type of compensation change (on the intersection or with an additional connection block) depends on
type of the previous movements and of the subsequent movement. The different possibilities are
discussed in the following pages:
Linear/Linear with tangential movement blocks
Linear/Linear with inversion of direction
Linear/Linear with automatic generation of a new movement block
Linear/Linear without automatic generation of a new movement block
Linear/Circular - Circular/Linear
Circular/Circular

5.2.10 Linear/Linear tool path


The following figure illustrates the tool path when compensation changes from G41 to G42 during
execution of two linear type movements.
In changing from G41 to G42, the control generates two points, namely point 1 and point 2.
Point 1 is the final position of the tool before compensation type change.
Point 2 is the desired starting position for the first block using the changed compensation
direction.

The control automatically generates the movement block connecting point 1 with point 2:

point 1

Compensated

r
Programmed in G41 G42

N10 N11 N12 N13


r

point 2

Linear/Linear change with tangential movement blocks

45004607K 184
Prima Electro S.p.A. OPENcontrol – Programming manual

Points 1 and 2

Compensated

N10 Programmed in G41 N11

N13 Programmed in G42 N12

Linear/Linear change with inversion of direction

r
r r

C om pens ated
path N 10
N 11
Program m ed
path N 12
G41
G42

r r

point 1
point 2
Linear/Linear change with generation of a new block

45004607K 185
Prima Electro S.p.A. OPENcontrol – Programming manual

5.2.11 Linear/Circular, Circular/Linear, Circular/Circular tool paths


For each of the following types of tool path, in which a change of compensation direction occurs, the
OPENcontrol system will try to find a point of intersection between the path programmed in G41 and
that programmed in G42 (or vice versa).
If OPENcontrol finds a point of intersection, it modifies the final point of the original compensated tool
path whereas the starting point of the new compensated tool path will coincide with the intersection
(see figure below).

r G42 r

Program m ed
Programmed G41
path
in G42
+ +
Compensated C om pens ated
path path
Inters ec tion
Intersection

Compensated
path r
in G41
r
Programmed
path
G42

Intersection

Change of compensation with intersection of current path

45004607K 186
Prima Electro S.p.A. OPENcontrol – Programming manual

However, cases may arise in which there is no intersection between the tool paths; in these cases, when
changing from G41 to G42 (or vice versa) the system behaves as illustrated in the figures that follow.
Point 1 is the final position of the tool before the change of compensation type
Point 2 is the desired position for start of the first block using the changed compensation
direction.

The control automatically generates the movement block connecting point 1 with point 2:

Point 1

Compensated
path r2 r1

r1

Programmed G42
in G41
Point 2

Point 2

r1 r2

Programmed r1
in G41
G42
Compensated
path Point 1

C om pens ated
path

r
Program m ed
in G41 G42 +

Point 1

r
Point 2

Change of compensation without possibility of intersection between the tool paths

45004607K 187
Prima Electro S.p.A. OPENcontrol – Programming manual

5.3 r – Radii in compensated profiles


When machining convex profiles, you may want a circular radius between geometric elements.

Syntax

r value

where:
value The radius to be programmed. For clockwise moves program a negative radius; for counter
clockwise moves program a positive value.

Programming r0 (radius equal to zero) causes the tool centre to follow a circular arc whose
centre is on the profile corner.

Example:

2 2

1 1

Without radius With radius


1) N20 G1 X100 Y100 1) N20 G1 X100 Y100
2) N21 X-100 N21 r0
2) N22 X-100

45004607K 188
Prima Electro S.p.A. OPENcontrol – Programming manual

5.4 b – Bevels in compensated profiles


By programming the b address you can insert a bevel between two linear or circular motion blocks that
generate intersecting paths.

Syntax:

b value

where:
value bevel length measured from the intersection point.
This value b may be interpreted as follows:
Bevel between two linear profiles: b is the distance from the generated final
point to the theoretical intersection point between the extended profile
segments.

Bevel between a linear and circular profile: b is the distance from the
theoretical intersection point between the extension of the linear profile to the
tangent of the circular profile.

Bevel between two circular profiles: b is the distance to the theoretical


intersection point between the extensions of the tangents to the circular
profiles.

Examples:

GENERATED Bevel between two linear blocks


FINAL POINT PROGRAMMED
BLOCK 2 b FINAL POINT
Programming example:
b
.
.
MODIFIED
FINAL POINT N10 G1 X10 Y100 ;block 1
N11 b3
N12 X-100 ;block 2
.
BLOCK 1 .

45004607K 189
Prima Electro S.p.A. OPENcontrol – Programming manual

Bevel between circular and linear motion


blocks
Programming example:
BLOCK 1 .
tangent to block1
punto
final point N10 GXY
N11 G42
BLOCK2
N12 G1X10Y70F1000
modified
final point N14 G2X70Y20R50 ;block 1
N16 b10
b
generated N18 G1X150Y90 ;block 2
final point
N20 G40
b .
programmed .
final point
.

Bevel between linear and circular motion blocks

FINA L P OINT
P ROGRA MME D

b
T A NGE NT ON
b T HE CIRCULA R
B LOCK ' S
S T A RT ING P OINT
FINA L P OINT
MODIFIE D

FINA L P OINT
GE NE RA T ED

BLO C K 1 BLO C K 2

Programming example:
.
N20 G42
N22 GXY
N24 G1X40Y40F1000 ;block 1
N26 b10
N28 G2X80Y5R70 ;block 2
N30 G40
.

45004607K 190
Prima Electro S.p.A. OPENcontrol – Programming manual

Bevel between two circular motion blocks

BLOC K 1
tangent on final
point of block 1
tangent on s tartting
point of block 2

inal point final point


modified generated

b b
BLOC K 2

final point
programmed

Programming example
.
.
N10 G42
N20 GX10Y60
N30 G2X50Y40R50F1000 ;block 1
N40 b5
N50 G2X100Y5050R30 ;block 2
.
.

45004607K 191
Prima Electro S.p.A. OPENcontrol – Programming manual

5.5 IBSIZE – Interference correction in G41/G42


The process variable IBSIZE (Interference Buffer Size) activates interference correction when cutter
compensation is working.
When interference correction is enabled, the algorithm will try to correct the error of wrong direction
on profile.
The profile, after correction, will differ from the programmed one, but the system will continue the part
program execution and the work piece will not be damaged.

Syntax:

IBSIZE = n

where:
n Dimension of the buffer used for correction.
The following table shows the accepted values for n. If n is 0 the interference correction algorithm
is disabled.
Default value for IBSIZE is 0, this value can be configured in AMP, using the ODM tool.

The RESET command restores default value.


n Function
0 Correction algorithm is disabled
Correction algorithm is enabled.
3
Interferences requiring removal of no more than one movement can be corrected
Correction algorithm is enabled.
4
Interferences requiring removal of no more than two movements can be corrected
Correction algorithm is enabled.
5
Interferences requiring removal of no more than three movements can be corrected

Characteristics:
Programming a block containing the instruction IBSIZE=n enables the algorithm of interference
correction.
An interference is defined as a compensated movement with tool path direction reversal with respect to
the programmed direction.
The interference correction increases execution time of a part program, since it is necessary to pre-
compute some movements in order to identify and to correct interference.
The increased time is not fixed, it depends on the IBSIZE value and on the tool path optimisation value.

During the disabling of compensation, interference correction is always disabled. So if there


interference appears in this phase, then part programs execution stops with an error.

45004607K 192
Prima Electro S.p.A. OPENcontrol – Programming manual

The algorithm disables TPO when trying to solve the interference. As a consequence it is
possible that more elements are removed than are strictly necessary to solve the interference.
Once the interference is solved, TPO, if present, is restored and the correction movement is
computed with TPO enabled.

The interference correction feature modifies the number of axis movements that do not belong
to the profile, that can be programmed when compensation is working.
Moreover programmed bevels (and radiuses), when interference correction is running,
are considered to be movement of axes that do not belong to the profile.

The number of allowed movements will be:

IBSIZE=3
Four axis movements that do not belong to the profile between four compensated movements.
IBSIZE=4
Two axis movements that do not belong to the profile between six compensated movements.
IBSIZE=5
No axis movements that do not belong to the profile are allowed when compensation on profile
is active

Interferences belong to two different classes:


Interference generated by a single circular movement
Interference generated by a combination of linear and/or circular movements

5.5.1 Interference generated by a single circular movement


This kind of interference appears when circular movement is travelled internally (path is concave) and
its radius is smaller than tool diameter.
In this case the standard compensation algorithm would generate a profile inconsistent with the one
programmed.

Compensated profile

rtool
interference

programmed profile

45004607K 193
Prima Electro S.p.A. OPENcontrol – Programming manual

When interference correction is enabled (IBSIZE different from 0), the correcting algorithm replaces the
circular movement with a linear movement having the same start and end point of the programmed
(circular) movement.

compensated profile

rtool
corrected profile

programmed profile

The resulting profile is different from the programmed one, but the system can continue the execution
of the part program and the work piece is not damaged.

5.5.2 Interference generated by a combination of linear and/or circular movements


Interference can happen due to a combination of linear and circular movements whose length is near to
the tool radius value.

compensated profile d

c
D
b

B
A
programmed profile
C

In this case the direction of bc movement (compensated) is inverted with respect to the direction of
movement BC (programmed), moreover the tool, moving to b, damages the work piece.
When the interference correction is enabled, the algorithm identifies the interference and tries to solve
it before the tool arrives at b
The algorithm looks for an intersection between the movement being analysed and the preceding ones.
Referring to the previous image, the interference is identified during the analysis of the movement CD.

45004607K 194
Prima Electro S.p.A. OPENcontrol – Programming manual

The algorithm assumes that the movement that caused the interference is the previous one (BC) and it
removes it from the profile, then looks for an intersection between the movement being analysed (CD)
and the movement preceding movement BC (AB). If it can find an intersection, then interference is
solved and part program execution can continue.
If there is no intersection, then the algorithm looks for other movements in the interference buffer
(whose dimension corresponds to the IBSIZE value), if it finds a movement it continues to look for an
intersection, if the buffer is empty then the algorithm was unable to solve the interference, the system
stops the execution of the part program and it emits an error of inverted direction.
The algorithm will solve the interference shown in the previous figure as follows:

Compensated profile after correction d

D
b
a

B
B ’
A

corrected movement Programmed profile


C

In this case removing one movement will solve the interference.


There are other cases where it will be necessary to remove more than one movement to solve the
interference.
For instance in the following profile as the tool dimension increases one, two or three movements shall
need to be removed.

rtool
4
rtool
3
rtool
2
rtool
1 E
A

C D

The first compensated profile (for rtool1) does not require correction since there are no interferences.
Starting from the second value of tool radius (rtool2), interference correction has to be enabled.
In this case the intersection between element D and element E reverses the direction of the movement.
Removing element D and computing the intersection between the compensated elements C and E, the
interference is solved.
For rtool3 just removing D will not solve the interference since the intersection between C and E
generates interference, too.

45004607K 195
Prima Electro S.p.A. OPENcontrol – Programming manual

Then, IBSIZE value has to be bigger than 3 since at least two elements must be removed; in fact the
interference between B and E is the first one that does not generate interference.
Starting from rtool4 IBSIZE value has to be 5: in this event the intersection between B and E generates an
interference and to solve it, the entire “hole” corresponding to B,C,D must be skipped and A will be
connected directly with E.
In all the examples the final profile differs from the programmed one, but the system can continue in
the program execution and the work piece will not be damaged.
If a programmed bevel (or a radius) is connected to a movement that has been removed during the
correction phase, then the bevel (radius) will be removed too.

This is a consequence of the removal of one of the movements the bevel (radius) refers to.

rtool
2

rtool
1

Programme
d bevel

During the creation of the corrected movement the features of TPO=64 (circular radius
movements on internal bevels) is disabled.

TPO is disabled if the corrected movement implies the intersection between two
compensated elements that do no intersect on the programmed profile.
This happens because it is impossible to define a starting point for the second
movement of the intersection. If this point does not exist optimisation behaviour is
unpredictable.

During correction only movements on the profile are removed. If a block containing a
removed movement contains PLC commands (e.g. M functions), these functions will be
executed before or after the correction movement. M functions of “expedite” type will not
be executed since the movement they refer to has been removed.

45004607K 196
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6 TPO – Tool Path Optimization with G41/G42


TPO (Tool Path Optimisation) allows optimisation of the tool path when G41 or G42 are active.
The algorithm automatically introduces circular interpolation at profile start and end, and linear or
circular radiuses on the profile bevels.

Syntax:

TPO = n

where:
n Optimisation mode. Allowed values are:
The value to be specified for n in the instruction is obtained from the sum of the decimal weights
corresponding to each of the desired features.
If n = 0 optimisation algorithm is disabled.

Bit 0 1 2 3 4 5 6 7

Introduces linear transition movements between the


elements

Exit/infeed tangent to profile

Activates the algorithm for maintaining the machining


speed constant in G41/G42

Introduces circular transition movements on internal bevel

Introduces circular transition movements between the elements

Characteristics:
A block programming the TPO=n instruction activates the tool optimisation algorithm.
This algorithm can automatically introduce movements at the beginning/at the end of the profile and it
can optimise the path on corners. Depending on the profile, the algorithm could automatically introduce
from 1 to 3 optimisation moves.

At the system power up the TPO mode configured in AMP is enabled. It can be changed from the
program.
RESET restores the TPO mode configured in AMP.

The activation of bit 5 and/or of bit 6 works only if bit 0 is also enabled.

To introduce a circular fillet in place of a linear one, set TPO = 33.


To introduce a circular fillet on the inner corners of a profile, set TPO = 65

45004607K 197
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6.1 TPO=1, TPO=33 and TPO=65 modes


Mode TPO=1 activates the tool path optimisation algorithm by introducing linear transition movements
between the profile elements as a function of the angular deviation between the elements themselves.
Furthermore, if bit 5 has also been set (TPO=33), then, provided that the conditions for corner
optimisation are met, through the introduction of linear movements a circular transition is introduced,
having its centre at the intersection of the two non-compensated elements and a radius corresponding to
tool radius.

If bit 6 is active too (TPO= 1+32+64=97), the above considerations are applied to the inner corners, too.

The cases of application of the algorithm are as follows:


A) Right angle-right angle with angle beta of deviation between 0° and TPA (0° <  < TPA°), with
variable TPA, which is set by default to 90°
B) Circle-right angle, right angle-circle, circle-circle with angle of deviation between 0° and 180°
(0° <  < 180°).
If either a bevel (b) or a radius (r) has been programmed between the elements described in A) and B),
the algorithm is not applied.

Example:
In this example,  is smaller than 90°

Profilo Programmato Con ottimizzazione TPO=1


GENERATED
BLOCCO
BLOCK
GENERATO
G41 G41 r
r
r r
r
r G42
G42 r
r

r=tool radius
r=raggio utens ile

Without optimization (TPO =0) With optimization (TPO=1)


Con ottimizzazione TPO=1 Con ottimizzazione TPO=1
GENERATED
GENERATED
BLOCCO GENERATED
BLOCCO
G41 BLOCK
GENERATO
BLOCK G41 BLOCK
GENERATO

r r
r BLOCCO r
r r GENERAT
G42 GENERATO
ED BLOCK
r
G42
r

r=raggio utensile r= tool radius


r=raggio utensile

r=tool radius

With optimization (TPO=33) With optimization (TPO=97)

45004607K 198
Prima Electro S.p.A. OPENcontrol – Programming manual

Note that in the above examples TPT threshold has been ignored, as if TPT=0.
The figure below illustrates the strategy of TPO when TPT is not zero, i.e., a threshold
deviation from the corner is programmed:

in the case of an outer corner, the afore-mentioned circular radius will have its
centre translated according to the same calculation criteria as are used for linear
radiuses, and the radius will be reduced accordingly.

in the case of an inner corner, the radius of the circular radius is calculated so as to
have the tool path deviate from TPT by the amount that would be obtained without
the introduction of the radius
Con ottimizzazione TPO=1

G41
TPT

r
TPT

G42

r=tool radius
r=raggio utensile

Using cutter thickness compensation (TTC,1), the circular transition inserted when
TPO = 33 does not depend on TPT.

G41

45004607K 199
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6.1.1 Examples of profile optimisation with TPO=1

In these profiles the angle deviation requires an optimisation algorithm.

G41

 1. Angles from 0° to 90°


ß
formed by two straight
 lines

2. 180° angle with circle-


circle intersection

G41

    

3. Angle from 0° to 180°


formed by a circle-straight
line intersection
      
G41

45004607K 200
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6.1.2 Examples of profiles where algorithm introduces optimization moves

In these examples the algorithm recalculates the profile and introduces from 1 to 3 optimisation moves
between bevels.
Movement generated
by the algorithm with
1) Line - line TPO = 1
The algorithm
generates 1 move

with TPO = 33

Movements generated
by the algorithm with
TPO = 1
2) Line - circle The algorithm
generates 2 moves

with TPO = 33

Movements generated
by the algorithm with
3) Circle - line TPO = 1 The algorithm
generates 2 moves

with TPO = 33

Movements generated
by the algorithm
4) Circle - circle with The algorithm
generates 3 moves

with TPO = 1

with TPO = 33

45004607K 201
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6.2 Examples of profile optimisation with TPO=2


TPO=2 enables an infeed/exit algorithm that keeps the tool tangent to the profile by introducing circular
elements at profile start and end.

A) At profile infeed the algorithm generates a circle between the first point of the
preceding point (P0) and the offset profile (P1). The first point is the one programmed in
the G41 or G42 block.
.
X80 ;P0
G41 X100 Y100 ;P1
X140 ;P2
. ;etc.
.

B) At profile exit the algorithm generates a circle between the last point of the offset
profile (P99) and the last point of the exit element in the profile (P100). The exit
element is the one programmed in the G40 block.

G41 X100 Y100 ;P1


.
.
X170 Y160 ;P99
G40 X180 Y185 ;P100
. ;etc.
.

45004607K 202
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6.3 TPO=3 mode


TPO=3 simultaneously enables TPO=1 and TPO=2 algorithms, which introduces radiuses both between
elements and circular moves at profile start and end.
The rules defined for TPO=1 and TPO=2 also apply to TPO=3.

5.6.3.1 Examples of TPO=2 mode

Example 1:

Y
52,5
50
c irc ular moves at profile end
45
42,5
40

35

30

25

20
G41

15
G42

10

5
c irc ular moves at profile s tart

5 10 15 20 25 30 35 40 45 50 X

32,5

N1 S1000 M3 T1.1M6 ;tool radius = 2.5


N2 X5 Y5
N3 G1 G42 X15 Y15 F500 ;first point in the profile
N4 X30
N5 X40 Y30
N6 X32.5 Y42.5 ;last point in the profile
N7 G40 X32.5 Y52.5
N8 GX100

45004607K 203
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 2:

Y
50

45

40

35

30

25

20

15
G41

10

5
c irc ular move at profile end c irc ular move at profile s tart
0

-20 -10 0 10 20 X

N1 S1000 M3 T1.1 M6 ;tool radius = 2.5


N2 X0 Y0
N3 G1 G41 Y15 F800 ;first point in the profile
N4 X -20
N5 Y45
N6 X40
N7 Y15
N8 X0 ;last point in the profile
N9 G40 Y0

45004607K 204
Prima Electro S.p.A. OPENcontrol – Programming manual

5.6.4 TPO=8 and TPO=16 modes


TPO=8 and TPO=16 modes activate the algorithm that keeps the machining speed in G41/G42 constant.
In particular, the speed of contact between the tool and the part is kept constant, varying the feed rate
with reference to the centre of the tool.

This variation is a function of the tool radius and is only applied to circular movements. It will produce
an increase or decrease in the feed rate with reference to the centre of the tool depending on whether
the radius of the circle moved by the centre of the tool is greater or less than the radius of the
programmed circle. The feed rate is increased by setting bit 3 of variable TPO (TPO=8) while it is
decreased by setting bit 4 (TPO=16).

Bits 3 and 4 of TPO may be set together and even at the same time as all the other bits of the same
variable to enable the corresponding features.

5.6.5 TPO=32 mode and 64 mode


Is the same as having programmed TPO = 0.
This is so because the activation of external and inner bevel optimisation through the introduction of a
circular radius requires the prior programming of TPO = 1. If bit 0 = 0 and bit 5 and/or bit 6 = 1 (TPO=32
and/or TPO=64), the optimisation algorithm by means of circular radiuses is not enabled.

45004607K 205
Prima Electro S.p.A. OPENcontrol – Programming manual

5.7 TPA – Threshold angle for TPO


System variable that consists of the threshold angle within which two linear elements can be radiused in
tool compensation mode (G41/G42).

Syntax:

TPA = value

where:
value Threshold angle expressed in degrees. If the angle between two adjacent elements is
smaller than the value of TPA, a circular or linear radius is introduced in accordance with
the values set in TPO.

The default value of TPA is = 90°; this value can also be configured in AMP.

Characteristics
This variable has been introduced to allow configuration of the threshold angle used by the Tool Path
Optimisation (TPO) algorithm to radius two linear elements in tool compensation mode. If at least one
element is circular the optimisation algorithm remains unchanged, i.e., a radius (either linear or
circular, depending on the value of TPO) is introduced regardless of the angle between the two
elements.
RESET restores default value, if modified by program.

Example:

CoWith
n ot t iTPA
mi zz>az90°
i oneand
TPOTPO
=1 = 1 CoWith TPA
n ot t i m i zza>zi o90°
ne Tand
PO=1TPO = 33
BLOCK BLOCK
G41 GENERATED G41 GENERATED

r r

G42
r G42
r

r =tool radius r=tool radius

45004607K 206
Prima Electro S.p.A. OPENcontrol – Programming manual

5.8 TPT – Tool Path Threshold


This instruction specifies a threshold for bevels during tool path optimisation when TPO=1.

Syntax:

TPT = value

where:
value Threshold expressed in the active unit of measure (mm/inch). It represents the distance
between the tool cutter and the bevel generated by the programmed profile. It can also
be configured in AMP.

Example:

r G41 r G41

Treshold value
Programmed with TPT

With TPT=0 With TPT programming

Characteristics:
The threshold programmed with TPT will be ignored by the system if it takes the mill centre beyond the
theoretical point obtained through standard tool diameter compensation (G41/G42 without TPO
programming).
In this case the TPO algorithm will be temporarily disabled, G41/G42 will be applied without TPO and
there will be no error signal.

Example:
Normal deviation from
TPO algoritm
the bevel in G41
disabled (max. TPT)

r G41

Treshold value programmed


with TPT too high (useless
because it disables TPO).

45004607K 207
Prima Electro S.p.A. OPENcontrol – Programming manual

5.9 u v w – Paraxial compensation


When compensation factors u,v,w are programmed in a block, the control positions the axes to a point
whose coordinates are equal to the programmed coordinates value minus a value equal to the
compensated radius multiplied by the compensation factor, assuming the compensation factors are
related to X, Y and Z axes.

X position = programmed X + (cutter radius * u)


Y position = programmed Y + (cutter radius * v)
Z position = programmed Z + (cutter radius * w)

These compensation factors are used both for extremely simplified profiles (contouring parallel to axes)
and for three-dimensional milling surfaces.

You cannot use the u,v,w factors when the control is in cutter compensation mode (G41-G42).
When factors u,v,w are negative, they must be followed by a minus sign. If they are positive, the plus
sign can be omitted.

In order to determine the value and the sign you must consider paraxial factors u,v,w respectively as the
X, Y, Z coordinates of the profile vertex corrected by a unit. X, Y and Z are referred to a system of
Cartesian axes that are parallel to the axes of a machine whose origin is represented by the point to be
compensated.

programmed profile

Determining the sign of u, v, w compensation factors

The unit vector represents a cutter radius offset that is one unit long; the control, the increments of
translation are the product of the u,v,w values multiplied by the cutter radius.

45004607K 208
Prima Electro S.p.A. OPENcontrol – Programming manual

You can compensate profiles that consist of:


straight line segments parallel to the axes or forming an angle with the axes
straight line segments and arcs tangent to the straight lines
tangent arcs (provided they are still tangent to one another after they have been translated on a
parallel path).

The u,v,w factors are only valid in the block in which they are programmed. They are used by the
control only if they are associated to the corresponding coordinates:
u for the 1st configured axis (typically X)
v for the 2nd configured axis (typically Y)
w to the 3rd configured axis (typically Z).

5.9.1 Examples of compensation factor applications u, v, w

Example1:

Program:
N5 T1.01 M6 S. . F. .
N6 G X Y30
N7 G1 Y10 v1
N8 X40 u-1
N9 Y30
N10 G X. . Y. .

Example 2:

Program:
N13 G X Y
N14 Y10 v-1
N15 X40 u1
N16 Y30
N17 G X. . Y. .

45004607K 209
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 3:
Program:
N13 G X Y
N14 G1 Z-10
N15 X-20 Y-20 u1 v1
N16 X20 u-1
N17 Y20 v-1
N18 X-20 u1
N19 Y-20 v1
N20 G X Y

Example 4:

Program:
N13 G X-35 Y-35
N14 Z-10
N15 G1 X-20 Y-20 u-1 v-1
N16 X20 u1
N17 Y20 v1
N18 X-20 u-1
N19 Y-20 v-1
N20 GZ

45004607K 210
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 5:

Program:
N12 . . .
N13 G X-30 Y
N14 G1 Y20 v-1
N15 X30
N16 Y-20 v1
N17 X-30
N18 . . .

Example 6:
Program:
Y N12 G X40 Y B0
N13 G1 X30 u1
(rotary axis)
N14 X25 B360 u1
N15 G X40

u1 u1

X
0

25

30

45004607K 211
Prima Electro S.p.A. OPENcontrol – Programming manual

5.10 UVW – Definition of axes for paraxial compensation


It is possible to change the axes on which paraxial compensation is performed.
As a rule, paraxial compensation is applied, within each process, on the first three axes configured (the
first three to appear on the screen). With triliteral (UVW) the axes on which paraxial compensation is
performed may be changed.

Syntax

(UVW, axis1 axis2 [axis3])

where:
axis1…axis3 are the names of the axes to be associated with the uvw paraxial compensation: axis 1 is
associated with parameter u, axis 2 with parameter v, and axis 3 with parameter w.

Characteristics:
If only two axes are specified in the command, the paraxial compensation will be activated only for
parameters uv, and the third parameter (w) will be ignored.
Once defined, the association between the axes and the uvw parameter remains active until the next
RESET; then the default association (the first three axes configured) is restored. A GTA command will
also restore the default association, unless all the axes (identified by axis ID) on which the uvw
parameters are active remain present even after the execution of the command.

Example:
N10 (UVW,XYZ) Activates uvw on X Y and Z respectively
N20 h1
N20 X10u1Y20Z40
N30 (DAN, XP, YQ, ZD)
N40 (UVW,XYZ) Activates the uvw parameters on PQD (DAN renamed them in XYZ)
N50 X10u1Y20v0.3Z40w0.3

N60 X0u1Y5v0.50Z4w-0.5

45004607K 212
Prima Electro S.p.A. OPENcontrol – Programming manual

5.11 MSA – Defining a Machining Stock Allowance


The MSA command defines the value of the machining stock allowance along the profile. It is used in
roughing and pre-finishing cycles. MSA can be programmed in a block, assigned in MDI or entered via
softkey.

Syntax

MSA = value

where:
value It can be a decimal number or an E parameter. It is programmed in the measuring
unit (G70-G71) that is currently active in the program.

Characteristics:
The system uses the programmed MSA to calculate the offset value to be applied to the profile when
cutter compensation (G41 or G42) is active.
The offset value is the sum of the tool radius and the MSA.

Example:
MSA = 0.5 Assigns a 0.5 machining allowance
E30 = 1.5
MSA = E30 Assigns a 1.5 machining allowance

When measuring unit changes from G70 to G71 or vice versa, the programmed value for MSA is
set to zero.

45004607K 213
Prima Electro S.p.A. OPENcontrol – Programming manual

6. PROGRAMMING THE SPINDLE

The functions described in this chapter must be managed by PLC.

SPINDLE FUNCTIONS
The S address programs the spindle speed rotation in rpm or as constant surface feed. In addition, some
M functions affect the spindle control.

45004607K 214
Prima Electro S.p.A. OPENcontrol – Programming manual

6.1 G96 G97 – CSS and RPM Programming


The following G codes control spindle speed programming.

G96 Speed programming in constant surface speed


G97 Speed programming in rpm

Syntax:

G97 [G-codes] [operands]


G96 [G-codes] [operands]

where:
G-codes Other G codes that are compatible with G96 and G97 (see Table "Compatible G codes" in
Chapter 2).
operands Any operand or code that can be used in a G function block.

Characteristics:
G97 activates address S programming in rpm. G97 is the default mode of the control and is modal (like
G96).

G96 activates constant surface speed (CSS) programming for address S in feet per minute (G70), or
metres per minute (G71). G96 forces the spindle speed to be controlled by the position of the diameter
axis, so that it remains constant on the machining surface.
When G96 is activated the position of the diameter axis is assumed to be the radius for which constant
surface speed (S) is programmed.

45004607K 215
Prima Electro S.p.A. OPENcontrol – Programming manual

6.1.1 Changing the S address during G96. Cancelling CSS mode


If you want to change the S word value while G96 is active, the control must be in G00 or G29 mode. To
cancel G96 CSS, the control must be in G00 mode and a block with G97 and an S word that defining the
spindle rpm must be programmed.

Example:
The following example illustrates CSS programming.
Assumed power-up G codes: G00, G27, G70, G95, G97
Assumed gear range: 1 (M41) = 800 rpm max.

N1 G90 G00
N3 U5 ;Presets diameter (U) axis
N4 SSL=700 ;700 rpm limit
N5 G96 S400 M3 ;CSS at 400 ft /min
N6 G1 U0 Z -2 F10 ;Sets contouring mode and U in feed 10 ipm
N7 U5 Z0
N8 G00 ;Prepares to change S
N9 G01 S300 U0 Z-2 ;New surface feed = 300ft/min
N10 G00 ;Prepares to cancel G96
N11 G97 S100 ;Set G97, S=100 rpm
N12 G01 Z0 ;Contouring to G0
N13 U5
N14 G00 ;Rapid mode, contouring off
N15 M05 ;Stop spindle
N16 M02 ;Program end

S operators cannot be programmed when the process is on hold.

45004607K 216
Prima Electro S.p.A. OPENcontrol – Programming manual

6.2 SSL – Spindle Speed Limit


The SSL command is used with G96 to set the maximum rpm that the spindle is allowed to run during
CSS.

Syntax:

SSL=value

where:
value value that can be programmed directly with a decimal number or indirectly with an E
parameter.

Characteristics:
As the diameter axis approaches the spindle centreline, the spindle approaches maximum speed to
maintain the programmed S word value. The SSL command limits the spindle to some value below the
maximum rpm. If you program the value of SSL above the maximum rpm for the current gear range, the
current gear range limit will be the maximum allowable rpm.

The SSL command must be programmed before the number of rounds S.

Make sure you enter this value in the part program prior to entering G96 blocks.

Example:
SSL = 2000 Assign a spindle speed limit of 2000 rpm
E32 = 1500
SSL = E32 Assign a spindle speed limit of 1500 rpm

45004607K 217
Prima Electro S.p.A. OPENcontrol – Programming manual

6.3 M19 –Spindle rotation stop with orientation


Typically, the M19 function programs a spindle stop with a predetermined angular orientation. This
feature is convenient in back spot-facing operations, because it allows the spindle to position, move the
X or Y axis (depending on blade orientation), enter the hole, reposition the spindle and start machining.

M19 can also be used for increased accuracy in boring operations, to avoid scoring the bored surface
during the return move of the Z axis. In this case, when the hole is finished, the spindle is oriented,
move the X or Y axis is moved according to the blade orientation, and the Z axis returns.

M19 is deleted by M03, M04, M13, M14. When the control reads M19 in a block that also contains
movement information, M19 precedes the movement.

The M functions that are implemented in an application may be different than those described
here. Consult the machine documentation for more information on application-specific M
functions.

Example:

Program:
N32 (DIS,"BACK SPOT- FACING BAR D=136")
N33 S115 F20 T7.7 M6
N34 G X250 Y-12 M19
N35 Z-306
N36 Y M3
Zero axis Y
N37 DWT=2
N38 G1 G29 G4 Z-300
N39 G Z-302 M5
N40 Y-12 M19
N41 Z

In block N34 the X and Y axes are positioned and spindle orientation is controlled so that the tool can go
through the hole. In the next block, the Z axis is positioned to start spot-facing.

In block N36 the tool axis is moved to coincide with the spot-facing axis.

Spot-facing is performed in block N38. In subsequent blocks, the tool is oriented, withdrawn from the
workpiece and then positioned along the Y axis, so that it can go through the hole.

45004607K 218
Prima Electro S.p.A. OPENcontrol – Programming manual

6.4 GTS – Spindle sharing


Note: this command is not available in OPEN-10, it requires the option A34 in OPEN-20
and OPEN-30

This three-letter code enables each process to release its spindle, to change its status, or to acquire a
new one in a new mode. For the various spindle conditions, see characterisation manual.

Syntax

(GTS)
(GTS; mode)
(GTS, spindle_id, mode)

where:
spindle_id Logic identifier of the spindle axis concerned. Può essere programmato
direttamente o tramite una variabile.
mode Mode requested, X = exclusive, S = shared, A = released as an axis.

(GTS) This is used to release a spindle. With this syntax the process tells the system it
does not want to use the spindle any longer and the spindle is made available for
use by other processes. Axis status is changed to RELEASED only if the release is
performed by the last owner process; if an axis is still being used by other
processes, its status continues to be SHARED.
(GTS,A) Used to release the spindle and make it available as an axis. With this syntax the
process tells the system that does no longer need the spindle and it makes it
available for other processes. The request fails if the spindle is used by other
processes; at the end of the function the spindle/axis passes in the state
RELEASED.
(GTS, spindle_id, S) This is used to share with other processes the spindle with id spindle_id that
must not be used by another process on an exclusive basis. When thew spindle is
inmode “axis” it is automatically changed in mode “spindle”. Possible cases are:
A process does not own any spindle and wants to acquire a new spindle in
shared mode.
A process owns the spindle on an exclusive basis and wants to make it available
for sharing.
A process wants to release the current spindle and to acquire a new one.

45004607K 219
Prima Electro S.p.A. OPENcontrol – Programming manual

(GTS, spindle_id, X) This is used to use a spindle with id spindle_id on an exclusive basis. The axis will
not be shared with other processes. Possible cases include:
A process does not own any spindle and wants to acquire one for exclusive use.
A process is the only owner of a shared spindle and wants exclusive control of
it.
A process wants to release the current spindle and acquire a new one.

Not forseen cases generate a process error.

Example:
(GTS, 4, S)

Characteristics
A call to the entire part program forces the block-calculation synchronism.

45004607K 220
Prima Electro S.p.A. OPENcontrol – Programming manual

7. AUXILIARY M FUNCTIONS

7.1 Standard M functions


In this chapter we briefly describe the auxiliary functions (hereinafter M functions) that are considered
standard for most applications. These functions are listed in the table below.
Since the machine integrator has programmed the interface between the control and your application,
the M functions that are implemented in a particular machine may be different to those described here.
Consult your machine documentation for more information on application-specific M functions.

ENABLED AT MOVE
CODE CANCELLED BY DESCRIPTION
START/END
M0 x Cycle Start Program Stop
M1 x Cycle Start Optional Program Stop
M2 x End of Program/Subroutine exit
M3 x M4-M5-M14-M19 Spindle CW
M4 x M3-M5-M13-M19 Spindle CCW
M5 x M3-M4-M13-M14 Spindle Stop
M6 x Tool Change
M7 x M9 Auxiliary Coolant On
M8 x M9 Main Coolant On
M9 x M7-M8 Coolant Off
M10 x M11 Axes Lock
M11 x Axes Unlock
M12 x M11 Rotary Axes Lock
M13 x M4-M5-M14-M19 Spindle CW and Coolant On
M14 x M3-M5-M13-M19 Spindle CCW and Coolant On
M19 x M3-M4-M5-M13-M14 Spindle Stop and Angular
Orientation
M30 x End of Program and Reset to 1st
Block
M40 x Deactivate Spindle Range
M41 x M42-M43-M44-M40
M42 x M41-M43-M44-M40 Spindle Range
M43 x M41-M42-M44-M40 1-2-3-4
M44 x M41-M42-M43-M40
M45 x M41-M42-M43-M44 Automatic Range Change
M60 x Part Change

AMP configuration determines whether an M function can be disabled by a control reset.

45004607K 221
Prima Electro S.p.A. OPENcontrol – Programming manual

The block that includes an expedite M code must also program an axis move.
Depending on how the M has been configured, the move may be point-to-point (G29) or
continuous (G26-G27-G28).

M CODE FUNCTION DESCRIPTION


Program Stop: M0 stops program execution, spindle rotation and coolant flow after the
M0 control has performed all the operations of the block in which it appears. The control
retains all current status information after executing an M0.
Optional Program Stop: If the command is enabled using user interface, M1 operates like
M1
the M0 code.
End of Program: M2 defines the end of a program or forces a subroutine exit before the
M2
subroutine is finished.
Spindle Rotation Clockwise: M3 defines spindle clockwise rotation. It is enabled by the
M3 control either when it is entered from the keyboard or when it is read from a program. In
a block it is enabled before any other axis move.
Spindle Rotation Counter clockwise: M4 defines spindle clockwise rotation. It is enabled
M4 by the control either when it is entered from the keyboard or when it is read from a
program. In a block it is enabled before any other axis move.
Spindle Stop: M5 stops spindle rotation. It is enabled by the control either when it is
M5 entered from the keyboard or when it is read from a program. In a block it is enabled
after any axes moves.
Tool Change: M6 temporarily stops the system from reading the program. It activates the
offsets selected by the T function. In a block it is enabled before any other axis move. If
M6
it also stops spindle rotation and coolant flow, then M6 does not disable M3, M4, M7, M8,
M13, M14. These functions become active again after M6 is completed.
Auxiliary Coolant On: M7 turns the auxiliary coolant on. It is enabled by the control
M7 either when it is entered from the keyboard or when it is read from a program. In a block
it is enabled before any other axis move
Main Coolant On: M8 turns the main coolant on. It is enabled by the control either when
M8 it is entered from the keyboard or when it is read from a program. In a block it is enabled
before any other axis move.
Coolant Off: M9 turns all coolant systems off. It is enabled by the control either when it is
M9 entered from the keyboard or when it is read from a program. In a block it is enabled
before any other axis move.
Linear and Rotary Axes Lock: M10 locks the axes that are not involved in the current
M10
machining process.
M11 Deactivates M10 and M12
Rotary Axes Lock: M12 locks only the rotary axes that are not involved in the current
M12
machining process.
M13 Spindle Rotation Clockwise and Coolant On
M14 Spindle Rotation Counter clockwise and Coolant on
Oriented Spindle Stop: In a block, M19 spindle is oriented before any motion in the block.
M19
M19 deactivates M3, M4, M13, M14.
Automatic Reset to End of Program: M30 deletes all information from the control
dynamic buffer. Absolute origin 0 is automatically enabled and the selected program is set
M30
for restart. M30 does not deactivate the offset of the tool in the spindle.

M40 Spindle Range Reset

45004607K 222
Prima Electro S.p.A. OPENcontrol – Programming manual

M CODE FUNCTION DESCRIPTION


M41 Spindle Range 1
M42 Spindle Range 2
M43 Spindle Range 3
M44 Spindle Range 4
M45 Automatic Spindle Range Change
M60 Workpiece Change

7.2 M Function (prelude, expedite, postlude)


There are three types of M function:

Prelude M code sent towards the PLC before the movement of the axes
Expedite M code sent towards the PLC during the movement of the axes
Postlude M code sent towards the PLC after the movement of the axes

For prelude and postlude M functions the synchronization between the movement of the axes and the
execution of the M function by the PLC is function if they can be accepted in continuous
(characterization in ODM "accepted in continuous") and the type of programmed movement (G27, G28,
G29)

"accepted in continuous" = N " accepted in continuous " = Y


G27, OPENcontrol system closes the It is synchronized with the movement.
G28 continuous, sends the M function waiting It does not requires data exchange with the
the synchronization with the PLC and PLC (sent to the PLC without suspending the
open the continuous again asap. execution of the part program)
If a movement is programmed in the
same block of the Prelude M function, it
is executed as point to point.
G29 It is synchronized with the movement.
It requires data exchange with the PLC
(the system suspends the execution of
the part program until the PLC requests
it).

The system allows the use of only one Expedite M function in each movement block of the
part program

45004607K 223
Prima Electro S.p.A. OPENcontrol – Programming manual

7.3 Parametric M functions


Up to 8 numerical parameters can be associated with a M function call. PLC will acquire these values.

Syntax:

Mn[param1[, param2 ….,param8]]

where:
n a valid code of an auxiliary M function. The code can be specified directly using an
integer number or using an E parameter. The valid range is 0 up to 9999

param1 … param8 a numerical value or a variable of type double

45004607K 224
Prima Electro S.p.A. OPENcontrol – Programming manual

8. PARAMETRIC PROGRAMMING

Parametric programming lets the programmer use system and local variables to define geometrical and
technical values for working cycles. System and local variables differ in the way they are stored and,
subsequently, their scope is very different.
System variables are stored in the dual port memory of the system. All the active processes can access
them and they are retained after the system is switched off.
Local variables are stored in a memory area local to the system and are seen only by the process they
refer to.

Their value is lost when the system is switched off. At power up they are re-initialised with the value
defined in AMP configuration.

The following table summarises the variables available with the system.

VARIABLE TYPE FUNCTION


E local E parameters
!nam local User variables
RTV local Real Time variables
LINENO local Line number in the current execution level
$BRK Local Break-point for partial execution of the program
SN system System number
SC system System character
LS system System strings
TIM system System timer (read only)
@nam system PLC variables
L System System number

Except for System Characters, all system and local variables can be used in mathematical or
trigonometric operations in place of the geometrical and technological data of the machining cycle.
A mathematical operation is 40 characters maximum long and is formed by arithmetic operators,
functions and operands (variables or numerical constants). The following are arithmetic operators:

addition (+)
subtraction (-)
multiplication (*)
division (/)

45004607K 225
Prima Electro S.p.A. OPENcontrol – Programming manual

8.1 Trigonometric functions


Trigonometric functions used by the system are listed in the table below.
FUNCTION DESCRIPTION
SIN (A) Calculates sine of A
COS (A) Calculates cosine of A
TAN (A) Calculates tangent of A
ARS (A) Calculates arc sine of A
ARC (A) Calculates arc cosine of A
ART (A) Calculates arc tangent of A
ATAN2 (A, B) Calculates the abscissas axis and the arc tangent of the angle made by A,B
coordinates and the vector centred in the origin.

The arguments of a function (A,B) can be variables or numerical constants. When the control solves a
mathematical equation, it considers the priority of brackets and signs. The result is converted into the
format of the variable written to the left of the equal sign.

Arguments of trigonometric functions (SIN, COS, TAN) must be expressed in degrees. The
result of inverse trigonometric functions (ARS, ARC, ART) is also expressed in degrees.

8.2 Mathematical functions


Mathematical functions available are listed below:
FUNCTION DESCRIPTION
SQR (A) Calculates the square root of A
ABS (A) Calculates the absolute value of A
INT (A) Calculates the integer part of A
NEG (A) Inverts the sign of A
MOD (A,B) Calculates the rest of the division between A and B
POW (A, B) Calculates A value raised to B power

8.3 Logarithmic and exponential functions


Trigonometric functions used by the system are listed in the table below.
FUNCTION DESCRIPTION
EXP10 (A) Compute A-raised to the power of 10 (10^A)
EXP2 (A) Compute A- raised to the power of 2 (2^A)
EXPE (A) Compute A- raised to the power of e (e^A)
LG2 (A) Compute the logarithm to the base 2 of A
LN (A) Compute the natural logarithm of A
LOG (A) Compute the logarithm to the base 10 of A

45004607K 226
Prima Electro S.p.A. OPENcontrol – Programming manual

8.4 Boolean functions


Boolean functions available with the system are listed in the table below.
FUNCTION DESCRIPTION
Executes AND bit-a-bit between two numbers having value from -32768 to
AND(A,B)
+32767*
Executes OR bit-a-bit between two numbers having value from -32768 to
OR(A,B)
+32767*
Executes EXOR (exclusive OR) bit-a-bit between two numbers having value
EXOR(A,B)
form -32768 and +32767*
NOT(A) 1s Complement of a number in the -32768 +32767 range*
BSET(A, B) Returns the value obtained by forcing to 1 B bit of number A*
BCLR(A, B) Returns the value obtained by forcing to 0 bit B of number A*
BTST(A, B) Returns the value of number A bit B
A && B Executes logical AND between two operands
A || B Executes logical OR between two operands
A ^^ B Executes logical XOR (exclusive OR) between two operands
NEG(A) Inverts operand sign

*The parameters of Boolean functions must be integers in the -32768 +32767 range (short format
with sign). They may be long real E (double) parameters as long as they remain in this range.

8.5 Local variables


8.5.1 E parameters
The maximum number of E parameters must be defined during system configuration. In theory, there
can be up to 8000 E parameters.
E parameters are of the Double type, which allows 17 digits in total, 17 maximum before the decimal
point and 16 decimals. The system accepts several statements per block, the only restriction being block
length. When in block-by-block mode, multiple statements will be executed as if they were in a single
block. Two levels of parametric indexes are allowed. For example: E(E(E..)).

E parameters receive values in special assignment blocks. The format of an assignment block is:

En = expression

where:
n Is the identification number of the E parameter.

expression Can be a numerical value, a character or a mathematical equation whose result is stored
in the E parameter identified by n.

45004607K 227
Prima Electro S.p.A. OPENcontrol – Programming manual

Examples:
The following are assignment blocks for parameter calculation.

E37=(E31*SIN(E30)+123.4567)/SQR(16) Solves the mathematical equation and assigns the result to


parameter E37.
E39=-0.00000124+5 Calculates the expression and assigns the result to
parameter E39.
E40=TAN(35) Finds the tangent of 35° and assigns the result to
parameter E40.
E7=81 Assigns the value 81 to parameter E7.
E25=E25+30 Adds 30 to the current value of E25 and assigns the result
to E25.
E29=1,2,3,4,5 Assigns the value 1 to parameter E29, the value 2 to
parameter E30, the value 3 to parameter E31, the value 4
to parameter E32 and the value 5 to parameter E33.
E(E42)=1729 Assigns the value 1729 to parameter corresponding to the
value memorized in E42 parameter.

E parameters can be used inside programs and subroutines. To display the current value of a parameter,
use the DIS command.

Example:
(DIS,E39) displays the current value of E39.

Example:
This example shows how to assign an ASCII character:
SCO="P" Assigns the P character to the SC0 string variable
E1=SC0
(DIS,E1) Displays 80 (ASCII code of P)

Examples of motion blocks or commands with parameters.


XE1
X-E1
X(E1)
X(-E1)
X(E8-14*SQR(E14))
X(-(E8-14*SQR(E14)))
X(E(E(E3)))

FE1
SE2
TE1.E2

45004607K 228
Prima Electro S.p.A. OPENcontrol – Programming manual

8.5.2 ! – User variables


User defined variables can be of two types:
Double
Character

Variables name and maximum number of characters must be defined in the ODM configuration. A user
variable name can be up to 10 characters long. The first character must be !.
The extension of a user variable may be .LR or .CH.

With user variables of the character type apply this rule:

!name_var [(index)] [.number of characters]CH = parameter

where:
index Number indicating the starting character in the variable character array.
If index is not specified, it is taken to be zero.
If specified, it must be programmed between round brackets.

number of characters Specifies how many characters after the index must be read/written. The
default value is 1. The sum of index+number of characters must not be
greater than the maximum number of characters configured for the
specified variable.

parameter Can be:


a string constant enclosed between apexes or quotes;
a string variable not longer than length
a numerical constant in the 0 - 255 range
a numerical variable in the 0 - 255 range.

Example:
!ABC(1) = 125
G0 X(!ABC(1))

125 is assigned to the !ABC(1) user variable, then this variable is used as argument of the X address in a
G0 block.

!CHAR(2).8CH="ABC"
This instruction writes "ABC" in the first three characters of the !CHAR user variable, starting from the
second character. The remaining 5 characters (8-3) will be automatically set to zero; to prevent this,
program !CHAR(2).3CH="ABC"
!CHAR(1).CH="A" or!CHAR(1).CH=65

45004607K 229
Prima Electro S.p.A. OPENcontrol – Programming manual

Double type user variables have the following format:

!name_var[(index)]= expression

where:
index Number identifying the variable.
If index is not specified, it is assumed to be zero.
If specified, it must be programmed between round brackets.
It can be a number or an E parameter.

expression Can be a numerical value or a mathematical expression, whose result is stored in the user
variable identified by the index.

Example:
!ABC(1) = 125
G0 X(!ABC(1))
125 is the value assigned to the !ABC(1) user variable; this variable is then used as an argument of
address X in a G0 code.

NOTES:
In motion blocks, the user variable must always be written in brackets.

Examples of motion or command blocks with Double user variables:

X(!USER1(2))
X(!USER1(2)10)
F(!USER1(1))
S(!USER1(1))
T(!USER1(1).(!USER1(2))

45004607K 230
Prima Electro S.p.A. OPENcontrol – Programming manual

8.5.3 Real time variables – RTV


The control offers an array of 8 variables double type, known as Real Time Variables. The values of these
variables are copied in areas of shared memory every time a movement is generated.

The syntax to assign to a Real Time variable is:

RTV(n) = expression

where:
n Is the identification number of the Real Time Variable. It can be directly expressed as an integer
between 0 and 7 or, indirectly, using a variable.

Refer to the WinPLUS Application Manual to know on which PD type variables the Real Time Variables
are copied.

Example:
RTV(0) = 1
G27G1X100F1000 During this movement the correspondent PD variable is 1
RTV(0) = 2
G1X150 During this movement the correspondent PD variable is 2
RTV(1) = 3
G1X200 During this movement the correspondent PD variable are 2 and 3
RTV(0) = 4
(DIS, RTV(0)) It displays 4

8.5.4 LINENO – Number of the program string selected


The LINENO variable contains the number of the line outlined during the block analysis, containing the
LINENO instruction. The LINENO variable can be read, displayed or stored in a support variable.

NOTE: The content of the LINENO variable cannot be changed from part-program.

Example:
; Test
G27 G1 X10 F1000
X30
E0 = LINENO
X40
#E1 = LINENO

If the previous example is executed in automatic mode, the variable E1 contains the value 5, while in E0
it should have value 1 as the block to which the assignment refers is analysed before the execution of
the movement described in line 1.

45004607K 231
Prima Electro S.p.A. OPENcontrol – Programming manual

8.5.5 $BRK – Point of break-point for partial execution of a program


The variable $BRK allows to define a break-point for the partial execution of a program or for the
memory search.

The syntax to assign the break-point variable is the following:

$BRK = expression

where:
expression is the id number of the break-point. It can be expressed directly using an integer or
indirectly by means of an algebraic expression.

Characteristics:
The breakpoint value can be used to define the end point of the execution of a program or the point
where the execution in memory search must end.

Example:
$BRK = 0
G90X0
'LOOP'

(DIS, $BRK)
GX >> 1
$BRK = $BRK + 1
(GTO, LOOP, $BRK < 100)

If the partial execution of the program is defined until $BRK = 42, then the execution will end when the
X axis will be at 42 and the displayed value of $BRK will be 41.

45004607K 232
Prima Electro S.p.A. OPENcontrol – Programming manual

8.5.6 GPRG – Status of the programmed G codes


The vector variable GPRG contains the numerical value of the active G codes when the block containing
the instruction GPRG is analised.
The content of the variable GPRG can not be modified by part program but only read, displayed or
stored into a support variable.

NOTE:
The variable GPRG is a vector of 14 elements consistent with the area of the active G codes present in
the default screen of the Provideo of the WinNBI.
The meaning of the individual elements of the variable is shown below following the same visualization
order.

VARIABLE CONTAINED VALUE ACTIVE G CODES


GPRG(0) 0 or 1 or 2 or 3 or 6 or G0 or G1 or G2 or G3 or G6 or
10 or 12 or 13 or 14 or 33 G10 or G12 or G13 or G14 or G33
GPRG(1) 8x G8x
GPRG(2) 72 or 73 or 74 G72 or G73 or G74
GPRG(3) 92 or 98 or 99 G92 or G98 or G99
GPRG(4) 40 or 41 or 42 G40 or G41 or G42
GPRG(5) 26 or 27 or 28 or 29 G26 or G27 or G28 or G29
GPRG(6) 4 or 9 G4 or G9
GPRG(7) 90 or 91 G90 or G91
GPRG(8) 79 G79
GPRG(9) 70 or 71 G70 or G71
GPRG(10) 16 or 17 or 18 or 19 G16 or G17 or G18 or G19
GPRG(11) 93 or 94 or 95 G93 or G94 or G95
GPRG(12) 96 or 97 G96 or G97
GPRG(13) 60 or 61 G60 or G61

Example 1:
The variable will take on the numerical value of the active G code when the block containing the
instruction GPRG is analised.
i.e. in order to know if the code G10 is active it must be written:

(IF, GPRG(0) = 10)….

Or for the measuring unit:


E0 = GPRG(9)
(IF, E0 = 71)…

45004607K 233
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 2:
With reference to the program lines listed below, assume that the system is running the block N30 in
continuous mode, the G of movement which is active at the time of the analysis of the block N60 is G1,
while the one synchronous with the programming is G0.
At the end of the program, the system will display 0.

N10 G1 G27
N20 X100 F1000
N30 X200
N40 X300
N50 G0 X400
N60 E2 = GPRG(0)
N70 G1 X0
N70 (DIS, E2)

8.5.7 RCD – Disable counter for RCM


The variable RCD allows to disable the count of the movement elements that must not been taken into
account during the search in memory. The movement blocks executed with RCD=1 are not considered for
the RCM. Default value is 0.

Example:
In the following example blocks from N100 to N150 are not counted during the execution and so not
considered for the RCM

MAIN TOOL_CHANGE
N10 G1 G27 N100 RCD = 1
N20 X100 F1000 N110 G79 X0Y0Z0
N30 (CLT, TOOL_CHANGE) N120 h3
N40 X300 N130 T3M6
N50 G0 X400 N140 G79 X50 Z-10
N150 RCD = 0

45004607K 234
Prima Electro S.p.A. OPENcontrol – Programming manual

8.5.8 CTV – CYCTIME – Cycle time variables


When the “Execution time estimation” is enabled for a process (from Provideo) the related read only
variable CYCTIME is set to 1 and the subsequent start will perform the active program in simulation
mode. Please refer to the paragraph “Set up - Execution time estimation” in the User Manual for more
details.

When a program is executed in “Cycle time estimation” mode, the system makes available 10 variables
from CTV(0) to CTV(9) into which the following calculated times can be found (in seconds):

CTV(0) = Total execution time of the program


CTV(1) = Working times (cutting times, i.e. operations made with G1/G2/G3….)
CTV(2) = Positioning times (times in G0/G10)
CTV(3) = Technology execution times (times of the functions M S T)

These 4 variables are set to 0 at the cycle start and updated only at the end of the program, adding the
calculated times to the value of the respective variables.
These are input/output variables that the part programmer can use for specific initializations

Variables from CTV(4) to CTV(9) are reserved for future use.

45004607K 235
Prima Electro S.p.A. OPENcontrol – Programming manual

8.6 System variables


There are five types of system variables that can be used in part programs:
System Number
System Character
System String
System Timers
WinPLUS Variables

These variables can be used to read or write values or strings for assignment operations within part
programs.

8.6.1 SN – System Number


System Number variables are of the Double type, which allows 17 signed digits with 17 integer digits
maximum or 16 decimal. Up to 25 System Numbers can be defined in the 200 byte area that is available
in the dual port memory of the system.

The format of a System Number variable is as follows:

SNn = expression

where:
n Is the identification number of the System Number variable. The n parameter can be a
number or an E parameter.

expression Can be a numerical value, an equation, or a character whose result is stored in the System
Number identified by n.

NOTE:
A System Number variable can be assigned to another System Number variable already defined
SN variables are global to all the processes and they are retentive, that is they maintain their
value also after control switch off

Examples:
1. SN20 = 326.957
The decimal value 326.957 is assigned to the SN20 variable.
2. SN20 = (SN9*SIN(30) + 12.5)/SQR(81)
The result of the mathematical expression is assigned to the SN20 variable.

Examples of motion or command blocks with SN variables:


X(SN0)
X(SN0SN1)
F(SN1)
S(SN2)
T(SN1).(SN3)

45004607K 236
Prima Electro S.p.A. OPENcontrol – Programming manual

8.6.2 SC – System Character


System Character variables are of the character type and are stored in the dual port memory of the
system, where a 100 byte array is reserved for them. This means that all the defined System Characters
cannot occupy more than 100 bytes.
Each System Character is identified by an index that specifies the start address inside the array and by a
length that specifies how many bytes the variables occupies starting from that address.

var1 var2
index index

0 1 2 3 4 5 6 7 8 9 10 11 99

length length

The format of a System Character variable is as follows:

SCindex.length = parameter

where:
index Is the index that specifies the start position of the variable in the array. It may be in the 0
to 99 range. The index of the variable can be a number or an E parameter.

length Is the length of the variable expressed in number of characters (bytes). The length can be
a number or an E parameter.

parameter A parameter may be:


a string constant enclosed between apexes or quotes;
a string variable not longer than length
a numerical constant in the 0 - 255 range
a numerical variable in the 0 - 255 range.

NOTES:
For each variable, index + length sum must not exceed 100.
One System Character variable can be assigned to another System Character variable.
Numeric variables (decimal) corresponding to ASCII characters can be assigned to SC
variables. In this way it is possible to assign those characters that are not displayed. For
example, 10 (LF) and 13 (CR).
Numerical values are programmed without double quotes (" ").
SC variables are global to all the processes and are retentive, that is retain their value
even after switching off the CNC

45004607K 237
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
SC2.5="PIPPO"
SC8.3="ABC" or SC8.3=65,66,67

0 1 2 3 4 5 6 7 8 9 10 11 99
P I P P O A B C

The string "PIPPO" is written starting from byte 2 of the array and occupies 5 bytes.

The string "ABC" is written starting from byte 8 of the array and occupies 3 bytes.

When defining the index and the length, care must be taken not to overlap two variables.

Example:
SC0.1=80 assigns 80 to the string variable
(DIS,SCO.1) displays P (ASCII code 80)

E1=80 assigns 80 to E1
SC0.=1E1
(DIS,SC0.1) displays P (ASCII code 80)

45004607K 238
Prima Electro S.p.A. OPENcontrol – Programming manual

8.6.3 LS – System Strings


A System String variable is an array of 100 strings with up to 128 characters. This means that system
string variables take up 128000 bytes in system memory.
Each System String is identified by an index specifying its starting address; its length need not be
specified, since the system reads or writes a string from its first character to the line terminator or up to
the 128 character limit.

0 1 2 3 4 5 6 7 8 9 10 11 127
LS
o

LS1

LS99

Syntax

LSindex = parameter

where:
index Identifies the string in the memory. It may have values in the 0 to 99 range and it may be
a number or an E parameter. If no index is specified, the string is assumed to be a 0
position string

parameter It may be:


a string constant delimited by single or double superscripts
a string variable of up to 128 characters
a numerical constant whose value ranges from 0 to 255
a numerical variable whose value ranges from 0 to 255

NOTES:
A System String variable may be assigned to another System String variable.
Numerical variables corresponding to ASCII characters can be assigned to LS variables. In this
way, it is possible to assign characters that are not visualised, e.g., 10 (LF) and 13 (CR).
Numerical values are programmed without double subscripts (" ").
LS variables are global to all the processes and are retentive, that is retain their value even after
switching off the CNC

45004607K 239
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
LS ="PIPPO"
LS3="ABC" or LS3=65,66,67 Assigns an "ABC" string to variable LS with index 3

0 1 2 3 4 5 6 7 8 9 10 11 39
LS P I P P 0

0 1 2 3 4 5 6 7 8 9 10 11 39
LS3 A B C

Example:
Assigning a character variable value to an LS variable.
SC3.5=”PLUTO” Assigns a PLUTO string to variable SC
LS10 = SC3.5 Assigns an SC string with five characters starting from index 3 to the LS variable with index
10
(DIS,LS10) Displays PLUTO
E1=80 Assigns 80 to the variable E1
LS1=E1 Assigns the content of E1 to the string variable
(DIS,LS1) Displays P (ASCII 80 character).

8.6.4 TIM – System Timer


The TIM instruction defines a variable used by the programmer to read the time shown by the control
timer. Its value is expressed in seconds.
A TIM instruction can be read, displayed or stored in a support variable.

Computation of this value starts as the control is switched on.

Example:
(DIS, TIM)
E10=TIM

NOTE:
TIM content cannot be modified from part program.

45004607K 240
Prima Electro S.p.A. OPENcontrol – Programming manual

8.7 @ - WinPLUS variables


From part-program it is possible to read or write the PLC variables managed by the machine logic.

Syntax

@name

where:
name Is the name of the variable declared in the configuration (AMP).
There are three types of WinPLUS variables:
Short
Boolean
Double

The system has 2000 Short variables. Short variables names and their correspondence with WinPLUS
variables are configured in AMP.
They are made up of 16 bits and can contain values between -32768 and +32767.
You can also address a single bit of a Short variable with a Boolean variable.

There are 256 Boolean variables, but a part program can only access 128 of them. The names of the
Boolean that can be accessed by part programs must be configured in AMP.

System has 1000 Double variables, all accessible by the part program. The names of the Double variables
that can be accessed by a part program must be configured in AMP.
The total number of Boolean, Short and Double variables must be configured in AMP.

The values of all the PLC variables configured in AMP are loaded when the system is started up. If the
value field of a variable is empty, the variable is not initialised and retains the value it had when the
system was switched off.
WinPLUS variables are global to all the processes and are retentive (if not initialized), that is retain their
value even after switching off the CNC

WinPLUS variables can be used in a part program as follows:

Assignment blocks and three-letter codes


 E10=@LOG1
 (GTO,END,@LOG3=1)

Motion or command blocks
 G0 X (@LOG2)
 X(@LOG22)
 F(@LOG2)
 S(@LOG3)
 T(@LOG2)(@LOG3)

Because these variables are directly linked to the PLC, the machine tool manufacturer must
provide you with the list of the variables used in your application as well as with all the
information you need in order to handle them correctly.

45004607K 241
Prima Electro S.p.A. OPENcontrol – Programming manual

8.8 L variables
L variables have Double format, with 17 signed figures and a maximum of 17 integer figures. There are
3000 L variables indexed from 0 to 2999.

These variables conform with the user tables available in the table editor and the PLC environment.
They can be utilised both in the programming and the logic environment, either separately or for
communications between both environments.

L variables are global to all the processes and are retentive, that is retain their value even after
switching off the CNC

Examples:
L10 = 26.9570
L15 = (L10*SIN (30)+9)/SQR(81)
(GTO,END,L2=1)
G0XL15
X(L15)
X(L15L1)
FL1
SL1
TL1.L3

Because these variables are directly linked to the PLC, the machine tool manufacturer must
provide you with the list of the variables used in your application as well as with all the
information you need in order to handle them correctly.

45004607K 242
Prima Electro S.p.A. OPENcontrol – Programming manual

8.9 Multiple assignments


With the multiple assignment operators [[ ]] it is possible to assign the contents of other variables to a
certain number of variables.
Multiple assignment is accepted only for numeric variables.

Syntax:

destination_variable = [[ source_variable, number_variables ]]

where:
destination_variable is the first destination variable.
source_variable is the first of the source variables.
number_variables is the number of variables to transfer. It can be an integer or a local or system
variable.

Examples:
E0 = [[ SNO,4 ]]
is equivalent to the following four assignments:

E0 = SN0
E1 = SN1
E2 = SN2
E3 = SN3

E100 = 5
E50 = [ LO,E100 ]
is equivalent to the following five assignments:

E50 = L0
E51 = L1
E52 = L2
E53 = L3
E54 = L4

45004607K 243
Prima Electro S.p.A. OPENcontrol – Programming manual

9. PARAMACRO

9.1 Paramacro definition


Paramacro subroutines can be used in user-defined cycles. They are called using 3-digit G codes
Modal paramacros are active only in motion blocks that do not include M functions. No other function or
code can be programmed when a modal paramacro is active.

Syntax:

Gn [ar-name-1 [value-1] . . . [par-name-n value-n] . . . ["string"]

where:
n It is a number from 300 to 998

par-name-1. . . Letters (refer to the correspondence table)


par-name-n

value-1 . . . Can be a number or an E parameter or a parametric expression.


value-n

string Characters string (max. 99)

Characteristics:
There are two groups of paramacros:
from G300 to G699 Non-modal paramacros
from G700 to G998 Modal paramacros

Modal paramacros are reset by G999.


The H, HF and HC parameters are used in the paramacros, The system offers 128 H parameters. Some of
them can be used in paramacros. H parameters are classed as follows:
Parameters from H0 to H51 are associated with letters and can not be used from operations
within a paramacro (see equivalence table).
Parameters from H52 to H59 are associated for sending parameters used by M functions used as
paramacro (see equivalence table ).
Parameters from H60 to H127 can be used for math operations in paramacros.
H parameters can be used in paramacros to perform all the operations available to E parameters.
Paramacros allow up to 7 nesting levels.
According to the ISO compatibility type defined in AMP, H variables will exist to global or local level.
When the variables are global, changing the parameters H, HF, and HC in a lower paramacro will erase
the corresponding equivalent parameters H, HF, and HC of the paramacros of higher level.

45004607K 244
Prima Electro S.p.A. OPENcontrol – Programming manual

In case of local H variables, values of the H, HF and HC parameters having a lower level will not change
values of corresponding H, HF and HC variables at the higher upper level.
Through the configuration of the domain of the H variables, it is also possible to decide whether the
transition from the upper level to the lower level will zero the values of the H variables or if they will
inherit the values of the upper level. Inheritance does not apply to the parameters HF
When a letter is programmed, the corresponding HF parameter is set to 1 (Boolean type). It makes it
possible to check that all parameters of a paramacro have been programmed.

Example:
G300 A1 B2 C3 D4

H0 is assigned to 1 value
H1 is assigned to 2 value
H2 is assigned to 3 value
H3 is assigned to 4 value

HF0 is forced to 1
HF1 is forced to 1
HF2 is forced to 1
HF3 is forced to 1

All other HF are reset.

If G300 calls:
G400 A10 C30,
If H variables are configured as local or global, the result will be different.
In case of global H variables then the value of H0 will be 10 and the value of H2 will set to 30. HF0 and
HF2 will be forced to 1 and all other HF's will be set to 0. Values assigned to H0 and H2 in G300 will be
lost

In case of local H variables, H0=10, H2=30, HF0 and HF2 will be forced to 1 and all the other HF will be
set to zero, H1=2 and H3=4. Values given to H0 and H2 are not lost as at the end of G400 execution all H
variables will have again the value they had before the G400 call.

E parameters (and all other parameters available in CNC OPENcontrol) can be used in paramacros if
needed. However, to avoid interaction with parameters used elsewhere, it is preferable to use only H
parameters within G paramacros.

45004607K 245
Prima Electro S.p.A. OPENcontrol – Programming manual

9.2 HC parameters
If a block calling a paramacro also includes a character string between inverted commas, this string is
made available to the paramacro in the HC character array (100 characters).
If no such string is specified, the entire HC array is reset.

Array is always unique regardless the ISO compatibility type configured by the ODM.

If the string was programmed, it is put in the HC variables with a terminator '0' added; for this reason,
maximum length of the string is 99, even if the HC array is 100 characters long.

Examples:
!PROFILE=............
G600 "PROFILE" A50 ;call to paramacro G600
..
..
;------------------ in the paramacro............
(DIS,HC0.10)
(CLS,?HC0.10)

State of the HC parameters after the call to the paramacro:

HC0="P" HC1="R" HC2="O" HC3="F" HC4="I" HC5="L" HC6="O" HC7=0


H0=50 HF0=1

The following table shows the correspondence between letters and H parameters.
PARAMETERS PARAMETERS
LETTER LETTER
H HF H HF
A H0 HF0 a H26 HF26
B H1 HF1 b H27 HF27
C H2 HF2 c H28 HF28
D H3 HF3 d H29 HF29
E H4 HF4 e H30 HF30
F H5 HF5 f H31 HF31
G H6 HF6 g H32 HF32
H H7 HF7 h H33 HF33
I H8 HF8 i H34 HF34
J H9 HF9 j H35 HF35
K H10 HF10 k H36 HF36
L H11 HF11 l H37 HF37
M H12 HF12 m H38 HF38
N H13 HF13 n H39 HF39
O H14 HF14 o H40 HF40
P H15 HF15 p H41 HF41
Q H16 HF16 q H42 HF42
R H17 HF17 r H43 HF43
S H18 HF18 s H44 HF44
T H19 HF19 t H45 HF45
U H20 HF20 u H46 HF46

45004607K 246
Prima Electro S.p.A. OPENcontrol – Programming manual

PARAMETERS PARAMETERS
LETTER LETTER
H HF H HF
V H21 HF21 v H47 HF47
W H22 HF22 w H48 HF48
X H23 HF23 x H49 HF49
Y H24 HF24 y H50 HF50
Z H25 HF25 z H51 HF51

The following table shows the corrispondence between parameters of the M auxiliary functions used as
paramacro and H parameters.

Parameter PARAMETERS Parameter PARAMETERS


Mcode H HF Mcode H HF
Param1 H52 HF52 Param5 H56 HF56
Param2 H53 HF53 Param6 H57 HF57
Param3 H54 HF54 Param7 H58 HF58
Param4 H55 HF55 Param8 H59 HF59

Example 1:
N45 G777 A(E8) R22.5 F(E2) S(E3+5-E1)

E8 passed to H0
22.5 passed to H17
E2 passed to H5

The result of (E3+5-E1) is passed to H18.

In this example, the Boolean parameters HF0, HF17, HF5 and HF18 are set to 1.

45004607K 247
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 2:

D = H3 = Major diameter
R = H17= Minor radius
F = H5 = Feed

Program: This is an example of milling/boring


cycle using paramacros.
;MAIN PROGRAM

N20 G601 D125 R25 F160


N21 . . .
; PARAMACRO G601
G0 X90 Y80
G92 XY
(GTO,END,HF3=0)
(GTO,END,HF17=0)
(GTO,END,HF5=0)
H67=H3/2
H68=H57-H17
G1 G41 XH17 YH68 F2000
G3 X0 YH67 I0 JH68 FH5
I0 J0
H69=NEG(H17)
G40 XH69 YH68 I0 JH68
G1 X0 Y0 F2000
(GTO,F)
"END"
G99
(DIS,"OMITTED PARAMETERS")
M ..
"F"

45004607K 248
Prima Electro S.p.A. OPENcontrol – Programming manual

9.3 DAN – Define axis name


This command associates the name of a characterised axis with the name used in a paramacro.

Syntax:

(DAN,par-ax1 char-ax1[,par-ax12 char-ax12])


(DAN)

where:
par-ax1 ... par-ax12 names of the axes used in the paramacro
char-ax1 ... char-ax1 name of the characterized axes (max 6).
no parameter (DAN) without parameters (DAN) modality is disabled

Example 1:
(DAN,PX,QY,DZ) X,Y,Z substituted by P,Q,D therefore X,Y,Z cannot be used

Example 2:
(DAN,PX,QY,DZ) X,Y,Z substituted by P,Q,D therefore X,Y,Z cannot be used
(DAN,WA) A substituted by W moreover X,Y,Z are re-enabled, therefore
P,Q,D,A cannot be used
The reprogramming of (DAN,...) resets the previous associations and enables the
present ones as for the initial characterization.

After the three-letter mnemonic DAN has been used, if the axes concerned are those of the
interpolation plane, this plane must be redefined using the new names.

45004607K 249
Prima Electro S.p.A. OPENcontrol – Programming manual

9.4 SCRLPAR – Scrolling paramacro status


This variable defines the default behaviour for paramacro scrolling and execution. It applies to all
paramacros, regardless of their type (M,S,T and G).

Syntax:

SCRLPAR = value

where:
value It can be =1 or =0. If 0, in all paramacro scrolling is disabled, while if =1 scrolling is
enabled.

Characteristics:
If SCRLPAR is 0 and the selected mode is BLOCK-by-BLOCK, then a paramacro and other paramacro or
subroutines which the paramacro calls will be executed with a single push of the CYCLE START button.
SCRLPAR value applies for the execution level where it is assigned and for all lower levels (e.g.
paramacros and subroutines called from that level), but does not apply to higher levels (e.g. calling
program / paramacro).
If SCRLPAR is 0 for a higher execution level, then any modification to its value (e.g. setting it to 1) is
ignored.
Default value for SCRLPAR is defined in AMP through ODM.

Example:
Main program: G302 G303
N1 SCRLPAR=1 N10 GX10Y10 N21 G1X-10Y-10
N2 G302 N11 SCRLPAR=0 N22 SCRLPAR=1
N3 G303 N12 G303

The execution of the program will be:


N1 SCRLPAR=1 ; SCRLPAR set to 1, no effect
N2 G302 ; entering the paramacro. Since SCRLPAR is 1, then paramacro blocks will
; appear on screen
N10 GX10Y10 ;
N11 SCRLPAR=0 ; SCRLPAR set to 0
N12 G303 ; Entering the paramacro. Since SCRLPAR is 0 then paramacro blocks
; will not appear on screen.
N21 G1X-10Y-10 ; The screen shows block G303
N22 SCRLPAR=1 ; Since SCRLPAR has been set to 1 then this assignment is unseen
; the screen still shows block G303

N3 G303 ; Entering the paramacro. At this level of execution SCRLPAR has not been modified;
paramacro blocks will appear on screen
N21 G1X-10Y-10 ;
N22 SCRLPAR=1 ; SCRLPAR remains at 1

The three-letter code DGM has a higher priority than the SCRLPAR variable, therefore a
paramacro containing this three-letter code will be always executed with scrolling disabled.

45004607K 250
Prima Electro S.p.A. OPENcontrol – Programming manual

9.5 DGM – Disable paramacro scrolling


This command stops the screen scrolling during the execution of a paramacro. It also executes a
paramacro in only one execution cycle.

Syntax:

(DGM)

Characteristics:
DGM three-letter code disables visualization and scrolling of the blocks of a paramacro. It can be
programmed in any position in a paramacro and affects the entire paramacro.
If current execution mode is block-to-block, then the paramacro, nested paramacros and subroutines,
will be executed entirely by a single push of the cycle pushbutton.

The three-letter code is taken into account only by paramacros. It is ignored if it appears in
the main part-program or any subroutine.
DGM has priority over the SCRLPAR variable, therefore the paramacro containing this
three-letter code will be always executed with scrolling disabled.

45004607K 251
Prima Electro S.p.A. OPENcontrol – Programming manual

9.6 PMS – S as paramacro / PMT – T as paramacro / PMM – M as paramacro


These commands enable and disable the management of the related auxiliary functions S, T, M as
paramacros.
For further information on how to program these paramacros see the paragraph on the “S, T, M auxiliary
functions executed as paramacros” in this chapter.

Syntax:

PMS=value
PMT=value
PMM=value

where:
value This value can be:
0. Disables management of the S, T, M functions as paramacros – these functions are
executed in standard mode
1. Enables management of the S, T, M functions as paramacros – these functions enable
execution of the corresponding paramacro
NOTE:
The values assigned to the variables PMS, PMT and PMM cam be modified in the following ways:
Through ODM at the configuration stage
Through a part program with the syntax described
RESET command restores the characterisation values for these variables.

9.6.1 Auxiliary functions S, T, M executed as paramacros


The execution of the S T M auxiliary functions can be associated with paramacro type subprograms, i.e.
in the presence of a block containing at least one S, T and/or M function, previously configured as a
paramacro, the corresponding subprogram is executed, according to the criteria currently defined for
paramacros.

Syntax:
Same as the syntax used for auxiliary functions executed in standard mode, with the following limit: in
case of paramacros linked to S or T functions it is possible to program only one M code, possibly with its
parameters. In case of M paramacros it is instead possible to program other 3 M codes beside the M
paramacros code.

45004607K 252
Prima Electro S.p.A. OPENcontrol – Programming manual

Auxiliary code Paramacro

S In the presence of an “Sx” function, e.g. on process “n”, paramacro “PnS” is


executed with parameter H18 = x

T In the presence of a “Tx.y” function, e.g., on process “n”, paramacro “PnT” is


executed with parameter H19 = x.y. The following additional variables are defined
for the parameters, the tool code and the offset associated with the programming
of T:
HI (H Integer), double type, and corresponding HFI flag: contains the whole
number to the left of the decimal point (tool code). In the example HI = x
HD (H Decimal), double type, and corresponding HFD flag: contains the whole
number to the right of the decimal point (offset tool code).
In the example HD = y
HS (H String), string type, with the corresponding HFS flag: contains the ASCII
ToolName, if programmed. HS is a 40-character string, but is reduced to 32
when used for T

M In the presence of an “Mx” function, e.g. on process “n”, paramacro “PnMx” is


executed with parameter H12 = x. It is possible to set up to 8 parameters using the
following syntax:
Mx[param1[, param2 ... , param8]
It is possible to program in the same block other three M codes, which should
preferably be programmed after the paramacro M code. If the non paramacro M
codes are programmed before the M paramacro, then their values must be
programmed through an expression or must correspond to an auxiliary M function.

Values and parameters related to the M codes are assigned to the H variables
according with the following table:
Parameter description Associated H variable
Paramacro M code H12
Parameters associated to the M paramacro H52H59
First non paramacro M code H60
Parameters associated to the first non paramacro M code H6370
Second non paramacro M code H61
Parameters associated to the second non paramacro M code H7178
Third non paramacro M code H62
Parameters associated to the third non paramacro M code H7986

Characteristics:
The functions generating paramacro calls cannot be programmed at the start of the block.
Leading zeroes in process number and M code are not taken into account for the paramacro name.
This means that M code 45 on process 1 will correspond to paramacro P1M45.
If M, S and/or T are programmed simultaneously, the name of the procedure to be called is
determined by the first function which is configured as a paramacro, and any other function
programmed in the block is called with the respective parameters H, HF and HC, as described in this
chapter. For example, if both M and T are configured as paramacros, programming TxMy, will
generate a call to macro PnT whilst programming MyTx will call the "PnMy" macro, with parameters
H19=x and H12=y in either case.

45004607K 253
Prima Electro S.p.A. OPENcontrol – Programming manual

For the execution of the paramacro in MDI mode, see paragraph “Executing blocks entered from the
keyboard” in the user manual.
At the end of the paramacro, the execution mode (MDI, AUTO, STEP) in which the system was working
before the call is restored.
The type of paramacro being executed can be read in the SW21 variable and it is:
 1000 for a paramacro called by the S function
 2000 for a paramacro called by the T function
 3xxx for a paramacro called by the Mxxx function

The pathname to be used to call the paramacros can also be specified with the PTH mnemonic
described below in this chapter. If the pathname is omitted, the search for the directory containing
the subroutine is performed as follows:
case 1: no pathname has been specified through a PTH instruction.
System searches for the paramacro in the directory containing the calling program and, if it does
not find it, searches for it in the default directories specified in AMP.
case 2: a pathname has been specified through a PTH instruction.
System searches for the paramacro in the directory specified with a PTH and, if it does not find it,
searches for it in the configured default directory.

Configuration: three process variables (PMM, PMS, PMT, previously defined), if set to 1 or 0,
enable or disable the execution of the corresponding functions as paramacros.
Moreover, the execution of an auxiliary function M as a paramacro is identified by
a bit, defined in ODM.
Hence, if PMM = 1 and the “Mx” function is:
configured in the “n” process but its bit = 0, the paramacro is not executed
(standard Mx is executed instead)
configured in the “n” process and its bit = 1, the “PnMx” paramacro is executed
not configured in the “n” process, an “M not defined” error message is
displayed

Example:
Execution of the block described below in process 1, in which the auxiliary function M2 is configured
with the paramacro bit enabled
N20 X10 M2 T1.0 S2000

Paramacro
PMM PMT PMS Parameters
name
H23 = 10; H12 = 2; H19 = 1.2; HI = 1; HD = 20 H18 = 2000
1 1 or 0 1 or 0 P1M2 and HF23 = 1; HF12 = 1; HF19 = 1; HFI = 1; HFD = 1;
HF18 = 1
H23 = 10; H12 = 2; H19 = 1.2; HI = 1; HD = 20 H18 = 3000
0 1 1 or 0 P1T and HF23 = 1; HF12 = 1; HF19 = 1; HFI = 1; HFD = 1;
HF18 = 1
H23 = 10; H12 = 2; H19 = 1.2; HI = 1; HD = 20 H18 = 3000
0 0 1 P1S and HF23 = 1; HF12 = 1; HF19 = 1; HFI = 1; HFD = 1;
HF18 = 1

45004607K 254
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:
Execution of the following part program block in the process 1 where it is configured the auxiliary
function M42 with the bit of paramacro enabled.

PMM = 1
N30 X10 M42 T50 M45[12]
X10 H23 = 10 HF23 = 1
M42 H12 = 42 HF12 = 1
T50 H19 = 50 HF19 = 1
HI = 50 HFI = 1
HD = 0 HFD = 1
HS = “50” HFS =1
M45[12] H60 = 45 HF60 = 1
H63 = 12 HF63 = 1

Example:
Execution of the following block in process 1 where variable PMT was set to 1.
T"ToolName".20 calls paramacro P1T with parameters: H19=0.2, HF19=1; HFI = 0; HD = 20 and HFD
= 1; HS =" ToolName" and HFS = 1

This is an example of how paramacros are developed

;PARAMACRO P1M2 ;PARAMACRO P1T ;PARAMACRO P1S


E0 = H12 E1 = H19 E2 = H18
PMM = 0 PMT = 0 PMS = 0
ME0 TE1 SE2
"TEST_T" "TEST_M" "TEST_M"
(GTO,TEST_S,HF19=0) (GTO,TEST_S,HF12=0) (GTO,TEST_T,HF12=0)
E1 = H19 E0 = H12 E0 = H12
PMT = 0 PMM = 0 PMM = 0
TE1 ME0 ME0
"TEST_S" "TEST_S" "TEST_T"
(GTO,END,HF18=0) (GTO,END,HF18=0) (GTO,END,HF19=0)
E2 = H18 E2 = H18 E1 = H19
PMS = 0 PMS = 0 PMT = 0
SE2 SE2 TE1
"END" "END" "END"

45004607K 255
Prima Electro S.p.A. OPENcontrol – Programming manual

10. MODIFYING THE PROGRAM EXECUTION SEQUENCE

10.1 General
This chapter discusses commands that can modify, disable or suspend the program execution sequence
by:

repeating part programs


executing subprograms
modifying the flow of the program
delaying and disabling execution
releasing the program or suspending its execution

10.1.1 Block repetition commands


Commands in this class are:

COMMAND FUNCTION
RTP Opens the set of program blocks to be repeated
ERP Closes the set of program blocks to be repeated

These commands allow a specified set of program blocks to be executed several times. They can be used
for repetitive machining operations such as drilling multiple holes.

10.1.2 Commands for executing subprograms


Commands in this class are:
COMMAND FUNCTION
CLS,CLD,CLT Calls a subroutine and executes it
$(name) Calls a subroutine and executes it
PTH Defines and activates the default pathname for the subroutine

A subroutine is a series of blocks defining a machining cycle. The subroutine is stored as a separate file
with its own name. Control passes to blocks of the subroutine each time that they are called by the CLS,
CLD or CLT command. The subroutine may be called at any time and from any part of the main program.

45004607K 256
Prima Electro S.p.A. OPENcontrol – Programming manual

10.1.3 Commands for modifying program flow


The commands in this class are:
COMMAND FUNCTION
EPP Executes a section of a part-program delimited by one or two labels
EPB Executes a block of a part-program
GTO Performs a jump or skip during the execution of the program
IF ELSE ENDIF Executes sessions of a part-program depending on certain conditions

The GTO command makes the execution of a program jump to a block which contains a specific label. A
jump may be unconditional or conditional based on E parameters, machine logic signals or numeric
values.
A conditional jump is performed only if the result is true. No jump is performed if the condition is false.
The commands IF, ELSE, ENDIF allow the flow of the program to be modified conditionally without the
need to define labels and program skips.

10.1.4 Commands for delaying program execution and disabling blocks


Commands in this class are:
COMMAND FUNCTION
DLY Causes a delay in the execution of the program
DSB Disables slashed blocks

The delay command can be used to delay the execution of the program for reasons due to
synchronisation. The disable command lets the user choose to execute or not execute slashed blocks.

10.1.5 Commands for the releasing or suspending the execution of a program


The commands in this class are:
COMMAND FUNCTION
REL Releases the part-program
WOS Puts the program in wait mode until a signal is received

45004607K 257
Prima Electro S.p.A. OPENcontrol – Programming manual

10.2 RPT and ERP – Commands for program blocks repetition


The RPT and ERP commands define a set of part program blocks that must be executed a specified
number of times. The set of blocks begins with the RPT command and ends with the ERP command.

Syntax:

(RPT,n)
.
.
.
blocks
.
.
.
(ERP)

where:
n Is the number of times the specified block must be executed. It is an integer from 1 to
65535 that can be programmed directly with a number or indirectly with an E parameter.
The control allows five nesting levels, i.e. in a repeat block you can program up to four
repeat commands.

blocks It is the set of blocks that must be executed n times.

The GTO command can be programmed inside an RPT-EPP section. However, if at program end
at least one of the cycles programmed with RPT is not executed, the system returns the
following error: '
23/166 RPT/EPP CYCLE OPEN AT END OF PROGRAM'.

Example 1:
The following is an example of the command.

80 80

40
20
30
20

20

20 X

45004607K 258
Prima Electro S.p.A. OPENcontrol – Programming manual

Program:
(DIS,"N.3 POCKETS")
(DIS,"MILL D12")
N1 S600 T6.6 M6
N2 (RPT,3)
N3 X40 Y35 M3
N4 Z 2
N5 (RPT,2)
N6 G91 Z-8
N7 G90 G1 G41 X40 Y20 F300
N8 X60
N9 Y50
N10 X20
N11 Y20
N12 G40 X40
N13 Y35 F1000
N14 (ERP)
N15 G Z2
N16 (UIO,X80,Y20)
N17 (ERP)
N18 (UAO,0)
N19 Z20
N20 X Y M30

Example 2:
This example shows how three repeat levels are nested.

(RPT, 8)
(RPT,
10)
(RPT, 5)
1 2 3
(ERP)
(ERP)
(ERP)

45004607K 259
Prima Electro S.p.A. OPENcontrol – Programming manual

10.2.1 Machining Equidistant Holes


The following example uses a repeat command for machining equidistant holes.

Program:
Y
(DIS,"EQUIDISTANT HOLES")
N1 F200 S900 T1.1 M6
N2 G81 R5 Z-10 M3 50
N3 X10 Y10
N4 (RPT,7)
N5 G91 X10
N6 (ERP)
8 holes, path 10
N7 Y40
10
N8 (RPT,7)
N9 X-10 10
N10 (ERP)
0
N11 G80 G90 XY M5
X

0 10 80

10.2.2 Machining with Roughing and Finishing Cuts


The following example shows repeat commands for machining with one roughing cut and one finishing
cut.

Finishing Cycle

Roughing Cycle

45004607K 260
Prima Electro S.p.A. OPENcontrol – Programming manual

Program:
(DIS,"DEFINITION OF MACHINING ALLOWANCE")
N1 S350 T6.6 M6
N2 X60 Y M3
N3 Z-50
N4 MSA=0.5
N5 (RPT,2)
N6 G1 G41 X60 Y60 F500
N7 G3 Y-60 I60 J
N8 G1 X100
N9 G3 Y60 I100J
N10 G1 G40 X60
N11 MSA=0
N12 (ERP)
N13 GZ20 M5
N14 X Y M30

45004607K 261
Prima Electro S.p.A. OPENcontrol – Programming manual

10.3 Commands for subroutines execution


10.3.1 CLS – CLD – CLT – $() Call subroutines
Commands CLS, CLD, CLT and S() recall the execution of a subroutine, i.e. a separate program stored in
a file. These commands can call a subroutine from a main program or from another subroutine. Up to
seven nesting levels are possible.

CLS Call to a static subroutine: analysed upon the activation of the main part program
CLD Call to a dynamic subroutine: analysed during the execution of the part program and only
if the name has not been found earlier
CLT Call to a temporary subroutine: analysed during the execution of the part program
whenever its call is encountered
$() Call to a static subroutine: analysed upon the activation of the main part program

Syntax

(CLS,name [, parameter1 [, parameter2 …[, parameterN ]…])


(CLD,name [, parameter1 [, parametero …[, parameterN ]…])
(CLT,name [, parameter1 [, parameter2 …[, parameterN ]…])
$(name) ([, parameter1 [, parameter2 …[, parameterN ]…])

where:
name Subroutine file name.
must be specified through either a string of capital characters or a string variable
preceded by key "?" (question mark).

may be simply a file name, or it may be specified via a logic address, through a DRIVE
configured in AMP. If a path is specified, the system works out automatically the physical
address associated with the DRIVE.
127 alphanumerical characters are available to specify the file name, including the path
and the extension, as applicable. For further details on how to specify the file name, see
paragraph “PROGRAM FILE” in chapter 1 of the following manual

parameter1
parameterN list of the optional parameters sent to the subroutine. Parameters can be programmed
directly by with a decimal value or indirectly by an E parameter. All values will be
available within H variables.

Example:
(CLS,\DRIVEUSER\PROGRAM.PRG) ;call to a subroutine with logic path

Example:
(CLS,PROGRAM.MIO) ;call to a direct subroutine

45004607K 262
Prima Electro S.p.A. OPENcontrol – Programming manual

NOTE:
If name is a string variable preceded by the "?" code, the subroutine is not analysed upon the
activation of the main part program; it is analysed instead during the execution of the latter.
This has the following implications, depending on the triliteral used to call the subroutine:
 CLS or $(): the subroutine cannot contain skip instructions
 CLD or CLT: the subroutine can contain skip instructions as it is analysed at runtime.
The pathname to use for calls to subroutines may also be declared through the three-letter code
PTH described later in this chapter. If the pathname is omitted in the call to a subroutine, the
search for the subroutine is carried out as follows :
1. No pathname specified via PTH
The system searches for the subroutine in the directory in which the calling program is
found and if it is not there, it looks for it in the default DOS directories defined at the
machine characterisation stage.
2. Pathname specified via the PTH instruction
The system looks for the subroutine in the directory specified with PTH, if it is not there,
it looks in the DOS directories defined at the machine characterisation stage.
The number of subprograms and “static” labels managed by the control depends on the
corresponding values configured in AMP. For full tables, a memory management procedure is
activated, which, as far as possible, removes the dynamic and paramacro subroutines from the
tables and compacts the static ones ($() and CLS). When it is not possible to free any further
space in the memory, a table full message is given out and the system shifts to the same error
conditions as would have occurred during part program selection. At this point, the operator can
proceed either by changing the part program or increasing the maximum limits specified for the
tables.
When the tables are full and the execution of a program is not blocked thanks to the memory
compacting feature, program execution is slowed down, during the subsequent stage of analysis,
which inevitably takes place in the event of a blocking error.
The successful completion of a program activation stage is no guarantee that the program will be
executed without errors, if the memory is full. This is the case, for instance, of a CLD calling a
number of CLS or $() instructions large enough to fill up the tables.
Re-executing a main program may generate a tables full message even if the program has been
activated in its entirety the first time (after its activation). This is because after the activation
of a program, the tables do not contain the file names and the static subroutine tables called
either by static subroutines or by dynamic or temporary subroutines.
A command for a call to the same program name is entered through triliterals of different types
(e.g. first CLT and then CLS) a label unknown message may be generated; the message can be
obviated by replacing the CLS call with a CLD call.
A run time change to a subroutine not followed by the reactivation of the main program will be
interpreted only if the call is made through a CLT; otherwise, the one previously analysed will be
re-executed, with unpredictable effects on program execution.
Optional parameters calling a subroutine are assigned to H variables. Parameter in N position is
mapped on H variable of N-1 index.

45004607K 263
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 1:
An example of call to a subroutine is shown below, a path with PTH is not specified.
Main program Subroutine P800 ;is searched for in the directory where the main
program resides and in the default directories configured in AMP

N16 . . .
N17(CLS,P800) N500. . .
N18. . . N501. . .
. N502. . .
. N503 . . .
N67(CLS,P800)
N68 . . .

Example 2:
Sequence for execution of four nested subroutines.

MAIN PROGRAM

........... SUBROUTINE 1
...........
(CLS,SUB1) ...........
SUBROUTINE 2
...........
...........
(CLS,SUB2) ...........
SUBROUTINE 3
........... ...........
(CLS,SUB3) ...........
SUBROUTINE 4
........... ........... ........... ...........

........... ........... (CLS,SUB4) ...........

........... ...........

...........
...........

...........
...........

Example 3:
Call to subroutine specified in implicit mode
SC0.5="PIPPO"
(CLS,?SC0.5)

45004607K 264
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 4:
This example uses subroutines for repeated drilling operations.

15 60
50

20
X
20
25

15

30

Main Program:

N19 (DIS,"...")
N20 S2000 F180 T2.02M6 Subroutine S600
N21 (UTO,1,X-20,Y-25)
N22 (CLS,S600) N501 G81 R-108 Z-130 M3
N23 (UTO,1,X-15,Y50) N502 XY
N24 (CLS,S600) N503 Y-15
N25 (UTO,1,X60,Y20) N504 X30
N26 (CLS,S600) N505 Y0
N27 Z0 N506 G80

45004607K 265
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 5:
Parabolic profile programming with a parametric subroutine.
Main Program:
;N10 MAIN PAR
N20 T1.1M6 S1000 M3 F700
N30 E30=72.795 ;start X
N40 E31=24.28 ;focal length (twice the focus)
N50 E32=2 ;Y increment
N60 E33=108.24 ;start Y
N70 E34=0 ;final Y
N80 GX0 Y120
N90 (CLS,PAR)

Subprogram PAR:
;N500 PAR
;N501 Parametric subroutine: Complete parabola execution, internal profile.
N502 G1 G42 XE30 YE33
N503 E36 = E33
"START" N504
N505 E36=E36-E32
N506 (GTO,END,E36<E34)
N507 E35=SQR( 2*E31*ABS(E36))
N508 XE35 YE36
N509 (GTO,START)
"END" N510
N511 E35=SQR (2*E31*ABS(E34))
N512 XE35 YE34
1
;N513 Second part of the parabola.
0
N514 E42=E32 0
N515 E43=E34
N516 E44=E33
N517 XE35 YE43
"START2" N518
N519 E43=E43+E42
N520 (GTO,END2,E43>E44)
N521 E35= -(SQR (2*E31*ABS(E43)))
N522 XE35 YE43
N523 (GTO,START2) -1 0 0
"END2" N524 -1 0 0 100
N525 E35= - (SQR(2*E31*ABS(E44)))
N526 G40 XE35 YE44
N527 GX0

45004607K 266
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 6:
Call to the dynamic subroutine, specified in an implicit manner with the PAR subprogram of the previous
example.

Main program:
;N10 MAIN PAR
N20 T1.1M6 S1000 M3 F700
N30 E30=72.795 ;Initial value of X
N40 E31=24.28 ;Focal length
N50 E32=2 ;Increment of Y
N60 E33=108.24 ;Initial value of Y
N70 E34=0 ;Final value of Y
N80 GX0 Y120
SC0.5="PAR"
(CLD,?SC0.5)

45004607K 267
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 7:
Execution of the parabolic profile (Ex. 5) using direct passing of parameters to the subroutine.

Main program:
;N10 MAIN PAR
N20 T1.1M6 S1000 M3 F700
N30 GX0 Y120
N40 (CLS,PAR, 72.795, 24.28, 2, 108.24,0)
PAR subroutine:
;N500 PAR
;N501 Subroutine parameter: complete parabolic profile execution.
N502 G1 G42 XH0 YH3
N503 E36 = H3
"START" N504
N505 E36=E36-H2
N506 (GTO,END,E36<H4)
N507 E35=SQR( 2*H1*ABS(E36))
N508 XE35 YE36
N509 (GTO,START)
"END" N510
N511 E35=SQR (2*H1*ABS(H4))
N512 XE35 YH4
;N513 Second part of the parabolic profile
1
N514 E42=H2
0
N515 E43=H4 0
N516 E44=H3
N517 XE35 YE43
"START2" N518
N519 E43=E43+E42
N520 (GTO,END2,E43>E44)
N521 E35= -(SQR (2*H1*ABS(E43)))
N522 XE35 YE43
N523 (GTO,START2)
"END2" N524 -100
N525 E35= - (SQR(2*H1*ABS(E44))) -100 100
N526 G40 XE35 YE44
N527 GX0

45004607K 268
Prima Electro S.p.A. OPENcontrol – Programming manual

10.3.2 PTH – Declaration of the default pathname


The PTH command declares the pathname to be used as the default in calls to subroutines and
paramacros.

Syntax

(PTH, mode [,pathname])

where:
mode mode may have the following values:
0= Takes as the default pathname for CLS calls the path of the main program.
1= Declares the path to use when there is a (PTH,2) instruction active.
This mode may be of use when a pathname defined initially with (PTH,1,pathname) has to
be called numerous times in the part program with (PTH,2).
2= Activates the path specified in the instruction or, if none is specified, the one declared
previously with a (PTH,1,pathname) instruction.

pathname Path to be declared as the path; this is an optional parameter. It is not a physical address
and hence it must contain a logic DRIVE that was associated with a physical path in AMP at
the machine characterisation stage.

NOTE:
The pathname declared with three-letter code PTH is preserved even after a RESET of the process in
which it was programmed.

45004607K 269
Prima Electro S.p.A. OPENcontrol – Programming manual

10.3.3 EPP – Executing a Portion of Program


The EPP command executes a subprogram, i.e. a portion of a program delimited by one or two blocks
with label fields.

Syntax:

(EPP, label1, [label2])

where:
label1 Label field of the first block to be executed. A label is an alphanumeric string long up to
sixteen characters. It can be specified directly through a character string (non included
into superscripts) or through a string variable preceded by the character ‘?’.

label2 Label field of the last subprogram block to be executed. This label is an alphanumerical
string long up to sixteen characters. It can specified directlt through a character string
(not included into superscripts) or through a string variable precede by the character ‘?’.

Characteristics:
Labels have to be programmed between quotes ("LABEL1") in program blocks, while in the EPP command
they are declared without quotes. The system accepts up to 5 nesting levels.
If the command is programmed with one label field, then the return to the calling point happens when
executing an M code of type “exit from subroutine” (an M02, typically).
If the end of part program is reached when executing an EPP command with one label field, then
execution ends and there is no return to the calling point.

In contouring operations, the EPP command can be used for finish milling with the same program blocks
used for roughing. During the roughing phase, the MSA command could be used to program the machining
allowance for finishing.
In positioning operations, after programming points for a centring operation, the EPP command calls for
different tools in order to execute different operations on each hole. The EPP command can be used to
execute a complete machining operation at different orientations on the active interpolation plane.

45004607K 270
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 1:
.
.
"START"N25 First block with label
.
. An EPP cannot occur here
.
"END"N100 Last block with label
.
.
.
N150 (EPP,START,END) EPP command that specifies the labels. The control executes
blocks N25 to N100; after this point execution continues on the
block written after EPP, N150.

The '23/165 NESTING OF EPP GREATED THAN 5' error occurs if more than five instructions
are nested in an EPP command.
GTO command can be programmed inside an EPP section. However, if at program end at least
one of the cycles programmed with EPP are not fully executed, the system returns the
following error: '23/166 RPT/EPP CYCLE OPEN AT END OF PROGRAM'.

45004607K 271
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 2:
This example shows how to use the EPP command in a positioning operation:

Program:
N1 (DIS,"DRILLING CENTRE HOLES")
N2 F300 S2000 T1.1 M3 M6
N3 G81 R0 Z-3
"D6"N4
N5 X100 Y100
N6 X-100
N7 Y-100
N8 X100
"D10"N9
N10 X40 Y40
N11 X-40
N12 Y-40
N13 X40
"END"N14
N15 G80
N16 (DIS,"BIT D6")
N17 F200 S1800 T2.02 M3 M6
N18 G81 R Z-22
N19 (EPP,D6,D10)
N20 G80
N21 (DIS,"BIT D10")
N22 F220 S1600 T3.3 M3 M6
N23 G81 R Z-24
N24 SC0.3 = “D10”
N25 (EPP,?SC0.3,END)
N26 G80

45004607K 272
Prima Electro S.p.A. OPENcontrol – Programming manual

10.3.4 EPB – Execute Part-Program Block


The three-letter code EPB allows execution of a part-program block.
Execution can be conditioned by the result of a comparison specified within the command; If the
condition is not met an alternate part-program block may be defined so as it can be executed.

Syntax:

(EPB, block1 [ , condition [ , block2 ] ] )

where:
block1 Is the part-program block to be executed.
This can be a string in inverted commas or a character, local or system variable.

par1 Is a local or system variable or a constant whose value is compared to the value
contained in the parameter par2.

condition Condition, optional, that must be true to execute the block block1
The condition can be an algebraic-logic expression or a direct comparison between
two strings. Strings can be either constant enclosed in quotes (single or double)
and string variables.

block2 Is the part-program executed when if the specified condition for block1 is not
met. It is an optional parameter. This can be a string in inverted commas or a
character, local or system variable.

Characteristics:
If par1 ,operator and par2 conditions have not been specified, the program always executes the
part_program_block1 block.
Only one level of nesting is accepted by the system with the three-letter code EPB.

Example:
(EPB, “(EPB,’E1=1’)”) : accepted by the system
(EPB, “(EPB,’(EPB,SC0.100)’ )”) : NOT accepted by the system (error: FORMAT ERROR)

The part-program blocks specified in the three-letter code EPB are not analysed in the activation phase
of the part-program, therefore it is up to the programmer to see that these blocks do not cause any
malfunctioning of the part-program.

45004607K 273
Prima Electro S.p.A. OPENcontrol – Programming manual

Example:

(EPB,”(CLS,SUBROUT)”) : the subprogram SUBROUT is not pre-analysed in the


activation phase, therefore it cannot contain any jump
(GTO) instructions.

(EPB,’ “LABEL” ’) : The label LABEL will not be inserted in the label table of
the part-program.

(EPB, “ ( DIS, E1)” ) : equivalent to the block (DIS, E1)

SC0.30= ” E1 =10”
(EPB, SC0.30) : equivalent to the block E1=10

SC40.30 = “# X10”
(EPB, SC40.30) : equivalent to the block #X10

(EPB,”(CLS,SUBROUT)”,E1=34) : calls the subprogram SUBROUT only if E1=34

(EPB,” E1=100”, SN1=25,” E1=0”) : assigns 100 to E1 only if SN1=25, otherwise assigns 0 to
E1

(EPB,”(EPP,LAB1,LAB2)“,SC0.2=“OK”,“(EPP,LAB3,LAB4)“) : executes from the


label LAB1 to the label
LAB2 if SC0.2 is equal
to OK, otherwise
executes from the
label LAB3 to the label
LAB4.

(EPB, “( EPB,’ E1 = 2’, E0 < 100)”, E0 > 70 ) : assigns 2 to E1 only if E0 is


between 70 and 100.

(EPB,“ ( EPB,’ E0 = 5’, E0 < 5) ",E0 < 10,E0=10) : assigns the value 5 to E0, if
E0<5; assigns 10 to E0 if
E0>10.
If 5<E0<0, E0 does not change.

45004607K 274
Prima Electro S.p.A. OPENcontrol – Programming manual

10.4 Jump and delay commands


10.4.1 GTO - Jump command
The GTO command performs a jump to a block specified using a label.
The command can contain a condition, in this case if the condition is met then the jump is allowed. If
the condition is false then no jump is performed.

Syntax:

(GTO,label [,condition])

where:
label Label of the program block to branch to. A label is a string of up to 16 alphanumeric
characters. In the destination block the label must be between quotes while in the GTO
command the label must be programmed without quotes, it may also be a character
variable preceded by “?”

condition Condition, optional, that must be true to execute the jump to the label.
The condition can be an algebraic-logic expression or a direct comparison between two
strings. Strings can be either constant enclosed in quotes (single or double) and string
variables.

Characteristics:
If no condition is specified, the program always jumps to the block marked by the label.

The condition can be a logical-mathematical expression or a strings comparison.

The label on which the part program will branch to can also be expressed as a local or system variable
(preceded by the "?" character).
This facilitates execution of programs having a great number of blocks to change the execution flow.
In particular, by programming the label as a variable it is possible to program a default label and call it
"DEFLAB": the part program jumps to "DEFLAB" if the label in the variable does not exist.

45004607K 275
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 1:
;SC0.3 contains the label

(GTO,?SC0.3)
"ONE"
.
.
.
.
"TWO"
.
.
.
.
"THREE"
.
.
.
"DEFLAB"
.
.
.
If SC0.3 does not contain "ONE", "TWO" OR "THREE" the part program jumps to the "DEFLAB" block. If the
"DEFLAB" label does not exist, error '23/156 Undefined label' is displayed and part program execution is
interrupted.

Example 2:
N01 (GTO,START) the part program always jumps to "START"
N10 (GTO,END,E1 > 123) jump to "END" if the value of E1 is greater than 123
N20 (GTO,LAB1,@COOLANT = 1) jump to "LAB1" if the WinPLUS variable
@COOLANT = 1
N30 (GTO,START,E1 <> E5) jump to "START" if the value of E1 is different to that of
E5
N40 (GTO,LAB1,SC1.2H = "OK") jump to "LAB1" if the two characters beginning with SC1
are equal to OK
N50 SC1.3="ABC" prepares the variable for the following block
N60 (GTO,?SC1.3) jump to ABC label

Example 3:
The instruction:
(GTO,END,SC2.3 = "ABC")
jumps to the "END" label in the program if the three characters (.3) beginning from SC2 are ABC.

NOTE:
The character string to be compared in the jump command must always be programmed between
quotes.

45004607K 276
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 4:
Here is an example of conditional jump in slot milling.

Program:
N1 (DIS,"MILL A SLOT")
N2 F500 S2000 T1.1 M3 M6
N3 E31=-3.5
N4 E32=-24
"START"
N6 G X Y-10
N7 Z(E31)
N8 G1 G42 X Y-20
N9 X-30
N10 Y20
N11 X30
N12 Y-20
N13 G40 X
N14 Y-10
"END"
N16 E31=E31-3.5
N17 (GTO,START,E31>E32)
N18 E31=-25
N19 (EPP,START,END)
N20 G Z10

45004607K 277
Prima Electro S.p.A. OPENcontrol – Programming manual

Example 5:
This is an example of conditional jump in cylindrical thread machining.

E30 = Diameter of Next Cut


E31 = Cut Depth Increment (Diameter)
E32 = Return Diameter
E33 = Final Diameter

Program:
N1 (DIS,"THREAD DIA 60")
N2 S150 T5.5 M6
N3 G0 X66 Y98 Z5 M3
N4 E30=56.8
N5 E31=0.5
N6 E32=50
N7 E33=60
"I" N8
N9 G0 Z5
N10 U(E30)
N11 G33 Z-45 K3
N12 GU(E32)
N13 E30=E30+E31
N14 (GTO,F,E30>E33)
N15 (GTO,I)
"F" N16
N17 GU(E32)
N18 Z5
N19 U(E33)
N20 G33 Z-45 K3
N21 GU(E32)
N22 Z20

45004607K 278
Prima Electro S.p.A. OPENcontrol – Programming manual

10.4.2 IF ELSE ENDIF


The IF command allows the execution of a part-program section which will run only if a condition
specified within the command is met. This part-program section must terminate with the ENDIF
command : the ELSE command can be optionally included in the IF command, and it defines, up until the
ENDIF command, a part-program section which will be executed if the condition specified in the IF
command is not met.

Syntax:

(IF, condition)
.
blocks

.
(ELSE)
.
blocks
.
(ENDIF)

where:
condition It is the necessary condition for the execution of the cycle IF-ELSE.
The condition can be an algebraic-logic expression or a direct comparison between two
strings. Strings can be either constant enclosed in quotes (single or double) and string
variables.
blocks array of blocks to be executed

Characteristics.
If the condition specified in the IF command is met, the blocks specified up until the ELSE command (if
present) or until the ENDIF command (if the ELSE command is not present) will be executed, otherwise
they will be ignored. The condition can be a logical-mathematical expression or a string comparison.
The blocks between the ELSE command and the ENDIF command will be executed only if the condition
specified in the IF command is not met. Up 32 levels of nesting are allowed with the IF ELSE ENDIF
command. Each IF command must have a corresponding ENDIF command.

45004607K 279
Prima Electro S.p.A. OPENcontrol – Programming manual

Examples:
( IF , E0 = 3)
( DIS , “ E0 is equal to 3 “)
(ELSE)
( IF E0 > 3)
( DIS , “ E0 is greater than 3 “)
(ELSE)
( DIS , “ E0 is less than 3 “)
( ENDIF)
( ENDIF)

( IF , E0 >10 )
( IF , E0 >20 )
( IF , E0 >30 )
( IF , E0 >40 )
( IF , E0 >50 )
( DIS , “ E0 is greater than 50 “)
( ENDIF)
( ENDIF)
( ENDIF)
( ENDIF)
( ENDIF)

45004607K 280
Prima Electro S.p.A. OPENcontrol – Programming manual

10.4.3 DLY – Defining delay time


The DLY command specifies a delay in program execution.

Syntax:

(DLY,time)

where:
time Delay time in seconds (minimum value 0.01).Delay is defined using a real number, a
variable or an algebraic expression.

10.4.4 DSB – Disable Slashed Blocks


This command enables/disables slashed blocks. Slashed blocks have "/" symbol as the first character and
their execution is conditioned by DSB value.

Syntax:

DSB = value

where:
value The value may be:
0 slashed blocks are executed
1 slashed blocks are not executed

10.4.5 REL – Releasing the part program


The REL command releases the part program and all subroutines.

Syntax:

(REL)

Characteristics:
The REL function disables the part program. It can be entered through MDI.
After the program has been released, the following message will be displayed: '23/160 END OF FILE'.

45004607K 281
Prima Electro S.p.A. OPENcontrol – Programming manual

10.4.6 WOS – Wait on signal


Wait on signal (WOS) command puts the part program into a wait status until the specified condition is
met.

Syntax:

(WOS, par1 operator par2)

where:
par1 Is a local or system variable or a constant to be compared to the value of par2.

operator Logic operators that can be used in expressions:


= equal to
< lower than
> higher than
<> different than
<= lower or equal to
>= higher or equal to

par2 Is a local or system variable or a constant to be compared to the value of par1.

Characteristics:
The process where the WOS function is programmed goes into WAIT until the condition is satisfied. Il
controllo della condizione viene effettuato ad ogni intervallo di tempo pari al minimo tra 10ms e il clock
configurato nel processo.
By default the WOS command is synchronised. If the system is in WAIT during program debugging
(because a WOS function has been programmed), it is possible to assign to the par1 variable the value
that satisfies the condition specified in WOS.

To make this assignment, follow these steps:


1. Press CYCLE STOP
2. Key in the correct value of the par1 variable in MDI.
3. Press CYCLE STOP

Programming Example:
(WOS,E1>4)
(WOS,SC10.5 = "GOOFY")
(WOS, TOOL_STATUS>=E3)
(WOS,!USER_VAR3.5CH 0 SC4.5)

45004607K 282
Prima Electro S.p.A. OPENcontrol – Programming manual

11. APPENDIX A: character and command list

11.1 Table of characters


CHARACTER DESCRIPTION
0 to 9 Numbers
+ Addition
- Subtraction
* Multiplication
Division
/
Block delete (optional block)
. Decimal Point
" Label or String Identifier
( Open Parenthesis
) Close Parenthesis
[ Open Square Bracket
] Close Square Bracket
{ Open Braces
} Close Braces
; Comment Symbol
, Parameter Separator
= Assignment Symbol
< Less than (jump symbol)
> Great than (jump symbol)
LF (ISO or ASCII line feed)
Block End
CR (EIA carriage return)
# Synchronization
& A-synchronization
! Prefix User variable
@ Prefix WinPLUS variable
$ Technological variables prefix, TCP or I/O
>> Increase on single operand
A Axis name
Acceleration on profile or on block (associated to F or f)
Axis name
B Ramp time (deceleration) on profile or on block (associated
b to F or f)
Bevel in cutter diameter compensation
C Axis name
Axis name
D
Deceleration on profile or on block (associated to F or f)
d
Tool diameter (RQP,RQT)
E E type parameter

45004607K 283
Prima Electro S.p.A. OPENcontrol – Programming manual

CHARACTER DESCRIPTION
Axes feedrate in G1-G2-G3 – G12 – G13 – G14 (feed on
F profile)
f Global dynamic characteristics set (on profile) in G1, G2, G3, G12,
G13, G14
Preparatory Code (G00 - G99)
G Reserved (G100 - G299)
Paramacro subroutines (G300 - G999)
H Parameters used in PARAMACROS
h Offset change during continuous move
Coordinates of the arc centre in a circular interpolation (G2
G3- G12 – G13)
I Variable pitch in G33
Depth increment in deep drilling cycles (G83)
Coordinate of the third point abscissa in G14 (spatial circular
interpolation for three points)
Coordinates of the arc centre in a circular interpolation (G2-
J
G3) (ordinate)
Min depth increase in (G83)
Coordinates of the arc centre in a circular interpolation
(G2-G3-G12-G13)
Coordinate of the third point in G14 on the third axis (spatial
circular interpolation for three points)
K Reduction factor for I and J in drilling cycle
Threading Pitch (G33)

Threading Pitch (G84)


Helix pitch in helical interpolation
Dejerk on profile or on block (associated to F or f)
variables shared between PLC and process
L
Length of tool offset (RQT, RQP)
l
Length 2 of tool offset (RQT, RQP)
M Auxiliary functions
N
Part program block number

P Axis name
Q Axis name
Rapid positioning in cycles G81 - G89
Deviation from the spindle zero (used in multi-start threads)
R Radius in a circular interpolation G02-G03 – G12 – G13
r Tool compensation joint
Theoretical hole radius (G73)

S Spindle speed
Tool and tool offset address
T Ramp time (acceleration) on profile or on block (associated
t to F or f)
Time needed to complete the move in one block

45004607K 284
Prima Electro S.p.A. OPENcontrol – Programming manual

CHARACTER DESCRIPTION
U Axis name
u Compensation factors in axis 1 (offset)
V Axis name
v Compensation factors in axis 2 (offset)
W Axis name
w Compensation factors in axis 3 (offset)
Axis name
X
Orthogonal versor component for circumference or semi-
x
circumference in space (G12-G13)
Axis name
Y
Orthogonal versor component for circumference or semi-
y
circumference in space (G12-G13)
Axis name
Z
Orthogonal versor component for circumference or semi-
z
circumference in space (G12-G13)

45004607K 285
Prima Electro S.p.A. OPENcontrol – Programming manual

11.2 G codes
The table below lists the G codes available on OPENcontrol systems.

G CODE FUNCTION

G00 Rapid axes positioning

G01 Linear interpolation

G02 Circular interpolation CW

G03 Circular interpolation CCW

G04 Dwell at end of step

G05 FeedHold at the end of the movement

G06 FeedHold at the beginning of the movement

G09 Deceleration at end of step

G10 Circular interpolation for three points in space

G12 CCW circular interpolation in space

G13 CW circular interpolation in space

G14 Linear interpolation with dynamic rapid parameters

G16 Defined interpolation plane

G17 Circular interpolation and cutter diameter compensation in the XY plane

G18 Circular interpolation and cutter diameter compensation in the ZX plane

G19 Circular interpolation and cutter diameter compensation in the YZ plane

G26 Operation in continuous sequence with null feed until the block end

G27 Continuous sequence operation with automatic speed reduction on corners

G28 Continuous sequence operation without speed reduction on corners

G29 Point-to-point mode

G31 Identification of the movement that can be stop using ActiveReset

G33 Constant or variable pitch thread

G35 Absolute roto-translation of linear axes three-letter code (it requires option A39)
Roto-translation of a linear axes three-letter code compared to the active origin (it
G36
requires option A39)
G37 Coordinates of the theoretical points to define the three-points roto-transaltion

G38 Coordinates of the points measured to define the three-point roto-translation

G39 Activation of the roto-translation defined by three points (it requires option A39)

G40 Disables cutter diameter compensation

G41 Cutter diameter compensation - tool left

45004607K 286
Prima Electro S.p.A. OPENcontrol – Programming manual

G CODE FUNCTION

G42 Cutter diameter compensation - tool right

G60 Closes spline profile (HSM)

G61 Opens spline profile (HSM) (it requires option A38)

G62 Divides the spline profile in two continuous units

G63 Divides spline profile in two units with connector

G66 Divides spline profile in two units with edge

G67 Divides spline profile in two units with speed rate reduced on the edge.

G70 Programming in inches

G71 Programming in millimetres

G78 Programming referred to the tool tip and motion referred to the machine zero

G79 Programming referred to machine zero

G80 Disables canned cycles

G81 Drilling cycle

G82 Spot-facing cycle

G83 Deep hole drilling cycle

G84 Tapping cycle

G85 Reaming cycle

G86 Boring cycle

G89 Boring cycle with dwell

G90 Absolute programming

G91 Incremental programming

G92 Axis pre-setting without mirror

G98 Axis pre-setting with mirror

G93 Inverse time (V/D) feedrate programming

G94 Feedrate programming in ipm or mmpm

G95 Feedrate programming in ipr per revolution or mmpr

G96 Constant surface speed in fpm or mpm

G97 Spindle speed programming in rpm

G72 Point probing with probe ball radius compensation

G73 Hole probing with probe ball radius compensation

G74 Probing for theoretical deviation from point without probe ball radius compensation

45004607K 287
Prima Electro S.p.A. OPENcontrol – Programming manual

G CODE FUNCTION

G99 Deletes G92

11.3 Mathematical and logical functions


&& || ^^
ABS AND ARC
ARS ART ATAN2
BCLR BSET BTST
COS EXP10 EXP2
EXPE EXOR INT
LG2 LN LOG
MOD NEG NOT
OR POW SIN
SQR TAN

45004607K 288
Prima Electro S.p.A. OPENcontrol – Programming manual

11.4 Local and system variables modifiable from a program


VARIABLE Access in
FUNCTION
NAME writing
!name User Variable YES
@name WinPLUS Variable YES
$BRK Break-point for the part-program execution or for the memory search YES
$I $IW Input Variable YES
$O $OW Output Variable YES
ACCUR Calculation accuracy YES
ALIASLD Global alis file upload status NO
ALIASLN Number of the wrong string during the global alias file upload NO
ARM Definition of arc normalisation mode YES
CEND Continuity at the spline beginning and end YES
CET Precision tolerance in circular interpolation YES
CRV Curve speed calculation YES
CTV Input/Output variables for the computation of the cycle time YES
CURLEN Minimum length for curve change YES
CURMODE Curve change management mode YES
CURRAP Length sections ratio to manage the curve change YES
CYCTIME State of the enabling of the computation of the program cycle time NO
DAC Angle (profile axes) for edge detection YES
DAV Angle (rotary axes) for edge detection YES
DLA Enables/disables look ahead YES
DPMODE Management mode of the edge detected with DAC and DAV YES
DPS Disables part-program scrolling NO
DRP Drilling size in G83 YES
DSB Disabled barred blocks YES
DWT Dwell time YES
E Local Variable YES
EMGERR Emergency changed to error YES
ERF Maximum form error YES
ERR Enables/disables the use of system error YES
FCT Paramacro variable YES
FEEDROT Feed rate programmed on linear axes only YES
FOP Feed override application mode NO
GPRG Vectorial variable for state of the programmed G NO
H Threshold for complete circle YES
HC Paramacro string variables YES
HD Tool offset number in paramacro programming YES
HF Paramacro flag YES
HFC Flag of the uploades HC variable YES
HFD Tool offset loaded flag YES
HFI Tool number loaded flag YES
HFS ASCII tool code loaded flag YES
HI Tool number in paramacro programmino YES
HS ASCII tool code in paramacro programming YES
IBSIZE Activate interferences correction YES

45004607K 289
Prima Electro S.p.A. OPENcontrol – Programming manual

VARIABLE Access in
FUNCTION
NAME writing
IDMODE Internal interruptions management mode YES
ISOCOMP Various compatibility flag NO
JRK Acceleration management mode with S ramps (RAMP=2) YES
JRKCRV Enable/Disable the jerk limitation in spline curve YES
KVGAIN Speed reduction constant in circular interpolation YES
Numerical system variables for the exchange of data between process
L YES
and WinPLUS
LINENO Number of the outlined string NO
LS System strings variables YES
MAXLEN Max length of the generated splines YES
MBA Enables/disable auxiliary functions in Multi Block Retrace YES
MBR State of the Multi Block Retrace enable NO
MBRLEN Reverse distance during Multi Block Retrace YES
MBRTHR Stop threshold from the point in MBR YES
MDA Maximum deviation angle YES
MOA Axes motion options YES
MOM Manual motions configuration YES
MOVNULL Null movement threshold YES
MSA Machine allowance definition YES
ODH "Online Debug Help" YES
PMM Enables/disables auxiliary function M as paramacro YES
PMS Enables/disables auxiliary function S as paramacro YES
PMT Enables/disables auxiliary function T as paramacro YES
POCKACC Enable/Disable pocket variable write access YES
RAMP Movement mode YES
RAPSTOP Rapid brake enabling YES
RCD Disable element count for RCM YES
RCM Enable RCM state NO
RCNEAR State of the enable of the nearest point search NO
REM Return to profile mode YES
ROLLOPT Optimized movement of rollover axes YES
RTV Real-Time variable YES
SC System character YES
SCRLPAR Disable paramacro scrolling YES
SHAPERR Speed reduction threshold in circular interpolation YES
SN System number YES
SNMT Null movement threshold on spline axes NO
SPL3D Kinematic transformation enabled in Spline module NO
SSL Spindle speed limit NO
STA Identifier of system task generating the error NO
STE Specific error of system task NO
STPMOV Semiautomatic execution mode type (block to block) NO
TAG Gain for accelerated tapping YES
TBS Precisions associated to the spline axes during machining YES
TBSG0 Precisions associated to the spline axes during rapid movements YES
TBV Precision associated to the spline versors during machining YES

45004607K 290
Prima Electro S.p.A. OPENcontrol – Programming manual

VARIABLE Access in
FUNCTION
NAME writing
TBVG0 Precision associated to the spline versors during rapid movements YES
TCPACT Identifier of the active kinematics NO
TCPDEF Default kinematics identifier YES
TIM System timing NO
TKG Gain for constant speed tapping YES
TMA Axis identifier for rigid tapping YES
TMD Axis id for solid tapping YES
TMT Tool parameter for PLC YES
TPA Threshold angle for TPO activation YES
TPO Tool path optimisation YES
TPT Threshold for TPO YES
TRACE Enable/Disable log information on a file of the commands to the process YES
TRP Tapping return speed YES
UAS Axis deconnected state NO
UDR Uses rapid dynamics YES
UPA Probe abscissa update YES
UPO Probe ordinate update YES
URL Rapid feedrate override YES
UVR Uses rapid feed YES
VLEAP3D Enable/Disable velocity reduction on corner joint YES
VFF Velocity Feed Forward YES
XMLMAP Mapping File upload status NO
XMLMAPLN Number of the wrong string during the Mapping File upload NO

45004607K 291
Prima Electro S.p.A. OPENcontrol – Programming manual

11.5 Three-letter codes


The following is a summary table of all the OPENcontrol language three-letter codes with the
information if the command is synchronized and if it can be changed.

THREE-LETTER
FUNCTION YES MODIFIABLE
CODE

AXF Axes to follow Yes No

AXO Offset Axis Definition No Si

AXS Axes shared with the logic Yes No

AXT Configure and activate tangential axis Yes No

CAM Commands related to the electronic cam Yes No

CLD Call to a subroutine for execution No Yes

CLO Close the file associated to the channel No Yes

CLP Finishing cycle No Yes

CLS Call to a subroutine for execution No Yes

CLT Call to a subroutine for execution No Yes

COF CYCLE OFF command No Yes

CON CYCLE ON command No Yes

CPA Reading/writing of an axis parameter Yes Yes

CPD Reading/writing of a drive parameter Yes Yes

CPY Copying a file No Yes

DAN Define axis name No Yes

DEL Deleting a file No Yes

DER Stops the program generating an error Yes Yes

DEW Displays an alert code Yes Yes

DGM Scroll disable for current paramacro No Yes

DIF Definition of input fields No Yes

DIR Direction of manual movements No Yes

DIS Displays a message for the operator No Yes

DLY Cause a delay in program execution Yes Yes

45004607K 292
Prima Electro S.p.A. OPENcontrol – Programming manual

THREE-LETTER
FUNCTION YES MODIFIABLE
CODE

DPA Define protected areas No Yes

DPP Defining Probing Parameters No Yes

DSB Disable slashed blocks No Yes

Execution in MDI mode of a block in a specified


ECM No Yes
process
EPB Execution of a program block No Yes

EPP Execution of a part of a program No Yes

ERP Close repetition a set of program blocks No Yes

EXE Automatic activation of a part program No Yes

FHO Sends movement stop command No Yes

FIL Threading cycle No Yes

FLT Programming filters on process axis Yes No

GDT Numerical control date and time reading No Yes

GET Get axes No Yes

GPS Process mode and status reading No Yes

GTA Axes acquisition Yes No

GTO Branch Command No Yes

GTS Spindle sharing Yes No

HOF HOLD OFF command No Yes

HON HOLD ON command No Yes

IF, ELSE, ENDIF Conditional Execution of parts of a program No Yes

INP Data input from keyboard Yes No

JOG Jog step value No Yes

LCK Lock / unlock write access to WinPLUS tables No Yes

LKH Read/write Look Ahead queue dimension Yes No

LOA Loading tables in memory No Yes

LTH Relative feed offset Yes No

MIR Mirror machining No Yes

45004607K 293
Prima Electro S.p.A. OPENcontrol – Programming manual

THREE-LETTER
FUNCTION YES MODIFIABLE
CODE

OPN Opening a communication channel No Yes

PAD Protected area disable Yes Yes

PAE Protected area enable Yes Yes

PLD Read double WinPLUS variables No Yes

PLR Read word WinPLUS variables No Yes

PLS Read WinPLUS SW variables No Yes

PRO Definition of default process No Yes

PTH Set path for subroutines and paramacros No Yes

PUT Data transmission on the serial line No Yes

RAP Reading the axis position No Yes

REA File reading No Yes

REL De-activate a part-program Yes Yes

REN File rename No Yes

RES RESET command No Yes

ROP Read present o programmed offset No Yes

ROT Rotation of the active plane No Yes

RPT Opening a repetition of a group of blocks No Yes

RQO Requalify origin Yes Yes

RQP Requalifying Tool Offset No Yes

RQT Requalifying Tool Offset and Tool life No Yes

RTP Read programmed or current tool No Yes

SAX Select axis for manual movement No Yes

SCF Scale factors Yes Yes

SCL Serial port disabled No Yes

SDA Dual axis Yes Yes

SMD Send SETMODE command No Yes

SND Send a synchronization message Yes Yes

45004607K 294
Prima Electro S.p.A. OPENcontrol – Programming manual

THREE-LETTER
FUNCTION YES MODIFIABLE
CODE

SOL Software over travels No Yes

SOP Enabling and configuring the serial port No Yes

SPA Paraxial roughing without pre-finishing No Yes

SPF Paraxial roughing with pre-finishing No Yes

SPL Definition of spline axes No Yes

SPP Roughing parallel to the profile No Yes

SRS Serial line reset No Yes

TCP Enable a machine kinematics Yes No

tcp Enable kinematics of a machine in continuous No Yes

TGL Groove cutting cycle No Yes

TOU Declare a tool out of life No Yes

TTC Define cutter compensation mode Yes No

UAO Use absolute origin No Yes

UDA Dual axes Yes Yes

UIO Use incremental origin No Yes

UPR Plane rotation enabled Yes No

upr Plane rotation in continuous No Yes

UTO Use temporary origin No Yes

UVA Non-orthogonal axes programming Yes No

UVC Cylindrical Coordinates programming Yes No

UVP Polar coordinates programming Yes No

UVW Define axis for paraxial compensation No Yes

WAI Wait for a synchronization message Yes Yes

WOS System in hold waiting for a signal Yes Yes

WRT Writing a file No Yes

XDA Master / slave axis Yes No

xda Master/slave axis in continuous No Yes

45004607K 295
Prima Electro S.p.A. OPENcontrol – Programming manual

The following is a summary table of all the OPENcontrol language three-letter codes with the
information of the option required (if necessary).

— = Not available  = Optional  = Included

CODE FUNCTION OPTION OPEN-10 OPEN-20 OPEN-30

AXF Axes to follow A37 —  

AXO Offset Axis Definition

AXS Axes shared with the logic

AXT Configure and activate tangential axis A51 —  

CAM Commands related to the electronic cam A41   

CLD Call to a subroutine for execution

CLO Close the file associated to the channel

CLP Finishing cycle

CLS Call to a subroutine for execution

CLT Call to a subroutine for execution

COF CYCLE OFF command A44 —  

CON CYCLE ON command A44 —  

CPA Reading/writing of an axis parameter

CPD Reading/writing of a drive parameter

CPY Copying a file

DAN Define axis name

DEL Deleting a file

DER Stops the program generating an error

DEW Displays an alert code

DGM Scroll disable for current paramacro

DIF Definition of input fields

DIR Direction of manual movements A44 —  

DIS Displays a message for the operator

DLY Cause a delay in program execution

45004607K 296
Prima Electro S.p.A. OPENcontrol – Programming manual

CODE FUNCTION OPTION OPEN-10 OPEN-20 OPEN-30

DPA Define protected areas

DPP Defining Probing Parameters

DSB Disable slashed blocks


Execution in MDI mode of a block in a
ECM A44 —  
specified process
EPB Execution of a program block

EPP Execution of a part of a program

ERP Close repetition a set of program blocks

EXE Automatic activation of a part program A44 —  

FHO Sends movement stop command A44 —  

FIL Threading cycle

FLT Programming filters on process axis

GDT Numerical control date and time reading

GET Get axes A47 —  

GPS Process mode and status reading

GTA Axes acquisition A34 —  

GTO Branch Command

GTS Spindle sharing A34 —  

HOF HOLD OFF command A44 —  

HON HOLD ON command A44 —  

IF,ELSE,ENDIF Conditional Execution of parts of a program

INP Data input from keyboard

JOG Jog step value A44 —  

LCK Lock / unlock write access to WinPLUS tables

LKH Read/write Look Ahead queue dimension

LOA Loading tables in memory

LTH Relative feed offset

MIR Mirror machining

45004607K 297
Prima Electro S.p.A. OPENcontrol – Programming manual

CODE FUNCTION OPTION OPEN-10 OPEN-20 OPEN-30

OPN Opening a communication channel

PAD Protected area disable

PAE Protected area enable

PLD Read double WinPLUS variables

PLR Read word WinPLUS variables

PLS Read WinPLUS SW variables

PRO Definition of default process

PTH Set path for subroutines and paramacros

PUT Data transmission on the serial line A47 —  

RAP Reading the axis position

REA File reading

REL De-activate a part-program

REN File rename

RES RESET command A44 —  

ROP Read present o programmed offset

ROT Rotation of the active plane

RPT Opening a repetition of a group of blocks

RQO Requalify origin

RQP Requalifying Tool Offset

RQT Requalifying Tool Offset and Tool life

RTP Read programmed or current tool

SAX Select axis for manual movement A44 —  

SCF Scale factors

SCL Serial port disabled A47 —  

SDA Dual axis A35 —  

SMD Send SETMODE command A44 —  

SND Send a synchronization message A44 —  

45004607K 298
Prima Electro S.p.A. OPENcontrol – Programming manual

CODE FUNCTION OPTION OPEN-10 OPEN-20 OPEN-30

SOL Software over travels

SOP Enabling and configuring the serial port A47 —  

SPA Paraxial roughing without pre-finishing

SPF Paraxial roughing with pre-finishing

SPL Definition of spline axes A38 —  

SPP Roughing parallel to the profile

SRS Serial line reset A47 —  

TCP Enable a machine kinematics A31/A32 —  

tcp Enable kinematics of a machine in continuous A31/A32 —  

TGL Groove cutting cycle

TOU Declare a tool out of life

TTC Define cutter compensation mode

UAO Use absolute origin

UDA Dual axes A35 —  

UIO Use incremental origin


Plane rotation enabled on 3 axes (see note at
UPR (0, 1, 4) A30 —  
the end of the table)
Plane rotation in continuous enabled on 3
upr (0, 1, 4) A30 —  
axes (see note at the end of the table)
Plane rotation enabled on 3 axes enabled on
UPR (10, 14) A39 —  
3 axes with workpiece setting compensation
Plane rotation in continuous enabled on 3
upr (10, 14) A39 —  
axes with workpiece setting compensation
UPR (2, 3, 6,
Plane rotation enabled on 5 axes A40 —  
12, 16)
upr (2, 3, 6, Plane rotation in continuous enabled on 5
A40 —  
12, 16) axes
UTO Use temporary origin

UVA Non-orthogonal axes programming

UVC Cylindrical Coordinates programming

UVP Polar coordinates programming

UVW Define axis for paraxial compensation

WAI Wait for a synchronization message A44 —  

45004607K 299
Prima Electro S.p.A. OPENcontrol – Programming manual

CODE FUNCTION OPTION OPEN-10 OPEN-20 OPEN-30

WOS System in hold waiting for a signal

WRT Writing a file

XDA Master / slave axis A36   

xda Master/slave axis in continuous A36   

NOTE: The programming of UPR, 4 (or upr, 4) requires the option A31 (TCP)

45004607K 300
Prima Electro S.p.A. OPENcontrol – Programming manual

11.6 ASCII codes


The tables that follow show the 256 elements of the extended ASCII character set, together with
Their decimal and hexadecimal equivalents.

DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R

BL ANK
(NULL) (DLE) BLANK
000 00 (NUL L ) 016 10 032 20 (SPACED) 048 30 0
(SOH) (DC1)
001 01 017 11 033 21 ! 049 31 1
(STX) (DC2)
002 02 018 12 034 22 " 050 32 2


003 03  (ETX) 019 13 !! (DC3) 035 23 # 051 33 3
004 04  (EOT) 020 14 ¶ (DC4) 036 24 $ 052 34 4
005 05  (ENQ) 021 15 § (NAC) 037 25 % 053 35 5
006 06  (ACH) 022 16 (SYN) 038 26 & 054 36 6


007 07 (BEL) 023 17 (ETB) 039 27 ' 055 37 7
008 08 (BS) 024 18  (CAN) 040 28 ( 056 38 8
009 09 (HT) 025 19  (EM) 041 29 ) 057 39 9
010 0A (LF) 026 1A  (SUB) 042 2A * 058 3A :
011 0B (VT) 027 1B  (ESC) 043 2B + 059 3B ;
012 0C (FF) 028 1C (FS) 044 2C , 060 3C <
013 0D (CR) 029 1D
 (GS) 045 2D - 061 3D =
014 0E (SO) 030 1E (RS) 046 2E . 062 3E >
015 0F (SI) 031 1F (US) 047 2F / 063 3F ?

DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R

064 40 @ 080 50 P 096 60 ` 112 70 p


065 41 A 081 51 Q 097 61 a 113 71 q
066 42 B 082 52 R 098 62 b 114 72 r
067 43 C 083 53 S 099 63 c 115 73 s
068 44 D 084 54 T 100 64 d 116 74 t
069 45 E 085 55 U 101 65 e 117 75 u
070 46 F 086 56 V 102 66 f 118 76 v
071 47 G 087 57 W 103 67 g 119 77 w
072 48 H 088 58 X 104 68 h 120 78 x
073 49 I 089 59 Y 105 69 i 121 79 y
074 4A J 090 5A Z 106 6A j 122 7A z
075 4B K 091 5B [ 107 6B k 123 7B {
076 4C L 092 5C \ 108 6C l 124 7C |
077 4D M 093 5D ] 109 6D m 125 7D }
078 4E N 094 5E ^ 110 6E n 126 7E ~
079 4F O 095 5F _ 111 6F o 127 7F

45004607K 301
Prima Electro S.p.A. OPENcontrol – Programming manual

DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R

128 80 Ç 144 90 É 160 A0 á 176 B0

129 81 ü 145 91 æ 161 A1 í 177 B1

130 82 é 146 92 Æ 162 A2 ó 178 B2

131 83 â 147 93 ô 163 A3 ú 179 B3

132 84 ä 148 94 ö 164 A4 ñ 180 B4

133 85 à 149 95 ò 165 A5 Ñ 181 B5

134 86 å 150 96 û 166 A6 a 182 B6

135 87 ç 151 97 ù 167 A7 o 183 B7

136 88 ê 152 98 ÿ 168 A8 ¿ 184 B8

137 89 ë 153 99 Ö 169 A9 185 B9

138 8A è 154 9A Ü 170 AA 186 BA

139 8B ï 155 9B c 171 AB ½ 187 BB

140 8C î 156 9C £ 172 AC ¼ 188 BC

141 8D ì 157 9D Y
T
173 AD ¡ 189 BD

142 8E Ä 158 9E Pt 174 AE « 190 BE

143 8F Å 159 9F f 175 AF » 191 BF

DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R DEC HEX CHARACTE R

192 C0 208 D0 224 E0  240 F0 


193 C1 209 D1 225 E1  241 F1 
194 C2 210 D2 226 E2  242 F2 
195 C3 211 D3 227 E3  243 F3 
196 C4 212 D4 228 E4  244 F4 
197 C5 213 D5 229 E5  245 F5 
198 C6 214 D6 230 E6  246 F6 
199 C7 215 D7 231 E7  247 F7 
200 C8 216 D8 232 E8  248 F8 
201 C9 217 D9 233 E9  249 F9 
202 CA 218 DA 234 EA  250 FA

203 CB 219 DB 235 EB  251 FB 


204 CC 220 DC 236 EC  252 FC n
205 CD 221 DD 237 ED  253 FD 2

206 CE 222 DE 238 EE  254 FE

207 CF 223 DF 239 EF  255 FF BLANK


"FF"

Extended ASCII Character Set

45004607K 302
Prima Electro S.p.A. OPENcontrol – Programming manual

12. APPENDIX B: Error messages

12.1 Description of error messages and remedial actions


12.1.1 Error generated by PLC – Interpolator library

Code Description of error messages and remedial actions


Too many Interpolators / processes
Internal error:
It signals that the system is creating an excessive number of processes or motion
22/001
activities. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal referring to a PLC programming;
if shown on the monitor please contact Customer Support.
Too many Interpolation Activities
Internal error:
It signals that the system is creating an excessive number of interpolation
22/003
activities. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal referring to a PLC programming;
if shown on the monitor please contact Customer Support.
Too many movements
Internal error:
It signals that the system is creating too many motions with respect to what
22/004 configured in ODM (Buffer number of pre-calculation). It is not shown in case of
operations called by part program or in case of operations made by an operator. It
is an internal signal which refers to a PLC programming; if shown on the monitor
please contact Customer Support.
Wrong number of axes
Internal error:
It was requested the contemporary motion of an excessive number of axes (up to
22/005
12). It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal signal which refers to a PLC
programming; if shown on the monitor please contact Customer Support.
Illegal movement (not exist)
Internal error:
Attempt to use a motion which isn’t available anymore. It is not shown in case of
22/006
operations called by part program or in case of operations made by an operator. It
is an internal signal which refers to a PLC programming; if shown on the monitor
please contact Customer Support.
Illegal movement
Internal error:
Attempt to use a motion not belonging to the process or to the requiring
22/007
interpolator. It is not shown in case of operations called by part program or in case
of operations made by an operator. It is an internal signal which refers to a PLC
programming; if shown on the monitor please contact Customer Support.

45004607K 303
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Illegal Interpolator/Process
Internal error:
Attempt to use a process or an interpolator not existing anymore. It is not shown
22/008
in case of operations called by part program or in case of operations made by an
operator. It is an internal signal which refers to a PLC programming; if shown on
the monitor please contact Customer Support.
Memory allocation error
22/009 At system boot the quantity of available memory does not respect the ODM
configuration. It is an anomaly to be signaled to the Customer Support.
Command not allowed in point-by-point mode
Internal error:
Requested command not available in point to point mode. It is not shown in case
22/010
of operations called by part program or in case of operations made by an operator.
It is an internal signal which refers to a PLC programming; if shown on the monitor
please contact Customer Support.
Command not allowed in Continuous
Internal error:
Requested command is not available in continuous mode. It is not shown in case of
22/011
operations called by part program or in case of operations made by an operator. It
is an internal signal which refers to a PLC programming; if shown on the monitor
please contact Customer Support.
Program Terminated
Internal error:
System is asked to perform a movement operation while it is terminating due to a
22/012 reset or an emergency.
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Too many active interpolators
Internal error:
System is creating too many motion activities (e.g. selecting two axes and moving
22/013 them manually, two movements activities are created). It is not shown in case of
operations called by part program or in case of operations made by an operator. It
is an internal error related to PLC programming, if it appears please contact
Customer Support.
Command not allowed in continuous abort
Internal error:
System is asked to perform a movement operation while it is stopping a continuous
movement operation due to a reset or an emergency.
22/014
It is not shown in case of operations called by part program or in case of
operations made by an operator.
It is an internal error related to PLC programming, if it appears please contact
Customer Support.

45004607K 304
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Command not allowed
Internal error:
System is asked to perform a movement while it is already performing another
22/015
one. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong positions mode management for Interpolator/Process
Internal error:
System is asked to configure a process or an interpolator in an erroneous way. This
22/016 error does not depend on the configuration defined using ODM tool.
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong Interpolator/Process type
Internal error:
System is asked to to configure a process or an interpolator in an erroneous way.
22/017 This error does not depend on the configuration defined using ODM tool.
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong Interpolator/Process ErrMode parameter
Internal error:
System is asked to configure a process or an interpolator in an erroneous way. This
22/018 error does not depend on the configuration defined using ODM tool.
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong Interpolator/Process EmgMode parameter
Internal error:
System is asked to configure a process or an interpolator in an erroneous way. This
22/019 error does not depend on the configuration defined using ODM tool.
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Interpolator/Process not found
Internal error:
System is asked to execute a movement on a non-existent process or interpolator.
22/020
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Interpolator/Process already defined
Internal error:
System is asked to generate a process or an interpolator already created.
22/021
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.

45004607K 305
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Interpolator/Process still working
Internal error:
Attempt to close an interpolator or a process while it is still owing move activities.
22/022
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Movement is still running
Internal error:
Attempt to free a movement while it is still working. It is not shown in case of
22/023
operations called by part program or in case of operations made by an operator. It
is an internal error related to PLC programming, if it appears please contact
Customer Support.
Start intermpolation phase request denied
Internal error:
The request for a move start has been rejected since there are operations already
22/024
active on the interpolator. It is not shown in case of operations called by part
program or in case of operations made by an operator. It is an internal error
related to PLC programming, if it appears please contact Customer Support.
Enter Hold request denied
Internal error:
The requested interpolator cannot be put in hold since it is currently in error,
22/025
emergency or reset state. It is not shown in case of operations called by part
program or in case of operations made by an operator. It is an internal error
related to PLC programming, if it appears please contact Customer Support.
Exit Hold request denied
Internal error:
Request to exit Hold for an interpolator which is not in hold status.
22/026
It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Axis out of profile when exiting Hold
Internal error:
22/027 During the exit from Hold, at least one axis is not on the position where it was
when it entered in hold status. It is an internal error related to PLC programming,
if it appears please contact Customer Support.
Incongruent command requested by the process
Internal error:
The CNC tried to execute a command that is not allowed for the requesting
22/028
process. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong FeedHold enter mode
Internal error:
Requested FeedHold mode execution was not expected. It is not shown in case of
22/029
operations called by part program or in case of operations made by an operator. It
is an internal error related to PLC programming, if it appears please contact
Customer Support.

45004607K 306
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Unknown command class
Internal error:
Requested execution of a command belonging to an unknown class. It is not shown
22/030
in case of operations called by part program or in case of operations made by an
operator. It is an internal error related to PLC programming, if it appears please
contact Customer Support.
Unknown command
Internal Error:
Request for the execution of an unknown command. It is not shown in case of
22/031
operations called by part program or in case of operations made by an operator.
It is an internal error related to PLC programming, if it appears please contact
Customer Support.
RoundOFF command admitted only in continuous mode
Internal Error:
RoundOFF command requested while system is not in continuous mode. It is not
22/032
shown in case of operations called by part program or in case of operations made
by an operator. It is an internal error related to PLC programming, if it appears
please contact Customer Support.
Command not accepted due to pre-calculation elements depletion
Internal Error:
Request for the execution of a movement in continuous mode while the
22/033 precalculation queue is full, as to say that all pre-calculation elements have been
used. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Unavailable information
Internal Error:
Request for info about non-existing interpolators, processes or axes. It is not
22/034
shown in case of operations called by part program or in case of operations made
by an operator.It is an internal error related to PLC programming, if it appears
please contact Customer Support.
Spindle is not moving
A threading or tapping operation has been asked while the spindle is not moving.
22/035
These operations require spindle movement.
Check for S command programming and for its activation.
Request for a spindle with configured acceleration ramps
Tapping operation needs acceleration ramps (inversion time different from 0) to
22/036
be configured for the spindle. In this way reversal can be performed correctly at
the bottom of the hole. Check spindle configuration using ODM tool.
Tapping Length insufficient
22/037 Tapping length is insufficient to bring the axis to synchronization speed with
spindle rotation speed in order to correctly carry out tapping operation.
Wrong tapping axis acceleration
22/038 Tapping axis cannot respect spindle reversal time and tapping velocity since the
configured value for acceleration is too small.
Wrong spindle axis
22/039 Attempt to use as a spindle an axis which is not spindle type or the sipindle axis is
Master/Slave type.

45004607K 307
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Axis already in use
22/040 Thespecified axis is in use by another interpolator or process, so the axis use
request cannot be satisfied.
Axis is use during movement operations in Hold
22/041 The specified axis is in use by another interpolator or process (which is moving it
during the hold status), so the axis use request cannot be satisfied.
Difference between interpolation clocks associated to the axes
Axes belonging to a movement or in acquisition or virtualization have different
22/042
interpolation clocks. They cannot be mutually interpolated. Check their
configuration using ODM tool.
Axis not present
22/043
Request for an axis which is not configured. Check requested axis ID.
Axis with wrong Id
Request for an axis whose Id is not foreseen, as to say that it has an Id whose
22/044
value is outside the range of Id values foreseen by the system. Check requested
axis Id.
Gantry axis use request (slave)
Request, through Id use, for a Gantry axis (slave). It is possible to ask and
22/045
command only the use of of a Gantry axis (master). Check axis ID and its
configuration in ODM.
Axis not available
Internal error:
Request for motions with axis not associated to the interpolator (during a motion
22/046 in continuous mode) or not belonging to the process in use. It is not shown in case
of operations called by part program or in case of operations made by an operator.
It is an internal error related to PLC programming, if it appears please contact
Customer Support.
Axis duplicated
22/047 The use of the same axis within a motion or virtualization command has been
asked for many times. Check the command.
Axis in use by Master/Slave operation
22/048 Requested axis belongs to a maste/slave operation. The axis will be available
again at the end of this operating mode.
Operation request on unavailable axis
Internal error:
Requested for operations on axes not associated to the interpolator or not
22/049
belonging to the requesting process. It is not shown in case of operations called by
part program or in case of operations made by an operator. It is an internal error
related to PLC programming, if it appears please contact Customer Support.
Wrong Start movement condition
22/050 The condition to start a movement is wrong. Check condition encoding and its
associated parameters.
Wrong End movement condition
22/051 The condition to end a movement is wrong. Check condition encoding and its
associated parameters.
Wrong Break movement condition
22/052 The condition to interrupt a movement is wrong. Check condition encoding and its
associated parameters.

45004607K 308
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Request for at least one movement to be associated to the movement
Together with the movement it is necessary to specify a start, stop or break
22/053
condition. Check which condition must be associated to the programmed
movement.
Parameter associated to the wrong movement condition
22/054 The signal (Boolean variable bit type) associated with a start / stop / break
movement condition is wrong or not compatible with the condition itself.
Wrong MoveUntil command mode
Internal error:
Within a MoveUntil command the requested execution mode was not foreseen. It is
22/055
not shown in case of operations called by part program or in case of operations
made by an operator. It is an internal error related to PLC programming, if it
appears please contact Customer Support.
Wrong Start Continuous mode
Internal error:
Within the start continuous command the requested execution mode was not
22/056
foreseen. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong End Continuous mode
Internal error:
Within the end continuous command the requested execution mode was not
22/057
foreseen. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong Interlocking mode request
Internal error:
Requested interlocking mode was not foreseen. Within the start continuous
22/058 command the requested execution mode was not foreseen. It is not shown in case
of operations called by part program or in case of operations made by an operator.
It is an internal error related to PLC programming, if it appears please contact
Customer Support
Requested ramp type not foreseen
Internal error:
Requested acceleration ramp type not foreseen. Within the start continuous
22/059 command the requested execution mode was not foreseen. It is not shown in case
of operations called by part program or in case of operations made by an operator.
It is an internal error related to PLC programming, if it appears please contact
Customer Support.
Axis setting over the positive operating limit
22/060 Programmed position on the axis exceeds the positive operating limit, the
22/160 requested command is not enabled. Check the requested command and/or current
operating limits.
Axis setting over the negative operating limit
22/061 Programmed position on the axis exceeds the negative operating limit, the
22/161 requested command is not enabled. Check the requested command and/or current
operating limits.

45004607K 309
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Positive operating Limit reached
22/062
During an axis movement, the positive operating limit has been reached, the
22/162
movement in progress has been stopped.
Negative operating Limit reached
22/063
During an axis movement, the negative operating limit has been reached, the
22/163
movement in progress has been stopped.
Axis on Positive Over travel
22/064
Axis is on positive over travel. Movement command cannot be executed. Axis has
22/164
to be moved in manual into operating range.
Axis on Negative Over travel
22/065
Axis is on negative over travel. Movement command cannot be executed. Axis has
22/165
to be moved in manual into operating range.
Axis Homing required
22/066
A homing command can be executed only after homing operaion for the axis in
22/166
error.
Axis is not spindle type
22/067 Requested operation can only be carried out by a spindle axis. Check requested
axis type.
Spindle not available
22/068 Attempt to use a spindle axis not available for the interpolator or the process
requesting it.
Wrong change Gear (spindle) commande
Internal error:
Attempt to use, for a spindle axis, a gear value exceeding the range of admitted
22/069 values. See ODM and available gears for spindle axes. It is not shown in case of
operations called by part program or in case of operations made by an operator. It
is an internal error related to PLC programming, if it appears please contact
Customer Support
Null feed
22/070 Movement programmed at null feed, this value is not foreseen. Che the value
programmed with F.
Wrong JRK value
The JRK value which has been programmed (value to define the
22/071
acceleration/deceleration ramp carachteristics of the S ramp) is out of the
admitted programming interval.
Variable to be used as movement condition is not valid
22/072 The variable associated to the start, stop or break condition of a movement is
wrong or not compatible with the condition itself.
Wrong Feed Mode definition
Internal error:
Mode used to define work speed (Feed) is not available in the system. Work feed
22/075 can be expressed with the following measurement units: length (mm or in) per
minute, time, 1/time. It is not shown in case of operations called by part program
or in case of operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong SLL Value
22/076 Value for SLL variable (lowest spindle rotation speed value in G96) cannot be
negative. Check variable setting.

45004607K 310
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Wrong SSL Value
22/077 Value for SSL variable (highest spindle rotation speed value in G96) cannot be
negative. Check variable setting.
SLL Value lower than SSL
SSL variable (highest spindle rotation speed value in G96) cannot take on values
22/078
lower than SLL (lowest spindle rotation speed value in G96).
Check value of both variables.
Function not available in Tapping mode
Internal error:
Tapping command asks for a mode not foreseen by the system. It is not shown in
22/079
case of operations called by part program or in case of operations made by an
operator. It is an internal error related to PLC programming, if it appears please
contact Customer Support.
Wrong Origin number
Internal error:
Request for the enabling of a origin not foreseen by the system, as to say with a
22/080 number out of the range values foreseen by the system. It is not shown in case of
operations called by part program or in case of operations made by an operator. It
is an internal error related to PLC programming, if it appears please contact
Customer Support.
Origin not defined
Internal error:
Request for the enabling of an origin which is not defined. It is not shown in case
22/081
of operations called by part program or in case of operations made by an operator.
It is an internal error related to PLC programming, if it appears please contact
Customer Support.
Wrong Safety Distance during Probing cycle
22/082 Safety distance value for a probing cycle cannot be zero or negative. Check
probing parameters.
Wrong Approach Distance during Probing cycle
22/083 Approach distance value for a probing cycle cannot be zero or negative. Check
probing parameters.
Wrong Probing Feed Value
22/084 Feed to be used for probing cycle cannot be zero or negative. Check probing
parameters.
Probing Executed during Approach phase
22/085 It signals that Probing took place during Approach phase, as to say outside the
area forseen for probing operations.
Probing not Executed
22/086
It signals that Probing ha not been performed
Probing in Execution
22/087
It signals that Probing is still in progress
Wrong Probing status
22/088 Probe signals a status not foreseen by the system. Please contact Customer
Support.
Wrong probe dimension
22/089 Probe diameter value (diameter of probe ball) cannot be negative. Check probe
parameters.

45004607K 311
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Interpolation running: request rejected
22/090
The command is rejected because there is an interpolation activity running.
ARM variable value not foreseen
22/092 ARM variable value is invalid. Check circle execution mode and possible automatic
corrections on programmed positions.
Wrong Helix step programming
22/093 Value for helix step is not valid. Check helix setting mode for helix steps and K
parameter.
Wrong Rollover Axis programming
Programmed position for rollover axis is invalid. Position needs to be lower than
22/094
axis pitch. To perform multiple rotations on the axis select incremental
programming. Check rollover axis programming section.
Movement reversal within a canned cycle
Programmed positions for a canned cycle require a movement reversal with
22/095
respect to the execution characteristic of the cycle itself. Check programming
mode for canned cycles.
Wrong Canned Cycle motion lengths
Programmed positions for a canned cycle require lengths that are inconsistent
22/096
with respect to the characteristics of the cycle itself. Check canned cycle
programming mode.
Wrong Homing Direction
22/097 Request for a movement made to home an axis in reverse direction with respect to
what configured on the axis. Check homing configuration in ODM.
Spindle is orienting
22/098
Gear change is not allowed when spindle is orienting.
Spindle is boring
22/099
The spindle programming is not possible during a boring cycle.
Spindle is tapping
22/100
The spindle programming is not possible during a tapping cycle.
Spindle without Transducer
22/102 Requested operation needs a spindle with transducer. Check requested function
details and ODM configuration for the involved spindle.
Wrong Thread Length
22/103 Length for thread operation does not allow correct execution of threading cycle.
Check threading cycle description and its programming mode.
Wrong Thread Pitch Increment value
22/104 Increment value for thread pitch does not allow a correct threading execution at
variable pitch. Check threading cycle definition and its programming mode.
Wrong HandWheel Management Command
Internal error:
Request for the execution of a manual movement by handwheel, an unforeseen
22/105
command is requested. It is not shown in case of operations called by part
program or in case of operations made by an operator. It is an internal error
related to PLC programming, if it appears please contact Customer Support.

45004607K 312
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Wrong HandWheel Scale Parameter
Internal error:
Request for the execution of a manual movement by handwheel; a negative
22/106 scaling (distance to be covered at each handwheel impulse) is requested , as to
say a value which is not allowed. It is not shown in case of operations called by
part program or in case of operations made by an operator. It is an internal error
related to PLC programming, if it appears please contact Customer Support.
Wrong number of impulses/turns of the handwheel
Internal error:
Request for the execution of a manual movement by handwheel; an handwheel is
22/107 configured with a number of impulses/turns lower or equal to zero, as to say an
invalid valus. It is not shown in case of operations called by part program or in
case of operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer.
Wrong HandWheel Refresh Tick time
Internal error:
Request for the execution of a manual movement by handwheel; it will be
22/108 configured a refresh tick for the handwheel lower or equal to zero, a value not
admitted. It is not shown in case of operations called by part program or in case of
operations made by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Wrong Spindle Sharing command
22/109
Spindle Sharing requested in wrong mode. Check spindle sharing mode.
Spindle acquisition request denied
22/110
Spindle is not configured as available for sharing, so sharing request is denied.
Spindle Request Denied While in use
22/111 Request for spindle sharing is accepted only when process or interpolator are not
performing other operations (e.g. in continuous).
Spindle sharing request denied because of exclusive use rotation
22/112 Request for spindle sharing cannot be satisfied because another interpolator or
process is using it in exclusive mode.
Wrong Axis Sharing Command
22/113
Request for axis sharing with wrong mode. See axis sharing mode.
Request for axis sharing released denied for use by PLC
Request to cancel sharing for one axis, then taking back exclusive possess, while
22/114
the axis is correctly in use, in shared mode, by another PLC interpolator. It is
necessary to wait for the end of the use by another element.
Axis sharing command denied while in used by another process
Axis sharing requested, while the axis is correctly in use, in sharing mode, by
22/115
another process. It is necessary to wait for the end of axis use by the other
element.
Axis sharing Request Denied While in use
22/116 Sharing request is accepted only when requesting interpolator or process are not
performing other actions (e.g. in continuous).
Axis Release/Acquisition denied while in sharing mode
22/117 Request for axis release/acquisition cannot be completed when the axis is in
sharing status.

45004607K 313
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Request for use in axis sharing denied as not shared
22/118 Request for sharing of one axis can be accepted only when the process or the
interpolator owner of the axis makes it available for sharing.
Movement request with negative jerk
22/119 Request for a movement to be executed with negative jerk. Only positive values
are admitted.
Movement request with negative acceleration
22/120 Movement request with negative acceleration value. Only positive values are
admitted.
Movement request with negative deceleration
22/121 Movement request with negative deceleration value. Only positive values are
admitted.
Movement request with negative Feed
22/122 Movemnt request with negative Feed value. Only positive Feed values are
admitted.
Movement request with negative dejerk value
22/123
Movement request with negative dejerk value. Only positive values are admitted.
Movement request with negative minimum acceleration time
22/124 Movement request with a negative minimum acceleration time. Only positive
values are admitted.
Movement request with negative minimum deceleration time
22/125 Movement request with a negative minimum deceleration time. Only positive
values are admitted.
Wrong Dynamic Override Type Request
22/126 A Wrong Dynamic Override Mode has been requested. Only % override or speed
override are admitted.
Too many protected areas.
22/127
The number of the protected area requested is higher than the allowed one.
Protected area undefined
22/128
Request for the use of an undefined protected area
Wrong protected area use command
22/129
Unexpected command requested to use a protected area
Unavailable protected area use command
22/130
The request for a protected area use command is not allowed in that moment.
Too many axes programmed in the block
22/131
The number of axes required in the motion exceeds the number allowed.
22/132 Axis in use by a cam
22/133 Wrong Timeout
22/134 Wrong Handwheel mode
22/135 Wrong circular for LTH
22/136 Exit EMG KO
22/137 Wrong axes Id for LTH
End of the movement on positive operating limit
22/150
Manual movement ended on positive operating limit.
End of the movement on negative operating limit
22/151
Manual movement ended on negative operating limit.

45004607K 314
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


End of the movement due to Protected Area Limit achievement
22/152
The movement ended on the limit defined by a protected area.
Cross Reference Master/Slave axis
22/201 Master/Slave execution request where an axis requested as a slave in already a
master of its own master. Check Master/Slave order and association.
Axis not slave type
22/202 Request for an operation with slave axis characteristics for an axis which has not
still been defined as a slave in a Master/Slave association.
Forbidden operation on Slave axis
22/203 Requested operation cannot be performed since the slave is still linked to its
master. To perform the action the master axis has to release the slave
Forbidden release on slave axis
22/204
Master cannot release slave since there are operations active on the slave.
Wrong Master/Slave following Mode
22/205 Request for a following mode of a master by a slave with unforeseen mode. See
Master/Slave axes programming mode.
Wrong Master/Slave activation or deactivation
22/206 Request for activation or deactivation of following mode of a master axis by a
slave with an unforeseen mode. Se Master/Slave axes programming.
Master/Slave synchronization on axis position with different origins
Internal error:
Request for a Master/Slave synchronisation operation depending on master axis
position; all slaves are asked to be associated with the same Master/Slave origin.
22/207
See Master/Slave axes programming mode. It is not shown in case of operations
called by part program or in case of operation carried out by an operator. It is an
internal error related to PLC programming, if it appears please contact Customer
Support.
Master/Slave synchronization on axis position with associated origin
Internal error:
Request for a Master/Slave synchronisation operation depending on master axis
22/208 position; no slave should be associated to the any Master/Slave origin. See
Master/Slave axis programming mode. It is not shown in case of operations called
by part program or in case of operation carried out by an operator. It is an internal
error related to PLC programming, if it appears please contact Customer Support.
Slave Axis use denied
22/209 Requested axis cannot be used in Master/Slave association since it is already used
by dual axis association (UDA / SDA).
Master Axis use denied
22/210 Axis requested as a Master cannot be used since it does not belong to the process
requesting the association.
Following axis use denied
The error occurs in this situations:
Attempt to define the spindle as following axis
22/211 Attempt to carry out a probe using an axis set as following axis
Attempt to carry out a canned cycle using an axis set as following axis
At least one of the axes involved in circular interpolation (planar or spatial) is
defined as following axis

45004607K 315
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Wrong spline starting position
The starting point of a spline must coincide with the final point of the previous
22/212
spline. This is an internal notification referring to the PLC programing; if displayed
on the screen it is advisable to contact the customer support service.
Wrong TCP request
22/213 Command referred to the TCP is not identified. If displayed on the screen it is
advisable to contact the customer assistance.
The number of TCP axes required is different from those of the kinematic
The TCP received a request to enable a number of axes different from the one
22/214
defined on active kinematic. If displayed on the screen it is advisable to contact
the customer assistance.
The TCP axes id is different from those of the kinematic
The TCP received a request for an activation with axes ID different from the one
22/215
defined on active kinematic. If displayed on the screen it is advisable to contact
the customer assistance.
TCP tool direction axis must be a virtual axis
The TCP received a request for an activation with non-virtual tool direction axes.
22/216
If displayed on the screen it is advisable to contact the customer assistance
service.
Homing unavailable for axes referred to TCP
22/217
If TCP is enabled, axes cannot be homed.
Unavailable homing for virtual axes
22/218
Virtual axes cannot be homed.
Virtual axis unavailable
Request for the acquisition of a virtual axis within an interpolator, but the axis is
22/219
not virtual. This is an internal notification referred to the PLC, if displayed on the
screen it is advisable to contact the customer assistance service.
Unavailable TCP in continuous when in Realtime Tool Compensation mode
22/220 It is impossible to program (tcp,… in continuous if reltime length and tool
diameter compensation is active.
Tool and rotary direction axes (TCP) not available at the same time
22/221 It is impossible to program, at the same time, movement of the axes related to
tool direction TCP or to rotary TCP. Only manual movements are admitted.
A virtual axis CANNOT be used as Slave axis
22/222
It is not possible to use a virtual axis as a Slave
22/223 Slave axis of a cam
22/224 Slave axis of a master/slave
22/225 Homing not executable with cam
Tool direction and linear (TCP) axes not contemporarily available if virtual
positions updating is active.
22/226
With TCP,5 and tool mode 11, 12 or 13 it is not possible to program tool direction
and linear (TCP) axes at the same time.
22/227 Filters required on all the TCP real axis

45004607K 316
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Process non-existent
Internal error:
Request for the status of a non-existent process. It is not shown in case of
22/300
operations called by part program or in case of operation carried out by an
operator. It is an internal error related to PLC programming, if it appears please
contact Customer Support.
LookAhead activation not admitted
Internal error:
Request for LookAhead activation while this one is already active. It is not shown
22/301
in case of operations called by part program or in case of operation carried out by
an operator. It is an internal error related to PLC programming, if it appears
please contact Customer Support.
LookAhead command not admitted
Internal error:
Request for a lookAhead command while this one is not active. It is not shown in
22/302
case of operations called by part program or in case of operation carried out by an
operator. It is an internal error related to PLC programming, if it appears please
contact Customer Support.
Cycle start denied
Internal error:
Request for a CycleStart command when system is in a status which does not allow
22/303
command start. It is not shown in case of operations called by part program or in
case of operation carried out by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Cycle stop denied
Internal error:
Request for a CycleStop command when the system is in a status which does not
22/304 allow the stop of a movement (or movement is absent). It is not shown in case of
operations called by part program or in case of operation carried out by an
operator. It is an internal error related to PLC programming, if it appears please
contact Customer Support.
Dynamic command not consistent
Internal error:
Request for a movement in point-point (G29) during a continuous, without the end
22/305
of the continuous itself. It is not shown in case of operations called by part
program or in case of operation carried out by an operator. It is an internal error
related to PLC programming, if it appears please contact Customer Support.
Unavailable request for PLC process
Internal error:
Request for a command on a PLC process, but the command is unavailable for PLC
22/306
processes. It is not shown in case of operations called by part program or in case
of operation carried out by an operator. It is an internal error related to PLC
programming, if it appears please contact Customer Support.
Misalignment on axes number
Internal error:
22/307
Misalignment error in the internal information (number of axes) during operations
in UPR. Contact the customer assistance service.

45004607K 317
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Misalignment on axis ID
Internal error:
22/308
Misalignment error in the internal information (axes Id) during operations in UPR.
Contact the customer assistance service.
Unavailable function during UPR
22/309
An unavailable operation is required while there is a UPR command running.
22/320 Error opening cam file
22/321 LF not found at the end of cam file
22/322 Cam file not existing
22/323 Cam table not strictly monotone
22/324 Format error of the first row of cam file
22/325 Format error of the rows of cam file
22/326 Max number of cams reached
22/327 Max number of action reached
22/328 Cam Id not valid
22/329 Action Id not valid
22/330 Cam not defined
22/331 Cyclic cam module not valid
22/332 Cam busy in an action
22/333 Release position greater than the cyclic cam module
Axis homing completed
22/6001 End of axis homing operation is signalled highlighting the distance between micro-
marker (if the executed homing cycle uses the research algorithm micro-marker).

45004607K 318
Prima Electro S.p.A. OPENcontrol – Programming manual

12.1.2 Errors generated by Process library

Code Description of error messages and remedial actions


Syntax Error in the block
23/001
Syntax error found in the part program block or in the MDI block
Open file NMC_BINARY.DAT error
23/002 The machine configuration file generated by ODM has not been found. Refill the
AMP and reboot.
Open file LDIRDATA.DAT error
23/003 The default directory configuration file generated by ODM has not been found.
Refill the AMP and reboot.
Insufficient memory for the process
23/004 Maximum limit of memory achieved. Reduce the number of variables configured in
ODM or increase available RAM memory.
Process undefined or process number out of range
23/005 The process receiving the command has not been configured or the requested
process number is lower than 1 or higher than 24.
Format error
This error is displayed in the following cases:
Wrong variable format
Invalid IBSIZE values (allowed values are 0, 3, 4, 5)
Wrong variable index or indexes
Feedrate (F) = 0 or negative
Repeat number is illegal (number of repetitions must be from 1 to 65535)
23/006
Format error in assignment (e.g. between strings with different lengths)/
WinPLUS variables writing/reading error
Format error of a character variable in DIS code: variable not specified as CHAR
Variable not configured
T parameter value for wrong GTA
Wrong parameter for a command
Identifier of the protected areas is (included between 1 and 4)
Wrong variable identifier
23/007
The index identifying the variable in read/write or assign commands is wrong.

45004607K 319
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Wrong axis name
The name of the axis specified in the command is not correct.
This error is displayed in the following cases:
the axis specified in axis data request functions has not been configured
error in reading axis position, because specified axis does not exist
the axis specified in library calls CncGetAxQuote, CncCalcAxOfs, CncAxOfsAct,
CncCalcToolOfs, CncToolOfsAct, CncUip, CncSelAxi does not exist
the axis programmed during origin management (pre-setting, UIO, UAO, RQO,
etc.) or offset pre-setting has not been configured
23/008 the axis specified in the triliterals SCF, MIR has not been configured
the definition of the work plan with G17, G18, G19, G16 is wrong, because the
number of axes configured is less than 2 or because the axis specified has not
been configured
the name of the axis to be selected, homed, shared with logic or blocked has
not been found in the table of the axes concerning that process or has not been
configured
the axis specified in the triliterals SOL, DPA, AXO, UVW, FLT has not been
configured or has been duplicated.
the axis specified in the commands G92, G98, has not been configured.
Too many variables in RD/WR
23/009
The number of variables in read/write commands exceeds maximum limit.
Wrong axes number in the command
The number of axes specified in the command is not correct.
23/010
Error is displayed to indicate that the number of axes specified in library command
CncPutDinaAx /CncSetAxShare / CncRelAxShare is higher than the allowed number
Error reading/writing variable
23/011 The name of the variable, specified in the library read/write commands, is wrong,
or the variable has not been configured.
Wrong data into ODM configuration file
23/012
Wrong data error.
Error in activating file to restore TCP
Internal error:
23/013 It indicates that it was not possible to enable writing for the file used in restoring
TCP configuration. It is an internal signal, if displayed on the screen contact the
customer service.
Error in generating file to restore TCP
Internal error:
23/014
Indicates the file used in restoring TCP configuration can’t be generated.
If displayed on the screen, contact the customer service.
Invalid variable value
23/015
Value exceeds the variable valid range, check if the value to be assigned is correct.
Unknown command
Error shown if:
23/016
The command to be executed is not correct
Request mode not correct during GTS command

45004607K 320
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Command and system status not congruent
Error displayed if:
23/017 Command cannot be accepted while the system is in current status.
Execution of a block in MDI with the system in WAIT status
Modification by PLC of the programmed Feed not in the correct status
Wrong parameter command
Error displayed when:
Error in type of read positions
23/018 Erroneous origin number during origin pre-setting
Wrong axis number or selection type during axis selection
Error in versor definition during thickness cutter compensation
Error on command during Multi Block Retrace or Search in Memory
Unexpected response by the system
23/19 Switch off the system, then reboot. If problem persists please contact Customer
Support.
RCM not available
23/20
Search in memory is not available. To use it, inable the function by AMP.
Too many virtual axes required
Internal error:
23/21 Shows that too many virtual axes have been enabled/disabled during the active
process. It is an internal signal, if displayed on the screen, contact the customer
service.
23/22 Synchronism task command not accepted
Wrong number of axes for G code
Error displayed when programming:
At least one axis must be programmed in G04, G05 or G06.
23/050
More than one axis is programmed with canned cycles (G81  G89)
No axes or too many axes programmed for probing cycles (G72  G74)
Only one axis is given as the starting point of a protected area
Canned cycle parameters missing
23/051
Some parameters needed to perform the canned cycle are missing (e.g. K, I, …)
Missing parameters for G code
23/052
Some parameters needed for G code execution are missing (e.g. G33, … K)
Missing J and/or K for G83 cycle
23/053
J and/or K parameter for canned cycle G83 are missing.
Missing I and/or J parameter for G2/G3/G12/G13/G14 codes
23/054
I and/or J parameter for G2/G3/G12/G13/G14 (circle) cycle are missing.
Probing cycle parameters missing
23/055
Some parameters for probing cycle are missing.
Undefined variable
23/056
Tried to access a variable that is not configured.
Expression Overflow
23/057
Mathematical expression is too long (more than 40 characters)

45004607K 321
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Function not allowed
Error appears when requested:
activation of an M code of type program stop while program already stopped or
23/058
when the system is in hold.
Request for an M paramacros configured as M prefetch
modification of Master/Slave parameters, but no Master/Slave is configured
Incorrect use of slave axis
23/059
A SDA/UDA/XDA command tried to define as Slave an axis that is already a Slave.
Operand not allowed in anned cycle
23/060
Operand not allowed for G code G72 / G73 / G74.
K parameter not allowed in G84
23/061 K parameter is not accepted when performing a G84 using a spindle without
transducer.
Wrong circle programming (G2/G3)
23/062 Both centre and radius ® of the circle to be programmed has been specified.
Remove radius ® value or the operands (Iand J) specifying the centre.
Illegal number of operands
23/063
Wrong number of operands for LOA triliteral
Illegal number of pseudo axis
23/064 Too many pseudo axes programmed into block: maximum number of pseudo axis is
6
Illegal number of axes in G33 code
23/065
More than two axis programmed in G33 G code.
G not allowed
23/067
G not allowed in roughing cycle
Operand not allowed with G code active
23/068
At least one operand is not compatible with current movement
Block and system status not consistent
MDI or programmed block is inconsistent with system status,:
synchronisation with blocks queued for execution (e.g. synchronisation while
cutter compensation is active or within a G61/G60 session). If a Prelude M
function not allowed in continuous is programmed type G0 in the previous row.
23/069
Circular movement in the space during a roughing cycle
axis migration (GTA) when canned cycle, cutter compensation,TCP, UPR,
virtualization, dual axis or master / slave axes are active
Request of activation/change tool offset with UPR active
Logic operands programmed within a reserved area
G and program state not consistent
G function is not consistent with system status. For example:
with diameter compensation active (G41-G42) canned cycle G operators cannot
be programmed
23/070
threading cannot be programmed when tool diameter compensation or canned
cycles are active
functions related to interpolation plane (G16-G17-G18-G19) cannot be
programmed during tool diameter compensation (G41, G42).

45004607K 322
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Geometric element type not consistent
Current program status and geometric element type are not consistent, for
example:
During spline session it is not possible to oper cutter radius compensation (G41,
23/071
G42) or it is not possible to program canned cycle G operators
A movement block subsequent to G41, G42 can not be circular
Circles can not be programmed in the space with cutter radius compensation
active or in canned cycles
Programming type not consistent
Programming type (absolute, incremental or G79) is not consistent with current
23/072
programming status
Incremental programming of an axis on a block with G79 code
Current programming not consistent
23/073
Actual programming not consistent with previous one
G and dynamic mode not consistent
Requested G function is not consistent with current dynamic mode:
23/074 functions G72, G73, G74 are not accepted while in continuous (G26, G27, G28)
it is not possible to change from G27 to G28 (and vice-versa) when non-linear
ramp (RAMP > 1) is active
G41/G42 and part program status not consistent
23/075 Inconsistence between actual part program status And cutter compensation
programming (G41/G42).
G needs spindle with transducer
23/076
G33 and threading macro cycle FIL need a spindle with transducer.
G not consistent with feedrate mode
23/077
Probing cycles (G72, G73, G74) cannot be programmed when G95 is active
Operands and part program status not consistent
Operand is not consistent with the actual program status.
23/078
E.g. :
Operands r, b are not allowed in the ISO standard status (G40)
PLC operands and part program status not consistent
23/079
PLC operands and current part program status are not consistent
PLC operands and dynamic mode not consistent
PLC operands not consistent with current dynamic mode:
23/080 For instance:
M prelude/postlude not compatible with G code G26/G27/G28 (continuous)
T programmed when cutter compensation (G41/G42) is active
PLC operands and movement type inconsistent
PLC operands inconsistent with movement type.
23/081
For instance:
G33 + M postlude function
Operand not admitted in Probing Cycle
Some operands are not allowed in a probing cycle:
23/082 For instance:
With G73 the following operands are not allowed: I,J,K,R,u,v,w,b,t
With G72 the following operands are not allowed: I,J,K,R,u,v,w,b,t,r
Third axis missing for helix
23/083
Third axis for helix has not been programmed.

45004607K 323
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


"Expedite" function without motion
23/084 An M “expedite” function is present on the block in progress but there isn’t any
associated movement. Function M “expedite” must be associated with a movement.
Feed not programmed
23/085
Missing feed for a canned cycle.
Speed not programmed
23/086
Missing spindle feed for a canned cycle.
Write not admitted on read only variable
23/087 ISOCOMP, LINENO, RCNEAR, STE, STA, TCPACT, TIM, XMLMAP, $A variables are read
only. They cannot be written.
IF Nesting higher than 32
23/091
Exceeded maximum nesting limit of (IF) commands.
ELSE not allowed
23/092
An (ELSE) command has been programmed without a previous (IF) command.
ENDIF not allowed
23/093
An (ENDIF) has been programmed without a previous (IF) command.
Part program block too long (>127 char)
23/094
A too long block has been programmed (>127 characters)
Part program access denied
23/095 Requested part program cannot be accessed since it is currently used by another
user
Program already selected
23/096 This error takes place in MDI mode in case of an attempt to activate many times the
same paramacro.
Part Program name too long
23/097 The name, including it system address, exceeds the maximum limit of 127
characters
Logical DRIVE not found
23/098
Specified logical drive was not configured in ODM or in file browser
Part Program Path not found
23/099
Path specified for part program does not exist.
File not found
23/100
Specified Part program/routine/paramacro was not found in defined paths.
Illegal file name
23/101
Error takes place if the file name of a table to be loaded with LOA is not correct.
File access error
23/102
Error takes place if the system is unable to load a table
23/103 Error during part program file handling
SPG denied
23/104
SPG command failed
Part program deactivation failed
23/105
PLC did not enabled Part Program deactivation
Part program not selected
Error triggers if:
23/106 “Block modification” was selected in MDI, but no Part Program was activated
Cycle Start button has been pressed, CNC is in AUTO mode or BLK/BLK, but no
Part Program was activated

45004607K 324
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Tool direction not consistent with compensation plane
23/107 Error takes place, with gauge tool compensation active, when programmed
movement and tool direction are not consistent.
Duplicated axes in UDA/SDA command
23/108
Error takes place if an axis appears many times inside a command of dual axes.
Axis different from X and Y on safety area definition
23/109 The part program defining a safety area includes references to axes different from
X and Y
Programming of the tri-literal not allowed
The error occurs if trying to:
execute a tri-literal code within a Part Program describing the protected area
execute one of the following commands while the SPLINES are in execution:
 TCP enabling
23/110  command DAN
 axes sharing with PLC
 axes shift (GTA)
 definition of the axes to follow (AXF)
 high speed axes definitions (SPL)
 rototranslate the Cartesian coordinates (UPR, G53, G54, G57)
M function not allowed
23/111
M function of block type was programmed for calculation in continuous
Diameter or length duplicated in RQT/RQP
In a block containing tri-literals RQT or RQP lengths (or diameters) having same
23/112
index have been specified.
Check if the block does not contain lengths (or diameters) having the same index.
G not consistent with Spline status
23/113
G code programmed is not consistent with the Spline programming.
PLC operands not consistent with Spline status
23/114
PLC operand programmed are not consistent with Spline programming.
Spline calculation axis parameter non-axis
23/116 A specified axis to calculate the Spline parameter does not belong to the axes list
for which the Splines are calculated.
Program of an axis not belonging to the Spline
23/117
Programmed an axis not belonging to the Spline while the splines are active
Access error to saved paramacro
23/118 Internal error:
If displayed on the screen contact the Customer Service.
Error in uploading the $PTECH table to the line
23/119
The file you are trying to load into the $PTECH table contains an error
23/120 Wrong TCP configuration for Spline transformation
Theoretical and/or measured points missing for G39
There is no specification of the theoretical point or of the points measured
23/121
necessary for the execution of the G39 rototranslation. Specify the theoretical
points with G37 or those measured with G38
Points not consistent between G37 and G38
The coordinates of the points measured and theoretical ones are not consistent,
23/122
check that the Cartesian coordinates are the same for the theoretical points (G37)
and for those measured (G38)

45004607K 325
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Record number specified for R / W on an ASCII file
23/123 The field record has been specified to read or write an ASCII file. ASCII files do not
use the concept of record.
Size error in terminator
23/124 The terminator used in the transmission or reception from the serial port is longer
than expected
Missing data or too much data to load $PTECH
23/125 Loading of the extended technological table failed. The file to be loaded has a
different number of lines from the size of the extended technological table.
Wrong data or row format to load $PTECH
23/126 The row of the file to be loaded into the extended technological table is not
correct.
Write access of Pocket table variables not enabled
23/127 Attempt to write a Pocket table variable without enabling the write access, setting
to 1 the variable POCKACC.
Command S10 – 8600 not compatible in OPEN
23/128
The following commands 8600 are no longer supported: ASC, DSA and DSC
Block not allowed during program time calculation
During program time calculation it is not possible to:
23/129
Program G95
Receive data from the serial line
Illegal argument for TAN
23/150 TAN operator argument is 90 degrees or an odd multiple thereof: the result would
be infinite.
Square Root of a negative number
23/151
The argument of the SQR operator (square root) is a negative number.
Too many programmed axes
The error takes place if:
23/152
More than 12 axes have been programmed in the block;
It has not been possible to assign an extra-process axis during UDA/SDA/XDA
Division by zero
23/153 A division by zero has been detected in the expression that calculates an axis
dimension (e.g. X10/0)
String too long
23/154
The max. string length is 127 characters.
Label duplicated
23/155 This message is displayed during Part Program Activation phase and it indicates that
two equal labels have been programmed.
Undefined label
23/156 The label programmed in a branch instruction (GTO) or in a call for a subroutine
(EPP) does not exist.
Label too long
23/157 This message, displayed during Pat Program activation phase, signals that a label
longer than 6 characters has been programmed.

45004607K 326
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


PToo many subroutines in Part Program
This message, displayed during part program activation phase, indicates that the
23/158 number of subroutines called by CLS into the Part Program overflows the maximum
number configured in AMP. If possible, change this value in ODM or change the calls
using CLD.
Too many Labels in Part Program
This message, displayed during Part Program activation phase, signals that the
23/159
number of labels programmed in the Part Program exceeds the maximum number
configured in the AMP. If possible, modify this value in ODM.
File End
Signal of end program for operations:
block skipping
23/160
block editing
string search
program execution
LF not found (0x0a) at file end
23/161 End of file (LF) code has not been found. Modify the program, adding a return after
the last line.
Beginning of program
23/162
Signal of program start.
Nesting of RPT greater than 5
23/163
RPT max. nesting level (5) exceeded
Nesting of subroutine greater than 7
23/164
Subroutine max. nesting level (4) exceeded
Nesting of EPP greater than 5
23/165
Triliteral EPP max. nesting level (5) exceeded
RPT/EPP/IF/ELSE opened at the end of the file
This message is displayed at file end, paramacro or routine in execution
achievement:
23/166
without finding the (ERP) block closing the programmed (RPT) cycle
without finishing the part program part defined with EPP
without finding the ENDIF block closing the IF block or ELSE in execution
ERP without RPT
23/167
(ERP) has been programmed without previously programming (RPT).
Modal Paramacro already active
23/168
A G paramacro is programmed when a G modal paramacro was already active.
Logarithm of a negative number
23/170
The argument of a logarithm function is less than or equal to zero.
Too many elements in safety area definition
23/173 Safety areas should be defined using no more than 10 (closed areas) or 9 (open
areas) geometrical elements
Safety area could not be closed (elements overflow)
23/174 An open safety area has been defined using 10 elements, it cannot be closed by the
control.
Active safety area cannot be redefined
23/175 Attempt to redefine a psafety area while active. Deactivate safety area before
redefining it.

45004607K 327
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Error in 3D limits definition of the safety arealimits for 3D safety area
23/176
Higher and lower limits for 3D safety area do not belong to the same axis.
XMLrules.txt not loaded. XML commands not executed
23/177 No XML correlation paramacros file was supplied, but there is an attempt to
execute XML commands
Syntax error in XMLrules.txt
23/178
XML-paramacro correlation file has a syntax error
High Speed Machining function not installed
23/179
High Speed Machining functions (Spline) are unavailable on the machine.
23/180 Unaccepted interpolation in HSM machining
High Speed Machining functions disabled by ODM
23/181 High Speed Machining functions are disabled in the active AMP. Change enabling
flag value in AMP.
XML correlation table updating
23/182 Error in XML correlation table sharing: the part program tried to enter the XML
correlation table during the uploading. Check the operations timing.
Global alias duplicated
23/186 Change the file AliasTable.txt in the string indicated in the comment and correct
the error.
Global alias invalid or too long
23/187 Change the file AliasTable.txt in the string indicated in the comment and correct
the error.
Too many global alias
23/188 Change the file AliasTable.txt and remove all the global aliases starting from the
string indicated in the comment.
Local alias duplicated
23/189
Correct the incorrect string in the program or the macro.
Invalid local alias
23/190
Correct the incorrect string in the program or the macro.
Overflow table local alias
23/191 Reduce the number of local aliases used by the program and/or by the macros
called.
Alias not defined
23/192 Check the name of the alias used in the program or in the macro; possibly add the
alias as a local alias or to the global aliases in the file AliasTable.txt.
Null element in the protected areas definition
In the definition file of the protected area either a linear element shorter than the
23/194
null movement threshold or a complete circle connected to other elements is
present.
Unknown XML parameter
23/195 During an Inline type XML command, a parameter not belonging to the block (as
defined by the mapping file) has been found.
Lack of one or more XML block parameters
23/196 One or more parameters defined in the mapping file are not present within the
current call of an Inline type XML block.

45004607K 328
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Axis not referred
Programmed axis has not been zeroed
23/250 Attempt to requalify a corrector associated to a non-zeroed axis
Presetting attempt for a corrector associated to a non zeroed axis

Undefined DPP for probing cycle


23/251 Probing cycle parameters (approach coordinate, safety distance, velocity) are not
defined with the tri-literal DPP.
Too many programmed M "Expedite"
23/252
More than one expedite M code has been programmed in the block
Undefined M code
23/253 Programmed M code is not configured in AMP.
Configure by ODM the requested M code.
Circle not consistent
23/254
The circle is not geometrically consistent: radius or final points are not correct.
Wrong threading parameters
Threading parameters not consistent.
23/255 Calculate the I parameter with the following formula:
16 k
2(threading distance)
Helix pitch not congruent
23/256
The helix pitch is not geometrically correct
SCF is different between the axis of interpolation plane
23/257 Plane axes in G02/G03 programming (circle), must have the same scale factor.
Change the scale factor with an SCF instruction.
Geometry inconsistent
23/258
ISO profile programming is wrong.
Compensated Profile inconsistent
23/259
Programmed Profile is no longer continuous after cutter compensation
Wrong direction on profile
23/260 Tool compensation value to be applied on G41/g42 leads to a direction invertion on
the profile.
Error disabling tool cutter compensation
23/261
Error exiting from tool cutter compensation (G40)
Transit buffer is full
Error is displayed if:
during programming with toll cutter compensation active (G41-G42), too many
23/262
movements extra interpolation plane have been programmed
when interference correction is active (IBSIZE different from 0), too many
elements need to be skipped.
Too many blocks to unlock
23/263 Buffer of the lements in input is full. If message is displayed on the monitor, please
call customer service.
Entry in safety zone
23/264
The programmed movement enters one of the active safety areas.
Canned cycle on rotated plane
23/265 Canned cycle programmed on rotated plane.
Disable rotation on the plane.

45004607K 329
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Canned cycle length data incongruent
23/266 The parameters for hole depth, approach position, return position after machining
are not consistent during a canned cycle.
Canned cycle data incongruent
23/267 Parameters associated to canned cycles not consistent (I, J, K, R).
For example: canned cycle K = 0
23/268 Canned cycle not foreseen
Wrong probing cycle programming
23/269 Approach distance is null
Hole probing is programmed with null radius (for example G73r0E5)
Axes not on profile
This message appears when trying to exit CYCLE STOP (HOLD) after a series of jog
23/272
moves without taking the axes back to the profile.
Select JOG RETURN and return the axes to the profile.
Error in exit HOLD: mode changed
This message occurs when trying to exit from HOLD by setting an operating mode
23/273
different from the one referring to the enter in HOLD.
Select the same operating mode and retry the exit from HOLD.
Block not allowed in HOLD
23/274
An MDI block, which cannot be executed, has been programmed in HOLD status.
Active reset not allowed
23/275
The active reset activation is not possible in canned cycle
Wrong programming of roll-over axis in G90
23/276 It was programmed, with G90 active, a position for the rollover axis greater than its
pitch.
Virtual axes programming not allowed
23/277 Temporary or virtual axis origin has been programmed or virtual axis has been
defined as linear axis for a TCP configuration.
Real axes or manual motions not allowed with tool direction active
23/278
Attempt to execute the zero micro for a virtual axis
Command not allowed during RCM
23/279
Command not allowed during the search in memory
Output elements buffer full
23/280 Too many elements in output buffer with active interface correction. Programmed
profile and tool dimension generate too many interferences on the profile.
Axis shared with PLC
23/281 Attempt to move in manual or to bring back on the profile an axis shared with the
PLC.
Safety area is not convex
23/282
Safety area should be a convex surface.
Safety area not defined. Impossible to activate
23/283
Attempt to activate a protected area not previously defined with the triliteral DPA.
Request for a Transfer on axis not in safety area
23/284 During safety area activation there is a request to make a transferalong an axis
which is different from the ones defining the area.
Wrong axis type for tangential axis control or virtualization
23/285 The type (linear or rotary) of at least one of the axes specified for the tangential
axis control or for the virtualization UVP, UVC or UVA is not correct.

45004607K 330
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Automatic return to profile not allowed
23/286 After the execution of an MDI command in HOLD, it is not allowed the use of the
automatic return on the profile.
Programming of a connection on a concave angle between elements
23/287 It is not allowed programming directly a connection between two geometrical
elements creating a concave angle.
Tool Centre Point functions not enabled by ODM
23/288 The Tool Centre Point functions are nor enabled in the active AMP. Change the
enabling flag value in AMP.
Impossible to set several offsets on an axis
23/289 In a block containing an AXO type triliteral, the same axis has been programmed
many times. Correct this block.
XDA required without defined master/slave
23/290 Trying to execute a XDA-xda command without a previous master/slave association.
Execute the association using the (XDA,1 command.
Real axes programmed during the virtualization
23/291 Real axes belonging to an active virtualization (UVA, UVP, UVC) have been
programmed. Disable the virtualization before programming the axis.
Access to a string not enabled in the table $PTECH
23/292 Attempt to read a value of $PTECH table in a disabled rline. It is necessary to
enable the stringsetting to 1 the first value of the line.
Cam status not consistent with the request
23/293 Actual cam status does not allow the execution of the requested command. Check
consistence between the request and the cam status.
Process configuration not consistent at exit from HOLD
Attempt to exit an HOLD status with a Process configuration different from the one
23/294
twas active when the input in HOLD status was activated.
The error appears if axes sharing have been modified.
Rollover axis with module different from 360° in virtualization
The rollover rotary axis selected for a virtualization (UVP, UVA, UVC) has a module
23/295
different from 360°. The module of a rollover axis involved in a virtualization must
be 360°.
Comand not consistent with TCP status
The error will take place in two cases:
23/296
Execution of the Offset Preset with active TCP
Execution of CncTcpCalcRot() function with TCP deactivated
Command not congruent with active kinematic
23/297 Execution of CncTcpCalcRot() function with a number of rotaries of the TCP higher
than 2 or with a kinematic type equal to 2

45004607K 331
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Wrong Selection mode
Attempt to select an operating mode not admitted.
Allowed modes are in the 1-8 range:
1. MDI
2. AUTO
23/350 3. BLOCK by BLOCK
4. CONTINUOUS JOG
5. INCREMENTAL JOG
6. RETURN ON PROFILE
7. HOMING FILE
8. HPG (Hand Wheel)
Number of selected axes out of range
The error triggers in two cases:
The number of axes selected for the mirroring (triliteral MIR) is higher than the
23/351 number of available axes
Thee number of axes selected for manual movements with library call is not
correct. The allowed range is from 1 to the number of axes configured for the
process.
Too many axes selected for manual movement
A larger number of axis names than accepted have been inserted in the part
23/352
program block.
Edit the part program block.
Cycle not allowed for the selected mode
This error is displayed when CYCLE START is pressed in the following conditions:
HRUN satus with active MBR and selected mode different from AUTO or
BLK/BLK
Selection of a mmde different from MDI during the execution of system
23/353 axes movement.
IDLE status with active MBR and mode different from AUTO or BLK/BLK
HOLD status and AUTO or BLK/BLK mode with MBR not configured in AMP
HOLD status with active MBR and selected mode different from AUTO or
BLK/BLK
NB: For further information on machine statusplease refere to the User Manual.
Data length out of range
Error displays if:
23/354
MDI block length is out of range
Error on library call command for axis sharing activation
Wrong Operating Limit definition
23/355
Error during the definition of the software operating limits with the triliteral SOL.
Offset not defined for the axis
23/356
Attempt to pre-set an offset not associated to the specified axis.
Wrong Tool orientation code
23/357
Tool orientation code is wrong.
Error returned by Axis call
23/358 Internal error:
If it appears please contact Customer Support

45004607K 332
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Manual movement not executed: no configured axis
23/359 Manual movements, homing and return on the profile, cannot be executed
becauseno axis has been selected for manual movements.
Axis not configured for GTA/GTS/TCP
23/360 The id programmed in the triliteral codes GTA, GTS or TCP is not configured or a
non-spindle axis has been programmed in the triliteral GTS.
Axis PLC programmed in GTA
The ID of the axis programmed with the tri-literla GTA corresponds to a PLC axis
23/361
not shared.
Check GTA call and/or share the axis.
Axis or spindle unavailable
23/362 Axis programmed for the PLC sharing is not available.
Th axis we are trying to acquire is not available.
Duplicated Axis ID
23/363
The same axis ID is duplicated many times in te triliteral GTA programming.
Axis ID not compatible
23/364 Theaxis ID programmed in the GTA block corresponds to a spindle; so it won’t be
used.
Too many requested tools
23/365
More than 64 tools requested in a multi-tool T address
Wrong Index to start tool search
23/366 The tool search index in multi-tool mode is out of the range of the allowed values
(valid values: 164).
Wrong Range of tool search
23/367 The range of tool search in multi-tool mode is out of the range of the allowed
values.
Axis ID out of range
23/368
Id of the axis to be acquired/released is out of valid range (valid values: 1  64)
Offset assigned to many axes
23/369
Attempt to assign the same offset to two different axes.
Offset length out of range
23/370
Index for offset length is out of range (1  5)
Duplicated axis name
23/371
The same Axis ID is repeated many times in the PLC command AxisGet
Unknown command CAM
23/372 Internal error.
It is an internal signal, if displayed on the screen please contact customer service.
PSEUDO axis programmed in GTA
23/373
The name of the axis programmed in the tri-literal GTA can not be a pseudo axis.
Spindle speed set failed
23/400
PLC does not accept the change of spindle speed.
New tool request failed
23/401
PLC does not accept the programmed T code.
M execution failed
23/402
PLC does not accept the programmed M code.
Pseudo axes movement request failed
23/403
PLC does not accept pseudo axes programming.

45004607K 333
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Movement consent denied
23/404
Movement consent denied by the PLC.
End of movement request failed
23/405
PLC responds with an error on end movement signal.
Too many blocks without motion in continuous start
23/406
Too many blocks without motion have been programmed in continuous mode
Axis on profile
23/450 Signals that the axis is on the profile and that the operation of return on the profile
is correctly ended.
End of automatic return to profile
23/451 Automatic return on the profile operation ended correctly and all the axes are on
the profile.
End of multi block retrace
23/452 Backward execution of the blocks with MBR is finished. To execute backward a
larger number of blocks it is necessary to change configuration.
End of search in memory
23/453
Search in memory ended successfully.
Current process number programmed
23/500 The specified process number sinchronisation commands identify the current
process.
23/501 ASSET option not enabled
ASSET language is not implemented on the control
23/502 Undefined geometrical element
Canned cycle not possible with shared spindle
23/503
G84 or G86 cycle has been programmed with the spindle set in non exclusive mode.
Programmed G require a spindle
G84 or G86uses the spindle directly, but this one is unavailable for the
23/504
current process.
G95 and G01 cannot be executed if the spindle is deactivated
Dry Run already active
23/505
Request for a Dry Run start while it was already active.
Requested process does not exist
23/506 A multi-process command has been executed and it is addressed to an undefined
process.
Queue is full on target process
23/508
The process queue a message was sent to, is full.
Data sent too long
23/509
Data to be transmitted with SND command are longer than 576 characters.
Data loading failed
23/510 The type or number of data transmitted with SND is not consistent with the
expected one.
Message still in queue
23/511 Execution of an SND command towards a process when this one had still not used
the message previously sent to it.

45004607K 334
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


EXE or ECM command failed
The process to which the command is directed (EXE or ECM) is into an
23/512 inconsistent status for automatic execution of a part program (RUN, HRUN,
RUNH, HOLD) or of the command set in MDI.
Command to which “EXE” command is directed has a syntax error
Channel already in use
23/513 Specified channel in the triliteral OPN is already associated with a file. Change the
channel number or close the channel already in use.
File already opened
23/515
The command OPN failed because the file is already opened.
File not found
23/516
The file to be opened or deleted does not exist.
Logical error in file access
23/517
Error in accessing the file, check if the file has been removed or if it is corrupted.
Wrong access type to the file
23/518 Attempt to read from a file opened for writing or attempt to write to a file opened
for reading.
End of file reached
23/519
The end of the file has been reached without reading the required data.
Missing Path for opening file
23/521
Request to open a read file using the OPN command without specifying the path.
Error in data transmission
23/522
Error detected during the data transmission on a serial port.
Binary file corrupted
23/525 It is not possible to read the header of a binary file or a string read from a binary
file does not comply with the format defined by its header.
Access to the binary file with wrong record
23/526 The number and format of the data we are trying to write or read froma binary file
is not congruent with the data included in the file.
Record too long in file writing
23/527
The record we are trying to write on the file is too long.
Row of the data entry out of range
23/530
Data entry contains too many rows (max. 64)
Column of the data entry out of range
23/531
A row of the data entry contains too many columns (max 256)
Undefined data entry
23/532
Attempt to use a data entry that is not defined for the data input by the user.
Table already locked for writing
23/537
Attempt to lock a table that is already locked.
Serial port disconnected
23/539
Attempt to read from or write to a serial port not opened by the process.
Timeout in Tx data
23/540
Request timeout for the data transmission on the serial port.
Timeout in Rx data
23/541
Request timeout for the data reception on the serial port.
Received less data than expected
23/543 The number of data received from a serial port with terminator does not
correspond to the number of data expected.

45004607K 335
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Error in UPR programming
Offset programmed for the rotaries with UPR 0 or UPR 1
Inconsistency between active global virtualization axes and the axes
specified for UPR update
Attempt to modify the virtualization axes in continuous
23/553
Attempt to modify virtualization type “in continuous”
Attempt to modify in continuous the virtualization parameters without an
active virtualization
Attempt to activate an incremental virtualization with axes different from
the ones of active absolute virtualization
Unaccepted incremental UPR
Attempt to program a Cartesian rotation (UPR) of the incremental type without
23/554
previously defining an absolute rotation. Before programming the incremental
rotation, define the absolute Cartesian tern rotation.
Dual axes and polar virtualization not consistent
Dual axes (UDA) and polar virtualization (UVP) functions cannot be applied to the
23/555
same axes at the same time: a master or a dual slave axis cannot be part of a
virtualization at the same time.
Dual axes and UVA virtualization not consistent
Dual axes (UDA) and non-orthogonal axes virtualization functions cannot be applied
22/556
to the same axes at the same time: a master or a dual slave axis cannot be part of
a virtualization at the same time.
Invalid minimum value of the radius
During the cylindrical virtualization programming (UVC), the minimum radius
23/557
required is higher than the present position of the linear axis of the virtualization.
Check the programmed radius value or shift the linear axis.
Dual axes and cylindrical virtualization not consistent
Dual axes (UDA) and cylindrical virtualization (UVC) functions cannot be applied to
23/558
the same axes at the same time: a master or a dual slave axis cannot be part of a
virtualization at the same time.
Invalid kinematics index
23/559
The kinematics index required is invalid (valid values: 14).
Function not available for current TCP
23/560
The modality parameter is not available for the type 5 TCP.
Slave axes in TCP configuration
23/561
One or more axes configured are slave. Slave axes can’t be TCP axes.
Error in the TCP configuration parameters
The kinematics type does not exist
The rotary axes direction is null
23/562 Rotary axes not configured in the TCP
TCP axes not belonging to the process
Rotary axis management in spherical coordinates with physical rotary axes not
present or with kinematics type 2
Error in acquiring/releasing axis
23/563
Impossible to activate GTA command in case of: Offset, Canned Cycles.
UPR non compatible with TCP configuration
23/564 Programming of a UPR with rotary management, but the TCP is not active or the
active kinematic configuration is not coherent with the UPR request.

45004607K 336
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Null module for versors required
In case of versors kinematics (type 2 kinematics), i,j,k versors were not
23/565 specified or the resulting module is null.
In case of radius compensation by versors, versors orthogonal to the
interpolation plane are not specified.
Wrong versors programming
23/566 A versors only block has been programmed without any axes motions.
Versors have been programmed on a null length movement
Versors p,q,d specified without versors m,n,o
23/568
On the block, versors p,q,d, have been programmed without m,n,o versors.
Kinematics ID required to enable TCP
23/569 Kinematic ID to be enabled has not been specified. Specify the value of the
kinematic to be enabled on the triliteral TCP or with the variable TCPDEF.
Axis name already in use
The name chosen for the tool direction axis of the TCP corresponds to a
23/570 name already used by the process.
Chosen name for the virtual axis corresponds to a name already used by the
process.
Function unavailable
23/571 Function required is not implemented by the control.
Please, contact the customer service for additional information.
Required TCP parameters change with inconsistent TCP type
It has been asked, in continuous, for a TCP parameters change with a TCP type
23/572
different from the active TCP type. Make the call with a TCP consistent with the
active type.
Impossible to add a virtual axis
Current process already controls the maximum number of axes, therefore the
23/573
virtual axis can’t be enabled.
If possible, the number of axes managed by the current process should be reduced.
The axes programmed with LTH are already used
23/574 The function LTH and the virtualizations (UVP, UVA, UVC) or the dual axes can not
be applied at the same time to the same axes.
Missing kinematics ID
Internal error:
23/600 In the TCP configuration file created by ODM the kinematics ID is missing.
It is an internal notification, if displayed on the screen, please contact the
customer service.
Index for missing TCP parameter
Internal error:
An index is missing for one or more TCP configuration parameters in the
23/601
configuration file created by ODM.
It is an internal notification, if displayed on the screen, please contact the
customer service.
TCP name missing
Internal error:
23/602 One or more TCP parameters is missing in the configuration file created by ODM.
It is an internal notification, if displayed on the screen, please contact the
customer service.

45004607K 337
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Unknown TCP parameter
Internal error:
One or more parameters in the configuration file created by ODM have not been
23/603
recognized.
It is an internal notification, if displayed on the screen, please contact the
customer service.
Wrong name of the tool direction axis
Internal error:
23/604
Name of one of the axes related to the tool direction is wrong. It is an internal
notification, if displayed on video, please contact the customer service.
Roughing/threading cycle axis not in interpolation plane
23/610 The axis selected for roughing or threading does not belong to the interpolation
plane. Check the axis name or the interpolation plane enabled.
Points mis-aligned in roughing
23/611 During the roughing profile an area has been reached that cannot be roughed.
Check the profile consistency and the roughing instruction parameters.
Wrong start on the profile
Position of the start point is invalid for the SPA or SPF roughing cycle. The start
23/612 point must always be external to the roughing field of the axis X (for roughing
parallel to the axis) and external to the roughing field of axis Z (for roughing
parallel to axis Z).
Start and direction of the profile are inconsistent
23/613 The start point and the profile direction do not allow the roughing process to
proceed.
Too many movement blocks for roughing
23/614 The maximum number of movement blocks allowed in a profile has been reached
after a roughing macro. Check the value set in the active AMP.
Wrong pitch in the threading cycle
23/615 In case of non-standard threading, the pitch value programmed must comply with
the required criteria (refer to the description of triliteral FIL)
Threading angle larger than 180°
23/616 The thread angle programmed in the threading cycle is greater than 180°. Check
the value of the thread angle.
Threading length zero
23/617
The length programmed for the thread along the spindle axis is zero.
Wrong taper angle
23/618 Wrong value of the angle for taper threading. In case of taper threading the
maximum angle allowed is equal to half of the thread angle.
Rotation plane not allowed
23/619 The threading cycle is not allowed if there is an active rotation of the interpolation
plane.
Parameter 'r' necessary for exit with radius
23/620
Threading with exit radius was requested but no value was defined.
Wrong starting position for the grooves cutting
23/621 The start position for the groove cutting macro is inconsistent with the parameters
set in the block.

45004607K 338
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of error messages and remedial actions


Parameters R or B not allowed for groove cutting
23/622 Radii / bevels, external to the groove or at the end of the groove, have been
programmed without specifying the external position of the groove.
Tool larger than the groove
23/623
The tool is larger than the groove width.
Tool not complying with R/B parameters
23/624
The tool width is 0 or less than the sum of the radii or bevels programmed.
Roughing queue not defined
23/625 Request for the execution of a roughing cycle, but the dimension of the roughing
elements queue has not been defined in AMP.
$PTECH upload type unknown
23/700
The type of data upload for the variable $PTECH is invalid.
Wrong number of data sent to $PTECH
It was not possible to upload the variable $PTECH with the required data; the
23/701
number of data sent does not correspond to the number of data expected from the
control for the selected sending mode.
User error
23/800
Error created by the user via the DER command
User warning
23/801
Error created by the user via the DEW command

45004607K 339
Prima Electro S.p.A. OPENcontrol – Programming manual

12.1.3 Errors in tables library


Code Description of the message and recover action
Invalid magazine index
25/101 Magazine index value is not correct.
Check if the value is included between 1 and 10 (both included).
Unavailable magazine
25/102 Magazine is not configured and so it is unavailable to use.
Configure the magazine before using it.
Tool already in the magazine
25/104
Attempt to upload a tool already present in the magazine.
Random field not coherent between tool and pocket
25/105 Tool and pocket random fields are not coherent.
Check if the random field for the tool and the pockect are correcrt.
Different dimension between tool and pocket
25/106 Tool and pocket dimension are different, it is not possible to carry out the
requested operation.
Tool type not compatible with the magazine
25/108 Tool type is not compatible with the magazine.
Check tool type and magazine type.
Fixed type tool and pocket not compatible
25/109 Chosen tool and pocket are both fixed type, but they are not compatible (the tool
should be uploaded in another pocket or the pocket is reserved for another tool)
Tool not in the magazine
The tool to be moved from the magazine is not present neither in the magazine
25/110
nor in the pocket which have been specified.
Check tool position.
Tool not found
25/111 The specified tool has not been found.
Check if the tool is present.
Requested pocket does not belong to the magazine
25/112 Pocket index is outside validity range.
Check if the index value and the magazine dimension are correct.
Pocket already uploaded
25/113
Trying to upload a tool on a pocket already including a tool.
Encumber not belonging to the magazine
25/114 An encumber pocket necessary for the tool could be outside the magazine.
Check magazine configuration, it can be corrupted.
SX encumber already in use
25/115 Encumber pocket which should be used by the tool is already in use.
Check magazine configuration, it can be corrupted.
DX encumber already in use
25/116 Encumber pocket which should be used by the tool is already in use.
Check magazine configuration, it can be corrupted.
Pocket not uploaded
25/117 Trying to remove a tool from a pocket not including any tool.
Check specified pocket value.
Not master type pocket
25/118 Pocket can not become master for the current tool.
Check pocket index, magazine configuration or tool type.

45004607K 340
Prima Electro S.p.A. OPENcontrol – Programming manual

Code Description of the message and recover action


Tool life value lower than expected
Impossible to find a tool with remaining life value higher or equal to the required
25/120
one; but it was found a tool with remaining life value lower than the required
one.
Unknown search direction
25/125 Attempt to search for a pocket or a tool in a direction unknow by the control.
Check if the search direction parameter is correct.
Search direction not compatible with the magazine
25/126 Search direction is not compatible with the magazine.
Change search direction value.
Corrupted magazine pocket configuration
Magazine pockets configuration is not coherent anymore, it is not possible to
25/131
carry out the requested operation.
Check magazine pockets configuration.
Impossibility to upload some tools
25/138 It has not been possible to upload some tools present in the table because the
magazine to which they belong is not configured.

45004607K 341
Prima Electro S.p.A. OPENcontrol – Programming manual

12.1.4 Errors generated by geometrical library


Code Description of the massage and recover action
Elements not intersecting
It has not been possible to calculate the intersections between a circular
26/001
movement and another movement. Check that the starting point, the final point
and radius (or centre) of the circular movement are correct.
Parallel lines
It has not been possible to insert a connection between two elements. The
26/005
connection can be programmed type or generated by tool optimization path in
tool compensation (TPO = 33)
Element not correctly defined
26/006
Internal error, if shown please contact the customer support.
Aligned points
26/007 Measured points during a parameter measurment for a hole (G73) do not define a
circle.
Different radius between starting and final point
Movement of the programmed circular radius calculated on the starting point is
26/010
different from the radius calculated with respect to the final point. Check the
coordinates of circular movement centre and starting and final points.
Circle not congruent
It has not been possible to normalize a circular movement. Check the starting
26/011 point, the final point and the radius or center of the movement. Correctly define
the tolerance precision for the circular interpolation and the normalization mode
of the arch.
Perpendicular vector not defined
A circumference or a semi-circumference has been programmed using code G12
26/012 (G13), but the vector perpendicular to the plane where the circumference is
laying has not been defined.
Define this vector through the components x, y, and z.

45004607K 342
Prima Electro S.p.A. OPENcontrol – Programming manual

12.1.5 Security library errors

Code Description of the message and recovery action


Option not enabled (A30 UPR Enable)
50/059
Installed PAK does not allow command execution.
Option not enabled (A31 TCP Enable)
50/060
Installed PAK does not allow command execution.
Option not enabled (A32 Extended TCP Enable)
50/061
Installed PAK does not allow command execution.
Option not enabled (A33 High Speed Enable)
50/062
Installed PAK does not allow command execution.
Option not enabled (A34 Axis and Spindles Migration)
50/063
Installed PAK does not allow command execution.
Option not enabled (A35 Dual Axes UDA/SDA)
50/064
Installed PAK does not allow command execution.
Option not enabled (A36 Extended Dual Axes XDA)
50/065
Installed PAK does not allow command execution.
Option not enabled (A37 Following Axes AXF)
50/066
Installed PAK does not allow command execution.
Option not enabled (A38 Splines(G61) Enable)
50/067
Installed PAK does not allow command execution.
Option not enabled (A39 Workpiece setting error compensation)
50/068
Installed PAK does not allow command execution.
Option not enabled (A40 Extended Workpiece setting error compensation)
50/069
Installed PAK does not allow command execution.
Option not enabled (A41 Electronic CAM)
50/070
Installed PAK does not allow command execution.
Option not enabled (A42 XML from Part Program)
50/075
Installed PAK does not allow command execution.
Option not enabled (A43 Access to Table from ASSET)
50/077
Installed PAK does not allow command execution.
Option not enabled (A44 Multi-process synchronization from ASSET)
50/078
Installed PAK does not allow command execution.
Option not enabled (A45 TCP/IP Communication)
50/079
Installed PAK does not allow command execution.
Option not enabled (A46 XML file access from Asset)
50/080
Installed PAK does not allow command execution.
Option not enabled (A47 RS232from Asset)
50/081
Installed PAK does not allow command execution.

45004607K 343
Prima Electro S.p.A. OPENcontrol – Programming manual

12.1.6 Errors in the 3D transformations library

Code Description of the message and recovery action


Matrix A not reversible
59/001 Internal error.
If displayed on video, please contact the customer service.
Id kinematics does not exist
59/002 Internal error.
If displayed on video, please contact the customer service.
Too many configured TCP
59/003 Internal error.
If displayed on video, please contact the customer service.
Too many configured UPR
59/004 Internal error.
If displayed on video, please contact the customer service.
Internal error.
59/005
If displayed on video, please contact the customer.
Too many configured Virtualizations
59/006 Internal error.
If displayed on video, please contact the customer.
Position below the minimum radius
In an UVP virtualization, a movement that will take the linear axis of the
59/007 virtualization in a position lower than the minimum radius defined for the
virtualization has been programmed.
Check the programmed movement or re-configure the minimum radius.
Unknown Euler rotation
59/008 Internal error.
If displayed on video, please contact the customer service.
59/009 Error in calculating the Euler angles
59/010 Error in calculating the normed vector space

45004607K 344
Prima Electro S.p.A. OPENcontrol – Programming manual

Contacts:
PRIMA ELECTRO S.p.A.
OSAI Business Unit
Strada Carignano, 48/2
Moncalieri (TO) - ITALY
Tel. +39 011 9899 800
Web: www.primaelectro.com
e-mail: [email protected]

Copyright  2016 by PRIMA ELECTRO S.p.A.

45004607K 345

You might also like