02-14-2024 04:26 PM
Hi, I have this binary data that I have decoded in matlab. I would like to achieve this same purpose in labview but i am not sure where to start from. I have attached all relevant files and would appreciate any assistance I can get.
02-14-2024 06:46 PM
You can Integrating Compiled MATLAB Functions with LabVIEW with a .NET Assembly Approach
02-15-2024 01:18 AM - edited 02-15-2024 01:48 AM
Hi jkas,
@jkas wrote:
Hi, I have this binary data that I have decoded in matlab. I would like to achieve this same purpose in labview but i am not sure where to start from.
It seems you read a byte stream, convert those bytes to a hexadecimal-formatted string and then parse the data from that string back to numeric values. This can be done easily in LabVIEW directly (much easier than calling Matlab code from LabVIEW IMHO).
Example for string parsing:
(You can do the same more efficient by processing the byte stream directly!)
02-15-2024 05:52 AM
Thanks, GerdW. An example of the hex formatted string is attached.
02-15-2024 06:02 AM - edited 02-15-2024 06:03 AM
02-15-2024 06:07 AM
Yeah I noticed so I changed the code. New formatted hex attached.
02-15-2024 06:08 AM
How do I process the byte stream directly?
02-15-2024 06:32 AM - edited 02-15-2024 06:37 AM
Hi jkas,
@jkas wrote:
Yeah I noticed so I changed the code. New formatted hex attached.
There are still tabs between the values so my previous suggestion is still valid. It doesn't matter if there are (some) leading zeros or not...
@jkas wrote:
How do I process the byte stream directly?
You read the number of bytes per value and convert them to your required data.
02-15-2024 06:46 AM
Uhm if it's not too much to ask, can I get a sample vi that does this?
02-15-2024 06:47 AM - edited 02-15-2024 06:48 AM
Hi jkas,
example:
(There are more efficient ways to solve this poblem, but the current suggestion is straight-forward.)
There seems to be a problem in your data, there are several rows in the data with "malformed" content, like row #113 in the image...