LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting numeric input to integer only

Solved!
Go to solution

Hi,

 

I'm using Labview 8.5.1 and have a numeric "knob" input on my front panel. How can I limit this so as the value that is sent to the block diagram is an integer only? I've set the display on the front panel to not show any decimal places but it still sends a number to six decimal places to the block diagram but my programme needs an integer-only value.

 

 

Thanks for the help 🙂 

0 Kudos
Message 1 of 4
(8,482 Views)
Solution
Accepted by topic author thomas_p

Hi thomas_p,

change the representation to an integer. Right click the control in the blockdiagram and select "representation". Select an integer type, maybe I32.

 

Mike

Message 2 of 4
(8,476 Views)
Thanks MikeS81, that worked perfectly 🙂
0 Kudos
Message 3 of 4
(8,471 Views)

Hi thomas_p

 

You need to change the numeric type of the knob. It's probably a double at the moment. Right click on the knob (on either the block diagram or the front panel), select "representation", and choose the appropriate type for your application.

 

If you're unsure exactly which type to use, look in the LabVIEW Help, In the index look at "numeric", sub headings "representation" and "data types table"

 

Rod.

 

 

EDIT: Beaten to it!

Message Edited by Rod on 05-08-2009 10:36 AM
Message 4 of 4
(8,470 Views)