Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab::Visa doesn't recognize USB instruments #1

Open
gpetrowitsch opened this issue Jul 15, 2019 · 2 comments
Open

Lab::Visa doesn't recognize USB instruments #1

gpetrowitsch opened this issue Jul 15, 2019 · 2 comments

Comments

@gpetrowitsch
Copy link

I have various USB instruments, which have resource names like

USB0::0x0957::0x4D18::MY54190007::INSTR

This is currently not recognized by Lab::Visa. However, if this is added to the _check_resource_name function in Visa.pm, all works fine for me.

elsif (
        $resname =~ /^USB[0-9]*::0x[0-9A-F]*::0x[0-9A-F]*::\w+(::INSTR)?$/    # USB INSTR
        ) {
        return 1;
    }

I don't know, if the regexp captures all valid USB resource names, but I can't improve this, because I don't know the rules for these resource names. Maybe you do...

Thanks & regards, Gerhard

@amba
Copy link
Member

amba commented Jul 15, 2019

Dear Gerhard,

which VISA.pm do you mean? There is

  • Lab::VISA
  • Lab::Moose::Connection::VISA

legacy API (superseded by Lab::Moose::*):

  • Lab::Bus::VISA
  • Lab::Connection::VISA

For USB instruments the recommendation is Lab::Moose::Connection::VISA::USB.

@gpetrowitsch
Copy link
Author

It's indeed the Lab::Bus::VISA. I got this up and running years ago on a quite early implementation of Lab::Measurement etc. with ActiveState Perl and was happy to get it working again now with the latest version on a Strawberry Perl.
I'll have to dig into my code, to find, where this is actually referred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants