1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#
# HP3488 switch/control unit using 'hp3488' utility from gpib-utils project.
#
# device "hp0" "hp3488" "/usr/bin/hp3488 --shell|&"
#
# "Plug" names for this device are three digit values consisting of
# a single digit slot number (1-5) followed by two digit channel number.
#
specification "hp3488" {
timeout 5
script login {
expect "hp3488> "
}
script logout {
send "quit\n"
}
script status {
send "query %s\n"
expect "([1-5][0-9]{2}): ([01])\n"
setplugstate $1 $2 off="0" on="1"
expect "hp3488> "
}
script on_ranged {
send "on %s\n"
expect "hp3488> "
}
script off_ranged {
send "off %s\n"
expect "hp3488> "
}
script cycle_ranged {
send "off %s\n"
expect "hp3488> "
delay 4
send "on %s\n"
expect "hp3488> "
}
}
|