Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get counter 2/3 working in simple event counting mode for NI6601

I have been successfully been able to get counter 0 and 1 working in a simple event counting mode. But when I read Software Save register for counter2/3 it gives me garbage values. I am doing register level programming in C.

 

This is the algorithm that I follow

In initialization:

-> Reset the Counter

-> Write32( Clock_Config_Reg, 0x00)

-> Write Load A and LoadB registers

-> Write to Input Select Register with appropriate values

-> Write16( Command_Reg, 0x0125);

 

Then when I need to read the SW save register value

-> Write to Command Register  setting the  gi_Arm bit

-> Reading the SW save register twice

-> If not equal ,read again

-> Write to Command Register  disabling the  gi_Arm bit

 

This works just fine for counter 0 and 1. But I can't get it working for counter 2 and 3. Are there any other registers I need to set up correctly for counter2/3. Is the default reset values of registers different for counter 2 and 3?

 

Any help would be very appreciated

 

Thanks

0 Kudos
Message 1 of 4
(5,518 Views)
I know that counter 2 and 3 share their lines with DIO. However I am not using an any digital input/output features Smiley Sad
0 Kudos
Message 2 of 4
(5,512 Views)

Hello manisha,

 

Is there a particular reason for using register level programming to interact with your DAQ card, rather than the DAQmx driver?  The reason I ask is because we don't support RLP at NI.  There are some manuals that have been developed, such as this one which corresponds to your card, but I am unable to offer any support after that.  If it is necessary that you must use RLP then you should post your question to the DDK forum, as they have more experience in this area.

 

Regards,

0 Kudos
Message 3 of 4
(5,491 Views)

Hi Brandon

 

Thanks for replying . I was able to get all 4 counters working. I think I was missing some initialization steps earlier.

 

Here is the manual that helped me

 

http://www.ni.com/pdf/manuals/340934b.pdf

 

Thanks

 

Regards

Manisha

 

PS: Can you move this post to DDK so that other ppl may benefit if they are also doing RLP.

0 Kudos
Message 4 of 4
(5,480 Views)