07-28-2006 03:49 PM
I would like help compiling a header to attach to a data log file. I am using the express measurement to file VI. I have merged 4 different signals into one input for this VI. I would like to know how to add a header that includes labels like channel, coupling, trigger type, trigger source, horizontal scale, acquisition mode. These labels have appropriate values obtained from an oscilloscope. These values are changing with each acquisition and I would like to have them recorded along with a description of what they are, in the header. I would like to know how to convert the dbl numbers into strings so i can concatanate them with their header labels and then make list which is two columns wide including all of the labels.
How would I do this? I have attached my VI.
Thanks,
Adi
07-31-2006 03:32 AM - edited 07-31-2006 03:32 AM
Message Edited by David Crawford on 07-31-2006 09:33 AM
08-01-2006 02:36 PM
08-02-2006 03:30 AM
Adi
I can see what you mean. The Comment field is encoded by the write lvm express vi so that the read lvm knows how to format it. So if I replaced the = with a tab seperator it looks like this in the excel cell.
Channel\091\0ACoupling\09AC\0ATrigger TypeEdgeTrigger Source\091\0AHorizontal Scale\090.010000\0AAcquisition Mode\09Single\0A
The \09 is the encoding for <tab> and \0A is <LF>. I don't think there is anyway around this as the lvm read alogorithm needs the file to be in a specific format. If you intend to view this file in excel then you could either create a modified version of your LVM or use your own format. This new format could be a 2D array of strings (table) which you would populate with your data and convert this using the Array to Spreadsheet String function and write this to file using the normal file functions.
If you need more help give me a shout.
David
08-02-2006 08:06 AM
08-02-2006 12:42 PM
I managed to work around the comment field by entering into the express VI and going thourgh various sub
08-02-2006 12:50 PM
This is my input string for the comments field:
channel=%d
\t\t coupling=%s
\t\t trigger source=%s
\t\t trigger type=%s
And it looks like this in the file:
****End_of_header***
X_value "blank cell" Comment
0 .38 channel=1
"blank cell" "blank cell" coupling = DC
"blank cell" "blank cell" trigger type = EXT
1 .64 "blank cell"
2 .94 etc. "blank cell"
Do you think there is an easy way of bringing the values back up or even bringing the zero value down. maybe insert a blank extra row into my data? If this is possible how could I do that?
08-03-2006 07:45 AM