Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

0xBFFF003E (VI_ERROR_IO) when trying to Read

Hi,

 

I have a problem when trying to perform a Read over a socket from an LPT3000R Spectrum Analyzer.

Whenever I perform a read, the above IO Error is thrown and I lose my connection.  To ensure that I was not doing anything wrong, I tried using the SimpleReadWrite sample from the .NET 4.0 Examples.  The sample code also throws an error upon read.  I'm using a C# program in VS2010.  My platform is Win 7 64 bit.

Any insight would be appreciated.

 

Below is my capture from NISpy:

 

 

1.  viOpenDefaultRM (0x00001001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:34.446       Call Duration 00:00:00.005
Status: 0 (VI_SUCCESS)
2.  viClose (0x00000000)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:34.451       Call Duration 00:00:00.000
Status: 0x3FFF0082 (VI_WARN_NULL_OBJECT)
3.  viFindRsrc (0x00001001, "?*", 0x00002001, 1, "TCPIP0::172.16....2::5000::SOCKET")
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:34.455       Call Duration 00:00:00.028
Status: 0 (VI_SUCCESS)
4.  viClose (0x00002001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:34.486       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
5.  viClose (0x00001001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:34.486       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
6.  viOpenDefaultRM (0x00001001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.628       Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)
7.  viParseRsrcEx (0x00001001, "TCPIP0::172.16....2::5000::SOCKET", 6, 0, "SOCKET", "TCPIP0::172.16....2::5000::SOCKET", "LPT3000R")
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.636       Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)
8.  viClose (0x00001001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.637       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
9.  viOpenDefaultRM (0x00001001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.644       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
10.  viOpen (0x00001001, "TCPIP0::172.16....2::5000::SOCKET", 0, 0, 0x00000001)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.645       Call Duration 00:00:00.003
Status: 0 (VI_SUCCESS)
11.  viParseRsrcEx (0x00001001, "TCPIP0::172.16....2::5000::SOCKET", 6, 0, "SOCKET", NULL, NULL)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.648       Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)
12.  viInstallHandler (TCPIP0::172.16.163.242::... (0x00000001), IO_COMPLETION, 0x000000000233CA3C, NULL)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:36.660       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
13.  viWrite (TCPIP0::172.16.163.242::... (0x00000001), ":TRACE:DATA? TRACE1", 19, 19)
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:42.057       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
> 14.  viRead (TCPIP0::172.16.163.242::... (0x00000001), 0x000000001024B188, 16384, 0)
> Process ID: 0x000007CC         Thread ID: 0x00001200
> Start Time: 18:02:42.060       Call Duration 00:00:00.212
> Status: 0xBFFF003E (VI_ERROR_IO)
15.  viStatusDesc (TCPIP0::172.16.163.242::... (0x00000001), 0xBFFF003E, "Could not perfo...e of I/O error.")
Process ID: 0x000007CC         Thread ID: 0x00001200
Start Time: 18:02:42.276       Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

1.  viOpenDefaultRM (0x00001001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:34.446       Call Duration 00:00:00.005Status: 0 (VI_SUCCESS)
2.  viClose (0x00000000)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:34.451       Call Duration 00:00:00.000Status: 0x3FFF0082 (VI_WARN_NULL_OBJECT)
3.  viFindRsrc (0x00001001, "?*", 0x00002001, 1, "TCPIP0::172.16....2::5000::SOCKET")Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:34.455       Call Duration 00:00:00.028Status: 0 (VI_SUCCESS)
4.  viClose (0x00002001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:34.486       Call Duration 00:00:00.000Status: 0 (VI_SUCCESS)
5.  viClose (0x00001001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:34.486       Call Duration 00:00:00.000Status: 0 (VI_SUCCESS)
6.  viOpenDefaultRM (0x00001001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.628       Call Duration 00:00:00.001Status: 0 (VI_SUCCESS)
7.  viParseRsrcEx (0x00001001, "TCPIP0::172.16....2::5000::SOCKET", 6, 0, "SOCKET", "TCPIP0::172.16....2::5000::SOCKET", "LPT3000R")Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.636       Call Duration 00:00:00.001Status: 0 (VI_SUCCESS)
8.  viClose (0x00001001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.637       Call Duration 00:00:00.000Status: 0 (VI_SUCCESS)
9.  viOpenDefaultRM (0x00001001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.644       Call Duration 00:00:00.000Status: 0 (VI_SUCCESS)
10.  viOpen (0x00001001, "TCPIP0::172.16....2::5000::SOCKET", 0, 0, 0x00000001)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.645       Call Duration 00:00:00.003Status: 0 (VI_SUCCESS)
11.  viParseRsrcEx (0x00001001, "TCPIP0::172.16....2::5000::SOCKET", 6, 0, "SOCKET", NULL, NULL)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.648       Call Duration 00:00:00.001Status: 0 (VI_SUCCESS)
12.  viInstallHandler (TCPIP0::172.16.163.242::... (0x00000001), IO_COMPLETION, 0x000000000233CA3C, NULL)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:36.660       Call Duration 00:00:00.000Status: 0 (VI_SUCCESS)
13.  viWrite (TCPIP0::172.16.163.242::... (0x00000001), ":TRACE:DATA? TRACE1", 19, 19)Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:42.057       Call Duration 00:00:00.000Status: 0 (VI_SUCCESS)
> 14.  viRead (TCPIP0::172.16.163.242::... (0x00000001), 0x000000001024B188, 16384, 0)> Process ID: 0x000007CC         Thread ID: 0x00001200> Start Time: 18:02:42.060       Call Duration 00:00:00.212> Status: 0xBFFF003E (VI_ERROR_IO)
15.  viStatusDesc (TCPIP0::172.16.163.242::... (0x00000001), 0xBFFF003E, "Could not perfo...e of I/O error.")Process ID: 0x000007CC         Thread ID: 0x00001200Start Time: 18:02:42.276       Call Duration 00:00:00.001Status: 0 (VI_SUCCESS)

 

0 Kudos
Message 1 of 2
(3,918 Views)

Hello TBerdon,

 

Could you let me know what version of NI-VISA you have installed? Some older versions of VISA caused this error because of closing the thread incorrectly.

0 Kudos
Message 2 of 2
(3,902 Views)