Ignore:
Timestamp:
06/10/11 08:23:22 (13 years ago)
Author:
neise
Message:
support for Firmware Version 0200
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FADBoard.cc

    r10813 r10969  
    168168
    169169  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) };
    171171  string Message = string("ACALIBDONE")+Name+"\n";
    172172
     
    183183        InitialStatus = GetStatus();
    184184
    185         Send(CMD_TRIGGERS_OFF);
    186         usleep(500000);
    187 
    188185        for (unsigned int i=0; i<NChips*NChannels; i++) {
    189186          ROICmd.push_back(htons(CMD_Write | (BADDR_ROI + i)));
    190187          ROICmd.push_back(htons(NBins));
    191188        }
     189        ROICmd.push_back(htons(CMD_Execute));
    192190        Send(&ROICmd[0], ROICmd.size()*sizeof(unsigned short));
    193191
    194     DACCmd[1] = htons(0);
    195     DACCmd[3] = htons(0);
    196     DACCmd[5] = htons(0);
     192        DACCmd[1] = htons(0);
     193        DACCmd[3] = htons(0);
     194        DACCmd[5] = htons(0);
    197195        Send(DACCmd, sizeof(DACCmd));
    198 
    199         Send(CMD_TRIGGERS_ON);
    200196
    201197        // Clear sum vector and set state to accumulate
     
    335331  case cleanup:
    336332    // ROI values
    337         Send(CMD_TRIGGERS_OFF);
    338         usleep(100000);
    339333
    340334        ROICmd.clear();
     
    343337          ROICmd.push_back(htons(InitialStatus.ROI[i/NChannels][i%NChannels]));
    344338        }
     339        ROICmd.push_back(htons(CMD_Execute));
    345340        Send(&ROICmd[0], ROICmd.size()*sizeof(unsigned short));
    346341
    347         Send(CMD_TRIGGERS_ON);
    348 
    349342        // DAC values
    350     DACCmd[1] = htons(InitialStatus.DAC[1]);
    351     DACCmd[3] = htons(InitialStatus.DAC[2]);
    352     DACCmd[5] = htons(InitialStatus.DAC[3]);
     343        DACCmd[1] = htons(InitialStatus.DAC[1]);
     344        DACCmd[3] = htons(InitialStatus.DAC[2]);
     345        DACCmd[5] = htons(InitialStatus.DAC[3]);
    353346        Send(DACCmd, sizeof(DACCmd));
    354347       
Note: See TracChangeset for help on using the changeset viewer.