7-17
Line 19 “BIN 1” sets the data format to binary. Line 22 inquires about data after one
measurement is executed by line 20. Line 23 receives the data of the NUM%*2 bytes
at controller.
Each element of array dbuf%() in the receive data is 2- byte unit. Each element of
dbuf%() with its upper and lower bytes exchanged is the correct value because of the
data format in the controller and the storage sequence of arrays in the receive data.
Lines 24 to 29 convert the 2-byte binary data to a decimal number and store it in
variable TRACE(1). If the data is a minus value, line 27 converts it to a correct value.
7.2 Sample Program (Example of Program Using Visual Basic)