Example 2: Setting Target Life - Advanced Energy Pinnacle 20 kW Manual

Table of Contents

Advertisement

Advanced Energy
• Byte 5 = A9h – checksum
The PC host should then respond to the unit with an acknowledgement.
• Byte 1 = 06h – (ACK)

EXAMPLE 2: SETTING TARGET LIFE

This example shows how to use command 12 to set the target life in Target 1 to 7500.00 kWh.
The example assumes that the Pinnacle unit address is 16.
For command 12, the upload packet sent from the PC host to the Pinnacle unit requires the
following information:
• Address of Pinnacle unit
• Number of data bytes in the upload packet
• Data bytes
• Checksum
The first byte of the upload packet contains the unit address and the number of data bytes. The
first five bits contain the address (16 = binary 10000). The last three bits of byte #1 contain the
number of data bytes required for command 12, which is five (5 = binary 101). The whole byte
has a hex value of 85h (binary 10000101).
The second byte of the packet contains the command number.
The third byte of the packet contains the first data byte = target number.
The fourth through seventh bytes of the packet are the last four data bytes and contain the
value for the target life. In this case, the value is in kW hours, with two decimal places
implied. Since you want a value of 7,500 kWh, the data bytes should contain a value of
750000. Data bytes are sent least significant byte first, most significant byte last. The value of
750000 has a hex value of B71B0h.
Packet sent to unit from PC host:
• Byte 1 = 85h – address and # of data bytes
• Byte 2 = 0Ch – command 12
• Byte 3 = 01h – target # 1
• Byte 4 = B0h – least significant
• Byte 5 = 71h
• Byte 6 = 0Bh
• Byte 7 = 00h – most significant
• Byte 8 = 42h – checksum
Reply returned from unit:
• Byte 1 = 06h – (ACK)
• Byte 2 = 81h – address 16, and 1 data byte (bianary 1000001)
• Byte 3 = 0Ch – command
4-88
Page 122 of 182
®
I/O Communication and Control
5702199-A

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents