Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1073807298 on VISA write

I'm experiencing the error 1073807298 when using the VISA write command. I'm trying to write and read data to a serial-to-USB hub connected to the PC. The phyical connection to the PC is via USB however the PC views the four ports on the hub as COM ports. When I make a call to VISA write, the data is successfully written and can be read without any problem, however the VISA write VI still returns with the 1073807298 error. I'm a little mystified by this as it seems to be functioning correctly and yet the error still occurs, indeed if I break the error path after the VISA write, the whole app works fine.

Any suggestions?

Thanks in advance.
0 Kudos
Message 1 of 22
(14,736 Views)
Just to be clear - is ViWrite returning the code 1073807298 or -1073807298? Positive numbers indicate a warning, while negative numbers indicate an error. It's often easier to conside these numbers in hex, which would make them:
0x4000FFC2 (warning) and 0xBFFF003E (error). If that's coming back as a positive number, that's outside of the scope of VISA warning codes, which all start with 0x3FFF. If it's negative, that error code is VI_ERROR_IO, "Could not perform operation because of I/O error." Now, I realize that that's not very informative, but let's start with confirming whether you're getting an error or a warning code.
0 Kudos
Message 2 of 22
(14,715 Views)
Sorry my fault. It is returning the -1073807298 and is coming up with an error not a warning. Basically the program falls over!

Thanks for that.
0 Kudos
Message 3 of 22
(14,711 Views)
So now that we know we're dealing with the VI_ERROR_IO error code, can you generate an NI-SPY log file and post it? this would help us a lot to see what's happening when you get that error.
0 Kudos
Message 4 of 22
(14,710 Views)
Here you go...

I ran the NI-SPY up to the point the error occurs on the VISA Serial Write vi. Basically all the rest of the code is a boolean cluster acting as a menu and Serial Reads to read acknowledgements from a remote system.

Hope this helps.
0 Kudos
Message 5 of 22
(14,695 Views)
It looks like your serial driver is not able to process the asynchronous reads and writes. I would suggest changing the VISA Write/Read VIs to synchronous.

How Do I Change VISA Reads and Writes from Asynchronous to Synchronous?

-Josh
0 Kudos
Message 6 of 22
(14,670 Views)
I am wondering whether this issue was resolved. I am experiencing the same issue.

Synchronous or Asynchronous writes both fail.

Did you find an adapter that supports NI-VISA?
0 Kudos
Message 7 of 22
(14,471 Views)
No - I've not managed to reslove it. At the end of the day I just broke the error path between the write and the read and it works perfectly. Very mysterious.
0 Kudos
Message 8 of 22
(14,469 Views)
I have determined that the Delorme USB<>Serial Adapter does not work with NI-VISA.

I have confirmed two USB<>Serial Adapters will work with NI-VISA.

The Belkin F5U109 which I purchased at Circuit City.

The Keyspan USA-19HS which I purchased at Comp USA.

I have tested these adapters on XP SP2 and WIN2K SP4.

Jim West
Summitek Instruments
0 Kudos
Message 9 of 22
(14,452 Views)
Hi Jim,

I just got an 8-port USB-Serial from VSCom. I've only had about an hour to experiment but so far, it looks okay. I'll update this if I find any issues.

Dennis
0 Kudos
Message 10 of 22
(14,432 Views)