labgrid-project / labgrid-project/labgrid
Support analog values in ModbusTCP resource for multi-output devices
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 528
- Forks
- 278
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Moxa is a Modbus controller used to manage I/O. I use it with a 0–4095 range to set a voltage between 0 V and 10 V.
I can use the Moxa resource, declared as follows in my exporter:
Moxa:
cls: 'NetworkService'
address: '10.106.78.190'
username: ''
port: 502
However, this way the resource can only be used by one place at a time, even though the device has 4 outputs.
That is why I looked into ModbusTCPCoil: it adds a coil property, which would allow me to declare the Moxa as 4 separate resources with coil set to 0, 1, 2, and 3 respectively.
The problem is that ModbusTCPCoil appears to handle boolean values only.
I cannot find a way to use ModbusTCPCoil while managing values in the 0–4095 range.
- Am I missing something?
- Is this something you plan to add soon?
- If not, what would you recommend as the cleanest way to use the Moxa as 4 separate resources ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ModbusTCPCoil and Moxa/ModbusTCP resource implementations, then inspect how values and the coil property are handled. Verify whether analog values can be represented independently for the four outputs; done means separate resources accept values in the 0–4095 range for coils 0 through 3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100