SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

"start times" incorrect in TDMS and ASCII file

Problem:  For Analog Voltage Output, the "start times:" ASCII field is set to 12/31/1903 19:00:00.000000. The TDMS file (imported into Excel) field called "log channel int time0" has the same value.  I am also recording signals from an Analog Voltage Input, which has the correct start times. I need to synchronize the output and input voltage time stamps when I post-process the data.  What do I need to do to fix the timing reference on my Analog Voltage Output?

 

Note: In Signal Express > DAQmx Acquire step, the Calibration Date is 12/31/1903. My hardware has a calibration certificate. Do I need to Calibrate my DAQmx Virtual Channel(s) too?

 

P.S. In the Analog Voltage Input ASCII file, there is about ~4-5 sec delay between the time stamp on "channel names" and "start times". Does it take 4-5 sec from the time I press RECORD to begin saving data?

 

Setup: 

Monitor / Record:

DAQmx Acquire Analog Input (Acq Mode: Continuous, 1k samples @ 10kHz),

Create Analog Signal (DC Signal 100kS/s, 1000 sample block size),

DAQmx Generate Analog Output (N Samples). 

 

Using: LabVIEW SignalExpress v2.5.1 Lite, NI USB-6221

0 Kudos
Message 1 of 10
(7,228 Views)

Hi

 

When you are writing an analog output with signal express the default time stamp will return 12/31/1903 19:00:00.000000.  This is because there is not time stamp associated with the signal you are going to output.  Also, i wanted to note that the time stamps in signal express are non deterministic (meaning they are software supplied). 

 

However, if you want to synchronize your analog input and analog ouput I would recommend to have them share the same clocks and use a master/slave type architecture.  I posted a screenshot of how to set this up.  In my example you start the analog output task first but reference the timing of the task to be the ai/sample clock.  So, the analog output will not actually begin until the analog input task starts.  If you do it this way you should have a very similar start time for the two tasks.

 

To reference your other question, the time stamp on the "channel names" references when the record button is pressed and will be the name of the log.  The "start times" is when the card actually starts acquiring or writing data.  So, when you press the record button you will see a pop up window that lets you input what signals you want to record.  As soon as you press the button to clear the window and start acquiring, the "start time" will be registered.  That is why you see a discrepancy between the two.

Message Edited by Jordan F on 04-16-2009 04:24 PM
Regards,
Jordan F
National Instruments
0 Kudos
Message 2 of 10
(7,202 Views)

Jordan F,

Thank you for the great explanation.

 

I tried setting my Clock Source = ai/SampleClock, but I did not see the option.  Is this feature available on the USB 6221?  My choices are PFI0..PFI15.

0 Kudos
Message 3 of 10
(7,184 Views)
It should be available with the USB-6221.  Make sure that you have an analog input task created though because you will not be able to reference the ai/Sample Clock if you do not initiate that task.  The ai/Sample Clock will not show up if you place the DAQmx Generate Task down before the DAQmx Acquire task (I am going to report this).  So, delete your DAQmx Generate Task and then add the task again because it may not update the Advanced Timing Settings.   
Regards,
Jordan F
National Instruments
0 Kudos
Message 4 of 10
(7,161 Views)

I tried deleting and re-adding the DAQmx Generate Task. Still no ai/Sample Clock to choose from.

 

Note I have recently upgraded to the full version of SignalExpress 3.0 from 2.51 LE.

0 Kudos
Message 5 of 10
(7,136 Views)
I attached my Signal Express 3.0 project for you to review.  You will have a different device resource though in your system.  Hopefully this helps.  Also, if this does not work for you, post your project because I might be able to find something.
Regards,
Jordan F
National Instruments
0 Kudos
Message 6 of 10
(7,128 Views)

Here is my project. I replaced my real USB-6221 with a simulated USB-6221.

 

Thanks

0 Kudos
Message 7 of 10
(7,125 Views)
After trying this out with a simulated device, you are correct in that you can not use the ai/Sample Clock for your analog output task.  This option is available in LabVIEW so I believe it could be a potential bug with Signal Express that I will ask about.  To get around this though, you could place a counter output task down which would output a digital signal internally one of the PFI lines that you can reference.  For example, you could output the digital counter signal to CTR 0 Out (pin2)/PFI 12 and then use PFI 12 as the source for the analog input and analog output timing.
Regards,
Jordan F
National Instruments
0 Kudos
Message 8 of 10
(7,103 Views)

Jordan F, I am getting errors 200284 & 200292. Can you please send an example file?

0 Kudos
Message 9 of 10
(7,101 Views)
I attached a project that uses a counter for the AI and AO sample clocks respectively.  First, I set up the Counter task and then the AI and AO tasks.  Make note of the PFI line that the Counter pulse signal is output to.  You can reference this channel in the analog input/output tasks that reference this PFI line with an external clock.
Regards,
Jordan F
National Instruments
0 Kudos
Message 10 of 10
(7,062 Views)