06-14-2012 01:01 PM
So I have this multimeter that I need to make a driver for, and it has so many operating modes/ranges that it is going to be a pain.
So this is what I am working with, there are a bunch of "measurement functions" including DC voltage, AC voltage, DC Current, AC Current, etc etc, there are more than what is shown in that image, but the functions are that top row in the table above.
Associated with each function is a set of ranges. The GPIB codes for each range are in the left most column, and you can see what they correspond to in the other columns.
To handle the measurement functions and the range in this driver that I am making, I will use 3 sub.vis:
The first sub.vi is very simple, consisting of a single menu ring, a number to string converter, and then a concactenate strings, shown in the first attachment. It sends the measurement function command to the device.
The third sub.vi will also be pretty simple, it will send the range command to the device. It is the in-between sub.vi that I need help with.
What I want is to have a single Range control, in the form of a menu ring, and the 2nd sub.vi will format that menu ring. So, what I need is to use a property node to set the line-items in the menu ring to match up with the items shown in those 6 columns above, so that if the Measurement Function is chosen to be DC volts, the Range menu ring will show 3mV, 10mV, 30mV, 100mV, etc etc, but if the Measurement Function is chosen to be AC Current, the Range menu ring will show 3uA, 30uA, 300uA, etc etc.
The other tricky part of this is that the AC Voltage and the AC current functions skip range commands (see how there is no range associated with commands R2, R4, R6, etc).
This I will probably be able to come up with something clever to deal with (like simply doubling the value coming out of the ring and incrementing it with a +1 on those functions to make them all odd), but for now I need help with formatting the line items in the menu ring.
The 2nd attachment was my first attempt at simply editing the line items in the menu ring. Unfortunately the way it is set up, it crams that entire string into the 1st line item, instead of seperating them. I am not sure how to edit any of the items in the menu ring past the 1st one.
Hope I explained that well enough, let me know if I need to be more clear.
Solved! Go to Solution.
06-14-2012 01:14 PM
- short explanation is that I need a property node to edit the line items in a menu ring, but I am not sure how to do it.
Can I use a single property node, or will I have to treat it like you do multiple plots in a graph where you have to designate the "active plot" and cycle through and edit them one by one (though this time it would be an "active item" and I would edit the line items one by one).
06-14-2012 01:20 PM
You're using the wrong property. The property you want to use is "Strings" and the input is an array of strings.
06-14-2012 01:34 PM
Great, that worked!
Thanks!
06-14-2012 01:43 PM
Are you good, or is there more?
06-14-2012 01:46 PM
I think I am good, that turned out to be an easy one 🙂