Fonction : Startup
Auteur : YS - 12/11/2003
Modifie : YS - 20/07/2007 : Sequence de demarrage pour Multi-process
Description : Fonction de demarrage d'application
Appele par : Citect au startup
___________________________________________________________________________*/
FUNCTION Startup()
INT hQueAS;
INT hQueRM;
INT hQueDD;
INT hQueMC;
INT hQueBASE;
INT hQueYS;
INT hQueAV;
INT hTaskAS;
INT hTaskRM;
INT hTaskDD;
INT hTaskMC;
INT hTaskBASE;
INT hTaskYS;
INT hTaskAV;
INT iStart;
STRING sStart;
INT hWnd;
ApplicationEnRun=0;
TaskNew("blink","",4+8); //lance la fonction pour clignotement d'un bit
TagWrite("MessPatientez","@(Patientez)");
Sleep(1);
AppSimulation= StrToInt( ParameterGet("SIDEL","Simulation",0)); // Forcage pour application de simulation
// On attend d'etre on-line avant de lancer les fonctions STARTUP.
IF AppSimulation=0 THEN
WHILE StrToInt(IODeviceInfo(8,3))1 DO //"ALARME"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(9,3))1 DO //"BOOLEEN"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(10,3))1 DO //"ENTIER"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(11,3))1 DO //"REEL"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(12,3))1 DO //"COURBE"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(13,3))1 DO //"LIAISON1"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(14,3))1 DO //"LIAISON2"
Sleep(1);
END
WHILE StrToInt(IODeviceInfo(15,3))1 DO //"OPC"
Sleep(1);
END
END
MaxWindows = StrToInt( ParameterGet("PAGE","Windows",16));
TaskNew("AttenteStartUp","",0+4);
hQueAS=QueOpen("AS_Start",2);
hQueRM=QueOpen("RM_Start",2);
hQueDD=QueOpen("DD_Start",2);
hQueMC=QueOpen("MC_Start",2);
hQueBASE=QueOpen("BASE_Start",2);
hQueYS=QueOpen("YS_Start",2);
hTaskAS=TaskNew("Startup_AS","",0+4);
hTaskRM=TaskNew("Startup_RM","",0+4);
hTaskDD=TaskNew("Startup_DD","",0+4);
hTaskMC=TaskNew("Startup_MC","",0+4);
hTaskBASE=TaskNew("Startup_BASE","",0+4);
hTaskYS=TaskNew("Startup_YS","",0+4);
IF AppSimulation=1 Then
hQueAV=QueOpen("AV_Start",2);
hTaskAV=TaskNew("Startup_AV","",0+4);
End
QueRead(hQueAS,iStart,sStart,1);
QueClose(hQueAS);
Sleep(0);
QueRead(hQueRM,iStart,sStart,1);
QueClose(hQueRM);
Sleep(0);
QueRead(hQueDD,iStart,sStart,1);
QueClose(hQueDD);
Sleep(0);
QueRead(hQueMC,iStart,sStart,1);
QueClose(hQueMC);
Sleep(0);
QueRead(hQueBASE,iStart,sStart,1);
QueClose(hQueBASE);
Sleep(0);
QueRead(hQueYS,iStart,sStart,1);
QueClose(hQueYS);
Sleep(0);
IF AppSimulation=1 Then
QueRead(hQueAV,iStart,sStart,1);
QueClose(hQueAV);
End
Beep(3);
PageDisplay("BANDEAU");
SleepMS(500);
hWnd=WndFind("Citect"); // La fenêtre Citect est ouverte ?
If hWnd>0 then
SendKeys("Citect","%{f4}"); //On ferme cette fenêtre.
End
EspionInfo("@(Demarrage de l'application)");
ApplicationEnRun=1;
END
/*___________________________________________________________________________
Fonction : AttenteStartUp
Auteur : YS - 13/11/2003
Modifie :
Description :
Appele par :
___________________________________________________________________________*/
FUNCTION AttenteStartUp()
INT Cpt=0;
WHILE ((TaskHnd("Startup")-1) AND (Cpt=TimeOut THEN
QueWrite(QueOpen("AS_Start",0),1,"A");
QueWrite(QueOpen("RM_Start",0),1,"A");
QueWrite(QueOpen("DD_Start",0),1,"A");
QueWrite(QueOpen("MC_Start",0),1,"A");
QueWrite(QueOpen("BASE_Start",0),1,"A");
QueWrite(QueOpen("YS_Start",0),1,"A");
QueWrite(QueOpen("AV_Start",0),1,"A");
END
END
Functie: opstartenAuteur: YS - 11/12/2003Wijzigingen: YS - 20/07/2007: Boot Sequence voor multi procesDescription: Toepassing opstarten, functieDoor genoemd: Citect bij het opstarten___________________________________________________________________________*/FUNCTIE Startup()INT hQueAS;INT hQueRM;INT hQueDD;INT hQueMC;INT hQueBASE;INT hQueYS;INT hQueAV;INT hTaskAS;INT hTaskRM;INT hTaskDD;INT hTaskMC;INT hTaskBASE;INT hTaskYS;INT hTaskAV;INT iStart;STRING sStart;INT hWnd; ApplicationEnRun = 0; TaskNew ("blink", "", 4 + 8); de functie voor het opvlammen van een beetje lanceert TagWrite ("MessPatientez", "@(wachten)"); Slaap (1); AppSimulation = StrToInt (ParameterGet ('SIDEL', 'Simulatie', 0)); Dwingen voor simulatie toepassing Verwacht dat on-line voordat de functies van het opstarten worden uitgevoerd. IF AppSimulation = 0 THEN TERWIJL StrToInt (IODeviceInfo (8.3)) 1 doen / / "Alarm" Slaap (1); EINDE "Terwijl StrToInt (IODeviceInfo (9.3)) 1 doen //"BOOLEEN " Slaap (1); EINDE TERWIJL StrToInt (IODeviceInfo (10.3)) 1 doen / / "Integer" Slaap (1); EINDE TERWIJL StrToInt (IODeviceInfo (11.3)) 1 doen / / "Echte" Slaap (1); EINDE TERWIJL StrToInt (IODeviceInfo (12.3)) 1 doen / / "Curve" Slaap (1); EINDE TERWIJL StrToInt (IODeviceInfo (13.3)) 1 doen //"LIAISON1" Slaap (1); EINDE TERWIJL StrToInt (IODeviceInfo (14.3)) 1 doen //"LIAISON2" Slaap (1); EINDE "Terwijl StrToInt (IODeviceInfo (15.3)) 1 doen //"OPC " Slaap (1); EINDE EINDE MaxWindows = StrToInt (ParameterGet("PAGE","Windows",16)); TaskNew ("AttenteStartUp", "", 0 + 4); hQueAS = QueOpen("AS_Start",2); hQueRM = QueOpen("RM_Start",2); hQueDD = QueOpen("DD_Start",2); hQueMC = QueOpen("MC_Start",2); hQueBASE = QueOpen("BASE_Start",2); hQueYS = QueOpen("YS_Start",2); hTaskAS = TaskNew("Startup_AS","",0+4); hTaskRM = TaskNew("Startup_RM","",0+4); hTaskDD = TaskNew("Startup_DD","",0+4); hTaskMC = TaskNew("Startup_MC","",0+4); hTaskBASE = TaskNew("Startup_BASE","",0+4); hTaskYS = TaskNew("Startup_YS","",0+4); IF AppSimulation = 1 Then hQueAV = QueOpen("AV_Start",2); hTaskAV = TaskNew("Startup_AV","",0+4); Einde QueRead(hQueAS,iStart,sStart,1); QueClose (hQueAS); Slaap (0); QueRead(hQueRM,iStart,sStart,1); QueClose (hQueRM); Slaap (0); QueRead(hQueDD,iStart,sStart,1); QueClose (hQueDD); Slaap (0); QueRead(hQueMC,iStart,sStart,1); QueClose (hQueMC); Slaap (0); QueRead(hQueBASE,iStart,sStart,1); QueClose (hQueBASE); Slaap (0); QueRead(hQueYS,iStart,sStart,1); QueClose (hQueYS); Slaap (0); IF AppSimulation = 1 Then QueRead(hQueAV,iStart,sStart,1); QueClose (hQueAV); Einde Pieptoon (3); Pageaffiche ("banner"); SleepMS (500); hWnd = WndFind ("Citect"); Het Citect-venster is geopend? Als hWnd > 0 then ToetsenVerzenden (SendKeys) ("Citect", "% {f4}"); We kunnen dit venster sluiten. Einde EspionInfo ("@(Demarrage de l'application)"); ApplicationEnRun = 1;EINDE/*___________________________________________________________________________Functie: AttenteStartUpAuteur: YS - 11/13/2003Wijzigingen: Beschrijving: Genoemd door: ___________________________________________________________________________*/FUNCTIE AttenteStartUp()INT Cpt = 0; TERWIJL ((TaskHnd("Startup")-1) en (Cpt = TimeOut THEN) QueWrite (QueOpen("AS_Start",0), 1, "A"); QueWrite (QueOpen("RM_Start",0), 1, "A"); QueWrite (QueOpen("DD_Start",0), 1, "A"); QueWrite (QueOpen("MC_Start",0), 1, "A"); QueWrite (QueOpen("BASE_Start",0), 1, "A"); QueWrite (QueOpen("YS_Start",0), 1, "A"); QueWrite (QueOpen("AV_Start",0), 1, "A"); EINDEEINDE
đang được dịch, vui lòng đợi..
Functie: InleidingAuteur: y - 12 - 11 - 2003Amendement 20: ys - 07 - proces van de inleiding van de procedureBeschrijving van de functie: het begin van de toepassingIn het begin van de kant van de telefoon:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ * /() de functie van startDe internationale hqueas;De internationale hquerm;De internationale hquedd;De internationale hquemc;De internationale hquebase;De internationale hqueys;De internationale hqueav;De internationale htaskas;De internationale htaskrm;De internationale htaskdd;De internationale htaskmc;De internationale htaskbase;De internationale htaskys;De internationale htaskav;De internationale istart;Het touw sstart;Int.;Applicationenrun = 0;Tasknew ("maar", 4 ± 8); / / / / / / / - de functie van een speer.Tagwrite ("messpatientez", "Wacht even");Slaap (1);Appsimulation = strtoint (parameterget ("het Westen", "model" 0); / / cultuur van de simulatie van toepassingWe wachten op de lijn van de door ons vóór het begin van de functie.Als appsimulation = 0.En strtoint (iodeviceinfo (8) / "waarschuwing"Slaap (1);Het weekendEn strtoint (iodeviceinfo (9) / "booleaanse "Slaap (1);Het weekendEn strtoint (iodeviceinfo (10,3) / "."Slaap (1);Het weekendEn strtoint (iodeviceinfo 11.3) / "echt"Slaap (1);Het weekendEn strtoint (iodeviceinfo (12.3) / curve "Slaap (1);Het weekendEn strtoint (iodeviceinfo (13.3) / "liaison1"Slaap (1);Het weekendEn strtoint (iodeviceinfo (14,3%) / "liaison2"Slaap (1);Het weekendEn strtoint (iodeviceinfo (15) "/ haar"Slaap (1);Het weekendHet weekendMaxwindows = strtoint (parameterget ("pagina "s", "ramen", 16);Tasknew ("attentestartup", 0 - 4);Hqueas = queopen ("je _ start", 2);Hquerm = queopen (RM _ start ", 2);Hquedd = queopen (dd _ start ", 2);Hquemc = queopen (MC _ start ", 2);Hquebase = queopen ("basis _ start", 2);Hqueys = queopen ("ys _ start", en 2);Htaskas = tasknew ("start", je _ "," 0 4);Htaskrm = tasknew ("van start _ rm", 0 - 4);Htaskdd = tasknew ("van start _ dd", 0 - 4);Htaskmc = tasknew ("van start _ MC", 0 - 4);Htaskbase = tasknew ("start", "_ basis", 0 - 4);Htaskys = tasknew ("van start _ ys", 0 - 4);Als appsimulation = 1.Hqueav = queopen ("av _ start", en 2);Htaskav = tasknew ("van start _ AV", 0 - 4);Het weekendQueread (hqueas, istart, sstart, 1);Queclose (hqueas);Slaap (0);Queread (hquerm, istart, sstart, 1);Queclose (hquerm);Slaap (0);Queread (hquedd, istart, sstart, 1);Queclose (hquedd);Slaap (0);Queread (hquemc, istart, sstart, 1);Queclose (hquemc);Slaap (0);Queread (hquebase, istart, sstart, 1);Queclose (hquebase);Slaap (0);Queread (hqueys, istart, sstart, 1);Queclose (hqueys);Slaap (0);Als appsimulation = 1.Queread (hqueav, istart, sstart, 1);Queclose (hqueav);Het weekendPiep (3);Pagedisplay ("blind");Sleepms (5);Wndfind (. = "kant van de kant van"); / / / / / / / het raam open?Als de. > 0, en("kant van sendkeys", "{}% f4); / / sluit het raam.Het weekendEspioninfo ("" (te beginnen met de toepassing) ");Applicationenrun = 1;Het weekend/ * _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Functie: attentestartupAuteur: y - 13 11 2003Tot wijziging van:Beschrijving:Telefoon:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ * /Attentestartup (functie)Int CPT = 0;Terwijl ((taskhnd ("start") - 1) en (CPT), stop dan.Quewrite (queopen ("je _ start", 1, 0), "");Quewrite (queopen (RM _ start ", 1, 0)," ");Quewrite (queopen (dd _ start ", 1, 0)," ");Quewrite (queopen (MC _ start ", 1, 0)," ");Quewrite (queopen (de "basis _ start", 1, 0), "");Quewrite (queopen ("ys _ start", 1, 0), "");Quewrite (queopen ("av _ start", 1, 0), "");Het weekendHet weekend
đang được dịch, vui lòng đợi..