Author Topic: Python at the workbench - SCPI control of lab instruments  (Read 7971 times)

0 Members and 1 Guest are viewing this topic.

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Python at the workbench - SCPI control of lab instruments
« on: May 13, 2022, 03:50:24 pm »
Code: [Select]
pip install pyvisa-py
python3
>>> import pyvisa as visa
>>> dp832 = visa.ResourceManager('@py').open_resource('TCPIP::192.168.1.4::INSTR')
>>> print (dp832.query("*IDN?"))
RIGOL TECHNOLOGIES,DP832A,DP...,00.01.16

>>> print(dp832.query(':MEASure:ALL? CH3'))
3.1921,0.3004,0.959

>>> # press CTRL+D to exit from python3

Felt chatty today.  These are some sort of personal learning notes.  Trying to make a tale for beginners like me.

\[ \star \ \star \ \star \]
Say you have a power supply, or an oscilloscope, or some other instrument that can be controlled remotely, from a computer.  You see weird acronyms in the instrument's user guide, like LXI, VISA, IVI, VXI, SCPI, GPIB, etc.  Now what?

That means that the instrument can listen to text commands sent from a computer, and can respond to those commands, and send measurements back to the computer when asked.  There are many ways to talk SCPI with an instrument, can be through a USB cable, or RS232, or LAN, or WiFi, or GPIB.

\[ \star \ \star \ \star \]
Let's send some SCPI commands from Python.  You have to have:
- computer with Python3 installed
- a lab instrument that can talk SCPI
- a cable to connect the instrument to the PC

Right now I'm using a Rigol DP832A power supply connected with a LAN cable, but it can be any other SCPI capable instrument, no matter the brand, or if it's a power supply or an oscilloscope.  My OS is Ubuntu, it should work the same from Windows, or Mac, too, but I didn't try.

There is no need to install additional programs, or drivers, or NI-VISA, or IVI, or whatever other software you may have received together with the instrument.  However, there is a module that has to be added to Python, pyvisa.  Open a terminal (a command prompt) and type:

Code: [Select]
pip install pyvisa-pyThat's it, all installed now.

(Skipabble gibberish details:  'pyvisa' and 'pyvisa-py' are not the same thing.  'pyvisa' is the frontend, it can use different backend VISA libraries, either the proprietary NI-VISA or the open source backend 'pyvisa-py'.  The backend is the component knowing VISA, and how to talk over different LAN, USB or COM.  Installing 'pyvisa' alone will only work if a backend is already present.  Installing 'pyvisa-py' with pip will also install 'pyvisa')

\[ \star \ \star \ \star \]
Connect the LAN cable and give a fixed IP to the instrument.  Mine has the IP address 192.168.1.4, so whenever this address will appear in the next examples, replace it with the address of your instrument.  To be sure it's all working, open a terminal and type:
Code: [Select]
ping 192.168.1.4and the instrument should respond.  Just to be sure it's your instrument responding and not some other device, power off the instrument and the ping shouldn't work any more.  If all good, power the instrument on, and now let's try from Python.

\[ \star \ \star \ \star \]
Open a terminal and type
Code: [Select]
python3

# at the python prompt, >>>, type
>>> import pyvisa as visa
>>> dp832 = visa.ResourceManager('@py').open_resource('TCPIP::192.168.1.4::INSTR')

>>> # to send SCPI commands to the DP832 power supply and print the DP832's answer
>>> # for example, the ':*IDN?' command asks the instrument to identify itself

>>> print (dp832.query("*IDN?"))
RIGOL TECHNOLOGIES,DP832A,DP...,00.01.16

>>> # I have manually turned on CH3 with some power LEDs connected
>>> # now let's read the Voltage, Current and Power measured by the DP832 at its channel 3

>>> print(dp832.query(':MEASure:ALL? CH3'))
3.1721,0.3004,0.951

>>>
Those numbers read by Python are the same numbers that were displayed on the DP832's front panel at that moment.

\[ \star \ \star \ \star \]
Once we have those numbers, we can do whatever we want with them in Python.  For example we could save them in a file, or plot them in a chart, or combine them with some other data from some other instruments, or do automated testing, or conduct lab experiments in order to discover the meaning of everything!  ;D

Works similar for other SCPI instruments, or with USB instead of LAN.
« Last Edit: May 13, 2022, 03:59:30 pm by RoGeorge »
 
The following users thanked this post: paf, ch_scr, jasonRF

Offline Wolfgang

  • Super Contributor
  • ***
  • Posts: 1775
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: Python at the workbench - SCPI control of lab instruments
« Reply #1 on: May 14, 2022, 07:15:08 pm »
Hi George,

I agree that SCPI is the way to go to control a multi-instrument, multi-vendor lab environment, and using python and VISA makes it simple enough. I prefer this over any LabView, BenchVue or other vendor integration layer. Its stable, its open, its flexible, there are no single vendor restrictions, and the math and engineering libraries of Python are a *lot* better than other stuff.

The best thing is that you can create your own SCPI-based instruments and you can control them via Python as well.

https://wordpress.com/stats/post/6495/electronicprojectsforfun.wordpress.com

Regards
  Wolfgang
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #2 on: May 17, 2022, 11:59:33 am »
The link doesn't work for me (try your link from a private browser window), you mean this one right?
https://electronicprojectsforfun.wordpress.com/
That's a very nice blog!   :-+  I think I've met it already when googled for some RF projects.

Same here about NI-VISA, I prefer small and open source components, the NI-VISA thing is a huge install, and I remember it as Windows only.  The default backend for pyvisa might be the NI-VISA binaries, if installed, but I didn't check, so just to be sure it's using the pyvisa-py backend, I specify "py" when creating a new ResourceManager.

That reminds me of some setup steps required for USB instruments in Linux:



An example for controlling a Rigol DS1054z by USB from Python, using Ubuntu and pyvisa.
(Make sure the oscilloscope is not in pict bridge mode, set it to "computer", on the oscilloscope buttons press "Utility" -> "IO Setting" -> "USB Device" to mode "Computer").

Install the following
Code: [Select]
pip install pyvisa-py
pip install rlcompleter    #optional, it helps with TAB autocompletion in interactive mode
sudo apt install python3-usb

Configure the following
Code: [Select]
sudo groupadd usbtmcusers
sudo usermod -a -G usbtmcusers $USER

sudo su
echo 'SUBSYSTEM=="usb", MODE="0666", GROUP="usbtmcusers"' >> /etc/udev/rules.d/90-grant-USB-access-for-users-in-group-usbtmcusers.rules
exit
# reboot the computer

After rebooting, plug the oscilloscope by its US cable, and check if all OK
Code: [Select]
lsusb
# Bus 003 Device 013: ID 1ab1:04ce Rigol Technologies DS1000Z Series

getent group usbtmcusers
# usbtmcusers:x:1001:your_username

ls -la /dev/usbtmc0
# crw------- 1 root root 180, 0 May 17 14:22 /dev/usbtmc0

Test it from Python, in interactive mode:
Code: [Select]
        >>> import pyvisa as visa
        >>> import rlcompleter
        # double press TAB to reveal available functions from autocomplete
        # e.g. type "visa." at the ">>>" prompt then press TAB TAB
       
        >>> rm = visa.ResourceManager('@py')
        >>> print( rm.list_resources_info() )
           
        >>> print( rm.list_resources() )
            ('USB0::6833::1230::DS1Zyour_serial_number::0::INSTR',)
           
        >>> ds1054z = rm.open_resource('USB0::6833::1230::DS1Zyour_serial_number::0::INSTR')
        >>> print( ds1054z.query('*IDN?') )
            /home/muuu/.local/lib/python3.8/site-packages/pyvisa_py/protocols/usbtmc.py:115: UserWarning: Unexpected MsgID format. Consider updating the device's firmware. See [url]https://github.com/pyvisa/pyvisa-py/issues/20[/url]
            warnings.warn(
            RIGOL TECHNOLOGIES,DS1104Z,DS1Zyour_serial_number,00.04.05.SP2
        # first time might get this warn, it's about the string terminator
        #   warns only once, it doesn't complain at the following commands
        >>> print( ds1054z.query('*IDN?') )
            RIGOL TECHNOLOGIES,DS1104Z,DS1Zyour_serial_number,00.04.05.SP2
           
        # to find the oscilloscope's SCPI commands, see the rigol ds1000z programming guide site rigolna.com
        # [url]https://www.rigolna.com/products/digital-oscilloscopes/1000z/[/url]
        # [url]https://beyondmeasure.rigoltech.com/acton/attachment/1579/f-0386/1/-/-/-/-/DS1000Z_Programming%20Guide_EN.pdf[/url]
       
        # turn channel 2 on, set the hardware frequency counter to channel 2, then read its value
        # SCPI to send
        #   :CHANnel2:DISPlay ON
        #   :MEASure:COUNter:SOURce CHAN2
        #   :MEASure:COUNter:VALue?
        #
        >>> ds1054z.write(':CHANnel2:DISPlay ON')
        >>> ds1054z.write(':MEASure:COUNter:SOURce CHAN2')
        >>> ds1054z.query(':MEASure:COUNter:VALue?')
            '7.0725586e+02\n'
           
        >>> # CTRL+D to exit

I'm not sure what should I mention how to do it, and what not.  The intent is to explain everything as for a newcomer, those not very comfortable with programming, but this makes it all look like a complicated TL;DR.

The brief alternative for all the above would be:

\[ \star \ \star \ \star \]
Connect with a Rigol DS1054z by USB, Python, pyvisa in Ubuntu.
(first, from the oscilloscope, press "Utility" -> "IO Setting" -> "USB Device" to mode "Computer")

Required computer installs/configure and reboot:
Code: [Select]
pip install pyvisa-py
sudo apt install python3-usb

sudo groupadd usbtmcusers
sudo usermod -a -G usbtmcusers $USER

sudo su
echo 'SUBSYSTEM=="usb", MODE="0666", GROUP="usbtmcusers"' >> /etc/udev/rules.d/90-grant-USB-access-for-users-in-group-usbtmcusers.rules
reboot

Test from Python:
Code: [Select]
import pyvisa as visa

rm = visa.ResourceManager('@py')
print( rm.list_resources() )
#            ('USB0::6833::1230::DS1Zyour_serial_number::0::INSTR',)
ds1054z = rm.open_resource('USB0::6833::1230::DS1Zyour_serial_number::0::INSTR')
print( ds1054z.query('*IDN?') )

# set the HW counter to CH2 and read the measured frequency
ds1054z.write(':CHANnel2:DISPlay ON')
ds1054z.write(':MEASure:COUNter:SOURce CHAN2')
ds1054z.query(':MEASure:COUNter:VALue?')
#            '7.0725586e+02\n'


Would it be better to keep it short like that?
« Last Edit: May 17, 2022, 12:15:02 pm by RoGeorge »
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #3 on: May 19, 2022, 02:54:31 pm »
Wanna GUI-Click!-Click with SCPI from Python?  :D

Download the DVD .iso of Kubuntu 20.04 LTS from https://kubuntu.org/getkubuntu/, and run it in live mode, without installing anything on the current computer.  Preferably would be to install VirtualBox on the current computer, and boot the DVD from inside the VirtualBox program, but this is not mandatory.

Should work the same for Linux, or Windows, or Mac, when booting the live DVD.  This will not mess with the existing computer, and it won't install or change anything permanently on the existing computer.

\[ \star \ \star \ \star \]
Once the Kubuntu live is running, open a terminal in Kubuntu live (with CTRL+ALT+T) and type (inside the running Kubuntu live in a Terminal - 100% tested and working):
Code: [Select]
sudo apt update
sudo apt install python3-pip idle

pip install pysimplegui pyvisa-py

Inside Kubuntu live, open IDLE, press CTRL+N to create a new Python3, write the following Python code to test PySimpleGUI, then press F5 to run it (give the file a name when asked to save):
Code: [Select]
import PySimpleGUI as sg

layout = [
    [sg.Button('OK'), sg.Button('Cancel')]
]

window = sg.Window('GUI App', layout)

while True:
    event, values = window.read()
    if event == sg.WIN_CLOSED:
        break

window.close()
This should open a window with two buttons that can be clicked that does nothing (for now):



New skill unlocked, create a window from Python!  ;D

\[ \star \ \star \ \star \]
For more info about PySimpleGUI, visit the PySimpleGUI dot org http://pysimplegui.org pages, or for a step by step video, watch Creating 10 apps in Python with PySimpleGUI by Clear Code.

Close the OK/Cancel window, and to add some SCPI functionality, make the following chahttps://www.eevblog.com/forum/programming/exit/?action=dlattach;attach=1490818;imagenges to the python file (inside IDLE):
- add a textbox where one can type an SCPI command to be sent to the instrument
- add a read-only textbox to display the instrument's reply
- rename the previous buttons and change the window layout so they will become buttons for "Send" and "Exit".
- for now, the instrument connection will be hardcoded, I've used a Rigol DS1054Z oscilloscope connected by a network cable (mine has the IP address 192.168.1.4, you should use the IP address of your instrument).
Code: (Python) [Select]
import PySimpleGUI as sg
import pyvisa as visa

IP_address = '192.168.1.3'

rm = visa.ResourceManager()
ds1054z = rm.open_resource('TCPIP::' + IP_address + '::INSTR')

layout = [
    [sg.Text('SCPI command:'), sg.Input('*IDN?', key='-SCPI-'), sg.Button('Send')],
    [sg.Text('Response:'), sg.Input('SCPI answer', key='-ANSWER-', expand_x=True, readonly=True)],
    [sg.Button('Exit')]
]

window = sg.Window('Simple SCPI Sender', layout, finalize=True)
window['-SCPI-'].bind('<Return>', '_Enter')
window['-SCPI-'].bind('<KP_Return>', '_Enter')

while True:
    event, values = window.read()
    if event == sg.WIN_CLOSED:
        break

    if event == 'Exit':
        break
    if event == 'Send' or event == '-SCPI-' + '_Enter':
        if values['-SCPI-'][-1] == '?':
            answer = ds1054z.query(values['-SCPI-'])
        else:
            answer = ds1054z.write(values['-SCPI-'])
        window['-ANSWER-'].update(answer)

ds1054z.close()
rm.close()
window.close()

Run it with F5, and a window should pop:


If you click 'Send' or press 'Enter' the command written in the textbox will be sent to the instrument (here the DS1054z oscilloscope) and the reply from the instrument will be displayed on the next row:


\[ \star \ \star \ \star \]
Type and send some other SCPI commands.  For example, to interrogate the oscilloscope what is its current timebase setting, send the SCPI command:
Code: [Select]
TIM:SCAL?


To set the horizontal timebase to 2ms/div, send the command:
Code: [Select]
TIMebase:MAIN:SCALe 0.002


and so on.   The response "28" in this case indicates the total length of the sent SCPI command (26 letters plus 2 the <CR><LF> line termination characters).

For this Rigol DS1000Z series oscilloscope, the command for the timebase has this format:
Quote
Syntax
:TIMebase[:MAIN]:SCALe <scale>
:TIMebase[:MAIN]:SCALe?
The parts written between square brackets are optional, same the small letters, so either the full length or the short format "TIM:SCAL" will be understood by the oscilloscope.
 
(lookup the programming user guide of your instrument to find supported commands, for the Rigol DS1054Z oscilloscope, the programming guide can be found at https://beyondmeasure.rigoltech.com/acton/attachment/1579/f-0386/1/-/-/-/-/DS1000Z_Programming%20Guide_EN.pdf )
« Last Edit: May 19, 2022, 03:27:33 pm by RoGeorge »
 
The following users thanked this post: coromonadalix

Offline dagema

  • Contributor
  • Posts: 42
  • Country: de
Re: Python at the workbench - SCPI control of lab instruments
« Reply #4 on: May 19, 2022, 09:44:39 pm »
Hi, has anyone been able to get it to work on Windows10? When I try it, I get the following errors:

C:\Users\donnie>pip install pyvisa-py
Collecting pyvisa-py
  Downloading PyVISA_py-0.5.3-py3-none-any.whl (59 kB)
     ---------------------------------------- 59.0/59.0 kB 774.3 kB/s eta 0:00:00
Collecting pyvisa>=1.12.0
  Using cached PyVISA-1.12.0-py3-none-any.whl (175 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Installing collected packages: typing-extensions, pyvisa, pyvisa-py
  WARNING: The scripts pyvisa-info.exe and pyvisa-shell.exe are installed in 'C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pyvisa-1.12.0 pyvisa-py-0.5.3 typing-extensions-4.2.0

C:\Users\donnie>python3
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvisa as visa
>>> EEZ = visa.ResourceManager('@py').open_resource('TCPIP::10.2.2.50::INSTR')
Traceback (most recent call last):
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\tcpip.py", line 74, in after_parsing
    self.interface = vxi11.CoreClient(
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\protocols\vxi11.py", line 202, in __init__
    super(CoreClient, self).__init__(
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\protocols\rpc.py", line 768, in __init__
    pmap = TCPPortMapperClient(host, open_timeout)
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\protocols\rpc.py", line 748, in __init__
    RawTCPClient.__init__(self, host, PMAP_PROG, PMAP_VERS, PMAP_PORT, open_timeout)
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\protocols\rpc.py", line 457, in __init__
    self.connect((open_timeout / 1000.0) + 1.0)
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\protocols\rpc.py", line 491, in connect
    raise RPCError("can't connect to server")
pyvisa_py.protocols.rpc.RPCError: can't connect to server

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa\highlevel.py", line 3284, in open_resource
    res.open(access_mode, open_timeout)
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa\resources\resource.py", line 278, in open
    self.session, status = self._resource_manager.open_bare_resource(
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa\highlevel.py", line 3209, in open_bare_resource
    return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\highlevel.py", line 167, in open
    sess = cls(session, resource_name, parsed, open_timeout)
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\sessions.py", line 325, in __init__
    self.after_parsing()
  File "C:\Users\donnie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyvisa_py\tcpip.py", line 78, in after_parsing
    raise errors.VisaIOError(constants.VI_ERROR_RSRC_NFOUND)
pyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
>>>

A ping to the EEZ power supply at 10.2.2.50 responds, and the EEZ Studio can send and recieve SCPI commands to it without problems. 

I have never used Python before, so I have no idea what is causing the errors.

Any suggestions?

Thanks
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #5 on: May 20, 2022, 01:18:22 am »
What instrument is the one you try to connect?
Look in its programing guide documentation and find if it is VISA or LXI compliant.

I don't have Windows.  On a clean Windows install it should work.  Might be some installation conflict, or the python paths were added at the end instead of being added first, or some other Windows settings are cutting the access, I don't know.

Type at a command prompt 'pyvisa-info', maybe you get some clue.  One of the lines should read "TCPIP INSTR: Available" and another line "TCPIP SOCKET: Available".

Could also be that the instrument responds to other resource string format.
https://pyvisa.readthedocs.io/en/1.8/names.html

The easiest way would be to install VirtualBox, download Kubuntu 20.04 LTS and create a virtual machine with Kubuntu (inside VirtualBox), and try from there (because it was tested and known as working).  Ubuntu is as easy to use as Windows, and you can have both Windows 10 and Kubuntu 20.04 running at the same time.  Kubuntu will be just like any other program running inside a window, it won't overwrite the existing Windows10 install.

Offline dagema

  • Contributor
  • Posts: 42
  • Country: de
Re: Python at the workbench - SCPI control of lab instruments
« Reply #6 on: May 23, 2022, 05:53:40 pm »
Thank you for your reply.  I am trying to connect to an EEZ H24005 dual channel power supply. I have attached a screenshot of the device in use with it's SCPI interface application EEZ Studio. I installed  Python3 on a fresh Ubuntu 20.04 installation, then PIP, then pyvisa:

donnie@UD5:~$ sudo apt install python3-pip
[sudo] Passwort für donnie:
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden zusätzlichen Pakete werden installiert:
  libpython3-dev libpython3.8-dev python-pip-whl python3-dev
  python3-setuptools python3-wheel python3.8-dev
Vorgeschlagene Pakete:
  python-setuptools-doc
Die folgenden NEUEN Pakete werden installiert:
  libpython3-dev libpython3.8-dev python-pip-whl python3-dev python3-pip
  python3-setuptools python3-wheel python3.8-dev
0 aktualisiert, 8 neu installiert, 0 zu entfernen und 4 nicht aktualisiert.
Es müssen 6.864 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 25,5 MB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n]
Holen:1 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-dev amd64 3.8.10-0ubuntu1~20.04.4 [3.952 kB]
Holen:2 http://de.archive.ubuntu.com/ubuntu focal/main amd64 libpython3-dev amd64 3.8.2-0ubuntu2 [7.236 B]
Holen:3 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python-pip-whl all 20.0.2-5ubuntu1.6 [1.805 kB]
Holen:4 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8-dev amd64 3.8.10-0ubuntu1~20.04.4 [514 kB]
Holen:5 http://de.archive.ubuntu.com/ubuntu focal/main amd64 python3-dev amd64 3.8.2-0ubuntu2 [1.212 B]
Holen:6 http://de.archive.ubuntu.com/ubuntu focal/main amd64 python3-setuptools all 45.2.0-1 [330 kB]
Holen:7 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 python3-wheel all 0.34.2-1 [23,8 kB]
Holen:8 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python3-pip all 20.0.2-5ubuntu1.6 [231 kB]
Es wurden 6.864 kB in 15 s geholt (473 kB/s).                                 
Vormals nicht ausgewähltes Paket libpython3.8-dev:amd64 wird gewählt.
(Lese Datenbank ... 230393 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../0-libpython3.8-dev_3.8.10-0ubuntu1~20.04.4_am
d64.deb ...
Entpacken von libpython3.8-dev:amd64 (3.8.10-0ubuntu1~20.04.4) ...
Vormals nicht ausgewähltes Paket libpython3-dev:amd64 wird gewählt.
Vorbereitung zum Entpacken von .../1-libpython3-dev_3.8.2-0ubuntu2_amd64.deb ...
Entpacken von libpython3-dev:amd64 (3.8.2-0ubuntu2) ...
Vormals nicht ausgewähltes Paket python-pip-whl wird gewählt.
Vorbereitung zum Entpacken von .../2-python-pip-whl_20.0.2-5ubuntu1.6_all.deb ..
.
Entpacken von python-pip-whl (20.0.2-5ubuntu1.6) ...
Vormals nicht ausgewähltes Paket python3.8-dev wird gewählt.
Vorbereitung zum Entpacken von .../3-python3.8-dev_3.8.10-0ubuntu1~20.04.4_amd64
.deb ...
Entpacken von python3.8-dev (3.8.10-0ubuntu1~20.04.4) ...
Vormals nicht ausgewähltes Paket python3-dev wird gewählt.
Vorbereitung zum Entpacken von .../4-python3-dev_3.8.2-0ubuntu2_amd64.deb ...
Entpacken von python3-dev (3.8.2-0ubuntu2) ...
Vormals nicht ausgewähltes Paket python3-setuptools wird gewählt.
Vorbereitung zum Entpacken von .../5-python3-setuptools_45.2.0-1_all.deb ...
Entpacken von python3-setuptools (45.2.0-1) ...
Vormals nicht ausgewähltes Paket python3-wheel wird gewählt.
Vorbereitung zum Entpacken von .../6-python3-wheel_0.34.2-1_all.deb ...
Entpacken von python3-wheel (0.34.2-1) ...
Vormals nicht ausgewähltes Paket python3-pip wird gewählt.
Vorbereitung zum Entpacken von .../7-python3-pip_20.0.2-5ubuntu1.6_all.deb ...
Entpacken von python3-pip (20.0.2-5ubuntu1.6) ...
python3-setuptools (45.2.0-1) wird eingerichtet ...
python3-wheel (0.34.2-1) wird eingerichtet ...
libpython3.8-dev:amd64 (3.8.10-0ubuntu1~20.04.4) wird eingerichtet ...
python3.8-dev (3.8.10-0ubuntu1~20.04.4) wird eingerichtet ...
python-pip-whl (20.0.2-5ubuntu1.6) wird eingerichtet ...
libpython3-dev:amd64 (3.8.2-0ubuntu2) wird eingerichtet ...
python3-dev (3.8.2-0ubuntu2) wird eingerichtet ...
python3-pip (20.0.2-5ubuntu1.6) wird eingerichtet ...
Trigger für man-db (2.9.1-1) werden verarbeitet ...
donnie@UD5:~$ pip install pyvisa-py
Collecting pyvisa-py
  Downloading PyVISA_py-0.5.3-py3-none-any.whl (59 kB)
     |████████████████████████████████| 59 kB 474 kB/s
Collecting typing-extensions
  Downloading typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting pyvisa>=1.12.0
  Downloading PyVISA-1.12.0-py3-none-any.whl (175 kB)
     |████████████████████████████████| 175 kB 759 kB/s
Installing collected packages: typing-extensions, pyvisa, pyvisa-py
  WARNING: The scripts pyvisa-info and pyvisa-shell are installed in '/home/donnie/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pyvisa-1.12.0 pyvisa-py-0.5.3 typing-extensions-4.2.0
donnie@UD5:~$ python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvisa as visa
>>> EEZ = visa.ResourceManager('@py').open_resource('TCPIP::10.2.2.50::5025::SOCKET')
>>> print (EEZ.query("*IDN?"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/resources/messagebased.py", line 648, in query
    return self.read()
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/resources/messagebased.py", line 486, in read
    message = self._read_raw().decode(enco)
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/resources/messagebased.py", line 442, in _read_raw
    chunk, status = self.visalib.read(self.session, size)
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa_py/highlevel.py", line 519, in read
    return data, self.handle_return_value(session, status_code)
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/highlevel.py", line 251, in handle_return_value
    raise errors.VisaIOError(rv)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
>>> print (EEZ.query("*IDN?"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/resources/messagebased.py", line 648, in query
    return self.read()
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/resources/messagebased.py", line 486, in read
    message = self._read_raw().decode(enco)
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/resources/messagebased.py", line 442, in _read_raw
    chunk, status = self.visalib.read(self.session, size)
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa_py/highlevel.py", line 519, in read
    return data, self.handle_return_value(session, status_code)
  File "/home/donnie/.local/lib/python3.8/site-packages/pyvisa/highlevel.py", line 251, in handle_return_value
    raise errors.VisaIOError(rv)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
>>>


From the EEZ Studio setup I surmised that I need add the socket port 5025 to the TCP/IP call to address the unit. Doing that, I seem to reach the unit with pyvisa, but the *IDN? command does not seem to get any response.

Your intro led me to believe this was a seemingly simple and generic method to talk SCPI, but it no longer appears to me to simple nor generic as I have not been able to get it to work on either Windows or Linux. I guess my expectations were too high.

Kind regards,
Donnie




 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #7 on: May 23, 2022, 06:28:09 pm »
It looks like the instrument can only use SOCKET to connect, and not INSTR.

That instrument might not be fully compatible with pyvisa.  (I assume you can ping the instrument from Ubuntu, right?)  Might be because the instrument is not ready yet for VISA (saying this because I've noticed it only accepts a single connection - my Rigol instruments can have multiple socket connections open at the same time  :-//), or it might be some other simple setting that has to be changed, as for example using a different string terminator, or increasing the timeout to give the instrument more time to reply, I don't know.

I don't have an EEZ instrument to debug the communication, but the EEZ power supplies happens to have a thread on this forum, open by one of the designers.  User prasimix might be able to tell what settings are needed for your EEZ instrument, so to make it talk with pyvisa.  You may want to ask him for help connecting to the instrument from python/pyvisa here:
https://www.eevblog.com/forum/testgear/eez-studio-for-accessing-your-(scpi)-instruments/

PS:
For the future, please copy/paste console text/debugging messages between the "code" tags, so the text will be contained.
« Last Edit: May 23, 2022, 06:55:34 pm by RoGeorge »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4780
  • Country: pm
  • It's important to try new things..
Re: Python at the workbench - SCPI control of lab instruments
« Reply #8 on: September 10, 2023, 05:33:38 pm »
Hi, out of curiosity I've been trying to talk to the ~15years old Rigol DS-1062CA scope, supporting (according to the DS) VISA on USB.
There is none LAN in this rig. My OS Win7 64b. My python here is 3.8.
I installed DS1000 driver via zadig (WinUSB), thus I see "DS1000 Series" usb device when connecting the scope and it says driver is ok. I've installed pyvisa-py and it went ok, it seems.
Now, I tried to install python3-usb, but there is not such thing for Win7.
Instead there is "pyusb" lib - should I install that package?

Code: [Select]
C:\Windows\system32>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvisa as visa
>>> rm = visa.ResourceManager('@py')
>>> print( rm.list_resources() )
C:\Users\me\AppData\Local\Programs\Python\Python38\lib\site-packages\pyvisa_py
\tcpip.py:408: UserWarning: TCPIP:instr resource discovery is limited to the def
ault interface.Install psutil: pip install psutil if you want to scan all interf
aces.

OK, I've installed the pyusb and tried the demo:

Code: [Select]
import usb.core
import usb.util

# find our device
dev = usb.core.find(idVendor=0x1A1B, idProduct=0x0588)

# was it found?
if dev is None:
    raise ValueError('Device RIGOL not found')

# set the active configuration. With no arguments, the first
# configuration will be the active one
dev.set_configuration()

# get an endpoint instance
cfg = dev.get_active_configuration()
intf = cfg[(0,0)]

ep = usb.util.find_descriptor(
    intf,
    # match the first OUT endpoint
    custom_match = \
    lambda e: \
        usb.util.endpoint_direction(e.bEndpointAddress) == \
        usb.util.ENDPOINT_OUT)

assert ep is not None

# write the data
ep.write('*IDN?')

Code: [Select]
C:\Users\me\Desktop\Rigol Python>py test1.py
Traceback (most recent call last):
  File "test1.py", line 9, in <module>
    raise ValueError('Device RIGOL not found')
ValueError: Device RIGOL not found
« Last Edit: September 10, 2023, 06:18:49 pm by iMo »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4780
  • Country: pm
  • It's important to try new things..
Re: Python at the workbench - SCPI control of lab instruments
« Reply #9 on: September 10, 2023, 07:16:30 pm »
I've reinstalled the WinUSB driver to libusb one (latest zadig) and pyusb sees it now..
Code: [Select]
import usb.core
import usb.util
for dev in usb.core.find(find_all=True):
    print(dev)

Code: [Select]
C:\Users\me\Desktop\Rigol Python>py test2.py
DEVICE ID 1ab1:0588 on Bus 000 Address 001 =================
 bLength                :   0x12 (18 bytes)
 bDescriptorType        :    0x1 Device
 bcdUSB                 :  0x110 USB 1.1
 bDeviceClass           :    0x0 Specified at interface
 bDeviceSubClass        :    0x0
 bDeviceProtocol        :    0x0
 bMaxPacketSize0        :   0x40 (64 bytes)
 idVendor               : 0x1ab1
 idProduct              : 0x0588
 bcdDevice              :  0x100 Device 1.0
 iManufacturer          :    0x1 Rigol Technologies
 iProduct               :    0x2 DS1000 SERIES
 iSerialNumber          :    0x3 XXXXXXXXXXXXXXXXXx
 bNumConfigurations     :    0x1
  CONFIGURATION 1: 2 mA ====================================
   bLength              :    0x9 (9 bytes)
   bDescriptorType      :    0x2 Configuration
   wTotalLength         :   0x27 (39 bytes)
   bNumInterfaces       :    0x1
   bConfigurationValue  :    0x1
   iConfiguration       :    0x0
   bmAttributes         :   0xc0 Self Powered
   bMaxPower            :    0x1 (2 mA)
    INTERFACE 0: Application Specific ======================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x0
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x3
     bInterfaceClass    :   0xfe Application Specific
     bInterfaceSubClass :    0x3
     bInterfaceProtocol :    0x1
     iInterface         :    0x0
      ENDPOINT 0x1: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x1 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x82: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x82 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x0
      ENDPOINT 0x83: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x83 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :    0x1
« Last Edit: September 10, 2023, 07:18:32 pm by iMo »
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #10 on: September 10, 2023, 07:38:47 pm »
I don't use neither Windows nor USB connection, can not reproduce that error, or advice how to fix it, sorry.

Might be easier to install Ubuntu (or other Linux) inside a VirtualBox (or alike VM player), then try again from Linux.  You'll need to pass the USB from the host (Windows) machine to the guest (Linux) machine after the Linux machine is started (with right click on the VM USB small icon in the bar of the VM).

I remember somebody was complaining about DS1054Z having some bugs in the USB packets.  Maybe your DS-1062 doesn't.

If all fails, on Windows you can install NI-VISA (it's free to download and install), then configure 'pyvisa' to use standard 'VISA' library (from NI) instead of 'pyvisa-py' ('pyvisa-py is only mocking a VISA library, it is not as complete as the real thing).
 
The following users thanked this post: iMo

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Python at the workbench - SCPI control of lab instruments
« Reply #11 on: September 10, 2023, 11:28:37 pm »
> Felt chatty today.  These are some sort of personal learning notes.

Just a side note, you may want to take a look at Jupyter Notebooks. It's a great tool for exploring and publishing python snippets like these ones.

https://jupyter.org/

 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: au
Re: Python at the workbench - SCPI control of lab instruments
« Reply #12 on: September 10, 2023, 11:43:31 pm »
If anyone is looking for some C/C++ code I ran across this snippet at:  https://www.codeproject.com/Articles/869421/Interfacing-Rigol-Oscilloscopes-with-C

Code: [Select]
#include "VISA\WinNT\Include\visa.h"

#define NUM_CMDS 10
#define CMD_SIZE 64

static ViSession rmSession, scopeSession;
static ViFindList resourceList;
static ViUInt32 numResources;
static ViStatus status;
static char usbResource[VI_FIND_BUFLEN];

// Execute each command in a list
void run_commands(char commands[NUM_CMDS][CMD_SIZE])
{
int i;

for (i = 0; i < NUM_CMDS; i++)
{
status = viWrite(scopeSession, (ViBuf)commands[i], 512, VI_NULL);
if (status != VI_SUCCESS)
{
printf("Error executing %s\n", commands[i]);
exit(-1);
}
}
}

void CRigolDlg::OnBnClickedScopemem()
{
// The list of commands
static char cmds[NUM_CMDS][CMD_SIZE] =
{ ":CHAN1:RANG 4\n",
  ":CHAN1:BWL 20M\n",
  ":TIM:MAIN:SCAL 0.001\n",
  ":WAV:MODE RAW\n",
  ":WAV:SOUR CHAN1\n",
  ":WAV:STAR 1\n",
  ":WAV:STOP 800000\n",
  ":SING\n",
  ":RUN\n",
  ":TFOR\n" };

// Open session with the resource manager
viOpenDefaultRM(&rmSession);
// Find USB resources
viFindRsrc(rmSession, "USB?*INSTR", &resourceList, &numResources, usbResource);
// Open session to the resource
viOpen(rmSession, usbResource, VI_NULL, VI_NULL, &scopeSession);

// Configure the device and start measurement
run_commands(cmds);
// Wait for the scope's measurement
Sleep(1000);
// Read the response
viWrite(scopeSession, (ViBuf)":STOP\n", 512, VI_NULL);
viWrite(scopeSession, (ViBuf)":WAV:DATA?\n", 512, VI_NULL);
viReadToFile(scopeSession, "wave.dat", 800000, VI_NULL);

// Close the session to the resource
viClose(scopeSession);
viClose(rmSession);
}

I managed to add it to a Visual Studio 2022 project and get it to compile successfully, but as yet untested.
To quote from the article:

"On their website, Rigol Technologies provides a driver package for each of their oscilloscopes. If you install it on
a Windows computer, the C:\Program Files (x86) directory will hold a directory called IVI Foundation. This
contains the libraries and header files needed to build the applications described in this article.
A particularly important file is visa32.lib, which is located in IVI Foundation\VISA\WinNT\lib\msc. The functions
in this library make it possible to interface compliant test instruments. These functions are declared in visa.h,
which is located in IVI Foundation\VISA\WinNT\include."

You need to have an #include "... visa.h" statement as well as adding the "visa32.lib" library to the linker and everything should compile successfully.
« Last Edit: September 10, 2023, 11:45:23 pm by moffy »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4780
  • Country: pm
  • It's important to try new things..
Re: Python at the workbench - SCPI control of lab instruments
« Reply #13 on: September 11, 2023, 06:50:11 am »
After installing NI 's Ultrascope with driver from batronix' site I can connect and partially operate the scope, but half of things does not work. I can see the IVI directory with the visa.h in it as moffy indicated, however.
I'll try under Ubu with RoGeorge's, we will see what happens..
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4780
  • Country: pm
  • It's important to try new things..
Re: Python at the workbench - SCPI control of lab instruments
« Reply #14 on: September 11, 2023, 07:37:55 am »
Ok, now in my oldie Ubu 18.04 (in Vbox 6.1.22 under Win7) with python3.7.5 (I have several python versions installed from past, a big mess)..
Code: [Select]
>>> print( ds1054z.query('*IDN?') )
Rigol Technologies,DS1062CA,XXXXXXXXXXXXXX,04.01.00

>>> print( ds1054z.query(':MEASure:VPP?') )
4.480000e-02

>>> print( ds1054z.query(':MEASure:VPP?') )
4.600000e-02

>>> print( ds1054z.query(':MEASure:VPP?') )
4.960000e-02

>>> print( ds1054z.query(':MEASure:VPP?') )
4.520000e-02

:D

Good guide!  :-+
« Last Edit: September 11, 2023, 07:50:35 am by iMo »
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #15 on: September 11, 2023, 07:41:12 am »
Congrats!  :-+
 
The following users thanked this post: iMo

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4780
  • Country: pm
  • It's important to try new things..
Re: Python at the workbench - SCPI control of lab instruments
« Reply #16 on: September 11, 2023, 08:41:35 pm »
It is running in my Win7, it seems.
All you have to do is:
1. install the "NI-VISA Run-Time Engine 17.0" I've downloaded in my case from Batronix site for my DS1062CA, for example
2. you will see 2 new items installed - "VISA Shared Components" and "VISA.NET Shared Components", it installs the USB driver as well
3. after you plug in Rigol into the USB you will get "USB Test and Measurement Device (IVI)" in the Device Manager
4. and the test python will be for example (a red "Rmt" appears in the right top corner of the Rigol's display and the scope's keys get locked):

Code: [Select]
C:\Windows\system32>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvisa as visa
>>> import sys
>>>
>>> rm = visa.ResourceManager()
>>>
>>> instruments = rm.list_resources()
>>>
>>> usb = list(filter(lambda x: 'USB' in x, instruments))
>>>
>>> if len(usb) != 1:
...     print('Bad instrument list', instruments)
...     sys.exit(-1)
...
>>> scope = rm.open_resource(usb[0], timeout=20, chunk_size=1024)
>>>
>>> print(scope.query('*IDN?'))
Rigol Technologies,DS1062CA,DSXXXXXXXXXXXX,04.01.00

>>>
>>> print(scope.query(':MEASure:VPP?') )
5.400000e-03

>>>
« Last Edit: September 12, 2023, 08:14:19 am by iMo »
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Python at the workbench - SCPI control of lab instruments
« Reply #17 on: September 12, 2023, 07:08:08 am »
Well done!  In Windows the genuine VISA dll files might be preferable, they have some features that were not ported to the pure python implementation (the VISA standard itself includes some specific C features, an interpreter like Python won't be able to mock those requirements, though those are not essential for SCPI control).

I've read Agilent and Tektronix have their own VISA libs, never went into details about the Windows version of VISA, don't know which provider would be preferable.  National Instrument (NI) is considered the "official" provider of VISA for Windows, though some years ago the installer was adding a lot of other components aside from the VISA libs, such that the install was GB size instead of kB.  :)

No idea how it is now.  I've heard the nowadays LabVIEW (which includes the VISA libs and the graphic programming language LabVIEW) is now free for home use.  Labview can be very productive (e.g. one can do an oscilloscope on the PC side in minutes - adding a screen/plot a knob or some indicators is as easy as any drag and a drop, and those components can communicate with real hardware).

Free LabVIEW might worth a try to make your own SCPI tools if you use mostly Windows in the LAB.  LabVIEW used to have a mode where one can turn a VI (Virtual Instrument, .vi is the extension of a LabVIEW drawing, or "code" file) into a standalone executable that can run without the need of installing LabVIEW.  The funny thing is such a standalone distributable VI (a Windows exe) can run in Linux, too, with WineHQ.

For example this soundcard signal generator/oscilloscope/spectrum analyzer:  https://www.zeitnitz.eu/scope_en

was built with LabVIEW as a standalone installer (for Windows) but with WineHQ it also work in Linux.  :D

WineHQ only translates Windows OS system call into Linux OS calls, it does not create a virtual machine and does not need a windows license.  While many Windows programs and games will run just fine in Linux, or Mac, or FreeBSD with the help of WineHQ (e.g. LTspice, or Starcraft) some might not.

Offline moffy

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: au
Re: Python at the workbench - SCPI control of lab instruments
« Reply #18 on: September 12, 2023, 07:58:09 am »
Thanks RoGeorge for all the info, I'll have to check out the LabView for home use.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf