LabVIEW入门最佳教材
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
17
Customising the program (text)
Select “text tool” from tools palette
Cursor now changes function
Changing the name of the input
Use “text tool” to highlight and edit the names (grey) numeric control Use “text tool” to highlight and edit the name (grey) numeric indicator
13
Adding two numbers - running the program
Select “arrow” from tools palette
Cursor now changes function Use arrow tool to “click” single arrow on front panel to run once Or “click” looped arrow on front panel to run continuously Use arrow tool to “click” red stop button
Digital controls to function inputs Function output to digital indicator
12
Useful tips - controls and indicators and terminals
Do not confuse controls (data inputs) with indicators (data outputs)
Changing the input
Text field
If running continuously then program is interactive
Up/down arrows
15
Adding two numbers - saving the program
Select “save” from within the file menu When prompted enter filename Note in windows LabView files have a ***.vi file extension
select “show panel” from “window” menu select “show controls palette” from “window” menu
The controls palette
5
LabView - diagram
Functions (program operations) can be selected from the “functions” window and placed on the diagram. To find functions
vi - stands for virtual instrument
DO IT NOW AND KEEP DOING IT!
16
Useful tips - changing the program
பைடு நூலகம்
When a LabView program is running it IS possible to change the setting of the controls, i.e. change the data inputs When a LabView program is running it IS NOT possible to change to wiring of the program To make changes to the program you need to stop it first!
Run continuously
Running the program
Stop the program Run once
Stopping the program
14
Adding two numbers operating the program
Select “finger hand” or “text tool” from tools palette
3
LabView - getting going
Opening LabView (windows)
“Double-click” on LabView Icon LabView start-up appears From within the Linux “Shell” type “labview &” LabView start-up appears
Cursor now changes function Use “finger” on up/down arrows of numeric controls Or use “text tool” to highlight and edit number field (white) within numeric control
Indicator text field
Control text field
LabView Physics 3 - IT skills
Miles Padgett m.padgett@physics.gla.ac.uk
1
Objectives
To acquire familiarity with the LabView Programming language To be able to write LabView programmes incorporating pre written and new VI’s To use LabView in the study of 2-D diffraction patterns You get exercise marks for completion of each milestone.
select “show diagram” from “window” menu select “show functions palette” from “window” menu
The functions palette
6
LabView - tools
Tools (cursor/mouse functions) can be selected from the “tool” window To find tools
select “show tools palette” from “window” menu
Some issues of LabView give option for auto-tool select TURN IT OFF!
The tools palette
Auto tools is turn off and on by clicking on the “green” button (Dark green is off)
Opening LabView (Linux)
The LabView icon
Programs themselves are called “vi” (virtual instruments) To start a new “vi”, select “new vi” from the LabView start up screen
Wiring an indicator to the input of a function will generate an error Wiring a control to the output of a function will generate an error
Double (left) clicking on any terminal on the diagram (white) will highlight the associated control or indicator on the front panel (grey) Double (left) clicking on any control or indicator on the front panel (grey) will highlight the associated terminal on the diagram (white)
Click to turn off auto tools
7
Using LabView to add two numbers
Create new program
Select “new VI” from the file menu Selecting a digital control
Select a digital control from the controls palette and place it on the front panel (grey) Do the same again Select a digital indicator from the controls palette and place it on the front panel
2
LabView - the basics
All LabView programmes comprise two screen types
The
“front panel” (grey) which acts as the user interface The “diagram” (white) which contains the “programme”
The LabView start up screen
4
LabView - front Panel
Controls (data input) and indicators (data output) can be selected from the “controls” window and placed on the front panel. To find controls
Selecting a digital indicator
8
Adding two numbers - front panel
Controls and indicator placed on front panel N.B. software automatically numbers controls of the same type in sequence
Select “wiring tool” from tools palette
Cursor now changes function “click” on wire start point “drag” to end point then “release”
Use wiring tool to connect
The front panel
9
Adding two numbers - diagram
Data terminals automatically appear on diagram
The diagram
10
Adding two numbers - placing the function
Select and drag the “addition function onto the diagram To find addition
Selecting a numeric function
Show function panel Click on numeric Select and drag addition onto diagram
Dragging onto the diagram
11
Adding two numbers - wiring the function