⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vxiiscpi.c

📁 HP GPIB的VB和C语言库文件,参考范例.
💻 C
字号:
/* vxiiscpi.c
   This example program measures AC voltage on a multimeter and 
   prints out the results */
#include <sicl.h>
#include <stdio.h>

void main()
{
   INST dvm;
   char strres[20];

   /* Print message and terminate on error */
   ionerror (I_ERROR_EXIT);

   /* Open the multimeter session */
   dvm = iopen ("iscpi,32");
   itimeout (dvm, 10000);
   
   /* Initialize dvm */
   iwrite (dvm, "*RST\n", 5, 1, NULL);

   /* Take measurement */
   iwrite (dvm,"MEAS:VOLT:AC? 1, 0.001\n", 23, 1, NULL);
  
   /* Read measurements */
   iread (dvm, strres, 20, NULL, NULL);

   /* Print the results */
   printf("Result is %s\n", strres);

   /* Close the multimeter session */
   iclose(dvm);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -