LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom rotary switch control

Solved!
Go to solution

Hello

i have to do a personalized control who look like :

vincent69_0-1719993781580.png

 

The problem is that the first test model use the click zone and, it's not good (click at the top to turn clockwise, at the bottom anti-clockwise). In that case it's possible to go from P1 directly to P3 (it's not a possible value).

I would like to be able to customize a "dial" type ctrl which already integrates this function

If I customize a ctrl dial, by changing the image of the line to another (to do the thin rectangular part with the white line) the image does not rotate on itself like the original line!

ideas ? suggestions? thanks in advance

0 Kudos
Message 1 of 5
(241 Views)

Hi vincent,

 


@vincent69 wrote:

ideas ? suggestions? thanks in advance


  1. Use a PictRing with 3 images for your 3 possible states of the dial.
  2. Place two (classic) boolean control over the PicRing, one on the left half, one on the right half. Paint both transparent.
  3. Implement some little logic: when clicking the left boolean you switch P3->P2 or P2->P1, when clicking the right boolean P1->P2 or P2->P3. Show the corresponding picture in the picture ring…

(One more idea: you could hide this implementation inside a XControl…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(229 Views)

thank you...

if i can " hide this implementation inside a XControl" it wil be OK ...but i dont know how to do that...

0 Kudos
Message 3 of 5
(221 Views)
Solution
Accepted by topic author vincent69

Hi vincent,

 


@vincent69 wrote:

if i can " hide this implementation inside a XControl" it wil be OK ...but i dont know how to do that...


XControls are considered "for experienced LabVIEW users" and aren't recommended for general use.

 

Depending on your knowledge in LabVIEW I recommend to implement the control (or combination of controls) in a regular VI.

Once you done with this you could start with the example XControl coming with LabVIEW and try to understand it.

You will find the example with File -> "New…", then select the "Other Files" subtree:

 

When you (really) know how the example works you could start to create your own XControl…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(196 Views)

Thank you so much!

i have Discover xcontrols!

realy usefull ! my switch is done !

0 Kudos
Message 5 of 5
(159 Views)