Home

PM-31xx-CPS_usermanual_en_v1 0

image

Contents

1. 11 bit COB ID bit Tm byte Data te Func Code Node ID RTR ds y ength 10 9 8 7 6 5 4 3 2 1 0 Ohl E Be cae RET olol1l1j olololojolol2 1 o 00 00 00 00 00 00 00 00 PDO PDO COB ID 0x182 11 bit COB ID bit T byte Data te Func Code Node ID RTR Pata 7 y Length 10 9 8 7 6 5 4 3 21 11 0 0 1 2 3 4 5 6 7 0 0 1 1 0 0 0 0 0 0 2 0 8 E0 26 CC 30 65 42 95 3C PDO PDO COB ID 0x182 L d PDO msg EO 26 CC 3C 65 42 95 3C The DO D3 is data of Kvar a and the D4 D7 is the data of kva a PM 31xx CANopen User s Manual Version 1 0 Nov 2014
2. SDO Client 4 SDO Server PM 31xx CPS SCS NEG m 011805 11 bit COB ID bit ETE byte Data te Func Code Node ID RTR Data T i Length 1019 18 7 6 5 4 3 5 1 0 GU ese d est se e e 0 110 1 0 0 0 0 0 0 1 O0 8 58 84 8A BC 1F 46 06 CO PDO PDO Producer K Consumer COB ID the default PDO COB ID or the PDO COB ID defined by users L the data length about how many bytes the PDO message has PDO msg the real time data or the data which can be mapped into the PDO mapping objects PM 31xx CANopen User s Manual Version 1 0 Nov 2014 44 11 bit COB ID bit Tm byte Data byte Func Code Node ID RTR Data Length 10 19 8 7 6 l5 4 al5 1l0 ola lets l4 s1617 ol1lol1l olololololol1 o 8 A9 2F 8A BC 33 46 06 CO PDO PDO COB ID the default PDO COB ID or the PDO COB ID defined by users L the data length about how many bytes the PDO message has PDO msg the real time data or the data which can be mapped into the PDO mapping objects 11 bit COB ID bit Data 8 byte Data byte Func Code Node ID RTR Length 10 9 8 7 6 5 4 3 5 1 0 0 1 2 3 4 567 0 1 0 1 0 0 0 0 0 0 1 0 8 31 1F 8A BC
3. 6 8 Volt V_b Amp b 7 8 Volt V_c Amp l c 8 8 Volt V_d Amp d 9 8 kvar kvar a kVA Kva a 10 8 kvar kvar_b kVA Kva_b 11 8 kvar kvar c kVA Kva c 12 8 kvar kvar_d kVA Kva_d 13 8 PF a kVAh a 14 8 PF b kVAh d 15 8 HE e kVAh c 16 8 PF d kVAh d 17 4 kvarh a 18 4 kvarh_b 19 4 kvarh_c 20 4 kvarh_d User can read PDO1 PDO4 by using default COB ID Suppose the node be setto 1 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 56 11 bit COB ID bit E E byte Data te Func Code Node ID RTR Data byte Length 10 19 817 EWEG 0 1 213 4151617 O0 10 010 01010 0 8 01 01 00 00 00 00 00 00 NMT master bb NMT slave PM 31xx CPS cS S Node ID 1 11 bit COB ID bit TN 5 byte Data te Func Code Node ID RTR Data y TBI Length 10 19 817 4 3 2 0 1 2 3 41 5 6 7 0110 1 1 01010 1 0 00 00 00 00 00 00 00 00 PDO PDO COB ID 0x181 11 bit COB ID bit abe Daa byte Data te Func Code Node ID RTR Ss ye ength 10 9 8 7 4 32 0 1 2 3 4 5 6 7 010 11 0 0 0 0 8 B1 CD 8C BC 6A 1A FO BF PDO PDO COB ID 0x181 L a PDO msg B1 CD 8C BC 6A 1A FO BF The
4. 11 bit COB ID bit RTR Len 8 byte Data byte 10 7 6 0 3 4 7 Node ID 0 8 request 11 bit COB ID bi RTRIL 8 LEE m te a confirmation response Initiate SDO Download Protocol ccs client command specified 1 initiate download request scs server command specified 3 initiate download response n Only valid if e 2 1 and s 1 otherwise O If valid it indicates the number of bytes in d that do not contain data Bytes 8 n 7 do not contain segment data e transfer type 0 normal transfer 1 expedited transfer If the e 1 it means that the data of the object are equal or less than 4 bytes and only initiate SDO download protocol is needed If e 0 the download SDO segment protocol is necessary S size indicator 0 Data set size is not indicated 1 Data set size is indicated m multiplexer It represents the index sub index of the data to be PM 31xx CANopen User s Manual Version 1 0 Nov 2014 32 X reserved transfer by the SDO The first two bytes are the index value and the last byte is the sub index value data e 0 s 0 d is reserved for further use e 0 s 1 d contains the number of bytes to be downloaded and byte 4 contains the least significant bit and byte 7 contains the most significant bit e 1 s 1 d contains the data of length 4 n to be downloaded the encoding depends on the type of the data referenced by index and sub index e 1 s 0 d contains unspe
5. 47 46 06 CO PDO PDO COB ID the default PDO COB ID or the PDO COB ID defined by users L the data length about how many bytes the PDO message has PDO msg the real time data or the data which can be mapped into the PDO mapping objects PM 31xx CANopen User s Manual Version 1 0 Nov 2014 45 11 bit COB ID bit Func Code Node ID RTR e Eh 10191817 5 4 3 5 1 Opera 8 T a nez 1 1 0 0 0 0 0 0 0 0 8 2B 01 18 05 00 00 00 00 SDO Client SDO Server PM 31xx CPS ccs 1 n d e 1 S gel m 01 18 05 d 00 00 00 00 11 bit COB ID bit bic e Data e Func Code Node ID RTR pns S ength EECH 5 4 3 5 1 pog 1o roe At Sg TP JA 0 00 00 0 8 60 01 18 05 00 00100 00 SDO Client e SDO Server PM 31xx CPS SCS 4 m 01 18 05 Dynamic PDO Mapping for other data Step 4 Users can use the 5th TxPDO to create a new PDO communication with PDO COB ID 0x182 which is unused in the PM 31xx CPS Before setting the COB ID of a PDO users have to check the bit 31 of the COB ID first Only the COB ID with the value 0 on the bit 31 can be changed So the COB ID can be configured directly according to the 5th TxPDO is invalid PM 31xx CANopen User s Manual Version 1 0 Nov 2014 11 bit COB ID bit aibi Datis by
6. Nov 2014 27 Example for expedited transfer Step 1 SDO message will be sent to the PM 31xx CPS to obtain the object entry with index 0x1800 and sub index 00 stored in the communication profile area The message structure is as follows Moreover the node ID of the PM 31xx CPS is set to 1 and the information about the object entry with index 0x1800 will be described in the chapter 5 11 bit COB ID bit 8 byte Data byte Func Code Node ID RTR Pata ue Length UV ECK AREND 0 1 2 3 4 5 6 7 ANDRE BE BE H 0 8 40 00 18 00 00 00 00 00 SDO Client SDO Server PM 31xx CPS ccs 2 m 00 18 00 According to the low byte has the higher transferred sequence the first byte 00 will get the priority than the second byte 18 Here the last byte OO means the sub index 00 Step 2 The PM 31xx CPS will reply to the data stored in the object entry with index 0x1800 and sub index 00 11 bit COB ID bit ibus Da EU byte Data byte Func Code Node ID ATR Pate Length 10 98 76 5 4 3 5 1 0 0 1 2 383 4 5 6 7 1 0 1 1 0 0 0 0 0 0 1 0 8 4F 00 18 00 05 00 00 00 SDO Client d SDO Server PM 31xx CPS SCS 2 n 3 e 1 S 1 m 00 18 00 d 05 00 00 00 Because of the n 3 only the 4th byte is valid Ther
7. 0 ger Meere e ssa eZ dc efe 0c 0 l0 0e E 10 Pill ESL o 8 40 08 10 01 00 00 00 00 SDO Client SDO Server PM 31xx CPS ccs Me m 08 10 01 Step 2 The PM 31xx CPS will reply to the Abort SDO message as shown below 11 bit COB ID bit 8 byte Data byt Func Code Node ID RTR es yie Data pyte ength 10 9 8 7 615 4 3 5 1 0 0 1 2 3 4 5 6 7 110 1 1 0 0 0 0 0 0 1 O0 8 80 08 10 01 11 00 09 06 SDO Client E SDO Server PM 31xx CPS CS 4 m 081001 d 110009 06 According to the low byte data have the transferring priority the data will be converted to 06 09 00 11 Therefore after searching the Abort Code table described above this Abort Code can be interpreted as Sub index does not exist PM 31xx CANopen User s Manual Version 1 0 Nov 2014 38 3 2 PDO Communication Set 3 24 PDO COB ID Parameters Before the real time data are transmitted by the PDO it is necessary to check the COB ID parameter of this PDO in the PDO communication objects This parameter setting controls the COB ID of the PDO communication which is in 32 bits and each bit with its meaning is given in the table follow Bit Number Value Meaning 31 MSB 0 PDO exits PDO is valid 1 PDO does not exist PDO is not valid 30 0 RTR allowed on this PDO 1 No RTR allowed on this PDO 29 0 11 b
8. COB ID 0x281 11 bit COB ID bit pane byte Data byte Func Code Node ID RTR Data d d ength EREECHEN 0 1 2 3 475 6 7 0 1 0 1 0 00 0 0 0 1 0 8 91 64 8A BC 76 20 06 CO PDO PDO COB D 0x281 L gt 8 PDO msg 91 64 8A BC 76 20 06 CO Event Timer Functionality Step 2 Users can use the SDO to change the event timer of the 2nd TxPDO to 1000 stored in index 0x1801 with sub index 5 In addition the value 1000 means 1 second according to the event timer is ms 11 bit COB ID bit iba Data DO byte Data byte Func Code Node ID RTR Data ength 10 9 8 7 6 5 4 3 5 1 0 0 1 2 3 4 5 6 7 1 1 0 0 0 0 0 0 0 0 1 0 8 2B 01 18 05 E8 03 00 00 SDO Client b SDO Server PM 31xx CPS PM 31xx CANopen User s Manual Version 1 0 Nov 2014 43 ccs gel n 2 e A S 21 m 01 18 05 d E8 03 00 00 The value 0x03E8 is equal to 1000 Because the n 2 the last two bytes 00 00 is useless Step 3 The PM 31xx CPS will response the message to finish the data download 11 bit COB ID bit Sone bats bv byte Data byte Func Code Node ID RT Dal Length 109 876 5 4 3 5 1 0 0 1 2 3 4 5 6 7 1 0 1 1 0 0 0 0 0 0 1 0 8 60 01 18 05 00 00 00 00
9. DO D3 is data of Kw a and the D4 D7 is the data of kWh a PM 31xx CANopen User s Manual Version 1 0 Nov 2014 It is necessary to use dynamic PDO if user want to get date PDO5 PDO20 For example read data of PDO 9 11 bit COB ID bit abad Data vo byte Data byte Func Code Node ID a Aa Length 10 9 876 5 4 3 2 1 0 0 1 2 3 4 5 6 7 1 1 0 0 00 0 0 0 0 1 0 8 23 08 18 01 82 01 00 00 SDO Client be SDO Server PM 31xx CPS ccs ex n du e Sd S 1 m 08 18 01 d 82 01 00 00 Step 3 The PM 31xx CPS will reply with the ending message 11 bit COB ID bit GENEE byte Data byte Func Code Node ID HIR Pa Length 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 41 5 6 7 1 0 1 1 0 0 0 0 0 0 1 0 8 60 08 18 01 00 00 00 00 SDO Client di SDO Server PM 31xx CPS SCS sou m 081801 11 bit COB ID bit Data 8 byte Data byte Func Code Node ID RTR Length 10 9 8 7 6 5 4 3 2 11 0 0 12 38 A4 5 6 7 0 0 0 00 0000 00 0 8 01 01 00 00 00 00 00 00 NMT master NMT slave PM 31xx CPS cs Sc Node ID 1 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 58
10. a long format Therefore the data 08 00 00 00 means that users will upload 8 bytes data from PM 31xx CPS PM 31xx CANopen User s Manual Version 1 0 Nov 2014 29 Step 3 The PM 31xx CPS is requested to start the data transmission 11 bit COB ID bit Data 8 byte Data byte Func Code Node ID RTR Length 10 9 87 6 5 4 3 5 1 0 0 1 2 3 4 5 6 7 1 1 0 0 0 0 00 0 0 1 0 8 60 00 00 00 00 00 00 00 SDO Client SDO Server PM 31xx CPS ccs 3 Step 4 The PM 31xx CPS will respond to the first 7 bytes in the index 0x1008 and sub index 00 object entries 11 bit COB ID bit Sea bui byte Data byte Func Code Node ID REA yoo Length 10 9 8 7 6 5 4 3 5 1 0 O 1 2 3 4 5 6 7 17 0 1 1 0 0 0 0 0 0 1 0 8 00 32 31 33 78 2D 43 50 SDO Client i SDO Server PM 31xx CPS SCS 0 t 0 n 0 C 0 seg data 3231 33 78 2D 43 50 Users can check the chapter 5 to know that the object entry with index 0x1008 and sub index 00 has the data type VISIBLE STRING Therefore users need to transform these data values into the corresponding ASCII character After transformation they become 311x CP PM 31xx CANopen User s Manual Version 1 0 Nov 2014 30 Step 5 The PM 213x is requested to transmit the res
11. acyclic and synchronous PDO transmission PDO Transmission Method Transmission cyclic acyclic synchronous Asynchronous RTR Type only 0 O O 1 240 O O 241 251 Reserved 252 O O 253 O O 254 O 255 O Note 1 The transmission type 1 240 indicates how many SYNC objects the TxPDO will be triggered The RxPDO is always triggered by the following SYNC upon reception of data independent of the transmission types 0 240 2 The transmission type 252 and 253 are only used for TxPDO The transmission type 252 means that the data is updated but not sent immediately after reception of the SYNC object For these two transmission types the PDO is only transmitted on remote transmission requests 3 For the transmission types 254 and 255 the event timer will be used in the TxPDO The PDO including the DI value will be sent when the DI value is changed And both transmission types will directly trigger an update of the mapped data when receiving the RxPDO 4 The PM 31xx CPS doesn t support RxPDO PM 31xx CANopen User s Manual Version 1 0 Nov 2014 40 3 23 PDO Communication Rule The PDO related objects are indicated from index 0x1400 to Ox1BFF For the PM 31xx CPS RxPDO communication objects are not used The ranges of the TxPDO communication objects and the mapping objects are from index 0x1800 to index
12. byte 18 Here the last byte OO means the sub index 00 Step 2 The PM 31xx CPS will reply with the message to finish the data download Then users can use the upload methods to read back the value 11 bit COB ID bit T e e Data e Func Code Node ID RTR id T i ength 10 9 8 7 6 5 4 3 5 1 0 0 3 12 1 87 4 5 6 l7 110 1 1 0 0 0 0 0 0 1 o 8 160 00 18 02 00 00 00 00 SDO Client 4 SDO Server PM 31xx CPS SCS r m 001802 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 35 3 1 3 Abort SDO Transfer Protocol In some conditions the SDO client or SDO server will terminate the SDO transmission For example the value of entries that users want to modify does not exist or is read only even users wouldn t continue the uncompleted SDO protocol under some special situations When these conditions occur both the client and the server can be activated to send the Abort SDO Transfer message The Abort SDO Transfer protocol is shown below SDO Server PM 311x CPS SDO Client 11 bit COB ID bi RTR Len 8 byte Data byte E ee m request quu NM un Stee indication cs 4 x Abort SDO Transfer Protocol SDO Server SDO Client PM 311x CPS 11 bit COB ID bi RTR I 8 LL i byte Dir i vr i s indication a request c Jz 4 x Abort SDO Transfer Protocol cs
13. command specified 4 abort transfer request X not used always 0 m multiplexer It represents index and sub index of the SDO d contains a 4 byte Abort Code about the reason for the abort PM 31xx CANopen User s Manual Version 1 0 Nov 2014 36 Abort Code Description 0503 0000h Toggle bit not alternated 0504 0000h SDO protocol timed out 0504 0001h Client server command specified not valid or unknown 0504 0002h Invalid block size block mode only 0504 0003h Invalid sequence number block mode only 0504 0004h CRC error block mode only 0504 0005h Out of memory 0601 0000h Unsupported access to an object 0601 0001h Attempt to read a write only object 0601 0002h Attempt to write a read only object 0602 0000h Object does not exist in the object dictionary 0604 0041h Object cannot be mapped to the PDO 0604 0042h The number and length of the objects to be mapped would exceed PDO length 0604 0043h General parameter incompatibility reason 0604 0047h General internal incompatibility in the device 0606 0000h Access failed due to an hardware error 0607 0010h Data type does not match length of service parameter does not match 0607 0012h Data type does not match length of service parameter too high 0607 0013h Data type does not match length of service parameter too low 0609 001 1h Sub index d
14. reserved 8 byte Data byte 0 7 request PDO msg Read PDO Protocol COB ID the default PDO COB ID or the PDO COB ID defined by users L the data length about how many bytes the PDO message has PDO msg the real time data or the data which can be mapped into the PDO mapping objects PDO Communication Example Before describing the example the step must be checked And the default COB ID for each communication object is assumed to be being used Step0 The following message must be sent in order to change the NMT state of the PM 31xx CPS first because only the PDO communication can run under the NMT Operational state 11 bit COB ID bit Data 8 byte Data byte Func Code Node ID RTR Length 10 9 8 7 6 5 4 3 5 11 0 0 1 2 38 A4 5 6 7 0 0 0 00 000 0 00 0 8 01 01 00 00 00 00 00 00 NMT master NMT slave PM 31xx CPS cs 1 Node ID 1 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 42 Step 1 Users need to use the RTR message from the 2nd TxPDO to read back the power meter data in the PM 31xx CPS 11 bit COB ID bit bias byte Data te Func Code Node ID RTR Data y Length 10 9l8 7l615 413 5 1 lo0 olil213 4 15l16 17 oli lol lololololololil 1 o 00 00 00 00 00 00 00 00 PDO PDO
15. the PDO message has PDO msg the real time data or the data which can be mapped into the PDO mapping objects 11 bit COB ID bit B RE byte Data byte Func Code Node ID RTR Pata Length 0 19l8l7le6 5 4 a 2 1 o UE HIE XE SEHE SEXE 0lo 1 1 0 0l0lololol2l o 8 a3F 55 DC 42 3F CA 66 3E PDO PDO COB ID the default PDO COB ID or the PDO COB ID defined by users L the data length about how many bytes the PDO message has PDO msg the real time data or the data which can be mapped into the PDO mapping objects PM 31xx CANopen User s Manual Version 1 0 Nov 2014 48 3 3 NMT Communication Set 3 3 1 Module Control Protocol The NMT communication set can be applied for changing the NMT slave status The following figure shows how to change the different NMT statuses for the PM 31xx CPS Start Remote Node Protocol NMT Master NMT Slave 11 mt COB ID D QOIRTR en g ee Data DE 0000000 Mic Node ID Indication indication S LS indication e Start Remote Node Protocol cs NMT command specified 1 start Node ID the node ID of the NMT slave device Stop Remote Node Protocol NMT Master NMT Slave 11 COB ID oes g Data d 0000 0000000 IFTE Node ID Stop Remote Node Protocol Indication indication indication cs NMT command specified 2 s
16. to transmit the message with COB ID 0x182 When these two nodes transmit the CAN message to the CAN bus simultaneously only the message containing COB ID 0x181 can be successfully sent to the CAN bus because of the higher transmission priority So the message with COB ID 0x182 will be held to transmit until the message with COB ID 0x181 is successfully transmitted This arbitration mechanism can guarantee the successful transmission for one node when a transmission conflict occurs However if the message with COB ID 0x181 is continually transmitted the message with COB ID 0x182 will be postponed to be PM 31xx CANopen User s Manual Version 1 0 Nov 2014 17 transmitted In order to avoid the occupation of the transmission privilege by the message with the lower COB ID the inhibit time parameters for each of the PDO objects are supported to define a minimum time interval between each PDO message transmission which has a multiple of 100us During this time interval the PDO message will be inhibited from transmission Event Timer This parameter setting on the event timer is only used for TxPDO If the parameter of the event timer is not equal to 0 under the transmission type in asynchronous mode the expiration of this time value can be just considered to be an event This event will cause the TxPDO message transmission The event timer parameter is defined as a multiple of 1ms PDO Mapping Objects The PDO mapping objects ar
17. 0x1813 and from index 0x1A00 to index 0x1A13 respectively Moreover each PDO communication object has its own PDO mapping object For example the first TXPDO communication object is stored in the entry with index 0x1800 and the corresponding mapping object is stored in an entry with index 0x1A00 The object with index 0x1801 and the object with index 0x1A01 are a group and so on Therefore before users access the practical data via PDO communication each parameter for the PDO communications and mapping objects must be controlled Besides only PDO communications can be used in the NMT operational state Users can use the NMT module control protocol to change the NMT state of the PM 31xx CPS It is described in the section 3 4 Besides during communication via the PDO messages the data length of the PDO message must match with the PDO mapping object If the data length L of the PDO message exceeds the total bytes n of the PDO mapping object entries only the first n bytes of the PDO message are used by the PDO consumer If L is less than n the PDO message will not be disposed by the PDO consumer and an Emergency message with error code 8210h will be transmitted to the PDO producer The PDO communication set is shown as follows PM 31xx CANopen User s Manual Version 1 0 Nov 2014 41 PDO Consumer PDO Producer Remote Transmit Request 11 bit COB ID bit RTR Len 8 byte Data byte 0 7 request request
18. 1 0 Nov 2014 18 and the master slave relationship In the same CAN bus network only one CANopen device is allowed to execute the function of NMT master Each CANopen node is regarded as a unique NMT slave identified by its node ID from 1 to 127 The NMT service supplies two protocols the module control protocol and the error control protocol Through the module control protocol the nodes can be controlled to several kinds of status such as installing pre operational operational and stopped According to the NMT slave can present in different statuses it has different privileges to carry out the communication protocol Through the error control protocol users are able to detect the remote error in the network in order to confirm whether the node still works or not 2 4 1 Module Control Protocols Before introducing the modules control protocols the architecture of the NMT state mechanism needs to be mentioned The diagram shows the process and the relationships among each NMT state and the mechanism PM 31xx CANopen User s Manual Version 1 0 Nov 2014 19 Power on or Hardware reset Pre Operational ee 9 Operational State Mechanism Diagram 1 Under Power on or Hardware Reset the initialization state will be loaded automatically 2 As the Initialization accomplished Pre Operational state will be entered automatically 6 Indication of s
19. ANopen User s Manual Version 1 0 Nov 2014 54 Step 6 Then users will receive the message recording the NMT state of the PM 31xx CPS For the reason that life time is equal to 1000 ms guard time life time factor 250 4 1000 users will transmit the node guarding protocol again 11 bit COB ID bit Sine bata bue byte Data byte Func Code Node ID RTR Data ength 10 98 76 5 4 3 2 1 0 0 1 2 383 4 5 67 1 1 1 0 0 0 0 0 0 0 1 0 8 7F 00 00 00 00 00 00 00 NMT master b NMT slave PM 31xx CPS COB ID 0x701 t c s S S C The value 7F means that the PM 31xx CPS is in the NMT Pre Operational state PM 31xx CANopen User s Manual Version 1 0 Nov 2014 55 3 4 Special Functions for PM 31xx CPS 3 4 4 Power Meter Data Table The PM 31xx CPS Manufacturer in the Specific Profile Area defines some entries which are used for the power meter data The objects with index 0x3200 0x3208 will map to the PDOs as below table The DO to D7 represent the CANopen message from DataO to Data7 Below is an PDO mapping example of PM 3114 CPS No PDO COB ID Data DO D3 D4 D7 Length 1 0x180 Node ID 8 kW Kw a kWh a 2 0x280 Node ID 8 kW Kw b kWh b 3 0x380 Node ID 8 kW Kw c kWh c 4 0x480 Node ID 8 kW Kw d kWh d 5 8 Volt V_a Amp a
20. FFF Standardized Interface Profile Area 0xC000 OxFFFF Reserved for further use PM 31xx CANopen User s Manual Version 1 0 Nov 2014 9 2 2 SDO Introduction In order to access the entries in a device object dictionary service data objects SDOs are provided By means of the SDO communication method a peer to peer communication bridge between two devices is established and its transmission follows the client server relationship The general concept is shown in the figure below Client Server request indication confirmation response The SDO has two kinds of the COB IDs RxSDOs and TxSDOs They can be viewed in the CANopen device For example users send a SDO message to the PM 31xx CPS by using RxSDO On the contrary the device PM 31xx CPS transmits a SDO message by using TxSDOS Before the SDO has been used only the client can take the active requirement for a SDO transmission When the SDO client starts to transmit a SDO it is necessary to choose a proper protocol If the SDO client has to get the information from the device object dictionary and from the SDO server the segment upload protocol or block upload protocol will be applied It is worth to be mentioned the front protocol is used for transmitting fewer data the latter protocol is used for transmitting larger data Both the segment download protocol and block download protocol will work when the SDO client wants to modif
21. PM 31xx CPS Series Compact Power Meter CANopen Application User s Manual Warranty All products manufactured by ICP DAS are under warranty regarding defective materials for a period of one year from the date of delivery to the original purchaser Warning ICP DAS assumes no liability for damages resulting from the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use or for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2013 by ICP DAS All rights are reserved Trademark The names used for identification only may be registered trademarks of their respective companies PM 31xx CANopen User s Manual Version 1 0 Nov 2014 1 Table of Contents T EE HIE aussi E unveils bioe bil E E T Div bibe MIR Ard 3 1 1 OVOFVIBW 5 iti essere ioqoenrietebens Saepe eae d pbenF eeet 3 1 2 The LED Stale ae AAA 4 2 CANopen Protocol nicae sessi anccanc eek nan R nan EE EGER EE NEE EEK NEE NEEN 5 2 1 CANopen Introduction aoeenneeeeeeeeeeennenenreeeeeeernrrnrrrnseerrrrnnnnneeeeet 5 2 2 SDO Introduclioh 4 aca nv a a es 10 2 3 PDO Introduction cce pP B HERE ER o MT 12 2 4 NMT Introduction n 18 2 4 1 Module Control Protocols ccccccceecsesseeeeeeeeeee
22. ata It is at most 7 bytes of segment data to be uploaded The encoding depends on the type of the data referenced by index and sub index n It indicates the number of bytes in seg data that do not contain segment data Bytes 8 n 7 do not contain segment data n 0 if no segment size is indicated x not used always 0 reserved reserved for further use always 0 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 26 SDO Upload Example The practical application of the SDO upload is illustrated as below SDO Client SDO Server Initial SDO Upload Protocol e 0 Upload SDO Protocol t 0 c 0 SDO Client SDO Server Upload SDO Protocol t 1 c 0 Initial SDO Upload Protocol e 1 Upload SDO Protocol t 0 c 0 SDO Upload with expedited transfer Upload SDO Protocol t c 1 SDO Upload with normal transfer In the following paragraph both expedited transfer and normal transfer are given according to the procedure described above In addition the method of how to get the value stored in the object dictionary is also presented As to the initiate SDO upload protocol users can obtain how many sub indexes the object with index 0x1400 can support This information is in the object with index 0x1400 with sub index 00 As well users can get the string in the object with index 0x1008 via the initiate SDO upload protocol and the upload SDO segment protocol PM 31xx CANopen User s Manual Version 1 0
23. cified number of bytes to be downloaded not used always 0 reserved for further use always 0 Download Segment Protocol SDO Client SDO Server PM 311x CPS Il COB ID EES 8 Data byte request 7 Node ID ERIT 2l sr g dati mem o fe frof f Naf indicates 11 bit COB ID bit 8 byte Data byte confirmation CCS SCS seg data en tili sl1 ae ses Download SDO Segment Protocol response client command specified 0 download segment request server command specified 1 download segment response It is at most 7 bytes of segment data to be downloaded The encoding depends on the type of the data referenced by index and sub index It indicates the number of bytes in seg data that do not contain segment data Bytes 8 n 7 do not contain segment data n 0 if no segment size is indicated It indicates whether there are still more segments to PM 31xx CANopen User s Manual Version 1 0 Nov 2014 33 be downloaded 0 more segments to be downloaded 1 no more segments to be downloaded t toggle bit This bit must alternate for each subsequent segment that is downloaded The first segment will have the toggle bit set to O0 The toggle bit will be equal for the request and the response message X not used always 0 reserved reserved for further use always 0 SDO Download Example When the SDO download example has been applied the procedure
24. e provided to the interface which is for PDO messages and real I O data in the CANopen device They define the meanings for each byte in the PDO message and may be changed by using a SDO message All of the PDO mapping objects are arranged in the Communication Profile Area In the CANopen spec see DS 401 RxPDO and TxPDO default mapping objects will specify something as follows There shall be up to 4 TxPDO mapping objects and up to 4 RxPDO mapping objects with default mappings e The ist RxPDO and TxPDO mapping objects are used for digital outputs and inputs to each other The 2nd 3rd and 4th RxPDO and TxPDO mapping objects are respectively assigned to record the value of analog outputs and inputs Before applying the PDO communications the PDO producer and the PDO consumers must have mutual PDO mapping information On the one hand the PDO producers need PDO mapping information to decide how to assign the expected practical I O data to PDO messages Besides PDO consumers need the PDO mapping information to recognize each byte of received PDO message i e when a PDO producer transmits a PDO object to PDO consumers the consumers will contrast this PDO message with PDO mapping entries previously obtained from the PDO producer and then interpret the meanings of these values from the received PDO object 2 4 NMT Introduction The Network Management NMT follows the node oriented structure PM 31xx CANopen User s Manual Version
25. ects etc Each communication object has its relative communication model and functionality For example the communication objects for accessing the device object dictionary is SDO using the Client Server structure as its communication model section 3 2 Real time data or I O values can be accessed quickly without any protocol by means of PDO communication objects The PDO s communication model follows the Producer Consumer structure It is also named the Push Pull model section 3 3 NMT communication objects are used for controlling and supervising the state of the nodes in the CANopen network and it follows a Master Slave structure section 3 4 No matter which kind of communication object is used the transmitted message will comply with the data frame defined in the CAN 2 0A spec Generally it looks like the following table Data D 1 RTR Lengt 8 byte Data 11 bit data is limited in the ID field It is useful in the arbitration mechanism The RTR limited in 1 bit data is used for remote transmitting requests as the value is set to 1 The data length limited in 4 bit data shows the valid data number stored in the 8 byte data field The last field 8 byte data is applied to store the message data PM 31xx CANopen User s Manual Version 1 0 Nov 2014 6 In the CANopen specifications the 4 bit function code and 7 bit node ID are assumed to combine the 11 bit ID of CAN message and named
26. eeseeeeeeeeeeeeeeeeeeea 19 2 4 2 Error Control Protocols annnnnnnnnnnnaannnnnnnennnnnnnnnnnnnnnnnnnnnnnnnnennnennne 22 3 CANopen Protocol Examples occisus eaca ce eve crue danda ao gOc edu Dd Pak Rap a8 coda nnmnnn 24 3 1 SDO Communication Gei 24 3 1 1 Upload SDO Protocol uuu a e dita uds 24 3 1 2 Download SDO Protocol ac oco ipeo dr eec decidere a 32 3 1 3 Abort SDO Transfer Protocols oon oer POE MET 36 3 2 PDO Communication Gei 39 3 2 1 PDO COB ID Parameters ec ccs een eta etae eine net ed 39 3 2 2 Transmission Tvpe nn 40 3 2 3 PDO Communication LE ed Mice test eee rican eee ab ee 41 3 3 NMT Communication Gei 49 3 3 1 Module Control Protocol ccccccccececeeeesseeceeeeeeeeeeeaeeeeeeeeeeeeeeaea 49 3 3 2 Error Control Protocol EE 52 3 4 Special Functions for DN 21 CR 56 3 4 1 Power Meter Data Table cccccccccccsssssseeeeeeeeeseeseeeeeeeeeeeeeeeeeea 56 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 1 Introduction 1 1 Overview CANopen a kind of communication protocols is an intelligent field bus CAN bus It has been developed as a standard embedded network with a high flexible configuration It provides a standard communication protocol transmitting real time data in PDO Process Data Objects configuration data in SDO Service Data Objects and network management data NMT message and Error Control even supports the special functions Time Stamp Sync message and Emer
27. efore the feedback value is 05 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 28 Example for normal transfer Step 1 Send the RxSDO message to the PM 31xx CPS to obtain the object entry with index 0x1008 and sub index 00 stored in the communication profile area The message structure is as follows Moreover the node ID for the PM 31xx CPS is set to 1 and the information about object entry with index 0x1008 will be described in the chapter 5 11 bit COB ID bit care byte Data te Func Code Node ID RTR Pata S i Length i 0l19l8l7 6 5 4 3 5 1 lo ol l1alsl la4lslelz 1l1lolo ololololololi1 o 8 40 08 10 00 00 00 00 00 SDO Server SDO Client PM 31xx CPS CCS 2 m 08 10 00 Step 2 The PM 31xx CPS will respond to the SDO message with the indication of how many bytes will be uploaded from the PM 31xx CPS 11 bit COB ID bit e byte Data te Func Code Node ID RTR Pata Length 1ololel7l6el5l4i3 5 1 o ol l1alsl a4lslelz 1lol1 1 ololololololi1 o 8 41 08 10 00 08 00 00 00 SDO Client 4 SDO Server PM 31xx CPS SCS 2 n 0 e 0 S 1 m 08 10 00 d 08 00 00 00 Because of the e 0 and s 1 the d means how many data users will upload from the PM 31xx CPS The byte 08 is the lowest byte in the data length with
28. er 2A Update Data Read Data Si 2 Update Data 4 o Read Data Update Data A WE RTR only synchronous TXPDO PM 31xx CANopen User s Manual Version 1 0 Nov 2014 16 RTR only asynchronous The asynchronous mode is independent of the SYNC object This mode can also be divided into two parts There are RTR only asynchronous transmission type and asynchronous transmission type The RTR only transmission type is only for supporting TxPDO transmissions only triggered by receiving the RTR object from the PDO consumer This action is depicted below PDO consumer PDO producer RTR Object TxPDO Read Data 4 Sy Read Data RTR Object deu De TxPDO RTR only asynchronous TxPDO Asynchronous The other part is the asynchronous transmission type Under this type the TxPDO message can be triggered by receiving the RTR object and the device specified event mentioned in the event driven paragraph Furthermore the DO AO channels can act directly by receiving the RxPDO object Note PM 31xx CPS doesn t support the type Inhibit Time Because of the arbitration mechanism of the CAN bus the CANopen communication object ID in small size has a higher transmission priority than the bigger one For example there are two nodes on the CAN bus the one needs to transmit the CAN message with the COB ID 0x181 and the other has
29. f a specified time elapsed without occurrence of an event For example the PDO transmission of the PM 31xx CPS can be triggered by the event timer of the PDO communication parameters which is set by users Remote Request The PDO transmission can be triggered by receiving a remote request from any other PDO consumer with under the asynchronous or RTR setting PM 31xx CANopen User s Manual Version 1 0 Nov 2014 13 PDO Transmission Types Generally there are two kinds of PDO transmission modes synchronous and asynchronous For the PDO in a synchronous mode it must be triggered by the reception of a SYNC message The synchronous mode can be further distinguished into three kinds of transmission s acyclic synchronous cyclic synchronous and RTR only synchronous The acyclic synchronous can be triggered by both the reception of a SYNC message and the driven event mentioned above Acyclic synchronous For the TxPDO object after receiving an object from the SYNC producer the PM 31xx CPS will respond with a pre defined TxPDO message to the PDO consumers F The following figures indicate how the acyclic synchronous transmission type works on the TxPDO SYNC consumer amp PDO producer PM 311x CP5 PDO consumer SYNC transmitted by SYNC producer Read Data S Tx PDO event Read Data AME is triggered a SD TxPDO SYNC transmitted by SYNC producer Read Data TEE E rxPDC acyclic synchrono
30. gency message These features can improve the network reliability and transmission efficiency Nowadays CANopen is used on many applications and in specific fields such as medical equipment off road vehicles maritime electronics public transportation automation and so on The PM 31xx CPS power meter is built in the CANopen interface Therefore users can easily apply in any CANopen applications via the power meter PM 31xx CANopen User s Manual Version 1 0 Nov 2014 3 1 2 The LED State RUN LED of CANopen is an indicator LED of CAN bus in the PM 31xx CPS It shows whether the CAN communication is normal or incorrect The following figure shows the LED L mm a 3 EDD 9 DHT n E SS M 3 9 Blanking Single Flash 400 800 1200 1600 2000 200 600 1000 1400 1800 0 Time ms No Signal otate Description 1 No Light Non operation anne NOD OF Powe Supply Connection not ready Single Flash Stopped The device is in Stopped state The device is in the pre Blinking Pre operation operation state The device is in the operational 4 Continuing Light Operation state Table 2 3 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 4 2 CANopen Protocol The CANopen is a kind of network protocols evolving from the CAN bus used on car control syste
31. ice the TxPDO specializes in transmitting data and is usually applied on DI Al channels The COB ID of the PDO for receiving data is RxPDO COB ID and it is usually applied on DO AO channels Take the PM 31xx CPS as an example The PM 31xx CPS only supports TxPDO When some PDO consumers send remote transmit requests to the PM 31xx CPS it must use the TxPDO COB ID of the PM 31xx CPS because it is a PDO transmission action viewed from the PM 31xx CPS Trigger Modes Of PDO For PDO producers PDO transmission messages can be trigged by three conditions They are the event driven timer driven and remote request conditions All of them are described below Event Driven PDO transmission can be triggered by a specific driven event including the following conditions Under the cyclic synchronous transmission type the event is driven by the expiration of the specified transmission period synchronized by the reception of the SYNC message Moreover under the acyclic synchronous or asynchronous transmission type the PDO transmission can also be triggered or driven by a device specified event in the CANopen specification DS 401 v2 1 i e by following this spec the PDO will be triggered by any change in the DI channel states when the transmission type of this PDO is set to acyclic synchronous or asynchronous Note PM 31xx CPS doesn t have the trig condition Timer Driven PDO transmissions are also triggered by a specific time event even i
32. in the below figure may be applied SDO Client SDO Server Initial SDO Download Protocol bit e 0 Download SDO Protocol bit t 0 bit c 0 SDO Client sS KE Initial SDO Download Protocol bit e 1 Download SDO Protocol bit t 1 bit c 0 SDO Download with expedited transfer Download SDO Protocol bit t 0 bit c 0 Download SDO Protocol bit t bit c 1 SDO Download with normal transfer Since all of those object entries which can be written in the PM 31xx CPS are equal or less than 4 bytes we can only provide the example for expedited transfer PM 31xx CANopen User s Manual Version 1 0 Nov 2014 34 Example for expedited transfer Step 1 The RxSDO message is sent to the PM 31xx CPS to access the object entry with index 0x1800 and sub index 02 stored in the communication profile area For example the value of this object entry is changed to 5 as the node ID for the PM 31xx CPS is set to 1 11 bit COB ID bit Sov Daw tus byte Data byte Func Code Node ID ATR Rata Length 10 9876 5 4 3 5 1 0 0 1 2 3 4 5 6 7 1 1 00 0 0 0 0 0 0 1 0 8 2F 00 18 02 05 00 00 00 SDO Client b SDO Server PM 31xx CPS ccs 1 n We e 1 S sel m 00 18 02 d 05 00 00 00 According to the low byte has the higher transferred sequence the first byte 00 will get the priority than the second
33. ion RxSDO 1110 Node ID NMT Error Control Note For the PM 31xx CPS all communication objects are supported except the TIME STAMP and RxPDO PM 31xx CANopen User s Manual Version 1 0 Nov 2014 8 Object Dictionary The object dictionary collects a lot of important information which can affect device s reaction such as the data accessing through I O channels the communication values and the network states Essentially the object dictionary consists of a group of entry objects and these entries can be accessed via the node network in a pre defined method Each object entry within the object dictionary has its own function for example communication parameters device profile data type ex 8 bit Integer 8 bit unsigned and access type read only write only All of them are addressed in a 16 bit index and an 8 bit sub index The overall profile of the standard object dictionary is shown below 0x0000 Heserved 0x0001 0x001F Static Data Types 0x0020 0x003F Complex Data Types 0x0040 0x005F Manufacturer Specific Complex Data Types 0x0060 0x007F Device Profile Specific Static Data Types 0x0080 0x009F Device Profile Specific Complex Data Types 0x00A0 OxOFFF Heserved for further use 0x1000 Ox1FFF Communication Profile Area 0x2000 OxSFFF Manufacturer Specific Profile Area 0x6000 Ox9FFF Standardized Device Profile Area 0xA000 OxB
34. it ID CAN 2 04 1 29 bit ID CAN 2 0B 28 11 0 If bit 29 0 X Ifbit 29 1 28 11 bits of 29 bit COB ID 10 0 LSB X 10 0 bits of COB ID Note Only PM 31xx CPS supports CAN 2 0A In the following table its regarding the default PDO COB ID parameters Default COB ID Number of PDO Bit10 Bit7 Bit6 BitO Function Code TxPDO1 0011 Node ID TxPDO2 0101 Node ID TxPDO3 0111 Node ID TxPDO4 1001 Node ID RxPDO1 0100 Node ID RxPDO2 0110 Node ID RxPDO3 1000 Node ID RxPDO4 1010 Node ID PM 31xx CANopen User s Manual Version 1 0 Nov 2014 39 Note 1 Users can also define the PDO COB ID by themselves Actually all COB ID can be defined by users except the reserved COB ID described in the table of the section 3 1 It is important to avoid the conflict with the defined COB ID used in the same node 2 The PDO COB ID parameters cannot be changed if the PDO is valid bit 31 20 3 2 2 Transmission Type The transmission type is one of the several parameters defined in PDO communication objects with sub index 02 Each PDO has its own transmission type The transmission type can indicate the transmission or reception character for its corresponding PDO The following table describes the relationship between the value of the transmission type and the PDO character For example if users used transmission type 0 for the first TxPDO the CANopen device will follow the rule of the
35. it is more efficient than other communication objects within CANopen and therefore used for real time data transfer such as DI DO Al AO etc Communication Modes for the PDO PDO reception or transmission is implemented via the producer consumer communication model also called the push pull model When starting to communicate in the PDO push mode it needs one CANopen device to play the role of PDO producer and non device or more than one device to play the role of PDO consumer The PDO producer sends out the PDO message after it reached the CAN bus arbitration Afterwards each PDO consumer will receive this PDO message respectively and then message is processed by each device to check whether it is needed or not be dropped In the PDO pull mode one of the PDO consumers needs to send out a remote transmit request to the PDO producer According to this remote request message the PDO producer responds the corresponding PDO message for each PDO consumer in the CAN bus The PDO communication structure figure is shown below Producer Consumers request indication data indication indication gt Push model Producer Consumers indication request Remote Transmit Request Pull model request request i response confirmation indication e r indication QUUM PM 31xx CANopen User s Manual Version 1 0 Nov 2014 12 For the CANopen dev
36. l be alternatively changed between two consecutive responses from the NMT slave After the Node Guarding protocol becomes active the value of the toggle bit of the first response will be O S the state of the NMT Slave 4 STOPPED 5 OPERATIONAL 127 PRE OPERATIONAL Error Control Protocol Example The default EMCY function code and the node ID 1 for the PM 31xx CPS are used as an example on the error control protocol The steps will be as follows Step 1 Turn off the PM 31xx CPS Then turn it on The PM 31xx CPS will be in the Pre Operational state Step 2 Users can set the guard time value to 250 This value will be PM 31xx CANopen User s Manual Version 1 0 Nov 2014 52 stored in index Ox100C with sub index 00 11 bit COB ID bit Func Code Node ID RTR es Sed MTS 10 9 8 7 5 4 3 2 1 0 1 2 3 4 5 6 7 T 0 0 0 0 0 0 0 0 8 2B 0C 10 00 FA 00 00 00 SDO Client p SDO Server PM 31xx CPS ccs s n e e Seil S WW m 0C 10 00 d FA 00 00 00 Step 3 The PM 31xx CPS will reply with the ending message 11 bit COB ID bit Func Code Node ID RTR Geen SE 1019 8 7 5 4 3 2 1 9 ssa AER KAES e Er EC Vgl 0 0 0 0 0 0 8 60 0C 10 00 00 00 00 00 SDO Client di SDO Server PM 31xx CPS SCS 3 m OC 10 00 PM 31xx CANopen User s Ma
37. m in early days and has been greatly used in various applications such as vehicles industrial machines building automation medical devices maritime applications restaurant appliances laboratory equipment amp research 2 1 CANopen Introduction CANopen provides not only the broadcasting function but also the peer to peer data exchange function between every CANopen node The network management function instructed in the CANopen simplifies the program design In addition users can also implement and diagnose the CANopen network including network start up and error management by standard mechanisms CANopen device i e the CANopen device can effectively access the I O values and detect node states of other devices in the same network Generally a CANopen device can be modeled into three parts Communication Object Dictionary Application program The functions and general concepts for each part are shown as follows PM 31xx CANopen User s Manual Version 1 0 Nov 2014 5 Object Applictai Dictionary moe Communication Application Object Application Object Application Object Bus System Process Communication The communication part provides several communication objects and appropriate functionalities to transmit CANopen messages via the network structure These objects include PDO Process Data Object SDO Service Data Object NMT Network Management Objects SYNC Synchronous Obj
38. mer indicatio ei request indication indication A Heartbeat _ Producer Heartbeat 2 Time Consumer Time V request indication indication Vv indication Heartbeat Consumer Time Heartbeat Event The Heartbeat Protocol defines an Error Control Service without need for remote frames A Heartbeat Producer transmits a Heartbeat message cyclically One or more Heartbeat Consumer receives the indication The relationship between producer and consumer is configurable via the object dictionary The Heartbeat Consumer guards the reception of the Heartbeat within the Heartbeat Consumer Time If the Heartbeat is not received within the Heartbeat Consumer Time a Heartbeat Event will be generated PM 31xx CANopen User s Manual Version 1 0 Nov 2014 23 3 CANopen Protocol Examples 3 1 SDO Communication Set 3 1 1 Upload SDO Protocol Initiate SDO Upload Protocol Before transferring the SDO segments the client and server need to communicate with each other by using the initiate SDO upload protocol Via the initiate SDO upload protocol the SDO client will inform the SDO server what object the SDO client wants to request As well the initiate SDO upload protocol is permitted to transmit up to four bytes of data Therefore if the data length of the object which the SDO client can read is equal to or less than the permitted data amount the SDO communication will be finished only by using the initial SDO
39. nual Version 1 0 Nov 2014 Step 4 Users can set the life time factor value to 4 This value will be stored in the index 0x100D with sub index 00 Then the ending message from PM 31xx CPS will be received 11 bit COB ID bit SNA TE byte Data byte Func Code Node ID ATA eco Length 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 1 1 0 0 0 0 0 0 0 0 1 0 8 2F 0D 10 00 04 00 00 00 SDO Client SDO Server PM 31xx CPS ccs z n BES e E S 1 m OD 10 00 d 04 00 00 00 11 bit COB ID bit EI byte Data byte Func Code Node ID RTR paa Length 10 98 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 1 0 1 1 0 0 0 0 0 0 1 0 8 60 0D 10 00 00 00 00 00 SDO Client di SDO Server PM 31xx CPS SCS ecu m OD 1000 Step 5 Users can send the node guarding protocol to start the mechanism of the node guard The life time here is equal to 1000 ms guard time life time factor 250 4 1000 11 bit COB ID bit Siete S byte Data byte Func Code Node ID Ep aa Length 109 8 76 5 4 3 2 1 0 0 1 2 3 41 5 6 7 1 1 1 0 0 0 0 0 0 0 1 1 0 00 00 00 00 00 00 00 00 NMT slave PM 31xx CPS NMT master p COB ID 0x701 PM 31xx C
40. oes not exist 0609 0030h Value range of parameter exceeded only for write access 0609 0031h Value of parameter written too high 0609 0032h Value of parameter written too low 0609 0036h Maximum value is less than minimum value 0800 0000h General error 0800 0020h Data cannot be transferred or stored to the application 0800 0021h Data cannot be transferred or stored to the application because of local control 0800 0022h Data cannot be transferred or stored to the application because of the present device state 0800 0023h Object dictionary dynamic generation fails or no object dictionary is present e g object dictionary is generated from file and generation fails because of an file error PM 31xx CANopen User s Manual Version 1 0 Nov 2014 37 Abort SDO Transfer Example The object index 0x1008 doesn t support the sub index 01 entry Therefore if users read the object entry with index 0x1008 and sub index 01 the PM 31xx CPS will reply the Abort SDO Transfer message The example is figured as follows Step 1 The RxSDO message will be sent to the PM 31xx CPS in order to get the object entry with index 0x1008 and sub index 01 The following example is assumed that the node ID for the PM 31 o CPS is set to 1 11 bit COB ID bit EPET IN byte Data te Func Code Node ID RTR Data y Length 10 9 8 7 6 5 41 3 5 1
41. significant bit and byte 7 contains the most significant bit e 1 s 1 d contains the data of length 4 n to be uploaded the encoding depends on the type of the data referenced by index and sub index e 1 s 0 d contains unspecified number of bytes to be uploaded not used always 0 reserved for further use always 0 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 25 Upload SDO Segment Protocol When the upload data length is over 4 bytes the upload SDO segment protocol will be needed After finishing the transmission of the initiate SDO upload protocol the SDO client will start to upload the data The upload SDO segment protocol will comply with the process shown below SDO Server SDO Client PM 311x CPS en 8 Data SE EE Et E ecs 3 t x piae indication Node ID request 11 bit COB ID bit RTR Len 8 Leer Data byte 17 1 confirmation S LZ 3 1 en ES _ ses response Upload SDO Segment Protocol ccs client command specified 3 upload segment request scs server command specified 0 upload segment response t toggle bit This bit must alternate for each subsequence segment that is uploaded The first segment will have the toggle bit set to 0 The toggle bit will be equal for the request and response message C indicates whether where are still more segments to be uploaded 0 more segments to be uploaded 1 no more segment to be uploaded seg d
42. t of the data 11 bit COB ID bit Data 8 byte Data byte Func Code Node ID RTR Length 10 9 87 6 5 4 3 5 1 0 0 1 2 3 4 5 6 7 1 1 0 000 0 0 0 0 0 1 0 8 70 00 00 00 00 00 00 00 SDO Client SDO Server PM 31xx CPS ccs t 23 Step 6 Tthe rest of the data will be received from the SDO server 11 bit COB ID bit Func Code Node ID RTR eon i a 1019 8 7 6 5 4 3 5 1 0 E ee SEN ER 1 0 1 1 o0 o o o ojo 1 o 8 1D 53 00 00 00 00 00 00 SDO Client SDO Server PM 31xx CPS SCS 0 t 1 n 6 C E ul seg data 58 00 00 00 00 00 00 Because of the n 6 and only the first byte is valid the value of 0x53 will be transferred to the corresponding ASCII character After transformation it became S PM 31xx CANopen User s Manual Version 1 0 Nov 2014 31 3 1 2 Download SDO Protocol Initiate SDO Download Protocol The download modes are similar to the upload modes but different in some parameters of the SDO messages They are also separated into two steps If the download data length is less than 4 bytes the download action will finish in the download initialization protocol Otherwise the download segment protocol will be needed These two protocols are shown below l SDO Server SDO Client PM 311x CPS
43. tarting remote node 4 7 Indication of entering Pre Optional State 9 8 Indication of stopping remote node Indication of the Reset Node or the Reset Communication Devices will directly lead to the Pre Operational state after finishing the device initialization Then the nodes will be switched into different state by receiving a specific indication By the way each different NMT state will consider a specific communication method For example the PDO message can only do the transmission and receiving in the operational state In the following table the relationship among each NMT state and communication objects is given PM 31xx CANopen User s Manual Version 1 0 Nov 2014 20 Installing Pre operation Operational Stopped PDO SDO SYNC Time Stamp Object EMCY Object OOOO 0 0 0 0 O Boot Up Object NMT PM 31xx CANopen User s Manual Version 1 0 Nov 2014 2 4 2 Error Control Protocols There are two kinds of protocols defined in the error control protocol According to the CANopen spec one device is not allowed to use the following error control mechanisms at the same time Node Guarding Protocol and Heartbeat Protocol In addition the PM 31xx CPS provides the salve function of the Node Guarding Protocol for practical applications Therefore only node guarding protocols will be highligh
44. te Data byte Func Code Node ID ATR oe Length 109 8 76 5 4 3 2 1 0 0 1 2 3 4 5 6 7 1 1 0 0 00 0 0 0 0 1 0 8 23 05 18 01 82 01 00 00 SDO Client SDO Server PM 31xx CPS ccs SA n du e av S EM m 05 18 01 d 82 01 00 00 11 bit COB ID bit byte Date byte Data byte Data byte Func Code Node ID RTR Length 10 9 8 7 6 5 4 3 2 1 0 0 12 3 4 5 6 7 1 0 1 1 0 0 0 0 0 0 1 0 8 60 05 18 01 00 00 00 00 SDO Client e SDO Server PM 31xx CPS SCS 4 m 051801 11 bit COB ID bit EE byte Data te Func Code Node ID RTR Pata d S Length 10 9 8 7 6 5 4 3 5 1 0 Oe Be E E RU 0 0 00 0 0 0 0 0 0 0 o 8 01 01 00 00 00 00 00 00 NMT master NMT slave PM 31xx CPS cs 1 Node ID 1 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 47 11 bit COB ID bit Se epos Data byte Data byte Func Code Node ID RTR Length 10 9 8 7 6 5 4 3 2 11 0 0 1 2 383 A4 5 6 7 0 0 1 1 0 0 0 0 0 0 2 1 0 00 00 00 00 00 00 00 00 PDO PDO COB ID the default PDO COB ID or the PDO COB ID defined by users L the data length about how many bytes
45. ted here and described below Node Guarding Protocol The Node Guarding Protocol follows the Master Slave relationship It helps users monitoring the node in the CAN bus The communication method of node guarding protocol is defined as follows NMT Master NMT Slave Remote transmit request indication request a e WEE Slave state EE Node i Guard Time Node Y request indication Life dedo v Node Guarding Event Life Guarding Event indication indication Guarding error The NMT master will inspect each NMT slave at regular time intervals This time interval is called the node guard time given by the guard time life time factor and may be different from each NMT slave And the response of the NMT slave contains the state of that NMT slave which may be in a Stopped Operational or Pre operational state The node life time factor can also be different for each NMT slave If the NMT slave has not been inspected during its life time a remote node error will be given and indicate through the Life Guarding Event service PM 31xx CANopen User s Manual Version 1 0 Nov 2014 22 Heartbeat Protocol The Heartbeat Protocol follows the Producer Consumer relationship It provides a way to help uses monitor the node in the CAN bus The communication method of heartbeat protocol is defined as follows Heartbeat Heartbeat Producer Consu
46. the communication object ID COB ID The COB ID structure is displayed below bit 10 bito Function Code Node ID The COB IDs are used for recognizing where the message comes from or where the message is sent to as well deciding the priority of the message transmission around node network According to the arbitration mechanism rule of the CAN bus the CAN message with the lower COB ID will get the higher priority to be transmitted In the CANopen specifications some COB IDs are reversed for specific communication objects and can t be defined arbitrarily by users The following list shows these reversed COB IDs Reversed COB ID Hex Used by object 0 NMT 1 Reserved 80 SYNC 81 FF EMERGENCY 100 TIME STAMP 101 180 reversed 581 5FF Default Transmit PDO 601 67F Default Receive PDO GEO reversed 701 77F NMT Error Control 780 7FF reversed In addition the other COB IDs shown in the following table can be used if necessary Bit10 Bit7 Bit6 BitO Communication object Name Function Code 0000 0000000 NMT 0001 0000000 SYNC 0010 Node ID TIME STAMP PM 31xx CANopen User s Manual Version 1 0 Nov 2014 7 0001 Node ID EMERGENCY 0011 0101 0111 1001 Node ID TxPDO1 2 3 4 0100 0110 1000 1010 Node ID RxPDO1 2 3 4 1011 Node ID SDO for transmission TxSDO 1100 Node ID SDO for recept
47. top Node ID the node ID of the NMT slave device PM 31xx CANopen User s Manual Version 1 0 Nov 2014 49 Enter Pre Operational Protocol NMT Master NMT Slave 11 bit COB ID bib RTR Len 8 byte Data byte 1 7 9 3 i EET 000 0000000 cs 128 Node ID Enter Pre Operational Protocol Indication request indication s indication cs NMT command specified 128 enter PRE OPERATIONAL Node ID the node ID of the NMT slave device Reset Node Protocol NMT Master NMT Slave H1 bit COB ID bit R 8 byte Data AUC Indication request 0000 0000000 BEI Node ID Not use indication H indication Reset Node Protocol cs NMT command specified 129 Reset_Node Node ID the node ID of the NMT slave device Reset Communication Protocol NMT Master NMT Slave l bit COB B EET que 8 byte Data by te LB t 27 request Indication 0000 0000000 cs 130 Node ID Not use indication r indication Reset Communication Protocol cs NMT command specified 130 Reset Communication Node ID the node ID of the NMT slave device PM 31xx CANopen User s Manual Version 1 0 Nov 2014 50 Module Control Protocol Example If the PM 31xx CPS node ID is set to 5 as an example the following steps would be Step1 Turn off the PM 31xx CPS Step2 Then t
48. upload protocol i e if the data upload is less enough to be transmitted in the initiate SDO upload protocol then the upload SDO segment protocol will not be used The communication process of this protocol is shown as follows SDO Server GEO PM 311x CPS inni E EM UR request 11 bit COB ID bit 11 bit COB ID bit R 8 byte Data byte confirmation 10 7 60 Gate 0 Ial 4 7 EM Initiate SDO Upload Protocol ccs client command specified 2 initiate upload request scs server command specified 2 initiate upload response n Only valid if e 2 1 and s 1 otherwise O If valid it indicates the number of bytes in d that do not contain data Bytes 8 n 7 do not contain segment data PM 31xx CANopen User s Manual Version 1 0 Nov 2014 24 X reserved transfer type 0 normal transfer 1 expedited transfer If the e 1 it means that the data of the object are equal or less than 4 bytes and only initiate SDO upload protocol is needed If e 0 the upload SDO segment protocol is necessary size indicator 0 Data set size is not indicated 1 Data set size is indicated multiplexer It represents the index sub index of the data to be transfer by the SDO The first two bytes are the index value and the last byte is the sub index value data e 0 s 0 d is reserved for further use e 0 s 1 d contains the number of bytes to be uploaded and byte 4 contains the least
49. urn it on After the initialization the PM 31xx CPS will automatically enter the Pre Operational state Users will note the RUN LED flashing twice per second Step3 Users can send the NMT module control protocol and control the PM 31 xx CPS to enter the operational state 11 bit COB ID bit 8 byte Data byte Func Code Node ID RTR Data d pyle Length 10 9 8 7 6 5 4 3 2 1 0 o lt m e ea oe le 0lololoo olololo olol o 8 01 05 0000 00 0000 00 NMT slave PM 31xx CPS NMT master cs 1 Node ID 5 PM 31xx CANopen User s Manual Version 1 0 Nov 2014 51 3 3 2 Error Control Protocol Error Control Protocol is a kind of the solution to check whether the CANopen device is still alive or not And its related objects include 0x100C and 0x100D The 0x100C is the guard time and the 0x100D is the life time factor The node life time is the guard time multiplied by the life time factor The Node Guarding timer of the PM 31xx CPS will start to count after receiving the first RTR message for the guarding identifier The communication set of the Error Control protocol is displayed below NMT Master NMT Slave 11 bit COB ID bit RTR Len Er Node ID request wo 8 byte Data byte reserved a i 11 bit COB EES 8 byte EE confirmation Gel Ur response Node Guarding Protocol t toggle bit The value of this bit wil
50. us TxPDO PM 31xx CANopen User s Manual Version 1 0 Nov 2014 14 Cyclic synchronous Inversely the cyclic synchronous transmission mode is triggered by the reception of an expected number of SYNC objects and the max number of expected SYNC objects can be 240 For example if the TxPDO is set to response when receiving 3 SYNC objects the PM 31xx CPS will feed back the TxPDO object according to the set The concept is shown in the figure below SYNC consumer amp PDO producer PM 311x CPS PDO consumer SYNC transmitted by SYNC producer SYNC transmitted by SYNC producer Read Data SYNC transmitted by SYNC producer lt _ TxPDO SYNC transmitted by SYNC producer SYNC transmitted by SYNC producer SYNC transmitted by SYNC producer Read Data cyclic synchronous TxPDO PM 31xx CANopen User s Manual Version 1 0 Nov 2014 15 RTR only synchronous The RTR only synchronous mode is activated when receiving a remote transmit request message i e SYNC objects This transmission type is only useful for TxPDO In this situation the consumer will update the DI AI value when receiving any SYNC object And if the RTR object is received the producer will respond to the TxPDO object The following figure shows the mechanism of this transmission type Note PM 31xx CPS doesn t support the type PDO consumer SYNC consumer amp PDO producer SYNC transmitted by SYNC produc
51. y the object dictionary to the SDO server The differences between the segment download protocol and the block download protocol are similar to the differences between the segment upload protocol and the block upload protocol Because of the different access types in the object dictionary not all accessing action of the object dictionary via the SDO transmission is allowed If the SDO client trends to modify the entries of the SDO server object dictionary which uses the read only access type the abort SDO transfer protocol will be given and the SDO transmission will also be stopped PM 31xx CANopen User s Manual Version 1 0 Nov 2014 10 The PM 31xx CPS only supports the SDO server Therefore it can be passive and wait for requests from clients The general concept figure of the upload and download protocol with the PM 31xx CPS is shown as follows SDO Server PM 311x CPS SDO Client Request the data of the object dictionary Response the data of the object dictionary or the abort SDO message Upload protocol SDO Client SDO Server PM 311x CPS Write the data of the object dictionary Response access OK or the abort SDO message Download protocol PM 31xx CANopen User s Manual Version 1 0 Nov 2014 11 2 3 PDO Introduction Based on the transmission data format of the CAN bus the PDO can transmit eight bytes of process data at one time Because of the PDO messages without overheads

Download Pdf Manuals

image

Related Search

Related Contents

Mountain Computer ROMPlus+ Operating Manual    MANUALE DI ISTRUZIONI  ft levure ioc revelation terroir - Institut Oenologique de Champagne  ス リ ー ブ 形 伸 縮 管 継 手 建築設備・空調設備 工場設備 など 配管の    Xilinx Timing Constraints User Guide  User guide.doc Centre Number – 71887 Candidate Number  取扱説明書を見る - AQUA(アクア)|ハイアールアジア株式会社  Sanus Systems WSS2  

Copyright © All rights reserved.
Failed to retrieve file