1 / 12

On line updating of the number of devices in the defined states (a.k.a. Majority)

On line updating of the number of devices in the defined states (a.k.a. Majority). CMS DCS Meeting Nov. 7 2008 Lorenzo Masetti. Typical problems of FSM logic (I). A control system must usually cope with two types of information Operational state (“are the devices on?”)

heman
Download Presentation

On line updating of the number of devices in the defined states (a.k.a. Majority)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. On line updating of the number of devices in the defined states (a.k.a. Majority) CMS DCS Meeting Nov. 7 2008 Lorenzo Masetti

  2. Typical problems of FSM logic (I) • A control system must usually cope with two types of information • Operational state (“are the devices on?”) • Fault detection (“is there any problem?”) • Combining these two types of information in a single state can lead to a loss of information about the ‘operational state’ when an error is triggered Lorenzo Masetti

  3. Typical problems of FSM logic (II) • Loss of quantitative information • A single channel in ERROR could bring the system in ERROR state • How can we introduce some tolerance? • Using the majority from one level to another does not work because the nodes must be weighted according to the number of devices they control Lorenzo Masetti

  4. Possible solution • The FSM logic can be integrated with an additional quantitative information about the number of devices in basic states • The computed information • Can just be displayed • Can be summarized in a state that then can be used in the FSM (as a Device Unit) Lorenzo Masetti

  5. Configuration (I) • Determine the device types of your system you need to count • For each device type define the basic states: • Example 1: LV channel • OFF / ON • NOT IN ERROR / ERROR • Example 2: HV channel • OFF / ON • NOT IN ERROR / ERROR • SET TO LOWER VOLTAGE / SET TO HIGHER VOLTAGE • Example 3: temperature probe • OK / OUT OF LIMITS Lorenzo Masetti

  6. Configuration (II) • The user should write a generic function that (exactly as in the DU) is called on change of certain datapoint elements • Instead than returning a STATE, the function returns an array of state counts. • For example if for one channel the possible states are on and error, then [1, 0] -> ON channel; [0,0] -> OFF channel; [0, 1] -> channel in ERROR • A script uses this function and keeps updated the number of devices in each state (plus the total number of devices) at each level • The script takes into account the inclusion in the FSM tree Lorenzo Masetti

  7. What you get • Based on the values computed by the user functions, the algorithm keeps updated in each node: • The number of devices in each state • The total number of devices • For example in the tracker: • ctrl:on, ctrl:error • lv:on, lv:error • hv:on, hv:error • Total number of (included) ctrl, lv, hv • Percentages are automatically computed Lorenzo Masetti

  8. Configuration (III) • Another user functions computes a state depending on the percentages • This state can then be used in a Device Unit and integrated in the FSM hierarchy • The majority makes use of a cache for visiting the FSM tree • Much faster than normal fwCU* and FwFsmTree* functions • This functionality is also available as a separate library and can be used in any panel or script to speed up all the operations that require a visit of the FSM tree. Lorenzo Masetti

  9. Criteria for using majority Suited for large and homogeneous systems If the system is built of two independent systems (LV and HV), two independent configurations can be used and then combined with usual FSM logic Lorenzo Masetti

  10. Implementation ΔP = ΔP + Δ2 ΔP = ΔP + Δ1 • The leaves (Device Units) compute the difference from their previous state • Start to propagate up the change • In each thread: • Update ΔP • Wait a timeout • If ΔP has been changed by another thread, leave • If not changed propagate up the Δ • A maximum number of rejected threads is introduced to ensure that the topmost nodes are eventually updated ΔP has not changed: go up ΔP has changed: exit ΔP =0 =5 =7 wait wait Parent Δ1 =5 Δ2 =2 =0 =0 Child1 Child2 • Including and excluding: • Handled with the same algorithm

  11. User function example Configuration Callback

  12. Example of majority panel for the Tracker

More Related