Data sending to BS2 from VB Express
ctrlBuff
Posts: 3
·I am trying to send data to the BS2 with VB Express. I am using the visual basic statement:
SerialPort.Write(Chr(128))
The code works great for any number 0 - 127. Any number from 128 to 255 is received by the BS2 as 63.
The attached screen shot shows the stamp terminal program running with the VB program on top. The screen shot shows the numbers·0 - 127 and 63 for numbers 128 - 255.
Is there a· way to show the correct numbers 128 - 255?
SerialPort.Write(Chr(128))
The code works great for any number 0 - 127. Any number from 128 to 255 is received by the BS2 as 63.
The attached screen shot shows the stamp terminal program running with the VB program on top. The screen shot shows the numbers·0 - 127 and 63 for numbers 128 - 255.
Is there a· way to show the correct numbers 128 - 255?
Comments
Dim my_array(1) As Byte
my_array(0)=223
SerialPort1.Write(my_array,0,1)
the above creates an array of the type byte with one element and assigns a value to that element.
The write instruction requires the array name , the index value to start writing from and the number of bytes to write.
Jeff T.
Rich V W