AnsweredAssumed Answered

OPC bit and overlapped commands + E8363B

Question asked by b.d.hall on Mar 8, 2011
Latest reply on Mar 9, 2011 by Dr_joel
I'm having trouble controlling a PNA E8363B with the overlapped command 'SENSE1:SWEEP:MODE GROUPS'.

I am sending the command and then using the OPC bit in the Standard Event Status Register to let me know when the command is complete.

Before sending the command, I set the Standard Event Enable Register with '*ESE 1',to pass the operation complete flag event to the status register. I then send the command to the PNA and poll the status register. I have checked the state of the event register immediately before I send the command and it is fine. The status register is fine too.

However, what happens is this. When I send '*OPC;SENSE1:SWEEP:MODE GROUPS;', the PNA sets the OPC bit in the event status register immediately, which is passed through to the status register bit 5. So, my code does not wait as it should.

A slightly different approach works. I can send the query OPC command: '*OPC?;SENSE1:SWEEP:MODE GROUPS;' and sit waiting for the message available bit in the status register to be set. This does wait until the command is complete.

Perhaps I've misunderstood how to use the OPC bit. However, my approach does work with the HP8753, so it must be nearly correct. Is there something else that I should be doing, or is the OPC bit not suitable in this case on the PNA?

I have the A.07.50.37 version of the PNA application code.  

Outcomes