|
DAS
3.1.6 - 18/09/2017
|
Functions executed at DAS start-up. More...
#include <windows.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "mgui.h"#include "DAS_Spatram.h"#include "dcl.h"#include "dil.h"#include "wsc.h"#include "dxl.h"#include "bil.h"#include "portio32.h"
Include dependency graph for Init.c:Go to the source code of this file.
Functions | |
| void | CBExpo (MOBJECT p, void *od, void *ad) |
| Close the Exposure shell and stop the image acquisition. More... | |
| int | D_Homing (MOBJECT p, int id, int sm, int tout) |
| int | DB_CloseCOM (void) |
| Close the previously opened COM port. More... | |
| 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. More... | |
| int | DB_InitCamera (int mod) |
| Initialize Camera Parameters. Procedure that initialize the CCD Camera. More... | |
| int | DB_InitCOM (int comn) |
| Init selected COM port. More... | |
| int | DB_InitDil (void) |
| Initialize DIL. Procedure that initialize the DTA Imaging library. More... | |
| int | DB_InitMotor (int mod) |
| Initialize AMS. Procedure that initialize the parameters for the AMS's devices. More... | |
| void | FPGACB (void) |
| int | HomeAzimFast (void) |
| Home for Azimuth Axis. More... | |
| int | HomeFiltersFast (void) |
| (Fastest) Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position. Similar to HomeFilterWheel(void), but faster More... | |
| int | HomeGratingFast (int mod) |
| (Fastest) Grating in the reference Position. The Grating reaches the reference Position. Similar to HomeGrating(void), but faster More... | |
| int | HomeMirror (void) |
| Input Mirror in the reference Position. The Input Mirror reaches the reference Position. More... | |
| int | HomeNDFiltersFast (void) |
| (Fastest) ND Fliter wheel in the reference Position. The ND Fliter wheel reaches the reference Position. Similar to HomeFilterWheel(void), but faster More... | |
| int | HomeTrack (char *buf, int id, int sm, int mode) |
| int | HomeZenithFast (void) |
| Home for Zenith Axis. More... | |
| MOBJECT | MDCreateExpo (char *tit) |
| Create Exposure/countdown shell. Procedure that build the Exposure/countdown shell during the calculated or "apriori" imposed integration time. More... | |
| void __stdcall | ShowDown (const char *str, int port) |
| Shows the countdown. Procedure for the visualisation of the countdown. More... | |
Variables | |
| AzimuthSt | AST |
| Azimuth. More... | |
| config | Cfg |
| Camera controls & Options. More... | |
| das | DAS |
| DAS structure. More... | |
| ccd | DC_CCD |
| CCD settings. More... | |
| ptf | DC_HP |
| Platform settings. More... | |
| DXL_par | DXL |
| DXL structure. More... | |
| flag | FLAG |
| flags structure More... | |
| paramini | PARAM |
| Param.ini. More... | |
| stepm | STEPM |
| Stepper Motors. More... | |
| ZenithSt | ZST |
| Zenith. More... | |
Functions executed at DAS start-up.
Definition in file Init.c.
| void CBExpo | ( | MOBJECT | p, |
| void * | od, | ||
| void * | ad | ||
| ) |
Close the Exposure shell and stop the image acquisition.
Definition at line 43 of file Init.c.
References DC_BrkFlg().
Referenced by MDCreateExpo().
Here is the call graph for this function:
Here is the caller graph for this function:| int D_Homing | ( | MOBJECT | p, |
| int | id, | ||
| int | sm, | ||
| int | tout | ||
| ) |
Definition at line 470 of file Init.c.
References AMS_TestHome(), optionini::amsprogbar, D_VRange(), das::DOption, MLoopWhileEvents(), MObjectSetText(), st, and Status().
Referenced by HomeGratingFast(), HomeMirror(), and HomeZenithFast().
Here is the call graph for this function:
Here is the caller graph for this function:| int DB_CloseCOM | ( | void | ) |
Close the previously opened COM port.
Definition at line 460 of file Init.c.
References DXL_Close().
Here is the call graph for this function:| 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.
| nid | = AMS address:
|
| mod |
|
| powera | –> Power assigned to motor A |
| stepa | = 0, 1...13. steps assigned to motor A |
| slopea | –> Slope assigned to motor A |
| speeda | –> Speed assigned to motor A |
| powerb | –> Power assigned to motor B |
| stepb | = 0, 1...13. steps assigned to motor B |
| slopeb | –> Slope assigned to motor B |
| speedb | –> Speed assigned to motor B |
Definition at line 1391 of file Init.c.
References ACKLEN, DXL_par::add, AMS_Error(), AMS_firmrev(), AMS_Power(), AMS_Slope(), AMS_Speed(), AMS_Step(), DXL_par::bufrx, DXL_par::buftx, DXL_par::com, das::DOption, DXL_RxStr(), DXL_TxStr(), FDOUBLE, optionini::filtertype, stepm::firmrev, HomeAzimFast(), HomeFiltersFast(), HomeGratingFast(), HomeMirror(), HomeNDFiltersFast(), HomeZenithFast(), SioReset(), and das::StepM.
Referenced by DB_Home_CB(), DB_InitMotor(), E_Home_SM4(), E_Home_SM6(), HomeAzimFast(), HomeFiltersFast(), HomeGratingFast(), HomeMirror(), HomeNDFiltersFast(), and HomeZenithFast().
Here is the call graph for this function:
Here is the caller graph for this function:| int DB_InitCamera | ( | int | mod | ) |
Initialize Camera Parameters.
Procedure that initialize the CCD Camera.
| mod |
|
Definition at line 170 of file Init.c.
References _MAX_PATH, AllocUSMat(), img::attrib, marconi::AVGmat, BIL, CCD_INFO, CCDHANDLE, config::CCDType, CELSIUS, CLEARCCD, CodeEq2Name(), d_fileman::CONFIGDIREQUIPMENT, gui::ContrPanel, paramini::CoolPw, DB_InitDil(), DBDEMO, DC_CCDtoName(), DC_Close(), DC_GetPower(), DC_LoadCameraConfig(), DC_OpenByConfig(), DC_OpenPar(), DC_PTFtoName(), DC_RWData(), DC_SetBinning(), DC_SetGain(), DC_SetPathName(), DC_SetPower(), DC_SetTemp(), DC_SetUsrGain(), DC_Status(), DD_VRange(), optionini::DEFPIXFILENAME, bil::DFILEM, DI_CloseImage(), DI_FileExist(), DI_ImageProperties(), DI_OpenImage(), DI_PathExist(), DI_Regen(), DI_RunHisto(), DIL, das::DOption, ccd::dx, ccd::dy, paramini::EqType, flag::exemode, config::FDL_PCI_Index, das::Flag, das::Gui, d_fileman::HOMEDIRECTORY, IDX, IDY, img::Imat, ImatDark, dil::Img, optionini::imgtype, paramini::ITemp, controlpanel::lbl_Par, LoadDB_DefectPixel(), MANUAL, das::Marconi, image::Mat, MMessageDialog(), MObjectSetText(), marconi::Offset, das::Paramini, optionini::pixcorr, config::Platform, PRGFILE, PTF_INFO, READ_DATA, Server, ShowDown(), Status(), SZAMASTERM, SZAMODE, TEMPHANDLE, TEMPORIZED, TESTCCD, TESTSZAMODE, paramini::VBin, and WhoSys().
Referenced by ApplyChCB(), E_SetCCDTemp(), E_SetCCDVBin(), InitCCD_AMS(), and Task_CCD_Temp().
Here is the caller graph for this function:| int DB_InitCOM | ( | int | comn | ) |
Init selected COM port.
| comn |
|
Definition at line 452 of file Init.c.
References Baud19200, and DXL_Open().
Referenced by DB_InitMotor().
Here is the call graph for this function:
Here is the caller graph for this function:| int DB_InitDil | ( | void | ) |
Initialize DIL. Procedure that initialize the DTA Imaging library.
Definition at line 112 of file Init.c.
References BIL, spectrumheader::ccdex, spectrumheader::ccdey, spectrumheader::ccdsx, spectrumheader::ccdsy, config::CCDType, spectrumheader::ccdvb, spectrumheader::ccdwx, spectrumheader::ccdwy, DC_CCDtoName(), DC_PTFtoName(), DI_Init(), DI_OpenDigit(), DI_OpenImage(), DI_RunHisto(), DOASMODE, das::DOption, ccd::dx, ccd::dy, flag::exemode, das::Flag, IDX, IDY, optionini::imgtype, OFFLINEPLOT, das::Paramini, config::Platform, Server, bil::SPH, and paramini::VBin.
Referenced by DB_InitCamera(), ViewNext(), ViewNext_BIN(), and Visualizza().
Here is the call graph for this function:
Here is the caller graph for this function:| int DB_InitMotor | ( | int | mod | ) |
Initialize AMS. Procedure that initialize the parameters for the AMS's devices.
| mod; | mod = 0–> do not init COM, mod = 1 –> init COM |
Definition at line 1584 of file Init.c.
References AMS1, AMS2, AMS3, AMS_dirfin(), flag::AMSPres, COM1, COM2, ComErrors(), gui::ContrPanel, DB_InitAMS(), DB_InitCOM(), DBDEMO, paramini::EqType, flag::exemode, das::Flag, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, das::Gui, controlpanel::LedSM, mige::linked, LIS_, MANUAL, das::MIGE, MMessageDialog(), MPixmapSetImageFile(), das::Paramini, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, SPATRAM, SPATRAM2, SPATRAM3, SPATRAMPLUS, stepm::speed, stepm::step, das::StepM, TESTAMS, and TROPOGAS.
Referenced by ApplyChCB(), and InitCCD_AMS().
Here is the call graph for this function:
Here is the caller graph for this function:| void FPGACB | ( | void | ) |
Definition at line 1568 of file Init.c.
References DXL_par::bufrx, DXL_RxStr(), DXL_TxStr(), Message(), and STS0LEN.
Here is the call graph for this function:| int HomeAzimFast | ( | void | ) |
Home for Azimuth Axis.
Definition at line 1229 of file Init.c.
References controlpanel::Albl_LS, AMS3, AMS_AzzeraCoord(), AMS_chkbitsts(), AMS_Default(), AMS_dirfin(), AMS_Divisore(), AMS_TrackOff(), AMS_TrackOn(), optionini::amsprogbar, gui::ContrPanel, D_VRange(), DB_InitAMS(), das::DOption, das::Gui, controlpanel::LedSM, Message(), das::MIGE, MLoopWhileEvents(), MObjectSetText(), MPixmapSetImageFile(), AzimuthSt::Pos, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, stepm::speed_Hz, st, Status(), stepm::step, das::StepM, and mige::type.
Referenced by DB_InitAMS(), and DB_TestHomeTypeCB().
Here is the call graph for this function:
Here is the caller graph for this function:| int HomeFiltersFast | ( | void | ) |
(Fastest) Fliter wheel in the reference Position.
The Fliter wheel reaches the reference Position. Similar to HomeFilterWheel(void), but faster
Definition at line 853 of file Init.c.
References ACKLEN, controlpanel::Albl_LS, AMS2, AMS_AzzeraCoord(), AMS_chkbitsts(), AMS_Default(), AMS_dirfin(), AMS_TrackOff(), AMS_TrackOn(), optionini::amsprogbar, DXL_par::buftx, gui::ContrPanel, D_VRange(), DB_InitAMS(), das::DOption, DXL_RxStr(), DXL_TxStr(), FWS, das::Gui, controlpanel::LedSM, Message(), MLoopWhileEvents(), MObjectSetText(), MPixmapSetImageFile(), FilterWheelSt::Pos, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, stepm::speed_Hz, st, Status(), stepm::step, and das::StepM.
Referenced by DB_InitAMS(), DB_TestHomeTypeCB(), and E_Home_SM3().
Here is the call graph for this function:
Here is the caller graph for this function:| int HomeGratingFast | ( | int | mod | ) |
(Fastest) Grating in the reference Position.
The Grating reaches the reference Position. Similar to HomeGrating(void), but faster
Definition at line 780 of file Init.c.
References controlpanel::Albl_LS, AMS1, AMS_AzzeraCoord(), AMS_Default(), AMS_dirfin(), AMS_DoPos(), AMS_Home(), AMS_HomeDefault(), gui::ContrPanel, D_Homing(), DB_InitAMS(), GRS, das::Gui, HomeTrack(), stepm::hometype, controlpanel::LedSM, LookforWl_X(), Message(), MObjectSetText(), MPixmapSetImageFile(), paramini::Offset, das::Paramini, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, st, Status(), stepm::step, das::StepM, and GratingSt::Wl.
Referenced by DB_InitAMS(), DB_TestHomeTypeCB(), E_HGratCal(), E_Home_SM2(), and Task_HomeGrat().
Here is the call graph for this function:
Here is the caller graph for this function:| int HomeMirror | ( | void | ) |
Input Mirror in the reference Position.
The Input Mirror reaches the reference Position.
Definition at line 685 of file Init.c.
References controlpanel::Albl_LS, AMS1, AMS_AzzeraCoord(), AMS_Default(), AMS_dirfin(), AMS_Divisore(), AMS_DoPos(), AMS_Home(), AMS_HomeDefault(), gui::ContrPanel, D_Homing(), DB_InitAMS(), stepm::divider, paramini::EqType, GASCODNG4, das::Gui, HomeTrack(), stepm::hometype, controlpanel::LedSM, Message(), Mir_Code, Mir_CodeTropo, MIS, MObjectSetText(), MPixmapSetImageFile(), stepm::multiplier, paramini::Offset, das::Paramini, MirrorSt::Pos, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, SMfraz(), SPATRAM3, stepm::speed, stepm::speed_Hz, Status(), stepm::step, das::StepM, and TROPOGAS.
Referenced by DB_InitAMS(), DB_TestHomeTypeCB(), and E_Home_SM1().
Here is the call graph for this function:
Here is the caller graph for this function:| int HomeNDFiltersFast | ( | void | ) |
(Fastest) ND Fliter wheel in the reference Position.
The ND Fliter wheel reaches the reference Position. Similar to HomeFilterWheel(void), but faster
Definition at line 941 of file Init.c.
References ACKLEN, controlpanel::Albl_LS, AMS2, AMS_AzzeraCoord(), AMS_chkbitsts(), AMS_Default(), AMS_dirfin(), AMS_TrackOff(), AMS_TrackOn(), optionini::amsprogbar, DXL_par::buftx, gui::ContrPanel, D_VRange(), DB_InitAMS(), das::DOption, DXL_RxStr(), DXL_TxStr(), FWS, das::Gui, controlpanel::LedSM, Message(), MLoopWhileEvents(), MObjectSetText(), MPixmapSetImageFile(), FilterWheelSt::Pos, stepm::power, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, stepm::speed_Hz, st, Status(), stepm::step, and das::StepM.
Referenced by DB_InitAMS().
Here is the call graph for this function:
Here is the caller graph for this function:| int HomeTrack | ( | char * | buf, |
| int | id, | ||
| int | sm, | ||
| int | mode | ||
| ) |
Definition at line 518 of file Init.c.
References AMS_chkbitsts(), AMS_Divisore(), AMS_TrackOff(), AMS_TrackOn(), optionini::amsprogbar, D_VRange(), das::DOption, GRAT_TASK_TIME, ids::GRATHOME, IDS, MLoopWhileEvents(), MRefreshTimeout(), stepm::speed_Hz, st, das::StepM, and Task_HomeGrat().
Referenced by HomeGratingFast(), HomeMirror(), and HomeZenithFast().
Here is the call graph for this function:
Here is the caller graph for this function:| int HomeZenithFast | ( | void | ) |
Home for Zenith Axis.
Definition at line 1143 of file Init.c.
References controlpanel::Albl_LS, AMS3, AMS_AzzeraCoord(), AMS_chkbitsts(), AMS_Default(), AMS_dirfin(), AMS_Home(), AMS_HomeDefault(), gui::ContrPanel, D_Homing(), DB_InitAMS(), das::Gui, HomeTrack(), stepm::hometype, controlpanel::LedSM, Message(), MObjectSetText(), MPixmapSetImageFile(), ZenithSt::Pos, stepm::power, SD_Zenith_H(), stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, st, Status(), stepm::step, and das::StepM.
Referenced by DB_InitAMS(), DB_TestHomeTypeCB(), and E_Home_SM5().
Here is the call graph for this function:
Here is the caller graph for this function:| MOBJECT MDCreateExpo | ( | char * | tit | ) |
Create Exposure/countdown shell. Procedure that build the Exposure/countdown shell during the calculated or "apriori" imposed integration time.
Create the Exposure shell.
Creation of the Exposure shell during an image acquisition.
| *tit | pointer to the char variable with the integration time |
| tit | pointer to a char variable containing the title of the shell. |
Definition at line 55 of file Init.c.
References BI_TILED, CBExpo(), graph::digit, DIL, dil::Graph, marconi::LblExpD, marconi::LblExpP, das::Marconi, MCreateColForm(), MCreateImagePButtonExt(), MCreatePixmapFromData(), MCreatePixmapFromFile(), MCreateShell(), MFormSetSpacing(), MObjectSetBackgroundImageFile(), MObjectSetShadow(), MObjectSetTransparency(), MPButtonSetCallback(), MShellRealize(), SF_NO_CLOSE, SF_NO_MAXIMIZE, SF_NO_MINIMIZE, SF_NO_RESIZE, and WS_NONE.
Referenced by DB_GetCCD().
Here is the call graph for this function:
Here is the caller graph for this function:| void __stdcall ShowDown | ( | const char * | str, |
| int | port | ||
| ) |
Shows the countdown.
Procedure for the visualisation of the countdown.
| cdown | pointer to a char variable containing the partial time. |
Definition at line 98 of file Init.c.
References DI_WriteDigit(), marconi::LblExpD, das::Marconi, and MLoopWhileEvents().
Referenced by DB_GetCCD(), and DB_InitCamera().
Here is the call graph for this function:
Here is the caller graph for this function: