The functions gpibRead() and gpibWrite() access the GPIB bus. The example code switches a Keithley 617 between the different measurement modes and does a reading for each mode.
#!/usr/bin/perl # # Example Keithley 617 # use Spectra; @msg = ( "F0X", "F1X", "F2X", "F3X"); $len_max = 20; foreach $msg (@msg) { $ret = gpibWrite( 7, $msg); print " Received " . gpibRead( 7, $len_max) . "\n"; } prtc();