Receiving A User Defined Can Message - Omron C200HW-CORT21-V1 Operation Manual

Canopen slave unit
Table of Contents

Advertisement

Receiving a user defined CAN message

Example
5-8

Receiving a user defined CAN message

80
The following example shows how the NMT command 'Start_Remote_Node'
is transmitted to node 2. In this example, the Machine number is set to '1'.
Note that the C200H syntax of the IOWR instruction is used.
All NMT commands have the identifier value 0000h. The first data byte
indicates the function ('Start_Remote_Node' = 01h) and the second data byte
the Node ID of the targeted node (Node ID = 02h).
If the Node ID is set to 00h, the command will be transmitted to all nodes.
13.00
Start_Node_2
PLC memory address
DM0400
DM0401
DM0402
Control code #0004
The C200HW-CORT21-V1 can receive arbitrary CAN messages with a
combination of the IOWR instruction and the I/O refresh. If it is not required
that the CANopen protocol is active at the same time, IR n.00 can be set to
'0'.
The frame of a CAN message is shown in the picture below.
*
Identifier (11 bits)
*
* Frame control bits, not important for this function
The IOWR instruction is used to instruct the Unit:
to receive messages with specific identifier(s)
to transfer the received message to a specific PLC area.
IOWR (-)
#0003
DM0400
#1003
255.06
12.00
EQ_FLAG
ERROR
Contents
Meaning
ID = 0000h ! NMT command
0000
0002
Data length = 2 bytes
0201
Data byte 1 = 01h, Data byte 2 = 02h
Data length (DLC) Data byte 1
Section 5-8
Data byte 8
*

Advertisement

Table of Contents
loading

Table of Contents