10-29-2023 09:41 PM
Hola, estoy aprendiendo a usar LabVIEW, hasta ahora todo intuitivo, pero me encuentro con el asunto de que necesito que un indicador numérico no supere X valor, podría hacerlo con un case, pero opto por asegurarme de que no haya alguna función de nodo o simplemente alguna propiedad que pueda facilitarme eso, muchas gracias.
10-30-2023 02:17 AM
Hi AKSR,
@AKSR02 wrote:
Hi, I'm learning how to use LabVIEW, so far so intuitive, but I'm running into the issue that I need a numeric indicator to not exceed Just some property that can facilitate that for me, thank you very much.
So you want to limit the value shown in an indicator? What about using the InRangeAndCoerce function?
10-30-2023 02:58 PM
Hi AKSR,
Like GerdW wrote, it sounds like the "In Range and Coerce" function is what you are after. The screenshot below shows how you can use this function to force a certain value (in the example 101.2345) to be in a certain range (in the example 0 to 100).
You can find In Range and Coerce inside the Programming >> Comparison palette. By default the function includes the lower limit, but excludes the upper limit. You can right-click on the function and select "Include upper limit".
When using numeric controls (numeric inputs on the Front Panel), there is an easy way to limit the values that the user can type in. You can right-click on the control and select "Data Entry..." or select "Properties" and then select the "Data Entry" tab, then you can configure a Minimum and Maximum allowable input value. This can help insure that only safe values are written to an output channel, etc.
10-31-2023 02:25 AM
Hi AKSR,
@Petru_Tarabuta wrote:
When using numeric controls (numeric inputs on the Front Panel), there is an easy way to limit the values that the user can type in.
One remark: this really only applies to values typed in by the user.
Input coercion does not apply to values given as input to subVI controls by connector pane/wire!
10-31-2023 03:01 AM
Hi GerdW,
Thanks for the clarification.
I was curious to test this, so created the attached VIs (LabVIEW 2016). They confirm that Data Entry Limits do not coerce the values fed by a caller VI to a subVI.
Screenshot 1: The subVI
Screenshot 2: Running the caller VI results in the uncoerced value being shown from inside the subVI