Quote:
Originally Posted by DominickC
The trick is I want to be able to have 50+ ranges to check if the readout from the rangefinder is within, and 50+ different bundles with different constants wired to one unbundle later in the code.
|
If I understand what you're asking, you want a large constant lookup table consisting of distance ranges (10-20, 20-30, etc) and corresponding shooter-related outputs for each range. If this is what you want, I suggest you do it with two arrays: one array of doubles specifying distance and one array of clusters specifying the output. I'm attaching a VI that does this -- feel free to experiment with it.
The VI I've attached is a constant model -- that is, for any measured distance in the (customizable) range 10 to 20 it outputs the same result. If you want to reduce the amount of calibration data (and calibration time) you can program a linear model instead. The VI will need to determine the constant outputs at 10 and at 20 and interpolate along the line between them to determine the final outputs. This version of the VI will be more complicated, but it will work well with few calibration data points. If you want a challenge, this will pay off in the long run when you need to do last-minute recalibrations.
Hope this helps.