09-11-2009 11:08 AM
I would like to know if there is a way to make a single control (either a ring or otherwise) where a string that is displayed to the user has a string as its output value.
For instance, I have a power laser with a serial communication port and the command to turn on the laser diodes is LASER1;
I want to display the string "DIODES ON" to the user, but have the control provide the value "LASER1;" when selected.
This is easy to do with two controls, for example, I can have an enum with the user display strings and a matching enum with the laser command strings, but then I have to ensure that any change affects both controls.
If it is a single control, it is less likely to have an error when a change is made.
Any help is greatly appreciated.
I am using LabView 2009
Solved! Go to Solution.
09-11-2009 12:06 PM
you could use the property node string[]
09-11-2009 12:14 PM
09-11-2009 01:24 PM
Perhaps I should have been more clear.
There are approximately 20 commands to be sent to the laser from which the user can select.
Each string to the user has a corresponding command.
Since this is programmatic for automatic operation; as well as single commands for manual operation, I would like to have a single control with 20 strings and corresponding commands.
For example:
User Laser
Diodes On Laser1;
Diodes Off Laser;
Mode Current Opmode0;
Mode Power Opmode1;
Gate Open Gate1;
Gate Closed Gate0;
A single button or a caption string is not adequate.
09-11-2009 01:27 PM
Wire the ring control to a case structure.
Then you can label each case accordingly (where it normally says "true", "false", etc).
You can create a case for each option:
"user"
"diodes on"
... etc
Then put a string constant in each case and pass the constant out of the case structure.
09-11-2009 01:36 PM