#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "mc4.h" #include "mc4ui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { /* Declare variables */ int mc4_ID; /* Declare variables for individual functions */ int dev_ID; char axis, axis1, axis2; double acc, vel, dis, pos; if (InitCVIRTE(hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ /* Initialize */ mc4_init(0, 14, &mc4_ID); mc4ui_init(mc4_ID); /* Test individual functions */ //dev_ID = mc4_ID; //axis = 'W'; //axis1 = 'W'; //axis2 = 'X'; /* Motor */ //acc = 10.; //vel = 1.; //dis = 1.; //pos = -5.; /* Stage */ //acc = .004; //vel = .004; //dis = .01; //pos = -.01; //mc4_init(int gpib_board_addr, int gpib_dev_addr, int *dev_ID); //mc4_rel_motor_move(dev_ID, axis, acc, vel, dis); //mc4_rel_stage_move(dev_ID, axis, acc, vel, dis); //mc4_rel_2_motor_move(dev_ID, axis1, axis2, acc, vel, dis); //mc4_rel_2_stage_move(dev_ID, axis1, axis2, acc, vel, dis); //mc4_zero(dev_ID); //mc4_abs_motor_move(dev_ID, axis, acc, vel, pos); //mc4_abs_stage_move(dev_ID, axis, acc, vel, pos); //mc4_abs_2_motor_move(dev_ID, axis1, axis2, acc, vel, pos); //mc4_abs_2_stage_move(dev_ID, axis1, axis2, acc, vel, pos); //mc4_zero(dev_ID); //mc4_get_motor_pos(dev_ID, axis, &pos); //printf("The motor position is %f rev.\n", pos); //mc4_get_stage_pos(dev_ID, axis, &pos); //printf("The stage position is %f m.\n", pos); //mc4_exit(dev_ID); /* Run the user interface */ RunUserInterface(); return 0; }