Programming
CX8050, CX8051 - Embedded-PCs for
CANopen and CAN
55
Version: 1.4
7.4.2
Sending any CAN message
Sending any CAN message
The ADSWRITE command can be used to send any CAN message.
Input parameters
Description
NETID
NetId of the CAN interface
Port number
200
IDXGRP
16#0000F921
IDXOFFS
0
LEN
11 bytes
SRCADDR
Pointer to an 11 byte ARRAY
Table 3: Structure of the 11 byte CAN data
Byte
Description
Example Node 7 SDO 0x607
Len 8 Download Request 0x2100
(Index)
Sub Index 1 - Value "1"
1
COB-ID LowByte
0x06 (SDO Low Byte)
2
COB-ID HighByte
0x07 (SDO High Byte)
3
LEN (length)
0x08 (LEN, may be 5 in this case)
4
Data[1]
0x22 (Download Request)
5
Data[2]
0x00 (Index Low Byte)
6
Data[3]
0x21 (Index High Byte)
7
Data[4]
0x01 (Sub Index)
8
Data[5]
0x01 (Value "1")
9
Data[6]
0x00
10
Data[7]
0x00
11
Data[8]
0x00
7.4.3
CX8050 Master
7.4.3.1
SDO communication from the PLC
ADS blocks are used for SDO communication from the PLC. These blocks can be used for sending SDO
telegrams and receiving the response of the slave (ADSWRITE / ADSREAD).
Input parameters
Description
NETID
ADS NetID of the CAN interface
Port number
0x1000
hex
+ NodeId (slave number)
IDXGRP
SDO Index
IDXOFFS
SDO Subindex
LEN
Length of SDO data (1...4)
Setting individual CANopen nodes to pre-operational or operational state
The ADSWRTCTL block can be used to set individual CANopen nodes to pre-operational or operational
state.
Summary of Contents for CX8050
Page 2: ......