Changeset 10969 for fact/FADctrl/FADBoard.cc
- Timestamp:
- 06/10/11 08:23:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/FADctrl/FADBoard.cc
r10813 r10969 168 168 169 169 vector<unsigned short> ROICmd; 170 unsigned short DACCmd[] = {htons(CMD_Write | (BADDR_DAC + 1)), 0, htons(CMD_Write | (BADDR_DAC + 2)), 0, htons(CMD_Write | (BADDR_DAC + 3)), 0 };170 unsigned short DACCmd[] = {htons(CMD_Write | (BADDR_DAC + 1)), 0, htons(CMD_Write | (BADDR_DAC + 2)), 0, htons(CMD_Write | (BADDR_DAC + 3)), 0, htons(CMD_Execute) }; 171 171 string Message = string("ACALIBDONE")+Name+"\n"; 172 172 … … 183 183 InitialStatus = GetStatus(); 184 184 185 Send(CMD_TRIGGERS_OFF);186 usleep(500000);187 188 185 for (unsigned int i=0; i<NChips*NChannels; i++) { 189 186 ROICmd.push_back(htons(CMD_Write | (BADDR_ROI + i))); 190 187 ROICmd.push_back(htons(NBins)); 191 188 } 189 ROICmd.push_back(htons(CMD_Execute)); 192 190 Send(&ROICmd[0], ROICmd.size()*sizeof(unsigned short)); 193 191 194 195 196 192 DACCmd[1] = htons(0); 193 DACCmd[3] = htons(0); 194 DACCmd[5] = htons(0); 197 195 Send(DACCmd, sizeof(DACCmd)); 198 199 Send(CMD_TRIGGERS_ON);200 196 201 197 // Clear sum vector and set state to accumulate … … 335 331 case cleanup: 336 332 // ROI values 337 Send(CMD_TRIGGERS_OFF);338 usleep(100000);339 333 340 334 ROICmd.clear(); … … 343 337 ROICmd.push_back(htons(InitialStatus.ROI[i/NChannels][i%NChannels])); 344 338 } 339 ROICmd.push_back(htons(CMD_Execute)); 345 340 Send(&ROICmd[0], ROICmd.size()*sizeof(unsigned short)); 346 341 347 Send(CMD_TRIGGERS_ON);348 349 342 // DAC values 350 351 352 343 DACCmd[1] = htons(InitialStatus.DAC[1]); 344 DACCmd[3] = htons(InitialStatus.DAC[2]); 345 DACCmd[5] = htons(InitialStatus.DAC[3]); 353 346 Send(DACCmd, sizeof(DACCmd)); 354 347
Note:
See TracChangeset
for help on using the changeset viewer.