Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing to Local mode

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

 

0 Kudos
Message 1 of 4
(5,366 Views)

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/

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 2 of 4
(5,307 Views)

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

0 Kudos
Message 3 of 4
(5,304 Views)

I found the following document discussing Excel VBA and VISA COM, is this what you are working with?

http://www.keysight.com/main/editorial.jspx?cc=US&lc=eng&ckey=474172-1-eng&nid=-536900124.0.02&id=47...

 

You may want to follow up with the creators of VISA COM for questions on local mode.

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 4 of 4
(5,286 Views)