EasyManua.ls Logo

Keysight Technologies InfiniiVision 4000 X Series

Keysight Technologies InfiniiVision 4000 X Series
1762 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Status Reporting 41
Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide 1581
Example: Checking for Armed Status
# -*- coding: utf-8 -*-
# ********************************************************************
# This script using the Python language (http://www.python.org/) and
# the PyVISA package (http://pyvisa.readthedocs.org/) shows three
# methods to tell whether a Keysight InfiniiVision oscilloscope is
# armed.
# ********************************************************************
# Import modules
# --------------------------------------------------------------------
import sys
import visa
import time
# Initialization constants
# --------------------------------------------------------------------
# Get VISA address from Keysight IO Libraries Connection Expert
VISA_ADDRESS = \
"TCPIP0::a-mx4154a-60014.cos.is.keysight.com::inst0::INSTR"
GLOBAL_TOUT = 20000 # IO timeout in milliseconds
# ====================================================================
# Method 1: Query the Armed Event Register with :AER?
# --------------------------------------------------------------------
# This method reads the 1-bit Armed Event Register using the :AER?
# query.
#
# The Armed Event Register bit goes low (0) when it is read using
# :AER? or when a *CLS command is issued.
# ====================================================================
def method_1():
# Stop the oscilloscope.
KsInfiniiVisionX.query(":STOP;*OPC?")
# Method 1: Initiate capture using :SINGle
# ----------------------------------------------------------------
print "Acquiring signal (Method 1, using :SINGle)...\n"
now = time.clock()
# Clear all status registers before checking for new events.
KsInfiniiVisionX.write("*CLS")
# Because the :AER? query will not work with :DIGitize (which is
# blocking), use the :SINGle command to start the acquisition.
KsInfiniiVisionX.write(":SINGle")
# Method 1: Determine if armed using :AER? query.
# ----------------------------------------------------------------
# Define armed criteria.
ARMED = 1

Table of Contents

Related product manuals