08-28-2024 06:42 AM
Hi there,
I'm basically trying to log voltages off of NI-9205 using flexlogger, when I export it to CSV the time stamps show the date and time. I want to change it to so that it shows the time stamps in milliseconds; 0.001, 0002... I want to do it in flexlogger so that the file always exports in this way.
Thanks
09-12-2024 01:04 PM
Hi Jaya,
I am not sure if my request is the same as yours but I am looking for a method to truncate the number of digits after the decimal point for a csv file created in FlexLogger.
Instead this:
Time,PXI1Slot2/ai0
9/12/2024 13:47:35.683000,1.09958189642018
9/12/2024 13:47:36.683000,1.16245002594073
9/12/2024 13:47:37.683000,1.55980101931822
9/12/2024 13:47:38.683000,1.63823358867153
I want this:
Time,PXI1Slot2/ai0
9/12/2024 13:47:35.6,1.099
9/12/2024 13:47:36.6,1.162
9/12/2024 13:47:37.6,1.559
9/12/2024 13:47:38.6,1.638
This will reduce the file size by about 50%.
Anybody know how to do this?
Thanks!
09-12-2024 01:32 PM
Having a comma delimiter between the Time and Date would be handy too
09-12-2024 03:22 PM
There currently isn't a way to specify this. I like the idea though! I also like the idea of letting the user specify if time should be absolute or relative (and having data and time in different columns, etc). Until csv options become more flexible in FlexLogger, I'll see if I can make a custom step that will allow users to configure some of these common settings, and they could always add to this step to customize the csv however they want. I'll post back here with the plugin when it's ready to try out.
Thanks,
Brad
09-13-2024 09:35 AM
Thanks Brad
Do you know if FlexLogger Lite can use add-ins?
09-17-2024 09:29 AM
Currently it can not. Are you still interested in a plugin to migrate TDMS to CSV with more formatting options?
09-17-2024 05:05 PM
Here's the source( written in LV 2022, so it should work with FL 2022 and higher). I also included the built plugin. Unzip the CSV Export.zip and copy folder to C:\Users\Public\Documents\National Instruments\FlexLogger\Plugins\IOPlugins. Then you can launch FlexLogger and you should have access to add the plugin here:
There is a Configure button on the right above the plugin once you add it and it opens the settings:
The Time Format uses the format codes described here:
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/string/format-codes-for-the-time-fo...
Default is Hour:Minute:Second.000 (with 3 decimal places after the second).
09-18-2024 09:05 AM
Thanks Brad, i downloaded it and I can add it, but I am not sure how to use it after you configure it.
09-18-2024 11:22 AM
Once the plugin has been added, every time FlexLogger creates a TDMS file, the plugin will read the TDMS file, create a CSV file using the specified settings, and save it to the same folder as the TDMS but with a CSV extension (so make sure you turn off the FlexLogger CSV export since it also saves a CSV to the same place), and if you have a backup TDMS also saved, this will also save an extra CSV as well.
Hope that helps,
Brad