From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

difference between arm start trigger and start trigger

Hi Feilong,

I've got a couple of ideas here.

First, you don't need to use the encoder task to do the counting.  You can use a buffered event counting task to do what you would like.  The buffered event counting task uses a rising or falling edge on the counter gate to lock values into the counter buffer.  By using the GPS 1 PPS signal as the Arm Start Trigger, a known timebase for the source (I'd recommend using the 20 MHz or 80 MHz timebase if you are concerned about accuracy) and the AI Sample Clock for the gate.  This would accomplish the same thing in a more straight-forward way that would be easier to troubleshoot, as there is only one counter needed.

Also, how do you track the GPS absolute time with your data?  I understand how it works now with the counter, but how does the actual time/date information get logged?  The best way to do this would be to get the time/date information from your GPS as it issues the pulse and use the GPS pulse as a start trigger for your AI task. Then you can replace the OS initial timestamp on the waveform with the one from the GPS programmatically after the data has been acquired, or you could calculate the offset between the OS time and the GPS time.

I think the method you are using will actual decrease the accuracy by not using the waveform measurement because the AI sample clock is derived from it anyway.  Any error in the timebase accuracy would be affect the measurement once when the samples are taken and again when you use the timebase to calculate the dt between samples.  The waveform data type calculates the dt based on the AI sample clock setting, so it is already as accurate as the sample clock timebase (usually about 50 ppm, I think).

I hope this is informative.  Let me know what you think.


Regards,
John Bongaarts
0 Kudos
Message 11 of 13
(1,297 Views)

Thanks John for your advice.

The reason I don't use event counting is it doesn't provide a way to hardware reset its value. Because the vi is going to run over a long period time and the electrical noise may be high so I need to periodically correct the time with a known absolute time source which is GPS 1 PPS signal. If the timebase is not refreshed regularly, an accumulated timestamp error may become larger and larger.

The GPS unit will fire a 1 PPS  signal on each even GPS second and also output a string message containing the time the current 1PPS signal represents via serial port.

So my vi will read this serial port and refresh the timebase variable in my vi which is shown in the vi I posted as i try to keep problem focused.

Feilong

0 Kudos
Message 12 of 13
(1,293 Views)

Hello Mr. Bongaarts

 

This does help to some extents.  Would you do me an favor to find me some literatures/articles concerning the operation of "Arm Start Trigger", also its relationship/differences with "Start Trigger"?

 

I was also told previously that the differences between "Arm Start Trigger" and "Start Trigger" is about synchronization, once multiple tasks are going to be synchronized, then it is where "Arm Start Trigger" comes in, would you clarify this a bit please?

 

I really appreciate your help and look forward your response.

0 Kudos
Message 13 of 13
(901 Views)