# Starting a Program

SCPI Introduction

- Quick Start
- LAN and USB Connections
- Starting a Program
- Common Child Commands
- SCPI Basics
- File Path Substitution Strings
- Definite-Length Block Response Data
- Indefinite-Length Block Response Data
- Waveform Content Windows
- SCPI Security in Infiniium
- Concepts

Always start your programs with the commands shown in the following listing. Use the `*RST (Reset)` common command to initialize Infiniium to a preset state. The `:SYSTem:AUToscale` command is very useful on unknown waveforms as it automatically sets up the channel vertical scale, 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 (Operation Complete)` 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\Infiniium\Demo\Example Programs

The following command snippet demonstrate starting lines of code for starting and ending your programs.

Starting a Program

    Infiniium.write('*RST')  # Initialize the instrument
    Infiniium.write('*CLS')  # Clear status and error registers
    Infiniium.query(':SYSTem:DEFault;*OPC?')
    Infiniium.query(':SYSTem:AUToscale;*OPC?')
    …
    …
    #  Your code here
    …
    …
    Infiniium.write(':SYSTem:GTLocal')
    Infiniium.close()