Teledyne LeCroy PXA125 User Manual
Page 135

User Manual PXA125
Programming Reference 4-17
instruments. The command structure and syntax is exactly the same, which will make it even
easier to program the PXA125. However, do not get discouraged if you are not familiar with
SCPI programming. SCPI introduction and command examples are given later in this
chapter. If you feel that the introduction in this manual is not enough for you, you may
consider purchasing the SCPI specification book from the SCPI consortium.
A simple example of the SendCommand() is given below:
SendCommand(0, outp 1;:outp:sync on;:func:shap squ;:volt 1;offs 0.5;:freq 1.234e6)
This single command line is equivalent to a series of commands as shown below:
SendCommand(0, outp 1)
\\ Turns the main output ON
SendCommand(0, outp:sync on)
\\ Turns the SYNC output ON
SendCommand(0, func:shap squ)
\\ Modifies output waveform shape to square
SendCommand(0, volt1;offs0.5)
\\ Modifies amplitude to 1V and offset to
0.5V
SendCommand(0, freq 1.234e6)
\\ Modifies frequency to 1.234 MHz
Hints
1. To get you started quickly with SCPI programming and without the hassle of learning the
syntax, you’d better start with series of commands and later, as you get familiar with the
programming aspects, you can start using shorted command lines.
2. Later in this chapter, you’ll find all of the commands that are used for programming the
instrument. This reference is the complete and only source you’ll need for your
application. However, if you want to save some time and not study the complete chapter,
you can use the log feature in ArbConnection to view commands as you click on buttons
and change parameters and then simply copy these commands into your application. To
access the log file, invoke ArbConnection select the View menu and click on Log File.
Inside the Log File View check the Show Commands Only. From this point, every time
you change anything on the panel, the action will be recorded in the log file using the
exact syntax as you should use in your application.
3. You can use the SendCommand() function to download arbitrary waveform data to the
memory. In this case, you’ll have to prepare an external file that has the waveform data
in binary format and concatenate the file name with the trace# command. The file
structure for the waveform data is shown in the SendBlock() command description.