knowledge_base:programming:python:python_lab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
knowledge_base:programming:python:python_lab [2024/12/27 00:55] – removed - external edit (Unknown date) 127.0.0.1knowledge_base:programming:python:python_lab [2024/12/27 00:55] (current) – ↷ Page moved from knowledge_base:programming:python_lab to knowledge_base:programming:python:python_lab George Wayne
Line 1: Line 1:
 +====== Use Python to Control Lab Equipment ======
 +
 +===== I use 3 types of comms. =====
 +
 +
 +1. USB
 +The most common one with the simplest HW requirements. USB cable. In linux you just need to install "pyvisa-py", but in windows you need "pyvisa" & Keysight/NI visa driver.
 +
 +2. RS232
 +Requires RS232 to USB cable with "pyserial-asyncio".
 +
 +3. Ethernet sockets
 +Use built-in "asyncio stream"s to open socket comms. You would need a LAN cable
 +
 +===== As for python versioning, I would recommend using pyenv =====
 +
 +
 +Windows -  does not support virtualenv, but it is worth using
 +https://github.com/pyenv-win/pyenv-win
 +Linux - pyenv
 +https://github.com/pyenv/pyenv
 +
 +Don't have to use pyenv-win but linux pyenv is strongly recommended.
 +
 +but the github page is kinda self-explanatory
 +
 +===== IDE =====
 +
 +I would say eclipse goes well with java & c.  For python, it is either pycharm or vscode. I recommend vscode since it supports remote development