LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the shape of the boolean control LED (round or square) in Labview 8.6?

Solved!
Go to solution

Well, it's pretty straight foward...

 

Can be any kind of answer, error, no error, Style ID anything.

But I don't see to find an answer.

 

Please help 🙂

0 Kudos
Message 1 of 9
(3,451 Views)

You pretty much answered your own question: the Style ID property can tell you that. You need to have scripting enabled to access that property.

0 Kudos
Message 2 of 9
(3,420 Views)

And can I run the VI in run time using scripting?

0 Kudos
Message 3 of 9
(3,400 Views)

No, you cannot use scripting in the run-time environment; you can only use it in the development environment.

0 Kudos
Message 4 of 9
(3,383 Views)

So there is anyway to know in run time enviroment if the LED is rounded or squared?

0 Kudos
Message 5 of 9
(3,363 Views)

Even though the Style ID property is only visible when you enable scripting, it can be used at run-time.  See the LabVIEW help for details.

 

In general, VI server properties and methods which inspect things can usually be used with only the run-time engine (provided what they are inspecting exists).  Properties and methods which modify code cannot, since they will require a recompile of the code.

0 Kudos
Message 6 of 9
(3,357 Views)

I couldn't find a direct approach. Something far-fetched may be to use the Invoke Mehtod to obtain the front panel image of the control and using some kind of image processing algorithm to know if the control is round or rectangular. This is just an idea.

0 Kudos
Message 7 of 9
(3,352 Views)

Hi Locatelli,

 

in the runtime environment the shape of the LED cannot change. So why not check that information at development time?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(3,351 Views)
Solution
Accepted by topic author Locatelli

Running some tests here it's seems to work 🙂

Thanks for the help

 

For the one that also wondering how to do it:

 

 - First Download the Scripting from this link and follow the instructions to enable scripiting.

https://decibel.ni.com/content/docs/DOC-4973

 

 - After that the Style ID will show as a property on the Property Node

 

 - Style ID 21012 is the rounded LED and the 21013 is the squared LED

 

Also even if you don't have the scripting enabled and you have a saved VI with the property node Style ID, you can copy and paste into your VI and that will still work 🙂

Message 9 of 9
(3,344 Views)