Hello,
This is something that could be checked into, but your question begs another; are you having a problem with viOpen()? The ViStatus return value will indicate errors for you when the function returns, should they occur during execution. The return value either indicates completion or an error; here are some examples: (these have been take from the NI-VISA Help; see Start -> Programs -> National Instruments -> VISA -> NI-VISA Help)
Completion Codes include:
- VI_SUCCESS Session opened successfully.
- VI_SUCCESS_DEV_NPRESENT Session opened successfully, but the device at the specified address is not responding.
- VI_WARN_CONFIG_NLOADED The specified configuration either does not exist or could not be loaded; using VISA-specified defaults.
Error Codes include:
- VI_ERROR_INV_OBJECT The given session reference is invalid.
- VI_ERROR_NSUP_OPER The given sesn does not support this operation. This operation is supported only by a Resource Manager session.
- VI_ERROR_INV_RSRC_NAME Invalid resource reference specified. Parsing error.
- VI_ERROR_INV_ACC_MODE Invalid access mode.
- VI_ERROR_RSRC_NFOUND Insufficient location information or resource not present in the system.
- VI_ERROR_ALLOC Insufficient system resources to open a session.
- VI_ERROR_RSRC_BUSY The resource is valid, but VISA cannot currently access it.
- VI_ERROR_RSRC_LOCKED Specified type of lock cannot be obtained because the resource is already locked with a lock type incompatible with the lock requested.
- VI_ERROR_TMO A session to the resource could not be obtained within the specified openTimeout period.
- VI_ERROR_LIBRARY_NFOUND A code library required by VISA could not be located or loaded.
- VI_ERROR_INTF_NUM_NCONFIG The interface type is valid, but the specified interface number is not configured.
- VI_ERROR_MACHINE_NAVAIL The remote machine does not exist or is not accepting any connections. If the NI-VISA server is installed and running on the remote machine, it may have an incompatible version or may be listening on a different port.
- VI_ERROR_NPERMISSION Access to the remote machine is denied.
You can find more information in the NI-VISA Help document (Start -> Programs -> National Instruments -> VISA -> NI-VISA Help).
Definitely repost if you feel that more specific information about a session's unique logical identifier reference would be helpful to know!
Thank you,
Best Regards,
JLS