page9
How to configure a PDO Receive ?
Example :
- Configuring the PDO 0x1400 + n
- Its cobId must be 0x183 (why not ?)
- The PDO is transmitted on synchro
- It must contains the data : data X (2 bytes) and data Y (4 bytes) in this order
- dataX is defined at index 0x6000 subindex 03
- dataY is defined at index 0x2010 subindex 21
1 – Index 1400 + n, subindex 01 : write the cobId (4 bytes)
2 – Index 1400 + n, subindex 02 : write the transmission type « t » (1 byte)
t = 1 to 0xF0 : The PDO is transmitted every reception of « t » SYNC
t = FD : Transmission after reception of a request PDO (rtr = 1)
t = FF : Transmission on event. The nodes sends the PDO spontaneously
3 – Index 1600 + n : define the mapping.
Subindex 0 : write the number of data embeded in the PDO (1 byte). For this example, write « 2 »
Subindex 1 : define where to find the first data embeded and the size. (8 bytes)
The format is : index (2 bytes) – subindex (1 byte) – size in bits (1 byte)
For this example, write « 60000308 »
Subindex 2 : define where to find the second data embeded an the size (8 bytes)
For this example, write « 20102120
To configure the PDO 1402 of the node 5 to be received every 3 syncchro, the SDO(s) to send should be (I have not tested) :
605 23 02 14 01 00 00 07 38
605 2F 02 14 02 03 00 00 00
605 2F 02 16 00 02 00 00 00
605 23 02 16 01 08 03 00 60
605 23 02 16 02 20 21 10 10
0
387
dataX
dataY
The PDO :
Important note concerning the PDO receive and transmit :
- A PDO may contains less than 8 bytes of data.
- You are not obliged to make the cobId with the node id. Put the value you prefer with this restriction :
the 4 msb (bit 10 to 7) – the function code - which identifies the messages as a PDO must be choosen in
this list (binary) :
0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010. You have a free choice for the bits 6 to 0, the number 0 excluded
-> The CobId allowed for a PDO are (hexa) : 181 to 57F excluding 200, 280, 300, 380, 400, 480, 500
Question : Why do we need to configure a « transmission type » for a PDO receive ?
Answer : I don't know