CANopen Slave V3 Protocol API 06 EN
CANopen Slave V3 Protocol API 06 EN
CANopen Slave
V3.7.0
Table of Contents
1 Introduction ............................................................................................................................................. 4
1.1 Abstract .......................................................................................................................................... 4
1.2 List of Revisions ............................................................................................................................. 4
1.3 System Requirements .................................................................................................................... 4
1.4 Intended Audience ......................................................................................................................... 4
1.5 Specifications ................................................................................................................................. 5
1.5.1 Technical Data .................................................................................................................................. 5
1.6 Terms, Abbreviations and Definitions ............................................................................................ 9
1.7 References to Documents.............................................................................................................. 9
1.8 Legal Notes .................................................................................................................................. 10
1.8.1 Copyright ......................................................................................................................................... 10
1.8.2 Important Notes ............................................................................................................................... 10
1.8.3 Exclusion of Liability ........................................................................................................................ 11
1.8.4 Export .............................................................................................................................................. 11
1.8.5 Registered Trademarks ................................................................................................................... 11
2 Getting Started ...................................................................................................................................... 12
2.1 Task Structure of the CANopen Slave V3 Stack.......................................................................... 12
2.2 Configuration ................................................................................................................................ 13
2.3 CANopen – Basic Topics ............................................................................................................. 14
2.3.1 NMT Slave State Machine ............................................................................................................... 14
2.3.2 Communication Objects, COB-IDs and Priority of Processing ........................................................ 17
2.3.3 Relation between Communication Objects and NMT States ........................................................... 19
2.3.4 Events ............................................................................................................................................. 19
2.3.5 Process Data Objects (PDO)........................................................................................................... 28
2.4 Standard Mode vs. Extended Mode ............................................................................................. 35
2.4.1 How to decide between Operation in Standard Mode and Extended Mode .................................... 35
2.4.2 Where can I switch between Standard Mode and Extended Mode? ............................................... 35
2.4.3 Standard Mode ................................................................................................................................ 36
2.4.4 Extended Mode ............................................................................................................................... 38
2.4.5 Object Dictionary with Firmware Functionality ................................................................................. 40
3 The Application Interface .................................................................................................................... 42
3.1 Configuration ................................................................................................................................ 42
3.1.1 CANOPEN_APS_SET_CONFIGURATION_REQ/CNF – Set Configuration ................................... 43
3.1.2 Bus parameter ................................................................................................................................. 45
3.2 CANopen Slave Services ............................................................................................................. 50
3.2.1 CANOPEN_SLAVE_STARTSTOP_REQ/CNF – Start/Stop CANopen Network ............................. 51
3.2.2 CANOPEN_SLAVE_EXCHANGE_DATA_REQ/CNF – Exchange Data ......................................... 54
3.2.3 CANOPEN_SLAVE_SEND_EMCY_REQ/CNF – Send Emergency Message ................................ 58
3.2.4 CANOPEN_SLAVE_SEND_EMCY_IND/RES – Emergency Message Indication........................... 61
3.2.5 CANOPEN_SLAVE_SET_NMT_STATE_REQ/CNF – Set NMT State............................................ 64
3.2.6 CANOPEN_SLAVE_SEND_TIME_STAMP_REQ/CNF – Send Time Stamp .................................. 67
3.2.7 CANOPEN_SLAVE_RECV_TIME_STAMP_IND/RES – Receive Time Stamp Indication.............. 70
3.2.8 CANOPEN_SLAVE_SEND_TXPDO_REQ – Send TxPDO Request .............................................. 73
3.2.9 CANOPEN_SLAVE_RECV_RXPDO_REQ/CNF – Receive RxPDO Request ................................ 76
3.2.10 CANOPEN_SLAVE_RECV_RXPDO_IND/RES – Receive RxPDO Indication ................................ 79
3.2.11 CANOPEN_SLAVE_SET_EVENTS_INDICATED_REQ/CNF – Set Events Indicated Request...... 82
3.2.12 CANOPEN_SLAVE_GET_IO_INFO_REQ/CNF – Get I/O Info ....................................................... 86
3.2.13 CANOPEN_SLAVE_NMT_STATE_CHANGE_IND/RES – NMT State Change Indication ............. 88
3.2.14 CANOPEN_SLAVE_ERR_CTRL_EVENT_IND/RES – Error Control Event Indication ................... 91
3.2.15 CANOPEN_SLAVE_NMT_COMMAND_IND/RES – NMT Command Indication............................. 95
3.2.16 CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ/CNF – Setup PDO Indication .................. 99
3.2.17 CANOPEN_SLAVE_RECEIVE_PDO_IND/RES – Receive PDO Indication ................................. 102
3.3 Hardware Switches for the Adjustment of Slave Address and Baudrate ...................................105
3.4 CAN-DL Task ............................................................................................................................. 107
3.5 ODV3 Task ................................................................................................................................. 107
4 Status information .............................................................................................................................. 109
4.1 Extended Status ......................................................................................................................... 109
4.2 Extended Status Block ............................................................................................................... 110
5 Special Topics .................................................................................................................................... 113
5.1 Using LOM ................................................................................................................................. 113
1 Introduction
1.1 Abstract
This manual describes the application interface of the CANopen Slave stack.
1.5 Specifications
The data below applies to CANopen Slave firmware and stack version 3.7.0. The firmware/stack
has been designed in order to meet the CiA Work Draft 301 V4.02 specification (see reference [2]).
Features Parameter
Maximum number of input data Depends on the used mode and settings. See below.
Maximum number of output data Depends on the used mode and settings. See below.
Maximum number of receive PDOs Depends on the used mode and settings. See below.
Maximum number of transmit PDOs Depends on the used mode and settings. See below.
Exchange of process data via PDO transfer (synchronized, remotely requested,
event driven (change of date)), requested by application
(via packet))
Acyclic communication SDO Up- and Download (Server only),
Emergency message (producer),
Timestamp (producer/consumer)
Functions Node guarding / life guarding,
heartbeat
1 producer
max. 64 consumer (netX 50/51/100/500)
max. 32 consumer (netX 52)
max. 4 consumer (netX 10)
PDO Mapping
NMT Slave
SYNC protocol (consumer)
Error behavior in state operational:
change to state pre-operational
no state change
change to state stopped
Baud rates 10 kBit/s to 1 MBit/s
Automatic detection
Data transport layer CAN Frames
can be accessed by programming the CAN DL layer, see
reference [5]
CAN Frame type 11 Bit
11/29 Bit layer 2 transparent
Table 2: Technical Data - Protocol Stack
netX Available
netX 10 yes
netX 50 yes
netX 51 yes (from stack V3.3.1)
netX 52 yes (from stack V3.5.1)
netX 100, netX 500 yes
Table 3: Technical Data – Available for netX
Features Parameter
DMA Support for PCI targets yes
Table 4: Technical Data – PCI-DMA
Slot Number
Features Devices
Slot number supported for CIFX 50-CO, CIFX 50E-CO, CIFX 70E-CO
Table 5: Technical Data – Slot Number
Configuration
For configuration of standard mode with default settings:
by SYCON.net configuration software (Download or exported configuration file named
config.nxd),
by netX Configuration tool.
For configuration of standard mode with default settings and configured settings and extended
mode:
by packet to transfer configuration parameters.
Diagnostic
Firmware supports common and extended diagnostic in the dual-port-memory for loadable
firmware
Features Parameter
Default number of input data 512 bytes (netX 50/100/500)
64 bytes (netX 10)
Default number of output data 512 bytes (netX 50/100/500)
64 bytes (netX 10)
Default number of receive PDOs 64 (netX 50/100/500)
8 (netX 10)
Default number of transmit PDOs 64 (netX 50/100/500)
8 (netX 10)
Table 6: Technical Data - Protocol Stack (Standard Mode – Default Settings)
Note: The EDS files for Hilscher standard products contain the functionality that matches
the default settings. SYCON.net and the netX Configuration tool only configure the
default settings.
Features Parameter
Maximum number of input data 1020 bytes
Maximum number of output data 1020 bytes
Number of receive PDOs 0 … 255 (netX 50/100/500)
for mapping objects 2200 … 2203
0 … 8 (netX 10)
for mapping objects 2200 … 2203
Number of transmit PDOs 0 … 255 (netX 50/100/500)
for mapping objects 2000 … 2003
0 … 8 (netX 10)
for mapping objects 2000 … 2003
Table 7: Technical Data - Protocol Stack (Standard Mode – Configured Settings)
Note 1: Using other settings than the default settings requires a suitable EDS file.
Note 2: The actual maximum number of IO Data and PDOs depends on the available
amount of memory.
Note 3: SYCON.net and netX configuration tool do not support the configuration of the
extended mode.
Note: The actual maximum number of IO Data and PDOs depends on the available
amount of memory.
To use the extended mode requires creating a suitable EDS file. The knowledge of the EDS
specification is required.
Features Parameter
Maximum number of input data 2048 bytes
Maximum number of output data 2048 bytes
Maximum number of receive PDOs 256
Maximum number of transmit PDOs 256
Table 8: Technical Data - Protocol Stack (Extended Mode)
Other settings than default must be set via “Set Configuration Packet” and object dictionary
configuration.
Concerning the extended mode, also see section Standard Mode vs. Extended Mode on page 35.
Note: SYCON.net and netX configuration tool do not support the configuration of the
extended mode.
All variables, parameters and data used in this manual have basically the LSB/MSB (“Intel”) data
representation. This corresponds to the convention of the Microsoft C Compiler.
1.8.4 Export
The delivered product (including the technical data) is subject to export or import laws as well as
the associated regulations of different counters, in particular those of Germany and the USA. The
software may not be exported to countries where this is prohibited by the United States Export
Administration Act and its additional provisions. You are obligated to comply with the regulations at
your personal responsibility. We wish to inform you that you may require permission from state
authorities to export, re-export or import the product.
2 Getting Started
2.1 Task Structure of the CANopen Slave V3 Stack
The figure below shows the internal structure of the tasks which represent the CANopen Slave
stack:
The dual-port memory is used for exchange of information, data and packets. Configuration and IO
data will be transferred using this way.
The user application only accesses the task located in the highest layer namely the AP task which
constitutes the application interface of the CANopen Slave stack.
AP task
The AP task provides the interface to the user application and the control of the stack. It also
completely handles the Dual Port Memory interface of the communication channel. In detail, it is
responsible for the following:
Handling the communication channels DPM-interface
Configuration of the protocol stack
IO Process data exchange
Channel mailboxes
Watchdog supervision
Handling of applications packets
Send/Receive packets
CAN_DL Task
The CAN_DL Task handles the interface of the XC CAN and is responsible for configuration,
events and sending and receiving of CAN-Frames.
The CAN_DL Task also provides its own API for low-level programming on level 2 (Data Link
Layer) of the OSI model of networking. This is described in a separate manual (namely reference
[5]).
ODV3 Task
The ODV3 task handles all SDO accesses (i.e. acyclic accesses) to the CANopen object dictionary
as described in the CANopen specification, section 9.5, p.79 (see reference [2]).
2.2 Configuration
The CANopen Slave stack requires configuration parameters e.g. node address. Configuration
parameters can be set
from the application using the ‘Set Configuration’ packet
using the configuration software SYCON.net (only applicable for Standard Mode)
using the configuration software netX configuration tool (only applicable for Standard Mode)
The Initialization Sub-state (red rectangle in Figure 3) performs the basic initialization actions. After
power-on, exactly this state is reached and automatically these actions are performed. When all
actions are performed, the slave finally reaches the Pre-operational state.
The Reset Communication Sub-state provides the possibility to perform the basic device
initialization. The parameters of the communication profile are set to their power-on values. After
this has been finished, the slave switches to Initialization Sub-state and proceeds with the basic
initialization actions.
The Reset Application sub-state provides the possibility to perform the profile initialization. The
parameters of the manufacturer-specific profile area and of the standardized device profile area
are set to their power-on or default values. After this has been finished, the slave switches to Reset
Communication Sub-state.
The following mapping between the state of the CANopen Slave V3 State Machine and the
communication status (0x14 in Common Status) is as follows:
If the CANopen Slave V3 Protocol Stack is in state Pre-operational, the communication state
is set to IDLE.
If the CANopen Slave V3 Protocol Stack is in state Stopped, the communication state is set
to STOP.
If the CANopen Slave V3 Protocol Stack is in state Operational, the communication state is
set to OPERATIONAL.
The following COB-IDs are restricted and may therefore not be used by all configurable COBs and
by PDO, SDO, SYNC, TIME STAMP and EMCY:
COB-ID Cause
0 Used by NMT Service, fixed assignment
1 Reserved
257-384 Reserved for Safety-relevant Data Objects (in CANopen Safety Framework)
1409-1535 Used by default SDO (tx) , fixed assignment
1537-1663 Used by default PDO (rx) , fixed assignment
1760 Reserved
1793-1919 Used by NMT Error Control, fixed assignment
2020-2047 Reserved
Table 12: COB-IDs with Restrictions of Use
2.3.4 Events
2.3.4.1 NMT State Change Events
NMT State Change Events happen every time the NMT Slave state changes. For a description of
the NMT Slave State Machine, see section 2.3.1 “NMT Slave State Machine” on page 14.
Various reasons may have caused this change of NMT state:
External request by the CANopen Master via NMT object for module control services. This is
the most usual case.
Internal request; an application event initiated a module control service (for instance, a
CANOPEN_SLAVE_SET_NMT_STATE_REQ/CNF – Set NMT State request.)
A hardware reset occurred.
The NMT State Change Event is related to the following packets of the CANopen Slave protocol
stack:
CANOPEN_SLAVE_SET_NMT_STATE_REQ/CNF – Set NMT State for setting the state of
the NMT Slave State Machine from your application.
CANOPEN_SLAVE_NMT_STATE_CHANGE_IND/RES – NMT State Change Indication for
making your application aware of state changes in the NMT Slave State Machine.
CANOPEN_SLAVE_NMT_COMMAND_IND/RES – NMT Command Indication for enabling
the host application to react to the requests for Module Control Services issued by the
CANopen Master.
The Time Stamp Event is related to the following packets of the CANopen Slave protocol stack:
CANOPEN_SLAVE_SEND_TIME_STAMP_REQ/CNF – Send Time Stamp allows your
application to send a time stamp according to the CANopen time stamp protocol. In this
case, the CANopen Slave acts as a producer. A time stamp event is caused at the side of
the consumer(s) (recipient(s) of the time stamp message.
CANOPEN_SLAVE_RECV_TIME_STAMP_IND/RES – Receive Time Stamp Indication for
making your application aware of the reception of a time stamp sent by the Time Stamp
Producer via the Time Stamp Protocol. In this case, the CANopen Slave acts as a consumer.
Here, the time stamp event occurs at the CANopen Slave and needs to be handled there by
your application.
Node Guarding
The concept of node guarding consists mainly of the NMT Master maintaining a database
containing the expected states of all connected NMT Slave devices (besides other information) and
comparing these with their actual states which are regularly requested from the NMT Slave
devices.
The Node Guarding Protocol works as follows:
The NMT Master cyclically polls in order to check whether the NMT Slave is still present at the bus.
This polling is denominated as the guarding request. Actually, this is accomplished by sending a
CAN remote frame to the NMT Slave.
The NMT Slave reacts by sending a CAN Data Frame with 1 Byte data. The most significant bit is
toggled every time, i.e. it is 0 when it was 1 last time and vice versa. Bits 0 to 6 are used to
transmit the state to the NMT State.
This is illustrated in Figure 4: Node Guarding Protocol.
The time between two guarding requests of the Master is denominated as the guard time.
Node Guarding can take place during the following states of the slave:
Pre-operational
Operational
Stopped
Life Guarding
Additionally, the slaves try to detect possible failure of the Master. If they do not receive guarding
requests within an (adjustable) time, they recognize this as failure of the Master (life-guarding
event). This time is denominated as life time of the CANopen node. It must be longer than the
guard time. The life time is usually specified as life-time factor which is then multiplied with the
guard time in order to determine the life-time of the NMT Slave.
The guard time can be specified in object 0x100C of the object dictionary. The life time factor can
be adjusted in object 0x100D. Both values set to 0 indicates the guarding feature is currently
disabled. (In this case, it would be mandatory to use the Heartbeat feature described subsequently.
Heartbeat
Alternatively, there is another error control service available which avoids sending remote frames:
the Heartbeat Mechanism.
In the CANopen network, there may be one Heartbeat Producer cyclically sending heartbeat
requests. The time between to such Heartbeat requests is denominated as the Heartbeat Producer
Time.
There may be multiple Heartbeat Consumers within the CANopen network on which the Heartbeat
signal is received and causes an indication. The Heartbeat Consumer supervises these
indications. If in an (adjustable) time no such indication occurs, the Heartbeat Consumer assumes
the Heartbeat Producer has failed and indicates a Heartbeat event. This time is denominated as
Heartbeat Consumer Time. It is specified in multiples of 1 ms in object 0x1016 of the object
dictionary.
The Producer Heartbeat Time set to 0 indicates the Heartbeat feature is currently disabled. (In this
case, it would be mandatory to use the Node Guarding feature described above.
Each CANopen device must implement Node Guarding/life-guarding or the heartbeat mechanism
or both. If both are implemented, they may not both be active at the same time. It is recommended
to use the heartbeat mechanism.
The CANOPEN_SLAVE_ERR_CTRL_EVENT_IND/RES – Error Control Event Indication informs
you whenever anode guarding or heartbeat error occurs on the CANopen network or a CANopen
Slave on the network starts or stops supervision by node guarding/life guarding or by heartbeat.
If the application has been previously registered for this event, the automatic switching to the new
state will be inhibited. For switching to the new local NMT state, the application is responsible
exclusively. You can then use the new local NMT state of the CANopen Slave after service
execution as value for parameter ulNmtState in the response packet.
If the application has not been registered for this event previously, switching to the new state will
be done automatically.
The parameters are transferred within one communication object with 2 Byte on the CANopen
network. The NMT communication object is always assigned to the COB-ID 0 which is the COB-ID
with the highest priority at all.
The Synchronization Event does not transfer any data, therefore the signal is transferred within
one communication object with a data length of 0 Byte (or 1 Byte) on the CANopen network.
The recommended COB-ID for the NMT communication object is 128. This is the same value as
used in the predefined connection set.
The object dictionary contains three relevant values concerning the SYNC event.
The actual value of the COB-ID of the SYNC object can be retrieved from object 0x1005
within the object dictionary.
Object 0x1006 contains the communication cycle time. This value represents the time
between two subsequent SYNC events (this object is not supported by the CANopen Slave
V3 protocol stack).
Object 0x1007 contains the synchronous window length. The synchronous window length
specifies the time within which the synchronous PDOs may be processed. Its value must be
smaller than the applied communication cycle time. (this object is not supported by the
CANopen Slave V3 protocol stack)
The SYNC Event is related to the working with synchronous PDOs, see section Synchronous vs.
asynchronous Data Transmission on page 31.
The parameters are transferred within one communication object on the CANopen network. The
NMT communication object is usually assigned to a COB-ID in the range between 129 and 255.It
delivers
An emergency error code
An error register
5 bytes of manufacturer-specific error information
The Emergency Event (EMCY) is related to the following packets of the CANopen Slave protocol
stack:
CANOPEN_SLAVE_SEND_EMCY_REQ/CNF – Send Emergency Message allowing you to
send an emergency telegram from your application to any consumer within the CANopen
network.
In the Producer Consumer Model, each node may send data at any time (for instance in case of a
pre-defined event happening). Each station may listen to the transmitted messages. When a
message is received, the node decides on its own whether the message is accepted, or not.
This offers the advantage of greater flexibility and easy establishment of event-driven processing
for instance compared to the Master-Slave Model.
Data transmission is done from a device (the Producer) to one or more other devices (the
Consumer(s)) without any confirmation (non-confirmed mode).The broadcast mechanism of the
CAN low-level protocol is used to accomplish this .The assignment is made via identifiers which
must match between Producer and Consumer.
2.3.5.2 Services
There are two services available for dealing with PDOs:
The Write Service
The Write Service is implemented by the packet CANOPEN_SLAVE_SEND_TXPDO_REQ
– Send TxPDO Request. It acts on the Transmit-PDOs (TxPDOs).
and the Read Service.
The Read Service is implemented by the packets CANOPEN_SLAVE_RECV_RXPDO_REQ/CNF
– Receive RxPDO Request and CANOPEN_SLAVE_RECV_RXPDO_IND/RES – Receive
RxPDO Indication. It acts on the Receive-PDOs (RxPDOs).
Important note: The perspective of view to be applied in this context is that of the
CANopen device. An IO device acting as CANopen Slave would send its input data
via its TxPDOs and receive its output data via its RxPDOs.
The CANopen Slave protocol stack limits the number of available TxPDOs and RxPDOs to 8 each
(for Hilscher devices with the netX 10 processor) and to 64 each (for any other netX-based
Hilscher devices).
The numbers and the length of the PDOs are application-specific and must be defined in the
device’s profile.
Event-driven communication
A PDO can be transmitted when a specific event that has been previously defined occurs locally at
the producer. This communication mode is called event-driven PDO communication. The driving
event may be any local event such as a change of an input or elapsing of a specific timer.
This case is equivalent to the push model described above.
Synchronized communication
Transmission of a PDO can be triggered periodically (i.e. a repeated and precise time
synchronization signal is received). For this purpose, CANopen provides the SYNC object.
The PDO can be coupled to the SYNC object. This forces the CANopen Slave to process the
PDOs (TxPDOs and RxPDOs).
Let us now clarify the terms synchronous, asynchronous, cyclic and acyclic in context with data
transmission
2.3.5.4 Synchronous vs. asynchronous Data Transmission
CAN distinguishes between synchronous and asynchronous data transmission.
Synchronous data transmission means in this context coupled to a synchronization signal
(such as the one supplied by the SYNC object). Synchronous data transmission takes place
within a well-defined time window following the SYNC signal. PDOs offer the only
mechanism for synchronous data transmission. It is strongly recommended that the priority of
synchronous PDOs should be higher than that of the asynchronous PDOs.
Asynchronous data transmission means in this context event-driven. Asynchronous data
transmission can generally take place at any time without restriction.
1. This value specifies exactly the number of SNC events between two transmissions of the
PDO.
2. Device-specific application event
3. Device-profile defines application event
Transmission types 254 and 255 differ in the following aspect:
Transmission type 254 is used for device-specific application events.
Transmission type 255 is used for application events defined in the device profile.
Figure 9: PDO Mapping explains the relationship between object dictionary (left upper part), PDO
mapping structure (right upper part) and the resulting PDO containing the application objects to be
mapped (lower part).
One entry in the PDO mapping table requires 32 bit. It consists of:
16 bit containing the index of the object dictionary entry containing the application object to
be mapped
8 bit containing the subindex of the object dictionary entry containing the application object to
be mapped
8 bit containing the length information.
The PDO mapping table can at maximum contain 8 of such entries, therefore the number of
application objects in one PDO is also limited to 8.
Standard Mode
1. If your intention is to run existing applications from CANopen Slave Stack V2, you should
definitely decide to use Standard Mode. Running existing applications with only slight
changes is possible as Standard Mode offers a high degree of compatibility to the CANopen
Slave Stack V2.
2. Also, if you want to avoid having to fill in larger amounts of objects into the object dictionary,
it is recommended to use the Standard Mode.
Extended Mode
On the other hand, it is recommended to use the Extended Mode, if you want to implement a
complete device profile, if you want to work with an object dictionary of your own, if you want
to map objects which had been added to the object dictionary by your application or if you do
not have any legacy applications. Only Extended Mode allows to fully exploit the new
possibilities of the CANopen Slave V3 Protocol Stack.
The ulVendorId parameter provides the value for the Vendor ID entry in the object dictionary of
the CANopen slave (Object 0x1018, sub-index 1) if bit 4 in parameter ulCanopenFlags is set.
Otherwise, the vendor ID is set to zero.
DPM output image byte offset Send object index Send object sub-index
0 2000h 01h
1 2000h 02h
.. .. ..
127 2000h 80h
128 2001h 01h
.. .. ..
510 2003h 7Fh
511 2003h 80h
Table 19: Mapping of Output Data (in case of unchanged object lengths and no netX 10 applied)
Note: In Extended Mode, configuration can only be done by “Set Configuration” packet.
However, the auto-start option is not available.
3.1 Configuration
The user application can use this service in order to configure the AP task with parameters. After
the stack receives this request, the AP task will configure the CANopen Slave.
}__PACKED_POST;
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-task Process Queue
QUE_CANOPE
NAPS
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPESL Destination End Point Identifier, specifying the final receiver of the
VT0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 68 Packet Data Length (In Bytes)
32
ulId UINT32 0 ... 2 -1 Packet Identification As Unique Number
ulSta UINT32 See section 6.1.1 Codes of the CANopen-APS-Task
ulCmd UINT32 0x00002E04 CANOPEN_APS_SET_CONFIGURATION_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Structure CANOPEN_APS_SET_CONFIGURATION_REQ_DATA_T
ulSystemFlags UINT32 System Flags
BIT 0: AUTOSTART / APPLICATION CONTROLLED
The start of the device can be performed either application controlled or
automatically:
Automatic: (not available in Extended Mode)
Network connections are opened automatically without taking care of
the state of the host application.
Application controlled:
The channel firmware is forced to wait for the host application to set the
Application Ready flag.
communication with a controller after a device start is allowed without
BUS_ON flag, but the communication will be stopped if the BUS_ON flag
changes state to 0
communication with controller is allowed only with the BUS_ON flag.
BIT 4: ADDRESS_SWITCH
Should be set when hardware address switch is used and there is no
TAG present.
BIT 5: BAUD_SWITCH
Should be set when hardware baudrate switch is used and there is no
TAG present.
ul29BitMask
Here it is possible to define the bits, the filter uses. In other words: All bits currently not set will not
be filtered out.
ul29BitCode
Those are the bits set to filter the IDs. Those bits must have the value ‘1’ in the acceptance code
and the reaching COB-ID to pass the filter. If a bit is not set in the Acceptance Mask, the filter will
pass the message anyway.
struct CANOPEN_SLAVE_STD_BUSPARAM_DATA_Ttag
{
TLR_UINT32 ulVendorId; /* Vendor ID */
TLR_UINT32 ulProductCode; /* Product code */
TLR_UINT32 ulSerialNumber; /* Serial number */
TLR_UINT32 ulRevisionNumber; /* Revision number */
TLR_UINT32 ulDeviceType; /* Device Type */
};
struct CANOPEN_SLAVE_EXT_BUSPARAM_DATA_Ttag
{
TLR_UINT16 usNumOfRxPdo; /* Number of receive PDOs */
TLR_UINT16 usNumOfTxPdo; /* Number of transmit PDOs */
TLR_UINT32 aulReserved[9]; /* Reserved, set to zero */
};
/*********************************************************************************/
/** type of <code>CANOPEN_APS_SET_CONFIGURATION_REQ_DATA_Ttag</code> */
typedef struct CANOPEN_APS_SET_CONFIGURATION_REQ_DATA_Ttag
CANOPEN_APS_SET_CONFIGURATION_REQ_DATA_T;
#define CANOPEN_SLAVE_MIN_SLAVE_NODE_ID 1
#define CANOPEN_SLAVE_MAX_SLAVE_NODE_ID 127
struct CANOPEN_SLAVE_BUSPARAM_DATA_Ttag
{
TLR_UINT32 ulSlaveNodeId; /* Node ID */
TLR_UINT32 ulBaudrate; /* Baud-rate */
TLR_UINT32 ulCanOpenFlags; /* CANopen flags */
union
{
CANOPEN_SLAVE_STD_BUSPARAM_DATA_T tStdBusParam; /* Parameter for standard mode*/
CANOPEN_SLAVE_EXT_BUSPARAM_DATA_T tExtBusParam; /* Parameter for extended mode*/
} uMode;
};
struct CANOPEN_APS_SET_CONFIGURATION_REQ_DATA_Ttag
{
TLR_UINT32 ulSystemFlags; /* System flags */
TLR_UINT32 ulWdgTime; /* Watchdog time */
CANOPEN_SLAVE_BUSPARAM_DATA_T tBusParam; /* Bus parameter */
};
/*********************************************************************************/
/** type of <code>CANOPEN_APS_SET_CONFIGURATION_REQ_Ttag</code> */
typedef struct CANOPEN_APS_SET_CONFIGURATION_REQ_Ttag
CANOPEN_APS_SET_CONFIGURATION_REQ_T;
struct CANOPEN_APS_SET_CONFIGURATION_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header */
CANOPEN_APS_SET_CONFIGURATION_REQ_DATA_T tData; /** packet data */
};
/*********************************************************************************/
The following packet of the CANopen Slave-Task will be denied if the ‘Configuration Lock’ flag is
set:
CANOPEN_SLAVE_SET_EVENTS_INDICATED_REQ/CNF – Set Events Indicated Request
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_STARTSTOP_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_STARTSTOP_REQ_Ttag
CANOPEN_SLAVE_PACKET_STARTSTOP_REQ_T;
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x00002902 CANOPEN_SLAVE_STARTSTOP_REQ - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_STARTSTOP_REQ_DATA_T
ulMode UINT32 Depending on this assignment, communication is either started or
stopped:
0 Stop CANopen
1 Start CANopen
Table 28: CANOPEN_SLAVE_PACKET_STARTSTOP_REQ_T – Start/Stop Communication Request
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_STARTSTOP_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_STARTSTOP_CNF_Ttag
CANOPEN_SLAVE_PACKET_STARTSTOP_CNF_T;
Packet Description
Structure Information CANOPEN_SLAVE_PACKET_STARTSTOP_CNF_T Type: Confirmation
Variable Type Value / Range Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x00002903 CANOPEN_SLAVE_STARTSTOP_CNF - Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
structure CANOPEN_SLAVE_STARTSTOP_CNF_DATA_T
ulMode UINT32 Depending on this assignment, communication is either started or
stopped:
0 Stop CANopen
1 Start CANopen
Table 29: CANOPEN_SLAVE_PACKET_STARTSTOP_CNF_T – Start/Stop Communication Confirmation
TLR_UINT8 abSendData[CANOPEN_SLAVE_MAX_SEND_SUB_IDX];
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_REQ_Ttag
CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_REQ_T;
Packet Description
Structure Information CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_REQ_T Type: Request
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPEN
SLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 24.. 279 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x290A CANOPEN_SLAVE_EXCHANGE_DATA_REQ - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_EXCHANGE_DATA_REQ_DATA_T
ulRecvIndex UINT32 0x2200...0x220 Receive object index
3
ulRecvSub UINT32 1.. 255 Receive object sub-index
Index
ulRecvData UINT32 0 ...255 Number of data bytes to be read
Cnt
ulSendIndex UINT32 0x2000...0x200 Send object index
3
ulSendSub UINT32 1.. 255 Send object sub-index
Index
ulSendDataCn UINT32 0..255 Number of data bytes to be sent
t
abSendData UINT8[] Data to be sent
[255]
Table 30: CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_REQ_T – Exchange Data Request
TLR_UINT8 abRecvData[CANOPEN_SLAVE_MAX_RECV_SUB_IDX];
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_CNF_Ttag
CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_CNF_T;
Packet Description
Structure Information CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_CNF Type: Confirmation
Variable Type Value / Range Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 24 .. 279 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x290B CANOPEN_SLAVE_EXCHANGE_DATA_CNF- Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
structure CANOPEN_SLAVE_EXCHANGE_DATA_CNF_DATA_T
ulRecvIndex UINT32 0x2200...0x220 Receive object index
3
ulRecvSub UINT32 1.. 255 Receive object sub-index
Index
ulRecvData UINT32 0 ..255 Number data byte to be read
Cnt
ulSendIndex UINT32 0x2000..0x2003 Send object index
ulSendSub UINT32 1.. 255 Send object sub-index
Index
ulSendDataCn UINT32 0 ..255 Number data byte to be sent
t
abRecvData UINT8[ ] Receive data
[255]
Table 31: CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_CNF_T –Exchange Data Confirmation
#define CANOPEN_SLAVE_EMCY_DATA_SIZE 5
struct CANOPEN_SLAVE_SEND_EMCY_REQ_DATA_Ttag
{
TLR_UINT16 usErrorCode;
TLR_UINT8 abManErrorCode[CANOPEN_SLAVE_EMCY_DATA_SIZE];
TLR_UINT8 bErrorRegister;
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_SEND_EMCY_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_SEND_EMCY_REQ_Ttag
CANOPEN_SLAVE_PACKET_SEND_EMCY_REQ_T;
struct CANOPEN_SLAVE_PACKET_SEND_EMCY_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SEND_EMCY_REQ_DATA_T tData; /** packet request data. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 8 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2918 CANOPEN_SLAVE_SEND_EMCY_REQ - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_SEND_EMCY_REQ_DATA_T
usErrorCode UINT16 Emergency Error Code, see Table 94.
abManError UINT8[] Area for manufacturer-specific error codes
Code[5]
bErrorRegister UINT8 Bit mask See Table 95.
Table 32: CANOPEN_SLAVE_PACKET_SEND_EMCY_REQ_T – Send Emergency Message Request
struct CANOPEN_SLAVE_PACKET_SEND_EMCY_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2919 CANOPEN_SALVE_SEND_EMCY_CNF - Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Table 33: CANOPEN_SLAVE_PACKET_SEND_EMCY_CNF_T – Send Emergency Message Confirmation
struct CANOPEN_SLAVE_SEND_EMCY_IND_DATA_Ttag
{
TLR_UINT16 usErrorCode;
TLR_UINT8 abManErrorCode[CANOPEN_SLAVE_EMCY_DATA_SIZE];
TLR_UINT8 bErrorRegister;
};
struct CANOPEN_SLAVE_PACKET_SEND_EMCY_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SEND_EMCY_IND_DATA_T tData; /** packet induest data. */
};
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 QUE_CANOPE Destination Queue-Handle of CANopen slave-Task Process Queue
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 8 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2938 CANOPEN_SLAVE_SEND_EMCY_IND - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_SEND_EMCY_IND_DATA_T
usErrorCode UINT16 Emergency Error Code, see Table 94
abManError UINT8[] Area for manufacturer-specific error codes, see Table 96 and Table 97.
Code[5]
bErrorRegister UINT8 Bit mask See Table 95.
Table 34: CANOPEN_SLAVE_PACKET_SEND_EMCY_IND_T – Send Emergency Message Indication
struct CANOPEN_SLAVE_PACKET_SEND_EMCY_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 QUE_CANOPE Destination Queue-Handle of CANopen slave-Task Process Queue
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 8 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2939 CANOPEN_SLAVE_SEND_EMCY_RES - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Table 35: CANOPEN_SLAVE_PACKET_SEND_EMCY_RES_T – Response to Send Emergency Message Indication
The value 1 for Operational is only supported for compatibility reasons. However, according to the
CANopen specification, only the NMT Master is allowed to set the NMT state to Operational.
struct CANOPEN_SLAVE_SET_NMT_STATE_REQ_DATA_Ttag
{
TLR_UINT32 ulNmtState; /* NMT state */
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_SET_NMT_STATE_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_SET_NMT_STATE_REQ_Ttag
CANOPEN_SLAVE_PACKET_SET_NMT_STATE_REQ_T;
struct CANOPEN_SLAVE_PACKET_SET_NMT_STATE_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SET_NMT_STATE_REQ_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPEN
SLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x0000291A CANOPEN_SLAVE_SET_NMT_STATE_REQ - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_NODE_NMT_COMMAND_REQ_DATA_T
ulNmtState UINT32 1,2,128..130 State requested to be set
See Table 36: NMT States
Table 37: CANOPEN_SLAVE_PACKET_SET_NMT_STATE_REQ_T – Set NMT State Request
struct CANOPEN_SLAVE_SET_NMT_STATE_CNF_DATA_Ttag
{
TLR_UINT32 ulNmtState; /* NMT state */
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_SET_NMT_STATE_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_SET_NMT_STATE_CNF_Ttag
CANOPEN_SLAVE_PACKET_SET_NMT_STATE_CNF_T;
struct CANOPEN_SLAVE_PACKET_SET_NMT_STATE_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SET_NMT_STATE_CNF_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x0000291B CANOPEN_SLAVE_SET_NMT_STATE_CNF - Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Structure CANOPEN_SLAVE_NODE_NMT_COMMAND_REQ_DATA_T
ulNmtState UINT32 1,2,128..130 NMT State having really been set
See Table 36: NMT States
Table 38: CANOPEN_SLAVE_PACKET_SET_NMT_STATE_CNF_T – Set NMT State Confirmation
The contents of the time stamp is divided into a milliseconds part and a days part:
The milliseconds part (variable ulMilliseconds) contains the number of milliseconds that
have occurred since midnight.
The days part (variable usDays) contains the number of days that have occurred since
January 1, 1984.
struct CANOPEN_SLAVE_SEND_TIME_STAMP_REQ_DATA_Ttag
{
TLR_UINT32 ulMilliseconds;
TLR_UINT16 usDays;
};
/*********************************************************************************/
struct CANOPEN_SLAVE_PACKET_SEND_TIME_STAMP_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SEND_TIME_STAMP_REQ_DATA_T tData; /** packet request data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 6 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x291E CANOPEN_SLAVE_SEND_TIME_STAMP_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_SEND_TIME_STAMP_REQ_DATA_T
ulMilliseconds UINT32 0 ... 86.399.999 Milliseconds part of time stamp (number of milliseconds that have
occurred since last midnight)
usDays UINT16 0..65535 Days part of time stamp (number of days that have occurred since
January 1, 1984)
Table 39: CANOPEN_SLAVE_PACKET_SEND_TIME_STAMP_REQ_T - Send Time Stamp Request
struct CANOPEN_SLAVE_PACKET_SEND_TIME_STAMP_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
struct CANOPEN_SLAVE_RECV_TIME_STAMP_IND_DATA_Ttag
{
TLR_UINT32 ulMilliseconds;
TLR_UINT16 usDays;
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_IND_Ttag
CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_IND_T;
struct CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_RECV_TIME_STAMP_IND_DATA_T tData; /** packet request data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 6 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2920 CANOPEN_SLAVE_RECV_TIME_STAMP_IND - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_RECV_TIME_STAMP_IND_DATA_T
ulMilliseconds UINT32 0 ... 86.399.999 Milliseconds part of time stamp (number of milliseconds that have
occurred since last midnight)
usDays UINT16 0..65535 Days part of time stamp (number of days that have occurred since
January 1, 1984)
Table 41: CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_IND_T - Receive Time Stamp Indication
struct CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2921 CANOPEN_SLAVE_RECV_TIME_STAMP_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 42: CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_RES- Response to Receive Time Stamp Indication
This can be done simultaneously for up to 16 TxPDOs, whose numbers must be assigned to the
members of array aulRecvRxPdoNumber[] of the request packet.
The 16 TxPDOs will be processed separately and for each the resulting status code
(success/error) will be stored in array aulRecvRxPdoResult[] of the confirmation packet
#define CANOPEN_SLAVE_SEND_TXPDO_REQ_MAX 16
struct CANOPEN_SLAVE_SEND_TXPDO_REQ_DATA_Ttag
{
TLR_UINT32 aulSendTxPdoNumber[CANOPEN_SLAVE_SEND_TXPDO_REQ_MAX];
};
struct CANOPEN_SLAVE_PACKET_SEND_TXPDO_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SEND_TXPDO_REQ_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 64 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2922 CANOPEN_SLAVE_SEND_TXPDO_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_SEND_TXPDO_REQ_DATA_T
aulSendTxPdoNu UINT32[ 1..255 for each Array of numbers of TxPDOs for sending
mber[] 16] number
Table 43: CANOPEN_SLAVE_PACKET_SEND_TXPDO_REQ_T – Send TxPDO Request
#define CANOPEN_SLAVE_SEND_TXPDO_REQ_MAX 16
struct CANOPEN_SLAVE_SEND_TXPDO_CNF_DATA_Ttag
{
TLR_UINT32 aulSendTxPdoResult[CANOPEN_SLAVE_SEND_TXPDO_REQ_MAX];
};
struct CANOPEN_SLAVE_PACKET_SEND_TXPDO_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SEND_TXPDO_CNF_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 64 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2923 CANOPEN_SLAVE_SEND_TXPDO_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_SEND_TXPDO_CNF_DATA_T
aulSendTxPdoRe UINT32[ Array of Results of sending TxPDOs
sult[] 16]
Table 44: CANOPEN_SLAVE_PACKET_SEND_TXPDO_CNF_T – Confirmation to Send TxPDO Request
#define CANOPEN_SLAVE_RECV_RXPDO_REQ_MAX 16
struct CANOPEN_SLAVE_RECV_RXPDO_REQ_DATA_Ttag
{
TLR_UINT32 aulRecvRxPdoNumber[CANOPEN_SLAVE_RECV_RXPDO_REQ_MAX];
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_RECV_RXPDO_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_REQ_Ttag
CANOPEN_SLAVE_PACKET_RECV_RXPDO_REQ_T;
struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_RECV_RXPDO_REQ_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 64 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2924 CANOPEN_SLAVE_RECV_RXPDO_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_RECV_RXPDO_REQ_DATA_T
aulRecvRxPdoNu UINT32[ 1..255 for each Array of numbers of RxPDOs to be received
mber[] 16] number
Table 45: CANOPEN_SLAVE_PACKET_RECV_RXPDO_REQ_T - Receive RxPDO Request
#define CANOPEN_SLAVE_RECV_RXPDO_REQ_MAX 16
struct CANOPEN_SLAVE_RECV_RXPDO_CNF_DATA_Ttag
{
TLR_UINT32 aulRecvRxPdoResult[CANOPEN_SLAVE_RECV_RXPDO_REQ_MAX];
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_RECV_RXPDO_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_CNF_Ttag
CANOPEN_SLAVE_PACKET_RECV_RXPDO_CNF_T;
struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_RECV_RXPDO_CNF_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 64 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2925 CANOPEN_SLAVE_RECV_RXPDO_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_RECV_RXPDO_CNF_DATA_T
aulRecvRxPdoRe UINT32[ Array of Results of received RxPDOs
sult[] 16]
Table 46: CANOPEN_SLAVE_PACKET_RECV_RXPDO_CNF_T – Confirmation to Receive RxPDO Request
#define CANOPEN_SLAVE_RECV_RXPDO_IND_MAX 16
struct CANOPEN_SLAVE_RECV_RXPDO_IND_DATA_Ttag
{
TLR_UINT32 aulRecvRxPdoNumber[CANOPEN_SLAVE_RECV_RXPDO_IND_MAX];
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_RECV_RXPDO_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_IND_Ttag
CANOPEN_SLAVE_PACKET_RECV_RXPDO_IND_T;
struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_RECV_RXPDO_IND_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 64 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2926 CANOPEN_SLAVE_RECV_RXPDO_IND - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_RECV_RXPDO_IND_DATA_T
aulRecvRxPdoNu UINT32[ 1..255 for each Array of numbers of received RxPDOs
mber [] 16] number
Table 47: CANOPEN_SLAVE_PACKET_RECV_RXPDO_IND_T –Receive RxPDO Indication
struct CANOPEN_SLAVE_PACKET_RECV_RXPDO_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2927 CANOPEN_SLAVE_RECV_RXPDO_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 48: CANOPEN_SLAVE_PACKET_RECV_RXPDO_RES_T – Response to Receive RxPDO Indication
Note: This packet will be denied in case of being called as long as the
‘Configuration lock’ flag of the netX is set!
The following types of indications may occur in the CANopen Protocol Stack V3 and indicate that a
specific event has happened:
NMT State Change Event (CANOPEN_SLAVE_NMT_STATE_CHANGE_IND/RES – NMT
State Change Indication, for more information see page 88)
Time Stamp Event (CANOPEN_SLAVE_RECV_TIME_STAMP_IND/RES – Receive Time
Stamp Indication, for more information see page 70)
Error Control Event (CANOPEN_SLAVE_ERR_CTRL_EVENT_IND/RES – Error Control
Event Indication, for more information see page 91)
Receive PDO Event (CANOPEN_SLAVE_RECV_RXPDO_IND/RES – Receive RxPDO
Indication, for more information see page 79)
NMT Command Event (CANOPEN_SLAVE_NMT_COMMAND_IND/RES – NMT Command
Indication, for more information see page 95)
Send EMCY Event (CANOPEN_SLAVE_SEND_EMCY_IND/RES – Emergency Message
Indication, for more information see page 61)
Each type of indication is associated to a bit of the bit mask contained in variable
ulEventsIndicated in the following manner:
Type Bit No. Mask Mask (symbolic name)
(numeric
value)
NMT State 0 0x01 CANOPEN_SLAVE_EVENT_NMT_STATE_CHANGE_MSK
Change Event
Time Stamp 1 0x02 CANOPEN_SLAVE_EVENT_TIME_STAMP_MSK
Event
Error Control 2 0x04 CANOPEN_SLAVE_EVENT_ERR_CTRL_MSK
Event
Receive PDO 3 0x08 CANOPEN_SLAVE_EVENT_RECV_RXPDO_MSK
Event
NMT 4 0x10 CANOPEN_SLAVE_EVENT_NMT_COMMAND_MSK
Command
Event
Send EMCY 5 0x20 CANOPEN_SLAVE_EVENT_SEND_EMCY_MSK
Event
Table 49: Bit Mask ulEventsIndicated
Each of these bits within the bit mask of ulEventsIndicated allows switching on (when set to 1)
and off (when set to 0) the associated type of event indication.
The higher bits of ulEventsIndicated should always be set to 0.
The NMT State Change Events include the Module Control Services described in the CANopen
Specification CiA Draft Standard 301, subsection 9.2.6.1.1.
These are:
Start Remote Node
Stop Remote Node
Enter Pre-Operational
struct CANOPEN_SLAVE_SET_EVENTS_INDICATED_REQ_DATA_Ttag
{
TLR_UINT32 ulEventsIndicated;
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_REQ_Ttag
CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_REQ_T;
struct CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SET_EVENTS_INDICATED_REQ_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2928 CANOPEN_SLAVE_SET_EVENTS_INDICATED_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_SET_EVENTS_INDICATED_REQ_DATA_T
ulEventsIndicated UINT32 Bit mask Indicated events
Table 50: CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_REQ_T - Set Events Indicated Request
struct CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2929 CANOPEN_SLAVE_SET_EVENTS_INDICATED_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 51: CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_CNF_T – Confirmation to Set Events Indicated
Request
Note: This information is also part of the slave state, see section 5.2.4
.CANOPEN_SLAVE_STATE_CHANGE_IND/RES – Change of Task State
Indication.
struct CANOPEN_SLAVE_PACKET_GET_IO_INFO_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x292A CANOPEN_SLAVE_GET_IO_INFO_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 52: CANOPEN_SLAVE_PACKET_GET_IO_INFO_REQ_T - Get I/O Info Request
struct CANOPEN_SLAVE_GET_IO_INFO_CNF_DATA_Ttag
{
TLR_UINT32 ulRecvDataCnt;
TLR_UINT32 ulSendDataCnt;
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_GET_IO_INFO_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_GET_IO_INFO_CNF_Ttag
CANOPEN_SLAVE_PACKET_GET_IO_INFO_CNF_T;
struct CANOPEN_SLAVE_PACKET_GET_IO_INFO_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_GET_IO_INFO_CNF_DATA_T tData; /** packet confirmation data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 8 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x292B CANOPEN_SLAVE_GET_IO_INFO_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_GET_IO_INFO_CNF_DATA_T
32
ulRecvDataCnt UINT32 0 ... 2 -1 Receive Data Count
32
ulSendDataCnt UINT32 0 ... 2 -1 Send Data Count
Table 53: CANOPEN_SLAVE_PACKET_GET_IO_INFO_CNF_T – Confirmation to Get I/O Info Request
This indication packet allows the application to react and perform all necessary application-internal
changes after the change of NMT state. After having performed these, the application should send
the CANOPEN_SLAVE_NMT_STATE_CHANGE_RES response packet to the CANopen Master.
For possible reasons of changes of NMT Slave states see section “NMT State Change Events” on
page 19.
struct CANOPEN_SLAVE_NMT_STATE_CHANGE_IND_DATA_Ttag
{
TLR_UINT32 ulNmtState;
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_IND_Ttag
CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_IND_T;
struct CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_NMT_STATE_CHANGE_IND_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x292E CANOPEN_SLAVE_NMT_STATE_CHANGE_IND - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_NMT_STATE_CHANGE_IND_DATA_T
ulNmtState UINT32 1,2,128..130 New NMT State, see Table 36: NMT States
Table 55: CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_IND_T - NMT State Change Indication
struct CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x292F CANOPEN_SLAVE_NMT_STATE_CHANGE_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 56: CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_RES_T – Response to NMT State Change Indication
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_ERR_CTRL_EVENT_IND_DATA_Ttag</code> */
typedef struct CANOPEN_SLAVE_ERR_CTRL_EVENT_IND_DATA_Ttag
CANOPEN_SLAVE_ERR_CTRL_EVENT_IND_DATA_T;
/** type of <code>CANOPEN_SLAVE_ERR_CTRL_EVENT_Ttag</code> */
typedef struct CANOPEN_SLAVE_ERR_CTRL_EVENT_Ttag
CANOPEN_SLAVE_ERR_CTRL_EVENT_T;
#define CANOPEN_SLAVE_MAX_ERR_CTRL_EVENT 16
struct CANOPEN_SLAVE_ERR_CTRL_EVENT_Ttag
{
TLR_UINT32 ulEvent;
TLR_UINT32 ulNodeId;
};
struct CANOPEN_SLAVE_ERR_CTRL_EVENT_IND_DATA_Ttag
{
CANOPEN_SLAVE_ERR_CTRL_EVENT_T atErrCtrlEvent[CANOPEN_SLAVE_MAX_ERR_CTRL_EVENT];
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_IND_Ttag
CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_IND_T;
struct CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_ERR_CTRL_EVENT_IND_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2930 CANOPEN_SLAVE_ERR_CTRL_EVENT_IND - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_ERR_CTRL_EVENT_IND_DATA_T
atErrCtrlEvent[] CANOP Structure containing up to 16 Error Control Events.
EN_SLA Also see Table 57: Array Elements of atErrCtrlEvent[16] and
VE_ER Table 58: Possible Values of ulEvent and their Meanings.
R_CTRL
_EVENT
_T[16]
Table 59: CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_IND_T - Error Control Event Indication
struct CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2931 CANOPEN_SLAVE_ERR_CTRL_EVENT_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 60: CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_RES_T – Response to Error Control Event Indication
Reset communication should set the state to Initialization, sub-state Reset Communication.
This means first restoring the communication profile area of the Object Dictionary with the power-
on values and then run the initialization process like after power-on.
Reset node should set the state to Initialization, sub-state Reset Application.
This means first restoring the manufacturer-specific area and the device profile area of the slave’s
Object Dictionary with the default values, then restoring the communication profile area of the
Object Dictionary with the power-on values and finally run the initialization process like after power-
on.
The NMT Protocol associated with the NMT Command Event is illustrated in Figure 14: NMT
Protocol.
struct CANOPEN_SLAVE_NMT_COMMAND_IND_DATA_Ttag
{
TLR_UINT32 ulNmtCommand; /* Request NMT command from NMT master */
};/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_NMT_COMMAND_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_NMT_COMMAND_IND_Ttag
CANOPEN_SLAVE_PACKET_NMT_COMMAND_IND_T;
struct CANOPEN_SLAVE_PACKET_NMT_COMMAND_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_NMT_COMMAND_IND_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2932 CANOPEN_SLAVE_NMT_COMMAND_IND - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_NMT_COMMAND_IND_DATA_T
ulNmtCommand UINT32 Valid NMT Requested NMT command from NMT master
command
Table 62: CANOPEN_SLAVE_PACKET_NMT_COMMAND_IND_T - NMT Command Indication
struct CANOPEN_SLAVE_NMT_COMMAND_RES_DATA_Ttag
{
TLR_UINT32 ulNmtState; /* New local NMT state */
};
/*********************************************************************************//**
type of <code>CANOPEN_SLAVE_PACKET_NMT_COMMAND_RES_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_NMT_COMMAND_RES_Ttag
CANOPEN_SLAVE_PACKET_NMT_COMMAND_RES_T;
struct CANOPEN_SLAVE_PACKET_NMT_COMMAND_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_NMT_COMMAND_RES_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2933 CANOPEN_SLAVE_NMT_COMMAND_RES - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_NMT_COMMAND_RES_DATA_T
ulNmtState UINT32 Valid NMT New local NMT state
State
Table 63: CANOPEN_SLAVE_PACKET_NMT_COMMAND_RES_T – Response to NMT Command Indication
3.2.16 CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ/CNF –
Setup PDO Indication
This request can be used by the application for enabling and disabling PDO indications. While
enabled, the CANopen slave sends an indication with each received PDO to the application. The
PDO indication is described in section CANOPEN_SLAVE_RECEIVE_PDO_IND/RES – Receive
PDO in this manual.
The parameter ulSetupPdoIndication can be used to decide whether you want to disable (1)
or enable PDO indications (2 or 3) and whether you want to send multiple PDOs within a single
packet
struct CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ_DATA_Ttag
{
TLR_UINT32 ulSetupPdoIndication; /* Parameter for PDO indications*/
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_REQ_Ttag
CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_REQ_T;
struct CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x29BA CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ- Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ_DATA_T
ulSetupPdoIndic UINT32 0x00000001 Disable PDO Indications
ation 0x00000002 Enable PDO Indication
0x00000003 Enable PDO Indication (for multiple PDO transfer)
Table 64: CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_REQ_T – Setup PDO Indication Request
struct CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x29BB CANOPEN_SLAVE_SETUP_PDO_INDICATION_CNF– Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Table 65: CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_CNF_T – Setup PDO Indication Confirmation
Note: No PDO indications are sent to the application until this functionality is explicitly
enabled. Enabling PDO indications is described in this manual in section
CANOPEN_SLAVE_SETUP_PDO_INDICATION_REQ/CNF – Setup PDO Indication.
Enabling can be done for single or multiple PDO transfer with one packet.
#define CANOPEN_SLAVE_RECEIVE_PDO_IND_MAX 16
#define CANOPEN_SLAVE_RECEIVE_PDO_IND_MAX_DATA 8
struct CANOPEN_SLAVE_PDO_DATA_Ttag
{
TLR_UINT32 ulPdoNumber; /* PDO number */
TLR_UINT32 ulIdentifier; /* CAN identifier */
TLR_UINT32 ulLength; /* Data length */
TLR_UINT8 abPdoData[CANOPEN_SLAVE_RECEIVE_PDO_IND_MAX_DATA]; /* PDO data */
};
struct CANOPEN_SLAVE_RECEIVE_PDO_IND_DATA_Ttag
{
CANOPEN_SLAVE_PDO_DATA_T atPdoData[CANOPEN_SLAVE_RECEIVE_PDO_IND_MAX];
}; /*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_RECEIVE_PDO_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_RECEIVE_PDO_IND_Ttag
CANOPEN_SLAVE_PACKET_RECEIVE_PDO_IND_T;
struct CANOPEN_SLAVE_PACKET_RECEIVE_PDO_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_RECEIVE_PDO_IND_DATA_T tData; /** packet data. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle of AP task Process Queue
ulSrc UINT32 Source Queue-Handle of CANopen slave-Task Process Queue
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process
ulSrcId UINT32 ulCANOPENS Source End Point Identifier, specifying the origin of the packet inside
LV0Id the Source Process
ulLen UINT32 12.. 20 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x000029BC CANOPEN_SLAVE_RECEIVE_PDO_IND- Indication
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_RECEIVE_PDO_IND_DATA_T
ulPdoNumber UINT32 1..255 Number of received PDO
ulIdentifier UINT32 0..2047 Identifier (COB-ID) of received PDO
ulLength UINT32 0..8 Length of received PDO
abPdoData[8] UINT8[8] Data of received PDO
Table 66: CANOPEN_SLAVE_PACKET_RECEIVE_PDO_IND_T – Receive PDO Indication
struct CANOPEN_SLAVE_PACKET_RECEIVE_PDO_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle of CANopen slave-Task Process Queue
ulSrc UINT32 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x000029BD CANOPEN_SLAVE_RECEIVE_PDO_RES - Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Table 67: CANOPEN_SLAVE_PACKET_RECEIVE_PDO_RES_T – Receive PDO Response
Behavior at Start-up
In general, the firmware stack can be configured in different ways. Only one type of configuration
can be active at a certain time. These are evaluated at start-up in the following order:
SYCON.net database
iniBatch database (via netX Configuration Tool)
Warmstart Request packet (compatibility)
Set Configuration Request packet
After a Restart the stack will first search for the SYCON.net database files (config.nxd). If these
are found all other configuration methods will not be accepted. If no SYCON.net database exists,
but an iniBatch database exists, its configuration will be used and configuration packets will be not
accepted.
If no database is found the stack is unconfigured until the receipt of the first configuration packet. In
this case the firmware waits for the SET_CONFIGURATION_REQ or WARMSTART_REQ packet. Once
one of these packets (i.e. SET_CONFIGURATION_REQ) was received, the other one (i.e.
WARMSTART_REQ) will be rejected.
The host has the possibility to modify the configuration with the packet
RCX_SET_FW_PARAMETER_REQ/CNF (Set the Value of the Firmware Parameter).
Using the hardware switches for adjusting of slave address and baudrate requires the option
Application_controlled being active (either when configuring using SET_CONFIGURATION_REQ
packet (see CANOPEN_APS_SET_CONFIGURATION_REQ/CNF – Set Configuration on page
43) or in the SYCON.net database file config.nxd).
The stack will start the device with the received configuration as soon as the application ready flag
is set by the host application.
On starting the stack the hardware switches are evaluated if hardware switches are enabled via
the TAG. The values from the hardware switches will overwrite the values, which was set via
database or packet previously. This can be avoided if the hardware switches are disabled via the
“Tag List Editor” tool. A description of the “Tag List Editor” tool is given in reference [3].
Power On
Database
No
available
Yes
No Automatic Start
HW switch
enabled?
Yes
Configure stack
4 Status information
4.1 Extended Status
The content of the channel specific extended status block is specific to the implementation.
Depending on the protocol, a status area may or may not be present in the dual-port memory. It is
always available in the default memory map (see section 3.2.1 of netX Dual-Port Memory Manual).
Note: Have in mind, that all offsets mentioned in this section are relative to the beginning
of the common status block, as the start offset of this block depends on the size and
location of the preceding blocks.
struct CANOPEN_SLAVE_EXTENDED_STATE_Ttag
{
TLR_UINT32 ulFlags;
TLR_UINT32 ulNodeState;
TLR_UINT32 ulBusOffEveCnt;
TLR_UINT32 ulErrorPassiveEveCnt;
TLR_UINT32 ulRxOverflowCnt;
TLR_UINT32 ulTxOverflowCnt;
TLR_UINT32 ulReserved;
TLR_UINT32 ulTimeoutCnt;
TLR_UINT32 aulReserved[4];
TLR_UINT32 ulDiagInfoCount;
TLR_UINT32 ulLastDiagInfo;
TLR_UINT32 ulMaxRecvIdx;
TLR_UINT32 ulMaxSendIdx;
TLR_UINT32 aulAddDetail[CANOPEN_SLAVE_ADD_DETAIL_SIZE];
};
ulNodeState
Internal node state of node:
0: Unknown state
1: Operational state
2: Stop
128: Pre-operational state
255: Initializing
ulBusOffEveCnt
Number of Bus-off events
ulErrorPassiveEveCnt
5 Special Topics
5.1 Using LOM
To get the handle of the process queue of the CANopen APS task the Macro TLR_QUE_IDENTIFY()
needs to be used.
The returned handle has to be used as value ulDest in all request packets to be sent to the AP
task. This handle is the same handle that has to be used in conjunction with the macros like
TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the AP task.
To get the handle of the process queue of the CANopen slave-task the Macro TLR_QUE_IDENTIFY()
needs to be used.
ASCII queue name Description
“QUE_CANOPENSLV” Name of the CANopen slave-task process queue
The returned handle has to be used as value ulDest in all request packets to be sent to the
CANopen slave-Task. This handle is the same handle that has to be used in conjunction with the
macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the CANopen slave-
Task.
Note: Use this packet only when working with linkable object modules. It has not been
designed for usage in the context of loadable firmware.
Note: This packet is used by the AP task only and will not be routed from the user
application to the CANopen Slave-task.
struct CANOPEN_SLAVE_REGISTER_REQ_DATA_Ttag
{
TLR_UINT8 bReserved; /* Reserved for further use, set to zero*/
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_REGISTER_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_REGISTER_REQ_Ttag
CANOPEN_SLAVE_PACKET_REGISTER_REQ_T;
};
/*********************************************************************************/
Packet Description
structure CANOPEN_SLAVE_REGISTER_REQ_DATA_T
bReserved UINT32 0 Reserved for further use, set to zero
Table 74: CANOPEN_SLAVE_PACKET_APP_REGISTER_REQ_T – Register Application Request
struct CANOPEN_SLAVE_REGISTER_CNF_DATA_Ttag
{
TLR_UINT8 bReserved; /* Reserved for further use */
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_REGISTER_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_REGISTER_CNF_Ttag
CANOPEN_SLAVE_PACKET_REGISTER_CNF_T;
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task”
ulCmd UINT32 0x2901 CANOPEN_SLAVE_REGISTER_CNF - Command
ulExt UINT32 0 Extension, reserved
ulRout UINT32 x Routing Information, do not change
Structure CANOPEN_SLAVE_APP_REGISTER_CNF_DATA_T
bReserved UINT32 0 Reserved for further use, set to zero
Table 75: CANOPEN_SLAVE_PACKET_APP_REGISTER_CNF_T – Register Application Confirmation
Note: Use this packet preferably when working with linkable object modules. In the
context of loadable firmware we recommend to use ‘config reload’ instead.
Note: This command does not delete configuration databases. If the CANopen Slave is
configured by configuration database, this configuration is reloaded again after the
initialize command is completed.
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_INITIALIZE_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_INITIALIZE_REQ_Ttag
CANOPEN_SLAVE_PACKET_INITIALIZE_REQ_T;
Packet Description
Structure Information CANOPEN_SLAVE_PACKET_INITIALIZE_REQ_T Type: Request
Variable Type Value / Range Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPEN
SLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2904 CANOPEN_SLAVE_SLAVE_REQ – Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_INITIALIZE_REQ_DATA_T
ulReserved UINT32 0 Reserved for further use, set to zero
Table 76: CANOPEN_SLAVE_PACKET_INITIALIZE_REQ_T – Initialization of CANopen Slave Request
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_INITIALIZE_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_INITIALIZE_CNF_Ttag
CANOPEN_SLAVE_PACKET_INITIALIZE_CNF_T;
Packet Description
Structure Information CANOPEN_SLAVE_PACKET_INITIALIZE_CNF_T Type: Confirmation
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 4 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2905 CANOPEN_SLAVE_INITIALIZE_CNF- Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Structure CANOPEN_SLAVE_INITIALIZE_CNF_DATA_T
ulReserved UINT32 0 Reserved for further use, set to zero
Table 77: CANOPEN_SLAVE_PACKET_INITIALIZE_CNF_T – Initialization of CANopen Slave Confirmation
Note: Use this packet only when working with linkable object modules. It is not
designed for usage in the context of loadable firmware.
Note: This indication is used by the AP task in order to set status information in the
DPM and will not be routed to the user application.
In order to be able to receive this indication, the CANOPEN_SLAVE_REGISTER_REQ/CNF –
Register Application request has to be executed by the AP task.
struct CANOPEN_SLAVE_STATE_CHANGE_IND_DATA_Ttag
{
CANOPEN_SLAVE_SLAVE_STATE_T tSlaveState; /* Slave state */
CANOPEN_SLAVE_EXTENDED_STATE_T tExtendedState; /* Extended state */
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_Ttag
CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_T;
struct CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_STATE_CHANGE_IND_DATA_T tData; /** packet request data. */
};
/*********************************************************************************/
Packet Description
Structure Information CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_T Type: Indication
Variable Type Value / Range Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle of AP task Process Queue
ulSrc UINT32 Source Queue-Handle of CANopen slave-Task Process Queue
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 112 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2912 CANOPEN_SLAVE_STATE_CHANGE_IND - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_STATE_CHANGE_IND_DATA_T
tSlaveState CANOPEN_SLAVE_ Structure for slave state, see explanation below.
SLAVE_STATE_T
tExtended CANOPEN_SLAVE_ Structure for extended slave state, see explanation below.
State EXTENDED_STATE_T
Table 78: CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_T – Change of State Indication
struct CANOPEN_SLAVE_SLAVE_STATE_Ttag
{
TLR_UINT32 ulCanState;
TLR_UINT32 aulUnused[2];
TLR_UINT32 ulFlags;
TLR_UINT32 ulErrorCount;
TLR_UINT32 ulCommError;
TLR_UINT32 ulRunLedState;
TLR_UINT32 ulErrLedState;
TLR_UINT32 ulRecvDataCnt;
TLR_UINT32 ulSendDataCnt;
TLR_UINT32 ulReserved;
};
ulCanState
This variable is organized as a bit field as described in the table below:
aulUnused[2]
This array has been introduced only for compatibility reasons. It is not used.
ulFlags
This variable is organized as a bit field as described in the table below:
Bit Name Description
D32...D9 - Unused
D8 CANOPEN_SLAVE_STATE_FLAG_CAN_STARTED CAN network has been started
D7…D5 - Unused
D4 CANOPEN_SLAVE_STATE_FLAG_COMM_ERROR Communication Error
D3 CANOPEN_SLAVE_STATE_FLAG_BUS_ON Bus on
D2 CANOPEN_SLAVE_STATE_FLAG_COM Communication running
D1 CANOPEN_SLAVE_STATE_FLAG_RUN Run
D0 CANOPEN_SLAVE_STATE_FLAG_RDY Ready
Table 80: Bit field ulFlags
ulErrorCount
This field contains the total number of errors detected since power-up, respectively after reset. The
protocol stack counts all sorts of errors in this field no matter if they were network related or caused
internally.
ulCommError
This field contains the error code of the last communication error that occurred.
ulRunLedState
This field contains the current state of the RUN LED.
ulErrLedState
This field contains the current state of the ERR LED.
ulRecvDataCnt
This field contains the Received Data Count
ulSendDataCnt
This field contains the Send Data Count.
ulReserved
This field is reserved for future use.
struct CANOPEN_SLAVE_EXTENDED_STATE_Ttag
{
TLR_UINT32 ulFlags;
TLR_UINT32 ulNodeState;
TLR_UINT32 ulBusOffEveCnt;
TLR_UINT32 ulErrorPassiveEveCnt;
TLR_UINT32 ulRxOverflowCnt;
TLR_UINT32 ulTxOverflowCnt;
TLR_UINT32 ulErrorWarningCnt;
TLR_UINT32 ulTimeoutCnt;
TLR_UINT32 aulReserved[3];
TLR_UINT32 ulIndLostCnt;
TLR_UINT32 ulDiagInfoCount;
TLR_UINT32 ulLastDiagInfo;
TLR_UINT32 ulMaxRecvIdx;
TLR_UINT32 ulMaxSendIdx;
TLR_UINT32 aulAddDetail[CANOPEN_SLAVE_ADD_DETAIL_SIZE];
};
/*********************************************************************************/
struct CANOPEN_SLAVE_PACKET_STATE_CHANGE_RES_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle of CANopen slave-Task Process Queue
ulSrc UINT32 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2913 CANOPEN_SLAVE_STATE_CHANGE_RES - Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Table 81: CANOPEN_SLAVE_PACKET_STATE_CHANGE_RES_T – Change of State Response
Note: Use this packet only when working with linkable object modules. It is not designed
for usage in the context of loadable firmware. In the context of loadable firmware we
recommend to use ‘set configuration’ instead.
Note: This request will be denied if the configuration lock flag is set.
All parameters used by this packet are also used by the packet
CANOPEN_APS_SET_CONFIGURATION_REQ/CNF – Set Configuration with the same meaning
and in the same way. For more information about these parameters, see Table 24 on page 45.
/*-------------------------------------------------------------------------*/
}__PACKED_POST;
}__PACKED_POST;
__PACKED_PRE union
{
CANOPEN_SLAVE_STD_BUSPARAM_DATA_T tStdBusParam; /* Parameter for standard mode*/
CANOPEN_SLAVE_EXT_BUSPARAM_DATA_T tExtBusParam; /* Parameter for extended mode*/
}__PACKED_POST uMode;
}__PACKED_POST;
/*************************************************************************************/
/** type of <code>CANOPEN_SLAVE_BUSPARAM_DATA_Ttag</code> */
typedef struct CANOPEN_SLAVE_BUSPARAM_DATA_Ttag
CANOPEN_SLAVE_SET_BUSPARAM_REQ_DATA_T;
/*************************************************************************************/
/** type of <code>CANOPEN_SLAVE_BUSPARAM_DATA_Ttag</code> */
typedef struct CANOPEN_SLAVE_BUSPARAM_DATA_Ttag
CANOPEN_SLAVE_GET_BUSPARAM_CNF_DATA_T;
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 QUE_CANOPEN Destination Queue-Handle of CANopen slave-Task Process Queue
SLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 80 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 “Codes of the CANopen Slave-Task
ulCmd UINT32 0x2906 CANOPEN_SLAVE_SET_BUSPARAM_REQ - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Structure CANOPEN_SLAVE_SET_BUSPARAM_REQ_DATA_T
tBusParam CANOP Bus parameter structure, see Table 24 on page 45.
EN_SLA
VE_BUS
PARAM
_DATA_
T
Table 82: CANOPEN_SLAVE_PACKET_SET_BUSPARAM_REQ_T – Set Bus Parameters Request
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2907 CANOPEN_SLAVE_SET_BUSPARAM_CNF - Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Table 83: CANOPEN_SLAVE_PACKET_SET_BUSPARAM_CNF_T –Set Bus Parameter Confirmation
Note: Use this packet only when working with linkable object modules. It has not
been designed for usage in the context of loadable firmware.
struct CANOPEN_SLAVE_SET_API_PARAM_REQ_DATA_Ttag
{
TLR_HANDLE hApplication;
PFN_CANOPEN_SLAVE_CALLBACK pFncSendDataUpdated;
TLR_UINT8 FAR* pbSrcData;
TLR_UINT32 ulSrcDataCnt;
PFN_CANOPEN_SLAVE_CALLBACK pFncRecvDataUpdated;
TLR_UINT8 FAR* pbDstData;
TLR_UINT32 ulDstDataCnt;
};
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_SET_API_PARAM_REQ_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_SET_API_PARAM_REQ_Ttag
CANOPEN_SLAVE_PACKET_SET_API_PARAM_REQ_T;
struct CANOPEN_SLAVE_PACKET_SET_API_PARAM_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SET_API_PARAM_REQ_DATA_T tData; /** packet request data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x292C CANOPEN_SLAVE_SET_API_PARAM_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_SET_API_PARAM_REQ_DATA_T
hApplication TLR_HA Application Handle of Slave (see TLR Manual)
NDLE
pFncSendDataUp PFN_CA Callback Callback for Send Data
dated NOPEN
_SLAVE
_CALLB
ACK
pbSrcData UINT8 Pointer Source Data Pointer
FAR*
32
ulSrcDataCnt UINT32 0 ... 2 -1 Source Data Count
pFncRecvDataUp PFN_CA Callback Callback for Receive Data
dated NOPEN
_SLAVE
_CALLB
ACK
pbDstData UINT8 Pointer Destination Data Pointer
FAR*
32
ulDstDataCnt UINT32 0 ... 2 -1 Destination Data Count
Table 84: CANOPEN_SLAVE_PACKET_SET_API_PARAM_REQ_T - Set API Parameter Request
struct CANOPEN_SLAVE_SET_API_PARAM_CNF_DATA_Ttag
{
TLR_HANDLE hSlave;
};
struct CANOPEN_SLAVE_PACKET_SET_API_PARAM_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
CANOPEN_SLAVE_SET_API_PARAM_CNF_DATA_T tData; /** packet confirmation data. */
};
/*********************************************************************************/
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x292D CANOPEN_SLAVE_SET_API_PARAM_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_SET_API_PARAM_CNF_DATA_T
hSlave TLR_HA Slave Handle (see TLR Manual)
NDLE
Table 85: CANOPEN_SLAVE_PACKET_SET_API_PARAM_CNF_T - Confirmation to Set API Parameter Request
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle
QUE_CANOPE
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2934 CANOPEN_SLAVE_GET_BUSPARAM_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 86: CANOPEN_SLAVE_PACKET_GET_BUSPARAM_REQ_T - Get Bus Parameters Request
struct CANOPEN_SLAVE_STD_BUSPARAM_DATA_Ttag
{
TLR_UINT32 ulVendorId; /* Vendor ID */
TLR_UINT32 ulProductCode; /* Product code */
TLR_UINT32 ulSerialNumber; /* Serial number */
TLR_UINT32 ulRevisionNumber; /* Revision number */
TLR_UINT32 ulDeviceType; /* Device Type */
struct CANOPEN_SLAVE_EXT_BUSPARAM_DATA_Ttag
{
TLR_UINT16 usNumOfRxPdo; /* Number of receive PDOs */
TLR_UINT16 usNumOfTxPdo; /* Number of transmit PDOs */
TLR_UINT32 aulReserved[9]; /* Reserved, set to zero */
};
/*********************************************************************************/
/** Structure of task command set bus param data */
struct CANOPEN_SLAVE_BUSPARAM_DATA_Ttag
{
TLR_UINT32 ulSlaveNodeId; /* Node ID */
TLR_UINT32 ulBaudrate; /* Baud-rate */
TLR_UINT32 ulCanOpenFlags; /* CANopen flags */
union {
CANOPEN_SLAVE_STD_BUSPARAM_DATA_T tStdBusParam; /* Parameter for standard mode*/
CANOPEN_SLAVE_EXT_BUSPARAM_DATA_T tExtBusParam; /* Parameter for extended mode*/
} uMode;
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_BUSPARAM_DATA_Ttag</code> */
typedef struct CANOPEN_SLAVE_BUSPARAM_DATA_Ttag
CANOPEN_SLAVE_GET_BUSPARAM_CNF_DATA_T;
/*********************************************************************************/
/** type of <code>CANOPEN_SLAVE_PACKET_GET_BUSPARAM_CNF_Ttag</code> */
typedef struct CANOPEN_SLAVE_PACKET_GET_BUSPARAM_CNF_Ttag
CANOPEN_SLAVE_PACKET_GET_BUSPARAM_CNF_T;
Packet Description
structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle
ulSrc UINT32 Source Queue-Handle
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, specifying the final receiver of the
packet within the Destination Process. Set to 0 for the Initialization
Packet
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, specifying the origin of the packet inside
V0Id the Source Process
ulLen UINT32 60 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x2935 CANOPEN_SLAVE_GET_BUSPARAM_CNF - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
structure CANOPEN_SLAVE_GET_BUSPARAM_CNF_DATA_T
tBusParam CANOP Structure Bus parameter structure, see
EN_SLA Table 24: Bus parameter structure
VE_BUS CANOPEN_SLAVE_BUSPARAM_DATA_T
PARAM
_DATA_
T
Table 87: CANOPEN_SLAVE_PACKET_GET_BUSPARAM_CNF_T - Confirmation to Get Bus Parameters Request
5.2.8 CANOPEN_SLAVE_SET_WATCHDOG_FAIL_REQ/CNF –
Set Watchdog Fail
This packet is used by the AP task in order to inform the CANopen slave-task that a watchdog
failure has been detected. The CANopen slave-task stops the communication with the CANopen
network. After a watchdog error has been set, the slave has to be reinitialized before further
communication is possible.
Note: Use this packet only when working with linkable object modules. It is not
designed for usage in the context of loadable firmware.
Note: This packet is used by the AP task only and will not be routed from the user
application to the CANopen slave-task.
struct CANOPEN_SLAVE_PACKET_SET_WATCHDOG_FAIL_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 QUE_CANOPE Destination Queue-Handle of CANopen slave-Task Process Queue
NSLV
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 0 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x29AA CANOPEN_SLAVE_SET_WATCHDOG_FAIL_REQ - Command
ulExt UINT32 0 Reserved
ulRout UINT32 x Routing Information
Table 88: CANOPEN_SLAVE_PACKET_SET_WATCHDOG_FAIL_REQ_T – Set Watchdog Fail Request
struct CANOPEN_SLAVE_PACKET_SET_WATCHDOG_FAIL_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead; /** packet header. */
};
/*********************************************************************************/
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 Destination Queue-Handle, untouched
ulSrc UINT32 Source Queue-Handle, untouched
ulDestId UINT32 ulAPSS0Id Destination End Point Identifier, untouched
ulSrcId UINT32 ulCANOPENSL Source End Point Identifier, untouched
V0Id
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.2 Codes of the CANopen Slave-Task
ulCmd UINT32 0x29AB CANOPEN_SLAVE_SET_WATCHDOG_FAIL_CNF– Command
ulExt UINT32 Extension, reserved
ulRout UINT32 Routing Information, do not change
Table 89: CANOPEN_SLAVE_PACKET_SET_WATCHDOG_FAIL_CNF_T – Set Watchdog Fail Confirmation
Packet Description
Structure TLR_PACKET_HEADER_T
ulDest UINT32 0x20/ Destination Queue-Handle of CANopen slave-Task Process Queue
QUE_CANOPEN
APS
32
ulSrc UINT32 0 ... 2 -1 Source Queue-Handle of AP task Process Queue
ulDestId UINT32 ulCANOPENSL Destination End Point Identifier, specifying the final receiver of the
V0Id packet within the Destination Process
ulSrcId UINT32 ulAPSS0Id Source End Point Identifier, specifying the origin of the packet inside
the Source Process
ulLen UINT32 0 Packet Data Length in bytes
32
ulId UINT32 0 ... 2 -1 Packet Identification as unique number generated by the Source
Process of the Packet
ulSta UINT32 See section 6.1.1 Codes of the CANopen-APS-Task
ulCmd UINT32 0x2E02 CANOPEN_APS_GET_STATE_REQ - Command
ulExt UINT32 0 Extension not in use, set to zero for compatibility reasons
ulRout UINT32 x Routing, do not touch
Table 90: CANOPEN_APS_PCK_GET_STATE_REQ_T – Get State of AP task Request
struct CANOPEN_APS_GET_STATE_CNF_DATA_Ttag
{
TLR_UINT32 aulUnused[2];
};
/*********************************************************************************/
/** type of <code>CANOPEN_APS_PCK_GET_STATE_CNF_Ttag</code> */
typedef struct CANOPEN_APS_PCK_GET_STATE_CNF_Ttag
CANOPEN_APS_PCK_GET_STATE_CNF_T;
};
/*********************************************************************************/
Packet Description
Structure CANOPEN_APS_GET_STATE_CNF_DATA_T
aulUnused[] UINT32 Unused, present only due to compatibility reasons
[2]
Table 91: CANOPEN_APS_PCK_GET_STATE_CNF_T – Get State of AP task Confirmation
The CANopen Slave then receives a telegram for the 3. PDO which has the expected length:
00 00 00 03 00 0D 00 00
7 Appendix
7.1 List of Tables
Table 1: List of Revisions .................................................................................................................................................... 4
Table 2: Technical Data - Protocol Stack ............................................................................................................................ 5
Table 3: Technical Data – Available for netX ...................................................................................................................... 5
Table 4: Technical Data – PCI-DMA ................................................................................................................................... 6
Table 5: Technical Data – Slot Number .............................................................................................................................. 6
Table 6: Technical Data - Protocol Stack (Standard Mode – Default Settings) ................................................................... 7
Table 7: Technical Data - Protocol Stack (Standard Mode – Configured Settings) ............................................................. 7
Table 8: Technical Data - Protocol Stack (Extended Mode) ................................................................................................ 8
Table 9: Terms, Abbreviations and Definitions .................................................................................................................... 9
Table 10: References .......................................................................................................................................................... 9
Table 11: Objects of the Predefined Connection Set (seen from Point of View of the Device).......................................... 18
Table 12: COB-IDs with Restrictions of Use...................................................................................................................... 18
Table 13: NMT States ....................................................................................................................................................... 25
Table 14: Emergency Protocol .......................................................................................................................................... 27
Table 15: PDO Transmission Types ................................................................................................................................. 32
Table 16: PDO Communication Parameter ....................................................................................................................... 33
Table 17: Standard bus parameter structure CANOPEN_SLAVE_STD_BUSPARAM_DATA_T ............................................. 36
Table 18: Mapping of Input Data (in case of unchanged object lengths and no netX 10 applied) ..................................... 37
Table 19: Mapping of Output Data (in case of unchanged object lengths and no netX 10 applied) .................................. 37
Table 20: Extended bus parameter structure CANOPEN_SLAVE_EXT_BUSPARAM_DATA_T ............................................ 38
Table 21: Supported Object Dictionary Entries (Communication Profile, present in the EDS file)..................................... 40
Table 22: Supported Object Dictionary Entries (Manufacturer-specific Profile, present in the EDS file) ........................... 41
Table 23: CANOPEN_APS_PCK_SET_CONFIGURATION_REQ – Set Configuration Parameter Request ........................... 44
Table 24: Bus parameter structure CANOPEN_SLAVE_BUSPARAM_DATA_T .............................................................. 45
Table 25: Codes and Corresponding Baud Rates of CANopen Network .......................................................................... 46
Table 26: Explanation of Parameter ulCanOpenFlags ...................................................................................................... 47
Table 27: Packets of CANopen Slave Protocol Stack V3 and Restrictions of Usage ........................................................ 50
Table 28: CANOPEN_SLAVE_PACKET_STARTSTOP_REQ_T – Start/Stop Communication Request ................................. 52
Table 29: CANOPEN_SLAVE_PACKET_STARTSTOP_CNF_T – Start/Stop Communication Confirmation .......................... 53
Table 30: CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_REQ_T – Exchange Data Request .......................................... 55
Table 31: CANOPEN_SLAVE_PACKET_EXCHANGE_DATA_CNF_T –Exchange Data Confirmation .................................... 57
Table 32: CANOPEN_SLAVE_PACKET_SEND_EMCY_REQ_T – Send Emergency Message Request ................................ 59
Table 33: CANOPEN_SLAVE_PACKET_SEND_EMCY_CNF_T – Send Emergency Message Confirmation ......................... 60
Table 34: CANOPEN_SLAVE_PACKET_SEND_EMCY_IND_T – Send Emergency Message Indication .............................. 62
Table 35: CANOPEN_SLAVE_PACKET_SEND_EMCY_RES_T – Response to Send Emergency Message Indication ......... 63
Table 36: NMT States ....................................................................................................................................................... 64
Table 37: CANOPEN_SLAVE_PACKET_SET_NMT_STATE_REQ_T – Set NMT State Request ........................................... 65
Table 38: CANOPEN_SLAVE_PACKET_SET_NMT_STATE_CNF_T – Set NMT State Confirmation .................................... 66
Table 39: CANOPEN_SLAVE_PACKET_SEND_TIME_STAMP_REQ_T - Send Time Stamp Request ................................. 68
Table 40: CANOPEN_SLAVE_PACKET_SEND_TIME_STAMP_CNF_T – Confirmation to Send Time Stamp Request ........ 69
Table 41: CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_IND_T - Receive Time Stamp Indication............................ 71
Table 42: CANOPEN_SLAVE_PACKET_RECV_TIME_STAMP_RES- Response to Receive Time Stamp Indication ............ 72
Table 43: CANOPEN_SLAVE_PACKET_SEND_TXPDO_REQ_T – Send TxPDO Request.................................................... 74
Table 44: CANOPEN_SLAVE_PACKET_SEND_TXPDO_CNF_T – Confirmation to Send TxPDO Request .......................... 75
Table 45: CANOPEN_SLAVE_PACKET_RECV_RXPDO_REQ_T - Receive RxPDO Request ............................................... 77
Table 46: CANOPEN_SLAVE_PACKET_RECV_RXPDO_CNF_T – Confirmation to Receive RxPDO Request ..................... 78
Table 47: CANOPEN_SLAVE_PACKET_RECV_RXPDO_IND_T –Receive RxPDO Indication.............................................. 80
Table 48: CANOPEN_SLAVE_PACKET_RECV_RXPDO_RES_T – Response to Receive RxPDO Indication........................ 81
Table 49: Bit Mask ulEventsIndicated ...................................................................................................................... 82
Table 50: CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_REQ_T - Set Events Indicated Request ................... 84
Table 51: CANOPEN_SLAVE_PACKET_SET_EVENTS_INDICATED_CNF_T – Confirmation to Set Events Indicated
Request ................................................................................................................................................................... 85
Table 52: CANOPEN_SLAVE_PACKET_GET_IO_INFO_REQ_T - Get I/O Info Request ..................................................... 86
Table 53: CANOPEN_SLAVE_PACKET_GET_IO_INFO_CNF_T – Confirmation to Get I/O Info Request ........................... 87
Table 54: NMT States ....................................................................................................................................................... 88
Table 55: CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_IND_T - NMT State Change Indication ............................ 89
Table 56: CANOPEN_SLAVE_PACKET_NMT_STATE_CHANGE_RES_T – Response to NMT State Change Indication ...... 90
Table 57: Array Elements of atErrCtrlEvent[16] ...................................................................................................... 91
Table 58: Possible Values of ulEvent and their Meanings................................................................................................ 91
Table 59: CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_IND_T - Error Control Event Indication ................................ 93
Table 60: CANOPEN_SLAVE_PACKET_ERR_CTRL_EVENT_RES_T – Response to Error Control Event Indication .......... 94
Table 61: NMT States ....................................................................................................................................................... 95
CANopen Slave | Protocol API
DOC111001API06EN | Revision 6 | English | 2016-07 | Released | Public © Hilscher, 2011-2016
Appendix 150/151
Table 62: CANOPEN_SLAVE_PACKET_NMT_COMMAND_IND_T - NMT Command Indication ............................................ 97
Table 63: CANOPEN_SLAVE_PACKET_NMT_COMMAND_RES_T – Response to NMT Command Indication ...................... 98
Table 64: CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_REQ_T – Setup PDO Indication Request ............... 100
Table 65: CANOPEN_SLAVE_PACKET_SETUP_PDO_INDICATION_CNF_T – Setup PDO Indication Confirmation ........ 101
Table 66: CANOPEN_SLAVE_PACKET_RECEIVE_PDO_IND_T – Receive PDO Indication ............................................. 103
Table 67: CANOPEN_SLAVE_PACKET_RECEIVE_PDO_RES_T – Receive PDO Response ............................................ 104
Table 68: Extended Status Block (General Structure)..................................................................................................... 109
Table 69: Additional Info Block ........................................................................................................................................ 110
Table 70: Additional Info Flags ........................................................................................................................................ 111
Table 71: APM-Task Process Queue .............................................................................................................................. 113
Table 72 CANopen Slave-Task Process Queue ............................................................................................................. 113
Table 73: Packets of CANopen Slave Protocol Stack V3 and Restrictions of Usage ...................................................... 114
Table 74: CANOPEN_SLAVE_PACKET_APP_REGISTER_REQ_T – Register Application Request................................... 116
Table 75: CANOPEN_SLAVE_PACKET_APP_REGISTER_CNF_T – Register Application Confirmation............................ 117
Table 76: CANOPEN_SLAVE_PACKET_INITIALIZE_REQ_T – Initialization of CANopen Slave Request...................... 119
Table 77: CANOPEN_SLAVE_PACKET_INITIALIZE_CNF_T – Initialization of CANopen Slave Confirmation............... 120
Table 78: CANOPEN_SLAVE_PACKET_STATE_CHANGE_IND_T – Change of State Indication ...................................... 122
Table 79: Flags of ulCanState ..................................................................................................................................... 123
Table 80: Bit field ulFlags ................................................................................................................................................ 124
Table 81: CANOPEN_SLAVE_PACKET_STATE_CHANGE_RES_T – Change of State Response ...................................... 126
Table 82: CANOPEN_SLAVE_PACKET_SET_BUSPARAM_REQ_T – Set Bus Parameters Request .................................. 129
Table 83: CANOPEN_SLAVE_PACKET_SET_BUSPARAM_CNF_T –Set Bus Parameter Confirmation .............................. 130
Table 84: CANOPEN_SLAVE_PACKET_SET_API_PARAM_REQ_T - Set API Parameter Request .................................. 132
Table 85: CANOPEN_SLAVE_PACKET_SET_API_PARAM_CNF_T - Confirmation to Set API Parameter Request ......... 133
Table 86: CANOPEN_SLAVE_PACKET_GET_BUSPARAM_REQ_T - Get Bus Parameters Request ................................ 134
Table 87: CANOPEN_SLAVE_PACKET_GET_BUSPARAM_CNF_T - Confirmation to Get Bus Parameters Request ....... 136
Table 88: CANOPEN_SLAVE_PACKET_SET_WATCHDOG_FAIL_REQ_T – Set Watchdog Fail Request .......................... 137
Table 89: CANOPEN_SLAVE_PACKET_SET_WATCHDOG_FAIL_CNF_T – Set Watchdog Fail Confirmation ................... 138
Table 90: CANOPEN_APS_PCK_GET_STATE_REQ_T – Get State of AP task Request ................................................... 139
Table 91: CANOPEN_APS_PCK_GET_STATE_CNF_T – Get State of AP task Confirmation ...................................... 140
Table 92: Error Messages of the AP task ........................................................................................................................ 142
Table 93: Error Messages of the CANopen Slave-Task .................................................................................................. 144
Table 94: Emergency Error Codes (Variable usErrorCode) ......................................................................................... 146
Table 95: Error Register .................................................................................................................................................. 147
Table 96: Manufacturer-specific Error Codes generated by the CANopen Slave stack (Structure) ................................ 147
Table 97: Manufacturer-specific Error Codes generated by the CANopen Slave stack (Event information) ................... 147
7.3 Contacts
Headquarters
Germany
Hilscher Gesellschaft für
Systemautomation mbH
Rheinstrasse 15
65795 Hattersheim
Phone: +49 (0) 6190 9907-0
Fax: +49 (0) 6190 9907-50
E-Mail: [email protected]
Support
Phone: +49 (0) 6190 9907-99
E-Mail: [email protected]
Subsidiaries
China Japan
Hilscher Systemautomation (Shanghai) Co. Ltd. Hilscher Japan KK
200010 Shanghai Tokyo, 160-0022
Phone: +86 (0) 21-6355-5161 Phone: +81 (0) 3-5362-0521
E-Mail: [email protected] E-Mail: [email protected]
Support Support
Phone: +86 (0) 21-6355-5161 Phone: +81 (0) 3-5362-0521
E-Mail: [email protected] E-Mail: [email protected]
France Korea
Hilscher France S.a.r.l. Hilscher Korea Inc.
69500 Bron Seongnam, Gyeonggi, 463-400
Phone: +33 (0) 4 72 37 98 40 Phone: +82 (0) 31-789-3715
E-Mail: [email protected] E-Mail: [email protected]
Support
Phone: +33 (0) 4 72 37 98 40 Switzerland
E-Mail: [email protected] Hilscher Swiss GmbH
4500 Solothurn
India Phone: +41 (0) 32 623 6633
Hilscher India Pvt. Ltd. E-Mail: [email protected]
New Delhi - 110 065 Support
Phone: +91 11 26915430 Phone: +49 (0) 6190 9907-99
E-Mail: [email protected] E-Mail: [email protected]
Italy USA
Hilscher Italia S.r.l. Hilscher North America, Inc.
20090 Vimodrone (MI) Lisle, IL 60532
Phone: +39 02 25007068 Phone: +1 630-505-5301
E-Mail: [email protected] E-Mail: [email protected]
Support Support
Phone: +39 02 25007068 Phone: +1 630-505-5301
E-Mail: [email protected] E-Mail: [email protected]