04-16-2018 12:47 AM
When using VISA Open to connect to a Tektronix AFG2021 function generator, occasional errors are generated. It works fine 90% of the time but the remaining 10% reports errors such as:
-1073807297 A format specifier in the format string is invalid.
-1073807343 Insufficient location information or the device or resource is not present in the system.
-1073807360 Unknown system error (miscellaneous error).
-1073807229 Invalid length specified
-1073807302 Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state)
Occasionally the code will hang inside VISA Open and requires Task Manager to close LabVIEW.
I am using the 64 bit version of LabVIEW but I have tried the 32bit with similar results. I have also tried installing on another PC and upgrading the firmware on the instrument with no improvement. In the past I have had success communicating with a Tektronix AFG1022 function generator with no issues.
I suspect that there could be some sort of driver issue but I really don't know where to start. When the instrument is plugged into the USB for the first time Windows reports that the device is not recognized but if I search for a driver online, a suitable one is found and device appears as a "USB Test and Measurement Device" in device manager. MAX finds the instrument however it reports the AFG2021 as unknown model and manufacturer. Is there a way I can verify that the correct driver is being used?
System Info:
LabVIEW Full 2017 f2
Windows 7 Professional
AFG3000 series driver available from NI website
NI VISA 17.5
Thanks,
David
04-17-2018 12:49 PM
Hi dreeves73,
On this link you will see how to use plug-and-play 3rd party instrument drivers with LabVIEW: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P72KSAS
And on this link you will find the drivers for this specific Tektronix device:
http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=20367
Please try installing the drivers with that information to see if that way you can get rid of the error.
04-24-2018 01:33 AM
I tried uninstalling and reinstalling NI VISA 17.5 (recommended by Tektronix technical support) and also the specific drivers you have linked but the errors persist! The Find Instrument Drivers tool is able to detect the AFG2021 when connected and points me to the correct driver to install. I'm not sure what to try next. Has anyone else had any success with this particular instrument?
08-15-2018 03:46 AM
Hi, did you get anywhere with this? I have just had a customer query from someone using some code we supplied to control a system which uses a tek AFG3022B and reporting a similar error code being generated (-1073807297) I dont have one here to play with though!
Thanks
Paul
08-20-2018 01:36 PM
A couple of notes when we had a similar issue connecting through USB:
Once you perform these two tasks, it should operate properly and now be seen in MAX.
09-03-2018 12:06 AM
Hi Paul,
Unfortunately I didn't get any further with this issue. I can only suggest you use a different function generator that doesn't use the AFG3000 series VISA driver. I have had no problems with the AFG1022 but this is an entry level instrument and it doesn't have all the features I need. Let me know if you know of any mid to high end arbitrary function generator that does work with LabVIEW and I can ditch this Tektronix unit.
09-03-2018 12:18 AM
Thanks for you suggestions Minions but I couldn't get it to work. After installing the Tektronixs software I couldn't see a way of updating the the driver in Device Manager. Windows always insisted that I already had the latest driver installed. I found a useful Tektronix utility "VSC_UI.exe" in "C:\Program Files\IVI Foundation\VISA\Win64\TekVISA\Bin" that allows you to select either the NI VISA driver or the Tektronics driver. When I selected the Tektronix driver only, MI MAX and my LabVIEW program couldn't find the instrument. So unfortunately no luck.
09-03-2018 04:04 AM
We tend to use Keysight 33500 series devices which generally work well. We tend to need higher end devices for bandwidth rather than fancy features.
I've not used LabVIEW to interact with any of the Arb functions, but I think a colleague here has with some success.
Thanks
Paul
09-04-2018 01:26 AM
I may have stumbled across a workaround to this problem of intermittent VISA Open errors. AVOID CLOSING THE VISA SESSION FOR THE INSTRUMENT! Remove any "VISA Close" from your code and make sure "Tools->Options->Environment->Automatically close VISA sessions" is turned off.
I've only been testing for 15mins or so but no weird errors so far. I suspect there is a bug in the VISA Close code that is causing problems with the AFG3000 series instruments over USB.