Starting 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.

Example programs are provided that show how to setup basic communications. Example 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.

Copy

Starting a Program


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()