#include /* module intrloc9 */ #include #include #include #include #include #include #include #include #include #include #include #include #include /* mods: 15oct03 - auxrf -> floor lowNoise -> shutter */ /*****************************************************************************/ intrlock(void) /* draw interlock diagram */ { char *list0[]= { "HVPS INTRLK SUM", "HVPS READY", "HVPS CONTACTOR", "MAG 1 CONTACTOR", "MAG 2 CONTACTOR", "FILA CONTACTOR", "CB TRIGGER PS", "TRIGGER REC A", "TRIGGER REC B", "CROWBAR BLOWER", "CROWBAR HEAT", "SHUTTER", "FLOOR", 0 }; int arc1,arc2,olarc1,olarc2; screen=3; clkey(); if(screen!=oldscrn) refresh=1; if(refresh) { clear(); /* clear entire screen */ oldayt[0]=0; font(0); text(PALEBLUE,50,479,"INTERLOCKS & ARCS"); txnumber(); text(PALEBLUE,80,410,"HEAT EXCHANGER A1"); text(PALEBLUE,80,310,"HEAT EXCHANGER A2"); text(PALEBLUE,80,210,"HEAT EXCHANGER A3"); tex(400,400,"DOME"); tex(360,240,"HVPS"); tex(360,360,"arc1"); tex(440,360,"arc2"); tex(360,330,"stick"); tex(440,330,"switch"); tex(380,195,"4160 V"); tex(380,180,"breaker"); tex(320,130,"stick"); tex(400,130,"switch"); list(540,270,20,list0); font(3); rect(WHITE,60,340,65,420); /* heat exchanger walls */ rect(WHITE,205,340,210,420); rect(WHITE,65,340,205,345); rect(WHITE,65,415,205,420); rect(WHITE,60,240,65,320); /* heat exchanger walls */ rect(WHITE,205,240,210,320); rect(WHITE,65,240,205,245); rect(WHITE,65,315,205,320); rect(WHITE,60,140,65,220); /* heat exchanger walls */ rect(WHITE,205,140,210,220); rect(WHITE,65,140,205,145); rect(WHITE,65,215,205,220); rect(WHITE,300,80,305,220); /* hvps side walls */ rect(WHITE,440,80,445,220); rect(WHITE,305,80,340,85); /* hvps end walls */ rect(WHITE,380,80,440,85); rect(WHITE,305,215,440,220); rect(WHITE,340,260,345,280); /* xmtr side walls */ rect(WHITE,340,360,345,380); rect(WHITE,480,260,485,380); rect(WHITE,340,260,480,265); /* xmtr end walls */ rect(WHITE,340,375,480,380); } if(refresh||((status[2]&0x02)!=(statup[2]&0x02))) { fan(95,365,status[2]&0x02,RED,GREEN); /* fan trio 1 */ fan(135,365,status[2]&0x02,RED,GREEN); fan(175,365,status[2]&0x02,RED,GREEN); } if(!(status[2]&0x02) &&(status[4]&0x10)) /* (RS) */ { runfan(95,365); /* animate */ runfan(135,365); runfan(175,365); } if(refresh||((status[2]&0x04)!=(statup[2]&0x04))) { fan(95,265,status[2]&0x04,RED,GREEN); /* fan trio 2 */ fan(135,265,status[2]&0x04,RED,GREEN); fan(175,265,status[2]&0x04,RED,GREEN); } if(!(status[2]&0x04) &&(status[4]&0x10)) /* (RS) */ { runfan(95,265); /* animate */ runfan(135,265); runfan(175,265); } if(refresh||((status[2]&0x08)!=(statup[2]&0x08))) { fan(95,165,status[2]&0x08,RED,GREEN); /* fan trio 3 */ fan(135,165,status[2]&0x08,RED,GREEN); fan(175,165,status[2]&0x08,RED,GREEN); } if(!(status[2]&0x08) &&(status[4]&0x10)) /* (RS) */ { runfan(95,165); /* animate */ runfan(135,165); runfan(175,165); } if(refresh||((status[8]&0x04)!=(statup[8]&0x04))) /* (RS)*/ { if(status[8]&0x04) /* tx door 1 intlk */ { line2(GREEN,340,280,340,320); /* closed */ line2(BLACK,340,280,330,310); /* erase open */ } else { line2(YELLOW,340,280,330,310); /* open */ line2(BLACK,340,280,340,320); /* erase closed */ } } if(refresh||((status[8]&0x04)!=(statup[8]&0x04))) /* (RS) */ { if(status[8]&0x04) /* tx door 2 intlk */ { line2(GREEN,340,360,340,320); /* closed */ line2(BLACK,340,360,330,330); /* erase open */ } else { line2(YELLOW,340,360,330,330); /* open */ line2(BLACK,340,360,340,320); /* erase closed */ } } if(refresh||((status[19]&0x04)!=(statup[19]&0x04))) { if(status[19]&0x04) /* hvps door interlock */ { line2(GREEN,340,80,380,80); /* closed */ line2(BLACK,340,80,370,70); /* erase open */ } else { line2(YELLOW,340,80,370,70); /* open */ line2(BLACK,340,80,380,80); /* erase */ } } if(refresh||((status[8]&0x40)!=(statup[8]&0x40))) ground(390,320,status[8]&0x40); /* dome ground stick */ if(refresh||((status[8]&0x80)!=(statup[8]&0x80))) ground(430,320,status[8]&0x80); /* dome ground switch */ if(refresh||((status[19]&0x01)!=(statup[19]&0x01))) breaker(350,170,status[19]&0x01); /* hvps ckt breaker */ if(refresh||((status[19]&0x10)!=(statup[19]&0x10))) ground(350,120,status[19]&0x10); /* hvps ground stick */ if(refresh||((status[19]&0x80)!=(statup[19]&0x80))) ground(390,120,status[19]&0x80); /* hvps ground switch */ if(refresh||((status[27]&0x80)!=(statup[27]&0x80))) /* (RS) */ swit(500,260,30,status[27]&0x80); /* hvps interlock */ if(refresh||((status[46]&0x01)!=(statup[46]&0x01))) /* (RS) */ swit(500,240,30,status[46]&0x01); /* hvps ready */ if(refresh||((status[19]&0x02)!=(statup[19]&0x02))) swit(500,220,30,status[19]&0x02); /* hvps contactor */ if(refresh||((status[20]&0x20)!=(statup[20]&0x20))) swit(500,200,30,status[20]&0x20); /* mag 1 contactor */ if(refresh||((status[20]&0x40)!=(statup[20]&0x40))) swit(500,180,30,status[20]&0x40); /* mag 2 contactor */ if(refresh||((status[20]&0x10)!=(statup[20]&0x10))) swit(500,160,30,status[20]&0x10); /* filament contactor */ if(refresh||((status[20]&0x08)!=(statup[20]&0x08))) swit(500,140,30,status[20]&0x08); /* crowbar trigger ps */ if(refresh||((status[22]&0x01)!=(statup[22]&0x01))) swit(500,120,30,status[22]&0x01); /* crowbar trigger rec A */ if(refresh||((status[22]&0x02)!=(statup[22]&0x02))) swit(500,100,30,status[22]&0x02); /* crowbar trigger rec 1B */ if(refresh||((status[20]&0x04)!=(statup[20]&0x04))) swit(500,80,30,status[20]&0x04); /* crowbar blower */ if(refresh||((status[20]&0x02)!=(statup[20]&0x02))) swit(500,60,30,status[20]&0x02); /* crowbar heater */ if(refresh||((status[9]&0x01)!=(statup[9]&0x01))) swit(500,40,30,status[9]&0x01); /* SHUUTER */ if(refresh||((status[9]&0x02)!=(statup[9]&0x02))) swit(500,20,30,status[9]&0x02); /* FLOOR */ arc1=(status[12]&0x20)||(status[18]&0x10); olarc1=(statup[12]&0x20)||(statup[18]&0x10); arc2=(status[12]&0x40)||(status[18]&0x20); olarc2=(statup[12]&0x40)||(statup[18]&0x20); if(refresh||(arc1!=olarc1)) arc(390,350,arc1); /* V1 arc */ if(refresh||(arc2!=olarc2)) arc(430,350,arc2); /* V2 arc */ refresh=0; oldscrn=screen; }