cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

How to obtain enum label

I have a cluster array that contains 2 variables, an enum and a double. The enum is meant to be the variable name to allow for an easy top level programming. On the lower levels I handle all of the IO linking to the enum so essentially it could be a constant but I set it so the constant is in the initialize not in the definition.
 
Anyways I am wanting to remove the enum control but do not want to loose the data. I would like to pull the label into a string (or better yet an actuall label) to be able to display it on the front panel. Any idea how to do this?
0 Kudos
Mensagem 1 de 27
5.816Exibições
Is this what you mean?


Randall Pursley
0 Kudos
Mensagem 2 de 27
5.804Exibições

Randall,

 

Even easier, try a "format into string" Piscadela do Smiley

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Mensagem 3 de 27
5.796Exibições
Yes!
 
Thank you!!!
0 Kudos
Mensagem 4 de 27
5.791Exibições
Ben,

Thanks.  I think I had seen that before but had forgotten.  Always good to learn something new.

Randy
Randall Pursley
0 Kudos
Mensagem 5 de 27
5.787Exibições

I just realized that will likely break some of my lower level routines... So I have another questions.

 

Is there a way to lock the enum? I do not want them to be able to change it after I have initialized all of the variable names, but I would like it viewable (it is the variable name).

0 Kudos
Mensagem 6 de 27
5.783Exibições
I guess you can create a custom control (type def) that contains the enum.  Then you set the Control Properties>>Protection to locked.  You can't seem to password protect it, but it would take an extra step to change it.



Randall Pursley
0 Kudos
Mensagem 7 de 27
5.774Exibições

I am not sure exactly what youa re saying. My enum is already a type def though. It is the selection that I want to lock (after the initialization is run that is...)

Essentially the problem is that I use the enum to have a variable name on the higher level programming. Mid level programming maps it out to some arrays which then are eventually mapped out to physical IO.

Since the variable name i critical in the mapping I do not want the user to be able to change it (or the system woudl break). I do want them to see it though.

If it can't be locked I am thinking maybe still convert to string and make the enum invisible. However if it is set to invisible will it remain invisible on a higher level access?

0 Kudos
Mensagem 8 de 27
5.769Exibições
Use the Disabled property node.

Lynn
0 Kudos
Mensagem 9 de 27
5.761Exibições
How do I use the disabled property node? When I switch it to that node it becomes a read only (can't switch to write) and it is numeric not boolean....
0 Kudos
Mensagem 10 de 27
5.645Exibições