Can you give us some more details, why you want to press the ESC key by using a SCPI command? Which result do you want to achieve by pressing the ESC key?
Depending on your situation, there may be better SCPI commands to achieve what you want.
Thank for your kind reply. I send many SCPI commands (eg. :FREQ:CENT, :FREQ:SPAN, :BAND) to N9010A via LAN. The N9010A receives the commands and applies new settings. After this I can't use the web interface as you can see below:
You save sent commands to the N9010A over a VISA/LAN connection. Did you close the VISA/LAN connection before you start to use the web interface? I can imagine that the N9010A is still in 'Remote' mode if the VISA/LAN connection is not yet terminated.
No, I didn't. I confirm you that the SA is still in Remote mode. I am using the LAB::Instrument (Perl module) , but I don't find the function to close the connection. So, is there a SCPI command to solve the issue?
I have no experience with the LAB::Instrument module. However I'm suspecting that you should destroy the Instrument object that you are using. When you destroy the Instrument you are using, it will close the VISA connection.
The source of LAB::Instruments contains:
sub DESTROY { my $self=shift;
if ($self->{config}->{isIsoBusInstrument}) { # we dont actually have to do anything here :) } else { my $status=Lab::VISA::viClose($self->{instr}); $status=Lab::VISA::viClose($self->{default_rm}); }; }
The Lab::VISA::viClose, will close the VISA connection, which will very probably put the N9010A back in Local mode again.
I confirm you that I close the connection with the command of the Lab::VISA module
$status=Lab::VISA::viClose($instr);
because the command of the Lab::Instrument doesn't works (I have asked help also the Lab::Instrument developer). The Lab::VISA::viClose command closes the VISA connection but it doesn't put the N9010A back in Local Mode. Does it exist a SCPI command to make this?
I do have another question at this moment. What is the firmware version that is being used in your N9010A? Do you already use the latest A.07.06 version? I know there have been problems with earlier firmware versions regarding the 'Lock' and 'Remote' states.
I'm currently having a N9000A on my desk, which can be controlled correctly, and which switches back to local mode when the connection is terminated. We are not sending any additional commands to set it back into local mode.
I confirm you that I am using the A.03.08 version. The result of the command
*IDN?
is "Agilent Technologies,N9010A,MY49060939,A.03.08" I have solved the issue rebooting the Swept SA application, installed on the instrument. After this restart everything works and I don't need to close the connection. Thank you for your support.
Can you give us some more details, why you want to press the ESC key by using a SCPI command?
Which result do you want to achieve by pressing the ESC key?
Depending on your situation, there may be better SCPI commands to achieve what you want.