Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Error Codes

I'm using Visual Basic 6 and building a function to display error messages.
I have VISA 2.6 installed and there are 4 error messages which do not seem
to be defined.
VI_ERROR_QUEUE_OVERFLOW
VI_ERROR_IN_PROGRESS
VI_ERROR_MACHINE_NAVAIL
VI_ERROR_NPERMISSION
Is there anything that would cause these error codes not to be defined.
Thank you,
Gary
0 Kudos
Message 1 of 3
(4,205 Views)
Gary:

Exactly what do you mean by "not defined"? Those 4 error messages are currently unique to NI-VISA, which is why they are not in the VISA specification. Do you mean that they are not in visa32.bas?

If you are displaying error messages, you should not be keying off the specific error code. You should use the function viStatusDesc instead. It should work fine for any status value returned from the VISA driver, even if the code isn't in any .h or .bas file.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 2 of 3
(4,205 Views)
I'm not using visa32.bas. I set a reference to visa32.dll. I was not aware
of the viStatusDesc. Iwas trying to build a function that did this. The 4
Const values did not seem to be declared since they gave an error message as
not defined.
Gary


"Dan Mondrik" wrote in message
news:5065000000050000004DBB0000-1031838699000@exchange.ni.com...
> Gary:
>
> Exactly what do you mean by "not defined"? Those 4 error messages are
> currently unique to NI-VISA, which is why they are not in the VISA
> specification. Do you mean that they are not in visa32.bas?
>
> If you are displaying error messages, you should not be keying off the
> specific error code. You should use the function viStatusDesc
> instead. It should work fine for any status val
ue returned from the
> VISA driver, even if the code isn't in any .h or .bas file.
>
> Dan Mondrik
> Senior Software Engineer, NI-VISA
> National Instruments
0 Kudos
Message 3 of 3
(4,205 Views)