| 1 | package Lab::Instrument::OI_ILM210; | ||
| 2 | #ABSTRACT: Oxford Instruments ILM Intelligent Level Meter | ||
| 3 | $Lab::Instrument::OI_ILM210::VERSION = '3.899'; | ||
| 4 | use v5.20; | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use Lab::Instrument; | ||
| 8 | |||
| 9 | our @ISA = ("Lab::Instrument"); | ||
| 10 | |||
| 11 | our %fields = ( supported_connections => ['IsoBus'], ); | ||
| 12 | |||
| 13 | sub new { | ||
| 14 | my $proto = shift; | ||
| 15 | my $class = ref($proto) || $proto; | ||
| 16 | my $self = $class->SUPER::new(@_); | ||
| 17 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | ||
| 18 | |||
| 19 | return $self; | ||
| 20 | } | ||
| 21 | |||
| 22 | sub get_level { | ||
| 23 | my $self = shift; | ||
| 24 | my $channel = shift; | ||
| 25 | $channel = "1" unless defined($channel); | ||
| 26 | |||
| 27 | my $level = $self->query("R$channel"); | ||
| 28 | $level =~ s/^R//; | ||
| 29 | $level /= 10; | ||
| 30 | return $level; | ||
| 31 | } | ||
| 32 | |||
| 33 | 1; | ||
| 34 | |||
| 35 | __END__ |