AliDcsSafe 1.0.0

Note:

  • xxx is used in the component in place of the detector 3 lower case letters code (aco, emc, ..., v00, zdc)
  • XXX is used in the component in place of the detector 3 upper case letters code (ACO, EMC, V000, ZDC)

Description

This unit is based on the Emergency Button datapoint. The aim is to show the SAFE/SUPERSAFE status of the detector in the FSM tree, and allow systems to change their safe definitions, states and scripts independently from the central project.

The ALICE DCS central project is connected to the following datapoints
detEmergencyButton.jpg

How it works today:

  • when the beam conditions suggest to move ALICE to a safer state, a command is sent to the detectors: a list is maintained, with specific FSM commands and scripts for the different detectors
  • detectors declare their status in the xxxEmergencyButton datapoint.
  • if the FSM is not responsive or the GO_SAFE action is more complex than a single FSMM command, the script xxx_safe/xxxSafe_EmergencyButton is executed.
How it will work with the AliDcsSafe component:
  • when the beam conditions require ALICE to move to a safer state, an FSM command is sent to the detectors: GO_SAFE
  • detectors declare their status in the xxxEmergencyButton datapoint; the same status is reflected in the SAFE CU and DU
  • the EmergencyButton script based action is kept and used if the FSM is not available or responsive
  • any changes in the SAFE/SUPERSAFE definitions and scripts on the detector side are transparent for the central project (apart when the TOP NODE actions change and an FSM restart is needed).

Installation

AliDcsSafe is built as a Framework component, and is consisting of:

  • 3 dpl files
    • AliEmergencyButton datapoint type
    • AliDcsSafe_CU internal datapoint
    • AliEmergencyButton_DU internal datapoint
  • 6 smi files
    • states and actions for the AliDcsSafe_CU object unit
    • states and actions for the AliEmergencyButton_DU device unit
  • 2 libraries
    • code for the AliEmergencyButton_DU device unit
    • sample script for the xxx_safe/xxxSafe_GoSafeInstructions.ctl
  • ctrl script xxx_safe/xxxSafe_EmergencyButton.ctl
  • postInstall script
  • this help file in PDF/html format

To install the component:

  • in the PVSS Console, stop the ctrl script xxx_safe/xxxSafe_EmergencyButton.ctl (you might need to do it more than once, if it is set for automatic restart)
  • unzip the component in a local folder
  • use the fwInstallation, locate the component and install
  • during the installation check the LOG to verify that the procedure works correctly

If something fails, or you prefer to manually install the component:

  • unzip the AliDcsSafe_1.0.0 component in your project folder

  • in the PVSS Console, stop the ctrl script xxx_safe/xxxSafe_EmergencyButton.ctl (you might need to do it more than once, if it is set for automatic restart)

  • Using PARA, please modify the EmergencyButton datapoint type (right click and select Edit datapoint type):
    • rename the type as AliEmergencyButton (instead of xxxEmergencyButton)
    • add these three boolean items:

    • the modified AliEmergencyButton DPT:
      AliEmergencyButton.png

  • while in PARA, you might profit to add archive to the "isSafe" and "isSuperSafe" items, if desired.

Using the ASCII panel ( SystemManagement , Database , ASCII Manager ) import the following internal datapoints:

  • fwOT_AliDcsSafe_CU.dpl
  • fwOT_AliEmergencyButton_DU.dpl

When done, don't forget to restart the ctrl script xxx_safe/xxxSafe_EmergencyButton.ctl in the PVSS Console.

Follow the instructions to configure the FSM below.

Configuring the FSM

Open the Device Editor & Navigator (fwDEN) in the FSM tab:

  • in Navigation mode, stop the FSM
  • select the Editor mode

  • fwDEN.png

Create the new CU/DU

  • open Create/Configure FSM Object Types and verify that the following types have been installed:
    • Device Unit Types: AliEmergencyButton_DU
    • Logical Objects Types: AliDcsSafe_CU
  • below your top node, add a Control Unit of type AliDcsSafe _CU and call it XXX_SAFE
  • below the XXX_SAFE CU add a Device Unit of type AliEmergencyButton _DU. The name will be xxxEmergencyButton

  • FSM schema:
    FSM_states.png

Modify your top node as follows:

  • all the states shall react to commands GO_SAFE, GO_SUPERSAFE
    • whenever the GO_SAFE or GO_SUPERSAFE is simply an FSM action (like GO_BEAM_TUNING or GO_STBY_CONF), the code for the GO_SAFE/SUPERSAFE action can be copied from the existing action
      • for example, in READY state, for detectors with a SAFE state correspondent to BEAM_TUNING, the code for the GO_SAFE action can be copied/pasted from the GO_BEAM_TUN action

        GO_SAFE2.png
    • for detectors with a complex SAFE state, the action can be transferred to the Device Unit and use the existing EmergencyButton script

  • in ERROR, MOVING_READY, MOVING_BEAM_TUN, etc. the GO_SAFE and GO_SUPERSAFE codes should use the EmergencyButton device unit: propagate - do GO_SAFE $ALL$FwAliDcsSafe_CU

    GO_SAFE1.png

  • it's not necessary to insert the GO_SAFE/SUPERSAFE action in states below the supersfe condition (like OFF)

  • relevant states shall react to RESTORE_SAFE, RESTORE_READY commands
    • again, if these commands can simply be translated into FSM commands, they should be coded into the TOP NODE
    • if these commands require complex actions on the devices, they can be delegated to the Device Unit and executed through the EmergencyButton script (in this case, the actions shall be added to the CU and DU)

When done:

  • in Editor mode re-generate the FSM
  • in Navigation mode restart the FSM and check that it's working correctly

Modifying the EmergencyButton script and libraries

  • Modify the scripts\libs\xxx_safe\xxxSafe_GoSafeInstructions.ctl
    • add a function called xxxSafe_RestoreSafeActions (the following _empty_sample is provided)

int xxxSafe_RestoreSafeActions()
{
////////////////////////////////////////////////////
//write here the code to bring your detector back to safe state.
//BEGIN OF YOUR CODE
DebugN("EmergencyButton library: RESTORE_SAFE command received");
delay(4);//a delay just as example: remove it.
//END OF YOUR CODE
////////////////////////////////////////////////////
//do not delete this line:
return 0;
}

  • the library scripts\libs\xxx_safe\xxxSafe_GoSafeInstructions.ctl can stay unchanged.

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng AliEmergencyButton.png r1 manage 50.3 K 2013-06-10 - 09:13 OmbrettaPinazza AliEmergencyButton DPT
PNGpng FSM_states.png r1 manage 17.1 K 2013-06-11 - 17:35 OmbrettaPinazza FSM schema
PNGpng GO_SAFE1.png r1 manage 3.7 K 2013-06-10 - 09:14 OmbrettaPinazza GO_SAFE_1
PNGpng GO_SAFE2.png r1 manage 5.4 K 2013-06-10 - 09:14 OmbrettaPinazza GO_SAFE_2
PNGpng aliEmergencyButton_archive.png r1 manage 17.0 K 2013-06-10 - 09:13 OmbrettaPinazza xxxEmergencyButton archive
JPEGjpg detEmergencyButton.jpg r1 manage 116.5 K 2013-06-10 - 09:13 OmbrettaPinazza all detEmergencyButtons
PNGpng dptupe.png r1 manage 9.0 K 2013-06-10 - 09:14 OmbrettaPinazza AliDcsSafe DPT
PNGpng fwDEN.png r1 manage 22.8 K 2013-06-10 - 09:14 OmbrettaPinazza fwDEN
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2013-06-12 - OmbrettaPinazza
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback