LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with case structure program

 

Hi all,

 

I'm currently creating my first project using LV and to be honest, it's kinda intimidating. I'm trying my best here to impress my team as they think this is too much for me and they may be right, but I can't say no to a challenge. 

That said, attached is a tiny portion of the project: my goal is to make the sliders (T2A/T2B) variable for UUT1 and set the sliders to a fixed value for UUT2.

I'm kinda stuck here and would appreciate any ideas as to how to approach this. 

 

UUT2UUT2UUT1UUT1

0 Kudos
Message 1 of 11
(2,024 Views)

Please attach the program so that we can reproduce and understand the issue better.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 11
(2,008 Views)

Here it is. Thank you

0 Kudos
Message 3 of 11
(1,998 Views)

In the case for DUT 2, just put constants in:

paul_cardinale_0-1674233970039.png

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 11
(1,990 Views)

@Ed11bay wrote:

Here it is. Thank you


  • Please don't maximize the front panel and diagram to the screen.
  • Please include all dependencies so we can run it. (Or substitute simple simulations). 
  • Please explain what the code is supposed to do, how you operate it, what you expect to see and what you see instead.
  • Please keep the front panel elements to one screen, currently there are elements scattered over gigantic "deserts" of blank space. Nobody want to scroll forever just no navigate around.
  • Don't use value properties where a local variable would do the same job.
  • Don't use right-to left wires for the ticker. What is the timing for the other cases?
  • Why is there so much duplicate code?? Looks like all cases are nearly identical. Typically only the small differences belong inside the case structure while the rest is shared outside.
  • Thanks.
0 Kudos
Message 5 of 11
(1,965 Views)

I tried it but the problem is that the user can still move the slider around. Ideally, I'd like to disable and greay out the sliders for UUT2.

Thanks

0 Kudos
Message 6 of 11
(1,951 Views)

@Ed11bay wrote:

I tried it but the problem is that the user can still move the slider around. Ideally, I'd like to disable and greay out the sliders for UUT2.


 

I don't see any slider for UUT2. Please explain where that would be!

 

 

Maybe something like this?

 

altenbach_0-1674238838122.png

 

(For code readability, please use the correct enums for the "disabled" property.)

 

0 Kudos
Message 7 of 11
(1,934 Views)

Thanks for your reply. That is an interesting approach. 

I'll update sometime tomorrow on how this went. 

 

Thanks again!

 

0 Kudos
Message 8 of 11
(1,912 Views)

This shed some light on finally getting this to work! thanks a lot for your feedback. However, I have one more question: What does the "Disabled" property do? Does it disable the slider completely or does it just make it not editable? 

0 Kudos
Message 9 of 11
(1,843 Views)

@Ed11bay wrote:

This shed some light on finally getting this to work! thanks a lot for your feedback. However, I have one more question: What does the "Disabled" property do? Does it disable the slider completely or does it just make it not editable? 


Disable makes you unable to click, move or edit it. Disable and greyed out adds a graphical effect.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 11
(1,831 Views)