CAN
CX8050, CX8051 - Embedded-PCs for
CANopen and CAN
118
Version: 1.4
Reading the register value
The coupler must first be informed of which register is to be read. This requires an SDO write access to the
appropriate index/sub-index combination, with:
- table number (access bit = 0) in byte 3
- register address in byte 2 of the 32-bit data value.
Bytes 1 and 0 are not evaluated if the access bit (MSB of byte 3) equals 0. The register value can then be
read with the same combination of index and sub-index.
After the writing of the register address to be read, the coupler sets the access bit to 1 until the correct value
is available. Thus an SDO read access must check that the table number lies in the range from 0...0x7F.
An access error during register communication is indicated by the corresponding return value in the SDO
protocol (see the SDO section, Breakdown of parameter communication).
An example of reading register values
It is necessary to determine which baud rate index has been assigned to switch setting 1,1 (DIP 7,8). (See
the section covering
Network addresses and baud rates
). To do this, the value in table 100, register 3, must
be read. This means that the following SDO telegrams must be sent:
Write access (download request) to index 4500, sub-index 0, with the 32 bit data value 0x64 03 00 00.
Id=0x600+Node-ID DLC=8; Data=23 00 45 00 00 00 03 64
Then a read access (upload request) to the same index/sub-index. The data value sent here is irrelevant (00
is used here).
Id=0x600+Node-ID DLC=8; Data=40 00 45 00 00 00 00 00
The coupler responds with the upload response telegram:
Id=0x580+Node-ID DLC=8; Data=43 00 45 00 04 00 03 64
This tells us that the value contained in this register is 4, and this baud rate index corresponds to 125 kbit/s
(the default value).
Writing register values
SDO write access to the corresponding combination of index and sub-index with:
- table 0x80 (access bit = 1) in byte 3
- register address in byte 2
- high byte register value in byte 1
- low byte register value in byte 0 of the 32-bit data value.
Remove coupler write protection
Before the registers of the Bus Coupler can be written, the write protection must first be removed. In order to
do this, the following values must be written in the given sequence to the corresponding registers:
Step
Table
Register
Value
Corresponding
SDO download
value (0x4500/0)
1.
99
2
45054 (0xAFFE)
0xE3 02 AF FE
(0xE3=0x63(=99)+
0x80)
2.
99
1
1 (0x0001)
0xE3 01 00 01
3.
99
0
257 (0x0101)
0xE3 00 01 01
Remove coupler write protection (CAN representation)
In order to remove the coupler write protection, the following SDO telegrams (download requests) must thus
be sent to the coupler:
Id=0x600+Node-ID DLC=8; Data=23 00 45 00 FE AF 02 E3
Summary of Contents for CX8050
Page 2: ......