Re: Compatibility layer for pyvisa?

W <[email protected]> Mon, 23 Nov 2020 15:10:24 +0100
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <[email protected]>
Maybe you can use this tool (http://www.ke5fx.com/gpib/7470.htm) to make 
a screenshot of your display

On 23.11.2020 00:26, Alexander Huemer wrote:
> Things start to move here.
> Your installation instructions were very useful, Walter, thank you!
> I found that I had to add --enable-python-binding to ./configure and add
> PYTHONPATH="/usr/local/lib/python3.7/site-packages/" to /etc/profile,
> but eventually I got:
>
>        GPIB INSTR: Available via Linux GPIB (b'4.3.3')
>        GPIB INTFC: Available via Linux GPIB (b'4.3.3')
>
> in `python3 -m visa info`. Yay!
>
> I then proceeded to play with `python -m visa shell` and visa_test.py
> and managed to enable and disable the output of my power supply and
> write fancy text to the display.
>
> There are situations in which i get error messages in the kernel ring
> buffer like these though:
>
>          Nov 22 11:53:43 gpib kernel: tnt4882: write bus error
>
> and
>
>          Nov 22 11:41:46 gpib kernel: tnt4882: minor 0 read timed out
>          Nov 22 11:41:46 gpib kernel: tnt4882: read timed out
>
> Also, pyvisa often exits with:
>
> pyvisa.errors.VisaIOError: VI_ERROR_SYSTEM_ERROR (-1073807360): Unknown system error (miscellaneous error).
>
> and
>
> pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
>
> I haven't figured out yet why that is. Is it obvious what I am doing
> wrong here?
>
> My instruments display things like 'Rmt Addr Err' and 'REM MTA'. Not
> sure yet what these mean, but 'Err' definitely doesn't sound right.
>
> One of my goals is to be able to get screenshots off my scope.
> The programming manual says:
>
> Example:
>
> 210 CLEAR 707            ! Clear interface buffers.
> 220 OUTPUT 707;"PLOT"    ! Starts plotter buffering.
> 230 SEND 7;UNT UNL       ! Clears bus, set ATN line at controller true.
> 240 SEND 7;LISTEN 5      ! Tells plotter at address 5 to listen.
> 250 SEND 7;TALK 7        ! Sets 54200A/D to talk mode.
> 260 SEND 7;DATA          ! Sets ATN line at controller to false
> 270                      ! so data can be transferred.
> 280 WAIT 50              ! Wait 50 seconds for transfer to finish
> 290 !               Note:  If programming, use the SRQ capabilities
> 300 !                      of the 54200A/D to determine if the transfer
> 310 !                      is complete. Attempting to program the
> 320 !                      54200A/D while making a hardcopy dump will
> 330 !                      cause errors.
>
> How would I go about receiving such a plot with pyvisa or linux-gpib
> directly? Can it be done? A quick web search didn't provide insights.
>
> Thanks,
> -Alex
>
> On Sun, Nov 22, 2020 at 05:19:58PM +0100, W wrote:
>> Hi Alex
>>
>> I followed the same path as you and gave up with these NI-Visa drivers. Now
>> I have something working with linux-gpib, pyvisa/pyvisa-py on an old PC
>> (Pentium 4)
>>
>> A couple of days ago, I described my process to have this software
>> installed. If you are interested, you can find it here <https://github.com/daturach/Documentation/wiki/GPIB:-Building-an-instrumentation-lab-with-python-libraries>
>>
>> Good luck
>>
>> Walter
>>
>> On 22.11.2020 12:18, Alexander Huemer wrote:
>>> Hi
>>>
>>> That looks promising. I actually already had it installed but didn't
>>> look at it yet. From the README I figure that it has linux-gpib as a
>>> dependency. I'll have to look into it.
>>> Thanks for the suggestion.
>>>
>>> -Alex
>>>
>>> On Sun, Nov 22, 2020 at 10:58:44AM +0100, Roel Jordans wrote:
>>>> Hi Alex,
>>>>
>>>> You may want to have a look at pyvisa-py.  That seems to work nicely
>>>> for me without having to install the NI-VISA drivers.
>>>>
>>>> Cheers,
>>>>    Roel
>>>>
>>>> -----Original Message-----
>>>> From: Alexander Huemer <[email protected]>
>>>> To: Linux GPIB general mailinglist <
>>>> [email protected]>
>>>> Subject: [Linux-gpib-general] Compatibility layer for pyvisa?
>>>> Date: Sun, 22 Nov 2020 08:57:29 +0000
>>>>
>>>> Hi
>>>>
>>>> My understanding is this:
>>>> * linux-gpib implements drivers for many GPIB interfaces and provides
>>>> a
>>>>     userspace API on top of that, which is great.
>>>> * pyvisa depends on vendor drivers like NI-VISA or the equivalent of
>>>>     other vendors.
>>>>
>>>> Is this correct?
>>>>
>>>> I tried to get NI-VISA working yesterday in order to be able to use
>>>> pyvisa with a NI PCI board, on a distribution that they do not want to
>>>> support, on a i686 box.  I gave up after some hours, the configure
>>>> script they have in there was written by drunk monkeys.
>>>>
>>>> So, here is my question: Did anybody consider to make the linux-gpib
>>>> drivers available to pyvisa?
>>>>
>>>> -Alex
>>>>
>>>> [1]
>>>> https://www.ni.com/de-at/support/downloads/drivers/download.ni-kal.html#334223
>>>>
>>>>
>>>> _______________________________________________
>>>> Linux-gpib-general mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>>>>
>>> _______________________________________________
>>> Linux-gpib-general mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>
>> _______________________________________________
>> Linux-gpib-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>
>
> _______________________________________________
> Linux-gpib-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general