02-04-2017 12:40 PM
Hello,
I am using Excel VBA for instrumentation with visacomm. I have sissues taking back the instruments to local mode after completeion of the data collection. For example, the bleow code is for Recalling a state keysight power meter N1912A and move to local mode. For some reason this is not taking back the power meter to Local mode.
Dim PMO As VisaComLib.FormattedIO488
Set PMO = New VisaComLib.FormattedIO488
Set PMO.IO = ioMgr.Open("PMO")
PMO.WriteString "*RCL 4"
PMO.WriteString "SYST:LOC" <As per manual this command takes back to Local mode
PMO.IO.Close
Set PMO.IO = Nothing
Thanks,
Leyo
02-06-2017 01:15 PM
What NI drivers are you using? If you are using NI 488.2, ibloc() looks like it will take the instrument back to local mode.
http://www.ni.com/white-paper/3847/en/
02-06-2017 08:14 PM
Thanks. The Ibloc commnad work with GPIB communications. In my case I am talking to instruments from excel VBA using visa.comm. I am looking for a method to make the instruments local in this method.
Leyo
02-07-2017 02:05 PM
I found the following document discussing Excel VBA and VISA COM, is this what you are working with?
You may want to follow up with the creators of VISA COM for questions on local mode.