This documentation is valid for the following Lenze PLC devices:
Automation systemType designationAs of hardware versionAs of software version
9300 Servo PLCEVS93XX−xI2K2.0
9300 Servo PLCEVS93XX−xT2K2.0
Drive PLCEPL10200Px2.0
ECSxAECSxAxxx1A6.0
Important note:
The software is supplied to the user as described in this document. Any risks resulting from its quality or use remain the responsibility of the
user. The user must provide all safety measures protecting against possible maloperation.
We do not take any liability for direct or indirect damage, e.g. profit loss, order loss or any loss regarding business.
2006 Lenze Drive Systems GmbH
No part of this documentation may be copied or made available to third parties without the explicit written approval of Lenze Drive Systems
GmbH.
All information given in these Operating Instructions has been selected carefully and comply with the hardware and software described. Nevertheless, deviations cannot be ruled out. We do not take any responsibility or liability for damages which might possibly occur. Required
corrections will be made in the following editions.
All product names mentioned in this documentation are trademarks of the corresponding owners.
This Manual contains information on the system bus interfaces of the Lenze PLC devices
9300 Servo PLC, Drive PLC and ECSxA.
Chapter Content
2General information on the system bus (CAN)^ 2−1
Configuration
3
4
5
6
7
8
9
10
11
Integrated "CAN" system bus interface^ 3−1
Optional system bus interface via automation interface (AIF)
and corresponding fieldbus module (e. g. 2175)
Optional system bus interface via function interface (FIF)
and corresponding function module (e. g. CAN−I/O system bus)
· Only for Drive PLC!
Integrated "CAN−AUX" system bus interface
· Only for ECSxA!
CAN system blocks
CAN objects (CAN1_IO ... CAN3_IO)
CAN synchronisation (CAN_Synchronization)
CAN management (CAN_Management)
FIF−CAN system blocks (only Drive PLC)
CAN objects (FIF_CAN1_IO ... FIF_CAN3_IO)
CAN management (FIF_CAN_Management)
CAN−AUX system blocks (only ECSxA)
CAN objects (CANaux1_IO ... CANaux3_IO)
CAN management (CANaux_Management)
LenzeCanDrv.lib function library
· Free CAN objects
LenzeCanDSxDrv.libfunction library
· Mapping indexes to codes
· "Heartbeat" and "Node Guarding"monitoring mechanisms
^ 4−1
^ 5−1
^ 6−1
^ 7−1
^ 8−1
^ 9−1
^ 10−1
^ 11−1
L
PLC−Systembus EN 2.0
1−1
System bus (CAN) for Lenze PLC devices
Preface and general information
1.1About this Manual
1.1.1Conventions used in this Manual
This Manual uses the following conventions to distinguish between different types of information:
Variable identifier
... are presented in italics in the explanatory text:
· "Via wDrvNr..."
Tip!
Information about the conventions used for variables of Lenze system blocks, function blocks and
functions can be obtained from the appendix of the DDS online documentation "Introduction into
IEC 61131−3 programming".The conventions ensure universal and uniform labelling and support the
readability of PLC programs.
Lenze functions/function blocks
... can be identified by their designation. They always start with an "L_":
· "The function L_CanInit ..."
· "The L_CanPdoTransmit FB..."
Program listings
... are specified in the "Courier" font, the keywords being printed bold:
· "IF (ReturnValue < 0) THEN..."
1−2
PLC−Systembus EN 2.0
L
System bus (CAN) for Lenze PLC devices
Preface and general information
1.1About this Manual
1.1.2Structure of the description
The descriptions of the individual functions/function blocks as well as of system blocks contained
in this Manual have the same structure:
Headline with SB identifier
SB function and node number
Short description of the SB and its most important features
System block chart including all corresponding variables
· Input variables
· Output variables
Table giving information about input and output variables:
· Identifier
· Data type
· Signal type
· Address
· Display code
· Display format
· Information
Detailed functional description of the SB
Information on return values for a function
If it was not possible to carry out a function faultlessly, a negative return value is sent back,
representing an error number.
· Each error number is assigned to a corresponding error cause in the Meaning column.
· If different error numbers (−1, −2, ...) may apply, a specific digit (1, 2, ...) in the Priority column
additionally is assigned to the error number.
– The smaller this digit, the higher is the priority of the associated error number.
– If several error causes are available at the same time when a function is carried out, always
the error number with the highest priority is returned by the function.
L
PLC−Systembus EN 2.0
1−3
System bus (CAN) for Lenze PLC devices
Preface and general information
1.1About this Manual
1.1.3Pictographs used in this Manual
Pictographs
used
Warning of
material damage
More notesTip!
1.1.4Terminology used
TermIn the following text used for
AIFAutomation interface
DDSDrive PLC Developer Studio
FBFunction block
FIFFunction interface
GDCGlobal Drive Control (parameterisation program from Lenze)
Parameter codesCodes for setting the function of a function block
PLC· 9300 Servo PLC
SBSystem block
System busSystem bus (CAN): Lenze standard bus system similar to CANopen
Signal words
Stop!Warns of potential damage to material.
Possible consequences if disregarded:
Damage of the controller/drive system or its environment
Indicates a tip or note.
Note!
· Drive PLC
· ECSxA
.
1−4
PLC−Systembus EN 2.0
L
System bus (CAN) for Lenze PLC devices
General information
2General information on the system bus (CAN)
2.1Introduction
All Lenze drive and automation systems are provided with an integrated system bus interface for the
networking of control components on a field level.
Via the system bus interface, among other things process data and parameter data can be
exchanged between the nodes. Furthermore the interface enables the connection of further
modules, like for example decentralised terminals, operator and input devices, as well as external
controls and host systems.
The system bus interface transfers CAN objects following the CANopen communication profile
(CiA DS301, version 4.01), which was developed under the umbrella association of the CiA (CAN inAutomation), complying with the CAL (CAN Application Layer).
l
PLC−Systembus EN 2.0
2−1
System bus (CAN) for Lenze PLC devices
General information
2.2Interfaces of the Lenze PLCs for system bus connection
The following table provides an overview of the Lenze PLC system bus interfaces 9300 Servo PLC,
Drive PLC and ECSxA:
CAN objects availableInformation
System bus interface CAN
Automation interface (AIF)
with corresponding fieldbus module
(e.g. 2175)
Function interface (FIF)
with corresponding function module
(e.g. CAN−I/O system bus)
System bus interface CAN−AUX
PDOsCAN1_IN/CAN1_OUT
CAN2_IN/CAN2_OUT
CAN3_IN/CAN3_OUT
SDOs
SDO1 (parameter data channel 1)
SDO2 (parameter data channel 2)
L_ParRead/L_ParWrite
functionality
Sync telegram
Synchronisation of the internal time basis
by receiving sync telegrams
Free CAN objects
PDOsXCAN1_IN/XCAN1_OUT
XCAN2_IN/XCAN2_OUT
XCAN3_IN/XCAN3_OUT
SDOsXSDO1 (parameter data
channel 1)
XSDO2 (parameter data
channel 2)
XSync telegram
PDOsFIF−CAN1_IN/FIF−CAN1_OUT
FIF−CAN2_IN/FIF−CAN2_OUT
FIF−CAN3_IN/FIF−CAN3_OUT
SDOs
FIF−SDO1 (parameter data
channel 1)
FIF−SDO2 (parameter data
channel 2)
Sync telegramSee chapter 6, "Configuration (CAN−AUX system bus
See chapter 3, "Configuration (CAN system bus
interface)".
^ 3−1
Reading/writing of codes.
See documentation on the LenzeDrive.lib
function library
See chapter 3, "Configuration (CAN system bus
interface)".
^ 3−1
See chapter 4, "Configuration (AIF interface)".
^ 4−1
For Drive PLC only!
See chapter 5, "Configuration (FIF interface)".
^ 5−1
Reading/writing of codes.
See documentation on the LenzeDrive.lib
function library
^ 5−1
For ECSxA only!
See chapter 6, "Configuration (CAN−AUX system bus
interface)".
^ 6−1
Reading/writing of codes.
See documentation on the function library
LenzeDrive.lib
interface)".
^ 6−1
2−2
PLC−Systembus EN 2.0
l
System bus (CAN) for Lenze PLC devices
2.3Identification of the nodes
Assign a node address − also called Node ID − in the range of 1 to 63 to each node within the system
bus network as a definite identification.
· The same node address may not be assigned more than once within the network.
2.4Structure of the CAN telegram
General information
Start
Identifier
1bit11bit1bit 6bit
Description see chapter 2.4.1
Fig. 2−1Basic structure of a CAN telegram
RTR bit
Tip!
For the user only the identifier and the user data are relevant. All further data of the CAN telegram
are processed by the system.
2.4.1Identifier
The principle of the CAN communication is based on a message−oriented data exchange between
a transmitter and many receivers. Thereby all nodes practically are able to transmit and receive at the
same time.
The control with regard to the node which is to receive a transmitted message is effected via the
so−called Identifier in the CAN telegram, also called COB−ID (Communication Object Identifier). For
purposes of addressing, the identifier additionally contains information on the priority of the
message, as well as on the type of the user data.
The identifier is composed of a so−called basic identifier and the node address of the node to be
activated:
Control field
User data
0 ... 8 byte
· Network management
· Parameter data
· Process data
Description see chapter 2.4.2
CRC
sequence
15bit
CRC delimit.
1bit 1bit 1bit 7bit
ACK delimit.
ACK slot
End
l
Identifier + basic identifier ) node address
· For Lenze devices, the node address is defined via code C0350. (^ 3−3)
· For the network management and the sync telegram only the basic identifier is required.
PLC−Systembus EN 2.0
2−3
System bus (CAN) for Lenze PLC devices
General information
The following table contains the preset basic identifiers of the Lenze devices:
Identifier =basic identifier+ node address of the node
dechex
·Network management
Tx (transmission)00
Rx (reception)00
Sync telegram
Tx (transmission)12880
Rx (reception)12880
SDOsParameter data channel 1
Output (transmission)1536600
Input (reception)1408580
Parameter data channel 2
Output (transmission)1600640
Input (reception)14725C0
PDOsCAN1_IO (cyclic process data)
CAN1_IN512200
CAN1_OUT384180
CAN2_IO (event− or time−controlled process data)
CAN2_IN640280
CAN2_OUT641281
CAN3_IO (event− or time−controlled process data)
CAN3_IN768300
CAN3_OUT769301
+ C0350
+ C2350
+ C2450
+ C0350
+ C2350
+ C2450
+ C0350
+ C2350
+ C2450
+ C0350
+ C2350
+ C2450
+ C0350
+ C2350
+ C2450
(CAN)
(XCAN)
(FIF−CAN/CAN−AUX)
(CAN)
(XCAN)
(FIF−CAN/CAN−AUX)
(CAN)
(XCAN)
(FIF−CAN/CAN−AUX)
(CAN)
(XCAN)
(FIF−CAN/CAN−AUX)
(CAN)
(XCAN)
(FIF−CAN/CAN−AUX)
Tip!
For the process data objects you can also set an individual identifier via the following codes, which
is independent of the node address:
CodeInterfaceInformation
C0353 / C0354CAN (system bus interface)^ 3−4
C2353 / C2354XCAN (AIF interface)^ 4−4
C2453 / C2454
FIF−CAN (FIF interface)^ 5−4
CAN−AUX (system bus interface)^ 6−4
2−4
PLC−Systembus EN 2.0
l
2.4.2User data
Via the user data area of the CAN telegram, three different types of data are transported:
Data typeInformation
Network management dataInformation on the structure of communication via the CAN network.Chapter 2.5(^ 2−6)
Process dataProcess data are data for control−oriented concerns, e. g. setpoints and actual
system bus interface)
System bus (CAN) for Lenze PLC devices
General information
values.
· Process data are transmitted as so−called PDOs (Process Data Objects) with a
high priority.
· Process data are processed more quickly by the PLC as parameter data.
· The transmission and reception of the process data is effected by the use of
specific system blocks or the free CAN objects:
CAN
(integrated
SB CAN1_IO for cyclic process data (sync−controlled)
9300 Servo PLC:
Drive PLC:
ECSxA:
SB CAN2_IO for event− or time−controlled process dataChapter 7.4(^ 7−14)
SB CAN3_IO for event− or time−controlled process dataChapter 7.5(^ 7−17)
Free CAN objectsBy using the functions/function blocks of the LenzeCanDrv.lib function
Parameter dataFor Lenze devices, parameter data are the so−called codes.
SB AIF1_IO_AutomationInterface
for cyclic process data (sync−controlled)
SB AIF2_IO_AutomationInterface
for event− or time−controlled process data
SB AIF3_IO_AutomationInterface
for event− or time−controlled process data
SB FIF_CAN1_IO for cyclic process data (sync−controlled)Chapter 8.1(^ 8−1)
SB FIF_CAN2_IO for event− or time−controlled process dataChapter 8.2(^ 8−1)
SB FIF_CAN3_IO for event− or time−controlled process dataChapter 8.3(^ 8−1)
SB CANaux1_IO for cyclic process data (sync−controlled)Chapter 9.1(^ 9−1)
SB CANaux2_IO for event− or time−controlled process dataChapter 9.2(^ 9−1)
SB CANaux3_IO for event− or time−controlled process dataChapter 9.3(^ 9−1)
library, so−called "free CAN objects" additionally can be added to the
fixedly integrated CAN objects.
· Parameter settings for instance are carried out in the case of a one−time
setting of the system during commissioning, or in the case of a material
change of the production machine.
· Parameter data are transferred as so−called SDOs (Service Data Objects) via
the CAN network and are acknowledged by the receiver, i. e. the transmitter
receives a feedback on whether the transmission was successful.
See Manual
· 9300 Servo PLC
· Drive PLC
· ECSxA
Chapter 10(^ 10−1)
Chapter 2.7(^ 2−11)
l
PLC−Systembus EN 2.0
2−5
System bus (CAN) for Lenze PLC devices
General information
2.5Network management (NMT)
The CAN telegram for the network management is structured as follows:
11bit2 bytes user data
Identifier
00000000000
· By means of this telegram the master can carry out state changes for the entire CAN network.
Byte 1: command
CommandDevice address
Command
(hex)
01OperationalThe PLC can receive parameter and process data.
02Stopped
80Pre−operational The PLC can receive parameter data. Process data, however, are ignored.
81
82
Network status
after change
Initialisation
Information
The PLC can receive network management telegrams, parameter and process data, however, cannot be
received.
Reset rode: Changes with regard to the communication−relevant parameters of the system bus (e. g. CAN
address, CAN baud rate, etc.) only are accepted after a reset node.
Byte 2: device address
Device address Information
0All nodes on the bus are addressed. By this, a state change can be carried out simultaneously for all devices.
1...63Node address of the node for which a state change is to be effected.
2−6
PLC−Systembus EN 2.0
l
System bus (CAN) for Lenze PLC devices
2.6Transmission of process data
Process data are data for control−oriented concerns, e. g. setpoints and actual values.
· Process data are transferred as so−called PDOs (Process Data Objects) with a high priority via
the system bus.
· Transmitting and receiving the process data is effected by the use of specific system blocks:
General information
CAN
(integrated)
CAN1_IOAIF1_IO_AutomationInterfaceFIF_CAN1_IOCANaux1_IOCyclic process data (sync−controlled)
CAN2_IOAIF2_IO_AutomationInterfaceFIF_CAN2_IOCANaux2_IOEvent− or time−controlled process data
CAN3_IOAIF3_IO_AutomationInterfaceFIF_CAN3_IOCANaux3_IOEvent− or time−controlled process data
XCAN
(AIF interface)
Tip!
In the following subchapters you’ll receive further information on the CAN1_IO ... CAN3_IO process
data objects of the CAN interface. This information also applies to the process data objects of the
AIF−, FIF− and CAN−AUX interface!
2.6.1Process data channels
Process data channel 1: CAN1_IO
The CAN1_IO SB can be used for the data exchange of cyclic process data (e. g. setpoints and
actual values) with a higher−level host system.
FIF−CAN
(FIF interface)
For Drive PLC only!
cyclic process data (sync−controlled)
process data channel 1
CANaux
For ECSxA only!
Information
CAN1_IN
CAN1_OUT
Fig. 2−2Process data channel 1 (CAN1_IO) for the cyclic data exchange
l
PLC−Systembus EN 2.0
Host
2−7
System bus (CAN) for Lenze PLC devices
s
General information
Process data channel 2/3: CAN2_IO/CAN3_IO
The SBs CAN2_IO and CAN3_IO are designed for the data exchange of event− or time−controlled
process data among the devices. These SBs can also be used for the data exchange with
decentralised input/output terminals and higher−level host systems.
event−controlled process data
process data channel 2
CAN2_IN
CAN2_OUT
Fig. 2−3Process data channels 2 and 3 (CAN2_IO/CAN3_IO) for the event− or time−controlled data exchange
CAN2_OUT
CAN2_IN
event−controlled process data
process data channel 3
CAN3_IN
CAN3_OUT
CAN3_OUT
CAN3_IN
E. g. decentralised terminal
Tip!
Detailed information on the CAN1_IO ... CAN3_IO CAN objects integrated in the PLC can be found
in the chapter 7, "CAN system blocks":
CAN1_IO for cyclic process data (sync−controlled)
CAN2_IO for event− or time−controlled process dataChapter 7.4(^ 7−14)
CAN3_IO for event− or time−controlled process dataChapter 7.5(^ 7−17)
For the transmission of cyclic process data, a specific telegram − the sync telegram − is required for
the synchronisation.
The sync telegram which has to be generated by a different node initiates the transmission process
for the cyclic process data of the PLC and at the same time is the trigger point for the data acceptance
of the cyclic process data received in the PLC:
Sync telegramSync telegram
CAN1_OUTCAN1_IN
1.2.3.4.
Fig. 2−4Synchronisation of the cyclic process data by a sync telegram (without considering the asynchronous data)
1. After a sync telegram has been received, the cyclic process output data (CAN1_OUT) are sent
by the PLC if "respond to sync" has been activated.
2. When the transmission process has been completed, the cyclic process input data (CAN1_IN)
are received by the PLC.
3. The data acceptance in the PLC is effected with the next sync telegram.
4. All further telegrams (e. g. for parameters or event−controlled process data) are accepted in an
asynchronous manner by the PLC after transmission has been completed.
Tip!
The response to a sync telegram is configured via the following codes:
· for CAN1_OUT via C0366. (^ 3−7)
· for XCAN1_OUT ... XCAN3_OUT via C2375. (^ 4−7)
· for FIF−CAN1_OUT via C2466. (^ 5−7)
· for CANaux1_OUT via C2466. (^ 5−7)
Also the telegrams of CAN2_OUT and CAN3_OUT can be transferred after a sync telegram, the
parameterisation of this function is carried out via the CAN_Management SB.
(^ 7−20)
l
PLC−Systembus EN 2.0
2−9
System bus (CAN) for Lenze PLC devices
General information
2.6.3Process data telegram
The process data telegram is structured as follows:
Information on the identifier can be found in chapter 2.4.1.
User data
The 8 bytes user data received or to be transmitted respectively can be read or written
simultaneously by several variables of different data types.
Detailed information on the user data can be found in the description to the respective system block:
(^ 2−3)
· CAN system blocks (^ 7−1 ff.)
· FIF−CAN system blocks (^ 8−1 ff.)
· CAN−AUX system blocks (^ 9−1 ff.)
2−10
PLC−Systembus EN 2.0
l
System bus (CAN) for Lenze PLC devices
2.7Transmitting parameter data
For Lenze devices, parameter data are the so−called codes.
· Parameter settings for instance are carried out in the case of a one−time setting of the system
during commissioning, or in the case of a material change of the production machine.
· Parameter data are transferred as so−called SDOs (Service Data Objects) via the system bus
and are acknowledged by the receiver, i. e. the transmitter receives a feedback on whether the
transmission was successful.
2.7.1Parameter data telegram
The telegram for parameter data is structured as follows:
11bit8 bytes user data
Identifier
Command
code
· In the following subchapters the different components of the telegram are explained in detail.
· An example for writing a parameter can be found in chapter 2.7.2. (^ 2−15)
· An example for reading a parameter can be found in chapter 2.7.3. (^ 2−17)
Index
Low byteHigh byte
General information
SubindexData 1Data 2Data 3Data 4
2.7.1.1Identifier
Identifier
For the transmission of parameter data, two parameter data channels are provided, which are
addressed via the identifier:
SDOsParameter data channel 1
Parameter data channel 2
Tip!
Between the identifiers for parameter data channels 1 and 2 there respectively is an offset of 64:
· Output of parameter data channel 1 = 1536
· Output of parameter data channel 2 = 1536 + 64 = 1600
Command
code
Output (transmission)1536600
Input (reception)1408580
Output (transmission)1600640
Input (reception)14725C0
Index
Low byteHigh byte
Identifier =basic identifier+ node address of the node
SubindexData 1Data 2Data 3Data 4
dechex
+ C0350
+ C2350
+ C2450
+ C0350
+ C2350
+ C2450
(CAN)
(XCAN)
(FIF−CAN/CANaux)
(CAN)
(XCAN)
(FIF−CAN/CANaux)
l
PLC−Systembus EN 2.0
2−11
System bus (CAN) for Lenze PLC devices
General information
2.7.1.2Command code
Identifier
Command
code
Index
Low byteHigh byte
SubindexData 1Data 2Data 3Data 4
Among other things, the command code contains the command to be carried out as well as
information on the parameter data length, and is structured as follows:
Bit 7 (MSB)Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
CommandCommand Specifier (cs)Lengthes
Write request0010
Write response011000
Read request010000
Read response010011
Error Response10000000
00 = 4 bytes
01 = 3 bytes
10 = 2 bytes
11 = 1 byte
11
Command code for parameters with 1, 2, or 4 bytes data length:
4 byte data
(32 bit)
Commandhexdechexdechexdec Information
Write Request23352B432F47 Send parameter to a node
Write Response609660646096 Node response to "write request" (acknowledgement)
Read Request406440644064Request for reading a parameter of a node
Read Response43674B754F79Response to the read request with an actual value
Error Response801288012880128 Node reports an error with regard to communication
2 byte data
(16 bit)
1 byte data
(8 bit)
"Error Response" command
In the case of this error, an "Error Response" is generated by the node that is addressed.
· This telegram in data 4 always contains the value "6", and in data 3 an error code: