DAS  3.1.6 - 18/09/2017
RTC_Time.c
Go to the documentation of this file.
1 #include <fcntl.h>
2 #include <process.h>
3 #include <io.h>
4 #include <math.h>
5 #include <sys\stat.h>
6 #include <time.h>
7 #include <stdio.h>
8 #include <sys/types.h>
9 #include <sys/timeb.h>
10 #include <string.h>
11 #include <windows.h>
12 #include <stdlib.h>
13 #include <errno.h>
14 #include "mgui.h"
15 #include "DAS_Spatram.h"
16 #include "dcl.h"
17 #include "wsc.h"
18 #include "dxl.h"
19 #include "solpos.h"
20 #include "bil.h"
21 #include "dil.h"
22 
23 
25 flag FLAG; //flags structure
26 //cpl CPL; //Control Panel
27 //lis LIS; //LIS
28 stepm STEPM; //Stepper Motors
33 
35 
37 
38 char ddmmyy[8];
39 char ddmmyyf[6];
40 extern int Incr_Read_Temp;
41 extern int ExeREM;
42 
43 
44 /* Trasforma la data da mm/gg/aa a gg/mm/aa */
45 void FormatData(void)
46 {
47  int k, x, i;
48  char datebuf[9];
49  char dday[2], dmonth[2], dyear[2];
50 
51 
52  _strdate(datebuf);
53  k = 0;
54  x = 0;
55  for(i = 0; i < 9; i++)
56  {
57  if(i<2)
58  {
59  dmonth[i] = datebuf[i];
60  }
61 
62  if(i > 2 && i < 5)
63  {
64  dday[k] = datebuf[i];
65  k++;
66  }
67  if(i > 5 && i < 8)
68  {
69  dyear[x] = datebuf[i];
70  x++;
71  }
72  }
73  sprintf(ddmmyy,"%c%c/%c%c/%c%c", dday[0],dday[1],dmonth[0],dmonth[1],dyear[0],dyear[1]);
74 }
75 
76 /* Trasforma la data da mm/gg/aa a ggmmaa per i nomi dei files */
77 void FormatDataFile(void)
78 {
79  int k, x, i;
80  char datebuf[9];
81  char dday[2], dmonth[2], dyear[2];
82 
83  _strdate(datebuf);
84  k = 0;
85  x = 0;
86  for(i = 0; i < 9; i++)
87  {
88  if(i<2)
89  {
90  dmonth[i] = datebuf[i];
91  }
92 
93  if(i > 2 && i < 5)
94  {
95  dday[k] = datebuf[i];
96  k++;
97  }
98  if(i > 5 && i < 8)
99  {
100  dyear[x] = datebuf[i];
101  x++;
102  }
103  }
104 
105  sprintf(ddmmyyf,"%c%c%c%c%c%c", dday[0],dday[1],dmonth[0],dmonth[1],dyear[0],dyear[1]);
106 
107 
108 }
109 
110 //Elabora la data per avere il file di log
111 void FileLog(char datebuf[9], char timebuf[9])
112 {
113 
114  _strdate(datebuf);
115  _strtime(timebuf);
116  FormatDataFile();
117 }
118 
119 //Elabora la data per avere il file di Misure Giornaliero
120 void FileDat(void)
121 {
122 // int k, x, i;
123 // char datebuf[9];
124 // char dday[2], dmonth[2], dyear[2];
125 /*
126  _strdate(datebuf);
127  k = 0;
128  x = 0;
129  for(i = 0; i < 9; i++)
130  {
131  if(i<2)
132  {
133  dmonth[i] = datebuf[i];
134  }
135 
136  if(i > 2 && i < 5)
137  {
138  dday[k] = datebuf[i];
139  k++;
140  }
141  if(i > 5 && i < 8)
142  {
143  dyear[x] = datebuf[i];
144  x++;
145  }
146  }
147  sprintf(sd,"%c%c%c%c%c%c", dday[0],dday[1],dmonth[0],dmonth[1],dyear[0],dyear[1]);
148  Status(filedati);
149  return SaveDate
150  */
151 }
152 
153 
154 
155 
156 //Scrive sul file giornaliero ("ddmmyy.log"), la data e
157 //l'ora di inizio del programma
158 void WriteInit(const char *sname, char *dateffn, char *timebuff)
159 {
160  int fc, er;
161  char tit1[256], datebuff[9];
162 
163 
164  //for stepper motors log
165  sprintf(DLOG.fsmlog,"%s\\SM_%s.log", BIL.DFILEM.LOGDIR, dateffn);
166 
167 
168 
169  sprintf(DLOG.flog,"%s\\%s%s.log",BIL.DFILEM.LOGDIR, sname, dateffn);
170 
171  fc = _open(DLOG.flog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
172  //test for errno
173  //fc = _open(DLOG.flog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT| O_EXCL, S_IWRITE);
174 
175 
176  if(fc < 0)
177  {
178  er = errno;
179  }return;
180 
181  sprintf(datebuff,"%c%c/%c%c/%c%c", dateffn[0],dateffn[1],dateffn[2],dateffn[3],dateffn[4],dateffn[5]);
182  sprintf(tit1,"DAS Started on: %s, at: %s\n",datebuff,timebuff);
183  write(fc, &tit1, strlen(tit1));
184  // Write title for monitored values
185  sprintf(tit1,"Time TCCD PwCCD PwPlt T.Optic T.IntSX T.OutSX T.IntDX T.OutDX T.Grat SPARE T.Elec SPARE SPARE SPARE SPARE SPARE SPARE SPARE SPARE \n");
186  write(fc, &tit1, strlen(tit1));
187 
188  close(fc);
189 }
190 
191 void WriteTitolo(void)
192 {
193  int fc;
194  char tit1[90];
195 
196 
197 
198  fc = open(DLOG.flog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
199  if(fc < 0) return;
200  sprintf(tit1,"Time TCCD PwCCD PwPlt T.Optic T.IntSX T.OutSX T.IntDX T.OutDX T.Grat SPARE T.Elec SPARE SPARE SPARE SPARE SPARE SPARE SPARE SPARE \n");
201  write(fc, &tit1, strlen(tit1));
202  close(fc);
203 }
204 
205 
207 {
208 
209  char str[16];
210  float azi, elev;
211 
212  sprintf(str, "%.01lf", (90 + S_zenetr) );
213  elev = (float)atof(str);
214 
215  sprintf(str, "%.01lf", S_azim);
216  azi = (float)atof(str);
217 
218  SD_PosAADev(elev, azi);
219 
220 }
221 
222 void MIGESunTrack(void)
223 {
224 
225  char str[16];
226  float azi, elev;
227 
228  sprintf(str, "%.01lf", (90 - S_zenetr));
229  elev = (float)atof(str);
230 
231  sprintf(str, "%.01lf", S_azim);
232  azi = (float)atof(str);
233 
234 // azi= MIGEActualZenAz(0);
235 // elev= MIGEActualZenAz(1);
236 
237  SD_PosAADev(elev, azi);
238 
239 
240 
241 
242 
243 }
244 
245 
246 void Task_LOG(TIMEOUT_ID id, void *data)
247 {
248  int fc;
249  int cont;
250  char str[80];
251  char tit1[256];
252 // time_t ltime;
253  struct tm today;
254  struct time RTime;
255  struct date RDate;
256 
257  GetDateTime(&RDate, &RTime, &today);
258  /* Get UNIX-style time */
259  //time( &ltime );
260  /* Use time structure to build a customized time string. */
261  //today = localtime( &ltime );
262  /* Use strftime to build a customized time string. */
263  strftime( DLOG.ndate, 7,"%y%m%d", &today );
264  strftime( DLOG.ntime, 9,"%H:%M:%S", &today );
265 
266  // If the date is changed, the log filename changes...
267  if(strcmp(DLOG.ndate, DLOG.odate) != 0)
268  {
269  sprintf(DLOG.odate, "%s",DLOG.ndate);
270  sprintf(DLOG.flog,"%s\\%s%s.log", BIL.DFILEM.LOGDIR, DAS.DGeo.s_name, DLOG.ndate);
271 
272  //for stepper motors log
273  sprintf(DLOG.fsmlog,"%s\\SM_%s.log", BIL.DFILEM.LOGDIR, DLOG.ndate);
274 
275  fc = open(DLOG.flog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
276  if(fc < 0) return;
277 
278  // Write title for monitored values
279  sprintf(tit1,"Time TCCD PwCCD PwPlt T.Optic T.IntSX T.OutSX T.IntDX T.OutDX T.Grat SPARE T.Elec SPARE SPARE SPARE SPARE SPARE SPARE SPARE SPARE \n");
280  write(fc, tit1, strlen(tit1));
281  close(fc);
282 
283  SZA_FindMin(); //...and the minimum daily SZA is calculate...
284 
285  ShutterOpening(1);// ...and write on the Shutter.ini the number of shuts
286 
287  }
288 
289  fc = open(DLOG.flog, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
290  if(fc > 0)
291  {
292 
293  sprintf(str, "%s ",DLOG.ntime); //Time
294  write(fc, str, strlen(str));
295 
296  sprintf(str, "%5.1lf ", DAS.Marconi.CCDTemp); // Temperature CCD
297  //MObjectGetText(DAS.Gui.ContrPanel.Albl_CS[0], str);
298  //strcat(str," ");
299  write(fc, str, strlen(str));
300 
301  MObjectGetText(DAS.Gui.ContrPanel.Albl_CS[1], str); //Power CCD
302  strcat(str," ");
303  write(fc, str, strlen(str));
304 
305  MObjectGetText(DAS.Gui.ContrPanel.Albl_LS[7], str); //Power Peltier
306  strcat(str," ");
307  write(fc, str, strlen(str));
308 
309 
310 
311  for(cont = 15; cont >= 0; cont--)
312  {
313 
314  sprintf(str, "%5.1lf ", OMUTHR.Temperature[cont]);
315  write(fc, str, strlen(str));
316  }
317 
318  sprintf(str, "\n","");
319  write(fc, str, strlen(str));
320 
321  //sprintf(str, "%5.1lf %d %2d:%02d:%02d\n\r",Temp, CoolPw, t.ti_hour, t.ti_min, t.ti_sec);
322  //write(fc, str, strlen(str));
323 
324  }
325 
326  close(fc);
327 
328 
329 
330 
331 
332  if(!FLAG.AMS_H)
333  MAddTimeout(LOG_TASK_TIME, Task_LOG, data); // rilancia il task
334 }
335 
336 int FTP_Back_UP(char *dirhome, char *dirdata)
337 {
338  int er = 0, l;
339  char COMANDO[_MAX_PATH];
340  char buff[_MAX_PATH];
341 
342  char dailydir[6];
343  FILE *fd;
344  dailydir[0] = '\0';
345 
346 
347 
348  if(dirdata[0] != 0)
349  {
350 
351 
352  l = strlen(dirdata);
353  sprintf(dailydir, "%s", dirdata + (l - 6));
354 
355  sprintf(buff, "%s\\Config\\%s", dirhome, "DataTransf.txt");
356  fd = fopen(buff, "w");
357 
358  if(fd == NULL)
359  {
360  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
361  return 1;
362  }
363 
364  sprintf(buff, "%s\n", DFTP.ftpuser);
365  fprintf(fd,buff);
366 
367  sprintf(buff, "%s\n", DFTP.ftppwd);
368  fprintf(fd,buff);
369 
370  sprintf(buff, "%s\n", "bi");
371  fprintf(fd,buff);
372 
373  buff[0] = '\0';
374  sprintf(buff, "mkdir %s\n", dailydir);
375  fprintf(fd,buff);
376 
377  buff[0] = '\0';
378  sprintf(buff, "cd %s\n", dailydir);
379  fprintf(fd,buff);
380 
381  if(DAS.DOption.savingmode)
382  {
383  sprintf(buff, "mput %s\\*.bif\n", dirdata);
384  fprintf(fd,buff);
385  }
386  else
387  {
388  sprintf(buff, "mput %s\\*.dat\n", dirdata);
389  fprintf(fd,buff);
390 
391  }
392 
393  buff[0] = '\0';
394  sprintf(buff, "cd ..\n");
395  fprintf(fd,buff);
396 
397 
398  //Log file
399  buff[0] = '\0';
400  sprintf(buff, "%s\\Log\\%s%s.log\n", dirhome, BIL.SPH.location,dailydir);
401  fprintf(fd,buff);
402 
403 
404 
405  sprintf(buff, "%s\n", "quit");
406  fprintf(fd,buff);
407 
408  fclose(fd);
409 
410 
411  COMANDO[0] = '\0';
412 
413  //Write Command file
414  sprintf(buff, "%s\\Config\\%s", dirhome, "DataTransf.txt");
415 
416  sprintf(COMANDO, "ftp -i -s:%s %s",buff, DFTP.ftpserver);
417 
418 // er = WinExec(COMANDO, SW_HIDE); // or SW_SHOW
419  er = WinExec(COMANDO, SW_SHOW); // or
420 
421  FLAG.ftpstatus = 1;
422 
423 
424  }
425  return 0;
426 
427 }
428 
429  void E_DeltaSZA(void)
437 {
438 
439  int a, b, c;
440 
441  ExeREM = 0;
442 
443  a = (int) (S_zenetr * 100); //Actual SZA
444  b = (int) ((SZADelta.Dailyminsza+SZADelta.DeltaSZA) * 100); //Daily Min SZA + DeltaSZA
445  c = (int) (SZADelta.MaxSZA * 100); //Max SZA
446  PrgCnt = 0;
447  if(DAS.Flag.DeltaSZA == 1)
448  {
449  //if((int)(S_zenetr >= SZADelta.MinSZA) && (int)(S_zenetr <= SZADelta.MaxSZA))
450  if((a >= b) && ( a <= c))
451  {
452  DAS.Flag.ExeDSZA = 0; //This STOP the measurements (via PRG file)
453  Status("In E_DeltaSZA");
454  delay(500);
455  }
456  else
457  DAS.Flag.ExeDSZA = 1;
458  }
459  else
460  DAS.Flag.ExeDSZA = 1;
461 
462  ExeREM = 1;
463 }
464 
465 //Fix the Next SZA for measurements
466 // and set
467 void D_FixSZA(void)
468 {
469 
470 
471  double SZAInt;
472  double SZATest;
473  int k=0;
474  double er;
475 
476  if((S_zenetr - SZADelta.LastMSZA) > 0) // 66.5-66 > 0 --> Afternoon period -->After local noon
477  {
478 
479  SZAInt = floor(S_zenetr);
480  k = 1;
481  do
482  {
483  SZATest = SZAInt + ((double)k * SZADelta.DeltaSZA);
484  SZADelta.NextSZA = SZATest;
485  k++;
486  er = SZATest - (S_zenetr + SZADelta.DeltaSZA);
487  }while(er<0);
488  SZADelta.NextSZA = SZADelta.NextSZA - SZADelta.DeltaSZA;
489  DAS.Flag.ExeDSZA = -1;
490  if(SZADelta.NextSZA <= SZADelta.Dailyminsza)
491  {
492  SZADelta.NextSZA = SZADelta.NextSZA + SZADelta.DeltaSZA;
493  DAS.Flag.ExeDSZA = 1;
494  }
495  if(SZADelta.NextSZA >= SZADelta.Dailymaxsza)
496  {
497  SZADelta.NextSZA = SZADelta.NextSZA - SZADelta.DeltaSZA;
498  DAS.Flag.ExeDSZA = 1;
499  }
500 
501 
502 
503  }
504  else if ((S_zenetr - SZADelta.LastMSZA) < 0)//66.2-66.5 < 0 --> Morning Period --> Before Local Noon
505  {
506  SZAInt = ceil((double)S_zenetr); //62 62.45
507  k = 1;
508  do
509  {
510  SZATest = SZAInt - ((double)k * SZADelta.DeltaSZA); //62.1
511  SZADelta.NextSZA = SZATest;
512  k++;
513  er = SZATest-(S_zenetr );
514 
515  }while(er > 0 );
516  DAS.Flag.ExeDSZA = -1;
517 
518  if(SZADelta.NextSZA <= SZADelta.Dailyminsza)
519  {
520  SZADelta.NextSZA = SZADelta.NextSZA + SZADelta.DeltaSZA;
521  DAS.Flag.ExeDSZA = 1;
522  }
523  if(SZADelta.NextSZA >= SZADelta.Dailymaxsza)
524  {
525  SZADelta.NextSZA = SZADelta.NextSZA - SZADelta.DeltaSZA;
526  DAS.Flag.ExeDSZA = 1;
527  }
528 
529  }
530 }
531 
532 void D_WaitSZA(void)
533 {
534  char buff[256];
535  int a, b, c;
536  a= (int)(S_zenetr *100);
537  b=(int)(SZADelta.NextSZA*100);
538 
539  c = abs(a-b);
540 
541  if(c == 0)
542  {
543  DAS.Flag.ExeDSZA = 1; //This RESUME the measurements (via PRG file)
544  }
545  else
546  {
547  if(FLAG.exec == 0)
548  {
549  Status("Execution Paused");
550  }
551  else
552  {
553  sprintf(buff, "Waiting for SZA = %.2f", SZADelta.NextSZA);
554  Status(buff);
555  }
556  }
557 }
558 
559 
560 void D_AutoExecution(void)
561 {
562 
563  struct time RTime;
564  struct date RDate;
565  struct tm today;
566  char buf[128];
567  static int mrun = 0;
568  float DecTimeStart;
569  float DecTimeStop;
570  float DecActTime;
571 
572 //int PrgNumInM = 0; ///< Actual number of PRG File in current MASTER or MASTERSZA File
573 //int PrgNumExe = 0; ///< number of PRG file in execution
574 /*************************/
575  char str[80];
576  int er;
577 // char timebuf[9];
578 // char datebuf[9];
579 // long dp = 500;
580  struct tm newtime;
581 // long ltime;
582  float t_acc = 0;
583 // int sunrs;
584 // int sunsm;
585 
586 // _strdate(datebuf);
587 
588 // time( &ltime );
589 // _strtime(timebuf);
590 // time( &ltime );
591 
592 // newtime = localtime( &ltime );
593 
594  /**************************************************************/
595  // Check if daylight saving time is in effect
596  // tm_isdst > 0 if daylight saving time is in effect
597  // tm_isdst = 0 if daylight saving time is not in effect
598  // tm_isdst < 0 if status of daylight saving time is unknown.
599 // if (newtime ->tm_isdst)
600 // newtime ->tm_hour = newtime ->tm_hour - 1;
601  //NOTE - In Daylight saving period on midnight the hours became -1 so...
602 // if((newtime -> tm_hour) == -1)
603  {
604  // Necessary for measurements performed at high latitude in summer seasons
605 // newtime->tm_hour = 23;
606 // newtime -> tm_yday = newtime -> tm_yday - 1;
607  }
608 
609  /**************************************************************/
610  GetDateTime(&RDate, &RTime, &newtime);
611 
612  /**************************************************************/
613  // Calc solar Zenith Angle (SZA)
614 // er = SZACalc(DAS.DGeo.latitude, DAS.DGeo.longitude, (float) DAS.DGeo.timezone, newtime ->tm_year + 1900,
615 // newtime -> tm_yday, newtime ->tm_hour, newtime ->tm_min, newtime ->tm_sec,
616 // 0, 1024, 0, 0);
617 
618  er = SZACalc(DAS.DGeo.latitude, DAS.DGeo.longitude, (float) DAS.DGeo.timezone,
619  newtime.tm_year + 1900,
620  newtime.tm_yday, newtime.tm_hour, newtime.tm_min, newtime.tm_sec,
621  0, 1024, 0, 0);
622 
623  /**************************************************************/
624  sprintf(str, "%.1lf", 90 - S_zenetr); //S_elevref = elevation refracted
626 
627  sprintf(str, "%.1lf", S_azim);
629 
630 
631 
632 /****************************/
633 
634 
635  //gettime(&RTime);
636  GetDateTime(&RDate, &RTime, &today);
637  if(Master)
638  {
639  if(DAS.Flag.exemode == TEMPORIZED)
640  {
641 
642  if(mrun == 0)
643  {
644 
645  // check for the next available prg
646  PrgNumExe = ChkMaster(0);
647  // Time to decimal time
648  DecActTime = RTime.ti_hour + ((float)RTime.ti_min / 60);
649  DecTimeStart = ExMast[PrgNumExe].sora + ((float) ExMast[PrgNumExe].smin / 60) + ((float) ExMast[PrgNumExe].ssec / 3600);
650  DecTimeStop = ExMast[PrgNumExe].eora + ((float) ExMast[PrgNumExe].emin / 60) + ((float) ExMast[PrgNumExe].esec / 3600);
651 
652  if((DecActTime >= DecTimeStart) && (DecActTime <= DecTimeStop))
653  //if(ExMast[PrgNumExe].sora == (int) RTime.ti_hour &&
654  // ExMast[PrgNumExe].smin <= (int) RTime.ti_min)
655  {
656  on = LoadExec(ExMast[PrgNumExe].prg);
657  mrun = 1;
658  sprintf(buf,"%s",ExMast[PrgNumExe].prg );
660  }
661  }
662  else //mrun = 1
663  {
664 // if(ExMast[PrgNumExe].eora == (int) RTime.ti_hour &&
665 // ExMast[PrgNumExe].emin <= (int) RTime.ti_min)
666  // Time to decimal time
667  DecActTime = RTime.ti_hour + ((float)RTime.ti_min / 60);
668  DecTimeStart = ExMast[PrgNumExe].sora + ((float) ExMast[PrgNumExe].smin / 60) + ((float) ExMast[PrgNumExe].ssec / 3600);
669  DecTimeStop = ExMast[PrgNumExe].eora + ((float) ExMast[PrgNumExe].emin / 60) + ((float) ExMast[PrgNumExe].esec / 3600);
670 
671  if((DecActTime < DecTimeStart) || (DecActTime > DecTimeStop))
672 
673  {
674  on = 0;
675  mrun = 0;
676  //PrgNumExe = ChkMaster(0);
677  sprintf(buf,"MASTER-Wait");
679 // if(PrgNumExe > PrgNumInM || ExMast[PrgNumExe].prg == NULL)
680 // PrgNumExe = 0;
681  }
682  }
683  }
684  else if (DAS.Flag.exemode == SZAMASTERM)
685  {
686  /*********************************************************************************************/
687  //SZAMASTERM Mode 1
688  /*********************************************************************************************/
689  // This part of code take into account the different slope of the SZA function from
690  // the local noon to the local midnigth and from the local midnight to the local noon.
691  // It allows also the the execution of a MASTERSZA file where can appear different PRG
692  // files for the AM and PM Measurements
693  // FORMAT MASTERSZA: Start SZA, End SZA , PRG file
694  // (i.e.) 100.00 88.00 a.prg
695  // 87.99 70.00 e.prg
696  // 69.99 0.00 b.prg
697  // 0.00 87.99 b.prg
698  // 88.00 100.00 a.prg
699  // 100.01 180.00 c.prg
700  // 180.00 100.01 c.prg
701  // TO BE DONE: the conditions "<=12" and ">12" have to be replaced with something
702  // indicating the real time of local noon and local midnight ( I have to calculate
703  // the "effemeridis" at the begining of the program and each time the date change!!!)
704  if(mrun == 0)
705  {
706  if((int) RTime.ti_hour <= 12)
707  {
708  //Actual SZA between Start SZA and End SZA
709  if ( ((int)(S_zenetr * 100) < (int)(ExMast[PrgNumExe].ssza * 100))
710  && ((int)(S_zenetr * 100) > (int)(ExMast[PrgNumExe].esza * 100)) )
711  {
712  on = LoadExec(ExMast[PrgNumExe].prg);
713  mrun = 1;
714  sprintf(buf,"%s",ExMast[PrgNumExe].prg );
716  }
717  }
718  if((int) RTime.ti_hour > 12)
719  {
720  if ( ((int)(S_zenetr * 100) > (int)(ExMast[PrgNumExe].ssza * 100))
721  && ((int)(S_zenetr * 100) < (int)(ExMast[PrgNumExe].esza * 100)) )
722  {
723  on = LoadExec(ExMast[PrgNumExe].prg);
724  mrun = 1;
725  sprintf(buf,"%s",ExMast[PrgNumExe].prg );
727  }
728  }
729  }
730  else //mrun=1
731  {
732  if((int) RTime.ti_hour <= 12)
733  {
734  if ( ((int)(S_zenetr * 100) > (int)(ExMast[PrgNumExe].ssza * 100))
735  || ((int)(S_zenetr * 100) < (int)(ExMast[PrgNumExe].esza * 100)) )
736  {
737  on = 0;
738  mrun = 0;
739  PrgNumExe = ChkMaster(1);
740  sprintf(buf,"MASTERSZA-Wait");
742  if(PrgNumExe > PrgNumInM || ExMast[PrgNumExe].prg == NULL)
743  PrgNumExe = 0;
744  }
745  }
746  if((int) RTime.ti_hour > 12)
747  {
748  if ( ((int)(S_zenetr * 100) < (int)(ExMast[PrgNumExe].ssza * 100))
749  || ((int)(S_zenetr * 100) > (int)(ExMast[PrgNumExe].esza * 100)) )
750  {
751  on = 0;
752  mrun = 0;
753  PrgNumExe = ChkMaster(1);
754  sprintf(buf,"MASTERSZA-Wait");
756  if(PrgNumExe > PrgNumInM || ExMast[PrgNumExe].prg == NULL)
757  PrgNumExe = 0;
758  }
759  }
760  }
761  }
762  /*********************************************************************************************/
763  /*********************************************************************************************/
764  else if ((DAS.Flag.exemode == SZAMODE) | (DAS.Flag.exemode == TESTSZAMODE))
765  {
766  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
767  //SZAMASTERM Mode 2
768  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
769 
770  // This part of code instead doesn't consider the different slope of the SZA Function
771  // The scheduled PRG files can be specified in any order, and they will be executed
772  // when the Actual SZA is between SZAMax and SZAMin (S_zenetr > ssza & S_zenetr < esza)
773  // but when the PRG file changes (the SZAs condition are not satisfied) I have to
774  // look for the following available scheduled PRG. This means that I can't increase the
775  // "PrgNumExe" of 1, but I have to scan all the entries in the MASTERSZA.
776  // The main advantege of this mode is the possibility to write the half of record in the
777  // MASTERSZA file, but the measurements will be the same in the 24 hours.
778  // More over I don't have to use something like
779  // "88.00 0.00 namefileprg
780  // 0.00 88.00 namefileprg"
781  // to ensure the continuity of measurements during the day
782  //
783  // FORMAT MASTERSZA: SZA Min, SZA Max, PRG file
784  // (i.e.) 20.00 90.00 a.prg
785  // 90.01 100.00 b.prg
786  // 100.01 180 c.prg
787  // When the SZA is between 20 and 90 degrees DAS will execute the a.prg table (Daylight measurements)
788  // When the SZA is between 90.01 and 100.00 degrees DAS will execute the b.prg table (twilight measurements)
789  // When the SZA is between 100.01 and 180.00 degrees DAS will execute the c.prg table (night measurements)
790 
791  if(mrun == 0)
792  {
793  // check for the next available prg
794  PrgNumExe = ChkMaster(2);
795 
796  if ( ((int)(S_zenetr * 100) > (int)(ExMast[PrgNumExe].minsza * 100))
797  && ((int)(S_zenetr * 100) < (int)(ExMast[PrgNumExe].maxsza * 100)) )
798  {
799  on = LoadExec(ExMast[PrgNumExe].prg);
800  mrun = 1;
801  sprintf(buf,"%s",ExMast[PrgNumExe].prg );
803  }
804  }
805  else //mrun = 1
806  {
807  if ( ((int)(S_zenetr * 100) < (int)(ExMast[PrgNumExe].minsza * 100))
808  || ((int)(S_zenetr * 100) > (int)(ExMast[PrgNumExe].maxsza * 100)) )
809  {
810  on = 0;
811  mrun = 0;
812  sprintf(buf,"SZA MODE Wait");
814  }
815 
816  }
817  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
818  }
819 
820  }
821 
822 /*
823 Il flag ExeDSZA all'inizio deve essere 1
824 
825  si entra nel ciclo e sicuramente esegue un ciclo di prg (fino a BEGIN)
826  poi BEGIN mette il flag ExeDSZA a zero se il SZA e' tra il massimo e il minimo di
827  SZA (E_DeltaSZA).
828  al successivo passaggio nell'autoexecution se ExeDSZA = 0 esegue il FixNextSZA e
829  fissa il SZA della prossima misura (NextSZA) e mette il flag ExeDSZA = -1.
830  Al successivo passaggio se il Flag ExeDSZA = -1 esegue il CheckSZA che mette a 1 il
831  Flag se il SZA e' uguale al NextSZA
832 
833 
834 
835 */
836 // DAS.Flag.ExeDSZA = 0;
837  if(DAS.Flag.DeltaSZA == 1)
838  {
839  if (DAS.Flag.ExeDSZA == 1) //PRG Execution
840  {
841  //Store last SZA
842  SZADelta.LastMSZA = S_zenetr;
843  }
844  else if (DAS.Flag.ExeDSZA == 0)//Fix next SZA
845  {
846  D_FixSZA();
847  }
848  else if (DAS.Flag.ExeDSZA == -1) //Waiting next SZA
849  {
850  D_WaitSZA();
851 
852  }
853  else
854  {
855  MMessageDialog("DAS information", "Unknow value for DAS.Flag.ExeDSZA" , "OK", NULL);
856  }
857  }
858  else
859  //DAS.Flag.ExeDSZA = 1;
860 
861  // A background task or an event can launch a procedure initializing the
862  // variable MainCommand
863 
864  // Temperature of the CCD
865  // If the following instruction is commented the measdurements are carried out only
866  // when the CCD reach the working temperature, otherwise the measurements are
867  // performed continuosly
868  OMUTHR.ReachTemp = 1;
869 
870  //if(on && (OMUTHR.ReachTemp == 1) && FLAG.sza && FLAG.exec && (DAS.Flag.ExeDSZA == 1))
871  if(on && FLAG.sza && FLAG.exec && (DAS.Flag.ExeDSZA == 1))
872  {
873  /* if((SaveCnt % CHECKDGR) == 0)
874  MainCommand = QJSCAN;
875  else if ((SaveCnt % SCHEDHGRAT) == 0)
876  {
877  MainCommand = H_GRAT_CAL;
878  SaveCnt++;
879  }
880  else
881  */
882 
883  MainCommand = Fetch();
884 
885 
886  if(MainCommand)
887  {
888  // List of the activable procedures
889  switch(MainCommand)
890  {
891 
892  case AUTORNG: on = MainCommand = 0; E_AutoRange(); on = 1; break; // 1
893  case AVGCCD: on = MainCommand = 0; E_Average(); on = 1; break; // 2
894  case BEGIN: MainCommand = 0; E_DeltaSZA(); break; // 3
895  case CALIBRA: on = MainCommand = 0; E_Calibra(); on = 1; break; // 4
896  case DARKC: on = MainCommand = 0; E_Dark(); on = 1; break; // 5
897  case EXPO: on = MainCommand = 0; E_Expo(); on = 1; break; // 6
898  case FILTER: on = MainCommand = 0; E_Filter(); on = 1; break; // 7
899  case GETCCD: on = MainCommand = 0; E_GetCCD(); on = 1; break; // 8
900  case H_FILTER: on = MainCommand = 0; E_Home_SM3(); on = 1; break; // 9
901  case H_GRAT: on = MainCommand = 0; E_Home_SM2(); on = 1; break; // 10
902  case H_MIRROR: on = MainCommand = 0; E_Home_SM1(); on = 1; break; // 11
903  case HG_OFF: on = MainCommand = 0; E_Hg_Off(); on = 1; break; // 12
904  case HG_ON: on = MainCommand = 0; E_Hg_On(); on = 1; break; // 13
905  case LABEL: on = MainCommand = 0; E_Label(); on = 1; break; // 14
906  case MEASURE: on = MainCommand = 0; E_Measure(); on = 1; break; // 15
907  case MEASHOR: on = MainCommand = 0; E_Meashor(); on = 1; break; // 16
908  case MIRROR: on = MainCommand = 0; E_Mirror(); on = 1; break; // 17
909  case PLOT: on = MainCommand = 0; E_Plot(); on = 1; break; // 18
910  case QJ_OFF: on = MainCommand = 0; E_Qj_Off(); on = 1; break; // 19
911  case QJ_ON: on = MainCommand = 0; E_Qj_On(); on = 1; break; // 20
912  case RADIO: on = MainCommand = 0; E_Radio(); on = 1; break; // 21
913  case REM: on = MainCommand = 0; E_REM(); on = 1; break; // 22
914  case SAVE: on = MainCommand = 0; E_Save(); on = 1; break; // 23
915  case WAIT: on = MainCommand = 0; E_WAIT(); on = 1; break; // 24
916  case WAVELEN: on = MainCommand = 0; E_Lambda(); on = 1; break; // 25
917  case XEND: MainCommand = 0; Status("End"); on = 0; break; // 26
918  case ELAMPON: on = MainCommand = 0; E_ExtLampON(); on = 1; break; // 27
919  case ELAMPOFF: on = MainCommand = 0; E_ExtLampOFF(); on = 1; break; // 28
920  case ESHUTOP: on = MainCommand = 0; E_ExtShutOpen(); on = 1; break; // 29
921  case ESHUTCL: on = MainCommand = 0; E_ExtShutClose(); on = 1; break; // 30
922  case H_ZEN: on = MainCommand = 0; E_Home_SM5(); on = 1; break; // 31
923  case H_AZI: on = MainCommand = 0; E_Home_SM6(); on = 1; break; // 32
924  case ZENITH: on = MainCommand = 0; E_Zenith(); on = 1; break; // 33
925  case AZIMUTH: on = MainCommand = 0; E_Azimuth(); on = 1; break; // 34
926  case AAMEASURE:on = MainCommand = 0; E_AAMeasure(); on = 1; break; // 35
927  case AVGCCDHOR:on = MainCommand = 0; E_AvgCCDHor(); on = 1; break; // 36
928  case CHKEXLAMP:on = MainCommand = 0; E_ChkExLamp(); on = 1; break; // 37
929  case AAPOSIT :on = MainCommand = 0; E_AAPos(); on = 1; break; // 38
930  case IREFSUN :on = MainCommand = 0; E_IRefSun(); on = 1; break; // 39
931  case MEASHOR2 :on = MainCommand = 0; E_Meashor2(); on = 1; break; // 40
932  case SETCCDTEMP :on = MainCommand = 0; E_SetCCDTemp(); on = 1; break; // 41
933  case SETCCDVBIN :on = MainCommand = 0; E_SetCCDVBin(); on = 1; break; // 42
934  case SETCCDPOW :on = MainCommand = 0; E_SetCCDPow(); on = 1; break; // 43
935  case NDFILTER :on = MainCommand = 0; E_NDFilter(); on = 1; break; // 44
936  case H_NDFW :on = MainCommand = 0; E_Home_SM4(); on = 1; break; // 45
937  case DFMEASURE :on = MainCommand = 0; E_DFMeasure(); on = 1; break; // 46
938  case SETCCDOFFS :on = MainCommand = 0; E_SetCCDOffSet();on = 1; break; // 47
939  case QJSCAN :on = MainCommand = 0; E_QjScan(); on = 1; break; // 48
940  case H_GRAT_CAL :on = MainCommand = 0; E_HGratCal(); on = 1; break; // 49
941  case HGSCAN :on = MainCommand = 0; E_HgScan(); on = 1; break; // 49
942  case ALMUCANTAR :on = MainCommand = 0; E_Almucantar(); on = 1; break; // 51
943  case DIRECTSUN :on = MainCommand = 0; E_DirectSun(); on = 1; break; // 52
944  /*
945  case 100: MainCommand = 0; on = 0; // 26
946  Status("PROGRAM HALTED"); break;
947  case 101: MainCommand = 0; on = 1; break; // 27
948  */
949 
950  }
951 
952  }
953 
954  }
955 }
956 
957 /*
958  \callergraph
959 
960  \callgraph
961 
962 */
963 void Task_AutoEx(TIMEOUT_ID id, void *data)
964 
965 {
966  // Here it can be added a call to a function for the execution of the operations
967  // in the while(1) loop in the RunFULL function.
968  // This in order to remove the MLoopWhileEvents(0) in RunFULL for a low use of the CPU
969  // i.e. -->
970  D_AutoExecution();
971 
972 
973  id = MAddTimeout(AUTOEX_TASK_TIME, Task_AutoEx, data); // rilancia il task
974 
975 }
976 
977 
978 
979 
981 {
982  int cwer = 0, ccwer = 0; //Clock Wise, Counter Clock Wise er values
983  char buf[80];
984  int er = 0;
985  long ns, np;
986  int HomeGratActive = 0;
987  unsigned long st, et, x;
988  long tout;
989 
990  /**************************************************************/
991  // check for reached end-run of the stepper motor for the grating
992  if ((DAS.Flag.exemode == TEMPORIZED) |
993  (DAS.Flag.exemode == PRGFILE) |
994  (DAS.Flag.exemode == TESTAMS) |
995  (DAS.Flag.exemode == MANUAL) |
996  (DAS.Flag.exemode == SZAMASTERM) |
997  (DAS.Flag.exemode == SZAMODE))
998  {
999  if(FLAG.AMSPres == 0)
1000  {
1001 
1002  cwer = AMS_chkbitsts(AMS1, 6); //AMS1-IOP(6) = 1: end-run Vis.
1003  ccwer = AMS_chkbitsts(AMS1, 7);//AMS1-IOP(7) = 1: end-run UV
1004 
1005  if (cwer || ccwer)
1006  {
1007  //Flag to be passed to HomeGratingFast in order to refresh the task time
1008  HomeGratActive = 1;
1009  //Read steps
1010  np = AMS_ReadStep(0, 1);
1011  //Grating Motor OFF
1012  er = AMS_MotorOn_Off(0, 1, 0);
1013  //wait for remaining steps finalization
1014 
1015 
1016 //*********************************************
1017 
1018 
1019  tout = DAS.StepM.postime[AMS1][DAS.StepM.SM_B]+1000;
1020  st = GetTickCount();
1021  do
1022  {
1023  et = GetTickCount();
1024  x = labs(et - st);
1025  //MLoopWhileEvents(0);
1026  //if((x % 10 == 0) && (x > 0))
1027  if(x > 0)
1028  {
1029 
1030  sprintf(buf, "%.1lf sec. left", (double)fabs(((double)(labs(et - st) - tout))/1000.0 ));
1031  Status (buf);
1032 
1033  }
1034  }while(labs(et - st) < tout);
1035 
1036 
1037 
1039 
1040 
1041 
1042  //delay(30000);
1043 
1044  er = AMS_AzzeraCoord(0, 1);
1045  ns = AMS_ReadStep(0, 1);
1046  sprintf(buf, "%ld", ns);
1047 
1048  //Mirror and Grating Motor ON
1049  er = AMS_MotorOn_Off(0, 1, 1);
1050 
1051  DXL.bufrx[0] = '0';
1052  DXL.bufrx[1] = '0';
1053  MObjectSetText(DAS.Gui.ContrPanel.Albl_LS[1], "4358");
1054  HomeGratingFast(HomeGratActive);
1055 
1056  }
1057  else
1058  {
1059  //Home Grating Task
1061 
1062  }
1063  }
1064  }
1065 }
1066 
1067 void WinRes(void)
1068 {
1069 
1070  int PosRefWl, er;
1071  struct time RTime;
1072  struct date RDate;
1073  struct tm today;
1074  char buff[10];
1075  char str[10];
1076  char buf[256];
1077 
1078 
1079 
1080 
1081  PosRefWl = LookforWl_X(4358);
1082 
1083  SD_Grating(PosRefWl); //Positioning at 4358 A
1084 
1085 
1086 
1087  GetDateTime(&RDate, &RTime, &today);
1088  strftime( buff, 7,"%y%m%d", &today );
1089  strftime( str, 9,"%H:%M:%S", &today );
1090  sprintf(buf, "*++++++++++++++++++++++++++++++++++++++++++++*");
1091  D_WriteInitLog(buf);
1092  sprintf(buf, "Windows reboot on %s at %s", buff, str );
1093  D_WriteInitLog(buf);
1094  sprintf(buf, "**********************************************");
1095  D_WriteInitLog(buf);
1096 
1097 
1098 
1099  DB_WriteMode(1);
1100  ShutterOpening(1);
1101  DC_Close(0); //DA RIMETTERE!!!!!!!!!!!!!!!!!1
1102  if (HGFlg)
1103  HgLamp(0);//HG Off
1104  if (QJFlg)
1105  QjLamp(0);//QJ Off
1106  //Switch off 12 V, Hires, 24V
1107  if(DAS.Paramini.EqType == GASCODNG1)
1108  er = NOVA_Out(DAS.Nova.type, 15); //1111 bin
1109 
1110 
1111  WDT_func(0); //Stop WDT
1112  SioDone(DXL.com);//Close Com connection
1113  DAS.Flag.WindowsReboot = 2;
1114 
1115 
1116  MGUITerm();
1117  //restart the instrument
1118  system("shutdown -r -t 10 -f");
1119 
1120 
1121 
1122 }
1123 
1124 
1126 {
1127 
1128 // char buff[80];
1129 // float CCD_Pwr;
1130  int ActualHour;
1131  int ActualDOY;
1132  struct time RTime;
1133  struct date RDate;
1134  struct tm today;
1135 
1136  GetDateTime(&RDate, &RTime, &today);
1137 
1138 
1139  // Time to decimal time
1140  ActualHour = (int)(((double)today.tm_hour + (1.0/60.0*(double)today.tm_min)) * 10); // + ((float) today.tm_min / 60) + ((float) today.tm_sec / 3600);
1141  ActualDOY = (int)(((double)today.tm_yday + (1/24*(double)today.tm_hour))) * 10;;
1142 
1143  //For shutdown and restart for hourly periods (for debug & testing)
1144 if(DAS.DOption.resetType == RHOUR)
1145 {
1146  //check the start time and actual time
1147  if(labs(ActualHour - DAS_StartHour) >= (DAS.DOption.resetFreq * 10))
1148  {
1149  //stop the measurements and wait until the current one is finished
1150  DB_Pause();
1151 
1152  //shutdown CCD (wait until when CCD peltier power is 0)
1153  DC_SetTemp(25.0, CELSIUS, 0);
1154 
1155 
1156 
1157  DAS.Flag.WindowsReboot = 1;
1158 
1159  }
1160 
1161 }
1162  //For shutdown and restart for hourly periods
1163 if(DAS.DOption.resetType == RDAY)
1164 {
1165  //check the start time and actual time
1166  if(labs(ActualDOY - DAS_StartDOY) >= (DAS.DOption.resetFreq * 10))
1167  {
1168  //stop the measurements and wait until the current one is finished
1169  DB_Pause();
1170 
1171  //shutdown CCD (wait until when CCD peltier power is 0)
1172  DC_SetTemp(25.0, CELSIUS, 0);
1173 
1174  DAS.Flag.WindowsReboot = 1;
1175 
1176  }
1177 
1178 
1179 
1180 }
1181 
1182 }
1183 
1184 void Task_Timer(TIMEOUT_ID id, void *data)
1185 {
1186 
1187  char str[80];
1188  int er;
1189  char buff[32];
1190 // char datebuf[9];
1191 // long dp = 500;
1192  struct time RTime;
1193  struct date RDate;
1194 
1195  struct tm newtime;
1196 // long ltime;
1197  float t_acc = 0;
1198  int sunrh,sunrm,sunrs;
1199  int sunsh,sunsm,sunss;
1200  float CCD_Pwr;
1201 
1202 
1203  if (DAS.DOption.resetEnabled)
1204  {
1205  if(DAS.Flag.WindowsReboot == 0)
1206  SetWindowsReset();
1207 
1208  MObjectGetText(DAS.Gui.ContrPanel.Albl_CS[1], buff);
1209  CCD_Pwr = (float)atof(buff);
1210 
1211  if (DAS.Flag.WindowsReboot ==1 && CCD_Pwr<=10.0)
1212  WinRes();
1213  }
1214 // _strdate(datebuf);
1215 
1216 // _strtime(timebuf);
1217 // time( &ltime );
1218 
1219 // newtime = localtime( &ltime );
1220 
1221  /**************************************************************/
1222  // Check if daylight saving time is in effect
1223  // tm_isdst > 0 if daylight saving time is in effect
1224  // tm_isdst = 0 if daylight saving time is not in effect
1225  // tm_isdst < 0 if status of daylight saving time is unknown.
1226 // if (newtime ->tm_isdst)
1227 // newtime ->tm_hour = newtime ->tm_hour - 1;
1228  //NOTE - In Daylight saving period on midnight the hours became -1 so...
1229 // if((newtime -> tm_hour) == -1)
1230 // {
1231  // Necessary for measurements performed at high latitude in summer seasons
1232 // newtime->tm_hour = 23;
1233 // newtime -> tm_yday = newtime -> tm_yday - 1;
1234 // }
1235 
1236  /**************************************************************/
1237  GetDateTime(&RDate, &RTime, &newtime);
1238 
1239  /**************************************************************/
1240  // Calc solar Zenith Angle (SZA)
1241  er = SZACalc(DAS.DGeo.latitude, DAS.DGeo.longitude, (float) DAS.DGeo.timezone,
1242  newtime.tm_year + 1900,
1243  newtime.tm_yday, newtime.tm_hour, newtime.tm_min, newtime.tm_sec,
1244  0, 1024, 0, 0);
1245  /**************************************************************/
1246  sprintf(str, "%.1lf", 90 - S_zenetr); //S_elevref = elevation refracted
1248 
1249  sprintf(str, "%.1lf", S_azim);
1251 
1252  // Sunrise and sunset times
1253  /*++++++++++++++++++++++++++++++++++++++*/
1254  sunrh = (int)floor(S_sunrise/60);
1255  sunrm = (int)floor( ((S_sunrise/60) - floor(S_sunrise/60))*60 );
1256  sunrs = (int)floor( ( (((S_sunrise/60) - floor(S_sunrise/60))*60) - floor((((S_sunrise/60) - floor(S_sunrise/60))*60)) )*60 );
1257 
1258  sprintf(str, "%02d:%02d:%02d", sunrh, sunrm, sunrs);
1259  //sprintf(str, "%.02lf", S_sunrise);
1261 
1262  sunsh = (int)floor(S_sunset/60);
1263  sunsm = (int)floor( ((S_sunset/60) - floor(S_sunset/60))*60 );
1264  sunss = (int)floor( ( (((S_sunset/60) - floor(S_sunset/60))*60) - floor((((S_sunset/60) - floor(S_sunset/60))*60)) )*60 );
1265 
1266  //sprintf(str, "%.02lf", S_sunset);
1267  sprintf(str, "%02d:%02d:%02d", sunsh, sunsm, sunss);
1269  /*++++++++++++++++++++++++++++++++++++++*/
1270 // S_sunrise = 720.0 - 4.0 * S_ssha - S_tstfix;
1271 // S_sunset = 720.0 + 4.0 * S_ssha - S_tstfix;
1272 
1273 
1274  /**************************************************************/
1275  // write on the STATUS label
1276  sprintf(str, "Loc.: %s, Date: %d/%02d/%02d, Local Solar Time: %02d:%02d:%02d, SZA:%.02lf",
1277  DAS.DGeo.s_name, newtime.tm_year + 1900, newtime.tm_mon + 1,newtime.tm_mday,
1278  newtime.tm_hour, newtime.tm_min, newtime.tm_sec, S_zenetr);
1279 
1281  /**************************************************************/
1282 
1283  /**************************************************************/
1284  // Set FLAG.sza
1285  // FLAG.sza = 1 --> perform measurements
1286  // FLAG.sza = 0 --> waiting mode
1287  if(S_zenetr < SZAMax)
1288  {
1289  FLAG.sza =1;
1290  FLAG.ftpstatus = 0; // back-up that will be performed when FLAG.sza = 0
1291  }
1292  else
1293  {
1294  FLAG.sza =0;
1295  if(FLAG.ftpstatus == 1) //Back-up performed
1296  FLAG.ftpstatus = 2; //Wait until the next sunset
1297 
1298  }
1299  /**************************************************************/
1300 
1301  /**************************************************************/
1302 
1303  /**************************************************************/
1304 
1305  //CHECK IF ALL THE CONDITION ARE SATISFIED
1306  //IN ORDER TO PERFORM BACKUP OF THE DATA VIA FTP
1307  /**************************************************************/
1308  if((FLAG.sza == 0) & (DAS.DOption.ftpbackup == 1) & (FLAG.ftpstatus == 0))
1310 
1311  // MIGE Sun tracker
1312  if (DAS.DOption.aaopmode == 0)
1313  MIGESunTrack();
1314 
1315  // MIGE ANTI Sun tracker
1316  if (DAS.DOption.aaopmode == 1)
1317  MIGEAntiSunTrack();
1318 
1319  /**************************************************************/
1320  if(!FLAG.AMS_H)
1321  //MRefreshTimeout(&IDS.TIMER, TIMER_TASK_TIME, Task_Timer, NULL);
1322  MAddTimeout(TIMER_TASK_TIME, Task_Timer, data); // rilancia il task
1323 
1324 
1325 }
1326 
1327 
1328 //Scrive sul file giornaliero ("XXXXXXXX.log"), lo stato delle periferiche
1329 //inizializzate
1330 
1331 void WriteStatusD(int w)
1332 {
1333 /*
1334  int fc;
1335  char tit1[80];
1336 
1337  fc = open(flog, O_WRONLY | O_APPEND | O_TEXT, S_IWRITE);
1338  if(fc < 0) return;
1339 
1340  sprintf(tit1, CCD_Err[--w], w);
1341  write(fc, &tit1, strlen(tit1));
1342  close(fc);
1343 */
1344 }
void Task_AutoEx(TIMEOUT_ID id, void *data)
Automatic Execution Task. .
Definition: RTC_Time.c:963
stepm StepM
Stepper motors parameters structure.
#define ELAMPOFF
External Lamp OFF.
#define H_NDFW
Home for ND FilterWheel.
gui Gui
Graphic User Interface Structure.
void E_NDFilter(void)
Set ND Filter. Set ND Filter All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:429
void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud)
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
char odate[10]
Old Date.
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
void E_DeltaSZA(void)
Re-Start or Stop the execution of the PRG file (depending on the SZA) If the measurements at fixed de...
Definition: RTC_Time.c:436
double S_zenetr
Definition: SOLPOS.C:92
void HgLamp(int mod)
HG Lamp ON/OFF .
Definition: Spat_Device.c:2673
void E_Meashor2(void)
perform horizontal measurements (2) 1) measurement with external lamp 2) measurement without the exte...
Definition: Exec.c:1370
#define LABEL
text after this command is displayed in the status label
char fsmlog[_MAX_PATH]
daily LOG file for stepper motor moovements
optionini DOption
Options for DAS execution.
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
void E_Filter(void)
Filter Wheel positioning. Procedure for Filter Wheel positioning. All the E_xxxxx() function are used...
Definition: Exec.c:761
#define SETCCDVBIN
SET the CCD vertical Binning.
void E_Hg_On(void)
HG ON. Hg lamp ON. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:246
void E_Lambda(void)
Lambda Reading. When the WAVELEN key-word is encountred in the PRG file, the Wavelength code from PRG...
Definition: Exec.c:718
#define H_GRAT_CAL
Perform home for the grating and executa a calibration.
#define H_ZEN
Home for zenith Axis.
void E_IRefSun(void)
Io Measured near the sun. This procedure carries out a measurements for the reference spectrum used i...
Definition: Exec.c:845
void E_DirectSun(void)
. All the E_xxxxx() function are used during the execution in PRG mode
Definition: Exec.c:1596
int E_Home_SM4(void)
Home for SM4. Set the reference position for Stepper motor 4 (Neutral density filter wheel)...
Definition: Exec.c:209
MOBJECT Albl_sunr
Active Control Panel Labels for Sunrise.
int Master
Definition: DAS_Spat.c:100
double Dailymaxsza
Daily maximum SZA.
void E_WAIT(void)
Delay Procedure. sleep the program . All the E_xxxxx() function are used during the execution in PRG ...
Definition: Exec.c:731
double LastMSZA
SZA of the previous measurement.
char LOGDIR[_MAX_PATH]
Definition: bildef.h:209
Stepper motors parameters structure .
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
Definition: SOLPOS.C:45
#define AAMEASURE
Measuremets with Alt Azimut platform (stepper motors positioning simoultaneously) ...
#define AAPOSIT
Position the Alt Azimuth Platform.
void Task_Timer(TIMEOUT_ID id, void *data)
Timer Task. Very useful procedure that: 1) Provide to refresh the clock display 2) Check if daylight ...
Definition: RTC_Time.c:1184
DXL structure. Structure for the serial communication with the AMS adapter.
Definition: DXL.H:16
int sza
= 1 -> perform measurements; = 0 -> waiting mode
das structure (contain all the previous structures) .
int PrgNumExe
number of PRG file in execution
Definition: DAS_Spat.c:98
void E_Radio(void)
Radiometric Measurements. Procedure for Radiometric Measurements. All the E_xxxxx() function are used...
Definition: Exec.c:684
char ddmmyy[8]
Definition: RTC_Time.c:38
#define QJ_ON
QJ lamp on.
#define TESTSZAMODE
execution driven by SZAPRG file
#define RDAY
double filter wheel
double latitude
Station latitude.
int eora
End hour.
#define WAIT
stop the program execution for xx millisec
void D_AutoExecution(void)
*.PRG Automatic Execution in Automatic Mode
Definition: RTC_Time.c:560
char DAILYDATADIRECTORY[_MAX_PATH]
Definition: bildef.h:203
void SetWindowsReset()
Definition: RTC_Time.c:1125
int QJFlg
Definition: DAS_Spatram.h:2969
omuthr OMUTHR
Definition: RTC_Time.c:36
#define PLOT
display plot
flag Flag
Structure for different flags.
#define AUTOEX_TASK_TIME
Autoexecution.
void E_Meashor(void)
perform horizontal measurements (3) 1) measurement with external lamp 2) measurement without the exte...
Definition: Exec.c:1280
structure for FTP setting
void WDT_func(int mod)
Definition: DAS_Spat.c:1572
#define HG_ON
HG lamp on.
void E_Label(void)
labeling. The text after the key-word is a label. All the E_xxxxx() function are used during the exec...
Definition: Exec.c:745
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
LOG file and time structure.
#define QJSCAN
Scan spectral range with QJ on.
int Fetch()
Reads the key-word in PRG Files .
Definition: DAS_Spat.c:298
void E_Hg_Off(void)
HG OFF. Hg lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:255
void E_AAPos(void)
alt Az Positioning. Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform) ...
Definition: Exec.c:893
int HomeGratingFast(int mod)
(Fastest) Grating in the reference Position. The Grating reaches the reference Position. Similar to HomeGrating(void), but faster
Definition: Init.c:780
char * MObjectGetText(MOBJECT obj, char *text)
spectrumheader SPH
Spectrum Header Structure.
Definition: bildef.h:256
int E_Home_SM6(void)
Home for SM6. Set the reference position for Stepper motor 6 (MIGE Azimuth). All the E_xxxxx() functi...
Definition: Exec.c:182
float Temperature[16]
Temperatures.
structure for deltaSZA Measurements .
#define CHKEXLAMP
Check External lamp status.
#define TEMPORIZED
execution driven by MASTER file
int PrgNumInM
Actual number of PRG File in current MASTER or MASTERSZA File.
Definition: DAS_Spat.c:97
MOBJECT Albl_CS[4]
Active Control Panel Labels for Camera Status 4.
#define SZAMASTERM
execution driven by MASTERSZA file ( there is the possibility to distinguish between AM and PM measur...
#define GETCCD
Performs a LIGHT Measurement (shutter opened)
NoMangle int DLL_IMPORT_EXPORT SioDone(int)
int E_Home_SM5(void)
Home for SM5. Set the reference position for Stepper motor 5 (MIGE Zenith). All the E_xxxxx() functio...
Definition: Exec.c:168
void MObjectSetText(MOBJECT obj, const char *text)
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
#define IREFSUN
Io Measurement with AA Platform near the Sun.
int SZAMax
Maximum SZA for performing measurements.
Definition: DAS_Spat.c:116
char ndate[10]
New Date.
void E_ExtLampON(void)
External lamp ON.
Definition: Exec.c:54
void E_Calibra(void)
Execute D_Calibra. D_Calibra is a procedure for the spectral calibration with HG lamp. Shift of HG spectral line at 4358.4 on pixel 512 All the E_xxxxx() function are used during the execution in PRG mode.
Definition: Exec.c:330
MOBJECT Albl_suns
Active Control Panel Labels for Sunset.
*double S_sunset
Definition: SOLPOS.C:82
int GRATHOME
Home for Grating ID.
void D_FixSZA(void)
Definition: RTC_Time.c:467
d_geo DGeo
struct for Station location
MOBJECT Albl_Azim
Active Control Panel Labels for Sun Azimuth.
int SD_PosAADev(double z, double a)
perform the simoultaneous positioning of the AltAzimuth platform z = Zenith Axis a = Grating Position...
Definition: Spat_Device.c:447
void FileDat(void)
Definition: RTC_Time.c:120
Control Flags.
U8 ti_hour
Definition: Dildef.h:236
int exec
= 0 -> PRG Execution Paused; = 1 -> PRG Execution Resumed
#define MEASHOR
horizontal measurements with external lamp (lamp,
char ntime[10]
New Time.
void E_Azimuth(void)
Position Azimuth Axis.
Definition: Exec.c:1473
char bufrx[1024]
Rx buffer.
Definition: DXL.H:20
int FTP_Back_UP(char *dirhome, char *dirdata)
Definition: RTC_Time.c:336
MOBJECT lbl_Time
Control Panel Labels for Time.
bil BIL
Definition: RTC_Time.c:30
int timezone
Station timezone.
char s_name[4]
Station name.
void E_HgScan(void)
Check the full spectral range with HG ON. All the E_xxxxx() function are used during the execution in...
Definition: Exec.c:1504
void Task_LOG(TIMEOUT_ID id, void *data)
LOG Task. Write on the LOG file during DAS execution.
Definition: RTC_Time.c:246
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
#define H_FILTER
Home for filter wheel.
#define WAVELEN
set the grating position
float CCDTemp
Actual CCD Temperature.
void E_Dark(void)
Execute Dark Measurement. Procedure for Dark Measurement. All the E_xxxxx() function are used during ...
Definition: Exec.c:279
void E_Qj_On(void)
Qj ON. QJ - Halogen - lamp ON. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:263
CTYPE void DLL DC_SetTemp(double TargetTemperature, int Scale, int Camera)
Procedure that turns the camera cooler on and allows you to set an operative temperature of the CCD...
CTYPE void DLL DC_Close(int Camera)
Shuts down the control operations of the camera. Procedure that shuts down the control operations of ...
d_fileman DFILEM
Definition: bildef.h:257
void MGUITerm(void)
long postime[AMSMAX][2]
time necessary for positioning
#define AUTORNG
Autoranging for optimal exposure time.
int E_GetCCD(void)
Get CCD. Execute DB_GetCCD. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:705
double Dailyminsza
Daily minimum SZA.
int AMS_MotorOn_Off(int id, int mtr1, int mtr2)
Motor ON-OFF. Switch On-Off the selected motor of the selected AMS.
Definition: Dxl.c:930
void E_ExtLampOFF(void)
External lamp OFF.
Definition: Exec.c:66
#define ESHUTCL
External Shutter CLOSED.
#define AZIMUTH
Positioning of Azimut Axis.
DXL_par DXL
Definition: RTC_Time.c:24
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
#define AVGCCDHOR
horizontal AVERAGED measurements with external lamp
void E_DFMeasure(void)
Perform Measurement setting the ND Filter Wheel also. All the E_xxxxx() function are used during the ...
Definition: Exec.c:911
int ExeREM
Definition: DAS_Spat.c:143
int sora
Start hour.
MOBJECT Albl_Script
Active Control Panel Labels for Script in execution.
void E_SetCCDPow(void)
Set CCD Power. Set CCD Power. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:411
#define EXPO
Set the exposure time.
void FormatDataFile(void)
Definition: RTC_Time.c:77
#define QJ_OFF
QJ lamp off.
double MaxSZA
Maximum SZA.
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_ChkExLamp(void)
Definition: Exec.c:1225
char ddmmyyf[6]
Definition: RTC_Time.c:39
double S_sunrise
Definition: SOLPOS.C:80
int NOVA_Out(int novatype, unsigned int out)
Write the NOVA Output port.
Definition: DAS_Spat.c:1375
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
double DeltaSZA
DeltaSZA.
void E_Mirror(void)
Inpot Mirror positioning. Procedure for Input mirror positioning. All the E_xxxxx() function are used...
Definition: Exec.c:773
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
Definition: Dildef.h:240
void E_SetCCDTemp(void)
Set CCD Temp. Set CCD Temp. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:375
#define GRAT_TASK_TIME
Grating Home.
void WriteStatusD(int w)
NOT Used .
Definition: RTC_Time.c:1331
char ftpuser[32]
FTP server users.
#define DARKC
Perform a DARK Measurement (shutter closed)
int resetFreq
frequency of DAS/Windows Reset
#define PRGFILE
execution driven by *.prg file
#define DIRECTSUN
int DAS_StartDOY
Definition: DAS_Spat.c:107
void DB_Pause(void)
Definition: CreateForms.c:3766
#define SAVE
save the measurement in the predefined file
#define ELAMPON
External Lamp ON.
das DAS
DAS structure.
Definition: RTC_Time.c:34
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
Function prototypes.
#define RHOUR
simple filter wheel
unsigned long AMS_ReadStep(int id, int motor)
read performed steps Procedure for the determination of the number of steps executed.
Definition: Dxl.c:60
#define FILTER
Set the filter position (0 - 6)
#define ZENITH
Positioning of zenith Axis.
void MIGEAntiSunTrack(void)
Definition: RTC_Time.c:206
#define MEASHOR2
Perform horizontal measurement.
void E_Average(void)
Averaged Measurements. Procedure for Averaged Measurements. All the E_xxxxx() function are used durin...
Definition: Exec.c:612
int WindowsReboot
Flag that became 1 when Windows reboot is setted (SetWinowsReset)
char ftpserver[32]
FTP server address.
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
#define ALMUCANTAR
void D_WaitSZA(void)
Definition: RTC_Time.c:532
void E_Measure(void)
Perform Measurement. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:1060
ids IDS
ID tasks.
Definition: DAS_Spat.c:54
void SZA_FindMin()
computation of daily minimum SZA
Definition: DAS_Spat.c:2808
flag FLAG
flags structure
Definition: RTC_Time.c:25
#define H_AZI
Home for Azimut Axis.
#define SETCCDOFFS
CCD Offset for HiresV.
int ftpstatus
0 = FTP Back-UP Not executed; 1 = FTP Back-UP executed;
nova Nova
NOVA structure.
Function prototypes.
int E_Home_SM2(void)
Home for SM2. Set the reference position for Stepper motor 2 (Grating). All the E_xxxxx() function ar...
Definition: Exec.c:139
int Incr_Read_Temp
Definition: DAS_Spat.c:101
#define SZAMODE
execution driven by SZAPRG file
int E_Home_SM3(void)
Home for SM3. Set the reference position for Stepper motor 3 (Filter Wheel). All the E_xxxxx() functi...
Definition: Exec.c:154
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
int MainCommand
Command switch in main loop.
Definition: DAS_Spat.c:105
#define CELSIUS
Return CCD temperature in Celsius.
Definition: dcldef.h:449
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
#define DFMEASURE
Measurement procedure using the double ND FilterWheel (when Installed)
#define CALIBRA
Auto calibration with HG Lamp (hg line at 4358A on pix 512)
int AMS_H
Home AMS.
#define TIMER_TASK_TIME
timer
void WriteTitolo(void)
Definition: RTC_Time.c:191
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
U8 ti_min
Definition: Dildef.h:235
#define SETCCDPOW
SET the CCD Power.
void E_Expo(void)
Exposuring. Read the Exposure time from PRG file. All the E_xxxxx() function are used during the exec...
Definition: Exec.c:365
controlpanel ContrPanel
Control Panel Structure.
int ftpbackup
Flag to set back up: 0 = NO FTP Back-UP; 1 = Perform FTP Back-UP.
#define MEASURE
Performs a measurement setting mirror, filter, grating, TExp...
Bortul Image Library Structure .
Definition: bildef.h:250
int D_WriteInitLog(char *str)
writes devices errors(AMS, CCD...) on the Devices.log file.
Definition: Save.c:144
int AMS_AzzeraCoord(int id, int mtr)
Set to zero the number of steps on the selected motor Set to zero the number of steps on the selecte...
Definition: Dxl.c:439
dlog DLOG
Definition: RTC_Time.c:29
void E_QjScan(void)
Check the full spectral range with QJ ON. All the E_xxxxx() function are used during the execution in...
Definition: Exec.c:1548
void E_HGratCal(void)
Perform home grating and HG Calibration. All the E_xxxxx() function are used during the execution in ...
Definition: Exec.c:1488
#define H_MIRROR
Home for Mirror.
void E_Save(void)
Save Image. Procedure for saving image or data. All the E_xxxxx() function are used during the execut...
Definition: Exec.c:355
double longitude
Station longitude.
#define AMS1
AMS1 address.
int AMS_chkbitsts(int id, int bitn)
check bit status Procedure for the determination of the bit number status.
Definition: Dxl.c:192
int LoadExec(char *fname)
Load file for automatic execution. Procedure that load the file for automatic execution.
Definition: Load.c:1534
CARD32 TIMEOUT_ID
Definition: Mguidefs.h:1421
char flog[_MAX_PATH]
daily LOG file
void WriteInit(const char *sname, char *dateffn, char *timebuff)
Init the daily LOG file .
Definition: RTC_Time.c:158
static double st
Definition: SOLPOS.C:142
void E_Almucantar(void)
. All the E_xxxxx() function are used during the execution in PRG mode
Definition: Exec.c:1680
#define BEGIN
re-start the execution of the PRG file
void E_Zenith(void)
Position Zenith Axis.
Definition: Exec.c:1461
double NextSZA
SZA of the Next measurement.
Definition: Dildef.h:234
char location[4]
Name of the Station (BLQ, LPA, EVR, TNB, DMC.....)
Definition: bildef.h:128
int ExeDSZA
= 1 the measurements are performed, = 0 waiting for the next deltasza.
void E_SetCCDVBin(void)
Set CCD Vert Binn. Set CCD Vert Binn. All the E_xxxxx() function are used during the execution in PRG...
Definition: Exec.c:446
#define H_GRAT
Home for Grating.
void DB_WriteMode(int mod)
Definition: CreateForms.c:6722
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
void MIGESunTrack(void)
Definition: RTC_Time.c:222
char ftppwd[32]
FTP server pwd.
void E_AutoRange(void)
Autoranging. Procedure for Autoranging. All the E_xxxxx() function are used during the execution in P...
Definition: Exec.c:342
#define XEND
stop the execution of the PRG file
void FileLog(char datebuf[9], char timebuf[9])
Definition: RTC_Time.c:111
void FormatData(void)
trasform mm/gg/aa in gg/mm/aa
Definition: RTC_Time.c:45
static double elev
Definition: SOLPOS.C:130
int ChkMaster(int mod)
Definition: DAS_Spat.c:2730
void E_AAMeasure(void)
perform measurements with the Alt Azimuth Platform perform measurements with the Alt Azimuth Platform...
Definition: Exec.c:997
MOBJECT Albl_Elev
Active Control Panel Labels for Sun Elevation.
void E_SetCCDOffSet(void)
Set the CCD Offst (only for HIRES-V. All the E_xxxxx() function are used during the execution in PRG ...
Definition: Exec.c:394
#define LOG_TASK_TIME
LOG files.
int EqType
Spectrometer Type.
#define RADIO
Unused.
int HGFlg
Definition: DAS_Spatram.h:2968
void E_ExtShutClose(void)
Close External Shutter.
Definition: Exec.c:91
void WinRes(void)
Definition: RTC_Time.c:1067
int com
Comunication port.
Definition: DXL.H:17
#define HG_OFF
HG lamp off.
#define SETCCDTEMP
SET the CCD working Temperature.
void E_AvgCCDHor(void)
Averaged Horizontal Measurements. Procedure for Averaged Measurements with external lamp...
Definition: Exec.c:538
#define HGSCAN
Scan spectral range with HG on.
void Task_HomeGrat(TIMEOUT_ID id, void *data)
Home grating Task. 5) Check for reached end-run of the stepper motor for the grating ...
Definition: RTC_Time.c:980
master ExMast[PRGMAXNUM]
Definition: DAS_Spat.c:55
int resetEnabled
DAS/Windows reset option (1 = Enabled; 0 = disabled)
int type
type of NOVA monoboard used (7892 or 945GSE)
int resetType
type of period for DAS Reset: 0=Hours, 1=Days
int on
PRG execution control variabile.
Definition: DAS_Spat.c:109
dftp DFTP
Definition: RTC_Time.c:31
TIMEOUT_ID MAddTimeout(CARD32 tmout, TIMEOUT_CB cb, void *ud)
void ShutterOpening(int mod)
Definition: Procedures.c:1685
int AMSPres
AMS Presence: 0 = AMS FOUND; 1 = AMS NOT FOUND.
int exemode
Set the Execution MODE (Execution modes)
int DAS_StartHour
Definition: DAS_Spat.c:106
void E_Qj_Off(void)
Qj OFF. QJ - Halogen - lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:271
OMU Thermoregulation structure .
#define ESHUTOP
External Shutter OPEN.
void E_Plot(void)
Plot Spectrum. Plot Spectrum. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:237
#define TESTAMS
execution for testing AMS&#39;s devices
dsza SZADelta
Definition: RTC_Time.c:32
stepm STEPM
Stepper Motors.
Definition: RTC_Time.c:28
int SZACalc(double d_lat, double d_long, double d_tzone, int d_year, int d_daynum, int d_hour, int d_minute, int d_second, float d_temp, float d_press, float d_tilt, float d_aspect)
Calc. Solar angles and radiatives quantities. .
Definition: CalcSZA.c:89
#define MANUAL
execution in manual mode (for lab use)
int E_Home_SM1(void)
Home for SM1. Set the reference position for Stepper motor 1 (Input Mirror). All the E_xxxxx() functi...
Definition: Exec.c:111
#define MIRROR
set mirror position (0-3)
#define NDFILTER
SET the ND FilterWheel Position.
int ReachTemp
Target Temperature status.
int LookforWl_X(int x)
Definition: Procedures.c:2295
#define AVGCCD
Averaged measurement.
marconi Marconi
CCD Sensor struct.
paramini Paramini
structure for the parameters defined in param.ini configuration file
#define REM
text after this is a comment
void E_ExtShutOpen(void)
Open External Shutter.
Definition: Exec.c:79
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:09 for DAS - Rel. 3.1.6 - 18/09/2017.