Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6001 - analog input recording when an external trigger gives +5V

Solved!
Go to solution

Hi,

 

I use a USB 6001 in order to acquire analog values (connected to AI0). The device is correctly installed and is usable in the NI MAX. Values are correctly measured in the test panel.

Furthermore I want to use an external encoder to acquire the analog values at specific positions. The external encoder delivers a +5V rectangle signal when it moves a single step. With the NI MAX I can count these steps precisely.

So I thought I could use these +5V recangle signals in order to trigger the analog input signal acquisition. Therefore I connected the 5V-signal to the PFI0 connector. Unfortunately, the PFI0 is not accepted as sample source. Can someone tell me why and what I can do and try?

Are there any example VIs?

0 Kudos
Message 1 of 3
(3,878 Views)
Solution
Accepted by topic author _PL_

Hi,

here are some links that might help you to understand the timebase/sample source:

 

DAQmx Timing and Sample Rates - National Instruments
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7KdSAK&l=en-US

 

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications - National Instruments
https://www.ni.com/en/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-handl...

 

DAQmx Timing (VI) - DAQmx - Data Acquisition VIs and Functions - National Instruments
https://www.ni.com/docs/en-US/bundle/ni-daqmx-labview-api-ref/page/lvdaqmx/mxtiming.html#d134e116)

 

For the question regarding your application: have you looked at the example "Voltage - Finite Input.vi" (LabVIEW >> Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Anaanol Input >> Voltage - Finite Input.vi)

Here, you put the Sample Clock to onboard Clock and select the Trigger settings as digital start and select your PFI0 input. This will trigger at the pulse that you specify. 

The question is, if you need it retriggerable so that it starts recording every time you get a pulse. This is not supported by your hardware, so you might need to find a software workaround. But since you said, that you see each count, it might be slow enough to use software timing.

This means you combine the examples "voltage - sw-timed loop.vi" and "counter - count edges.vi"

Nevertheless, here is the documentation for the retriggerable event:

Retriggerable Tasks in NI-DAQmx - National Instruments
https://www.ni.com/en/support/documentation/supplemental/21/retriggerable-tasks-in-ni-daqmx.html

 

How Can I Perform a Retriggerable Analog Acquisition with NI-DAQmx? - National Instruments
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MXxSAM&l=en-US

 

The last link shows you a workaround, since you are not using an x-series card.

Hope this helps you to get started!

Cheers, Niko

Niko NR
Systems Engineer, National Instruments
0 Kudos
Message 2 of 3
(3,840 Views)

Thanks for your help,

 

as you wrote, the hardware does not except an external digital trigger; therefore I did a Workaround 😉

0 Kudos
Message 3 of 3
(3,805 Views)