NAME

GPIB::hp59306a - Perl-GPIB module for HP59306A relay actuator

SYNOPSIS

use GPIB::hp59306a;

$g = GPIB::hp59306a->new("name");
print "Device found on bus\n" if $g->devicePresent;
$g->setRelay(6, 1);  # Turn relay 6 on
$g->setRelay(5, 0);  # Turn relay 5 off
@st = $g->getState;  # Get array of length 6 of relay state

DESCRIPTION

HP59306A device driver. The HP59306A is a simple GPIB device with six relays that can be turned on and off under program control. This device is pretty old (1978 or so) and doesn't have a microprocessor. It accepts simple commands to set the relays but has no mechanism to read back the state of the relays. The relays are numbers 1 through 6 and that numbering scheme extends to this module. The relays all turn off when there is no active controller on the GPIB bus. This is usually case when a GPIB program terminates.

The device driver keeps track of the state of the relays internally. This works fine, but it is an open loop technique since you cannot read the state of the relays back from the unit. Don't use the $g->getState method to launch Cruise missles and such.

new() and devicePresent() both turn all of the relays off. It seems that the device has a little deficiancy where it needs to ignore a few commands form the host before it starts working correctly. Both of these methods send a few commands to turn all of the relays off, this insures that that the first command to active a relay will succeed.

I bought one of these boxes for $50 on ebay to control my Christmas lights.

hp59306a is a subclass of GPIB.

AUTHOR

Jeff Mock, jeff@mock.com

SEE ALSO

GPIB(3), perl(1).