Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

viread tcp

I am attempting to use VISA to interface with a machine running vxWorks and a windows machine, both using tcpip::Socket. Using ViWrite works fine on both machines, but when I try to use viRead I get "VI_ERROR_IO". However, when I set up a VI_EVENT_IO_COMPLETION and use the ViReadAsync, it works fine. I really need to do synchronous reads, though. The sample TCP/IP code works fine (connecting to the ni.com FTP port) and I'd like to be able to do reads like that. Any clues?
0 Kudos
Message 1 of 3
(4,006 Views)
Hi,

I have searched through our database for known issues and I couldn't find any. It is really strange that you can communicate to the ftp site, but you can't use the same functions to access the VxWorks system, assuming that this system is using the standard socket functions.

At the moment at don't have any ideas, but I suggest you post this message on the VISA discussion forum. The Ethernet forum is more orientated towards Distributed I/O communication (FieldPoint). By posting on the VISA disccussion forum, you might get more suggestions.

DiegoF
National Instruments.
0 Kudos
Message 2 of 3
(4,006 Views)
I found the error, my buffer size was too large. When I reduced the size to be the same or smaller than that sent by VxWorks, it worked fine, but whenever I had it set larger, it would give me the I/O error.
0 Kudos
Message 3 of 3
(4,006 Views)