32
3.2 Software Project
The software was developed in LabVIEW 7.1 for Windows XP because it is an easy
programming language and the standard in the laboratory, since the university has an
academic license provided by National Instruments. Programming in LabView is relatively
simple. The objects which belong to the function are placed on the “Front Panel”. This
function can be configured to work as a window and will show up, when executed. The code
is built on the “Block Diagram”, where these objects are linked to other functions. Afterwards,
it will be described the software development. The following figures can be better visualized
on the computer, where zoom tools are available, than on the printed version of this thesis.
Figure 3.12 shows the main window. All the signals selected by using the button
“Channels” are plotted on the graph “Signal”. The three buttons on the left and under this
graph make possible to move the cursor and zoom the plots. The boxes on the right show
the current position of the cursor. The three other buttons can be used for configuring the
plots and move the cursor.
The webcam frames are placed on “USB Camera” and the high-speed camera
frames on “HS Camera”. There are five buttons under these image graphs: play, backward,
forward, pause and stop. Pressing play, the webcam frames play until pause or stop is
pressed, or the last frame is reached. Pressing pause, the current frame is shown and it is
the reference for next executions. Pressing stop, the current frame is also shown, but the first
frame (frame zero) will be the next one, when a new execution is done. Pressing the
backward and the forward buttons, the previous and the next frames are shown, respectively.
The box “Frame” displays the number of the frame.
Pressing “Start” the acquisition starts and the red LED is turned on. Pressing “Stop”
the acquisition stops and this LED is turned off. The box “Project” contains the path of the
folder where the project file is saved.
Figure 3.13 shows the code that builds the menus which appear on the top of the
main window when the software is executed. They are File (items: New File, Open File, Save
as xls), Acquisition (items: Setup Signal, Setup Image, Filter) and Camera (item: Settings).
After building the menus, the software becomes a main sequence divided into three
frames. The first one makes the initialization of all variables. The second one makes the
calibration of the system. And the third one, more complex, is the core of the system.
Figure 3.14 shows that first frame, which contains the default values of all variables
used by the software. If there is an USB camera plugged to the computer, a session for its
image is created. If there is no any USB camera plugged to the computer, it does not happen
and the window that sets the parameters of the USB camera cannot be opened.