View Full Version : Data sending to BS2 from VB Express

02-19-2010, 01:01 PM
·I am trying to send data to the BS2 with VB Express. I am using the visual basic statement:


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?

02-19-2010, 08:20 PM
Hi , there is another way to use the Write instruction and that is to write a buffer array of bytes , or one byte if you wish.

Dim my_array(1) As Byte



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.

02-20-2010, 02:03 PM
Thanks, Jeff, for the array setup. It worked great. I even expanded it so I can send word data up to 65535.

Rich V W