How-To: Poor Humans TIF - An Ugly Temporary TIF Workaround for the 2021 Beam Time

Introduction

As there is currently no replacement for the MIL TIFs with the new GMT, an ugly and temporary workaround for the 2021 beamtime has been implemented as a quick hack. Poor Humans TIF (phtif) is a simple menu driven command line tool. Settings are stored semi-persistently on frontends with ACO ramdisk [1]: phtif remembers the settings; however the settings get lost when rebooting the frontend.

Important: phtif requires exclusiv access to all I/Os of tr0 (and tr1). Don't use phtif concurrently with other tools/software using I/Os.

Installation

This tool is installed on top of the ACO ramdisk via nfs-init. Just set a symbolic link for the frontend as shown in the following example.
lrwxrwxrwx 1 user group  26 Apr 16 15:59 30_phtif -> ../global/timing-rte-phtif
Reboot the FEC after the symbolic link has been created.

On-Line Help

[ruth@fel4711 ~]# phtif -h
Usage: phtif [OPTION]

  -h                  display this help and exit
  -p <path>           specify alternative location for menu settings

Use this tool as quick and dirty hack to configure IOs 

IMPORTANT: This tool requires exclusive access to all IOs;
don't use tool in parallel with other programs acting on IOs

Report software bugs to <d.beck@gsi.de>
Version 000002. Licensed under the LGPL v3.

Usage

Type phtif to start the CLI. Use the < arrow > keys of you keyboard to select menu or parameters. Character # is used as cursor. Menu item are marked by square brackets [ item ]. A menu item is executed by hitting the < Return > key.

phtif main.png
Figure: Welcome screen and main menu.

The figure above shows the welcome screen with actually 30 menu items.
  • up to 26 menu items a..z allow to specify up to 26 rules for IOs
  • (Re)Create IO Conditions will (re)apply the defined rules to the timing receiver hardware
  • Set Rules to Defaults will set all rules to default values (all rules are disabled); but this only alters the configuration in the menu, not the configuration of the hardware
  • List IO Conditions will show you the actual configuration set at the timing receiver
  • Exit exits the program

phtif rule.png
Figure: Configuration of a rule.

The figure above shows the configuration of a rule that will create a LVTTL pulse with 1 us lenth on the scheduled deadlines for each occurrence of event number CMD_SEQ_START at timing group SIS18_RING.

Parameters

  • Comment : the default is rule-a..z but you may change it to remember what this rule is intended for
  • Device : the saftlib device name of the timing receiver; with just one timing receiver this will be tr0 in most cases
  • IO : the number of the IO; numbering of IOs starts at '1'
  • enable : set this to '1' if the rule should be used
  • '0'..'6' : these are fields of a timing message
    • see here
    • SID is useful to trigger only on the 'machine' of interest; however, the SID is defined by the settings management LSA. You need other ACO tools or ask people of the main control room what SID is used for 'your' control system pattern. Caveat: If you want to match on SID, you also need to precisely match
    • Flags : Argh! Either you ask the LSA people or you just spend some time on snooping the incoming messages by using the tool saft-ctl, see here. Sorry for this inconvenience, but this decision was taken in here.
  • 'match til'
    • defines, which fields shall be matched
    • remember the timing receiver only supports prefix matching, see here
    • all fields are matched in ascending order
    • in the example shown above, all fields until '2' are matched, FID, GID and EvtNo. All other fields are ignored
  • length : length of created LVTTL pulse [ns]
  • offset : offset of created LVTTL pulse [ns] with respect to the scheduled deadline.
    • 0 : rising edge of LVTTL pulse is exactly at deadline
    • -1000: pre-trigger of 1 us
    • 10000: trigger at 10 us past deadline

Menu Items
  • Set to Default resets all parameters of this rule to default values
  • Return quits and returns to the main screen.

-- DietrichBeck - 19 Apr 2021
Topic attachments
I Attachment Action Size Date Who Comment
phtif_main.pngpng phtif_main.png manage 28 K 19 Apr 2021 - 14:43 DietrichBeck phtif: main menu
phtif_rule.pngpng phtif_rule.png manage 34 K 19 Apr 2021 - 14:43 DietrichBeck phtif: rule menu
Topic revision: r1 - 19 Apr 2021, DietrichBeck
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 Foswiki? Send feedback