:SYSTem:ERRor:COUNT?
Instrument:
N1010A
N1000A
DCA-M
Meas. mode:
Scope
Eye
Jitter
TDR
Flex Apps:
FlexDCA
FlexRT
FlexPLL
Query Syntax
:SYSTem:ERRor:COUNT?
Description
Returns the string which is the number of errors contained in the error-message buffer. To return the "first in" error, use the :SYSTem:ERRor:NEXT?
query.
Requires FlexDCA revision A.05.30 and above.
Example Python 3.x Script
This script opens a session with FlexDCA running on the PC and sends two invalid commands that create two error messages. FlexDCA's error buffer is then queried for the errors.
import visa # import VISA library rm = visa.ResourceManager() FlexDCA = rm.open_resource('TCPIP0::localhost::hislip0,4880::INSTR') #HiSLIP FlexDCA.timeout = 20000 # Set connection timeout to 20s FlexDCA.read_termination = '\n' FlexDCA.write(':HAPPY:BIRTHDAY TODAY') # Illegal command for error! FlexDCA.write(':TIMebase:POSition 2.4E10') # out of range for error! error_cnt = int(FlexDCA.query(':SYSTEM:ERRor:COUNt?')) if error_cnt == 0: print('\n\tNo FlexDCA errors reported.') else: for i in range(0,error_cnt): print('\tERROR: ' + FlexDCA.query(':SYSTem:ERRor:NEXT?')) FlexDCA.write(':SYSTem:GTLocal') FlexDCA.close()