Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

indicator wraps around at 16777200, how do you increase this maximum

I am counting pulses that go much higher than this. I have tried setting the data range but it continues to wrap around at this value. how do you set ahigher value or count the number of times the indicator wraps around so that you can obtain the pulses counted.
0 Kudos
Message 1 of 3
(2,660 Views)
This problem is likely to be caused by counter overflow i.e. the problem you are observing is associated with the hardware being used rather than the software you are developing. You do not mention the board that you are using but by looking at the number you state I would assume that this is a 24-bit counter 2^24 = 16777216 (an E-series board with the DAQ-STC ASIC perhaps??). I don't imagine that the problem is associated with the data range of the indicators you are using. If you are using either 16-bit signed/unsigned integer data type (I16 or U16) you would expect the wrap around to occur at different values - the same is true for a U32 or I32.

If you are using a board with 24-bit counters on it (you can check the user manual for you board for specific
ations for the counter), there are several solutions:

1. Use a board with 32-bit counters on it (the newer PCI-660x boards have 32-bit counters on them).

2. Develop some logic within your software which detects this overflow and manipulates the values that you observe on the user interface accordingly.

3. Cascade the two counters on the DAQ-STC (assuming you have an E-series board) to produce a single 48-bit counter, giving you 2^48 possible counts = 281,474,976,710,656 (I hope this is enough!!). There are several pages on the NI web site to help with this option. A good starting point is:
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/ea97d16a1a8fa902862568c1005f840c?OpenDocument

It does assume however that you are using LabVIEW....

I hope one of these options helps with your problem

Jeremy
Message 2 of 3
(2,660 Views)
Hello;

that is happening because the counter you are using is probably a 24 bit counter. That makes its internal count value to go up to 2^24, which is around the value you reported. Once the count value reaches that number, the counter will roll over and restart counting from zero.

Hope this helps.
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,660 Views)