Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I/O Error for USB-Serial on Win10

Solved!
Go to solution

We've got a device that uses a Cypress EZ-USB FX1 configured for CDC USB-Serial interface with the latest Cypress drivers. We're using NI-MAX with Switch Executive to interface with the serial device. I've setup the driver session to use a custom dll that uses the following settings:

 

VI_READ_BUF | VI_WRITE_BUF = 4096 bytes

VI_ATTR_WR_BUF_OPER_MODE = flush on access, same for RD mode

 

NI Spy shows that viOpen, setTimeout, set buffer sizes seem to work. Then we call a particular function implemented by the flashed FX1: setRelay(...), which elicits an I/O error having status 0xBFFF003E. (also, the relay gets set properly, I can hear the physical device switching, and the function returns nothing for the host to read).

 

However, doing the same thing manually in the VISA test panel works without error. Also, this used to work in Win7 with the old Cypress Win7 driver.

 

I've tried a bunch of stuff and haven't found an answer yet. Could someone here point me in the right direction?

 

Thanks

0 Kudos
Message 1 of 4
(347 Views)

Hey! Have you checked this link?

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6FmSAK

 

Other questions regarding this particular error suggest to just ignore the error. I don't think that's a good solution for this issue, so please let me know if the KB worked for you.

0 Kudos
Message 2 of 4
(300 Views)
Solution
Accepted by topic author Tom_R

Thanks for sharing the KB, I checked those issues and didn't find a fix there.

 

What ended up working was switching from formatted I/O (like viPrintf()) to direct I/O (like viWrite()). That seemed to work. I have no idea why.

 

For what it's worth, I called setBuffer on all buffers, read/write and formatted/direct.

 

I am happy that it works now, but not sure why it worked under Win7 but not Win10. If anybody knows or has a hunch then I'm still open to hearing more about why this happened.

0 Kudos
Message 3 of 4
(283 Views)

Hey, I'm glad you were able to make it work. Unfortunately, I don't know why that was the solution but if you can mark your comment as solution we can help people that might experience this in the future =)

0 Kudos
Message 4 of 4
(271 Views)