AnsweredAssumed Answered

How to read status registers for limit tests from PNA5230A

Question asked by vmarrero on Dec 9, 2009
I am using a 4-port PNA 5230A and I am trying to implement a code that I found that will perform a sweep, wait until the sweep is done, then check if the limit test for each trace pass or fail.
In my case the PNA will have 4 VSWR traces with 4 limit tests.  What I want to do is check them remotely and if the sweep shows a failure save the data.

How do I expand the following code to the be able to read the register the other traces/limits?

Any help is appreciated, especially any document explaining how the following code works.

The following is a part of the code where I check the active trace (in this case 1 trace) and verify the limit test status.

// Clear status registers
// Clear the Sevice Request Enable register
VISAWrite("*SRE 0");
// Clear Standard Event Status Enable register
VISAWrite("*ESE 0");
// Enable questionable register, bit(10) to report to the status byte
// Enable the staus byte to register bit3 (weigth 8) to notify controller
VISAWrite("*SRE 8");
// Take one sweep and update display
opc = VISARead();
// Check waht failed in the analyzer....could make a function out of this!
opc = VISARead();
rgstr = atoi(opc);
// If yes, then was it the questionable register?
if (rgstr > 0 || rgstr < 0)
     // determine if the limit1 register, bit 8 is set
     opc = VISARead();
     rgstr = atoi(opc);                              
     // If yes, was it trace 1?
     if (rgstr = 1024)
          opc = VISARead();
          rgstr = atoi(opc);
          if (rgstr = 2)
               flag = flag + 1;
               cout<<"Limit Line 1 Failed!!\n";
Thanks for your time.