01-10-2024 06:37 PM
Hi,
I am trying to acquire data from my instrument using labview serial communication but the data I am getting are some weird characters instead of the numeric data I was expecting. Can someone kindly help me out with how I can resolve this? The vi I am using is attached together with the characters I am receiving.
Thanks.
01-10-2024 07:53 PM - edited 01-10-2024 07:58 PM
Obviously this is binary data so you need to know the details of the response in order to cast it correctly (datatypes, endian-ness, etc.).
Do you have the manual for the instrument?
(For some ideas, have a look here. Of course you would need to make significant modifications for your scenario)
(Sorry, I cannot look at your VI. Only LabVIEW 2020 here).
01-10-2024 08:12 PM
Some (what I hope is helpful) comments:
Feel free to provide more useful information.
Bob Schor
01-11-2024 07:09 AM
What device are you trying to communicate with? Unless we know what the data is supposed to be, we cannot help you properly read the data. At the moment, the best I can do is give you this resource: VIWeek 2020/Proper way to communicate over serial
01-11-2024 10:01 AM
The device is current, voltage, temperature controller for Horizon H-1000 PEM fuel cell stack. Unfortunately, I do not have a manual for it just a document on how to communicate with the manufacturer's software which I have attached.
01-11-2024 10:53 AM
Obviously, they provide a LabVIEW executable, which is of no help. (I assume that they remove the diagram).
Can you run your original program and receive some data to display in a string indicator. Then stop the VI and create a constant from that indicator terminal (right-click...create constant). Now we have a sample of typical data to play with. Save the VI under a new name and attach it here (LabVIEW 2020 or below).
Also provide any other relevant information on what kind of data you expect (how many values, typical data range, etc.)
Can we assume that the communication settings are correct?
01-11-2024 12:44 PM
Uhm, I have no access to the block diagram of the original program, just the front panel which does not also open in labVIEW so I am not sure how I can create the constant to the indicator terminal. I have attached a sample of the data that I receive using the original monitoring software.
01-11-2024 12:50 PM - edited 01-11-2024 12:52 PM
An excel file of the parsed data is useless to troubleshoot the problem. Since most bytes are non-printable characters, a picture does note tell the story. can you attach that text file?
We need the data you get here:
01-11-2024 01:02 PM
In the original program there is no display like that just the displays here. Once I end the program, it just saves to the excel file.
01-11-2024 01:32 PM
Try running this updated VI. I made it so the read data is saved directly to a text file. We are looking for any hints at what the data frame is.