-
print "  Interface Bus Interactive Control (IBIC)                            "
print "  Example Program using NI-488 device level functions                 "
print ""
print "======================================================================"
print "  This sample program is for reference only. It can only be expected  "
print "  to function with a Fluke 45 Digital Multimeter.  It assumes the     "
print "  device dev1 in the configuration program IBCONF has been renamed to "
print "  DVM.                                                                "
print ""
print "  This program reads a measurement from the Fluke 45.                 "
print ""
print "  After each command executes, the numeric value and mnemonic         "
print "  representation of the status word IBSTA is displayed.  The byte     "
print "  count IBCNT and the mnemonic definition of IBERR are also shown     "
print "  when appropriate.                                                   "
print ""
print "  The NI-488 function IBONL is called with a parameter value of zero  "
print "  to disable the hardware and software.  Execution of this program is "
print "  terminated after the call to the function IBONL.                    "
print ""
print "  The EXIT command is used to terminate this program.                 "
print "======================================================================"
print ""
print "  Assign an unique identifier to the Fluke 45.  The name 'DVM' is the "
print "  name you configured for the Fluke 45 using IBCONF.EXE.              "
+
ibfind DVM
-
print "  Clear the internal or device functions of the Fluke 45.             "
+
ibclr
-
print "  Reset the Fluke 45 by issuing the reset (*RST) command.  Instruct   "
print "  the Fluke 45 to measure the volts alternating current (VAC) using   "
print "  auto-ranging (AUTO), to wait for a trigger from the GPIB interface  "
print "  board (TRIGGER 2), and to assert the IEEE-488 Service Request line, "
print "  SRQ, when the measurement has been completed and the Fluke 45 is    "
print "  ready to send the result (*SRE 16).                                 "
+
ibwrt  "*RST; VAC; AUTO; TRIGGER 2; *SRE 16"
-
print "  Trigger the Fluke 45.                                               "
+
ibtrg
-
print "  Request the triggered measurement by sending the instruction        "
print "  'VAL1?'.                                                            "
+
ibwrt  "VAL1?"
-
print "  Wait for the Fluke 45 to request service (RQS) or wait for the      "
print "  Fluke 45 to timeout (TIMO).  The default timeout period is 10       "
print "  seconds.   RQS is detected by bit position 11 (hex 800).   TIMO     "
print "  is detected by bit position 14 (hex 4000).  These status bits are   "
print "  listed under the NI-488 function IBWAIT in the Software Reference   "
print "  Manual.                                                             "
+
ibwait  (TIMO  RQS)
-
print "  Read the Fluke 45 serial poll status byte.                          "
print "  If the returned status byte is hex 50, the Fluke 45 has valid       "
print "  data to send; otherwise, it has a fault condition to report.        "
+
ibrsp
-
print "  Assume the status byte is hex 50 and read the Fluke 45 measurement. "
+
ibrd  10
-
print "  Call the ibonl function to disable the hardware and software.       "
+
ibonl  0
exit

