SICL/Ruby is SICL(Standard Instrument Control Library) API module for Ruby. SICL is part of the Agilent IO Libraries Suite product. SICL/Ruby gives you a capability to control your instruments via GPIB, USB, and LAN.
Please, use like this.
Example:
require 'sicl'
SICL.open('gpib0,17') do |io|
io.output('*IDN?')
puts io.enter
# ... instruments specific operations ...
end
or
Example:
require 'sicl'
io = SICL.open('gpib0,17')
io.output('*RST')
puts io.spoll
puts io.query('*IDN?')
# ... instruments specific operations ...
io.close
or
Example:
require 'sicl'
class MyInst < SICL::Instrument
def reset; output('*RST'); end
end
io = MyInst.new 'gpib0,17'
io.reset
# ... instruments specific operations ...
io.close
SICL/Ruby Reference : English/Japanese
Aiglent IO Libraries Suite 14.2 or later
If you can use the RubyGems, Please install to use the gem command.
$ export http_proxy='http://web-proxy:8088' # if you need $ gem install sicl
Or not, Please build from the soruce code.
$ svn checkout svn://rubyforge.org/var/svn/sicl $ cd sicl/ext $ ruby extconf.rb $ make $ make install
(GPL ver.2)
Copyright (c) 2011, Naoki Kobayashi