03-24-2024 03:28 PM
I have a Tektronix AFG320 that I would like to talk to using GPIB with a GPIB-USB-HS interface. It appears up to date drivers are no longer available. At least I haven't found them. Dod I miss them? If not, what is the best way to interface to these instruments in the Community edition of LabView (Version 2022 Q3 (32-bit) 22.3f0? The last time I did any programming with GPIB was back in 2005. It seems much has changed in the last twenty years. Just trying not to reinvent the wheel and am looking for general guidance on the best way to proceed.
Solved! Go to Solution.
03-24-2024 09:40 PM
Since the advent of VISA drivers, how you control GPIB has remained the same. Either someone created the VIs for standard functionalities of the instruments using the VISA library (typically the instrument manufacturer), or you will have to create them from scratch using the instrument's SCPI reference.
Google found two versions of drivers right at the top (not sure what you mean by you haven't found them)
https://www.tek.com/en/support/software/driver/afg300-series-labview-driver
03-24-2024 11:47 PM
Santhosh,
Thank you for your reply. I have found and installed both of these drivers into the instrument driver libraries.
When I run the tektronix version (from 2005) I get a message the drivers are to old to convert. I read (and assume) the drivers must be converted to an intermediate version of LabView before I can convert them to the 2022 version of LabView. This is not encouraging as I am using the Community version of LabView and am not at all sure I can load an earlier version (8.2.1 is recommended) but will attempt this if necessary.
I have the NI drivers in the IVI directory. Somehow LabView knows I am using a AFG320 which is encouraging. But I find no example programs to try the IVI drivers out. (I can use the GPIB drivers which do work but means I must program everything pretty much from scratch.) So I'm writing something from scratch without anything that I can work from. I thought surely there must be a simple example program that I can work from but so far haven't had much success.
Long story short, all paths sound like an awful lot of work. I've spent way too many hours spinning my wheels downloading drivers and example vi's that so far haven't worked. Hence my question of how best to proceed: try to convert the old 2005 drivers or work with the IVI drivers, forego the IVI and instrument drivers and write my own functions using the GPIB drivers or is there another path I've missed?
Sage advice is most welcomed.
Dan
03-25-2024 07:26 AM
You can use the Version Conversion board to get help in upgrading the drivers to the latest LV-compatible version.
https://forums.ni.com/t5/Version-Conversion/bd-p/VersionConversion
03-25-2024 07:30 AM
If you are capable of programming the AFG320 by the front panel, then you can control the instrument using the SCPI Protocol. It is fairly simple at this point:
03-25-2024 11:50 AM
It seems there are several issues that I had difficulty separating. Most significant was the com port (GPB channel?) bot being released when the program stopped on an error. This prevented me from successfully writing or reading to the instrument the next time I ran the program. Rather than clicking on the link in the error message to find out what the error was about I just assumed (I so hate that word) I had something wrong in the VISA GPIB Resource string. Nothing like paying attention to detail. I'm a little concerned as with the port already opened I should be able to write to the port again but I will save that problem for another time.
I'm sure there will be other issues as I move forward. It's been a few years since I've done any LabView programming. It is so nice to have someone to seek help and assistance from. I truly appreciate the comments and advice from the forum.
03-25-2024 12:13 PM
@Danl_B wrote:
It seems there are several issues that I had difficulty separating. Most significant was the com port (GPB channel?) bot being released when the program stopped on an error. This prevented me from successfully writing or reading to the instrument the next time I ran the program. Rather than clicking on the link in the error message to find out what the error was about I just assumed (I so hate that word) I had something wrong in the VISA GPIB Resource string. Nothing like paying attention to detail. I'm a little concerned as with the port already opened I should be able to write to the port again but I will save that problem for another time.
I'm sure there will be other issues as I move forward. It's been a few years since I've done any LabView programming. It is so nice to have someone to seek help and assistance from. I truly appreciate the comments and advice from the forum.
One nice thing about VISA is that it will allow you multiple closes without error. This means that you can always perform a close prior to an open if you fear that your program may not have closed the communications stream properly.
03-25-2024 03:03 PM
Sounds like sage advice. I will eventually be controlling several instrument so closing the communications channel will be prudent.