Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI VISA status code not decoded on Linux?

Solved!
Go to solution

I am working with NI VISA on both Sun Solaris (Solaris 9) and Red Hat Linux (REL5).

 

On Sun Solaris, when NI VISA gets an error, a call to NI VISA Status returns the text explanation of the NI VISA error code:

 

------------------------

(10:40:31.919758) 0007 TST6->EC : TST6 119 NTRL: EXECUTE_FUNCTION DMM1 MEASURE AC_CURRENT

(10:40:31.932993) 0003 ->UIS : 120 DBUG: DMM1: Message written: MEAS:CURR:AC? 10,0.5

(10:40:41.951099) 0003 ->UIS : 121 DBUG: DMM1: Message read:

(10:40:41.954711) 000f EC ->TST6: TST6 119 ERR : Error on DMM1 during EXECUTE MEASURE AC_CURRENT

(10:40:41.954711) 000f EC ->TST6: TST6 119 ERR : VISA: Timeout expired before operation completed.

(10:40:41.954711) 000f EC ->TST6: TST6 119 ERR : (Reported by Agilent_34401A_DMM_Component_c.cpp:517)

------------------------

 

However, NI VISA on Red Hat Linux does not decode the NI VISA error code:

 

------------------------

(15:56:32.981064) 0007 TST6->EC : TST6 119 NTRL: EXECUTE_FUNCTION DMM1 MEASURE AC_CURRENT

(15:56:32.981353) 0003 ->UIS : 120 DBUG: DMM1: Message written: MEAS:CURR:AC? 10,0.5

(15:56:49.760690) 0003 ->UIS : 121 DBUG: DMM1: Message read:

(15:56:49.760924) 000f EC ->TST6: TST6 119 ERR : Error on DMM1 during EXECUTE MEASURE AC_CURRENT

(15:56:49.760924) 000f EC ->TST6: TST6 119 ERR : VISA: Unknown status value 0xBFFF0015

(15:56:49.760924) 000f EC ->TST6: TST6 119 ERR : (Reported by Agilent_34401A_DMM_Component_c.cpp:517)

------------------------

 

Is this a known problem with NI VISA on Red Hat Linux?  Or does this indicate that there is a problem in our NI VISA installation on Red Hat Linux?

 

Thank you.

 

Gordon Guenthner

Principal Software Engineer

General Dynamics AIS

8201 E. McDowell Road

Scottsdale, AZ 85252

480-441-2904

0 Kudos
Message 1 of 8
(5,961 Views)

Hey Gordon,

 

Which versions of NI-VISA are you using for Sun Solaris and Red Hat Linux? Make sure that your driver is the latest version for your system (check out ni.com/support for the most up to date driver versions)The error codes returned are all listed in the NI-VISA Help document, which can be found within your VISA directory on your machine or here, under the NI-VISA Help->Function Reference->Status Codes->Error Codes help document.

 

Regards,

Justin E
National Instruments R&D
0 Kudos
Message 2 of 8
(5,929 Views)

On Solaris 9 we are running NI VISA 3.1.

 

On Red Hat REL5 we are running NI VISA 4.5.

0 Kudos
Message 3 of 8
(5,916 Views)

Hey Gordon,

 

You might want to try downloading VISA 4.5.1 for Linux

 

Regards,

Justin E
National Instruments R&D
0 Kudos
Message 4 of 8
(5,894 Views)

We just updated to NI VISA 4.5.1, and we still have the same problem with viStatusDesc failing to return the text description of viStatus when the viStatus is 0xBFFF0015 (and possibly other values).

 

Any other ideas?

 

Thanks.

 

gordon

0 Kudos
Message 5 of 8
(5,824 Views)
Solution
Accepted by topic author gguenthner

Gordon,

 

I did find a customer who had the same problem, this was his solution:

 

I traced the problem to how our System Administrator installed VISA 4.3. Due to security requirements, the default umask for root is set to disable user access to files installed by root. Therefore, when VISA was installed by the system administrator, the share directories were unreadable by users, and when VISA (viStatusDesc) tried to access the error text files, it was blocked. Once the share directories were made accessible to users, the error text was properly returned by viStatusDesc.

 

Double-check to ensure that your account has the proper access to all the VISA files.

 

---

Peter Flores
Applications Engineer
0 Kudos
Message 6 of 8
(5,801 Views)

NI VISA was installed in /usr/local/vxipnp, but the errors were installed in /usr/local/natinst.  And the /usr/local/natinst/share directory had the wrong access pemissions.  Once share was changed to

drwxr-xr-x, error messages were correctly decoded.

 

Thank you for your assistance.

 

Gordon Guenthner

GD AIS

Senior Software Engineer

0 Kudos
Message 7 of 8
(5,792 Views)
Glad I could help. Happy Holidays!
---

Peter Flores
Applications Engineer
0 Kudos
Message 8 of 8
(5,736 Views)