Programming instructions

Chapter 29 Debugging Techniques
LabVIEW Data Acquisition Basics Manual 29-2
©
National Instruments Corporation
Software Configuration Errors
As you check hardware connections, it is a good idea to verify that the
NI-DAQ software configuration reflects your hardware setup. For possible
difficulties with software configuration, read Chapter 2,
Installing and
Configuring Your Data Acquisition Hardware,
the chapter of this manual
that describes your specific application, or the
NI-DAQ User Manual
.
(Windows)
In the NI-DAQ Configuration utility, you can use the NI-DAQ
Test Panels to verify that your device is operating properly. Refer to the
NI-DAQ Configuration Utility Help for more details.
VI Construction Errors
The various sections below describe methods to find problems with VI
construction. All the techniques described can be used by themselves or in
conjunction with one another.
Error Handling
The best way to determine if your application executed without an error is
to use one of the error handler VIs in your application. The Error Handler
VIs are located in
Functions»Time & Dialog
. You can only use these VIs
with Intermediate and Advanced VIs. Easy I/O VIs already include error
handling capabilities within each VI. Each Intermediate and Advanced VI
has an error input and output clusters (named
error in
and
error out
,
respectively). The error clusters contain a Boolean that indicates whether
an error occurred, the error code for the error, and the name of the VI that
returned the error. If
error in
indicates an error, the VI returns the same
error information in
error out
, and does not perform any DAQ operations.
When you use any of the Intermediate or Advanced VIs in a While Loop,
you should stop the loop if the status in the
error out
cluster reads TRUE.
If you wire the error cluster to the General Error Handler VI or the Simple
Error Handler VI, the VI deciphers the error information and describes the
error to you. Figures 29-1 and 29-2 show how to wire a typical DAQ VI to
an error handler.