10 #include <sys/types.h> 11 #include <sys/timeb.h> 48 void writelogmotor(
int mod,
int id_motore,
int k,
int d,
long steps,
unsigned char ams_id)
59 sprintf(str1,
"Input Mirror");
61 sprintf(str1,
"Grating ");
63 sprintf(str1,
"Filter Wheel");
65 sprintf(str1,
"Zenith ");
67 sprintf(str1,
"Azimuth ");
69 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
81 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n",
82 datebuf, timebuf, str1, ams_id, d, steps, steps, DXL.
buftx, DXL.
bufrx);
83 write(fc, str, strlen(str));
94 sprintf(str1,
"Input Mirror");
96 sprintf(str1,
"Grating ");
98 sprintf(str1,
"Filter Wheel");
102 fc = open(
"LOG\\logSM.log", O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
110 sprintf(str,
"%s at %s, AMSs Init with\n ", datebuf, timebuf);
111 write(fc, str, strlen(str));
114 write(fc, str, strlen(str));
299 void WriteLogAMS(
int id,
int dira,
int dirb,
unsigned long stepa,
unsigned long stepb)
314 if(stepa && (stepb==0))
316 sprintf(str1,
"Input Mirror");
317 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
320 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str1,
id, dira, stepa, stepa, DXL.
buftx, DXL.
bufrx);
321 write(fc, str, strlen(str));
326 if(stepb && (stepa==0))
328 sprintf(str1,
"Grating ");
329 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
332 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str1,
id, dirb, stepb, stepb, DXL.
buftx, DXL.
bufrx);
333 write(fc, str, strlen(str));
340 sprintf(str1,
"Input Mirror");
341 sprintf(str2,
"Grating ");
342 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
345 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str1,
id, dira, stepa, stepa, DXL.
buftx, DXL.
bufrx);
346 write(fc, str, strlen(str));
347 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str2,
id, dirb, stepb, stepb, DXL.
buftx, DXL.
bufrx);
348 write(fc, str, strlen(str));
357 if(stepa && (stepb==0))
359 sprintf(str1,
"Filter Wheel");
360 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
363 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str1,
id, dira, stepa, stepa, DXL.
buftx, DXL.
bufrx);
364 write(fc, str, strlen(str));
369 if(stepb && (stepa==0))
371 sprintf(str2,
"SPARE ");
372 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
375 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n",
376 datebuf, timebuf, str2,
id, dirb, stepb, stepb, DXL.
buftx, DXL.
bufrx);
377 write(fc, str, strlen(str));
384 sprintf(str1,
"Filter Wheel");
385 sprintf(str2,
"SPARE ");
386 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
389 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str1,
id, dira, stepa, stepa, DXL.
buftx, DXL.
bufrx);
390 write(fc, str, strlen(str));
391 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str2,
id, dirb, stepb, stepb, DXL.
buftx, DXL.
bufrx);
392 write(fc, str, strlen(str));
400 if(stepa && (stepb==0))
402 sprintf(str1,
"Zenith ");
403 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
406 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n",
407 datebuf, timebuf, str1,
id, dira, stepa, stepa, DXL.
buftx, DXL.
bufrx);
408 write(fc, str, strlen(str));
413 if(stepb && (stepa==0))
415 sprintf(str2,
"Azimuth ");
416 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
419 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n",
420 datebuf, timebuf, str2,
id, dirb, stepb, stepb, DXL.
buftx, DXL.
bufrx);
421 write(fc, str, strlen(str));
428 sprintf(str1,
"Zenith ");
429 sprintf(str2,
"Azimuth ");
430 fc = open(
DLOG.
fsmlog, O_WRONLY | O_APPEND | O_TEXT | O_CREAT, S_IWRITE);
433 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str1,
id, dira, stepa, stepa, DXL.
buftx, DXL.
bufrx);
434 write(fc, str, strlen(str));
435 sprintf(str,
"%s at %s: %s, from AMS%u, dir=%d, Steps=%ld, Steps(esa)=%lX, DXL.buftx=%s, DXL.bufrx=%s\n", datebuf, timebuf, str2,
id, dirb, stepb, stepb, DXL.
buftx, DXL.
bufrx);
436 write(fc, str, strlen(str));
451 float GRASTEP, STEPGRA;
452 long minpostime = 2147483647, maxpostime = 0;
454 double ttout = 0, yy;
459 float rzenang, razang, az;
462 float MAZMin = -90.0;
480 GRASTEP = (float)360.0 / (
float) k;
482 STEPGRA = (float) k / (
float)360.0;
484 yy = (razang - AST.
Pos);
509 if(z >= 0 && z <= 180 )
514 GRASTEP = (float) 360.0 / (
float) k;
516 STEPGRA = (float) k / (
float) 360.0;
519 yy = -(rzenang - ZST.
Pos);
538 sprintf(buf,
"Not Allowed Zen.");
567 D_VRangeSim(0,
"Positioning Mirror",0, 255, 0, 0, 50, 0);
573 D_VRangeSim(1,
"Positioning Grating",0, 255, 255, 0, 50, 100);
578 D_VRangeSim(2,
"Positioning Filter Wheel",0, 0, 0, 255, 50, 200);
587 D_VRangeSim(4,
"Positioning Zenith",0, 0, 255, 255, 50, 300);
596 D_VRangeSim(5,
"Positioning Azimuth",0, 0, 192, 255, 50, 400);
637 sprintf(buf,
"%.1lf", z);
643 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][0]))/1000.0 ));
658 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][0]))/1000.0 ));
678 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][1]))/1000.0 ));
694 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][1]))/1000.0 ));
702 }
while((tt < maxpostime));
720 sprintf(buf,
"%.1lf", z);
725 sprintf(buf,
"%.1lf", (
double) a);
750 int k, i, s, er, dir;
753 long minpostime = 2147483647, maxpostime = 0;
756 char buf[80], str[16];
758 int StepWithOffset [4][4];
770 if((m >= 0) && (m <= 3))
797 StepWithOffset [0][0] = 0;
803 StepWithOffset [1][1] = 0;
809 StepWithOffset [2][2] = 0;
815 StepWithOffset [3][3] = 0;
817 n = StepWithOffset [m][
MIS.
Pos];
837 if(w >= 0 && w <= 17)
840 n = (long)(((
float) (-
wav[GRS.
Wl] +
wav[w]) ) * 4 * g);
875 n= (long)(
FWS.
Pos - f) * k;
909 n= (long)(
FWS.
Pos - f) * k;
953 D_VRangeSim(0,
"Positioning Mirror",0, 255, 0, 0, 50, 0);
959 D_VRangeSim(1,
"Positioning Grating",0, 255, 255, 0, 50, 100);
964 D_VRangeSim(2,
"Positioning Filter Wheel",0, 0, 0, 255, 50, 200);
1007 sprintf(buf,
"%.1f sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][0]))/1000.0 ));
1016 sprintf(buf,
"%s", str);
1024 sprintf(buf,
"%.1f sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][0]))/1000.0 ));
1048 sprintf(buf,
"%s", str);
1060 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][1]))/1000.0 ));
1064 sprintf(buf,
"%4d",
wl[w]);
1071 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][1]))/1000.0 ));
1076 sprintf(buf,
"%4d",
wl[w]);
1078 sprintf(buf,
"%4d",
wl[GRS.
Wl]);
1087 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double) (tt - DAS.
StepM.
postime[
AMS2][0]) )/1000.0 ));
1111 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double) (tt - DAS.
StepM.
postime[
AMS2][0]) )/1000.0 ));
1155 }
while((tt < maxpostime));
1179 sprintf(buf,
"%s", str);
1185 sprintf(buf,
"%4d",
wl[w]);
1223 sprintf(buf,
"%4d",
wl[w]);
1246 int k, i, s, er, dir;
1247 float GRASTEP, STEPGRA;
1248 long minpostime = 2147483647, maxpostime = 0;
1250 double ttout = 0, yy;
1251 char buf[80], str[16];
1253 float razang, rzenang;
1254 int StepWithOffset [4][4];
1267 if((m >= 0) && (m <= 3))
1293 StepWithOffset [0][0] = 0;
1299 StepWithOffset [1][1] = 0;
1305 StepWithOffset [2][2] = 0;
1311 StepWithOffset [3][3] = 0;
1315 n = StepWithOffset [m][
MIS.
Pos];
1332 if(w >= 0 && w <= 17)
1335 n = (long)(((
float) (-
wav[GRS.
Wl] +
wav[w]) ) * 4 * g);
1367 if(f >= 0 && f <= 8)
1369 n= (long)(
FWS.
Pos - f) * k;
1401 if(f >= 0 && f <= 5)
1403 n= (long)(
FWS.
Pos - f) * k;
1430 GRASTEP = (float)360.0 / (
float) k;
1432 STEPGRA = (float) k / (
float)360.0;
1434 yy = (razang - AST.
Pos);
1459 if(z >= 0 && z <= 180 )
1468 GRASTEP = (float) 360.0 / (
float) k;
1470 STEPGRA = (float) k / (
float) 360.0;
1473 yy = -(rzenang - ZST.
Pos);
1492 sprintf(buf,
"Not Allowed Zen.");
1527 D_VRangeSim(0,
"Positioning Mirror",0, 255, 0, 0, 50, 0);
1533 D_VRangeSim(1,
"Positioning Grating",0, 255, 255, 0, 50, 100);
1538 D_VRangeSim(2,
"Positioning Filter Wheel",0, 0, 0, 255, 50, 200);
1547 D_VRangeSim(4,
"Positioning Zenith",0, 0, 255, 255, 50, 300);
1556 D_VRangeSim(5,
"Positioning Azimuth",0, 0, 192, 255, 50, 400);
1586 st = GetTickCount();
1589 et = GetTickCount();
1599 sprintf(buf,
"%.1f sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][0]))/1000.0 ));
1608 sprintf(buf,
"%s", str);
1616 sprintf(buf,
"%.1f sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][0]))/1000.0 ));
1640 sprintf(buf,
"%s", str);
1652 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][1]))/1000.0 ));
1656 sprintf(buf,
"%4d",
wl[w]);
1663 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[
AMS1][1]))/1000.0 ));
1668 sprintf(buf,
"%4d",
wl[w]);
1670 sprintf(buf,
"%4d",
wl[GRS.
Wl]);
1679 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double) (tt - DAS.
StepM.
postime[
AMS2][0]) )/1000.0 ));
1702 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double) (tt - DAS.
StepM.
postime[
AMS2][0]) )/1000.0 ));
1748 sprintf(buf,
"%.1lf", z);
1754 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][0]))/1000.0 ));
1762 sprintf(buf,
"%.1lf", z);
1768 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][0]))/1000.0 ));
1780 sprintf(buf,
"%.1lf", a);
1786 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][1]))/1000.0 ));
1794 sprintf(buf,
"%.1lf", a);
1800 sprintf(buf,
"%.1lf sec. left", (
double)fabs(((
double)(tt - DAS.
StepM.
postime[AMS3][1]))/1000.0 ));
1808 }
while((tt < maxpostime));
1832 sprintf(buf,
"%s", str);
1838 sprintf(buf,
"%4d",
wl[w]);
1863 sprintf(buf,
"%.1lf", z);
1868 sprintf(buf,
"%.1lf", (
double) a);
1887 sprintf(buf,
"%4d",
wl[w]);
1905 int k = 1500, er = 0;
1907 int StepWithOffset [4][4];
1918 StepWithOffset [0][0] = 0;
1924 StepWithOffset [1][1] = 0;
1930 StepWithOffset [2][2] = 0;
1936 StepWithOffset [3][3] = 0;
1942 if(where < 0 || where > 3)
return 0;
1949 nx = StepWithOffset [where][
MIS.
Pos];
2048 Status(
"New Input Mirror Position");
2081 sprintf(buf,
"%s",
Mir_Code[where]);
2119 if(ang < 0 || ang > 18)
return 0;
2150 prepos =
wl[GRS.
Wl];
2151 prestep =
wav[GRS.
Wl];
2154 sprintf(buf,
" %4d --> %4d", prepos,
wl[ang]);
2216 sprintf(buf,
"%4d",
wl[ang]);
2219 sprintf(buf,
"Steps : %ld", (-prestep +
wav[ang]) );
2265 if(filter < 0 || filter > 7)
return 0;
2279 if(filter < 0 || filter > 5)
return 0;
2283 sprintf(buf,
"For this Equipment the Filter Wheel type is UNKNOWN\nPlease Contact DANBO!!!!");
2293 n[2] = (long)(
FWS.
Pos - filter) * k;
2295 if(n[2] < 0) dir[2] = 1;
2304 Status(
"New Filter Wheel Position");
2329 sprintf(buf,
"%s",
Fil_Code[filter]);
2381 if(filter < 0 || filter > 5)
return 0;
2385 sprintf(buf,
"For this Equipment the Filter Wheel type is UNKNOWN\nPlease Contact DANBO!!!!");
2395 n[2] = (long)(
NDFWS.
Pos - filter) * k;
2397 if(n[2] < 0) dir[2] = 1;
2406 Status(
"New ND Filter Wheel Position");
2622 unsigned long t = 500;
2764 float MAZMax = 120.0;
2767 float SAA, SEA,
elev, az;
2776 sprintf(str,
"%.01lf",
S_azim);
2777 SAA = (float)atof(str);
2786 sprintf(str,
"%.01lf",
S_azim);
2787 SAA = (float)atof(str);
2791 sprintf(str,
"%.01lf", (90 -
S_zenetr));
2792 SEA = (float)atof(str);
2825 double GRASTEP, STEPGRA;
2833 if(ang < -91 || ang > 91 )
return 0;
2855 yy = -(ang - ZST.
Pos);
2864 prepos = (float)ZST.
Pos;
2867 sprintf(buf,
" %.1lf --> %.1lf", prepos, ang);
2896 sprintf(buf,
"%.2lf", ang);
2924 double GRASTEP, STEPGRA;
2987 if(ang >= 0 && ang <= 180 )
2994 GRASTEP = (float) 360.0 / (
float) k;
2996 STEPGRA = (float) k / (
float) 360.0;
2999 yy = -(rzenang - ZST.
Pos);
3018 sprintf(buf,
"Not Allowed Zen.");
3050 sprintf(buf,
"%.2lf", ang);
3118 double GRASTEP, STEPGRA;
3122 razang=
MIGEAz((
float)ang);
3126 GRASTEP = (float)360.0 / (
float) k;
3128 STEPGRA = (float) k / (
float)360.0;
3130 yy = (razang - (float)AST.
Pos);
stepm StepM
Stepper motors parameters structure.
#define SPATRAM
SPectrometer for Atmospheric TRAcers Measurements - CGE-UE Portugal.
NDFilterWheelSt NDFWS
ND Filter Wheel.
gui Gui
Graphic User Interface Structure.
MOBJECT LedSM[AMSMAX][2]
Leds for stepper motors status.
void QjLamp(int mod)
QJ Lamp ON/OFF .
int Pos
Filter Wheel current Position.
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
void D_VRangeSim(int id, char *str, int val, int r, int g, int b, int x, int y)
init progress bar during simultaneous positioning
char fsmlog[_MAX_PATH]
daily LOG file for stepper motor moovements
void MLoopWhileEvents(int discard)
void HiresPS(int mod)
Hires Power Supply ON/OFF .
optionini DOption
Options for DAS execution.
#define AMS2
AMS2 address.
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
char buftx[1024]
Tx buffer.
MOBJECT KeyB[28]
Keyboard Buttons.
int NAMS
Number of AMSs Devices.
MOBJECT LedQJ
Control Panel Led for QJ Lamp.
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...
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
int SM_A
Motor A (su Y11) respectively: ID=0->InputMirror,ID=1->FilterWheel,ID=2->Zenith.
DXL structure. Structure for the serial communication with the AMS adapter.
void FANECU(int mod)
FAN ON/OFF .
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
das structure (contain all the previous structures) .
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
void HgLamp(int mod)
HG Lamp ON/OFF .
unsigned long nstep[AMSMAX][2]
Number of steps to be executed.
int Pos
Mirror Current Position.
flag Flag
Structure for different flags.
#define DBDEMO
execution in demo mode
MOBJECT pblamps[2]
Control Panel Push buttons for HG and QJ Lamps.
int Offset[16]
Offset of the hardware devices (Input Mirror (5), Grating, Filter Wheel...)
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
void PeltierPS(int mod)
Peltier Power Supply ON/OFF .
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
int SM_stepr(int t)
AMS 'steps/round' value return the AMS 'steps/round' value (microstepping) depending on the setted st...
void MObjectSetText(MOBJECT obj, const char *text)
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
int Pos
Filter Wheel current Position.
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
void Peltier(int mod)
Peltier ON/OFF .
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
#define LIS_
Lampedusa Island Spectrometer - ENEA.
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
int exec
= 0 -> PRG Execution Paused; = 1 -> PRG Execution Resumed
int Wl
Grating Wavelength.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
horizmeas HorizMeas
Structure for Horizontal Measurements.
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
char bufrx[1024]
Rx buffer.
long dp
Grating backslash recovery steps.
long postime[AMSMAX][2]
time necessary for positioning
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
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)...
void Status(char *tit)
Writes information's on the Status label .
float MIGEActualZenAz(int mode)
convert SUN AZIMUTH and ZENITH angles, to be used with MIGE mode = 0 –> fix azimuth and return azimu...
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
void WriteLogAMS(int id, int dira, int dirb, unsigned long stepa, unsigned long stepb)
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
pushbutt PushButt
Push buttons.
int Revo[AMSMAX][2]
Revolution Direction CW CCW.
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
int SD_PosAADev(double z, double a)
perform the simoultaneous positioning of the AltAzimuth platform z = Zenith Axis a = Grating Position...
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
int amsprogbar
display/hide prograssion bar, 0 = Hide, 1 = display
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
#define SPATRAM3
SPATRAM3.
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
int AMS_wopto(int id, unsigned int w)
write the value on the optoinsulated port write the value on the optoinsulated port.
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
int wl[]
WaveLength definition - for SD_Grating.
int fileprg
Flag indicating the execution of a PRG file: = 0 –> No PRG File; = 1 –> PRG file in execution...
controlpanel ContrPanel
Control Panel Structure.
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
#define AMS1
AMS1 address.
int manhormeas
1 = horizontal measurements in manual mode
int step[AMSMAX][2]
Stepper Motors Step.
double speed_Hz[AMSMAX][2]
Stepper Motors Speed [Hz].
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
int SD_Zenith_H(float ang)
void FANPeltier(int mod)
FAN ON/OFF .
void writelogmotor(int mod, int id_motore, int k, int d, long steps, unsigned char ams_id)
Write Motor Operations on Log File. Write on the SM.LOG file the commands send to the motors...
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
void AMS_PWM_Zero(int mod)
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
long Pos
Grating Position.
int EqType
Spectrometer Type.
double Pos
Azimuth Current Position.
long wav[]
Step Number definition - for SD_Grating.
int AMS_sendstep(int id, int dira, int dirb, unsigned long stepa, unsigned long stepb)
Send steps Procedure for sending steps to the Stepper Motor.
void MObjectSetSensitive(MOBJECT obj)
float SMfraz(int t)
denominator value of the stepping ratio
double Pos
Zenith Current Position.
MOBJECT LedHG
Control Panel Led for HG Lamp.
MOBJECT lbl[15]
generic labels for hor meas shell
int exemode
Set the Execution MODE (Execution modes)
FilterWheelSt FWS
Filter Wheel.
#define AMS3
AMS3 address.
int DB_StepMotor(int id, int motor, long step, int dir)
Send steps to the selected stepper motor. .
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
paramini Paramini
structure for the parameters defined in param.ini configuration file