Jump to content

Suggestions for implementing related numeric controls


Recommended Posts

I have numerous numeric controls whose related values are related (i.e. a change in one value causes a change in another based on the mathematical relations of the numeric values).

Right now, I use event structures to handle the event in which one value is changed and calculate the new values of the other controls. However, my event cases are growing really quick as I add lots of numeric controls and I would preferably like to modularise the handling of these events.

One option I've thought of is to have parallel while loops with event structures in them handling different sets of related numeric controls, but I get the feeling there would be unforeseen problems in the future.

Suggestions of alternatives would be very much appreciated.

Thank you very much

cheers

Link to comment

Investigate XControls. You could easily implement at "f(x)" XControl, which always displays the results of f(x), where x is the current value of the control. You could add a property to the XControl to give it a VI Ref that is the formula f. Then you would just wire the numeric control directly to the numeric indicator. Complete modularization of display from value.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.