Application Report No. 200.4.3 Topic: Type: Branch: Subgroup: Controller: ACP Comparing CANopen and the Lenze system bus CAN and static PDO mapping in EDS files CANopen fieldbus all all all Index 1. STRUCTURE OF A CANOPEN SYSTEM..................................................................................2 2. CANOPEN PROFILES ...............................................................................................................3 3. STATES OF A CANOPEN NETWORK ......................................................................................5 4. LENZE SYSTEM BUS CAN .......................................................................................................6 4.1. 4.2. 4.3. 5. EDS DEVICE DESCRIPTION FILES..........................................................................................8 5.1. 6. 1. MAPPING INDICES ............................................................................................................12 2. MAPPING THE PROCESS DATA TO THE PDOS ....................................................................12 CANOPEN CONFIGURATION.................................................................................................14 8.1. 8.2. 9. OBJECTIVE: PDO MAPPING....................................................................................................9 ADAPTED EDS FILES .............................................................................................................12 7.1. 7.2. 8. STRUCTURE OF AN EDS FILE .................................................................................................8 WHAT IS PDO MAPPING? ........................................................................................................9 6.1. 7. MAIN DIFFERENCES BETWEEN CANOPEN AND THE LENZE SYSTEM BUS CAN...........................7 ADVANTAGES OF THE LENZE SYSTEM BUS CAN......................................................................8 ADVANTAGES OF CANOPEN ..................................................................................................8 SYCON TOGETHER WITH THE EDS FILE "82MVV100.EDS"....................................................15 SYCON TOGETHER WITH AN ADAPTED EDS FILE ...................................................................19 APPENDIX ................................................................................................................................22 200.4.3_V1.0_PDO_EDS Page 1 of 22 Application Report No. 200.4.3 ACP 1. Structure of a CANopen system A CANopen system consists of a CANopen master and some CANopen slaves. This architecture is also called a single-master system, since the master is responsible for the whole bus communication. This means that data is only exchanged between the master and the individual slaves. In addition, the CANopen master exchanges data with a PLC. The PLC can be a software or a hardware PLC. Hardware PLCs are stand-alone components, e.g. the Siemens Simatic S7-300 and 400. Software PLCs are plug-in cards for PCs and industrial PCs. PC Higher-level PLC CANopen master RS 232 / CAN CANopen slave 1 CANopen slave 2 Configuration software CANopen master CANopen slave n CANopen slave 3 ………….. Process data communication (PDOs) between master and slave Parameter communication (SDOs) between master and slave Figure 1: Schematic structure of a CANopen system 200.4.3_V1.0_PDO_EDS Page 2 of 22 EDS file Application Report No. 200.4.3 ACP 2. CANopen profiles As in every fieldbus, CANopen also has a number of profiles which are created and extended by the users' and manufacturers' organisation CiA (CAN in Automation). The features and functions of the profiles are described in specifications. Figure 2 offers a schematic overview of the most important profiles. Application program Device profile (DS 4XX) Interface Application profile profile (DS 4XX) (DS 4XX) “Manager” profile (DS 302) Manu facturerspecific profile Frameworks (e.g. DS 302, DS 304, DS 307) Communication Profile (DS 301) Application Layer (DS 301) Layer setting services: baud rate and Data link layer and high-speed transceiver (ISO 11898-1/-2) node ID (DS 305) Bit-timing and connector pin-assignment (DS 301, DR 303) Figure 2: Overview of CANopen profiles The specifications DS 301, DR 303 and ISO 11898-1/-2 mainly describe physical bus features with which every CAN node must comply. Higher than these is the DS 301 specification. This specification is the basic specification for all other application profiles. The most important features of the DS 301 specification are: · · · general communication features such as node identifiers, Sync message management and the monitoring functions Node Guarding / Heartbeat SDO management (service data objects, parameter communication), the number of parameter channels, the channel identifiers, activating and deactivating the channels PDO management (process data objects, process data communication), the number of process data channels, the channel identifiers, activating and deactivating the channels 200.4.3_V1.0_PDO_EDS Page 3 of 22 Application Report No. 200.4.3 ACP The DS 4xx profiles always require the DS 301 profile as a basis. They are application profiles which means that they are assigned to certain kinds of nodes, e.g. DS 401 is assigned to CAN I/O systems, DS 402 to controllers, etc. Figure 3 shows the most important application profiles. Please note that the DSP-402 profile was especially created for controllers and Motion Control applications. Our Lenze CANopen communication modules (EMF 2175 and E82ZAFUC (in preparation)) support the DS-301 profile, but not the DSP-402 profile. Figure 3: Overview of the most important application profiles 200.4.3_V1.0_PDO_EDS Page 4 of 22 Application Report No. 200.4.3 ACP 3. States of a CANopen network In a CANopen system, two states can be distinguished. 1. Pre-Operational After mains connection, all nodes start to initialise, then keep to the state "Pre-Operational“. In this state, there is only parameter communication (SDOs). Process data communication is not possible, i.e. PDO messages are ignored by the nodes. This state is only used for parameter setting. In this state, the CANopen master parameterises each slave. A CANopen slave can be parameterised using CANopen indices (codes). The indices are defined in detail in the CANopen specifications and are between 1000hex and 1999hex for the DS 301 profile. Having parameterised the slaves, the CANopen master uses a special CAN message to switch all slaves or individual slaves to the state "Operational“. This message is a network management message (NMT message). 2. Operational In this state, parameter communication (SDOs) as well as process data communication (PDOs) are possible. If necessary, you can switch between the different states using NMT messages. This shows that in a CANopen system, all parameters for bus communication are managed using the master. In the configuration phase of the system, only the CANopen master has to be set. In this phase, the slaves are parameterised as well. This applies to single-master systems in general. 200.4.3_V1.0_PDO_EDS Page 5 of 22 Application Report No. 200.4.3 ACP 4. Lenze system bus CAN The Lenze system bus CAN supports parts of the DS 301 specification. Depending on the Lenze system bus components used, it has two SDO channels and 1 to 3 PDO channels. But the Lenze system bus partly differs from typical CANopen networks. It was developed to enable a communication between different Lenze components. This system does not need a CANopen master. Lenze system bus CAN node 1 Lenze system bus CAN node 2 Lenze system bus CAN node 3 ………….. Lenze system bus CAN node n Drive PLC Process data communication (PDO) between slave and slave Parameter communication (SDO) between slave and slave Figure 4. Lenze system bus CAN When comparing figures 1 and 4, you can see the main difference between a CANopen system bus and a Lenze system bus. The Lenze system bus allows different CAN nodes to communicate with each other. This is also possible in CANopen systems, but a lot of configurations are needed, since the basic configuration is not intended for this purpose. The technology referred to is known as cross communication and does not need a higherlevel fieldbus master. Each system bus node is allowed to transmit messages via the bus. Since no higher-level master is required for the Lenze system bus, each slave has to be configured / parameterised on its own using Lenze codes, which are preferably in the range of L0350 to L0399. 200.4.3_V1.0_PDO_EDS Page 6 of 22 Application Report No. 200.4.3 4.1. ACP Main differences between CANopen and the Lenze system bus CAN The features of a CAN slave are provided by a microcontroller (CAN controller). A CAN controller fulfills different tasks. On the one hand, it must provide the physical bus features, on the other hand it must process the signals in a software. The physical bus features are the same for CANopen and the Lenze system bus, since the same hardware (CAN controller) as in other CANopen nodes is used. They only differ in their software, since every manufacturer programs the controller with another application software. In this application software, you can also find the individual CANopen indices and functionalities. The Lenze system bus CAN does not support all CANopen functionalities according to DS 301, since it can operate without a master. SDO and PDO communication is the same for both systems. In the PDO communication of the Lenze system bus, the identifiers according to general addressing differ from CANopen. The identifiers for the system bus can be configured in the same way as in CANopen using selective addressing. Functions according to DS 301 such as · Node Guarding · Heartbeat · Boot-up messages · Emergency messages · dynamic PDO mapping are not supported by the Lenze system bus. The NMT message to transit from the state "Pre-Operational“ to "Operational“ can be generated by setting the Lenze code C0352 to master. After connecting the Lenze node, which was set as the master in C0352, to the mains, the NMT message is transmitted to the CAN bus after the boot-up time set in C0356/1. In general, Lenze nodes can be used in a CANopen network if reading and writing CANopen indices can be switched off for the CANopen master. 200.4.3_V1.0_PDO_EDS Page 7 of 22 Application Report No. 200.4.3 4.2. · · · · 4.3. · · · ACP Advantages of the Lenze system bus CAN The Lenze system bus CAN is easier to parameterise, since you do not need to know CANopen. In CANopen, Sync settings, the transmitting and receiving behaviour of the PDO messages, the identifiers, the number of SDO and PDO messages, etc. must be set using CANopen indices. For this, good knowledge of CANopen is required. You do not need a CANopen master. Cross communication between Lenze nodes is possible. Advantages of CANopen The customer does not need to know anything special about CAN when using nodes from different CANopen manufacturers. Only the CANopen master must be configured / parameterised, no other settings are required for the slaves. After each mains connection, the CANopen master parameterises all nodes (automatic parameter setting when components are exchanged). 5. EDS device description files The functions of DS 301 are stored in the indices (codes) of each CANopen node. The bus can be scanned using the CANopen master configuration software. By reading the indices, the software can determine the functions supported by each CAN node. You can find the same information in the device description files of the CAN nodes. These are called EDS files (electronic data sheets). They are used to configure the CAN offline. The EDS files are supplied with each CAN node usually in the form of a floppy disk and can be imported into the configuration software. Their file extension is xxx.eds. In order to generate EDS files, there are special EDS editors (e.g. CANeds of the company vectorinformatik). EDS test programs are also available, e.g. CANchkeds of the company vector-informatik. EDS files can be read and processed by every text program, e.g. Winword or Wordpad. 5.1. Structure of an EDS file An EDS file mainly consists of three parts. Header: Here you find general information such as the creation date, the company, the product designation, etc. Indices: A description of the CANopen functionalities of the indices and to what extent they are supported (1000hex – 1999hex). Mapping indices: Possible PDO mapping objects (this will be described later on) 200.4.3_V1.0_PDO_EDS Page 8 of 22 Application Report No. 200.4.3 ACP 6. What is PDO mapping? The problem which most often occurs when using CANopen systems and CAN systems such as the Lenze system bus concerns PDO mapping. This is a CANopen functionality which is described in the DS-301 profile. In general, all CANopen profiles consist of functions which must be supported and functions which can be supported. PDO mapping is an optional functionality in the DS-301 profile. PDO mapping is not supported by any of the Lenze system bus components. This fact becomes a problem when using the configuration software tools of the CANopen master, since these usually require the PDO mapping of the slaves. PDO mapping means that the data of a CAN slave is mapped to the PDOs. The CANopen master also assigns the data to certain positions in a PDO message. In order to do this, the master has to know which data each slave has. The available data is listed in the EDS file. With the help of this information, data can be mapped to the PDO messages in the configuration software. When the CANopen system is started, this data assignment is transmitted to the slaves such that the latter place the right data at the right position in the PDO message. This functionality is called dynamic PDO mapping, since mapping PDO messages can be changed at any time. PDO mapping can also be static which means that it is configured in the EDS file and cannot be changed by the configuration software of the master. 6.1. Objective: PDO mapping 1. The whole process data communication between master and slave can be configured using the master configuration software. 2. The individual CAN PDOs are automatically created by mapping. 3. The sum of process data is known from the mapping process, so the master can create a memory location equivalent to the sum. This memory location is important for the data exchange between the master and the PLC connected to it. Figure 5 shows a schematic overview of dynamic PDO mapping. It describes the sequence of PDO mapping with the aid of a Transmit-PDO. Figure 5 shows the example of a CAN slave transmitting a PDO message to the master. In this PDO message, the status word and CAN OUT1-W1 to 3 are to be mapped. You will find a figure with a Receive-PDO in the appendix of this Application Report. 200.4.3_V1.0_PDO_EDS Page 9 of 22 ACP Application Report No. 200.4.3 Shared memory 8 SDO messages 1 to 4 for configuring PDO mapping 9 PLC CANopen master Task 3 23h 1Ah 00h 01h mapped index 5DA7 /1 : : : 1 Task CAN slave 4 2 23h 1Ah 00h 04h mapped index 5DA7 /4 Status word 5 CAN-OUT1-W1 6 CAN-OUT1-W2 Status word CAN-OUT1.W3 7 CAN OUT1 CAN OUT1 .W1 .W2 CAN OUT1 .W3 PDO message with 4 words user data Figure 5: Schematic overview of dynamic PDO mapping 200.4.3_V1.0_PDO_EDS Page 10 of 22 Status word CAN OUT1 CAN OUT1 CAN-OUT1 .W2 .W1 .W3 Input data: Index 5CA7 / 1 = control word Index 5CA7 / 2 = CAN.IN1.W1 Index 5CA7 / 3 = CAN-IN1.W2 Index 5CA7 / 4 = CAN-IN1.W3 : : Output data: Index 5DA7 /1 = status word Index 5DA7 /2 = CAN-OUT1.W1 Index 5DA7 /3 = CAN-OUT1.W2 Index 5DA7 /4 = CAN-OUT1.W3 : : Existing process data of the slave Application Report No. 200.4.3 ACP In the following, the single steps from figure 5 will be explained. Step 1: CANopen master configuration software The slave is integrated into the configuration software and physically exists. The CANopen master knows from the EDS file which process data the slave has. This can now be mapped accordingly. Some software tools provide a graphical user interface for mapping. Step 2: SDO message for configuring PDO mapping During the initialisation phase of the bus, the mapping configured in the software must be transmitted to the slave via SDO communication. For this purpose, the slave has mapping indices for each Transmit-PDO and Receive-PDO. I-1600h =>I-16xxh I-1A00h => I-1Axxh Receive-PDO mapping (slave) Transmit-PDO mapping (slave) Step 3: Process data existing in the slave The table shows the process data available for mapping. Either input or output variables can be process data. The process data which can be mapped is also available in the EDS file. Steps 4 / 5 : PDO mapping at the slave The arriving SDO messages map the Transmit-PDO with the process data from the mapping table. Step 6: Transmit-PDO The slave can now transmit the Transmit-PDO containing the mapped process data. Steps 7 / 8: Process data in the CANopen master The master stores the arriving process data in the shared memory. Not only the master, but also the PLC can access the shared memory. The memory enables a data exchange between the master and the PLC. It is bidirectional which means that the PLC also transmits new process data, the control word and the setpoint speed from the PLC program to the master. The master then transmits the data to the bus. Step 9: Process data and PLC Process data is processed in the PLC program. The PLC program evaluates and processes process data from the slaves as well as generates new process data for them. 200.4.3_V1.0_PDO_EDS Page 11 of 22 Application Report No. 200.4.3 ACP 7. Adapted EDS files The EDS files can be adapted to PDO mapping, i.e. process data for the PDOs is statically mapped in the EDS file. This requires some modifications in the file. You will find these modifications in the attached EDS file "E82ZAFCC static PDO mapping". 7.1. 1. Mapping indices The mapping indices are always at the end of an EDS file. Example: _________________________________________________________________________ [5CA7sub1] ParameterName=CAN-IN1.W1 ObjectType=0x7 DataType=0x0003 AccessType=wo PDOMapping=1 mapping index process data name data type access rights to the index write only PDO mapping active value "1“ _________________________________________________________________________ The entry for PDO mapping is usually "0" for Lenze EDS files, since PDO mapping is not supported. Four mapping indices are required for each PDO message (4 x 1 word). 7.2. 2. Mapping the process data to the PDOs The PDO mapping of the individual PDO messages is in the indices. I-1600 Receive PDO1 I-1601 Receive PDO2 etc. I-1A00 Transmit PDO1 I- 1A01 Transmit PDO2 etc. All indices have 4 subindices for the mapping indices. 200.4.3_V1.0_PDO_EDS Page 12 of 22 ACP Application Report No. 200.4.3 Example taken from the EDS file Index I-1600 for the 1st Receive-PDO _________________________________________________________________________ [1600sub0] ParameterName=Number of Entries not relevant, only indicates the number of existing subindices ObjectType=0x7 DataType=0x0005 AccessType=ro DefaultValue=4 PDOMapping=0 [1600sub1] ParameterName=PDO Mapping 1 ObjectType=0x7 DataType=0x0007 AccessType=rw DefaultValue=0x5CA70110 PDOMapping=0 ObjFlags=3 first word in the PDO access rights to the index read write mapping index I-5CA7 subindex 1, 1 word data dynamic mapping OFF special flag, value=3 such that the mapping cannot be changed [1600sub2] ParameterName=PDO Mapping 2 ObjectType=0x7 DataType=0x0007 AccessType=rw DefaultValue=0x5CA70210 PDOMapping=0 ObjFlags=3 [1600sub3] ParameterName=PDO Mapping 3 ObjectType=0x7 DataType=0x0007 AccessType=rw DefaultValue=0x5CA70310 PDOMapping=0 ObjFlags=3 [1600sub4] ParameterName=PDO Mapping 4 ObjectType=0x7 DataType=0x0007 AccessType=rw DefaultValue=0x5CA70410 PDOMapping=0 ObjFlags=3 _________________________________________________________________________ 200.4.3_V1.0_PDO_EDS Page 13 of 22 Application Report No. 200.4.3 ACP With the help of these entries, 4 words are mapped to the 1st Receive-PDO of the slave. The configurations are shown in the configuration software of the CANopen master, i.e. a memory location is created for 4 words. The configurations do not apply to all configuration software tools, since these also differ from each other. Good experiences have been made so far with the configuration software SyCon of the company hilscher. 8. CANopen configuration As already described above, a CANopen system is totally configured and parameterised using the configuration software of the CANopen master. In the following, we will give further details about the CANopen configuration software SyCon of the company hilscher. An offline CANopen network is first configured using the normal EDS file "82MVV100.eds" and then the adapted EDS file "E82ZAFCC.eds". 200.4.3_V1.0_PDO_EDS Page 14 of 22 Application Report No. 200.4.3 8.1. ACP SyCon together with the EDS file "82MVV100.eds" First, we will show how to implement a Lenze system bus CAN node if the EDS file has not been changed. The figure shows the user interface of the software. A hilscher PC card is used as the CANopen master. You can now add other CAN slaves to the bus line. In order to add a new node to the bus line, an EDS file must be chosen. In this case, the standard EDS file "82MVV100.eds" has been chosen. 200.4.3_V1.0_PDO_EDS Page 15 of 22 Application Report No. 200.4.3 ACP A CAN slave called "8200motec/vector inverter" was added. When you select "node configuration" in the context menu of the CAN slave, the following figure is shown. In this dialogue, you can select some of the features of the CAN slave such as the node address, node boot up, Node Guarding, etc. You can also configure PDO messages in this 200.4.3_V1.0_PDO_EDS Page 16 of 22 Application Report No. 200.4.3 ACP dialogue. In order to do this, you must create Transmit-PDOs and Receive-PDOs. We will create a new Transmit-PDO. The PDO identifier and the corresponding CANopen index are shown. Furthermore, you can give the PDO a name (Transmit-PDO 1). The data will be accepted if you click on the OK button. The PDO message was properly created, but no memory location (I/O) has been created for the data exchange between the PLC and the CANopen master. 200.4.3_V1.0_PDO_EDS Page 17 of 22 Application Report No. 200.4.3 ACP The process data of the PDO can be configured by double clicking. The table above shows the objects from the EDS file which can be mapped. The table below shows the predefined mapped objects (static mapping from the EDS file). In this case, there are no objects available. No process data is mapped, thus no memory location is created. 200.4.3_V1.0_PDO_EDS Page 18 of 22 Application Report No. 200.4.3 8.2. ACP SyCon together with an adapted EDS file As a comparison, the adapted EDS file "E82ZAFCC" with implemented static PDO mapping will be added. A CAN slave called "E82ZAFCC system bus Can 8200vector/motec" was selected. When you select "node configuration" in the context menu of the CAN slave, the following figure is shown. 200.4.3_V1.0_PDO_EDS Page 19 of 22 Application Report No. 200.4.3 ACP You may well note that 4 predefined PDOs (Indices 1400, 1401, 1800 and 1801) are already available in this EDS file. Next, we will create all 4 PDOs in the software. You can create a PDO in the table below by double clicking on each predefined PDO. 200.4.3_V1.0_PDO_EDS Page 20 of 22 Application Report No. 200.4.3 ACP Note that each of the 4 PDOs created occupies 8 bytes of memory location. You can open the window with the PDO features by double clicking on the PDO created. The table above contains the objects from the EDS file which can be mapped. The table below shows the static mapping from the EDS file, in this PDO e.g. the process data words CAN-In1.W1 to W4. Due to static PDO mapping, 8 bytes (4 words) of memory location are created for each PDO. 200.4.3_V1.0_PDO_EDS Page 21 of 22 ACP Application Report No. 200.4.3 9. Appendix Shared memory 8 SDO messages 1 to 4 for configuring PDO mapping 9 CAN slave Control word PLC CAN-IN1.W1 CAN-IN1.W2 Task 4 : : : 1 CAN-IN1.W3 3 23h 16h 00h 01h mapped index 5CA7 /1 CANopen master 2 23h 16h 00h 04h mapped index 5CA7 /4 Output data: Index 5DA7 /1 = status word Index 5DA7 /2 = CAN-OUT1.W1 Index 5DA7 /3 = CAN-OUT1.W2 Index 5DA7 /4 = CAN-OUT1.W3 : : Task 5 6 Control word CAN IN1 .W1 CAN IN1 .W2 CAN IN1 .W3 PDO message with 4 words user data 7 Schematic overview of dynamic PDO mapping for a Receive-PDO 200.4.3_V1.0_PDO_EDS Page 22 of 22 Control word CAN IN1 .W1 Input data: Index 5CA7 / 1 = control word Index 5CA7 / 2 = CAN.IN1.W1 Index 5CA7 / 3 = CAN-IN1.W2 Index 5CA7 / 4 = CAN-IN1.W3 : : CAN IN1 .W2 CAN-IN1 .W3 Existing process data of the slave
© Copyright 2024