Fact 3. How to Start a Program
Always start your programs with the commands shown in the following listing. Use the *RST
common command to initialize FlexDCA, FlexRT, or FlexPLL to a preset state. The :SYSTEM:AUTOSCALE
command is very useful on unknown waveforms as it automatically sets up FlexDCA's vertical channel, time base, and trigger level. A typical instrument setup configures the vertical range and offset voltage, the horizontal range, delay time, delay reference, trigger mode, trigger level, and slope. Notice that the :SYSTem:DEFault
and :SYSTem:AUToscale
commands should be followed by an *OPC?
common query.
- Try the example Python programs.
Additional example programs are provided for C#.NET, Labview, Matlab, and Python. Look in the installation folder: \Keysight\FlexDCA\Demo\Example Programs
The following command snippet demonstrate starting lines of code for starting and ending your programs.
Starting a Program
import pyvisa as visa # import VISA library
rm = visa.ResourceManager()
connection = rm.open_resource('TCPIP0::localhost::hislip0,4880::INSTR')
Flex.write('*RST') # Initialize FlexDCA
Flex.write('*CLS') # Clear status and error registers
Flex.query(':SYSTem:DEFault;*OPC?')
Flex.query(':SYSTem:AUToscale;*OPC?')
…
…
# Your code here
…
…
Flex.write(':SYSTem:GTLocal')
Flex.close()
Always start your programs with the commands shown in the following listing. Use the *RST
common command to initialize FlexDCA, FlexRT, or FlexPLL to a preset state. The :SYSTEM:AUTOSCALE
command is very useful on unknown waveforms as it automatically sets up FlexDCA's vertical channel, time base, and trigger level. A typical instrument setup configures the vertical range and offset voltage, the horizontal range, delay time, delay reference, trigger mode, trigger level, and slope. Notice that the :SYSTem:DEFault
and :SYSTem:AUToscale
commands should be followed by an *OPC?
common query.
- Try the example Python programs.
Additional example programs are provided for C#.NET, Labview, Matlab, and Python. Look in the installation folder: \Keysight\FlexDCA\Demo\Example Programs
The following command snippet demonstrate starting lines of code for starting and ending your programs.
Starting a Program
import pyvisa as visa # import VISA library
rm = visa.ResourceManager()
connection = rm.open_resource('TCPIP0::localhost::hislip0,4880::INSTR')
Flex.write('*RST') # Initialize FlexDCA
Flex.write('*CLS') # Clear status and error registers
Flex.query(':SYSTem:DEFault;*OPC?')
Flex.query(':SYSTem:AUToscale;*OPC?')
…
…
# Your code here
…
…
Flex.write(':SYSTem:GTLocal')
Flex.close()