From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Get reference from pause trigger.

Hello.  I´ve been searching this forum for the solution to my problem with no succes.

I have a TTL signal with two "up" portions. I want to adquire data ontly when the signal is up, so a pause trigger seems to be a good option. The problem is that i want to be able to know if the data correspond to the first or the second portions.

Also i would like the adquisition to stop after the second falling time. 

T.bmp

The time between boths pulses and the lenght of each one of them may vary, so i don´t previosly know how many data points i need.

 

Thank you a lot for your help


Julian

0 Kudos
Message 1 of 4
(3,930 Views)

I see this as a candidate for acquring both the "data" (assuming analog?) and the TTL signal and then doing some post-processing.  3 possible approaches, depending on your hw and comfort level with DAQmx.

 

1. Feed the TTL into a spare analog channel.  After acquisition, scan through the data to determine which data to keep and which bin it belongs in.  The main downside is that you might have to reduce your sample rate to multiplex an additional analog channel.

 

2. (If your board supports hw-timed DIO, i.e., M-series or X-series).  Very much like #1, but you acquire the TTL with a digital input task that uses the analog task's sample clock. 

 

3. There's a way to do this kind of post-processing correlation with a carefully configured counter semiperiod task too, but it's not as simple as the first two methods.  It's a bit more hw dependent too, as the STC-3 counters found on X-series boards handle semiperiod tasks just a bit differently than prior generations of counters.  The basic concept would be the same though -- you collect timing info about the TTL signal with a counter task that lets you post-process the analog data into the appropriate bins.

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 4
(3,919 Views)

Thank you Kevin for your useful answer. 

Multiplexing is not going to be a problem, so i like your solution.

I´m using a X-6353 board, can you give me further insight on the option 2, i´m not sure if i understood what you mean.


About the data, i need to read an analog signal, but i would also need to read a counter (not simoultaneously, the analog or the counter). Do you think reading the counter is going to be a problem? I´ve haven´t started yet with that part of the program.


Thank you

Julian

0 Kudos
Message 3 of 4
(3,908 Views)

Re: option 2. The idea is to capture the TTL signal with a digital task which shares the analog task's sample clock. You'll get simultaneous capture of analog "data" point and TTL signal level which you can post-process pretty easily.   Here's an illustrative but incomplete snippet of the config:

 

AI with correlated DI snippet.png

 

 

As to the future counter task, if it's just counting edges or tracking an encoder you can share a sample clock in a very similar way.  The complication I referred to in option 3 wouldn't really apply in those cases. 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 4
(3,894 Views)