ANK LABS
NUMERIC
DATA TYPES
In my previous blog post/youtube video we saw Boolean data type and different kinds of controls and indicator. Similarly Numeric data type have different kinds of controls and indicator too. Additionally we will see the functions of Numeric control pallet.
Today we will discuss the functions and usage of Numeric pallet we will cover the following portions.
-
Addition
-
Subtraction
-
Multiplication
-
Division
-
Quotient
and Remainder
-
Increment
-
Decrement
-
Compound
Arithmetic
-
Absolute value
-
Round
to nearest
-
Round
Toward – Infinity
Round Toward +
Infinity
-
Scale
By Power Of Two
-
Square
root
-
Square
-
Negate
-
Reciprocal
-
sign
-
Constant
-
Random
numbers
LET’S GET STARTED:-
Under
Boolean data type we got switches and indicators such as push button led etc. similarly
numeric data types we got.
Numeric (Control and Indicators)
It is used to enter and display numeric dada.
Time
Stamp
It is used to send and receive
time, date, year updates.
Fill
Slides
It is used to display numeric data
in vertical and horizontal slide, it can also be used as indicators with
customizable scale.
Pointer
slides
Similar to that of a Fill Slider,
Additionally they got a pointer which help you see the exact value.
Progress
Bar
Shows the progress in vertical or
horizontal bar.
Graduated
Bar
A progress Bar with customizable
dividers which can be used to divide/break up the values in equal parts.
Knobs,
Dials, Meters, and Gauges
Can be used to control or display
numeric data in rotatory action.
Tanks
and Thermometers
Displays numeric data in vertical
slides which resembles a real time tank or thermometer.
Scroll
Bar
Displays numeric data in vertical
as well as horizontal that scrolls through data by dragging, scrolling mouse
wheel, incrementing and decrementing arrow etc.
All
these controls and indicator can also be used has a control or indicator if required.
NUMERIC DATA TYPE
All
this functions can be used if we connect controls and indicators to respective
terminals.
Addition
Sum two input.
Example:-
2 + 2 = 4
Subtraction
Example:-
2 - 2 = 0
Multiplication
Example:-
2 * 2 = 4
Division
Example:-
2 / 2 = 1
Quotient and
Remainder
Example:-
If input is 7 & 2 then
our quotient = 3
Remainder = 1
Increment
Example:-
(Number) + 1 = number + 1
5 + 1 = 6
Decrement
Example:-
(Number) - 1 = number + 1
5 - 1 = 4
Compound Arithmetic
Example:-
5+2+1+4+3 = 15
Or
1*2*3*6 = 36
Absolute value
X = a + bi
=52 + 62i
Then
the absolute value abs(x) =
=
80.9197
Round to nearest
Example:-
52=52
(52.0) to (52.5) = 52
(52.6) to (52.9) = 53
Round Toward – Infinity
Example:-
If the input is 6.8, the result is 6.
Similarly
If the input is –6.8, the result is –7.
Round Toward + Infinity
Rounds the input to the next
highest integer.
Example:-
If the input is 3.1, the result is 4.
Similarly if the input is –3.1,
the result is –3.
(3.1) to (3.9) = 4
Scale By Power Of Two
Output = x*2^n
Example:-
If x=2, n=o
Output
= 2*2^0 = 2
Similarly
When
x=2, n=2
Output
= 2*2^2 = 8
Square root
Example:-
Square root of 2 = 1.41421
Square
Example:-
Square of 3 = 9
Negate
Negates the input value.
Example:-
5 = -5
Similarly
-5 = 5
Reciprocal
Example:-
2 = ½ = 0.5
sign
Returns the sign of number.
Example:-
5 = 1
-5 = -1
0 = 0
Constant
Random
numbers
A vi file containing all numeric control and indicator
A vi file containing all numeric function.