Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-6124 Analog Comparison Event / Analog Trigger used with Counter (LabWindows/CVI using Windows XP)

Hello:

 

I have an application where I need to count the time elapsed between a digital signal (logic control line going from low to high) and an analog output reaching a certain voltage level (let's say 2.5V). I am using the NI-6124 AI0+ (AI0- is GND) single ended. I am trying to configure the counter so that the start event is the logic signal (coming through a PFI1 line) and the stop is the threshold detection of the coparator connected to the AI0 input. I have been trying to configure analog triggering but most functions give me an error because the task that I create is for a counter. I am trying to use:

 

DAQmxSetAnlgEdgeRefTrigSrc to create the measurement. Do I have to have two separated tasks?

 

Any help or sample code would be appreciated.

 

Thanks

B

 

0 Kudos
Message 1 of 5
(2,226 Views)

Hello again: I had previously stated the wrong function I have used. I meant to write:

 

DAQmxCreateCITwoEdgeSepChan

 

Thanks

0 Kudos
Message 2 of 5
(2,225 Views)

Hello Persemeng

Yes, you need two different tasks. And about the VI that you were using, it’s for two digital signals, so probably that’s the reason of the error.

I recommend to use two tasks synchronized by the edge of the digital signal, you can find how to do that in Help->Find Examples-> Hardware Input and Output->DAQmx-> Synchronization….

Now there is other VI that probably will help you: https://decibel.ni.com/content/docs/DOC-4657

0 Kudos
Message 3 of 5
(2,206 Views)

Hello Mike:

 

Thanks for the clarification on the two tasks. I do not have LabView, I am using LabWindows CVI. Do you have a code example that would perform what you describe?

 

Thanks

0 Kudos
Message 4 of 5
(2,204 Views)

Hi persemeng,

 

The Find Examples in LabWindows/CVI is very similar to the Examples structure in LabVIEW. The examples Mike referenced can be found in the same location as project files in LabWindows/CVI. The examples under Synchronization and then Multi-Function describe how to set up tasks to run at the same time on the same card.

 

The triggering you mentioned sounds similar to the example file in Hardware Input and Output>>DAQmx>>Digital Measurements>>ReadDigChan-IntClk-DigRef. Hope this helps!

 

 

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 5 of 5
(2,187 Views)