Tf5100 Twincat 3 NC I: Manual
Tf5100 Twincat 3 NC I: Manual
TF5100 TwinCAT 3 NC I
TwinCAT 3
Version: 1.2
Date: 2018-04-22
Table of contents
Table of contents
1 Introduction................................................................................................................................................ 7
6 Samples.................................................................................................................................................. 293
1 Introduction
The TwinCAT NCI stands for 'numerical control interpolation' and is the NC system for interpolated path
movements.
TwinCAT NCI offers 3D interpolation (interpreter, setpoint generation, position controller), an integrated PLC
with an NC interface and an I/O connection for axes via the fieldbus.
NCI can be used to drive 3 path axes and up to 5 auxiliary axes per channel. In addition, master/slave
couplings can be formed. In combination with TwinCAT Kinematic Transformation (TS 511x), complex
kinematic systems can be controlled via NCI.
Programming is done with a dedicated NC program, based on DIN 66025, with its own language extensions
(cf. Interpreter (DIN 66025/G-Code) [} 107]) or directly from the PLC with the PLC Library:
Tc2_PlcInterpolation [} 276].
Installation preconditions
Overview
Chapter Contents
XAE user interface [} 8] Description of the parameters and functionalities for
the interpreter in the TwinCAT 3 Engineering
environment (XAE)
Interpreter [} 107] Interpreter programming instructions.
PLC NCI Libraries [} 181] Description of the special NCI libraries
Samples [} 293] Samples for using TwinCAT NCI with PLC and parts
program, and for direct motion control from the PLC
with the Tc2_PlcInterpolation library
Appendix [} 301] Parameterization, cyclic channel interface
2.1 Outline
In order to be able to use the interpolation, add an interpolation channel in the XAE . This applies to the
interpreter and the PLC Library: Tc2_PlcInterpolation [} 276].
1. Create an NC channel.
NOTE! Axis-specific parameters for NCI can be found in the axis parameterization under subitem
'NCI parameters'.
”Online" tab
All the axes in the current Interpolation Group [} 20] will be listed. Currently shown:
• Actual positions
• Set positions
• Following errors
• Set velocities and
• Error Codes
"Override" tab
The channel override for the axes can be read and set on the 'Override' page. If PLC is running and the
cyclical channel interface [} 306] is being written, the override set here will be overwritten by the PLC.
Further information on the override principle can be found under Path override (interpreter override types)
[} 304].
The spindle override is described by the cyclic channel interface, although it is currently not supported.
Click on “Interpreter” to show the following property pages and the online window:
Axes
As on the "Online" properties page in the interpolation channel, this window lists all axes currently included in
the interpolation group. Values for the following parameters are displayed:
• actual positions
• set positions
• following errors
• set velocities and
• current error codes
The Actual Program Line shows the current NC block to be processed in the block execution. The last row in
the window is the current block.
As for nearly all the parameters, the program display can be read off via ADS. This can be used to display
the current NC blocks in a Visual Basic application, for example (see ADS device documentation - ADS
Interface NC [} 308]).
Program name
Displays the name of the currently loaded program. This does not necessarily have to be the program
displayed in Editor.
Interpreter status
The interpreter status indicates the current status of the interpreter state machine. The complete list is given
below. As PLC evaluation does not require all status information, only the most important parameters are
explained.
Status Description
ITP_STATE_IDLE The interpreter is in idle state when there is no NC
program loaded as yet or when a group reset is being
executed. The interpreter also goes into idle state
when a current program is stopped. In the case a
group reset must be executed in order to prevent
error 0x42C5. It is therefore recommended to
execute a group reset after stopping via the PLC.
ITP_STATE_READY After successful loading of an NC program, the
interpreter is in ready state. After a program has been
successfully processed and exited, the interpreter
goes into ready state. In the meantime, however,
other states are accepted.
ITP_STATE_ABORTED If a runtime error occurs during the processing of an
NC program, the interpreter goes into aborted state.
The actual error code is given in the channel status
ITP_STATE_SINGLESTOP This status is only accepted in Single Block Mode
[} 114]. As soon as the entry has been sent from the
interpreter to the NC core, the interpreter goes into
this mode.
Channel status
The channel status indicates the current error state of the channel. If an error occurs during NC program
loading or runtime, the corresponding error code [} 313] is displayed here. If, for example, an axis following
error occurs during processing, the NC program is stopped and the channel status will have a value unequal
0. The channel status should therefore always be checked in the PLC, in order to be able to respond to
errors. The channel status is always 0 during normal operation.
Loading buffer
The current size of the loading buffer for the interpreter is displayed here. Select the "Interpreter" tab to
change the value.
Type
The interpreter type can be selected in the Type selection box. Available are
• the GST-interpreter. GST combines native DIN 66025 based G-code with programming extensions of
Structured Text as a higher level language.
• The DIN 66025 based NC-interpreter [} 107] with @-command register function extensions.
• The selection of none if the PlcInterpolation [} 276] library is used.
As default setting the GST-interpreter is set. To employ the NC-interpreter with register function extensions
you have to select it explicitly.
The loading buffer for the interpreter can be edited here. Note that the memory required in the interpreter is
substantially greater than the size of the NC-file. The maximum permitted loading buffer size is limited to
64 MB.
G70/G71 Factor
If a switch from G71 [} 113] (millimeters - default) to G70 takes place in the parts program, the conversion
factor is stored here. This conversion factor only has to be edited if the base reference system is not
millimeters.
If for example the machine was calibrated based on inches and G70 is activated in the parts program, the
G70 factor should be set to 1 and the G71 factor should be set to 1/25.4.
Save/Restore
At runtime the Save function can be used to save a “snapshot” of the current parameters. The checkboxes
can be used to specify the parameters to be saved. The Save function generates the file ‘SnapShot.bin’ in
the TwinCAT\CNC directory.
The Restore function loads the file saved with the Save function. This function is solely intended for
debugging purposes.
Note
Shows the currently parameterized M-functions. On this page new M-functions can be added, or existing
ones modified.
A more detailed description of the available parameters can be found in the interpreter description under M-
functions [} 145].
Parameterization of M-functions
If M-functions are re-parameterized, subsequent activation of the configuration and a Twin-
CAT restart is required.
Note
The currently applicable R parameters are displayed on the 'R parameters' properties page. During the test
phase it is possible to, for example, initialize or change R parameters here. R parameters are generally
edited, however, from the NC program or if necessary, from the PLC.
You can find further information about R parameters in the interpreter description under R Parameters
[} 115].
The current zero shift values for the axes within the interpolation group are displayed here. The parameters
P54..P59 represent for the corresponding G code. As for the R parameters, the zero shift values can be
edited from here.
NOTE! Columns F & G (e.g. P54 F & P54 G) exist for historical reasons and are added for each
parameter.
You can find further details of the effects in the interpreter description under zero shifts [} 124].
You can edit the data for the tool compensation on the "Tools" property page.
More detailed parameter descriptions can be found in the interpreter description under tool compensations
[} 162].
MDI stands for “Manual Data Interface”. It can be used to enter individual NC blocks directly from the
TwinCAT 3 Engineering environment (XAE). Processing is started and stopped via F5 and F6 respectively.
General [} 21]
DXD [} 22]
Settings [} 26]
Online [} 27]
3D-Online [} 28]
group ID
The group ID is shown on the "General" page. This is required for group-specific ADS commands.
Create symbols
In order to be able to access path variables symbolically, select symbol generation for the group here.
The NCI group parameters are written on the "DXD" properties page.
The curve velocity reduction method is only effective for C0 transition (see Classification of Segment
Transitions [} 301])
Method Description
Coulomb The coulomb reduction method is a dynamic process analogous to the
Coulomb scattering.
The deflection angle φ in the transition point is the angle between the
tangents of the path at the end of the segment S1 and the tangent of the path
at the start of segment S2.
The velocity is set to the velocity at infinity, in analogy to Coulomb scattering,
Vk ∝ ( tan(0.5(π-φ)) )1/2
and then reduced via the C0 factor.
Vk ← C0 Vk.
In the case of a motion reversal (φ=180) the reduction is always Vk = C0. As
the reduction in the case of small deflection angles is drastic, there is an
angle φlow∈ [0,180] from which full reduction takes effect. To avoid reduction,
set φlow = 180. For full reduction (down to φ = 0), set C0 = 0.0 and φlow = 0.
Method Description
Cosine The cosine reduction method is a purely geometrical process.
It involves:
• the C0 factor ∈ [0,1],
• an angle φlow ∈ [0,180],
• an angle φhigh ∈ [0,180] with φlow < φhigh
Reduction scheme:
• φ<φ low: no reduction: Vk←Vk,
• φhigh < φ: reduction by the C0 factor: Vk← C0 Vk
For full reduction (down to φ = 0), set C0 = 0.0 and φlow = 0 and φhigh very
small but not equal to 0 (e.g. 1.0E-10)
Reduction factor for C0 transitions. The effect depends upon the reduction method.
C0 ∈ [0.0, 1]
First, V_link is set to the lower of the two segment target velocities:
V_link = min(V_in,V_out).
The geometrically induced absolute step change in acceleration AccJump in the segment transition is
calculated depending on the geometry types G_in and G_out, and the plane selection G_in and G_out of the
segments to be connected, at velocity V_link.
If this is greater than C1 times the path acceleration/(absolute) deceleration AccPathReduced permissible for
the geometries and planes, the velocity V_link is reduced until the resulting step change in acceleration is
equal to AccPathReduced.
NOTE! When changing the dynamic parameters, the permissible path acceleration for the
geometries and planes and thereby the reaction of the reduction changes automatically.
Each NCI group has a minimum path velocity V_min ≥ 0.0. The actual velocity should always exceed this
value. User-specified exceptions are: programmed stop at segment transition, path end and override
requests which lead to a velocity below the minimum value. A systemic exception is a motion reversal.
With the reduction method DEVIATIONANGLE the deflection angle is φ ≥ φ_h, in which case the minimum
velocity is ignored. V_min must be less than the set value for the path velocity (F word) of each segment.
The minimum velocity can be set to a new value V_min ≥ 0.0 in the NC program at any time. The unit is mm/
sec.
Parameters for enabling the software end positions of the path (see: Parameterization [} 304]).
Parameter for selecting the path override type (see Path override (interpreter override types) [} 304]).
The cycle time reduction ensures that the set value in the SAF is not calculated with the SAF cycle time, but
with a time that is divided by the value specified here. For highly dynamic motions it may make sense to set
the parameter to a value greater than 1, in order to minimize discretization inaccuracies. Increasing the SAF
cycle time divisor results in the set value generator being called more frequently internally.
Parameter that defines the size of the SAF table and therefore the maximum number of cached SAF entries
(look-ahead). If an NC program involves sequential movement of many very short segments, increasing this
value can help to avoid an unintentional velocity reduction at the segment transitions.
Under the "Settings" tab you can set the cycle time for the interpolation. The cycle time set here is a multiple
of the cycle time of the SAF task.
Error code
The current error code for the channel is displayed here. The value is the same as the value displayed in the
online window of the interpreter under 'channel status [} 11]'
SVB status
SVB status displays the current block preparation status (SVB = Satzvorbereitung). Possible SVB states are:
ERROR
IDLE
READY
START
DRIVEOUT
CALIBRATE
MFUNC
SYNCREC
DELAY
MFUNCWAIT
SPINDLEWAIT
SAF status
SAF status displays the current block execution status (SAF = Satzausführung). Possible SAF states are:
ERROR
IDLE
CONTROL
RUN
RUN_DRIVEOUT
WAIT
SVB entries
SAF entries
Target assignment
At this point the interpolation group is formed. The movement of the PTP axes, which are assigned to the
path axes X, Y and Z, can then be based on interpolation.
Any PTP axes can be selected with the aid of the selection lists for the path axes X, Y and Z. Press the
'Apply' button to form the 3D group.
A comparably PLC function block is available in the PLC Library: Tc2_NCI [} 181]. (See CfgBuildExt3DGroup
[} 182])
Actual assignment
The current path axis configurations are displayed here. Use 'Delete' to remove individual axes from the 3D
group.
Resolves the complete 3D group. Here, too, a corresponding PLC function block is available in the PLC
Library: Tc2_NCI [} 181]. (See CfgReconfigGroup [} 184])
3.2 Preprocessor
Include Directive
#include "<path>"
#include < <path> >
The #include directive inserts the contents of another file. The included file is referenced by its path.
Typically, it is used to “import” commonly used code like e.g. libraries. Its behavior is similar to the C-
Preprocessor.
Example:
In the following example file a.gst includes file b.gst. On execution of a.gst the interpreter internally
replaces the include-line by the text of b.gst. Therefore, executing the program a.gst has the same effect
as executing the program c.gst.
FILE a.gst:
G01 X0 Y0
#include "b.gst"
G01 X0 Y100
FILE b.gst:
G01 Z-2
G01 X100
G01 Z2
FILE c.gst:
G01 X0 Y0
G01 Z-2
G01 X100
G01 Z2
G01 X0 Y100
• If path is absolute, it is directly used to locate the included file. An absolute path must be surrounded
by quotation marks.
• If path is relative and surrounded by quotation marks, it is appended to the directory of the including
file to form the path of the included file.
• If path is enclosed in angle brackets, it is regarded to be relative to the paths in the searchpath list.
The first entry in this list that leads to an existing file is used for inclusion. The searchpath list is
supplied by the interpreter environment of the interpreter.
Example:
The following example assumes that the searchpath is set to the directories c:\jjj and c:\kkk. The file
aaa.gst consists of a sequence of #include-directives that are explained in the following.
• The file bbb.gst is included using an absolute path. Therefore, its location is independent of the
location of aaa.gst. Absolute referencing is useful for files that always reside at a fixed location on the
filesystem.
• The file ccc.gst is referenced relative. It must reside in the directory of aaa.gst (the including file),
which is c:\mmm\.
• The file ddd.gst is also referenced relative. It is expected to reside at c:\mmm\ooo\ddd.gst.
• The relative reference of eee.gst uses the sequence '..', which refers to the parent directory.
Therefore, the file eee.gst is expected in c:\ppp\qqq\eee.gst.
• The relative path of fff.gst is denoted in angle brackets. Therefore, the directories in the
searchpath are considered, rather than the directory of aaa.gst. The file is expected in c:\jjj
\fff.gst or c:\kkk\fff.gst. The first path that leads to an existing file is considered. If there is no
file fff.gst in any directory of the searchpath, an error is reported.
• Finally, the file ggg.gst is expected in c:\rrr\ggg.gst. Both entries in the searchpath lead to
this location.
FILE c:\mmm\aaa.gst:
#include "c:\nnn\bbb.gst"
#include "ccc.gst"
#include "ooo\ddd.gst"
#include "..\ppp\qqq\eee.gst"
#include <fff.gst>
#include <../rrr/ggg.gst>
• Each include-directive must be denoted on a dedicated line. Then, this entire line is replaced by the
contents of the included file. An additional ‘newline’ character is appended.
• The include-directive may be used multiple times at arbitrary locations of the including file.
• The same file may be included multiple times.
TIP:
It is typically bad practice to include a file multiple times. Especially, if this feature is mis-
used to factor out code. Instead, a function should be preferred to define code that is
Note reused multiple times (See section Userdefined Functions [} 54].)
Example:
In the following example file a.gst includes file b.gst twice. The second inclusion is always expanded,
independently of the enclosing condition by the IF-THEN expression. The included file b.gst itself includes
file c.gst.
FILE a.gst:
G01 X100
#include "b.gst"
G01 Y100
! IF stVariable=47 THEN
#include "b.gst"
! END_IF;
FILE b.gst:
#include "c.gst"
G01 X0 Y0
FILE c.gst:
G01 Z0
Example:
File x.gst demonstrates a series of invalid include directives. The first three lines violate the rule that each
include directive must be denoted on a dedicated line. In lines 4 and 5 the filename is not properly enclosed
in quotation marks or angle brackets. In line 6 a nonexisting file is included. Line 7 includes the file y.gst,
which itself includes file x.gst. This loop is reported as an error.
FILE x.gst:
#include "a.gst" G01 X100
! #include "a.gst"
#include "a.gst" #include "b.gst"
#include a.gst
#include "a.gst>
#include "non_existing_file.gst"
#include y.gst
FILE y.gst:
#include "x.gst"
A GST-file consists of sequences of G-code and sequences of ST-code that can be interleaved as shown
above. Each program starts in G-code mode. The mode can be switched to ST for one line using an
exclamation mark (‘!’). The ST-mode ends at the end of line automatically.
As an alternative a block of ST-code can be defined using curly braces (‘{‘…’}’). This notation is more
practical to define a long sequence of ST-code in a GST-program. Within the ST-block the G-code mode can
be entered for one line using the exclamation mark. Thereby, the G-code mode ends at the end of line
automatically.
G-Code Block
G-Code Expression
<address>=a+b-c*d/e
The result of the expression is used as the value of the word. The four basic arithmetic operations (‘+’, ‘-’,
‘*’, ‘/’) can be used in a G-expression. They are evaluated as expected, i.e. all operations are left-associative
and ‘*’, ‘/’ have a higher precedence than ‘+’, ‘-’. Variables that have been declared in ST can also be used
in a G-expression (with respect to their scope).
All computations are performed using type LReal (64-bit floating point according to IEEE 754). The value of
an ST-variable is implicitly converted to type LReal according to the conversion rules of ST. If a type (e.g.
STRING) cannot be converted, an error is reported.
RESTRICTION:
ST-variables that contain a number in their name (e.g. x0) cannot be used in a G-expres-
sion to avoid confusion with a G-Code like X0. This limitation does not apply to ST-expres-
Note sions.
RESTRICTION:
Array variables, struct variables and objects cannot be used in a G-expression. This limita-
tion does not apply to ST-expressions.
Note
RESTRICTION:
Parentheses are not allowed in a G-expression as they are used to denote comments in G-
Code. For the same reason function calls are not available. These limitations do not apply
Note to ST-expressions.
Embedded ST-Expression
<address>{<ST-Expression>}
The result of the ST-expression is used as the value of the word. It must be convertible to LReal. Basically,
an ST-expression is ST-Code that could be placed on the right hand side of an assignment. Other ST-Code
(e.g. an ST-statement) is not allowed. However, extensive computations can be encapsulated in an ST-
function that is then called in the ST-expression.
TIP:
An ST-expression should not have side effects, since the evaluation order of ST-expres-
sions is generally undefined and may change in the future. Besides, this style of program-
Note ming employing side effects is a bad programming style. For instance, an ST-expression
should not call a function that contains G-Code.
Example:
• The following GST-program starts with a line of G-code that moves the tool rapidly to the origin.
• The line is followed by a line of ST-code that declares variable ‘i’. The ST-mode is entered by the
prefixed exclamation mark (‘!’). After this line G-code mode resumes.
• The G-code in line 3 moves the tool down.
• Lines 4 to 8 define a block of ST-code that contains a FOR-loop. The code in this block is interpreted as
ST-code, except for the G-code line in line 6. This line of G-code uses a G-expression to set the X-axis
to 10*i. The value of the Y-axis is defined using an ST-expression that is enclosed in curly braces.
This expression evaluates to 0 if ‘i’ is even and to 10 otherwise.
• The programmed path of the program is shown in Figure “ExampleExpressions”.
G00 X0 Y0 Z0
! VAR i : INT; END_VAR
G01 Z-1
{
FOR i := 1 TO 5 DO
!G01 X=i*10 Y{ (i MOD 2) *10 }
END_FOR;
}
Y
20
10
-10 X
-10 0 10 20 30 40 50 60
Figure “ExampleExpressions”.
The execution of a G-Code block can be suppressed conditionally. If ‘/<n>’ is prefixed and the n-th bit in an
internal disable mask is set, the block is suppressed (not executed). The disable mask can be set by the
PLC and by the ST-function disableMaskSet. If n is omitted, it has 0 value by default. [See section
Suppression of G-Code Blocks [} 74].]
3.4.1 Comments
Text that is enclosed in round parentheses is treated as comment in G-Code (according to DIN 66025). The
comment must not include further parentheses.
Example:
Line Comment
<g-code> // <comment>
Text between ‘//’ and the end of line is treated as a comment in G-Code.
Example:
3.4.2 Codes
D<v>
Select tool v. The new tool applies to its own block and all succeeding blocks until a new tool is selected.
Tool 0 is special. Its selection deactivates any tool compensation. Tool 0 can be regarded as tool where all
tool parameters are set to zero. It is selected by default.
Example:
In the following example tool 1 is defined to have a Y-offset of 10 and tool 2 to have an Y-offset of 20. Block
N10 and block N50 use tool 0. Tool 1 applies to block N20 and to block N30. In block N40 tool 2 is active.
Figure “ExampleD” shows the resulting programmed path (dotted line) and the resulting tool center point
path (solid line).
!toolSet(index:=1, nr:=1, offsetY:=10);
!toolSet(index:=2, nr:=2, offsetY:=20);
N10 G01 X10 Y0 F6000
N20 G01 X20 Y0 D1
N30 G01 X30 Y0
N40 G01 X40 Y0 D2
N50 G01 X50 Y0 D0
Y
20
10
-10 X
-10 0 10 20 30 40 50 60
Figure “ExampleD”.
F<v>
Set velocity to v. Applies to the current block and all succeeding blocks until a new velocity is programmed.
The unit for velocity selected currently is used. (See section unitVelocitySet [} 77] for details.) The default
velocity is 0.
NOTE:
The velocity must be set to a nonzero value before a movement is programmed. Otherwise,
an error is issued.
Note
Example:
The first two segments N10 and N20 are processed with a velocity of 6000 mm/min, and the last segment
N30 is processed with a velocity of 3000 mm/min.
N10 G01 X100 F6000
N20 G01 X200
N30 G01 X300 F3000
G00
Set the interpolation mode to “rapid, linear”. The interpolation mode applies to this block and all succeeding
blocks until it is reset by G01, G02 or G03. G00 is the default interpolation mode.
If G00 is active, programming of a point (see X) will result in a linear geometry segment that is processed
with maximum velocity. The programmed velocity is not considered. G00 is typically used to position the tool.
For machining G01 should be used, which considers the programmed velocity.
NOTE:
G01, G02, G03, G04, G58 and G59 are mutually exclusive. They must not be programmed
in a common block.
Note
Example:
The resulting path of the following example is shown in Figure “ExampleG00”. The first block N10 rapidly
moves the tool to position X20, Y10, Z30. The resulting geometry segment is a line in space. The orientation
remains unchanged. The second block N20 performs a rapid movement to X50, Y10, Z30. There is no need
to denote G00 in this line, since interpolation is modal.
N10 G00 X20 Y10 Z30
N20 X50
Y
20
Z=30 rapid Z=30
rapid
10
Z=0
0
-10 X
-10 0 10 20 30 40 50 60
Figure “ExampleG00”.
G01
Set the interpolation mode to “linear”. This interpolation mode is like G00, except that the path is machined
with the programmed velocity. (See F.) The interpolation mode applies to this block and all succeeding
blocks until it is reset by G00, G02 or G03.
G02
Set the interpolation mode to “circular/helical, clockwise”. The interpolation mode applies to this block and all
succeeding blocks until it is reset by G00, G01 or G03. If G02 is active, programming of a point will result in a
circular (or helical) arc that is machined with the current velocity. (See F [} 34].) In the following, a circular arc
is regarded. The helical arc is covered later.
A circular arc starts at the current point and ends at the programmed point. It rotates around the working-
plane normal (PCS, i.e. program coordinate system) in the center point. The center point can be defined
using Centerpoint Programming [} 35] or using Radius Programming [} 36].
Centerpoint Programming
For Centerpoint Programming the center is defined relative to the starting-point using the I,J,K parameters.
The center point is the sum of the starting-point and the vector [I,J,K]. The I,J,K parameters are
optional and have 0 value by default. If the starting-point and the endpoint are equal with respect to the
workingplane, a full circle will be emitted.
CONSTRAINT:
The radius at the starting-point and at the endpoint must be equal. However, small devia-
tions are allowed and corrected automatically. (See centerpointCorrectionSet [} 69].)
Note
CONSTRAINT:
The center point must not be equal to the starting-point or endpoint.
Note
Radius Programming
For Radius Programming the center point is derived from the radius that is given by the U parameter.
Typically, there are two arcs of a given radius that lead from the starting-point to the endpoint. If the radius is
positive, the shorter one is used, otherwise the longer one is chosen. Apart from that, the absolute value of
the radius is regarded by the interpreter.
CONSTRAINT:
Radius Programming can by its nature not be used to program a full circle. This curvature
can be programmed by Centerpoint Programming.
Note
CONSTRAINT:
The radius must not be zero.
Note
CONSTRAINT:
The radius must not be smaller than half of the distance between starting-point and end-
point with respect to the workingplane.
Note
Helical
If the starting-point and endpoint do not lie in a plane that is parallel to the workingplane, a helical movement
is performed.
TIP: moveCircle3D
The ST-function moveCircle3D is a more powerful way to define a circle or helix. It covers
3D-arcs and multiturn circles.
Note
Example:
The following example results in the path that is shown in Figure “ExampleG00G02”. The block N10 uses
Radius Programming to define a clockwise arc from X0 Y0 to X10 Y10 with radius 10. Because the radius is
positive, the center point c1 of the shorter arc is chosen. In block N30 the center point c2 of the longer arc is
used because the radius is negative. The block N50 uses Centerpoint Programming, where the center
c3=[60,0,0] is the sum of the starting-point [50,0,0] and [I,J,K]=[10,0,0]. The block N70 defines
a full circle with center point C04 because the starting-point and endpoint are equal. The block N90 defines a
helical arc with center point C05 and height 30 (in Z-direction).
N10 G02 X10 Y10 U10
N20 G00 X30 Y0
N30 G02 X40 Y10 U-10
N40 G00 X50 Y0
N50 G02 X60 Y10 I10
N60 G00 X80 Y0
N70 G02 J10
N80 G00 X110 Y0
N90 G02 J10 X120 Y10 Z30
Z=20
Y
20
Z=10
10
c2 c4 c5 Z=30
0
c1 c3 Z=0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100 110 120 130
Figure “ExampleG00G02”.
G03
Set the interpolation mode to “circular/ helical, counterclockwise”. This interpolation behaves similar to G02.
The interpolation mode applies to this block and all succeeding blocks until it is reset by G00, G01 or G02.
G04
Suspend machining for a given duration. The duration is defined by either X or F in the current time unit.
(See unit for details.)
Example:
The following example assumes that the current time unit is set to seconds. On one execution of the
program the machine moves to X10, waits for 1.5 seconds and then moves to X20.
N10 G01 X10
N20 G04 F1.5
N30 G01 X20
G09
G17
Select XY-plane as workingplane, i.e. the workingplane normal is set to [0,0,1]. See workingplaneSet(…)
for details. This workingplane is the default workingplane.
G18
Select ZX-plane as workingplane, i.e. the workingplane normal is set to [0,1,0]. See workingplaneSet(…)
for details.
G19
Select YZ-plane as workingplane, i.e. the workingplane normal is set to [1,0,0]. See
GST_WorkingplaneSet for details.
G40
Deactivate Tool Radius Compensation (TRC). G40 is equivalent to an invocation of trcSet(…) where the
normal vector is set to the zero vector. See trcSet(…) for details.
G41
Activate tool radius compensation (TRC). After activation the programmed path is shifted left by the radius of
the currently selected tool. (See D [} 34].)
NOTE:
On activation, a tool with a nonzero index must be selected.
Note
Example:
The following example demonstrates the activation and deactivation of tool radius compensation. The
programmed path (dotted line) and the compensated path (solid/ dashed line) are shown in
Figure “ExampleG40G41”.
• The first line of the GST program sets the offset parameter to 5 mm. Therefore, the adjacent
segments of a gap are extended by 5 mm. The remaining gap is closed by a circular arc.
• The second line defines the approach and depart behavior to use a circular arc with a radius of 5 mm
and an angle of 90 degree.
• The third line defines tool 1 to have a radius of 10.
• Block N10 describes a linear movement to [10,0,0].
• The next block N20 selects tool 1 and activates tool radius compensation, where D1 comes into effect
before G40 is processed and G40 is active before X20 is processed. Therefore, the end of segment
N20 is subject to TRC (tool radius compensation). The linear movement from the end of segment N10
to the end of segment N20 in the programmed path is substituted by an approach-segment (dotted
line) from the end of N10 to the end of N20' in the compensated path.
• In the next three lines a linear movement along N30, N40 and N50 is programmed. Since segment N40
would result in a collision, it is eliminated from the compensated path.
• In the next line a circular arc along N60 is programmed. The gap between the end of N50' and the
beginning of N60' is closed as described earlier.
• The line along N70 is the last segment that is subject to TRC (tool radius compensation), since its
deactivation becomes active before the end of N80. The line along N80 is replaced by the depart-
segment N80', similarly to the approach-segment.
!trcOffsetSet(offset:=5);
!trcApproachDepartSet(approachRadius:=5, approachAngle:=90, departRadius:=5, departAngle:=90);
!toolSet(index:=1, tooltype:=tooltypeMill, radius:=10);
N10 G01 X10
N20 X20 G41 D1
N30 X35
N40 X40
N50 Y20
N60 G02 X50 Y10 U10
N70 G01 X70
N80 X80 Y0 G40
N90 X90
Y gap N50''
30
N60'
N80'
20
approach N70' depart
N50' N60
N70
10 N50
N20' N30'
Figure “ExampleG40G41”.
G42
This function is the same as G41, except that the path is shifted to the right. The invocation of trcSet(…) is
the same, except that the workingplane-normal is not negated. See G41 [} 38] and trcSet(…) for details.
G53
Deactivate any zero offset shift translation. This adjustment is the default. The deactivation becomes active
also for the current block. See sections Zero Offset Shift [} 75] and G58, G59 [} 39] for details.
G54..G57
Activates the translation that is associated with the given G-Code (TZ54…TZ57). Also activates the
translations of G58 and G59. The translations apply to the current block and all succeeding blocks until
changed. See section Zero Offset Shift [} 75] for details.
G58, G59
Set the translation that is associated with the given G-Code. The new translation value is given by the
parameters X,Y,Z, which are mandatory. By default, the associated translations are zero. See section Zero
Offset Shift [} 75] for details.
Example:
The resulting MCS (machine coordinate system) path and the applied translations of this example are shown
in Figure “ExampleG54G58G59”.
• The first line sets the translation that is associated with G54 to [0,5,0].
• The next line sets the programmed translation of G58 to [0,10,0]. Since zero-offset-shifts are still
disabled (default G53), the PCS (program coordinate system) and MCS (machine coordinate system)
match.
• Accordingly, the block N20 results in a linear movement from MCS (machine coordinate system)
coordinate [0,0,0] to [20,0,0].
• The next line activates G54 and programs a linear movement along N30, whereby G54 becomes active
before the movement. The programmed PCS (program coordinate system) coordinate [40,0,0] is
mapped to the MCS (machine coordinate system) coordinate [40,15,0].
• The next line sets the programmed transformation G59 to [0,5,0]. Thereby, the effective translation
changes from [0,15,0] to [0,20,0]. Since the current MCS (machine coordinate system)
coordinate must not be affected by this change, the current PCS (program coordinate system)
coordinate is set to [40,-5,0], implicitly.
• The succeeding ST-function frameGet stores these coordinates in [pcsX,pcsY,pcsZ].
• The next line merely programs the X-coordinate of the end of segment N50. Therefore, the PCS
(program coordinate system) coordinate of the end of segment N50 is [60,-5,0], which is mapped to
the MCS (machine coordinate system) coordinate [60,15,0]. In other words: The translation G59 is
active, but does not become apparent due to the adaption of the current PCS (program coordinate
system) coordinate. (See section Applying Transformations [} 82] for details.)
• It becomes apparent by the last line, which sets the PCS (program coordinate system) coordinate of
the end of segment N60 to [80,0,0]. This coordinate is mapped to the MCS (machine coordinate
system) coordinate [80,20,0].
!zeroOffsetShiftSet(g:=54, x:=0, y:=5, z:=0);
N10 G58 X0 Y10 Z0
N20 G01 X20 Y0
N30 G54 X40 Y0
N40 G59 X0 Y5 Z0
!VAR pcsX, pcsY, pcsZ : LREAL; END_VAR
!frameGet(x=>pcsX, y=>pcsY, z=>pcsZ);
N50 X60
N60 X80 Y0
Y
30
20 N60
N50 G59
10 N30 G59
G58 G58
0 G54 G58 G54
N20 G54
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleG54G58G59”.
G60
G70
Set the unit for lengths to inch. The new unit also applies to the current block. G70 is equivalent to the call
unitLengthSet(unitLengthInch). The unit for velocity is not affected. See UnitLength [} 77] and G71
[} 40] for details.
G71
Set the unit for lengths to millimeter. The new unit also applies to the current block. G71 is equivalent to the
call unitLengthSet(unitLengthMillimeter). The unit for velocity is not affected. See UnitLength
[} 77] for details.
Example:
In Figure “ExampleG70G71” the path of the following example is shown, which uses the unit millimeter.
• The first line of the program sets the unit for lengths to inch. This unit is used in the same line to
interprete X2 in inch. Thus, the path N10 ends at position [50.8 mm, 0 mm, 0 mm].
• Accordingly, the next line moves the tool along N20 towards [50.8 mm, 25.4 mm, 0 mm].
• The last line sets the unit to millimeter. Therefore, the path N30 ends at position [80 mm, 25.4 mm,
0 mm]. Accordingly, the segment N30 is a horizontal line.
N10 G01 X2 G70
N20 G01 Y1
N30 G01 X80 Y25.4 G71
Y [mm]
30
N30
20
N20
10
0
N10
-10 X [mm]
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleG70G71”.
G90
Switches to absolute coordinates. X, Y, Z are interpreted as absolute PCS (program coordinate system)
coordinates. This adjustment is the default. The switch becomes active in its own block. See G91 [} 41] for
details.
G91
Switches to relative coordinates. X, Y, Z are interpreted to be relative to the current point, i.e. the next point is
computed as the sum of [X,Y,Z] and the current point. The switch has an effect for its own block.
Example:
The path of the following example is shown in Figure “ExampleG90G91”. The switch to G90/ G91 takes effect
immediately.
N10 G90 G01 X10 Y20
N20 X20 Y10
N30 G91 X10 Y10
N40 X10 Y-10
N50 G90 X50 Y20
Y
20
10
G91 G90
G90
0
-10 X
-10 0 10 20 30 40 50 60
Figure “ExampleG90G91”.
G700
Like G70, but also applies to the interpretation of velocity. The new unit comes into effect in the current block.
G700 is equivalent to the calls unitLengthSet(unitLengthInch) and
unitVelocitySet(unitLengthInch,unitTimeMinute). See G710 [} 42] for an example.
G710
Like G71, but also applies to the interpretation of velocity. The new unit comes into effect in the current block.
G710 is equivalent to the calls unitLengthSet(unitLengthMillimeter) and
unitVelocitySet(unitLengthMillimeter,unitTimeMinute).
Example:
Y [mm]
30
F=50 in/min
20
N10 N20 N30
10
F=100 in/min F=1000 mm/min
0
-10 X [mm]
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleG700G710”.
IJK
Defines the center point for circular movements. See G02 [} 35], G03 [} 37] for details. The center point is
defined as currentPoint + [vx,vy,vz]. The current length unit is used for vx, vy, vz. The parameters
I, J, K are optional and have a 0 default value. The I parameter is also used by G4 to define a duration.
M<v>
Triggers the M-function v. The timing and behavior depends on the definition of v in the System Manager of
TwinCAT.
M2 and M30 are internally defined. Both functions trigger a synchronization with the NC-channel. (See wait
[} 71]-function.) Both functions stop the execution of the GST-program. Due to this order the interpreter
waits for the completion of the NC-channel before it stops.
NOTE:
There must not be more than one M-function of type handshake in a block.
Note
NOTE:
The M-functions M2 and M30 do not have to be defined by the user in the System Manager
of TwinCAT.
Note
Example:
Figure “ExampleM10M11M12M20M21” visualizes the programmed path and the activation of M-functions.
The fast M-functions M10, M11 are reset by M12, which itself is reset automatically.
N10 X10 G01
N20 X30 M10 M20
N30 X50 M11 M21
N40 X70
N50 X90 M12
M10
M11
M12
M20
M21
Y 10
Figure “ExampleM10M11M12M20M21”.
P<v>
Switch tool orientation. The value of v must be 1 or -1. If v is negative, the tool points in the direction of the
working plane normal. Otherwise, it points into the opposite direction.
Example:
The resulting MCS-path (MCS: machine coordinate system) of the following example is shown in
Figure “ExampleP”. The first line of the program defines Tool 1 to have a length of 10. G18 activates the XZ-
workingplane.
N10: The end of segment N10 is not subject to any tool compensation as D0 is active.
N20: For segment N20 tool 1 is active with a positive tool orientation. To compensate the
tool length the translation [0,10,0] is applied. (See section Transformations [} 80]
for details.) Thereby, the PCS (program coordinate system) endpoint [20,10,0] of
N20 is mapped to the MCS (machine coordinate system) endpoint [20,20,0]. The
MCS (machine coordinate system) point and the applied transformation are shown in
Figure “ExampleP”.
N30: In block N30 the tool orientation is switched, which sets the translation to [0,-10,0].
This translation is applied to the PCS (program coordinate system) endpoint of N30
resulting in the MCS (machine coordinate system) endpoint [30,0,0].
N20..N90: The blocks N60..N90 are similar to N20..N50, except that the Y-coordinate is not
programmed. Therefore, the tool length compensation does not become apparent,
although it is active. That behavior happens because the current PCS (program
coordinate system) point is always adapted on a changed transformation. (See section
Applying Transformations [} 82] for details.)
Y
30
20
N20 N30 N50
10
N10 N60 N70 N80 N90
N40
0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleP”.
Q<i>=<v>
Set the value of axis Q<i> to v where i must lie in the range 1 to 5. The Q-axes use linear interpolation.
NOTE:
The address letters Q and R are handled in a special way for historical reasons.
Note
CONSTRAINT:
The address Q<i> has to be followed by a G-expression or by an ST-expression. The G-
word Q1100 is invalid. Use Q1=100, instead.
Note
Example:
The path of the following example is shown in Figure “ExampleQ”. The Q-axes are interpolated linear with the
interpolation of a movement. The last block (N40) results in a linear interpolation of a Q-axis without a
concurrent movement.
N10 G01 X30 Y0 Q1=100 F6000
N20 G02 X50 Y20 I20 Q2=200
N30 G01 X60 Q1=300 Q2=300
N40 Q1=0
Y
30
_Q1=100, _Q2=200 _Q1=300, _Q2=300
N30 N40
20
N20 _Q1=100, _Q2=100 _Q1=0, _Q2=300
10
_Q1=0, _Q2=0
_Q1=100, _Q2=0
N10
0
_Q1=50, _Q2=0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleQ”.
N<v>
Set the block number to v. Typically, the block number is used to monitor the progress of the NC-program.
U<v>
In the context of G2 or G3 the radius is set to |v|. The current length unit is used for v. If v is positive, the
shorter arc is used to interpolate between the current and the next point. If v is negative, the longer one is
used. See G02 [} 35], G03 [} 37] for details.
X<v>
Sets the X-coordinate of the next point to v. The current length unit is used for v.
Y<v>
Sets the Y-coordinate of the next point to v. The current length unit is used for v.
Z<v>
Sets the Z-coordinate of the next point to v. The current length unit is used for v.
A<v>
Sets the A-angle of the next orientation to v. The current angle unit is used for v.
B<v>
Sets the B-angle of the next orientation to v. For v the current angle unit is used.
C<v>
Sets the C-angle of the next orientation to v. For v the current angle unit is used.
F* Set velocity.
The first step sets up the reference system. The second step configures following movements. Note that the
second step may depend on the first one. E.g. the programmed velocity (F) considers a velocity unit (G700)
that is programmed in the same block. Step three and the following steps perform actions like a movement.
3.5.1 Comments
Line Comment
<st-code> // <comment>
Text between ‘//’ and the end of line is treated as comment in ST-Code.
Example:
{
VAR
i : INT; // this variable is primarily used in FOR-loops for counting
END_VAR
}
/* */ Comment
<st-code> /* <comment>
<comment> */ <st-code>
Text between ‘/*’ and ‘*/’ is treated as comment in ST. This type of comment may be nested up to a depth
of 3. The ‘/*…*/’-style comment may appear anywhere between literals, keywords, identifiers and special
symbols. It may also contain G-Code lines.
Example:
The following example demonstrates the notation of comments in ST-Code. The first comment is placed
within a variable declaration. The second comment encloses an entire ST-loop. The comment contains
further comments and a G-Code line, which itself contains a G-Code comment.
{
VAR i /* used for counting */ : INT; END_VAR
(* *) Comment
<st-code> (* <comment>
<comment> *) <st-code>
Text between ‘(*’ and ‘*)’ is treated as comment in ST. This type of comment may be nested up to a depth
of 3. It is similar to the /*…*/-style comment.
3.5.2 Literals
Integer Literals
Decimal 18
Binary 2#10010
Octal 8#22
Hexadecimal 16#12
The same integer value in decimal, binary, octal and hexadecimal notation.
Real Literals
1.0
1.602E-19
Boolean Literals
TRUE
FALSE
Typed Literals
<typename>#<literal>
Typed literals where typename is a native type (e.g. Word or LReal) or an enumeration type (to avoid
ambiguities).
Typing of literals is typically not necessary in GST, since the interpreter implements a decent typesystem that
handles untyped literals properly. There are a few exceptions where the type of a literal is significant for
semantics, like in the following example.
Example:
The first assignment assigns the value 16#80 to w, whereas the second one assigns the value 16#8000 to
w.
{
VAR w: word; END_VAR
w := ror(BYTE#1,1);
w := ror(WORD#1,1);
}
String Literals
"abc"
'abc'
Notation of a 2-byte and a 1-byte string, respectively. Note that there is no implicit conversion between both
types. The following escape-sequences can be used within both types of literals:
$L line feed
$N newline
$P form feed
$R carriage return
$t tab
Duration Literals
T#[+/-]<value><unit>[…]<value><unit>
TIME#[+/-] <value><unit>[…]<value><unit>
LT#[+/-]<value><unit>[…]<value><unit>
LTIME#[+/-]<value><unit>[…]<value><unit>
Time literals of type TIME or LTIME. The literal consists of an optional sign (+/-) and a sequence of value/
unit pairs. Value must be an integer, except for the last one that may also be a floating point number.
Values must not be negative and may be arbitraryly large. Units must appear in the following order.
d day
h hour
m minute
s second
ms millisecond
us microsecond
ns nanosecond
An arbitrary subset of units may be used in a literal. For instance, the literal T#1d15ms1500.01us is valid.
Date Literals
DATE#<yyyy>-<mm>-<dd>
D#<yyyy>-<mm>-<dd>
LDATE#<yyyy>-<mm>-<dd>
LD#<yyyy>-<mm>-<dd>
Date literal of type DATE or LDATE. The literal is interpreted as UTC, i.e. timezone, daylight saving time and
leap seconds are not considered. The year must not be smaller than 1970. The values yyyy, mm and dd
have to be integer values, i.e. D#1980-20-10 is a valid date literal, for example.
Time-of-Day Literals
TIME_OF_DAY#<hh>:<mm>:<ss>
TOD#<hh>:<mm>:<ss>
LTIME_OF_DAY#<hh>:<mm>:<ss>
LTOD#<hh>:<mm>:<ss>
Time-of-day literal of type TOD or LTOD. The literal is interpreted as UTC, i.e. timezone, daylight saving time
and leap seconds are not considered. hh and mm must be integer values. ss may be an integer or a
floatingpoint number, i.e. TOD#7:30:3.1415 is a valid literal, for example.
Date-and-Time Literals
DATE_AND_TIME#<yyyy>-<mm>-<dd>-<hh>:<mm>:<ss>
DT#<yyyy>-<mm>-<dd>-<hh>:<mm>:<ss>
LDATE_AND_TIME#<yyyy>-<mm>-<dd>-<hh>:<mm>:<ss>
LDT#<yyyy>-<mm>-<dd>-<hh>:<mm>:<ss>
Date-and-time literal of type DT or LDT. The literal is interpreted as UTC, i.e. timezone, daylight saving time
and leap seconds are not considered. This literal is a combination of the date literal and the time-of-day
literal. Analogously, the corresponding rules for these two parts apply.
Bitstring Types
Bitstring types of 1, 8, 16, 32 and 64 bit. Implicit conversion from left to right using zero extension.
Unsigned integer types of 8, 16, 32 and 64 bit. Implicit conversion from left to right preserving the value.
Signed integer types of 8, 16, 32 and 64 bit. Implicit conversion from left to right preserving the value. An
unsigned type of n bit is also implicitly converted to a signed type of m bit where the relation m > n must
hold. There is no implicit conversion between bitstring types and integer types.
String Types
string[<length>]
wstring[<length>]
1-byte and 2-byte strings of given length. If length is omitted, it has 255 as default value.
Character Types
char
wchar
Single 1-byte and 2-byte character of a string. It can be implicitly converted to a string.
Time-Related Types
TIME, LTIME
DATE, LDATE
Datatypes for duration, date and time. Internally, all values of these types are represented with a granularity
of 1 nanosecond. Values of date-related types represent the number of nanoseconds since 1.1.1970
(UTC). Leapseconds are ignored. Implicit conversion is allowed from a non-L type to an L type, e.g. from
TIME to LTIME.
Derived Types
TYPE
END_TYPE
Definition of a new type as an alias to an existing type. The default value is optional.
Enumeration Types
TYPE
END_TYPE
TYPE
END_TYPE
Definition of an enumeration type with user-defined values for each element. The default value is optional.
Array Types
TYPE
END_TYPE
Definition of an array type. The array may be multi-dimensional. The index range is defined for each
dimension. At runtime the boundaries of the array are checked. A boundary violation leads to a runtime-
error. The default values are defined in ascending order starting with the last dimension. A value can be
repeated by placing it into parentheses prefixed with the number of repetitions. If the number of defined
default values does not match the array size, initialization is truncated or padded with the default value of the
element type. In either cases a compile-time warning is issued.
Structure Types
TYPE
<typeName>: STRUCT
<memberName>: memberType;
END_TYPE
Defines a structure type of the given members. Currently, the default value is placed after the type definition.
This positional style is a difference to the ST-standard.
Pointer Types
TYPE
END_TYPE
IF-THEN-ELSIF-ELSE
IF <condition> THEN
<statements>
<statements>
ELSE
<statements>
END_IF;
Conditional statement. The ELSIF-branch and ELSE-branch are optional. ELSIF can be repeated arbitrarily.
CASE OF
CASE <expression> OF
ELSE
<statements>
END_CASE;
The case-list consists of a comma-separated sequence of values or ranges. Only the first matching case is
executed. The optional ELSE-branch is executed if no case matches.
FOR
<statements>
END_FOR;
Iterates over the given variable in the defined range (including) using the supplied step-size. If the latter is
omitted, it has 1 as default value.
WHILE
WHILE <condition> DO
<statements>
END_WHILE;
Pre-checked loop.
REPEAT
REPEAT
<statement>
UNTIL <condition>
END_REPEAT;
Post-checked loop. The break condition is evaluated after performing the <statements> the loop includes.
EXIT
EXIT;
EXIT can be used within loops to leave the loop. If loops are nested, only the innermost loop is left. If there
is no loop surrounding the EXIT keyword, a compile-time error is issued.
Function Definition
VAR_INPUT
<variable declarations>
END_VAR
VAR_OUTPUT
<variable declarations>
END_VAR
VAR_IN_OUT
<variable declarations>
END_VAR
VAR
<variable declarations>
END_VAR
VAR_EXTERNAL
<variable declarations>
END_VAR
<statements>
END_FUNCTION
Declares a function. Thereafter, it is callable by its name. The declaration of the return type is optional. If it is
supplied, the function returns a value of the given type. The return value is defined within the function body
by an assignment to the function name.
The function may have input, output and in-out parameters. The order of declaration is significant. It is used
for nonformal calls. Declared variables are only used within the function body. External variables are
imported from global scope. Variables and parameters are not persistent, i.e. they do not retain their value
between two calls. A function may call itself (recursion).
<functionname>(<expression>, …, <expression>)
Nonformal function call. The order of expressions must match the number and order of declared parameters.
<functionname>(
<inputParamName> := <expression>,
<inputParamName> := <variableName>)
Formal function call. Parameters are identified by their name. If a declared parameter is not listed, it is
implicitly set to its default value.
<nativeType>_to_<nativeType>(x)
to_<nativeType>(x)
Explicit conversion between the given native types. The second alternative is overloaded for any applicable
type.
ABS
ABS(x)
The function is overloaded for any integer type and floatingpoint type. The type of x is used as return type.
SQRT
SQRT(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
RESTRICTION:
Variable x must not be negative.
Note
LN
LN(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
RESTRICTION:
Variable x must be larger than 0.
Note
LOG
LOG(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
RESTRICTION:
Variable x must be larger than 0.
Note
EXP
EXP(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
SIN
SIN(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
COS
COS(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
TAN
TAN(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
ASIN
ASIN(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
RESTRICTION:
Variable x must lie within the interval [-1,1].
Note
ACOS
ACOS(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
RESTRICTION:
Variable x must lie within the interval [-1,1].
Note
ATAN
ATAN(x)
The function is overloaded for any floatingpoint type. The type of x is used as return type.
ATAN2
ATAN2(y,x)
Returns the arc tangent of y/x within the interval [-PI,PI] radians.
The function is overloaded for any floatingpoint type. The smallest common type of x and y is used as return
type.
ADD
ADD(x1, x2, …)
Returns the sum of all parameters. The ADD-function can have an arbitrary number of parameters, but has to
have at least one.
The function is overloaded for any integer and floatingpoint type. The smallest common type of all
parameters is used as return type.
MUL
MUL(x1, x2, …)
Returns the product of all parameters. The MUL-function can have an arbitrary number of parameters, but
has to have at least one. The infix-operator ‘*’ can be used as an alternative.
The function is overloaded for any integer and floatingpoint type. The smallest common type of all
parameters is used as return type.
SUB
SUB(x,y)
Returns the difference x-y. The infix-operator ‘-’ can be used as an alternative.
The function is overloaded for any integer and floatingpoint type. The smallest common type of x and y is
used as return type.
DIV
DIV(x,y)
Returns the quotient x/y. The infix-operator '/' can be used as an alternative.
The function is overloaded for any integer and floatingpoint type. The smallest common type of x and y is
used as return type. If the return type is an integer type, the result is truncated towards zero.
RESTRICTION:
Variable y must not be zero.
Note
MOD
MOD(x,y)
Returns the remainder of the integer division x/y. The infix-operator ‘MOD’ can be used as an alternative.
The function is overloaded for any integer type. The smallest common type of x and y is used as return type.
The result may also be negative. The equation x = MUL(DIV(x,y),y) + MOD(x,y) holds.
RESTRICTION:
Variable y must not be zero.
Note
EXPT
EXPT(x,y)
The function is overloaded such that x has a floatingpoint type and y has a floatingpoint type or integer type.
The type of x is used as return type, i.e. returned is a Real or an LReal floating point type. The infix-
operator ‘**’ can be used as an alternative.
RESTRICTION:
If x is negative, then y must be an integer.
Note
RESTRICTION:
If x is zero, then y must be larger than zero.
Note
SHL
SHL(x,y)
Returns the bitstring x shifted left by y bits. Zero-bits are inserted at the right side. The least significant bit is
assumed to be rightmost.
The function is overloaded for any bitstring type for x and any integer type for y. The type of x is used as
return type.
CONSTRAINT:
Variable y must not be negative.
Note
SHR
SHR(x,y)
Returns the bitstring x shifted right by y bits. Zero-bits are inserted at the left side. The least significant bit is
assumed to be rightmost.
The function is overloaded for any bitstring type for x and for any integer type for y. The type of x is used as
return type.
CONSTRAINT:
Variable y must not be negative.
Note
ROL
ROL(x,y)
Returns the bitstring x rotated left by y bits. Bits that are shifted out at the left side are inserted at the right
side. The least significant bit is assumed to be rightmost.
The function is overloaded for any bitstring type for x and for any integer type for y. The type of x is used as
return type.
CONSTRAINT:
Variable y must not be negative.
Note
ROR
ROR(x,y)
Returns the bitstring x rotated right by y bits. Bits that are shifted out at the right side are inserted at the left
side. The least significant bit is assumed to be rightmost.
The function is overloaded for any bitstring type for x and for any integer type for y. The type of x is used as
return type.
CONSTRAINT:
Variable y must not be negative.
Note
AND
AND(x1, x2, …)
Returns the bitwise Logical And of all parameters. Bit i is set in the result if bit i is set in all parameters. The
AND function can have an arbitrary number of parameters, but has to have at least one.
The function is overloaded for any bitstring type. The smallest common bitstring type is used as return type.
OR
OR(x1, x2, …)
Returns the bitwise Logical Or of all parameters. Bit i is set in the result if bit i is set in at least one of all
parameters. The OR function can have an arbitrary number of parameters, but has to have at least one.
The function is overloaded for any bitstring type. The smallest common bitstring type is used as return type.
XOR
XOR(x1, x2, …)
Returns the bitwise Logical Exclusive Or of all parameters. Bit i is set in the result if bit i is set in an uneven
number of all parameters. The XOR function can have an arbitrary number of parameters, but has to have at
least one.
The function is overloaded for any bitstring type. The smallest common bitstring type is used as return type.
NOT
NOT(x)
Returns the bitwise complement of x. Bit i is set in the result if bit i is not set in x.
The function is overloaded for any bitstring type. The type of x is used as return type.
SEL
SEL(cond,x1,x2)
MUX
Returns x<select>. If select is 0, x0 is returned. If select is 1, x1 is returned and so forth. The MUX
function can have an arbitrary number of parameters, but has to have at least two.
The function is overloaded for any type for x<i> and for any integer for select. The smallest common type
of x<i> is used as return type.
RESTRICTION:
The variable select must lie within the interval [0,N]. Otherwise, an out-of-bounds error
is issued at runtime.
Note
MAX
MAX(x1, x2, …)
The function is overloaded for any integer and floatingpoint type. The smallest common type of all
parameters is used as return type.
MIN
MIN(x1, x2, …)
The function is overloaded for any integer and floatingpoint type. The smallest common type of all
parameters is used as return type.
LIMIT
LIMIT(min,in,max)
Returns in if it lies in the interval [min,max]. Otherwise, the violated bound (min or max) is returned.
The function is overloaded for any integer and floatingpoint type. The smallest common type of all
parameters is used as return type.
CONSTRAINT:
The min boundary must be smaller than the max boundary.
Note
3.5.7.7 Comparison
GT
GT(x,y)
Returns TRUE if x is larger than y. The smallest common type of x and y is used to perform the comparison.
The function is overloaded for all integer and floatingpoint types. The returntype is BOOL.
GE
GE(x,y)
Returns TRUE if x is not smaller than y. The smallest common type of x and y is used to perform the
comparison.
The function is overloaded for all integer and floatingpoint types. The returntype is BOOL.
EQ
EQ(x,y)
Returns TRUE if x and y are equal. The smallest common type of x and y is used to perform the comparison.
The function is overloaded for all integer and floatingpoint types. The returntype is BOOL.
LE
LE(x,y)
Returns TRUE if x is not larger than y. The smallest common type of x and y is used to perform the
comparison.
The function is overloaded for all integer and floatingpoint types. The returntype is BOOL.
LT
LT(x,y)
Returns TRUE if x is smaller than y. The smallest common type of x and y is used to perform the
comparison.
The function is overloaded for all integer and floatingpoint types. The returntype is BOOL.
NE
NE(x,y)
Returns TRUE if x and y are not equal. The smallest common type of x and y is used to perform the
comparison.
The function is overloaded for all integer and floatingpoint types. The returntype is BOOL.
The toString-Function
Converts and concatenates the given arguments to one string. This string is limited to 255 characters, which
is the default string length. The toString-function behaves like the print function, except that it yields a
formatted string instead of printing.
NOTE:
The toString-function is especially useful to format a string for the msg(…)-function.
Note
Msg
msg(str:= String[81])
Send the given message to the message list of TwinCAT. The message is processed by the NC-channel
synchronously. It appears in the user-interface when all preceeding NC-commands are completed.
To send formatted strings this function can be combined with the toString-function.
NOTE:
The message is restricted to 81 characters. Text exceeding this restriction will be truncated.
Note
Example:
The path of the following example is shown in Figure “ExampleMsg”. It is annotated with the emitted
messages.
{
VAR
x,y,z: LREAL;
start: LDT;
END_VAR
Y
30
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleMsg”.
3.6.2 Transformations
transRotX/Y/Z
transRotX(angle:= LReal)
transRotY(angle:= LReal)
transRotZ(angle:= LReal)
Rotation around the respective axis by the given angle in the user-defined angle unit. The rotation is pushed
onto the stack of transformations. The angle value is interpreted using the current angle-unit. See section
Transformations [} 80] for details.
Example:
!transRotZ(45);
N30 G01 X30 Y0
!transPop();
!transPop();
Y
30
N30
20
N20
10
0
N10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransRotZ”.
transRotA
Rotate around vector [x,y,z] by the given angle. The rotation is pushed onto the stack of
transformations. The angle value is interpreted using the current angle-unit. See section Transformations
[} 80] for details.
NOTE:
The vector [x,y,z] must not be the zero vector.
Note
Example:
The resulting path of the following example is shown in Figure “ExampleTransRotA”. The first invocation of
transRotA rotates the PCS (program coordinate system) around the positive Z-axis (right-hand rule) by
45 degree. The second invocation rotates around the negative Z-axis by the same angle, i.e. into the
opposite direction. The combination of both rotations is the identity transformation.
!transRotA(0,0,1,45);
N10 G01 X30 Y0
!transRotA(0,0,-1,45);
N20 G01 X30 Y0
!transPop();
!transPop();
Y
30
20
N10 N20
10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransRotA”.
transMirrorX/Y/Z
transMirrorX()
transMirrorY()
transMirrorZ()
Mirror with respect to the X-direction, Y-direction or Z-direction relative to the origin of the current PCS
(program coordinate system). The transformation is pushed onto the stack of transformations.
NOTE:
The invocation of a mirror function switches the orientation of the coordinate system from
right-handed to left-handed or vice versa. Most notably, this behavior switches the rotation
Note direction of circles and the compensation direction of tool radius compensation. By default,
the coordinate system is right-handed.
Example:
The resulting path of the following example is shown in Figure “ExampleTransMirrorX”. The PCS (program
coordinate system) is mirrored along the X-dimension. Thereby, the coordinate system becomes a left-
handed system, within which the rotation direction of G2 is (intentionally) swapped.
N10 G02 X20 Y20 U20
!transMirrorX();
N20 G02 X-40 Y0 U20
!transPop();
Y
30
20
N10
10
N20
0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransMirrorX”.
transScale
transScale(factor:= LReal)
Scales the coordinate system by the factor in the X-dimension, Y-dimension and Z-dimension. The
transformation is pushed onto the stack of transformations.
NOTE:
The factor must be nonzero.
Note
NOTE:
If the factor is negative, the coordinate system is effectively mirrored in the X-dimension, Y-
dimension and Z-dimension. Thus, the orientation of the coordinate system is swapped.
Note
Example:
The resulting path of the following example is shown in Figure “ExampleTransScale”. After scaling by a
factor of 2, the endpoint of segment N20 is mapped to [60,20,0].
N10 G01 X30 Y10
!transScale(2);
N20 G01 X30 Y10
!transPop();
Y
30
20
N20
10
N10
0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransScale”.
transTranslate
Translate by vector [x,y,z]. The translation is pushed onto the stack of transformations.
Example:
The resulting path of the following example is shown in Figure “ExampleTransTranslate”. After translating by
[40,20,0] the endpoint of segment N20 is mapped to [80,20,0].
N10 G01 X20 Y0
!transTranslate(40,20,0);
N20 G01 X40 Y0
!transPop();
Y
30
20
N20
10
0
N10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransTranslate”.
transPop
transPop()
Example:
The resulting path of the following example is shown in Figure “ExampleTransPop”. This example pushes
the translation [0,20,0] onto the stack, followed by the translation [0,10,0]. Thereby, the effective
translation for N30 is [0,30,0]. The invocation of transPop removes the translation [0,10,0] from the
stack. Thus, the endpoint of segment N40 is translated by [0,20,0]. After removing the last translation
from the stack the endpoint of segment N50 is not translated at all.
N10 G01 X10 Y0
!transTranslate(0,20,0);
N20 G01 X30 Y0
!transTranslate(0,10,0);
N30 G01 X50 Y0
!transPop();
N40 G01 X70 Y0
!transPop();
N50 G01 X90 Y0
Y
30
N30 N40
20
10 N20 N50
0
N10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransPop”.
transDepth
transDepth(): UInt
Yields the depth of the stack of transformations, i.e. the number of active transformations. See transRestore
[} 67] for more details.
transRestore
transRestore(depth:= UInt)
Reduces the stack of transformations to the given depth. This command is typically used in conjunction with
transDepth() to restore an earlier state of the stack.
NOTE:
The current depth of the stack must not be smaller than the given depth.
Note
Example:
Y
30 N40 N30
20
N50 N20
N60
10
N10
0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleTransDepthTransRestore”.
3.6.3 Movement
moveCircle3d
Move circular by rotating around the center cx,cy,cz and the normal vector nx,ny,nz by the given angle. If
height is nonzero, a helix is described. If angle is greater than a full circle, a multiturn circle or a multiturn
helix is described. The rotation is performed according to the right hand rule. Using a negative angle or
flipping the normal will reverse the direction of rotation. The angle value is interpreted using the current angle
unit. The parameters x, y, z, cx, cy, cz are interpreted using the current length unit.
NOTE:
The radius must be nonzero.
Note
Example:
The resulting path of the following example is shown in Figure “ExampleMoveCircle3D”. The invocation of
moveCircle3D describes a helical movement. It starts at the current point that is [40,10,0]. The center
axis of the helix is defined by the point [30,10,0] and direction [gSin(22.5),0,gCos(22.5)].
Compared to the workingplane normal [0,0,1] the axis is tilted by 22.5 degree in X-direction. The angle of
720+90 degree describes a multiturn helix. It exhibits a height of 30 with respect to the center axis. The
endpoint of the helix is not explicitly programmed to avoid redundancy. If the user requires these
coordinates, they can be retrieved by the frameGet(…) function, as demonstrated. The approximate
coordinates are shown in Figure “ExampleMoveCircle3D”.
{
VAR
x,y,z: LREAL;
END_VAR
Y
30
X=42.94...
Y=19.23...
20 Z=31.25...
10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleMoveCircle3D”.
centerpointCorrectionSet
centerpointCorrectionSet(on:= bool)
Activates the centerpoint correction for circles. The centerpoint correction will be used for circles that are
defined using centerpoint programming. See G02 [} 35] and G03 [} 37]. Due to inaccuracies (e.g. rounding
errors by the CAD program), the radius of the starting-point and endpoint with respect to the centerpoint may
differ. If centerpoint correction is active, the center will be moved in such a way that the starting-radius and
endradius are equal to their former average.
centerpointCorrectionLimitSet
centerpointCorrectionLimitSet(limit:= LReal)
Sets the precision limit for the centerpoint of circles. If the given limit is exceeded, a runtime error is reported.
The default limit value is 0.1 mm.
3.6.5 Tools
toolParamSet
Set a parameter of the tool tidx (1..255) to val. The parameter is identified by col (0..15).
COL DESCRIPTION
0 tool number
For giving the tool a number.
Written to the T-parameter in the cyclic channel interface.
2 length
Describes the length of e.g. the drill.
4 radius
8 x-shift
Cartesian tool displacement in x-direction.
9 y-shift
Cartesian tool displacement in y-direction.
10 z-shift
Cartesian tool displacement in z-direction.
toolParam
toolSet
Set all parameters of a tool. The index is used in D-words to refer to the tool. It must lie in the range 1 to 255.
The parameter nr has only informational purpose. Typically, it is a company internal number to identify a
certain tool. The parameter tooltype identifies the kind of tool, like a drill for instance. The remaining
parameters are dimensions, which are visualized in Figure “ToolSetDimensions”. If the tool orientation is
changed towards the negative (see P [} 43]-word), the value length+lengthAdd is implicitly negated. The
parameters length, radius, lengthAdd, radiusAdd, offsetX, offsetY and offsetZ are interpreted
using the current length unit.
Y offsetZ
offsetY
offsetX
X
length+lengthAdd
Tool
Z
radius+radiusAdd
Figure “ToolSetDimensions”.
Example:
The example defines tool 1 as a drill of total length 48.5 and tool 2 as a mill with a length of 30 and a
diameter of 5.
!toolSet(index:=1, nr:=4711, tooltype:=tooltypeDrill, length:=50, lengthAdd:=-1.5);
!toolSet(index:=2, nr:=10783, tooltype:=tooltypeMill, length:=30, radius:=2.5);
ToolType
3.6.6 Synchronization
sync
sync()
Synchronizes the interpreter with the associated NC-channel. The sync()-command blocks until all pending
NC-commands are completed, i.e. until the job-queue of the NC-channel is empty. This command replaces
the former @714-command. Oftentimes, the sync()-command is combined with a preceeding M-function of
type handshake. Then, the sync()-command will block until the M-function is acknowledged by the PLC.
wait
wait()
Waits for a GoAhead-signal from the PLC. The wait()-command blocks until this signal is received. This
command replaces the former @717-command. Compared to a combination of an M-function and sync(),
this kind of synchronization does not result in an empty job queue. Notably, an empty job queue forces the
machine to halt.
TIP:
The GoAhead-signal may be send from the PLC before the associated wait()-function is
called. In this case the wait()-function does not block.
Note
queryAxes
queryAxes()
Set the MCS (machine coordinate system) coordinates of the interpreter to the actual coordinates of the
physical axes. The MCS (machine coordinate system) coordinates are automatically translated to PCS (path
coordinate system) coordinates, which are exposed to the programmer. They may also be retrieved by
frameGet(…). A combination of sync() and queryAxes() replaces the former @716-command.
• The queryAxes()-command considers the path axes (X, Y, Z), as well as the auxiliary axes
(Q1..Q5).
NOTE:
The queryAxes()-command should be preceeded by sync() to avoid unexpected be-
havior.
Note
Example:
The resulting path of the following example is shown in Figure “ExampleQueryAxes”. The example assumes
M20 to be an M-function of type “handshake after”. The PLC is assumed to
• wait for M20,
• move the Y-axis to 20,
• wait for completion of the movement,
• acknowledge M20.
The interpreter sends the line segment N10 to the NC-channel followed by the M-function M20. Then the
invocation of sync() blocks. The NC-channel signals the M-function to the PLC after the line segment N10
has been processed. Then the PLC moves the tool from the end of segment N10 to the beginning of
segment N20 and acknowledges M20. The interpreter resumes operation and invokes queryAxes(), which
sets the internal “current point” to the endpoint of segment N10'. Therefore, the final block sends the line
segment N20 to the NC-channel.
N00
N10 G01 X40 M20
!sync();
!queryAxes();
N20 G01 X80
Y
30
N20
20
M20 acknowledged; axes queried
10 N10'
Performed by PLC
0
N10
M20 signaled to PLC
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleQueryAxes”.
frameGet
Store the current frame of the PCS (program coordinate system) in x, y, z and a, b, c.
Example:
The output of the following example is shown below. The G-Code in the example performs a linear
movement to the PCS (program coordinate system) point [10,20,30]. Then these coordinates are stored
in curX, curY, curZ by frameGet(…). The translation [1,2,3] that is pushed onto the transformation-
stack leads to an adaption of the current PCS (program coordinate system) point such that the MCS
(machine coordinate system) point [10,20,30] remains unchanged. Therefore, the subsequent call of
frameGet(…) retrieves the PCS (program coordinate system) point [9,18,27].
{
VAR
curX, curY, curZ : LREAL;
END_VAR
transTranslate(1,2,3);
frameGet(x=>curX, y=>curY, z=>curZ);
MSG(toString(curX,' ',curY,' ',curZ,''));
}
Output:
10.000000 20.000000 30.000000
9.000000 18.000000 27.000000
qAxisGet
Store the current values of Q-axes in q1 to q5. The Q-axes are the auxiliary axes.
trcApproachDepartSet
Configures the approach and depart behavior to use an arc of given radius and angle. If the product of radius
and angle are zero, no approach or depart segment will be inserted.
trcOffsetSet
trcOffsetSet(offset:= LReal)
Configures the amount of segment extension that is used to close gaps. If offset is zero, no extension will
be performed.
trcLimitSet
trcLimitSet(limit:= LReal)
trcParam
trcParam(): TrcParamType
trcParamSet
trcParamSet(param:= TrcParamType)
Configures the tool radius compensation. This function is an alternative that summarizes
trcApproachDepartSet, trcOffsetSet and trcLimitSet. It can be used in combination with
trcParam to load, save and restore different TRC (tool radius compensation) configurations efficiently.
TrcParamType
TrcParamType
This structure contains all configuration parameters of the tool radius compensation. It consists of the
following parameters.
approachradius: LREAL;
approachangle: LREAL;
departRadius: LREAL;
departAngle: LREAL;
offset: LREAL;
limit: LREAL;
See trcApproachDepartSet [} 73], trcOffsetSet [} 73], trcLimitSet [} 74] for a comprehensive description of
the listed parameters.
collisionElimination
Activates collision elimination with respect to the plane of the normal vector nx, ny, nz. Collisions within the
projection of the path onto the plane are eliminated. Supplying a zero vector deactivates collision elimination.
The limit parameter can be used to restrict elimination to the last n segments. By default, elimination is
unlimited.
collisionEliminationFlush
collisionEliminationFlush()
This function can be called during active collision elimination to ignore any conflicts between the path
preceeding the call and the path succeeding the call.
disableMask
disableMask():= LWord
Yields the current value of the disable mask. Note that the mask may also be set by the PLC. See
disableMaskSet [} 75] for details.
disableMaskSet
disableMaskSet(mask:= LWord)
Sets the internal disable mask to the given value. The mask is used to suppress execution of G-Code blocks.
The disable mask has 0 default value, i.e. no suppression is active by default. The mask consists of 64 bits.
In a binary notation like 2#1101 bits are numbered from right to left, starting with bit 0. For the value 2#1101
the bits 0, 2 and 3 are set by value one. The remaining bits are not set by exhibiting zero value.
Example:
The resulting path of the following example is shown in Figure “ExampleDisableMaskSet”. The disable mask
is initially set to the binary value 2#1101, which is equal to the decimal value 13. The first G-Code, which is
N10 in the given example, is always executed, independently of the current disable mask because there is
no ‘/’-operator in the N10-line. N20 is only executed if bit 0 is not set. In the case bit 0 is set N20 is
supressed, which is true in the given example. The same holds for N30, since ‘/’ is only a shorthand for ‘/0’.
N40 is not supressed, since bit 1 is not set. The G-Codes N50 and N60 after disableMaskSet(0) are
executed, since no bit in the disable mask is set. In contrast, the call disableMaskSet(-1) sets all bits of
the mask. Consequently, the succeeding G-Codes that are prefixed with a ‘/’, N80 and N90, are disabled.
!disableMaskSet(2#1101);
N10 G01 X10 Y10
/0 N20 G01 X20 Y0
/ N30 G01 X30 Y0
/1 N40 G01 X40 Y10
!disableMaskSet(0);
/ N50 G01 X50 Y0
/1 N60 G01 X60 Y10
!disableMaskSet(-1);
N70 G01 X70 Y0
/1 N80 G01 X80 Y10
/2 N90 G01 X90 Y20
Y
30
disabled disabled
20
10 N40
N10 N70
N50 N60
0
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleDisableMaskSet”.
zeroOffsetShiftSet
Sets the translation for G-Code g where g must be one of the numbers 54, 55, 56 or 57.
Example:
The resulting path of the following example is shown in Figure “ExampleZeroOffsetShiftSet”. The zero offset
shift of G54 is first set to the translation [0,10,0]. It gets active for N20 and any later segment endpoints
until a novel translation is applied. The second invocation of zeroOffsetShiftSet has an immediate
effect. It applies to N30 and any later segment endpoints until a novel translation is applied. The same holds
for the last invocation. However, the block N40 does not program the Y-coordinate. Therefore, the change
does not become apparent for N40. (See section Transformations [} 80] for details.) Because the block N50
programs the Y-coordinate, it applies the recent [0,30,0]-translation.
!zeroOffsetShiftSet(g:=54, x:=0, y:=10, z:=0);
N10 G01 X20 Y0
N20 G01 X40 Y0 G54
!zeroOffsetShiftSet(g:=54, x:=0, y:=20, z:=0);
N30 G01 X60 Y0
!zeroOffsetShiftSet(g:=54, x:=0, y:=30, z:=0);
N40 G01 X80
N50 G01 X90 Y0
Y
30
N50
N40
20
N30
10
N20 G54 G54 G54 G54
0
N10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleZeroOffsetShiftSet”.
3.6.12 Units
unitAngleSet
unitAngleSet(unitAngle:= UnitAngle)
Set the unit for angles to unitAngle. The default is unitAngleDegree. The unit for angles applies to all
NC-related functions like transRotX. It does not apply to ST-standard functions like sin. For this reason
the interpreter offers a set of NC-specific counterparts like gSin that consider the angle unit.
UnitAngle
unitLengthSet
unitLengthSet(unitLength:= UnitLength)
Set the unit for lengths to unitLength. The default is unitLengthMillimeter. The unit for length
applies to all NC-related functions like G01 or zeroOffsetShiftSet(…).
UnitLength
unitTimeSet
unitTimeSet(unitTime:= UnitTime)
Set the unit for time to unitTime. The default is unitTimeSecond. The unit for time applies to all NC-
related functions like G04. It does not apply to ST-standard functions like currentLdt().
UnitTime
unitVelocitySet
gSin
gSin(angle:= LReal)
Returns the sine of the given angle where the current angle unit is used to interpret the angle. (See section
Units [} 76] for details.) The return type is LReal. This function is not overloaded.
gCos
gCos(angle:= LReal)
Returns the cosine of the given angle where the current angle unit is used to interpret the angle. (See
section Units [} 76] for details.) The return type is LReal. This function is not overloaded.
gTan
gTan(angle:= LReal)
Returns the tangent of the given angle where the current angle unit is used to interpret the angle. (See
section Units [} 76] for details.) The return type is LReal. This function is not overloaded.
gASin
gASin(val:= LReal)
• Returns the arcsine of val in the current angle unit. (See section Units [} 76] for details.)
• The return type is LReal. This function is not overloaded.
• The result lies within the interval [-c/4,c/4] where c is the angle of a full circle in the current angle
unit.
CONSTRAINT:
The variable val must reside within the interval [-1,1].
Note
gACos
gACos(val:= LReal)
• Returns the arccosine of val in the current angle unit. (See section Units [} 76] for details.)
• The return type is LReal. This function is not overloaded.
• The result lies within the interval [0,c/2] where c is the angle of a full circle in the current angle unit.
CONSTRAINT:
The variable val must reside within the interval [-1,1].
Note
gATan
gATan(val:= LReal)
• Returns the arctangent of val in the current angle unit. (See section Units [} 76] for details.)
• The return type is LReal. This function is not overloaded.
• The result lies within the interval [-c/4,c/4] where c is the angle of a full circle in the current angle
unit.
gATan2
feedModeSet
feedModeSet(feedMode:= FeedModeType)
FeedModeType
feedInterpolationSet
feedInterpolationSet(feedInterpolation:= FeedInterpolationType)
FeedInterpolationType
FeedInterpolationType
runFile
runFile(path:= string)
The size of files that can be executed employing the GST-interpreter is limited. However, sometimes it is
required to execute large files that may have been created e.g. by a CAD-program. Therefore, the user has
the possibility to execute filestreams of native G-Code.
Executes the plain G-Code that is contained in the G-Code file given by path. The function call returns after
all lines in the supplied file have been processed. The function is intended for streaming large G-Code files to
the NC-kernel efficiently.
A G-Code filestream from file 'myNativeGCodeFile.gcode' can be called from a GST-program lining up
the following syntax:
!runfile('myNativeGCodeFile.gcode');
smoothingSet
SmoothingMainType
smoothingNone
smoothingParabola
smoothingBiquadratic
smoothingBezier3
smoothingBezier5
SmoothingSubType
dynOverrideSet
dynOverrideSet(value:= LReal)
Set the dynamic override of axes to the given value. The factor must lie in the range 0 to 1.
circleCenterReferenceSet
circleCenterReferenceSet(value:= ReferenceType)
• Sets the center reference type for circles that are programmed by G02/G03 using a center point, whose
definition involves the i,j,k-parameters.
• For referenceAbsolute the center point of the circle is defined by the supplied i,j,k-vector.
• For referenceRelative the center point is defined by the sum of the circle starting-point and the
supplied i,j,k-vector. This is the default and usual behavior of G-Code.
ReferenceType
3.7 Transformations
The relation between the MCS (machine coordinate system) and the PCS (program coordinate system) is
defined by the effective transformation T. T is the concatenation of the transformations TZ, TU and
TT (T = TZ * TU * TT). Note that the order of concatenation is significant for the transformations do not
commute in general. The transformation TZ represents a (historical) zero offset shift, the transformation TU
represents a user defined transformation and the transformation TT represents a tool transformation. They
are described in detail later.
Figure “TransformationsTzTuTt” visualizes the relation between the MCS (machine coordinate system) and
the PCS (program coordinate system):
• TZ is defined to be a translation by [20,20,0],
Y
30
20
TZ TU
10
S
PC
MCS TT
0
T
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “TransformationsTzTuTt”.
Example:
After N10 the coordinates of the current PCS (program coordinate system) and MCS (machine coordinate
system) point are [20,10,80], since no transformation is active. The translation changes the current PCS
(program coordinate system) point to [28,7,84]. Applying the translation on this point yields the
unchanged MCS (machine coordinate system) point [20,10,80]. Hence, the translation shows no effect,
although it is active. The block N20 programs a movement to the PCS (program coordinate system) point
[25,7,10], which is mapped to the MCS (machine coordinate system) coordinate [17,10,6]. After the
invocation of transPop() the current PCS (program coordinate system) point is set to the current MCS
(machine coordinate system) point.
N10 G01 X20 Y10 Z80
!transTranslate(-8,3,-4);
N20 G01 X25 Z10
!transPop();
Example:
If the user wants the PCS (program coordinate system) point to remain unchanged, he has to retrieve and
program it, as shown in the following code. However, the desire for an unchanged PCS (program coordinate
system) point typically indicates a bad programming style. Actually, there should be no need for the following
code.
{
VAR
pcsX, pcsY, pcsZ : LREAL;
END_VAR
// … G-Code …
frameGet(x=>pcsX,y=>pcsY,z=>pcsZ);
// … modify transformations …
The TZ-transformation is affected by certain G-Codes. It has no effect if G53 is active. Otherwise, TZ is the
combination of the three translations TZ58, TZ59 and one of {TZ54, …, TZ57}. The former two translations are set
via the G-Codes G58 and G59. The latter translation is selected by the G-Codes G54 to G57. One translation
is associated with each of these 4 G-Codes. It can be set by the PLC or using the ST-function
zeroOffsetShiftSet.
Tool Transformation TT
TT is defined by the currently selected tool. It has no effect if tool 0 (D0) is selected. Otherwise, it is a
translation by [offsetX, offsetY, offsetZ] + (length+lengthAdd) * D where D is the normal
of the current workingplane.
Userdefined Transformation TU
Example:
In the following example the translation is applied to N10, N20 and N30. The rotation is only applied to N20
as it is revoked by transPop(). Figure “ExampleRevokingTransformations” shows the resulting MCS
(machine coordinate system) path. Note that the rotation center is [20,0,0] in MCS (machine coordinate
system), which is the origin in PCS (program coordinate system) after the preceeding translation.
!transTranslate(20,0,0);
N10 X10 Y0
!transRotZ(90);
N20 X20 Y0
!transPop();
N30 X30 Y0
!transPop();
Y
30
20
N30
10 N20
0
N10
-10 X
-10 0 10 20 30 40 50 60 70 80 90 100
Figure “ExampleRevokingTransformations”.
It is good programming style to do this saving and restoring in the context of userdefined ST-functions.
Example:
Initially, within the following function the depth of the stack is stored in the variable depth. At the end of the
function the initial state is restored by transRestore. Note that restoration only works properly if the stack
depth does not fall below depth within the function. Instead of using transDepth() and
transRestore() the stack depth could also be restored using transPop(). However, it may become
cumbersome to keep pushing and popping of transformations synchronous, especially if transformations are
pushed conditionally.
{
FUNCTION draw
VAR
depth : UINT;
END_VAR
depth := transDepth();
transTranslate(10,0,0);
// … G-Code …
transRotZ(45);
// … G-Code …
transMirrorX();
// … G-Code …
transRestore(depth);
END_FUNCTION
}
Example:
In the following example an integer variable i is declared and initialized. The initialization uses a floatingpoint
literal. Since an implicit conversion from floatingpoint to integer is not allowed in ST, the interpreter produces
the descriptive error message given below when the program is loaded. The error message does not only
report that a type-error has occured, it also gives the precise position: File aaa.gst, line 3, column 14 to 17.
This code range displays the literal ‘1.5’. In addition, the programmed type (real) and the expected type
(int) are reported. With such a detailed error message bugs can be fixed by the developer easily.
{
VAR
i : int := 1.5;
END_VAR
}
Error message:
aaa.gst: 3.14-3.17: Invalid implicit conversion from type
'<real literal>' to 'int'.
However, there are also errors that, by their nature, cannot be detected at compile-time. For instance, this
circumstance includes a division by zero, since the divisor may be computed dynamically. If a runtime error
occurs, the interpreter is stopped safely and an error message is produced. A runtime error message is
similar to a compile-time error message. It even includes a reference to the pertinent source code.
Example:
In the following example the FOR-loop contains a division of 10 by the loop variable i. Since the variable i is
iterated from -3 to 3, this program leads to an error during the 4th iteration, when i has the value 0. This
error is detected at runtime and stops the interpreter. The error message shown below is reported. It points
precisely to the code ‘10/i’ in the example.
FILE aaa.gst:
{
VAR
i, j : int;
END_VAR
FOR i := -3 TO 3 DO
j := j + 10/i;
END_FOR;
}
Error message:
aaa.gst: 7.12-7.16: Division by zero
Example:
At runtime the interpreter also performs checking of array bounds. Consequently, invalid indices do not result
in unpredictable and typically fatal crashes. The runtime error message precisely defines location and origin
of the error at ‘idx’, reports the erroneously supplied index (20) and the valid index range (10..19).
FILE aaa.gst:
{
VAR
idx : INT;
a : ARRAY [10..19] OF INT;
END_VAR
FOR idx := 10 TO 20 DO
a[idx] := i;
END_FOR;
}
Error message:
aaa.gst: 8.5-8.8: Out of bounds. 20 exceeds range 10..19.
Example:
In the following example the value of a string variable str is assigned to the address letter X of the G-Code
block. As before the position of the error is precisely identified at ‘=str’ in the code. In addition, the
programmed type and the expected type are reported.
FILE aaa.gst:
{
VAR
str : string := 'Hello World';
END_VAR
}
Error message:
7.5-7.9: Invalid implicit conversion from type 'string[255]'
to 'lreal'
Example:
In the following example a sequence of circular arcs is processed by a FOR-loop. The radius of the arc is 4.
The distance between the starting-point and endpoint of the arc is successively increased within each
iteration. During the 9th iteration the distance exceeds the circle diameter of 8. The reported error message
identifies the origin G2 X=i*10+i U4 and gives information about the diameter and distance between
starting-point and endpoint.
FILE aaa.gst:
{
VAR
i : INT;
END_VAR
!G00 X0 Y0 Z0
FOR i := 1 TO 10 DO
!G01 X=i*10
!G02 X=i*10+i U4
END_FOR;
}
Error Message:
aaa.gst: 9.4-10.1: Invalid definition of circle. Distance
between start-point and end-point (=9.000000) is larger than
diameter (=8.000000).
3.8.4 Preprocessing
During preprocessing #include-directives are replaced by the contents of the referenced files. Care has
been taken to maintain information about the origin of source code properly. Therefore, an error that is
caused by code in an included file will refer to that included file and not to the result of preprocessing, as a
simple implementation would do.
Example:
In the following example the file aaa.gst includes the file bbb.gst. In the latter file the variables i and j
are used in G-Codes. Variable i is declared at the beginning of aaa.gst, but j is not. Therefore, the error
message below is issued. As you can see it references the use of variable j in file bbb.gst properly.
FILE aaa.gst:
{
VAR
i : INT;
END_VAR
}
G00 X0 Y0 Z0
#include "bbb.gst"
G00 X100
FILE bbb.gst:
G01 X=i
G01 Y=j
G01 Z100
Error message:
bbb.gst: 2.6-2.7: Undeclared variable or enumeration value
'j'
Workingplane Selection
Accurate Stop
IJK
M-Functions
Com- Description
mand
M [} 42] Triggers the M-function v.
The timing behavior depends on the definition of v in the System Manager of TwinCAT.
There must not be more than one M-function of type handshake in a block.
M2 Predefined M-function.
Signals program end.
M30 Predefined M-function.
Signals program end.
Com- Description
mand
N [} 45] Block number.
Set Radius
Com- Description
mand
X [} 45] Sets the X-coordinate of the next point to v.
Uses current length unit for v.
Y [} 45] Sets the Y-coordinate of the next point to v.
Uses current length unit for v.
Z [} 46] Sets the Z-coordinate of the next point to v.
Uses current length unit for v.
Trigonometric
Command Description
SIN [} 56] Returns the sine of x; x in radians.
COS [} 56] Returns the cosine of x; x in radians.
TAN [} 56] Returns the tangent of x; x in radians.
ASIN [} 57] Returns the arc sine of x; x in radians.
ACOS [} 57] Returns the arc cosine of x; x in radians.
ATAN [} 57] Returns the arc tangent of x; x in radians.
ATAN2 [} 57] Returns the arc tangent of y/x; y/x in radians.
Arithmetic
Command Description
ABS [} 55] Returns the absolute value of x.
SQRT [} 55] Returns the square root of x.
LN [} 56] Returns the natural logarithm of x.
LOG [} 56] Returns the decimal logarithm of x.
EXP [} 56] Returns e raised to the power of x.
ADD [} 57] Returns the sum of all parameters.
MUL [} 57] Returns the product of all parameters.
SUB [} 58] Returns the difference x-y.
DIV [} 58] Returns the quotient x/y.
MOD [} 58] Returns the remainder of the integer division x/y.
EXPT [} 58] Returns x raised to the power of y.
Shift
Command Description
SHL [} 59] Returns the bitstring x shifted left by y bits.
SHR [} 59] Returns the bitstring x shifted right by y bits.
Rotation
Command Description
ROL [} 59] Returns the bitstring x rotated left by y bits.
ROR [} 59] Returns the bitstring x rotated right by y bits.
Logical Operations
Command Description
AND [} 60] Returns the bitwise Logical And of all parameters.
OR [} 60] Returns the bitwise Logical Or of all parameters.
XOR [} 60] Returns the bitwise Logical Exclusive Or of all parameters.
NOT [} 60] Returns the bitwise complement of x.
Command Description
SEL [} 60] Returns x1 if cond is FALSE, and x2 otherwise.
MUX [} 60] Returns x<select>.
Command Description
MAX [} 61] Returns the maximum of all parameters.
MIN [} 61] Returns the minimum of all parameters.
LIMIT [} 61] Returns in if it lies in the interval [min,max]. Otherwise, the violated bound (min or
max) is returned.
Comparison
Command Description
GT [} 61] Returns TRUE if x is larger than y.
GE [} 61] Returns TRUE if x is not smaller than y.
EQ [} 61] Returns TRUE if x and y are equal.
LE [} 62] Returns TRUE if x is not larger than y.
LT [} 62] Returns TRUE if x is smaller than y.
NE [} 62] Returns TRUE if x and y are not equal.
Comparison
Command Description
The toString-Function [} 62] Converts and concatenates the given arguments to one string.
Msg [} 62] Send the given message to the message list of TwinCAT.
Transformations
Command Description
transRotX/Y/Z [} 63] Rotation around the respective axis by the given angle in the user-defined
transRotX/Y/Z [} 63] angle unit.
transRotX/Y/Z [} 63]
transRotA [} 64] Rotate around vector [x,y,z] by the given angle.
transMirrorX/Y/Z [} 65] Mirror with respect to the X-direction, Y-direction or Z-direction relative to
transMirrorX/Y/Z [} 65] the origin of the current PCS.
transMirrorX/Y/Z [} 65]
transScale [} 65] Scales the coordinate system by the factor in the X-dimension, Y-
dimension and Z-dimension.
transTranslate [} 66] Translate by vector [x,y,z].
transPop [} 66] Pops a transformation from the stack of transformations.
transDepth [} 67] Yields the depth of the stack of transformations, i.e. the number of active
transformations.
transRestore [} 67] Reduces the stack of transformations to the given depth.
Movement
Command Description
moveCircle3d [} 68] Move circular by rotating around the center cx,cy,cz and the normal
vector nx,ny,nz by the given angle. If height is nonzero, a helix is
described. The rotation is performed according to the right hand rule.
Centerpoint Correction
Command Description
centerpointCorrectionSet [} 69] Activates the centerpoint correction for circles. Used for circles that are
defined by centerpoint programming.
centerpointCorrectionLimitSet Sets the precision limit for the centerpoint of circles.
[} 69]
Tools
Command Description
toolParamSet [} 69] Set a parameter of the tool tidx (1..255) to val. The parameter is
identified by col (0..15).
toolParam [} 70] Yields the given tool parameter.
toolSet [} 70] Set all parameters of a tool.
ToolType [} 71] Enumeration of tool types.
Synchronization
Command Description
sync [} 71] Synchronizes the interpreter with the associated NC-channel.
wait [} 71] Waits for a GoAhead-signal from the PLC.
Query of Axes
Command Description
queryAxes [} 72] Set the MCS coordinates of the interpreter to the actual coordinates of the physical
axes.
Current Point
Command Description
frameGet [} 73] Store the current frame of the PCS in x, y, z and a, b, c.
qAxisGet [} 73] Store the current values of Q-axes q1 to q5.
Command Description
trcApproachDepartSet [} 73] Configures the approach and depart behavior to use an arc of given radius
and angle.
trcOffsetSet [} 73] Configures the amount of segment extension that is used to close gaps.
trcLimitSet [} 74] Configures the lookahead that is used for collision elimination.
trcParam [} 74] Returns the current configuration as a structure value.
trcParamSet [} 74] Configures the tool radius compensation. Summarizes
trcApproachDepartSet, trcOffsetSet and trcLimitSet.
TrcParamType [} 74] Structure containing all configuration parameters of the tool radius
compensation.
collisionElimination [} 74] Activates collision elimination with respect to the plane of the normal vector
nx, ny, nz.
collisionEliminationFlush [} 74] To ignore conflicts between the path preceding the call and the path
succeeding the call.
Command Description
disableMask [} 74] Yields the current value of the disable mask.
disableMaskSet [} 75] Sets the internal disable mask to the given value.
Command Description
zeroOffsetShiftSet [} 75] Sets the translation for G-Code g where g must be one of the numbers 54,
55, 56 or 57.
Units
Command Description
unitAngleSet [} 76] Set the unit for angles to unitAngle.
UnitAngle [} 76] Enumeration of unit angles.
unitLengthSet [} 76] Set the unit for lengths to unitLength.
UnitLength [} 77] Enumeration of unit lengths.
unitTimeSet [} 77] Set the unit for time to unitTime.
UnitTime [} 77] Enumeration of unit times.
unitVelocitySet [} 77] Set the unit for velocity to unitLength/unitTime.
Command Description
gSin [} 77] Returns the sine of the given angle where the current angle unit is used to
interpret the angle.
gCos [} 77] Returns the cosine of the given angle where the current angle unit is used
to interpret the angle.
gTan [} 77] Returns the tangent of the given angle where the current angle unit is
used to interpret the angle.
gASin [} 78] Returns the arc sine of val in the current angle unit.
gACos [} 78] Returns the arc cosine of val in the current angle unit.
gATan [} 78] Returns the arc tangent of val in the current angle unit.
gATan2 [} 78] Returns the arc tangent of y/x in the current angle unit.
Feed Mode
Command Description
feedModeSet [} 78] Set the feed mode.
FeedModeType [} 78] Enumeration of feed mode types.
Feed Mode
Command Description
feedInterpolationSet [} 79] Set feed interpolation.
FeedInterpolationType [} 79] Enumeration of feed interpolation types.
Command Description
runFile [} 79] Executes the plain G-Code that is contained in the G-Code file given by
path.
Vertex Smoothing
Command Description
smoothingSet [} 79] Set the vertex smoothing behavior.
SmoothingMainType [} 79] Enumeration of smoothing main types.
SmoothingSubType [} 80] Enumeration of smoothing sub types.
Dynamic Override
Command Description
dynOverrideSet [} 80] Set the dynamic override of axes to the given value.
Command Description
circleCenterReferenceSet [} 80] Sets the center reference type for circles that are programmed by G02/
G03.
ReferenceType [} 80] Enumeration of reference types.
Logical Operations
Rotation
Shift
Units
Program structure
Program start
At the beginning of an NC program the character "%" can represent the start of the program. The name of
the program is then found following this character. The block for the program start does not necessarily have
to be programmed.
Sample:
% Test1 (program start)
N10 G0 X100 Y100 Z0
M30 (program end)
NC block
Each NC block consists of one or several NC words, or even of none (an empty line), separated by spaces
or tab characters. It is therefore not possible to use a space within a word.
Sample:
N10 G0 X100 Y100 Z0
NC word
The first character of an NC word specifies its meaning. It is either a letter or a special character.
Upper/lower case has, in general, no significance. Uniform use of upper case is, however, recommended for
the sake of better readability. The optional following characters specify the meaning more precisely, or
supply parameters for the execution.
In order to manage with such a limited supply of characters, an expression is not available for every variation
of every function. It is rather the case that the significance and effect of many NC words is determined partly
by the context. This can be a matter of the foregoing words in the block, but it can also depend on previous
NC blocks. In a few cases the effect of NC words even depends on the machine data.
Program end
The end of the program is indicated by an M-function. Either M2 or M30 is used for this.
Commands such as G0 [} 118] or G17 [} 111], that have effects beyond the end of the block, are known,
according to DIN 66025, as modal. These commands are effective as long as they are neither cancelled nor
altered by another command.
Comments
If either parts of an NC block, or the whole of it, is not to be interpreted, the region concerned is to be placed
within curved brackets.
Sample:
N10 G0 X100 (comment)
NOTE! A comment ends with the closing bracket, or, at the latest, at the end of the block. This
means that a comment can’t continue over a number of lines. Nested comments are also not possible.
Block numbers
Each block can be identified by a block number. The block number is accompanied by "N" for subordinate
blocks and ":" for main blocks.
NOTE! The block number is not essential. A block not identified by a block number can not,
however, be used as the target of a jump command. An error message, moreover, can only
approximately report the location of the error (the last block number).
In such cases, the blocks that belong to one variant are given a block skipping identifier. This must be written
at the start of the block, and consists of a slash "/".
If several variants are required, the slash is extended with line information (0..15), for instance "/12". The line
information (where "/" is equivalent to "/0") selects a bit from a word in the channel interface from the PLC to
the NC. If this bit is set, the block is not interpreted.
In the NC the variable 'mSkipLine' is evaluated for this purpose, which can be found among the inputs in the
cyclic channel interface. The counterpart in the PLC can be found in the outputs under 'nSkipLine' [} 306]
(previously: nSkipBlock) (see TwinCAT PLC library: NCI Interpreter).
If one of a number of variants is to be active, all the other suppressions must be set. Then only those blocks
remain active that have either no identifier, or that have the desired identifier.
4.1.3 Look-Ahead
The actual velocity at the segment transition depends on a range of parameters. These include residual path
length, dynamic parameters for the current segment, and (indirectly) the geometric angle at the segment
transition.
Dynamic look-ahead (referred to as look-ahead below) ensures that the velocity can remain as high as
possible at segment transitions. In the standard configuration 128 geometry entries are considered.
The number of geometry entries taken into account can be set in the DXD parameters [} 25].
If the target velocity changes from a high velocity level to a lower level (N10 -> N20), the lower velocity will
already have been reached at the start of the segment.
If the target velocity changes from a low velocity level to a higher level (N20 -> N30), the higher velocity is
initiated with the segment transition. The system therefore always ensures that even at the segment
boundary the current velocity does not exceed the programmed velocity.
Overview
Segment transitions with no continuous second differential cause instability in the dynamics unless the path
velocity is reduced to 0 at those points. For dynamically stable segment transition at a finite speed it is
possible to smooth segment transitions with Bezier splines which alter the local geometry and ensure that
the complete path has a continuous second differential.
Tolerance spheres
A tolerance sphere is laid around every segment transition within which the path may deviate from its pre-set
geometry for smoothing purposes. The radius of the tolerance sphere (parameterization [} 301]) is
predetermined by the user and applied modally for all segment transitions that imply no exact positioning or
stop in the segment transitions. The radii of the tolerance spheres are automatically reset adaptively, thus
preventing tolerance spheres from overlapping in the case of small segments.
Dynamic parameters
The smoothing enables faster dynamics. The system-determined maximum segment transition velocity
VeloLink can be influenced by the user insofar as the system parameter C2 velocity reduction C2
(parameterization [} 301]) sets the segment transition velocity to C2x VeloLink. The factor can be changed
online.
When entering the tolerance sphere, the path acceleration is 0 and the path velocity equals the segment
transition velocity. This is maintained within the tolerance sphere. The override is inactive within the
tolerance sphere, i.e. the change of the velocity level caused by the override is interrupted within the
tolerance sphere and continues after the exit from the tolerance sphere.
Absolute dimensions
Command G90
Cancellation G91
All positional data in absolute dimensions are always given with reference to the currently valid origin.
In terms of tool movement, this means that, under absolute dimensioning, it is the position to which the tool
should move that is described.
Incremental Dimensions
Command G91
Cancellation G90
When dimensions are incremental, positional data is related to the immediately preceding point. In addition
to the path axes, the auxiliary axes (Q1..Q5) are also taken into account.
For the tool movement this means that the incremental dimension describes by how much the tool is moved.
Units
The units for length, angle etc. are described in the following table:
Unit
Positions and lengths mm
Angle degree
Times sec
Feed mm/min
Working Plane XY
Command G17
Cancellation G18 or G19
The function G17 specifies the XY plane as the working plane and the feed direction as the Z direction.
Note
Working Plane ZX
Command G18
Cancellation G17 or G19
The function G18 specifies the ZX plane as the working plane and the feed direction as the Y direction.
Working Plane YZ
Command G19
Cancellation G17 or G18
The function G19 specifies the YZ plane as the working plane and the feed direction as the X direction.
Command P
Parameter + feed direction positive (default)
- feed direction negative
Parameterization of the feed direction is required for tool length compensation. It is used to specify whether
the tool operates above or below the workpiece.
Sample:
N10 G0 X0 Y0 Z0 F6000
N20 D2 P- Z
N30 G01 X100
N40 D0 Z
N50 M30
Dimensions in millimeters (G71) is active by default. Information on whether the coordinates have to be
converted is stored in the machine parameters [} 11] (Interpreter tab). The basic dimension system in
millimeters is also set there by default.
If the basic dimension system is not the same as the current dimension system (set with G70 or G71), then
certain parameters and co-ordinates must be converted. The conversion factor required here is stored in the
machine parameters, like the basic dimension system. The changeover has effects on the following
parameters:
• Path information for the path axes (X, Y & Z)
• Path information for the auxiliary axes (Q1..Q5)
• Intermediate point co-ordinates (I, J, K)
• Circle radii (B or U)
• Programmable zero shift
• Rounding radius (circle and spline smoothing)
There are also parameters that always remain in the basic dimension system, and are not converted.
These include the
• adjustable zero shift
• Tool data
• feeds (except under G700 or G710)
Sample 1:
Sample 2:
Adjustable zero shifts (G54-G57) always remain in the basic dimension system, and are not converted. In
the case of the programmable zero shifts (G58 & G59) the effect depends on the current dimension system
when the shift is selected.
Sample 3:
If interpreter single block mode is active, the NC program is stopped after each line in the interpreter. This
remains true even if the line only contains calculations, and no physical movement is programmed.
This enables re-writing of R-parameters, for example.
Interpreter single block mode should be activated before the NC program is started. If this is not possible, an
M-function can be reserved for the activation and combined with a decoder stop.
If interpreter single block mode is activated during processing of the NC program without M-function and
decoder stop, it is impossible to predict when it will be active. Theoretically it is possible that the memories in
the NC kernel (SVB & SAF) are filled and contain more than 100 geometry entries. The single block can only
take effect once these memories have been fully processed.
Like in interpreter single block mode, in NC kernel single block mode the NC blocks are executed
individually. The difference is that in NC kernel single block mode all entries (e.g. geometry entries) have
already passed through the interpreter. It is therefore not possible to overwrite R-parameters retrospectively,
for example.
This operating mode has the advantage that single block mode can be enabled during processing of the NC
program. If a geometry entry is executed (i.e. the axes are moved) during the activation, the system stops at
the next possible end of segment. This is usually the current segment. For activation after program startup
no M-function with decoder stop is required.
If NC kernel single block mode is used in conjunction with blending, block relaying takes place in the
blending sphere. The programmed blending continues to be executed (from TwinCAT V2.10 Build 1301).
Alternatives to activation
For reasons of compatibility with previous TwinCAT versions, single block mode can be activated via the
cyclic channel interface.
Single block mode can be selected or deselected in the cyclic channel interface of the PLC. To this end the
variable 'nItpMode' has to be masked correctly in the PLC/NC channel interface.
Set bit 14 (0x4000) to switch on interpreter single block mode. Resetting the bit turns single block mode off
again.
It is also possible to trigger the single block from the PLC by means of this interface. Bit 15 must be set for
this. The effect is the same as activating NC start in the XAE.
Mathematical Calculations
The R-parameters (like the axis co-ordinates, feedrates etc.) are declared as variables of type 'double'. This
makes full use of the computer’s arithmetic capacity. The number of places before and after the decimal
point is not restricted by a format specification. The arithmetical resolution does, nevertheless, have a limit.
In practice this is only visible in particularly critical cases. Examples of this include the differences of very
large numbers that are almost equal, or trigonometrical functions in particular ranges of angles.
Assignment of R-Parameters
N100 R5=17.5
N110 R6=-4
N120 R7=2.5 R8=1
As can be seen in the third line, it is quite possible to make more than one assignment in one block. This
speeds interpretation slightly, but it can be more difficult to localize an error in the line.
Calculation formula
Such a formula, contrary to normal mathematical practice, is processed strictly from left to right.
Mathematical functions
The interpreter provides standard computing functions. DIN 66025 does not specify any syntax here. The
computing functions are called via @6xx (see appendix - @-command overview [} 178]).
Sample:
N10 R2=0 R3=45
N20 @630 R2 R3
In this sample the sine of R3 is calculated in degrees. The result is then written into R2.
You can read the R-parameters into the PLC, or write the R-parameters from the PLC. Special PLC function
blocks are provided for this purpose
• ItpReadRParams [} 258]
• ItpWriteRParams [} 270]
During writing of the R-parameters, ensure that the interpreter is ahead of the block execution. In other
words, writing of the R-parameters from the PLC should take place before the NC program starts or be linked
to a decoder stop [} 150].
For debugging purposes, all R-parameters can be written to a file at any time. This process can be triggered
via ADS (see ADS interface - channel functions IndexOffset 0x24 & 0x25 [} 382]).
Other functions
RToDwordGetBit
This function converts an R-parameter to a DWord and then checks whether a particular bit is set. The result
is again stored in an R-parameter.
Sample:
N10 R1=7
N20 RToDwordGetBit[R2;R1;0]
R10=31
N30 RToDwordGetBit[R3;R1;R10]
Initialization of R-parameters
Sample:
N10 G01 X100 Y200 F6000
N15 R2=3000
N20 #set RParam( 1; 2; 0.0 )# (R2 is overwritten again here)
N30 G01 X500
Saving R-Parameters
If the content of R-parameters [} 115] is required for subsequent use, while in the meantime the R-
parameters are used for a different purpose, it can temporarily be stored in the values stack of the arithmetic
unit.
Sample 1:
(saving the data)
N100 @40 K4 R800 R810 R823 R4
N110 R800=4711
N120 ...
Sample 2:
(saving the data)
N100 @41 R800 R805
N110 R800=4711
N120 ...
Stack size
The value stack of the arithmetic unit has limited capacity. If it overflows, the NC program is
interrupted with an error message. That can occur as the value is saved, but can also occur
Note in the course of subsequent formula evaluation.
4.2.1 Referencing
By default, axis referencing (homing) should take place before the 3D-group is formed from the PTP
channel. Or it can be done from the NC program.
If axes are referenced in PTP mode, it can be done for several axes simultaneously. If axes are referenced
from the NC program, it can only be done for one axis at a time.
Command G74
Cancellation End of block
Sample:
N10 G74 X
N20 G74 Y
Rapid traverse is used to position the tool quickly, and is not to be used for machining the workpiece. The
axes are moved with maximum velocity.
If a number of axes are to be driven in rapid traverse, the velocity is determined by that axis that requires the
most time for its movement.
The rapid traverse velocity is set individually for each axis. This can be edited in the axis parameters in the
XAE under NCI parameters.
Under linear interpolation the tool moves, with feedrate F, along a straight line that can be freely located in
space. The movement of the axes involved is completed at the same moment.
The feedrate (short: feed), F, describes the rate of displacement in millimeters per minute. This value is
effective globally, so that it is not necessary to program it again if the same feed is to be used later for other
geometrical movements.
Sample:
N10 G90
N20 G01 X100.1 Y200 F6000
In this example the axes are moved linearly to the position described. The Z axis is not mentioned in this
program, and therefore retains its old position.
Command G2 or G02
Cancellation G0 [} 118], G1 [} 119] or G3 [} 120]
Function G2 describes the path of a circular arc clockwise. This function requires the working plane [} 111]
to have already been defined (G17 [} 111] by default).
In order to describe the circle unambiguously, further parameters are required in addition to the end point. A
choice is available between center point programming and radius programming.
Radius programming
In radius programming the radius of the circle is programmed as well as the end point. Either of the letters 'B'
or 'U' may be used for the radius.
Since the direction is prescribed with G2, the circle is also unambiguously described. The starting point is
determined by the foregoing geometrical movements.
Sample 1:
N10 G01 G17 X100 Y100 F6000
N20 G02 X200 B200
Note
Centre point programming represents an alternative to the method that has just been described. The
advantage of center point programming is that full circles can also be described in this way.
Under the standard settings, the center point is always given relatively to the starting point of the arc. The
parameters I, J and K are used for this purpose. With
• I for the X-component
• J for the Y-component and
• K for the Z-component.
At least one of these parameters is 0 and therefore does not have to be included in the program.
Sample 2:
N10 G01 G17 X100 Y100 F6000
N20 G02 I50 J0 (J is optional) X200
N30 M30 (program end)
Sample 3:
N10 G01 G18 X100 Y100 Z100 F6000
N20 G02 I0 K50 X150 Z150 (quarter circle in ZX plane)
N30 M30
By programming an item of machine data it is however also possible to enter the center point absolutely. The
command @402 is required for write access to a machine data bit.
In the following example, the circle from the first example is programmed using the absolute circle center.
Sample 4:
N10 G01 G17 X100 Y100 F6000
N20 @402 K5003 K5 K1 (centre point programming on)
N30 G02 I150 J100 X200
N40 @402 K5003 K5 K0 (centre point programming off)
N50 M30
Command G3 or G03
Cancellation G0 [} 118], G1 [} 119] or G2 [} 119]
The function G3 describes a circular arc anticlockwise. The parameters and entry possibilities are the same
as under G2.
Circular accuracy
The 'set paramRadiusPrec' function is used to parameterize the required circular accuracy. This parameter
affects circles programmed with G02 or G03.
With center point programming, an error is generated if the difference in radius length is greater than
<param>.
In center point programming the circle is overdetermined. For data consistency, the center point is usually
corrected. Normally only a marginal modification of the center point is required. After the center point
correction, the magnitude of the input radius equals the output radius.
It the start and end point are very close together, the center point offset may be large. This may lead to
problems with automatically generated G-Code (postprocessor). For manually written G-Code, the CPCON
setting (center point correction on) is recommended.
CIP circle
Command CIP
Cancellation End of block
The circles discussed so far can only be used in the principal planes. The CIP circle can also be used to
program a circle anywhere in space. For this purpose it is necessary to program not only an end point but
also some other point on the path.
So that the circle can be described unambiguously, it is necessary that the three points (the starting point is
given implicitly) must not be collinear. It is thus not possible to program a full circle in this way.
I, J and K are available as path point parameters. By default their values are relative to the starting point of a
circular path.
Sample 5:
N10 G01 X100 Y100 F6000
N20 CIP X200 Y200 I50 J50 K50
NOTE! For the CIP circle motion, cutter radius compensation [} 167] must not be active.
4.2.5 Helix
If a circular motion is superimposed onto a perpendicular linear movement, a helix is obtained. A helix can
only be programmed in the principal planes. The same parameters as are used for a circle in the principal
plane are used. At the same time the axis that is perpendicular to the plane is driven.
The helix can be used together with the cutter radius compensation [} 167].
Sample:
N10 G01 G17 X100 Y0 Z0 F6000
N20 G03 I-50 Z100
M30
G4 is used to switch on a dwell time. It is used to interrupt workpiece machining between two NC blocks for a
programmed time (in seconds).
Sample:
N10 G01 X100 F6000
N20 G04 X0.5 (pause in sec)
N30 G02 X300
...
NOTE! The dwell time must be programmed in a dedicated set, and the parameters (X or F) must be
programmed after G04.
block-by-block
Command G9 or G09
Cancellation End of block
The accurate stop instruction is used, for example, when sharp contour corners must be manufactured. At
the contour transition the set path velocity is reduced to zero and then increased again. This ensures that the
programmed position is approached precisely.
NOTE! G09 acts only on the set value side. The actual values can be checked with TPM (target
position monitoring), for example.
modal
Command G60
Cancellation G0 [} 118]
Description:
see above
The programmed velocity is applied as fast as possible with the constant feed interpolation (default).
Sample 1:
N05 FCONST
N10 G01 X1000 F50000
N20 G01 X2500 F80000
N30 G01 X3500 F60000
...
Command FLIN
Cancellation FCONST
The linear feed interpolation transfers the velocity linearly over the path from v_start to v_end.
Sample 1:
N05 FCONST
N10 G01 X1000 F50000
N15 FLIN
N20 G01 X2500 F80000
N30 G01 X3500 F60000
...
NOTE! If the velocity on the segment transition has to be reduced more drastically than the
programmed segment velocity, due to the geometry or M function for example, then the linear
velocity is maintained as long as possible. The reduced segment velocity will delayed, only if required
dynamically.
Command G53
Cancellation G54 [} 124] to G59 [} 125]
The zero shift is suppressed modally with G53. The suppression affects both the adjustable and the
programmable zero shift.
Command G54
G55
G56
G57
Cancellation G53 [} 124]
or selection of another configurable zero shift
The commands G54 to G57 can be used within the NC program to switch back and forth between the zero
shifts.
Parameterization
The parameters are saved for each interpolation channel. This means that the adjustable zero shifts are
channel dependent.
NOTE! The selection of a zero shift must be made in its own block. In order for the movement
corresponding to the shift to be actually made it is necessary that at least the axes involved are named
in a following geometrical block.
Sample 1:
N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N30 G01 X Y Z
N40 M30
In sample 1 all involved axes are named in line 30. The effect of this is that the zero shifts are applied to all
the axes.
Sample 2:
N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N30 G01 X200 Y
In line 30 of sample 2 the X axis is taken to position 200 + shift in the X direction. The Y axis only moves to
accommodate the shift, and the Z axis is not moved.
'#set paramZeroShift(..)#' parameterizes the zero shift but does not activate it. This requires explicit
programming of the G-Code.
Sample 3:
N10 G01 X100 Y0 Z0 F6000
N20 R12=200
N30 #set paramZeroShift( G54; 100.0; R12; -20)#
N40 G54 (activates adjustable zero offset shift (NPV))
N50 G01 X200 Y Z
Programmable zero shifts exist in addition to the adjustable ones. This type of zero shift is directly described
from the NC program.
Sample 4:
N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N30 G58 X0.5 Y0.5 Z0.5 (1st prg. zero offset shift)
N50 X Y Z (movements for the zero offset shift)
...
M30
Default behavior
Sample 5:
N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N25 G58 X10 Y10 Z0
N30 G91 (Incr. dimensions)
N40 G01 X200 Y0
N50 ...
In N40 Y moves to 10 in the basic coordinate system. A shift in origin also shifts the point of reference for
incremental dimension programming, resulting in a travel path for Y.
In this way a contour, which is fully programmed based on the incremental dimension, can be positioned at
any point through a zero shift.
Command Description
ZeroShiftIncOn The zero shifts are also applied under G91 once the
axis is named
ZeroShiftIncOff The zero shift is not applied under G91
Sample 6:
N10 G01 X100 Y0 Z0 F6000
N15 ZeroShiftIncOff
N20 G54 (activates adjustable zero offset shift (NPV))
N25 G58 X10 Y10 Z0
N30 G91 (Incr. dimensions)
N40 G01 X200 Y
N50 ...
Since 'ZeroShiftIncOff' is set in sample 6 , the X-axis in N40 is moved by 200 mm independently of the new
zero shift. The Y-axis does not move as no target coordinate is programmed for it.
The command 'TPM' is used to trigger target position monitoring from the NC program. At the end of the
geometry this always leads to an accurate stop on the set value side and subsequent checking of the target
position window. Block relaying takes place when the monitoring conditions are met for all axes in the group.
Like for PTP, this function is enabled and parameterized individually for each axis. This means that different
limits can be selected for auxiliary axes than for the path axes, for example.
Sample 1:
N10 G01 X100 Y100 F6000
N20 G01 X300 Y100 TPM
...
At the end of the motion of N20, target position monitoring is performed both for the X axis and for Y axis
(provided target position monitoring is enabled for both axes).
Sample 2:
N10 G01 X100 Y100 F6000
N20 G01 X300 Y100
N30 M61 (Type Handshake)
N40 TPM
...
TPM can also be programmed in a dedicated block. In this case the last positioning is checked (of N20 in
this case).
NOTE! If target position monitoring is enabled for an axis, the target position alarm (PEH) should
also be active. Time monitoring results in a channel error after the timeout (or before), if the axis is
not yet in the target position window. In order to avoid unnecessary channel errors, a sufficiently
large timeout value should be selected (e.g. 5 - 10 s). If no PEH time monitoring is active and the axis
is permanently outside the position window, no block relaying takes place and the NC remains
stationary when viewed from outside. The SAF is in Waiting state (not to be confused with Interpreter
state).
In this type of programming the angle and the magnitude (segment length) are always quoted, similarly to
polar co-ordinates.
Parameter Description
ANG Angle in degrees with reference to the abscissa
( -360 ≤ ang ≤ 360 )
SEG Magnitude of the segment length
Sample 1:
or
N10 G01 ANG=45 SEG=424.264 F60000
N20 G01 X700 Y300
N30 G01 ANG=-45 SEG=282.843
Restrictions:
• The programming may only be done in the chosen principal plane.
• The length of the segment must be greater than zero, and refers to the projection in the principal plane.
NOTE! It is additionally possible to program rounding or chamfering. The ANG and SEG parameters
must be programmed in every block. The assignment may use R-parameters, but formulas cannot be
programmed.
As above, an angle is programmed, but the length of the segment is no longer specified directly. It is
calculated from a component in the selected principal plane.
Sample 2:
Runtime error
If either two components in the plane are quoted or none at all, the result is a runtime error.
A runtime error is also generated if the movement is parallel to the abscissa or to the ordi-
Note nate, and there is therefore no intersection.
4.2.12 Rotation
It is also possible to program a rotation as well as the zero shift [} 124]. A distinction is drawn between
absolute and additive rotation.
The rotation can turn the co-ordinate axes (X, Y and Z) in the workpiece coordinate system.
This makes it possible to machine inclined surfaces (in the plane or in space).
Absolute Rotation
The rotation instructions must be programmed in their own block. Angles must always be stated in degrees.
Direction of Rotation
A positive angle describes rotation in the direction of the positive co-ordinate axis, the rotation being anti-
clockwise.
The sequence of rotations is of critical importance when a coordinate system is being rotated. In TwinCAT
NC I rotations are always carried out in the following sequence around the global coordinate system:
This sequence is maintained even if the parameters are programmed in a different order.
The origin of the tool coordinate system is always used as the center point of the rotation. This means that
the total zero offset shift currently active describes the rotation center.
Additive Rotation
In addition to absolute programming of rotation it is also possible to carry this out additively. The same
conditions apply to this as do to absolute rotation.
Sample:
N10 G01 G17 X0 Y0 Z0 F60000
N20 G55
N30 G58 X200 Y0
N50 L47
N60 G58 X200 Y200
N65 ROT Z30
N70 L47
N80 G58 X0 Y200
N90 AROT Z15
N100 L47
N110 M30
L47
N47000 G01 X0 Y0 Z0 (movements for zero shift & rotation)
N47010 G91 (incremental dimensions)
N47020 G01 X100
N47030 G01 Y80
N47040 G03 X-20 Y20 I-20 J0
N47050 G01 X-40
N47060 G01 Y-40
N47070 G01 X-40 Y-30
N47080 G01 Y-30
N47090 G90
N47100 M17
In this example, the same contour is traversed under different rotations. Since the contour (L47) is
programmed in incremental dimensions, and the starting point is described by means of the programmed
zero shift, the rotation is clear to see.
Note:
Once the ROT or AROT command has been programmed, the complete path vector (X, Y & Z) must be
assigned.
Rotation extensions
In the default configuration the whole path vector must be programmed after each ROT command. Since this
is difficult to realize in some applications, this calculation can optionally be performed automatically in the
interpreter. To use this option, 'RotExOn' should be included at the start of the NC program.
Command RotExOn
Cancellation RotExOff
Sample:
N10 RotExOn
...
N100 G54 (activate zero point & point of rotation)
N110 ROT X90
N120 G0 Z3 (preposition the tool)
N130 G01 Z-10 F6000 (lower to cutting depth)
N140 G01 X100
N150 G01 Z3 (raise to preposition)
...
N1000 RotExOff
N1010 M30
Calculate rotation
The function CalcRot rotates a three-dimensional vector through the current rotation angle. The rotation
angles had been determined by ROT or AROT. The sequence of the calculation is the same as is used for
the rotation itself, that is Z, Y and X.
The CalcInvRot function behaves in precisely the opposite way. The signs of the currently valid rotation
angles are inverted, and the order of calculation is X, Y and Z. In other words, the vector is turned back, so
to speak.
Neither CalcRot nor CalcInvRot generate any geometry, but merely carry out the calculation of the vector.
Sample:
N10 G01 X40 Y10 Z0 F6000 (the axes are moved
without rotation)
N20 R1=40 R2=10 R3=0
The function RotVec rotates a three-dimensional vector through the specified angle. The order of the
rotation is Z, Y and X, like for ROT. RotVec is a calculation routine solely for rotating a vector. It has no effect
on ROT or AROT.
4.2.13 Mirror
The mirror functionality changes the sign of named axes. This enables subroutines to be reused.
Mirroring
The mirror instructions must be programmed in a dedicated block. Mirrored axes must be named without
further parameters.
Sample:
N20 G54
N30 G58 X100 Y100
N40 L100
L100
N1000 G0 X200 Y0 Z10 F60000 (move to start pos)
N1020 G01 Z0
N1030 G03 X200 Y100 J50
N1040 G01 X50
N1050 G01 Y400
N1060 G01 X0
N1070 G01 Y0
N1080 G01 X200
N1090 G01 Z10
M17
If a zero shift is present (G54...G59), the mirror functionality depends on the currently programmed
coordinate system.
4.2.14.1 Overview
Overview
In general, at segment transitions polygon functions (G01 blocks) contain kinks within their contour. At these
transitions polygon functions are not steadily differentiable with respect to their spatial coordinate, thus
leading to dynamic-unsteadinesses, if at these transitions the path velocity is not reduced to zero value. To
actually avoid to have to reduce path velocity to zero value segment transitions of polygon functions can be
smoothed out by blending at those transitions.
Blending takes effect from the transition between the subsequent two segments.
Principle of Blending
The radius of the tolerance sphere can be altered at any time within the NC program and
can be switched off again by setting the radius to 0. Blending remains active until the next
Note reset of the interpreter or a TwinCAT runtime restart.
Parabola smoothing
For parabola smoothing a parabola is inserted geometrically into the segment transition. This ensures a
steady velocity transition within the tolerance radius.
Bi-quad smoothing
With biquadratic smoothing there is no step change in acceleration in the axis components. With the same
radius, a smaller input velocity may therefore be required than for parabolic smoothing.
The operating principle of the subtypes is identical to that of the parabolic subtypes.
In case of the 3rd order Bezier curve a step change in acceleration appears in the axis components when
the tolerance sphere is entered. The max. size is limited by the acceleration of the axis components and the
C1 factor.
This blending can be used for all segment transitions. The subtypes 2 and 3 only work for straight line /
straight line transitions.
With 5th order Bezier blending, no step change in acceleration occurs in the axis components on entry into
the tolerance sphere. In other words, the path axis acceleration is always constant if blending is selected.
This blending can be used for all segment transitions. The subtypes 2 and 3 only work for straight line /
straight line transitions.
Sample 1:
N10 R57=100
#set paramVertexSmoothing(1; 1;R57)#
With the aid of smoothing, it is possible to insert a Bezier spline automatically between two geometrical
entries. It is only necessary to program the radius of the tolerance sphere. This describes the maximum
permissible deviation from the programmed contour in the segment transition. The advantage of this type of
smoothing as opposed to rounding with an arc is that there are no step changes in acceleration at the
segment transitions.
The radius of the tolerance sphere can be altered at any time within the NC program, and can be switched
off again by setting the radius to 0. If the radius is not reset to 0, it remains active until the next interpreter
reset or TwinCAT restart.
or alternatively
#set paramVertexSmoothing(...)
Sample 1:
N10 R57=100
#set paramSplineSmoothing(R57)#
Sample 2:
N10 G01 X0 Y0 F6000
N20 X1000
#set paramSplineSmoothing(100)#
N30 X2000 Y1000
N40 X3000 Y0
M30
The new parameter is valid from the transition between the subsequent two segments. In example 2, the
new value for the tolerance sphere is applicable at the segment transition from N30 to N40. The diagram
below shows a contour with and without spline at the segment transition.
The splines are generated even at very sharp angles by default. In order to avoid the dynamic values being
exceeded, a considerable reduction velocity is required in this case. However, as the dynamics are held
constant, the movement across the spline can be quite slow. In this case it is often practical to start the
segment transition with an accurate stop. In order to avoid manual calculation of the angles, an
'AutoAccurateStop [} 139]' command is available which can also be initiated via the NC program.
4.2.14.7 Subtypes
If subtype 1 is selected, the maximum tolerance radius (RTB) is used for blending. RTB is reduced if and only if
the input or output segment is less than 3*RTB.
The distance between the programmed segment transition and the vertex of the parabola is specified with
the subtype 2. The tolerance radius (RTB) results from this. If a segment is too short, then the distance is
shortened so that the tolerance radius is a max. of 1/3.
Within the tolerance radius (including constant tolerance radius) the system ensures that the maximum
permissible acceleration is not exceeded. Depending on the deflection angle and the velocity, the maximum
axis acceleration within the smoothing segment may be different. The aim of an adaptive tolerance radius is
maximum acceleration during smoothing. In order to achieve this, the smoothing radius is reduced based on
the programmed velocity and dynamics. In other words, if the programmed velocity is changed, the tolerance
radius can also change. The override has no influence on the radius.
The radius of the circular smoothing can be altered at any time within the NC program, and can be switched
off again by setting the radius to 0. Rounding must be switched off before the end of the program or a
decoder stop [} 150].
Sample:
N10 R57=4.5
#set paramCircularSmoothing(R57)#
…
#set paramCircularSmoothing(0)#
N1000 M02
NOTE! When combined with cutter radius compensation, please note that first the radius
compensation is calculated, then the circular smoothing is added. The smoothing radius thus refers to
the TCP.
Syntax:
#set paramGroupVertex(<grp>,<radius>)#
The first parameter describes the group to which the circular smoothing refers. This value is currently always
1. The second parameter is used to specify the circular smoothing radius.
An accurate stop after a defined limit angle is inserted between two segments with the aid of the
'AutoAccurateStop' command.
For circle segments, the angle is calculated from the tangents at the points of entry and leaving.
Sample:
#set paramAutoAccurateStop(45)# (angle in
degrees)
N10 G01 X1000 Y0 Z0 F60000 (start position: X0 Y0 Z0)
N20 X0 Y500
...
Application field:
This command should be used in conjunction with Bezier blending, if acute angles are programmed in the
NC program.
See also:
• Bezier curve of the 3th order [} 135]
• Bezier curve of the 5th order [} 136]
• 'Old' Bezier curve [} 136]
NOTE! This function has not yet been implemented for segment transitions with a helix.
The DelDTG (delete distance to go) command is activated block by block via the NC program. This
command enables deleting of the residual distance of the current geometry from the PLC with the function
block ItpDelDtgEx [} 191]. In other words, if the command is issued while the block is processed, the motion
is stopped with the usual deceleration ramps. The NC program then processes the next block. An error
message is generated if the PLC command is not issued during the execution of a block with "delete
distance to go" selected.
The "delete distance to go" command always effects an implicit decoding stop, i.e. an exact positioning
always occurs at the end of the block.
Sample:
N10 G01 X0 Y0 F6000
N20 DelDTG G01 X2000
N30 G01 X0
NOTE! DelDTG must not be active when cutter radius compensation is active.
The MOD command is effective for specific blocks, and must be explicitly programmed for every axis that is
selected for modulo operation. The modulo position's arithmetic sign specifies the direction of rotation.
• Positive sign: The axes moves in the 'larger' direction
• Negative sign: The axes moves in the 'smaller' direction
• Exception: The axis cannot move to modulo -0, since zero has no sign
Sample 1:
N10 G90
N20 G01 MOD[X200] Y30 F600
N30 G01 X200
N20 specifies a move in a positive direction for X to modulo position 200. Y moves to absolute position 30. In
block N30, X is moved absolutely to position 200, i.e. not modulo.
The MOD command also allows movements of more than a 360 degrees to be made.
Sample 2:
N10 G90
N20 G01 X3610 F6000
N30 R1=360
N40 G01 MOD[X=R1+20]
In this example, the X axis moves 370 degrees to modulo position 20.
Modulo factor
The function block 'CfgBuildExt3DGroup [} 182] ' from the library Tc2_NCI, for example, may be used for
adding to the interpolation group from the PLC.
Syntax
The auxiliary axes are addressed as Q1..Q5 from the part program. The numerical value may be assigned
directly, or an R-parameter.
Sample 1:
(start position X=Y=Z=Q1=0)
N10 G01 X100 Q1=47.11 F6000
...
If an NC block is programmed with one or more path axes and an auxiliary axis, both axes start
simultaneously and also reach the destination together.
The term "swiveling of the auxiliary axes" is used if the path length within a motion set is zero. This is often
the case during 'swiveling' of a tool, with the feed angle relative to the contour being changed.
Since the path length is zero, there is no link to the path, and the movements of the auxiliary axes are
calculated via a virtual path. However, this has no influence on the real path of X, Y and Z, but here too all
auxiliary axes are started simultaneously and also arrive at the destination simultaneously.
Here too, the velocity is specified via the F-parameter and now refers to the auxiliary axis with the greatest
travel distance.
Sample 1:
(start position X=Y=Z=Q1=Q1=0)
N10 G01 X100 F6000
N20 Q1=100 Q2=200 F3000
...
In N20, the velocity of Q2 is now 3000 and that of Q1 is 1500, since the travel distance is Q1=Q2/2.
On the stadium straight, the orientation of the tool remains constant, i.e. the tool is not turned. In contrast,
the orientation relative to the base coordinate system must be changed continuously within the circle.
Assuming the path velocity in the transition between straight and circle is not reduced to zero, a step change
in velocity is inevitably generated for the swiveling axis (but not for the path axes!).
This step change in velocity of the auxiliary axis is freely parameterizable and depends on the machine.
Extreme cases would be for the path velocity at such segment transitions to be reduced to zero, or for the
velocity not to be reduced at all.
The global axis parameter 'VeloJumpFactor', which can be set individually for each axis, is used for the
parameterization. The resulting velocity and the calculation is described in more detail in the TwinCAT NCI
appendix on page Parameterization [} 301].
As has been described above, step changes in velocity can occur at the segment transitions. The size of
these steps can be affected by the VeloJump parameter.
It is further possible for a tolerance sphere to be specified for every auxiliary axis. This sphere is symmetrical
with the path at a segment transition. On entering this sphere, the velocity of the auxiliary axis is
continuously modified to reach the set velocity at the exit of the sphere. The step changes in velocity are, in
other words, eliminated. This does imply that the auxiliary axis is subject to a positional error when it is within
the sphere. On entering the sphere the change to the new target velocity of the axis starts immediately. This
avoids an overshoot in position, and the position is again precise at the borders of the sphere.
If it happens that the specified sphere is larger than 1/3 of the path, its radius is automatically restricted to
that value.
The tolerance sphere of the auxiliary axis is an axis parameter (IO: 0x108). It can be set in the axis interface
in the XAE or via ADS [} 407].
Diagnosis
It is possible to record the tolerance sphere of each auxiliary axis and the position error that results from this
for diagnostic purposes. It is also possible to access the variables via ADS. They are to be found in the
group status [} 396] (IO: 0x54n and 0x56n).
If the size of the tolerance sphere has to be reduced due to the given geometry, the VeloJump parameter is
automatically adjusted for this segment transition. I.e. the path velocity in the transition is reduced more
strongly. So the dynamics of the auxiliary axis is not exceeded for smaller tolerance spheres.
Positional deviation of the auxiliary axis if the tolerance sphere has to be reduced
The parameter 'maximum permitted positional deviation of the auxiliary axis' only takes effect if the tolerance
sphere would have to be reduced due to the geometry.
The aim is to keep the path velocity high despite the smaller tolerance sphere, as long as the resulting
position error does not exceed a threshold value. To this end the velocity of the auxiliary axis is kept constant
and the position error is calculated. If the error is smaller than the maximum positional deviation the velocity
is maintained for this segment transition, and the resulting position error is compensated in the next segment
(the tolerance sphere then becomes unnecessary for this segment transition).
In the event that the position error would exceed the maximum deviation, the reduced tolerance sphere takes
effect, including the VeloJump factor. And the path velocity is reduced if necessary.
Sample 1:
Initial conditions:
• Set tolerance sphere: 5
• Max. positional deviation: 1
• The given geometry results in an effective tolerance sphere of 0.2, for example
• The potential positional deviation is 0.3
Resultant behavior:
• The path velocity remains at a constant high level
• The velocity of the auxiliary axis is kept constant
• For this transition no tolerance sphere is required
• The resulting positional deviation is compensated in the subsequent segment
Sample2:
Initial conditions:
• Set tolerance sphere: 5
• Max. positional deviation: 1
• The given geometry results in an effective tolerance sphere of 1.2, for example
• The potential positional deviation is 1.1
Resultant behavior:
• The tolerance sphere is adjusted
• The VeloJump parameter is adjusted
• The path velocity is reduced at the segment transition
• There is no positional deviation that has to be compensated
Parameterization
The parameterization of the maximum permitted positional deviation is an axis parameter [} 407]. By default
this feature is switched off (deviation = 0.0)
4.3.1 M-Functions
A range of equipment, such as collet chucks, drill drives, transport equipment etc. is best not driven directly
by the NC, but indirectly, using the PLC as an adapting and linking controller. This makes it easy to consider
feedback or safety conditions, without having to adapt the NC program, or even the NC system. The NC’s M-
functions involve digital signal exchange: functions are switched on or off, activated or deactivated. The
transfer of numerical working parameters is not provided for here, but can be implemented in other ways (H-
functions [} 149], T-numbers [} 149] etc.).
Number of M-functions
M function Meaning
0..159 Freely definable M-functions (except 2, 17, 30)
2 Program end
17 End of subprogram
30 Program end with deletion of all fast M functions
All M-functions (apart from the 3 pre-defined M-functions - M2, M17, M30) are freely definable. This means
that, depending on the machine type, M8 can be used to switch on a cooling medium or indeed for any other
functionality, for example. The machine manufacturer can select the function as required.
Like any other rules, the rules for reserved M-functions are read when TwinCAT is started. Additionally, an
internal code is generated for these functions in the interpreter, which is responsible for the behavior
described. These 3 M-functions therefore do not have to be described in the table. It makes sense to
parameterize M2 and M30, even if M-functions are used.
Types of M-functions
Basically, two signal exchange versions are available: fast signal bits, or transfer secured by handshake.
Secured Handshakes
M-functions that require feedback must be processed using bi-directional signal exchange between the NC
and the PLC. If an M-function of type handshake is programmed, the velocity is reduced to 0 at this point.
The PLC uses the ItpIsHskMFunc [} 210] function to check whether an M-function with handshake is present,
in which case the number of the M-function is determined via ItpGetHskFunc [} 210]. The NC is in a waiting
state and will not process further NC commands until the PLC has acknowledged the M-function. Processing
of the NC program continues once acknowledgement has been received from the PLC (ItpConfirmHsk
[} 190]).
This procedure permits the operation of the equipment controlled by the NC to be securely coordinated with
the equipment controlled by the PLC. It is therefore advisable to acknowledge the M-function for starting the
spindle (e.g. M3) once a minimum speed has been reached.
Since this kind of M-function involves synchronous functions, it is only ever possible for one M-function with
handshake to be active in the NC program.
If no feedback is required from the PLC, fast signal bits can be used for activating M-functions. Since the NC
does not have to wait for the PLC with these M-functions, look-ahead [} 108] can combine the segments. In
this way it is possible to apply an M-function without velocity reduction.
This type of M-function is useful for in-motion activation of a nozzle for applying adhesive, for example.
A combination of fast signal bits and handshake is also possible. Since a handshake always requires
acknowledgement from the PLC, the velocity has to be reduced to 0 in this case.
The signal bits are active until they are reset explicitly, or until an M30 (end of program) or channel reset is
executed.
Each M-function can reset up to 10 fast M-functions. If cooling medium is switched on with M8, for example,
the cooling medium can be switched off again with M9. To this end simply enter M8 in the reset list for M9.
Automatic reset
During parameterization of the M-function an 'auto-reset flag' can be set. This means that the M-function is
automatically reset at the end of the block.
In order for the PLC to be able to see the signal, the duration of the motion block must be long enough, or
this M-function is combined with a handshake. The handshake may come from the same or a different M-
function.
The fast M-functions can be reset from the PLC via the ItpResetFastMFunc [} 263] function block. For
reasons of transparency, mixed resets using via PLC and NC should be avoided.
A channel stop and a channel reset are used to reset all pending M functions. This is true for the 'handshake'
type M functions, and also for the fast signal bits. If the NC program is terminated properly with M30, all M-
functions are also cleared.
No
HShake
Fast
If a value other than 'None' is entered, a 'fast signal bit' type M-function is executed
• None: No fast M-function is executed
• BM (Before Move): If a movement is programmed in the same block, the output is completed before
the movement.
• AM (After Move): If a movement is programmed in the same block, the output is completed after the
movement.
• BMAutoReset (Before Move & Automatic Reset): If a movement is programmed in the same block, the
output is completed before the movement. In addition, the M-function is automatically cancelled at the
end of the block, i.e. the M-function is active on a per-block basis. In order to ensure that the PLC
recognizes the M-function, the duration of the associated motion block must be long enough (at least 2
PLC cycles), or an additional M-function with handshake should be programmed.
• AMAutoReset (After Move & Automatic Reset): This parameterization is only meaningful if either an M-
function of type handshake is programmed at the same time (or parameterized), or if the M-function is
only used for resetting other M-functions. Without an additional handshake the PLC will usually not be
able to detect this M-function.
• All other combinations can be selected for compatibility reasons.
Reset
NOTE! In the event that no reset-signal-bit is in fact set, the bits to be cleared are reset
immediately before setting the new signal bits.
Import/Export
The M-functions are parameterized individually for each channel. The parameterization can be transferred to
other channels via the import/export function.
Sample:
N10 G01 X1000 F60000
N20 M10 M11 M12 X2000 (M10 & M11 are signal bits)
(M12 is of type handshake)
M30
In this context the H-parameter stands for auxiliary parameter and is of type DINT (32 bit signed).
The T and S parameters are of type WORD, and stand for Tool and Spindle.
Sample:
H=4711
R1=23
S=R1
T4711
NOTE! No R-parameter can be assigned for the T-parameter. Furthermore, the assignment is made
without assignment operator ('=').
T- and S-parameters take effect at the start of a block, H-parameters take effect at the end of the
programmed block.
A decoder stop can be used, for instance, to switch block skipping [} 108] on or off from the PLC, or to re-
assign R parameters [} 115].
Acknowledgement of an M-function
Decoding of the NC program is interrupted until the M-function [} 145], which is programmed immediately
prior to the decoder stop, is acknowledged. In other words, the M-function must be of type "handshake".
Sample 1:
N10...
N20 M43 (M-function with handshake)
N30 @714 (decoder stop)
N40 ...
The decoder stop does not necessarily have to be programmed in conjunction with an M-function. If the SAF
task runs out of travel commands, an event is sent to the interpreter. This event causes the interpreter to
start up again.
NOTE! The decoder stop must not be programmed when the tool compensation or circle
smoothing are active, because they wouldn`t work anymore.
If a decoder stop with rescan is programmed, it is essential to program an M-function with handshake
immediately before it.
Sample 2:
N10...
N20 M43 (M function with handshake carries out a tool change, for
example)
N30 @716 (Decoder stop with rescan)
N40 ...
NOTE! The decoder stop must not be programmed when the tool compensation or circle
smoothing are active, because they wouldn`t work anymore.
Sample:
During positioning with a flying M-function, a process A is initiated by the NC partial program. It is assumed
here that the set of processes in the NC program is typically long enough for process A to be completed in
the PLC. If A is ready, then the NC partial program should execute the next segment with look-ahead. In
case A is not ready, however, then the NC should stop at the end of the segment and wait until process A
has finished. It is exactly this scenario that can be implemented with the command @717. The PLC here
sends the so-called 'GoAhead [} 207]' command when process A has finished.
N10 ...
N20 G0 X0 Y0 Z0
N30 G01 X500 F6000
N40 M70 (flying M-function that triggers process A)
N50 G01 X700
N60 @717 (decoder stop with external trigger event)
N70 G01 X1000
N80 ...
If the GoAhead signal reaches the PLC early enough, then blocks N50 and N70 are linked by look-ahead,
and the path velocity is not then reduced. If the signal arrives during the deceleration phase of N50, then the
velocity is once more increased. Otherwise, the machine waits for the signal from the PLC.
NOTE! The decoder stop must not be programmed when the tool compensation or circle
smoothing are active, because they wouldn`t work anymore.
The function block 'ItpGoAheadEx' returns the error code 0x410A, if no @717 is present in the interpreter at
the time of the call.
4.3.4 Jumps
Code Function
@100 [} 152] Unconditional jump
@121 [} 152] Jump if unequal
@122 [} 152] Jump if equal
@123 [} 152] Jump if less or equal
@124 [} 152] Jump if less
@125 [} 152] Jump if greater or equal
@126 [} 152] Jump if greater
@111 [} 152] Case block
Unconditional jump
Command @100
Parameter K or R
The parameter describes the jump destination. This must have an indication of direction ('+' or '-').
Sample 1:
N10 ..
...
N120 @100 K-10
In this example, execution continues from line 10 after line 110 has been interpreted. The sign indicates the
direction in which the line to be searched can be found.
Jump if unequal
Command @121
Parameter 1 R<n> Comparison value
Parameter 2 K or R<m> Comparison value
Parameter 3 K Jump destination with direction
indication
Sample 2:
N10 ..
...
R1=14
N120 @121 R1 K9 K-10
N130 ...
Jump if equal
Jump if less
Jump if greater
Case block
Command @111
Parameter 1 R<n> Comparison value
Parameter 2 K or R<m> First comparison value
Parameter 3 K First jump destination
Parameter 4 K or R<m> Second comparison value
...
Sample 3:
N300 R0=300
N310 @100 K5000
N400 R0=400
N410 @100 K5000
N500 R0=500
N510 @100 K5000
N5000 M30
If R2 = 13, the jump destination is line 400. If R2 = 14, the jump destination is line 500.
In the event that none of the conditions is satisfied, execution simply continues with the next line (in this
case, line 300).
4.3.5 Loops
The various types of loop are described below.
While loops
A while loop is executed for as long as the condition is satisfied. The test is made at the beginning of the
loop. If the condition is not or no longer met, a jump to the specified line takes place (parameter 3).
At the end of the While loop an unconditional jump (@100 [} 151]) must be programmed. The target of this
jump is the line number of the while loop.
Sample 1:
N100 R6=4
N200 @131 R6 K4 K600 (K600 is the target of the jump, when the condition is no longer satisfied)
N210 ...
N220 @100 K-200
N600 ...
N5000 M30
The loop (lines 200 to 220) is repeated for as long as R6 = 4. Once the condition is no longer satisfied,
execution jumps to line 600.
Repeat loops
In a repeat loop, the interrogation takes place at the end of the loop. This means that the loop is executed at
least once. The loop is only ended, to continue with the rest of the program, when the condition is satisfied.
Sample 2:
N200 ...
N210 ...
The loop is repeated until R6 = 25. The second constant in line 300 gives the jump target (the start of the
loop).
For-To loops
A for-to loop is a counting loop that is executed until the variable equals the value. The test is made at the
beginning of the loop. If that condition is satisfied, execution jumps to the line specified by the constant.
The variable must be incremented (@620) at the end of the loop, and there must be an unconditional jump to
the start of the loop.
Sample 3:
N190 R6=0
N200 @151 R6 K20 K400
N210 ...
N290 @620 R6 (increment R6)
N300 @100 K-200
For-Downto Loops
A for-downto loop is a counting loop. The behaviour is similar to that of a for-to loop. The difference is merely
that the variable is decremented (@621) by 1 at the end of the loop.
Subroutines are identified within a program by a number. This number must be unique: there must be only
one subroutine with a particular number (1..>2.000.000.000).
As interpretation proceeds, the calling program is suspended. The text of the subroutine is worked through,
as often as necessary. Processing then returns to the calling program after the call location.
It is of course possible for one subroutine to call another subroutine. This call is executed in a similar way.
This causes a stack of return information to be created. For technical reasons this nesting of subroutines is
presently limited to 20 levels.
Definition of a Subroutine
The code for a subroutine can be written to the same file as the calling program. In this case the subroutine
is linked directly: it is automatically also loaded as the file is read. If it is to be made generally available then
it must be written in its own file that must be located in the CNC directory.
The name of the file begins with the letter 'L', and continues with a string of digits. This digit string must
repeat the subroutine number, without any leading '0's.
The code should contain a label to indicate the starting point of the subroutine. Like the file name, it consists
of the letter 'L' and the digit sequence described above.
Subroutine syntax:
(Datei L2000.NC)
L2000
N100...
N110...
...
N5000 M17 (return command)
Calling a Subroutine
The following syntax must be used to call a subroutine from some block within the NC program. It is
important that the expression "L2000" does not stand at the start of the line, in order to avoid confusion with
a subroutine label.
(syntax of the subroutine call)
N100 L2000
In the following sample the expression "P5" causes the subroutine to be repeated 5 times.
(n-fold subroutine call (here: 5- fold))
N100 L2000 P5
In some cases the subroutine to be called is not known until runtime. In this case the subroutine can be
called with an R-parameter, thereby avoiding the need for a CASE instruction. The value for R must be
allocated or calculated in a dedicated line.
(Dynamic call of a subroutine)
N099 R47=R45+1
N100 L=R47
Parameter passing
Parameters are passed to subroutines with the aid of R-parameters [} 115]. Note that R-parameters are not
saved automatically (see Rescuing R-parameters [} 115]).
Use of Parameters
R-parameters can, in general, be freely used within subroutines. This has a number of consequences that
can lead to errors if they are not borne in mind. On the other hand their careful use offers the NC-
programmer a range of useful working techniques.
Results of Subroutines
If an R-parameter is changed without its contents being saved and restored, the change is effective after a
return from the subroutine. If this was not intended, the result can be machine behavior that was not
planned.
This feature can however be deliberately used in order to make the continuation of the processing
dependent on the results of a subroutine. No restriction need be considered here other than those on the R-
parameters.
Sample:
N100 L2000
N110 R2=R3+R4
...
N999 M30
L2000
N10 R3=17.5
N20 R4=1
N99 M17
Values are specified here in a subroutine. The values are then used in the calling program.
Ending a Subroutine
Sample:
N10 G01 X100 Y200 F6000
N20 DynOvr=0.4
N30 G01 X500
'DynOvr' can be used to make percentage changes to the dynamic parameters of the axes in the group while
the NC program is running. This also results in new values for the motion dynamics. The new dynamic
values become valid, without any stop, when the line is executed. This means, for the example illustrated
above, that in block 10 the old values will still be used for the deceleration, while the new values will be used
for acceleration in block 20.
Scope of Definition
0 < DynOvr ≤ 1
Sample:
N10 G01 X100 Y200 F6000
N15 R4=3000
N20 #set paramPathDynamics( 700; 700; R4 )#
N30 G01 X500
The 'paramPathDynamics' command can be used to alter the motion dynamics as the NC program is
running. The new dynamic values become effective as from the line in which they are programmed. For the
example illustrated, this means that the whole of block 10 is still treated with the default values. The new
parameters are used for block 30 from the start of the segment.
This command limits all path axes to the parameterized dynamic values, although the path itself can have
higher dynamics, depending on its orientation. The dynamics of auxiliary axes remains unchanged.
NOTE! The dynamic values changed via the NC program remain active until the interpreter is next
reset and/or TwinCAT has been restarted.
NOTE! The old command 'paramGroupDynamics' continues to be valid. However, it cannot be used
to transfer R parameters.
Command #set
paramGroupDynamics(<grp>,<acc>,<dec>,<jerk>)#
Parameter <grp> Group for which the alteration of the motion dynamics
is to be effective. Presently always 1.
Parameter <acc> Value of the maximum permitted path acceleration in
mm/s^2.
Parameter <dec> Value of the maximum permitted deceleration in mm/
s^2.
Parameter <jerk> Value of the maximum permitted jerk in mm/s^3.
Sample:
N10 G01 X100 Y200 F6000
N20 #set paramGroupDynamics( 1, 700, 700, 3000 )#
N30 G01 X500
Sample:
N10 G01 X100 Y200 F6000
N15 R4=30000
N20 #set paramAxisDynamics( 0; 1500; 1400; R4 )#
N30 G01 X500
'paramAxisDynamics' can be used to change the axis dynamics at runtime. Generally the behavior is the
same as for 'paramPathDynamics', except that here the dynamics can be specified individually for each axis.
C0 reduction
In some types of machine it is not absolutely necessary to reduce the path velocity to 0 at knee-points. 2
reduction methods are available
• VeloJump
• DeviationAngle
VeloJump
The 'paramVeloJump' command can be used to alter the velocity step change factors as the NC program is
running. The new values come into effect via the block execution in the programmed line. You can find
further details of the means of operation in the appendix under Parameterization [} 301].
Sample:
N10 G01 X100 Y200 F6000
N20 R2=4.5
N30 #set paramVeloJump( 1.45; R2; R2 )#
N40 G01 X500
Resetting parameters
The VeloJump parameters changed via the NC program remain active until the interpreter
is next reset and/or TwinCAT has been restarted.
Note
The 'paramDevAngle' command is used to describe the parameters for the C0 reduction. In contrast to the
VeloJump reduction method, in which the velocity step change is influenced directly, in the DeviationAngle
method the velocity step change depends upon the angle. You can find further details of the means of
operation in the appendix under Parameterization [} 301].
Sample:
N10 G01 X100 Y200 F6000
N20 #set paramDevAngle(0.15; 5; 160 )#
N30 G01 X500
Resetting parameters
The DeviationAngle parameters changed via the NC program remain active until the inter-
preter is next reset and/or TwinCAT has been restarted.
Note
C1 reduction factor
The 'paramC1ReductionFactor' command is used to change the C1 reduction factor while the NC program is
running.
The new parameter comes into effect at the segment transition at which the reduction factor is programmed.
In the example shown, the new value for the C1 reduction is therefore already effective in the segment
transition from N10 to N30.
You can find further details of the means of operation in the appendix under Parameterization [} 301].
Sample:
N10 G01 X100 Y200 F6000
N20 #set paramC1ReductionFactor( 0.45 )#
N30 G01 X500
Resetting parameters
The C1 reduction factor changed via the NC program remains active until the interpreter is
next reset and/or TwinCAT has been restarted.
Note
C2 reduction factor
The 'paramC2ReductionFactor' command is used to change the C2 reduction factor while the NC program is
running.
The command takes effect in the segment transition for which the reduction factor is programmed. In the
example shown, the new value for the C2 reduction is therefore already effective in the segment transition
from N10 to N30.
Sample:
N10 G01 X100 Y200 F6000
N20 #set paramC2ReductionFactor( 1.45 )#
N30 G01 X500
Resetting parameters
The C2 reduction factor changed via the NC program remains active until the interpreter is
next reset and/or TwinCAT has been restarted.
Note
The 'paramVeloMin' command can be used to alter the minimum path velocity while the NC program is
running. The new velocity comes into effect via the block execution in the programmed line.
Sample:
Resetting parameters
The minimum velocity changed via the NC program remains active until the interpreter is
next reset and/or TwinCAT has been restarted.
Note
Note
Sample 1:
N10 G0 X0 Y0 Z0 F24000
N30 G01 X1000
N40 @361 R1 K0 (read position of x axis)
N50 R0=X
N60 G01 X=R0+R1
N70 M30
A decoder stop is implicitly executed by @361 command. This ensures that, in this example, the position is
read when block N30 has been processed.
A possible application would be in combination with the deletion of any remaining travel.
The command #get PathAxesPos( )# reads the current actual positions of the path axes (X, Y & Z). It
behaves similarly to @361, with the difference that this command does not trigger an implicit decoder stop.
This means that the programmer must himself ensure that at the time when the command is being
processed in the interpreter the axes have not yet moved, or else a decoder stop (@714) must be
programmed in the block before this command.
Sample 2:
@714(optional)
N27 #get PathAxesPos( R0; R1; R20 )#
NOTE! If a path axis is not assigned (e.g. no axis is assigned to Z) the value 0 is passed to the
associated R parameter.
Movements of unavailable but programmed main axes (X, Y & Z) can be skipped with the command 'skip
VirtualMovements'.
Sample:
The interpolation group (CfgBuildGroup) contains only assignments for the X and Y axis. The Z axis is not
assigned, but programmed in the parts program.
(Startposition X0 Y0 Z0)
N10 #skip VirtualMovements(1)#
N20 G01 X100 Y200 F6000
N30 G01 Z1000 (virtual movement, because z is not assigned)
N40 G01 X500
The text can not be used to transfer further parameters (e.g. R-parameters).
The relevant columns (parameters) for this type of tool are described below.
Drills
Parameter Meaning
0 Tool number
When this D-word is called, a tool number that is
specified here can be given at the same time.
1 Tool type
The drill is type 10.
2 Geometry: Length
Describes the length of the drill.
5 Wear: Length
Describes the wear on the drill. The wear has to be
given as a negative value, since it is added to the
length.
8 Cartesian tool displacement [} 164] in X direction
9 Cartesian tool displacement in Y direction
10 Cartesian tool displacement in Z direction
Shaft Cutters
Parameter Meaning
0 Tool number
When this D-word is called, a tool number that is
specified here can be given at the same time.
1 Tool type
The shaft cutter is type 20
2 Geometry: Length
Length of the shaft cutter.
4 Geometry: Radius
5 Wear: Length
7 Wear: Radius
8 Cartesian tool displacement [} 164] in X direction
9 Cartesian tool displacement in Y direction
10 Cartesian tool displacement in Z direction
As already mentioned, the tool data can be written directly from the XAE. To do this, edit the window shown
above.
In addition, tool data can be read and written from the PLC with the function block ItpWriteToolDescEx
[} 230].
In some applications, it is more convenient to write the tool data directly from the part program.
The tool set to be overwritten must not be active during the write process. This means, for example, if tool
radius compensation with parameter set D10 is active, this cannot be overwritten, as long as D10 is still
selected.
Sample:
N10 G0 X0 Y0 Z0
N20 G01 X100 F60000
N30 R1=10 R2=4 R3=20.3
N40 #set ToolParam(10; 0; 5)# #set ToolParam(10;1;20)#
N50 #set ToolParam(R1; R2; R3)#
N60 G41 X200 Y D10
...
NOTE! No formulas may be transmitted as parameters. Writing of the tool data does not require a
decoder stop.
Sample:
N10 G0 X0 Y0 Z0
N20 G01 X100 F60000
N30 R1=10 R2=4
N40 #get ToolParam(10; 0; R5)# #getToolParam(10;1;R20)#
N50 #get ToolParam(R1; R2; R3)#
N60 G41 X200 Y D10
...
Notes:
NOTE! No formulas may be transmitted as parameters. Reading of the tool data does not require a
decoder stop.
The feed direction is specified with P (see working plane and feed direction [} 111]).
To effect the movement corresponding to the length compensation, the axis concerned must at least be
mentioned.
Sample:
N10 G17 G01 X0 Y0 Z0 F6000
N20 D1 X10 Y10 Z
N30 ...
N90 M30
NOTE! Length correction is automatically selected when cutter radius compensation [} 167] is
selected.To deselect length correction, D0 has to be programmed. It is again here necessary to at
least mention the axis concerned in order to move to the new position.
Parameter
The parameters for a translation are entered into the tool data [} 162] in the same way as the tool length etc.
Parameters 8 to 10 are available for this purpose. Here
• P8 always describes the X-component
• P9 always describes the Y-component
• P10 always describes the Z-component
As in the case of length compensation, tool displacement is switched on with D<n> (n>0). In order to travel to
the translated location, the axes must at least be named. This means that the displacement affects the
positioning when the axis is called for the first time. It is also possible for a new final position to be entered
for the axis.
The function is switched off with D0. Here again, it is necessary for the axes at least to be named, if the axes
are to travel to their new co-ordinates.
Sample 1:
N10 G17 G01 X0 Y0 Z0 F6000
N20 D1 X10 Y10 Z (Z-Axis is repositioned)
N30 ...
N90 M30
Sample 2:
N10 G17 G01 X0 Y0 Z0 F6000
N20 D1 X10 Y10 (Z-Axis is not moved)
N30 ...
N90 M30
Application sample
It often happens that a processing machine's tool carrier contains a number of tools. The appropriate tool is
pneumatically activated according to the kind of machining required. Since, however, the tools are located at
different positions, Cartesian tool displacement is required.
Tool parameters
Parameter Value
0 0..65535
1 10
2 40
5 0
8 100.0
9 0.0
10 50
Default behavior
If a new tool offset (and also length compensation) is selected in incremental dimensions (G91), then the
compensation is applied once the axis is named.
Sample 3:
(Tooloffset D1: X10 Y20 Z30)
N10 G01 D1 X100 Y0 Z0 F6000
N20 G91 (incremental dimension)
N30 D2 (Tooloffset D2: X100
Y200 Z300)
N30 Z10
N40 ...
Command Description
ToolOffsetIncOn The tool displacements and length compensations
are also applied under G91 once the axis is named
ToolOffsetIncOff The tool displacement and length compensation are
not applied under G91
Sample 4:
(Tooloffset D1: X10 Y20 Z30)
N05 ToolOffsetIncOff
N10 G01 D1 X100 Y0 Z0 F6000
N20 G91 (incremental dimension)
N30 D2 (Tooloffset D2: X100
Y200 Z300)
N30 Z10
N40 ...
In N10 the Tooloffset is applied to all 3 axes. I.e. the axes move in the machine coordinate system (MCS) to
X110 Y10 Z30.
In N30 the new Tooloffset of the Z-axis is not applied. This results in MCS X110 Y10 Z40.
Command G40
Cancellation G41 [} 167] or G42 [} 168]
The G40 function switches the miller/cutter radius compensation off. The length radius compensation [} 164]
will still remain active until it is switched off with D0. Between G40 and end of program it is madatory to
program at least one geometry element.
Command G41
Cancellation G40 [} 167]
The function G41 switches on the miller/cutter radius compensation. The tool is located to the left of the
workpiece in the direction of movement.
As has already been seen for the length compensation [} 164], the cutter radius compensation can only be
activated when G0 [} 118] or G1 [} 119] is in effect. The axes of the plane must be driven when the cutter
radius compensation is selected.
Sample:
N10 G17 G01 X0 Y0 Z0 F6000
N20 G41 X10 Y20 Z D1
N30 X30
N40 G40 X10 Y10 Z
N50 M30
Notes:
• The cutter radius compensation should be deactivated before the end of the NC program, in order to
close it properly. Between G40 and end of program it is mandatory to program at least one geometry
element.
• If a decoder stop [} 150] is programmed, cutter radius compensation has to be disabled first.
• For arcs, radius compensation can lead to a change in the path velocity at the contour. See also 'Path
velocity in arcs [} 172]'.
• See Orthogonal contour approach/departure [} 172].
Command G42
Cancellation G40 [} 167]
The function G42 switches on the miller/cutter radius compensation. The tool is located to the right of the
workpiece in the direction of movement.
NOTE! If a change is to be made from G41 to G42, then a G40 should be programmed between the
two movements.
After the radius compensation is switched on, it must be applied. This means the cutter is at one point P1
(without radius compensation) and travels to P2', with the cutter radius being compensated at point P2'.
Point P2' depends on the start position P1 within the plain. A distinction is made between 3 basic cases.
These cases are exemplified below during application of the radius compensation with a programmed G42
(right compensation).
Similar rules apply for the deactivation of the compensation, except that the tangent t is determined at the
end of the path segment, with similar conditions being derived.
If the starting point P1 is to the right of the path tangent t, P2' is orthogonal to the tangent. This start-up
behavior applies to the range hatched in green.
Case 2: P1 the right of the normal n and to the left of the path tangent t
If the start position P1 is to the right of the normal n and to the left of the path tangent t, P2' is moved. P2'
results from the intersection of the parallel of P1P2 and the offset distance P2P3. Both straight lines are
offset by radius R.
Case 3: P1 to the left of the normal n and to the left of the path tangent t
If the start position P1 is to the left of the normal n and also to the left of the path tangent t, an additional
circle segment is inserted during approaching of P2'. In order to avoid free cutting at P2, P2' is not orthogonal
to the start tangent of the section P2P3.
The additional circle segment is inserted for all start positions within the hatched green region.
The radius compensation is invariably applied via a straight line. (This must be set in the part program, since
otherwise a runtime error will be generated). The contour can then start with a circle. The rules for starting
and stopping are the same as before, i.e. here too the path tangent of the contour for P2 is determined, and
a distinction is made between the three cases described.
If P2' is always to be approached orthogonal to the path tangent of P2, independent of the starting point, this
can be realized with an additional command (see Orthogonal contour approach/departure [} 172]).
The 'NORM' command has the effect that the contour is approached orthogonally when cutter radius
compensation is switched on. The actual position of the cutter is irrelevant. When de-selecting, the last
segment with active compensation is also left orthogonally.
Sample:
N10 G17
N20 G01 X0 Y0 Z0 F6000
N30 G42 NORM X100 Y0 D5
N40 X200
N50 G40 NORM X220 Y0
N60 M30
NOTE! The Norm command has hitherto only been implemented for straight line/straight line
transitions.
Command CFC
Cancellation CFIN or CFTCP
With CFC (constant feed contour) the feedrate at the contour is held constant.
Command CIN
Cancellation CFC or CFTCP
With CFIN (constant feed internal radius) the feedrate at internal radii is reduced. This results in a constant
velocity at the contour. The velocity at external radii is not increased.
Command CFTCP
Cancellation CFC or CFIN
With CFTCP (constant feed tool center point) the feedrate of the tool’s center point is kept constant. This
means that at internal radii the velocity at the contour is increased, and that it is correspondingly reduced at
external radii.
Command CDON
Cancellation CDOF
In this form, this behavior can only occur in combination with cutter radius compensation (G41/G42). In order
to prevent such contour collisions, monitoring can be switched on from the part program via CDON. For it to
be active, cutter radius compensation must also be selected.
The response of the NCI when a bottleneck is detected can be parameterized via the PLC. 3 cases are
distinguished:
• Error and abort
If a bottleneck is detected, TwinCAT generates a runtime error and aborts the program execution.
• Notification and modification of the contour
If a bottleneck is detected, the contour is modified such that a contour collision is avoided (see Figure
1: blue line). However, this also means that segments may be left out, depending on the program.
Furthermore, a note is entered in the application viewer to say that a bottleneck was detected.
• Notification and contour collision
If a bottleneck is detected, the contour is not changed and no error is generated. Only a message is
entered in the application viewer.
Significant computing resources are required for contour collision monitoring. It should therefore only be
selected if it is actually required. Furthermore, the amount of look-ahead for the bottleneck detection should
be specified. This requires the number of future segments to be determined that are monitored relative to the
n-th segment, in order to check for bottlenecks. The selected number of segments should not be too large,
since this would put unnecessary strain on the system. The value for the look-ahead is also parameterized
from the PLC.
• ItpGetBottleNeckLookAheadEx [} 195]
Sample:
N10 G0 X0 Y0 Z0
N20 CDON
N30 G01 G41 D3 X100 F6000 (cutter radius 30mm)
...
N40 G01 X200
N50 G02 X220 Y-74.641 I0 J-40
N60 G01 X300 Y-104
N70 G01 X230 Y120
N80 G40 D0 Y200
N90 CDOF
...
M30
Address Description
Q<n> [} 141] Axis label for auxiliary axis ( 1 <= n <= 5)
Machine data
5.1.1 Configuration
The library Tc2_NCI provides function blocks for general NC axis configuration. This makes it possible to
configure or to reconfigure axes in a simple way directly from the PLC.
Requirements
5.1.1.1 CfgBuild3DGroup
This function block configures a 3D group with up to 3 PTP axes (X, Y and Z).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGroupId : UDINT;
nXAxisId : UDINT;
nYAxisId : UDINT;
nZAxisId : UDINT;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.1.2 CfgBuildExt3DGroup
This function block configures a 3D group with up to 3 path axes (X, Y and Z). Additionally, up to 5 auxiliary
axes (Q1..Q5) can be configured.
The axis IDs of the PTP axes that are to be included in the interpolation group are applied at the inputs
nXAxisId to nQ5AxisId.
NOTE! The assignment of the auxiliary axes must start with nQ1AxisId. No gaps between auxiliary
axes are permitted. For example, if nQ3AxisId is to be assigned, nQ2AxisId must also be assigned a
valid Axis ID.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGroupId : UDINT;
nXAxisId : UDINT;
nYAxisId : UDINT;
nZAxisId : UDINT;
nQ1AxisId : UDINT;
nQ2AxisId : UDINT;
nQ3AxisId : UDINT;
nQ4AxisId : UDINT;
nQ5AxisId : UDINT;
tTimeOut : TIME;
END_VAR
nXAxisId: Axis IDs of the PTP axes to be included in the interpolation group
nYAxisId: Axis IDs of the PTP axes to be included in the interpolation group
nZAxisId: Axis IDs of the PTP axes to be included in the interpolation group
nQ1AxisId: Axis IDs of the PTP axes to be included in the interpolation group
nQ2AxisId: Axis IDs of the PTP axes to be included in the interpolation group
nQ3AxisId: Axis IDs of the PTP axes to be included in the interpolation group
nQ4AxisId: Axis IDs of the PTP axes to be included in the interpolation group
nQ5AxisId: Axis IDs of the PTP axes to be included in the interpolation group
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.1.3 CfgAddAxisToGroup
The CfgAddAxisToGroup function block configures a single axis at a particular location within an existing
group (PTP, 3D, FIFO).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGroupId : UDINT;
nAxisId : UDINT;
nIndex : UDINT;
tTimeOut : TIME;
END_VAR
nIndex: Position of the axis within the group; can have values between 0 and n-1. Depending on the type of
group, n has the following significance: PTP: n = 1, 3D: n = 3, FIFO: n = 8
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.1.4 CfgReconfigGroup
The CfgReconfigGroup function block removes the axis allocation of an existing group (NCI or FIFO),
returning the axes to their personal PTP groups.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGroupId : UDINT;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.1.5 CfgReconfigAxis
The CfgReconfigAxis function block returns a single axis from, for example, a 3D group, to its personal PTP
group.
Interface
VAR_INPUT
bExecute : BOOL;
nAxisId : UDINT;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.1.6 CfgRead3DAxisIds
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGroupId : UDINT;
pAddr : PVOID;
tTimeOut : TIME;
END_VAR
pAddr: Address of the variable into which the function block writes the axis IDs of the group assignment
(array with three elements of type UDINT)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Sample:
VAR
(* instance *)
ReadAxIds : CfgRead3DAxisIds;
AxIds : ARRAY[1..3] OF UDINT;
END_VAR
ReadAxIds( bExecute := TRUE,
nGroupId := 4,
pAddr := ADR( AxIds ),
tTimeOut := T#1s );
AxIds now contains the three axis IDs for the 3D group with the group ID 4.
Requirements
5.1.1.7 CfgReadExt3DAxisIds
The function block CfgReadExt3DAxisIds reads the axis configuration of the extended 3D group.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGroupId : UDINT;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
stExt3dGroup : NCI_EXT3DGROUP;
END_VAR
stExt3dGroup: Instance of the structure NCI_EXT3DGROUP (enter axis IDs of the current interpolation
group here)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
TYPE NCI_EXT3DGROUP :
STRUCT
nXAxisId : UDINT;
nYAxisId : UDINT;
nZAxisId : UDINT;
nQ1AxisId : UDINT;
nQ2AxisId : UDINT;
nQ3AxisId : UDINT;
nQ4AxisId : UDINT;
nQ5AxisId : UDINT;
END_STRUCT
END_TYPE
Requirements
Requirements
5.1.2.1 ItpConfirmHsk
If the channel override is set to 0 or an E-stop is active, no M-functions are acknowledged during this time.
The busy signal of ItpConfirmHsk therefore remains active and must continue to be called.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
sPlcToNci : PLCTONC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
sPlcToNci: The structure of the cyclic channel interface from the PLC to the NCI. (Type:
PLCTONC_NCICHANNEL_REF [} 308])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.2 ItpDelDtgEx
The function block ItpDelDtgEx triggers residual distance deletion. There is a more detailed description in the
Interpreter [} 140]documentation.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.3 ItpEnableDefaultGCode
The function block ItpEnableDefaultGCode enables execution of a user-defined G-Code before the start of
each NC program from the PLC. The default program is executed before the loaded program when the
actual NC program starts.
This function block enables rotation of the coordinate system for all NC programs to be executed, for
example.
VAR_IN
VAR_IN
bExecute : BOOL;
bUseDefaultGCode : BOOL;
tTimeOut : TIME;
END_VAR
bUseDefaultGCode: If this variable is TRUE, the default G-Code is activated through a rising edge at
bExecute. If the variable is FALSE, the default G-Code is deactivated.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.4 ItpEStopEx
The function block ItpEStopEx triggers the NCI EStop and enables a controlled stop on the path. The limit
values for the deceleration and the jerk are transferred as parameters. If these should be smaller than the
currently active dynamic parameters, the transferring parameters are rejected.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
fDec : LREAL;
fJerk : LREAL;
tTimeOut : TIME;
END_VAR
fDec: Max. deceleration during stopping. If fDec is smaller than the currently active deceleration, fDec is
rejected. This ensures that the deceleration occurs with the standard ramp as a minimum.
fJerk: Max. jerk during stopping. If fJerk is smaller than the currently active jerk, fJerk is rejected.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.5 ItpGetBlockNumber
ItpGetBlockNumber is a function that returns the block number of the NC program for the cyclic interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
Sample
VAR
nBlockNumber : UDINT;
sNciToPlc AT%I* : NCTOPLC_NCICHANNEL_REF;
END_VAR
nBlockNumber := ItpGetBlockNumber(sNciToPlc);
Requirements
5.1.2.6 ItpGetBottleNeckLookAheadEx
The function block ItpGetBottleNeckLookAheadEx determines the maximum size of the look-ahead for the
bottleneck detection (contour collision monitoring).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
nLookAhead : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. If the function block has a timeout error, ‘Error’ is TRUE
and ‘nErrId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.7 ItpGetBottleNeckModeEx
The function block ItpGetBottleNeckModeEx reads the behavior in the event of a contour collision
(bottleneck).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
eBottleNeckMode : E_ItpBnMode
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation or in the NC error documentation (error codes above 0x4000).
Requirements
5.1.2.8 ItpGetChannelId
ItpGetChannelId is a function that determines the channel ID from the cyclic interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
Sample
VAR
nChnId : UINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nChnId := ItpGetChannelId( sNciToPlc );
Requirements
5.1.2.9 ItpGetChannelType
ItpGetChannelType is a function that returns the channel type of the cyclic interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
Sample
VAR
nChannelType : E_ItpChannelType;
sNciToPlc AT%I* : NCTOPLC_NCICHANNEL_REF;
END_VAR
nChannelType := ItpGetChannelType( sNciToPlc );
Requirements
5.1.2.10 ItpGetCyclicLrealOffsets
The function block ItpGetCyclicLRealOffsets is used to read the current configuration of the cyclic channel
interface for LREAL variables.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
nIndexOffsetParam1 : UDINT;
nIndexOffsetParam2 : UDINT;
nIndexOffsetParam3 : UDINT;
nIndexOffsetParam4 : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
see also:
• ItpReadCyclicLRealParam1 [} 212]
• ItpSetCyclicLRealOffsets [} 220]
Requirements
5.1.2.11 ItpGetCyclicUDintOffsets
The function block ItpGetCyclicUDintOffsets is used to read the current configuration of the cyclic channel
interface for UDINT variables.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
nIndexOffsetParam1 : UDINT;
nIndexOffsetParam2 : UDINT;
nIndexOffsetParam3 : UDINT;
nIndexOffsetParam4 : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
see also:
• ItpReadCyclicUDintParam1 [} 212]
• ItpSetCyclicUdintOffsets [} 221]
Requirements
5.1.2.12 ItpGetError
ItpGetError is a function that returns the error number. A description of the NC error codes can be found here
[} 313].
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
NOTE! ItpGetError evaluates the variable 'nItpErrCode' from the cyclic interface.
Sample
VAR
bItpError : BOOL;
nErrId : UINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
bItpError := ItpHasError( sNciToPlc );
IF bItpError THEN
nErrId := ItpGetError( sNciToPlc );
…
END_IF
Requirements
5.1.2.13 ItpGetGeoInfoAndHParamEx
The function block ItpGetGeoInfoAndHParamEx reads informations of the currently active segment and
past and future segments. These include block number, H-parameter and residual path length on the
segment.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
stTab : ST_ItpPreViewTabEx;
nErrId : UDINT;
END_VAR
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in nErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
TYPE ST_ItpPreViewTabEx :
STRUCT
nDcTime : UDINT := 0
nReserved : UDINT := 0;
arrLines : ARRAY[1..NCI_MAX_PREVIEWTABLINES] OF ST_ItpPreViewTabLine;
END_STRUCT
END_TYPE
nDcTime: Current time stamp in ns. This time stamp can be used e.g. in interplay with the Tc2_NciXFC
library.
arrLines: Array of segment-related information (size 20). The entry at position 11 of the array corresponds to
the currently active segment. Segments that have already been processed are displayed at positions 1-10 of
the array, future segments at positions 12-20. See ST_ItpPreViewTabLine [} 201].
TYPE ST_ItpPreViewTabLine :
STRUCT
fLength : LREAL := 0.0;
nBlockNo : UDINT := 0;
nHParam : UDINT := 0;
nEntryID : UDINT := 0;
nReserved : UDINT := 0;
END_STRUCT
END_TYPE
fLength: Remaining segment length. For segments that are not yet active this corresponds to the total
segment length. For past segments the distance moved since the end of the segment is specified.
nHParam: Value of the H-parameter [} 149] that is active from the start of the next segment
Requirements
5.1.2.14 ItpGetGroupAxisIds
ItpGetGroupAxisIds is a function that returns an array of axes IDs that were configured for the group.
VAR_IN_OUT
FUNCTION ItpGetGroupAxisIds
VAR_IN_OUT
sNciToPlc AT%I* : NCTOPLC_NCICHANNEL_REF;
nNciAxisIds : ARRAY[1..8] OF DWORD;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
NOTE! ItpGetGroupAxisIds evaluates the information of the variable 'nAcsAxisIDs[8]' from the
cyclic interface.
Sample
VAR
nNciAxisIds : ARRAY[1..8] OF DWORD;
sNciToPlc AT%I* : NCTOPLC_NCICHANNEL_REF;
nVersionErr : DWORD;
END_VAR
nVersionErr := ItpGetGroupAxisIds(nNciAxisIds, sNciToPlc );
Requirements
5.1.2.15 ItpGetGroupId
ItpGetGroupId is a function that determines the group ID from the cyclic interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
ItpGetGroupId: Group ID
Sample
VAR
nGrpId : UINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nGrpId := ItpGetGroupId( sNciToPlc );
Requirements
5.1.2.16 ItpGetHParam
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
ItpGetHParam: H parameter
NOTE! ItpGetHParam evaluates the variable 'nHFuncValue' from the cyclic interface.
Sample
VAR
nHParam : DINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nHParam := ItpGetHParam( sNciToPlc );
Requirements
5.1.2.17 ItpGetHskMFunc
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
NOTE! ItpGetHskMFunc evaluates the variable 'nHskMFuncNo' from the cyclic interface.
Requirements
5.1.2.18 ItpGetItfVersion
ItpGetItfVersion is a function that determines the version number of the cyclic interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
Sample
VAR
nItfVer : UINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nItfVer := ItpGetItfVersion( sNciToPlc );
Requirements
5.1.2.19 ItpGetOverridePercent
The ItpGetOverridePercent function returns the axis channel override as a percentage. It is essential to
remember that this is not a value from the NC. The value, which is transferred as set value to the NC, is
evaluated.
VAR_IN_OUT
VAR_IN_OUT
sPlcToNci : PLCTONC_NCICHANNEL_REF;
END_VAR
sPlcToNci: Structure of cyclic channel interface between PLC and NCI (type: PLCTONC_NCICHANNEL_REF
[} 308])
Return value
Sample
VAR
sPlcToNci AT%Q*: PLCTONC_NCICHANNEL_REF;
fOverride : LREAL;
END_VAR
fOverride := ItpGetOverridePercent( sPlcToNci );
Requirements
5.1.2.20 ItpGetSetPathVelocity
ItpGetSetPathVelocity is a function that reads the current set bath velocity from the cyclic interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
Requirements
5.1.2.21 ItpGetSParam
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
ItpGetSParam: S parameter
NOTE! ItpGetSParam evaluates the variable 'nSpindleRpm' from the cyclic interface.
Sample
VAR
nSParam : UINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nSParam := ItpGetSParam( sNciToPlc );
Requirements
5.1.2.22 ItpGetStateInterpreter
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
NOTE! ItpGetStateInterrpreter evaluates the variable 'nItpState' from the cyclic interface.
Sample
VAR
nItpState : UDINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nItpState := ItpGetStateInterpreter( sNciToPlc );
Requirements
5.1.2.23 ItpGetTParam
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
ItpGetTParam: T parameter
NOTE! ItpGetTParam evaluates the variable 'nTool' from the cyclic interface.
Sample
VAR
nTParam : UINT;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
nTParam := ItpGetTParam( sNciToPlc );
Requirements
5.1.2.24 ItpGoAheadEx
The ItpGoAheadEx function block may only be used in association with the decoder stop '@717' [} 150].
There is a more detailed description of this decoder stop in the interpreter documentation [} 107].
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.25 ItpHasError
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
NOTE! ItpHasError evaluates the variable 'nItpErrCode' from the cyclic interface. If this value does
not equal 0, TRUE is returned.
Sample
VAR
bItpError : BOOL;
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
bItpError := ItpHasError( sNciToPlc );
Requirements
5.1.2.26 ItpIsFastMFunc
ItpIsFastMFunc is a function that determines whether the fast M-function is set for the supplied M-function
number.
VAR_IN
FUNCTION ItpIsFastMFunc
VAR_IN
nFastMFuncNo : INT;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
The function returns TRUE if the fast bit of the M-function is set.
NOTE! ItpIsFastMFunc evaluates the variable 'nFastMFuncMask' from the cyclic interface.
Sample
(*this enum is defined by the user *)
TYPE FastMFuncs:
(
M10_CoolingFluidOn := 10, (*fast M-Funktion M10*)
M11_CoolingFluidOff := 11,
M12_FanOn := 12,
M13_FanOff := 13
);
END_TYPE
VAR
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF
enFastMFuncs : FastMFuncs;
bTurnFanOn : BOOL;
END_VAR
bTurnFanOn := ItpIsFastMFunc( M12_FanOn,sNciToPlc );
Requirements
5.1.2.27 ItpIsEStopEx
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
If the return value is TRUE, the function was preceded by an EStop (e.g. ItpEStopEx). The flag does not
provide information as to whether the axes have already stopped or are still on the braking ramp.
see also:
ItpEStopEx [} 193]
ItpStepOnAfterEStopEx [} 228]
Requirements
5.1.2.28 ItpIsHskMFunc
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
NOTE! ItpIsHskFunc evaluates the variable 'nHskMFuncReq' from the cyclic interface.
Sample
VAR
bMFuncRequest : BOOL;
sNciToPlc AT%I* : NCTOPLC_NCICHANNEL_REF;
END_VAR
bMFuncRequest := ItpIsHskMFunc( sNciToPlc );
Requirements
5.1.2.29 ItpLoadProgEx
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPrg : STRING(255);
nLength : UDINT;
tTimeOut : TIME;
END_VAR
bExecute: The function block reads the NC program when a rising edge is encountered
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Sample
VAR
in_stItpToPlc AT %I* : NCTOPLC_NCICHANNEL_REF;
fbLoadProg : ItpLoadProgEx;
sProgramPath : STRING (255):= 'TestIt.nc';
END_VAR
fbLoadProg(
bExecute := TRUE,
sPrg := sProgramPath,
nLength := LEN(sProgramPath),
tTimeOut := t#200ms,
sNciToPlc := in_stItpToPlc
);
Requirements
5.1.2.30 ItpReadCyclicLRealParam1
This function reads the first LREAL parameter from the cyclic channel interface. This parameter is configured
previously with ItpSetCyclicLRealOffsets [} 220].
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
See also:
• ItpReadCyclicUdintParam1 [} 212]
• ItpSetCyclicLRealOffsets [} 220]
• ItpGetCyclicLRealOffsets [} 198]
Requirements
5.1.2.31 ItpReadCyclicUdintParam1
This function reads the first UDINT parameter from the cyclic channel interface. This parameter is configured
previously with ItpSetCyclicUdintOffsets [} 221].
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
See also:
• ItpReadCyclicLRealParam1 [} 212]
• ItpSetCyclicUdintOffsets [} 221]
• ItpGetCyclicUdintOffsets [} 199]
Requirements
5.1.2.32 ItpReadRParamsEx
The ItpReadRParamsEx function block reads the NC’s calculation parameters, also known as R-parameters.
A more detailed description of the calculation parameters can be found here [} 115]. A total of 1000 R-
parameters are available, of which the first 900 (0..899) are local, so that they are only visible in the current
NC channel. The other 100 (900..999) R-parameters are global, and are thus visible from anywhere in the
NC.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
pAddr : PVOID;
nIndex : DINT;
nCount : DINT;
tTimeOut : TIME;
END_VAR
pAddr: Address of the target variables of the data to be read. Data are written directly from the specified
address, i.e. nIndex is not to be interpreted as offset from pAddr. The data are usually stored in an array of
type LREAL, which has to be defined by the user.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.33 ItpReadToolDescEx
The ItpReadToolDescEx function block reads the tool parameters for the supplied D-word.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nDNo : UDINT;
tTimeOut : TIME;
END_VAR
nDNo: D-word for which the tool parameters are to be read. nDNo can have values between 1 and 255.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
sToolDesc : ToolDesc;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading.
sToolDesc: A structure into which the tool parameters of nDNo are written. The meaning of the parameters
depends on the tool type, and can be found in the tool data [} 162]. (type: NCTOPLC_NCICHANNEL_REF
[} 306])
TYPE ToolDesc:
STRUCT
nToolNumber : UDINT; (*valid range from 0 .. 65535*)
nToolType : UDINT;
fParam : ARRAY [2..15] OF LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpWriteToolDescEx [} 230]
ItpSetToolDescNullEx [} 224]
Requirements
5.1.2.34 ItpReadZeroShiftEx
The ItpReadZeroShiftEx function block reads the zero shift components X, Y and Z for the given zero shift.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nZsNo : UDINT;
tTimeOut : TIME;
END_VAR
nZsNo: Number of the zero shift. G54 to G59 are zero shifts at the NC. The valid range of values for 'nZsNo'
is therefore from 54 to 59.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCITOPLC_NCICHANNEL_REF;
sZeroShiftDesc : ZeroShiftDesc;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
NOTE! For reasons of compatibility, there are two entries (coarse and fine) for each axis in each
zero shift (e.g. G54). These two entries must be added together. This function block evaluates both
the entries and adds them together automatically.
See also:
ItpWriteZeroShiftEx [} 231]
ItpSetZeroShiftNullEx [} 225]
Requirements
5.1.2.35 ItpResetEx2
The function block 'ItpResetEx2' executes a channel reset, which deletes all existing tables of the NC
channel. In contrast to the outdated function block ItpReset, an active channel is stopped first, before the
reset is executed. This simplifies programming in the PLC, since no explicit check is necessary to ascertain
whether the axes are still in motion.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
tTimeOut: ADS timeout delay (the bBusy signal can be active for longer than tTimeOut)
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.36 ItpResetFastMFuncEx
The fast M-function nMFuncNo [} 145] is reset with a rising edge at input bExecute. In the event of the M-
function not being available, no error is returned.
This function block represents an alternative to Auto-reset or reset with another M-function (reset list during
parameterization of the M-function). For reasons of transparency, mixed resets using an M-function and this
function block should be avoided.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nMFuncNo : UINT;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.37 ItpSetBottleNeckLookAheadEx
The function block ItpSetBottleNeckLookAheadEx determines the maximum number of segments the system
may look ahead for bottleneck detection (contour collision monitoring). Note that segments, which were
added as a result of radius compensation (e.g. additional segments at acute angles) are taken into account.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nLookAhead : UDINT;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.38 ItpSetBottleNeckModeEx
The function block ItpSetBottleNeckModeEx specifies the behavior in the event of a contour collision
(bottleneck).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
eBottleNeckMode: E_ItpBnMode
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
TYPE E_ItpBnMode:
(
ItpBnm_Abort := 0,
ItpBnm_Adjust := 1,
ItpBnm_Leave := 2
);
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.39 ItpSetCyclicLrealOffsets
The function block ItpSetCyclicLrealOffsets is used to describe the cyclic channel interface for the 4 freely
configurable LREAL variables. Variables (index offsets) can be selected from the group state [} 396].
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
nIndexOffsetParam1 : UDINT;
nIndexOffsetParam2 : UDINT;
nIndexOffsetParam3 : UDINT;
nIndexOffsetParam4 : UDINT;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpReadCyclicLRealParam1 [} 212]
• ItpGetCyclicLRealOffsets [} 198]
Requirements
5.1.2.40 ItpSetCyclicUDintOffsets
The function block ItpSetCyclicUDintOffsets is used to describe the cyclic channel interface for the 4 freely
configurable UDINT variables. Variables (index offsets) can be selected from the group state [} 396].
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
nIndexOffsetParam1 : UDINT;
nIndexOffsetParam2 : UDINT;
nIndexOffsetParam3 : UDINT;
nIndexOffsetParam4 : UDINT;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpReadCyclicUDintParam1 [} 212]
• ItpGetCyclicUdintOffsets [} 199]
Requirements
5.1.2.41 ItpSetOverridePercent
The function ItpSetOverridePercent writes the axes channel override into the cyclic interface of the NCI. The
override is passed as a percentage.
VAR_INPUT
FUNCTION ItpSetOverridePercent
VAR_INPUT
fOverridePercent : LREAL;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sPlcToNci : PLCTONC_NCICHANNEL_REF;
END_VAR
sPlcToNci: Structure of cyclic channel interface between PLC and NCI (type: PLCTONC_NCICHANNEL_REF
[} 308])
Return value
Sample
VAR
sPlcToNci AT%Q*: PLCTONC_NCICHANNEL_REF;
fOverride : LREAL;
END_VAR
fOverride := 47.11;
ItpSetOverridePercent( fOverride, sPlcToNci );
Requirements
5.1.2.42 ItpSetSubroutinePathEx
With ItpSetSubroutinePathEx function block, the search path for subroutines can optionally be set.
If a subroutine still has to be integrated, the file is searched in the following order:
Only one optional path can take effect, which remains active until it is overwritten with another path or an
empty string.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPath : STRING;
nLength : UDINT;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.43 ItpSetToolDescNullEx
FB ItpSetToolDescNullEx overwrites all tool parameters (incl. number & type) of the channel with zero.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
bExecute: A rising edge results in overwriting of all tool parameters of the NC channel with zero.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpWriteToolDescEx [} 230]
ItpReadToolDescEx [} 214]
Requirements
5.1.2.44 ItpSetZeroShiftNullEx
The function block ItpSetZeroShiftNullEx overwrites all zero shifts of the channel with zero.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
bExecute: A rising edge results in overwriting of all zero shifts of the NC channel with zero.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpWriteZeroShiftEx [} 231]
• ItpReadZeroShiftEx [} 215]
Requirements
5.1.2.45 ItpSingleBlock
The ItpSingleBlock function block activates or deactivates single block mode in the NCI. Block relaying can
be triggered directly from the PLC with the input 'bTriggerNext'. Alternatively the Start button of the
interpreter (F5) can be used in the XAE .
VAR_INPUT
VAR_INPUT
bExecuteModeChange : BOOL;
nMode : E_ItpSingelBlockMode;
bTriggerNext : BOOL
tTimeOut : TIME;
END_VAR
bExecuteModeChange: Single block mode (nMode) is activated through a rising edge at this input.
nMode: Operation mode for single block (cf. single block mode):
• ItpSingleBlockOff: single block off
• ItpSingleBlockNck: single block in NC kernel
• ItpSingleBlockIntp: single block in interpreter
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
TYPE E_ItpSingleBlockMode:
(
ItpSingleBlockOff := 0,
ItpSingleBlockNck := 1,
ItpSingleBlockIntp := 16#4000
);
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.46 ItpStartStopEx
VAR_INPUT
VAR_INPUT
bStart : BOOL;
bStop : BOOL;
tTimeOut : TIME;
END_VAR
bStop: A positive edge stops the NC channel. A stop command deletes all the tables in the NC and brings
the axes to a controlled halt.
NOTE! The bStop input has a higher priority than the bStart input, so that if both inputs receive a
positive edge, a channel stop will be executed.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.47 ItpStepOnAfterEStopEx
The function block ItpStepOnAfterEStopEx enables further processing of the parts program after a
programmed EStopEx.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpEStopEx [} 193]
ItpIsEStopEx [} 209]
Requirements
5.1.2.48 ItpWriteRParamsEx
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
pAddr : DWORD;
nIndex : DINT;
nCount : DINT;
tTimeOut : TIME;
END_VAR
pAddr: Address of the variables containing the data to be written. Data are used directly from the specified
address, i.e. nIndex is not to be interpreted as offset from pAddr. The data are usually read from an array of
type LREAL, which has to be defined by the user.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Sample
VAR
arrfRParam90to99 : ARRAY[0..9] OF LREAL;
fbWriteRParamEx : ItpWriteRParamsEx;
n : INT := 0;
bWriteParam : BOOL := FALSE;
sNciToPlc AT%I* : NCTOPLC_NCICHANNEL_REF;
END_VAR
FOR n:=0 TO 9 DO
arrfRParam90to99[n] := 90 + n;
END_FOR
fbWriteRParam(
bExecute := bWriteParam,
pAddr := ADR( arrfRParam90to99[0] ),
nIndex := 90,
nCount := 10,
tTimeOut := T#200ms,
sNciToPlc := sNciToPlc );
In this example the parameters R90 to R99 are written from an NC perspective.
Requirements
5.1.2.49 ItpWriteToolDescEx
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nDNo : UDINT;
tTimeOut : TIME;
END_VAR
nDNo: D-word for which the tool parameters are to be read. nDNo can have values between 1 and 255.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
sToolDesc : ToolDesc;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
sToolDesc: The structure that contains the new tool parameters. This structure is only accessed for reading.
The meaning of the parameters depends on the tool type, and can be found in the tool data [} 162].
TYPE ToolDesc:
STRUCT
nToolNumber : UDINT; (*valid range from 0 .. 65535*)
nToolType : UDINT;
fParam : ARRAY [2..15] OF LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpReadToolDescEx [} 214]
ItpSetToolDescNullEx [} 224]
Requirements
5.1.2.50 ItpWriteZeroShiftEx
The function block ItpWriteZeroShiftEx writes the shift components X, Y and Z for the specified zero shift.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nZsNo : UDINT;
tTimeOut : TIME;
END_VAR
G54 to G59 are zero shifts at the NC. G58 and G59 can only be edited from the NC program. The valid
range of values for 'nZsNo' is therefore from 54 to 57.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
sZeroShiftDesc : ZeroShiftDesc;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
sZeroShiftDesc: The structure containing the components of the zero shift. This structure is only accessed
for reading.
TYPE ZeroShiftDesc:
STRUCT
fShiftX : LREAL;
fShiftY : LREAL;
fShiftZ : LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
NOTE! For reasons of compatibility every zero shift that can be set has two parameters (coarse and
fine) for each axis. When using this function block to write a new zero shift, the new value is written
into the 'fine parameter'. A value of 0.0 is entered into the 'coarse parameter'.
This makes it possible to use a function block such as ItpReadZeroShiftEx [} 215] to read and modify a zero
shift and to send it back to the NC.
See also:
• ItpReadZeroShiftEx [} 215];
• ItpSetZeroShiftNullEx [} 225]
Requirements
5.1.2.51 Blocksearch
Block search can be used to interrupt a program for a tool change or at the end of a shift. After the
interruption the program can continue at the previous position.
5.1.2.51.1 ItpBlocksearch
The function block ItpBlocksearch sets the interpreter to the point defined at the inputs. The input values can
be taken from function block ItpGetBlocksearchData [} 236] or set manually. Once the interpreter has been
set to the defined location with ItpBlocksearch, the motion can continue with ItpStepOnAfterBlocksearch
[} 237] at the position indicated at output sStartPosition.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nBlockId : UDINT;
eBlockSearchMode : E_ItpBlockSearchMode;
eDryRunMode : E_ItpDryRunMode;
fLength : LREAL;
sPrgName : STRING(255);
nPrgLength : UDINT;
tTimeOut : TIME;
sAxesList : ST_ItpAxes;
sOptions : ST_ItpBlockSearchOptions;
END_VAR
nBlockId: Block number or EntryCounter of the segment in the NC program used as starting point.
eBlockSearchMode: Defines whether the specified nBlockId is a block number (e.g. N4711) or continuous
EntryCounter. A prerequisite for using the block number is that it is unique. See E_ItpBlockSearchMode
[} 234]
eDryRunMode: Defines which program lines are executed and which are skipped. See E_ItpDryRunMode
[} 234]
fLength: Remaining length within the segment selected with nBlockId in percent.
sAxesList: Definition of the axes in the NCI group. See ST_ItpAxes [} 235]
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
bDone : BOOL;
sStartPosition : ST_ItpBlockSearchStartPosition;
END_VAR
bBusy: Remains TRUE until the function block has executed a command request, but no longer than the
time specified at the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the inputs.
bErr: Becomes TRUE if an error occurs during command execution. The command-specific error code is
contained in ‘nErrId’. Is reset to FALSE by the execution of a command at the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
bDone: The output becomes TRUE when the command was executed successfully.
sStartPosition: Indicates the start position from which the NC program continues. The individual axes
should be moved to this position before ItpStepOnAfterBlocksearch [} 237] is executed. See
ST_ItpBlockSearchStartPosition [} 235]
E_ItpBlockSearchMode
ItpBlockSearchMode_BlockNo: The block search is executed via the block number (e.g. N4711)
programmed by the user in the NC program. A prerequisite is that the user-defined block number is unique.
E_ItpDryRunMode
E_ItpDryRunMode defines how blocks are handled, which are located before the block in which the block
search is started, when the program is executed.
TYPE E_ItpDryRunMode :
(
ItpDryRunMode_Disable := 0,
ItpDryRunMode_SkipAll := 1,
ItpDryRunMode_SkipMotionOnly := 2,
ItpDryRunMode_SkipDwellAndMotion := 3
);
END_TYPE
ItpDryRunMode_SkipMotionOnly: Only movement blocks are skipped. R-parameters are written, and dwell
times and M-functions are executed.
ItpDryRunMode_SkipDwellAndMotion: Movement blocks and dwell times are skipped. R-parameters are
written and M-functions are executed.
ST_ItpAxes
The structure ST_ItpAxes contains the axes that were in the NCI group during program execution.
TYPE ST_ItpAxes :
STRUCT
nAxisIds : ARRAY[1..8] OF UDINT;
END_STRUCT
END_TYPE
nAxisIds: Array of axes that were in the NCI group. The order is nAxisIds[1]=X, nAxisIds[2]=Y,
nAxisIds[3]=Z, nAxisIds[4]=Q1, nAxisIds[5]=Q2… The axis ID can be read from the cyclic axis interface.
St_ItpBlockSearchOptions
ST_ItpBlockSearchStartPosition
The structure indicates the position at which the NC program continues after a block search. The user is
responsible for moving the axes to the corresponding positions.
TYPE ST_ItpBlockSearchStartPosition :
STRUCT
fStartPosition : ARRAY[1..8] OF LREAL;
END_STRUCT
END_TYPE
Requirements
5.1.2.51.2 ItpGetBlocksearchData
The function block ItpGetBlocksearchData reads the current position on the path. Usually this command is
called at standstill. Subsequently ItpBlockSearch [} 233] can be used to set the interpreter to the position
stored in sBlockSearchData.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
sBlockSearchData : ST_ItpBlockSearchData;
END_VAR
bBusy: Remains TRUE until the function block has executed a command request, but no longer than the
time specified at the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the inputs.
bErr: Becomes TRUE if an error occurs during command execution. The command-specific error code is
contained in ‘nErrId’. Is reset to FALSE by the execution of a command at the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.51.3 ItpStepOnAfterBlocksearch
The axes first have to be moved to the positions output by ItpBlocksearch [} 233].
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.52 Retrace
5.1.2.52.1 ItpEnableFeederBackup
The function block ItpEnableFeederBackup enables storing of the path for retracing. It has to be activated
once before the NC program (G-Code) is started. If the Blocksearch [} 232] functionality is used,
ItpEnableFeederBackup has to be activated before ItpBlocksearch [} 233] is called. Feeder backup is
executed as long as a TwinCAT restart or bEnable = FALSE is triggered with a rising edge at bExecute.
If feeder backup is not enabled, retracing does not work. This can be verified via ItpIsFeederBackupEnabled
[} 238].
VAR_INPUT
VAR_INPUT
bEnable : BOOL;
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.52.2 ItpIsFeederBackupEnabled
The function block ItpIsFeederBackupEnabled indicates whether feeder backup is enabled. Feeder backup
must be enabled before reversing can take place. This activates storing of the path.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bEnabled : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: The bBusy output remains TRUE until the function block has executed a command, with the
maximum duration specified by the time associated with the ‘Timeout’ input. While bBusy = TRUE, no new
instruction will be accepted at the inputs. Please note that it is not the execution of the service but its
acceptance whose time is monitored.
bEnabled: TRUE: Backup list for tracing is enabled, FALSE: Backup list for tracing is disabled
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. If the function block has a timeout error, ‘Error’ is TRUE
and ‘nErrId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.2.52.3 ItpIsFeedFromBackupList
The function ItpIsFeedFromBackupList becomes TRUE when the feed entries (SAF & SVB) were sent from
the backup list. During backward movement all entries are sent from the backup list. If the program is
executed in forward mode, the first entries usually also originate from the backup list. This is dependent of
the number of retraced entries and the number of entries in the SVB and SAF tables at the time at which
tracing was called. All further commands originate from the ‚original’ code.
While the NCI is processing the backup list, not all functions are available or meaningful. Here are a few
examples:
• Decoder stops such as @714 are not evaluated
• Modifications of R-parameters do not take effect as long as the motion takes place on the backup path
(forward or backward). R-parameters modifications take effect again as soon as the path data no
longer come from the backup list.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Requirements
5.1.2.52.4 ItpIsFirstSegmentReached
ItpIsFirstSegmentReached is a function that determines whether the program start position is reached
during retracing, based on the cyclic channel interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
The function returns TRUE when the start position of the G-Code program is reached. If the version number
of the cyclic channel interface is less than 6, the return value is always FALSE.
Requirements
5.1.2.52.5 ItpIsMovingBackwards
ItpIsMovingBackwards is a function that determines whether backward movement takes place on the path
of the current G-Code program, based on the cyclic channel interface.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
Return value
The function returns TRUE when backward movement takes place on the path. If the version number of the
cyclic channel interface is less than 6, the return value is always FALSE.
Requirements
5.1.2.52.6 ItpRetraceMoveBackward
The function block ItpRetraceMoveBackward deals with the geometric entries at the actual position at the
start of the part program (G-Code).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Procedure
1. Activate feeder backup list (see ItpEnableFeederBackup [} 237])
ð The NC program is stopped with ItpEStopEx [} 193]
2. Wait and ensure that all axes in the group are at standstill
3. Call ItpRetraceMoveBackward
4. Stop backward movement with ItpEStop, otherwise the program returns to the start
5. Call ItpRetraceMoveForward [} 242] to move forward again
6. Call ItpEStopEx and ItpRetraceMoveBackward etc., if required.
NOTE! Do not use in conjunction with vertex blending. M-functions are suppressed during
backward movement.
Requirements
5.1.2.52.7 ItpRetraceMoveForward
The function block ItpRetraceMoveForward transfers all entries from the current block (e.g. position) in
forward travel direction to the NC kernel. It is called to reverse the direction after ItpRetraceMoveBackward
[} 241] was called.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeOut : TIME;
END_VAR
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
Subsequently ItpPpgAppend* can be used to add various NC lines. The following function blocks are
available:
• ItpPpgAppendGeoLine [} 246] adds a linear motion.
• ItpPpgAppendGeoCircleByRadius [} 245] adds a circle with radius specification.
• ItpPpgAppendGenericBlock [} 244] inserts a self-defined line, such as activation of rounding or M-
functions.
Once the parts program is complete, it is closed with the routines ItpPpgCloseMain [} 247] or
ItpPpgCloseSubroutine [} 247].
Requirements
5.1.3.1 ItpPpgAppendGenericBlock
The function block ItpPpgAppendGenericBlock adds a generic line to the parts program. It can be used to
activate an M-function or rounding, for example.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
sBlock : STRING;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.3.2 ItpPpgAppendGeoCircleByRadius
The function block ItpPpgAppendGeoCircleByRadius adds a circular motion to the parts program. The circle
is parameterized by the radius.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
bClockWise : BOOL;
fTargetXPos : LREAL;
fTargetYPos : LREAL;
fTargetZPos : LREAL;
fRadius : LREAL;
fPathVelo : LREAL;
nBlockNo : UDINT;
tTimeOut : TIME;
END_VAR
bClockwise: If TRUE, the movement along the circle is clockwise, otherwise counter-clockwise
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.3.3 ItpPpgAppendGeoLine
The function block ItpPpgAppendGeoLine adds a linear motion to the parts program. In addition to the actual
target position, the path velocity and the line number are transferred.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
fTargetXPos : LREAL;
fTargetYPos : LREAL;
fTargetZPos : LREAL;
fPathVelo : LREAL;
nBlockNo : UDINT;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.3.4 ItpPpgCloseMain
The function block ItpPpgCloseMain completes the main program with the corresponding code for the
interpreter (M02).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.3.5 ItpPpgCloseSubroutine
The function block ItpPpgCloseSubroutine completes the subroutine with the corresponding code for the
interpreter (M17).
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.3.6 ItpPpgCreateMain
The function block ItpPpgCreateMain generates a new file, which can later be processed as main program. If
the file does not yet exist, it is created, otherwise it is overwritten.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.3.7 ItpPpgCreateSubroutine
The function block ItpPpgCreateSubroutine generates a new file, which can later be processed as
subroutine. If the file does not yet exist, it is created, otherwise it is overwritten.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
sPathName : STRING;
nSubroutineId : UDINT;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.1 ItpDelDtg
The ItpDelDtg function block triggers deletion of the remaining travel. There is a more detailed description in
the Interpreter [} 140]documentation.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpDelDtgEx [} 191].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.2 ItpEStop
The function block ItpEStop triggers the NCI EStop and enables a controlled stop on the path. The limit
values for the deceleration and the jerk are transferred as parameters. If these are smaller than the currently
active dynamic parameters, the transferred parameters are rejected.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpEStopEx [} 193].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGrpId : UDINT;
fDec : LREAL;
fJerk : LREAL;
tTimeOut : TIME;
END_VAR
nGrpId: group ID
fDec: Max. deceleration during stopping. If fDec is smaller than the currently active deceleration, fDec is
rejected. This ensures that the deceleration occurs with the standard ramp as a minimum.
fJerk: Max. jerk during stopping. If fJerk is smaller than the currently active jerk, fJerk is rejected.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpStepOnAfterEStop [} 269]
Requirements
5.1.4.3 ItpGetBottleNeckLookAhead
The function block ItpGetBottleNeckLookAhead determines the maximum size of the look-ahead for the
bottleneck detection (contour collision monitoring).
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpGetBottleNeckLookAheadEx [} 195].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
nLookAhead : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. If the function block has a timeout error, ‘Error’ is TRUE
and ‘nErrId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.4 ItpGetBottleNeckMode
The function block ItpGetBottleNeckMode reads the behavior in the event of a contour collision (bottleneck).
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpGetBottleNeckModeEx [} 195].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
eBottleNeckMode: E_ItpBnMode
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. If the function block has a timeout error, ‘Error’ is TRUE
and ‘nErrId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.5 ItpGetGeoInfoAndHParam
The function block ItpGetGeoInfoAndHParam reads information of the currently active segment and past and
future segments. These include block number, H-parameter and residual path length on the segment.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpGetGeoInfoAndHParamEx [} 200].
Note
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only
accessed for reading. (type: NCTOPLC_NCICHANNEL_REF [} 306])
VAR_OUTPUT
VAR_OUTPUT
stTab : ST_ItpPreViewTabEx;
nErrId : UDINT;
END_VAR
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.6 ItpGoAhead
The function block ItpGoAhead may only be used in association with the decoder stop '@717' [} 150]. There
is a more detailed description of this decoder stop in the interpreter documentation [} 107].
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpGoAheadEx [} 207].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.7 ItpIsEStop
Via bEStop, the function block ItpIsEStop provides information as to whether an EStop command was
triggered. If bEStop is TRUE, then an EStop was initiated (e.g. ItpEStop). The flag does not provide
information as to whether the axes have already stopped or are still on the braking ramp.
After the execution of ItpStepOnAfterEStop, ItpIsEStop will once again return FALSE.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpIsEStopEx [} 209].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGrpId : UDINT
tTimeOut : TIME;
END_VAR
nGrpId: group ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bEStop : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpEStop [} 251]
ItpStepOnAfterEStop [} 269]
Requirements
5.1.4.8 ItpLoadProg
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpLoadProgEx [} 210].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
sPrg : STRING;
nLength : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.9 ItpReadRParams
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpReadRParamsEx [} 213].
Note
The ItpReadRParams function block reads the NC’s calculation parameters, also known as R-parameters. A
more detailed description of the calculation parameters can be found here [} 115]. A total of 1000 R-
parameters are available, of which the first 900 (0..899) are local, so that they are only visible in the current
NC channel. The other 100 (900..999) R-parameters are global, and are thus visible from anywhere in the
NC.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
pAddr : PVOID;
nIndex : DINT;
nCount : DINT;
tTimeOut : TIME;
END_VAR
pAddr: Address of the target variables of the data to be read. The data are written by the NC directly from
the specified address. i.e. nIndex is not to be interpreted as offset from pAddr. The data are usually in an
array of type LREAL, which has to be defined by the user.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
ItpWriteRParams [} 270]
Requirements
5.1.4.10 ItpReadToolDesc
The ItpReadToolDesc function block reads the tool parameters for the supplied D-word.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpReadToolDescEx [} 214].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
nDNo : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
nDNo: D-word for which the tool parameters are to be read. nDoNo can have values between 1 and 255.
VAR_IN_OUT
VAR_IN_OUT
sToolDesc : ToolDesc;
END_VAR
sToolDesc: A structure into which the tool parameters of nDNo are written. The meaning of the parameters
depends on the tool type, and can be found in the tool data [} 162].
TYPE ToolDesc:
STRUCT
nToolNumber : UDINT; (*valid range from 0 .. 65535*)
nToolType : UDINT;
fParam : ARRAY [2..15] OF LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
see also:
Requirements
5.1.4.11 ItpReadZeroShift
The ItpReadZeroShift function block reads the offset shift components X, Y and Z for the given zero shift.
NOTE! For reasons of compatibility, there are two entries (coarse and fine) for each axis in each
zero shift (e.g. G54). These two entries must be added together. This function block evaluates both
the entries and adds them together automatically.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpReadZeroShiftEx [} 215].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
nZsNo : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
nZsNo: Number of the zero shift; on the NC side G54 to G59 are zero shifts. The valid range of values for
'nZsNo' is therefore from 54 to 59.
VAR_IN_OUT
VAR_IN_OUT
sZeroShiftDesc : ZeroShiftDesc;
END_VAR
TYPE ZeroShiftDesc:
STRUCT
fShiftX : LREAL;
fShiftY : LREAL;
fShiftZ : LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
see also:
Requirements
5.1.4.12 ItpReset
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpResetEx2 [} 216].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
NOTE! A reset deletes all tables in the NC. The axes are halted immediately. For this reason a reset
should only be carried out either in the event of an error or when the axes are stationary.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.13 ItpResetEx
The function block 'ItpResetEx' executes a channel reset, which deletes all existing tables of the NC channel.
In contrast to the conventional ItpReset [} 261], an active channel is stopped first, before the reset is
executed. This simplifies programming in the PLC, since no explicit check is necessary to ascertain whether
the axes are still in motion.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpResetEx2 [} 216].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGrpId : UDINT;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
nGrpId: group ID
nChnId: Channel ID
tTimeOut: ADS timeout delay (the bBusy signal can be active for longer than tTimeOut)
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.14 ItpResetFastMFunc
This function block represents an alternative to Auto-reset or reset with another M-function (reset list during
parameterization of the M-function). For the sake of clarity, mixed operation involving resetting with an M-
function and this function block should be avoided.
The fast M-function [} 145] nMFuncNo is reset with a rising edge at input bExecute. In the event of the M-
function not being available, no error is returned.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpResetFastMFuncEx [} 217].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
nMFuncNo : UINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.15 ItpSetBottleNeckLookAhead
The function block ItpSetBottleNeckLookAhead determines the maximum number of segments the system
may look ahead for bottleneck detection (contour collision monitoring). Note that segments, which were
added as a result of radius compensation (e.g. additional segments at acute angles) are taken into account.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpSetBottleNeckLookAheadEx [} 218].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
nLookAhead : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.16 ItpSetBottleNeckMode
The function block ItpSetBottleNeckMode specifies the behavior in the event of a contour collision
(bottleneck).
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpSetBottleNeckModeEx [} 219].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
eBottleNeckMode: E_ItpBnMode
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.17 ItpSetSubroutinePath
With ItpSetSubroutinePath function block, the search path for subroutines can optionally be set.
If a subroutine still has to be integrated, the file is searched in the following order:
• optional search path (ItpSetSubroutinePath)
• path from which the main program was loaded
• TwinCAT\Mc\Nci directory
Only one optional path can be active at any one time. It remains active until it is
• overwritten with another path or
• with an empty string
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpSetSubroutinePathEx [} 223].
Note
Interface
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
sPath : STRING;
nLength : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.18 ItpSetToolDescNull
FB ItpSetToolDescNull overwrites all tool parameters (incl. number & type) of the channel with zero.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpSetToolDescNullEx [} 224].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
bExecute: A rising edge results in overwriting of all tool parameters of the NC channel with zero.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpWriteToolDesc [} 272],
• ItpReadToolDesc [} 259]
Requirements
5.1.4.19 ItpSetZeroShiftNull
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpSetZeroShiftNullEx [} 225].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
bExecute: A rising edge results in overwriting of all zero shifts of the NC channel with zero.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpWriteZeroShift [} 273]
• ItpReadZeroShift [} 260]
Requirements
5.1.4.20 ItpStartStop
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpStartStopEx [} 227].
Note
Interface
VAR_INPUT
bStart : BOOL;
bStop : BOOL;
nChnId : UDINT;
tTimeOut : TIME;
END_VAR
bStop: A positive edge stops the NC channel. A stop command deletes all the tables in the NC and brings
the axes to a controlled halt.
nChnId: Channel ID
NOTE! The bStop input has a higher priority than the bStart input, so that if both inputs receive a
positive edge, a channel stop will be executed.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Requirements
5.1.4.21 ItpStepOnAfterEStop
The function block ItpStepOnAfterEStop enables further processing of the parts program after a programmed
EStop.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpStepOnAfterEStopEx [} 228].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nGrpId : UDINT;
tTimeOut : TIME;
END_VAR
nGrpId: group ID
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpEStop [} 251]
• ItpIsEStop [} 256]
Requirements
5.1.4.22 ItpWriteRParams
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpWriteRParamsEx [} 229].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
pAddr : PVOID;
nIndex : DINT;
nCount : DINT;
tTimeOut : TIME;
END_VAR
pAddr: Address of the variables containing the data to be written. Data are used directly from the specified
address, i.e. nIndex is not to be interpreted as offset from pAddr. The data are usually in an array of type
LREAL, which has to be defined by the user.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
Sample
In this example the parameters R90 to R99 are written from an NC perspective.
VAR
arrfRParam90to99 : ARRAY[0..9] OF LREAL;
fbWriteRParam : ItpWriteRParams;
n : INT := 0;
bWriteParam : BOOL := FALSE;
END_VAR
FOR n:=0 TO 9 DO
arrfRParam90to99[n] := 90 + n;
END_FOR
fbWriteRParam(
bExecute := bWriteParam,
nChnId := 2,
pAddr := ADR( arrfRParam90to99[0] ),
nIndex := 90,
nCount := 10,
tTimeOut := T#200ms );
Requirements
5.1.4.23 ItpWriteToolDesc
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpWriteToolDescEx [} 230].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
nDNo : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
nDNo: D-word for which the tool parameters are to be read. nDoNo can have values between 1 and 255.
VAR_IN_OUT
VAR_IN_OUT
sToolDesc : ToolDesc;
END_VAR
sToolDesc: The structure that contains the new tool parameters. This structure is only accessed for reading.
The meaning of the parameters depends on the tool type, and can be found in the tool data [} 162].
TYPE ToolDesc:
STRUCT
nToolNumber : UDINT; (*valid range from 0 .. 65535*)
nToolType : UDINT;
fParam : ARRAY [2..15] OF LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpReadToolDesc [} 259]
• ItpSetToolDescNull [} 267]
Requirements
5.1.4.24 ItpWriteZeroShift
The function block ItpWriteZeroShift writes the shift components X, Y and Z for the specified zero shift.
For reasons of compatibility every zero shift that can be set has two parameters (coarse and fine) for each
axis. When using this function block to write a new zero shift, the new value is written into the 'fine
parameter'. A value of 0.0 is entered into the 'coarse parameter'. This makes it possible to use a function
block such as ItpReadZeroShift [} 260] to read and modify a zero shift and to send it back to the NC.
Outdated version
The sole purpose of the function block is to ensure compatibility with existing projects. For
new projects please use the function block ItpWriteZeroShiftEx [} 231].
Note
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
nZsNo : UDINT;
tTimeOut : TIME;
END_VAR
nChnId: Channel ID
On the NC side G54 to G59 are zero shifts; G58 and G59 can only be edited from the NC program. The valid
range of values for 'nZsNo' is therefore from 54 to 57.
VAR_IN_OUT
VAR_IN_OUT
sZeroShiftDesc : ZeroShiftDesc;
END_VAR
sZeroShiftDesc: The structure containing the components of the zero shift. This structure is only accessed
for reading.
TYPE ZeroShiftDesc:
STRUCT
fShiftX : LREAL;
fShiftY : LREAL;
fShiftZ : LREAL;
END_STRUCT
END_TYPE
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
bBusy: This output remains TRUE until the function block has executed a command, but at the longest for
the duration supplied to the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the
inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.
bErr: This output is switched to TRUE as soon as an error occurs during the execution of a command. The
command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at
the inputs.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by
the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
See also:
• ItpReadZeroShift [} 260]
• ItpSetZeroShiftNull [} 273]
Requirements
5.1.5 Obsolete
5.1.5.1 F_GetVersionTcNciUtilities
This function returns part of the three-part version number of the TwinCAT 2 PLC library TcNciUtilities.lib as
UINT.
Outdated version
The sole purpose of this function is to ensure compatibility with existing projects. For new
projects please use the global structure stLibVersion_Tc2_NCI.
Note
VAR_INPUT
FUNCTION F_GetVersionNciUtilities
VAR_INPUT
nVersionElement : UINT;
END_VAR
Return value
Requirements
5.1.5.2 Get_TcNcCfg_Version
This function returns the version number of the TwinCAT 2 PLC library TcNcCfg.lib as string.
Outdated version
The sole purpose of this function is to ensure compatibility with existing projects. For new
projects please use the global structure stLibVersion_Tc2_NCI.
Note
Return value
Requirements
5.1.5.3 ItpGetVersion
ItpGetVersion is a function that returns the version number of the TwinCAT PLC library TcNC.lib as string.
Outdated version
The sole purpose of this function is to ensure compatibility with existing projects. For new
projects please use the global structure stLibVersion_Tc2_NCI.
Note
VAR_INPUT
FUNCTION ItpGetVersion
VAR_INPUT
END_VAR
Return value
Sample
VAR
strVersion: STRING(20);
END_VAR
strVersion := ItpGetVersion();
Requirements
In a first step a table of different movement commands and additional functions is written. To this end
structures such as ST_NciGeoLine are transferred to the FB NciFeedTablePreparation. This appends the
movement command to the table. Once the table is full or all required entries have been added,
NciFeedTable is called in order to transfer the table content to the NC kernel. The data transfer directly starts
the execution.
Function blocks that are required for grouping of axes (or for channel control (channel override) can be found
in the PLC Library: Tc2_NCI [} 181].
The following structures can be used as input parameters for the function block NciFeedTablePreparation:
Requirements
5.2.1 FB_NciFeedTablePreparation
The function block FB_NciFeedTablePreparation appends an entry of a specific type to the feed table
(stFeedGropupTable). An appended entry can generate more than one row in the table. If the table has not
enough free rows, an error is returned and no entry is added to the table. In this case the entry either has to
be added to another table or to the same table, after FB_NciFeedTable was executed. This function block
deals with modal functions, such as tangential following. It is therefore important to always use the same
instance of this function block. The function block can be called repeatedly in a PLC cycle.
VAR_INPUT
VAR_INPUT
nEntryType : E_NciEntryType;
pEntry : POINTER TO ST_NciGeoLine;
bResetTable : BOOL;
bResetAll : BOOL;
END_VAR
nEntryType: Specifies the entry type, e.g. line, circle, tangential following
bResetTable: If bResetTable is TRUE, the table ‚stFeedGroupTable’ is set to zero and nFilledRows is also
set to zero. If nErrorId = ErrNciFeedTableFull, this error is reset. All modal flags (such as tangential
following) remain constant.
bResetAll: Like bResetTable. In addition, all modal flags are set to their default values, and all error IDs are
reset.
VAR_IN_OUT
VAR_IN_OUT
stFeedGroupTable : ST_NciFeedGroupTable
END_VAR
VAR_OUTPUT
VAR_OUTPUT
nFilledRows : INT;
bError : BOOL;
nErrorId : UDINT;
END_VAR
nErrorId: Contains the command-specific error code of the most recently executed command. Is reset to 0
by the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313] (error codes above 0x4000).
NOTE! The error code 0x4B72 indicates that the table is full and the last entry was not accepted.
Sample:
stGeoLine.nDisplayIndex := 1;
stGeoLine.fEndPosX := 0;
stGeoLine.fEndPosY := 400;
stGeoLine.fEndPosZ := 100;
stGeoLine.fEndPosQ1 :=-90;
stGeoLine.fVelo := 1000; (*mm per sec*)
fbFeedTablePrep(
nEntryType := E_NciEntryTypeGeoLine,
pEntry := ADR(stGeoLine),
bResetTable:= FALSE,
stFeedGroupTable:= stNciFeedGroupTable,
nFilledRows=> nFilledRows,
bError => bError,
nErrorId => nErrorId);
Requirements
5.2.2 FB_NciFeedTable
The function block FB_NciFeedTable transfers a given table to the NC kernel. If the override is set and the
approvals are enabled, execution is started immediately. bFeedingDone becomes TRUE when the transfer is
complete. This signal can be used for overwriting the table with NciFeedTablePreparation [} 278]. In
NciFeedTablePreparation the table first has to be reset.
bChannelDone indicates complete execution of the tables in the NC kernel. The identifier ST_NciEndOfTables
[} 280] must therefore be placed at the end of the last table.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
bReset : BOOL;
bLogFeederEntries : BOOL;
END_VAR
bReset: Triggers a channel reset and also resets the function block
bLogFeederEntries: If TRUE, a log file 'PlcItpFeed.log' is written in the TwinCAT\Mc\Nci folder. It contains
all entries that are sent to the NC kernel via ADS. If bLogFeederEntries = TRUE, more time is required until
bFeedingDone becomes TRUE.
VAR_IN_OUT
VAR_IN_OUT
stFeedGroupTable : ST_NciFeedGroupTable;
stNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
stNciToPlc: The structure of the cyclic channel interface between NCI and PLC.
VAR_OUTPUT
VAR_OUTPUT
bFeedingDone : BOOL;
bChannelDone : BOOL;
bFeedBusy: : BOOL;
bResetBusy: : BOOL;
bError : BOOL;
nErrorId : UDINT;
END_VAR
bFeedingDone: Becomes TRUE once all table rows have been sent to the NC kernel.
bChannelDone: Becomes TRUE once all entries of the table in the NC kernel were executed and
ST_NciEndOfTables was detected.
bFeedBusy: Becomes TRUE when the function block sends entries to the NC kernel.
nErrorId: Contains the command-specific error code of the most recently executed command. Is reset to 0
by the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error
documentation [} 308] or in the NC error documentation [} 313].
Requirements
E_NciEntryType
TYPE E_NciEntryType :
(
E_NciEntryTypeNone := 0,
E_NciEntryTypeGeoStart := 1,
E_NciEntryTypeGeoLine := 2,
E_NciEntryTypeGeoCirclePlane := 3,
E_NciEntryTypeGeoCircleCIP := 4,
E_NciEntryTypeGeoBezier3 := 10,
E_NciEntryTypeGeoBezier5 := 11,
E_NciEntryTypeMFuncHsk := 20,
E_NciEntryTypeMFuncFast := 21,
E_NciEntryTypeMFuncResetAllFast := 23,
E_NciEntryTypeHParam := 24,
E_NciEntryTypeSParam := 25,
E_NciEntryTypeTParam := 26,
E_NciEntryTypeDynOvr := 50,
E_NciEntryTypeVertexSmoothing := 51,
E_NciEntryTypeBaseFrame := 52,
E_NciEntryTypePathDynamics := 53,
E_NciEntryTypeAxisDynamics := 55,
E_NciEntryTypeDwellTime := 56,
E_NciEntryTypeFeedrateIpol := 57,
E_NciEntryTypeTfDesc := 100,
E_NciEntryTypeEndOfTables := 1000
);
END_TYPE
ST_NciGeoStart
Sets the start position for the first geometry entry. This is necessary, if the first geometry entry is a circle or if
tangential following in the first segment is ON. This structure can optionally be written at each start of the first
table.
TYPE ST_NciGeoStart :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeGeoStart; (*do not override this parameter *)
fPosX: LREAL;
fPosY: LREAL;
fPosZ: LREAL;
fPosQ1: LREAL;
fPosQ2: LREAL;
fPosQ3: LREAL;
fPosQ4: LREAL;
fPosQ5: LREAL;
END_STRUCT
END_TYPE
ST_NciGeoLine
fVelo: Target path velocity, like F in G-Code, but in basic units per second (e.g. mm/s)
bRapidTraverse: TRUE has the same effect as G0, FALSE treats this entry like G01
ST_NciGeoCirclePlane
Describes a circle in the main plane. The center point is specified in absolute coordinates.
The orthogonal component at the center is assigned internally. If a circle is programmed in the XY plane, for
example, ,fCenterZ‘ is assigned internally. If the user has assigned the value explicitly, the value is
nevertheless overwritten by the function block. A helix can be described by programming the height. If helix
is programmed in the XY plane, for example, the lifting height of the helix is specified absolutely with
‚fEndPosZ‘.
TYPE ST_NciGeoCirclePlane :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeGeoCirclePlane; (*do not override this parameter *)
nDisplayIndex: UDINT;
fEndPosX: LREAL;
fEndPosY: LREAL;
fEndPosZ: LREAL;
fCenterX: LREAL;
fCenterY: LREAL;
fCenterZ: LREAL;
fEndPosQ1: LREAL;
fEndPosQ2: LREAL;
fEndPosQ3: LREAL;
fEndPosQ4: LREAL;
fEndPosQ5: LREAL;
fVelo: LREAL;
bClockwise: BOOL;
bAccurateStop: BOOL; (* VeloEnd := 0 *)
nPlane: E_NciGeoPlane := E_NciGeoPlaneXY;
END_STRUCT
END_TYPE
fVelo: Target path velocity in basic units per second (e.g. mm/s), like F in G-Code
bClockwise: If TRUE, the circle is drawn clockwise, otherwise counter-clockwise (similar to G02, G03)
bAccurateStop: accurate stop [} 123] (TRUE has the same effect as G09)
nPlane: Specifies the plane: XY, YZ, or ZX (similar to G17..G19) (type: E_NciGeoPlane [} 283])
E_NciGeoPlane
TYPE E_NciGeoPlane :
(
E_NciGeoPlaneXY := 17,
E_NciGeoPlaneZX := 18,
E_NciGeoPlaneYZ := 19
);
END_TYPE
ST_NciGeoCircleCIP
The CIP circle can be used to describe a circle anywhere in space. It does not have to be in the main plane.
In order for the circle to be described unambiguously, not all 3 points (the starting point is specified implicitly)
may lie on straight line. It is thus not possible to program a full circle in this way.
TYPE ST_NciGeoCircleCIP :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeGeoCircleCIP; (* do not overwrite this parameter *)
nDisplayIndex: UDINT;
fEndPosX: LREAL;
fEndPosY: LREAL;
fEndPosZ: LREAL;
fCIPPosX: LREAL;
fCIPPosY: LREAL;
fCIPPosZ: LREAL;
fEndPosQ1: LREAL;
fEndPosQ2: LREAL;
fEndPosQ3: LREAL;
fEndPosQ4: LREAL;
fEndPosQ5: LREAL;
fVelo: LREAL;
bAccurateStop: BOOL; (* VeloEnd := 0 *)
END_STRUCT
END_TYPE
fVelo: Target path velocity in basic units per second (e.g. mm/s), like F in G-Code
bAccurateStop: accurate stop [} 123] (TRUE has the same effect as G09)
ST_NciGeoBezier3
Describes a 3rd-order Bézier curve with the aid of control points. The start position results from the previous
segment. The third control point is determined by the target position.
TYPE ST_NciGeoBezier3:
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeGeoBezier3; (*do not override this parameter *)
nDisplayIndex: UDINT;
fControlPoint1X: LREAL;
fControlPoint1Y: LREAL;
fControlPoint1Z: LREAL;
fControlPoint2X: LREAL;
fControlPoint2Y: LREAL;
fControlPoint2Z: LREAL;
fEndPosX: LREAL;
fEndPosY: LREAL;
fEndPosZ: LREAL;
fEndPosQ1: LREAL;
fEndPosQ2: LREAL;
fEndPosQ3: LREAL;
fEndPosQ4: LREAL;
fEndPosQ5: LREAL;
fVelo: LREAL;
bAccurateStop: BOOL; (* VeloEnd := 0 *)
END_STRUCT
END_TYPE
...
fVelo: Target path velocity in basic units per second (e.g. mm/s), like F in G-Code
bAccurateStop: accurate stop [} 123] (TRUE has the same effect as G09)
ST_NciGeoBezier5
Describes a 5th-order Bézier curve with the aid of control points. The start position results from the previous
segment. The fifth control point is determined by the target position.
TYPE ST_NciGeoBezier5:
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeGeoBezier5; (*do not override this parameter *)
nDisplayIndex: UDINT;
fControlPoint1X: LREAL;
fControlPoint1Y: LREAL;
fControlPoint1Z: LREAL;
fControlPoint2X: LREAL;
fControlPoint2Y: LREAL;
fControlPoint2Z: LREAL;
fControlPoint3X: LREAL;
fControlPoint3Y: LREAL;
fControlPoint3Z: LREAL;
fControlPoint4X: LREAL;
fControlPoint4Y: LREAL;
fControlPoint4Z: LREAL;
fEndPosX: LREAL;
fEndPosY: LREAL;
fEndPosZ: LREAL;
fEndPosQ1: LREAL;
fEndPosQ2: LREAL;
fEndPosQ3: LREAL;
fEndPosQ4: LREAL;
fEndPosQ5: LREAL;
fVelo: LREAL;
bAccurateStop: BOOL; (* VeloEnd := 0 *)
END_STRUCT
END_TYPE
...
fVelo: Target path velocity in basic units per second (e.g. mm/s), like F in G-Code
bAccurateStop: accurate stop [} 123] (TRUE has the same effect as G09)
ST_NciMFuncHsk
Describes an M-function [} 145] of type handshake. The M-function number is between 0 and 159.
TYPE ST_NciMFuncHsk :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeMFuncHsk; (*do not override this parameter *)
nDisplayIndex: UDINT;
nMFunc: INT;
END_STRUCT
END_TYPE
ST_NciMFuncFast
Parameterizes up to 8 fast M-functions [} 145]. The first M-function must be assigned nMFuncIn0, the
second nMFuncIn1 etc. -1 indicates the end of the assignments.
TYPE ST_NciMFuncFast :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeMFuncFast; (*do not override this parameter *)
nDisplayIndex: UDINT;
nMFuncIn0: INT;
nMFuncIn1: INT;
nMFuncIn2: INT;
nMFuncIn3: INT;
nMFuncIn4: INT;
nMFuncIn5: INT;
nMFuncIn6: INT;
nMFuncIn7: INT;
END_STRUCT
END_TYPE
nMFuncIn1: Fast M-function number (0..159); -1 indicates the end of the list.
nMFuncIn2: Fast M-function number (0..159); -1 indicates the end of the list.
nMFuncIn3: Fast M-function number (0..159); -1 indicates the end of the list.
nMFuncIn4: Fast M-function number (0..159); -1 indicates the end of the list.
nMFuncIn5: Fast M-function number (0..159); -1 indicates the end of the list.
nMFuncIn6: Fast M-function number (0..159); -1 indicates the end of the list.
nMFuncIn7: Fast M-function number (0..159); -1 indicates the end of the list.
ST_NciMFuncResetAllFast
ST_NciHParam
ST_NciSParam
ST_NciTParam
ST_NciDynOvr
ST_NciVertexSmoothing
Modal function for activating blending at the segment transition. Blending is active until it is cancelled by
setting the radius to 0.
A more detailed description of the parameter can be found in the interpreter documentation [} 107].
(paramVertexSmoothing [} 133]).
TYPE ST_NciVertexSmoothing :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeVertexSmoothing; (*do not override this parameter *)
nDisplayIndex: UDINT;
nType: UDINT; (*type of smoothing, e.g. parabola, bi-quad *)
nSubtype: UDINT; (*e.g. adaptive, constant radius *)
fRadius: LREAL; (*max. radius for tolerance ball *)
END_STRUCT
END_TYPE
nType: Blending type: 2: parabola, 3: Bi-quadratic, 4: Bezier 3rd order, 5: 5th order Bezier
nSubtype: 1: constant tolerance radius, 2: distance between intersection and vertex, 3: Adaptive tolerance
radius
ST_NciBaseFrame
The structure ST_NciBaseFrame describes a modal zero shift and rotation. The operating principle is the
same as for zero shift and rotation in the interpreter, i.e. the point of rotation is the current origin (see
rotation [} 129] in the interpreter documentation [} 107]).
TYPE ST_NciBaseFrame:
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeBaseFrame; (*Do not override this parameter *)
nDisplayIndex: UDINT;
fShiftX: LREAL;
fShiftY: LREAL;
fShiftZ: LREAL;
fRotX: LREAL;
fRotY: LREAL;
fRotZ: LREAL;
fShiftQ1: LREAL;
fShiftQ2: LREAL;
fShiftQ3: LREAL;
fShiftQ4: LREAL;
fShiftQ5: LREAL;
END_STRUCT
END_TYPE
ST_NciPathDynamics
The structure ST_NciPathDynamics sets the path dynamics (acceleration, deceleration, jerk). The operating
principle is the same as for paramPathDynamics in the interpreter (see paramPathDynamics [} 156] in the
interpreter documentation [} 107]).
TYPE ST_NciPathDynamics:
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypePathDynamics; (*do not override this parameter *)
nDisplayIndex: UDINT;
fAcc: LREAL;
fDec: LREAL;
fJerk: LREAL;
END_STRUCT
END_TYPE
ST_NciAxisDynamics
The structure ST_NciAxisDynamics sets the path axis dynamics (acceleration, deceleration, jerk). The
operating principle is the same as for paramAxisDynamics in the interpreter (see paramAxisDynamics [} 156]
in the interpreter documentation [} 107])
TYPE ST_NciAxisDynamics:
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeAxisDynamics; (*Do not override this parameter*)
nDisplayIndex: UDINT;
nAxis: UDINT;
fAcc: LREAL;
fDec: LREAL;
fJerk: LREAL;
END_STRUCT
END_TYPE
nAxis: Axis in interpolation group X:0 Y:1 Z:2 Q1:3 ... Q5:7
ST_NciDwellTime
The structure ST_NciDwellTime is used to activate a dwell time in seconds (see dwell time [} 122] in the
interpreter documentation [} 107])
TYPE ST_NciDwellTime:
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeDwellTime; (*Do not override this parameter *)
nDisplayIndex: UDINT;
fDwellTime: LREAL;
END_STRUCT
END_TYPE
ST_NciFeedrateIpol
The structure ST_NciFeedrateIpol can be used to set the feed interpolation (see Feed interpolation [} 123]).
TYPE ST_NciFeedrateIpol :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeFeedrateIpol;(*Do not overwrite this parameter*)
nDisplayIndex: UDINT;
eFeedrateIpol: E_NciFeedrateIpol;(*E_NciFeedrateIpolConstant = FCONST, E_NciFeedrateIpolLinear=FLIN
*)
END_STRUCT
END_TYPE
ST_NciTangentialFollowingDesc
nTangAxis: Axis (Q1..Q5) that is used as tangential axis (type: E_NciAxesInGroup [} 291]).
nPathAxis1: First path axis describing the plane and orientation for calculating the tangent.
nPathAxis2: Second path axis describing the plane and orientation for calculating the tangent.
fCriticalAngle1: Critical angle 1. The response in cases where the angle between two segments is greater
than fCriticalAngle1 is specified with nTfBehavior.
E_NciAxesInGroup
TYPE E_NciAxesInGroup :
(
NoneAxis := 0,
XAxis,
YAxis,
ZAxis,
Q1Axis,
Q2Axis,
Q3Axis,
Q4Axis,
Q5Axis
);
END_TYPE
E_TangentialFollowingBehavior
TYPE E_TangentialFollowingBehavior :
(
E_TfIngoreAll, (*ignore critical angle *)
E_TfErrorOnCritical1 (*if angle becomes bigger than critical angle 1 ==> error *)
);
END_TYPE
ST_NciEndOfTables
Indicates the last entry of the last table. Is used for signaling the bChannelDone flag in FB_NciFeedTable
[} 279].
TYPE ST_NciEndOfTables :
STRUCT
nEntryType: E_NciEntryType := E_NciEntryTypeEndOfTables; (*do not override this parameter *)
END_STRUCT
END_TYPE
6 Samples
NCI: NCISimpleSample
Download:
https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/zip/9007202693487883.zip
The example NCISimpleSample shows how an G-Code program is loaded from the PLC and processing is
started.
You need to copy the enclosed parts program TestIt.nc into the TwinCAT\Mc\Nci directory. Otherwise the
parts program will not be found during loading. Alternatively you can adjust the path in the PLC program.
Download:
https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/zip/18014401453622155.zip
The sample shows how a movement can be affected with the library Tc2_PlcInterpolation directly from the
PLC.
7 Appendix
This ADS Read command returns a maximum of three lines of the current parts program, i.e. the current line
of code and perhaps two previously processed lines.
Function ADS-Read
Port 500 (dec)
Index Group 0x2300 + channel ID
Index Offset 0x2000 0001
Data string (30 bytes min.)
This ADS Read command returns the program name of the current main NC program (in this case 1_1.nc).
Function ADS-Read
Port 500 (dec)
Index Group 0x2100 + channel ID
Index Offset 0x7
Data string, 100 characters max.
In contrast to the 'Reading the current NC line' function, in this case not the line itself is read, but associated
line information. The return value is the current program name (e.g. file name of the subroutine) and a file
offset. Based on this information, the user interface can open the associated file and highlight the respective
line. The display is no longer limited to 3 rows, i.e. any number of lines can be displayed.
In the event of an NCI load or runtime error, information about the associated line of code can be obtained
via this route.
Function ADS-Read
Port 500 (dec)
Index Group 0x2100 + channel ID
Index Offset 0x12
Data UINT32 Current display of
1: SAF-
2: Interpreter
3: Error offset
UINT32 File offset
char[260] path + program name
The currently active technology data such as G functions, zero shifts and rotation can be read via ADS.
In order to read the above-mentioned parameters, activation via ADS is required first.
The function must be activated before the start of the NC program, or earlier. It remains active until either a
TwinCAT restart is performed or the function is reset explicitly.
Function ADS-Write
Port 500 (dec)
Index Group 0x2000 + channel ID
Index Offset 0x0053
Data DWORD
0: disable (default)
1: enable
This command reads the active zero shift of the segment currently in block execution (SAF). If no zero shift is
active (G53), the structure for the individual components contains a zero vector. These data can be used for
switching the display between machine coordinates and programming coordinates, for example.
The data, which are read with the function block 'ItpReadZeroShift', for example, may differ from these
values, since the interpreter data are read with the function block, which may already take into account new
offsets.
Function ADS-Read
Port 500 (dec)
Index Group 0x2100 + channel ID
Index Offset 0x0014
Data {
UINT32 block counter
UINT32 dummy
LREAL[3] zero shift G54..G57
LREAL[3] zero shift G58
LREAL[3] zero shift G59
}
This command reads the active rotation of the segment currently in block execution (SAF).
Function ADS-Read
Port 500 (dec)
Index Group 0x2100 + channel ID
Index Offset 0x0015
Data {
UINT32 block counter
UINT32 dummy
LREAL[3] rotation of X, Y & Z in degrees
}
The G-Code is subdivided into groups. For example, the geometries types with modal effect (G01, G02...)
and the plane selection (G17..G19) form separate groups. When the G-Code information is read, the
enumerator for the groups is also read. These can then be displayed in an application-specific manner.
Since the read command comes with a parameter to be read, not all groups have to be read. The memory
provided is always filled by group 1. If, for example, the transferred memory size is 3x8 bytes, the data for
the block counter, group 1 and 2 are returned.
Function ADS-Read
Port 500 (dec)
Index Group 0x2100 + channel ID
Index Offset 0x0013
Data {
UINT32 block counter
UINT32 Group 1: ModalGeoTypes
UINT32 Group 2: BlockwiseGeoTypes
UINT32 Group 3: ModalPlaneSelection
UINT32 Group 4: ModalToolCompensation
UINT32 Group 5: ModalToolFeedDirection
UINT32 Group 6: ModalZeroShift
UINT32 Group 7: ModalAccurateStop
UINT32 Group 8: BlockwiseAccurateStop
UINT32 Group 9: ModalDesignationAbsInc
UINT32 Group 10:
ModalDesignationInchMetric
UINT32 Group 11: ModalFeedRateInCurve
UINT32 Group 12: ModalCenterpointCorr
UINT32 Group 13: ModalCircleCpAbsInc
UINT32 Group 14: ModalCollisionDetection
UINT32 Group 15: ModalRotation
UINT32 Group 16: ModalCalcExRot
UINT32 Group 17: ModalDiam
UINT32 Group 18: ModalFeedrateIpol
UINT32 Group 19: ModalMirror
}
#define GCodeOffset 0x1000
#define CommonIdentOffset 0x2000 // used for non-g-code commands, like rot, cfc...
Group 1: ModalGeoTypes
enum GCodeGroup_ModalGeoTypes
{
ModalGeoTypeUndefined = 0,
ModalGeoTypeG0 = 0 + GCodeOffset, // line - rapid traverse
ModalGeoTypeG01 = 1 + GCodeOffset, // straight line
ModalGeoTypeG02 = 2 + GCodeOffset, // circle clockwise
ModalGeoTypeG03 = 3 + GCodeOffset // circle anticlockwise
};
Group 2: BlockwiseGeoTypes
enum GCodeGroup_BlockwiseGeoTypes
{
BlockwiseGeoTypeNone = 0,
BlockwiseGeoTypeG04 = 4 + GCodeOffset, // dwell time
BlockwiseGeoTypeG74 = 74 + GCodeOffset, // homing
BlockwiseGeoTypeCip = 1 + CommonIdentOffset // circle parametrized with 3 points
};
Group 3: ModalPlaneSelection
enum GCodeGroup_ModalPlaneSelection
{
ModalPlaneSelectUndefined = 0,
ModalPlaneSelectG17 = 17 + GCodeOffset, // xy-plane
ModalPlaneSelectG18 = 18 + GCodeOffset, // zx-plane
ModalPlaneSelectG19 = 19 + GCodeOffset // yz-plane
};
Group 4: ModalToolCompensation
enum GCodeGroup_ModalToolCompensation
{
ModalToolCompUndefined = 0,
ModalToolCompG40 = 40 + GCodeOffset, // tool compensation off
ModalToolCompG41 = 41 + GCodeOffset, // tool compensation left
ModalToolCompG42 = 42 + GCodeOffset // tool compensation right
};
Group 5: ModalToolFeedDirection
enum GCodeGroup_ModalToolFeedDirection
{
ModalToolFeedDirUndefined = 0,
ModalToolFeedDirPos = 2 + CommonIdentOffset, // tool feed direction positive
ModalToolFeedDirNeg = 3 + CommonIdentOffset // tool feed direction negative
};
Group 6: ModalZeroShift
enum GCodeGroup_ModalZeroShift
{
ModalZeroShiftUndefined = 0,
ModalZeroShiftG53 = 53 + GCodeOffset, // zero shift off
ModalZeroShiftG54G58G59 = 54 + GCodeOffset, // zero shift G54 + G58+ G59
ModalZeroShiftG55G58G59 = 55 + GCodeOffset, // zero shift G55 + G58+ G59
ModalZeroShiftG56G58G59 = 56 + GCodeOffset, // zero shift G56 + G58+ G59
ModalZeroShiftG57G58G59 = 57 + GCodeOffset // zero shift G57 + G58+ G59
};
Group 7: ModalAccurateStop
enum GCodeGroup_ModalAccurateStop
{
ModalAccurateStopNone = 0,
ModalAccurateStopG60 = 60 + GCodeOffset // modal accurate stop
};
Group 8: BlockwiseAccurateStop
enum GCodeGroup_BlockwiseAccurateStop
{
BlockwiseAccurateStopNone = 0,
BlockwiseAccurateStopG09 = 9 + GCodeOffset, // common accurate stop
BlockwiseAccurateStopTpm = 4 + CommonIdentOffset // target position monitoring
};
Group 9: ModalDesignationAbsInc
enum GCodeGroup_ModalDesignationAbsInc
{
ModalDesignAbsIncUndefined = 0,
ModalDesignAbsIncG90 = 90 + GCodeOffset, // absolute designation
ModalDesignAbsIncG91 = 91 + GCodeOffset // incremental designation
};
enum GCodeGroup_ModalCenterpointCorr
{
ModalCenterpointCorrUndefined = 0,
ModalCenterpointCorrOn = 8 + CommonIdentOffset, // circle centerpoint correction on
ModalCenterpointCorrOff = 9 + CommonIdentOffset // circle centerpoint correction off
};
Activation:
The remaining path length can be transferred with the cyclic channel interface to the PLC via
ItpSetCyclicLrealOffsets [} 220].
see index offset specification for group state [} 396]
7.4 Parameterisation
The parameterization of the NCI comprises the standard dynamic parameters (acceleration, deceleration,
jerk) and their online changes, along with the minimum velocity and the parameters for the reduction of the
path velocity including online change.
Minimum velocity
Each NCI group has a minimum path velocity V_min ≥ 0.0. The actual velocity should always exceed this
value. User-specified exceptions are: programmed stop at segment transition, path end and override
requests which lead to a velocity below the minimum value. A systemic exception is a motion reversal. With
the reduction method DEVIATIONANGLE the deflection angle is φ ≥ φ_h, in which case the minimum
velocity is ignored. V_min must be less than the set value for the path velocity (F word) of each segment.
The minimum velocity can be set to a new value V_min ≥ 0.0 in the NC program at any time. The unit is mm/
sec.
In general, the transition from one segment to the next is not indefinitely smooth. Therefore, it is necessary to
reduce the velocity at the transition point in order to avoid dynamic instability. For this purpose, the
transitions are geometrically classified and the effective transition velocity - V_link - is determined in three
steps.
Segments - as geographical objects - are defined here as curves in terms of differential geometry and are
parameterized by the arc length.
A segment transition from a segment S_in to a segment S_out is classified in geometrical terms as type Ck,
where k is a natural number (including 0), if each segment has k continuous arc length differentials and the
kth derivatives at the transition point correspond.
C1 transitions appear smooth, but are not smooth in dynamic terms. One example is the straight line-semi
circle transition in the stadium: at the transition point there is a step change in acceleration.
C2 transitions (and of course Ck transitions with k > 2) are dynamically smooth (jerk restricted).
As at all transitions, at C2 transitions V_link is set to equal the minimum of both set segment velocities:
V_link = min(V_in,V_out). There is no further reduction.
First, V_link is set to the lower of the two segment target velocities: V_link = min(V_in,V_out). The
geometrically induced absolute step change in acceleration AccJump in the segment transition is calculated
depending on the geometry types G_in and G_out, and the plane selection G_in and G_out of the segments
to be connected, at velocity V_link. If this is greater than C1 times the path acceleration/(absolute)
deceleration AccPathReduced permissible for the geometries and planes, the velocity V_link is reduced until
the resulting step change in acceleration is equal to AccPathReduced. If this value is less than V_min, then
V_min takes priority.
NOTE! When changing the dynamic parameters, the permissible path acceleration for the
geometries and planes and thereby the reaction of the reduction changes automatically.
Several reduction methods are available for C0 transitions. The reduction method VELOJUMP reduces the
velocity after permitted step changes in velocity for each axis. The reduction method DEVIATIONANGLE
reduces the velocity depending on the deflection angle φ (angle between the normalized end tangent T_in of
the incoming segment S_in and the normalized start tangent T_out of the outgoing segment S_out). The
cosine reduction method is a purely geometrical method (see curve velocity reduction method [} 22]).
The VELOJUMP method is recommended for mechanically independent axes, while for mechanically
coupled axes (the Y axis is attached to the X axis, for example) the DEVIATIONANGLE method is usually
recommended.
If V_link = min(V_in,V_out), and for each axis V_jump[i] = C0[i] * min(A+[i],-A-[i]) * T is the permitted absolute
step change in velocity for the axis [i], wherein C0[i] is the reduction factor and A+[i], A-[i] are the
acceleration/deceleration limits for the axis [i], and T is the cycle time. The VELOJUMP reduction method
ensures that the path velocity is reduced at the segment transition V_link until the absolute step change in
the set axis velocity of axis [i] is at most V_jump[i]. V_min nevertheless has priority: if V_link is less than
V_min, V_link is set to V_min. In the case of movement reversal with no programmed stop, there will be a
step change in axis velocity.
NOTE! When changing the dynamic parameters, the maximum permissible step changes in axis
velocity automatically change at the same time.
NOTE! When changing the dynamic parameters, the reduction factors do not automatically change
at the same time.
Table 2: Parameter
These parameters are described under the heading Smoothing of segment transitions [} 110].
The 'Global software limit position monitoring for the path' offers two different ways of monitoring the end
position.
This type of end position monitoring is always active if the limit position for the axis has been switched to
active (axis parameter). The monitoring is carried out component for component by the SAF task. This
means that if the end position is exceeded, the path velocity is instantly set to 0, and the entire interpolation
group has an error.
This type of monitoring is activated through the axes parameters, and not by means of the group parameters
described here.
To prevent the path velocity being set to 0 immediately when a violation of the software end positions is
encountered, the function 'Global software end position monitoring of the path' must be enabled. If this is
active, the movement stops at the NC block in which the end positions were violated. The velocity is reduced
via a ramp.
• So that the monitoring is only executed for the desired path axes, the software limit positions for the
axis components must be selected (axis parameters).
• The monitoring is carried out for the standard geometry segments. These include
Straight line
Circle
Helix
• Curves with splines are not monitored. The set values associated with the splines are always within the
tolerance sphere. Otherwise the limit position monitoring will make use of the SAF task.
• Because meaningful and generally applicable monitoring of the end positions can only be carried out at
the NC program's run-time (before lookahead) it is possible that the path axes will move as far as (but
not including) the NC block in which the limit positions are exceeded.
• If for some reason the axes are located outside the software limit positions it is possible to move back
into the correct region in a straight line.
Parameterization:
The parameterization takes place in the interpolation channel under the group parameters [} 22].
Because of the relevant dynamic parameters (braking distance, acceleration etc.) it is not possible for the
programmed velocity (the blue line) be achieved in every segment. For this reason a velocity, possibly
reduced, (the red line) is calculated for each geometric segment. In the standard case, the override is made
with reference to this segment velocity.
The advantage of this override type is that if override values are small the machine operates with an
approximately linear reduction in velocity, and this is therefore the correct setting for most applications.
The override value is based on the velocity programmed by the user. The maximum segment velocity only
has a limiting effect.
Selection 'Reduced [0 ... >100%]' - based on internally reduced velocity with the option to specify a
value greater than 100%
The override type behaves like 'Reduced' [} 304]. With this override type it is possible to travel along the path
more quickly than programmed in the G-Code. There is no limitation to 120%, for example. The maximum
possible path velocity is limited by the maximum velocities of the axis components (G0 velocity) and their
dynamics.
If limitation to a particular value, e.g. 120%, is required, this can be set in the PLC project.
In the XAE the channel status information can only be read with a plain text name, from the PLC
only via the bit number.
4356 17238 Monitoring "Controller enable" Controller enable for the axis is not
present (see axis interface SPS®NC). This enable is
required, for instance, for an axis positioning task.
4357 17239 Monitoring "Feed enable minus" Feed enable for movement in the
negative direction is not present (see axis interface
SPS®NC). This enable is required, for instance, for an
axis positioning task in the negative direction.
4358 17240 Monitoring "Feed enable plus" Feed enable for movement in the
positive direction is not present (see axis interface
SPS®NC). This enable is required, for instance, for an
axis positioning task in the positive direction.
4359 17241 Monitoring "Set velocity not allowed" The set velocity requested
for a positioning task is not allowed. This can happen if
the velocity is less than or equal to zero, larger than the
maximum permitted axis velocity, or, in the case of
servo-drives, is larger than the reference velocity of the
axis (see axis and drive parameters).
435A 17242 Monitoring "Movement smaller than one encoder
increment" (INTERNAL ERROR) The movement
required of an axis is, in relation to a positioning task,
smaller than one encoder increment (see scaling factor).
This information is, however, handled internally in such a
way that the positioning is considered to have been
completed without an error message being returned.
435B 17243 Monitoring "Set acceleration monitoring" (INTERNAL ERROR)
The set acceleration has exceeded the maximum
permitted acceleration or deceleration parameters of the
axis.
435C 17244 Monitoring "PEH time monitoring" The PEH time monitoring has
detected that, after the PEH monitoring time that follows
a positioning has elapsed, the target position window
has not been reached. The following points must be
checked: Is the PEH monitoring time, in the sense of
timeout monitoring, set to a sufficiently large value (e.g.
1-5 s)? The PEH monitoring time must be chosen to be
significantly larger than the target position monitoring
time. Have the criteria for the target position monitoring
(range window and time) been set too strictly? Note:
The PEH time monitoring only functions when target
position monitoring is active!
435D 17245 Monitoring "Encoder existence monitoring / movement
monitoring" During the active positioning the actual
encoder value has changed continuously for a default
check time from NC cycle to NC cycle less than the
default minimum movement limit. => Check, whether
axis is mechanically blocked, or the encoder system
failed, etc... Note: The check is not performed while the
axis is logically standing (position control), but only at
active positioning (it would make no sense if there is a
mechanical holding brake at the standstill)!
Note: This documentation contains all TC3 specific modifications and new features.
7.8.1.1 "Index offset" specification for Ring-0 parameter (Index group 0x1000)
Index offset Access Ring 0 Man- Data type Phys. Definition Description Remarks
( Hex ) ager unit range
0x00000010 Read every UINT32 100 ns cycle time SAF task
0x00000012 Read every UINT32 100 ns cycle time SVB task
0x00000014 Read every INT32 ns Global Time Compensa-
tion Shift (for SAF Task)
7.8.1.2 "Index offset" specification for Ring-0 state (Index group 0x1100)
Index offset Access Ring 0 Man- Data type Phys. Definition Description Remarks
( Hex ) ager unit range
0x00000001 Read every UINT32 1 0, 1...255 quantitiy of Channel
0x00000002 Read every UINT32 1 0, 1...255 quantitiy of group
0x00000003 Read every UINT32 1 0, 1...255 quantitiy of Axis
0x00000004 Read every UINT32 1 0, 1...255 quantitiy of Encoder
0x00000005 Read every UINT32 1 0, 1...255 quantitiy of controller
0x00000006 Read every UINT32 1 0, 1...255 quantitiy of Drives
0x0000000A Read every UINT32 1 0, 1...255 quantitiy of table (n x m)
0x000001nn Read every UINT32 1 0, 1...255 supplies for the Encoder- reserved!
ID the appropriate axis
IDnn = Encoder-ID
0x000002nn Read every UINT32 1 0, 1...255 supplies for the Con- reserved!
troller-ID the appropriate
axis IDnn = Controller-ID
0x000003nn Read every UINT32 1 0, 1...255 supplies for the Drive-ID reserved!
the appropriate axis IDnn
= Drive-ID
7.8.1.3 "Index offset" specification for Ring-0 functions (Index group 0x1200)
Index offset Access Ring 0 Man- Data type Phys. Definition Description Remarks
( Hex ) ager unit range
0x00000020 Write every VOID 1 Clear cycle time error reserved!
counter SAF & SVB
7.8.2.1 "Index offset" specification for Channel parameter (Index group 0x2000 +
ID)
Index-Offset Access Channel type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000001 Read every UINT32 1 Channel ID
0x00000002 Read every UINT8[30+1] 1 Channel name
0x00000003 Read every UINT32 1 ENUM Channel type [} 487]
0x00000004 Read every UINT32 1 ENUM Interpreter type
[} 487]
0x00000005 Read every UINT32 1 program load buffer
size in bytes
0x00000006 Read every UINT32 1 program no. according
to job list
0x00000007 Read every UINT32 1 ENUM set load log mode
/ Write [} 488]
0x00000008 Read every UINT32 1 ENUM set trace mode [} 488]
/ Write
0x00000009 Read every UINT32 1 RESERVED
/ Write
0x0000000A Read every UINT32 1 0/1 Records all feeder en-
tries in a log file
/ Write
named "TcNci.log"
0x0000000B Read every UINT32 1 0/1 channel specific level
for NC logger mes-
/ Write
sages
0: errors only
1: all NC messages
Index-Offset Access Channel type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000032 Read Interpolation UINT16 1 0/1 cartesian tool offset reserved func-
entry tion,
/ Write
no standard!
0x00000040 Read Interpolation { Target address of in- reserved func-
terpreter hooks tion,
/ Write
char[6] Ams Net ID no standard!
UINT16 Port
UINT32 Index Group
UINT32 Index Offset
}
0x00000050 Read Interpolation UINT32 1 ENUM Reaction if at the ra-
dius compensation a
/ Write
bottle neck is recog-
nized
0: Error and abort
1: Note & trouble
shooting
2: Only note, without
outline modulation
0x00000051 Read Interpolation UINT32 1 1..24 Look ahead for bottle-
neck detection
/ Write
0x00000052 Read Interpolation UINT32 1 0/1 Chamfer on/off reserved func-
tion,
/ Write
no standard!
0x00000053 Read Interpolation UINT32 1 Activation for reading
the currently effective
/ Write
interpolation rules,
zero shifts and rotation
0: off 1: on
0x00000054 Read Interpolation UINT32 1 0/1 Retrace on/off reserved func-
tion,
/ Write
no standard!
0x00000055 Read Interpolation UINT32[4] 1 Configuration of the
cyclic channel inter-
/ Write
face for UINT32; up to
4 index offsets can be
configured.
0x00000056 Read Interpolation UINT32[4] 1 Configuration of the
cyclic channel inter-
/ Write
face for LREAL; up to
4 index offsets can be
configured.
0x00010K0L Read every REAL64 e.g. mm ±MAX REAL64 value for zero shift
(NPV)
/ Write
[1..3] Axis index
K=1 → X
K=2 → Y
K=3 → Z
[1..0xA] L=1 → G54F
L=2 → G54G
L=3 → G55F ...
0x0002ww00 Read every UINT16 Tool number: values
for tool compensation
/ Write
0x0003ww00 Read every UINT16 [1...50] Tool type: ww = tool
1...50
/ Write
0x0004wwnn Read every REAL64 [1...14] Parameter: nn = Index
1...14
/ Write
0x000500gg Read every REAL64 e.g. mm ≥ 0 (value) Radius of the toler-
[1...9] (g) ance sphere gg =
/ Write
channel group (de-
fault: 1)
7.8.2.2 "Index offset" specification for Channel state (Index group 0x2100 + ID)
Index-Offset Access Channel type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000001 Read every INT32 1 ENUM error code Channel
[} 313]
0x00000002 Read every UINT32 1 number of groups in
the Channel
0x00000003 Read every UINT32 1 ENUM Interpreter status Cannot be
[} 488] traced by oscil-
loscope!
0x00000004 Read every UINT32 1 ENUM interpreter/channel
operation mode
[} 488]
0x00000005 Read every UINT32 1 currently loaded pro-
gram
0x00000007 Read every UINT8[...] 1 program name of cur- max. 100 char-
rently loaded program acters, null-ter-
(100 characters, null- minated
terminated)
0x00000008 Read Inter-preter UINT32 1 [0,1] Interpreter simulation Cannot be
mode traced by oscil-
0: off (default) loscope!
1: on
0x00000010 Read Inter-preter UINT32 1 text index Cannot be
If the interpreter is in traced by oscil-
the aborted state, the loscope!
current text index can
be read out here
0x00000011 ReadWrite Inter-preter Write Cannot be
UINT32 1 text index traced by oscil-
loscope!
Read
UINT8[..] 1 Line of the NC part
program from the text
index
0x00000012 Read Inter-preter {
UINT32 1 Current display for
1: SAF
2: Interpreter
3: Error offset
UINT32 1 Fileoffset
UINT8[260] 1 path + program name
}
0x00000013 Read Inter-preter UINT32[18] Display for currently
effective G-code
0x00000014 Read Inter-preter { Determines the cur-
rently effective zero
shift
UINT32 1 block counter
UINT32 dummy
LREAL[3] 1 zero shift G54..G57
LREAL[3] 1 zero shift G58
LREAL[3] 1 zero shift G59
}
0x00000015 Read Inter-preter { Determines the cur-
rently effective rotation
UINT32 1 block counter
UINT32 1 dummy
LREAL[3] 1 rotation of X, Y & Z in
degrees
}
0x00000016 Read Inter-preter UINT32 1 [0,1] Feeder Info Only used inter-
nally! Not stan-
dard
0x00000100 Read every UINT32 [n] 1 [0, 1...255] Returns the respective Cannot be
axis IDs in the channel traced by oscil-
number: [1...255] axis loscope!
ID's: [0, 1...255]
7.8.2.3 "Index offset" specification for Channel functions (Index group 0x2200 +
ID)
Index offset Access Channel type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Write every UINT32 1 load NC-program with
program number
0x00000002 Write every VOID start Interpreter
0x00000003 Write every VOID RESERVED
0x00000004 Write every UINT8[...] load NC-program by
name. The standard NC
path does not also have
to be given although it
may. Other paths are
also permitted.
0x00000005 Write every UINT16 ENUM cf. appendix in- set the interpreter/chan-
terpreter opera- nel operation mode
tion mode
[} 488]
0x00000006 Write Interpreter UINT8[...] set path for subroutines
0x00000008 Write Interpreter UINT32 1 Interpreter simulation not yet released
mode:
0: off (default)
1: on
0x0000000F Write every VOID RESERVED
Index offset Access Channel type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000026 Write Inter- VOID set all tool parameters
polation (incl. type & number) to
null
0x00000027 Write Inter- VOID set all zero offset shifts to
polation null
0x00000050 Write Inter- VOID 1 set ExecIdleInfoin the in- reserved func-
polation terpreter tion,
no standard!
0x00000051 Write Inter- UINT32 1 set block skip mask in the reserved func-
polation interpreter tion,
parameter: no standard!
SkippingMask
0x00000052 Write Inter- UINT32 1 set ItpOperationModein reserved func-
polation the interpreter tion,
parameter: no standard!
OperationMode mask
0x00000053 Write Inter- VOID set ScanningFlagin the reserved func-
polation NC device tion,
no standard!
0x00000054 Write Inter- scan position reserved func-
polation tion,
no standard!
double[8] position
0x00000055 Write Inter- reserved
polation
0x00000056 Write Inter- VOID set Interpreter in the reserved func-
polation Abortedstate tion,
no standard!
0x00000060 Write Interp- UINT16 1 0..159 manual reset of a fast M
polation Function
7.8.2.4 "Index offset" specification for cyclic Channel -process data (Index group
0x2300 + ID)
Index offset Access Channel type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000000 Read every {128 Byte} STRUCT s. CHANNEL STRUCTURE Current PLC
(PLC→NC) Channel -inter- (PLC→NC) Remark: Size structure:
face and alignment changed. NciChannel-
FromPlcPLCTO
NC_NCICHAN-
NEL_REF
0x00000001 Read every UINT8[...] 1 Interpreter program dis- Cannot be
min. 30 Byte play traced by oscil-
loscope!
0x00000002 Read / Write every UINT32 % [0...1000000] speed override Channel 1000000 =
(PLC→NC) (Axis in the Channel ) 100%
0x00000003 Read / Write every UINT32 % [0...1000000] speed override spindle 1000000 =
(PLC→NC) 100%
0x00000080 Read every (NC→- {160 Byte} STRUCT s. CHANNEL STRUCTURE Current PLC
PLC) Channel -inter- (NC→PLC) Remark: Size structure:
face and alignment changed. NciChannelTo-
PlcNCTO-
PLC_NCI-
CHAN-
NEL_REF
0x10000000 Read / Write every REAL64 1 [0...999] R parameter of the Inter- Cannot be
+RegIndex preter traced by oscil-
loscope!
7.8.3.1 "Index offset" specification for group parameter (Index group 0x3000 +
ID)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000001 Read every UINT32 1 group ID
0x00000002 Read every UINT8[30+1] 1 group name
0x00000003 Read every UINT32 1 ENUM group type [} 488]
0x00000004 Read every UINT32 µs SAF-cycle time group
0x00000005 Read every UINT32 µs SVB-cycle time group
0x00000006 Read / Write every UINT16 1 0/1 Single block operation
mode?
0x0000000B Read every UINT32 1 Size of the SVB table
(max. number of SVB
entries
0x0000000C Read every UINT32 1 Size of the SAF table
(max. number of SAF
entries
0x00000010 Read / Write every UINT32 1 [1,2...32] Internal SAF cycle e.g. for DXD
time divisor (divides group
Default: 1
the internal SAF cycle
time by this factor)
0x00000500 Read / Write DXD group INT32 ENUM [0, 1] Cornering velocity re-
duction method
[} 488]
0: Coulomb-Scattering
1: Cosinus law
2: VeloJump
0x00000501 Read / Write DXD group REAL64 1 [0.0...1.0] Velocity
reduction factor C0
transition (continuous,
but neither once nor
twice continuously dif-
ferentiable)
0x00000502 Read / Write DXD group REAL64 1 [0.0...1.0] Velocity
reduction factor C1
transition (continuous
and continuously dif-
ferentiable once)
0x00000503 Read / Write DXD group REAL64 degree [0.0...180.0] Critical angle at seg-
ment transition
"Low" (must be strictly
less than or equal to
the velocity
reduction angle C0)
0x00000504 Read / Write DXD group REAL64 degree [0.0...180.0] Critical angle at seg-
ment transition
"High" (must be strictly
less than or equal to
the velocity
reduction angle C0)
0x00000505 Read / Write DXD group REAL64 mm/s ≥0 Minimum velocity, Attention: Pa-
which must not be un- rameter is not
dershot at segment saved in the so-
transitions, despite lution and is not
possible velocity transferred as
NC boot param-
reduction.
eter!
0x00000506 Read / Write DXD group REAL64 e.g. mm [0.0...1000.0] Radius of the toler- not imple-
ance mented!
sphere for
blending
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000507 Read / Write DXD group REAL64 1 Velocity
reduction factor C2
transition
0x00000508 Read / Write DXD group UINT16 1 0/1 Enables calculation of NEW from
the total remaining TC3.1
path length B4020.40
0x00000509 Read / Write DXD group UINT16 1 0/1 General activation of
the software limit posi-
Default: 1
tion monitoring for the
main axes (X, Y, Z)
(see encoder parame-
ters)
0x0000050A Read / Write DXD group UINT32 1 0/1 NCI Overridetype
0: related to internal
reduced velocity (with-
out iteration)
1: related to original
external (pro-
grammed) velocity
2: Relative to the inter-
nally reduced velocity
(0 ... >100%)
0x0000050C Read DXD group UINT32 1 [128 ... 1024] User-defined maxi- NEW from
mum number of the TC3.1 B4014
Default: 128
NCI SAF tables en- boot parame-
tries ters
0x00000510 Read / Write DXD group REAL64 1 ≥0 For reduction method not imple-
VeloJumpReduction- mented!
factor for C0 transi-
tions: X axis
0x00000511 Read / Write DXD group REAL64 1 ≥0 For reduction method not imple-
VeloJumpReduction- mented!
factor for C0 transi-
tions: Y axis
0x00000512 Read / Write DXD group REAL64 1 ≥0 For reduction method not imple-
VeloJumpReduction- mented!
factor for C0 transi-
tions: Z axis
0x00000513 Read / Write DXD group LREAL64 1 ]0.0..1.0[ Blending for auxiliary not yet released
axes: If the effective
path velo is smaller
than the programmed
one multiplied with this
factor, then an accu-
rate stop is inserted
and the tolerance ball
is deleted
0x00000514 Read / Write DXD group UINT32 1 [1 … 20] Maximum number of NEW from
transferred jobs per nc TC3.1
Default: 1
cycle (from SVB to B4020.40
SAF)
0x00000604 Read / Write Encoder group REAL64 e.g. mm/ [0.0...1000.0] Velocity window resp. Base Unit / s
s standstill window
0x00000605 Read / Write Encoder group REAL64 s [0.0...60.0] Filter time for standstill
window in seconds
0x00000606 Read / Write Encoder group REAL64 s [0.0...60.0] Dead time compensa-
tion master/slave
Coupling ("angle pre-
control")
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000703 Read FIFO group UINT32 1 [0, 1, 4] Interpolation type for NEW from
FIFO setpoint genera- TC3.1 B4020
tor
0: INTERPOLATION-
TYPE_LINEAR (de-
fault)
1: INTERPOLATION-
TYPE_4POINT
4: INTERPOLATION-
TYPE_CUBICSPLINE
(with 6 points)
0x00000704 Read / Write FIFO group UINT32 1 [1, 2] Override type for FIFO
setpoint generator
Type 1: OVERRIDE-
TYPE_INSTANTA-
NEOUS (default)
Type 2: OVERRIDE-
TYPE_PT2
0x00000705 Read / Write FIFO group REAL64 s > 0.0 P-T2-time for override
change (T1=T2=T0)
0x00000706 Read / Write FIFO group REAL64 s ≥ 0.0 Time delta for two se-
quenced FIFO entries
(FIFO entry timebase)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000802 ReadWrite Kinematic Write Calculation of the
group kinematic inverse
transformation for the
positions
(MCS -> ACS)
{
REAL64[8] e.g. mm ±∞ MCS (Machine Coor-
dinate System) axis
positions, max. dimen-
sion: 8
UINT32 1 ≥0 Reserve
UINT32 1 ≥0 Reserve
}
Read
{
REAL64[8] e.g. de- ±∞ ACS (Axis Coordinate
gree System) axis posi-
tions, max. dimension:
8
UINT32 1 ≥0 Reserve
UINT32 1 ≥0 Reserve
}
7.8.3.2 "Index offset" specification for Group state (Index group 0x3100 + ID)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000001 Read every INT32 1 ENUM error code group
[} 321]
0x00000002 Read every UINT32 1 number of master
axes
0x00000003 Read every UINT32 1 number of slave axes
0x00000004 Read every UINT32 1 s. ENUM SVB group state
(state)
0x00000005 Read every UINT32 1 s. ENUM SAF group state (main
state)
0x00000006 Read every UINT32 1 s. ENUM moving state (state)
0x00000007 Read every UINT32 1 s. ENUM SAF sub-group state
(sub state)
0x00000008 Read every UINT32 1 s. ENUM Referencing state
(state)
0x00000009 Read every UINT32 1 s. ENUM Coupling state (state) Cannot be
traced by oscil-
loscope!
0x0000000A Read every UINT32 1 ≥0 Coupling table index Cannot be
traced by oscil-
loscope!
0x0000000B Read every UINT32 1 ≥0 current number of Symbolic ac-
SVB entries/tasks cess: 'SvbEn-
tries' (DXD)
0x0000000C Read every UINT32 1 ≥0 current number of SAF Symbolic ac-
entries/tasks cess: 'SafEn-
tries' (DXD)
0x0000000D Read every UINT32 1 Current block number Symbolic ac-
(only active for inter- cess:'block
polation group) number' (DXD)
0x0000000E Read every UINT32 1 ≥0 current number of free Cannot be
SVB entries/tasks traced by oscil-
loscope!
0x0000000F Read every UINT32 1 ≥0 current number of free Cannot be
SAF entries/tasks traced by oscil-
loscope!
0x00000011 Read every UINT16 1 0/1 Emergency Stop (E- Cannot be
Stop) active? traced by oscil-
loscope!
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000110 Read PTP group { Internal NC informa- reserved!
tion (resolutions)
REAL64 e.g. mm ± ∞ ExternalEndPosition
REAL64 e.g. mm/ >0 ExternalTargetVelocity
s
REAL64 e.g. mm/ >0 ExternalAcceleration
s^2
REAL64 e.g. mm/ >0 ExternalDeceleration
s^2
REAL64 e.g. mm/ >0 ExternalJerk
s^3
UINT32 1 >0 ExternalOverrideType
REAL64 e.g. mm ± ∞ InternalEndPosition
REAL64 e.g. mm/ >0 InternalTargetVelocity
s (refers to 100 %)
REAL64 % [0 ... 100] InternalActualOverride
REAL64 e.g. mm/ >0 InternalAcceleration
s^2
REAL64 e.g. mm/ >0 InternalDeceleration
s^2
REAL64 e.g. mm/ >0 InternalJerk
s^3
REAL64 e.g. mm >0 PositionResolution
REAL64 e.g. mm/ ≥0 VelocityResolution
s
REAL64 e.g. mm/ ≥0 AccelerationResolu-
s^2 tion
REAL64 e.g. mm/ ≥0 VelocityResolutionAt-
s AccelerationZero
}
0x00000500 Read DXD group REAL64 e.g. mm ≥ 0 Path rest way (remain- Symbolic ac-
ing arc length) on the cess: 'Set-
current path segment PathRem-
Length'
0x00000501 Read DXD group REAL64 e.g. mm ≥ 0 racked out arc length Symbolic ac-
on the current path cess: 'SetPath-
segment Length'
0x00000502 Read DXD group REAL64 e.g. mm/ ≥ 0 current path set veloc- Symbolic ac-
s ity cess: 'Set-
PathVelo'
0x00000503 Read DXD group REAL64 e.g. mm/ ± ∞ current path set accel- Symbolic ac-
s^2 eration cess: 'Set-
PathAcc'
0x00000504 Read DXD group REAL64 e.g. mm/ ≥ 0 amount of the current Symbolic ac-
s^2 vectorial set accelera- cess: 'Set-
tion PathAbsAcc'
0x00000505 Read DXD group REAL64 e.g. mm/ ≥ 0 maximum segment Symbolic ac-
s end path set velocity cess: 'Set-
PathVeloEnd'
0x00000506 Read DXD group REAL64 e.g. mm/ ≥ 0 Segment maximum Symbolic ac-
s path set velocity cess: 'Set-
PathVeloMax'
0x00000507 Read DXD group REAL64 e.g. mm ≥ 0 current relative brak- Symbolic ac-
ing distance based on cess: 'SetPath-
the current arc length StopDist'
0x00000508 Read DXD group REAL64 e.g. mm ± ∞ Safety distance = seg- Symbolic ac-
ment arc length - cur- cess:'SetPath-
rent arc length - rela- SecurityDist'
tive braking distance
0x00000509 Read DXD group REAL64 1 0/1 Segment transition Symbolic ac-
cess:'SetPath-
Seg-
mentChange'
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000050A Read DXD group REAL64 % [0 ... 100] path velocity override Symbolic ac-
cess:'Set-
PathOverride'
0x00000511 Read DXD group REAL64 e.g. mm/ ≥ 0 amount of the path ac- Symbolic ac-
s tual velocity cess: 'Act-
PathAbsVelo'
0x00000512 Read DXD group REAL64 e.g. mm/ ± ∞ path actual accelera- Symbolic ac-
s^2 tion on the current cess: 'Act-
segment PathAcc'
0x00000513 Read DXD group REAL64 e.g. mm/ ≥ 0 amount of the path ac- Symbolic ac-
s^2 tual acceleration on cess:'Act-
the current segment PathAbsAcc'
0x00000514 Read DXD group REAL64 e.g. mm ± ∞ Position error on the Symbolic ac-
path in tangential di- cess:'PathDiff-
rection (signed to indi- Tangential'
cate leading and lag-
ging)
0x00000515 Read DXD group REAL64 e.g. mm ≥ 0 Position error on the Symbolic ac-
path in orthogonal di- cess:'PathDif-
rection fOrthogonal'
0x00000520 Read DXD-group REAL64 1 ≥0 Covered arc length of
the current segment,
normalized to 1.0
0x00000521 Read DXD-group REAL64 1 0/1 Change of partial seg-
ment (radius of toler-
ance ball)
0x00000522 Read DXD group REAL64 1 ≥0 Total remaining path
length to the last ge-
ometry entry or the
next accurate stop.
Refers to group pa-
rameter 0x508.
0x00000523 Read DXD group REAL64 1 ≥0 programmed velocity
of the current segment
0x00000530 Read DXD group { Current or last target
position of the main
axes X, Y and Z
REAL64 e.g. mm ± ∞ Target position X-axis
REAL64 e.g. mm ± ∞ Target position Y-axis
REAL64 e.g. mm ± ∞ Target position Z-axis
}
0x00000531 Read DXD group { Current or last target
position of the auxil-
iary axes Q1 to Q5
REAL64[5] e.g. mm ± ∞ Target position of axis
Q1 to Q5
}
0x00000532 Read DXD group { Reads path length, H not generally
parameter and Entry released
ID of the next 11 seg-
ments in relation to the
current DC time
UINT32 DC Time
UINT32 reserved
PreViewTab[11] 11*24 Bytes
}
PreViewTab
{
REAL64 e.g. mm Segment length
UINT32 1 block number
UINT32 1 H-Parmeter
UINT32 1 Entry ID
UINT32 1 reserved
}
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000054n Read DXD group REAL64 1 0/1 within the tolerance
ball of the auxiliary
axis
n = 1..5
number of the auxiliary
axis (not axis ID)
7.8.3.3 "Index offset" specification for Group functions (Index group 0x3200 + ID)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000001 Write every VOID Reset group
0x00000002 Write every VOID Stop group
0x00000003 Write every VOID Clear group (buffer/
task)
0x00000004 Write PTP group, 3D { Emergency stop (E-
group stop) (emergency stop
with controlled ramp)
REAL64 e.g. mm/ ≥ 0.0 Deceleration (must be
s^2 greater than or equal
to the original deceler-
ation)
REAL64 e.g. mm/ ≥ 0.0 Jerk (must greater
s^3 than or equal to the
original jerk)
}
0x00000005 Write PTP group { Parameterizable stop Reserved func-
(with controlled ramp) tion,
REAL64 e.g. mm/ ≥ 0.0 deceleration no standard!
s^2
REAL64 e.g. mm/ ≥ 0.0 Jerk
s^3
}
0x00000006 Write PTP group, 3D VOID "Step on" after Emer-
group gency Stop (E-Stop)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000061 ReadWrite 3D group 1 internal "feed group" Execute com-
command ("Feeder") mand!
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000122 Write 1D group (MW { Start 1D group (spe- Reserved start
servo) cial start): function, no
UINT32 ENUM s. appendix standard!
Start type [} 489] (s.
appendix)
REAL64 e.g. mm ±∞ End position (target
position)
REAL64 mm/s ≥0.0 required start velocity
REAL64 e.g. mm ±∞ Position for a new ve-
locity level
REAL64 mm/s ≥0.0 new end velocity level
UINT32 1 0/1 Standard accelera-
tion?
REAL64 mm/s^2 ≥0.0 Acceleration
UINT32 1 0/1 Standard decelera-
tion?
REAL64 mm/s^2 ≥0.0 deceleration
UINT32 1 0/1 Standard jerk?
REAL64 mm/s^3 ≥0.0 Jerk
}
0x00000126 Write 1D group { Start drive output:
UINT32 ENUM s. appendix Output type [} 496] (s.
appendix)
REAL64 e.g. % ±∞ required output value
(e.g. %)
}
0x00000127 Write 1D group VOID Stop drive output
0x00000128 Write 1D group { Change the drive out-
put:
UINT32 ENUM s. appendix Output type [} 496] (s.
appendix)
REAL64 e.g. % ±∞ required output value
(e.g. %)
}
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000140 Write Master/Slave { Master/slave coupling Extension for
(0x00n00140) coupling: 1D (SERVO): "flying saw"!an-
group(SERVO) UINT32 ENUM s. appendix gle >0.0 and <=
Slave type/coupling
90.0 de-
type [} 491] (s. appen- grees(parallel
dix) saw: 90.0 de-
UINT32 1 [1...255] Axis ID of the master grees)
axis/group
UINT32 1 [0...8] Subindex n of the
master axis (default: -
value: 0)
UINT32 1 [0...8] Subindex n of the
slave axis (default: -
value: 0)
REAL64 1 [±1000000.0] Parameter 1: linear:
Gearing factor
FlySawVelo: Reserve
FlySaw: Abs. synchro-
nous position master
[mm]
REAL64 1 [±1000000.0] Parameter 2: linear:
Reserve
FlySawVelo: Reserve
FlySawPos: Abs. syn-
chronous position
slave [mm]
REAL64 1 [±1000000.0] Parameter 3: linear:
Reserve
FlySawVelo: Angle of
inclination in [DE-
GREE]
FlySawPos: angle of
inclination in [DE-
GREE]
REAL64 1 [±1000000.0] Parameter 4: linear:
Reserve
FlySawVelo: Gearing
factor
FlySawPos: Gearing
factor
}
0x00000141 Write Master/Slave VOID Master/slave decou-
decoupling: 1D pling (SERVO)
group(SERVO)
0x00000142 Write Master / slave { Change of the cou-
parameter 1D pling parameters
group(servo) (SERVO):
REAL64 1 [±1000000.0] Parameter 1: linear:
Gearing factor
REAL64 1 [±1000000.0] Parameter 2: Linear:
Reserve
REAL64 1 [±1000000.0] Parameter 3: Linear:
Reserve
REAL64 1 [±1000000.0] Parameter 4: Linear:
Reserve
}
0x00000144 Write Slave stop 1D VOID Stop the "flying Only for "flying
group (SERVO) saw" (SERVO) saw"
0x00000149 Write Slave tables 1D REAL64 1 ±∞ set the slave table Only for Solo
group (SERVO) scaling of a solo table table slave
coupling (SERVO)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000160 Write 1D group VOID Deactivate drive out-
put of the 1D group
(disable)
0x00000161 Write 1D group VOID Activate drive output
of the 1D group (en-
able)
0x00000710 Write FIFO group { REAL64[x*m]} e.g. mm ±∞ Write x FIFO entries Only possible
(lines): (x*m)-values on a line-by-line
(one or more lines)n: basis! (integer
FIFO length (number multiple)
of lines)m: FIFO di-
mension (number of
columns) range of val-
ues x: [1 ... n]
0x00000711 Write FIFO group { REAL64[x*m]} e.g. mm ±∞ Overwrite the last x Only possible
FIFO entries (lines): on a line-by-line
(x*m)-values (one or basis! (integer
more lines)n: FIFO multiple)
length (number of
lines)m: FIFO dimen-
sion (number of col-
umns) range of values
x: [1 ... n]
7.8.4.1 "Index offset" specification for Axis parameter (Index group 0x4000 + ID)
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n00000 Read every { General AXIS PA- Modified from
(Structure for all RAMETER STRUC- TC3
axis parame- TURE (NC/CNC),
ters) also includes subele-
ments such as en-
coder, controller and
drive
(see MC_ReadParam-
eterSet in TcMc2.lib)
Note: Size and align-
ment changed.
UINT32 1 Axis ID
UINT8[30+1+1] e.g. mm Axis name
UINT32 1 Axis type [} 488]
... ... ... ...
} 1024 bytes (instead of
512 bytes)
0x00000001 Read every UINT32 1 Axis ID
0x00000002 Read every UINT8[30+1] 1 Axis name
0x00000003 Read every UINT32 ENUM Axis type [} 488]
0x00000004 Read every UINT32 µs cycle time axis (SAF)
0x00000005 Read every UINT8[10+1] 1 physical unit
0x00000006 Read / Write every REAL64 e.g. mm/ ref. velocity in cam di-
s rection
0x00000007 Read / Write every REAL64 e.g. mm/ ref. velocity in sync di-
s rection
0x00000008 Read / Write every REAL64 e.g. mm/ velocity hand slow
s
0x00000009 Read / Write every REAL64 e.g. mm/ velocity hand fast
s
0x0000000A Read / Write every REAL64 e.g. mm/ [0.0...1.0E20] velocity rapid traverse
s
0x0000000F Read / Write every UINT16 1 0/1 position range moni-
toring?
0x00000010 Read / Write every REAL64 e.g. mm [0.0...1.0E6] position range window
0x00000011 Read / Write every UINT16 1 0/1 motion monitoring?
0x00000012 Read / Write every REAL64 s [0.0...600] motion monitoring time
0x00000013 Read / Write every UINT16 1 0/1 loop?
0x00000014 Read / Write every REAL64 e.g. mm loop movement (±)
0x00000015 Read / Write every UINT16 1 0/1 target position moni-
toring?
0x00000016 Read / Write every REAL64 e.g. mm [0.0...1.0E6] target position window
0x00000017 Read / Write every REAL64 s [0.0...600] target position moni-
toring time
0x00000018 Read / Write every REAL64 e.g. mm pulse way in pos. di-
rection
0x00000019 Read / Write every REAL64 e.g. mm pulse way in neg. di-
rection
0x0000001A Read / Write every UINT32 ENUM Error reaction mode:
(≥0) 0: instantaneous (de-
fault)
1: delayed
(e.g. for master/slave
coupling)
0x0000001B Read / Write every REAL64 s [0...1000] Error reaction delay
(if error reaction mode
"delayed" is activated)
0x0000001C Read / Write every UINT16 1 0/1 Couple slaves via ac-
tual values if not oper-
ational?
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000001D Read / Write every REAL64 e.g. mm/ [0, Acceleration for fading
s^2 0.01...1.0E10] profile when switching
from SET to ACTUAL
values:
Default: 0 (in this case
the minimum from the
axis acceleration is
used, i.e. MIN(Acc,
Dec))
0x0000001E Read / Write every UINT32 ENUM Fast Axis Stop Signal
(≥0) Type:
Selection of the signal
type that triggers a
fast axis stop (see bit
7 in Drive->nStatus4)
"0 (SignalType_OFF)",
"1 (Signal-
Type_RisingEdge)","2
(Signal-
Type_FallingEdge)","3
(SignalType_Both-
Edges)","4 (Signal-
Type_HighActive)","5
(SignalType_LowAc-
tive)"
0x00000020 Read / Write every UINT16 1 0/1 Allow motion com-
mands for slave axis?
Default: FALSE
0x00000021 Read / Write every UINT16 1 0/1 Allow motion com-
mands for axes with
active external set-
point generator?
Default: FALSE
0x00000026 Read / Write every UINT32 1 Interpretation of the see encoder! bit
units (position, veloc- array
ity, time) bit 0: velocity
in x/min instead of x/s
Bit 1: position in thou-
sands of the base unit
Bit 2: modulo position
display
0x00000027 Read / Write every REAL64 e.g. mm/ [>0...1.0E20] max. allowed velocity
s
0x00000028 Read / Write every REAL64 e.g. mm [0.0...1.0E6] motion monitoring win-
dow
0x00000029 Read / Write every UINT16 1 0/1 PEH time monitoring? Posi. end and
accurate stop
0x0000002A Read / Write every REAL64 s [0.0...600] PEH monitoring time
0x0000002B Read / Write every UINT16 1 0/1 Backlash compensa-
tion?
0x0000002C Read / Write every REAL64 e.g. mm [-1000.0 Backlash
...1000.0]
0x00000030 Read every UINT16 1 [0,1] Persistent data e.g. for Boot parame-
actual position and ref- ters, cannot be
erence state of the en- changed online.
coder?
0x00000031 Read every { Am- 1 Reading of the hard-
UINT8[6] sAddr: ware AMS address
UINT16 Am- (AMS Net ID and AMS
UINT16 sNetId, port no.) and Ether-
} 10 bytes Am- CAT channel number
sPortNo. (communication chan-
Chan- nel 0,1,2,3…)
nelNo
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000031 Read every { Am- 1 Reading of the hard- NEW from TC3
UINT8[6] sAddr: ware AMS address
SoftDriveObjec-
UINT16 Am- (AMS Net ID and de-
tId from NC
UINT16 sNetId, vice AMS port no.)
build 4226
// Am- and EtherCAT channel
UINT16 sPortNo. number (communica-
UINT32 Chan- tion channel 0,1,2,3…)
UINT32 nelNo
UINT32 Supplemented by ad-
UINT32 Re- ditional NC information
UINT32 served such as NcDriveID,
UINT32 Nc- NcDriveType (see ap-
UINT32 DriveID pendix) etc..
UINT32 Nc-
UINT32 DriveIn-
UINT32[4] dex
} 64 bytes NcDriv-
eType
NcEncID
NcEncIn-
dex
NcEnc-
Type
NcAx-
isID
NcAx-
isType
Soft-
DriveOb-
jectId
Re-
served
0x00000033 Read every { General APPLICA- Changed in
UINT16 Ap- 0/1 TION REQUEST TC3
plRequestBit ≥0 STRUCTURE (NC/
UINT16 Ap- 1 >0 NCI),
plRequestType ≥0 e.g. for Application-
UINT32 Ap- Homing request
plCmdNo 1 (s. MC_ReadApplica-
UINT32 Ap- tionRequest in
plCmdVersion Not im- TcMc2.lib)
... ple-
} 1024 bytes mented Application request
types:
1 0: NONE (IDLE)
1: HOMING
0x000000F1 Read / Write every REAL64 e.g. mm/ Default: 1.0E5 Maximum permitted NEW from TC
s^2 acceleration 3.2
0x000000F2 Read / Write every REAL64 e.g. mm/ Default: 1.0E6 Maximum permitted NEW from TC
s^2 deceleration 3.2
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000101 Read / Write Servo REAL64 e.g. mm/ [0.01...1.0E20] Acceleration (default
s^2 data set)
0x00000102 Read / Write Servo REAL64 e.g. mm/ [0.01...1.0E20] Deceleration (default
s^2 data set)
0x00000103 Read / Write Servo REAL64 e.g. mm/ [0.1...1.0E30] Jerk (default data set)
s^3
0x00000104 Read / Write Servo REAL64 s [0.0 ... 1.0] damping time between
Default: 0.0 s velocity and position
values of the setpoint
generator in seconds
0x00000105 Read / Write Servo UINT32 ENUM Default: type 1 Override type [} 489]
for velocity:
1: related to internal
reduced velocity (with-
out iteration)
2: related to original
external start velocity
(without iteration)
3: related to internal
reduced velocity (opti-
mization by means of
iteration)
4: related to original
external start velocity
(optimization by
means of iteration)
0x00000106 Read / Write Servo REAL64 1 [0.0 ... 1.0E6] Maximum permitted
Default: 0.0 step change in velocity
for dynamic reduction
DV = factor *min(A+,
A-) * DT
0x00000107 Read / Write Servo UINT16 1 [0,1] activates acceleration
Default: 1 and jerk limitation for
the auxiliary axis (Q1
to Q5)
Read / Write Servo REAL64 e.g. mm [0.0..1000.0] Radius of the toler-
ance sphere for the
auxiliary axes
Read / Write Servo REAL64 e.g. mm [0.0..10000.0] maximum allowed po-
sition deviation if the
tolerance sphere is re-
duced
Only for auxiliary axes
0x0000010A Read / Write Servo REAL64 e.g. mm/ [0.01 ... 1.0E20] Fast Axis Stop: Accel-
s^2 eration
(s.a. Fast Axis Stop
Signal Type)
0x0000010B Read / Write Servo REAL64 e.g. mm/ [0.01 ... 1.0E20] Fast Axis Stop: decel-
s^2 eration
(s.a. Fast Axis Stop
Signal Type)
0x0000010C Read / Write Servo REAL64 e.g. mm/ [0.1 ... 1.0E30] Fast Axis Stop: Jerk
s^3 (s.a. Fast Axis Stop
Signal Type)
0x00000201 Read / Write Stepper motor UINT32 ENUM operation mode step-
per motor
0x00000202 Read / Write Stepper motor REAL64 e.g. mm/ [1.0E-6 ... distance scaling of a
STEP 1000.0] motor step
0x00000203 Read / Write Stepper motor REAL64 e.g. mm/ [0.0 ... 1000.0] minimum velocity for
s velocity profile
0x00000204 Read / Write Stepper motor UINT32 1 [0 ... 100] number of steps per
frequency/velocity
step
0x00000205 Read / Write Stepper motor UINT32 1 motor mask as sync Not imple-
pulse mented !
0x00000301 Read / Write high/low REAL64 e.g. mm [0.0 ... creep distance in pos.
100000.0] direction
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000302 Read / Write high/low REAL64 e.g. mm [0.0 ... Creep distance in neg.
100000.0] direction
0x00000303 Read / Write high/low REAL64 e.g. mm [0.0 ... braking distance in
100000.0] pos. direction
0x00000304 Read / Write high/low REAL64 e.g. mm [0.0 ... Braking distance in
100000.0] neg. direction
0x00000305 Read / Write high/low REAL64 s [0.0 ... 60.0] braking deceleration in
pos. direction
0x00000306 Read / Write high/low REAL64 s [0.0 ... 60.0] Braking decel. in neg.
direction
0x00000307 Read / Write high/low REAL64 s [0.0 ... 60.0] Switching time from
high to low speed
0x00000308 Read / Write high/low REAL64 e.g. mm [0.0 ... creep distance stop
100000.0]
0x00000309 Read / Write high/low REAL64 s [0.0 ... 60.0] damping time to re-
lease brake
0x0000030A Read / Write high/low REAL64 s [0.0 ... 60.0] pulse time in pos. di-
rection
0x0000030B Read / Write high/low REAL64 s [0.0 ... 60.0] Pulse time in neg. di-
rection
ENCODER:
0x00n10001 Read Encoder: every UINT32 1 [1 ... 255] Encoder ID n = 0:
Standard encoder for
the axes > 0: n-th en-
coder for the axis (op-
tional)
0x00n10002 Read Encoder: every UINT8[30+1] 1 30 characters encoder name
0x00n10003 Read Encoder: every UINT32 1 s. ENUM (>0) encoder type [} 493]
0x00n10004 Read / Write Encoder: every UINT32 1 Byteoffset Input address offset change I/O ad-
(IO-Input-Image) dress
0x00n10005 Read / Write Encoder: every UINT32 1 Byteoffset Output address offset change I/O ad-
(IO-Output-Image) dress
0x00n10006 Read / Write Encoder: every REAL64 e.g. mm/ [1.0E-12 ... resulting scaling factor
INC 1.0E+30] (numerator / denomi-
nator)
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n10012 Read / Write Encoder: every REAL64 s [0.0...60.0] filter time for actual ac-
celeration value in
seconds (P-T1)
0x00n10013 Read / Write Encoder: every UINT8[10+1] 1 physical unit Not imple-
mented !
0x00n10014 Read / Write Encoder: every UINT32 1 Interpretation of the Not imple-
units (position, veloc- mented !
ity, time) bit 0: velocity bit array
in x/min instead of x/
sBit 1: position in thou-
sands of the base unit
0x00n10015 Read Encoder: every UINT32 INC [0x0... Encoder mask (maxi- Read-only pa-
0xFFFFFFFF] mum value of the en- rameter
coder actual value in
increments) s. parameter
"Encoder Sub
Note: The encoder Mask"
mask may be any nu-
merical value (e.g.
3600000). Unlike in
the past, it no longer
has to correspond to a
continuous series off
binary one's (2n-1).
0x00n10016 Read / Write Encoder: every UINT16 1 0/1 Actual position correc-
tion (measurement
system error correc-
tion)?
0x00n10017 Read / Write Encoder: every REAL64 s [0.0...60.0] Filter time for actual
position correction in
seconds (P-T1)
0x00n10019 Read / Write Encoder: every UINT32 1 s. ENUM (≥0) Encoder absolute di-
in the appendix mensioning system
[} 494]
0x00n1001A Read Encoder: every UINT32 1 s. ENUM (≥0) Encoder position ini- Not imple-
tialization mented !
0x00n1001B Read / Write Encoder: every REAL64 e.g. mm [≥0, modulo tolerance window for
factor/2] modulo-start
0x00n1001C Read Encoder: every UINT32 1 s. ENUM (≥0) encoder sign interpre-
tation [} 494] (data
type)
0x00n1001D Read Encoder: every UINT16 1 0/1 Incremental or abso-
lute encoder?
0: incremental en-
coder type
1: absolute encoder
type
0x00n10023 Read / Write Encoder: every REAL64 e.g. mm/ [1.0E-12 ... component of the scal- NEW from TC3
INC 1.0E+30] ing factor: numerator
(=> scaling factor nu-
merator / scaling fac-
tor denominator)
0x00n10024 Read / Write Encoder: every REAL64 1 [1.0E-12 ... component of the scal- NEW from TC3
1.0E+30] ing factor: denomina-
tor
(=> scaling factor nu-
merator / scaling fac-
tor denominator)
Default: 1.0
0x00n10025 Read / Write Encoder: every { NEW from TC3
REAL64 e.g. mm/ [1.0E-12 ... component of the scal-
REAL64 INC 1.0E+30] ing factor: numerator
} 1 [1.0E-12 ... component of the scal-
1.0E+30] ing factor: denomina-
tor
(=> scaling factor nu-
merator / scaling fac-
tor denominator)
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n10030 Read / Write Encoder: every UINT32 1 Internal encoder con- NEW from TC3
trol double word for
specifying the opera-
tion modes and prop-
erties
CON-
TROLLER:
0x00n20001 Read Controller: ev- UINT32 1 [1 ... 255] Controller ID n = 0:
ery Standard controller for
the axes > 0: n-th con-
troller of the axis (op-
tional)
0x00n20002 Read Controller: ev- UINT8[30+1] 1 30 characters controller name
ery
0x00n20003 Read Controller: ev- UINT32 1 s. ENUM (>0) controller type [} 492]
ery
0x00n2000A Read / Write Controller: ev- 1 s. ENUM (>0) controller mode
ery
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n2000B Read / Write Controller: ev- REAL64 % [0.0 ... 1.0] Weighting of the ve-
ery locity pre-control (de-
fault value: 1.0 = 100
%)
0x00n20010 Read / Write Controller: ev- UINT16 1 0/1 following error moni-
ery toring position?
0x00n20011 Read / Write Controller: ev- UINT16 1 0/1 following error moni-
ery toring velocity?
0x00n20012 Read / Write Controller: ev- REAL64 e.g. mm max. following error
ery position
0x00n20013 Read / Write Controller: ev- REAL64 s max. following error
ery time position
0x00n20014 Read / Write Controller: ev- REAL64 e.g. mm/ max. following error
ery s velocity
0x00n20015 Read / Write Controller: ev- REAL64 s max. following error
ery time velocity
0x00n20100 Read / Write P/PID (pos., REAL64 1 [0.0...1.0] Maximum output limi- (default value:
(veloc.) tation (±) for controller 0.5 == 50%)
total output
0x00n20102 Read / Write P/PID (pos.) REAL64 e.g. mm/ [0.0...1000.0] Proportional gain kp or position control
s/ mm kv respectively
Unit: Base Unit / s /
Base Unit
0x00n20103 Read / Write PID (pos.) REAL64 s [0.0 ... 60.0] Integral action time Tn position control
0x00n20104 Read / Write PID (pos.) REAL64 s [0.0 ... 60.0] Derivative action time position control
Tv
0x00n20105 Read / Write PID (pos.) REAL64 s [0.0 ... 60.0] Damping time Td position control
0x00n20106 Read / Write PP (Pos.) REAL64 e.g. mm/ [0.0...1000.0] Additional proportional position control
s/ mm gain, kp or kv respec-
tively, that applies
above a limit velocity
in percent.
Unit: Base Unit / s /
Base Unit
0x00n20107 Read / Write PP (Pos.) REAL64 % [0.0...1.0] Threshold velocity in
percent above which
the additional propor-
tional gain, kp or kv re-
spectively, applies
0x00n20108 Read / Write P/PID (Acc.) REAL64 s [0.0 ... 100.0] Proportional gain ka acceleration
pre-control
0x00n2010D Read / Write P/PID REAL64 mm [0.0 ... 10000.0] "dead band" for posi- reserved func-
tion error (control devi- tion
ation)
(for P/PID controllers
with velocity or torque
interface)
0x00n2010F Read / Write P/PP/PID REAL64 (mm/s) / [0.0...1000.0] Slave coupling differ- Slave coupling
(Pos.) mm ence control: difference con-
slave control proportional gain kcp trol:
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n20117 Read / Write PID (pos.) REAL64 % [0.0...1.0] Maximum output limi-
tation (±) for D-part in
percent (default set-
ting: 0.1 = 10%)
0x00n20118 Read / Write PID (pos.) UINT16 1 0/1 Deactivation of the I-
component during an
active positioning
process (assuming I-
component active)?
(default setting: 0 =
FALSE)
0x00n20120 Read / Write P/PID (pos.) REAL64 s ≥0 PT-1 filter value for reserved func-
position error (pos. tion,
control difference) no standard!
0x00n20202 Read / Write P/PID (velocity) REAL64 1 [0.0...1000.0] Proportional gain kp or Velocity
kv respectively control
0x00n20203 Read / Write PID (velocity) REAL64 s [0.0 ... 60.0] Integral action time Tn Velocity
control
0x00n20204 Read / Write PID (velocity) REAL64 s [0.0 ... 60.0] Derivative action time Velocity
Tv control
0x00n20205 Read / Write PID (velocity) REAL64 s [0.0 ... 60.0] Damping time Td Velocity
control
0x00n20206 Read / Write PID (velocity) REAL64 % [0.0...1.0] Maximum output limi- Velocity
tation (±) for I-part in control
percent (default set-
ting: 0.1 = 10%)
0x00n20207 Read / Write PID (velocity) REAL64 % [0.0...1.0] Maximum output limi- Velocity
tation (±) for D-part in control
percent (default set-
ting: 0.1 = 10%)
0x00n2020D Read / Write P/PID (velocity) REAL64 mm/s [0.0 ... 10000.0] "dead band" for veloc- reserved func-
ity error (control devia- tion
tion)
(for P/PID controllers
with velocity or torque
interface)
0x00n20220 Read / Write P/PID (velocity) REAL64 s ≥0 PT-2 filter value for ve- Velocity
locity error (vel. control control, not
difference) standard!
0x00n20221 Read / Write P/PID (velocity) REAL64 s ≥0 PT-1 filter value for ve- reserved func-
locity error (vel. control tion,
difference) no standard!
0x00n20250 Read / Write P/PI (observer) UINT32 1 s. ENUM (≥0) Observer mode [} 492]
for controller with
torque interface 0:
OFF (default)
1: LUENBERGER
0x00n20251 Read / Write P/PI (observer) REAL64 Nm / A >0 Motor:
torque constant KT
0x00n20252 Read / Write P/PI (observer) REAL64 kg m2 >0 Motor:
moment of inertia JM
0x00n20253 Read / Write P/PI (observer) REAL64 Hz [100.0 ... bandwidth f0
2000.0] default:
500
0x00n20254 Read / Write P/PI (observer) REAL64 1 [0.0 ... 2.0] de- correction factor kc
fault: 1.0
0x00n20255 Read / Write P/PI (observer) REAL64 s [0.0 ... 0.01] de- velocity filter (1st or-
fault: 0.001 der):
time constant T
0x00n20A03 Read / Write P/PID (MW) REAL64 cm^2 [0.0 ... cylinder area AA of the reserved pa-
1000000] A side in cm^2 rameters !
0x00n20A04 Read / Write P/PID (MW) REAL64 cm^2 [0.0 ... cylinder area AB of the reserved pa-
1000000] B side in cm^2 rameters !
0x00n20A05 Read / Write P/PID (MW) REAL64 cm^3/s [0.0 ... nominal volume flow reserved pa-
1000000] Qnom in cm^3/s rameters !
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n20A06 Read / Write P/PID (MW) REAL64 bar [0.0 ... Rated pressure or reserved pa-
1000000] valve pressure drop, rameters !
Pnom in bar
0x00n20A07 Read / Write P/PID (MW) UINT32 1 [1 ... 255] Axis ID for the system reserved pa-
pressure Po rameters !
DRIVE:
0x00n30001 Read Drive: every UINT32 1 [1 ... 255] Drive ID
0x00n30002 Read Drive: every UINT8[30+1] 1 30 characters Drive name
0x00n30003 Read Drive: every UINT32 1 s. ENUM (>0) Drive type [} 496]
0x00n30004 Read / Write Drive: every UINT32 1 Byteoffset Input address offset change I/O ad-
(IO-Input-Image) dress
0x00n30005 Read / Write Drive: every UINT32 1 Byteoffset Output address offset change I/O ad-
(IO-Output-Image) dress
0x00n30006 Read / Write Drive: every UINT16 1 [0,1] motor polarity
0x00n3000A Read / Write Drive: every UINT32 1 s. ENUM (>0) drive mode
0x00n3000B Read / Write Drive: every REAL64 % [-1.0 ... 1.0] Minimum output limit
(default setting: -1.0 =
-100%)
0x00n3000C Read / Write Drive: every REAL64 % [-1.0 ... 1.0] Maximum output limit
(default setting: 1.0 =
100%)
0x00n3000D Read Drive: every UINT32 INC Maximum number of
output increments
(output mask)
0x00n30010 Read / Write Drive: every UINT32 1 Internal Drive Control reserved!
double word to deter-
mine the drive opera-
tion modes
0x00n30011 Read / Write every UINT32 1 ≥5 Internal Drive Reset reserved!
Counter
(time in NC cycles for
enable and reset)
0x00n30101 Read / Write D: Servo REAL64 e.g. mm/ >0 Reference velocity at
s reference output (ve-
locity pre-control)
0x00n30102 Read / Write D: Servo REAL64 % [0.0 ... 5.0] Reference output in
percent (default set-
ting: 1.0 = 100%)
0x00n30103 Read D: Servo REAL64 e.g. mm/ >0 resulting velocity at
s 100% output
0x00n30104 Read / Write D: Servo REAL64 e.g. mm/ ±∞ velocity offset (DAC
s offset) for drift calibra-
tion (offset calibration)
of the axis
0x00n30105 Read / Write D: Servo (Ser- REAL64 1 [0.0 ... velocity scaling (scal- For Ser-
cos, Profi Drive, 100000000.0] ing factor to react to cos, Profi Drive,
AX200x, the weight in the drive) AX200x,
CANopen) CANopen
0x00n30106 Read / Write D: Profi Drive UINT32 0.001 * ≥0 Profibus/Profi Drive Only for Profi
DSC 1/s DSC: position control Drive DSC
gain Kpc
0x00n30107 Read / Write D: Profi Drive REAL64 1 ≥ 0.0 Profibus/Profi Drive Only for Profi
DSC DSC: scaling for cal- Drive DSC
culating 'XERR' (De-
fault: 1.0)
0x00n30109 Read / Write D: Servo (Ser- REAL64 1 [0.0 ... position scaling (scal- For Sercos,
cos, CANopen) 100000000.0] ing factor to react to CANopen
the weight in the drive)
0x00n3010A Read / Write D: Servo (Ser- REAL64 1 [0.0 ... acceleration scaling For Ser-
cos, Profi Drive, 100000000.0] (scaling factor to react cos, Profi Drive,
AX200x, to the weight in the AX200x,
CANopen) drive) CANopen
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n30120 Read / Write D: Servo/hy- UINT32 1 ≥0 Table ID Only for
draulics/ (0: no table) KL4xxx,
M2400, Univer-
sal
0x00n30121 Read / Write D: Servo/hy- UINT32 1 ≥0 Interpolation type 0: Only for
draulics Linear KL4xxx,
2: Spline M2400, Univer-
sal
0x00n30122 Read / Write Servo/hy- REAL64 % [-1.0 ... 1.0] Output offset in per- Only for
draulics cent, note: KL4xxx,
Acts according to the M2400, Univer-
characteristic evalua- sal
tion !
0x00n30151 Read / Write D: Servo / non- REAL64 1 [0.0 ... 100.0] Quadrant compensa-
linear tion factor (relationship
between quadrant I
and III)
0x00n30152 Read / Write D: Servo / non- REAL64 1 [0.01 ... 1.0] Velocity reference
linear point in percent (1.0 =
100 %)
0x00n30153 Read / Write D: Servo / non- REAL64 1 [0.01 ... 1.0] output reference point
linear in percent (1.0 = 100
%)
7.8.4.2 "Index offset" specification for Axis state (Index group 0x4100 + ID)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n00000 Read every (online { AXIS ONLINE Changed from
structure for STRUCTURE (NC/ TC3, not oscil-
axis data) CNC) loscopeable!
INT32 1 Error state (NCAXIS-
STATE_ ON-
INT32 Reserved LINESTRUCT)
REAL64 e.g. mm Actual position
REAL64 e.g. de- Modulo actual position
gree
REAL64 e.g. mm Set position
REAL64 e.g. de- Modulo set position
gree
REAL64 e.g. mm/ Optional: actual veloc-
s ity
REAL64 e.g. mm/ Set velocity
s
UINT32 % 0...1000000 speed override
(1000000 == 100%)
UINT32 Reserved
REAL64 e.g. mm Following error posi-
tion
REAL64 e.g. mm PeakHold value for
max. neg. position lag
(pos.)
REAL64 e.g. mm Peak hold value for
max. pos. following er-
ror. (pos.)
REAL64 % Controller output in
percent
REAL64 % Total output in percent
UINT32 1 ≥0 Axis status double
word
UINT32 1 ≥0 Axis control double
word
UINT32 1 ≥0 Slave coupling state
(state)
UINT32 1 0; 1,2,3... Axis control loop index
REAL64 e.g. mm/ Actual acceleration
s^2
REAL64 e.g. mm/ Set acceleration
s^2
REAL64 e.g. mm/ Set jerk (new from
s^3 TC3.1 B4013)
REAL64 e.g. Set torque or set force
100% = (reserved, not imple-
1000 mented)
REAL64 e.g. Actual torque or actual
100% = force (new from TC3.1
1000 B4013)
} 256 byte
0x00000001 Read every UINT32 1 error code axis state Symbolic ac-
[} 340] cess: 'ErrState''
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n0000F Read every REAL64 e.g. mm/ Set acceleration Symbolic ac-
s^2 cess: 'SetAcc''
0x00n00010 Read every REAL64 e.g. mm/ Set jerk (time deriva-
s^3 tion of the set acceler-
ation)
0x00n00011 Read every REAL64 e.g. Nm Set torque (rot. motor) reserved, not
or N, or implemented.
e.g. set force (linear motor)
100%=1
000
0x00n00012 Read every REAL64 1 Set coupling factor
(set gear ratio)
0x00n00013 Read every REAL64 e.g. mm Expected target posi-
tion
0x00n00014 Read Servo { Remaining travel time Always to SAF
and distance Port 501!
(SERVO):
REAL64 s ≥0 Remaining travel time
REAL64 e.g. mm ≥ 0 Remaining distance
}
0x00n00015 Read every UINT32 1 ≥0 Set command number
0x00n00016 Read Servo REAL64 s ≥0 Positioning time of the
last motion command
(Start → target posi-
tion window)
0x00n00017 Read Servo REAL64 % [0.0…1.0] Set override value for NEW from
velocity TC3.1 B4020
1.0=100%
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000023 Read Servo master / REAL64 1 [±1000000.0] Reading of the gear
slave coupling ratio (servo) type: LIN-
type: LINEAR, EAR,
(&SPECIAL)
0x00000024 Read Servo UINT32 1 ≥0 Number / index of the
active axis control cir-
cuit (triple of encoder,
controller and axis in-
terface)
0x00000025 Read Servo UINT16 1 0/1 External set value
specification via axis
interface PCLtoNC ac-
tive?
0x00000026 Read servo master / REAL64 [64] 1 ±∞ Reading of the charac- Modified from
slave coupling teristic slave values TC3
type: SYN- synchronization profile
CHRONIZING type: SYNCHRONIZ-
ING
0x00000027 ReadWrite Servo master / Write Read the "Tabular Only port 500!
slave coupling coupling information"
Modified from
type: TABU- VOID - no data for the "cur- TC3
LAR, MF e.g. mm ±∞ rent information",
or
- optional for a certain
REAL64 "master axis position"
or - for a certain table ID
and optional “master
DWORD, axis position” (TC 3.1
DWORD, B4017)
REAL64
Read
REAL64 [32] ±∞ Read the tabular cou-
pling information
[} 499] structure
0x00000028 ReadWrite Servo master / Write Read the "multi tabular Only port 500!
slave coupling coupling informa-
type: MULTI- tion" (CamAddition)
CAM (CamAd- UINT32 1 ≥0 Table ID to which the
dition) query relates
Read
96 byte Read the multi tabular
coupling information
[} 499] structure
0x00000029 Read Servo UINT32 1 Delayed error code
(error pre-warning) in
case of a delayed er-
ror reaction (see bit
ErrorPropagationDe-
layed)
0x0000002A Read Servo REAL64 e.g. mm ±∞ Position difference
while fading from set
position to actual posi-
tion (fading part)
0x0000002B Read Servo REAL64 e.g. mm/ ±∞ Relative velocity while
s fading from set posi-
tion to actual position
(fading part)
0x0000002C Read Servo REAL64 e.g. mm/ ±∞ Relative acceleration
s ^2 while fading from set
position to actual posi-
tion (fading part)
0x0000002D Read Servo UINT32 1 ≥0 Counter for initializa- NEW
tion command
(InitializeCommand-
Counter)
0x0000002E Read Servo UINT32 1 ≥0 Counter for reset com- NEW
mand
(ResetCommand-
Counter)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000040 Read Servo UINT32 1 ≥0 Counter for correction NEW from
of the NC set values in TC3.1 B4020
case of data inconsis-
tency
(Activation with Idx-
Group 0x1000 and
Idx-Offset 0x0020)
0x00000063 ReadWrite for SERCOS/ Write Read active "Drive NEW from TC
SoE only Operation Mode" 3.1 B4020 (NC
UINT32 1 Reserve 4249)
UINT32 1 Reserve Always to SAF
Port 501!
Read
UINT32 ENUM [0; 101, 102, …, currently active "Drive
[} 497] 107] Operation
Mode" (generic
(see ap- modes)
pendix)
UINT32 1 Reserve
0x00n10002 Read every (Encoder) REAL64 e.g. mm Actual position (offset Symbolic ac-
by actual position cor- cess: 'ActPos''
rection value) n = 0:
standard encoder of
the axes > 0: nth en-
coder of the axis (op-
tional)
0x00n10003 Read every (Encoder) REAL64 e.g. de- Modulo actual position Symbolic ac-
gree cess: 'ActPos-
Modulo'
0x00n10004 Read every (Encoder) INT32 1 Modulo actual rotation
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n10005 Read every (Encoder) REAL64 e.g. mm/ Optional: actual veloc- Symbolic ac-
s ity cess: 'ActVelo''
0x00n10006 Read every (Encoder) REAL64 e.g. mm/ Optional: Actual accel- Symbolic ac-
s^2 eration cess: 'ActAcc''
0x00n10007 Read every (Encoder) INT32 INC Encoder actual incre-
ments
0x00n10008 Read every (Encoder) INT64 INC Software - actual in-
crement counter
0x00n10009 Read every (Encoder) UINT16 1 0/1 Reference flag ("cali-
brate flag")
0x00n1000A Read every (Encoder) REAL64 e.g. mm Actual position correc-
tion value (measure-
ment system error cor-
rection)
0x00n1000B Read every (Encoder) REAL64 e.g. mm Actual position without Cannot be
actual position com- traced by oscil-
pensation value loscope!
0x00n10010 Read every (Encoder) REAL64 e.g. mm/ Actual velocity without
s actual position com-
pensation value
0x00n10012 Read every (Encoder) REAL64 e.g. mm Unfiltered actual posi-
tion (charge with ac-
tual position compen-
sation value)
0x00n10014 Read Encoder: SoE, REAL64 e.g. mm/ Optional: Actual drive NEW from
CoE, MDP 742 s velocity (transferred TC3.1
directly from SoE, CoE B4020.30
or MDP 742 drive)
0x00n10015 Read every (Encoder) REAL64 e.g. mm/ Optional: Unfiltered
s actual velocity
0x00n10101 Read INC (Encoder) REAL64 e.g. mm Read back of the posi- Cannot be
tion difference be- traced by oscil-
tween activation of the loscope!
internal hardware latch
and the time when it
becomes valid
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n20012 Read R: every REAL64 e.g. mm/ Following error veloc- Not imple-
s ity mented !
0x00n20110 Read R: PID (pos.) REAL64 e.g. mm/ Acceleration pre-con- Acceleration
s trol Yacc of the con- pre-control
troller in absolute
units, note: Function
depends on controller
type!
0x00n20111 Read R: PP (Pos.) REAL64 mm/s/ ≥0 Internal interpolated PP controller
mm proportional gain kp or
kv
0x00n20201 Read R: P,PID (ve- REAL64 e.g. mm/ Velocity part of the
locity) s controller
0x00n20202 Read R: P,PID (ve- REAL64 % Velocity part of the Cannot be
locity) controller in percent traced by oscil-
loscope!
0x00n20203 Read R: P,PID (ve- REAL64 V Velocity part of the Cannot be
locity) controller in volts traced by oscil-
loscope!
0x00n20201 Read R: P/PID (ve- REAL64 e.g. mm/ Proportional compo-
locity) s nent of the controller
in absolute units
0x00n20202 Read R: P/ PID (ve- REAL64 e.g. mm/ I-part of the controller
loc.) s in absolute units
0x00n20203 Read R: P/ PID (ve- REAL64 e.g. mm/ D-part of the controller
loc.) s in absolute units
0x00n20204 Read R: P/ PID (ve- UINT16 1 0/1 Limitation of the I-part
loc.) active?
0x00n20205 Read R: P/ PID (ve- UINT16 1 0/1 Limitation of the D-part
loc.) active?
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n20206 Read R: P/ PID (ve- UINT16 1 0/1 ARW measures for the
loc.) I-part active?
(ARW: Anti Reset
Windup)
0x00n2020A Read R: P/ PID (ve- REAL64 e.g. mm/ Total input size of the
loc.) s velocity controller
0x00n20A00 Read R: PID (MW) REAL64 % [-1.0...1.0] Offsetting of the set reserved pa-
velocity (pre-control) rameters !
0x00n20A01 Read R: PID (MW) REAL64 e.g. mm/ Proportional compo- reserved pa-
s nent of the controller rameters !
in absolute units or
percent (according to
output weight)
0x00n20A02 Read R: PID (MW) REAL64 e.g. mm/ I-part of the controller reserved pa-
s in absolute units or rameters !
percent (according to
output weight)
0x00n20A03 Read R: PID (MW) REAL64 e.g. mm/ D-part of the controller reserved pa-
s in absolute units or rameters !
percent (according to
output weight)
0x00n20A04 Read R: PID (MW) UINT16 1 0/1 Limitation of the I-part reserved pa-
active? rameters !
0x00n20A05 Read R: PID (MW) UINT16 1 0/1 Limitation of the D-part reserved pa-
active? rameters !
0x00n20A06 Read R: PID (MW) UINT16 1 0/1 ARW measures of the reserved pa-
I component active? rameters !
ARW: Anti Reset
Windup
0x00n20A10 Read R: PID (MW) REAL64 e.g. mm/ Acceleration pre-con- reserved pa-
s trol Yacc of the con- rameters !
troller in absolute units
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n3011F Read D: Servo (Ser- REAL64 e. g. Optional Smoothingfil- NEW
cos, CANopen) mm/s^2 ter: For Sercos,
Filtered set accelera- CANopen
tion / deceleration
7.8.4.3 "Index offset" specification for Axis functions (Index group 0x4200 + ID)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000001 Write every VOID Reset axis For FIFO axes
too!
0x00000002 Write every VOID Stop axis For FIFO axes
too!
0x00000003 Write every VOID Clear axis (task) For FIFO axes
too!
0x00000004 Write every { Emergency stop (with Only for PTP
controlled ramp) axes!
REAL64 e.g. mm/ > 0.0 Deceleration (must be
s^2 greater than or equal
to the original deceler-
ation)
REAL64 e.g. mm/ > 0.0 Jerk (must greater
s^3 than or equal to the
original jerk)
}
0x00000005 Write PTP axis { Parameterizable stop For PTP axes
(with controlled ramp) only! Reserved
REAL64 e.g. mm/ > 0.0 deceleration function,
s^2 no standard!
REAL64 e.g. mm/ > 0.0 Jerk
s^3
}
0x00000009 Write PTP axis { Oriented stop Only for PTP
(oriented end position) axes!
REAL64 e.g. de- ≥ 0.0 Modulo end position
gree (modulo target posi-
tion)
REAL64 e.g. mm/ > 0.0 Deceleration (currently
s^2 not active)
REAL64 e.g. mm/ > 0.0 Jerk (currently not ac-
s^3 tive)
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000015 Write every { New dynamic parame-
ters for active position-
ing
REAL64 e.g. mm/ > 0.0 Acceleration
s^2
REAL64 e.g. mm/ > 0.0 deceleration
s^2
REAL64 e.g. mm/ > 0.0 Optional: jerk (not yet
s^3 implemented)
}
0x00000016 ReadWrite every SERVO Write (80 Universal axis start Always to SAF
bytes) (UAS): Port 501!
merge of single com-
Modified from
mands, such as axis
TC3
start, and online
changes in combina-
tion with "Buffer
Mode" (see TcMc2.lib)
{
UINT32 ENUM s. appendix Start type [} 489] (s.
appendix)
UINT32 1 ≥0 Bit mask for checks
and operation modes
(default value: 0)
REAL64 e.g. mm ±∞ End position (target
position)
REAL64 e.g. mm/ ≥ 0.0 Required velocity
s Vrequ
REAL64 e.g. mm/ ≥ 0.0 Optional: Acceleration
s^2
REAL64 e.g. mm/ ≥ 0.0 Optional: deceleration
s^2
REAL64 e.g. mm/ ≥ 0.0 Optional: Jerk
s^3
UINT32 ENUM s. appendix Buffer Mode [} 489]
(command buffer)
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ Optional: blending po-
sition (command
blending position)
REAL64 e.g. mm/ ≥ 0.0 Optional: segment
s start velocity Vi
(0 ≤ Vi ≤ Vrequ)
REAL64 e.g. mm/ ≥ 0.0 Optional: segment end
s velocity Vf
(0 ≤ Vf ≤ Vrequ)
}
Read
{
UINT16 1 ≥0 Command number
(job number)
UINT16 1 ≥0 Command status
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000017 ReadWrite SERVO Write (80 "Master/slave decou- not yet re-
bytes) pling" and "Universal leased!
axis start (UAS)":
Merge of decoupling
command of a slave
axis (IdxOffset:
0x00000041) and the
subsequent universal
axis start (UAS) (Idx-
Offset: 0x00000016)
{
UINT32 ENUM s. appendix Start type [} 489] (s.
appendix)
UINT32 1 ≥0 Bit mask for checks
and operation modes
(default value: 0)
REAL64 e.g. mm ±∞ End position (target
position)
REAL64 e.g. mm/ ≥ 0.0 Required velocity
s Vrequ
REAL64 e.g. mm/ ≥ 0.0 Acceleration
s^2
REAL64 e.g. mm/ ≥ 0.0 deceleration
s^2
REAL64 e.g. mm/ ≥ 0.0 Jerk
s^3
UINT32 ENUM s. appendix Buffer Mode [} 489]
(command buffer)
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ Optional: blending po-
sition (command
blending position)
REAL64 e.g. mm/ ≥ 0.0 Optional: segment
s start velocity Vi
(0 ≤ Vi ≤ Vrequ)
REAL64 e.g. mm/ ≥ 0.0 Optional: segment end
s velocity Vf
(0 ≤ Vf ≤ Vrequ)
}
Read
{
UINT16 1 ≥0 Command number
(job number)
UINT16 1 ≥0 Command status
}
0x00000018 Write every VOID Release axis lock for
motion commands
(TcMc2)
0x00000019 Write every UINT32 1 >0 Set external axis error Caution when
(runtime error) using!
0x00n0001A Write every { Set actual axis posi- Caution when
tion using! Also for
UINT32 ENUM s. appendix FIFO axes! Al-
Actual position type
ways at SAF
[} 490] (s. appendix) port 501!
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ Actual position for
axes = 0: Standard en- Modified from
coder of the axis TC3
n > 0: n-th encoder for
the axis (optional)
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n0001B Write every UINT32 1 0/1 Set reference flag Caution when
("calibrate flag")n = 0: using! Also for
standard encoder of FIFO axes!
the axis
n > 0: n-th encoder for
the axis (optional)
0x00n0001C Write SERVO { Set only actual axis Caution when
position without ma- using!
nipulating the set posi-
tion (also for slave and
with active process)
UINT32 ENUM s. appendix Actual position type
[} 490] (s. appendix)
REAL64 e.g. mm ±∞ Actual position for axis
n = 0: standard en-
coder of the axes > 0:
n-th axis encoder (op-
tional) Caution when
using!!!
}
0x00n0001D Write every { Set actual value of the Caution when
axis on the drive side using ! Only for
(Position interface and CANopen
encoder offset of null
required!)
n = 0: Standard en-
coder of the axis
n > 0: n-th encoder for
the axis (optional)
UINT32 ENUM s. appendix Actual position type
[} 490] (s. appendix)
REAL64 e.g. mm ±∞ actual position for axis
}
0x00n0001E Write every { Set a new encoder Caution when
scaling factor on the using!
fly Always to SAF
(also when axis is in Port 501!
motion)
UINT16 ENUM 1 Encoder scaling factor
type Modified from
1: Absolute TC3
2: Relative
UINT16 ControlWord
UINT32 Reserve (TC3)
REAL64 e.g. mm/ [1.0E-8 ... New encoder scaling
INC 100.0] factor
n = 0: Standard en-
coder of the axis
n > 0: n-th encoder for
the axis (optional)
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n0001F Write every { Set actual axis posi- Caution when
tion on the fly using! Always
(also when axis is in on SAF port
motion) 501!
UINT32 ENUM Position type for set-
ting actual value on
the fly
1: Absolute
2: Relative
UINT32 1 Control double word,
e.g. for "clearing the
position lag"
REAL64 Reserve
REAL64 e.g. mm ±∞ New actual axis posi-
tion
UINT32 Reserve
UINT32 Reserve
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000022 Write SERVO(MW) { Special axis start Reserved start
(SERVO): function, no
UINT32 ENUM s. appendix standard!
Start type [} 489] (s.
appendix) Modified from
UINT32 Reserve (TC3) TC3
REAL64 e.g. mm ±∞ End position (target
position)
REAL64 mm/s ≥ 0.0 required start velocity
REAL64 e.g. mm ±∞ Position for a new ve-
locity level
REAL64 e.g. mm/ ≥ 0.0 new end velocity level
s
UINT32 0/1 0/1 Standard accelera-
tion?
UINT32 Reserve (TC3)
REAL64 e.g. mm/ ≥ 0.0 Acceleration
s^2
UINT32 0/1 0/1 Standard decelera-
tion?
UINT32 Reserve (TC3)
REAL64 e.g. mm/ ≥ 0.0 deceleration
s^2
UINT32 0/1 0/1 Standard jerk?
UINT32 Reserve (TC3)
REAL64 e.g. mm/ ≥ 0.0 Jerk
s^3
}
0x00000023 Write SERVO { Start external set Modified from
value specification TC3
(setting by cyclic axis
interface PLCtoNC)
UINT32 ENUM 1: Absolute start type [} 489]
2: Relative
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ New end position (tar-
get position) optional !
REAL64 Reserve (TC3)
}
0x00000024 Write SERVO VOID Stop/disable external
set value specification
(cyclic axis interface
PLCtoNC)
0x00000025 Write SERVO { Start reversing opera- Modified from
tion for positioning TC3
(SERVO):
UINT32 ENUM 1 Start type [} 489] (de-
fault: 1)
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ end position 1 (target
position)
REAL64 e.g. mm ±∞ end position 2 (target
position)
REAL64 0/1 0/1 required velocity
REAL64 s ≥ 0.0 idle time
}
0x00000026 Write every { Start drive output: Modified from
UINT32 ENUM s. appendix TC3
Output type [} 496] (s.
appendix)
UINT32 Reserve (TC3)
REAL64 e.g. % ±∞ required output value
(e.g. %)
}
0x00000027 Write every VOID Stop drive output
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000028 Write every { Change the drive out-
put:
UINT32 ENUM s. appendix Output type [} 496] (s.
appendix)
REAL64 e.g. % ±∞ required output value
(e.g. %)
}
0x00000029 Write every VOID Instantaneously adopt reserved func-
current override value tion, no stan-
and freeze until next dard!
override change!
0x0000002A Write every { calculate and set en- reserved func-
32 bytes coder offset tion, no stan-
} dard!
0x0000002B ReadWrite every WriteData: see stop external setpoint reserved func-
'UAS' generator and continu- tion, no stan-
ReadData: s. ous endless motion dard!
'UAS' ('UAS': Universal axis
start)
0x0000002C Write every UINT32 ≥0 Set "homing state" (for New from TC3
internal use)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000030 ReadWrite SERVO returns { Start section compen- Modified from
the actually im- READ+WRITE: sation (SERVO) TC3
plemented pa- Note: contained only
rameters as re- in "TcMc2.lib"
turn values UINT32 ENUM s. appendix Compensation type
[} 490] (s. appendix)
UINT32 Reserve (TC3)
REAL64 e.g. mm/ ≥ 0.0 => Max. acceleration
s^2 increase
<= returns the imple-
mented acceleration
increase (new in
"TcMc2.lib")
REAL64 e.g. mm/ ≥ 0.0 => Max. deceleration
s^2 increase
<= returns the imple-
mented deceleration
increase (new in
"TcMc2.lib")
REAL64 e.g. mm/ > 0.0 => requested max. in-
s crease velocity
<= returns the imple-
mented velocity of in-
crease
REAL64 e.g. mm/ > 0.0 Base velocity for the
s process
REAL64 e.g. mm ±∞ => requested path dif-
ference to be compen-
sated
<= returns the imple-
mented path differ-
ence
REAL64 e.g. mm > 0.0 => requested max.
distance for compen-
sation
<= returns imple-
mented distance
UINT32 1 ≥0 <= returns Warning ID
(e.g. 0x4243)
UINT32 Reserve (TC3)
}
0x00000031 Write SERVO VOID Stop section compen-
sation (SERVO)
0x00000032 Write SERVO { Start reversing opera- Modified from
tion with velocity steps TC3
(SERVO):
(can be used to deter-
mine the velocity step
response)
UINT32 ENUM 1 Start type [} 489] (de-
fault: 1)
UINT32 Reserve (TC3)
REAL64 e.g. mm/ ±∞ Required velocity 1
s (negative values also
allowed)
REAL64 e.g. mm/ ±∞ Required velocity 2
s (negative values also
allowed)
REAL64 s > 0.0 Travel time for velocity
1 and 2
REAL64 s ≥ 0.0 idle time
UINT32 1 0, 1,2,3... Optional: number of
repetitions,
Default "0": unlimited
in time
UINT32 Reserve (TC3)
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000033 Write SERVO { Sinus Oscillation Se- Modified from
quence TC3
- used as single sinus
oscillation (sinus gen-
erator)
- used as sinus oscilla-
tion sequence (e.g. for
bode plot)
UINT32 ENUM 1 Start type [} 489]
(fixed to start type 1
yet)
UINT32 Reserve (TC3)
REAL64 e.g. mm/ > 0.0 base amplitude (e.g.
s 2.5 mm/s)
REAL64 Hz [0.0 .... 10.0] base frequency (e.g.
1.953125 Hz)
REAL64 e.g. mm/ ≥ 0.0 start amplitude at be-
s gin (e.g. 0.0 mm/s)
REAL64 e.g. mm/ > 0.0 feed constant motor
REV (per motor turn) (e.g.
10.0 mm/REV)
REAL64 Hz ≥ 1.0 frequency range: start
frequency (e.g. 20.0
Hz)
REAL64 Hz ≤ 1/(2*dT) frequency range: stop
frequency (e.g. 500.0
Hz)
REAL64 s > 0.0 step duration (e.g.
2.048s)
UINT32 1 [1 ... 200] number of measure-
ments (step cycles)
(e.g. 20)
UINT32 1 number of parallel
measurements (e.g. 1)
not used yet!
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000040 Write Master/Slave { Master/slave coupling Extension for
(0x00n00040) coupling: (SERVO): "flying saw"!
(SERVO) UINT32 ENUM s. appendix Slave type/ [} 491]cou- Angle >0.0 and
pling type (see appen- £ 90.0 degrees
dix) (parallel saw:
UINT32 1 [1...255] Axis ID of the master 90.0 degrees)
axis/group
UINT32 1 [0...8] Subindex n of the
master axis (default:
value: 0)
UINT32 1 [0...8] Subindex n of the
slave axis (default:
value: 0)
REAL64 1 [±1000000.0] Parameter 1: linear:
Gearing factor
FlySawVelo: Reserve
FlySaw: abs. synchron
position master [mm]
REAL64 1 [±1000000.0] Parameter 2: linear:
Reserve
FlySawVelo: Reserve
FlySawPos: Abs. syn-
chronous position
slave [mm]
REAL64 1 [±1000000.0] Parameter 3: linear:
Reserve
FlySawVelo: Angle of
inclination in [DE-
GREE]
FlySawPos: angle of
inclination in [DE-
GREE]
REAL64 1 [±1000000.0] Parameter 4: linear:
Reserve
FlySawVelo: Gearing
factor
FlySawPos: Gearing
factor
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000040 Write Master/Slave { Master/slave coupling Multi-master
(0x00n00040) coupling: (SERVO): coupling
(SERVO) UINT32 ENUM s. appendix (MC_GearIn-
Slave type/ [} 491]cou-
MultiMaster)
pling type (see appen-
dix) Version V1 and
UINT32 1 [1...255] Axis ID of the master V2
axis/group Modified from
UINT32 1 [1...8] Subindex n of the TC3
master axis (default:
value: 0)
UINT32 1 [1...8] Subindex n of the
slave axis (default:
value: 0)
UINT32 1 [0...255] Axis ID master 2
UINT32 1 [0...255] Axis ID master 3
UINT32 1 [0...255] Axis ID master 4
UINT32 1 [0...255] Reserve (axis ID mas-
ter 5)
UINT32 1 [0...255] Reserve (axis ID mas-
ter 6)
UINT32 1 [0...255] Reserve (axis ID mas-
ter 7)
UINT32 1 [0...255] Reserve (axis ID mas-
ter 8)
UINT32 Reserve (TC3)
REAL64 e.g. mm/ Maximum accelera-
s^2 tion/deceleration of the
slave axis
UINT32 1 ≥0 Control mask, not yet
in use
(check and operation
mode for profile)
UINT32 Reserve (TC3)
Extension V2 (Optional):
REAL64 e.g. mm/ ≥ 0.0 Maximum deceleration
s^2 of the slave axis
REAL64 e.g. mm/ ≥ 0.0 Maximum jerk of the
s^3 slave axis
REAL64 e.g. mm/ ≥ 0.0 Maximum velocity of
s the slave axis
REAL64 Reserve
REAL64 Reserve
} 64 or 104
bytes
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000041 Write Master/slave { Master/slave decou- not yet re-
decoupling with pling with configurable leased!
configurable fol- follow-up function (e.g.
Modified from
low-up function new end position, new
TC3
(SERVO) velocity, stop, E-stop)
(SERVO)
UINT32 ENUM s. appendix Decoupling type
[} 491] (see appendix)
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ Optional: new end po-
sition
REAL64 e.g. mm/ > 0.0 Optional: new re-
s quested velocity
REAL64 e.g. mm/ ≥ 0.0 Optional: acceleration
s^2 (0: Default) for new end position,
new velocity and
emergency stop (E-
stop)
REAL64 e.g. mm/ ≥ 0.0 Optional: deceleration
s^2 (0: Default) for new end position,
new velocity and
emergency stop (E-
stop)
REAL64 e.g. mm/ ≥ 0.0 Optional: jerk for new
s^3 (0: Default) end position, new ve-
locity and emergency
stop (E-stop)
}
0x00000042 Write Master / slave { Change of the cou-
coupling type: pling parameters
LINEAR (SERVO):
(&SPECIAL) REAL64 1 [±1000000.0] Parameter 1: Linear:
Gearing factor
REAL64 1 [±1000000.0] Parameter 2: Linear:
Reserve
REAL64 1 [±1000000.0] Parameter 3: Linear:
Reserve
REAL64 1 [±1000000.0] Parameter 4: Linear:
Reserve
}
0x00000043 Write Master / slave { Change of the table
table- coupling coupling parameters
type: TABULAR (SERVO):
REAL64 mm ±∞ Slave position offset
REAL64 mm ±∞ Master position offset
}
0x00000043 Write Master / slave { Change of the table Also for "Motion
table- coupling coupling parameters Function"
type: TABULAR (SERVO):
and REAL64 mm ±∞ Slave position offset
"Motion Func-
tion" REAL64 mm ±∞ Master position offset
REAL64 1 ±∞ (<> 0.0) Slave position scaling
REAL64 1 ±∞ (<> 0.0) Master position scal-
ing
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000043 Write Master / slave { Change of the table
table- coupling coupling parameters
type: TABULAR (SERVO):
REAL64 mm ±∞ Slave position offset
REAL64 mm ±∞ Master position offset
REAL64 1 ±∞ (<> 0.0) Slave position scaling
REAL64 1 ±∞ (<> 0.0) Master position scal-
ing
REAL64 e.g. mm ±∞ Absolute master acti-
vation position
}
0x00000044 Write Slave-Stop VOID Stop the "flying Only for "flying
(SERVO) saw" (SERVO) saw"
0x00000045 Write Master/slave ta- { Master/slave table
(0x00n00045) ble coupling coupling (SERVO):
(SERVO) UINT32 ENUM s. appendix Slave type/coupling
type [} 491] (see ap-
pendix)
UINT32 1 [1...255] Axis ID of the master
axis
UINT32 1 [0...8] Subindex n of the
master axis (default:
value: 0)
UINT32 1 [0...8] Subindex n of the
slave axis (default:
value: 0)
SOLO TABLE SEC-
TION:
REAL64 mm ±∞ Slave position offset
(type: TABULAR)
REAL64 mm ±∞ Master position offset
(type: TABULAR)
UINT32 1 [0,1] Slave positions abso-
lute (type: TABULAR)
UINT32 1 [0,1] Master positions abso-
lute (type: TABULAR)
UINT32 1 [1...255] Table ID of the cou-
pling table (type: TAB-
ULAR)
MULTI-TABLE SEC-
TION:
UINT16 1 [0...8] Number of tables
(type: MULTITAB)
Note: misused as in-
terpolation type for
solo tables
UNIT16 1 [0...8] Number of profile ta-
bles (type: MULTI-
TAB)
UNIT32[8] 1 [1...255] Tables IDs of the cou-
pling tables (type:
MULTITAB)
}
0x00000046 Write Master / slave UINT32 1 [1...255] Correction table acti-
multi-tables vation, correction table
ID
0x00000046 Write Master / slave { Activation of correction Modified from
multi-tables table TC3
UINT32 1 [1...255] correction table ID
UINT32 Reserve (TC3)
REAL64 e.g. mm ±∞ Absolute master acti-
vation position
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000047 Write Master / slave UINT32 1 [1..255] Deactivation of profile
multi-tables table at the end of the
cycle, table ID of the
current monocyclic
profile table
0x00000048 ReadWrite Master / slave Write: UINT32 1 [1..255] Read the last correc-
multi-tables tion offset: Table ID of
the correction table
Read: REAL32 e.g. mm ±∞ Offset by departing the
correction table with
the according table ID
0x00000049 Write Master / slave REAL64 1 ±∞ Change the slave ta-
table- coupling ble scaling factor for
type: TABULAR the slave table column
(default value: 1.0)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x0000004A(0x Write Master / slave { Master / slave solo ta- Modified from
00n0004A) universal table ble coupling (SERVO): TC3
coupling UINT32 ENUM s. appendix Slave type/coupling
(SERVO)
type [} 491] (see ap-
pendix)
UINT32 1 [1...255] Axis ID of the master
axis
UINT32 1 [0...8] Subindex n of the
master axis (default:
value: 0)
UINT32 1 [0...8] Subindex n of the
slave axis (default:
value: 0)
UINT32 1 1...255] Table ID of the cou-
pling table (type: TAB-
ULAR)
UINT32 1 Tabular interpolation
type
REAL64 mm ±∞ Slave position offset
(type: TABULAR)
REAL64 mm ±∞ Master position offset
(type: TABULAR)
REAL64 mm ±∞ Slave position scaling
(type: TABULAR)
REAL64 mm ±∞ Master position scal-
ing (type: TABULAR)
UINT32 1 [0,1] Slave position abso-
lute ?
(Type: TABULAR)
UINT32 1 [0,1] Master position abso-
lute ?
(Type: TABULAR)
UINT32 ENUM s. appendix Activation type of the
change:
0: 'instantaneous' (de-
fault)
1: 'at master cam posi-
tion'
2: 'at master axis posi-
tion'
3: 'next cycle'
UINT32 Reserve (TC3)
REAL64 mm ±∞ Activation position
UINT32 ENUM s. appendix Master scaling type:
0: user defined (de-
fault)
1: scaling with auto
offset
2: off
UINT32 ENUM s. appendix Slave scaling type:
0: user defined (de-
fault)
1: scaling with auto
offset
2: off
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x0000004A(0x Write Master / slave { Master / slave solo ta- Modified from
00n0004A) universal table ble coupling (SERVO): TC3
coupling UINT32 ENUM s. appendix Slave type/coupling
(SERVO)
type [} 491] (see ap-
pendix)
UINT32 1 [1...255] Axis ID of the master
axis
UINT32 1 [0...8] Subindex n of the
master axis (default:
value: 0)
UINT32 1 [0...8] Subindex n of the
slave axis (default:
value: 0)
UINT32 1 1...255] Table ID of the cou-
pling table (type: TAB-
ULAR)
UINT32 1 Tabular interpolation
type
REAL64 mm ±∞ Slave position offset
(type: TABULAR)
REAL64 mm ±∞ Master position offset
(type: TABULAR)
REAL64 mm ±∞ Slave position scaling
(type: TABULAR)
REAL64 mm ±∞ Master position scal-
ing (type: TABULAR)
UINT32 1 [0,1] Slave position abso-
lute ?
(Type: TABULAR)
UINT32 1 [0,1] Master position abso-
lute ?
(Type: TABULAR)
UINT32 ENUM s. appendix Activation type of the
change:
0: 'instantaneous' (de-
fault)
1: 'at master cam posi-
tion'
2: 'at master axis posi-
tion'
3: 'next cycle'
UINT32 Reserve (TC3)
REAL64 mm ±∞ Activation position
UINT32 ENUM s. appendix Master scaling type:
0: user defined (de-
fault)
1: scaling with auto
offset
2: off
UINT32 ENUM s. appendix Slave scaling type:
0: user defined (de-
fault)
1: scaling with auto
offset
2: off
Extension for MultiCam:
UINT32 ENUM s. appendix Cam Operation Mode
UINT32 1 [1…255] Reference table ID
BYTE[104] Reserve (TC3)
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x0000004B(0x Write Master / slave { Master / slave syn- Modified from
00n0004B) universal flying chronizing coupling TC3
saw (SERVO) (SERVO):
UINT32 ENUM s. appendix Slave type/coupling
type (see appendix)
UINT32 1 [1...255] Axis ID of the master
axis
UINT32 1 [0...8] Subindex n of the
master axis (default:
value: 0)
UINT32 1 [0...8] Subindex n of the
slave axis (default:
value: 0)
REAL64 1 ±∞ (<> 0.0) Gearing factor
REAL64 mm ±∞ Master synchron posi-
tion
REAL64 mm ±∞ Slave synchron posi-
tion
REAL64 mm/s ≥ 0.0 Slave velocity (op-
tional)
REAL64 mm/s^2 ≥ 0.0 Slave acceleration
(optional)
REAL64 mm/s^2 ≥ 0.0 Slave deceleration
(optional)
REAL64 mm/s^3 ≥ 0.0 Slave jerk (optional)
UINT32 1 ≥0 Bit mask (default
value: 0)
UINT32 Reserve (TC3)
}
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000051 Write every VOID Activate complete axis
(enable)
0x00000052 Write SERVO { Change of the active Modified from
axis control loop (triple TC3
from encoder, con-
troller and axis inter-
faces) with/without ex-
ternal set value speci-
fication:
UINT32 1 ≥0 Number/index of the
axis control loop
(default -value: 0)
UINT32 ENUM see Annex (>0) Switching type for syn-
chronization behavior
[} 500]
1: 'Standard'
REAL64 1 ±∞ Synchronization value
for switching (optional)
UINT32 0/ 1 0/1 External set value
specification by means
of axis interface ?
Note: not used so far!
UINT32 Reserve (TC3)
}
7.8.4.4 "Index offset" specification for cyclic Axis process data (Index group
0x4300 + ID)
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n00000 Read / Write every { 128 bytes} STRUCT see AXIS STRUCTURE Write command
(PLC→NC) axis interface (PLC→NC) n = 0: only optional!
standard axis interface Be aware of
n > 0: n-th axis inter- safety aspects!
face (optional) PLCTONC_AXI
S_REF
0x00n00001 Read / Write every UINT32 1 >0 Control double word Write command
(PLC→NC) only optional!
0x00n00002 Read / Write every UINT16 1 0/1 Enable controller Cannot be
(PLC→NC) traced by oscil-
loscope!
0x00n00003 Read / Write every UINT16 1 0/1 Feed enable plus Cannot be
(PLC→NC) traced by oscil-
loscope!
0x00n00004 Read / Write every UINT16 1 0/1 Feed enable minus Cannot be
(PLC→NC) traced by oscil-
loscope!
0x00n00007 Read / Write every UINT16 1 0/1 Referencing cam Cannot be
(PLC→NC) traced by oscil-
loscope!
0x00n00021 Read / Write every UINT32 % 0...1000000 speed override Write command
(PLC→NC) (1000000 == 100%) only optional!
0x00n00022 Read / Write every UINT32 1 ENUM operation mode axis Write command
(PLC→NC) only optional!
0x00n00025 Read / Write every REAL64 e.g. mm Actual position correc- Write command
(PLC→NC) tion value (measure- only optional!
ment system error cor-
rection)
0x00n00026 Read / Write every REAL64 e.g. mm/ External controller Write command
(PLC→NC) s component (position only optional!
controller component)
0x00n00080 Read every { 256 bytes} STRUCT see AXIS STRUCTURE Changed from
(PLC→NC) axis interface (NC→PLC) Note: Size TC3.NCTO-
and alignment PLC_AXIS_RE
changed, n = 0: stan- F
dard axis interface
n > 0: n-th axis inter-
face (optional)
0x00n00071 Read every UINT8 1 >0 Status double word:
(PLC→NC) Byte 1
0x00n00072 Read every UINT8 1 >0 Status double word:
(PLC→NC) Byte 2
0x00n00073 Read every UINT8 1 >0 Status double word:
(PLC→NC) Byte 3
0x00n00074 Read every UINT8 1 >0 Status double word:
(PLC→NC) Byte 4
0x00n00081 Read every UINT32 1 >0 Status double word
(PLC→NC) (complete)
0x00n00082 Read every UINT16 1 0/1 Axis is ready for oper- Cannot be
(PLC→NC) ation traced by oscil-
loscope!
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n00083 Read every UINT16 1 0/1 Axis has been refer- Cannot be
(PLC→NC) enced traced by oscil-
loscope!
0x00n00084 Read every UINT16 1 0/1 Axis in protected oper- Cannot be
(PLC→NC) ation mode (e.g. slave traced by oscil-
axis) loscope!
0x00n00085 Read every UINT16 1 0/1 Axis is in rapid mode Cannot be
(PLC→NC) traced by oscil-
loscope!
0x00n00088 Read every UINT16 1 0/1 Axis has invalid IO Cannot be
(PLC→NC) data traced by oscil-
loscope!
0x00n00089 Read every UINT16 1 0/1 Axis is in an error Cannot be
(PLC→NC) state traced by oscil-
loscope!
0x00n0008A Read every UINT16 1 0/1 Axis moving to larger Cannot be
(PLC→NC) values traced by oscil-
loscope!
0x00n0008B Read every UINT16 1 0/1 Axis moving to smaller Cannot be
(PLC→NC) values traced by oscil-
loscope!
0x00n0008C Read every UINT16 1 0/1 Axis is at logical Cannot be
(PLC→NC) standstill traced by oscil-
(only set values are loscope!
considered)
(position controller?)
0x00n0008D Read every UINT16 1 0/1 Axis is being refer- Cannot be
(PLC→NC) enced traced by oscil-
loscope!
0x00n0008E Read every UINT16 1 0/1 Axis is in position win- Cannot be
(PLC→NC) dow traced by oscil-
loscope!
0x00n0008F Read every UINT16 1 0/1 Axis is at target posi- Cannot be
(PLC→NC) tion (target position traced by oscil-
reached) loscope!
0x00n00090 Read every UINT16 1 0/1 Axis has constant ve- Cannot be
(PLC→NC) locity or rotary speed traced by oscil-
loscope!
0x00n0009A Read every UINT16 1 0/1 Operation mode not Cannot be
(PLC→NC) executed (busy) traced by oscil-
loscope!
0x00n0009B Read every UINT16 1 0/1 Axis has instructions, Cannot be
(PLC→NC) is carrying instructions traced by oscil-
out loscope!
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n000B9 Read every UINT32 1 ≥0 Operation mode status
(PLC→NC) double word: bit 0: po-
sition range monitoring
active?
Bit 1: target position
window monitoring ac-
tive?
Bit 2: Loop path ac-
tive?
Bit 3: physical move-
ment monitoring ac-
tive?
Bit 4: PEH time moni-
toring active?
Bit 5: backlash com-
pensation active?
Bit 6: delayed error re-
action mode active?
Bit 7: modulo opera-
tion mode active
(modulo axis)?
Bit 16: trailing separa-
tion monitoring posi-
tion active?
Bit 17: following error
monitoring speed ac-
tive?
Bit 18: end position
monitoring min. ac-
tive?
Bit 19: end position
monitoring max. ac-
tive?
Bit 20: actual position
correction active?
0x00n000BA Read every REAL64 e.g. mm Actual position (calcu-
(PLC→NC) lated absolute value)
0x00n000BB Read every REAL64 e.g. mm Modulo actual position
(PLC→NC)
0x00n000BC Read every INT32 1 Modulo rotations
(PLC→NC)
0x00n000BD Read every REAL64 e.g. mm/ Actual velocity (op-
(PLC→NC) s tional)
0x00n000BE Read every REAL64 e.g. mm Following error posi-
(PLC→NC) tion
0x00n000BF Read every REAL64 e.g. mm Set position
(PLC→NC)
0x00n000C0 Read every REAL64 e.g. mm/ Set velocity
(PLC→NC) s
0x00n000C1 Read every REAL64 e.g. mm/ Set acceleration
(PLC→NC) s^2
0x00n10000 Read / Write Encoder: every { 40 bytes STRUCT see ENCODER-OUTPUT- Write command
(NC→IO) } encoder IO in- STRUCTURE only optional!
terface (NC→IO, 40 bytes) Consider safety
NCENCODER- aspects!
STRUCT_OUT2
0x00n10080 Read Encoder: every { 40 bytes STRUCT see ENCODER-INPUT-
(IO→NC) } encoder IO in- STRUCTURE
terface (IO→NC, 40
bytes)NCENCODER-
STRUCT_IN2
0x00n30000 Read / Write Drive: every { 40 bytes STRUCT see DRIVE-OUTPUT- Write command
(NC→IO) } drive IO inter- STRUCTURE only optional!
face (NC→IO, 40 bytes) Consider safety
NC- aspects!
DRIVESTRUCT_OUT
2
Index-Offset Access Axis type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00n30080 Read Drive: every { 40 bytes STRUCT see DRIVE-INPUT-
(IO→NC) } drive IO inter- STRUCTURE
face (NC→IO, 40 bytes)
NC-
DRIVESTRUCT_IN2
7.8.5.1 "Index offset" specification for Encoder parameter (Index group 0x5000 +
ID)
Index offset Access group- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Read every UINT32 1 [1 ... 255] Encoder ID
0x00000002 Read every UINT8[30+1] 1 30 symbol Encoder name
0x00000003 Read every UINT32 1 s. ENUM (>0) Encoder type [} 493]
0x00000004 Read / Write every UINT32 1 Byteoffset input address offset (IO- change I/O ad-
Input-Image) dress
0x00000005 Read / Write every UINT32 1 Byteoffset output address offset (IO- change I/O ad-
Output-Image) dress
0x00000006 Read / Write every REAL64 e.g. mm/ [1.0E-12 ... resulting scaling factor
INC 1.0E+30] (numerator / denomina-
tor)
Index offset Access group- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000016 Read / Write every UINT16 1 0/1 actual position compen-
sation
(measuring system error
compensation )?
0x00000017 Read / Write every REAL64 s [0.0...60.0] filter time for actual posi-
tion compensation in sec-
onds (P-T1)
0x00000018 Read / Write every UINT32 1 [0x0... filter mask for row incre-
0xFFFFFFFF] mantal value(0x0: full
passage)
0x00000019 Read / Write every UINT32 1 s. ENUM (≥0)s. encoder absolute dimen-
appendix sioning system [} 494]
0x0000001B Read / Write every REAL64 e.g. mm [≥0, modulo- tolerance window for
factor/2] modulo-start
0x0000001C Read every UINT32 1 s. ENUM (≥0) encoder sign interpreta-
tion [} 494] (data type)
0x0000001D Read every UINT16 1 0/1 Incremental- or absolut-
encoder ?
0: incremental encoder
type
1: absolute encoder type
0x00000020 Read / Write every UINT32 1 s. ENUM (≥0) Encoder dead time com-
pensation mode
0: OFF (Default)
1: ON (with velocity)
2: ON (with velocity and
acceleration)
0x00000021 Read / Write every UINT32 1 Control double word (32
Bit) for the encoder dead
time compensation:Bit 0
= 0: relative IO time (de-
fault)
Bit 0 = 1: absolute IO
time
0x00000022 Read / Write every INT32 ns [1.0E+9] Sum of the parameter-
ized time shift for the en-
coder dead time compen-
sation (typically positive
values)
0x00000023 Read / Write every REAL64 e.g. mm/ [1.0E-12 ... component of the scaling NEW from TC3
INC 1.0E+30] factor: numerator
(=> scaling factor numer-
ator / scaling factor de-
nominator)
0x00000024 Read / Write every REAL64 1 [1.0E-12 ... component of the scaling NEW from TC3
1.0E+30] factor: denominator
(=> scaling factor numer-
ator / scaling factor de-
nominator)
default: 1.0
0x00000025 Read / Write every { NEW from TC3
REAL64 e.g. mm/ [1.0E-12 ... component of the scaling
REAL64 INC 1.0E+30] factor: numerator
} 1 [1.0E-12 ... component of the scaling
1.0E+30] factor: denominator
(=> scaling factor numer-
ator / scaling factor de-
nominator)
0x00000030 Read / Write every UINT32 1 Internal Encoder Control NEW from TC3
DWord
0x00000101 Read / Write INC UINT16 1 [0,1] search direction for Ref.
cam inverse?
0x00000102 Read / Write INC 1 [0,1] search direction for sync
pulse inverse?
0x00000103 Read / Write INC REAL64 e.g. mm [1.0E+9] reference positon
0x00000104 Read / Write INC UINT16 1 [0,1] distance moitoring be- Not imple-
tween Ref. cams and mented!
sync pulse active?
Index offset Access group- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000105 Read / Write INC UINT32 INC [0 ...65536] minimum distance be- Not imple-
tween Ref. cams and mented!
sync pulse in increments
0x00000106 Read / Write INC UINT16 1 [0,1] external sync pulse?
0x00000107 Read / Write INC UINT32 1 s. ENUM (>0) reference mode [} 495]
s. appendix s.appendix
0x00000108 Read / Write INC UINT32 1 [0x0000000F... Encoder Sub Mask (max- NEW
0xFFFFFFFF]Bi- imum incremental value
nary mask: (2n - of the enocder absolute s. param. "En-
1) range) coder Mask"
For example used as ref-
erence signal for homing
with "Software Sync" or
used for the NC Retain
Data ("ABSOLUTE
(MODULO)", "INCRE-
MENTAL (SINGLETURN
ABSOLUTE)" ).
0x00000110 Read / Write INC (encoder REAL64 1 [0.0 ... scaling/weight of the
simulation) 1000000.0] noise part for the simula-
tion encoder
7.8.5.2 "Index offset" specification for Encoder state (Index group 0x5100 + ID)
Index-Offset Access Group type Data type Phys. Definition Description Note
(Hex) unit range
0x00000001 Read every INT32 error state encoder
0x00000002 Read every REAL64 Actual position symbolic ac-
(charge with actual po- cess possible!
sition compensation 'fPosIst'
value)
0x00000003 Read every REAL64 Modulo actual position symbolic ac-
cess possible!
'FModuloPosIst'
0x00000004 Read every INT32 Modulo actual rotation symbolic ac-
cess possible!
'nModuloTurns'
0x00000005 Read every REAL64 Optional: actual veloc- Base Unit / s
ity Symbolic ac-
cess possible!
'fVeloIst'
0x00000006 Read every REAL64 Optional: Actual accel- Base unit / s^2
eration Symbolic ac-
cess possible!
'fAccIst'
0x00000007 Read every INT32 Encoder actual incre- symbolic ac-
ments cess possible!
'nHardIncs'
0x00000008 Read every INT64 Software - actual in- symbolic ac-
crement counter cess possible!
'nSoftIncs'
0x00000009 Read / Write every UINT16 Reference flag ("cali-
brate flag")
0x0000000A Read every REAL64 Actual position correc-
tion value (measure-
ment system error cor-
rection)
0x0000000B Read every REAL64 Actual position without
actual position com-
pensation value
0x0000000C Read every REAL64 e.g. mm Actual position com-
pensation value due to
the dead time com-
pensation
0x0000000D Read every REAL64 s Sum of the time shifts
for encoder dead time
compensation
(parameterized and
variable dead time)
Note: a dead time is
specified in the system
as a positive value.
0x0000000E Read every REAL64 e.g. mm Internal position offset
as a correction value
for a value reduction
to the base period
(modulo range)
0x00000010 Read every REAL64 e.g. mm/ Actual velocity without
s actual position com-
pensation value
0x00000012 Read every REAL64 e.g. mm Unfiltered actual posi-
tion (charge with ac-
tual position compen-
sation value)
0x00000014 Read Type: SoE, REAL64 e.g. mm/ Optional: Actual drive Base Unit / s
CoE, MDP 742 s velocity (transferred
NEW from
directly from SoE, CoE
TC3.1
or MDP 742 drive)
B4020.30
0x00000015 Read every REAL64 e.g. mm/ Optional: Unfiltered Base Unit / s
s actual velocity
Index-Offset Access Group type Data type Phys. Definition Description Note
(Hex) unit range
0x00000016 Read every READ(16 bytes Read the actual posi-
* N) tion buffer
{
UINT32 ns ≥0 DcTimeStamp with 32
bits
UINT32 Reserve
REAL64 e.g. mm ±∞ Actual position for the
associated time stamp
} [N]
0x00000101 Read INC REAL64 e.g. mm Read back the posi- Cannot be
tion difference be- traced by oscil-
tween the hardware loscope!
latch being activated
and becoming valid
0x00000200 ReadWrite function group WRITE(24 read "Touch Probe" Only for SAF-
"Touch- bytes) state (state of external port 501
ProbeV2":- latch)
SERCOS/SoE, {
- EtherCAT/
CoE UINT32 1 [1,2,3,4] probe unit (probe 1, 2,
(CANopen 3, 4)
DS402) UINT32[5] reserved
- SoftDrive }
(TCom),
- MDP 511 READ (64
(EL5101, bytes)
EL5151, {
EL5021, UINT32 1 [0/1] touch probe rising
EL7041, edge active?
EL7342)
UINT32 1 [0/1] touch probe rising
edge became valid?
REAL64 e.g. mm touch probe rising
edge position value
UINT32 1 ≥0 touch probe rising
edge counter (continu-
ous mode)
UINT32 reserved
UINT32 1 [0/1] touch probe falling
edge active?
UINT32 1 [0/1] touch probe falling
edge became valid?
REAL64 e.g. mm touch probe falling
edge position value
UINT32 1 ≥0 touch probe falling
edge counter (continu-
ous mode)
UINT32[5] reserved
}
0x00000201 Read KL5101, UINT16 1 [0,1] "External latch func- Cannot be
SERCOS, tion" active ? traced by oscil-
AX2xxx, or loscope!
ProviDrive "Measuring probe
function" active ?
(edge-independent)
0x00000201 Read CANopen UINT32[4] 1 [0,1] "External latch func- Cannot be
tions 1 to 4" active ? traced by oscil-
or loscope!
"Measuring probe
functions 1 to 4" ac-
tive ?
0x00000202 Read KL5101, UINT16 1 [0,1] External latch value see also Axis
SERCOS, became valid? interface NcTo-
AX2xxx, or Plc (status dou-
ProviDrive Measuring probe ble word)
latched ? (edge-inde-
pendent)
Index-Offset Access Group type Data type Phys. Definition Description Note
(Hex) unit range
0x00000202 Read CANopen UINT32[4] 1 [0,1] Have external latch see also Axis
values 1 to 4 become interface NcTo-
valid? Or is measuring Plc (status dou-
probe 1 to 4 latched? ble word)
0x00000203 Read KL5101, UINT32 INC External / measuring
SERCOS, probe hardware incre-
AX2xxx, mental latch value
ProviDrive
0x00000204 Read KL5101, UINT64 INC External / measuring
SERCOS, probe software incre-
AX2xxx, mental latch value
ProviDrive
0x00000205 Read KL5101, REAL64 e.g. mm External / measuring Base Unit
SERCOS, probe position latch
AX2xxx, value
ProviDrive
0x00000205 Read CANopen REAL64[4] e.g. mm External measuring Base Unit
sensor values / posi-
tion latch values
0x00000206 Read KL5101, UINT32 INC Difference hardware Cannot be
SERCOS, incremental latch val- traced by oscil-
AX2xxx, ues (NewLatch - Last- loscope!
ProviDrive Latch)
0x00000207 Read KL5101, UINT64 INC Difference software in- Cannot be
SERCOS, cremental latch values traced by oscil-
AX2xxx, (NewLatch - Last- loscope!
ProviDrive Latch)
0x00000208 Read KL5101, REAL64 e.g. mm Difference software in- Cannot be
SERCOS, cremental latch values traced by oscil-
AX2xxx, (NewLatch - Last- loscope! Base
ProviDrive Latch) Unit
7.8.5.3 "Index offset" specification for Encoder functions (Index group 0x5200 +
ID)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000001A Write every { Set actual position en- Base Unit
coder/axis
UINT32 ENUM s. appendix Actual position type
[} 490] (s. appendix)
REAL64 mm ±∞ Actual position for en-
coder/axis Caution
when using !
}
0x0000001B Write every VOID Re-initialization of the NEW from TC3
actual encoder posi-
tion
Note: Only takes effect
for reference system
“ABSOLUTE (with sin-
gle overflow)”.
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000205 Write KL5101,SER- VOID Deactivate "external
COS,AX2xxx,P latch" or deactivate
ROFIDrive "measuring probe
function"
0x00000205 Write CANopen UINT32[4] Deactivate "external
latch" or deactivate
"measuring probe
function"
0x00000210 Write KL5101,SER- REAL64 e.g. mm ±∞ Set "External latch Only for Ether-
COS,AX2xxx,P event" and "External CAT:
ROFIDrive latch position"
7.8.5.4 "Index offset" specification for cyclic Encoder process data (Index group
0x5300 + ID)
Index offset Access group- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000000 Read / Write every (NC→IO) { STRUCT s. en- ENCODER-OUTPUT- Write command
coder-interface STRUCTURE (NC→IO, only optional!
40 Byte)NCENCODER- Consider safety
STRUCT_OUT2 aspects !
INT32 INC ≥0 nDataOut1
INT32 INC ≥0 nDataOut2
UINT8 1 ≥0 nCtrl1
UINT8 1 ≥0 nCtrl2
UINT8 1 ≥0 nCtrl3
UINT8 1 ≥0 nCtrl4
INT32 INC ≥0 nDataOut3
INT32 INC ≥0 nDataOut4
INT32 INC ≥0 nDataOut5
INT32 INC ≥0 nDataOut6
UINT8 1 ≥0 nCtrl5
UINT8 1 ≥0 nCtrl6
UINT8 1 ≥0 nCtrl7
UINT8 1 ≥0 nCtrl8
INT32 1 ≥0 reserved
INT32 1 ≥0 reserved
} 40 bytes
0x00000000 Read / Write every { STRUCT s. en- optional ENCODER- Write command
(NC→IO), op- coder-interface OUTPUT-STRUCTURE only optional!
tional 64 bit en- (NC→IO, 80 Byte)NCEN- Consider safety
coder interface CODERSTRUCT_OUT3 aspects !NEW
(e.g. MDP513 from TC3
with 64Bit) UINT64 INC ≥0 nDataOut1
UINT64 INC ≥0 nDataOut2
UINT64 INC ≥0 nDataOut3
UINT64 INC ≥0 nDataOut4
UINT64 INC ≥0 nDataOut5
UINT64 INC ≥0 nDataOut6
UINT64 INC ≥0 nDataOut7
UINT64 INC ≥0 nDataOut8
UINT16 1 ≥0 nCtrl1
UINT16 1 ≥0 nCtrl2
UINT16 1 ≥0 nCtrl3
UINT16 1 ≥0 nCtrl4
UINT16 1 ≥0 nCtrl5
UINT16 1 ≥0 nComCtrl
INT32 1 ≥0 reserved
} 80 bytes
Index offset Access group- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Write Every { STRUCT s. En- Bitwise access to Write command
(NC→IO) coder-Interface only optional!
ENCODER-OUTPUT-
Consider safety
STRUCTURE (NC→IO,
aspects !NEW
40 Byte) NC-
from TC3
DRIVESTRUCT_OUT2
UINT32 1 [0 … 39] ByteOffset
Relative address offset
[0..39] in drive output
structure.
E.G.: To write “nCon-
trol1” the ByteOffset must
be 8.
UINT32 1 [0x00000000… BitSelectMask (BSM)
0xFFFFFFFF]
The mask defines write
enabled bits in a
DWORD. Zero bits are
protected and remain un-
affected.
UINT32 1 [0x00000000… Value
0xFFFFFFFF]
Only those bits in value
are overwritten where
BSM equals 1.
}
Index offset Access group- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000080 Read every { STRUCT s. en- optional ENCODER-IN- NEW from TC3
(NC→IO), op- coder-interface PUT-STRUCTURE
tional 64 bit en- (IO→NC, 80 Byte)NCEN-
coder interface CODERSTRUCT_IN3
(e.g. MDP513 UINT64 INC ≥0 nDataIn1
with 64Bit)
UINT64 INC ≥0 nDataIn2
UINT64 INC ≥0 nDataIn3
UINT64 INC ≥0 nDataIn4
UINT64 INC ≥0 nDataIn5
UINT64 INC ≥0 nDataIn6
UINT64 INC ≥0 nDataIn7
UINT64 INC ≥0 nDataIn8
UINT16 1 ≥0 nState1
UINT16 1 ≥0 nState2
UINT16 1 ≥0 nState3
UINT16 1 ≥0 nState4
UINT16 1 ≥0 nState5
UINT16 1 ≥0 nComState (Bit0: Wc-
State, Bit1: InputToggle)
INT32 [ns] ≥0 nDcInputTime (absolute/
relative DcInputShift for
deadtime compensation)
} 80 bytes
7.8.6.1 "Index offset" specification for Controller parameter (Index group 0x6000
+ ID)
Index offset Access controller type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Read every UINT32 1 [1 ... 255] controller ID
0x00000002 Read every UINT8[30+1] 1 30 symbol controller name
0x00000003 Read every UINT32 1 s. ENUM (>0) controller type [} 492]
0x0000000A Read / Write every UINT32 1 s. ENUM (>0) controller mode DEFAULT:
1=STANDARD
0x0000000B Read / Write every REAL64 % [0.0 ... 1.0] weight of the velocity pre
control (standard value:
1.0 = 100 %)
0x00000021 Read / Write every REAL64 1 [0.0...1000000. scaling factor (multiplier) reserved func-
0] for position differences tion,
between master and no standard!
slave axis (conversion in
the same coordinate sys-
tem)
0x00000100 Read / Write P/PID (Pos., REAL64 1 [0.0...1.0] Maximum output limita- (Standard
(velocity) tion ( ) for controller total value: 0.5 ==
output 50%)
0x00000102 Read / Write P/PID (Pos.) REAL64 mm/s/ [0.0...1000.0] proportional amplification base unit / s /
mm factor kp resp. kv base unit posi-
tion control
0x00000103 Read / Write PID (Pos.) REAL64 s [0.0 ... 60.0] Integral-action time Tn position control
0x00000104 Read / Write PID (Pos.) REAL64 s [0.0 ... 60.0] Derivative action time Tv position control
0x00000105 Read / Write PID (Pos.) REAL64 s [0.0 ... 60.0] Damping time Td position control
0x00000106 Read / Write PP (Pos.) REAL64 mm/s/ [0.0...1000.0] add. proportional amplifi- base unit / s /
mm cation factor kp resp. kv, base unit posi-
that applies above a limit tion control
velocity in percent.
0x00000107 Read / Write PP (Pos.) REAL64 % [0.0...1.0] Threshold level velocity (Standard
in percent, above which value: 0.01 ==
the additional propor- 1%)
tional amplification factor
kp resp. kv applies.
0x00000108 Read / Write P/PID (Acc.) REAL64 s [0.0 ... 100.0] proportional amplification acceleration pre
factor ka control
0x0000010A Read / Write every UINT32 1 ENUM Filter for maximum slope reserved func-
of the nominal velocity tion,
(acceleration restricted): no standard!
0: Off, 1: Velo, 2: Pos
+Velo
0x0000010B Read / Write every REAL64 mm/s^2 Filter value for the maxi- reserved func-
mum slope of the nomi- tion,
nal velocity (max. accel- no standard!
eration)
0x0000010D Read / Write P/PID REAL64 mm [0.0 ... 10000.0] 'dead band' for position reserved func-
error (position deviation) tion
(for P/PID-controller with
velocity or torque inter-
face)
0x0000010F Read / Write P/PP/PID REAL64 (mm/s) / [0.0...1000.0] slave coupling control: slave coupling
(Pos.) mm proportional gain kcp for control
slave-control position deviation be-
tween master and slave
Index offset Access controller type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000202 Read / Write P/PID (velocity) REAL64 1 [0.0...1000.0] proportional amplification velocity control
factor kp resp. kv
0x00000203 Read / Write PID (velocity) REAL64 s [0.0 ... 60.0] Integral-action time Tn velocity control
0x00000204 Read / Write PID (velocity) REAL64 s [0.0 ... 60.0] Derivative action time Tv velocity control
0x00000205 Read / Write PID (velocity) REAL64 s [0.0 ... 60.0] Damping timeTd velocity control
0x00000206 Read / Write PID (velocity) REAL64 % [0.0...1.0] Maximum output limita- velocity control
tion ( ) for I-part in per-
cent (default setting: 0.1
== 10 %)
0x00000207 Read / Write PID (velocity) REAL64 % [0.0...1.0] Maximum output limita- velocity control
tion ( ) for D-part in per-
cent (default setting: 0.1
= 10 %)
0x0000020D Read / Write P/PID (velocity) REAL64 mm/s [0.0 ... 10000.0] 'dead band' for velocity reserved func-
error (velocity deviation) tion
(for P/PID-controller with
velocity or torque inter-
face)
0x00000220 Read / Write P/PID (velocity) REAL64 s ≥0 PT-2 Filtertime for veloc- velocity control,
ity error (velocity-differ- no standard!
ence)
0x00000221 Read / Write P/PID (velocity) REAL64 s ≥0 PT-1 Filtertime for veloc- reserved func-
ity error (velocity-differ- tion,
ence) no standard!
0x00000250 Read / Write P/PI (observer) UINT32 1 s. ENUM (≥0) OBSERVER-mode [} 492]
for controller with torque
interface 0: OFF (default)
1: LUENBERGER
0x00000251 Read / Write P/PI (observer) REAL64 Nm / A >0.0 motor:
torque constant KT
0x00000252 Read / Write P/PI (observer) REAL64 kg m2 >0.0 motor:
moment of inertia JM
Index offset Access controller type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000253 Read / Write P/PI (observer) REAL64 Hz [100.0 ... bandwidth f0
2000.0] Default:
500
0x00000254 Read / Write P/PI (observer) REAL64 1 [0.0 ... 2.0] De- correction factor kc
fault: 1.0
0x00000255 Read / Write P/PI (observer) REAL64 s [0.0 ... 0.01] velocity filter (1. order):
Default: 0.001 filter time constant T
0x00000A03 Read / Write PID (MW) REAL64 cm^2 [0.0 ...1000000] cylinder area AA of side A
in cm^2
0x00000A04 Read / Write PID (MW) REAL64 cm^2 [0.0 ...1000000] cylinder area AB of side B
in cm^2
0x00000A05 Read / Write PID (MW) REAL64 cm^3/s [0.0 ...1000000] nominal volume flow Qnenn
in cm^3/s
0x00000A06 Read / Write PID (MW) REAL64 bar [0.0 ...1000000] nominal pressure resp.
valve pressure reduction
Pnenn in bar
0x00000A07 Read / Write PID (MW) UINT32 1 [1 ... 255] axis ID for the system
pressure Po
7.8.6.2 "Index offset" specification for Controller state (Index group 0x6100 + ID)
Index-Offset Access Controller type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000001 Read every INT32 error state controller Symbolic ac-
[} 353] cess possible!
'nErrState'
0x00000002 Read every REAL64 e.g. mm/ Controller output in Base unit / s
s absolute units Symbolic ac-
cess possible!
'fOutput'
0x00000003 Read every REAL64 % Controller output in Cannot be
percent traced by oscil-
loscope!
0x00000004 Read every REAL64 V Controller output in Cannot be
volts traced by oscil-
loscope!
Index-Offset Access Controller type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000010F Read P/PP/PID (ve- REAL64 e.g. mm/ Proportion of auto- NEW
loc.) s matic offset compen-
sation in absolute
units
0x00000110 Read PID (pos.) REAL64 e.g. mm/ Acceleration pre-con- acceleration
s trol Yacc of the con- pre-control
troller in absolute
units, note: Function
depends on controller
type!
0x00000111 Read PP (Pos.) REAL64 mm/s/ ≥0 Internal interpolated PP controller
mm proportional gain kp or
kv
0x0000011A Read P (Pos.) UINT32 1 Set velocity filter: In- List! Reserved
0x0000011B REAL64 mm ternalPhase function,
0x0000011C REAL64 mm/s InternalPosSollError ! no standard!
0x0000011D REAL64 mm/s TestVeloSet
0x0000011E REAL64 mm/s^2 InternalLimited-
0x0000011F REAL64 mm VeloSoll
0x00000120 REAL64 mm InternalAccSollRel
0x00000121 REAL64 mm/s InternalPosSollRel
0x00000122 REAL64 mm/s^2 PosSetCorrected !
0x00000123 REAL64 mm/s VeloSetCorrected !
0x00000124 REAL64 mm/s^2 AccSollCorrected !
TestVeloSetCorrected
TestAccSetCorrected
0x00000201 Read P,PID (velocity) REAL64 e.g. mm/ Velocity part of the Base Unit / s
s controller
0x00000202 Read P,PID (velocity) REAL64 % Velocity part of the Cannot be
controller in percent traced by oscil-
loscope!
0x00000203 Read P,PID (velocity) REAL64 V Velocity part of the Cannot be
controller in volts traced by oscil-
loscope!
0x00000201 Read P/PID (velocity) REAL64 e.g. mm/ Proportional compo-
s nent of the controller
in absolute units
0x00000202 Read P/PID (velocity) REAL64 e.g. mm/ I-part of the controller
s in absolute units
0x00000203 Read P/PID (velocity) REAL64 e.g. mm/ D-part of the controller
s in absolute units
0x00000204 Read P/PID (velocity) UINT16 1 0/1 Limitation of the I-part
active?
0x00000205 Read P/PID (velocity) UINT16 1 0/1 Limitation of the D-part
active?
0x00000206 Read P/PID (velocity) UINT16 1 0/1 ARW measure for the ARW: Anti Re-
I-part active? set Windup
0x0000020A Read P/PID (velocity) REAL64 e.g. mm/ Total input size of the
s velocity controller
Index-Offset Access Controller type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000255 Read P/PI (observer) REAL64 A Observer: actual mo-
tor current
0x00000A10 Read PID (pos.) REAL64 e.g. mm/ Acceleration pre-con- Acceleration
s trol Yacc of the con- pre-control
troller in absolute units
7.8.6.3 "Index offset" specification for Controller functions (Index group 0x6200
+ ID)
Index offset Access controller - Data type Phys. Definition Description Remarks
( Hex ) type unit range
7.8.7.1 "Index offset" specification for Drive parameter (Index group 0x7000 + ID)
Index offset Access Drive- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Read every UINT32 1 [1 ... 255] Drive ID
0x00000002 Read every UINT8[30+1] 1 30 symbol Drive name
0x00000003 Read every UINT32 1 s. ENUM (>0) Drive type [} 496]
0x00000004 Read / Write every UINT32 1 Byteoffset Input address offset (IO- change I/O ad-
Input-Image) dress
0x00000005 Read / Write every UINT32 1 Byteoffset output address offset (IO- change I/O ad-
Output-Image) dress
0x00000006 Read / Write every UINT16 1 [0,1] Motor polarity
0x0000000A Read / Write every UINT32 1 s. ENUM (>0) Drive mode Default:
1=STANDARD
0x0000000B Read / Write every REAL64 % [-1.0 ... 1.0] Minimum output limit
(output limitation) (default
setting: -1.0 == -100%)
0x0000000C Read / Write every REAL64 % [-1.0 ... 1.0] Maximum output limit
(output limitation) (default
setting: 1.0 == 100%)
0x0000000D Read every UINT32 INC Maximum number of out-
put increments (output
mask)
0x00000010 Read / Write every UINT32 1 Internal Drive Control Reserved !
DWord
0x00000011 Read / Write every UINT32 1 ≥5 Internal Drive Reset Reserved !
Counter
(time in nc-cycles for 'en-
able' and 'reset')
0x00000020 Read / Write every UINT32 1 s. ENUM (≥0) Drive dead time compen- s. appendix
sation mode
0: OFF (Default)
1: ON (with velocity)
2: ON (with velocity and
acceleration)
0x00000021 Read / Write every UINT32 1 Control double word (32
Bit) for the drive dead
time compensation: Bit 0
= 0: relative IO time (de-
fault)
Bit 0 = 1: absolute IO
time
0x00000022 Read / Write every INT32 ns [1.0E+9] Sum of the parameter-
ized time shift for the
drive dead time compen-
sation (typically positive
values)
0x00000031 Read / Write every REAL64 e.g. %/ [0.0 ... 1.0E+30] Scaling factor for actual NEW from
INC torque TC3.1
(resp. force or current)
e.g. AX5xxx: 0.1 =>
±100%
0x00000032 Read / Write every REAL64 s [0.0 ... 60.0] P-T1 filter time for actual NEW from
torque TC3.1
(resp. force or current)
0x00000033 Read / Write every REAL64 s [0.0 ... 60.0] P-T1 filter time for actual NEW from
torque derivative TC3.1
(resp. force or current)
0x00000101 Read / Write Servo REAL64 e.g. mm/ >0.0 reference velocity at ref- base unit / s
s erence output
0x00000102 Read / Write Servo REAL64 % [0.0 ... 5.0] reference output in per-
cent
0x00000103 Read Servo REAL64 e.g. mm/ >0.0 resultant velocity at 100% base unit / s
s output
0x00000104 Read / Write Servo REAL64 e.g. mm/ ∞ velocity offset (DAC off- base unit / s
s set) for drift calibration
(offset calibration) of the
axis
Index offset Access Drive- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000105 Read / Write Servo (Sercos, REAL64 1 [0.0 ... velocity scaling (scaling For Sercos,
Profi Drive, 100000000.0] factor to react to the Profi Drive,
AX200x, weight in the drive) AX200x,
CANopen) CANopen
0x00000106 Read / Write Profi Drive DSC UINT32 0.001 * ≥0 Profibus/Profi Drive DSC: Only for Profi
1/s proportional gain 'Kpc' Drive DSC
0x00000107 Read / Write Profi Drive DSC REAL64 1 ≥ 0.0 Profibus/Profi Drive DSC: Only for Profi
scaling factor for calculat- Drive DSC
ing 'Xerr' (default setting:
1.0)
0x00000109 Read / Write Servo (Sercos, REAL64 1 [0.0 ... position scaling (scaling For Sercos,
CANopen) 100000000.0] factor to react to the CANopen
weight in the drive)
0x0000010A Read / Write Servo (Sercos, REAL64 1 [0.0 ... acceleration scaling For Sercos,
Profi Drive, 100000000.0] (scaling factor to react to Profi Drive,
AX200x, the weight in the drive) AX200x,
CANopen) CANopen
0x0000010B Read / Write Servo (Sercos, REAL64 1 [0.0 ... torque scaling (rotary mo- For Sercos,
Profi Drive, 100000000.0] tor) resp. force scaling Profi Drive,
AX200x, (linear motor) (scaling AX200x,
CANopen) factor to react to the CANopen
weight in the drive)
0x0000010D Read / Write Servo (Sercos, REAL64 s [0.0 ... 1.0] delay for drive velocity For Sercos,
CANopen) output CANopen
0x0000010E Read / Write Servo (Sercos, REAL64 s [0.0 ... 1.0] delay for drive accelera- For Sercos,
CANopen) tion output CANopen
0x0000010F Read / Write Servo (Sercos, REAL64 s [0.0 ... 1.0] delay for drive torque For Sercos,
CANopen) resp. force output CANopen
0x00000151 Read / Write Servo / non lin- REAL64 1 [0.0 ... 100.0] quadrant equalizing fac-
ear tor (relation between I
and III quadr.)
0x00000152 Read / Write Servo / non lin- REAL64 1 [0.01 ... 1.0] velocity calibration point
ear in percent (1.0 == 100 %)
0x00000153 Read / Write Servo / non lin- REAL64 1 [0.01 ... 1.0] output calibration point in
ear percent (1.0 ==100 %)
7.8.7.2 "Index offset" specification for Drive state (Index group 0x7100 + ID)
Index offset Access Drive- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Read every INT32 error state drive symbolic Ac-
cess possi-
ble!'nErrState'
0x00000002 Read every REAL64 mm/s total output in absolute base unit / s
units symbolic Ac-
cess possi-
ble!'fOutput'
0x00000003 Read every REAL64 % total output in per cent
0x00000004 Read every REAL64 V total output in Volt Cannot be
traced by oscil-
loscope!!
0x00000005 Read every REAL64 e.g. mm/ PeakHold value for maxi- Base Unit / s
s mum negative total out-
put
0x00000006 Read every REAL64 e.g. mm/ PeakHold value for maxi- Base Unit / s
s mum positive total output
0x00000007 Read every REAL64 e.g. actual torque resp. actual NEW
100%=1 force value
000, (typically 100%=1000)
e.g. Nm
resp. N
7.8.7.3 "Index offset" specification for Drive functions (Index group 0x7200 + ID)
Index offset Access Drive- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000102 Write SERVO { Remove and delete the only for SAF-
characteristic drive table port 501!
ULONG 1 >0 Table-ID
s.a. axis function with in-
dex offset 0x00000012
}
7.8.7.4 "Index offset" specification for cyclic Drive process data (Index group
0x7300 + ID)
Index offset Access Drive- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000000 Read / Write every (NC→IO) { STRUCT s. DRIVE-OUTPUT- Write command
drive-interface STRUCTURE (NC→IO, only optional!
40 Byte)NC- Consider safety
DRIVESTRUCT_OUT2 aspects !
INT32 INC ≥0 nOutData1
INT32 INC 2^31 nOutData2
UINT8 1 ≥0 nControl1
UINT8 1 ≥0 nControl2
UINT8 1 ≥0 nControl3
UINT8 1 ≥0 nControl4
INT32 INC ≥0 nOutData3
INT32 INC ≥0 nOutData4
INT32 INC ≥0 nOutData5
INT32 INC ≥0 nOutData6
UINT8 1 ≥0 nControl5
UINT8 1 ≥0 nControl6
UINT8 1 ≥0 nControl7
UINT8 1 ≥0 nControl8
INT32 1 ≥0 reserved
INT32 1 ≥0 reserved
}
0x00000001 Write every (NC→IO) { STRUCT s. Bitwise access to DRIVE- Write command
Drive-Interface OUTPUT-STRUC- only optional!
TURE(NC→IO, 40 Byte) Consider safety
NC- aspects
DRIVESTRUCT_OUT2
UINT32 1 [0 … 39] ByteOffset
Relative address offset
[0..39] in drive output
structure.
E.G.: To write “nCon-
trol1” the ByteOffset must
be 8.
UINT32 1 [0x00000000… BitSelectMask (BSM)
0xFFFFFFFF]
The mask defines write
enabled bits in a
DWORD. Zero bits are
protected and remain un-
affected.
UINT32 1 [0x00000000… Value
0xFFFFFFFF]
Only those bits in value
are overwritten where
BSM equals 1.
}
Index offset Access Drive- type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000080 Read every (IO→NC) { STRUCT s. DRIVE-INPUT-STRUC-
drive-interface TURE (IO→NC, 40
Byte)NC-
DRIVESTRUCT_IN2
INT32 INC ≥0 nInData1
INT32 INC ≥0 nInData2
UINT8 1 ≥0 nStatus1
UINT8 1 ≥0 nStatus2
UINT8 1 ≥0 nStatus3
UINT8 1 ≥0 nStatus4
INT32 INC ≥0 nInData3
INT32 INC ≥0 nInData4
INT32 INC ≥0 nInData5
INT32 INC ≥0 nInData6
UINT8 1 ≥0 nStatus5
UINT8 1 ≥0 nStatus6
UINT8 1 ≥0 nStatus7
UINT8 1 ≥0 nStatus8
INT32 1 ≥0 reserved
INT32 1 ≥0 reserved
}
7.8.8.1 "Index offset" specification for Table parameter (Index group 0xA000 + ID)
Index offset Access table - type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000001 Read every UINT32 1 [1 ... 255] table ID
0x00000002 Read every UINT8[30+1] 1 30 symbol table name
0x00000003 Read every UINT32 1 s. ENUM (>0) table sub type [} 498]
0x00000004 Read every UINT32 1 s. ENUM (>0) table main type [} 498]
Index offset Access table - type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000022 ReadWrite "Motion Func- Write Read the "Motion Func- only line by line
tion" tion" as fixed values possible!(multi-
("scatter plot") ple integer)
{
UINT16 1 0/1 Initialisation of data (copy
of actual data) ?
UINT16 1 Bitmask (≥0) Select bit mask (number
of columns is one column
for the masterposition
plus number of bits):Bit 0:
Pos (Slave)
Bit 1: Velo (Slave)
Bit 2: Acc (Slave)
Bit 3: Jerk (Slave)
REAL64 z.B. mm ±∞ Startposition (Master)
REAL64 z.B. mm > 0.0 Inkrement
}
Read
{
REAL64[x*m] z.B. mm ±∞ Generating the values of
x rows beginning with the
master start position:
(x*m)-values (one or
more rows)
}
0x00000023 ReadWrite every Write Read slave values to
given master position (re-
lates only to the "row val-
ues" of the table)
REAL64 z.B. mm ±∞ master position
Read
{
REAL64 z.B. mm ±∞ slave position
REAL64 mm/s ±∞ slave velocity
REAL64 mm/s^2 ±∞ slave acceleration
}
Index offset Access table - type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00000115 Write monoton linear, { set /change the table
monoton zykl., scaling:
REAL64 1 [±1000000.0] Original wightning of the
table
REAL64 e.g. mm [±1000000.0] Position offset of the
master column
REAL64 1 [±1000000.0] Scaling of the master col-
umn
REAL64 e.g. mm [±1000000.0] Position offset of the
slave column
REAL64 1 [±1000000.0] Scaling of the slave col-
umn
REAL64 e.g. mm [±1000000.0] lower area boundary
(start position)
REAL64 e.g. mm [±1000000.0] upper area boundary
(end position)
}
0x05000000 Read / "Motion Func- { read/write x lines from only line by line
+n-te start line Write[<=16777 tion"(law of mo- the n-th line: (x*m)-values possible! (multi-
216] tion)Data:STRU (one or more lines )value ple integer)
CT[x*m] range n: [0 ... 16777216]
UINT32 1 absolute point index
(not checked)
UINT16 ENUM function type
1: Polynom 1
15: Polynom 5
UINT16 ENUM point type
0: default
1: ignore
INT32 1 relative adressindex to
target point
(default: 1)
REAL64 mm master position
REAL64 mm slave position
REAL64 mm/s slave velocity
REAL64 mm/s^2 slave acceleration
REAL64 mm/s^3 slave jerk
}
Index offset Access table - type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x06000000 Read / "Motion Func- { read/write x columns only column by
+m-te Start- Write[<=16777 tion"(law of mo- from m-th column: (x*n)- column possi-
spold 216] tion)Data:STRU values (one or more col- ble! (multiple in-
CT[x*n] umns )value range m: teger)
[0 ... 16777216]
UINT32 1 absolute point index
(not checked)
UINT16 ENUM function type
1: Polynom 1
15: Polynom 5
UINT16 ENUM point type
0: default
1: ignore
INT32 1 relative adressindex to
target point
(default: 1)
REAL64 mm master position
REAL64 mm slave position
REAL64 mm/s slave velocity
REAL64 mm/s^2 slave acceleration
REAL64 mm/s^3 slave jerk
}
7.8.8.2 "Index offset" specification for Table state (Index group 0xA100 + ID)
Index offset Access table - type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x0000000A Read every INT32 1 ≥0 'User Counter' Cannot be
(number of table user) traced by oscil-
loscope!
7.8.8.3 "Index offset" specification for Table functions (Index group 0xA200 + ID)
Index offset Access table - type Data type Phys. Definition Description Remarks
( Hex ) unit range
0x00010000 Write every { generates table with di- table types:
mension (n*m): 1,2,3,4 Dimen-
UINT32 1 s. ENUM (>0) sion: at least
table type [} 498] (s. ap-
2x1
pendix)
UINT32 1 [2...16777216] quantitiy of lines
UINT32 1 [1...16777216] quantitiy of columns
}
0x00020000 Write every VOID deletes table with dimen- table types:
sion (n*m) 1,2,3,4
0x00030000 Write every VOID initialised table
Initialisation is no longer
needed, because now it
happens automatically in
the following casesa) by
coupling with table b) by
selecting the slave posit-
tion (s. table para.)
7.8.9 Appendix
moved to: System Manager interface for the interpreter - interpreter element
moved to: System Manager interface for the interpreter - group element
Enum Command buffer types (buffer mode) for universal axis start (UAS)
Define Buffer mode
0 ABORTING (default) (instantaneous, aborts current movement and
deletes any buffered commands)
1 BUFFERED
(stored in command buffer to be executed after an active move-
ment)
18 BLENDING LOW
(buffered, no stop, runs through intermediate target position at the
lowest velocity of two commands)
19 BLENDING PREVIOUS
(buffered, no stop, runs through intermediate target position at the
velocity of the active command)
20 BLENDING NEXT
(buffered, no stop, runs through intermediate target position at the
velocity of the buffered command)
21 BLENDING HIGH
(buffered, no stop, runs through intermediate target position at the
highest velocity of two commands)
Enum Command types for new end position with new velocity (new end position and/or new velocity)
Define Command types for new end position with new velocity
0 NOT DEFINED
1 Position (instantaneous)
2 Velocity (instantaneous)
3 Position and velocity (instantaneous)
9 Position (switching position)
10 Velocity (switching position)
11 Position and velocity (switching position)
NOTE! Not for all encoder types; only for KL5101, KL5151, KL2531, KL2541, IP5209, Universal
encoder, etc.
Encoder types
Encoder evaluation direction KL5101, ... Universal Encoder other types
(log. counting direction)
0: positive and negative √ √ —
1: only positive √ √ —
2: only negative √ √ —
3: blocked √ √ —
NOTE! Not for all encoder types; only for Profi Drive MC, M3000, KL5001/EL5001, IP5009, SERCOS,
UNIVERSAL, etc.
: Latch event
Encoder types 0: not defined 1: PLC cam (neg. 2: Hardware 3: External hard- 4: External hard- 5: Software sync
edge) sync pulse (zero/ ware latch with ware latch with pulse (software
C-track) pos. edge neg. edge zero track)
AX2xxx- — √ √ √ √ √ (resolver only)
B200(Lightbus)
AX2xxx- — √ — — — √
B510(CANopen) (only resolver)
(see "Reference
mask" parameter)
AX2xxx- — √ √ √ √ √
B1x0(EtherCAT) (only resolver)
(fixed 20-bit)
AX2xxx- — √ √ √ √ √ (resolver only)
B900(Ethernet)
Sercos — √ √ √ √ √ (see "Reference
(AX5xxx specific mask" parameter)
implemented)
Profi Drive — √ √ √ √ √
KL5101 — √ √ √ √ √
IP5109
KL5111 — √ √ — — √
KL5151 — √ √ √ √ √ (not meaningful)
IP5209 — √ √ — — √ (not meaningful)
CANopen (e.g. — √ — √ (input E1) √ (input E2) √ (resolver only)
Lenze) (fixed 16-bit)
other types — — — — — —
NOTE! Only for slaves of the type synchronization generator for the time being