Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 67036

VISA serial communication shows zero bytes at port

$
0
0

I have a development board that communicates over serial port. The following shows the basic properties of the serial port.

3ulLKTCDevelopment board Serial port properties

The board uses binary message format (35 bytes of ASCII encoded data is converted into binary) to communicate with a Bluetooth device which is always ON and broadcasting. In return for a successful connect , it sends back a handshake message exactly as  the sent message but with a different identifier (however the total number of bytes remains the same).

 

For instance:

Byte array for Connect: 33, 10, 0, 0, 0, 53, 50, 82, 68, 88, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165, 1

The first byte is the ASCII exclamation mark (red)

The last 2 bytes is the sum of the middle 32 bytes (green)

Example expected result: 33, 10, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 1

 

As you can see below, I am converting the array of 35 bytes to binary for VISA Write and I expect 35 bytes to be read back as well. Alas, I am not sure why I am not able to read anything back, and Bytes at Port always shows 0. The port settings are as per the properties figure shown above (the figure below doesn't show VISA open/close, but the attached VI should serve as a MWE).

 

Any advise is appreciated. Thanks.

 

W0QorO6LV2019

 

 


Viewing all articles
Browse latest Browse all 67036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>