From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-22-2011 12:58 PM
how can i make a control which will only enable the user to insert every 4th digit? (4, 8, 12.. etc)
07-22-2011 01:19 PM
tell us a little more about this mysterious control please.
do we just see X's as place holders or are they underscores or ...
How does a user move from the 4th to the 8 place?
We may be abel to offer suggestion if you let us know a little more about what you expect.
The game of "50 questions" seldom yields a well defined software specificaiton.
Ben
07-22-2011 01:21 PM
Is it bounded? If there's some sort of upper limit then you could use a ring control, or something similar. If the upper bound is the limit of the datatype then you will need to programmatically check the value entered. You can do this with an event structure. Simple handle the Value Change event. If the value is not a multiple of 4, simply update the value with the previous value (which the event structure provides). There are examples that ship with LabVIEW on how to use an event structure.
07-22-2011 01:30 PM
Perhaps a bit of logic to coerce the value to multiples of 2^2?
07-22-2011 01:44 PM - edited 07-22-2011 01:48 PM
kk thanks guys, what about this:
IF x can be divided by 4 then..
how can i write it in labview?
@JEFF B.
how do i get the FFFFFFC?
07-22-2011 01:49 PM - edited 07-22-2011 01:50 PM
Here's one way:
and if you're overly pedantic about 0, you can also do this:
07-22-2011 02:07 PM
Depending on the behavior you want, you can pick one of the integer representations, right-click -> Data Entry... Set the Increment to 4 and Response to Coerce Up/Down or To Nearest.
As long as the lower limit is a multiple of 4 (as it is by default) you are good to go. Don't want zero? Set the minimum to 4.
07-22-2011 02:14 PM
On the constant
Right Click >Visible Items >Radix
Choose the Pointer tool
Left Click > Hex