Showing results for 
Search instead for 
Did you mean: 

Keysight Waveform generator 33521B hangs up

Go to solution

I am using drivers Agilent 3352X Series.lvlib for the waveform generator 33521B from Keysight.

First I am initializing the instrument with the VI "". After some measurements I am closing it.

Sometimes when I would run the "" again it hangs up for a minute and then comes back with timeout error.

Anyone that has seen the same problem?

0 Kudos
Message 1 of 14

If it is connected with USB have you disabled your PC power saving mode?

(If not never mind)



0 Kudos
Message 2 of 14

Yes, it is connected with the USB and the power saving is not active.

0 Kudos
Message 3 of 14

Does the instrument give you an error?  Do the give you an error?  


Why not post your code and we can see if there's a problem in the code that causes the error?



When you say close, are you running the  If the instrument has received commands and you then terminate the program with the LabVIEW Stop icon you are leaving the instruments in an indeterminate state. Perhaps its waiting to receive data and ignore the next request. 


I'll echo you should check power settings for USB.  That one has hung me up a few times. The steps to disable it are here -



0 Kudos
Message 4 of 14

No, the instrument doesn't give me an error but LabView does in the (timeout error).

I am using the

If it is a problem with the USB power setting, why does it always work the first time every time?

I'll post the important part of my code here.

0 Kudos
Message 5 of 14

Hi hasse,


Are you familiar with Measurement & Automation Explorer (MAX)? Let's try to use VISA Test Panel and see if you get the same behavior. If not, probably the issue comes from the code.



Jose F.

0 Kudos
Message 6 of 14

In your code you use VISA close in one case.  Just use the driver "" and make your logice such that there is only one way to get there.33521b.png





0 Kudos
Message 7 of 14

Hi Craig,

I've tried your suggestion and it is still the same problem.

The code runs fine the first time and after close there is no error.

Next time I run the VI it will be stuck inside the

Error -1073807339 occurred at VISA Read in Agilent 3352X>

Possible reason(s):

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.


After that I turn off/on the instrument and everything works for one more time until the timeout happens.

0 Kudos
Message 8 of 14

Post the code you are running so I can see what you are doing.

0 Kudos
Message 9 of 14
Accepted by hasse

Well, the original from the 3352X library have a timeout of 10 sec and is set to read back 256 bytes of data from the *IDN? query. Your modified vi have a 5 sec timeout and is set to read back 1024 bytes. The reduced timeout is probably the cause of the timeout error (the comm probably use an END character so the increased bytes to read probably have no impact). After powering up the buffers are empty so the clear function executes rapidly, after a run it may take longer to execute.


Also never us the, you don't know in what state this will leave the instrument. Also note that the always execute even when there is an incoming error and that the is called in the when there is an error so it is useless to call it in your error case.



Message 10 of 14