#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "esp7000.h" #include "esp7000ui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { /* Declare variables */ int dev_ID; int axis, axis1, axis2; double acc, vel, dis, pos; char buf[80]; /* Initialize */ esp7000_init(0, 02, &dev_ID); esp7000ui_init(dev_ID); /* Test individual functions */ /* Setup */ axis1 = 1; axis2 = 2; acc = .04; vel = .004; dis = .001; pos = .0015; /* Functions */ /* esp7000_zero(dev_ID, axis1); esp7000_zero(dev_ID, axis2); printf("\n"); esp7000_get_pos(dev_ID, axis1, &pos); printf("Stage 1 is at position %f m.\n", pos); esp7000_get_pos(dev_ID, axis2, &pos); printf("Stage 2 is at position %f m.\n", pos); esp7000_rel_stage_move(dev_ID, axis1, acc, vel, dis); printf("\n"); esp7000_get_pos(dev_ID, axis1, &pos); printf("Stage 1 is at position %f m.\n", pos); esp7000_get_pos(dev_ID, axis2, &pos); printf("Stage 2 is at position %f m.\n", pos); esp7000_rel_2_stage_move(dev_ID, axis1, axis2, acc, vel, dis); //esp7000_rel_stage_move(dev_ID, axis1, acc, vel, dis); //esp7000_rel_stage_move(dev_ID, axis2, acc, vel, dis); printf("\n"); esp7000_get_pos(dev_ID, axis1, &pos); printf("Stage 1 is at position %f m.\n", pos); esp7000_get_pos(dev_ID, axis2, &pos); printf("Stage 2 is at position %f m.\n", pos); esp7000_zero(dev_ID, axis1); esp7000_zero(dev_ID, axis2); esp7000_abs_stage_move(dev_ID, axis1, acc, vel, 2.0*pos); esp7000_abs_stage_move(dev_ID, axis2, acc, vel, 1.5*pos); esp7000_abs_2_stage_move(dev_ID, axis1, axis2, acc, vel, 3.0*pos); printf("\n"); esp7000_get_pos(dev_ID, axis1, &pos); printf("Stage 1 is at position %f m.\n", pos); esp7000_get_pos(dev_ID, axis2, &pos); printf("Stage 2 is at position %f m.\n", pos); printf("Press ENTER to continue.\n"); fgets(buf, 80, stdin); esp7000_exit(dev_ID); */ /* Run the user interface */ RunUserInterface(); return 0; }