Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA write error -1073807246 only when compiled

Hello,
 
I am having a strange problem communicating using the NI USB-485 converter.  When I run my vi,
everything communicates with my microcontroller just fine, but when the vi is compiled into
an .exe, I get the above error code (-1073807246) and no bytes sent out through the port.  I have tried
with both synchronous and asynchronous modes of communication and either one generates the same
error, but only in the built app.  I am running LV8.5 and have just installed the app builder.  I can pare down
and send the code and the compiled app if necessary.
 
Thanks,
Kevin
0 Kudos
Message 1 of 3
(3,853 Views)
Howdy squidmixer,

Error code -1073807246: The resource is valid, but VISA cannot currently access it typically indicates that the VISA port is in use by another application. You want to verify that no other programs are running that try to access the specified serial port before running your executable. Also, ensure that you end all of your VISA tasks using VISA Close, and this should fix the issue.


Warm regards,

pBerg
0 Kudos
Message 2 of 3
(3,834 Views)

It seems a little inefficient, but now I'm initializing and closing the comport each time I set or query my hardware.  The error is gone.  Thanks.  Strange that it only appears when built into an executable and not when the vi itself is run.

0 Kudos
Message 3 of 3
(3,793 Views)