Hi Keysight Forum.
I have a PNA-X 5242A.
I have a question regarding the syncronization when using the "Recall State" command such as MMEM:LOAD.
I always recall a .CSA State (so it includes the CalSet).
I need to know when the Recall is finished.
I read this section in the help :Synchronizing the Analyzer and Controller
According to this, the MMEM:LOAD command belongs to the "Sequential Commands", so in this case I should use the *OPC? query.
In case of commands that take very long time (Overlapped Commands) there are other methods (such as *OPC and *ESR?)
My problem is that in some cases the MMEM:LOAD commands take some seconds (between 5 and 10). This happens when I need to perform Pin/Pout measurements. We have sometimes 30 or 40 channels.
First channel is a frequency sweep.
All other channels are CW Power sweeps.
Then I have the following problems:
1) If I use the *OPC?, i get an error from my controller because the "Read Data" Timeout get expired.
I know I could increase the timeout but I know this is not the best practice.
2) I can not use the *OPC and *ESR? commands because the MMEM:LOAD commands is not an "overlapped" command.
The only "solution" I found is to use a wait function, but I know this is not good because I could be too much when not needed or not enough whenever I increase the number of channels.
Is there any other syncronization solution when a sequential command takes long?
Thanks in advance
Sergio
Hello,
The use of a *OPC? with an increased timeout is a valid approach in this situation. You could consider a 30 second time out setting before the MMEM:LOAD and once the *OPC? returns a "1" on the output buffer indicating the recall is complete then decrease the timeout back to the standard 5s or 2s, whatever is appropriate.
The PNA supports a *WAI which is a hold-off without the "1" return a *OPC? provides. This too would require an increase in the timeout, else an error would be thrown.
I suspect a *OPC (no question, i.e. not a query) would work with a mask of the OpComplete Bit and a polling on the related *ESR? which would loop with 0 and then return a 1 when complete. Seems like a lot of work to avoid a temporary increase in the default time out.
Below is a snippet for a Single Sweep detection via *OPC and an ESR?. I do not have a PNA connected to test this approac for a long MMEM:LOAD 'yourFileNameHere.csa' recall.
Sincerely,
tsilchia