12-17-2020 11:35 AM - edited 12-17-2020 11:37 AM
Hi all,
I have been trying to parse the incoming data from my SPS30 particle sensor. I can read the data just fine, but I am having trouble with the output format. The hex data values represent the mass concentration, and in the data sheet there is a table that shows what byte represents each particle size. I cannot figure out how to extract the data and output it in a way where it makes sense. Maybe I can just send the raw data into an excel file and then parse it there? I am not sure. Please let me know if i am not being clear.
Thank you!
Solved! Go to Solution.
12-17-2020 12:23 PM - edited 12-17-2020 12:31 PM
Seems pretty simple. Your data is an array of bytes. (It looks like a string to LabVIEW, but isn't that what a string is - an array of bytes?) So you can split the string into sets of characters (either 2 or 4 character sets as appropriate) and typecast it to whatever data type is appropriate - i.e., U16 or single float.
What you are telling LabVIEW to do is "Look at the 2 character string and interpret the 2 bytes as a U16 instead".
01-08-2021 12:19 PM
Hi,
Thank you for your response. How do I split the string into sets of characters? Having trouble with that.
Thanks
01-08-2021 02:32 PM
Something like this:
05-20-2022 09:51 AM
Thank you for solving this issue.
Did you have the VI associated ?
Thanks a lot in advance,
best regards,