log formatting


paulsn727

Recommended Posts

Hi, I want to modify the format of the log, I have another device that places a nice header of info regarding time, scale, and input data (below). it is also capable of inputting raw and converted data side by side, there is a notes box in the gui that allows input before "logging" is enabled.

 

I would like to replicate this, or get the converted (v.channel?) and raw data in parallel at the very least.

please advise,

Thanks!

 

 

Untitled picture.png

Link to comment
Share on other sites

There are several choices here.

To get converted and unconverted side by side using a logging set, then you'll need to create a Test channel, not a logging channel, with Timing = 0 to hold your conversion.  So, let's say the raw channel is called RawData, and the converted channel (the test channel) is called convertedData, and the conversion between the two is just a times 10 conversion.  In the event for RawData, put:

convertedData.AddValue(rawData[0] * 10)

Then you can log them both.

Now, for a header, you can use the File. functions to write whatever header you want (File.Open, File.Write, File.Close).  You just need to do this BEFORE you tell the logging set about the file, especially the File.Close()  The logging set will append to any existing file, so will just start adding data after your header.

The other choice is to simply use the File. functions to do all your logging.  Then you really can log in whatever format you want, but it requires more scripting.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.