Spudnick Posted January 30, 2015 Share Posted January 30, 2015 (edited) Hey, I'm working with an Aligent Oscilloscope. Now I wanted to control it from my PC via Autoit and I found out, that the Visa.au3 is alredy included. But the help is just something about GPIB and TCP/IP. I already foud out about the adress of my device: USB0::0x0957::0x0588::cn49302469::0::INSTR Using the Software "Agilent IO Control" it is possible to control the device with the build in "Interactive IO" I tried to use the code given by the example, but it dosn't connect #include <Visa.au3> MsgBox(0, "Step 1", "Open the instrument connection with _viOpen") Local $h_instr = _viOpen("USB0::0x0957::0x0588::cn49302469::0::INSTR") MsgBox(0, "Instrument Handle obtained", "$h_instr = " & $h_instr) ; Show the Session Handle ; Query the instrument MsgBox(0, "Step 2", "Query the instrument using the VISA instrument handle") Local $s_answer = _viExecCommand($h_instr, "*IDN?") ; $h_instr is NOT A STRING now! MsgBox(0, "GPIB QUERY result", $s_answer) ; Show the answer ; Query again. There is no need to OPEN the link again Does anybody know how to make it working self-sufficient with autoit Edited January 30, 2015 by Spudnick Who needs USA... we already got USB :shifty: Link to comment Share on other sites More sharing options...
jchd Posted January 31, 2015 Share Posted January 31, 2015 Can't answer your precise question. All I had working some time ago was using National Instrument software and device drivers to manage a GPIB-ENET network (VISA interface). I have zero experience with Agilent software but normally VISA is build for abstracting the connection layer. Are you sure you don't miss a driver layer in your setup? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Spudnick Posted February 2, 2015 Author Share Posted February 2, 2015 I think if there is a driver missing it's missing in my script, because with the original program is working fine. Is that what you mean? Untill now i wasn't able to get a working connection. If the oscilloscope is getting any order by USB it is changeing to the remote mode, but it still doesn't if I run my script. Does it make a difference if I am working on a 64 or a 32 bit system? So I have a 64 bit win7 PC. I already changed the .dll in the Visa.au3 from visa32.dll to visa64.dll. I have verified that both are there in the system32 Folder. With the "32.dll i get the errorcode -2. With the "64.dll i get a -1 error. Who needs USA... we already got USB :shifty: Link to comment Share on other sites More sharing options...
jchd Posted February 2, 2015 Share Posted February 2, 2015 I'm afraid that my poor experience isn't helpful in your case. When compiling for 32-bit then use the 32-bit dll in system32. That should be working since drivers are available. Sorry I can't give you useful advice here. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
OscarBui Posted August 19, 2019 Share Posted August 19, 2019 I am trying to program the DM3068 DMM as well. The NI Visa Interactive Control can read/communicate with the device. With Auto it I always get error The device string is USB0::0X1AB1::0X0C94::DM3O204900762::INSTR Please help Link to comment Share on other sites More sharing options...
OscarBui Posted August 19, 2019 Share Posted August 19, 2019 2 hours ago, OscarBui said: I am trying to program the DM3068 DMM as well. The NI Visa Interactive Control can read/communicate with the device. With Auto it I always get error The device string is USB0::0X1AB1::0X0C94::DM3O204900762::INSTR Please help Problem solved. All I have to do is issue an DllOpen("visa32.dll") and the error went away. I am using windows 10 and the latest Autoit versiond Link to comment Share on other sites More sharing options...
jchd Posted August 19, 2019 Share Posted August 19, 2019 Oh yes, you need to load the DLL before use. I missed that obvious point in your sample code. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now