J
jimlux
Tue, Jul 26, 2016 1:02 AM
Semi-off-topic..
I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces
that I want to control from Python. On Mac and PC, the PyVisa library
works great (either the one with the NI back end or the python only back
end )
But, on Ubuntu, there's no way to install the NI drivers (RH install
only, and Ubuntu is debian..)
So, I've been doing usbtmc, which sort of works. (after figuring out
all the udev rules stuff)
If I do something like this from the python interpreter:
import usbtmc
myinst = usbtmc.Instrument( mfr, product)
myinst.write('some command')
it works fine.
But if I put the same three linesin a .py file and run it, it doesn't
always work.. sometimes, you need to send the command twice.
It seems it might be a timing thing (in libusb or usbtmc?) but putting
some sleep() in between connecting to the instrument and doing the write
doesn't seem to work all the time.
Very curious.
Any ideas?
Semi-off-topic..
I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces
that I want to control from Python. On Mac and PC, the PyVisa library
works great (either the one with the NI back end or the python only back
end )
But, on Ubuntu, there's no way to install the NI drivers (RH install
only, and Ubuntu is debian..)
So, I've been doing usbtmc, which sort of works. (after figuring out
all the udev rules stuff)
If I do something like this from the python interpreter:
>>> import usbtmc
>>> myinst = usbtmc.Instrument( mfr, product)
>>> myinst.write('some command')
it works fine.
But if I put the same three linesin a .py file and run it, it doesn't
always work.. sometimes, you need to send the command twice.
It seems it might be a timing thing (in libusb or usbtmc?) but putting
some sleep() in between connecting to the instrument and doing the write
doesn't seem to work all the time.
Very curious.
Any ideas?
TV
Thomas Valerio
Tue, Jul 26, 2016 2:11 AM
Semi-off-topic..
I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces
that I want to control from Python. On Mac and PC, the PyVisa library
works great (either the one with the NI back end or the python only back
end )
But, on Ubuntu, there's no way to install the NI drivers (RH install
only, and Ubuntu is debian..)
So, I've been doing usbtmc, which sort of works. (after figuring out
all the udev rules stuff)
If I do something like this from the python interpreter:
import usbtmc
myinst = usbtmc.Instrument( mfr, product)
myinst.write('some command')
it works fine.
But if I put the same three linesin a .py file and run it, it doesn't
always work.. sometimes, you need to send the command twice.
It seems it might be a timing thing (in libusb or usbtmc?) but putting
some sleep() in between connecting to the instrument and doing the write
doesn't seem to work all the time.
Very curious.
Any ideas?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
Have you looked at alien to convert the rpm to a deb?
https://www.google.com/#q=alien+package+conversion
> Semi-off-topic..
>
> I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces
> that I want to control from Python. On Mac and PC, the PyVisa library
> works great (either the one with the NI back end or the python only back
> end )
>
> But, on Ubuntu, there's no way to install the NI drivers (RH install
> only, and Ubuntu is debian..)
>
> So, I've been doing usbtmc, which sort of works. (after figuring out
> all the udev rules stuff)
>
> If I do something like this from the python interpreter:
>
> >>> import usbtmc
> >>> myinst = usbtmc.Instrument( mfr, product)
> >>> myinst.write('some command')
>
> it works fine.
>
> But if I put the same three linesin a .py file and run it, it doesn't
> always work.. sometimes, you need to send the command twice.
>
> It seems it might be a timing thing (in libusb or usbtmc?) but putting
> some sleep() in between connecting to the instrument and doing the write
> doesn't seem to work all the time.
>
> Very curious.
>
> Any ideas?
> _______________________________________________
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>
PL
Pete Lancashire
Tue, Jul 26, 2016 2:33 AM
Semi-off-topic..
I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces that
I want to control from Python. On Mac and PC, the PyVisa library works
great (either the one with the NI back end or the python only back end )
But, on Ubuntu, there's no way to install the NI drivers (RH install only,
and Ubuntu is debian..)
So, I've been doing usbtmc, which sort of works. (after figuring out all
the udev rules stuff)
If I do something like this from the python interpreter:
import usbtmc
myinst = usbtmc.Instrument( mfr, product)
myinst.write('some command')
it works fine.
But if I put the same three linesin a .py file and run it, it doesn't always
work.. sometimes, you need to send the command twice.
It seems it might be a timing thing (in libusb or usbtmc?) but putting some
sleep() in between connecting to the instrument and doing the write doesn't
seem to work all the time.
Very curious.
Any ideas?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
Never tried this Alien convert RPM to DEB
https://www.howtoforge.com/converting_rpm_to_deb_with_alien
On Mon, Jul 25, 2016 at 6:02 PM, jimlux <jimlux@earthlink.net> wrote:
> Semi-off-topic..
>
> I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces that
> I want to control from Python. On Mac and PC, the PyVisa library works
> great (either the one with the NI back end or the python only back end )
>
> But, on Ubuntu, there's no way to install the NI drivers (RH install only,
> and Ubuntu is debian..)
>
> So, I've been doing usbtmc, which sort of works. (after figuring out all
> the udev rules stuff)
>
> If I do something like this from the python interpreter:
>
>>>> import usbtmc
>>>> myinst = usbtmc.Instrument( mfr, product)
>>>> myinst.write('some command')
>
> it works fine.
>
> But if I put the same three linesin a .py file and run it, it doesn't always
> work.. sometimes, you need to send the command twice.
>
> It seems it might be a timing thing (in libusb or usbtmc?) but putting some
> sleep() in between connecting to the instrument and doing the write doesn't
> seem to work all the time.
>
> Very curious.
>
> Any ideas?
> _______________________________________________
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
PL
Pete Lancashire
Tue, Jul 26, 2016 2:36 AM
Semi-off-topic..
I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces that
I want to control from Python. On Mac and PC, the PyVisa library works
great (either the one with the NI back end or the python only back end )
But, on Ubuntu, there's no way to install the NI drivers (RH install only,
and Ubuntu is debian..)
So, I've been doing usbtmc, which sort of works. (after figuring out all
the udev rules stuff)
If I do something like this from the python interpreter:
import usbtmc
myinst = usbtmc.Instrument( mfr, product)
myinst.write('some command')
it works fine.
But if I put the same three linesin a .py file and run it, it doesn't always
work.. sometimes, you need to send the command twice.
It seems it might be a timing thing (in libusb or usbtmc?) but putting some
sleep() in between connecting to the instrument and doing the write doesn't
seem to work all the time.
Very curious.
Any ideas?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
here is what the author has to say
https://joeyh.name/code/alien/
On Mon, Jul 25, 2016 at 7:33 PM, Pete Lancashire
<pete@petelancashire.com> wrote:
> Never tried this Alien convert RPM to DEB
>
> https://www.howtoforge.com/converting_rpm_to_deb_with_alien
>
>
>
> On Mon, Jul 25, 2016 at 6:02 PM, jimlux <jimlux@earthlink.net> wrote:
>> Semi-off-topic..
>>
>> I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces that
>> I want to control from Python. On Mac and PC, the PyVisa library works
>> great (either the one with the NI back end or the python only back end )
>>
>> But, on Ubuntu, there's no way to install the NI drivers (RH install only,
>> and Ubuntu is debian..)
>>
>> So, I've been doing usbtmc, which sort of works. (after figuring out all
>> the udev rules stuff)
>>
>> If I do something like this from the python interpreter:
>>
>>>>> import usbtmc
>>>>> myinst = usbtmc.Instrument( mfr, product)
>>>>> myinst.write('some command')
>>
>> it works fine.
>>
>> But if I put the same three linesin a .py file and run it, it doesn't always
>> work.. sometimes, you need to send the command twice.
>>
>> It seems it might be a timing thing (in libusb or usbtmc?) but putting some
>> sleep() in between connecting to the instrument and doing the write doesn't
>> seem to work all the time.
>>
>> Very curious.
>>
>> Any ideas?
>> _______________________________________________
>> time-nuts mailing list -- time-nuts@febo.com
>> To unsubscribe, go to
>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.
SS
Scott Stobbe
Tue, Jul 26, 2016 4:36 PM
In Windows, likely Mac/Linux with the NI visa library you get the IO trace
to help debug applications.
On Linux strace may give you some clues.
On Monday, 25 July 2016, jimlux jimlux@earthlink.net wrote:
Semi-off-topic..
I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces
that I want to control from Python. On Mac and PC, the PyVisa library
works great (either the one with the NI back end or the python only back
end )
But, on Ubuntu, there's no way to install the NI drivers (RH install only,
and Ubuntu is debian..)
So, I've been doing usbtmc, which sort of works. (after figuring out all
the udev rules stuff)
If I do something like this from the python interpreter:
import usbtmc
myinst = usbtmc.Instrument( mfr, product)
myinst.write('some command')
it works fine.
But if I put the same three linesin a .py file and run it, it doesn't
always work.. sometimes, you need to send the command twice.
It seems it might be a timing thing (in libusb or usbtmc?) but putting
some sleep() in between connecting to the instrument and doing the write
doesn't seem to work all the time.
Very curious.
Any ideas?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
In Windows, likely Mac/Linux with the NI visa library you get the IO trace
to help debug applications.
On Linux strace may give you some clues.
On Monday, 25 July 2016, jimlux <jimlux@earthlink.net> wrote:
> Semi-off-topic..
>
> I've got a bunch of Keysight/Agilent/HP instruments with USB interfaces
> that I want to control from Python. On Mac and PC, the PyVisa library
> works great (either the one with the NI back end or the python only back
> end )
>
> But, on Ubuntu, there's no way to install the NI drivers (RH install only,
> and Ubuntu is debian..)
>
> So, I've been doing usbtmc, which sort of works. (after figuring out all
> the udev rules stuff)
>
> If I do something like this from the python interpreter:
>
> >>> import usbtmc
> >>> myinst = usbtmc.Instrument( mfr, product)
> >>> myinst.write('some command')
>
> it works fine.
>
> But if I put the same three linesin a .py file and run it, it doesn't
> always work.. sometimes, you need to send the command twice.
>
> It seems it might be a timing thing (in libusb or usbtmc?) but putting
> some sleep() in between connecting to the instrument and doing the write
> doesn't seem to work all the time.
>
> Very curious.
>
> Any ideas?
> _______________________________________________
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>