PrePAN

Sign in to PrePAN

Lab::Zhinst XS bindings to the LabOne API of Zurich Instruments

Good

Synopsis

 use Lab::Zhinst;
 
 ####################################################

 # LabOne's "Getting Started" example in Perl:

 # Connect to DataServer at localhost, port 8004.
 my $connection = Lab::Zhinst->new("localhost", 8004);

 # Set all demodulator rates of device dev1046 to 150 Hz.
 $connection->SetValueD("/dev1046/demods/*/rate", 150);

 ####################################################

 # Read x and y value from the Lock-In demodulator:

 my $connection = Lab::Zhinst->new($address, 8004);

 my $device = "/dev3281";
 my $hash_ref = $connection->GetDemodSample("$device/DEMODS/0/SAMPLE");
 printf("x = %g, y = %g\n", $hash_ref->{x}, $hash_ref->{y});

Description

So far the only languages to interface with Zhinst devices were Matlab, Python, LabVIEW, .NET and C.

This module adds the desperately needed Perl interface and will allow us to write high-level Lab::Measurement drivers.

My first XS code...

Any feedback appreciated!


Update: Now uploaded to CPAN:

MetaCPAN

search.cpan.org

Comments

Please sign up to post a review.