Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous buffer with interrupts doesn't refill the buffer

remember that the counter can hold 256 elements. I am showing you the first 8 items and last 8 items in each buffer. That means that the difference between the 1st and last item (after the buffer fills only once) is about 255*1000, which is exactly what you see.

Gil
0 Kudos
Message 41 of 57
(2,005 Views)
Hi Kenn,

Any ideas on the problem?

Thanks,
Gil
0 Kudos
Message 42 of 57
(1,945 Views)
Gil,

Thanks for following up.  We have been doing some testing with the labview driver to be sure it works there and it does.  We are still doing some verification of the problem with the C code.  I will post with any updates.  Thanks for supplying this feedback.

Regards,

Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 43 of 57
(1,940 Views)
Gil,

We do have a request.  We'd like to narrow this down to the 6602.  Can you take the 6533 out of the scenario and provide an external signal and see if the issue remains?  Thanks.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 44 of 57
(1,935 Views)
I'll see what I can do. Do you want a completely external signal (as in a function generator) or can I use another 6602 for pulse trains?

Gil
0 Kudos
Message 45 of 57
(1,932 Views)
Gil,

Completly external, although if it happens with it's own pulse train, that would be interesting as well.  Thanks

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 46 of 57
(1,930 Views)
Ok. Attached (in the zip file) are t5.exe and its source code t5.cpp. This executable displays the same behaviour, but uses external gate (about 100 Hz) and internal source connected to the internal 100kHz. The output looks like this:

counter buffers before acquisiton:
counter 0 buffer begining: 0, 0, 0, 0, 0, 0, 0, 0, ...
counter 0 buffer      end: ..., 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 0, 0, 0, 0, 0, 0, 0, 0, ...
counter 1 buffer      end: ..., 0, 0, 0, 0, 0, 0, 0, 0


counter buffers after 3000 ms acquisiton:
counter 0 buffer begining: 257532, 258537, 259541, 260545, 261550, 262554, 263559, 264563, ...
counter 0 buffer      end: ..., 249498, 250502, 251507, 252511, 253515, 254520, 255524, 256528
counter 1 buffer begining: 616, 1620, 2624, 3628, 4633, 5637, 6641, 7645, ...
counter 1 buffer      end: ..., 249494, 250498, 251503, 252507, 253511, 254516, 255520, 256524

Gil
0 Kudos
Message 47 of 57
(1,927 Views)
Gil,

Thanks for this.  I will try this out this afternoon.  Could you post the code for this?  Thanks.  And I assume that the 6602 is device 1?  Thanks again.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 48 of 57
(1,919 Views)
the code is attached in the zip file.

Gil
0 Kudos
Message 49 of 57
(1,917 Views)
And here is a zip file with t6.exe and t6.cpp. In this executable (which displays the same behaviour) I use a 100Hz pulse train generated by channel 7.

counter buffers before acquisiton:
counter 0 buffer begining: 0, 0, 0, 0, 0, 0, 0, 0, ...
counter 0 buffer      end: ..., 0, 0, 0, 0, 0, 0, 0, 0
counter 1 buffer begining: 0, 0, 0, 0, 0, 0, 0, 0, ...
counter 1 buffer      end: ..., 0, 0, 0, 0, 0, 0, 0, 0


counter buffers after 3000 ms acquisiton:
counter 0 buffer begining: 256946, 257946, 258946, 259946, 260946, 261946, 262946, 263946, ...
counter 0 buffer      end: ..., 248946, 249946, 250946, 251946, 252946, 253946, 254946, 255946
counter 1 buffer begining: 943, 1943, 2943, 3943, 4943, 5943, 6943, 7943, ...
counter 1 buffer      end: ..., 248943, 249943, 250943, 251943, 252943, 253943, 254943, 255943


0 Kudos
Message 50 of 57
(1,917 Views)