Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication doesn't always work

Hi

I wrote the attached VI and it sometimes works and sometime doesn't

the error msg I get is:

"Error -1073807246 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->4 boat switching.vi

Possible reason(s):

VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it."

 

I would appreciate any idea about how to avoid this error

 

Thanks

Shai

0 Kudos
Message 1 of 3
(3,329 Views)
The error (as a search would have shown), typically occurs when another program, such as Hyperterminal is accessing the port.
0 Kudos
Message 2 of 3
(3,319 Views)
I can see two possible issues with your code.  First the flush buffer command will return as soon as the flush command is sent I would look at adding a small delay after the call to allow the buffer flush to complete (jiggle the handle).  second, and more likely, the coersion from I32 to U8 may be cause loss of data with some of your inputs.  Do you really need 2^33-1 possible inputs when you can only have 2^17-1 possible strings?  how many realistic input values will you use?

"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(3,308 Views)