When working with electronics there is a big chance you need a test setup, This setup often contains big and expensive products like oscilloscopes and signal generators. If your lab has big and expensive devices like this, chances are high that they can be controlled using the VXI11 protocol.

So the generic way of doing this is using windows download the drivers for the device, install something like Labview pay someone a large amount of money and your good to go.

But what if you don’t like windows or paying a large amount of money, and you happen to have some ruby skills. Well that’s where the VXI11 gem comes in handy.

So how do you use it?

# First require the gem
require 'vxi11'
# Create an instance of the VXI11 class
v = VXI11.new
# Search for devices
v.find_devices
# Connect to a found device
v.connect "10.0.0.1"
# Send the commands
puts v.send_and_receive "*IDN?"

The example above is for getting the identification of a vxi11 device and should be implmented on any vxi11 capable device. The other commands should be in the manual specific to your device.

So that’s it for now.