LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Record time from start to trigger

Solved!
Go to solution

Hello there,

 

I have a program that uses N analog channels to record data, they start taking data (either finite or continuously) a trigger.

I use the built in digital trigger but a software analog trigger (works well though). For now let's just worry about the digital trigger.

 

I am trying to record the time elapsed from when I start the program to when the trigger signal is received--that is, when the program actually starts collecting its data.

I've seen the examples of how to put a time stamp at the point of the trigger HERE. However, I have a few differences in my code--mainly that I am collecting N channels of data rather than one, which complicates it. Also I don't necessarily want the time stamp, but the time elapsed from start to receiving the trigger.

 

Right now I have a few ideas:

 

1) somehow timestamp the start of the VI, then figure out the time stamp of the trigger in a similar way to the example above, subtract the difference.

2) In debugging code, I find that probes record the last update at a certain point in the code. Is there a way to utilize this in actual code?

3) most difficult. Setting up a new channel that observes the digital channel I am triggering off of so that I can record its data continuously, wire that channel to trigger my analog channels. then i can see the time at which the trigger went off. But I am unsure of how to implement this.

 

Just looking for opinions as to what would be the easiest way to accomplish this task.

Also, I can post my code if desired-- I didn't because it's quite large and difficult to follow.

 

Thanks to everyone,

 

beefcake

0 Kudos
Message 1 of 3
(2,938 Views)
Solution
Accepted by topic author beefcake

Take a look at the Timing palette.

 

Also, if you search the NI Developer Zone for "elapsed time" you will find 160 documents.

 

Surely something in one of those places will help you.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 3
(2,930 Views)

Wow I feel unintelligent. All my searches revolved around "trigger" and such, I only described it as elapsed time to describe it, and didn't think to search that.

 

Rookie mistake.

 

Thanks for your help it was an easy fix.

0 Kudos
Message 3 of 3
(2,919 Views)