- Timestamp:
- 01/14/11 09:19:09 (14 years ago)
- Location:
- fact/FADctrl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/FADctrl/FAD.cc
r10101 r10103 27 27 {"srclk", &FAD::cmd_srclk, true, 1, "<on|off>", "Set SRCLK"}, 28 28 {"sclk", &FAD::cmd_sclk, true, 1, "<on|off>", "Set SCLK"}, 29 {"trigger", &FAD::cmd_trigger, false, 0, "[n|cont|stop ]", "Issue software triggers"},29 {"trigger", &FAD::cmd_trigger, false, 0, "[n|cont|stop|enable|disable]", "Issue software triggers"}, 30 30 {"roi", &FAD::cmd_roi, true, 2, "<channel range> <value>", "Set region-of-interest to value"}, 31 31 {"dac", &FAD::cmd_dac, true, 2, "<range> <value>", "Set DAC numbers in range to value"}, 32 32 {"address", &FAD::cmd_address, true, 2, "<range> <value>", "Set addresses in range to value"}, 33 {"send", &FAD::cmd_send, true, 1, "<value>", "Se tarbitrary data to board"},33 {"send", &FAD::cmd_send, true, 1, "<value>", "Send arbitrary data to board"}, 34 34 {"acalib", &FAD::cmd_acalib, true, 0, "[n|invalidate|file]", "Perform or read amplitude calibration (n events)"}, 35 35 //{"wmode", &FAD::cmd_wmode, 0, "<run|stop>", "Domino wave running or stopped during read out"}, … … 206 206 } 207 207 208 209 208 // 210 209 // Switch SCLK … … 258 257 259 258 int Num; 260 259 261 260 for (unsigned int i=0; i<Boards.size(); i++) { 262 261 if (Parameter.size() == 1) Boards[i]->Send(CMD_Trigger); … … 269 268 else if (Match(Parameter[1],"continuous")) Boards[i]->Send(CMD_Trigger_C); 270 269 else if (Match(Parameter[1],"stop")) Boards[i]->Send(CMD_Trigger_S); 270 else if (Match(Parameter[1],"enable")) Boards[i]->Send(CMD_TRIGGERS_ON); 271 else if (Match(Parameter[1],"disable")) Boards[i]->Send(CMD_TRIGGERS_OFF); 271 272 else { 272 273 PrintUsage(); … … 274 275 } 275 276 } 277 if (Match(Parameter[1],"enable")) PrintMessage("all active boards accept now incoming triggers\n"); 278 else if (Match(Parameter[1],"disable")) PrintMessage("no active board accepts any incoming trigger anymore.\n"); 279 // else PrintUsage(); 280 281 276 282 } 277 283 … … 723 729 Status.push_back(Boards[Brd]->GetStatus()); 724 730 731 // Disarm first, in order to change ROI & DAC settings 732 //Boards[Brd]->Send(CMD_TRIGGERS_OFF); 733 725 734 // Set all ROI to 1024 726 735 Boards[Brd]->Send(&ROICmd[0], ROICmd.size()*sizeof(unsigned short)); … … 734 743 // Switch off SCLK 735 744 //Boards[Brd]->Send(CMD_SCLK_OFF); 745 746 // Arm again, in order to take data 747 //Boards[Brd]->Send(CMD_TRIGGERS_ON); 748 736 749 737 750 // Start accumulation … … 760 773 Boards[Brd]->Send(CMD_SCLK_ON); 761 774 775 // Disarm first, in order to change ROI & DAC settings 776 //Boards[Brd]->Send(CMD_TRIGGERS_OFF); 777 762 778 // Set second DAC value 763 764 765 779 DACCmd[1] = htons(50000); 780 DACCmd[3] = htons(50000); 781 DACCmd[5] = htons(50000); 766 782 Boards[Brd]->Send(DACCmd, sizeof(DACCmd)); 767 783 768 784 // Switch off SCLK 769 785 //Boards[Brd]->Send(CMD_SCLK_OFF); 786 787 // Arm again 788 //Boards[Brd]->Send(CMD_TRIGGERS_ON); 770 789 771 790 // Start accumulation -
fact/FADctrl/FAD.h
r10101 r10103 62 62 ~FAD(); 63 63 64 void cmd_exit();void cmd_help();65 void cmd_board();void cmd_status();66 67 68 void cmd_srclk();void cmd_sclk();69 void cmd_dwrite(); void cmd_domino();70 void cmd_wmode();void cmd_rmode();71 void cmd_dmode();void cmd_dac();72 void cmd_roi();void cmd_address();73 void cmd_phase();void cmd_send();74 void cmd_cancel(); void cmd_update();64 void cmd_exit(); void cmd_help(); 65 void cmd_board(); void cmd_status(); 66 void cmd_acalib(); void cmd_serial(); 67 void cmd_trigger(); void cmd_socketmode(); 68 void cmd_srclk(); void cmd_sclk(); 69 void cmd_dwrite(); void cmd_domino(); 70 void cmd_wmode(); void cmd_rmode(); 71 void cmd_dmode(); void cmd_dac(); 72 void cmd_roi(); void cmd_address(); 73 void cmd_phase(); void cmd_send(); 74 void cmd_cancel(); void cmd_update(); 75 75 76 76 void EnableDomino(); -
fact/FADctrl/FADFormat.h
r10036 r10103 26 26 #define CMD_Read 0x0A00 // read from Config-RAM 27 27 #define CMD_Write 0x0500 // write to Config-RAM 28 29 #define CMD_TRIGGERS_ON 0x1800 // enables the trigger line -- incoming triggers can now be accepted 30 #define CMD_TRIGGERS_OFF 0x1900 // disables the trigger line -- no trigger will be accepted 28 31 29 32 // -
fact/FADctrl/FADctrl.cc
r10101 r10103 75 75 DimClient::sendCommand(SERVER_NAME"/Command", "dwrite on"); 76 76 DimClient::sendCommand(SERVER_NAME"/Command", "roi all 1024"); 77 78 DimClient::sendCommand(SERVER_NAME"/Command", "trigger enable"); 77 79 78 80 M.PrintMessage("Finished initalizing all boards\n");
Note:
See TracChangeset
for help on using the changeset viewer.