SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert time stamp in ASCII file

Hi all!
 
I am trying to log data values from several channels (so far 4) into one ASCII file including a time stamp in the first column.
The goal is one file that contains one time stamp per row (in the first column) and one column per channel. It may looks like this:
 
TIME  Ch1  Ch2  Ch3  Ch4
t1        a1     b1     c1    d1
t2        a2     b2     c2    d2
 
I want to save one row (time stamp and 4 channels) each minute as above into the same file. Nice would be to creat a new file each day.
 
Problems:
1. Using the "Save to ASCII/LVM" step: How can I get SignalExpress to insert a time stamp in the first column of each row?
    I have no problem inserting the 4 signals that generate me one column per signal. And using "Overwrite once, then append to file" I get one file for all signals.
    Any idea how to insert a time stamp this way? Or how to creat a new file every 24 hours?
 
2. Another way I tried is to use the "Recording Option". But how can I get all the four signals saved in one file?
    After the DAQmx acquisition step I process the 4 channels individually (one scaling step and one threshold step per channel - because of different factors per channel).
    Activating the Recording Option (which would generate a new file every 24 hours, but not starting at 12pm each day...) I get 4 single TDMS-files (and their corresponding tdms_index and meta.txt files),
    one file per signal I am recording. I assume this is because they are 4 individual signals I'm recording and not a group of signals. Can I group individual signals together?
 
Thanks for your help
 
SSC
 
PS: I work with SignalExpress 2.5 and have a NI USB-6210 connected.
0 Kudos
Message 1 of 4
(7,191 Views)
In the recording options tab you can set a stop condition to be 24 hours of data.  And then select the "Restart Log Automatically" option to start logging for another 24 hours.  You can also configure the logging to auto create an ASCII file once logging stops.  With this configuration an ASCII file will be created every 24 hours.  To enable ACSII file generation, select Tools>>Options.. And then set "Automatically export log to ASCII file to true".
 
I believe that you will get one ASCII file for each TDMS file.  If you are logging 4 channels from the same device you should be able to log the entire group which would allow you to get only 1 TDMS / ASCII file.
 
0 Kudos
Message 2 of 4
(7,186 Views)

Thanks a lot for your help Chris.

I configured my project the way you recommended. The result is one ASCII file for each TDMS file (one file per channel).
The 'problem' is the "threshold step", which produces a result that is not timebased. Recording this timeless signals generates one file per signal. It is the same behaviour on the "Save to ASCII/LVM" step as well as on the "Recording Option". That is also the answer I got from the NI helpline some days later.
If our customer is not happy with this solution, we'll write a LabVIEW application.

0 Kudos
Message 3 of 4
(7,158 Views)
Hey SSC
 
I had almost the same problem, however I really need an absolute time stamp instead of the relative time which is created in the ASCII file in this way. Does anybody knows if it is possible to save the absolute time instead of the relative one.
 
Kind regards
S. C. Holst
0 Kudos
Message 4 of 4
(6,970 Views)