Labview Lecture 2: Programming With Labview (Contd.)
Labview Lecture 2: Programming With Labview (Contd.)
Types in LabVIEW
LabVIEW supports four basic types:
Integers: Whole numbers Floats: Numbers with decimal points Strings: Texts Complex Numbers Booleans: True or false
Types in LabVIEW
Each type is associated with a different color
Representation
There are eight types of Integers Four types of Float Three types of Complex
Floats Integers
Complex Numbers
Representation
Floats and Complex Numbers are defined by their precision. Integers are defined by number of digits.
Floats Integers
Complex Numbers
Manipulation
You can find all manipulation functions in related palettes
For Loop
You feed an integer to N
While Loop
You need to feed the loop condition as boolean.
Case Structure
Feed a condition that results in True or False. Program two cases.
Flat Sequence
If you want to order the execution you can use flat sequence.
Shift Register
You may need to carry result of one iteration to the next. Use shift register.
Shift Register
Shift Register
You can also use shift register with while loop.
Arrays
In LabVIEW, arrays are all containers. Put an array container first.
Array
Drop any kind of constant to make an array of that tipe
An Array of Strings
Array
You can do the same thing in the front panel. Find the Array container in Modern Palette It becomes indicator or control depending on what you dropped
You should invest some time to get used to the LabVIEW structures. Design you program in some language you know, and port that code to LabVIEW.
END OF LECTURE 2