lab-measurement / Lab-Measurement

Lab::Measurement allows to perform test and measurement tasks with Perl scripts.
https://www.labmeasurement.de/
Other
10 stars 11 forks source link

Changes to support HP E4400B Series #29

Closed sbingner closed 4 years ago

sbingner commented 4 years ago

This allows the use of HP E4400B series over a GPIB-LAN gateway

amba commented 4 years ago

Hey,

sorry I have not worked with the Spectrum Analyzer code for some time... Fortunately we have the unit tests for the existing instruments, if the new code does not break those, we can merge anyway. Best, Simon

amba commented 4 years ago

Here is the travis output for your PR:

https://travis-ci.org/github/lab-measurement/Lab-Measurement/pull_requests

sbingner commented 4 years ago

Yeah that's what I was afraid of - I'll add an argument to let it specify endianness for network connections

Here is the travis output for your PR:

https://travis-ci.org/github/lab-measurement/Lab-Measurement/pull_requests

I updated it... but it just rebuilt the old commit? It passes those tests now when I run it locally with commit cc801ce

sbingner commented 4 years ago

OK - I think I fixed all the tests now

sbingner commented 4 years ago

But the endian parameter isn't actually working when passed as an option like:

my $spec = instrument(
        type => 'HPE4400B',
        connection_type => 'VXI11',
        connection_options => {
                host => '192.168.1.100',
                device => 'gpib0,18',
                endian => 'big',
        },
);

Perhaps you can point me in the right direction to make that parameter get passed on to block_to_array correctly?

sbingner commented 4 years ago

OK - that should be better now... it is supported like so:

       my $spec = instrument(
                type => 'HPE4400B',
                connection_type => 'VXI11',
                connection_options => {
                  host => '192.168.1.100',
                  device => 'gpib0,18',
                },
                endian => 'big',
       );
amba commented 4 years ago

Very nice! Thank you very much for the contribution.

I will ask @akhuettel to push this to CPAN soon.

Best, Simon