#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "pm500.h" #include "pm500ui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { /* Declare variables */ int pm500_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 */ /* Test individual functions */ //axis = 'A'; //axis1 = 'A'; //axis2 = 'B'; /* Stage */ //acc = .04; //vel = .004; //dis = .005; //pos = -.005; //pm500_init(0, 01, &dev_ID); //pm500_rel_stage_move(dev_ID, axis, acc, vel, dis); //pm500_rel_2_stage_move(dev_ID, axis1, axis2, acc, vel, dis); //pm500_zero(dev_ID); //pm500_abs_stage_move(dev_ID, axis, acc, vel, pos); //pm500_abs_2_stage_move(dev_ID, axis1, axis2, acc, vel, pos); //pm500_zero(dev_ID, axis); //pm500_get_pos(dev_ID, axis, &pos); //printf("The stage position is %f m.\n", pos); //pm500_zero(dev_ID, axis); //pm500_get_pos(dev_ID, axis, &pos); //printf("The stage position is %f m.\n", pos); //pm500_exit(dev_ID); /* Initialize */ pm500_init(0, 01, &pm500_ID); pm500ui_init(pm500_ID); /* Run the user interface */ RunUserInterface(); return 0; }