User manual

49
© 2007, Elektro-Automatik GmbH & Co. KG
EN
Programming
Alternatively to the bitwise assembly, this can be simplified
by using hex values. Starting from bits 6 + 7 we get:
SD = Message type + Cast type + Direction + Length
whereas the message type is either
0xC0 Send data or
0x40 Request data
and the cast type is either
0x00 Singlecast or
0x20 Broadcast
and the direction is either
0x10 from PC to the device or
0x00 from device to the PC
and the data length - 1 can be
0x00...0x0F up to 16 bytes of data (at CAN see „7.6.1
Splitted messages“)
Always note, that the data length is defined as number
of bytes to send -1!!!
The address (node) of the contacted device is 5, the object
to use is 54 (in hexadecimal 0x36), the mask for the remote
mode (also see table in section 9.3) is 0x10 and the control
byte for remote mode is also 0x10. Then we get this tele-
gram:
D1 05 36 10 10 01 2C
In order to reverse this command, means deactivation of the
remote mode, you need to send D1 05 36 10 00 01 1C. The
mask stays the same, only the control byte changes.
Example 2: Requesting actual values via CAN card
Using CAN, the start delimiter SD and the check sum CS, are
not used. So we only need the object, according to the table
it is 71 (hex = 0x47), the identifier ID (for calculation example
see section 7.6) and the length of the bytes to send. In a CAN
message, the object is included in the data length, so this
message would have a data length of 1, because we only
send the object that requests the actual values. The device
address (node) is 5, the RID is 8. According to the formula
from section 7.6 the identifier calculates as 8 * 64 + 5 * 2
+1 = 523 (hex = 0x20B). The +1 is because it is a message
of type „request“. We now send one byte to ID 0x20B. The
CAN message has to look like this:
02 0B 01 47
Object 71 (0x47), requests actual values
Data length = 1
Identifier
Attention! This is NOT the bit combination of the CAN
message which is truely sent over the CAN bus. A
CAN controller merges various bits into it and adds a
checksum to it. These are only the bytes that are sent
to the CAN controller unit.
An answer to this request could look like this:
02 0B 06 64 00 0A 00 42 42
Same identifier, data length is 6, because three actual value
if 16 bits size are sent. The actual values are transmitted
as percentage values and need to be translated to real va-
lues. See section „7.5.1 Translating values“ for details. For
an EL9080-200 the actual values would translate to 100%
for voltage (=80V), 10% for current (=20A) and 66,66% for
power (=1600W).
The nominal values for power, current and voltage can be
read out from the device with the proper objects and used
to translate the actual values to real values.