LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display "possible reason(s)" from error code

How do you get the "possible reason(s)" text from an error code. I have a program calling into DAQ or VISA or whatever, and the inevitable error happens. If I use "Unbundle by name" to decompose the error cluster, I only get the first part of the error string, which only has some of the information. How do I extract or lookup the rest of the string so that I can give my user a better indication of what is wrong? I know this capability exists becuase when you put a probe on the same error cluster, you get the expanded text.

 

The string I currently get....

 

"Property Node DAQmx Device (arg 2) in AOUT-Wave.vi->ExecStep.vi->TestTop.vi <append>
<B>Device: </B> USB-6259-A"

 

 

 

The string I sould like to get...

 

"Error -88705 occurred at Property Node DAQmx Device (arg 2) in AOUT-Wave.vi->ExecStep.vi->TestTop.vi

Possible reason(s):

The specified device is not present or is not active in the system. The device may not be installed on this system, may have been unplugged, or may not be installed correctly.

Device:  USB-6259-A"

 

--

Brian Rose
0 Kudos
Message 1 of 7
(4,405 Views)
Use the Simple Error Handler.vi

Example_VI.png The message terminal contains what you want.
Message Edited by jcarmody on 04-19-2010 12:05 PM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 7
(4,396 Views)

Is there another way to get this "Possible reason(s):" string not using the General Error Handler.vi or Simple Error Handler?

0 Kudos
Message 3 of 7
(2,104 Views)

 


@pcortes2 wrote:

Is there another way to get this "Possible reason(s):" string not using the General Error Handler.vi or Simple Error Handler?


Pass the error code through this VI:

<vi.lib>\Utility\error.llb\Error Code Database.vi

0 Kudos
Message 4 of 7
(2,099 Views)

Hi pcortes,

 


@pcortes2 wrote:

Is there another way to get this "Possible reason(s):" string not using the General Error Handler.vi or Simple Error Handler?


What's the point in not using those functions?

Why don't you want to use them?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(2,077 Views)

@pcortes2 wrote:

Is there another way to get this "Possible reason(s):" string not using the General Error Handler.vi or Simple Error Handler?


Am I correct in assuming that you don't want a dialog box to open when there is an error?  If you set the "type of dialog" to "no dialog" -  as shown in jcarmody's post - it will not open a dialog.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 7
(2,059 Views)

Attached is a heavily modified version of the GEH. It should do what you need.

 

mcduff_0-1662497555934.png

 

Download All
0 Kudos
Message 7 of 7
(2,032 Views)