3.3.2. WAVE Command
The WAVE command allows to upload and reproduce a buffer of pre-stored setpoints. Using this command can also generate a waveform or reproduce a sequence of setpoints.
The device takes a new setpoint from the buffer, at every PID calculation cycle (Update Frequency, see the UPFREQ Command).
Since the Setpoints Buffer’s length is limited, it is possible to use a prescaler in order to reduce the Update Frequency - \(f_{update}\). This can be useful in the case of waveform in order to enlarge the waveform length or to generate very slow waveforms.

By populating the buffer with the sampled values (\(f_{sampling}\)) of the desired waveform it is possible to reproduce such waveform.

Command Format:
R/W |
Command |
Response |
Description |
---|---|---|---|
W |
WAVE:START |
#AK / #NAK |
Start the execution of the stored values |
W |
WAVE:STOP |
#AK / #NAK |
Stop the execution of the stored values |
R |
WAVE:PERIODS:? |
#WAVE:PERIODS:<period-number> |
Read the number of periods setting |
W |
WAVE:PERIODS:<period-number> |
#AK / #NAK |
Set the number of periods setting |
R |
WAVE:PERIODS:INDEX:? |
#WAVE:PERIODS:INDEX:<period-index> |
Return the currently used index of periods |
R |
WAVE:PRESCALER:? |
#WAVE:PRESCALER:<prescaler> |
Read the prescaler value |
W |
WAVE:PRESCALER:<prescaler> |
#AK / #NAK |
Set the presclaer value |
R |
WAVE:POINTS:NUM:? |
#WAVE:POINTS:NUM:<points-number> |
Read the number of points stored in the internal buffer |
R |
WAVE:POINTS:? |
#WAVE:POINTS:<p1>:<p2>:…:<pN> |
Returns the values stored in the internal buffer [1] |
W |
WAVE:POINTS:<p1>:<p2>:…:<pN> |
#AK / #NAK |
Fill the internal buffer with setpoints |
R |
WAVE:POINTS:INDEX:? |
#WAVE:POINTS:INDEX:<points-index> |
Return the currently used index of the internal buffer |
R |
WAVE:TRIGGER:? |
#WAVE:TRIGGER:<trigger-mode> |
Read the trigger mode |
W |
WAVE:TRIGGER:<trigger-mode> |
#AK / #NAK |
Set the trigger mode |
W |
WAVE:RAW:<raw1><raw2>…<rawN> |
#AK / #NAK |
Fill the internal buffer with setpoints (raw format) |
Parameter(s):
Name |
Type |
Range |
Description |
---|---|---|---|
<period-number> |
integer string |
>=0 |
Indicates the number of times (periods) that the buffer has to be reproduced; if equal to 0 -> Infinite periods (The waveform can be stopped with WAVE:STOP command) |
<period-index> |
integer string |
[0, <period-number> - 1] |
Indicates the index of the currently applied period |
<p1>…<pN> |
floating string |
[2, 500.000] |
Setpoints sequence - The min number of points is 5; the max number of setpoints is 500.000 |
<points-number> |
integer string |
>=0 |
Indicates the number of points that are stored in the buffer |
<points-index> |
integer string |
[0, <points-number> - 1] |
Indicates the index of the currently applied point |
<prescaler> |
integer string |
[1, 100] |
Specify the prescaler value (default value = 1) |
<trig-mode> |
Description |
---|---|
START |
Start to reproduce the content of the buffer on trigger event or with WAVE:START command. To stop the execution of the waveform it is necessary to use the WAVE:STOP command or to wait the end of the buffer (The buffer will be reproduced <period-number> times). |
POINTS |
Reproduce the next point on edge trigger event [2] . To arm the execution it is necessary to send the WAVE:START command. This mode is meant to be used to reproduce a sequence of pre-defined points, for this reason in this mode the prescaler setting is bypassed. |
GATE |
In this configuration the buffer is reproduced on the trigger event [3] . The TRIGGER acts as an enable signal (in this mode the prescaler is not bypassed). To arm the waveform execution it is necessary to send the WAVE:START command. |
GATERESET |
This option has the same behavior as the GATE option, but when the trigger event is more active, the waveform index is reset to 0 (the waveform is rearmed). |
POS, NEG or BOTH Trigger mode are supported.
HIGH or LOW Trigger Mode are supported.
Tip
The WAVE:TRIGGER mode is linked to the TRIGGER mode, please refer to {ref}`TRIGGER Command`.
POINTS, GATE and GATERESET modes don’t support TRIGGER:OFF mode.
Trigger mode Examples
For the next examples, the internal buffer was filled with points from the sine waveform with the following settings:
Amplitude: 1
Frequency: 1 Hz
Number of periods: 3
Prescaler: 1
Example #1: WAVE:TRIGGER:START with TRIGGER:POS option
In this example, the preloaded waveform starts when a trigger event is detected. In this example the trigger is set to POS and so the trigger event is generated at the positive edge of the trigger signal.

Example #2: WAVE:TRIGGER:POINTS with TRIGGER:POS option
In this example, the preloaded waveform points are loaded when a trigger event is detected. In this example the trigger is set to POS and so the trigger event is generated at the positive edge of the trigger signal, which in this example is a square waveform at 50 KHz. When the square waveform is not executed, the trigger event is not generated and so the setpoint is not updated.

Example #3: WAVE:TRIGGER:GATE with TRIGGER:HIGH option
In this example, the preloaded waveform points are loaded when a trigger event is detected. In this example the trigger is set to HIGH and so the trigger event is generated when the trigger level is high. In this example the trigger signal is a square waveform of 1 Hz. When the trigger signal is high, the trigger event is generated and the setpoint is updated.

Example #4: WAVE:TRIGGER:GATERESET with TRIGGER:HIGH option
The configuration of this example are the same of the previous one, but the GATERESET mode resets the buffer index when the trigger event is not valid, and so at next trigger level, the waveform starts from the beginning.

Warning
The WAVE and TRIGGER commands allow also particular combinations, that does not make any sense for example:
When TRIGGER:OFF is set, the trigger sensing is disabled and so the trigger event never occurs, thus the waveform is never updated.
When the WAVE:TRIGGER:GATERESET is used with TRIGGER:POS configuration, the waveform is reset at every negative edge of the trigger -> the buffer index is constantly in reset.
Example(s):
WAVE:PERIODS:5
#AK
WAVE:PERIODS:?
#WAVE:PERIODS:5
WAVE:POINTS:1:2:3:4:5:6:7:8:9:10
#AK
WAVE:POINTS:NUM:?
#WAVE:POINTS:NUM:10
WAVE:PRESCALER:2
#AK
WAVE:PRESCALER:?
#WAVE:PRESCALER:2
WAVE:TRIGGER:START
#AK
WAVE:START
#AK
WAVE:STOP
#AK