11-29-2017 12:16 PM
I am using drivers Agilent 3352X Series.lvlib for the waveform generator 33521B from Keysight.
First I am initializing the instrument with the VI "Initialize.vi". After some measurements I am closing it.
Sometimes when I would run the "Initialize.vi" again it hangs up for a minute and then comes back with timeout error.
Anyone that has seen the same problem?
Solved! Go to Solution.
11-29-2017 12:21 PM
11-29-2017 12:46 PM
Yes, it is connected with the USB and the power saving is not active.
11-30-2017 10:51 AM
Does the instrument give you an error? Do the Initialize.vi 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 Close.vi? 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 - https://helpdeskgeek.com/how-to/prevent-windows-from-powering-off-usb-device/
Craig
11-30-2017 12:22 PM
No, the instrument doesn't give me an error but LabView does in the Initialize.vi (timeout error).
I am using the Close.vi.
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.
11-30-2017 02:22 PM - edited 11-30-2017 02:31 PM
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.
Regards,
Jose F.
11-30-2017 03:45 PM
In your code you use VISA close in one case. Just use the driver "Close.vi" and make your logice such that there is only one way to get there.
Craig
12-07-2017 06:39 PM
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 Initialize.vi
Error -1073807339 occurred at VISA Read in Agilent 3352X Series.lvlib:InitializeWithID.vi->WFG_Instrument.vi
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.
12-07-2017 09:46 PM
Post the code you are running so I can see what you are doing.
12-08-2017 08:46 AM
Well, the original Initialize.vi 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 Stop.vi, you don't know in what state this will leave the instrument. Also note that the Close.vi always execute even when there is an incoming error and that the CLose.vi is called in the Initialize.vi when there is an error so it is useless to call it in your error case.
Ben64