V 10 1 LANG:1 8 (NoName) PANEL,218 100 876 319 N "hmpUserFrameBack" 1 "$sDpName" "main() { }" 0 E"main() { }" 0 E E 1 0 0 0 450 0 "" 0 1 E"#uses \"hmpBaselibrary.ctl\" #uses \"hmpCAENlibrary.ctl\" __setTableField(shape table,string Column, int row, dyn_dyn_string dsTag, dyn_dyn_float dfVal, string format, string elName, int set) { dyn_string tmp; int j; if(dynlen(dsTag) 0) sprintf( tmp[1], format, dfVal[set][j]); // contents else tmp[1] = \"empty\"; } tmp[2]=\"white\"; // Background tmp[3]=\"black\"; // Foreground table.cellValueRC(row,Column,tmp); } __LoadTable(string Type) { string root; int iModule; dyn_dyn_string dsDpEl; dyn_dyn_float dfValues; int i, row, j; string sLogicalName; dyn_errClass err; if(Type == \"HV\") { // Table init shape table=getShape(\"Table1\"); root = $sDpName; hmpBase_GetCoords(root, iModule, row, i, j); for(i=0;i<=5;i++){ sLogicalName = hmpBase_buildLogicalName(LDT_HVSEG,iModule,i,0); row = 5-i; // Keep the parameters values hmpCAEN_LoadFwCaenChannelStockTable(sLogicalName, dsDpEl, dfValues); __setTableField(table,\"VON\",row,dsDpEl,dfValues,\"%6d\",\"v0\",4); __setTableField(table,\"VINT\",row,dsDpEl,dfValues,\"%6d\",\"v0\",2); __setTableField(table,\"ION\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",5); __setTableField(table,\"IINT\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",3); __setTableField(table,\"IRUF\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",1); __setTableField(table,\"IRUH\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",4); __setTableField(table,\"IRUL\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",2); __setTableField(table,\"IRD\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",7); __setTableField(table,\"VSRUF\",row,dsDpEl,dfValues,\"%5d\",\"rUp\",1); __setTableField(table,\"VSRUL\",row,dsDpEl,dfValues,\"%5d\",\"rUp\",2); __setTableField(table,\"VSRUH\",row,dsDpEl,dfValues,\"%5d\",\"rUp\",4); __setTableField(table,\"VSRD\",row,dsDpEl,dfValues,\"%5d\",\"rDwn\",7); __setTableField(table,\"Trip\",row,dsDpEl,dfValues,\"%5d\",\"tripTime\",1); __setTableField(table,\"DELAY\",row,dsDpEl,dfValues,\"%3d\",\"delay\",1); } } else { // ---- GRID shape table=getShape(\"Table2\"); root = $sDpName; hmpBase_GetCoords(root, iModule, row, i, j); sLogicalName = hmpBase_buildLogicalName(LDT_HVGRID,iModule,0,0); row = 0; // Keep the parameters values hmpCAEN_LoadFwCaenChannelStockTable(sLogicalName, dsDpEl, dfValues); __setTableField(table,\"VON\",row,dsDpEl,dfValues,\"%6d\",\"v0\",4); __setTableField(table,\"VINT\",row,dsDpEl,dfValues,\"%6d\",\"v0\",2); __setTableField(table,\"ION\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",5); __setTableField(table,\"IINT\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",3); __setTableField(table,\"IRUF\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",1); __setTableField(table,\"IRUH\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",4); __setTableField(table,\"IRUL\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",2); __setTableField(table,\"IRD\",row,dsDpEl,dfValues,\"%8.3f\",\"i0\",7); __setTableField(table,\"VSRUF\",row,dsDpEl,dfValues,\"%5d\",\"rUp\",1); __setTableField(table,\"VSRUL\",row,dsDpEl,dfValues,\"%5d\",\"rUp\",2); __setTableField(table,\"VSRUH\",row,dsDpEl,dfValues,\"%5d\",\"rUp\",4); __setTableField(table,\"VSRD\",row,dsDpEl,dfValues,\"%5d\",\"rDwn\",7); __setTableField(table,\"Trip\",row,dsDpEl,dfValues,\"%5d\",\"tripTime\",1); __setTableField(table,\"DELAY\",row,dsDpEl,dfValues,\"%3d\",\"delay\",1); } }" 0 2 "CBRef""1" "EClose"E "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 1 LANG:1 6 Layer1 2 0 "txUnlocked" "" 1 660 4 E E E 1 E 1 E N "hmpUserFrameFore" E N "_Transparent" E E E E 1 0 0 0 0 0 EE E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 0 1 E U 0 E 662 6 858 32 0 2 0 "s" 0 0 0 64 0 0 662 6 1 1 LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-130-100-100-*-*-iso8859-1|-15,0,0,0,400,0,0,0,0,3,2,1,34,Arial 0 "" 1 LANG:1 25 Single Channel HV Setting 2 1 "txLocked" "" 1 660 4 E E E 1 E 0 E N "hmpUserFrameFore" E N "_Transparent" E E E E 2 0 0 0 0 0 EE E 0 1 LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 0 1 E U 0 E 662 6 858 32 0 2 0 "s" 0 0 0 64 0 0 662 6 1 1 LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-130-100-100-*-*-iso8859-1|-15,0,0,0,400,0,0,0,0,3,2,1,34,Arial 0 "" 1 LANG:1 17 Module HV Setting 13 2 "bnUnlocked" "" 1 630 4 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E E E 3 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New 0 "" 628 2 662 36 P 13434828 "pictures/lock_unlocked.bmp" 1 LANG:1 0 "main() { int i; shape table=getShape(\"Table1\"); for(i=1;i<=5;i++) { table.cellForeColRC(i,\"VON\",\"dunkelgrau\"); table.cellForeColRC(i,\"VINT\",\"dunkelgrau\"); table.cellForeColRC(i,\"ION\",\"dunkelgrau\"); table.cellForeColRC(i,\"IINT\",\"dunkelgrau\"); table.cellForeColRC(i,\"IRUF\",\"dunkelgrau\"); table.cellForeColRC(i,\"IRUH\",\"dunkelgrau\"); table.cellForeColRC(i,\"IRUL\",\"dunkelgrau\"); table.cellForeColRC(i,\"IRD\",\"dunkelgrau\"); table.cellForeColRC(i,\"VSRUF\",\"dunkelgrau\"); table.cellForeColRC(i,\"VSRUH\",\"dunkelgrau\"); table.cellForeColRC(i,\"VSRUL\",\"dunkelgrau\"); table.cellForeColRC(i,\"VSRD\",\"dunkelgrau\"); table.cellForeColRC(i,\"DELAY\",\"dunkelgrau\"); table.cellForeColRC(i,\"Trip\",\"dunkelgrau\"); } bnUnlocked.enabled = false; bnUnlocked.visible = false; bnLocked.enabled = true; bnLocked.visible = true; txUnlocked.visible = false; txLocked.visible = true; }" 0 E E E 13 3 "bnLocked" "" 1 630 4 E E E 0 E 0 E N "_3DText" E N "_3DFace" E E E E 4 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New 0 "" 628 2 662 36 P 13434828 "pictures/lock_red.bmp" 1 LANG:1 0 "main() { int i; shape table=getShape(\"Table1\"); for(i=1;i<=5;i++) { table.cellForeColRC(i,\"VON\",\"black\"); table.cellForeColRC(i,\"VINT\",\"black\"); table.cellForeColRC(i,\"ION\",\"black\"); table.cellForeColRC(i,\"IINT\",\"black\"); table.cellForeColRC(i,\"IRUF\",\"black\"); table.cellForeColRC(i,\"IRUH\",\"black\"); table.cellForeColRC(i,\"IRUL\",\"black\"); table.cellForeColRC(i,\"IRD\",\"black\"); table.cellForeColRC(i,\"VSRUF\",\"black\"); table.cellForeColRC(i,\"VSRUH\",\"black\"); table.cellForeColRC(i,\"VSRUL\",\"black\"); table.cellForeColRC(i,\"VSRD\",\"black\"); table.cellForeColRC(i,\"DELAY\",\"black\"); table.cellForeColRC(i,\"Trip\",\"black\"); } bnUnlocked.enabled = true; bnUnlocked.visible = true; bnLocked.enabled = false; bnLocked.visible = false; txUnlocked.visible = true; txLocked.visible = false; }" 0 E E E 25 4 "Table1" "" 1 -13 -20 E E E 1 E 1 E N "hmpDataInputFore" E N "hmpDataInputBack" E E E E 5 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 106 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Arial 0 "" 2 38 860 222 "main() { int i; shape table=getShape(\"Table1\"); for(i=0;i<=5;i++) table.appendLine(\"DELAY\",\"0\"); __LoadTable(\"HV\"); } " 0 "main(int row, string column, string value) { int i; string oldval; shape table=getShape(\"Table1\"); oldval = table.cellValueRC(row,column); if(bnLocked.enabled) { if(row > 0) table.cellValueRC(row,column,oldval); else for(i=0;i<=5;i++) table.cellValueRC(i,column,value); } }" 0 1 1 1 14 6 "VON" 0 1 -1 "s" 1 LANG:1 4 V On E1 LANG:1 0 55 "VINT" 0 1 -1 "s" 1 LANG:1 5 V Int E1 LANG:1 0 55 "ION" 0 1 -1 "s" 1 LANG:1 4 I On E1 LANG:1 0 55 "IINT" 0 1 -1 "s" 1 LANG:1 5 I Int E1 LANG:1 0 55 "IRUF" 0 1 -1 "s" 1 LANG:1 9 I RU Full E1 LANG:1 0 60 "IRUL" 0 1 -1 "s" 1 LANG:1 8 I RU Low E1 LANG:1 0 60 "IRUH" 0 1 -1 "s" 1 LANG:1 9 I RU High E1 LANG:1 0 60 "IRD" 0 1 -1 "s" 1 LANG:1 4 I RD E1 LANG:1 0 60 "VSRUF" 0 1 -1 "s" 1 LANG:1 7 V/s RUF E1 LANG:1 0 60 "VSRUL" 0 1 -1 "s" 1 LANG:1 7 V/s RUL E1 LANG:1 0 60 "VSRUH" 0 1 -1 "s" 1 LANG:1 7 V/s RUH E1 LANG:1 0 61 "VSRD" 0 1 -1 "s" 1 LANG:1 6 V/s RD E1 LANG:1 0 60 "Trip" 0 1 -1 "s" 1 LANG:1 7 Trip -s E1 LANG:1 0 50 "DELAY" 0 1 -1 "s" 1 LANG:1 5 Delay E1 LANG:1 0 50 25 25 "" 1 1 LANG:1 5 SEC 5 "" 1 1 LANG:1 5 SEC 4 "" 1 1 LANG:1 5 SEC 3 "" 1 1 LANG:1 5 SEC 2 "" 1 1 LANG:1 5 SEC 1 "" 1 1 LANG:1 5 SEC 0 8 51 1 LANG:1 106 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Arial 0 "" 0 0 0 3 0 1 0 13 6 "Button1" "" 1 140 270 E E E 1 E 1 E N "hmpUserFrameFore" E N "hmpUserFrameBack" E E E E 7 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,400,0,0,0,0,3,2,1,34,Arial 0 "" 138 268 262 302 T 1 LANG:1 11 Store Table "main() { dyn_errClass err; int i,row,iModule,j; dyn_string tmp; shape table=getShape(\"Table1\"); shape table2=getShape(\"Table2\"); dyn_string exceptionInfo; string root,sLogicalName; dyn_dyn_string dsDpEl; dyn_dyn_float dfValues; int res,numOfParam,extra; string root,sPrefix,stockVar; dyn_string ParName,ParType,ParDPE; dyn_dyn_string ParVal; root = $sDpName; hmpBase_GetCoords(root, iModule, row, i, j); for(i=0;i<=5;i++){ // sLogicalName = hmpBase_buildLogicalPathName(LDT_HVSEG,iModule,i,0); sLogicalName = hmpBase_buildLogicalName(LDT_HVSEG,iModule,i,0); row = 5-i; dynClear(dsDpEl); dynClear(dfValues); tmp = table.getLineN(row); dsDpEl[1] = makeDynString(\"v0\",\"i0\",\"rUp\",\"tripTime\",\"delay\"); dfValues[1] = makeDynFloat(tmp[1],tmp[5],tmp[9],tmp[13],tmp[14]); dsDpEl[2] = makeDynString(\"v0\",\"i0\",\"rUp\",\"tripTime\",\"delay\"); dfValues[2] = makeDynFloat(tmp[2],tmp[7],tmp[11],tmp[13],tmp[14]); dsDpEl[3] = makeDynString(\"i0\",\"delay\"); dfValues[3] = makeDynFloat(tmp[4],tmp[14]); dsDpEl[4] = makeDynString(\"v0\",\"i0\",\"rUp\",\"delay\"); dfValues[4] = makeDynFloat(tmp[1],tmp[6],tmp[10],tmp[14]); dsDpEl[5] = makeDynString(\"i0\",\"delay\"); dfValues[5] = makeDynFloat(tmp[3],tmp[14]); dsDpEl[6] = makeDynString(\"v0\",\"i0\",\"rDwn\",\"delay\"); dfValues[6] = makeDynFloat(tmp[2],tmp[8],tmp[12],tmp[14]); dsDpEl[7] = makeDynString(\"i0\",\"rDwn\",\"delay\"); dfValues[7] = makeDynFloat(tmp[8],tmp[12],tmp[14]); hmpCAEN_StoreFwCaenChannelStockTable(sLogicalName, dsDpEl, dfValues); } // sLogicalName = hmpBase_buildLogicalPathName(LDT_HVGRID,iModule,0,0); sLogicalName = hmpBase_buildLogicalName(LDT_HVGRID,iModule,0,0); row = 0; dynClear(dsDpEl); dynClear(dfValues); tmp = table2.getLineN(row); dsDpEl[1] = makeDynString(\"v0\",\"i0\",\"rUp\",\"tripTime\",\"delay\"); dfValues[1] = makeDynFloat(tmp[1],tmp[5],tmp[9],tmp[13],tmp[14]); dsDpEl[2] = makeDynString(\"v0\",\"i0\",\"rUp\",\"tripTime\",\"delay\"); dfValues[2] = makeDynFloat(tmp[2],tmp[7],tmp[11],tmp[13],tmp[14]); dsDpEl[3] = makeDynString(\"i0\",\"delay\"); dfValues[3] = makeDynFloat(tmp[4],tmp[14]); dsDpEl[4] = makeDynString(\"v0\",\"i0\",\"rUp\",\"delay\"); dfValues[4] = makeDynFloat(tmp[1],tmp[6],tmp[10],tmp[14]); dsDpEl[5] = makeDynString(\"i0\",\"delay\"); dfValues[5] = makeDynFloat(tmp[3],tmp[14]); dsDpEl[6] = makeDynString(\"v0\",\"i0\",\"rDwn\",\"delay\"); dfValues[6] = makeDynFloat(tmp[2],tmp[8],tmp[12],tmp[14]); dsDpEl[7] = makeDynString(\"i0\",\"rDwn\",\"delay\"); dfValues[7] = makeDynFloat(tmp[8],tmp[12],tmp[14]); hmpCAEN_StoreFwCaenChannelStockTable(sLogicalName, dsDpEl, dfValues); } " 0 E E E 25 7 "Table2" "" 1 -33 215 E E E 1 E 1 E N "hmpDataInputFore" E N "hmpDataInputBack" E E E E 7 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 106 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Arial 0 "" 2 230 860 262 "main() { shape table=getShape(\"Table2\"); table.appendLine(\"DELAY\",\"0\"); __LoadTable(\"Grid\"); }" 0 E 0 1 1 14 1 "VON" 0 1 -1 "s" 1 LANG:1 4 V On E1 LANG:1 0 55 "VINT" 0 1 -1 "s" 1 LANG:1 5 V Int E1 LANG:1 0 55 "ION" 0 1 -1 "s" 1 LANG:1 4 I On E1 LANG:1 0 55 "IINT" 0 1 -1 "s" 1 LANG:1 5 I Int E1 LANG:1 0 55 "IRUF" 0 1 -1 "s" 1 LANG:1 9 I RU Full E1 LANG:1 0 60 "IRUL" 0 1 -1 "s" 1 LANG:1 8 I RU Low E1 LANG:1 0 60 "IRUH" 0 1 -1 "s" 1 LANG:1 9 I RU High E1 LANG:1 0 60 "IRD" 0 1 -1 "s" 1 LANG:1 4 I RD E1 LANG:1 0 60 "VSRUF" 0 1 -1 "s" 1 LANG:1 7 V/s RUF E1 LANG:1 0 60 "VSRUL" 0 1 -1 "s" 1 LANG:1 7 V/s RUL E1 LANG:1 0 60 "VSRUH" 0 1 -1 "s" 1 LANG:1 7 V/s RUH E1 LANG:1 0 61 "VSRD" 0 1 -1 "s" 1 LANG:1 6 V/s RD E1 LANG:1 0 60 "Trip" 0 1 -1 "s" 1 LANG:1 7 Trip -s E1 LANG:1 0 50 "DELAY" 0 1 -1 "s" 1 LANG:1 5 Delay E1 LANG:1 0 50 25 25 "" 1 1 LANG:1 4 GRID 8 51 1 LANG:1 106 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Arial 0 "" 0 0 0 3 0 1 0 13 8 "Button2" "" 1 10 270 E E E 1 E 1 E N "hmpUserFrameFore" E N "hmpUserFrameBack" E E E E 8 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,400,0,0,0,0,3,2,1,34,Arial 0 "" 8 268 132 302 T 1 LANG:1 12 Reload Table "main() { __LoadTable(\"HV\"); __LoadTable(\"Grid\"); } " 0 E E E 13 9 "Button3" "" 1 760 270 E E E 1 E 1 E N "hmpUserFrameFore" E N "hmpUserFrameBack" E E E E 8 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,3,2,1,34,Arial 0 "" 758 268 862 302 T 1 LANG:1 5 CLOSE "// SimpleCtrlScriptStart {valid} main() { EP_panelOff(); } EP_panelOff() { PanelOff(); } // SimpleCtrlScript {EP_panelOff} // Function {PanelOff} // Panel {} // Module {} // SimpleCtrlScriptEnd {EP_panelOff} " 0 E E E 13 10 "Button4" "" 1 280 270 E E E 1 E 1 E N "hmpUserFrameFore" E N "hmpUserFrameBack" E E E E 8 0 0 0 0 0 EE E 0 1 LANG:1 0 0 1 LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,3,2,1,34,Arial 0 "" 278 268 492 302 T 1 LANG:1 23 STORE PARAM TO CHANNELS "main() { string state; int set,i,j,k,iModule; string Object; string Domain; string sLogName = \"\"; Domain = $sDpName; hmpBase_GetCoords(Domain, iModule, k, i, j); Object = hmpBase_buildFSMName(LDT_HVGRID,iModule,0,0); sLogName = hmpBase_buildLogicalName(LDT_HVGRID,iModule,0,0); // first get the actual FSM status fwDU_getState(Domain, Object, state); // and decide the set switch(state) { case \"ON\": set = 5; break; case \"OFF\": case \"TRIPPED\": set = 1; break; case \"INTERMEDIATE\": set = 3; break; default: return; break; } // Set the channel hmpCAEN_FwCaenChannelSetStock(sLogName,\"\",set,false); for(i=0;i<=5;i++) { Object = hmpBase_buildFSMName(LDT_HVSEG,iModule,i,0); sLogName = hmpBase_buildLogicalName(LDT_HVSEG,iModule,i,0); // first get the actual FSM status fwDU_getState(Domain, Object, state); // and decide the set switch(state) { case \"ON\": set = 5; break; case \"OFF\": case \"TRIPPED\": set = 1; break; case \"INTERMEDIATE\": set = 3; break; default: return; break; } // Set the channel hmpCAEN_FwCaenChannelSetStock(sLogName,\"\",set,false); } return; }" 0 E E E 0 LAYER, 1 1 LANG:1 6 Layer2 0 LAYER, 2 1 LANG:1 6 Layer3 0 LAYER, 3 1 LANG:1 6 Layer4 0 LAYER, 4 1 LANG:1 6 Layer5 0 LAYER, 5 1 LANG:1 6 Layer6 0 LAYER, 6 1 LANG:1 6 Layer7 0 LAYER, 7 1 LANG:1 6 Layer8 0 0