Rev 29 | Rev 39 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 29 | Rev 32 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | 3 | ||
4 | // Izberi ustrezni interface v meniju projektnega okna |
4 | // Izberi ustrezni interface v meniju projektnega okna |
5 | // Options->CompilerDefines (dodaj /DSISVME ali /DWIENVME) |
5 | // Options->CompilerDefines (dodaj /DSISVME ali /DWIENVME) |
6 | #ifdef USE_DAQ |
6 | #ifdef USE_DAQ |
7 | # define USE_CAMAC |
7 | # define USE_CAMAC |
8 | # include "c: |
8 | # include "c:\HOME\dino\sipmScan\include\camac.h" |
9 | # ifdef SISVME |
9 | # ifdef SISVME |
10 | # include "sisvme_dll.h" |
10 | # include "sisvme_dll.h" |
11 | # endif |
11 | # endif |
12 | # ifdef WIENVME |
12 | # ifdef WIENVME |
13 | # include "wienvme_dll.h" |
13 | # include "wienvme_dll.h" |
Line 23... | Line 23... | ||
23 | #include <userint.h> |
23 | #include <userint.h> |
24 | #include <ansi_c.h> |
24 | #include <ansi_c.h> |
25 | #include <utility.h> |
25 | #include <utility.h> |
26 | #include <analysis.h> |
26 | #include <analysis.h> |
27 | 27 | ||
28 | #include "c: |
28 | #include "c:\HOME\dino\sipmScan\include\sipmScan_ui.h" |
29 | 29 | ||
30 | #ifdef USE_DAQ |
30 | #ifdef USE_DAQ |
31 | # define USE_CAMAC |
31 | # define USE_CAMAC |
32 | # include "camac.h" |
32 | # include "camac.h" |
33 | # define NDAC 1 |
33 | # define NDAC 1 |
Line 244... | Line 244... | ||
244 | 244 | ||
245 | for (posrec.ix=0; posrec.ix<runrec.nx; posrec.ix++) { |
245 | for (posrec.ix=0; posrec.ix<runrec.nx; posrec.ix++) { |
246 | posrec.xset = runrec.x0 + posrec.ix*runrec.dx; |
246 | posrec.xset = runrec.x0 + posrec.ix*runrec.dx; |
247 | #ifdef USE_MIKRO |
247 | #ifdef USE_MIKRO |
248 | do { |
248 | do { |
249 |
|
249 | if (print) printf("MIKRO_MoveTo (1, x);%d\n",posrec.xset); |
250 | MIKRO_MoveTo (MIKRO_X, posrec.xset); |
250 | MIKRO_MoveTo (MIKRO_X, posrec.xset); |
251 | MIKRO_GetPosition(MIKRO_X, &mikroX); |
251 | MIKRO_GetPosition(MIKRO_X, &mikroX); |
252 | printf("%d\n", abs(posrec.xset - mikroX)); |
252 | if (print) printf("%d\n", abs(posrec.xset - mikroX)); |
253 | } while (abs(posrec.xset - mikroX) > STEP_TOLERANCE); |
253 | } while (abs(posrec.xset - mikroX) > STEP_TOLERANCE); |
254 | // printf("->MIKRO_MoveTo (1, x);%d\n",posrec.xset); |
- | |
255 | #endif |
254 | #endif |
256 | posrec.xset = mikroX; // true value |
255 | posrec.xset = mikroX; // true value |
257 | SetCtrlVal (p1h, P1_X, posrec.xset); |
256 | SetCtrlVal (p1h, P1_X, posrec.xset); |
258 | SetCtrlVal (p1h, P1_IX, posrec.ix); |
257 | SetCtrlVal (p1h, P1_IX, posrec.ix); |
259 | for (posrec.iy=0; posrec.iy<runrec.ny; posrec.iy++) { |
258 | for (posrec.iy=0; posrec.iy<runrec.ny; posrec.iy++) { |
260 | posrec.yset = runrec.y0 + posrec.iy*runrec.dy; |
259 | posrec.yset = runrec.y0 + posrec.iy*runrec.dy; |
261 | #ifdef USE_MIKRO_Y |
260 | #ifdef USE_MIKRO_Y |
262 |
|
261 | if (print) printf("MIKRO_MoveTo (2, y);%d\n",posrec.yset); |
263 | do { |
262 | do { |
264 | MIKRO_MoveTo (MIKRO_Y, posrec.yset); |
263 | MIKRO_MoveTo (MIKRO_Y, posrec.yset); |
265 | MIKRO_GetPosition(MIKRO_Y, &mikroY); |
264 | MIKRO_GetPosition(MIKRO_Y, &mikroY); |
- | 265 | if (print) printf("%d\n", abs(posrec.yset - mikroY)); |
|
266 | } while (abs(posrec.yset - mikroY) > STEP_TOLERANCE); |
266 | } while (abs(posrec.yset - mikroY) > STEP_TOLERANCE); |
267 |
|
267 | if (print) printf("->MIKRO_MoveTo (2, y);%d\n",posrec.yset); |
268 | #endif |
268 | #endif |
269 | posrec.yset = mikroY; |
269 | posrec.yset = mikroY; |
270 | SetCtrlVal (p1h, P1_Y, posrec.yset); |
270 | SetCtrlVal (p1h, P1_Y, posrec.yset); |
271 | SetCtrlVal (p1h, P1_IY, posrec.iy); |
271 | SetCtrlVal (p1h, P1_IY, posrec.iy); |
272 | //if (dsave) { |
272 | //if (dsave) { |