Hi,
I have spent already considerable time with the Keysight Literature and below VEE example but I still do not get how to manage the sync with the SA while the full alignments are being run.
As soon as I send the CAL:ALL command to my SA, the box will not react to any other sequential commands as long as the Alignments are running. Depending on the box, this may demand some minutes.
One "dirty" way of doing this, is to increase the time out of the interface accordingly before sending CAL:ALL.
In this way, I can send afterwards a sequential command such as OPC? to monitor the end of the Alignments.
But this requires to know in advance how long my Alignments will take, so that I can set up the time out upfront.
Other two possibilities are to set an interrupt method or to serial poll the status byte.
After having run several tests and having read quite a lot, I am not able to understand how to implement the second method which is normally described everywhere as spoll.
Could somebody help?
Thx
You're right, once you send the calibration command the instrument will not respond to any other command, but it will respond to a serial poll. I have used the serial poll just as the example shows in VEE, but I usually do it another way.
What I do is shorten the timeout then send the :CALL:ALL? query. I then have a loop that queries the response with an error bailout that will go to next for the loop when it times out. It goes through the loop until it finally responds. I then reset the timeout and move on.
This way you don't have to try to figure out ahead of time how long it will take. It will return a 1 or 0 with the status of the calibration when it's done. I also sometimes set a timer or counter in the loop for something beyond what I think it should take so that if it doesn't come back I won't be stuck in the loop forever.
Also, have you tried the :CAL:EXPIRED? query?
Regards,
Mike