From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA: (Hex 0xBFFF003E) Could not perform operation because of I/O error

Hello

I'm trying to communicate with a device which have to be tested with my application. So I send it a command to initiate the device to send me back some values. This values are sended continously with a baud rate of 57600.

I create a VI to test this communication but I always get the error:

VISA:  (Hex 0xBFFF003E) Could not perform operation because of I/O error

 

I have googled for this thread, but all the described solutions didn't solve my problem (ex. Set Buffer Size to 48, Various Byte Count Values for the VISA Read function, etc.).

 

Note: the VI works properly in the LabView 6.1! I have tested. I also tried to receive the Data with a Termial programm (works fine). But another COM Port (on an USB Serial converter) shows me the same Error.

 

I just updated to Visa 3.4.1, but no success

LabView 8.0.1

Message 1 of 6
(10,233 Views)
I've dealt with a very similar problem just yesterday...

You have to set the serial buffer size to something around 4096.  The "48" refers to the buffer mask you need to use, not the size of the buffer.

You also have to avoid using the "flush serial buffer" function with a buffer mask of 32, this will not work.

I have had these problems with a MOCA NPort 1240, and after removing the "flush buffers" command and setting the buffer sizes, everything's running fine.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 6
(10,222 Views)
Yeah it worksSmiley Very Happy
 
of course buffer to 4096 and mask to 48
 
I added a Flush I/O buffer (mask 16) before reading from Visa (problem was to read data).
And suddenly it works fine.
I can't reproduce where the error exactly was. Could it be possible that the RX buffer was already full
at the time I would to read from Visa or at the time the COM port received data? There are some questions to find out:
how does LV handle the buffers? will the buffers be cleared if LV starts? when does LV flushes the
buffers?
thx
Message 3 of 6
(10,208 Views)
I think regarding my problem the unit had zero byte buffer in one direction.  Without explicitly generating a VISA buffer, the thing wouldn't even read or write.

Using this trick it works OK, even if it's only a workaround for a problem which shouldn't really exist.....

Glad you got it working.

You can flush the receive buffer AFAIK. Flushing the send buffer seems to be problematic.  Since you can't flush it, you can't clear it either I guess.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 6
(10,195 Views)

Hi, I have set VISA Set I/O Buffer Size(48,4096)  before write and read function, but the problem still exists, can you give me some advice?

Thank you very much!

0 Kudos
Message 5 of 6
(7,070 Views)

Hello! Have you solved the problem?

I meet this problem now,could you give me some advice,thank you very much!

0 Kudos
Message 6 of 6
(4,319 Views)