#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "cm4000.h" #include "cm4000ui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { int cm4000_ID; int axis; double acc; double vel; double dis; double pos; if (InitCVIRTE(hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ cm4000_init(0, 1, &cm4000_ID); cm4000ui_init(cm4000_ID); /* axis = 2; acc = 2.; vel = 1.; dis = 10.; cm4000_rel_move(cm4000_ID, axis, acc, vel, dis); cm4000_get_abs_position(cm4000_ID, axis, &pos); printf("pos = %f rev\n", pos); cm4000_start_rel_move(cm4000_ID, axis, acc, vel, dis); cm4000_end_rel_move(cm4000_ID, axis, dis); cm4000_get_abs_position(cm4000_ID, axis, &pos); printf("pos = %f rev\n", pos); cm4000_zero(cm4000_ID, axis); cm4000_get_abs_position(cm4000_ID, axis, &pos); printf("pos = %f rev\n", pos); cm4000_exit(cm4000_ID); */ RunUserInterface(); return 0; }