From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA timeout when written to programatically, same commands work from IO tab in VISA Test Panel

Solved!
Go to solution

When I send information to my VISA device through the VISA Test Panel, I receive the proper responses, but when I try to write through the VISA vi's in LabVIEW I receive timeout errors. 

Capture.PNG

Can anyone tell what I'm missing? Or something I can do to troubleshoot? Any help is appreciated.

0 Kudos
Message 1 of 5
(2,267 Views)
Solution
Accepted by topic author reesl

What is the display format for the VISA Write constant?

 

My guess is you have it set for Normal display rather than \codes display and are thus sending a backslash and an "n" rather than a line feed character.

Message 2 of 5
(2,225 Views)

This was part of the solution. Also needed to add a delay, as without it the device didn't have enough time to write a response.

 

Thanks!

0 Kudos
Message 3 of 5
(2,206 Views)

Must be a rather slow device if it can’t respond in 1000ms. Although the CLS might do some sort of reset which might take some time. You could instead of sprinkling your code with delays also increase the Timeout that you explicitly initialize anyways.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(2,144 Views)

I originally tried cranking the timeout up to 5000ms, but it didn't help. After you last response I'm starting to wonder if my diagnosis was perhaps incorrect.

0 Kudos
Message 5 of 5
(2,112 Views)