Instrument Control Toolbox | ![]() ![]() |
Triggers
You can execute a trigger with the trigger
function. This function is equivalent to writing the GET
(Group Execute Trigger) GPIB command to the instrument.
trigger
instructs all the addressed Listeners to perform some instrument-specific function such as taking a measurement. Refer to your instrument documentation to learn how to use its triggering capabilities.
Example: Executing a Trigger
This example illustrates GPIB triggering using an Agilent 33120A function generator. The output of the function generator is displayed with an oscilloscope so that the trigger can be observed.
g
associated with a National Instruments GPIB controller with board index 0, and an instrument with primary address 1.
g
to the function generator.
While the function generator is triggered, the sine wave is saved to the Ref A memory location of the oscilloscope. The saved waveform is shown below.
g
, you should disconnect it from the instrument, and remove it from memory and from the MATLAB workspace.
![]() | Example: Using Events and Callbacks to Read Binary Data | Serial Polls | ![]() |