3 - Programming ExamplesInitiating the Measurement Trigger SystemWhen the electronic load is turned on, the trigger system is in the idle state. In this state, the triggersystem ignores all triggers. Sending the following commands at any time returns the trigger system to theIdle state:ABORt*RST*RCLThe INITiate commands move the trigger system from the Idle state to the Initiated state. This enablesthe electronic load to receive triggers. INITiate commands are not channel-specific, they affect allinstalled load modules. To initiate a measurement trigger, use:INITiate:SEQuence2orINITiate:NAME ACQuireAfter a trigger is received and the data acquisition completes, the trigger system will return to the Idlestate unless multiple measurements are programmed using the TRIGger:SEQuence2:COUNt command.Thus it will be necessary to initiate the system each time a triggered acquisition is desired.NOTE:You cannot initiate measurement triggers continuously. Otherwise, the measurementdata in the data buffer would continuously be overwritten.Generating Measurement TriggersUse one of the following triggering methods to generate measurements:TRIGger:SOURce BUS | EXTernal | HOLD | LINE | TIMerAfter you have specified the appropriate source, you can generate measurement triggers as follows:Single triggers overthe busSend one of the following commands over the GPIB:TRIGger:IMMediate(this overridesTRIG:SOUR HOLD)*TRGa group execute triggerContinuous triggerssynchronized with theac line frequencySend the following command over the GPIB:TRIGger:SOURce LINEContinuous triggerssynchronized with theinternal timerSend the following commands over the GPIB:TRIGger:TIMer TRIGger:SOURce TIMerExternal triggerApply a low to high signal to the external trigger input at the back of themainframe.When the acquisition finishes, any of the FETCh queries can be used to return the results. Once themeasurement trigger is initiated, if a FETCh query is sent before the data acquisition is triggered orbefore it is finished, the response data will be delayed until the trigger occurs and the acquisitioncompletes. This may tie up the controller if the trigger condition does not occur immediately.One way to wait for results without tying up the controller is to use the SCPI command completioncommands. For example, you can send the *OPC command after INITialize, then occasionally poll theOPC status bit in the standard event status register for status completion while doing other tasks. Youcan also set up an SRQ condition on the OPC status bit going true, and do other tasks until an SRQinterrupt occurs.36