Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

getting the gpct_ex2 example to work for the 6602

Hi,

 

I'm trying to make the gpct_ex2 example work. First of all, I've connected the device (6602) in a PC under windows, and I used the "measurement & automation" tool that comes bundled with the pci card. I can clearly see that my counter (PFI_39, pin 2) is working.

Now I put the card in a Linux station and I launch the  gpct_ex2 example. But the counter is not counting. I am able to reset the counter, but it just never starts counting.

 

I have a 5V 10Hz source on pin 2 and nothing on pin 3 (PFI_38). I don't want to use any gate, I just want it to count whenever it receives an impulse.

I've also tried to set the "writeG0_Gate_Select" to 30 ( as far as I can tell, this is how you specify you don't want any gate). 

 

Any help would be appreciated

Thanks you ! 

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

Hi Barbaz,

 

You said that you were able to reset your counter but could you elaborate on how you did this.  Also, are you utilizing DAQmx or DAQmx Base for this counter application.  Finally, I am not sure which example you are referring to, could you please attach your example code?  You said that the counter seemed to be working in Measurement and Automation Explorer but did this testing consist of pulse counting or just seeing if the device passed a self-test?   

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

Hello, thank you very much for your answer.

I was just on my way here to tell I've succeeded in using the 6602.

 

I am actually using  the nirlpk and the example is in ni660x/Examples/gpct_ex2.cpp

 

The example 1 was close enough to what I needed, so after a lot of reading the manual everything is OK.

 

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