Python and command prompt communication instructions
Setup
- Alicat Python and Python-driven command prompt (Windows Powershell) drivers have been developed principally by Pat Fuller at NuMat Technologies. Download the drivers from github.com: https://github.com/numat/alicat
- In order to run the command prompt/Powershell driver, Python will first have to be installed on the computer. Install the latest stable Python 3 release: https://www.python.org/downloads/
- Once Python has been installed, command the following in the command prompt:
4. If the Python PIP package manager is installed and enabled, command the following instead
Command Prompt (Powershell) usage
- Enter “alicat –help” or “alicat -h” to access a menu of possible arguments and usage information
-
- If you only have one Alicat connected to your target COM port, command the port name to return data from the Alicat:
- To poll a device with unit ID A, enter the following command
- The response from either of these commands (step 2 or 3) should look like this:
Python usage
Use this command to open a serial connection to an Alicat device on the specified port:
If the Alicat is communicating on the specified port, it will return the same dictionary as when polled via Powershell.
Using this with Windows COM port COM1, for example, would look like this: