Lab-Measurement-Legacy

 view release on metacpan or  search on metacpan

examples/Legacy/DAQ/DAQ_2024B  view on Meta::CPAN

    while ( ( $nev <= 0 || $event != $nev ) && !$SHUTDOWN ) {
        $s->set_acquire_state('RUN');
        print "\tRead... " if $VERBOSE;
        if ( defined($selfdelay) ) {
            sleep($selfdelay);
            $s->trigger();
        }

        MuteTrace(1) unless $DEBUG;    # don't need all the BUSY? checks.
        while ( !$SHUTDOWN ) {
            last if !$s->test_busy();
            sleep(0.05);
        }
        MuteTrace(0) unless $DEBUG;

        my $tev = gettimeofday();
        $event++;
        NextEvent();
        print "Event ", $event, " \@ t=$tev ", scalar( localtime($tev) ),
            " .. reading"
            if $VERBOSE;

lib/Lab/Instrument/TDS2024B.pm  view on Meta::CPAN

    }

    while (1) {
        return 1 if $self->query('BUSY?') =~ /^(:BUSY )?\s*0/i;
        return 0 if $n-- == 0;
        sleep($dtcheck);
    }
}


sub test_busy {
    my $self = shift;
    return 1 if $self->query('BUSY?') =~ /^(:BUSY )?\s*1/i;
    return 0;
}


sub get_id {
    my $self = shift;
    my ($tail) = $self->_check_args( \@_ );

lib/Lab/Instrument/TDS2024B.pm  view on Meta::CPAN

magnitude and unit suffix. (Ex: $time = "200ms"). If $time="INF"
then this routine will run indefinitely until completion (or some
I/O error). 

If $deltaT is given, checks are performed in intervals of $deltaT
seconds (again, number or text), except when $deltaT is less than $time.
$deltaT defaults to 500ms. 

Returns 1 if completed, 0 if timed out. 

=head2 test_busy

$busy = $s->test_busy();

Returns 1 if busy (waiting for trigger, etc), 0 if not busy.

=head2 get_id

$s->get_id()

Fetch the *IDN? string from device

=head2 get_header

$header = $s->get_header();

lib/Lab/Instrument/WR640.pm  view on Meta::CPAN

    for ( my $j = 0; $j < 7; $j++ ) {
        $s->{ $sbits->[$j] } = ( $r >> $j ) & 0x01;
    }
    $s->{ERROR} = $s->{CME} | $s->{EXE} | $s->{DDE} | $s->{QYE};

    return $s->{ uc($bit) } if defined $bit;
    return $s;
}


sub test_busy {
    my $self = shift;
    return 1 if $self->query('BUSY?') =~ /^(:BUSY )?\s*1/i;
    return 0;
}


sub get_id {
    my $self = shift;
    my ($tail) = $self->_check_args( \@_ );

lib/Lab/Instrument/WR640.pm  view on Meta::CPAN

B<QYE>: Query Error

B<RQC>: Request Control (not used)

B<OPC>: Operation Complete

B<ERROR>: CME or EXE or DDE or QYE

=back

=head2 test_busy

$busy = $s->test_busy();

Returns 1 if busy (waiting for trigger, etc), 0 if not busy.

=head2 get_id

$s->get_id()

Fetch the *IDN? string from device

=head2 recall

$s->recall($n);



( run in 0.761 second using v1.01-cache-2.11-cpan-87723dcf8b7 )