Using External Events with the GX5296 and GX5960 Products

Knowledge Base Article # Q200230

Read Prior Article Read Next Article
Summary This article demonstrates how to use external events to control test pattern execution
  
Login to rate article

Introduction

It is often a requirement of a digital instrument to wait for a specific event to synchronize data transfers, handshake to a device under test (DUT) or to trigger on a specific event. The digital sequencer of the GX5296/GX5960 series of digital instruments provides capabilities such as  conditional / unconditional jump, subroutine jump, or looping. Additionally, the sequencer has the ability to trigger on and or handshake with external signals in order to synchronize with a DUT. The trigger sources for these triggers include the Auxiliary channels as well as up to 32 digital channels. This article focuses on explaining the usage and set up the various triggers available in this series of high speed digital (DIO) products using the GtDio6x panel and ATEasy examples to program the instrument.

Trigger Logic

The Test Logic block of the digital sequencer as shown in Figure 1 is controlled by the state of the auxiliary (AUX) Inputs and or the Error / Channel Test signal (ERR/CH TEST). The Error / Channel Test or Channel Compare 0 signal is controlled by the state of the digital channels. These trigger mechanisms can direct sequencer operations such as Start, Stop, Halt, Pause and Resume as well as conditional looping from a number of input sources.  

DIO Block Diagram

Figure 1 - DIO Block Diagram


Trigger Sources

Trigger sources are provided by the Auxiliary Channels, PXI Triggers 0-7 and Channel Compare 0. The GX5296 provides 4 and the GX5961 provides 12 Auxiliary channels. The eight PXI triggers an be generated by multiple instruments in the PXI chassis or the PXI system controller. The Channel Compare 0 trigger resource is the result of the state of any number of digital channels on the Master DIO board in the domain. Channel Compare 0 becomes true when the DIO channel states matches the Channel Compare programmed state. The Channel Test also includes mask to remove unwanted channels from the comparison. Any Trigger Input Source can be programmed to be level or edge sensitive and or can be inverted. Triggers can only be sourced from the Master DIO of a domain of channels.

GtDio6x Panel Trigger Page

The GtDio6x panel Trigger page as shown in Figure 2 allows the user to view or configure external events to control the state of the digital sequence engine. The available Trigger Logic includes multiple Pause, Resume and Jump commands as well as basic sequencer operations such as Run, Stop or Halt. The sources for these triggers can be programmed to become level or edge sensitive and can be inverted. Some of the trigger logic signals have a reset mode that can allow the trigger to occur only once or multiple times during a burst.

DIO Trigger Page

Figure 2 - DIO Trigger Page Run Trigger


Run and Stop Triggers

To configure a Run trigger simply select the Run trigger to in the trigger logic field. Select the trigger source such as Auxiliary 0, Level/Edge type to Rising Edge, signal Inversion to False. Press the Set button to apply theses settings. Figure 2 shows the Run trigger set to run the sequencer when Auxiliary channel 0 transitions from a low to a high logic level. Note that the Run trigger does not include a reset mode. The configuration of all triggers can be saved and or loaded using a Dio6x file. This configuration and the Stop trigger can be programmed in ATEasy as follows,

!ATEasy Run and Stop Trigger Examples
!Run Trigger example
Dio Set Trigger Run(adio6xTriggerSourcePXI0,False,adio6xTriggerOnRisingEdge)
!Stop trigger example
Dio Set Trigger Stop(adio6xTriggerSourcePXI0,False,adio6xTriggerOnFallingEdge)


Halt Trigger using Channel Compare 0

There are four channel compare triggers as shown in Figure 3. Only Channel Compare 0 can be used as an input trigger source. Each channel of the master in the domain can be used in a Channel Compare. The Channel Compare also provides a mask register to remove channels from the comparison. Each bit of the Expected and Mask values represent a channel.

When using the GX5296 a channel is "Masked Out" when the mask value of that channel is a logic 1. When using the GX5960 series a channel is "Masked Out" when the mask value of that channel is a logic 0. Channel Compare 0 becomes true when the digital channels state matches the state of the non masked expected value. This example is using the GX5296, the Channel Compare is set to 0x1234 and the mask value is set to 0xFFFF0000. In this case the GX5296 has been programmed to execute in an endless loop waiting for the channels to match the expected value of 0x1234 to halt the sequence. All other channels are ignored.

DIO Halt Trigger

Figure 3 - Halt Trigger using Channel Compare 0

!AtEasy Halt Trigger example using Channel Compare 0
dwExpectData=0x1234
dwMaskData=0xFFFF0000
!Setup Channel Compare
Dio Set Sequencer ChannelsCompareTrigger(adio6xChannelsCompareTrigge0, dwExpectData,dwMaskData)
!Setup Halt trigger
Dio Set Trigger Halt(adio6xTriggerSourceChannelCompare0, False, adio6xTriggerOnHighLevel, adio6xHaltTriggerResetStartEndStep)


Jump Triggers

Using a Jump trigger allows a digital pattern to be repeated until an external event occurs. The trigger state is tested at the end of the step. Care must be used when using this trigger as if the trigger it can create and endless loop if the trigger condition is always present or the step will only run once if the trigger state is not matched. This trigger requires settings on both the Steps page and the trigger page. Refer to figure 4, go to the Steps page and select the where the jump is to occur. In this case Step 2, set the Step Control to Jump then perform the following selections,
  • Set the Loop Counter to 0
  • The jump Condition  to Jump Trigger 0 True
  • Select the GoTo to Step 2
  • Uncheck the Continuous Loop radio button
  • Select a loop count 1
Finally go to the Trigger page and select Jump Trigger 0. Select the trigger source to PXI Trigger 3, the Level/Edge to High level and press the Set button.

DIO Jump Trigger

Figure 4 - Configuring a Jump Trigger

!ATEasy Jump Trigger Example
lStep=2
lNextStep=2
lLoopCount=1
lLoopCounter=0
!Set Step Control
Dio Set Step Control(lStep,adio6xControlActionJump,lNextStep,adio6xControlConditionJumpTrigger0_True,lLoopCount,lLoopCounter,0)
!Set Jump trigger
Dio Set Trigger Jump(adio6xJumpTrigger0,adio6xTriggerSourcePXI3, False, adio6xTriggerOnRisingEdge, adio6xJumpTriggerResetStartEndStep)


Pause Resume Triggers

Pause Resume triggers offer a method to pause the sequencer to wait for an external event to occur. Unlike the Jump trigger the Pause trigger stops the execution of the sequencer and waits for an external event to Resume the additional digital sequences. Care must be taken when using this trigger as if the resume trigger event never occurs the sequencer will never resume from the pause state.

Refer to Figure 5, in this case it is known that PXI trigger 0 will be low prior to the start of the burst, this meets the pause trigger condition. The sequencer will resume when the PXI trigger 0 transitions from a low to a high state. To configure the Pause Resume triggers first go to the Steps page and select Step 0. Select the Pause trigger to Pause: Pause Trigger 0=True, Resume: Pause Resume Trigger 0=False. Then go to the Trigger page and select Pause Trigger 0. Set the trigger source to PXI Trigger 0, the Level Edge to Low level and press the set button. Finally select Resume Trigger 0 and set the trigger source to PXI Trigger 0, the Level/Edge to Rising Edge and press the set button.

DIO Pause Resume Trigger

Figure 5 - Pause Resume Trigger

!ATEasy Pause Resume Example
lStep=0
!Set Step pause resume trigger
Dio Set Step PauseTriggerResume(lStep,adio6xPauseTrigger0True_ResumePauseTrigger0False,adio6xResumeDisabled)
!Set Pause Trigger
Dio Set Trigger Pause(adio6xPauseTrigger0,adio6xTriggerSourcePXI0,False,adio6xTriggerOnLowLevel, adio6xTriggerResetStepStartResume)
!Set PauseResume Trigger
Dio Set Trigger PauseResume(adio6xResumeTrigger0,adio6xTriggerSourcePXI0,False,adio6xTriggerOnRisingEdge)


Conclusion

The GtDio6x series of digital instruments provides a robust set of trigger resources that can be used to control the digital instrument. For more information regarding the GtDio6x panel or for specific trigger settings refer to the GtDio6x User's guide. For further information on your specific instrument refer to the GX5296 or GX5960 User's Guides.
Article Date 2/5/2013 , 10/8/2020
Keywords GX5296 GX5960, External Events, Channel Test, Sequencer, DIO


Login to rate article

Read Prior Article Read Next Article