#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "tds3012b.h" #include "tds3012bui.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { int tds3012b_ID; int num_samp; double t[10000]; double v[10000]; if (InitCVIRTE(hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ tds3012b_init(0, 1, &tds3012b_ID); tds3012bui_init(tds3012b_ID); tds3012b_set_vert_scale(tds3012b_ID, 1, 5.); tds3012b_set_vert_position(tds3012b_ID, 2, -2.); tds3012b_set_vert_coupling(tds3012b_ID, 1, DC); tds3012b_set_vert_chan_select(tds3012b_ID, 1, ON); tds3012b_set_horiz_scale(tds3012b_ID, .0004); tds3012b_set_horiz_record_length(tds3012b_ID, 10000); tds3012b_set_horiz_trigger_position(tds3012b_ID, 10); tds3012b_set_trig_mode(tds3012b_ID, NORM); tds3012b_set_trig_edge(tds3012b_ID, CH1, TDC, RISE); tds3012b_set_trig_holdoff(tds3012b_ID, VALUE, .1, 1.); tds3012b_set_trig_level(tds3012b_ID, 2.5); tds3012b_set_acq_mode(tds3012b_ID, SAMPLE); tds3012b_set_acq_num_ave(tds3012b_ID, 16); tds3012b_get_waveform(tds3012b_ID, 1, &num_samp, t, v); RunUserInterface(); return 0; }