#include #include #include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "mf10d.h" #include "mf10dui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { int mf10d_ID; double vt; double vt_peak; if (InitCVIRTE(hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ mf10d_init(0, 02, &mf10d_ID); //mf10dui_init(mf10d_ID); /* Mode */ mf10d_set_mode(mf10d_ID, "ac"); Delay(1.); mf10d_set_mode(mf10d_ID, "DC"); /* Gain */ mf10d_set_gain(mf10d_ID, 100); Delay(1.); mf10d_set_gain(mf10d_ID, 10); Delay(1.); mf10d_set_gain(mf10d_ID, 1); /* Auto null */ //mf10d_auto_null(mf10d_ID); /* Perform a measurement */ mf10d_start_vt_meas(mf10d_ID, 1); Delay(2.); mf10d_get_vt(mf10d_ID, &vt); printf("Vt = %f Vs\n", vt); /* Perform a peak measurement */ mf10d_start_vt_peak_meas(mf10d_ID, 1); Delay(2.); mf10d_get_vt_peak(mf10d_ID, &vt_peak); printf("Peak Vt = %f Vs\n", vt_peak); /* Leave time to look at screen */ Delay(10.); //RunUserInterface(); return 0; }