# This script activates the selected soft trigger of the MVLC Trigger/IO
# module. The soft trigger unit will create a 8ns wide output pulse.
#
# Soft triggers are implemented using the trigger_resource units of the MVLC.
# Use the Trigger IO GUI to configure the desired unit appropriately.

setbase 0xffff0000      # use the mvlc vme interface as the base address for the following writes

set trigger_index 0     # valid values: 0-7 (trigger_resource units)

mvlc_stack_begin
  # Level0 Units 4-11
  set trigger_unit $(4 + ${trigger_index})
  # select the unit
  0x0200 ${trigger_unit}
  # write to the soft_trigger output activation register to generate an 8 ns pulse.
  0x0302 1
mvlc_stack_end
