#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 */ /* Initialize */ pm500_init(0, 14, &pm500_ID); pm500ui_init(pm500_ID); /* Test individual functions */ dev_ID = pm500_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; //pm500_init(int gpib_board_addr, int gpib_dev_addr, int *dev_ID); //pm500_rel_motor_move(dev_ID, axis, acc, vel, dis); //pm500_rel_stage_move(dev_ID, axis, acc, vel, dis); //pm500_rel_2_motor_move(dev_ID, axis1, axis2, acc, vel, dis); pm500_rel_2_stage_move(dev_ID, axis1, axis2, acc, vel, dis); //pm500_zero(dev_ID); //pm500_abs_motor_move(dev_ID, axis, acc, vel, pos); //pm500_abs_stage_move(dev_ID, axis, acc, vel, pos); //pm500_abs_2_motor_move(dev_ID, axis1, axis2, acc, vel, pos); //pm500_abs_2_stage_move(dev_ID, axis1, axis2, acc, vel, pos); //pm500_zero(dev_ID); //pm500_get_motor_pos(dev_ID, axis, &pos); //printf("The motor position is %f rev.\n", pos); //pm500_get_stage_pos(dev_ID, axis, &pos); //printf("The stage position is %f m.\n", pos); //pm500_exit(dev_ID); /* Run the user interface */ //RunUserInterface(); return 0; }