Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I count internal WFTRIG events

I am using a PCI-6024E multifunction board for an application where I generate 2 different waveforms using the NI-DAQ functions in Visual Basic. The waveforms are generated from a 4K buffer and run indefinitely.

I would also like to configure one of the internal counters to increment with each cycle through the buffer. I have searched through the delivered documentation and the online help and so far have not figured out how to configure the board and route the signals internally to count in this mode. Can you help?
0 Kudos
Message 1 of 2
(3,079 Views)
Hello;

Basicaly, what you need to do is to use the AO Update signal as the source signal of the counter, then, at each update of the analog output channel, the counter will increment. You can set the counter either to do a simple event counting or buffered event counting.
To accomplish that by using the NI-DAQ functions, you will need a Select_Signal call, where the AO Update signal will be the signal source, and one of the RTSI lines will be the signal name.
The, when you set the counter, you make a call of GPCTR_Change_Parameter, to configure the source signal as being the same RTSI line you chose to receive the AO Update signal.
You can refer to the NI-DAQ shipping example about simple event counting at C:\Program Files\National Instruments\NI-DAQ\examples
\VBasic\Ctr\STCEventCount.
Hope this helps.
Filipe
Message 2 of 2
(3,079 Views)