01-15-2015 01:57 PM
I using labview to send commands to a tektronix AFG 3022 function generator. My VI uses a for loop to increase the frequency by for example .25 kHz (starting at 1 kHz) every second for 15 seconds. Every couple of iterations of my loop, one of the error codes I have attached below pops up (stopping the loop) and references that the error occurred at VISA Open in the Initialize VI. This Initialize VI comes from the instrument driver for the AFG3000 series of function generators.
I am unsure whether the error is with the VISA Open function or the Initialize VI. If the error is due to the VISA Open function, then does that mean there are communication issues with my function generator and the Dell laptop I am using?
What I have tried:
-different USB 2.0 cords
-updated the USB Root Hub driver
-made sure the box in USB Root Hub properties saying "allow this computer to turn off this device to save power" is not checked
-put a 2 second wait function before VISA Open
I will now try to run the VI on a different computer and will update on how it goes.
Here is the Initialize VI:
Solved! Go to Solution.
01-15-2015 02:25 PM
Get that initialize vi out of any loop!
Init once and once only (or you risk the instrument's firmware being in an odd state)
01-15-2015 02:52 PM
I just found the issue. It had to do with the driver's error out VI, which had a close visa function. Therefore, the constant closing and reopening of the visa generated the errors. I also moved the initialize VI out of the loop(as you suggested) just to be safe. Thanks anyways.