Sie sind auf Seite 1von 1

How Do I Ignore a Specific Error in LabVIEW?

- National Instruments

Cart  |  Help   Search

Hola paul marcelino (Usuario equivocado.)

KnowledgeBase NI Home > Support > KnowledgeBase


English
English
Request Support
14 ratings:  4.07 out of 5    Rate this Document
from an engineer

How Do I Ignore a Specific Error in LabVIEW?

Primary Software:
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I want to ignore particular error codes that aren't relevant to my LabVIEW program. For example, when
I write a command to a GPIB instrument and I don't get any value back, I receive a timeout error (-
1073807339) that breaks my loop. How can I make LabVIEW ignore that and other errors?

Solution:
To make LabVIEW ignore a specific error, you can use the General Error Handler VI located in the
Programming » Dialog & User Interface palette. Right-click on the terminal [exception action] and
create a constant. Set that constant to cancel error on match. Then wire the error number you wish
to cancel to the [exception code] terminal. This will remove that error from the error cluster that
matches the exception code you wired in.

You can also write your own logic to clear an error.  To do this, use the Unbundle By Name function to
unbundle the error code.  Then use a case structure to take an action based on the error code.  The
following block diagram implements this method to watch for a particular error, and then clears that
error only. This method also allows you to watch for several errors and take different actions based on
the specific error.

Related Links:
LabVIEW Help: Controlling Error Notification
LabVIEW Help: Using Error Clusters
NI Community: Clearing a Specific Error Code From The Error Cluster

http://digital.ni.com/public.nsf/websearch/BF72229C53F7633386256EDD0069331B?OpenDocument[05/11/2014 08:01:46 p.m.]

Das könnte Ihnen auch gefallen