12-04-2024 06:42 AM
Hello Everyone
I am really new in LabVIEW and trying to develop and program that reads laser sensors for height measurements. the program is to observe movement of two separate objects, lasers pointing at them all the time and see how they move vertically.
problem I have is following: I want to make range of a slider (which is my case is just an indicator of displacement) programmatically changeable. I want to two buttons on front panel set top and set zero be able to set input values as max value and as zero and rescale the slider accordingly. Actual height difference between zero and max points always going to be 0.5cm so observable range of input signal I want to be in the bounds of +0.5cm to -0.5 cm. but the reason why I want to change the values as a user is because heights are difference for all the measurements but displacement range always 1 cm.
I am not sure if I explained it well. So, if any clarification needed just let me know.
Many thanks
Solved! Go to Solution.
12-04-2024 07:10 AM - edited 12-04-2024 07:13 AM
Hi Davit,
@Davit00 wrote:
problem I have is following: I want to make range of a slider (which is my case is just an indicator of displacement) programmatically changeable. I want to two buttons on front panel set top and set zero be able to set input values as max value and as zero and rescale the slider accordingly.
Use properties of the slider control/indicator to set the range...
(When you want more people to be able to look at your code then you should downconvert VIs before attaching. I prefer LV2019, many say "LV2021 or older".)
12-04-2024 07:21 AM
As Gerd suggested, set the dependent scale range using these properties:
Davit, I appreciate that you posted code. When you post code, please include subVIs. Better yet, please post a simplified version of the VI that just focuses on your question. Additionally, you can recruit more help if you post the simplified VI saved in an older version of LabVIEW (such as 2020).
12-04-2024 09:59 AM
Thanks for both of you, I was not able to check the replies before. I tried to use property nodes but I think I chose the different options to control with it. I will try the method you suggested and if I cant work it out will post downconverted and simplified version of the code.
Thanks again