Many instruments support triggering using external signals, since this produces less latency when synchronizing the actions of multiple instruments than does performing the equivalent actions using programmatic control. Obviously, instruments that support this feature must both be able to initiate measurement actions after receiving an external trigger signal and output trigger signals to other instruments. It is very common (especially on older instruments) to see external BNC ports with the labels “Trigger In” and “Trigger Out” for exactly this purpose. However, most modern instruments support more elaborate triggering schemes that permit multiple trigger in/out signals. One such instrument is the PZ2100A Precision Source/Measure Unit and explaining its trigger system is helpful to understand the operation of similar instruments with complex triggering schemes. The following diagram shows the arrangement of the PZ2100A trigger structure.
On the PZ2100A both the mainframe and individual modules have external trigger inputs/outputs available. You can connect the seven external digital I/O terminals on the mainframe directly to the internal trigger lines using SCPI commands (which we will cover next). However, note that the external trigger terminals on the modules cannot connect directly to the internal trigger lines. Instead they connect to the module trigger system, which in-turn connects to the six internal trigger lines.
We will now go through an example of how to connect the digital I/O terminals on the mainframe to the internal trigger lines and set them up to act as either trigger in or trigger out signals. The first step is to connect one of the seven mainframe digital I/O lines to one of the six internal trigger signal lines and enable the connection. The reason this requires two separate commands is due to the default state of the digital I/O pins. The default state for the digital I/O pins is to be trigger input ports (TINput), with all of them routed to internal trigger line 1 (INT1). To prevent more than one digital I/O pin from sending an external trigger signal into internal trigger line 1, you must also issue a command to enable the connection that you want to use. To connect external digital I/O pin 2 to internal trigger line 1 you need to issue the following two SCPI commands:
While the Digital I/O pins can perform many different functions in addition to triggering, we will not discuss them now. For this example the next required step is to set digital I/O pin 2 to perform either a trigger in (TINput) or trigger out (TOUTput) function. For the sake of this example we will assume that we want to generate an external trigger signal to capture measurement signals using an oscilloscope. Therefore, we assign it as an external trigger out by issuing the following SCPI command:
The previous three commands are mandatory to create an external trigger signal, but there are also some optional commands that allow you to modify the characteristics of the external trigger signal to meet specific needs. We will cover these next.
The external trigger signals generated by the PZ2100A follow the 3.3 V CMOS standard, where signals between 0 V and 0.8 V correspond to a logical “0” and signals between 2.0 V and 3.3 V correspond to a logical “1”. The PZ2100A allows you to output an external trigger signal as either an edge trigger or a level trigger. The default setting is edge trigger, which is what we will use in this example. However, you can also set the trigger output to “LEVel”, which will output a continuous high signal during the actual measurement. While generally not best for triggering other instruments, the level setting has uses for scenarios such as:
- Illuminating an external LED while the measurement is taking place.
- Determining the ongoing status of a measurement (which might be valuable for prolonged measurements).
- Detecting the initiation of a measurement at the trigger output’s rising edge and identifying its conclusion at the trigger output’s falling edge.
The following screen capture shows an example of level triggering on a sweep measurement.
Note: If you use level triggering then the commands to modify the trigger pulse position and pulse width have no effect on the pulse output. However, the polarity command will affect whether the trigger outputs a logic high or logic low level while a measurement is taking place.
As just mentioned, the default trigger type is edge so there is no need to issue a command to specify this to setup an edge output trigger signal. However, there is no harm in specifying this parameter explicitly, so we will set the output signal type to edge using the following SCPI command:
For the PZ2100A you can specify the polarity of an external edge trigger signal to be either negative (transition from 1 to 0), or positive (transition from 0 to 1). The default polarity option is negative, but for this example we will change the polarity of digital I/O pin 2 to positive using the following SCPI command:
The default pulse width of an edge trigger signal is 0.2 microseconds (which is also the minimum pulse width). However, you do have the option to change the width of the trigger signal up to a maximum of 12.8 microseconds. We will change the pulse width to 1 microsecond using the following SCPI command:
It is instructive to note that the trigger pulse width command also accepts “MINimum”, “MAXimum”, and “DEFault” as parameters in addition to allowed numeric values.
The Arm/Trigger diagram for the PZ2100A shows where trigger outputs can occur for both the Arm and Trigger layers.
Notice that trigger outputs can occur both before and after Arm, before and after Trigger, and before and after a Device Action. When generating an external trigger signal you can select if you want to have a trigger signal generated before a trigger action, after a trigger action, or both before and after a trigger action. The default setting for the PZ2100A is to have a trigger signal generated both before and after a trigger action (to keep compatibility with the B2900B SMU family), but this is not always the best choice for applications requiring the PZ2100A to generate an external trigger signal. For example, if you want to use the external trigger signal with an oscilloscope to capture PZ2100A measurement waveforms, then most likely you want to have the PZ2100A generate a single external trigger signal before the measurement trigger action initiates (but not after). For this example we are going to have the instrument output an external trigger signal only before the measurement triggers using the following SCPI command:
As summary of all the options and features that we covered, the following is a list of the SCPI commands necessary to generate an external, one microsecond negative edge trigger signal from internal trigger line 1 to external trigger output 2:
As previously described, these commands will set up the PZ2100A to output an external trigger signal before the beginning of one or more measurements. How many trigger signals it outputs will depend on how you programmatically set up the actual measurement triggers.