LabWindows/CVI is a project-based development environment where you can build programs consisting of many different source files, user interface files, instrument drivers, and so on. You list the files that make up your project in the Project window, and LabWindows/CVI handles compiling and linking and builds a C program for you.
!
BEGIN_TEXT
!
Multi-File Development
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
1
2655
3225
4860
2535
0
0
0
0
BEGIN_TEXT
The LabWindows/CVI environment is a protected environment, meaning it is designed to make building C programs fast and easy, even for novice programmers. If, on the other hand, you are an experienced programmer, you will find the integrated environment is packed with productivity-increasing editing and debugging tools to streamline your development efforts.
!
BEGIN_TEXT
!
Multi-File Development
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
3
2655
3225
5010
2640
0
0
0
0
BEGIN_TEXT
In addition to storing a list of the files making up your project, the Project window displays status information about your files. For example, whenever you change one of your source files, an S appears in the Project window until you save your changes.
You can save the file by double-clicking on the S.
!
BEGIN_TEXT
!
Status Information
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_U1R.BMP
ARR_U1_.BMP
96
196
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
5
2655
3225
4785
2205
0
0
0
0
BEGIN_TEXT
Similarly, if you have not compiled your source file, a C will be displayed in the Project window.
Double-click on the C to compile the sample.c source file.
!
BEGIN_TEXT
!
Status Information
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_U1R.BMP
ARR_U1_.BMP
98
173
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
7
2655
3225
4785
2205
0
0
0
0
BEGIN_TEXT
The Project window also keeps track of source files that you have open. In this example, the sample.c file is open.
Close the open source window by double-clicking on the box in the Project window.
!
BEGIN_TEXT
!
Status Information
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
68
105
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
9
2655
3225
4770
1455
0
0
0
0
BEGIN_TEXT
Reopen the sample.c source file by double-clicking on the box indicated.
!
BEGIN_TEXT
!
Status Information
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
68
103
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
11
3345
270
5490
3165
0
0
0
0
BEGIN_TEXT
Because LabWindows/CVI is designed for building projects made up of many different files, it lets you easily view and edit many files at once. One feature that helps you manage multiple files is the Open Quoted Text function. You can place your cursor on any filename in your Source window (such as the header file sample.h in this example) and select the Open Quoted Text icon to view the file.
Click on the Open Quoted Text icon to view the sample.h header file.
!
BEGIN_TEXT
!
Open Quoted Text
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_L1R.BMP
ARR_L1_.BMP
27
70
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
13
2010
780
4965
1515
0
0
0
0
BEGIN_TEXT
Close the sample.h window by double-clicking on the close box in the upper left corner of the window.
!
BEGIN_TEXT
!
Open Quoted Text
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
15
3480
1590
4830
2535
0
0
0
0
BEGIN_TEXT
When you are working on large projects, it is helpful to be able to tag particular lines or areas of your source code that you are working on. LabWindows/CVI lets you tag any line in your source files.
Pull down on the View menu and select Toggle Tag to tag the AcquireData function definition.
!
BEGIN_TEXT
!
Setting Tags
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
19
3345
270
4785
2205
0
0
0
0
BEGIN_TEXT
You can add multiple tags to a source file. Or, you can add multiple tags to multiple source files in your project. You can press a hot-key to jump between tags to quickly find tagged areas in your program.
Click on the arrow to continue.
!
BEGIN_TEXT
!
Tag Scope
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
25
4305
1440
4785
2205
0
0
0
0
BEGIN_TEXT
You can set the scope of your tag jumps from the Tag Scope selection in the View menu. You may wish to jump between tags in only the current window, all open windows, or all files in your project.
Click on the arrow to continue.
!
BEGIN_TEXT
!
Tag Scope
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
27
3405
1350
4860
2775
0
0
0
0
BEGIN_TEXT
You may need to view two different sections of a single source file at the same time when you are debugging or developing code. In the LabWindows/CVI source editor, you can drag the top of the window down to create subwindows.
Click on the arrow to create two subwindows for the sample.c source file.
!
BEGIN_TEXT
!
SubWindows
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
8
8
~~
~~
0
0
0
0
18
3
3
-1
3
0
0
EDIT.AVI
0
46
4185
4200
4890
2400
0
0
0
0
BEGIN_TEXT
As you can see, now you have two independent views of the same source file. This may help when you wish to view your global variable declarations or header files included at the top of your source file while you are developing source code farther down in your file.
Click on the arrow to continue.
!
BEGIN_TEXT
!
SubWindows
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
47
4275
1560
6315
2655
0
0
0
0
BEGIN_TEXT
LabWindows/CVI has a quick and easy way to view the source code of functions called from your program. For example, you may want to view the source code of the scope_read_waveform function called in this sample file. Because this function comes from an instrument driver, you can view and edit its source code.
Click on the scope_read_waveform function with your mouse and then click on the View Identifier Definition icon in the toolbar to automatically display the source code of this instrument driver function.
!
BEGIN_TEXT
!
Find Identifier Definition
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_U1G.BMP
ARR_U1_.BMP
62
107
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
51
4335
0
5085
2430
0
0
0
0
BEGIN_TEXT
With only a mouse-click, you can quickly find and view the source code for any function in your program. LabWindows/CVI automatically opened the source file for the scope instrument driver and highlighted the scope_read_function for you.
Double-click on the close box to close the scope.c source file.
!
BEGIN_TEXT
!
Find Identifier Definition
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
53
4350
585
5865
2610
0
0
0
0
BEGIN_TEXT
Many LabWindows/CVI library functions have multiple parameters. Function panels not only help you generate code, they can also help you review code and make minor changes to function calls in your program. For example, the PlotY function in this example has many parameters. If you would like to change the color of the plotted waveform from red to another color, you can easily do this through the function panel.
Click on the PlotY function with your mouse.
!
BEGIN_TEXT
!
Recall Function Panel
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
55
4350
585
5790
1875
0
0
0
0
BEGIN_TEXT
Now click on the Recall Function Panel icon in the toolbar. This will automatically display the PlotY function panel with all of the parameter values from this particular call to the function loaded into the function panel controls.
!
BEGIN_TEXT
!
Recall Function Panel
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1Y.BMP
ARR_R1_.BMP
26
104
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
57
5010
4335
4890
2010
0
0
0
0
BEGIN_TEXT
Now you have a graphical depiction of the PlotY function through the function panel.
Click on the arrow button and we will change the change the Color control setting from red to DARK MAGENTA.
!
BEGIN_TEXT
!
Recall Function Panel
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
61
3435
495
4785
2205
0
0
0
0
BEGIN_TEXT
Notice that the function call at the bottom of the function panel has been updated with the new value for the color parameter.
Click on the Insert Function Call icon in the toolbar to update the function call in your source window.
!
BEGIN_TEXT
!
Recall Function Panel
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_L1B.BMP
ARR_L1_.BMP
31
71
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
63
4665
495
4785
1605
0
0
0
0
BEGIN_TEXT
Click on the Replace button to replace the existing PlotY function in your source file with the new call with Dark Magenta as the color.
!
BEGIN_TEXT
!
Recall Function Panel
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
65
4665
495
5085
2520
0
0
0
0
BEGIN_TEXT
Another common problem you may run into when you are developing C code is an imbalance of brackets or braces in your code. These syntax errors can be difficult to locate. LabWindows/CVI has a balance utility that helps you find unbalanced pairs of brackets or braces in your source code.
Pull down on the Edit menu and select Balance.
!
BEGIN_TEXT
!
Balance
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
69
4545
480
5175
2640
0
0
0
0
BEGIN_TEXT
The Balance feature automatically highlights all code within the current braces, brackets, or parentheses. In this case, the cursor was on the PlotY function, so LabWindows/CVI highlighted the PlotY function parentheses.
To continue finding the matched pairs of parentheses, press <Ctrl-B> twice more to invoke the Balance utility two times.
!
BEGIN_TEXT
!
Balance
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
71
4665
495
4800
1740
0
0
0
0
BEGIN_TEXT
After you have reach the outer-most pair of parentheses or brackets, the balance utility stops.
Click on the arrow to continue.
!
BEGIN_TEXT
!
Balance
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
74
4665
495
5490
2130
0
0
0
0
BEGIN_TEXT
Source code control is an important issue for developers working on large projects or those involved in team programming projects. LabWindows/CVI has a built-in DIFF utility to help you track source code changes.
Click on the arrow to view the Diff utility menu.
!
BEGIN_TEXT
!
Built-in DIFF Utility
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
78
1410
4395
4785
2205
0
0
0
0
BEGIN_TEXT
As you can see, the Diff utility can help you work efficiently. You can specify your own match criteria for finding changes in files, and ignore white space changes during comparison.
Click on the arrow to continue.
!
BEGIN_TEXT
!
Built-in DIFF Utility
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
80
1665
4920
4110
3240
0
0
0
0
BEGIN_TEXT
You have probably noticed by now that LabWindows/CVI has many different code-generation tools to help you build your C programs quickly and easily. With the Insert Construct menu, you can automatically generate code for standard C structures in your program, such as for loops, while loops, and case statements.
Click on the Insert Construct menu to view the options for code generation.
!
BEGIN_TEXT
!
Insert Construct
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
24
38
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
82
1665
4920
3585
1830
0
0
0
0
BEGIN_TEXT
Click on If Else to generate an If/Else structure in the source window.
!
BEGIN_TEXT
!
Insert Construct
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
84
4635
1290
4275
1950
0
0
0
0
BEGIN_TEXT
Now you can simply insert a condition for the If statement. We will input x<100 for you.
Click on the arrow to continue.
!
BEGIN_TEXT
!
Insert Construct
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
EDIT.AVI
0
85
4680
1260
4605
1575
0
0
0
0
BEGIN_TEXT
Now click on the OK button to generate the If/Else structure.
!
BEGIN_TEXT
!
Insert Construct
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
87
3720
3825
4140
2970
0
0
0
0
BEGIN_TEXT
As you can see, LabWindows/CVI automatically places the If/Else statement in your source window where you last placed the cursor.
LabWindows/CVI lets you configure the development environment in a number of ways.
Pull down on the Options menu to view these choices.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
89
1650
1470
4170
1515
0
0
0
0
BEGIN_TEXT
Select the Editor Preferences... to see how you can configure the source editor in LabWindows/CVI.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
91
2085
6060
3585
2655
0
0
0
0
BEGIN_TEXT
From this dialog box, you can configure your editor to fit your own working habits. A particularly helpful feature is Undo. LabWindows/CVI has built-in Undo and Redo for all editor operations (with a default of 100 operations that you can undo!).
Click on the OK button to continue.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
93
1185
1620
3930
1290
0
0
0
0
BEGIN_TEXT
Click on Toolbar... to learn how to customize the toolbar icons.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
95
5670
90
9390
1665
0
0
0
0
BEGIN_TEXT
There are more than 75 operations that you can add to the toolbar in the Source window. From this window, you can build your own toolbar with the editing and debugging operations that you use most often.
Click on the OK button to continue.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
97
3810
4035
3720
1155
0
0
0
0
BEGIN_TEXT
Click on Colors...
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
99
5370
1815
4170
1785
0
0
0
0
BEGIN_TEXT
You can configure the colors used for many different components of the LabWindows/CVI editor from this dialog box.
Click on the OK button to continue.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
101
1410
1095
4440
1335
0
0
0
0
BEGIN_TEXT
Click on Bracket Styles...
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
103
3060
120
3525
2790
0
0
0
0
BEGIN_TEXT
From this dialog box, you can specify the format for the code generated by LabWindows/CVI through CodeBuilder or the Insert Construct menu.
For example, change the Function Brackets style from Uneven, Left to Flush, Left to see the effect of each setting.
!
BEGIN_TEXT
!
Configuring Your Environment
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
EDIT.AVI
0
107
3060
120
4185
2130
0
0
0
0
BEGIN_TEXT
As you can see, LabWindows/CVI has a wide variety of editing tools to help you generate, edit, and debug your source files.