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

📄 ser_dev.bas

📁 HP GPIB的VB和C语言库文件,参考范例.
💻 BAS
字号:

'  ser_dev.bas
'  This example program takes a measurement from a DVM using a
'  SICL device session.
Sub Main ()
   Dim dvm As Integer
   Dim res As Double
   Dim argcount As Integer

   ' Open the multimeter session
   dvm = iopen("COM1,488")
   Call itimeout(dvm, 10000)

   ' Prepare the multimeter for measurements
   argcount = ivprintf(dvm, "*RST" + Chr$(10), 0&)
   argcount = ivprintf(dvm, "SYST:REM" + Chr$(10), 0&)

   ' Take a measurement
   argcount = ivprintf(dvm, "MEAS:VOLT:DC?" + Chr$(10))

   ' Read the results
   argcount = ivscanf(dvm, "%lf", res)

   ' Print the results
   MsgBox "Result is " + Format(res), MB_ICON_EXCLAMATION

   ' Close the multimeter session
   Call iclose(dvm)

'  Tell SICL to cleanup for this task
   Call siclcleanup

End Sub

⌨️ 快捷键说明

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