Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: alexrudd2/clickplc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bbbab43d30c6f00e44d86cfcbac44834318e193b
Choose a base ref
..
head repository: alexrudd2/clickplc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 93817b118a7ad8c251d3ab98f7d75aeff69736f1
Choose a head ref
Showing with 376 additions and 79 deletions.
  1. +1 −1 .github/workflows/python-package.yml
  2. +1 −1 .pre-commit-config.yaml
  3. +7 −5 README.md
  4. +270 −39 clickplc/driver.py
  5. +93 −29 clickplc/tests/test_driver.py
  6. +4 −4 setup.py
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
pymodbus-version: ["2.5.3", "3.0.2", "3.1.3", "3.2.2", "3.3.1", "3.4.1", "3.5.4", "3.6.8"]
pymodbus-version: ["2.5.3", "3.0.2", "3.1.3", "3.2.2", "3.3.1", "3.4.1", "3.5.4", "3.6.9"]
exclude:
- python-version: "3.10"
pymodbus-version: "2.5.3"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ repos:
- id: check-added-large-files
- id: check-json
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.2
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -57,19 +57,21 @@ The entire API is `get` and `set`, and takes a range of inputs:
>>> await plc.set('y101', True) # Sets Y101 to true
```

Currently, only X, Y, C, DS, DF, and CTD are supported:
Currently, the following datatypes are supported:

| | | |
|---|---|---|
| x | bool | Input point |
| y | bool | Output point |
| c | bool | (C)ontrol relay |
| t | bool | (T)imer |
| ct | bool | (C)oun(t)er |
| ds | int16 | (D)ata register, (s)ingle signed int |
| dd | int32 | (D)ata register, (d)double signed int |
| df | float | (D)ata register, (f)loating point |
| ds | int16 | (D)ata register, (s)igned int |
| td | int16 | (T)ime (d)elay register |
| ctd | int32 | (C)oun(t)er Current Values, (d)ouble int |

We personally haven't needed to use the other categories, but they are
straightforward to add if needed.
| sd | int16 | (S)ystem (D)ata register |

### Tags / Nicknames

Loading