Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Rollover present on primary counter when cascading to create 64-bit counter

Operating in Labview Real-Time 8.5 in PXI chassis and using PXI-6602 Counter/Timer boards for this application.  I have cascaded two counters on this board to create a 64-bit counter as done in the example code 64and48bitcounter.vi.  The difference is that for my application I read NSamp on the primary counter in place of reading 1Samp.  I run the primary counters referenced to the 80MHz timebase on the boards.  The problem is that the rollover can occur inside this NSamp that I read every 1kHz.  It turns out for my application I really only care if the rollover occurs betweent the last and next-to-last sample of this NSamp so I wrote a simple comparison algorithm to check and compensate if rollover indeed occured between the last and next-to-last sample.  For some reason this does not work and OCCASIONALLY the rollover will be uncompensated and observable in the data.  This data is used in a position feedback loop and the controller thinks the position has moved and so I can easily observe the occurance and link this to the rollover of the primary counter.  Any advise on handling rollover for NSamp of the primary counter would be appreciated since this is an ongoing problem that is hindering progress on my project.
0 Kudos
Message 1 of 1
(3,692 Views)