LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

making a control that will display every 4th digit - how?

how can i make a control which will only enable the user to insert every 4th digit? (4, 8, 12.. etc)

0 Kudos
Message 1 of 8
(2,964 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(2,957 Views)

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.

0 Kudos
Message 3 of 8
(2,955 Views)

Perhaps a bit of logic to coerce the value to multiples of 2^2?

Logic.png


"Should be" isn't "Is" -Jay
Message 4 of 8
(2,947 Views)

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?

0 Kudos
Message 5 of 8
(2,936 Views)

Here's one way:

 

 

 

and if you're overly pedantic about 0, you can also do this:

 

 

Download All
Message 6 of 8
(2,930 Views)

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.

Message 7 of 8
(2,919 Views)

On the constant

Right Click >Visible Items >Radix

Choose the Pointer tool

Left Click > Hex

untitled.PNG


"Should be" isn't "Is" -Jay
Message 8 of 8
(2,909 Views)