TwinCAT 3 Grundlagen en
TwinCAT 3 Grundlagen en
TwinCAT 3
Basics
Table of contents
1 Foreword .................................................................................................................................................... 5
1.1 Notes on the documentation ............................................................................................................. 5
1.2 For your safety .................................................................................................................................. 6
1.3 Notes on information security............................................................................................................ 7
2 Real-Time ................................................................................................................................................... 8
1 Foreword
The trained specialists must ensure that the application and use of the products described is in line with all
safety requirements, including all relevant laws, regulations, guidelines, and standards.
Disclaimer
The documentation has been compiled with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without notice.
Claims to modify products that have already been supplied may not be made on the basis of the data,
diagrams, and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, TwinCAT/BSD®, TC/BSD®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®,
Safety over EtherCAT®, TwinSAFE®, XFC®, XTS®, and XPlanar® are registered and licensed trademarks of
Beckhoff Automation GmbH.
If third parties make use of the designations or trademarks contained in this publication for their own
purposes, this could infringe upon the rights of the owners of the said designations.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany
Copyright
Third-party trademarks
Trademarks of third parties may be used in this documentation. You can find the trademark notices here:
https://www.beckhoff.com/trademarks.
Exclusion of liability
All the components are supplied in particular hardware and software configurations which are appropriate for
the application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation, and drive technology who are
familiar with the applicable national standards.
Signal words
The signal words used in the documentation are classified below. In order to prevent injury and damage to
persons and property, read and follow the safety and warning notices.
DANGER
Hazard with high risk of death or serious injury.
WARNING
Hazard with medium risk of death or serious injury.
CAUTION
There is a low-risk hazard that could result in medium or minor injury.
NOTICE
The environment, equipment, or data may be damaged.
In addition, the recommendations from Beckhoff regarding appropriate protective measures should be
observed. Further information regarding information security and industrial security can be found in our
https://www.beckhoff.com/secguide.
Beckhoff products and solutions undergo continuous further development. This also applies to security
functions. In light of this continuous further development, Beckhoff expressly recommends that the products
are kept up to date at all times and that updates are installed for the products once they have been made
available. Using outdated or unsupported product versions can increase the risk of cyber threats.
To stay informed about information security for Beckhoff products, subscribe to the RSS feed at https://
www.beckhoff.com/secinfo.
2 Real-Time
According to the DIN 44300 standard, real-time, or rather real-time operation, is defined as follows:
"Real-time operation is an operating mode of a computing system in which programs for processing data are
continuously operational in such a way that the processing results are available within a specified period of
time."
In other words, the output values of an application program (calculated based on the inner state and input
values) are made available within a defined and guaranteed time. This defined time is also referred to as
cycle time.
The application program itself can consist of several program blocks, which in turn call other programs or
function blocks etc. (see also IEC 61131-3 standard). The program blocks can be assigned to real-time
tasks, which in turn call them with a cycle time to be defined and a defined priority.
TwinCAT 3 Real-Time is a real-time extension that can be used in the current TwinCAT 3.1 version under
Microsoft Windows operating systems from Windows 7 and under TwinCAT/BSD. TwinCAT 3 Real-Time
supports the following features in order to meet the requirements described for the control of industrial
processes:
• Real-time capable scheduling
• Parallel execution of processes
• Direct hardware access
In addition, TwinCAT 3 Real-Time also offers multi-core support to meet the ever-increasing demands for
high-performance and flexible/expandable control platforms. The available cores can either be used
exclusively for TwinCAT or shared with Windows. In the following sections, the cores are therefore referred
to as "isolated" or "shared.
TwinCAT 3 Real-Time works with the double-tick method. This means that both switching to real-time mode
and switching back is triggered by an interrupt. The interrupt when switching to the real-time mode also
starts the scheduling at the same time. After an adjustable period of time, at the latest after 90% of the set
cycle time, TwinCAT switches back to "shared" cores in non-real-time mode, so that the guest operating
system has sufficient computing time available to comply with the response times required for hardware
functions etc. The isolated cores are an exception.
Scheduling refers to the (system) process that determines the processing order and the processing time of
the individual tasks, based on the defined cycle time and the defined priority. Strict adherence to the
processing time ensures that the real-time compliance described above is guaranteed.
Triggered by a synchronous basic tick on all real-time kernels, the scheduling for each real-time kernel is
calculated independently in TwinCAT 3 Real-Time. This guarantees that real-time tasks running on different
cores do not interfere with each other. Unless this has been explicitly programmed in the user program by
using interlocks.
Scheduling in which the priority of a task is derived from its cycle time is also known as rate-monotonic
scheduling. The TwinCAT 3 Real-Time automatically activates the "Automatic Priority Management" option.
Since this is not always the best solution for every application, the priorities can be adjusted manually.
The figure shows the call of a PLC task. After the real-time tick has occurred, the PLC task is called by the
scheduler. This makes the current input values available to the PLC application (input update), followed by
processing of the application program (cycle update). Finally the results are written to the outputs (output
update). Once this has been completed, the device switches to non-real-time mode (double-tick). As shown
in the figure, the execution time of the user program may vary depending on which code is executed based
on the internal state of the program. Thus the time when the outputs are written also varies. Depending on
which task a bus system is driven, this can cause the sending of the bus telegrams to vary to the same
extent.
By using the "I/O at task start" option, the processing order within a task can be changed so that after
reading the inputs, the outputs (of the previous cycle) are written directly before the application program is
executed. Although the outputs are not written until the next cycle, this setting has the advantage that the
time at which the outputs are written to the process/bus is exactly the same in each cycle.
Preemptive multitasking
Preemptive multitasking means that the current state of a process (the CPU and floating-point registers) is
saved in the event of an interrupt (e.g. by higher-priority processes), and the current process is paused. If
this happens, the scheduler determines the (new) process to be executed, based on the task priorities. Once
the process to be interrupted is complete, the process context is restored and the "old" process continues.
In order to achieve deterministic (reproducible) real-time behavior, TwinCAT 3 Real-Time requires direct
hardware access. For this to be possible, TwinCAT 3 Real-Time must be executed in Windows kernel mode.
This makes it possible, among other things, for TwinCAT Real-Time to access the network ports directly and
send and receive real-time Ethernet telegrams (e.g. EtherCAT).
The following figure illustrates the structure of the TwinCAT 3.1 runtime environment in relation to
scheduling. The TwinCAT 3 runtime environment enables user modules to be executed in real-time. An
essential part of the TwinCAT 3 runtime environment therefore is the real-time driver, which is executed on
the cores that are activated for TwinCAT and handles the scheduling there. The latter takes place
independently on the individual cores.
Isolated cores
As described under real-time scheduling [} 8], TwinCAT uses a double-tick procedure to switch back to non-
real-time mode at a specified point in time. When switching between real-time mode and non-real-time
mode, the preceding process state is restored, as described under Preemptive multitasking [} 9]. The
restoration takes some time, depending on how intensively the real-time and non-real-time programs use the
memory and in particular the cache. In order to eliminate these temporal effects, TwinCAT 3.1 Real-Time
allows cores to be isolated from the guest operating system. This eliminates the need to switch back,
resulting in more computing time for the real-time user program and better real-time quality (less jitter) by
avoiding the time effects associated with restoring the "old" process state.
If the defined cycle time of a task is exceeded, processing of the "old" cycle continues in the next cycle. In
addition, the task exceed counter is incremented. Once processing of the old / previous cycle is complete,
the system immediately tries to start processing the tasks of the current cycle. If this is completed within the
current cycle, further processing is carried out as shown above.
If the second cycle that follows directly is also exceeded (in this case it is irrelevant whether the system is still
processing the first cycle or whether the second cycle has commenced), the current processing task is
completed, and processing of the next task does not commence until the next possible scheduled cycle start.
This means that several cycles may be lost. The exceed counter is incremented accordingly.
Processing of a TwinCAT task, in relation to the execution of runtime modules, is based on the following
sequence:
1. Copying of the inputs to the process images of the runtime modules called by the task.
2. Executing the modules according to the sort order (in ascending order).
3. Output update, which makes the outputs available accordingly. If this task drives an EtherCAT
fieldbus, the frame is provided and sent during the output process image.
4. Post-cycle update: This is used, among other things, to trigger a cycle update when the "I/O at task
start" option is active.
If runtime modules are added to a task, they "log on" to the respective calls of the task. The only exceptions
are PLC runtime modules. For reasons of compatibility with TwinCAT 2, the PLC runtime modules directly
update the inputs and outputs. The difference between the two behaviors is shown in the following figure:
Four runtime modules can be seen in each case. Standard TwinCAT 3 runtime modules log on to the
corresponding method calls of the task. This means that all input updates (yellow) and output updates (red)
are triggered by the task and take place one after the other directly at the start or end of task processing. If
two of these modules communicate with each other via a mapping, they do not receive the current values
until the next cycle.
The PLC runtime modules independently perform an input and output update. If two PLC runtimes
communicate with each other, the runtime module that is executed second directly receives the current
values from the first runtime module. Thus, there is no cycle offset in the communication direction from first
runtime module to second runtime module, but there such an offset does exist in the other direction.
3 Target systems
The controller that is currently being programmed with a TwinCAT development environment (TwinCAT
XAE) is referred to as the target system. In this chapter, important basics for handling target systems will be
explained. These are also needed to understand the documentation based on them in the chapter TE1000
XAE.
First, a connection between the development environment and the controller must be created in order to be
able to program a controller. Various channels can be used for this purpose. The individual options are
explained in more detail in the chapter Routing [} 13].
If a controller is already programmed and in the field and you want to update the machine without using the
programming environment, it is necessary to know which files and folders exist, what they are needed for
and how you can best exchange them. The chapters Folder and file types [} 195] and Machine update at file
level [} 204] are devoted to these topics.
Additional programs may also need to be started automatically when TwinCAT is restarted (e.g. an external
HMi). This is explained in the chapter Starting the program automatically [} 206].
If several controllers in a network are working on the same process, it is necessary to correct the timestamps
of the individual controllers when collecting and evaluating data so that the collected data adheres to the
exact time sequence. To achieve this, you can correct the timestamps of the individual controllers
accordingly. This is described in the chapter Corrected time stamps [} 207].
3.1 Routing
As already described in the Philosophy chapter, TwinCAT 3 consists of an engineering environment (XAE)
and a runtime environment (XAR). The engineering environment is used to configure and program the
runtime environments in the field. The runtime environments (target systems) then execute the control
programs in hard real time. The connection between the two environments that do not necessarily run on the
same PC/IPC is established via the ADS protocol (see ADS [} 13] chapter). A route must be entered so that
an engineering environment can communicate with a target system. This means that the other participant is
entered as known on both sides (engineering environment and runtime environment).
In order to take current technical trends and requirements in terms of security and connectivity into account,
you can secure the ADS connection accordingly or tunnel via current transport protocols. See Secure ADS
[} 184] or ADS-over-MQTT [} 173] chapters.
3.1.1 ADS
ADS Definition
In order to allow participation in ADS communication (as an ADS client or, possibly, as an ADS server) the
following software objects are made available:
• ADS-DLL
for use under e.g. C/C++
• ADS.NET [} 5] component
for use under e.g. VB.NET, Visual C#
The messages between these objects are exchanged through a consistent ADS (Automation Device
Specification) interface by the "message router". This manages and distributes all the messages in the
system and over the TCP/IP connections.
The following picture shows the TwinCAT device concept, based on ADS:
AMS ports
ADS devices in a TwinCAT message router are uniquely identified by a number, called the ADS port no. This
is specified and fixed for ADS devices, whereas pure ADS client applications (e.g. a HMI system) are
allocated a variable port number when they first access the message router.
AMS NetId
Each TwinCAT device in the network is identified by the AMS NetId. The AMS NetId consists of six octets.
The first four octets can be freely selected. The last two octets (usually .1.1) serve as subnet mask for
fieldbuses or further devices. The AMS NetId must be unique for all communication partners.
Configuration:
The AMS NetId of a local or remote TwinCAT device can be set in SYSTEM\Routes\NetId Management of a
TC3 project.
Alternatively, the AMS NetId can be configured locally via the Router category in the TwinCAT SysTray
menu. The device must be restarted after changing the AMS NetId.
AMS Net Id
The AMSNetId consists of 6 bytes and addresses the transmitter or receiver. One possible AMSNetId would
be e.g.. 172.16.17.10.1.1. The storage arrangement in this example is as follows:
The AMSNetId is purely logical and has usually no relation to the IP address. The AMSNetId is configurated
at the target system. At the PC for this the TwinCAT System Control is used. If you use other hardware, see
the considering documentation for notes about settings of the AMS NetId.
Command Id
Cmd Description
0x0000 Invalid
0x0001 ADS Read Device Info [} 21]
0x0002 ADS Read [} 21]
0x0003 ADS Write [} 22]
0x0004 ADS Read State [} 22]
0x0005 ADS Write Control [} 23]
0x0006 ADS Add Device Notification [} 23]
0x0007 ADS Delete Device Notification [} 24]
0x0008 ADS Device Notification [} 25]
0x0009 ADS Read Write [} 26]
Other commands are not defined or are used internally. Therefore the Command Id is only allowed to
contain the above enumerated values!
State Flags
Flag Description
0x0001 0: Request / 1: Response
0x0004 ADS command
The first bit marks, whether it´s a request or response. The third bit must be set to 1, to exchange data with
ADS commands. The other bits are not defined or were used for other internal purposes.
Flag Description
0x000x TCP Protocol
0x004x UDP Protocol
Request
Response
Request
Response
Request
Response
Request
Response
Request
Response
Note: We recommend to announce not more than 550 notifications per device. Otherwise increase the
payload by working with structures or use sum commands.
Request
Response
Request
Response
Request
The data which are transferred at the Device Notification are multiple nested into one another. The
Notification Stream contains an array with elements of type AdsStampHeader. This array again contains
elements of type AdsNotificationSample.
AdsNotificationStream
AdsStampHeader
AdsNotificationSample
If your handle becomes invalid, one notification without data will be send once as advice.
The data which can be read are addressed by the Index Group and the Index Offset
Request
Response
3.1.1.5.1 General
The PLC software can be described as a virtual field unit (Automation Device), since it is a pure software
PLC. It therefore provides a Beckhoff ADS (Automation Device Specification) interface for other
communication partners (e.g. other virtual field units or Windows programs), via which it can be
parameterised or interrogated. Use of the ADS standardises access to the PLC and incorporates it into the
range of available virtual field units.
The READ and WRITE operations take place on the PLC interface (as defined by ADS) via two numbers: the
index group (16 bit) and the index offset (32 bit). The ADS interface of the PLC will be described in more
detail in the following pages with regard to the group and offset indices.
The four global ranges of an ADS unit are shown as follows for the PLC as four sections in the index groups:
R:
n * ULONG :=
Result1, Result2, ...,
Result(n)
R:
(n * ULONG[2])
+ UINT8[ReturnLen1]
+ UINT8[ReturnLen2]
+ ...,
+ UINT8[ReturnLen(n)] :=
Result1, ReturnLen1,
Result2, ReturnLen2,
...,
Result(n), ReturnLen(n),
ReadData1, ReadData2, ...,
ReadData(n)
3.1.1.5.4.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 Quantity of Channel
0x00000002 Read every UINT32 1 0, 1...255 Quantity of group
0x00000003 Read every UINT32 1 0, 1...255 Quantity of Axis
0x00000004 Read every UINT32 1 0, 1...255 Quantity of Encoder
0x00000005 Read every UINT32 1 0, 1...255 Quantity of controller
0x00000006 Read every UINT32 1 0, 1...255 Quantity of Drives
0x0000000A Read every UINT32 1 0, 1...255 Quantity 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 controller Reserved!
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
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 [} 154]
0x00000004 Read every UINT32 1 ENUM Interpreter type
[} 154]
0x00000005 Read every UINT32 1 Program load buffer
size in bytes
0x00000006 Read every UINT32 1 Program no. according
to job list
0x00000007 Read/Write every UINT32 1 ENUM Set load log mode
[} 155]
0x00000008 Read/Write every UINT32 1 ENUM Set trace mode [} 155]
0x00000009 Read/Write every UINT32 1 RESERVED
0x0000000A Read/Write every UINT32 1 0/1 Records all feeder
entries in a log file
named "TcNci.log"
0x0000000B Read/Write every UINT32 1 0/1 Channel specific level
for NC logger
messages
0: errors only
1: all NC messages
Index-Offset Access Channel type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000040 Read/Write Interpolation { Target address of Reserved
interpreter hooks function,
char[6] Ams Net ID no standard!
UINT16 Port
UINT32 Index group
UINT32 Index offset
}
0x00000050 Read/Write Interpolation UINT32 1 ENUM Reaction if at the
radius compensation a
bottle neck is
recognized
0: Error and abort
1: Note & trouble
shooting
2: Only note, without
outline modulation
0x00000051 Read/Write Interpolation UINT32 1 1..24 Look ahead for
bottleneck detection
0x00000052 Read/Write Interpolation UINT32 1 0/1 Chamfer on/off reserved
function,
no standard!
0x00000053 Read/Write Interpolation UINT32 1 Activation for reading
the currently effective
interpolation rules,
zero shifts and rotation
0: off 1: on
0x00000054 Read/Write Interpolation UINT32 1 0/1 Retrace on/off Reserved
function,
no standard!
0x00000055 Read/Write Interpolation UINT32[4] 1 Configuration of the
cyclic channel
interface for UINT32;
up to 4 index offsets
can be configured.
0x00000056 Read/Write Interpolation UINT32[4] 1 Configuration of the
cyclic channel
interface for LREAL;
up to 4 index offsets
can be configured.
0x00010K0L Read/Write every REAL64 e.g. mm ±MAX REAL64 Value for zero shift
(NPV)
[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/Write every UINT16 Tool number: values
for tool compensation
0x0003ww00 Read/Write every UINT16 [1...50] Tool type:
ww = tool 1...50
0x0004wwnn Read/Write every REAL64 [1...14] Parameter:
nn = Index 1...14
0x000500gg Read/Write every REAL64 e.g. mm ≥ 0 (value) Radius of the
[1...9] (g) tolerance sphere gg =
channel group
(default: 1)
3.1.1.5.4.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
0x00000002 Read every UINT32 1 Number of groups in
the Channel
0x00000003 Read every UINT32 1 ENUM Interpreter status Cannot be
[} 155] traced by
oscilloscope!
0x00000004 Read every UINT32 1 ENUM Interpreter/channel
operation mode
[} 155]
0x00000005 Read every UINT32 1 Currently loaded
program
0x00000007 Read every UINT8[...] 1 Program name of Max. 100
currently loaded characters, null-
program terminated
(100 characters, null-
terminated)
0x00000008 Read Interpreter UINT32 1 [0,1] Interpreter simulation Cannot be
mode traced by
oscilloscope!
0: off (default)
1: on
0x00000010 Read Interpreter UINT32 1 Text index Cannot be
traced by
If the interpreter is in
oscilloscope!
the aborted state, the
current text index can
be read out here
0x00000011 ReadWrite Interpreter Write Cannot be
UINT32 1 Text index traced by
oscilloscope!
Read
UINT8[..] 1 Line of the NC part
program from the text
index
0x00000012 Read Interpreter {
UINT32 1 Current display for
1: SAF
2: Interpreter
3: Error offset
UINT32 1 File offset
UINT8[260] 1 Path + program name
}
0x00000013 Read Interpreter UINT32[18] Display for currently The technology
effective G-code data must first
be activated.
0x00000014 Read Interpreter { Determines the The technology
currently effective zero data must first
shift be activated.
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 Interpreter { Determines the The technology
currently effective data must first
rotation be activated.
UINT32 1 Block counter
UINT32 1 Dummy
LREAL[3] 1 Rotation of X, Y & Z in
degrees
}
0x00000016 Read Interpreter UINT32 1 [0,1] Feeder Info Only used
internally! Not
standard
Index-Offset Access Channel type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000100 Read every UINT32 [n] 1 [0, 1...255] Returns the respective Cannot be
axis IDs in the channel traced by
number: [1...255] axis oscilloscope!
ID's: [0, 1...255]
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 have to be
given although it may.
Other paths are also
permitted.
0x00000005 Write every UINT16 ENUM cf. appendix Set the interpreter/
interpreter channel operation mode
operation
mode [} 155]
0x00000006 Write Interpreter UINT8[...] Set path for subroutines
0x00000008 Write Interpreter UINT32 1 Interpreter simulation Not yet
mode: released
0: off (default)
1: on
0x0000000F Write every VOID RESERVED
Index offset Access Channel type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000025 Write Interpolation { Reads snapshot of a
given file to the
interpreter
char[32] Filename in
TwinCAT\CNC-folder
UINT32 1 0..1 Mask:
0x1: R-Parameters
0x2: Zeroshifts
0x4: Tool Desc
}
0x00000026 Write Interpolation VOID Set all tool parameters
(incl. type & number) to
null
0x00000027 Write Interpolation VOID Set all zero offset shifts to
null
3.1.1.5.4.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 (PLC→NC) structure:
interface
Remark: Size and NciChannelFro
alignment changed. mPlc
PLCTONC_NCI
CHANNEL_RE
F
0x00000001 Read every UINT8[...] 1 Interpreter program Cannot be
min. 30 Byte display traced by
oscilloscope!
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 {160 Byte} STRUCT s. CHANNEL STRUCTURE Current PLC
(NC→PLC) Channel (NC→PLC) structure:
interface
Remark: Size and NciChannelToP
alignment changed. lc
NCTOPLC_NCI
CHANNEL_RE
F
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 [} 155]
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)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
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
Default: 1
position monitoring for
the main axes (X, Y,
Z)
(see encoder
parameters)
0x0000050A Read/Write DXD group UINT32 1 0/1 NCI Overridetype
0: related to internal
reduced velocity
(without iteration)
1: related to original
external
(programmed) velocity
2: Relative to the
internally reduced
velocity (0 ... >100%)
0x0000050C Read DXD group UINT32 1 [128 ... 1024] User-defined NEW from
maximum number of TC3.1 B4014
Default: 128
the NCI SAF tables boot
entries parameters
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
compensation master/
slave coupling ("angle
pre-control")
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000702 Read FIFO group UINT32 1 [1...10000] FIFO size (length) (n = (n x m) FIFO
number of FIFO boot data
entries)
0x00000703 Read FIFO group UINT32 1 [0, 1, 4] Interpolation type for NEW from
FIFO setpoint TC3.1 B4020
generator
0:
INTERPOLATIONTYP
E_LINEAR (default)
1:
INTERPOLATIONTYP
E_4POINT
4:
INTERPOLATIONTYP
E_CUBICSPLINE
(with 6 points)
0x00000704 Read/Write FIFO group UINT32 1 [1, 2] Override type for FIFO
setpoint generator
Type 1:
OVERRIDETYPE_INS
TANTANEOUS
(default)
Type 2:
OVERRIDETYPE_PT
2
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
sequenced 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
Coordinate System)
axis positions, max.
dimension: 8
UINT32 1 ≥0 Reserve
UINT32 1 ≥0 Reserve
}
Read
{
REAL64[8] e.g. ±∞ ACS (Axis Coordinate
degree System) axis
positions, max.
dimension: 8
UINT32 1 ≥0 Reserve
UINT32 1 ≥0 Reserve
}
3.1.1.5.4.3.2 "Index offset" specification for group state (Index group 0x3100 +
ID)
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000001 Read every INT32 1 ENUM Error code group
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
oscilloscope!
0x0000000A Read every UINT32 1 ≥0 Coupling table index Cannot be
traced by
oscilloscope!
0x0000000B Read every UINT32 1 ≥0 current number of Symbolic
SVB entries/tasks access:
'SvbEntries'
(DXD)
0x0000000C Read every UINT32 1 ≥0 Current number of Symbolic
SAF entries/tasks access:
'SafEntries'
(DXD)
0x0000000D Read every UINT32 1 Current block number Symbolic
(only active for access:
interpolation group) 'BlockNumber'
(DXD)
0x0000000E Read every UINT32 1 ≥0 current number of free Cannot be
SVB entries/tasks traced by
oscilloscope!
0x0000000F Read every UINT32 1 ≥0 Current number of free Cannot be
SAF entries/tasks traced by
oscilloscope!
0x00000011 Read every UINT16 1 0/1 Emergency Stop (E- Cannot be
Stop) active? traced by
oscilloscope!
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000110 Read PTP group { Internal NC Reserved!
information
(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 AccelerationResolutio
s^2 n
REAL64 e.g. mm/ ≥0 VelocityResolutionAtA
s ccelerationZero
}
0x00000500 Read DXD group REAL64 e.g. mm ≥ 0 Path rest way Symbolic
(remaining arc length) access:
on the current path 'SetPathRemLe
segment ngth'
0x00000501 Read DXD group REAL64 e.g. mm ≥ 0 Racked out arc length Symbolic
on the current path access:
segment 'SetPathLength'
0x00000502 Read DXD group REAL64 e.g. mm/ ≥ 0 Current path set Symbolic
s velocity access:
'SetPathVelo'
0x00000503 Read DXD group REAL64 e.g. mm/ ± ∞ Current path set Symbolic
s^2 acceleration access:
'SetPathAcc'
0x00000504 Read DXD group REAL64 e.g. mm/ ≥ 0 Amount of the current Symbolic
s^2 vectorial set access:
acceleration 'SetPathAbsAcc
'
0x00000505 Read DXD group REAL64 e.g. mm/ ≥ 0 Maximum segment Symbolic
s end path set velocity access:
'SetPathVeloEn
d'
0x00000506 Read DXD group REAL64 e.g. mm/ ≥ 0 Segment maximum Symbolic
s path set velocity access:
'SetPathVeloMa
x'
0x00000507 Read DXD group REAL64 e.g. mm ≥ 0 Current relative Symbolic
braking distance access:
based on the current 'SetPathStopDi
arc length st'
0x00000508 Read DXD group REAL64 e.g. mm ± ∞ Safety distance = Symbolic
segment arc length - access:
current arc length - 'SetPathSecurit
relative braking yDist'
distance
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000509 Read DXD group REAL64 1 0/1 Segment transition Symbolic
access:
'SetPathSegme
ntChange'
0x0000050A Read DXD group REAL64 % [0 ... 100] Path velocity override Symbolic
access:
'SetPathOverrid
e'
0x00000511 Read DXD group REAL64 e.g. mm/ ≥ 0 Component of the Symbolic
s actual path velocity access:
'ActPathAbsVel
o'
0x00000512 Read DXD group REAL64 e.g. mm/ ± ∞ Actual path Symbolic
s^2 acceleration on the access:
current segment 'ActPathAcc'
0x00000513 Read DXD group REAL64 e.g. mm/ ≥ 0 Component of the Symbolic
s^2 actual path access:
acceleration on the 'ActPathAbsAcc
current segment '
0x00000514 Read DXD group REAL64 e.g. mm ± ∞ Position error on the Symbolic
path in tangential access:
direction (signed to 'PathDiffTangen
indicate leading and tial'
lagging)
0x00000515 Read DXD group REAL64 e.g. mm ≥ 0 Position error on the Symbolic
path in orthogonal access:'PathDiff
direction Orthogonal'
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
segment (radius of
tolerance ball)
0x00000522 Read DXD group REAL64 1 ≥0 Total remaining path
length to the last
geometry entry or the
next accurate stop.
Refers to group
parameter 0x508.
0x00000523 Read DXD group REAL64 1 ≥0 Programmed velocity
of the current segment
0x00000524 Read DXD group REAL64 e.g. mm ≥ 0 Path distance (arc from TC 3.1
length) travelled since B4022.31
the program start from TC 3.1
B4024.0
0x00000530 Read DXD group { Current or last MCS-
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 MCS-
target position of the
auxiliary axes Q1 to
Q5
REAL64[5] e.g. mm ± ∞ Target position of axis
Q1 to Q5
}
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000532 Read DXD group { Reads path length, H not generally
parameter and Entry released
ID of the next 11
segments 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
}
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)
0x00000546 Read DXD group REAL64[8] e.g. mm ± ∞ Set position array of from TC3.1
the (3+5) axes of the B4022.17
3D group
0x00000547 Read DXD group REAL64[8] e.g. mm ± ∞ Actual position array from TC3.1
of the (3+5) axes of B4022.17
the 3D group
0x00000548 Read DXD group REAL64[8] e.g. mm ± ∞ Position difference from TC3.1
(set/actual) or lag error B4022.17
as array of the (3+5)
axes of the 3D group
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x0000056n Read DXD group REAL64 1 ±∞ Current position error
of the auxiliary axis
within the tolerance
ball (set value side
only)
Only for auxiliary axes
n = 1..5
Number of the
auxiliary axis (not axis
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
deceleration)
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
(with controlled ramp) function,
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
group Emergency Stop (E-
Stop)
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000060 ReadWrite 3D group 1 Internal "feed group" Execute
command ("Feeder") command!
0x00000061 ReadWrite 3D group 1 Internal "feed group" Execute
command ("Feeder") command!
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000122 Write 1D group (MW { Start 1D group Reserved start
servo) (special start): function, no
UINT32 ENUM s. appendix standard!
Start type [} 156] (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
velocity level
REAL64 mm/s ≥0.0 new end velocity level
UINT32 1 0/1 Standard
acceleration?
REAL64 mm/s^2 ≥0.0 Acceleration
UINT32 1 0/1 Standard
deceleration?
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 [} 164] (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
output:
UINT32 ENUM s. appendix Output type [} 164] (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"!
group(SERVO) UINT32 ENUM s. appendix angle >0.0 and
Slave type/coupling
<= 90.0
type [} 158] (s. degrees(paralle
appendix) l saw: 90.0
UINT32 1 [1...255] Axis ID of the master 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.
synchronous position
master [mm]
REAL64 1 [±1000000.0] Parameter 2: linear:
Reserve
FlySawVelo: Reserve
FlySawPos: Abs.
synchronous position
slave [mm]
REAL64 1 [±1000000.0] Parameter 3: linear:
Reserve
FlySawVelo: Angle of
inclination in
[DEGREE]
FlySawPos: angle of
inclination in
[DEGREE]
REAL64 1 [±1000000.0] Parameter 4: linear:
Reserve
FlySawVelo: Gearing
factor
FlySawPos: Gearing
factor
}
0x00000141 Write Master/Slave VOID Master/slave
decoupling: 1D decoupling (SERVO)
group(SERVO)
0x00000142 Write Master / slave { Change of the
parameter 1D coupling 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 saw" Only for "flying
group (SERVO) (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
0x00000151 Write 1D group VOID Activate complete 1D
group / axis (enable)
0x00000710 Write FIFO group { REAL64[x*m]} e.g. mm ±∞ Write x FIFO entries Only possible
(lines): on a line-by-line
basis! (integer
(x*m)-values (one or
multiple)
more lines)
n: FIFO length
(number of lines)
m: FIFO dimension
(number of columns)
range of values 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
basis! (integer
(x*m)-values (one or
multiple)
more lines)
n: FIFO length
(number of lines)
m: FIFO dimension
(number of columns)
range of values x: [1 ...
n]
3.1.1.5.4.4.1 "Index offset" specification for axis parameter (Index group 0x4000
+ ID)
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n00000 Read every { General AXIS Modified from
(Structure for all PARAMETER TC3
axis STRUCTURE (NC/
parameters) CNC),
also contains the sub-
elements such as
encoder, controller
and drive
(s.
MC_ReadParameterS
et in TcMc2.lib)
Note: Size and
alignment changed.
UINT32 1 Axis ID
STRING[30+1] 1 Axis name
UINT32 1 ENUM Axis type [} 155]
... ... ... ...
} 1024 bytes (instead of
512 bytes)
0x00000001 Read every UINT32 1 Axis ID
0x00000002 Read every STRING[30+1] 1 Axis name Any number of
characters from
UINT8[. . .] TC3.1 Build
4022.32 or
4024.6
0x00000003 Read every UINT32 1 ENUM Axis type [} 155]
0x00000004 Read every UINT32 µs Cycle time axis (SEC)
0x00000005 Read every STRING[10+1] 1 Physical unit
0x00000006 Read/Write every REAL64 e.g. mm/ Ref. velocity in cam
s direction
0x00000007 Read/Write every REAL64 e.g. mm/ Ref. velocity in sync
s direction
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
monitoring?
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 Looping distance (±)
0x00000015 Read/Write every UINT16 1 0/1 Target position
monitoring?
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
monitoring time
0x00000018 Read/Write every REAL64 e.g. mm Pulse way in pos.
direction
0x00000019 Read/Write every REAL64 e.g. mm Pulse way in neg.
direction
0x0000001A Read/Write every UINT32 1 ENUM (≥0) Error reaction mode:
0: instantaneous
(default)
1: delayed
(e.g. for Master/Slave-
coupling)
0x0000001B Read/Write every REAL64 s [0...1000] Error delay time
(if delayed error
reaction is selected)
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x0000001C Read/Write every UINT16 1 0/1 Couple slaves via
actual values if not
ready to operate?
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 1 ENUM (≥0) Fast Axis Stop Signal
Type:
Selection of the signal
type that triggers a fast
axis stop (see bit 7 in
Drive->nStatus4)
"0 (SignalType_OFF)",
"1
(SignalType_RisingEd
ge)","2
(SignalType_FallingEd
ge)","3
(SignalType_BothEdg
es)","4
(SignalType_HighActiv
e)","5
(SignalType_LowActiv
e)"
0x00000020 Read/Write every UINT16 1 0/1 Allow motion
commands for slave
axis?
Default: FALSE
0x00000021 Read/Write every UINT16 1 0/1 Allow motion
commands for axes
with active external
setpoint generator?
Default: FALSE
0x00000030 Read every UINT16 1 [0,1] Persistent data e.g. for Boot
actual position and parameters,
reference state of the cannot be
encoder? changed online.
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00000031 Read every { AmsAdd 1 Read the hardware
UINT8[6] r: AMS address
UINT16 AmsNetI (AMS Net ID and AMS
UINT16 d, Port No) and the
} 10 bytes AmsPort EtherCAT channel
No. number
Channel (communication
No channel 0,1,2,3…)
0x00000031 Read every { AmsAdd 1 Read the hardware NEW from TC3
UINT8[6] r: AMS address
DriveObjectId
UINT16 AmsNetI (AMS Net ID and
and
UINT16 d, devices AMS Port No)
EncObjectId
// AmsPort and the EtherCAT
from NC build
UINT16 No. channel number
4437
UINT32 Channel (communication
UINT32 No channel 0,1,2,3…)
UINT32 Reservie
Supplemented by
UINT32 rt
additional NC
UINT32 NcDriveI
information such as
UINT32 D
NcDriveID,
UINT32 NcDriveI
NcDriveType (see
UINT32 ndex
appendix) etc..
UINT32 NcDrive
UINT32 Type
UINT32[3] NcEncID
} 64 bytes NcEncIn
dex
NcEncT
ype
NcAxisI
D
NcAxisT
ype
TcDrive
ObjectId
TcEncO
bjectId
reserved
0x00000033 Read every { General Changed in
UINT16 0/1 APPLICATION TC3
ApplRequestBit ≥0 REQUEST
UINT16 1 >0 STRUCTURE (NC/
ApplRequestTy ≥0 NCI),
pe e.g. for
UINT32 1 ApplicationHoming
ApplCmdNo request
UINT32 Not (see
ApplCmdVersio impleme MC_ReadApplicationR
n nted equest in TcMc2.lib)
...
Application request
} 1024 bytes 1
types:
0: NONE (IDLE)
1: HOMING
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
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 Note
(Hex) unit range
0x0000010D Read/Write Servo UINT32 1 Index offset of the axis
state that is passed in
the cyclic interface as
"UserData".
0x00000000:
deactivated
0x00010012: Encoder
position with position
bias voltage (without
position correction and
without dead time
compensation)
0x00010014:
DriveActVelo
0x00010017:
MC_SetPosition
offsets
0x00000301 Read/Write high/low REAL64 e.g. mm [0.0 ... Creep distance in pos.
100000.0] direction
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 deceleration in
neg. direction
0x00000307 Read/Write high/low REAL64 s [0.0 ... 60.0] Switching time from
high to low velocity
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] Delay time to release
brake
0x0000030A Read/Write high/low REAL64 s [0.0 ... 60.0] Pulse time in pos.
direction
0x0000030B Read/Write high/low REAL64 s [0.0 ... 60.0] Pulse time in neg.
direction
ENCODER
0x00n10001 Read Encoder: every UINT32 1 [1 ... 255] Encoder ID n = 0:
standard encoder of
the axes > 0: nth
encoder of the axis
(optional)
0x00n10002 Read Encoder: every STRING[30+1] 1 30 characters Encoder name
0x00n10003 Read Encoder: every UINT32 1 ENUM (>0) Encoder type [} 160]
0x00n10004 Read/Write Encoder: every UINT32 1 Byteoffset Input address offset (I/ Change I/O
O-Input-Image) address
0x00n10005 Read/Write Encoder: every UINT32 1 Byteoffset Output address offset Change I/O
(I/O-Output-Image) address
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n10006 Read/Write Encoder: every REAL64 e.g. mm/ [1.0E-12 ... Resulting scaling Writing is not
INC 1.0E+30] factor (numerator / allowed if the
denominator) controller
enable has
Note: from TC3 the
been issued.
scaling factor consists
of two components –
numerator and
denominator (default:
1.0).
0x00n10007 Read/Write Encoder: every REAL64 e.g. mm [±1.0E+9] Position offset Writing is not
allowed if the
controller
enable has
been issued.
0x00n10008 Read/Write Encoder: every UINT16 1 [0,1] Encoder count Writing is not
direction allowed if the
controller
enable has
been issued.
0x00n10009 Read/Write Encoder: every REAL64 e.g. mm [0.001 ... Modulo factor
1.0E+9]
0x00n1000A Read/Write Encoder: every UINT32 1 s. ENUM (>0) Encoder mode [} 161]
0x00n1000B Read/Write Encoder: every UINT16 1 0/1 Soft end min.
monitoring?
0x00n1000C Read/Write Encoder: every UINT16 1 0/1 Soft end max.
monitoring?
0x00n1000D Read/Write Encoder: every REAL64 mm Soft end position min.
0x00n1000E Read/Write Encoder: every REAL64 mm Soft end position max.
0x00n1000F Read/Write Encoder: every UINT32 1 s. ENUM (≥0) Encoder evaluation
in the appendix direction [} 161]
(enable for log.
counting direction)
0x00n10010 Read/Write Encoder: every REAL64 s [0.0...60.0] Filter time for actual
position value in
seconds (P-T1)
0x00n10011 Read/Write Encoder: every REAL64 s [0.0...60.0] Filter time for actual
velocity value in
seconds (P-T1)
0x00n10012 Read/Write Encoder: every REAL64 s [0.0...60.0] Filter time for actual
acceleration value in
seconds (P-T1)
0x00n10013 Read/Write Encoder: every STRING[10+1] 1 Physical unit Not
implemented!
0x00n10014 Read/Write Encoder: every UINT32 1 Interpretation of the Not
units (position, implemented!
velocity, time)
Bit array
Bit 0: Velocity in x/min
instead of x/s
Bit 1: Position in
thousandths of the
base unit
0x00n10015 Read Encoder: every UINT32 INC [0x0... Encoder mask Read-only
0xFFFFFFFF] (maximum value of the parameter
encoder actual value
see also
in increments
"Encoder Sub
Note: The encoder Mask"
mask may be any parameter
numerical 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
correction
(measurement system
error correction)?
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
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 ENUM (>0) Encoder absolute Writing is not
dimensioning system allowed if the
controller
[} 161]
enable has
been issued.
0x00n1001A Read Encoder: every UINT32 1 ENUM (>0) Encoder position Not
initialization implemented!
0x00n1001B Read/Write Encoder: every REAL64 e.g. mm [≥0, modulo Tolerance window for
factor/2] modulo-start
0x00n1001C Read Encoder: every UINT32 1 ENUM (>0) Encoder sign
interpretation [} 161]
(data type)
0x00n1001D Read Encoder: every UINT16 1 0/1 Incremental or
absolute encoder ?
0: Incremental
encoder type
1: Absolute encoder
type
0x00n10023 Read/Write Encoder: every REAL64 e.g. mm/ [1.0E-12 ... Component of the NEW from TC3
INC 1.0E+30] scaling factor:
Writing is not
numerator
allowed if the
(=> scaling factor controller
numerator / scaling enable has
factor denominator) been issued.
0x00n10024 Read/Write Encoder: every REAL64 1 [1.0E-12 ... Component of the NEW from TC3
1.0E+30] scaling factor:
Writing is not
denominator
allowed if the
(=> scaling factor controller
numerator / scaling enable has
factor denominator) been issued.
Default: 1.0
0x00n10025 Read/Write Encoder: every { e.g. mm/ [1.0E-12 ... Component of the NEW from TC3
REAL64 INC 1.0E+30] scaling factor:
REAL64 1 [1.0E-12 ... numerator
} 1.0E+30]
Component of the
scaling factor:
denominator
(=> scaling factor
numerator / scaling
factor denominator)
0x00n10030 Read/Write Encoder: every UINT32 1 Internal encoder NEW from TC3
control double word for
specifying the
operation modes and
properties
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n10108 Read/Write E: INC UINT32 1 [0x0000000F... Encoder Sub Mask see also
0xFFFFFFFF]bi (maximum value of the "Encoder Mask"
nary mask: (2n - absolute range of the parameter
1) encoder actual value
in increments)
Used, for example, as
a reference mark for
the referencing mode
"Software Sync" and
for the NC Retain Data
"ABSOLUTE
(MODULO)",
"INCREMENTAL
(SINGLETURN
ABSOLUTE)".
Note 1: The Encoder
Sub Mask must be
smaller than or equal
to the Encoder Mask.
Note 2: The Encoder
Mask must be an
integer multiple of the
Encoder Sub Mask.
Note 3: The Encoder
Sub Mask must be a
continuous sequence
of binary ones (2n-1),
e.g. 0x000FFFFF.
CONTROLLER
0x00n20001 Read Controller: UINT32 1 [1 ... 255] Controller ID
every
n = 0: standard
controller of the axes >
0: nth controller of the
axis (optional)
0x00n20002 Read Controller: STRING[30+1] 1 30 characters Controller name
every
0x00n20003 Read Controller: UINT32 1 ENUM (>0) Controller type [} 159]
every
0x00n2000A Read/Write Controller: 1 ENUM (>0) Controller mode
every
0x00n2000B Read/Write Controller: REAL64 % [0.0 ... 1.0] Weighting of the
every velocity pre-control
(default value: 1.0 =
100 %)
0x00n20100 Read/Write P/PID (pos., REAL64 1 [0.0...1.0] Maximum output (default value:
(veloc.) limitation (±) for 0.5 == 50%)
controller total output
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n20102 Read/Write P/PID (pos.) REAL64 e.g. mm/ [0.0...1000.0] Proportional gain kp or Position control
s/ mm kv
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
respectively, that
applies above a
limiting 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
proportional gain, kp
or kv respectively,
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 Reserved
position error (control function
deviation)
(for P/PID controllers
with velocity or torque
interface)
0x00n2010F Read/Write P/PP/PID (pos.) REAL64 (mm/s) / [0.0...1000.0] Slave coupling Slave coupling
Slave control mm difference control: difference
control
Proportional gain kcp
0x00n20202 Read/Write P/PID (velocity) REAL64 1 [0.0...1000.0] Proportional gain kp or Velocity control
kv
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
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 control
Tv
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 Velocity
limitation (±) for I-part control
in percent (default
setting: 0.1 = 10%)
0x00n20207 Read/Write PID (velocity) REAL64 % [0.0...1.0] Maximum output Velocity control
limitation (±) for D-part
in percent (default
setting: 0.1 = 10%)
0x00n2020D Read/Write P/PID (velocity) REAL64 mm/s [0.0 ... 10000.0] "Dead band" for Reserved
velocity error (control function
deviation)
(for P/PID controllers
with velocity or torque
interface)
0x00n20220 Read/Write P/PID (velocity) REAL64 s ≥0 PT-2 filter value for Velocity control,
velocity error (vel. not standard!
control deviation)
0x00n20221 Read/Write P/PID (velocity) REAL64 s ≥0 PT-1 filter value for Reserved
velocity error (vel. function,
control deviation) no standard!
0x00n20250 Read/Write P/PI (observer) UINT32 1 ENUM (>0) Observer mode [} 159]
for control in the
torque interface
0: OFF (default)
1: LUENBERGER
0x00n20251 Read/Write P/PI (observer) REAL64 Nm / A >0.0 Motor:
Torque constant KT
0x00n20252 Read/Write P/PI (observer) REAL64 kg m2 >0.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] Correction factor kc
Default: 1.0
0x00n20255 Read/Write P/PI (observer) REAL64 s [0.0 ... 0.01] Velocity filter (1st
Default: 0.001 order):
Time constant T
0x00n20A03 Read/Write P/PID (MW) REAL64 cm^2 [0.0 ... Cylinder area AA of the Reserved
1000000] A side in cm^2 parameters!
0x00n20A04 Read/Write P/PID (MW) REAL64 cm^2 [0.0 ... Cylinder area AB of the Reserved
1000000] B side in cm^2 parameters!
0x00n20A05 Read/Write P/PID (MW) REAL64 cm^3/s [0.0 ... Nominal volume flow Reserved
1000000] Qnom in cm^3/s parameters!
0x00n20A06 Read/Write P/PID (MW) REAL64 bar [0.0 ... Nominal pressure or Reserved
1000000] valve pressure drop, parameters!
Pnom in bar
0x00n20A07 Read/Write P/PID (MW) UINT32 1 [1 ... 255] Axis ID for the system Reserved
pressure Po parameters!
DRIVE:
0x00n30001 Read Drive: every UINT32 1 [1 ... 255] Drive ID
0x00n30002 Read Drive: every STRING[30+1] 1 30 characters Drive name
0x00n30003 Read Drive: every UINT32 1 ENUM (>0) Drive type [} 164]
0x00n30004 Read/Write Drive: every UINT32 1 Byteoffset Input address offset (I/ Change I/O
O-Input-Image) address
0x00n30005 Read/Write Drive: every UINT32 1 Byteoffset Output address offset Change I/O
(I/O-Output-Image) address
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n30006 Read/Write Drive: every UINT16 1 [0,1] Motor polarity Writing is not
allowed if the
controller
enable has
been issued.
0x00n3000A Read/Write Drive: every UINT32 1 ENUM (≥0) Drive mode
0x00n3000B Read/Write Drive: every REAL64 % [-1.0 ... 1.0] Minimum output limit
(output limitation)
(default setting: -1.0 =
-100%)
0x00n3000C Read/Write Drive: every REAL64 % [-1.0 ... 1.0] Maximum output limit
(output limitation)
(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
determine the drive
operation modes
0x00n30011 Read/Write every UINT32 1 ≥5 Internal drive reset Reserved!
counter
(time in NC cycles for
enable and reset)
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n3010C Read/Write D: Servo REAL64 1 [0.0 ... Torque scaling (rotary For
(Sercos, Profi 100000000.0] motor) or force scaling Sercos, Profi
Drive, AX200x, (linear motor) (scaling Drive, AX200x,
CANopen) factor for reacting to CANopen
weighting in the drive)
From TC3.1
for "SetTorque"
B4024.2
(e.g.
MC_TorqueControl)
with Drive OpMode
CST)
3.1.1.5.4.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/ TwinCAT 3, not
axis data) CNC) oscilloscopeabl
INT32 1 Error state e!
(NCAXISSTAT
INT32 Reserved E_
REAL64 e.g. mm Actual position ONLINESTRU
REAL64 e.g. Modulo actual position CT)
degrees
REAL64 e.g. mm Set position
REAL64 e.g. Modulo set position
degrees
REAL64 e.g. mm/ Optional: Actual
s velocity
REAL64 e.g. mm/ Set velocity
s
UINT32 % 0...1000000 Velocity override
(1000000 == 100%)
UINT32 Reserved
REAL64 e.g. mm Lag error position
REAL64 e.g. mm PeakHold value for
max. neg. position lag
(pos.)
REAL64 e.g. mm Peak hold value for
max. pos. position lag
(pos.)
REAL64 % Controller output in
percent
REAL64 % Total output in percent
UINT32 1 ≥0 Axis state 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 TwinCAT 3.1 B4013)
REAL64 e.g. Set torque or set force
100% =
("SetTorque")
1000
REAL64 e.g. Actual torque or actual
100% = force (new from
1000 TwinCAT 3.1 B4013)
REAL64 e.g. %/s Set torque change or
set force change (time
derivative of the set
torque or set force)
(from TwinCAT 3.1
B4024.2)
REAL64 e.g. Additive set torque or
100% = additive set force
1000
("TorqueOffset")
(from TwinCAT 3.1
B4024.2)
...
} 256 bytes
0x00000001 Read every UINT32 1 Axis state error code Symbolic
access:
"ErrState''
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n0000A Read every REAL64 e.g. mm Set position Symbolic
access:
"SetPos''
0x00n0000B Read every REAL64 e.g. Modulo set position Symbolic
DEGRE access:
ES "SetPosModulo'
'
0x00n0000C Read every INT32 1 Modulo set rotation
0x00n0000D Read every REAL64 1 [-1.0, 0.0, 1.0] Set travel direction
0x00n0000E Read every REAL64 e.g. mm/ Set velocity Symbolic
s access:
"SetVelo''
0x00n0000F Read every REAL64 e.g. mm/ Set acceleration Symbolic
s^2 access:
"SetAcc''
0x00n00010 Read every REAL64 e.g. mm/ Set jerk (time Symbolic
s^3 derivative of the set access:
acceleration) "SetJerk''
0x00n00011 Read every REAL64 e.g. Nm Set torque (rot. motor) NEW from
or N or TwinCAT 3.1
respectiv set force (linear motor) B4022
ely,
("SetTorque") Symbolic
e.g. access:
100% = "SetTorque''
1000
0x00n00012 Read every REAL64 1 Set coupling factor
(set gear ratio)
0x00n00013 Read every REAL64 e.g. mm Expected target
position
0x00n00014 Read Servo { Remaining travel time Always to SEC
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 Symbolic
access:
"CmdNo''
0x00n00016 Read Servo REAL64 s ≥0 Positioning time of the
last motion command
(start → target position
window)
0x00n00017 Read Servo REAL64 % [0.0…1.0] Set override value for NEW from
velocity TwinCAT 3.1
1.0=100%
B4020
Note: initially only
implemented for FIFO
group
0x00000018 ReadWrite Servo Write Reading the "Stop Always to SEC
information" (stop Port 501!
distance, stop time)
REAL64 e.g. mm/ ≥ 0 Deceleration for axis
s^2 stop
REAL64 e.g. mm/ ≥ 0 Jerk for axis stop
s^3
Read
REAL64 e.g. mm ≥ 0 Stop distance
REAL64 s ≥0 Stop time
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00000020 Read every UINT32 1 s. ENUM Coupling state (state)
0x00000021 Read every UINT32 1 ≥0 Coupling table index
0x00000022 Read Servo master/ { Reading the coupling
slave coupling parameters (SERVO):
Type: LINEAR, REAL64 1 [±1000000.0] Parameter 1: Linear:
(&SPECIAL) Gear ratio
REAL64 1 [±1000000.0] Parameter 2: Linear:
Reserve
REAL64 1 [±1000000.0] Parameter 3: Linear:
Reserve
REAL64 1 [±1000000.0] Parameter 4: Linear:
Reserve
}
0x00000023 Read Servo master/ REAL64 1 [±1000000.0] Reading the gear ratio
slave coupling (SERVO)
Type: LINEAR, Type: LINEAR
(&SPECIAL)
0x00000024 Read Servo UINT32 1 ≥0 Number / index of the
active axis control
circuit (triple of
encoder, controller
and axis interface)
0x00000025 Read Servo UINT16 1 0/1 External setpoint
specification via axis
interface PCLtoNC
active?
0x00000026 Read Servo master/ REAL64 [64] 1 ±∞ Reading of the Modified from
slave coupling characteristic values of TwinCAT 3
the slave
Type:
synchronization profile
SYNCHRONIZI
NG Type:
SYNCHRONIZING
0x00000027 ReadWrite Servo master/ Write Reading the "table Only port 500!
slave coupling coupling information"
Modified from
Type: VOID e.g. mm ±∞ - No data for the TwinCAT 3
TABULAR, MF or "current information"
- optional for a certain
REAL64
"master axis position"
or
- for a certain table ID
DWORD, and optional “master
DWORD, axis position” (TC 3.1
REAL64 B4017)
Read
REAL64 [32] ±∞ Reading the structure
for the table coupling
information [} 167]
0x00000028 ReadWrite Servo master/ Write Reading the "multi- Only port 500!
slave coupling table coupling
information"
Type:
(CamAddition)
MULTICAM
(CamAddition) UINT32 1 ≥0 Table ID to which the
query relates
Read
96 bytes Reading the structure
for the multi-table
coupling information
[} 167]
0x00000029 Read Servo UINT32 1 Delayed error code
(error pre-warning) in
case of a delayed
error reaction (see bit
ErrorPropagationDelay
ed)
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x0000002A Read Servo REAL64 e.g. mm ±∞ Position difference
while fading from set
position to actual
position (fading part)
0x0000002B Read Servo REAL64 e.g. mm/ ±∞ Relative velocity while
s fading from set
position to actual
position (fading part)
0x0000002C Read Servo REAL64 e.g. mm/ ±∞ Relative acceleration
s ^2 while fading from set
position to actual
position (fading part)
0x0000002D Read Servo UINT32 1 ≥0 Counter for NEW
initialization command
(InitializeCommandCo
unter)
0x0000002E Read Servo UINT32 1 ≥0 Counter for reset NEW
command
(ResetCommandCoun
ter)
0x00000030 Read Servo REAL64 e.g. Nm/ ±∞ Set torque change NEW from
s or N/s (rot. motor) or TwinCAT 3.1
set force change B4024
(linear motor)
(time derivative of the
set torque or set force)
0x00000031 Read/Write Servo REAL64 e.g. Nm Additive set torque From
or N (rot. motor) or TwinCAT 3.1
respectiv additive set force B4024.2
ely, (linear motor) for pre-
Symbolic
control.
e.g. access:
100% = ("TorqueOffset") "TorqueOffset''
1000
0x00000040 Read Servo UINT32 1 ≥0 Counter for correction NEW from
of the NC setpoints in TwinCAT 3.1
case of data B4020
inconsistency
(activation with Idx-
Group 0x1000 and
Idx-Offset 0x0020)
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n00060 Read/Write every (online { Extended AXIS Cannot be
setpoint SETPOINT traced by
structure) STRUCTURE (NC/ oscilloscope!
CNC)
56 bytes
REAL64 e.g. mm Set position
from TC 3.1
REAL64 e.g. mm/ Set velocity B4022.29
s
REAL64 e.g. mm/ Set acceleration /
s^2 deceleration
REAL64 1 [-1.0, 0.0, 1.0] Set travel direction
REAL64 e.g. mm/ Set jerk
s^3
REAL64 Nm or N Set torque or set force
or %
REAL64 Nm/s or time derivative of the
N/s or set torque or set force
%/s (ramp)
}
0x00n00061 Read/Write every (online { AXIS DYNAMIC from TC 3.1
dynamics SETPOINT B4022.30
setpoint STRUCTURE (NC/
structure) CNC)
32 bytes REAL64 e.g. mm/ Set velocity
s
REAL64 e.g. mm/ Set acceleration /
s^2 deceleration
REAL64 1 [-1.0, 0.0, 1.0] Set travel direction
REAL64 e.g. mm/ Set jerk
s^3
}
0x00n00061 Read/Write every (online { AXIS DYNAMIC from TC 3.1
dynamics SETPOINT B4022.29
setpoint STRUCTURE (NC/
structure) CNC)
48 bytes REAL64 e.g. mm/ Set velocity
s
REAL64 e.g. mm/ Set acceleration /
s^2 deceleration
REAL64 1 [-1.0, 0.0, 1.0] Set travel direction
REAL64 e.g. mm/ Set jerk
s^3
REAL64 Nm or N Set torque or set force
or %
REAL64 Nm/s or time derivative of the
N/s or set torque or set force
%/s (ramp)
}
0x00n00062 Read/Write every (online { TORQUE SETPOINT from TC 3.1
TORQUE STRUCTURE (NC/ B4022.30
setpoint CNC)
structure) REAL64 Nm or N Set torque or set force
16 bytes or %
REAL64 Nm/s or time derivative of the
N/s or set torque or set force
%/s (ramp)
}
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00000063 ReadWrite only for Write Read active "Drive NEW from TC
SERCOS/SoE Operation Mode" 3.1 B4022 (NC
and CANopen/ UINT32 1 Reserve 4443)
CoE
UINT32 1 Reserve Always to SEC
Port 501!
Read
INT32 ENUM [0; 1, 2, 3, …] Currently active "Drive
[} 165] Operation Mode"
Special cases:
(generic modes)
(see ≥ 100: SoE
appendi <0: CoE
x)
UINT32 1 Reserve
0x00n10002 Read every (Encoder) REAL64 e.g. mm Actual position (charge Symbolic
with actual position access:
compensation value) "ActPos''
n = 0: standard
encoder of the axes >
0: nth encoder of the
axis (optional)
0x00n10003 Read every (Encoder) REAL64 e.g. Modulo actual position Symbolic
DEGRE access:
ES "ActPosModulo'
'
0x00n10004 Read every (Encoder) INT32 1 Modulo actual rotation
0x00n10005 Read every (Encoder) REAL64 e.g. mm/ Optional: Actual Symbolic
s velocity access:
"ActVelo''
0x00n10006 Read every (Encoder) REAL64 e.g. mm/ Optional: Actual Symbolic
s^2 acceleration access:
"ActAcc''
0x00n10007 Read every (Encoder) INT32 INC Encoder actual
increments
0x00n10008 Read every (Encoder) INT64 INC Software - actual
increment counter
0x00n10009 Read every (Encoder) UINT16 1 0/1 Reference flag
("calibrate flag")
0x00n1000A Read every (Encoder) REAL64 e.g. mm Actual position
correction value
(measurement system
error correction)
0x00n1000B Read every (Encoder) REAL64 e.g. mm Actual position without Cannot be
actual position traced by
compensation value oscilloscope!
0x00n10010 Read every (Encoder) REAL64 e.g. mm/ Actual velocity without
s actual position
compensation value
0x00n10012 Read every (Encoder) REAL64 e.g. mm Unfiltered actual
position (charge with
actual position
compensation value)
0x00n10014 Read Encoder: SoE, REAL64 e.g. mm/ Optional: actual drive NEW from
CoE, MDP 742 s velocity (transferred TwinCAT 3.1
directly from SoE, CoE B4020.30
or MDP 742 drive)
0x00n10015 Read every (Encoder) REAL64 e.g. mm/ Optional: Unfiltered
s actual velocity
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n10018 Read PTP axis UINT32 0/1 0/1 Returns the status of Port501
Encoder axis reinitialization after NC
encoder reinitialization
has been started
(Index Group
0x4200+ID; Index
Offset 0x00n0003B).
n = 0: Standard
encoder of the axis
n > 0: n-th encoder of
the axis (optional)
0x00n10101 Read INC (Encoder) REAL64 e.g. mm Read back of the Cannot be
position difference traced by
between activation of oscilloscope!
the internal hardware
latch and the time
when it becomes valid
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n20101 Read R: P/PID (Pos.) REAL64 e.g. mm/ P part of the controller
s in absolute units
0x00n20102 Read R: PID (Pos.) REAL64 e.g. mm/ I part of the controller
s in absolute units
0x00n20103 Read R: PID (Pos.) REAL64 e.g. mm/ D part of the controller
s in absolute units
0x00n20104 Read R: PID (Pos.) UINT16 1 0/1 Limitation of the I part
active?
0x00n20105 Read R: PID (Pos.) UINT16 1 0/1 Limitation of the D part
active?
0x00n20106 Read R: PID (Pos.) UINT16 1 0/1 ARW measures of the Not
I-part active? ARW: implemented!
Anti Reset Windup
0x00n20110 Read R: PID (Pos.) REAL64 e.g. mm/ Acceleration pre- Acceleration
s control Yacc of the pre-control
controller 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
0x00n20A00 Read R: PID (MW) REAL64 % [-1.0...1.0] Offsetting of the set Reserved
velocity (pre-control) parameters!
0x00n20A01 Read R: PID (MW) REAL64 e.g. mm/ P part of the controller Reserved
s in absolute units or parameters!
percent (according to
output weight)
0x00n20A02 Read R: PID (MW) REAL64 e.g. mm/ I part of the controller Reserved
s in absolute units or parameters!
percent (according to
output weight)
0x00n20A03 Read R: PID (MW) REAL64 e.g. mm/ D part of the controller Reserved
s in absolute units or parameters!
percent (according to
output weight)
0x00n20A04 Read R: PID (MW) UINT16 1 0/1 Limitation of the I part Reserved
active? parameters!
Index offset Access Axis type Data type Phys. Definition Description Note
(Hex) unit range
0x00n20A05 Read R: PID (MW) UINT16 1 0/1 Limitation of the D part Reserved
active? parameters!
0x00n20A06 Read R: PID (MW) UINT16 1 0/1 ARW measures for the Reserved
I part active? parameters!
ARW: Anti Reset
Windup
0x00n20A10 Read R: PID (MW) REAL64 e.g. mm/ Acceleration pre- Reserved
s control Yacc of the parameters!
controller in absolute
units
3.1.1.5.4.4.3 "Index offset" specification for axis functions (Index group 0x4200
+ ID)
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) 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
deceleration)
REAL64 e.g. mm/ > 0.0 Jerk (must greater
s^3 than or equal to the
original jerk)
}
0x00000005 Write PTP axis { Parameterizable stop Only for PTP
(with controlled ramp) axes!
REAL64 e.g. mm/ > 0.0 Deceleration Reserved
s^2 function,
REAL64 e.g. mm/ > 0.0 Jerk no standard!
s^3
}
0x00000009 Write PTP axis { Oriented stop Only for PTP
(oriented end position) axes!
REAL64 e.g. ≥ 0.0 Modulo end position
degrees (modulo target
position)
REAL64 e.g. mm/ > 0.0 Deceleration (currently
s^2 not active)
REAL64 e.g. mm/ > 0.0 Jerk (not yet
s^3 implemented)
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000015 Write every { New dynamic
parameters for active
positioning
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 bytes) Universal Axis Start Always to SEC
(UAS): Port 501!
Merge of single
Modified from
commands, such as
TwinCAT 3
axis start, and online
changes in
combination with
"Buffer Mode" (see
TcMc2.lib)
{
UINT32 ENUM s. appendix Start type [} 156] (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/s ≥ 0.0 Required velocity
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 [} 156]
(command buffer)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm ±∞ Optional: Blending
position (command
blending position)
REAL64 e.g. mm/s ≥ 0.0 Optional: Initial
segment velocity Vi
(0 ≤ Vi ≤ Vrequ)
REAL64 e.g. mm/s ≥ 0.0 Optional: Segment
end 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. unit Definition Description Note
(Hex) range
0x00000017 ReadWrite SERVO Write(80 bytes) "Master/slave Not yet
decoupling" and released!
"Universal axis start
(UAS)":
Merge of decoupling
command of a slave
axis (IdxOffset:
0x00000041) and the
subsequent universal
axis start (UAS)
(IdxOffset:
0x00000016)
{
UINT32 ENUM s. appendix Start type [} 156] (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/s ≥ 0.0 Required velocity
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 [} 156]
(command buffer)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm ±∞ Optional: Blending
position (command
blending position)
REAL64 e.g. mm/s ≥ 0.0 Optional: Initial
segment velocity Vi
(0 ≤ Vi ≤ Vrequ)
REAL64 e.g. mm/s ≥ 0.0 Optional: Segment
end 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 Caution when
position using!
UINT32 ENUM s. appendix Actual position type For FIFO axes
[} 157] (see appendix) too!
UINT32 Reserve (TwinCAT 3) Always to SEC
REAL64 e.g. mm ±∞ Actual position for Port 501!
axes n = 0: standard Modified from
encoder of the axis TwinCAT 3
n > 0: n-th encoder for
the axis (optional)
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00n0001B Write every UINT32 1 0/1 Set reference flag Caution when
("calibrate flag") using!
n = 0: Standard For FIFO axes
encoder for the axis too!
n > 0: n-th encoder for
the axis (optional)
0x00n0001C Write SERVO { Set only actual axis Caution when
position without using!
manipulating the set
position (also for slave
and with active
process)
UINT32 ENUM s. appendix Actual position type
[} 157] (see appendix)
REAL64 e.g. mm ±∞ Actual position for
axes n = 0: standard
encoder of the axes >
0: nth encoder of the
axis (optional)
Caution when using!
}
0x00n0001D Write every { Actual value setting of Caution when
the axis on the drive using!
side
Only for
(position interface and
CANopen!
encoder offset of zero
assumed!)
n = 0: Standard
encoder for the axis
n > 0: n-th encoder for
the axis (optional)
UINT32 ENUM s. appendix Actual position type
[} 157] (see appendix)
REAL64 e.g. mm ±∞ Actual position for axis
}
0x00n0001E Write every { Set a new encoder Caution when
scaling factor on the using!
fly (in motion of the
Always to SEC
axis)
Port 501!
UINT16 ENUM 1 Encoder scaling factor
type Modified from
TwinCAT 3
1: Absolute
2: Relative
UINT16 ControlWord
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ [1.0E-8 ... New encoder scaling
INC 100.0] factor
n = 0: Standard
encoder for the axis
n > 0: n-th encoder for
the axis (optional)
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00n0001F Write every { Set actual axis Caution when
position on the fly (in using!
motion of the axis)
Always to SEC
UINT32 ENUM Position type for Port 501!
setting actual value on
the fly
1: Absolute
2: Relative
UINT32 1 Control double word,
e.g. for "clearing the
lag error"
REAL64 Reserve
REAL64 e.g. mm ±∞ New actual axis
position
UINT32 Reserve
UINT32 Reserve
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000022 Write SERVO(MW) { Special axis start Reserved start
(SERVO): function, no
UINT32 ENUM s. appendix standard!
Start type [} 156] (s.
appendix) Modified from
UINT32 Reserve (TwinCAT 3) TwinCAT 3
REAL64 e.g. mm ±∞ End position (target
position)
REAL64 mm/s ≥ 0.0 Required start velocity
REAL64 e.g. mm ±∞ Position for a new
velocity level
REAL64 e.g. mm/s ≥ 0.0 New end velocity level
UINT32 0/1 0/1 Standard
acceleration?
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ ≥ 0.0 Acceleration
s^2
UINT32 0/1 0/1 Standard
deceleration?
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ ≥ 0.0 Deceleration
s^2
UINT32 0/1 0/1 Standard jerk?
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ ≥ 0.0 Jerk
s^3
}
0x00000023 Write SERVO { Start external setpoint Modified from
specification (setting TwinCAT 3
by cyclic axis interface
PLCtoNC)
UINT32 ENUM 1: Absolute Start type [} 156]
2: Relative
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm ±∞ New end position
(target position)
optional!
REAL64 Reserve (TwinCAT 3)
}
0x00000024 Write SERVO VOID Stop/disable external
setpoint specification
(cycl. axis interface
PLCtoNC)
0x00000025 Write SERVO { Start reversing Modified from
operation for TwinCAT 3
positioning (SERVO):
UINT32 ENUM 1 Start type [} 156]
(default: 1)
UINT32 Reserve (TwinCAT 3)
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 TwinCAT 3
Output type [} 164] (s.
appendix)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. % ±∞ Required output value
(e.g. %)
}
0x00000027 Write every VOID Stop drive output
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000028 Write every { Change the drive
output:
UINT32 ENUM s. appendix Output type [} 164] (s.
appendix)
REAL64 e.g. % ±∞ Required output value
(e.g. %)
}
0x00000029 Write every VOID Instantaneously adopt Reserved
current override value function, no
and freeze until next standard!
override change!
0x0000002A Write every { Calculate and set Reserved
32 bytes encoder offset function, no
} standard!
0x0000002B ReadWrite every WriteData: s. Stop external setpoint Reserved
'UAS' generator and function, no
ReadData: s. continuous endless standard!
'UAS' motion ('UAS':
Universal axis start)
0x0000002C Write every UINT32 ≥0 Set "homing state" (for New from
internal use) TwinCAT 3
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x0000002D ReadWrite Servo Write Switches an NC- Danger during
controlled axis to use!
"Cyclic Synchronous (* see end of
Torque Mode" (CST) table)
and sets a torque
setpoint for it.
{
UINT32 Torque-axis start type:
0x3001: Absolute
0x3002: Relative
UINT32 1 (bit array) Internal control mask
(bit array):
00000000_00000001
(bit 0): Use manual
torque for initialization.
10000000_000000000
(bit 31): Update/
refresh parameter for
current command in
'ContinuousUpdate'
mode (fTorqueRamp,
fVelocityLimitHigh,
fVelocityLimitLow), do
not increase cmd no.
UINT32 0/1 0/1 Mode:
0: Default (discrete)
1: ContinuousUpdate
UINT32 ENUM see appendix Buffer mode [} 156]
only ABORTING
possible
REAL64 Nm or % [0.0 … 1.0E10] Torque target value
(signed value)
REAL64 Nm/s or %/ [0.0 … 1.0E10] Torque change
s velocity
REAL64 e.g. mm/s [0.0 ... 1.0E10] Velocity limit high
'VelocityLimitHi
gh' must be
greater than or
equal to
'VelocityLimitLo
w' (both values
can be
negative).
REAL64 e.g. mm/s [0.0 … 1.0E10] Velocity limit low
REAL64 e.g. mm/ [0.0 … 1.0E10] Acceleration
s^2
REAL64 e.g. mm/ [0.0 … 1.0E10] Deceleration
s^2
REAL64 Nm or % [0.0 … 1.0E10] Optional: Manual
torque start value
(sync value)
}
Read
{
UINT16 1 >=0 Command number
(job number)
UINT16 1 >=0 Command status
}
0x0000002E Reserved
0x0000002F Reserved
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000030 Write SERVO { Start section Only affects
compensation older TwinCAT
(SERVO) 2 systems
UINT32 ENUM s. appendix Compensation type
[} 157] (see appendix)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ ≥ 0.0 Max. acceleration
s^2 increase
REAL64 e.g. mm/ ≥ 0.0 Max. deceleration
s^2 increase
REAL64 e.g. mm/s > 0.0 Max. increase velocity
REAL64 e.g. mm/s > 0.0 Base velocity for the
process
REAL64 e.g. mm ±∞ Path difference to be
compensated
REAL64 e.g. mm > 0.0 Path distance for
compensation
}
0x00000030 ReadWrite SERVO returns { Start section Changed from
the actually READ+WRITE: compensation
TwinCAT 2
implemented (SERVO)
211R3
parameters as Note: only contained in
return values 'TcMc2.lib' or
'Tc2_MC2.library' TwinCAT 3
UINT32 ENUM s. appendix Compensation type
[} 157] (see appendix)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ ≥ 0.0 => Max. acceleration
s^2 increase
<= Returns the
implemented
acceleration increase
(new in 'TcMc2.lib' or
'Tc2_MC2.library')
REAL64 e.g. mm/ ≥ 0.0 => Max. deceleration
s^2 increase
<= Returns the
implemented
deceleration increase
(new in 'TcMc2.lib' or
'Tc2_MC2.library')
REAL64 e.g. mm/s > 0.0 => Requested max.
increase velocity
<= Returns the
implemented increase
velocity
REAL64 e.g. mm/s > 0.0 Base velocity for the
process
REAL64 e.g. mm ±∞ => Requested path
difference to be
compensated
<= Returns the
implemented path
difference
REAL64 e.g. mm > 0.0 => Requested max.
distance for
compensation
<= Returns
implemented distance
UINT32 1 ≥0 <= Returns Warning
ID (e.g. 0x4243)
UINT32 Reserve (TwinCAT 3)
}
0x00000031 Write SERVO VOID Stop section
compensation
(SERVO)
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000032 Write SERVO { Start reversing Modified from
operation with velocity TwinCAT 3
jumps (SERVO):
(can be used to
determine the velocity
step response)
UINT32 ENUM 1 Start type [} 156]
(default: 1)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/s ±∞ Required velocity 1
(negative values also
permitted)
REAL64 e.g. mm/s ±∞ Required velocity 2
(negative values also
permitted)
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 (TwinCAT 3)
}
0x00000033 Write SERVO { Sine oscillation Modified from
sequence TwinCAT 3
- used as single sinus
oscillation (sinus
generator)
- used as sinus
oscillation sequence
(e.g. for bode plot)
UINT32 ENUM 1 Start type [} 156]
(fixed to start type 1
yet)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/s > 0.0 Base amplitude (e.g.
2.5 mm/s)
REAL64 Hz [0.0 .... 10.0] Base frequency (e.g.
1.953125 Hz)
REAL64 e.g. mm/s ≥ 0.0 Start amplitude at
begin (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
measurements (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. unit Definition Description Note
(Hex) range
0x00000034 Write SERVO { Phasing
- Start Phasing
- Stop Phasing
UINT32 ENUM 1 PhasingType:
1: ABSOLUTE
2: RELATIVE
4096: STOP
UINT32 1 ≥0 Control Mask
Bit 0: Continuous
Update
UINT32 1 ≥0 Master axis ID
(for multi master)
UINT32 Reserve
REAL64 e.g. mm ±∞ Phase shift
REAL64 e.g. mm/s > 0.0 Velocity
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
REAL64[4] Reserve
UINT32 Reserve
UINT32 1 ENUM Buffer mode
(NOT
IMPLEMENTED)
REAL64 e.g. mm ±∞ Blending position
(NOT
IMPLEMENTED)
}
0x00n0003B Write PTP axis VOID Triggers NC encoder Danger during
Encoder axis reinitilization to valid use!
IO values There must be
no controller
n = 0: Standard
enable (position
encoder of the axis
jump)
n > 0: n-th encoder of
The axis status
the axis (optional)
index offset
0x00n10018
can be used to
read out
whether NC
encoder
reinitilization
has been
completed.
Port 501
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000040 Write Master/Slave { Master/Slave coupling Extension for
(0x00n00040) coupling (SERVO): "flying saw"!
(SERVO) UINT32 ENUM s. appendix Slave type [} 158]/ Angle >0.0 and
coupling type (see £ 90.0 degrees
appendix) (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:
Gear ratio
FlySawVelo: Reserve
FlySaw: Abs. synchron
position master [mm]
REAL64 1 [±1000000.0] Parameter 2:Linear:
Reserve
FlySawVelo: Reserve
FlySawPos: Abs.
synchron position
slave [mm]
REAL64 1 [±1000000.0] Parameter 3: Linear:
Reserve
FlySawVelo: Angle of
inclination in
[DEGREES]
FlySawPos: Angle of
inclination in
[DEGREES]
REAL64 1 [±1000000.0] Parameter 4:Linear:
Reserve
FlySawVelo: Gear
ratio
FlySawPos: Gear ratio
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000040 Write Master/Slave { Master/Slave coupling Multi master
(0x00n00040) coupling (SERVO): coupling
(SERVO) UINT32 ENUM s. appendix (MC_GearInMul
Slave type [} 158]/
tiMaster)
coupling type (see
appendix) 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 TwinCAT 3
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
master 5)
UINT32 1 [0...255] Reserve (axis ID
master 6)
UINT32 1 [0...255] Reserve (axis ID
master 7)
UINT32 1 [0...255] Reserve (axis ID
master 8)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm/ Maximum
s^2 acceleration/
deceleration of the
slave axis
UINT32 1 ≥0 Control mask, not
previously used
(check and operation
mode for profile)
UINT32 Reserve (TwinCAT 3)
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/s ≥ 0.0 Maximum velocity of
the slave axis
REAL64 Reserve
REAL64 Reserve
} 64 or 104
bytes
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000041 Write Master/Slave { Master/slave Not yet
decoupling with decoupling with released!
configurable configurable follow-up
Modified from
follow-up function (e.g. new end
TC3
function position, new velocity,
(SERVO) stop, E-stop) (SERVO)
UINT32 ENUM s. appendix Decoupling type
[} 158] (see appendix)
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm ±∞ Optional: New end
position
REAL64 e.g. mm/s > 0.0 Optional: New
requested 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
velocity and
emergency stop (E-
stop)
}
0x00000042 Write Master/Slave { Change of the
coupling coupling parameters
(SERVO):
Type: LINEAR
(&SPECIAL) REAL64 1 [±1000000.0] Parameter 1: Linear:
Gear ratio
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
(SERVO):
Type:
TABULAR
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"
(SERVO):
Type:
TABULAR REAL64 mm ±∞ Slave position offset
and REAL64 mm ±∞ Master position offset
"Motion
REAL64 1 ±∞ (<> 0.0) Slave position scaling
Function"
REAL64 1 ±∞ (<> 0.0) Master position scaling
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000043 Write Master/slave { Change of the table
table coupling coupling parameters
(SERVO):
Type:
TABULAR REAL64 mm ±∞ Slave position offset
REAL64 mm ±∞ Master position offset
REAL64 1 ±∞ (<> 0.0) Slave position scaling
REAL64 1 ±∞ (<> 0.0) Master position scaling
REAL64 e.g. mm ±∞ Absolute master
activation position
}
0x00000044 Write Slave-Stop VOID Stop the "flying saw" Only for "flying
(SERVO) (SERVO) saw"
0x00000045 Write Master/slave { Master/slave table
(0x00n00045) table coupling coupling (SERVO):
(SERVO) UINT32 ENUM s. appendix Slave type/coupling
type [} 158] (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)
SOLO TABLE
SECTION
REAL64 mm ±∞ Slave position offset
(type: TABULAR)
REAL64 mm ±∞ Master position offset
(type: TABULAR)
UINT32 1 [0,1] Slave positions
absolute (type:
TABULAR)
UINT32 1 [0,1] Master positions
absolute (type:
TABULAR)
UINT32 1 [1...255] Table ID of the
coupling table (type:
TABULAR)
MULTI TABLE
SECTION
UINT16 1 [0...8] Number of tables
(type: MULTITAB)
Note: Misused as
interpolation type for
solo tables
UNIT16 1 [0...8] Number of profile
tables (type:
MULTITAB)
UNIT32[8] 1 [1...255] Tables IDs of the
coupling tables (type:
MULTITAB)
}
0x00000046 Write Master/slave UINT32 1 [1...255] Correction table
multi-tables activation, correction
table ID
0x00000046 Write Master/slave { Activation of correction Modified from
multi-tables table TwinCAT 3
UINT32 1 [1...255] Correction table ID
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm ±∞ Absolute master
activation position
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) 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] Reading the last
multi-tables correction 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
table coupling table scaling factor for
the slave table column
Type:
(Default value: 1.0)
TABULAR
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x0000004A(0x Write Master/Slave { Master/Slave Solo Modified from
00n0004A) Universal Table Table Coupling TwinCAT 3
Coupling (SERVO):
(SERVO) UINT32 ENUM s. appendix Slave type/coupling
type [} 158] (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)
UINT32 1 1...255] Table ID of the
coupling table (type:
TABULAR)
UINT32 1 Table 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 scaling
(type: TABULAR)
UINT32 1 [0,1] Slave position
absolute ?
(Type: TABULAR)
UINT32 1 [0,1] Master positions
absolute ?
(Type: TABULAR)
UINT32 ENUM s. appendix Activation type of the
change:
0: 'instantaneous'
(default)
1: 'at master cam
position'
2: 'at master axis
position'
3: 'next cycle'
UINT32 Reserve (TwinCAT 3)
REAL64 mm ±∞ Activation position
UINT32 ENUM s. appendix Master scaling type:
0: user defined
(default)
1: scaling with auto
offset
2: off
UINT32 ENUM s. appendix Slave scaling type:
0: user defined
(default)
1: scaling with auto
offset
2: off
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x0000004A(0x Write Master/Slave { Master/Slave Solo Modified from
00n0004A) Universal Table Table Coupling TwinCAT 3
Coupling (SERVO):
(SERVO) UINT32 ENUM s. appendix Slave type/coupling
type [} 158] (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)
UINT32 1 1...255] Table ID of the
coupling table (type:
TABULAR)
UINT32 1 Table 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 scaling
(type: TABULAR)
UINT32 1 [0,1] Slave position
absolute ? (Type:
TABULAR)
UINT32 1 [0,1] Master positions
absolute ? (Type:
TABULAR)
UINT32 ENUM s. appendix Activation type of the
change:
0: 'instantaneous'
(default)
1: 'at master cam
position'
2: 'at master axis
position'
3: 'next cycle'
UINT32 Reserve (TwinCAT 3)
REAL64 mm ±∞ Activation position
UINT32 ENUM s. appendix Master scaling type:
0: user defined
(default)
1: scaling with auto
offset
2: off
UINT32 ENUM s. appendix Slave scaling type:
0: user defined
(default)
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 (TwinCAT 3)
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x0000004B(0x Write Master/slave { Master/slave Modified from
00n0004B) universal flying synchronization TwinCAT 3
saw (SERVO) coupling (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) Gear ratio
REAL64 mm ±∞ Master synchron
position
REAL64 mm ±∞ Slave synchron
position
REAL64 mm/s ≥ 0.0 Slave velocity
(optional)
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 (TwinCAT 3)
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x0000004D(0x Write Master/slave { Change in table Modified from
00n0004D) table coupling scaling (SERVO): TwinCAT 3
Type: UINT32 ENUM s. appendix Activation type of the
TABULAR change
and MF 0: 'instantaneous'
(default)
1: 'at master cam
position'
2: 'at master axis
position'
3: 'next cycle'
UINT32 Reserve (TwinCAT 3)
REAL64 e.g. mm ±∞ Activation position
UINT32 ENUM s. appendix Master scaling type
0: user defined
(default)
1: scaling with auto
offset
2: off
UINT32 ENUM s. appendix Slave scaling type
0: user defined
(default)
1: scaling with auto
offset
2: off
REAL64 e.g. mm ±∞ Master position offset
REAL64 e.g. mm ±∞ Slave position offset
REAL64 1 ±∞ (<> 0.0) Master position scaling
REAL64 1 ±∞ Slave position scaling
Optional extension for MultiCam:
UINT32 1 ≥0 Cam Table ID
UINT32 Reserve (TwinCAT 3)
}
Index offset Access Axis type Data type Phys. unit Definition Description Note
(Hex) range
0x00000060 Write every VOID Deactivate drive
output (disable)
0x00000061 Write every VOID Activate drive output
(enable)
0x00000062 Write high/low UINT16 1 0/1 Release parking
brake?
0: automatic activation
(default)
1: mandatorily always
released
Note:
Reset to '0' when
resetting the axis!
0x00000063 Write only for { Activate "Drive NEW from TC
SERCOS/SoE Operation Mode" (e.g. 3.1 B4022 (NC
and CANopen/ Position Velo, Torque, 4443)
CoE etc.)
Always to SEC
INT32 ENUM [0; 1, 2, 3, …] New "Drive Operation Port 501!
[} 165] Mode" (generic
Special cases:
(see modes)
appendix) ≥ 100: SoE
< 0: CoE
UINT32 1 0 Reserve
UINT32 1 0 Reserve
UINT32 1 0 Reserve
}
DANGER
Danger to life or risk of serious injury or damage to property due to unintentional
movements of the axis
When using the function block, the axis is switched to CST mode. After using the function block (especially
after error situations), the axis may still be in CST mode. This can lead to sudden and unplanned
movements (especially with lifting axes) when the axis is released.
• Ensure that there is no hazard as defined by the risk assessment.
• Check the current operation mode via the function block MC_ReadDriveOperationMode.
• If the axis is not in a position-related operation mode (CSV/CSP), transfer it before an enable:
– directly with MC_WriteDriveOperationMode into the desired position-related operation mode (CSV/
CSP) or
– indirectly with MC_Halt / MC_Stop into the desired position-related operation mode (CSV/CSP) (from
TwinCAT 3.1.4024.40)
Other function blocks that switch the axis indirectly into a position-related operation mode can only do
this to a limited extent and are therefore not to be used for a deliberate operation mode change.
ð Subsequently, it is necessary to check again whether the axis is really in a position-related operation
mode (CSV/CSP), if not, an abort with error handling is required.
3.1.1.5.4.4.4 "Index offset" specification for cyclic axis process data (Index
group 0x4300 + ID)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n00000 Read/Write every { 128 bytes} STRUCT see AXIS STRUCTURE Write command
(PLC→NC) axis interface (PLC→NC) only optional!
n = 0: standard axis Consider safety
interface aspects!
n > 0: n-th axis PLCTONC_AXI
interface (optional) S_REF
0x00n00001 Read/Write every UINT32 1 >0 Control double word Write command
(PLC→NC) only optional!
Symbolic
access
possible!
"ControlDWord"
0x00n00002 Read/Write every UINT16 1 0/1 Controller enable Cannot be
(PLC→NC) traced by
oscilloscope!
0x00n00003 Read/Write every UINT16 1 0/1 Feed enable plus Cannot be
(PLC→NC) traced by
oscilloscope!
0x00n00004 Read/Write every UINT16 1 0/1 Feed enable minus Cannot be
(PLC→NC) traced by
oscilloscope!
0x00n00007 Read/Write every UINT16 1 0/1 Referencing cam Cannot be
(PLC→NC) traced by
oscilloscope!
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) TC3.NCTOPLC
_AXIS_REF
Note: size and
alignment changed
n = 0: standard axis
interface
n > 0: n-th axis
interface (optional)
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n00071 Read every UINT8 1 >0 State double word:
(PLC→NC) byte 1
0x00n00072 Read every UINT8 1 >0 State double word:
(PLC→NC) byte 2
0x00n00073 Read every UINT8 1 >0 State double word:
(PLC→NC) byte 3
0x00n00074 Read every UINT8 1 >0 State double word:
(PLC→NC) byte 4
0x00n00081 Read every UINT32 1 >0 State double word Symbolic
(PLC→NC) (complete) access
possible!
"StateDWord"
0x00n00082 Read every UINT16 1 0/1 Axis is ready for Cannot be
(PLC→NC) operation traced by
oscilloscope!
0x00n00083 Read every UINT16 1 0/1 Axis has been Cannot be
(PLC→NC) referenced traced by
oscilloscope!
0x00n00084 Read every UINT16 1 0/1 Axis in protected Cannot be
(PLC→NC) operation mode (e.g. traced by
slave axis) oscilloscope!
0x00n00085 Read every UINT16 1 0/1 Axis is in rapid mode Cannot be
(PLC→NC) traced by
oscilloscope!
0x00n00088 Read every UINT16 1 0/1 Axis has invalid I/O Cannot be
(PLC→NC) data traced by
oscilloscope!
0x00n00089 Read every UINT16 1 0/1 Axis is in an error state Cannot be
(PLC→NC) traced by
oscilloscope!
0x00n0008A Read every UINT16 1 0/1 Axis moving to larger Cannot be
(PLC→NC) values traced by
oscilloscope!
0x00n0008B Read every UINT16 1 0/1 Axis moving to smaller Cannot be
(PLC→NC) values traced by
oscilloscope!
0x00n0008C Read every UINT16 1 0/1 Axis is at a logical Cannot be
(PLC→NC) standstill traced by
(only setpoints are oscilloscope!
considered)
(position controller?)
0x00n0008D Read every UINT16 1 0/1 Axis is being Cannot be
(PLC→NC) referenced traced by
oscilloscope!
0x00n0008E Read every UINT16 1 0/1 Axis is in position Cannot be
(PLC→NC) window traced by
oscilloscope!
0x00n0008F Read every UINT16 1 0/1 Axis is at target Cannot be
(PLC→NC) position (target traced by
position reached) oscilloscope!
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
0x00n000B3 Read every UINT32 1 ENUM Operation mode of the
(PLC→NC) axis (rev. NC)
0x00n000B4 Read every UINT32 1 ENUM Axis referencing status Symbolic
(PLC→NC) access
possible!
"HomingState"
0x00n000B5 Read every UINT32 1 ENUM Axis coupling state Symbolic
(PLC→NC) access
possible!
"CoupleState"
0x00n000B6 Read every UINT32 1 ≥0 SVB entries/tasks of
(PLC→NC) the axis (PRE table)
0x00n000B7 Read every UINT32 1 ≥0 SAF entries/tasks of
(PLC→NC) the axis (EXE table)
0x00n000B8 Read every UINT32 1 ≥0 Axis ID
(PLC→NC)
0x00n000B9 Read every UINT32 1 ≥0 Operation modes state
(PLC→NC) double word:Bit 0:
Position range
monitoring active?
Bit 1: target position
window monitoring
active?
Bit 2: looping distance
active?
Bit 3: physical motion
monitoring active?
Bit 4: PEH time
monitoring active?
Bit 5: backlash
compensation active?
Bit 6: delayed error
reaction mode active?
Bit 7: modulo
operation mode active
(modulo axis)?
Bit 16: following error
monitoring position
active?
Bit 17: following error
monitoring vel. active?
Bit 18: end position
monitoring min.
active?
Bit 19: end position
monitoring max.
active?
Bit 20: actual position
correction active?
0x00n000BA Read every REAL64 e.g. mm Actual position
(PLC→NC) (calculated 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
(PLC→NC) s (optional)
0x00n000BE Read every REAL64 e.g. mm Following error
(PLC→NC) position
0x00n000BF Read every REAL64 e.g. mm Set position
(PLC→NC)
0x00n000C0 Read every REAL64 e.g. mm/ Set velocity
(PLC→NC) s
Index offset Access Axis type Data type Phys. Definition Description Note
( Hex ) unit range
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 STRUCTURE only optional!
interface (NC→IO, 40 Consider safety
bytes)NCENCODERS aspects!
TRUCT_OUT2
0x00n10080 Read Encoder: every { 40 bytes STRUCT see ENCODER-INPUT-
(IO→NC) } encoder IO STRUCTURE
interface (IO→NC, 40
bytes)NCENCODERS
TRUCT_IN2
0x00n30000 Read/Write Drive: every { 40 bytes STRUCT see DRIVE-OUTPUT- Write command
(NC→IO) } drive IO STRUCTURE only optional!
interface (NC→IO, 40 Consider safety
bytes)NCDRIVESTRU aspects!
CT_OUT2
0x00n30080 Read Drive: every { 40 bytes STRUCT see DRIVE-INPUT-
(IO→NC) } drive IO STRUCTURE
interface (NC→IO, 40
bytes)NCDRIVESTRU
CT_IN2
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000001 Read every UINT32 1 [1 ... 255] Encoder ID
0x00000002 Read every UINT8[30+1] 1 30 characters Encoder name
0x00000003 Read every UINT32 1 s. ENUM (>0) Encoder type [} 160]
0x00000004 Read/Write every UINT32 1 Byteoffset Input address offset change I/O
(IO-Input-Image) address
0x00000005 Read/Write every UINT32 1 Byteoffset Output address offset change I/O
(IO-Output-Image) address
0x00000006 Read/Write every REAL64 e.g. mm/ [1.0E-12 ... resulting scaling factor Writing is not
INC 1.0E+30] (numerator / allowed if the
denominator) controller
enable has
Note: from TC3 the
been issued.
scaling factor consists
of two components –
numerator and
denominator (default:
1.0).
0x00000007 Read/Write every REAL64 e.g. mm [±1.0E+9] Position offset Writing is not
allowed if the
controller
enable has
been issued.
0x00000008 Read/Write every UINT16 1 [0,1] encoder count Writing is not
direction allowed if the
controller
enable has
been issued.
0x00000009 Read/Write every REAL64 e.g. mm [0.001 ... modulo factor
1.0E+9]
0x0000000A Read/Write every UINT32 1 s. ENUM (>0) Encoder mode [} 161]
in the appendix
0x0000000B Read/Write every UINT16 1 0/1 soft end min.
monitoring?
0x0000000C Read/Write every UINT16 1 0/1 soft end max.
monitoring?
0x0000000D Read/Write every REAL64 mm Soft end position min.
0x0000000E Read/Write every REAL64 mm Soft end position max.
0x0000000F Read/Write every UINT32 1 s. ENUM (≥0) Encoder evaluation
in the appendix direction [} 161]
(enable for log.
counting direction)
0x00000010 Read/Write every REAL64 s [0.0...60.0] Filter time for actual
position value in
seconds (P-T1)
0x00000011 Read/Write every REAL64 s [0.0...60.0] Filter time for actual
velocity value in
seconds (P-T1)
0x00000012 Read/Write every REAL64 s [0.0...60.0] filter time for actual
acceleration value in
seconds (P-T1)
0x00000013 Read/Write every UINT8[10+1] 1 physical unit Not
implemented!
0x00000014 Read/Write every UINT32 1 interpretation of the Not
units (position, implemented!
velocity, time)
bit array
Bit 0: velocity in x/min
instead of x/s
Bit 1: position in
thousandths of the
base unit
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000015 Read/Write every UINT32 INC [0x0... Encoder mask Axis has to be
0xFFFFFFFF] (maximum value of the disabled for
encoder actual value write access.
in increments)
see also
Note: The encoder "Encoder Sub
mask may be any Mask"
numerical value (e.g. parameter
3600000). Unlike in
the past, it no longer
has to correspond to a
continuous series off
binary one's (2n-1).
0x00000016 Read/Write every UINT16 1 0/1 Actual position
correction
(measurement system
error correction)?
0x00000017 Read/Write every REAL64 s [0.0...60.0] Filter time for actual
position correction in
seconds (P-T1)
0x00000018 Read/Write every UINT32 1 [0x0... Filter mask for raw
0xFFFFFFFF] incremental value
(0x0: full pass)
0x00000019 Read/Write every UINT32 1 s. ENUM (≥0) Encoder absolute Writing is not
in the appendix dimensioning system allowed if the
controller
[} 161]
enable has
been issued.
0x0000001A Read/Write every UINT32 1 s. ENUM (≥0) Encoder position Not
initialization implemented!
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
interpretation [} 161]
(data type)
0x0000001D Read every UINT16 1 0/1 Incremental or
absolute encoder ?
0: incremental encoder
type
1: absolute encoder
type
0x00000020 Read/Write every UINT32 1 s. ENUM (≥0) Encoder dead time
compensation mode
0: off (Default)
1: on (with velocity)
2: on (with velocity and
acceleration)
0x00000021 Read/Write every UINT32 1 Control double word
(32 bits) for the
encoder dead time
compensation:
Bit 0 = 0: relative I/O
times (default)
Bit 0 = 1: absolute I/O
times
0x00000022 Read/Write every INT32 ns [±1.0E+9] Sum of the
parameterized time
shifts for the encoder
dead time
compensation
(typically positive
numerical values)
0x00000023 Read/Write every REAL64 e.g. mm/ [1.0E-12 ... Component of the NEW from TC3
INC 1.0E+30] scaling factor:
Writing is not
numerator
allowed if the
(=> scaling factor controller
numerator / scaling enable has
factor denominator) been issued.
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000024 Read/Write every REAL64 1 [1.0E-12 ... Component of the NEW from TC3
1.0E+30] scaling factor:
Writing is not
denominator
allowed if the
(=> scaling factor controller
numerator / scaling enable has
factor denominator) been issued.
Default: 1.0
0x00000025 Read/Write every { e.g. mm/ [1.0E-12 ... Component of the NEW from TC3
REAL64 INC 1.0E+30] scaling factor:
REAL64 1 [1.0E-12 ... numerator
} 16 bytes 1.0E+30]
Component of the
scaling factor:
denominator
(=> scaling factor
numerator / scaling
factor denominator)
0x00000030 Read/Write every UINT32 1 Internal encoder NEW from TC3
control double word for
specifying the
operation modes and
properties
Index offset Access Group type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000109 Read/Write INC UINT32 1 s. ENUM (≥0) Homing Sensor Source
[} 162]
Sets the source of the
digital input of the
referencing cam.
0x00000110 Read/Write INC (encoder REAL64 1 [0.0 ... scaling/weight of the
simulation) 1000000.0] noise part for the
simulation encoder
3.1.1.5.4.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 (charge Symbolic
with actual position access
compensation value) possible!
'ActPos'
0x00000003 Read every REAL64 Modulo actual position Symbolic
access
possible!
'ActPosModulo'
0x00000004 Read every INT32 Modulo actual rotation
0x00000005 Read every REAL64 Optional: Actual Base unit / s
velocity Symbolic
access
possible!
'ActVelo‘
0x00000006 Read every REAL64 Optional: Actual Base unit / s^2
acceleration Symbolic
access
possible!
'ActAcc‘
0x00000007 Read every INT32 Encoder actual
increments
0x00000008 Read every INT64 Software - actual
increment counter
0x00000009 Read/Write every UINT16 Reference flag
("calibrate flag")
0x0000000A Read every REAL64 Actual position
correction value
(measuring system
error correction)
0x0000000B Read every REAL64 Actual position without
actual position
compensation value
0x0000000C Read every REAL64 e.g. mm Actual position
compensation value
due to the dead time
compensation
0x0000000D Read every REAL64 s Sum of time shift 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
compensation value
0x00000012 Read every REAL64 e.g. mm Unfiltered actual
position (charge with
actual position
compensation value)
0x00000013 Read every REAL64 e.g. mm Filtered actual position
(offset with actual
position correction
value, without dead
time compensation)
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
* N) position buffer
{
UINT32 ns ≥0 DcTimeStamp with 32
bits
UINT32 Reserve
REAL64 e.g. mm ±∞ Actual position for the
associated timestamp
} [N]
0x00000017 Read REAL64 e.g. mm Reading out the
MC_SetPosition offset
0x00000101 Read INC REAL64 e.g. mm Read back the position Cannot be
difference between the traced by
hardware latch being oscilloscope!
activated and
becoming valid
0x00000200 Read Write Function WRITE(24 Read "Touch Probe" Only for SAF-
group bytes) state (state of external port 501
"TouchProbeV latch)
2": - SERCOS/ {
SoE
UINT32 1 [1,2,3,4] Probe unit (probe 1, 2,
- EtherCAT/ 3, 4)
CoE
UINT32[5] Reserved
(CANopen
DS402) }
- SoftDrive READ(64
(TCom), bytes)
- MDP 511
{
(EL5101,
EL5151, UINT32 1 [0/1] Touch probe rising
EL5021, edge active?
EL7041, UINT32 1 [0/1] Touch probe rising
EL7342) edge became valid?
REAL64 e.g. mm Touch probe rising
edge position value
UINT32 1 ≥0 Touch probe rising
edge counter
(continuous 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
(continuous mode)
UINT32[5] Reserved
}
0x00000201 Read KL5101, UINT16 1 [0,1] "External latch Cannot be
SERCOS, function" active? traced by
AX2xxx, or oscilloscope!
ProviDrive
"Touch probe function"
active ? (edge-
independent)
0x00000201 Read CANopen UINT32[4] 1 [0,1] "External latch Cannot be
functions 1 to 4" traced by
active? oscilloscope!
or
"Touch probe
functions 1 to 4"
active?
Index offset Access Group type Data type Phys. Definition Description Note
(Hex) unit range
0x00000202 Read KL5101, UINT16 1 [0,1] External latch value see also Axis
SERCOS, became valid? interface
AX2xxx, NcToPlc (state
or
ProviDrive double word)
touch probe latched?
(edge-independent)
0x00000202 Read CANopen UINT32[4] 1 [0,1] External latch values 1 see also Axis
to 4 became valid? interface
NcToPlc (state
or
double word)
touch probes 1 to 4
latched?
0x00000203 Read KL5101, UINT32 INC External / touch probe
SERCOS, hardware incremental
AX2xxx, latch value
ProviDrive
0x00000204 Read KL5101, UINT64 INC External / touch probe
SERCOS, Software incremental
AX2xxx, latch value
ProviDrive
0x00000205 Read KL5101, REAL64 e.g. mm External / touch probe Base Unit
SERCOS, position latch value
AX2xxx,
ProviDrive
0x00000205 Read CANopen REAL64[4] e.g. mm External touch probe Base Unit
values / position latch
values
0x00000206 Read KL5101, UINT32 INC Difference hardware Cannot be
SERCOS, incremental latch traced by
AX2xxx, values (NewLatch - oscilloscope!
ProviDrive LastLatch)
0x00000207 Read KL5101, UINT64 INC Difference software Cannot be
SERCOS, incremental latch traced by
AX2xxx, values (NewLatch - oscilloscope!
ProviDrive LastLatch)
0x00000208 Read KL5101, REAL64 e.g. mm Difference position Cannot be
SERCOS, latch values traced by
AX2xxx, (NewLatch - oscilloscope!
ProviDrive LastLatch) Base Unit
Index offset Access Group type Data type Phys. Definition Description Note
(Hex) unit range
0x00000212 Read CANopen UINT16 1 [0,1] Status of "Touch Cannot be
Probe 1" input signal traced by
oscilloscope!
From TC3.1
B4024.11
0x00000213 Read CANopen UINT16 1 [0,1] Status of "Touch Cannot be
Probe 2" input signal traced by
oscilloscope!
From TC3.1
B4024.11
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000001A Write every { Set actual position Base Unit
encoder/axis
UINT32 ENUM s. appendix Actual position type
[} 157] (s. appendix)
REAL64 mm ±∞ Actual position for
encoder/axis
Caution when using!
}
0x0000001B Write every VOID Re-initialization of the NEW from TC3
actual encoder
position
Note: Takes effect for
reference system
„ABSOLUTE
MULTITURN RANGE
(with single overflow)“
and „ABSOLUTE
SINGLETURN
RANGE (with single
overflow)“.
Index-Offset Access Group type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000205 Write Function group { Deactivate "touch Only for SAF-
"TouchProbeV2 probe" (external latch) port 501
": UINT32 1 [1,2,3,4] Probe unit (probe 1, 2,
- SERCOS/ 3, 4)
SoE, UINT32 1 [0,1] Signal edge (0=rising
- EtherCAT/ edge, 1=falling edge)
CoE (CANopen
UINT32 Reserved
DS402)
- SoftDrive UINT32 Reserved
(TCom), UINT32 Reserved
- MDP 511
UINT32 Reserved
(EL5101,
EL5151, } 24 bytes
EL5021,
EL7041,
EL7342)
0x00000205 Write KL5101,SERC VOID Deactivate "external
OS,AX2xxx,PR latch" or deactivate
OFIDrive "measuring probe
function"
0x00000205 Write CANopen UINT32[4] Deactivate "external
latch" or deactivate
"measuring probe
function"
0x00000210 Write KL5101,SERC REAL64 e.g. mm ±∞ Set "External latch Only for
OS,AX2xxx,PR event" and "External EtherCAT:
OFIDrive latch position"
3.1.1.5.4.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. ENCODER-OUTPUT- Write command
encoder STRUCTURE (NC→IO, only optional!
interface 40 Byte)
Consider safety
NCENCODERSTRUCT_
aspects!
OUT2
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 Optional ENCODER- Write command
(NC→IO), OUTPUT-STRUCTURE only optional!
s. encoder
optional 64 bit (NC→IO, 80 Byte)
interface Consider safety
encoder NCENCODERSTRUCT_
aspects!
interface OUT3
(e.g. MDP513 NEW 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. Bitwise access to Write command
(NC→IO) encoder only optional!
ENCODER-OUTPUT-
interface
STRUCTURE (NC→IO, Consider safety
40 Byte) aspects!
NCENCODERSTRUCT_
OUT2
UINT32 1 [0 … 39] ByteOffset
Relative address offset
[0..39] in output structure.
E.G.: To write “nControl1”
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
unaffected.
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. optional ENCODER- NEW from TC3
(NC→IO), encoder INPUT-STRUCTURE
optional 64 bit interface (IO→NC, 80 Byte)
encoder NCENCODERSTRUCT_I
interface N3
(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:
WcState, Bit1:
InputToggle)
INT32 [ns] ≥0 nDcInputTime (absolute/
relative DcInputShift for
deadtime compensation)
} 80 bytes
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 [} 159]
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 %)
Index offset Access Controller type Data type Phys. Definition Description Remarks
(Hex) unit range
0x0000010F Read/Write P/PP/PID REAL64 (mm/s) / [0.0...1000.0] Slave coupling control: Slave coupling
(Pos.) mm control
Proportional gain kcp for
slave-control
position deviation
between master and
slave
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 Velocity control
limitation ( ) for I-part in
percent (default setting:
0.1 == 10 %)
0x00000207 Read/Write PID (velocity) REAL64 % [0.0...1.0] Maximum output Velocity control
limitation ( ) for D-part in
percent (default setting:
0.1 = 10 %)
0x0000020D Read/Write P/PID (velocity) REAL64 mm/s [0.0 ... 10000.0] 'dead band' for velocity Reserved
error (velocity deviation) function
(for P/PID-controller with
velocity or torque
interface)
0x00000220 Read/Write P/PID (velocity) REAL64 s ≥0 PT-2 filter time for Velocity control,
velocity error (velocity- no standard!
difference)
0x00000221 Read/Write P/PID (velocity) REAL64 s ≥0 PT-1 filter time for Reserved
velocity error (velocity- function,
difference) no standard!
Index offset Access Controller type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000250 Read/Write P/PI (observer) UINT32 1 s. ENUM (≥0) OBSERVER mode [} 159]
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
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] Correction factor kc
Default: 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
3.1.1.5.4.6.2 "Index offset" specification for controller state (Index group 0x6100
+ ID)
Index offset Access Controller type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000001 Read every INT32 Error state controller
0x00000002 Read every REAL64 e.g. mm/ Controller output in Base Unit / s
s absolute units
Symbolic
access
possible!
"CtrlOutput"
0x00000003 Read every REAL64 % Controller output in Cannot be
percent traced by
oscilloscope!
0x00000004 Read every REAL64 V Controller output in Cannot be
volts traced by
oscilloscope!
0x00000101 Read P/PID (pos.) REAL64 e.g. mm/ P-part of the controller
s in absolute units
0x00000102 Read PID (pos.) REAL64 e.g. mm/ I-part of the controller
s in absolute units
0x00000103 Read PID (pos.) REAL64 e.g. mm/ D-part of the controller
s in absolute units
0x00000104 Read PID (pos.) UINT16 1 0/1 Limitation of the I-part
active?
0x00000105 Read PID (pos.) UINT16 1 0/1 Limitation of the D-part
active?
0x00000106 Read PID (pos.) UINT16 1 0/1 ARW measures for the ARW: Anti
I-part active? Reset Windup
Index offset Access Controller type Data type Phys. Definition Description Note
( Hex ) unit range
0x0000010F Read P/PP/PID REAL64 e.g. mm/ Proportion of NEW
(veloc.) s automatic offset
compensation in
absolute units
0x00000110 Read PID (pos.) REAL64 e.g. mm/ Acceleration pre- Acceleration
s control Yacc of the pre-control
controller 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
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
oscilloscope!
0x00000203 Read P,PID (velocity) REAL64 V Velocity part of the Cannot be
controller in volts traced by
oscilloscope!
0x00000201 Read P/PID (velocity) REAL64 e.g. mm/ P-part of the controller
s 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 measures for the ARW: Anti
I-part active? Reset 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 Note
( Hex ) unit range
0x00000255 Read P/PI (observer) REAL64 A Observer: motor actual
current
0x00000A10 Read PID (pos.) REAL64 e.g. mm/ Acceleration pre- Acceleration
s control Yacc of the pre-control
controller in absolute
units
Index offset Access Drive type Data type Phys. Definition Description Note
( Hex ) Unit range
0x00000001 Read every UINT32 1 [1 ... 255] Drive ID
0x00000002 Read every UINT8[30+1] 1 30 characters Drive name
0x00000003 Read every UINT32 1 s. ENUM (>0) Drive type [} 164]
0x00000004 Read/Write every UINT32 1 Byteoffset Input address offset change I/O
(IO-Input-Image) address
0x00000005 Read/Write every UINT32 1 Byteoffset Output address offset change I/O
(IO-Output-Image) address
0x00000006 Read/Write every UINT16 1 [0,1] motor polarity Writing is not
allowed if the
controller
enable has
been issued.
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
output increments
(output mask)
0x00000010 Read/Write every UINT32 1 Internal Drive Control Reserved!
double word to
determine the drive
operation modes
0x00000011 Read/Write every UINT32 1 ≥5 Internal drive reset Reserved!
counter
(time in NC cycles for
enable and reset)
0x00000020 Read/Write every UINT32 1 see ENUM (≥0) Drive dead time
see appendix compensation mode
0: Off (default)
1: On (with velocity)
2: On (with velocity
and acceleration)
0x00000021 Read/Write every UINT32 1 Control double word
(32 bits) for the drive
dead time
compensation:
Bit 0 = 0: relative IO
times (default)
Bit 0 = 1: absolute IO
times
0x00000022 Read/Write every INT32 ns [±1.0E+9] Sum of the
parameterized time
shifts for the drive
dead time
compensation
(typically positive
numerical values)
0x00000031 Read/Write every REAL64 e.g. %/ [-1.0E+30 ... Scaling factor for NEW from
INC 1.0E+30] actual torque value of TC3.1
drive
(or actual value of
force or current
respectively)
e.g. AX5xxx: 0.1 =>
±100%
Index offset Access Drive type Data type Phys. Definition Description Note
( Hex ) Unit range
0x00000032 Read/Write every REAL64 s [0.0 ... 60.0] P-T1 filter time for NEW from
actual torque value TC3.1
(or actual value of
force or current
respectively)
0x00000033 Read/Write every REAL64 s [0.0 ... 60.0] P-T1 filter time for NEW from
temporal derivation of TC3.1
the actual torque value
(or actual value of
force or current
respectively)
0x00000101 Read/Write Servo REAL64 e.g. mm/ >0.0 Reference velocity at Base Unit / s
s reference output
(velocity pre-control)
0x00000102 Read/Write Servo REAL64 % [0.0 ... 5.0] reference output in
percent
0x00000103 Read Servo REAL64 e.g. mm/ >0.0 resulting velocity at Base Unit / s
s 100% output
0x00000104 Read/Write Servo REAL64 e.g. mm/ ±∞ velocity offset (DAC Base Unit / s
s offset) for drift
calibration (offset
calibration) of the axis
0x00000105 Read/Write Servo (Sercos, REAL64 1 [0.0 ... velocity scaling For
Profi Drive, 100000000.0] (scaling factor to react Sercos, Profi
AX200x, to the weight in the Drive, AX200x,
CANopen) drive) CANopen
0x00000106 Read/Write Profi Drive UINT32 0.001 * ≥0 Profibus/Profi Drive Only for Profi
DSC 1/s DSC: position control Drive DSC
gain Kpc
0x00000107 Read/Write Profi Drive REAL64 1 ≥ 0.0 Profibus/Profi Drive Only for Profi
DSC DSC: scaling for Drive DSC
calculating 'XERR'
(Default: 1.0)
0x00000109 Read/Write Servo REAL64 1 [0.0 ... Position scaling For Sercos,
100000000.0] (scaling factor to react CANopen
to the weight in the
drive)
0x0000010A Read/Write Servo REAL64 1 [0.0 ... Acceleration scaling For
100000000.0] (scaling factor to react Sercos, Profi
to the weight in the Drive, AX200x,
drive) CANopen
0x0000010B Read/Write Servo REAL64 1 [0.0 ... Torque scaling (rotary For
100000000.0] motor) or force scaling Sercos, Profi
(linear motor) (scaling Drive, AX200x,
factor for reacting to CANopen
weighting in the drive)
for "TorqueOffset"
(additive moment as
pre-control)
0x0000010C Read/Write Servo REAL64 1 [0.0 ... Torque scaling (rotary For
100000000.0] motor) or force scaling Sercos, Profi
(linear motor) (scaling Drive, AX200x,
factor for reacting to CANopen
weighting in the drive)
From TC 3.1
for "SetTorque"
B4024.2
(e.g.
MC_TorqueControl)
with Drive OpMode
CST)
0x0000010D Read/Write Servo (Sercos, REAL64 s [0.0 ... 1.0] Damping time for drive For Sercos,
CANopen) velocity output CANopen
0x0000010E Read/Write Servo (Sercos, REAL64 s [0.0 ... 1.0] Damping time for drive For Sercos,
CANopen) acceleration output CANopen
0x0000010F Read/Write Servo (Sercos, REAL64 s [0.0 ... 1.0] Damping time for drive For Sercos,
CANopen) torque output or force CANopen
output
Index offset Access Drive type Data type Phys. Definition Description Note
( Hex ) Unit range
0x00000120 Read/Write Servo/ UINT32 1 ≥0 Table ID Only for
hydraulics/ KL4xxx,
(0: no table)
M2400,
Universal
0x00000121 Read/Write Servo/ UINT32 1 ≥0 Interpolation type 0: Only for
hydraulics Linear KL4xxx,
2: Spline M2400,
Universal
0x00000122 Read/Write Servo/ REAL64 % [-1.0 ... 1.0] Output offset in Only for
hydraulics percent KL4xxx,
M2400,
Note:
Universal
Acts according to the
characteristic
evaluation!
3.1.1.5.4.7.2 "Index offset" specification for drive state (Index group 0x7100 +
ID)
Index offset Access Drive type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000001 Read every INT32 Error state drive
0x00000002 Read every REAL64 e.g. mm/ Total output in Base unit / s
s absolute units Symbolic
access
possible!
"DriveOutput"
0x00000003 Read every REAL64 % Total output in percent
0x00000004 Read every REAL64 V Total output in volts Cannot be
traced by
oscilloscope!
0x00000005 Read every REAL64 e.g. mm/ PeakHold value for Base Unit / s
s maximum negative
total output
0x00000006 Read every REAL64 e.g. mm/ PeakHold value for Base Unit / s
s maximum positive total
output
0x00000007 Read every REAL64 e.g. Actual torque or actual from TC3.1
100% = force respectively B4022
1000, (typically 100% =
Symbolic
e.g. Nm 1000)
access
or N
possible!
"ActTorque"
0x00000008 Read every REAL64 e.g. Nm/ ±∞ Actual torque change from TC3.1
s or N/s or actual force change B4024
respectively
(time derivative of the
actual torque or actual
force respectively)
Index offset Access Drive type Data type Phys. Definition Description Note
( Hex ) unit range
0x00000200 ReadWrite READ: Reading the state of from TC3.1
the digital inputs 1 to 8 B4024.12
UINT32 1 0/1 State of the selected Only for SAF-
input Port 501!
WRITE:
UINT32 1 [1…8] Selection of input 1 to
8
3.1.1.5.4.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
index offset 0x00000012
}
3.1.1.5.4.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)
Consider safety
NCDRIVESTRUCT_OUT
aspects!
2
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-STRUCTURE only optional!
(NC→IO, 40 Byte)
Consider safety
NCDRIVESTRUCT_OUT
aspects
2
UINT32 1 [0 … 39] ByteOffset
Relative address offset
[0..39] in output structure.
E.G.: To write “nControl1”
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
unaffected.
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-
drive interface STRUCTURE (IO→NC,
40 Byte)
NCDRIVESTRUCT_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
}
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 [} 166]
0x00000004 Read every UINT32 1 s. ENUM (>0) Table main type [} 166]
Index offset Access table type Data type Phys. Definition Description Remarks
(Hex) unit range
0x00000022 ReadWrite "Motion Write Read the "Motion Only line by line
Function" Function" as fixed values possible!
("scatter plot") (multiple
{ integer)
UINT16 1 0/1 Initialization of data (copy
of actual data)?
UINT16 1 Bitmask (≥0) Select bit mask (number
of columns is one column
for the master position
plus number of bits):
Bit 0: Pos (Slave)
Bit 1: Velo (Slave)
Bit 2: Acc (Slave)
Bit 3: Jerk (Slave)
REAL64 e.g. mm ±∞ Startposition (Master)
REAL64 e.g. mm > 0.0 Inkrement
}
Read
{
REAL64[x*m] e.g. 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
(relates only to the "row
values" of the table)
REAL64 e.g. mm ±∞ Master position
Read
{
REAL64 e.g. 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
column
REAL64 e.g. mm [±1000000.0] Position offset of the
slave column
REAL64 1 [±1000000.0] Scaling of the slave
column
REAL64 e.g. mm [±1000000.0] Lower area boundary
(start position)
REAL64 e.g. mm [±1000000.0] Upper area boundary
(end position)
}
0x01000000 Read/ every { e.g. mm ±∞ Read/write x lines from Only line by line
+n-te start line Write[<=16777 REAL64[x*m] } the n-th line: (x*m)-values possible!
216] (one or more lines )value (multiple
range n: [0 ... 16777216] integer)
Index offset Access table type Data type Phys. Definition Description Remarks
(Hex) unit range
0x06000000 Read/ "Motion { Read/write x columns Only column by
+m-te Write[<=16777 Function"(law from m-th column: (x*n)- column
Startspold 216] of values (one or more possible!
motion)Data:ST columns )value range m: (multiple
RUCT[x*n] [0 ... 16777216] integer)
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 address index 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
}
3.1.1.5.4.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
oscilloscope!
3.1.1.5.4.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 Table types:
dimension (n*m): 1,2,3,4
UINT32 1 s. ENUM (>0) Dimension: at
Table type [} 166] (s.
least 2x1
appendix)
UINT32 1 [2...16777216] Quantity of lines
UINT32 1 [1...16777216] Quantity of columns
}
0x00010001 Write valve diagram { Generates valve diagram Table types: 1,3
table with dimension Dimension: at
(n*m): least 2x1
UINT32 1 s. ENUM (>0) Table type [} 166] (s.
appendix)
UINT32 1 [2...16777216] Quantitiy of lines
UINT32 1 [1...16777216] Quantitiy of columns
}
3.1.1.5.4.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
movement)
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)
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 √ √ —
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 sync 3: external hard- 4: external hard- 5: software sync
edge) pulse (zero/C- ware latch with ware latch with pulse (software
track) pos. edge neg. edge zero track)
AX2xxx-B200 — √ √ √ √ √ (resolver only)
(Lightbus)
AX2xxx-B510 — √ — — — √
(CANopen) (resolver only)
(see "Reference
mask" parameter)
AX2xxx-B1x0 — √ √ √ √ √
(EtherCAT) (resolver only)
(fixed 20-bit)
AX2xxx-B900 — √ √ √ √ √ (resolver only)
(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 — — — — — —
The parameter sets the source of the digital input of the referencing cam (homing sensor). At the same time
it is determined whether the signal is Active High or Active Low.
A digital input linked to the NC process is used. For this purpose, a general Drive Status Byte with 8 digital
inputs is defined in the process image (Drive->Inputs->nState8), which can serve as a signal source for the
homing sensor. A digital input to be used must therefore be mapped manually to the desired position in this
byte.
The digital inputs 1 and 2 may differ depending on the hardware used. For the MDP703/733
hardware (e.g. EL7031, EL7041, EL7201, EL7411) the direct digital inputs E1 and E2 of the
terminal are used instead, which are located in the Drive.nState2 byte of the terminal at bit position
3 (E1) and 4 (E2). The lower two bits of Drive.nState8 are not assigned in this case.
Only for slaves of the type synchronization generator for the time being
3.1.2 AmsNAT
3.1.2.1 Introduction
For a better understanding of the AmsNAT function it is important to know the difference between ADS and
AMS and to know what an ADS route is.
ADS (Automation Device Specification) is the TwinCAT communication protocol that specifies the interaction
between two ADS devices. For example, it defines what operations can be executed on another ADS device,
what parameters are necessary for that and what return value is sent after execution.
AMS (Automation Message Specification) specifies the exchange of the ADS data. A major component of
the communication protocol is the AmsNetId. This is specified in the AMS/ADS package for the source and
target device. An ADS device can be explicitly addressed using the AmsNetId.
A route between two devices must be setup in TwinCAT so that they can communicate. This route is
configured on both sides and typically contains the route name, the AmsNetId and the address of the
communication partner as well as the type of connection. The configuration of new routes and an overview of
existing routes in a TwinCAT system are shown in the following figure.
If the hardware should be scanned on the target, relative NetIDs have to be used:
3.1.2.3 Motivation
A frequently occurring application in series mechanical engineering is the cloning (i.e. the making of a 1:1
copy) of a controller. When using TwinCAT, the result of this is that all cloned instances possess the same
AmsNetId. This is not a problem at first. However, if the cloned instances are to be connected in parallel with
the same engineering system or are to communicate with one another by ADS, this is initially impossible
because the AmsNetId is not unique. The AmsNAT function removes precisely this restriction by virtue of the
fact that the systems work with virtual AmsNetIds. These can be configured with very little effort.
The AmsNAT function can be used for any route to an ADS device. This provides a high degree of flexibility
and the AmsNetIds no longer have to be adapted to the machine computers, which leads to a significant
reduction in time and effort for configuration.
3.1.2.4 Functioning
The way AmsNAT functions will now be explained on the bases of a typical application. In the application
case, a TwinCAT engineering system and two TwinCAT runtimes exist with the same AmdNetId and IP
address. The configuration is illustrated in Figure 3. The engineering system is to send an AdsRead
command to PLC 1, from which a corresponding response is expected. Since both runtimes possess an
identical IP address, two IP NATs are additionally used. Their task is to implement unambiguous addressing.
In order to do so, the first three positions of the local IP address are replaced by the first three positions of
the global IP address or vice versa, depending on the direction of communication.
In the first step of the application example, the engineering system sends an AdsRead command to PLC 1.
Since this AmdNetId is a virtual one, the TwinCAT system service replaces it by the remote AmsNetId
5.19.8.122.1.1 with the help of its routing table. This is the real AmsNetId existing on the system. It is entered
in the field "AmsNetId Target" of the AMS packet.
The TwinCAT system service of PLC 1 relays the AMS packet unchanged. PLC 1 executes the AdsRead
command and then sends the corresponding response to the engineering system. Figure 4 shows the
communication sequence for the response.
For the response, the TwinCAT system service of PLC 1 initially relays the AMS packet unchanged. It
subsequently reaches the TwinCAT system service of the engineering system. Since the real AmsNetId of
PLC 1 is entered in the field "AmsNetId Source" of the AMS packet, it must be replaced by the virtual
AmsNetId on the basis of the routing table. The engineering system can then clearly assign and process the
response.
When using the AmsNAT function the transmitted data are not changed, only the AMS header. Therefore it
should be noted that if configuration data contain the AmsNetId this can lead to the virtual AmsNetId being
used. One possibility for the engineering of I/O devices is the use of relative AmsNetIds. In this case the last
two characters of the AmsNetId are taken into account and the first four characters are ignored.
3.1.2.5 Configuration
To configure AmsNAT, open the file StaticRoutes.xml, which is located in the TwinCAT installation directory
under the path TwinCAT\3.1\Target. In this file, define the attribute "RemoteNetId" for each route as shown
subsequent.
<?xml version="1.0" encoding="UTF-8"?>
<TcConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2015/12/TcConfig">
<RemoteConnections>
<Route>
<Name>CX-111111</Name>
<Address>10.0.10.8</Address>
<NetId RemoteNetId="5.19.8.122.1.1">10.0.10.8.1.1</NetId>
<Type>TCP_IP</Type>
</Route>
<Route>
<Name>CX-222222</Name>
<Address>10.0.20.8</Address>
<NetId RemoteNetId="5.19.8.122.1.1">10.0.20.8.1.1</NetId>
<Type>TCP_IP</Type>
</Route>
</RemoteConnections>
</TcConfig>
The actual AmsNetId assigned to the remote ADS device is specified with the attribute "RemoteNetId". It
does not have to be unique. Only the AmsNetId of the target system defined in the field <NetId> is known in
the TwinCAT system with configured AmsNAT function.
Restart the TwinCAT system service in order to activate the preset configuration of the AmsNAT function. To
do this, switch the TwinCAT system from Run mode to Config mode. If TwinCAT is already in Config mode,
reopen this in order to load the settings made.
3.1.3 ADS-over-MQTT
3.1.3.1 Overview
Beckhoff ADS (Automation Device Specification) is a communication protocol developed by Beckhoff for
efficient data exchange in industrial automation systems. It serves as the backbone for the integration of
devices and software into the PC-based control technology from Beckhoff.
From the perspective of the ADS protocol, ADS-over-MQTT is an additional transport channel over which
ADS can be transported. Decoupling communication via an MQTT message broker results in a number of
advantages, particularly in terms of scalability and flexibility when integrating additional ADS applications.
Security mechanisms such as TLS can be used at the transport layer to secure the communication
connection.
With ADS-over-MQTT, the entire data exchange is transparent for the ADS applications, because only the
ADS router needs to know and hold the corresponding information on the MQTT transport channel. In
particular, this also enables easy retrofitting for existing applications.
The main use case for ADS-over-MQTT is a classic remote maintenance and remote diagnostics scenario,
where the TwinCAT engineering environment (TwinCAT XAE) needs to connect to one or more controllers
for remote debugging. The following diagram illustrates the architecture being created here.
However, there are many other use cases for ADS-over-MQTT, especially when it comes to the aggregation
of multiple distributed PLC systems.
This document provides an overview of the usage possibilities as well as a technical description of how a
"virtual ADS network" can be configured over an MQTT message broker.
• Access control:
After creating the appropriate routes, bidirectional communication can be executed in a classic ADS
setup. An access by device A, which accesses B, also allows device B to access A. The MQTT-based
ADS network can be configured so that device A can access B, but not the other way around.
• Security / encryption:
The communication from TwinCAT to the broker can be encrypted by TLS (with certificates or
PreSharedKey (PSK)). In this case, the transporting MQTT protocol is encrypted, so the ADS protocol
can be transmitted unencrypted in the payload.
• Retrofitting:
ADS-over-MQTT is transparent for the ADS applications, which means that they do not need to be
changed.
NOTICE
ADS access means full access
As described in Security Advisory 2017-01, ADS offers full access to a device.
Secure ADS offers authorization as well as encryption for the communication; therefore, it represents a
transport encryption. Hence, if an ADS route exists, then full access exists.
Dedicated, role-related access to individual files is offered by solutions such as OPC UA.
3.1.3.2 Installation
3.1.3.2.2 Installation
The ADS-over-MQTT feature is a fixed part of the basic TwinCAT installation, both on XAE, XAR and ADS
installations, and no further installations are required on the TwinCAT side. To install the MQTT message
broker, please consult the documentation for your message broker software.
Overview
For demonstration purposes, two TwinCAT devices are to establish an ADS-over-MQTT connection with the
message broker. We then use TwinCAT XAE (Engineering) on the first device to establish a connection to
the second system via the ADS-over-MQTT route. To keep the installation scenario as simple as possible,
both devices should be on the same network.
Device 1:
• Mosquitto Message Broker
• TwinCAT 3 XAE
Device 2:
• TwinCAT 3 XAE or XAR
Note the IP address or the host name of Device 1. In the latter case, make sure that the name resolution
works in your network.
The Mosquitto Message Broker has been delivered since version 2.x with a configuration that requires
security measures to be set up to ensure secure operation of the message broker. In the following, we will
show you how to modify the Mosquitto Message Broker configuration so that an unsecured communication
connection can be established with the broker. However, this should be done exclusively for testing
purposes in a trusted operating environment. For productive operation, we recommend using a secure
broker configuration.
1. Install the Mosquitto Message Broker on your system.
2. Make a backup of the mosquitto.conf file from the Mosquitto installation directory. This is typically located
at C:\Program Files\mosquitto.
3. Open the mosquitto.conf file with a text editor of your choice and remove the existing content. Add the
following content and save the file.
listener 1883
allow_anonymous true
4. Restart the Mosquitto Message Broker, either via the corresponding Windows service or manually via the
console or mosquitto.exe.
ð You have now configured the Mosquitto Message Broker to listen for incoming client connections on port
1883 and it does not require any security (neither user authentication nor client certificates).
The TwinCAT ADS router on this device should now establish a route to the local message broker. Create a
new XML file, e.g. with Notepad, and insert the following content.
Save this XML file under any name in the following directory and restart TwinCAT for the changes to take
effect.
\TwinCAT\3.1\Target\Routes
The TwinCAT ADS router on this device should establish a route to the message broker on device 1. Create
a new XML file, e.g. with Notepad, and insert the following content.
<?xml version="1.0" encoding="ISO-8859-1"?>
<TcConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2015/12/TcConfig">
<RemoteConnections>
<Mqtt>
<Address Port="1883">%IPAddress%</Address>
<Topic>VirtualAmsNetwork1</Topic>
</Mqtt>
</RemoteConnections>
</TcConfig>
Replace the entry %IPAddress% with the IP address or the host name of device 1. Save this XML file under
any name in the following directory and restart TwinCAT for the changes to take effect.
\TwinCAT\3.1\Target\Routes
Now start TwinCAT XAE on Device 1 and create a new TwinCAT project. Alternatively, you can also open an
existing project. For this tutorial, we only need the toolbar to establish a connection to a remote ADS device.
You will now find TwinCAT Device 2 in the toolbar and can establish a connection to it.
Next steps
After you have successfully established an ADS-over-MQTT connection to the message broker, we
recommend that you reset the Mosquitto Message Broker to its default settings. For this, please take the
backup file of mosquitto.conf that you created in the previous steps. This file, together with the broker
documentation, is a good basis for further steps, e.g. to set up a secure message broker operating
environment considering client/server certificates and user authentication.
These virtual networks can be defined at client level using the ADS-over-MQTT configuration file [} 180]
and, if required, access rights can be assigned using the TcMqttPlugin [} 182] for the Mosquitto Message
Broker.
Type Topic
Discovery <NetworkName>/<AmsNetId>/info
Communication <NetworkName>/<AmsNetId>/ams
<NetworkName>/<AmsNetId>/ams/res
Each ADS device therefore has its own "topic area" on the message broker. The following figure illustrates
this relationship.
Discovery
A connecting TwinCAT ADS router sends a retain message with device information to its discovery topic, at
the same time it subscribes to the topic <NetworkName>/+/info, so that it is informed about all other
connected routers.
The messages to the discovery topic contain an XML structure with device information, for example the host
name and the TwinCAT version used:
<info>
<online name="EC2AMAZ-2RRSQS6" osVersion="10.0.20348" osPlatform="2"
tcVersion="3.1.4026.10">true</online>
</info>
If the message broker does not support retain messages, this can be taken into account in the ADS-over-
MQTT configuration file [} 180]. In this case, a communication handshake would take place instead of a
retain message: a newly connecting device logs on to its discovery topic and all other connected devices
respond with another message on their discovery topic. This ensures that devices can find each other even
with message brokers that do not support retain messages. The disadvantage is an increased volume of
messages in larger operating environments with frequent reconnects.
Communication
In the Samples [} 184] chapter, you will find sample configuration files for all the use cases described below.
Path information
Please ensure that you use the correct spelling for your operating system for any path details in the
configuration file.
Basic configuration
NoRetain
The communication flow [} 178] for device discovery can be customized via the NoRetain attribute. By
setting NoRetain = true, the device search function is no longer based on retain messages. Instead, a
handshake mechanism is used to identify all connected ADS devices.
Unidirectional
Incoming ADS messages can be blocked for this system via the unidirectional attribute. A typical use case
could be an engineering system, for example, which should be able to reach the runtime systems via ADS,
but not vice versa.
TLS
The <TLS> node can be used to define settings for securing the transport channel via TLS. Various
connection options are available, e.g. the configuration of client certificates or PSK. Our samples [} 184]
show all possible configuration variants.
TLS IgnoreCn
The IgnoreCn attribute can be used to disable the verification of the CommonName (CN) from the server
certificate.
TLS PSK
When using TLS with a Pre-Shared Key (PSK), you can either specify the PSK as a hex-coded, 64-character
string, or leave the conversion to TwinCAT internally using Sha256(Identity + Pwd). In the latter case, the
IdentityCaseSensitive attribute can be used to specify that TwinCAT should use the identity as the
UpperCase for the calculation. Our samples [} 184] show both possible configuration variants.
User
<?xml version="1.0" encoding="ISO-8859-1"?>
<TcConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2015/12/TcConfig">
<RemoteConnections>
<Mqtt>
<Address Port="1883">127.0.0.1</Address>
<Topic>VirtualAmsNetwork1</Topic>
<User>CX-12345</User>
</Mqtt>
</RemoteConnections>
</TcConfig>
The <User> element specifies an identity that can be used in the TcMqttPlugin [} 182] to configure access
rights between ADS devices. However, the identity is usually defined by other means, e.g. the
CommonName (CN) of a client certificate.
Optionally, the <Mqtt> element can contain a ClientId attribute to specify the MQTT ClientID. This is
otherwise formed from the <User> and an arbitrary string.
3.1.3.3.5 Security
There are options for securing the communication. A TLS connection on the basis of X.509 certificates or a
Pre-Shared Key (PSK) can be used for this. It is recommended that communication be secured with TLS
especially when communicating over non-trustworthy networks (e.g. the Internet). In the chapters
Configuration file [} 180] and Samples [} 184] you will find explanations and sample configuration files for
operating ADS-over-MQTT via TLS.
The broker itself must be operated in a trustworthy environment, as all messages on the broker are
unsecured.
Two methods can be used to configure access rights between individual ADS devices:
• Configuration of access rights via Access Control Lists [} 183] (using Mosquitto as an example)
• Configuration of access rights via a plugin [} 182] (only for Mosquitto)
The plugin is delivered with the TwinCAT installation under TwinCAT 3.1 Build 4024. Build 4026 requires the
installation of the corresponding package (TwinCAT.XAE.MqttPlugin). The plugin is installed in the following
directory and can be referenced from there in the Mosquitto configuration.
\TwinCAT\AdsApi\TcMqttPlugin
The plugin is available in a 32-bit and a 64-bit version, depending on which version you use of the Mosquitto
Message Broker. The plugin is then integrated into the configuration of the Mosquitto Message Broker as
follows:
auth_plugin <Path>TcMqttPlugin.dll
auth_opt_xml_file <Path>MyACL.xml
The MyACL.xml file contains the access configuration to the broker itself, as well as the configuration of the
communication between the connected TwinCAT ADS routers. This configuration is explained in more detail
in the following section.
Configuration
The plugin offers the option of configuring virtual AMS networks. To do this, specify which device can access
which other device for each target device. In contrast to the classic ADS routes, these connections are
directional: A target therefore does not also have the right to access the source.
<TcMqttAclConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\TwinCAT\3.1\Config\Modules\TcMqttAclConfig.xsd">
<Ams>
<Topic>VirtualAmsNetwork1</Topic>
<User>
<Name>EngineeringStation</Name>
</User>
<User>
<Name>CX-12345</Name>
<Access>EngineeringStation</Access>
</User>
<User>
<Name>CX-56789</Name>
<Access>EngineeringStation</Access>
</User>
</Ams>
</TcMqttAclConfig>
The name of the Ams network is defined within an <Ams> node. It is used in the MQTT topics employed for
the identification of the networks. Individual <User> elements describe the devices. These elements have a
<Name> attribute that describes the MQTT identity with which the connection was established. The identity
can be transferred via various TLS mechanisms, e.g. via the TLS-PSK Identity or the CommonName (CN) of
a client certificate. Our samples [} 184] here show possible configuration variants.
Access-authorized devices are defined via the <Access> element. In the sample above, the
"EngineeringStation" identity has access to two CX devices, but the CX devices do not have access to the
"EngineeringStation" or to each other.
The configuration file is reloaded cyclically so that a restart of the broker is not necessary.
With this configuration each validly connected device can assume an arbitrary AmsNetId and thus an identity
from the point of view of ADS. This can be further restricted as required:
<User>
<Name>CX-56789</Name>
<Access>EngineeringStation</Access>
<NetId>192.168.56.1.1.1</NetId>
</User>
As soon as at least one NetId is specified, only one NetId can be registered from this list. An alternative
solution would be to enter the NetId in the CommonName (CN) of the client certificate.
Overview
The Mosquitto Message Broker allows the configuration of an Access Control List, which is defined as a
separate configuration file and referenced in the main configuration of the broker. This configuration entry is
shown below as an example:
acl_file C:\Program Files\mosquitto\mosquitto.acl
You can also find a complete configuration file in our samples [} 184] for download.
In the ACL file, you can define authorizations for publishing and subscribing to certain topics and specify
them separately for each user. The access rights for a user are always introduced by the following line:
user <username>
Subsequently the reading and writing rights are defined according to the following scheme:
topic [read|write|readwrite] <topicName>
For ADS-over-MQTT, two things must be ensured according to the communication flow [} 178]: access of all
ADS devices to the discovery topics and sending/receiving via the communication topics.
The ADS device must always have read/write access to its own topic. The device receives read rights for the
discovery topic of other ADS devices.
To exchange ADS messages, an ADS device must have read/write access to the communication topic of the
devices. The ADS device is identified by its own identity on the message broker. This identity can, for
example, originate from a PSK or correspond to the CommonName (CN) of a client certificate. The following
configuration illustrates these relationships.
user <identity>
topic readwrite <VirtualAmsNetworkName>/<OwnAmsNetId>/#
topic read <VirtualAmsNetworkName>/+/info
topic readwrite <VirtualAmsNetworkName>/+/ams/#
If an ADS device is to be denied access to another device, it must be ensured that there are no write
permissions for the topic with the target AmsNetId.
The familiar TcMqttPlugin option that an ADS device may register only one AmsNetId is also possible with
the Mosquitto ACL. To do this, the entry <OwnAmsNetId> must be replaced by precisely one foreseen
AmsNetId. If it is to be possible for the ADS device to register with an arbitrary AmsNetId, then the wildcard
(#) has to be set for <OwnAmsNetId>.
The following is an example of the access rights entries for communication between two ADS devices:
user EngineeringStation
topic readwrite VirtualAmsNetwork1/18.153.78.19.1.1/#
topic read VirtualAmsNetwork1/+/info
topic readwrite VirtualAmsNetwork1/+/ams/#
user CX-12345
topic readwrite VirtualAmsNetwork1/3.120.15.8.1.1/#
topic read VirtualAmsNetwork1/+/info
topic readwrite VirtualAmsNetwork1/+/ams/#
3.1.3.4 Samples
Sample code and configurations for this product can be obtained from the corresponding repository on
GitHub: https://github.com/Beckhoff/ADS-over-MQTT_Samples. There you have the possibility to clone the
repository or download a ZIP file with the sample.
Secure ADS is an additional transport channel from the point of view of the ADS protocol. Precisely the
same ADS commands are transmitted via a secure connection as via other communication protocols.
To this end a connection encrypted by means of TLSv1.2 is established from one TwinCAT router to
another.
Due to the implementation inside the TwinCAT router, existing applications do not need to be modified. They
can be made to use the encrypted connection by simply parameterizing the used route.
This documentation illustrates the different options of Secure ADS, in particular with regard to the provision
of the keys.
3.1.4.2 Limitations
From TwinCAT 3.1 Build 4024.0
The functionality described here is available from TwinCAT 3.1. 4024.0.
3.1.4.3 Requirements
From TwinCAT 3.1 Build 4024.0
The functionality described here is available from TwinCAT 3.1. 4024.0.
• Secure ADS is a component of TC1000 and can be used without license costs.
• The devices used require network communication. Incoming Secure ADS is communicated via the
TCP port 8016.
• Appropriate certificates may need to be generated and signed for TLS encryption.
Secure ADS introduced an additional communication channel for the familiar ADS protocol. This can be used
by programs without them having to be adapted for the new communication channel.
From the point of view of security, therefore, it is a transport encryption, but not an end-to-end encryption
between the components, because all applications running locally on a device can use this encrypted
connection together – exactly as with ADS routes also.
Local realization
Secure ADS is part of the ADS router and is also configured here. The ADS router establishes an encrypted
connection to another TwinCAT router and makes it available to the applications. Care must therefore be
taken that the ADS devices do not themselves communicate applications in encrypted form, but that this
takes place between the routers.
Transparent retrofitting
The realization of Secure ADS inside the TwinCAT router makes the retrofitting of applications possible.
None of the ADS applications (client and server) – this also includes applications written by the customer –
need to be recompiled.
The ADS applications use ADS routes to identify the communication partner. This ADS route is independent
of the transport channel and is described in the TwinCAT router.
If the used route is switched to a Secure ADS connection, the ADS traffic is transported in encrypted form.
Once they have been opened at network level, ADS routes are used for communication on both sides by the
respective ADS applications. This behavior is very efficient, but may be undesirable. For example, an
engineering computer (XAE) is supposed to have access to a runtime (XAR) system in the normal case, but
it is not necessary for an XAR system to access the XAE system via ADS.
Therefore, this direction can be limited in that a corresponding system (the XAE in the example) does not
accept any ADS request commands via the route.
The chapter Configuration [} 189] describes the procedure for limiting the properties.
3.1.4.4.2 Server
A normal ADS route is established by both devices as soon as it is required.
Once a route has been established it is used in both directions.
A server configuration is offered as an extension for Secure ADS. Such a configuration represents the basis
for setting up specific routes.
<TcConfig>
<RemoteConnections>
<Server>
…
</Server>
</RemoteConnections>
</TcConfig>
For PSK [} 191] and certificates provided by the customer [} 192] this is used to store the initial configuration
on one side.
When setting up the specific route, the server entries are then checked to see if rights exist. If this is the
case, a normal route will be set up.
What they all have in common is that the respective device has to be isolated with respect to access to the
secrets (Pre-Shared Keys, certificates). If these secrets are compromised, the system has to be set up again
in order to restore the integrity of the complete system.
When starting for the first time (e.g. after the installation), TwinCAT generates a self-signed certificate.
The use of such certificates has the advantage that they are generated and are available locally. In order to
establish a basis for trust, however, a check of the certificates must be performed among all communication
devices.
These certificates are thus suitable for the initial commissioning or also for static machines that can make do
without dynamics in the system structure or the entity authorized to access.
From TwinCAT 4024.0 these certificates will be provided as standard when used. The chapter Configuration
[} 190] describes how they are used to establish an ADS route.
The certificates generated have a fixed validity period from 1/1/2000 to 1/1/2061. From the point of view of
security this is too long, meaning that organizational measures have to be taken to meet the security
demands. With this excessively long validity period, Beckhoff ensures that communication does not fail, even
if, for example, incorrect times are set in the local system.
If this behavior is not desired, you can generate and use your own certificates (see Certificates provided by
the customer).
Pre-Shared Keys can be stored in a TwinCAT system. These are used to authorize the incoming ADS routes
when establishing the connection.
As the Pre-Shared Keys have to be configured they are particularly suitable for granting access, for example,
to maintenance staff. The Pre-Shared Keys can be bound to a specific person.
Pre-Shared Keys do not have a validity period like that foreseen for certificates. They are also stored directly
in files so that they are not stored as a hash value (as is usually the case with passwords). They are
therefore not protected against direct viewing.
The chapter Configuration [} 191] describes how Pre-Shared Keys are used on both sides of the
communication.
Secure ADS also provides customers with the option of generating and managing their own certificates.
As a result, dynamic constellations in particular are easily mappable, because there can be a common
Certificate Authority (CA). All devices that trust this CA can communicate in encrypted form with one another
with no further configuration, even if they have never encountered one another before.
The chapter Configuration [} 192] describes how these certificates can be integrated into TwinCAT.
NOTICE
Expiry of the certificates
Certificates have an expiry date. Organizational measures must be taken to replace certificates before their
expiry.
3.1.4.5 Configuration
Secure ADS offers three ways of providing the keys required for the encryption. At this point the
configurations will be described separately from one another.
While the Server vs. Route configuration is described within the three ways, directed ADS connections
[} 189] are illustrated independently.
If this checkbox is set, TwinCAT will not accept any ADS command calls from the opposite target system via
the associated route. TwinCAT itself sends ADS command calls (requests) and receives responses.
In the XML configuration this setting is made via the attribute Unidirectional="true":
<RemoteConnections>
<Route Unidirectional="true">
<Name>CX-123456</Name>
<Address>CX-123456</Address>
<NetId>5.36.69.176.1.1</NetId>
<Type>TCP_IP</Type>
<Flags>128</Flags>
<Tls>
…
</Tls>
</Route>
</RemoteConnections>
This check is made possible in TwinCAT by the fingerprint of the opposite system.
The fingerprint of your own system is displayed in the About TwinCAT dialog:
The button Self Signed Certificate - Fingerprint: copies the fingerprint listed on the right to the clipboard.
This dialog does not exist for CE systems. The fingerprint can be displayed here in the file \Hard
Disk\TwinCAT\3.1\Target\TcSelfSigned.xml.
The fingerprint is displayed purely for information and cryptographically unsecured following the discovery:
The final checking of the fingerprint takes place when setting up the route:
The Compare with field can be used, for example, with copy & paste for checking: If the same fingerprint is
entered there the field appears green, otherwise it is red.
Thus, an RDP connection, for example, can be used to copy the fingerprint of a system to the clipboard via
the Self Signed Certificate - Fingerprint button and to enter it here.
So that the target system will accept the route establishment, a system login with corresponding
administrator rights that is valid there is used.
These login data are already transmitted in encrypted form.
With CE systems the host name is always entered with TwinCAT 3.1 4024.5, even if IP address was
selected when creating the route. Therefore, if a network without a functioning host name lookup is to be
used, the host name must be changed manually by the IP address in the file \Hard
Disk\TwinCAT\3.1\Target\StaticRoutes.xml.
Saved changes are accepted when the TwinCAT router is initialized, which takes place, for example, during
the transition RUN->CONFIG or CONFIG->CONFIG.
When adding a route, the entry Pre-Shared Key (PSK) is selected and the corresponding credentials are
entered.
If this is successful, a specific route is stored in the target system and is used for the future establishment of
connections.
Saved changes are accepted when the TwinCAT router is initialized, which takes place, for example, during
the transition RUN->CONFIG or CONFIG->CONFIG.
The certificates are X.509 certificates, which can be generated, for example, with OpenSSL. If the key (XML-
Element <Key>) is to be protected by a password, this can be specified via the XML element <KeyPwd>.
The .der and .pem formats are supported.
The "CommonName" of the certificate must correspond to the name used when establishing the connection
(XML-Element <Name>). This behavior can be deactivated with the option IgnoreCn=" true".
If both sides have suitable certificates of a common CA, the route can be created without further information
using this dialog:
As described under Server [} 187], a specific route is created on both sides as a result of this.
The target system can be configured with respect to the ports to be used.
ADS Ports
DisableAdsTcpListening REG_DWORD 1 = prevents the opening of the
TCP port 0xBF02 for unencrypted
ADS.
DisableAdsTlsListening REG_DWORD 1 = prevents the opening of the
TCP port 8016 for Secure ADS
DisableAdsDiscovery REG_DWORD 1 = prevents the opening of the
UDP port 0xBF03 for the ADS
discovery ("Broadcast Search")
The attribute SecureOnly="True" can additionally be used via the StaticRoutes.xml file. The ADS port
0xBF02 is thereby kept open, but no further ADS communication is allowed via the port.
<RemoteConnections SecureOnly="True">
3.1.4.5.6 Logging
Secure ADS writes information about failed connection establishments in the Windows Event Log, which is
available via the TwinCAT System Tray icon.
The messages can be found under the category Windows Logs > Application:
3.1.4.6 Sample
These instructions do not represent comprehensive advice on the creation and handling of certificates. In
particular the validity periods must be observed, which necessitates organizational measures in order to
ensure replacement before the expiry of the validities (in this case: 3600 days for CA and 360 days for the
respective certificates).
In this example a Certificate Authority (CA) is generated that signs a certificate for both sides (called IPC and
CX here) of the communication.
The meaning of the call parameters can be viewed in detail via "openssl help".
ü OpenSSL is installed and is available from the command line.
1. Generate a key for the Certificate Authority that will be trusted later.
openssl genrsa -out rootCA.key 2048
2. Generate the certificate with a validity period of 3600 days. Owner information is added via the
parameter "-subj".
openssl req -x509 -new -nodes -key rootCA.key -sha256 -subj "/C=DE/ST=NRW/
L=Verl/O=Bk/OU=TCPM/CN=RootCA" -days 3600 -out rootCA.pem
3. Generate a key for the IPC
openssl genrsa -out ipc.key 2048
3.2.1.1 Port_xxx.app
Binary file of the PLC project
Storage location
3.2.1.2 Port_xxx.autostart
Empty file that activates the Autostart option
Storage location
3.2.1.3 Port_xxx.cid
File containing the Compileinfo_IDs
Storage location
3.2.1.4 Port_xxx.crc
File containing the checksum of the PLC project
Storage location
3.2.1.5 Port_xxx.occ
Symbolics of the PLC project
• The file contains the changes of the symbolics of the PLC project for an online change.
• If the Symbolic Mapping option is not activated, this file also contains the changes of the mapping
configuration for an activate/update boot project.
• On activating the configuration the occ file is reset in both directories.
Storage location
3.2.1.6 Port_xxx.oce
The file contains the changes of the event classes at the time of an OnlineChange, which are used in a PLC
project.
Storage location
3.2.1.7 Port_xxx.ocm
Description file of the mapping configuration
• If the Symbolic Mapping option is activated, this file contains the changes of the mapping
configuration of the PLC project for an activate/update boot project.
• On activating the configuration the ocm file is reset in both directories.
Storage location
3.2.1.8 Port_xxx_boot.tizip
Archive folder containing the COMPILEINFO file of the boot project
The COMPILEINFO file contains the compilation information and the login information of the PLC project.
Storage location
3.2.1.9 Port_xxx_act.tizip
Archive folder containing the COMPILEINFO file of the currently running PLC project
Storage location
3.2.1.10 Port_xxx.bootdata
Boot file that saves the persistent data
Once the TwinCAT system has started and the PLC has been loaded, the file extension .bootdata is
renamed .bootdata-old.
Storage location
3.2.1.11 Port_xxx.bootdata-old
Backup file for the persistent data
The file is deleted once the new boot file has been completely written.
Storage location
3.2.1.12 PLC_Name.tpzip
Archive folder of the PLC project
Storage location
3.2.1.13 PLC_Name.tmc
TC3 module description file
Storage location
3.2.1.14 PLC_Name.tpy
TC2 PLC description file
Storage location
3.2.3.1 CurrentConfig.xml
Description file of the current configuration.
Storage location
3.2.3.2 CurrentConfig.tszip
Archive folder containing the tsproj file and all referenced xti files.
Storage location
3.2.4.1 Port_xxx.textlistname.txt
For each text list existing in the project, a file is created containing all the entries in this text list.
Storage location
Storage location
3.2.5.1 tc3plchmi.ini
Configuration file containing the settings of the target visualization client
Storage location
3.2.6.1 port_xxx.imagepoolcollection.csv
File containing a list of the entries of all image pools available in the PLC project
Storage location
3.2.6.2 webvisu.cfg.json
Configuration file containing the settings of the web visualization object
Storage location
3.2.6.3 webvisu.htm
HTML page used to display the visualization in the internet browser
Storage location
3.2.6.4 webvisu.js
File containing the Java Script logic that is used in the visualization
Storage location
3.3.1 Overview
If no TwinCAT 3 development environment (XAE) is available, you can update the boot data of a TwinCAT
PLC system or a complete TwinCAT system by means of a file copy.
• Performing a PLC update [} 205]
• Performing a C++ update [} 205]
• Performing an update of the complete machine [} 205]
• Cloning a machine [} 206]
A description of the various files as well as information on their storage location within the associated project
(project directory) and on the machine (TwinCAT boot directory) can be found in the section Folder and file
types [} 195].
The following steps describe a simple procedure to transfer a binary configuration from one machine,
"source", to another, "destination".
ü Empty the folder C:\TwinCAT\3.x\Boot on the source machine.
1. Create (or enable) the module on the source machine.
2. Transfer the folder C:\TwinCAT\3.x\Boot from the source to the destination.
This folder also contains the repository which contains the necessary TMX files.
3. For TwinCAT driver projects (.sys): transfer the driver itself from C:
\TwinCAT\3.x\Driver\AutoInstall\MYDRIVER.sys and if necessary also the PDB file.
4. For TwinCAT driver projects (.sys) and if drivers are new on a machine:
TwinCAT must perform a registration once. Switch TwinCAT via SysTray (right-click->System->Start/
Restart) into RUN mode.
Alternatively this call can be used ("%1" can be replaced as driver name):
sc create %1 binPath= c:\TwinCAT\3.1\Driver\AutoInstall\%1.sys type= kernel
start= auto group= "file system" DisplayName= %1 error= normal
ð You can now start the target machine.
Handling licenses
Note that licenses cannot be transferred in this manner. Please use pre-installed licenses, volume
licenses or other mechanisms for providing licenses.
ü If the machine update is to be performed on several machines and not on a specific machine, the
following options are activated:
Use Relative NetIds in the Routes settings (System > Routes, NetIdManagement tab) and
Virtual Device Names in the Adapter settings of all network and USB devices
(e.g. I/O > Devices > EtherCAT Master, Adapter tab)
The network adapter names of the machine must correspond to the adapter name of the configuration.
1. Copy the boot data of the TwinCAT project, i.e. all files and folders, from the folder
..\<Solution name>\<Project name>\_Boot\<Platform>\.
2. Replace the boot data in the machine's TwinCAT boot directory C:\TwinCAT\3.1\Boot\ by the copied boot
data.
3. If you use C++ modules, please copy the C++ drivers (described in chapter Performing a C++ update
[} 205]).
4. Restart the machine's TwinCAT system.
ð The boot data of the TwinCAT system and thus the TwinCAT system itself are updated.
If the TwinCAT system whose boot data are to be copied is in Run mode and persistent data are also to be
exchanged, the TwinCAT system should first be switched from Run to Config mode so that the persistent
data are saved in the file .bootdata and are available in the boot directory for copying. (See
Port_xxx.bootdata)
To start a program automatically after TwinCAT startup, a shortcut of the program must be created in a
special startup folder in the TwinCAT directory. The program itself must be installed locally on the same PC
as TwinCAT. After the first activation of the Run Mode after starting the TwinCAT runtime system, the
shortcuts in the Startup folder are executed.
The path <TwinCAT>\3.x\Target\StartUp leads to the startup folder. The designation results as follows:
3.5.1 Overview
Controllers generate data to be collected and linked in modern, distributed systems.
Since controllers start off as stand-alone devices, they have independent time bases. In a common
database, it would not be possible to correlate data with respect to time.
In order to counter this problem, it has been possible for quite some time to synchronize controllers with
each other, for example using the network protocol IEEE1588 or PTP.
However, in many scenarios it is sufficient to provide the data with a uniform timestamp. The controllers can
be operated independently of each other, so that on the one hand the hardware costs associated with the
protocols mentioned above are reduced, while on the other hand there is no technical dependency between
the controllers.
This chapter describes the TwinCAT components for adapting timestamps for storing time-synchronous data.
The figure illustrates the basic idea: independent controllers obtain the local timestamp and adjust it using an
offset, which is then used to store the common data.
A central component, the external time interface, is available in TwinCAT real-time for this purpose. This
component
• receives the offset to the corrected time from a configured source (external time provider).
• provides the external time consumer with a corrected time, depending on the current local time.
This corrected time can then be used by different components inside and outside the real-time.
The source is typically either an NTP server or a DC time signal based on EtherCAT, which is synchronized
via EL6688 through PTP (IEEE1588), for example. However, a source can also be implemented by the
customer, so that other time signals can be realized as a source.
In addition to the central component in the TwinCAT real-time described above, the concept thus comprises
two types of components:
1. External time providers: provide an offset for adjusting timestamps of the central component.
For example, a provider obtains a timestamp via NTP (Network Time Protocol, see RFC 4330), from
which it calculates an offset to the local system time and makes this available.
2. External time consumers: use an offset that they obtain from the central component. Thus a
timestamp can be used in the components that leads to comparable data on remote devices.
All TwinCAT components that use timestamps can be consumers, and also customer applications.
3.5.3 Limitations
Some important limitations have to be taken into account:
• The TwinCAT system time is not changed by the external time interface described here
• The external time offsets are made available to the consumers as provided by the provider. It follows
that
◦ the offset must be calculated correctly by the provider.
◦ no monotony can be guaranteed in the timestamps.
• The external time offsets are not saved and subsequently made available for retrieval. This means that
only the current offsets are managed in the TwinCAT system.
On the external time consumer side, different TwinCAT components are able to use the external timestamp.
In addition, there are different access options for applications.
On the external time provider side, modules are provided that can calculate and provide an offset via NTP. In
addition, there is a module that can use the offset via DC. The corresponding interface for providing the
offset is also offered for TwinCAT C++, so that customers can create their own external time providers.
It should be noted that TwinCAT differentiates between four types of timestamps in this concept:
4. Hard: Recommended use e.g. for hardware synchronization where no drift should occur
An external time provider provides one of the possible offsets; only one provider can be defined for each
type.
An external time consumer can then use any offset; all four offset types can be used as required. Thus it is
possible to use different timestamps in different ensembles or operation modes. For example, a local
diagnosis can take place with the local system time, while at the same time aggregated data from different
systems can be corrected with the offset type Soft and stored in a common database.
The interfaces of the corrected timestamps use data types with a length of 8 bytes and are counted from
1.1.1601 in 100 ns steps.
3.5.4.1 Consumers
External time consumers are components that can correct the local system time with an offset. For this
purpose, the components must select or configure an offset of type Soft, Medium or Hard and query it
accordingly.
3.5.4.2 Provider
External time providers are components that determine an external time offset in relation to the local system
time through an external information source and make it available in TwinCAT. This allows external time
consumers to receive a corrected time, independent of the provider.
Configuration
2. The module requires a task from which it is called. This is parameterized via the Context tab of the
module:
The configuration takes place in the Parameter (Init) tab. The parameters have the following meanings:
• TimeType: The type of offset for which this module is to determine an offset.
Client Para:
• bEnable: The module can be disabled to prevent NTP communication.
• sServerName: The name of the NTP server to be used as the source.
• nServerAddress: IP address of an NTP server (used if sServerName is empty).
• nServerPort: The UDP port of the NTP server to be used (default: 123).
• tPollIntervall: The interval in which the NTP queries are to be started. The maximum specified by the
server is taken into account, which may slow down requests.
This module passes a determined offset to TwinCAT via the ITcSetExternalTime [} 217] interface. In addition,
outputs are available for mapping.
Optionally, the same module can also act as an NTP server. Thus, a time signal can be obtained from an
external NTP server (as a client) and simultaneously provided to lower-level systems.
For the external server, the NTP protocol typically requires a minimum query time of 8 seconds or more. The
NTP provider as NTP server, on the other hand, allows more frequent query intervals.
Server function
The server functionality is normally hidden. It can be displayed and configured via Show Hidden
Parameters:
• bEnable: Enable NTP server functionality for this module. To do this, open the udp/123 port in the
Windows firewall.
• nPort: The UDP port that is used to offer the server (default: 123).
The following parameters are used to adjust the NTP information provided. By default, the parameters are
set as specified in the protocol; they can be overwritten here:
• nLeap: Manual configuration of the Leap Indicator.
• nStratum: Manual configuration of the stratum.
• nRoot: Manual configuration of the root server information, as defined depending on the stratum.
Filter function
If offsets are determined by the NTP server query, the module can independently perform a transition from
the old offset to the new offset.
This functionality is normally hidden. It can be displayed and configured via Show Hidden Parameters:
• eMode: A selection of modes. Currently, either no adjustment or a linear adjustment is made (default).
Diagnostics
• bIsConnected: At least 8 successful responses were received from the server (TRUE) or at least 8
requests were not answered (FALSE).
• bIsSynchronized: The determined time of the client has been determined in the last 8 responses with
a deviation smaller than the cycle time of the server.
• nLastUpdate: The time of the last evaluated response from the server.
3.5.4.2.2 DC provider
The DC provider obtains an offset through mapping from an EtherCAT master. It can be used to use time
values from the I/O range as offset, such as those provided by the EtherCAT master (DC time) or an
EL6695.
Configuration
1. Insert a TcCOM module under System->TcCOM Objects and select type TcDcExternalTimeProvider in
the category External Time Provider.
2. The module requires a task from which it is called. This is parameterized via the context tab of the
module:
The configuration takes place in the Parameters (Init) tab. The parameters have the following meanings:
• TimeType: The type of offset for which this module is to determine an offset.
This module passes a determined offset to TwinCAT via the ITcSetExternalTime [} 217] interface. In addition,
outputs are available for mapping.
This module provides a cyclic value for the respective offsets, if necessary.
Sequence
Registration ensures that an offset of only one module can be used at a time.
A more detailed description of the ITcSetExternalTime interface can be found in chapter ITcSetExternalTime
interface [} 217].
3.5.5.1 Structures
Syntax
enum TimeType {
SystemTime = 0,
ExternalTimeHard = 1,
ExternalTimeMedium = 2,
ExternalTimeSoft = 3, // e.g. NTP
};
Values
How the three external timestamp types are used in practice depends on application. The example below is
merely a suggestion.
Name Description
ExternalTimeHard Suggested use for hard offsets that have no drift
ExternalTimeMedium Suggested use for accurate offsets such as IEE1588
ExternalTimeSoft Suggested use for general offsets, such as NTP
3.5.5.2 Interfaces
At this point the interfaces are described which are used for the corrected time stamps.
For the different time formats and representations there is a corresponding list in the C++ SDK.
See: Infosys C/C++
Syntax
TCOM_DECL_INTERFACE("00000067-0000-0000-e000-000000000064", ITcSetExternalTime)
struct __declspec(novtable) ITcSetExternalTime : public ITcExternalTime
Methods
Name Description
RegisterExternalTimeProvider [} 218] Registering a provider for an offset related to
TimeType
UnregisterExternalTimeProvider [} 218] Logging off a provider for an offset related to
TimeType
SetExternalTimeOffset [} 218] Provide a new offset for the registered TimeType
Comments
Syntax
HRESULT TCOMAPI RegisterExternalTimeProvider(OTCID oidProvider, TimeType type) = 0;
Parameter
oidProvider: (type: OTCID) The object ID of the provider; normally the object ID of the calling party
Return value
Type: HRESULT
Description
Syntax
HRESULT TCOMAPI UnregisterExternalTimeProvider(OTCID oidProvider, TimeType type) = 0;
Parameter
oidProvider: (type: OTCID) The object ID of the provider; normally the object ID of the calling party
Return value
Type: HRESULT
Description
Syntax
HRESULT TCOMAPI SetExternalTimeOffset(OTCID oidProvider, TimeType type, __int64 offset) = 0;
Parameter
oidProvider: (type: OTCID) The object ID of the provider; normally the object ID of the calling party
Return value
Type: HRESULT
Description
It is valid for the offset ExternalTime = Internal Time + Offset. I.e. if the time in TwinCAT is in the past, the
offset must be greater than 0.
Syntax
TCOM_DECL_INTERFACE("00000066-0000-0000-e000-000000000064", ITcExternalTime)
struct __declspec(novtable) ITcExternalTime : public ITcUnknown
Methods
Name Description
SystemTimeToExternalTime [} 219] Calculation of a corrected timestamp in relation to the
system time
ExternalTimeToSystemTime [} 220] Calculation of the system time in relation to a
corrected timestamp
GetExternalTimeOffset [} 220] Retrieving an offset in relation to the TimeType
GetExternalTimeProvider [} 220] Queries the ObjectID of the current provider
Syntax
HRESULT TCOMAPI SystemTimeToExternalTime(TimeType type, __int64& time) = 0;
Parameter
type: (type: TimeType [} 217]) The TimeOffset type to be used for the calculation
Return value
Type: HRESULT
Description
Syntax
HRESULT TCOMAPI ExternalTimeToSystemTime(TimeType type, __int64& time) = 0;
Parameter
Type: (type: TimeType [} 217]) The TimeOffset type to be used for the calculation
Return value
Type: HRESULT
Description
The offset valid at the time of the call is used to determine the local system time.
Syntax
HRESULT TCOMAPI GetExternalTimeOffset(TimeType type, __int64& offset) = 0;
Parameter
Return value
Type: HRESULT
Description
Syntax
HRESULT TCOMAPI GetExternalTimeProvider(TimeType type, OTCID& oidProvider) = 0;
Parameter
type: (type: TimeType [} 217]) The TimeOffset type whose provider is to be queried.
oidProvider: (type: OTCID&) The ObjectID that is set to the ObjectID of the provider.
Return value
Type: HRESULT
Description
1. ADS Notification: ADS notifications contain a time stamp that contains the time at which the data was
changed.
An ADS client sends an ADS command before the AddDeviceNotification. This causes the target
system to register which type of corrected time stamp is required from this ADS client.
2. ADS Read: A corrected time stamp can be read out via ADS Read. This can be used to obtain a
corrected time stamp in an ADS Sum command at the time when the ADS commands were executed.
3.5.7 Samples
Various samples illustrating the use of the corrected timestamps are provided for the benefit of the user:
• PLC Consumer [} 223]: A PLC program accesses corrected timestamps.
• C++ Consumer [} 224]: A C++ TcCOM module accesses corrected timestamps.
• ADS Consumer [} 223]: An ADS client in user mode accesses the corrected timestamps.
• C++ Provider [} 224]: A C++ TcCOM module determines an offset and provides it.
The corrected timestamps are also used by other components of the TwinCAT system. A required
configuration can be found with the respective components.
Download
Description
Different UseCases for receiving corrected timestamps are illustrated in the Main() method:
• Reading of the provider, the offset and the corrected timestamp from the system service for the
different offsets: uncorrected(0), soft(1), medium(2), hard(3), plus an invalid value (4) to illustrate the
error behavior.
• Reading the corrected timestamps from a PLC program for the different offsets.
• Reading the provider used and all providers.
• Subscribing to a variable in the PLC; the time provided via notification has a corrected timestamp. The
output takes place in the AdsNotificationCallback() method.
Download
Description
The PLC program essentially consists of the function block FB_TcExternalTime. It provides functions for
reading a corrected timestamp from the TwinCAT system. The variable _eTimeType represents the type
(soft, medium, hard) and can be parameterized.
In MAIN, this function block is used for the eTimeType "Soft" to ensure that the corrected time set by NTP is
used.
Download
Description
Here you can parameterize your own NTP server under Parameter (Init), if the default pool.ntp.org cannot
be reached.
The C++ module cyclically determines a local timestamp in the CycleUpdate() method and corrects it. It can
be traced in the respective steps using the debugger. The corrected timestamp is provided as a parameter
(online).
The type required for this can be configured as parameter "TimeType" in the TcCOM object.
Download
Description
The offset provider receives the offset to be provided as DataArea "ExternalTime.nOffset“. This is transferred
to the TwinCAT system as a TimeType medium, which can also be configured at runtime under Parameter
(Init).
In the CycleUpdate() method, the SetExternalTimeOffset method is used for this after a corresponding
register has been created using RegisterExternalTimeProvider for a TimeType.
3.5.8 FAQ
Please note that only one component can use the port for NTP (udp/123). This means that either the
TwinCAT NTP server functionality [} 209] or the Windows NTP server can be used.
The Windows NTP server is disabled by default and can be activated later:
ü Windows 10
1. The registry key is set:
HKLM\System\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
Enabled = 1
2. The Windows Time system service is started and set to Autostart, if appropriate.
3.6 TcRTeInstall
The TcRTeInstall tool manages real-time Ethernet compatible devices of the control system. This involves
installing a real-time capable driver for the standard Ethernet connection of a control system.
Call the driver via the menu TWINCAT → Show Realtime Ethernet Compatible Devices... .
Alternatively you can install the driver by adding a network capable device to the I/O configuration (e.g.
EtherCAT). In the adapter dialog of the network capable device, call the TcRTeInstall application with the
button Compatible Devices...:
You can directly call the installation application for the TwinCAT RT Ethernet adapter on a TwinCAT 3
runtime system.
Location:
TcRteInstall displays the real-time capable (Compatible devices) and non-real-time capable (Incompatible
devices) network interface cards.
1. Select a real-time capable network interface card from the list of "compatible devices".
2. Click on the Install button.
ð The TwinCAT driver for real-time Ethernet and the TwinCAT Ethernet protocol are installed for the
selected device.
The option Show Bindings shows the connected protocol of the installed RT Ethernet device.
4 Type system
TwinCAT 3 provides a type system for the management of data types. The type system consists of system
basic types and can be extended by custom data types through the customer project.
This documentation describes the TwinCAT 3 type system and the management of data types. The TMC
editor, with which the data types are created and described, is described in the documentation entitled “C++”
in the TwinCAT Module Class Editor (TMC) section.
Data types can be defined at various points and transferred if necessary to the TwinCAT 3 type system.
Thus, local data types can also exist that don't exist in the TwinCAT 3 type system.
You will find the type system in the TwinCAT 3 project tree as an object in the SYSTEM subtree.
The following data types (TMC editor: "Specifications") are displayed on the Data Types tab:
• Alias: these data types are simply synonyms for other data types. For example, a time range (duration)
can be defined in a specific project as UINT.
• Struct: these data types are structures of other data types, which in turn can also be structures.
• Enum: these data types describe enumerations.
• Array: these data types are arrays with a defined number of dimensions as well as the respective
length.
The interfaces are displayed on the Interfaces tab. This data type describes an interface that can be
provided or used by different components such as function blocks or TcCOM modules. An interface consists
of methods that have a respective signature.
The Functions tab shows PLC functions and PLC function blocks whose definition was read from in a TMC/
TML file.
The Event Classes tab defines event classes that are used for the TwinCAT 3 EventLogger.
Data types (DUTs) can be created and saved in a PLC project. These data types initially exist locally in the
PLC project and are not usable from the point of view of TwinCAT 3. If the data types are used in the input/
output memory map (%I* / %Q*), they are imported into the TwinCAT 3 type system so that they can also be
linked through the mapping.
With the Convert to Global Type command in the context menu of a DUT in the PLC project tree you can
transfer the DUT to the type system of the higher-level TwinCAT project. Thereafter the data type is usable in
the PLC via the external types and is managed in the TwinCAT 3 type system.
To transfer a data type from the TwinCAT 3 type system to a PLC project, you can use the source code in
the “Data Types” dialog.
In C++ projects the data types are defined in the TMC editor in parallel with the modules. Like the internal
DUTs in the PLC project, these data types are local and thus invisible in the TwinCAT 3 type system.
Through the use of the data types in a C++/Matlab module, which has also been instanced, the data types
are inserted into the TwinCAT 3 type system.
You can also insert a data type into the TwinCAT 3 type system without using the data type in an instanced
C++ module by activating the Persistent (even if unused) check box.
In some cases it may be useful to use data types in several projects. In particular for EAP/network variables
it can be useful to use the same data type on both the publisher and subscriber side.
You can create individual TMC files for this under the "Type System" node.
A check box appears in front of every data type in the editor window of the TMC files. Using the check box
you can specify which data type is to be deposited in the respective TMC file.
The data types are additionally deposited in the TMC files. You can use these files on different computers
and in different projects, for example, by means of file exchange or version control.
However, the file itself must not be used by different projects at the same time, so that these are normally
stored in the project directory and this project is then available as a copy on different computers, e.g. via
version control.
Since the GUID is used to identify the data type, the type system recognizes this double deposition
automatically.
When using data types after they have been integrated in several projects, make sure that changes to the
data types are made as far as possible only in one place. Otherwise the different variants can no longer be
merged to a common version.
See also:
At the same time, each data type has a list of data types that it keeps hidden ("Datatype Hides").
This makes it possible to use different versions of a data type in the project at the same time.
The Update Instances... command in the context menu of a data type in the type system editor (Data Types
tab) employs the respectively latest version for selected uses of a data type.
TwinCAT has a so-called reference counter for each data type. This counter can be seen in the RefCount
column in the editor of the type system. Each use of the data type in a project, and also in an editor and so
on, increments the counter. If a counter is at 0, the data type is no longer used and is discarded.
If the Persistent (even if unused) setting in the context menu of a data type is activated, the data type
description will be saved in the TwinCAT project file (*.tsproj) even if the data type is not used in the
TwinCAT project. The setting is activated by default with data types that are newly created directly via the
type system editor. This ensures that the data types are not directly deleted if the TwinCAT project is saved
before the new data types are used.
If a SharedTMC is used underneath the Type System object in the TwinCAT project tree, the setting should
not be activated for data types in this file as the data types are saved both in the project and in the
SharedTMC. The setting is deactivated by default with data types that are newly created directly via a
SharedTMC editor.
The Auto Delete (if unused) setting should not be manually changed, but is shown for the sake of
completeness. Data types for which this setting is activated are hidden for PLC projects and cannot be used
there. The setting should not be used, for example, to automatically clean the type system. Unused data
types are not automatically saved in the TwinCAT project and are then no longer in the type system after
reloading the TwinCAT project.
With the default alignment of 8 bytes it can be ensured that the access to data types functions optimally in
terms of runtime and access on different platforms. Deviation from this should only take place in exceptional
cases.
• Red if the alignment within the data type no longer obeys the rules.
The TMC editor offers the possibility to specify the memory layout of a data type for a selected alignment.
If the size of a data type that is used in another data type is changed, then this data type must also be
adjusted. The TMC editor offers an appropriate recursive function for this at the data type overview level.
Depending on the field of application there are different files that contain the data types:
• .tsproj file – TwinCAT project
This file contains the entire TwinCAT project, including the complete TwinCAT 3 type system.
Download finder
Our download finder contains all the files that we offer you for downloading. You will find application reports,
technical documentation, technical drawings, configuration files and much more.
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff
products!
The addresses of Beckhoff's branch offices and representatives round the world can be found on our internet
page: www.beckhoff.com
You will also find further documentation for Beckhoff components there.
Beckhoff Support
Support offers you comprehensive technical assistance, helping you not only with the application of
individual Beckhoff products, but also with other, wide-ranging services:
• support
• design, programming and commissioning of complex automation systems
• and extensive training program for Beckhoff system components
Hotline: +49 5246 963-157
e-mail: support@beckhoff.com
Beckhoff Service
The Beckhoff Service Center supports you in all matters of after-sales service:
• on-site service
• repair service
• spare parts service
• hotline service
Hotline: +49 5246 963-460
e-mail: service@beckhoff.com
Beckhoff Headquarters
Huelshorstweg 20
33415 Verl
Germany
Phone: +49 5246 963-0
e-mail: info@beckhoff.com
web: www.beckhoff.com
Beckhoff®, TwinCAT®, TwinCAT/BSD®, TC/BSD®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®,
TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Arm, Arm9 and Cortex are trademarks or registered trademarks of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere.
Intel, the Intel logo, Intel Core, Xeon, Intel Atom, Celeron and Pentium are trademarks of Intel Corporation or its subsidiaries.
The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner
of the mark on a worldwide basis.
Microsoft, Microsoft Azure, Microsoft Edge, PowerShell, Visual Studio, Windows and Xbox are trademarks of the Microsoft group of companies.
More Information:
www.beckhoff.com/automation