LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send ASCII data to decimal in Serial Communication, concatenating the LSB and MSB, in sensors and saving them in txt.

My query is about how to transform two data that I receive by serial communication (the LSB and the MSB), they tell me that I have to make a complement to 2 to transform it to a 16-bit. And then convert it to decimal. All this I have to do in LabVIEW, if it is not too much trouble I would like to be supported on how to perform these steps, please.

The file is called serial_data.vi, the arduino programming data.ino; and the other VIs are query that can help. The value of the pressure should come out at 15 psi maximum and the data should be saved as arrays in .txt as A file where the data is updated (in the current model it is necessary to delete the txt file that is created for the transmission to work again) and I can not find how to improve the "update time" in the design, it seems that some saw. Please.

 

If you want the Arduino file, I'll give it to my email: lenin144@outlook.com

 

labview.png

0 Kudos
Message 1 of 2
(2,827 Views)

Hi lenin,

 

how to transform two data that I receive by serial communication (the LSB and the MSB), they tell me that I have to make a complement to 2 to transform it to a 16-bit. And then convert it to decimal. All this I have to do in LabVIEW

Start with this:

check.png

 

- I recommend to NOT use BytesAtPort, especially not with TermChar enabled!

- When your Arduino sends data continuously you should also read the port continuously. Don't hide the VISARead in the case structure!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,781 Views)