#include #include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "cm6k.h" #include "cm6kui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { int cm6k_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 */ cm6k_init(3, 1, &cm6k_ID); //cm6kui_init(cm6k_ID); axis = 1; acc = 2.; vel = 1.; dis = 10.; cm6k_rel_move(cm6k_ID, axis, acc, vel, dis); /* cm6k_get_abs_position(cm6k_ID, axis, &pos); printf("pos = %f rev\n", pos); cm6k_start_rel_move(cm6k_ID, axis, acc, vel, dis); cm6k_end_rel_move(cm6k_ID, axis, dis); cm6k_get_abs_position(cm6k_ID, axis, &pos); printf("pos = %f rev\n", pos); cm6k_zero(cm6k_ID, axis); cm6k_get_abs_position(cm6k_ID, axis, &pos); printf("pos = %f rev\n", pos); cm6k_exit(cm6k_ID); */ //RunUserInterface(); Delay(10.); return 0; }