Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous buffer with interrupts doesn't refill the buffer

oops. I meant the counters increment by exactly 1000 (missed one zero)....

Gil
0 Kudos
Message 21 of 57
(1,757 Views)
Just to make sure: you do use a PXI chasis or RTSI cable with PCI, right?
0 Kudos
Message 22 of 57
(1,759 Views)
Gil,

This is from the exe you sent.  I also ran the new one and I get th same thing.  I don't have anything connected to the counters though.  What do I need to hook up.  I was just posting to show you I got the program running.  I can try whatever you like now.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 23 of 57
(1,753 Views)
If you have an RTSI bus connected (either PXI chasis, or RTSI cable), there is no need to connect anything to the cards. The counters should be reading the internal 100kHz source and the ticks are from the DIO. If you don't have an RTSI bus, the counters never get a gate pulse so will never sample (which is the result that you got)

Gil
0 Kudos
Message 24 of 57
(1,749 Views)

DIOCallback 1 (tick 4295656)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 2 (tick 4295817)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 3 (tick 4295977)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 4 (tick 4296137)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 5 (tick 4296297)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 6 (tick 4296457)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 7 (tick 4296618)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 8 (tick 4296778)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

DIOCallback 9 (tick 4296938)
counter 0 buffer begining: 172, 1172, 2172, 3172, 4172, 5172, 6172, 7172
counter 0 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 168, 1168, 2168, 3168, 4168, 5168, 6168, 7168
counter 1 buffer      end: 0, 0, 0, 0, 0, 0, 0, 0

This is what I get now.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 25 of 57
(1,747 Views)
that doesn't look right. I don't understand how the counter's buffer will have data in the first 8 counts after one tick. It should be more like the output I pasted in a previous message. Also, you should get (after a small pause) more ticks (ticks 252 through 260).

Gil
0 Kudos
Message 26 of 57
(1,745 Views)
Gil,

It pauses, but then ends with no additional output. 

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 27 of 57
(1,741 Views)
Ah, I see the problem. It looks like the ticks are arriving about 150 msec apart instead of 10 ms apart. Maybe your computer cannot keep up with the callbacks at that rate. Are you, by chance, using a slow laptop?

Gil
0 Kudos
Message 28 of 57
(1,745 Views)
Gil,

Optiplex GX280, P4 1GB RAM SATA HDD.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 29 of 57
(1,741 Views)
If should be fast enough. hmm. Try  the following command 't2.exe > result.txt' (without the quote marks) to put the results directly in a file.

Gil
0 Kudos
Message 30 of 57
(1,727 Views)