LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading In Digital Data

I am attempting to read in data through a serial port through LabVIEW.  The device is a pulse oximeter that sends in 3 bytes of data.  One byte is heart rate, another byte oxygen saturation and the third byte is a status value.  I have followed the Serial Read and Write example through LabVIEW in attempting to read in the data.  When I run my program, the return is ƒ b.  I am not sure if this is because of an error in my code or because I have not converted the binary data into decimal format.  This is one of my first times working with LabVIEW so my knowledge is limited.  Could you please instruct me on the best way to convert from binary to decimal if my data is being read into a string through the Serial Read function.  I have attached my code if this helps.  There used to be a LabVIEW driver for this device but the company stopped making it.  I must now figure this out as the first step in a design project.  Thank you.
 
 
 
 
0 Kudos
Message 1 of 3
(2,424 Views)

Did not look at your code, but here is a shot at what you might be needing...

There is a String to Byte Array VI that should convert your returned string into an array of three bytes. You can then Index the Array and convert each those three bytes into seperate integers. These will likely be the values you are loking for. You may need to try unsigned integer conversion as well.

 

See attached pic
0 Kudos
Message 2 of 3
(2,419 Views)
Here is the pic
0 Kudos
Message 3 of 3
(2,418 Views)