Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog voltage comparison to raise a digital output

I am using NI DAQ PC-6225 and using it to read Analog voltages and digital inputs using a C program

 

I want to add additional functionality to compare a Analog voltage in a C program against a threshold value and trigger a digital output whenever the threshold is exceeded.

The documentation gets pretty confusing and when I use the DAQmxCfgAnlgEdgeStartTrig funciton it did not work.

I am hoping to find a pointer to an example that will let me set this up.

 

your help is appreciated.

ManRaob

0 Kudos
Message 1 of 6
(3,419 Views)

As you can see from the specs, your board does not support analog triggering.

0 Kudos
Message 2 of 6
(3,415 Views)

 

Thanks. Any other options to achieve the result with this board?

Best

ManRo

0 Kudos
Message 3 of 6
(3,400 Views)

How about using a simple discrete comparator and a software controlled analog reference plus a digital output for power/enable? 

The LM393  is an old standard... or use the LT1394

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 6
(3,396 Views)

 

Thanks Henrik. That is an option.

 

I have 22 systems in the lab and was hoping for a software solution to get this done.

ManRoab

0 Kudos
Message 5 of 6
(3,384 Views)

The software solution would be to read x number of samples, compare each to your threshold, and doing the DAQmx Write of the digital output under software control. There, of course, would be some lag in this since you would have to wait until x number of samples are acquired.

0 Kudos
Message 6 of 6
(3,370 Views)