Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

gating counter input with VB

I need to know how to control the counter with the gate signal in VB.  Using the example came with NIDAQmx VB 6. CountDigEvent.frm, I need to use the hardware gate signal to pause the counter. Presently couter counts regardless of the status of the gate input.  How do I set the counter to pause counting when the gate signal  is low.  Thanks
Palitha
0 Kudos
Message 1 of 3
(3,260 Views)

Hi Palitha,

The count digital event is only going to use the source of the counter, as you want to catch every time a digital event happens. If you want to use a pause trigger, than you can use the DAQmx Trigger properties. These can be found in the NI-DAQmx C Reference Help (Start >> Programs >> National Instruments >> NI-DAQ), under NI-DAQmx C Properties >> List of Trigger Properties. Under ‘Pause’ , use Trigger Type, Digital Level>>source, and Digital Level >> Pause when. Please make sure to configure all of this before starting the task.

If there are problems, please post what hardware you are using, along with the error code and description.

David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 3
(3,236 Views)

Thanks David.  I got it working

Palitha

 

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