06-07-2013 02:39 PM
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
Solved! Go to Solution.
06-07-2013 03:16 PM
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
06-07-2013 05:20 PM
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.