LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Strings and Dynamic Data To Make a LabVIEW Measurement File

How to make a LabVIEW Measurement File that has time/date along with each measurement value(combining strings/dynamic data). If there is a better way to export the data, I am open to any suggestions.
0 Kudos
Message 1 of 4
(2,999 Views)
hi

i did following to send any data as string via tcp:
take the dynamic data, transform to variant, use the "Variant To Flattened String" - function to convert the variant to a string and a descriptive type-array, put date/time, a descriptive name for the dynamic datatype, the string and the typearray you just created together in one cluster (this cluster is NOT dynamic in its shape!) and write that cluster to the file (or flatten to string for tcp). Doing so you can reread each dataset from your file using a template of the cluster you have written. After reading you the same steps in reversed order. At the end you get an timestamp and a variant containig your dynamic data, which you can convert to the origin datatype using the name of the datatype contained
in the dataset.

greetings
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 4
(2,999 Views)
I do not understand your answer completely. I have tried your method, but am not able to get the cluster into the correct dynamic type it needs to be. Do you have an example .vi where you have used this conversion method?
0 Kudos
Message 3 of 4
(2,999 Views)
hi

here is a simplified example. to write the data to a file you don't need to flatten the variant as i described above (i had to do that for sending the data as a string with tcp)

greetings
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 4
(2,999 Views)