Using the general input output of the SCU for TTL triggers

2024-10-06

Introduction

The SCU provides 2 groups of lemo inputs. At the stage of this writing only two of them are available
  • line 1
  • line 2
These can be used as input or output. The following variables allow different configurations:
  • TOP:PC:TRIGGER_LINES:FLAG_CYCLE
  • TOP:PC:TRIGGER_LINES:FLAG_RAMP
  • TOP:PC:TRIGGER_LINES:TRIGGER_CYCLE
  • TOP:PC:TRIGGER_LINES:CYCLE_ALLOW_LINE

These are enabled assiging one of the lines to them. The line is then reserved as input or output as required. The line must be activated by setting 0 to TOP:PC:TRIGGER_LINES:CONFIGURE!

The usage of the different variables is discussed below.

Enabling/Disabling the line

The different GIO can be assigned to the different functionality. One line can only be assigned to one functionality.
  • The functionality is disabled by setting the variable to 0
  • It is enabled by setting the variable to the line number to be used
The different variables must be set first, and then the command
TOP:PC:TRIGGER_LINES:CONFIGURE

must be executed by assinging some long value to it (e.g 0). This will then make the power converter evaluate the differnet variables and then make the required configuration. Please note the power converter program is picky that only one line is assigned to one of the input or output variables. If one line is assigned to more than one of the variables it will not give any proper information on the offening variable.

Inputs

Enabling the next cycle

The power converter can run continuous cycles. Before each cycle is executed it can check a specified line, if it is active (TTL high). If so it will execute a single cycle. The line is specified using the variable
TOP:PC:TRIGGER_LINES:CYCLE_ALLOW_LINE

Triggering the start of the next cycle

This functionality is quite similar to the functionality above. But in this mode the power converter will wait until the line goes to TTL Low. Please be aware it is "level triggered". This means the program proceeds the following way:
  • It will check if the line specified by TOP:PC:TRIGGER_LINES:TRIGGER_CYCLE is TTL low
  • If not it will poll this line periodically until it is TTL low up to a maximum time specified by TOP:PC:TRIGGER_LINES:TIMEOUT. This value can be set up to 65 seconds. It's default is 1 second.
  • During this polling no further line is checked!

Be aware that a delay of 25 μs or more can occur! The 25 μs are a good estimate of the minimum time required for reading one register value on the SCU hardware.

Outputs

Flagging the cycle

When a line is assigned to
TOP:PC:TRIGGER_LINES:FLAG_CYCLE

is set, the program will set this line to
  • TTL low before the first pause of the cycle
  • to TTL high before it executes the first ramp (change of current) of the cycle
If the first pause is zero, it will be low for roughly 25 μs.

Flagging the ramp

When a line is assigned to
TOP:PC:TRIGGER_LINES:FLAG_RAMP

the power converter will indicate when it is executing a ramp. Thus it will set the line
  • to TTL high when it executes the ramp (change of current)
  • to TTL low when it finished the ramp
If no delay was specified, the time of the low ramp is indicating the time that the power converter requires to
  • read back the set value of the function generators
  • read back the value of the ADC's
  • check that these are appropriate
  • calculate the parameters for the next ramp
If a delay is specified this time is added as well.

Adding new trigger lines

  • add an appropriate variable to the struct power_converter_ramp_t in power_converter_ramp_loop.h
  • implement appropriate get/set "methods" best in power_converter_ramp.c
  • add these to array trigger_nodes in pc_server_parser_tree.c
  • add the handling in power_converter_trigger_lines_scu.ic in function power_converter_trigger_setup
  • recompile all files in the folder pc by executing

    • make clean
    • make
  • test it!
  • send me a post card if the description works exactly as given here

-- PierreSchnizer - 2016-11-22

  • SCU_LEMO_Interfaces:
    SCU_LEMO_Interfaces.png
Topic revision: r4 - 2017-05-17, AlexanderWarth - This page was cached on 2024-10-06 - 11:58.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)