I've created a communication VI that has an enuminated control which is a list of available messages to send. The messages are named as in file "messages.jpg" that is attached. They come from a proprietary protocol that includes 100+ messages. They are numbered following an outline format in the protocol documentation. I don't have all messages in my VI (and won't have all of them).
I'm calling this VI from TestSTAND. In the specify module, TestSTAND recognizes that it's an enum and shows the text of the control and you can select the command via the drop down menu. Note that the control type is recognized as a U16, not a string. I've read in a couple other posts that TestSTAND sends the enum's numeric back to LabVIEW. See "U16.jpg". This is fine but the start of one problem.
Problem #1: If I add a command that is not at the end of the list in the enum (say I add a new message as the fifth in the list), all messages below this have to be re-selected throughout my sequence as well as I have to reload the prototype each time I'm calling the VI. TestSTAND is storing the numeric value of the originally coded message and not the text name. The numeric value of every message below the fifth has increased by one so TestSTAND will select the previous message in the list.
Question: Is there a way to fix this so TestSTAND will store the message text instead of the enum value? Is there a way to fix this so I don't have to reload the protoype throughout the sequence?
Problem #2: Since TestSTAND is storing the enum value, I can't send a string or i get a type mismatch error. Is there a way to programatically select, preferably with a string, the message in the enum?
LV 8, TS 4
Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)