Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA error string

Solved!
Go to solution

Hello:

 

Is there support in NI-VISA library (4.6 and up) to get the string describing an error message returned from a function? NI-DAQmx has this kind of facility, for example.

 

Thank you,

-Ilya.

 

0 Kudos
Message 1 of 4
(4,060 Views)

LabVIEW has the ability, not DAQmx. Just use the Simple Error Handler or General Error Handler.

Message 2 of 4
(4,059 Views)

Hi Dennis:

 

DAQmx actually does have this ability - DAQmxGetErrorString and DAQmxGetExtendedErrorInfo.

Yes, LabVIEW has the support for this. Unfortunately I can't use LabVIEW.

 

-Ilya.

0 Kudos
Message 3 of 4
(4,018 Views)
Solution
Accepted by topic author ilyak

I found it:

 

ViStatus viStatusDesc(ViObject vi, ViStatus status, ViChar desc[])

 

The viStatusDesc() operation is used to retrieve a user-readable string that describes the status code presented. If the string cannot be interpreted, the operation returns the warning code VI_WARN_UNKNOWN_STATUS. However, the output string desc is valid regardless of the status return value.

 

-Ilya.


0 Kudos
Message 4 of 4
(4,013 Views)