Changeset 16790 for trunk


Ignore:
Timestamp:
06/10/13 11:58:36 (11 years ago)
Author:
tbretz
Message:
Added a chck for the clock conditioner; ftmctrl should now be in Valid not anymore in Idle.
File:
1 edited

Legend:

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

    r16384 r16790  
    129129
    130130// -----------------------------------------------------------------
     131// Now we check the clock conditioner
     132// -----------------------------------------------------------------
     133
     134var sub_counter = new Subscription("FTM_CONTROL/COUNTER");
     135var counter = sub_counter.get(3000, false).counter;
     136dim.send("FTM_CONTROL/REQUEST_STATIC_DATA");
     137v8.timeout(3000, function() { if (sub_counter.get(0, false).counter>counter) return true; });
     138if (sub_counter.get(0, false).qos&0x100==0)
     139    throw new Error("Clock conditioner not locked.");
     140sub_counter.close();
     141
     142// -----------------------------------------------------------------
    131143// Now we can safely try to connect the FAD boards.
    132144// -----------------------------------------------------------------
     
    218230     dim.wait("FEEDBACK", "Connected", 60000);
    219231
    220      console.out("Calibration took "+(new Date()-now)+"ms");
     232     console.out("Calibration finished ["+(new Date()-now)+"ms]");
    221233
    222234     console.out("Wait for voltage to be off");
     
    272284 [ "LID_CONTROL",     [ "Open", "Closed"                  ] ],
    273285 [ "DRIVE_CONTROL",   [ "Armed", "Tracking", "OnTrack", "Locked" ] ],
    274  [ "FTM_CONTROL",     [ "Idle", "TriggerOn"               ] ],
     286 [ "FTM_CONTROL",     [ "Valid", "TriggerOn"              ] ],
    275287 [ "FAD_CONTROL",     [ "Connected", "WritingData"        ] ],
    276288];
     
    283295                    "happened...");
    284296}
    285 
    286 
Note: See TracChangeset for help on using the changeset viewer.