5 example of a process data telegram, Example of a process data telegram, Canopen communication – Lenze 931K User Manual
Page 37

CANopen communication
Process data transfer (PDO transfer)
Example of a process data telegram
l
37
KHB 13.0002−EN 4.1
5.3.5
Example of a process data telegram
The following objects are to be transferred together in a PDO:
ƒ
Status word, index 6041_00
h
(controller control),
ƒ
Modes_of_operation_display, index 6061_00
h
(operating mode)
ƒ
Digital_inputs, index 60FD_00
h
(digital inputs)
The first transmit PDO (TPDO 1) is to be used, and it is always to be sent if one of the digital
inputs changes, but not more often than every 10 ms. The identifier used for this PDO is to
be 187
h
.
1. Delete the number of objects.
Description
Name
Value
To enable the change of the object mapping, the number of
objects has to be set to zero.
number_of_mapped_objects
0
2. Parameterise the objects which are to be mapped.
Description
Name
Value
The objects listed above have to be composed to form a 32−bit
value:
Index = 6041
h
, subindex = 00
h
, length = 10
h
(UINT16)
first_mapped_object
60410010
h
Index = 6061
h
, subindex = 00
h
, length = 08
h
(INT8)
second_mapped_object
60610008
h
Index = 60FD
h
, subindex = 00
h
, length = 20
h
(UINT32)
third_mapped_object
60FD0020
h
3. Parameterise the number of objects.
Description
Name
Value
The PDO has to contain 3 objects
number_of_mapped_objects
3
h
4. Parameterise the transmission mode.
Description
Name
Value
The PDO has to be sent if one or several of the above digital
inputs change.
transmission_type
FF
h
In order to ensure that only changes of the digital inputs cause
the transmission of the PDO, it is masked in such a way that
only the above 16 bits of the object 60FD
h
"come through".
transmit_mask_high
00FFFF00
h
transmit_mask_low
00000000
h
The PDO is to be sent not more often than every 10 ms
(100 × 100
ms).
inhibit_time
64
h
5. Parameterise the identifier.
Description
Name
Value
The PDO is to be sent with the identifier 187
h
. If the PDO is
active, it first has to be deactivated.
Read out the identifier:
cob_id_used_by_pdo
00000181
h
Set bit 31 (deactivate PDO):
cob_id_used_by_pdo
C0000181
h
Write new identifier:
cob_id_used_by_pdo
C0000187
h
Activate PDO by deleting bit 31:
cob_id_used_by_pdo
40000187
h
)
Note!
The parameterisation of the PDO can only be changed if the network state
(NMT) is not operational.