Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI6602 and divisor

Hello,

Development tools:
Microsoft Visual C++ 6.0
Measurement Studio 6.0

We use one PCI6602 to count a "pulse signal" (we receive 6000 pulses/s). Is the PCI6602 card can output a division of this pulse signal (ie having 1 generated pulse every 10 pulses receive (by setting a divisor from PCI6602)) and if yes, which NI-DAQ commands to employ?

Thanks a lot,
Alain
0 Kudos
Message 1 of 2
(3,435 Views)
Alain

I've attached one of the example programs that are installed with NI-DAQ. It is for pulse train generation.

What you will need to do is set ulLowCount and ulHighCount accordingly. For your case you would want ulHighCount to be 10 and ulLowCount equal to however many pulses you would want the signal to be low.

You will also have to change a parameter in GPCTR_Change_Parameter so it will use your external signal as the timebase. Change this line:

iStatus = GPCTR_Change_Parameter(iDevice, ulGpctrNum, ND_SOURCE, ND_INTERNAL_100_KHZ);

to this:

iStatus = GPCTR_Change_Parameter (iDevice, ulGpctrNum, ND_SOURCE, ND_PFI_x);

where 'x' is the PFI line of the Source of the Counter you are using. Then connect your external signal to the
Source of that counter. For example, if you use counter 0, it would be PFI _39 and you would connect the signal to pin #2.

Let me know if you have any problems with this.

Brian

PS: The program is called STC..., though it will work with the 6602.
Message 2 of 2
(3,435 Views)