Changeset 14998 for trunk


Ignore:
Timestamp:
03/09/13 11:07:02 (12 years ago)
Author:
tbretz
Message:
Worked around the problem that sometimes (reason still to be found) obj['status'] is undefined; wait for the Rate control to really get to Idle afte a DRS calibration; throw an error rather than printing an error message. we are not yet there that we do not have to alarm the shifters by a red exception message; slightly increased the timeout after a STOP has been sent to the drive (it seems 3s was not enough, although I do not understand why it could take 4.2s, but it did); added Ramping state to the list of allowed states. That's not ideal, but it is pretty unlikely that the system is errornously in Ramping. This can only happen if somebody manually interacts with the system
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/Main.js

    r14973 r14998  
    8989service_con.onchange = function(evt)
    9090{
     91    // This happens, but why?
     92    if (!evt.obj['status'])
     93        return;
     94
    9195    this.reset = [ ];
    9296
     
    247251
    248252    dim.send("RATE_CONTROL/STOP"); // get out of GlobalThresholdSet
     253    dim.wait("RATE_CONTROL", "Connected", 3000);
    249254
    250255    console.out("  DRS cal: end");
     
    425430if (!checkStates(table, 10000))
    426431{
    427     console.out("Something unexpected has happened. Although the startup-",
     432    throw new Error"Something unexpected has happened. Although the startup-",
    428433            "procedure has finished, not all servers are in the state",
    429434            "in which they ought to be. Please, try to find out what",
    430435            "happened...");
    431     exit();
    432436}
    433437
     
    620624    case "RATESCAN":
    621625        console.out("  RATESCAN  ");
    622        
     626
    623627        dim.send("DRIVE_CONTROL/STOP");
    624         dim.wait("DRIVE_CONTROL", "Armed", 3000);
    625        
     628        dim.wait("DRIVE_CONTROL", "Armed", 5000);
     629
    626630        if (obs.source != undefined)
    627631            dim.send("DRIVE_CONTROL/TRACK_ON", obs.source);
     
    637641        // this part might be simply wrong here, since I should be able to expect
    638642        // the system to be able for data taking. And if not, then it is not here,
    639         // to bring the system into a better state, correct? 
     643        // to bring the system into a better state, correct?
     644
     645        // [TB] Either here the system have to be brought to the correct state, or
     646        //      it has to be ensured that the previous code brought the system to a correct
     647        //      state. In this case checkStates could be used (but is a bit of obsolete)
     648        //      Doing non-throwing checks without checking the return value does not make
     649        //      sense at all.
    640650        dim.wait("FEEDBACK", "CurrentControl", -100);
    641651        dim.wait("BIAS_CONTROL", "VoltageOn", -100);
     
    672682    // ------------------------------------------------------------
    673683
     684    // Checking for 'Ramping' in the BIAS_CONTROL is not ideal, but at the moment
     685    // it is not possible to distinguish between a real ramping and the short
     686    // ramping which takes place whenever the feedback updated the voltages.
     687
    674688    console.out("  Checking states [mainloop]");
    675689    var table =
     
    680694         [ "SMART_FACT"    ],
    681695         [ "DATA_LOGGER",     [ "NightlyFileOpen", "WaitForRun", "Logging" ] ],
    682          [ "FSC_CONTROL",     [ "Connected"                    ] ],
    683          [ "MCP",             [ "Idle"                         ] ],
    684          [ "TIME_CHECK",      [ "Valid"                        ] ],
    685          [ "PWR_CONTROL",     [ "SystemOn"                     ] ],
    686          [ "AGILENT_CONTROL", [ "VoltageOn"                    ] ],
    687          [ "BIAS_CONTROL",    [ "VoltageOff", "VoltageOn"                   ] ],
    688          [ "FEEDBACK",        [ "CurrentCtrlIdle", "CurrentControl" ] ],
    689          [ "RATE_SCAN",       [ "Connected"                    ] ],
    690          [ "RATE_CONTROL",    [ "Connected", "InProgress"                    ] ],
    691          [ "LID_CONTROL",     [ "Open", "Closed"               ] ],
    692          [ "DRIVE_CONTROL",   [ "Armed", "Tracking", "OnTrack" ] ],
    693          [ "FTM_CONTROL",     [ "Idle", "TriggerOn"            ] ],
    694          [ "FAD_CONTROL",     [ "Connected", "WritingData"     ] ],
     696         [ "FSC_CONTROL",     [ "Connected"                                ] ],
     697         [ "MCP",             [ "Idle"                                     ] ],
     698         [ "TIME_CHECK",      [ "Valid"                                    ] ],
     699         [ "PWR_CONTROL",     [ "SystemOn"                                 ] ],
     700         [ "AGILENT_CONTROL", [ "VoltageOn"                                ] ],
     701         [ "BIAS_CONTROL",    [ "VoltageOff", "VoltageOn", "Ramping"       ] ],
     702         [ "FEEDBACK",        [ "CurrentCtrlIdle", "CurrentControl"        ] ],
     703         [ "RATE_SCAN",       [ "Connected"                                ] ],
     704         [ "RATE_CONTROL",    [ "Connected", "InProgress"                  ] ],
     705         [ "LID_CONTROL",     [ "Open", "Closed"                           ] ],
     706         [ "DRIVE_CONTROL",   [ "Armed", "Tracking", "OnTrack"             ] ],
     707         [ "FTM_CONTROL",     [ "Idle", "TriggerOn"                        ] ],
     708         [ "FAD_CONTROL",     [ "Connected", "WritingData"                 ] ],
    695709        ];
    696710
    697711    if (!checkStates(table))
    698712    {
    699         throw new Error("Something unexpected has happened. One of the servers"+
    700                         "is in a state in which it should not be. Please,"+
     713        //dim.alarm("System inconsistent");
     714        //dim.alarm();
     715        throw new Error("Something unexpected has happened. One of the servers "+
     716                        "is in a state in which it should not be. Please, "+
    701717                        "try to find out what happened...");
    702718    }
Note: See TracChangeset for help on using the changeset viewer.