LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Intaris

Invoke Node for Data Entry

Status: New

A lot of Front panel controls have some nice abilities to limit the input of data with optional Maximum, Minimum and Increment values with different Coercion options available on each of these.  Of course these only apply to data entered by the user but I find myself often trying to re-create this input limit through a vast number of property nodes.  It would be really convenient if the control associated with these settings had a VI Server Invoke Node available which would perform this "Data entry" check and coercion when called.  This way we can better synchronise FP and non-FP data entry behaviour of front panel controls in certain situations.

 

Data entry.png

 

This lovely property setting would be a prime candidate for a control "Invoke Node" via VI Server! Smiley Happy

 

The method could have the option to automatically update the control with the coerced value and also output the coerced value together with a boolean informing whether a coerce took place or not.

 

Data entry Invoke Node.png

 

Shane.

 

PS Now that I've posted the inage, I realise that the old value would have to be returned also.......

3 Comments
wired
Active Participant

I was just looking for an elegant way to do what you are suggesting, and LabVIEW falls short.  Certainly there are numerous cases where one would want to limit the range of a control's value whether or not it is entered on the front panel.  In my case, I have some buttons that programmaticaly increment/decrement a LARGE number of numerics in a control which is an array of clusters, with the increment/decrement amount being selectable. This is done at varying levels of scope (all numerics within a cluster inside another cluster, all numerics inside all clusters in a cluster array element, and all numerics in the entire array.  To do this, I will have to:

 

1) Read property nodes for max and min of each numeric

2) Use 'In Range & Coerce' to get coerced value

 

Your suggestion is good, but In my case would still be rather cumberson if it had to be applied to every numeric.  I would expand on this idea to have an Invoke Node which is simply 'Apply Data Entry Settings'.  This node should be selectable for any control, and would automatically apply to any other controls within the main control.  In my particular case, I would have a total of four Invoke node calls to handle all of my requirements.  Instead, I will require dozens of property nodes and corresponding In Range/Coerce primitives.

 

If LabVIEW is supposed to simplify programming, perhaps this should be considered.

 

 

 

Darin.K
Trusted Enthusiast

Another workaround is to use the numeric text property instead of the value property.  The value property simply sets the value to whatever you tell it to, but the numeric text property simulates entering that text into the control itself so it will be coerced/ignored or whatever depending on the Data Entry settings.

AristosQueue (NI)
NI Employee (retired)

Darin.K's workaround is good. For non-textbox numerics (Slides, Knobs, etc) you can use the numeric text property of the digital display. This technique works even if you have never made the digital display visible on the numeric control. 

Untitled.png

There is no single property on the base Numeric refnum class that sets the Value while respecting the coercion rules. Most of the ways of setting the numeric's Value do not use the coercion rules for the same reason that most ways of programmatically setting the Value do not trigger a Value Changed event -- it creates lots of echo chamber effects and limits the ability for a control to reflect a state that the user could not otherwise enter. But we added Value(Signaling) to programmatically raise the Value Changed event. It seems like having a "Value With Coercion" and a "Value With Coercion(Signaling)" would be good additions.