Selectable read command example – Hardy HI 2151/30WC Single-Scale Controller User Manual
Page 44
![background image](/manuals/657640/44/background.png)
HI 2151 Series Weight Controller
Profibus Interface Option
38
Full word variables must begin on word boundaries, when transferring operator
selectable commands or data. See example below.
Example Output from the PLC, in this example indicator status 2 is desired. Indicator status
1, is used so that Tare Value starts at a word boundary:
Byte
Hex#
Description
Byte 0
54
Block Write Number
Byte 1
01
Selectable Read
Byte 2
02
Indicator Status 2
Byte 3
01
Indicator Status 1 (used to maintain word
boundaries)
Byte 4
3C
Tare Value
Byte 6
FF
END
Example Input to the PLC, indicates the data returned to the PLC from the output above.
Byte
Hex#
Description
Byte 0
22
Block Read Number
Byte 1
00
Unused
Byte 2
21
Gross Weight (bit 5) in Pounds (bit 0 is
displayed)
Byte 3
00
Used as place holder (indicator status 1)
Byte 4-7 00
Tare Value = 100 (hex)
00
01
00
NOTE:
For outputs from the PLC “00" cannot be used to align word boundaries, because it
returns two bytes.
6.6
SELECTABLE READ COMMAND EXAMPLE
The following example is to setup read set point #1 and #2 values (without preacts and
dead bands).
1. When C1 is activated Move Word 1 (MOVW1) reads the information from the weight
controller using WX1 through WX5.
a. K1: Contains hex 5401 (Selects Block Write 84: Select Read Summary Data)
b. K2: Contains hex 181B (Selects parameter 24 Set Point #1 and parameter 27 = Set
Point #2)
c. K3: Contains hex FFFF (Ends the Selection)
2. C1: Starts the Program
3. MOVW1: Downloads the information in K1-K3 into WY17-WY19 (Weight
Controller)
4. Data is read to WX1- WX5:
a. WX1: Contains hex(Operator Selectable Read Summary Data 34
b. WX2: Contains Double + 790 (Set point 1 has a value of 790) Example value only
c. WX4: Contains Double + 800 (Set point 2 has a value of 800) Example value only.