Looking for the proper way to Query the Status Operation Register on my MXA . I want to poll the MXA after incrementing or decrementing my Video Trigger line to Find out when it triggeres on a signal in Zero Span Mode?
I know it is Bit 5 but I am not sure i am setting and reading it correctly
Thanks
Joe
I know it is Bit 5 but I am not sure i am setting and reading it correctly
Thanks
Joe
......
viVPrintf(N9020A,"*CLS" & VbLf,0)
viVPrintf(N9020A,"*ESE 5" & VbLf,0) ' set status register #5, return a logic level 1 if there are a triggeg sweep.
viVPrintf(N9020A,":INIT IMM" & VbLf,0)
viVPrintf(N9020A,":*OPC" & VbLf,0)
space(buffer$)=3
startCHRONO=timer
DO
viVPrintf(N9020A,":*ESR?" & VbLf,0)
status=viSCanf(N9020A,"%t",buffer$) ' TRIG is the value of status register bit 5
TRIG=val(buffer$)
if timer >startCHRONO +1 then EXIT DO ' 1 for 1 sec timeout. If there are no TRIG value =1, exit loop and change trig level (main program) and retry.
LOOP UNTIL TRIG=1
EXIT FUNCTION