LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Message to user

Hi,

I have a vertical pointer slide control that goes from 0 to 80. If the user punches in (in the digital display) a value outside of this range, it is automatically coerced to nearest.
Along with that action, I would like a message to pop up informing the user that the range is from 0 to 80. Can I attach a message to user to this property of the control?
0 Kudos
Message 1 of 3
(2,580 Views)

If you're using the native data range of the control to coerce the values (i.e., you configured the Data Range through the control properties), then you will never get a value greater than 80 reported to you, either through local variables or value change events.  In order to accomplish what you're looking for, you'll need to allow a -Inf to Inf range on the control, but have its visible scale be from 0 to 80.  On the diagram, whenever you get a value change event on the control, check the new value to see if it's greater than 80 or less than 0.  If so, you can pop up a dialog, and also use a local variable to reassign the value of the control to be within the proper range.

I hope this made sense.  Let me know if you need a sample VI.

-D

0 Kudos
Message 2 of 3
(2,572 Views)
Gotcha, thanks. I will ask the user which method they prefer before changing anything 🙂
0 Kudos
Message 3 of 3
(2,567 Views)