Hello,
I was wondeirng if anyone had some suggestions about how I could make a control that needs to take 18 boolean inputs each that enable a different logging option on my instrument. Here are some of the current solutions that I've come up with but each with its own major issue.
1) Boolean array. User inputs a booean array that cooresponds to each value {1,1,1,0,0,1,1,0...}. The problem with this method is that it is very error prone, what if the user doesn't input all 18 values or mis-aligns the values etc. Also it is not very descriptive and the user wouldn't remember which value cooresponds to which logging item.
2) Bitmap/mask. Each logging option is a mask of a power of two, eg 0x01 = Watts, 0x02 = Amps 0x04 = Volts etc. The user could then add together all the options (s)he wanted and I could mask out the bits to get the boolean values. The problem here is that this requires a lot of manual labor by the user with adding and subtracting powers of two from a cumulative sum. Also the numbers get very large especially around the 2^15 - 2^17 power.
3) 18 individual boolean slider inputs. This one would solve the problem about the user not being able to keep track of what (s)he was logging but, this requires passing 18+ parameters to a function.
4) Create a custom boolean array control. I wish I knew how to make a custom boolean array control and then add this control to a CVI PnP Instrument Driver project.
Any other suggestions would be greatly appreciated.
Thanks,
Lawler