?? landev.c
字號:
/* landev.c
This example program sends a scan list to a switch and while
looping closes channels and takes measurements. */
#include <sicl.h>
#include <stdio.h>
main()
{
INST dvm;
INST sw;
double res;
int i;
/* Print message and terminate on error */
ionerror (I_ERROR_EXIT);
/* Open the multimeter and switch sessions */
dvm = iopen ("lan[instserv]:hpib,9,3");
sw = iopen ("lan[instserv]:hpib,9,14");
itimeout (dvm, 10000);
itimeout (sw, 10000);
/*Set up trigger*/
iprintf (sw, "TRIG:SOUR BUS\n");
/*Set up scan list*/
iprintf (sw,"SCAN (@100:103)\n");
iprintf (sw,"INIT\n");
for (i=1;i<=4;i++)
{
/* Take a measurement */
iprintf (dvm,"MEAS:VOLT:DC?\n");
/* Read the results */
iscanf (dvm,"%lf", &res);
/* Print the results */
printf ("Result is %f\n",res);
/*Trigger to close channel*/
iprintf (sw, "TRIG\n");
}
/* Close the multimeter and switch sessions */
iclose (dvm);
iclose (sw);
/* For WIN16 programs, call _siclcleanup before exiting to release
resources allocated by SICL for this application. This call
is a no-op for WIN32 programs. */
_siclcleanup();
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -