DAS  3.1.6 - 18/09/2017
Functions | Variables
Exec.c File Reference

Execution functions for the DAS KeyWords. Inthis file are implemented all the functions executed by DAS when is executed in Automatic Mode (with a PRG driver file) More...

#include <windows.h>
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/timeb.h>
#include "mgui.h"
#include "DAS_Spatram.h"
#include "dcl.h"
#include "dil.h"
#include "dxl.h"
#include "wsc.h"
#include "bil.h"
+ Include dependency graph for Exec.c:

Go to the source code of this file.

Functions

int DB_StsMotor (int c)
 
void E_AAMeasure (void)
 perform measurements with the Alt Azimuth Platform perform measurements with the Alt Azimuth Platform positioning all the spectrometer devices More...
 
void E_AAPos (void)
 alt Az Positioning.
Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform) More...
 
void E_Almucantar (void)
 .
All the E_xxxxx() function are used during the execution in PRG mode More...
 
void E_AutoRange (void)
 Autoranging.
Procedure for Autoranging. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Average (void)
 Averaged Measurements.
Procedure for Averaged Measurements. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_AvgCCDHor (void)
 Averaged Horizontal Measurements.
Procedure for Averaged Measurements with external lamp. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Azimuth (void)
 Position Azimuth Axis. More...
 
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. More...
 
void E_ChkExLamp (void)
 
void E_Dark (void)
 Execute Dark Measurement.
Procedure for Dark Measurement. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_DFMeasure (void)
 Perform Measurement setting the ND Filter Wheel also.
All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_DirectSun (void)
 .
All the E_xxxxx() function are used during the execution in PRG mode More...
 
void E_Expo (void)
 Exposuring.
Read the Exposure time from PRG file. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_ExtLampOFF (void)
 External lamp OFF. More...
 
void E_ExtLampON (void)
 External lamp ON. More...
 
void E_ExtShutClose (void)
 Close External Shutter. More...
 
void E_ExtShutOpen (void)
 Open External Shutter. More...
 
void E_Filter (void)
 Filter Wheel positioning.
Procedure for Filter Wheel positioning. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_GetCCD (void)
 Get CCD.
Execute DB_GetCCD. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Hg_Off (void)
 HG OFF.
Hg lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Hg_On (void)
 HG ON.
Hg lamp ON. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_HGratCal (void)
 Perform home grating and HG Calibration.
All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_HgScan (void)
 Check the full spectral range with HG ON.
All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_Home_SM1 (void)
 Home for SM1.
Set the reference position for Stepper motor 1 (Input Mirror). All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_Home_SM2 (void)
 Home for SM2.
Set the reference position for Stepper motor 2 (Grating). All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_Home_SM3 (void)
 Home for SM3.
Set the reference position for Stepper motor 3 (Filter Wheel). All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_Home_SM4 (void)
 Home for SM4.
Set the reference position for Stepper motor 4 (Neutral density filter wheel). All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_Home_SM5 (void)
 Home for SM5.
Set the reference position for Stepper motor 5 (MIGE Zenith). All the E_xxxxx() function are used during the execution in PRG mode. More...
 
int E_Home_SM6 (void)
 Home for SM6.
Set the reference position for Stepper motor 6 (MIGE Azimuth). All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_IRefSun (void)
 Io Measured near the sun.
This procedure carries out a measurements for the reference spectrum used in DOAS analysis, with the alt Azimut platfor pointing the sun. Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform) More...
 
void E_Label (void)
 labeling.
The text after the key-word is a label. All the E_xxxxx() function are used during the execution in PRG mode More...
 
void E_Lambda (void)
 Lambda Reading.
When the WAVELEN key-word is encountred in the PRG file, the Wavelength code from PRG file is read and the grating is positioned. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Meashor (void)
 perform horizontal measurements (3) 1) measurement with external lamp 2) measurement without the external lamp (same exposure time than 1) 3) measurement without the external lamp (exposure time recalculated) More...
 
void E_Meashor2 (void)
 perform horizontal measurements (2) 1) measurement with external lamp 2) measurement without the external lamp (same exposure time than 1) More...
 
void E_Measure (void)
 Perform Measurement.
All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Mirror (void)
 Inpot Mirror positioning.
Procedure for Input mirror positioning. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_NDFilter (void)
 Set ND Filter.
Set ND Filter All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Plot (void)
 Plot Spectrum.
Plot Spectrum. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Qj_Off (void)
 Qj OFF.
QJ - Halogen - lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Qj_On (void)
 Qj ON.
QJ - Halogen - lamp ON. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_QjScan (void)
 Check the full spectral range with QJ ON.
All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Radio (void)
 Radiometric Measurements.
Procedure for Radiometric Measurements. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_REM (void)
 Flush string since the Carriege Return.
Procedure for flushing the readed string since the Carriege Return. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Save (void)
 Save Image.
Procedure for saving image or data. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_SetCCDOffSet (void)
 Set the CCD Offst (only for HIRES-V.
All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_SetCCDPow (void)
 Set CCD Power.
Set CCD Power. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_SetCCDTemp (void)
 Set CCD Temp.
Set CCD Temp. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_SetCCDVBin (void)
 Set CCD Vert Binn.
Set CCD Vert Binn. All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_WAIT (void)
 Delay Procedure.
sleep the program . All the E_xxxxx() function are used during the execution in PRG mode. More...
 
void E_Zenith (void)
 Position Zenith Axis. More...
 
int ExtLamp (int mod)
 change the status of the external lamp change the status of the external lamp (ON or OFF) through a radio signal controlled by the AMS output port (bit 7) NOTE - This feature is not used!!!!!! More...
 
int ExtShutt (int mod)
 change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) through a radio signal controlled by the AMS output port (bit 6) More...
 
void PerformMeas (int mod, int ar, double te, int mt, int sv, int pl)
 Perform Averaged or single measurements. More...
 
void quick (unsigned *elemento, int conta)
 
void Radio (int g)
 NOT Used
. More...
 

Variables

das DAS
 
DXL_par DXL
 
int ExeREM
 
flag FLAG
 
int FlagBarra = 0
 
double FlagTExp = 1.0
 
char NewDate [8]
 
char OldDate [8]
 
omuthr OMUTHR
 
paramini PARAM
 
int Total = 0
 Progressive acquisition number for file (MAX defined = 50) More...
 

Detailed Description

Execution functions for the DAS KeyWords. Inthis file are implemented all the functions executed by DAS when is executed in Automatic Mode (with a PRG driver file)

Author
Daniele Bortoli

Definition in file Exec.c.

Function Documentation

§ DB_StsMotor()

int DB_StsMotor ( int  c)

Definition at line 785 of file Exec.c.

References DXL_par::add, DXL_par::bufrx, DXL_RxStr(), DXL_TxStr(), MLoopWhileEvents(), and STS0LEN.

786 {
787  int sts = 0, d, er = 0;
788 
789  switch(c)
790  {
791  case 0:
792  {
793  DXL.add = 0;
794  do
795  {
796  DXL_TxStr("800", 3);
797  d = STS0LEN;
798  er = DXL_RxStr(DXL.bufrx, &d);
799  MLoopWhileEvents(0);
800  }while(DXL.bufrx[0] == '0' && DXL.bufrx[1] == '0' && er == 0);
801  sts = 1;
802  }
803  break;
804 
805  case 1:
806  {
807  DXL.add = 0;
808  do
809  {
810  DXL_TxStr("801", 3);
811  d = STS0LEN;
812  er = DXL_RxStr(DXL.bufrx, &d);
813  MLoopWhileEvents(0);
814 
815  }while(DXL.bufrx[0] == '0' && DXL.bufrx[1] == '0' && er == 0);
816  sts = 1;
817  }
818  break;
819 
820  case 2:
821  {
822  DXL.add = 1;
823  do
824  {
825  DXL_TxStr("800", 3);
826  d = STS0LEN;
827  er = DXL_RxStr(DXL.bufrx, &d);
828  MLoopWhileEvents(0);
829  }while(DXL.bufrx[0] == '0' && DXL.bufrx[1] == '0' && er == 0);
830  sts = 1;
831  DXL.add=0;
832  }
833  break;
834 
835  }
836  return sts;
837 }
void MLoopWhileEvents(int discard)
int DXL_RxStr(char *rx, int *len)
receive string from a serial port
Definition: Dxl.c:1187
DXL_par DXL
Definition: Exec.c:27
#define STS0LEN
char bufrx[1024]
Rx buffer.
Definition: DXL.H:20
int add
Peripheral address.
Definition: DXL.H:19
void DXL_TxStr(char *tx, int len)
send string to a serial port
Definition: Dxl.c:1153
+ Here is the call graph for this function:

§ E_AAMeasure()

void E_AAMeasure ( void  )

perform measurements with the Alt Azimuth Platform perform measurements with the Alt Azimuth Platform positioning all the spectrometer devices

Definition at line 997 of file Exec.c.

References optionini::avgautor, das::DOption, E_REM(), paramini::EqType, ExeREM, FDOUBLE, optionini::filtertype, FPLUS, LookforWl_X(), optionini::measmode, das::Paramini, PerformMeas(), PrgCnt, Program, S_zenetr, SD_Azimuth(), SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), SD_Position(), SD_Zenith(), optionini::smposmode, SPATRAM2, SPATRAM3, SPATRAMPLUS, and wl.

Referenced by D_AutoExecution().

998 {
999 
1000  int er=0;
1001  int l, f, m, a, d, s, g, wl;
1002  double z, az;
1003  double t;
1004 
1005  sscanf(&Program[PrgCnt], "%d%d%d%lf%lf%d%lf%d%d%d", &m, &wl, &f, &z, &az, &a, &t, &d, &s, &g);
1006 
1007  l= LookforWl_X(wl);
1008 
1009 
1010  if(z == 360)
1011  z = -S_zenetr; //per misure di Io nel piano azimuthale in cui ho fatto misure (da controllarese deve essere positivo negativo o 90-)
1012 
1013 
1014  if (DAS.DOption.smposmode)
1015  SD_Position(m, l, f, z, az);
1016  else
1017  {
1018  //mirror positioning
1019  SD_Mirror(m);
1020  //grating positioning
1021  SD_Grating(l);
1022  //filter wheel positioning
1023  SD_FilterW(f);
1024  //Zenith positioning
1025  SD_Zenith((float)z);
1026  //Azimuth positioning
1027  SD_Azimuth((float)az,0);
1028  }
1029 
1030  if(DAS.DOption.filtertype == FDOUBLE)
1031  {
1033  SD_NDFilterW(0); //Reset NDFilterWheel position
1034  }
1035 
1036  if(DAS.DOption.filtertype == FPLUS)
1037  {
1038  SD_FNTorqueM(0); //Reset NDFilterWheel position
1039  }
1040 
1041  ExeREM = 0;
1042 
1043 
1044  if(DAS.DOption.measmode == 0) //Single
1045  PerformMeas(0, a, t, d, s, g);
1046  if(DAS.DOption.measmode == 1) //AVG
1047  {
1048  if(DAS.DOption.avgautor)
1049  PerformMeas(1, a, t, d, s, g);
1050  else
1051  PerformMeas(2, a, t, d, s, g);
1052 
1053  }
1054 
1055  ExeREM = 1;
1056  E_REM();
1057 
1058 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
double S_zenetr
Definition: SOLPOS.C:92
optionini DOption
Options for DAS execution.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:2916
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:3110
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
#define SPATRAM3
SPATRAM3.
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int measmode
measuring mode: 0 = Single; 1 = Averaged
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
int EqType
Spectrometer Type.
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
int LookforWl_X(int x)
Definition: Procedures.c:2295
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_AAPos()

void E_AAPos ( void  )

alt Az Positioning.
Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform)

Definition at line 893 of file Exec.c.

References E_REM(), PrgCnt, Program, and SD_Position().

Referenced by D_AutoExecution().

894 {
895 
896  int er=0;
897 // int l, f, m, d, g;
898  double z, az;
899 // double t;
900 
901 
902  sscanf(&Program[PrgCnt], "%lf%lf", &z, &az);
903 
904 
905  SD_Position(-1, -1, -1, z, az);
906  E_REM();
907 }
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Almucantar()

void E_Almucantar ( void  )

.
All the E_xxxxx() function are used during the execution in PRG mode

Definition at line 1680 of file Exec.c.

References delay(), das::DOption, E_REM(), elev, paramini::EqType, ExeREM, FDOUBLE, optionini::filtertype, FPLUS, LookforWl_X(), das::Paramini, PerformMeas(), PrgCnt, Program, S_azim, S_zenetr, SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), SD_Position(), optionini::smposmode, SPATRAM2, SPATRAM3, SPATRAMPLUS, and wl.

Referenced by D_AutoExecution().

1681 {
1682 
1683  char str[16];
1684  float azi, elev;
1685  int er=0;
1686  int l, f, m, a, d, s, g, wl, nf,k;
1687  double t;
1688 
1689  //sun Azimuth angle
1690  sprintf(str, "%.01lf", S_azim);
1691  azi = atof(str);
1692 
1693  //Elevation Angle
1694  sprintf(str, "%.01lf", (90 - S_zenetr));
1695  elev = atof(str);
1696 
1697 
1698 
1699  sscanf(&Program[PrgCnt], "%d%d%d%d%d%lf%d%d%d", &m, &wl, &f, &nf, &a, &t, &d, &s, &g);
1700 
1701  l= LookforWl_X(wl);
1702 
1703 for(k=0; k<=360; k+=10)
1704 {
1705 
1706 if (DAS.DOption.smposmode)
1707  {
1708  //SD_PosOMUDev(m, l, f);
1709  SD_Position(m, l, f, elev, k);
1710 
1711 
1712  if(DAS.DOption.filtertype == FDOUBLE)
1713  {
1715  SD_NDFilterW(nf); //ND1
1716  }
1717  if(DAS.DOption.filtertype == FPLUS)
1718  {
1719 // if(DAS.Paramini.EqType == GASCODNG1)
1720 // {
1721  SD_FNTorqueM(nf);//ND1
1722  delay(700);
1723 // }
1724  }
1725 
1726  }
1727  //SD_Position(m, l, f, 0, 0);
1728  else
1729  {
1730  //mirror positioning
1731  SD_Mirror(m);
1732  //grating positioning
1733  SD_Grating(l);
1734  //filter wheel positioning
1735  SD_FilterW(f);
1736  //Neutral filter wheel positioning
1737  SD_NDFilterW(nf);
1738  if(DAS.DOption.filtertype == FDOUBLE)
1739  {
1740  if(DAS.Paramini.EqType == SPATRAM2 ||
1743  SD_NDFilterW(nf); //ND1
1744  }
1745  if(DAS.DOption.filtertype == FPLUS)
1746  {
1747 // if(DAS.Paramini.EqType == GASCODNG1)
1748 // {
1749  SD_FNTorqueM(nf);//ND1
1750  delay(700);
1751 // }
1752  }
1753  //Zenith positioning
1754  //SD_Zenith(z);
1755  //Azimuth positioning
1756  //SD_Azimuth(az);
1757  }
1758 
1759 
1760  ExeREM = 0;
1761  PerformMeas(0, a, t, d, s, g);
1762 
1763  ExeREM = 1;
1764 }
1765  E_REM();
1766 
1767 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
double S_zenetr
Definition: SOLPOS.C:92
optionini DOption
Options for DAS execution.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
Definition: SOLPOS.C:45
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
#define SPATRAM3
SPATRAM3.
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
static double elev
Definition: SOLPOS.C:130
int EqType
Spectrometer Type.
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
int LookforWl_X(int x)
Definition: Procedures.c:2295
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_AutoRange()

void E_AutoRange ( void  )

Autoranging.
Procedure for Autoranging. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 342 of file Exec.c.

References AutoRange(), E_REM(), ExeREM, and Status().

Referenced by D_AutoExecution(), and Radio().

343 {
344 
345  ExeREM = 0;
346  Status("Autoranging...");
347  AutoRange(0);
348  ExeREM = 1;
349  E_REM();
350 
351 }
int ExeREM
Definition: DAS_Spat.c:143
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Average()

void E_Average ( void  )

Averaged Measurements.
Procedure for Averaged Measurements. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 612 of file Exec.c.

References E_REM(), ExeREM, LookforWl_X(), PerformMeas(), PrgCnt, Program, SD_FilterW(), SD_Grating(), SD_Mirror(), and wl.

Referenced by D_AutoExecution().

613 {
614 
615  int er=0;
616  int l, f, m, a, d, s, g, wl;
617  double t;
618 
619 
620  extern struct date dok;
621  int StsTot = 0;
622  int StsMir = 0, StsGrat = 0, StsFW = 0;
623 
624  sscanf(&Program[PrgCnt], "%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
625 
626  l= LookforWl_X(wl);
627 
628 
629 
630  //Posiziona specchio
631  SD_Mirror(m);
632  //Posiziona reticolo
633  SD_Grating(l);
634  //Posiziona Ruota dei filtri
635  SD_FilterW(f);
636 
637  ExeREM = 0;
638 
639  PerformMeas(1, a, t, d, s, g); //Measuremet with TExp computed by Autoranging
640 
641 
642  ExeREM = 1;
643  E_REM();
644 
645 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
Definition: Dildef.h:240
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_AvgCCDHor()

void E_AvgCCDHor ( void  )

Averaged Horizontal Measurements.
Procedure for Averaged Measurements with external lamp. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 538 of file Exec.c.

References das::DOption, E_REM(), ExeREM, ExtShutt(), flag::extshutter, LookforWl_X(), PerformMeas(), PrgCnt, Program, SD_FilterW(), SD_Grating(), SD_Mirror(), SD_PosOMUDev(), optionini::smposmode, and wl.

Referenced by D_AutoExecution().

539 {
540 
541  int er=0;
542  int l, f, m, a, d, s, g, wl;
543  double t;
544  extern struct date dok;
545 
546  int StsTot = 0;
547  int StsMir = 0, StsGrat = 0, StsFW = 0;
548 
549  // The progression of "PrgCnt" is now in the Fetch function
550  // PrgCnt += 7;
551 
552  sscanf(&Program[PrgCnt], "%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
553 
554  l= LookforWl_X(wl);
555 
556 
557  if (DAS.DOption.smposmode)
558  SD_PosOMUDev(m, l, f);
559  //SD_Position(m, l, f, 0, 0);
560  else
561  {
562  //mirror positioning
563  SD_Mirror(m);
564  //grating positioning
565  SD_Grating(l);
566  //filter wheel positioning
567  SD_FilterW(f);
568  //Zenith positioning
569 // SD_Zenith(z);
570  //Azimuth positioning
571 // SD_Azimuth(az);
572  }
573  ExeREM = 0;
574  /******************************************************************/
575 
576  //*********************** Start First Measurement ******************
577 
578  PerformMeas(1, a, t, d, s, g); //Measuremet with TExp computed by Autoranging with external lamp
579 
580  //*********************** End First Measurement ******************
581 
582  //*********************** Start Second Measurement ******************
583  //Close External Shutter
584  if (FLAG.extshutter == 0)
585  {
586  ExtShutt(0);
587  FLAG.extshutter = 1;
588 
589  }
590 
591  PerformMeas(2, a, t, d, s, g); //Measuremet with previous TExp (computed by Autoranging with external lamp)
592  //*********************** End Second Measurement ******************
593 
594  //*********************** Start Third Measurement ******************
595  PerformMeas(0, a, t, d, s, g); //Measurement with TExp computed by Autoranging without external lamp
596 
597  //Open External Shutter
598  if (FLAG.extshutter)
599  {
600  ExtShutt(0);
601  FLAG.extshutter = 0;
602  }
603 
604  //*********************** End Third Measurement ******************
605 
606  ExeREM = 1;
607  E_REM();
608 
609 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
flag FLAG
Definition: Exec.c:28
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
Definition: Dildef.h:240
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_PosOMUDev(int m, int w, int f)
perform the simoultaneous positioning of the Spectrometer Devices in the OMU Unit m = mirror w = wave...
Definition: Spat_Device.c:747
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int extshutter
0 = external shutter open; 1 = external shutter closed
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Azimuth()

void E_Azimuth ( void  )

Position Azimuth Axis.

Definition at line 1473 of file Exec.c.

References E_REM(), ExeREM, PrgCnt, Program, and SD_Azimuth().

Referenced by D_AutoExecution().

1474 {
1475  double l;
1476  sscanf(&Program[PrgCnt], "%lf", &l);
1477  ExeREM = 0;
1478 
1479  l = (float) l;
1480 
1481  SD_Azimuth((float)l,0);
1482 
1483  ExeREM = 1;
1484  E_REM();
1485 }
int ExeREM
Definition: DAS_Spat.c:143
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:3110
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Calibra()

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 at line 330 of file Exec.c.

References D_Calibra(), E_REM(), and ExeREM.

Referenced by D_AutoExecution().

331 {
332  ExeREM = 0;
333  D_Calibra();
334  ExeREM = 1;
335  E_REM();
336 
337 }
int ExeREM
Definition: DAS_Spat.c:143
int D_Calibra(void)
Spectral Calibration Procedure for the spectral calibration with HG lamp. Shift of HG spectral line a...
Definition: Procedures.c:2313
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_ChkExLamp()

void E_ChkExLamp ( void  )

Definition at line 1225 of file Exec.c.

References AutoRange(), E_REM(), ExeREM, ExtShutt(), flag::extshutter, and TExp.

Referenced by D_AutoExecution().

1226 {
1227 
1228  int flagstatus = 1;
1229  int cont = 0;
1230  double Texp_temp = 0;
1231  double T1 = 0, T2 = 0;
1232  extern struct date dok;
1233 
1234  // Check if the shutter is open or closed
1235  // It has to be open (so the Exposure time has to be short...)
1236  ExeREM = 0;
1237  do
1238  {
1239  //the shutter is thinked to be open
1240  //first measurement with the shutter open
1241  AutoRange(0);
1242  T1 = TExp;
1243 
1244  //Close External Shutter
1245 
1246  ExtShutt(0);
1247 
1248  AutoRange(0);
1249  T2 = TExp;
1250  if( T1/T2 < 1) // the shutter was open at the first measurement and Now it has to be open again
1251  { //Open External Shutter
1252  ExtShutt(0);
1253  FLAG.extshutter = 0;
1254  flagstatus = 0;
1255  }
1256  else
1257  {
1258  //the shutter was closed at the first measurement so now is already open
1259  FLAG.extshutter = 0;
1260  flagstatus = 0;
1261  }
1262 // AutoRange(0);
1263 // if( (TExp <= T1 + 1) & (TExp >= T1 - 1))
1264 // flagstatus = 0;
1265 
1266  cont++;
1267 
1268  }while((flagstatus) | (cont == 5));
1269 
1270  ExeREM = 1;
1271  E_REM();
1272 
1273 }
int ExeREM
Definition: DAS_Spat.c:143
flag FLAG
Definition: Exec.c:28
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
Definition: Dildef.h:240
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int extshutter
0 = external shutter open; 1 = external shutter closed
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Dark()

void E_Dark ( void  )

Execute Dark Measurement.
Procedure for Dark Measurement. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 279 of file Exec.c.

References img::DATE, DB_DefectPixCorr(), DC_GetCCD(), DI_Regen(), DI_ScanMaxMin(), DIL, das::DOption, E_REM(), ExeREM, GetDateTime(), img::High, img::IHigh, img::ILow, img::Imat, dil::Img, img::Low, image::Mat, optionini::pixcorr, Server, TExp, and img::TIME.

Referenced by D_AutoExecution().

280 {
281 
282  struct tm today;
283  ExeREM = 0;
284 
285  DC_GetCCD(0, TExp, DIL.Img.Mat[Server].Imat, 0);
286  if (DAS.DOption.pixcorr)
288 
292 
293  DI_Regen(Server);
294 
296  // gettime( &DIL.Img.Mat[Server].TIME );
297  // getdate( &DIL.Img.Mat[Server].DATE );
298 
299  ExeREM = 1;
300  E_REM();
301 
302 }
int ExeREM
Definition: DAS_Spat.c:143
int Server
Definition: DAS_Spat.c:253
dil DIL
Definition: 2DPlot.c:26
optionini DOption
Options for DAS execution.
C_DEF void DI_Regen(int s)
C_DEF double DI_ScanMaxMin(int w, float *mx, float *mi)
U16 * Imat
Definition: Dildef.h:286
img Mat[MAXIMG]
Definition: Dildef.h:552
struct date DATE
Definition: Dildef.h:348
das DAS
Definition: Exec.c:30
image Img
Definition: Dildef.h:675
void DB_DefectPixCorr(void)
Apply thew pixel correction. .
Definition: Procedures.c:1568
float IHigh
Definition: Dildef.h:303
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
CTYPE void DLL DC_GetCCD(int Mode, double Exposure, U16 *mat, int Camera)
Get an image at full resolution. Procedure that allows you to read an image, given an exposure time e...
float ILow
Definition: Dildef.h:302
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
int pixcorr
Flag to set defective pixel correction: 0=NOT Corrected, 1=Corrected.
struct time TIME
Definition: Dildef.h:347
float Low
Definition: Dildef.h:294
float High
Definition: Dildef.h:295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_DFMeasure()

void E_DFMeasure ( void  )

Perform Measurement setting the ND Filter Wheel also.
All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 911 of file Exec.c.

References optionini::avgautor, delay(), das::DOption, E_REM(), paramini::EqType, ExeREM, FDOUBLE, optionini::filtertype, FPLUS, LookforWl_X(), optionini::measmode, das::Paramini, PerformMeas(), PrgCnt, Program, SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), SD_PosOMUDev(), optionini::smposmode, SPATRAM2, SPATRAM3, SPATRAMPLUS, and wl.

Referenced by D_AutoExecution().

912 {
913  int er=0;
914  int l, f, m, a, d, s, g,nf;
915  int wl;
916  double t;
917  extern struct date dok;
918 
919 
920  int StsTot = 0;
921  int StsMir = 0, StsGrat = 0, StsFW = 0;
922 // The progression of "PrgCnt" is now in the Fetch function
923 // PrgCnt += 7;
924 
925 
926  sscanf(&Program[PrgCnt], "%d%d%d%d%d%lf%d%d%d", &m, &wl, &f, &nf, &a, &t, &d, &s, &g);
927 
928  l= LookforWl_X(wl);
929 
930 
931  if (DAS.DOption.smposmode)
932  {
933  SD_PosOMUDev(m, l, f);
935  {
937  SD_NDFilterW(nf); //ND1
938  }
939  if(DAS.DOption.filtertype == FPLUS)
940  {
941  //if(DAS.Paramini.EqType == GASCODNG1)
942  //{
943  SD_FNTorqueM(nf);//ND1
944  delay(700);
945  //}
946  }
947  }
948  //SD_Position(m, l, f, 0, 0);
949  else
950  {
951  //mirror positioning
952  SD_Mirror(m);
953  //grating positioning
954  SD_Grating(l);
955  //filter wheel positioning
956  SD_FilterW(f);
957  //Neutral filter wheel positioning
958  SD_NDFilterW(nf);
960  {
962  SD_NDFilterW(nf); //ND1
963  }
964  if(DAS.DOption.filtertype == FPLUS)
965  {
966  //if(DAS.Paramini.EqType == GASCODNG1)
967  //{
968  SD_FNTorqueM(nf);//ND1
969  delay(700);
970  //}
971  }
972  //Zenith positioning
973  //SD_Zenith(z);
974  //Azimuth positioning
975  //SD_Azimuth(az);
976  }
977 
978  ExeREM = 0;
979 
980  if(DAS.DOption.measmode == 0) //Single
981  PerformMeas(0, a, t, d, s, g);
982  if(DAS.DOption.measmode == 1) //AVG
983  {
984  if(DAS.DOption.avgautor)
985  PerformMeas(1, a, t, d, s, g);
986  else
987  PerformMeas(2, a, t, d, s, g);
988 
989  }
990 
991  ExeREM = 1;
992  E_REM();
993 
994 
995 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
Definition: Dildef.h:240
#define SPATRAM3
SPATRAM3.
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_PosOMUDev(int m, int w, int f)
perform the simoultaneous positioning of the Spectrometer Devices in the OMU Unit m = mirror w = wave...
Definition: Spat_Device.c:747
int measmode
measuring mode: 0 = Single; 1 = Averaged
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
int EqType
Spectrometer Type.
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
int LookforWl_X(int x)
Definition: Procedures.c:2295
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_DirectSun()

void E_DirectSun ( void  )

.
All the E_xxxxx() function are used during the execution in PRG mode

Definition at line 1596 of file Exec.c.

References delay(), das::DOption, E_REM(), elev, paramini::EqType, ExeREM, FDOUBLE, optionini::filtertype, FPLUS, LookforWl_X(), das::Paramini, PerformMeas(), PrgCnt, Program, S_azim, S_zenetr, SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), SD_Position(), optionini::smposmode, SPATRAM2, SPATRAM3, SPATRAMPLUS, and wl.

Referenced by D_AutoExecution().

1597 {
1598 
1599  char str[16];
1600  float azi, elev;
1601  int er=0;
1602  int l, f, m, a, d, s, g, wl, nf;
1603  double t;
1604 
1605  //sun Azimuth angle
1606  sprintf(str, "%.01lf", S_azim);
1607  azi = atof(str);
1608 
1609  //Elevation Angle
1610  sprintf(str, "%.01lf", (90 - S_zenetr));
1611  elev = atof(str);
1612 
1613 
1614 
1615  sscanf(&Program[PrgCnt], "%d%d%d%d%d%lf%d%d%d", &m, &wl, &f, &nf, &a, &t, &d, &s, &g);
1616 
1617  l= LookforWl_X(wl);
1618 
1619 
1620  if (DAS.DOption.smposmode)
1621  {
1622  //SD_PosOMUDev(m, l, f);
1623  SD_Position(m, l, f, elev, azi);
1624  if(DAS.DOption.filtertype == FDOUBLE)
1625  {
1627  SD_NDFilterW(nf); //ND1
1628  }
1629  if(DAS.DOption.filtertype == FPLUS)
1630  {
1631  // if(DAS.Paramini.EqType == GASCODNG1)
1632  // {
1633  SD_FNTorqueM(nf);//ND1
1634  delay(700);
1635  // }
1636  }
1637 
1638  }
1639  //SD_Position(m, l, f, 0, 0);
1640  else
1641  {
1642  //mirror positioning
1643  SD_Mirror(m);
1644  //grating positioning
1645  SD_Grating(l);
1646  //filter wheel positioning
1647  SD_FilterW(f);
1648  //Neutral filter wheel positioning
1649  SD_NDFilterW(nf);
1650  if(DAS.DOption.filtertype == FDOUBLE)
1651  {
1653  SD_NDFilterW(nf); //ND1
1654  }
1655  if(DAS.DOption.filtertype == FPLUS)
1656  {
1657 // if(DAS.Paramini.EqType == GASCODNG1)
1658 // {
1659  SD_FNTorqueM(nf);//ND1
1660  delay(700);
1661 // }
1662  }
1663  //Zenith positioning
1664  //SD_Zenith(z);
1665  //Azimuth positioning
1666  //SD_Azimuth(az);
1667  }
1668 
1669 
1670  ExeREM = 0;
1671  PerformMeas(0, a, t, d, s, g);
1672 
1673  ExeREM = 1;
1674  E_REM();
1675 
1676 
1677 
1678 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
double S_zenetr
Definition: SOLPOS.C:92
optionini DOption
Options for DAS execution.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
Definition: SOLPOS.C:45
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
#define SPATRAM3
SPATRAM3.
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
static double elev
Definition: SOLPOS.C:130
int EqType
Spectrometer Type.
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
int LookforWl_X(int x)
Definition: Procedures.c:2295
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Expo()

void E_Expo ( void  )

Exposuring.
Read the Exposure time from PRG file. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 365 of file Exec.c.

References E_REM(), PrgCnt, Program, and Status().

Referenced by D_AutoExecution().

366 {
367  double l;
368 // PrgCnt += 4;
369  sscanf(&Program[PrgCnt], "%lf", &l);
370  Status("Exposure Time");
371 // TExp = l;
372  E_REM();
373 }
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_ExtLampOFF()

void E_ExtLampOFF ( void  )

External lamp OFF.

Definition at line 66 of file Exec.c.

References E_REM(), ExeREM, flag::extlamp, and ExtLamp().

Referenced by D_AutoExecution().

67 {
68  ExeREM = 0;
69 
70  if(FLAG.extlamp)
71  ExtLamp(0);
72 
73  ExeREM = 1;
74  E_REM();
75 
76 }
int ExeREM
Definition: DAS_Spat.c:143
int ExtLamp(int mod)
change the status of the external lamp change the status of the external lamp (ON or OFF) through a r...
Definition: Exec.c:1117
int extlamp
0 = external lamp OFF; 1 = external lamp ON
flag FLAG
Definition: Exec.c:28
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_ExtLampON()

void E_ExtLampON ( void  )

External lamp ON.

Definition at line 54 of file Exec.c.

References E_REM(), ExeREM, flag::extlamp, and ExtLamp().

Referenced by D_AutoExecution().

55 {
56  ExeREM = 0;
57 
58  if(FLAG.extlamp == 0)
59  ExtLamp(0);
60 
61  ExeREM = 1;
62  E_REM();
63 
64 }
int ExeREM
Definition: DAS_Spat.c:143
int ExtLamp(int mod)
change the status of the external lamp change the status of the external lamp (ON or OFF) through a r...
Definition: Exec.c:1117
int extlamp
0 = external lamp OFF; 1 = external lamp ON
flag FLAG
Definition: Exec.c:28
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_ExtShutClose()

void E_ExtShutClose ( void  )

Close External Shutter.

Definition at line 91 of file Exec.c.

References E_REM(), ExeREM, ExtShutt(), and flag::extshutter.

Referenced by D_AutoExecution().

92 {
93  ExeREM = 0;
94 
95  if(FLAG.extshutter == 0)
96  ExtShutt(0);
97 
98  ExeREM = 1;
99  E_REM();
100 }
int ExeREM
Definition: DAS_Spat.c:143
flag FLAG
Definition: Exec.c:28
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int extshutter
0 = external shutter open; 1 = external shutter closed
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_ExtShutOpen()

void E_ExtShutOpen ( void  )

Open External Shutter.

Definition at line 79 of file Exec.c.

References E_REM(), ExeREM, ExtShutt(), and flag::extshutter.

Referenced by D_AutoExecution().

80 {
81  ExeREM = 0;
82 
83  if(FLAG.extshutter == 1)
84  ExtShutt(0);
85 
86  ExeREM = 1;
87  E_REM();
88 }
int ExeREM
Definition: DAS_Spat.c:143
flag FLAG
Definition: Exec.c:28
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int extshutter
0 = external shutter open; 1 = external shutter closed
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Filter()

void E_Filter ( void  )

Filter Wheel positioning.
Procedure for Filter Wheel positioning. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 761 of file Exec.c.

References E_REM(), ExeREM, PrgCnt, Program, and SD_FilterW().

Referenced by D_AutoExecution().

762 {
763  int l;
764 // The progression of "PrgCnt" is now in the Fetch function
765 // PrgCnt += 6;
766  sscanf(&Program[PrgCnt], "%d", &l);
767  ExeREM = 0;
768  SD_FilterW(l);
769  ExeREM = 1;
770  E_REM();
771 }
int ExeREM
Definition: DAS_Spat.c:143
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_GetCCD()

int E_GetCCD ( void  )

Get CCD.
Execute DB_GetCCD. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 705 of file Exec.c.

References DB_GetCCD(), E_REM(), ExeREM, and Status().

Referenced by D_AutoExecution(), and Radio().

706 {
707 
708  ExeREM = 0;
709  Status("Getting CCD Image...");
710  DB_GetCCD(1);
711  ExeREM = 1;
712  E_REM();
713  return 0;
714 
715 
716 }
int ExeREM
Definition: DAS_Spat.c:143
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Hg_Off()

void E_Hg_Off ( void  )

HG OFF.
Hg lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 255 of file Exec.c.

References E_REM(), ExeREM, and HgLamp().

Referenced by D_AutoExecution(), and E_HgScan().

256 {
257  ExeREM = 0;
258  HgLamp(0);
259  ExeREM = 1;
260  E_REM();
261 }
int ExeREM
Definition: DAS_Spat.c:143
void HgLamp(int mod)
HG Lamp ON/OFF .
Definition: Spat_Device.c:2673
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Hg_On()

void E_Hg_On ( void  )

HG ON.
Hg lamp ON. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 246 of file Exec.c.

References E_REM(), ExeREM, and HgLamp().

Referenced by D_AutoExecution(), and E_HgScan().

247 {
248  ExeREM = 0;
249  HgLamp(1);
250  ExeREM = 1;
251  E_REM();
252 
253 }
int ExeREM
Definition: DAS_Spat.c:143
void HgLamp(int mod)
HG Lamp ON/OFF .
Definition: Spat_Device.c:2673
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_HGratCal()

void E_HGratCal ( void  )

Perform home grating and HG Calibration.
All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 1488 of file Exec.c.

References D_Calibra(), ExeREM, HomeGratingFast(), and Status().

Referenced by D_AutoExecution().

1489 {
1490  ExeREM = 0;
1491  Status("Home for Grating...");
1492 // AMS_MotorOn_Off(AMS1,0,1);
1493  HomeGratingFast(0);
1494 // AMS_MotorOn_Off(AMS1,0,0);
1495 
1496  D_Calibra();
1497 
1498  ExeREM = 1;
1499 // E_REM();
1500 
1501 
1502 }
int ExeREM
Definition: DAS_Spat.c:143
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
int D_Calibra(void)
Spectral Calibration Procedure for the spectral calibration with HG lamp. Shift of HG spectral line a...
Definition: Procedures.c:2313
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_HgScan()

void E_HgScan ( void  )

Check the full spectral range with HG ON.
All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 1504 of file Exec.c.

References AutoRange(), D_Plot(), DB_GetCCD(), das::DOption, E_Hg_Off(), E_Hg_On(), ExeREM, FDOUBLE, optionini::filtertype, das::Flag, FPLUS, flag::plotW, SaveCalib(), SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), and Status().

Referenced by D_AutoExecution().

1505 {
1506 
1507  int l;
1508 
1509  //Switch On QJ Lamp
1510  E_Hg_On();
1511  ExeREM = 0;
1512  //Position Mirror
1513  SD_Mirror(2);
1514 
1515  for (l=1; l<10; l++)
1516  {
1517  //position grating
1518  SD_Grating(l);
1519  // Position Filterwheel
1520  SD_FilterW(0);
1521  if(DAS.DOption.filtertype == FDOUBLE)
1522  SD_NDFilterW(0);
1523  else if(DAS.DOption.filtertype == FPLUS)
1524  SD_FNTorqueM(0);
1525  //autorange
1526  Status("Autoranging...");
1527  AutoRange(0);
1528  Status("Getting CCD Image...");
1529  DB_GetCCD(1);
1530  //Save the Spectrum
1531  SaveCalib(1);
1532 
1533  if(DAS.Flag.plotW)
1534  D_Plot();
1535 
1536 
1537 
1538 
1539  }
1540  E_Hg_Off();
1541 
1542  ExeREM = 1;
1543  //E_REM();
1544 
1545 
1546 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
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
int plotW
Flag for the plot display.
flag Flag
Structure for different flags.
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
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
das DAS
Definition: Exec.c:30
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void SaveCalib(int mod)
Definition: Procedures.c:2130
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
void D_Plot(void)
ViewPlot callback .
Definition: Procedures.c:192
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Home_SM1()

int E_Home_SM1 ( void  )

Home for SM1.
Set the reference position for Stepper motor 1 (Input Mirror). All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 111 of file Exec.c.

References flag::ADPC104, flag::ADTempTest, E_REM(), ExeREM, GRAT_TASK_TIME, ids::GRATHOME, HomeMirror(), IDS, MRefreshTimeout(), MRemoveTimeout(), Status(), and Task_HomeGrat().

Referenced by D_AutoExecution().

112 {
113  ExeREM = 0;
114 
115  Status("Home for Mirror..");
116 // AMS_MotorOn_Off(AMS1,1,0);
117  //MClearTimeout(&IDS.GRATHOME);
119  //MClearTimeout(&IDS.REFRTEMP);
120  HomeMirror();
121 // AMS_MotorOn_Off(AMS1,0,0);
122  //Home Grating Task
123 
125  // PeltierTemp Task
126  if((FLAG.ADPC104 == 0) | (FLAG.ADTempTest == 1))
127  {
128  //MRefreshTimeout(&IDS.LISTEMP, LISTEMP_TASK_TIME, Task_LIS_Temp, NULL);
129  }
130 
131  ExeREM = 1;
132  E_REM();
133 
134  return 0;
135 
136 
137 }
void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud)
int ExeREM
Definition: DAS_Spat.c:143
flag FLAG
Definition: Exec.c:28
int HomeMirror(void)
Input Mirror in the reference Position. The Input Mirror reaches the reference Position.
Definition: Init.c:685
int GRATHOME
Home for Grating ID.
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
void MRemoveTimeout(TIMEOUT_ID id)
int ADTempTest
= 0 -> AD Converter results on the Control Panel; = 1 -> AD Converter Testing Phase(results on the co...
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
#define GRAT_TASK_TIME
Grating Home.
int ADPC104
0 –> Device PC104 exist, 1 –> PC104 DOESN&#39;T exist
ids IDS
ID tasks.
Definition: DAS_Spat.c:54
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Home_SM2()

int E_Home_SM2 ( void  )

Home for SM2.
Set the reference position for Stepper motor 2 (Grating). All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 139 of file Exec.c.

References E_REM(), ExeREM, HomeGratingFast(), and Status().

Referenced by D_AutoExecution().

140 {
141  ExeREM = 0;
142  Status("Home for Grating...");
143 // AMS_MotorOn_Off(AMS1,0,1);
144  HomeGratingFast(0);
145 // AMS_MotorOn_Off(AMS1,0,0);
146 
147  ExeREM = 1;
148  E_REM();
149 
150  return 0;
151 }
int ExeREM
Definition: DAS_Spat.c:143
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
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Home_SM3()

int E_Home_SM3 ( void  )

Home for SM3.
Set the reference position for Stepper motor 3 (Filter Wheel). All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 154 of file Exec.c.

References AMS2, AMS_MotorOn_Off(), E_REM(), ExeREM, HomeFiltersFast(), and Status().

Referenced by D_AutoExecution().

155 {
156  ExeREM = 0;
157  Status("Home for Filter Wheel...");
158  AMS_MotorOn_Off(AMS2,1,1);
159  HomeFiltersFast();
160 // AMS_MotorOn_Off(AMS2,0,0);
161 
162  ExeREM = 1;
163  E_REM();
164 
165  return 0;
166 }
int ExeREM
Definition: DAS_Spat.c:143
#define AMS2
AMS2 address.
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 Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
int HomeFiltersFast(void)
(Fastest) Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position...
Definition: Init.c:853
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Home_SM4()

int E_Home_SM4 ( void  )

Home for SM4.
Set the reference position for Stepper motor 4 (Neutral density filter wheel). All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 209 of file Exec.c.

References AMS2, AMS_Default(), DB_InitAMS(), DB_KB_ButtonActive(), E_REM(), ExeREM, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, Status(), stepm::step, and das::StepM.

Referenced by D_AutoExecution().

210 {
211  int er =0;
212 
213  ExeREM = 0;
214  Status("Home for NDFilter Wheel...");
215 
217  AMS_Default(AMS2);
223  //Attiva i pulsanti sulla keyboard
225 
226 
227 // HomeAzimFast();
228 
229  ExeREM = 1;
230  E_REM();
231 
232  return 0;
233 }
stepm StepM
Stepper motors parameters structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
int ExeREM
Definition: DAS_Spat.c:143
#define AMS2
AMS2 address.
int DB_InitAMS(int nid, int mod, int powera, int stepa, int slopea, int speeda, int powerb, int stepb, int slopeb, int speedb)
Init selected AMS.
Definition: Init.c:1391
int SM_A
Motor A (su Y11) respectively: ID=0->InputMirror,ID=1->FilterWheel,ID=2->Zenith.
int slope[AMSMAX][2]
Stepper Motors Slope.
void AMS_Default(int id)
Set default values to AMS parameters Procedure for setting the default values of power.speed, stepping and slope to the selected AMS adapter.
Definition: Dxl.c:174
das DAS
Definition: Exec.c:30
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int speed[AMSMAX][2]
Stepper Motors Speed.
int step[AMSMAX][2]
Stepper Motors Step.
int power[AMSMAX][2]
Stepper Motors Power.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Home_SM5()

int E_Home_SM5 ( void  )

Home for SM5.
Set the reference position for Stepper motor 5 (MIGE Zenith). All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 168 of file Exec.c.

References E_REM(), ExeREM, HomeZenithFast(), and Status().

Referenced by D_AutoExecution().

169 {
170  ExeREM = 0;
171  Status("Home for Zenith...");
172 // AMS_MotorOn_Off(AMS3,1,0);
173  HomeZenithFast();
174 // AMS_MotorOn_Off(AMS3,0,0);
175 
176  ExeREM = 1;
177  E_REM();
178 
179  return 0;
180 }
int ExeREM
Definition: DAS_Spat.c:143
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int HomeZenithFast(void)
Home for Zenith Axis.
Definition: Init.c:1143
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Home_SM6()

int E_Home_SM6 ( void  )

Home for SM6.
Set the reference position for Stepper motor 6 (MIGE Azimuth). All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 182 of file Exec.c.

References AMS3, AMS_Default(), DB_InitAMS(), DB_KB_ButtonActive(), E_REM(), ExeREM, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, Status(), stepm::step, and das::StepM.

Referenced by D_AutoExecution().

183 {
184  int er =0;
185 
186  ExeREM = 0;
187  Status("Home for Azimuth...");
188 
190  AMS_Default(AMS3);
196  //Attiva i pulsanti sulla keyboard
198 
199 
200 // HomeAzimFast();
201 
202  ExeREM = 1;
203  E_REM();
204 
205  return 0;
206 }
stepm StepM
Stepper motors parameters structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
int ExeREM
Definition: DAS_Spat.c:143
int DB_InitAMS(int nid, int mod, int powera, int stepa, int slopea, int speeda, int powerb, int stepb, int slopeb, int speedb)
Init selected AMS.
Definition: Init.c:1391
int SM_A
Motor A (su Y11) respectively: ID=0->InputMirror,ID=1->FilterWheel,ID=2->Zenith.
int slope[AMSMAX][2]
Stepper Motors Slope.
void AMS_Default(int id)
Set default values to AMS parameters Procedure for setting the default values of power.speed, stepping and slope to the selected AMS adapter.
Definition: Dxl.c:174
das DAS
Definition: Exec.c:30
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int speed[AMSMAX][2]
Stepper Motors Speed.
int step[AMSMAX][2]
Stepper Motors Step.
#define AMS3
AMS3 address.
int power[AMSMAX][2]
Stepper Motors Power.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_IRefSun()

void E_IRefSun ( void  )

Io Measured near the sun.
This procedure carries out a measurements for the reference spectrum used in DOAS analysis, with the alt Azimut platfor pointing the sun. Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform)

Definition at line 845 of file Exec.c.

References das::DOption, E_REM(), elev, ExeREM, LookforWl_X(), PerformMeas(), PrgCnt, Program, S_azim, S_zenetr, SD_Azimuth(), SD_FilterW(), SD_Grating(), SD_Mirror(), SD_Position(), SD_Zenith(), optionini::smposmode, and wl.

Referenced by D_AutoExecution().

846 {
847 
848  char str[16];
849  float azi, elev;
850  int er=0;
851  int l, f, m, a, d, s, g, wl;
852  double t;
853 
854  //sun Azimuth angle
855  sprintf(str, "%.01lf", S_azim);
856  azi = (float)atof(str);
857 
858  //Elevation Angle
859  sprintf(str, "%.01lf", (90 - S_zenetr));
860  elev = (float)atof(str);
861 
862 
863  sscanf(&Program[PrgCnt], "%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
864 
865  l= LookforWl_X(wl);
866 
867 
868  if (DAS.DOption.smposmode)
869  SD_Position(m, l, f, elev, azi);
870  else
871  {
872  //mirror positioning
873  SD_Mirror(m);
874  //grating positioning
875  SD_Grating(l);
876  //filter wheel positioning
877  SD_FilterW(f);
878  //Zenith positioning
879  SD_Zenith(elev);
880  //Azimuth positioning
881  SD_Azimuth(azi,0);
882  }
883 
884 
885  ExeREM = 0;
886  PerformMeas(0, a, t, d, s, g);
887 
888  ExeREM = 1;
889  E_REM();
890 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
double S_zenetr
Definition: SOLPOS.C:92
optionini DOption
Options for DAS execution.
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
Definition: SOLPOS.C:45
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:2916
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:3110
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
static double elev
Definition: SOLPOS.C:130
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Label()

void E_Label ( void  )

labeling.
The text after the key-word is a label. All the E_xxxxx() function are used during the execution in PRG mode

Definition at line 745 of file Exec.c.

References E_REM(), PrgCnt, and Program.

Referenced by D_AutoExecution().

746 {
747  char lab[255];
748  int c = 0;
749 // The progression of "PrgCnt" is now in the Fetch function
750 // PrgCnt += 5;
751 // while(Program[PrgCnt++] != 34);
752  PrgCnt =PrgCnt+2;
753  do
754  lab[c++] = Program[PrgCnt];
755  while(Program[PrgCnt++] != 34);
756  E_REM();
757 // lab[c] = 0;
758 // Status(lab);
759 }
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Lambda()

void E_Lambda ( void  )

Lambda Reading.
When the WAVELEN key-word is encountred in the PRG file, the Wavelength code from PRG file is read and the grating is positioned. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 718 of file Exec.c.

References E_REM(), ExeREM, LookforWl_X(), PrgCnt, Program, SD_Grating(), and wl.

Referenced by D_AutoExecution().

719 {
720  int wl, l;
721 // The progression of "PrgCnt" is now in the Fetch function
722 // PrgCnt += 7;
723  sscanf(&Program[PrgCnt], "%d", &wl);
724  l= LookforWl_X(wl);
725  ExeREM = 0;
726  SD_Grating(l);
727  ExeREM = 1;
728  E_REM();
729 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Meashor()

void E_Meashor ( void  )

perform horizontal measurements (3) 1) measurement with external lamp 2) measurement without the external lamp (same exposure time than 1) 3) measurement without the external lamp (exposure time recalculated)

Definition at line 1280 of file Exec.c.

References D_Plot(), D_Saving(), DB_GetCCD(), das::DOption, E_REM(), ExeREM, ExtShutt(), flag::extshutter, das::Flag, LookforWl_X(), PerformMeas(), flag::plotW, PrgCnt, Program, SD_FilterW(), SD_Grating(), SD_Mirror(), SD_PosOMUDev(), optionini::smposmode, and wl.

Referenced by D_AutoExecution().

1281 {
1282  int er=0;
1283  int l, f, m, a, d, s, g, wl;
1284  double t;
1285  extern struct date dok;
1286 
1287  int StsTot = 0;
1288  int StsMir = 0, StsGrat = 0, StsFW = 0;
1289 
1290  // The progression of "PrgCnt" is now in the Fetch function
1291  // PrgCnt += 7;
1292 
1293  sscanf(&Program[PrgCnt], "%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
1294 
1295  l= LookforWl_X(wl);
1296 
1297 
1298  if (DAS.DOption.smposmode)
1299  SD_PosOMUDev(m, l, f);
1300  //SD_Position(m, l, f, 0, 0);
1301  else
1302  {
1303  //mirror positioning
1304  SD_Mirror(m);
1305  //grating positioning
1306  SD_Grating(l);
1307  //filter wheel positioning
1308  SD_FilterW(f);
1309  //Zenith positioning
1310  //SD_Zenith(z);
1311  //Azimuth positioning
1312  //SD_Azimuth(az);
1313  }
1314  ExeREM = 0;
1315  /******************************************************************/
1316  /******************************************************************/
1317 
1318  //*********************** Start First Measurement ******************
1319  PerformMeas(0, a, t, d, s, g);
1320  //*********************** End First Measurement ******************
1321 
1322  //*********************** Start Second Measurement ******************
1323  //Close External Shutter
1324  if (FLAG.extshutter == 0)
1325  {
1326  ExtShutt(0);
1327  FLAG.extshutter = 1;
1328 
1329  }
1330 
1331  //Measure (d=1) or dark (d=0) -
1332  if(d)
1333  {
1334  DB_GetCCD(1);
1335  }
1336  else
1337  {
1338  DB_GetCCD(0);
1339  }
1340 
1341  //
1342  if(s)
1343  {
1344  D_Saving();
1345  }
1346  if(g)
1347  {
1348  if(DAS.Flag.plotW)
1349  D_Plot();
1350  }
1351  //*********************** End Second Measurement ******************
1352 
1353  //*********************** Start Third Measurement ******************
1354  PerformMeas(0, a, t, d, s, g);
1355 
1356 
1357  //Open External Shutter
1358  if (FLAG.extshutter)
1359  {
1360  ExtShutt(0);
1361  FLAG.extshutter = 0;
1362  }
1363  //*********************** End Third Measurement ******************
1364  ExeREM = 1;
1365  E_REM();
1366 
1367 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
flag FLAG
Definition: Exec.c:28
int plotW
Flag for the plot display.
flag Flag
Structure for different flags.
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
Definition: Dildef.h:240
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_PosOMUDev(int m, int w, int f)
perform the simoultaneous positioning of the Spectrometer Devices in the OMU Unit m = mirror w = wave...
Definition: Spat_Device.c:747
void D_Plot(void)
ViewPlot callback .
Definition: Procedures.c:192
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int extshutter
0 = external shutter open; 1 = external shutter closed
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Meashor2()

void E_Meashor2 ( void  )

perform horizontal measurements (2) 1) measurement with external lamp 2) measurement without the external lamp (same exposure time than 1)

Definition at line 1370 of file Exec.c.

References D_Plot(), D_Saving(), DB_GetCCD(), das::DOption, E_REM(), ExeREM, ExtShutt(), flag::extshutter, das::Flag, LookforWl_X(), PerformMeas(), flag::plotW, PrgCnt, Program, SD_FilterW(), SD_Grating(), SD_Mirror(), SD_PosOMUDev(), optionini::smposmode, and wl.

Referenced by D_AutoExecution().

1371 {
1372  int er=0;
1373  int l, f, m, a, d, s, g;
1374  double t;
1375  extern struct date dok;
1376  int wl;
1377 
1378  int StsTot = 0;
1379  int StsMir = 0, StsGrat = 0, StsFW = 0;
1380 
1381  // The progression of "PrgCnt" is now in the Fetch function
1382  // PrgCnt += 7;
1383 
1384  sscanf(&Program[PrgCnt], "%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
1385 
1386  l= LookforWl_X(wl);
1387 
1388 
1389  if (DAS.DOption.smposmode)
1390  SD_PosOMUDev(m, l, f);
1391  //SD_Position(m, l, f, 0, 0);
1392  else
1393  {
1394  //mirror positioning
1395  SD_Mirror(m);
1396  //grating positioning
1397  SD_Grating(l);
1398  //filter wheel positioning
1399  SD_FilterW(f);
1400  //Zenith positioning
1401  //SD_Zenith(z);
1402  //Azimuth positioning
1403  //SD_Azimuth(az);
1404  }
1405  ExeREM = 0;
1406  /******************************************************************/
1407  /******************************************************************/
1408 
1409  //*********************** Start First Measurement ******************
1410  PerformMeas(0, a, t, d, s, g);
1411  //*********************** End First Measurement ******************
1412 
1413  //*********************** Start Second Measurement ******************
1414  //Close External Shutter
1415  if (FLAG.extshutter == 0)
1416  {
1417  ExtShutt(0);
1418  FLAG.extshutter = 1;
1419 
1420  }
1421 
1422  //Measure (d=1) or dark (d=0) -
1423  if(d)
1424  {
1425  DB_GetCCD(1);
1426  }
1427  else
1428  {
1429  DB_GetCCD(0);
1430  }
1431 
1432  //
1433  if(s)
1434  {
1435  D_Saving();
1436  }
1437  if(g)
1438  {
1439  if(DAS.Flag.plotW)
1440  D_Plot();
1441  }
1442  //*********************** End Second Measurement ******************
1443 
1444  //*********************** Start Third Measurement ******************
1445 // PerformMeas(0, a, t, d, s, g);
1446 
1447 
1448  //Open External Shutter
1449  if (FLAG.extshutter)
1450  {
1451  ExtShutt(0);
1452  FLAG.extshutter = 0;
1453  }
1454  //*********************** End Third Measurement ******************
1455  ExeREM = 1;
1456  E_REM();
1457 
1458 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
flag FLAG
Definition: Exec.c:28
int plotW
Flag for the plot display.
flag Flag
Structure for different flags.
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
Definition: Dildef.h:240
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_PosOMUDev(int m, int w, int f)
perform the simoultaneous positioning of the Spectrometer Devices in the OMU Unit m = mirror w = wave...
Definition: Spat_Device.c:747
void D_Plot(void)
ViewPlot callback .
Definition: Procedures.c:192
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int extshutter
0 = external shutter open; 1 = external shutter closed
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Measure()

void E_Measure ( void  )

Perform Measurement.
All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 1060 of file Exec.c.

References optionini::avgautor, das::DOption, E_REM(), ExeREM, LookforWl_X(), optionini::measmode, PerformMeas(), PrgCnt, Program, SD_FilterW(), SD_Grating(), SD_Mirror(), SD_PosOMUDev(), optionini::smposmode, and wl.

Referenced by D_AutoExecution().

1061 {
1062  int er=0;
1063  int l, f, m, a, d, s, g;
1064  int wl;
1065  double t;
1066  extern struct date dok;
1067 
1068 
1069  int StsTot = 0;
1070  int StsMir = 0, StsGrat = 0, StsFW = 0;
1071 // The progression of "PrgCnt" is now in the Fetch function
1072 // PrgCnt += 7;
1073 
1074 
1075  sscanf(&Program[PrgCnt], "%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
1076 
1077  l= LookforWl_X(wl);
1078 
1079 
1080  if (DAS.DOption.smposmode)
1081  SD_PosOMUDev(m, l, f);
1082 
1083  //SD_Position(m, l, f, 0, 0);
1084  else
1085  {
1086  //mirror positioning
1087  SD_Mirror(m);
1088  //grating positioning
1089  SD_Grating(l);
1090  //filter wheel positioning
1091  SD_FilterW(f);
1092  //Zenith positioning
1093  //SD_Zenith(z);
1094  //Azimuth positioning
1095  //SD_Azimuth(az);
1096  }
1097 
1098  ExeREM = 0;
1099 
1100  if(DAS.DOption.measmode == 0) //Single
1101  PerformMeas(0, a, t, d, s, g);
1102  if(DAS.DOption.measmode == 1) //AVG
1103  {
1104  if(DAS.DOption.avgautor)
1105  PerformMeas(1, a, t, d, s, g);
1106  else
1107  PerformMeas(2, a, t, d, s, g);
1108 
1109  }
1110 
1111  ExeREM = 1;
1112  E_REM();
1113 
1114 
1115 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
Definition: Dildef.h:240
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int SD_PosOMUDev(int m, int w, int f)
perform the simoultaneous positioning of the Spectrometer Devices in the OMU Unit m = mirror w = wave...
Definition: Spat_Device.c:747
int measmode
measuring mode: 0 = Single; 1 = Averaged
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
int LookforWl_X(int x)
Definition: Procedures.c:2295
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Mirror()

void E_Mirror ( void  )

Inpot Mirror positioning.
Procedure for Input mirror positioning. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 773 of file Exec.c.

References E_REM(), ExeREM, PrgCnt, Program, and SD_Mirror().

Referenced by D_AutoExecution().

774 {
775  int l;
776 // The progression of "PrgCnt" is now in the Fetch function
777 // PrgCnt += 6;
778  sscanf(&Program[PrgCnt], "%d", &l);
779  ExeREM = 0;
780  SD_Mirror(l);
781  ExeREM = 1;
782  E_REM();
783 }
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_NDFilter()

void E_NDFilter ( void  )

Set ND Filter.
Set ND Filter All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 429 of file Exec.c.

References E_REM(), ExeREM, PrgCnt, Program, and SD_NDFilterW().

Referenced by D_AutoExecution().

430 {
431 
432  int l;
433  int er=0;
434 // char str[80];
435  sscanf(&Program[PrgCnt], "%d", &l);
436  ExeREM = 0;
437  SD_NDFilterW(l);
438  ExeREM = 1;
439  E_REM();
440 
441 
442 
443 }
int ExeREM
Definition: DAS_Spat.c:143
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Plot()

void E_Plot ( void  )

Plot Spectrum.
Plot Spectrum. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 237 of file Exec.c.

References E_REM(), ExeREM, and ViewPlot().

Referenced by D_AutoExecution().

238 {
239  ExeREM = 0;
240  ViewPlot(1);
241  ExeREM = 1;
242  E_REM();
243 // delay(3000);
244 }
int ExeREM
Definition: DAS_Spat.c:143
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
Definition: Spat_Plot.c:3775
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Qj_Off()

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 at line 271 of file Exec.c.

References E_REM(), ExeREM, and QjLamp().

Referenced by D_AutoExecution(), and E_QjScan().

272 {
273  ExeREM = 0;
274  QjLamp(0);
275  ExeREM = 1;
276  E_REM();
277 
278 }
int ExeREM
Definition: DAS_Spat.c:143
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Qj_On()

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 at line 263 of file Exec.c.

References E_REM(), ExeREM, and QjLamp().

Referenced by D_AutoExecution(), and E_QjScan().

264 {
265  ExeREM = 0;
266  QjLamp(1);
267  ExeREM = 1;
268  E_REM();
269 
270 }
int ExeREM
Definition: DAS_Spat.c:143
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_QjScan()

void E_QjScan ( void  )

Check the full spectral range with QJ ON.
All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 1548 of file Exec.c.

References AutoRange(), D_Plot(), DB_GetCCD(), das::DOption, E_Qj_Off(), E_Qj_On(), ExeREM, FDOUBLE, optionini::filtertype, das::Flag, FPLUS, flag::plotW, SaveCalib(), SaveCnt, SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), and Status().

Referenced by D_AutoExecution().

1549 {
1550  //perform a full scan set of measurement with the QJ lamp
1551 
1552  int l;
1553 
1554  //Switch On QJ Lamp
1555  E_Qj_On();
1556  ExeREM = 0;
1557  //Position Mirror
1558  SD_Mirror(2);
1559 
1560  for (l=1; l<10; l++)
1561  {
1562  //position grating
1563  SD_Grating(l);
1564  // Position Filterwheel
1565  SD_FilterW(0);
1566  if(DAS.DOption.filtertype == FDOUBLE)
1567  SD_NDFilterW(0);
1568  else if(DAS.DOption.filtertype == FPLUS)
1569  SD_FNTorqueM(0);
1570  //autorange
1571  Status("Autoranging...");
1572  AutoRange(0);
1573  Status("Getting CCD Image...");
1574  DB_GetCCD(1);
1575  //Save the Spectrum
1576  SaveCalib(1);
1577 
1578  if(DAS.Flag.plotW)
1579  D_Plot();
1580 
1581 
1582 
1583 
1584  }
1585  E_Qj_Off();
1586 
1587 
1588  SaveCnt++;
1589 
1590  ExeREM = 1;
1591  //E_REM();
1592 
1593 }
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int ExeREM
Definition: DAS_Spat.c:143
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
optionini DOption
Options for DAS execution.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
int plotW
Flag for the plot display.
int SaveCnt
Definition: Procedures.c:49
flag Flag
Structure for different flags.
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
das DAS
Definition: Exec.c:30
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
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void SaveCalib(int mod)
Definition: Procedures.c:2130
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
void D_Plot(void)
ViewPlot callback .
Definition: Procedures.c:192
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
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
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Radio()

void E_Radio ( void  )

Radiometric Measurements.
Procedure for Radiometric Measurements. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 684 of file Exec.c.

References E_REM(), ExeREM, p, PrgCnt, and Program.

Referenced by D_AutoExecution().

685 {
686  int l, f, p, m, a, d, s, g;
687  double t;
688 // PrgCnt += 7;
689 
690  sscanf(&Program[PrgCnt], "%d%d%d%d%d%lf%d%d%d", &l, &f, &p, &m, &a, &t, &d, &s, &g);
691 
692  E_REM();
693 
694 // Grating(l);
695 // FW(f);
696 // Polarizer(p);
697 
698  ExeREM = 0;
699 // Radio(g);
700  ExeREM = 1;
701 
702 }
int ExeREM
Definition: DAS_Spat.c:143
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
static double p
Definition: SOLPOS.C:131
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_REM()

void E_REM ( void  )

Flush string since the Carriege Return.
Procedure for flushing the readed string since the Carriege Return. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 47 of file Exec.c.

References ExeREM, PrgCnt, and Program.

Referenced by D_AutoExecution(), D_Measure(), E_AAMeasure(), E_AAPos(), E_Almucantar(), E_AutoRange(), E_Average(), E_AvgCCDHor(), E_Azimuth(), E_Calibra(), E_ChkExLamp(), E_Dark(), E_DFMeasure(), E_DirectSun(), E_Expo(), E_ExtLampOFF(), E_ExtLampON(), E_ExtShutClose(), E_ExtShutOpen(), E_Filter(), E_GetCCD(), E_Hg_Off(), E_Hg_On(), E_Home_SM1(), E_Home_SM2(), E_Home_SM3(), E_Home_SM4(), E_Home_SM5(), E_Home_SM6(), E_IRefSun(), E_Label(), E_Lambda(), E_Meashor(), E_Meashor2(), E_Measure(), E_Mirror(), E_NDFilter(), E_Plot(), E_Qj_Off(), E_Qj_On(), E_Radio(), E_Save(), E_SetCCDOffSet(), E_SetCCDPow(), E_SetCCDTemp(), E_SetCCDVBin(), E_WAIT(), and E_Zenith().

48 {
49  // Flush stringa
50  if(ExeREM)
51  while(Program[PrgCnt++] != 10);
52 }
int ExeREM
Definition: DAS_Spat.c:143
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93

§ E_Save()

void E_Save ( void  )

Save Image.
Procedure for saving image or data. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 355 of file Exec.c.

References D_Saving(), E_REM(), and ExeREM.

Referenced by D_AutoExecution(), and Radio().

356 {
357 
358  ExeREM = 0;
359  D_Saving();
360  ExeREM = 1;
361  E_REM();
362 
363 }
int ExeREM
Definition: DAS_Spat.c:143
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_SetCCDOffSet()

void E_SetCCDOffSet ( void  )

Set the CCD Offst (only for HIRES-V.
All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 394 of file Exec.c.

References DC_SetUsrGain(), E_REM(), das::Marconi, marconi::Offset, PrgCnt, Program, and Status().

Referenced by D_AutoExecution().

395 {
396 
397  int os;
398  int er=0;
399 // char str[80];
400  sscanf(&Program[PrgCnt], "%d", &os);
401  Status("CCD OffSet");
402  DAS.Marconi.Offset = os;
403  DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0);
404 
405  E_REM();
406 
407 
408 }
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
CTYPE void DLL DC_SetUsrGain(int Gain, int Range, int Offset, int Camera)
Procedure that allows you to set the ccd gain. Procedure that allows you to set the ccd gain...
marconi Marconi
CCD Sensor struct.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_SetCCDPow()

void E_SetCCDPow ( void  )

Set CCD Power.
Set CCD Power. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 411 of file Exec.c.

References gui::ContrPanel, paramini::CoolPw, E_REM(), das::Gui, controlpanel::lbl_Par, MObjectSetText(), das::Paramini, PrgCnt, Program, omuthr::ReachTemp, and Status().

Referenced by D_AutoExecution().

412 {
413 
414  int l;
415  int er=0;
416  char str[80];
417  sscanf(&Program[PrgCnt], "%d", &l);
418  Status("CCD Temperature");
419  DAS.Paramini.CoolPw = l;
420  OMUTHR.ReachTemp = 0;
421  sprintf(str,"%.1lf%%",(double)DAS.Paramini.CoolPw / 10);
423  E_REM();
424 
425 
426 }
gui Gui
Graphic User Interface Structure.
omuthr OMUTHR
Definition: Exec.c:29
MOBJECT lbl_Par[11]
Parametric Labels of the Control Panel.
void MObjectSetText(MOBJECT obj, const char *text)
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
int CoolPw
CCD Init Power.
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
controlpanel ContrPanel
Control Panel Structure.
int ReachTemp
Target Temperature status.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_SetCCDTemp()

void E_SetCCDTemp ( void  )

Set CCD Temp.
Set CCD Temp. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 375 of file Exec.c.

References gui::ContrPanel, DB_InitCamera(), E_REM(), das::Gui, paramini::ITemp, controlpanel::lbl_Par, MObjectSetText(), das::Paramini, PrgCnt, Program, omuthr::ReachTemp, and Status().

Referenced by D_AutoExecution().

376 {
377 
378  double l;
379  int er=0;
380  char str[80];
381  sscanf(&Program[PrgCnt], "%lf", &l);
382  Status("CCD Temperature");
383  DAS.Paramini.ITemp = l;
384  OMUTHR.ReachTemp = 0;
385  sprintf(str, "%.1lf", DAS.Paramini.ITemp);
387 
388  er = DB_InitCamera(1);
389  E_REM();
390 
391 
392 }
gui Gui
Graphic User Interface Structure.
int DB_InitCamera(int mod)
Initialize Camera Parameters. Procedure that initialize the CCD Camera.
Definition: Init.c:170
omuthr OMUTHR
Definition: Exec.c:29
MOBJECT lbl_Par[11]
Parametric Labels of the Control Panel.
void MObjectSetText(MOBJECT obj, const char *text)
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
controlpanel ContrPanel
Control Panel Structure.
double ITemp
CCD Target Temperature.
int ReachTemp
Target Temperature status.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_SetCCDVBin()

void E_SetCCDVBin ( void  )

Set CCD Vert Binn.
Set CCD Vert Binn. All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 446 of file Exec.c.

References DB_InitCamera(), E_REM(), das::Paramini, PrgCnt, Program, Status(), and paramini::VBin.

Referenced by D_AutoExecution().

447 {
448 
449  int d, er = 0;
450  sscanf(&Program[PrgCnt], "%d", &d);
451  Status("CCD Vertical Binning");
452  DAS.Paramini.VBin = d;
453  er = DB_InitCamera(1);
454  E_REM();
455 
456 
457 
458 }
int DB_InitCamera(int mod)
Initialize Camera Parameters. Procedure that initialize the CCD Camera.
Definition: Init.c:170
das DAS
Definition: Exec.c:30
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
int VBin
CCD Vertical Binning.
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_WAIT()

void E_WAIT ( void  )

Delay Procedure.
sleep the program . All the E_xxxxx() function are used during the execution in PRG mode.

Definition at line 731 of file Exec.c.

References E_REM(), MLoopWhileEvents(), PrgCnt, and Program.

Referenced by D_AutoExecution().

732 {
733  unsigned l, c;
734 // The progression of "PrgCnt" is now in the Fetch function
735 // PrgCnt += 4;
736  sscanf(&Program[PrgCnt], "%u", &l);
737 
738  for(c = 0; c < l / 100; c++)
739  {
740  Sleep(100);
741  MLoopWhileEvents(0);
742  }
743  E_REM();
744 }
void MLoopWhileEvents(int discard)
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ E_Zenith()

void E_Zenith ( void  )

Position Zenith Axis.

Definition at line 1461 of file Exec.c.

References E_REM(), ExeREM, PrgCnt, Program, and SD_Zenith().

Referenced by D_AutoExecution().

1462 {
1463  double l;
1464  sscanf(&Program[PrgCnt], "%lf", &l);
1465  ExeREM = 0;
1466  l = (float) l;
1467  SD_Zenith((float)l);
1468 
1469  ExeREM = 1;
1470  E_REM();
1471 }
int ExeREM
Definition: DAS_Spat.c:143
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:2916
char * Program
buffer for the PRG file
Definition: DAS_Spat.c:90
long PrgCnt
Counter for the position in the PRG file.
Definition: DAS_Spat.c:93
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ExtLamp()

int ExtLamp ( int  mod)

change the status of the external lamp change the status of the external lamp (ON or OFF) through a radio signal controlled by the AMS output port (bit 7) NOTE - This feature is not used!!!!!!

Definition at line 1117 of file Exec.c.

References AMS1, AMS_wopto(), delay(), stepm::OOP, and das::StepM.

Referenced by DB_HorComm_CB(), E_ExtLampOFF(), and E_ExtLampON().

1118 {
1119 
1120  unsigned long t = 1000;
1121 
1122  DAS.StepM.OOP[AMS1] |= 0x80; //bit 7, 10000000, dec = 128
1123 
1124 
1125  // 1's complement
1126  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1127  //write on the optoinsulated port
1129  // again 1's complement for restoring the positive logic
1130  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1131 
1132  delay(t);
1133 
1134  DAS.StepM.OOP[AMS1] &= 0x7F; // 01111111, dec = 127
1135 
1136  // 1's complement
1137  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1138  //write on the optoinsulated port
1140  // again 1's complement for restoring the positive logic
1141  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1142 
1143 
1144 
1145  delay(t);
1146 
1147 
1148  return 0;
1149 
1150 }
stepm StepM
Stepper motors parameters structure.
das DAS
Definition: Exec.c:30
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
int AMS_wopto(int id, unsigned int w)
write the value on the optoinsulated port write the value on the optoinsulated port.
Definition: Dxl.c:911
#define AMS1
AMS1 address.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ExtShutt()

int ExtShutt ( int  mod)

change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) through a radio signal controlled by the AMS output port (bit 6)

Definition at line 1155 of file Exec.c.

References AMS1, AMS2, AMS_wopto(), delay(), paramini::EqType, MMessageDialog(), stepm::OOP, das::Paramini, SPATRAM2, das::StepM, and TROPOGAS.

Referenced by DB_HorComm_CB(), E_AvgCCDHor(), E_ChkExLamp(), E_ExtShutClose(), E_ExtShutOpen(), E_Meashor(), and E_Meashor2().

1156 {
1157 
1158  unsigned long t = 500;
1159  char buf[256];
1160  int er = 0;
1161 
1162  if(DAS.Paramini.EqType == TROPOGAS )
1163  {
1164  DAS.StepM.OOP[AMS2] |= 0x40; //bit 6, 01000000, dec = 64
1165 
1166  // 1's complement
1167  DAS.StepM.OOP[AMS2] = ~DAS.StepM.OOP[AMS2];
1168  //write on the optoinsulated port
1170  // again 1's complement for restoring the positive logic
1171  DAS.StepM.OOP[AMS2] = ~DAS.StepM.OOP[AMS2];
1172 
1173  delay(t);
1174 
1175  DAS.StepM.OOP[AMS2] &= 0xBF; // 10111111, dec = 191
1176 
1177  // 1's complement
1178  DAS.StepM.OOP[AMS2] = ~DAS.StepM.OOP[AMS2];
1179  //write on the optoinsulated port
1181  // again 1's complement for restoring the positive logic
1182  DAS.StepM.OOP[AMS2] = ~DAS.StepM.OOP[AMS2];
1183 
1184  //delay(t);
1185 
1186  }
1187  else if(DAS.Paramini.EqType == SPATRAM2)
1188  {
1189  DAS.StepM.OOP[AMS1] |= 0x40; //bit 6, 01000000, dec = 64
1190 
1191 
1192  // 1's complement
1193  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1194  //write on the optoinsulated port
1196  // again 1's complement for restoring the positive logic
1197  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1198 
1199  delay(t);
1200 
1201  DAS.StepM.OOP[AMS1] &= 0xBF; // 10111111, dec = 191
1202 
1203 
1204  // 1's complement
1205  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1206  //write on the optoinsulated port
1208  // again 1's complement for restoring the positive logic
1209  DAS.StepM.OOP[AMS1] = ~DAS.StepM.OOP[AMS1];
1210 
1211  //delay(t);
1212  }
1213  else
1214  {
1215  sprintf(buf, "For this Equipment the AMS is UNKNOWN\nPlease Contact DANBO!!!!");
1216  er = MMessageDialog("DAS information", buf, "Ok", NULL);
1217  if (!er)
1218  return 1;
1219 
1220  }
1221  return 0;
1222 
1223 }
stepm StepM
Stepper motors parameters structure.
#define AMS2
AMS2 address.
das DAS
Definition: Exec.c:30
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int AMS_wopto(int id, unsigned int w)
write the value on the optoinsulated port write the value on the optoinsulated port.
Definition: Dxl.c:911
#define AMS1
AMS1 address.
int EqType
Spectrometer Type.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ PerformMeas()

void PerformMeas ( int  mod,
int  ar,
double  te,
int  mt,
int  sv,
int  pl 
)

Perform Averaged or single measurements.

Parameters
mod
  • 0 –> Single measurement
  • 1 –> Averaged measurement (with the ARange - the computatiuon of the optimal exposure time)
  • 2 –> Light measurement (without ARange - Use the last Exposure time.
ar
  • 0 –> NO Autoranging (Exposure time = te)
  • 1 –> Perform Autoranging
te
  • Exposure time utilized if ar = 0
mt
  • 0 –> Dark Mesurements
  • 1 –> Light Measurements
sv
  • 0 –> DO NOT save spectrum
  • 1 –> Save Spectrum
pl
  • 0 –> DO NOT show plot
  • 1 –> Show Plot
Returns
er

Definition at line 463 of file Exec.c.

References AutoRange(), D_Average(), D_Plot(), D_Saving(), DB_GetCCD(), das::Flag, flag::plotW, Status(), and TExp.

Referenced by E_AAMeasure(), E_Almucantar(), E_Average(), E_AvgCCDHor(), E_DFMeasure(), E_DirectSun(), E_IRefSun(), E_Meashor(), E_Meashor2(), and E_Measure().

464 {
465 
466 
467 repeat:
468 
469  if(mod == 1)
470  {
471 
472  //Autoranging (ar=1) or fixed texp (ar=0)
473  if(ar == 0)
474  TExp = te;
475  //Light measurements (mt=1) or dark measurement (mt=0)
476  if(mt)
477  D_Average(1); // 1 = perform autoranging, 0 = DO NOT PERFORM autoranging
478 
479  else
480  DB_GetCCD(0);
481  }
482  if(mod == 2)
483  {
484 
485  //Autoranging (ar=1) or fixed texp (ar=0)
486  if(ar == 0)
487  TExp = te;
488  //Light measurements (mt=1) or dark measurement (mt=0)
489  if(mt)
490  D_Average(0);
491  else
492  DB_GetCCD(0);
493  }
494  if(mod == 0) //single measurements
495  {
496  //Autoranging (ar=1) or fixed texp (ar=0)
497  if(ar)
498  AutoRange(0);
499  else
500  {
501  //if te not zero, use te as TExp otherwise
502  //TExp remains the same previously calculated
503  if (te != 0)
504  TExp = te;
505  }
506 
507  //Light measurements (mt=1) or dark measurement (mt=0)
508  if(mt)
509  DB_GetCCD(1);
510 
511 
512  else
513  DB_GetCCD(0);
514  }
515 
516  //Check the image maximum value
517 // if (DIL.Img.Mat[Server].IHigh >= 65000) //CCD Saturated
518 // goto repeat;
519 
520  //save measurement
521  if(sv)
522  {
523  D_Saving();
524  }
525  //plot spectrum
526  if(pl)
527  if(DAS.Flag.plotW)
528  D_Plot();
529 
530 
531  Status("Ready");
532 
533 }
int plotW
Flag for the plot display.
flag Flag
Structure for different flags.
void D_Average(int mod)
Performs averaged measurements .
Definition: Procedures.c:2655
das DAS
Definition: Exec.c:30
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
void D_Plot(void)
ViewPlot callback .
Definition: Procedures.c:192
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ quick()

void quick ( unsigned *  elemento,
int  conta 
)

Definition at line 305 of file Exec.c.

306 {
307 // int qs(unsigned *elemento, int sinistra, int destra);
308 
309 // qs(elemento, 0, conta - 1);
310 
311 }

§ Radio()

void Radio ( int  g)

NOT Used
.

Definition at line 650 of file Exec.c.

References E_AutoRange(), E_GetCCD(), and E_Save().

651 {
652 // double tup, tdw;
653 // Mirror(1);
654  E_AutoRange();
655 // tdw = TExp;
656 
657 // Mirror(3);
658  E_AutoRange();
659 // tup = TExp;
660 
661 // if(tdw < tup) TExp = tdw;
662 // else TExp = tup;
663 
664 // Mirror(1);
665  E_GetCCD();
666  E_Save();
667  if(g)
668  {
669 // E_Grafo();
670  }
671 // Mirror(3);
672  E_GetCCD();
673  E_Save();
674  if(g)
675 // { E_Grafo(); }
676 
677 // Mirror(1);
678  E_GetCCD();
679  E_Save();
680 // if(g)
681 // { E_Grafo(); }
682 
683 }
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
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
void E_AutoRange(void)
Autoranging. Procedure for Autoranging. All the E_xxxxx() function are used during the execution in P...
Definition: Exec.c:342
+ Here is the call graph for this function:

Variable Documentation

§ DAS

das DAS

Definition at line 30 of file Exec.c.

§ DXL

DXL_par DXL

Definition at line 27 of file Exec.c.

§ ExeREM

int ExeREM

§ FLAG

flag FLAG

Definition at line 28 of file Exec.c.

§ FlagBarra

int FlagBarra = 0

Definition at line 339 of file Exec.c.

§ FlagTExp

double FlagTExp = 1.0

Definition at line 38 of file Exec.c.

Referenced by AutoR_TestMeas(), and AutoRange().

§ NewDate

char NewDate[8]

Definition at line 42 of file Exec.c.

§ OldDate

char OldDate[8]

Definition at line 41 of file Exec.c.

§ OMUTHR

omuthr OMUTHR

Definition at line 29 of file Exec.c.

§ PARAM

paramini PARAM

Definition at line 31 of file Exec.c.

§ Total

int Total = 0

Progressive acquisition number for file (MAX defined = 50)

Definition at line 34 of file Exec.c.

Referenced by D_Saving(), and SaveCalib().

______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:45:20 for DAS - Rel. 3.1.6 - 18/09/2017.