657,10 → 657,12 |
} |
if (gFp) { |
fp=gFp; |
} else { |
} |
else { |
if (append) { |
fp=fopen(filename,"ab"); |
} else { |
} |
else { |
fp=fopen(filename,"wb"); |
} |
} |
678,7 → 680,8 |
runinfo.writemode= towrite; |
sa02Printf("RUNINFO x0=%d nx=%d dx=%d\n", runinfo.x0,runinfo.dx,runinfo.nx); |
nbtotal+=fwrite(&runinfo, 1,sizeof(runinfo),fp); //gzip |
} else { |
} |
else { |
if (sa02Verbose) { |
sa02Printf("Data are not written to the file!\n"); |
} |
758,7 → 761,8 |
} |
if (towrite==3) { |
SetCtrlVal(p1h,P1_SETVALUE, chip*36+ch ); |
} else { |
} |
else { |
SetCtrlVal(p1h,P1_SETVALUE, data); |
} |
|
783,7 → 787,8 |
do { |
if (sendswtrg == 1) Sa02SoftwareTrigger(); |
nb = sa02Read(mask, &rdata[count+2] ); |
} while ( nb==0 && !ctrl_c); |
} |
while ( nb==0 && !ctrl_c); |
if (nb==0) sa02Printf("nb==0 LINE=%d\n",__LINE__); |
|
if (testfixeddata && nb>0) { |
802,7 → 807,8 |
ctrl_c = 1; |
system("date >> firmware.lock"); |
} |
} else { |
} |
else { |
readerror= 0; |
} |
|
858,7 → 864,8 |
if (nb==0) { |
nerrors++; |
//j--; /// kako potem pride cez zeljeno stevil ozadetkov? |
} else { |
} |
else { |
ncount++; |
} |
} |
897,7 → 904,8 |
ch-=36; |
chip++; |
} |
} else { |
} |
else { |
data += dstep; |
} |
if (ctrl_c ) { |
1212,7 → 1220,8 |
do { |
if (sendswtrg==1) Sa02SoftwareTrigger(); |
nb = sa02Read(mask, data ); |
} while ( nb==0 && !ctrl_c); |
} |
while ( nb==0 && !ctrl_c); |
if (nb==0) sa02Printf("nb==0 LINE=%d\n",__LINE__); |
|
if (ctrl_c==1) break; |
1563,11 → 1572,12 |
retval=sa02Cmd(board, FEB_VTH1 , k , chip, channel ,1, response); |
val=sa02Cmd(board, FEB_ADC_READ, data, chip, channel ,1,response); |
if (sa02BoardType>2) |
doubleval = (2*((val & 0xFFF) + 0.5)/0x1000 - 1.) * 3.3; |
doubleval = sa02adc2Vm(val); |
else |
doubleval = ((val & 0xFFF) + 0.5)/0x1000 * 3.3; |
|
|
doubleval = sa02adc2V(val); |
// doubleval = (2*((val & 0xFFF) + 0.5)/0x1000 - 1.) * 3.3; |
// else |
// doubleval = ((val & 0xFFF) + 0.5)/0x1000 * 3.3; |
H1DFillBin(h1+board, k, doubleval); |
if (t!=told || k==kmax-1 ||k==0 ) { |
H1DDraw(h1+board,p1h, P1_GRAPH, &phandle[board]); |
1661,7 → 1671,8 |
switch (cmd & (~ FEB_RO)) { |
case FEB_ADC_READ: |
case FEB_ADC_RESET: |
doubleval = ((val & 0xFFF) + 0.5)/0x1000 * 3.3; |
doubleval = sa02adc2V(val); |
// doubleval = ((val & 0xFFF) + 0.5)/0x1000 * 3.3; |
sa02Printf("ADC %f, 0x%08x\n", doubleval, val ) ; |
break; |
case FEB_TMON1: |
1682,9 → 1693,11 |
val=sa02Cmd(board, FEB_MUX, val, 0, 0 ,1,response); |
val=sa02Cmd(board, FEB_ADC_READ, 0, 0, 0, 1,response); |
if (sa02BoardType>2) |
doubleval = (2*((val & 0xFFF) + 0.5)/0x1000 - 1.) * 3.3; |
doubleval = sa02adc2Vm(val); |
// doubleval = (2*((val & 0xFFF) + 0.5)/0x1000 - 1.) * 3.3; |
else |
doubleval = ((val & 0xFFF) + 0.5)/0x1000 * 3.3; |
doubleval = sa02adc2V(val); |
// doubleval = ((val & 0xFFF) + 0.5)/0x1000 * 3.3; |
sa02Printf("%5d %6.3f\n",data, doubleval); |
break; |
case SA0x_ASIC0_GREG: |
1808,7 → 1821,8 |
break; |
} |
h2=0; |
} else { |
} |
else { |
switch (control) { |
case P2_PRINTXY: |
id= P2_GRAPH_1; |
1827,7 → 1841,8 |
sa02Printf("H2D image saved as %s\n", dfile); |
sprintf(name ,"C:\\root\\bin\\root.exe ..\\macros\\H2Dload.cxx(\\\"%s\\\")", dfile); |
LaunchExecutable(name); |
} else { |
} |
else { |
sprintf(dfile ,"data/%d_%d_%d_%d_%d_%s.bmp",year,month,day,hours,minutes, name ); |
SaveCtrlDisplayToFile (panel,id, 0, -1, -1, dfile); |
sa02Printf("bmp image saved as %s\n", dfile); |
1957,7 → 1972,8 |
GetCtrlVal(panel,ctrlID, &ch); |
if (ch) { |
H3DDrawSliceXY(100+board,ch-1,panel,graph, plot); |
} else { |
} |
else { |
H2DDraw(100+board,panel,graph, plot); |
} |
} |
1990,7 → 2006,8 |
monrec.imon[ii] = buf[2]*1000;//zapisano v nA |
monrec.vset[ii] = buf[3]*1000;//zapisano v mV |
monrec.iset[ii] = buf[4]*1000;//zapisano v nA |
} else { |
} |
else { |
buf[0]=(unsigned short) (channels[ii]<<8) | ReadStatus; |
if (gCAEN_V288) { |
V288_Send(0,SYS403mid,1,buf); |
2158,7 → 2175,8 |
if (scanunitsx) { |
H2DSetTitleX(hxy+i,"x (channels)"); |
H3DSetTitleX(hxy+i,"x (channels)"); |
} else { |
} |
else { |
H2DSetTitleX(hxy+i,"x (stage steps)"); |
H3DSetTitleX(hxy+i,"x (stage steps)"); |
} |
2165,7 → 2183,8 |
if (scanunitsy) { |
H2DSetTitleY(hxy+i,"y (channels)"); |
H3DSetTitleY(hxy+i,"y (channels)"); |
} else { |
} |
else { |
H2DSetTitleY(hxy+i,"y (stage steps)"); |
H3DSetTitleY(hxy+i,"y (stage steps)"); |
} |
2174,7 → 2193,8 |
if (runrec.direction) { |
ny = runrec.ny; |
nx = runrec.nx; |
} else { |
} |
else { |
ny = runrec.nx; |
nx = runrec.ny; |
} |
2194,7 → 2214,8 |
if (scanunitsy) { |
if (posrec.yset>5) { |
addgap=gapy * fx; |
} else { |
} |
else { |
addgap=0; |
} |
posrec.yset = (int32_t)(y0+dy *fx * posrec.yset + addgap); |
2207,13 → 2228,15 |
|
SetCtrlVal (p2h, P2_Y, posrec.yset); |
SetCtrlVal (p2h, P2_IY, posrec.iy); |
} else { |
} |
else { |
posrec.ix = iy; |
posrec.xset=runrec.x0+posrec.ix*runrec.dx; |
if (scanunitsx) { |
if (posrec.xset>5) { |
addgap=gapx * fx; |
} else { |
} |
else { |
addgap=0; |
} |
posrec.xset = (int32_t)(x0+dx *fx * posrec.xset + addgap); |
2235,7 → 2258,8 |
if (scanunitsx) { |
if (posrec.xset>5) { |
addgap=gapx * fx; |
} else { |
} |
else { |
addgap=0; |
} |
posrec.xset = (int32_t)(x0+dx *fx * posrec.xset + addgap); |
2247,13 → 2271,15 |
} |
SetCtrlVal (p2h, P2_X, posrec.xset); |
SetCtrlVal (p2h, P2_IX, posrec.ix); |
} else { |
} |
else { |
posrec.iy = ix; |
posrec.yset=runrec.y0+posrec.iy*runrec.dy; |
if (scanunitsy) { |
if (posrec.yset>5) { |
addgap=gapy * fx; |
} else { |
} |
else { |
addgap=0; |
} |
posrec.yset = (int32_t)(y0+dy *fx * posrec.yset + addgap); |
2317,7 → 2343,8 |
for (k=0; k<4; k++) sa02Printf(" CNTR%d=%d (ERR=%d)\t",k,c[k],e[k]); |
sa02Printf("\nsa02Read bytes = %d mask=%d neve=%d (%d # %d)\n", nb, mask, runrec.nev, Sa02GetNeve( &inputtriggers ) , inputtriggers); |
*/ |
} while ( nb==0 && !ctrl_c); |
} |
while ( nb==0 && !ctrl_c); |
|
|
|
2357,7 → 2384,8 |
if (dsave) { |
if (Random(0,1)<fraction) { |
writeevents=1; |
} else { |
} |
else { |
writeevents=0; |
} |
if (writeevents) { |
2392,7 → 2420,8 |
for (board=0; board<4; board++) { |
if (ch) { |
H3DDrawSliceXY(hxy+board,ch,p2h, p2graph[board], &p2plothandle[board]); |
} else { |
} |
else { |
H2DDraw(hxy+board,p2h, p2graph[board], &p2plothandle[board]); |
} |
} |
2463,7 → 2492,8 |
monrec.imon[i] = buf[2]*1000;//zapisano v nA |
monrec.vset[i] = buf[3]*1000;//zapisano v mV |
monrec.iset[i] = buf[4]*1000;//zapisano v nA |
} else { |
} |
else { |
buf[0]=(unsigned short) (channels[i]<<8) | ReadStatus; |
if (gCAEN_V288) { |
V288_Send(0,SYS403mid,1,buf); |
2504,7 → 2534,8 |
sprintf(name ,"%s -f %d",palaser, val); |
sa02Printf("%s\n", name); |
system(name); |
} else { |
} |
else { |
GetCtrlVal (p5h, P5_DAC_OFF, &val); |
sprintf(name ,"%s -p %d",palaser, val); |
sa02Printf("%s\n", name); |
2539,7 → 2570,8 |
else if(buf[0]&0x1E) { |
sa02Printf("status: 0x%x\n",buf[0]); |
return -1; |
} else sa02Printf("status: 0x%x\n",buf[0]); |
} |
else sa02Printf("status: 0x%x\n",buf[0]); |
Delay(2); |
buf[0]=(unsigned short) (channel<<8) | ReadOperationalParam; |
V288_Send(0,N470mid,1,buf); |
3042,7 → 3074,8 |
gUirCtrlMap[gNUirCtrlMap].id = ctrlid; |
gUirCtrlMap[gNUirCtrlMap].handle = GetPanelHandle(ctrl); |
gNUirCtrlMap++; |
} else { |
} |
else { |
sa02Printf("ERROR: Increase gNUirCtrlMap\n"); |
} |
} |
3099,7 → 3132,8 |
if (count > 0) { |
newlen = strlen(new); |
retlen = orglen + (newlen - oldlen) * count; |
} else retlen = orglen; |
} |
else retlen = orglen; |
ret = malloc(retlen + 1); |
if (ret == NULL) { |
goto end_repl_str; |
3108,7 → 3142,8 |
if (count == 0) { |
/* If no matches, then just duplicate the string. */ |
strcpy(ret, str); |
} else { |
} |
else { |
/* Otherwise, duplicate the string whilst performing |
* the replacements using the position cache. */ |
pret = ret; |
3169,7 → 3204,8 |
char srun[16]; |
sprintf(srun,"%04d",runno); |
line = str_replace(buf,"%RUN%", srun); |
} else { |
} |
else { |
line = buf; |
} |
sa02Printf("#[%d] %s",strlen(buf),buf); |
3188,20 → 3224,35 |
GetCtrlAttribute (pID, rID, ATTR_DATA_TYPE, &datatype); |
|
switch (datatype){ |
case VAL_INTEGER: SetCtrlVal (pID, rID, atoi(paramValue)); break; |
case VAL_UNSIGNED_INTEGER: SetCtrlVal (pID, rID, strtoul(paramValue,NULL,0)); break; |
case VAL_SHORT_INTEGER: SetCtrlVal (pID, rID, atoi(paramValue)); break; |
case VAL_UNSIGNED_SHORT_INTEGER: SetCtrlVal (pID, rID, strtoul(paramValue,NULL,0)); break; |
case VAL_DOUBLE : SetCtrlVal (pID, rID, atof(paramValue)); break; |
case VAL_STRING : SetCtrlVal (pID, rID, paramValue ); break; |
default: sa02Printf("[%s] ATTR_DATA_TYPE of the %s not supported datatype %d p4h=%d\n\n", type, param, datatype, p4h); |
case VAL_INTEGER: |
SetCtrlVal (pID, rID, atoi(paramValue)); |
break; |
case VAL_UNSIGNED_INTEGER: |
SetCtrlVal (pID, rID, strtoul(paramValue,NULL,0)); |
break; |
case VAL_SHORT_INTEGER: |
SetCtrlVal (pID, rID, atoi(paramValue)); |
break; |
case VAL_UNSIGNED_SHORT_INTEGER: |
SetCtrlVal (pID, rID, strtoul(paramValue,NULL,0)); |
break; |
case VAL_DOUBLE : |
SetCtrlVal (pID, rID, atof(paramValue)); |
break; |
case VAL_STRING : |
SetCtrlVal (pID, rID, paramValue ); |
break; |
default: |
sa02Printf("[%s] ATTR_DATA_TYPE of the %s not supported datatype %d p4h=%d\n\n", type, param, datatype, p4h); |
} |
//sa02Printf("[%s] SetCtrlVal %s %s panel=%d control=%d\n",type,param, paramValue,pID,rID); |
} else { |
} |
else { |
sa02Printf("[%s] Invalid Ctrl %s %s panel=%d control=%d\n",type,param, paramValue,pID,rID); |
} |
|
} else if (strstr(type,"2D")!=NULL) { |
} |
else if (strstr(type,"2D")!=NULL) { |
sscanf(line,"%*s%d%d%d%d%d%d%d%d%d%d%d%s",&scx,&nx,&xstep,&xmin,&scy,&ny,&ystep,&ymin,&direction,&nevents,&tresh,outputFileSuffix); |
sprintf(test,"%d %d %d %d %d %d %d %d %d %d %d %s *\n",scx,nx,xstep,xmin,scy,ny,ystep,ymin,direction,nevents,tresh,outputFileSuffix); |
sa02Printf("%s *\n\n",test); |
3225,7 → 3276,8 |
|
daq_scan(NULL); |
|
} else if (strstr(type,"Delay")!=NULL) { |
} |
else if (strstr(type,"Delay")!=NULL) { |
int idelay=0; |
sscanf(line,"%*s%s",paramValue); |
for (idelay=atoi(paramValue) ; idelay>0; idelay--) { |
3234,7 → 3286,8 |
ProcessSystemEvents(); |
if (ctrl_c) break; |
} |
} else if (strstr(type,"ThresholdLinearity")!=NULL) { |
} |
else if (strstr(type,"ThresholdLinearity")!=NULL) { |
char *fname; |
uint16_t mask = GetConnectedFebMask(); |
|
3249,13 → 3302,15 |
fclose(fpout); |
} |
|
} else if (strstr(type,"LaunchExecutable")!=NULL) { |
} |
else if (strstr(type,"LaunchExecutable")!=NULL) { |
int index = FindPattern (line, 0, -1, "LaunchExecutable", 0, 0) + 17; |
|
char *cmd = &line[index]; |
sa02Printf("cmd %d=%s\n",index, cmd); |
if (strlen(cmd)>0) LaunchExecutable( cmd ); |
} else if (strstr(type,"CAEN_V729")!=NULL) { |
} |
else if (strstr(type,"CAEN_V729")!=NULL) { |
char *fname; |
//FILE *fpmon=NULL; |
|
3269,7 → 3324,8 |
V729_daq(NULL); |
fclose(fpout); |
} |
} else if (strstr(type,"HvMonitor")!=NULL) { |
} |
else if (strstr(type,"HvMonitor")!=NULL) { |
int nrepetitions; |
int delaytime; |
int k=0; |
3308,24 → 3364,29 |
if (ctrl_c) break; |
} |
fclose(fpmon); |
} else { |
} |
else { |
sa02Printf("%s cannot open file %s\n",param, paramValue ); |
} |
|
} else if (strstr(type,"GetRunNumberFromFile")!=NULL) { |
} |
else if (strstr(type,"GetRunNumberFromFile")!=NULL) { |
sscanf(line,"%*s%s",paramValue); |
runno = GetRunNumberFromFile(paramValue); |
SetCtrlVal(p1h, P1_RUNNO, runno); |
sa02Printf("%s %s run=>%d\n",type, paramValue, runno ); |
} else if (strstr(type,"IncreaseNumberInFile")!=NULL) { |
} |
else if (strstr(type,"IncreaseNumberInFile")!=NULL) { |
sscanf(line,"%*s%s",paramValue); |
runno = IncreaseRunNumberInFile(paramValue); |
sa02Printf("%s %s run=>%d\n",type, paramValue, runno ); |
SetCtrlVal(p1h, P1_RUNNO, runno); |
} else if (strstr(type,"LoadParameters")!=NULL) { |
} |
else if (strstr(type,"LoadParameters")!=NULL) { |
LoadParameters(p3h, P3_LOADPAR,EVENT_COMMIT,NULL,0,0); |
sa02Printf("Loading parameters *\n\n"); |
} else if (strstr(type,"QueueUserEvent")!=NULL || strstr(type,"ProcessUserEvent")!=NULL) { |
} |
else if (strstr(type,"QueueUserEvent")!=NULL || strstr(type,"ProcessUserEvent")!=NULL) { |
char scontrol[0xFF]; |
int panelHandle=0; |
int controlID; |
3336,7 → 3397,8 |
if (panelHandle>=0 && controlID >=0 ) { |
if (strstr(type,"ProcessUserEvent")!=NULL) { |
ProcessUserEvent(panelHandle, controlID,0); |
} else { |
} |
else { |
data[1] = controlID; |
data[0] = panelHandle; |
|
3344,7 → 3406,8 |
} |
} |
|
} else if (strstr(type,"SetPositionAndMux")!=NULL) { |
} |
else if (strstr(type,"SetPositionAndMux")!=NULL) { |
int ix,iy; |
sscanf(line,"%*s%d%d",&ix,&iy); |
sa02Printf("SetPositionAndMux %d %d \n", ix,iy); |
3353,7 → 3416,8 |
SetCtrlVal (p2h, P2_CHY, iy); |
SetPositionAndMux( p2h,0, EVENT_COMMIT , NULL,0,0); |
|
} else if (strstr(type,"Treshold")!=NULL) { |
} |
else if (strstr(type,"Treshold")!=NULL) { |
sscanf(line,"%*s%s",outputFileSuffix); |
|
GetCtrlVal (p1h, P1_SERIAL_1, HAPDserialNumber); |
3364,29 → 3428,36 |
sa02Printf("%s *\n\n", test); |
|
daq(NULL); |
} else if (strstr(type,"Fitanje")!=NULL) { |
} |
else if (strstr(type,"Fitanje")!=NULL) { |
FitH2DCoarse(p3h, P3_CALIBRATION_2,EVENT_COMMIT,NULL,0,0); |
sa02Printf("Coarse fit parameters *\n\n"); |
} else if (strstr(type,"UploadChannelParameters")!=NULL) { |
} |
else if (strstr(type,"UploadChannelParameters")!=NULL) { |
UploadChannelParameters(p3h, P3_CPARLOAD,EVENT_COMMIT,NULL,0,0); |
sa02Printf("Loading channel parameters *\n\n"); |
} else if (strstr(type,"KalibracijaMizice")!=NULL) { |
} |
else if (strstr(type,"KalibracijaMizice")!=NULL) { |
SetHome(p2h, P2_HO,EVENT_COMMIT,NULL,0,0); |
SetCtrlVal(p2h,P2_XC,gCENTER_X); |
SetCtrlVal(p2h,P2_YC,gCENTER_Y); |
sa02Printf("Calibration *\n\n"); |
} else if (strstr(type,"LaserHVOn")!=NULL) { |
} |
else if (strstr(type,"LaserHVOn")!=NULL) { |
set_dac(1); |
sa02Printf("Low intensity laser *\n\n"); |
} else if (strstr(type,"LaserHVOff")!=NULL) { |
} |
else if (strstr(type,"LaserHVOff")!=NULL) { |
set_dac(0); |
sa02Printf("High intensity laser *\n\n"); |
} else if (strstr(type,"Gain")!=NULL) { |
} |
else if (strstr(type,"Gain")!=NULL) { |
sscanf(line,"%*s%d",paramValue); |
sprintf(test," %d", atoi(paramValue)); |
sa02Printf("%s *\n\n", test); |
changeGlobalParam(12, atoi(paramValue)); // Global parameter Gain has ID 12 |
} else if (strstr(type,"ShapingTime")!=NULL) { |
} |
else if (strstr(type,"ShapingTime")!=NULL) { |
sscanf(line,"%*s%s",paramValue); |
sprintf(test," %d", atoi(paramValue)); |
sa02Printf("%s *\n\n", test); |
3625,13 → 3696,16 |
imin= trange.top - 1; |
imax= imin + trange.height; |
|
} else { |
} |
else { |
if (!GetActiveTableCell(p3h, P3_GREG, &cell)) { |
imin = cell.y-1; |
imax = imin; |
} else return 0; |
} |
} else { |
else return 0; |
} |
} |
else { |
imin=0; |
imax=4*4; |
} |
3699,16 → 3773,20 |
imin= trange.top-1; |
imax= imin + trange.height; |
|
} else { |
} |
else { |
if (!GetActiveTableCell(p3h, P3_CREG, &cell)) { |
imin = cell.y-1; |
imax = imin+1; |
} else return 0; |
} |
} else if ((panel==p1h)&&(control==P1_CHPARLOAD)) { |
else return 0; |
} |
} |
else if ((panel==p1h)&&(control==P1_CHPARLOAD)) { |
GetCtrlVal(p1h,P1_NSLIX,&imin); |
imax=imin+1; |
} else { |
} |
else { |
imin=0; |
imax=144*4; |
} |
3920,13 → 3998,16 |
if (x>0) { |
if (x - ix > 0.5 ) { |
return ix+1; |
} else { |
} |
else { |
return ix; |
} |
} else { |
} |
else { |
if (x - ix < -0.5 ) { |
return ix-1; |
} else { |
} |
else { |
return ix; |
} |
} |
4173,7 → 4254,8 |
|
if (value==2) { |
value=0x7600; |
} else { |
} |
else { |
value=0; |
} |
VME_A32D32_W(address+4,value); // enable outputs |
4306,7 → 4388,8 |
spar=scanpar-10; |
nch=4*4; |
|
} else { |
} |
else { |
cid=P3_CREG; |
spar=scanpar; |
nch=144*4; |
4543,7 → 4626,8 |
EVENT_TP_THREAD_FUNCTION_END, |
NULL, RUN_IN_SCHEDULED_THREAD, |
&tfID); |
} else { |
} |
else { |
mythread(NULL); |
} |
} |
4672,6 → 4756,7 |
if (gVME_CONTROLLER == WIENER_VMEMM) sprintf( title, "%s + WIENER_VMEMM", title ); |
if (gVME_CONTROLLER == WIENER_VMUSB) sprintf( title, "%s + WIENER_VMUSB", title ); |
if (gVME_CONTROLLER == CAEN_V1718) sprintf( title, "%s + CAEN_V1718", title ); |
if (gVME_CONTROLLER == SIS3153_USB) sprintf( title, "%s + SIS3153_USB", title ); |
if (gCAEN_V1495) sprintf( title, "%s + CAEN_V1495", title ); |
if (gCAEN_V288 ) sprintf( title, "%s + CAEN_V288", title ); |
|
4709,7 → 4794,8 |
do { |
GetUserEvent (1, &pID, &rID); |
ProcessUserEvent(pID,rID,1); |
} while (loop_on); |
} |
while (loop_on); |
|
CmtDiscardThreadPool (poolHandle); |
DiscardPanel (p4h); |
4821,7 → 4907,8 |
return -1; |
} |
(c == 0xff) ? dummyword++ : (dummyword=0); |
} while( dummyword < 4 ); |
} |
while( dummyword < 4 ); |
|
if( mode == SLAVESERIAL_MODE ) { |
if(verbose) sa02Printf("slave serial mode"); |
4835,7 → 4922,8 |
sa02Printf( "#"); |
} |
} |
} else if( mode == SELECTMAP_MODE ) { |
} |
else if( mode == SELECTMAP_MODE ) { |
if( verbose ) sa02Printf("select map mode\n"); |
Pts_write( addr + ADR_MODE, SELECTMAP_MODE ); |
Pts_erase( addr, verbose ); |
4857,7 → 4945,8 |
} |
} |
VME_MWEXEC(); |
} else { |
} |
else { |
if(verbose) { |
sa02Printf( "\nIllegal mode\n"); |
|
4880,7 → 4969,8 |
if(csr1_value&CSR1_DONE) { |
if(verbose) sa02Printf("configure complete.\n"); |
return 1; |
} else { |
} |
else { |
if(verbose) sa02Printf("configure not complete."); |
return -1; |
} |
4903,7 → 4993,8 |
GetCtrlVal(p3h,P3_PTSMODE,&mode); |
if(VME_CONNECTED() >=0 ) { |
Pts_configure_bit( addr , filename, mode, 1 ); |
} else { |
} |
else { |
MessagePopup ("Warning", "Connect VME!!"); |
} |
break; |