-
Notifications
You must be signed in to change notification settings - Fork 218
Modbus Driver
The configuration is broken into two parts. The general driver configuration and the registry config. Information about the general driver config can be found here.
Currently the Modbus driver only supports modbus over TCP.
There are three arguments for the "driver_config" section of the general driver configuration.
- device_address - IP Address of the device.
- port - Port the device is listening on. Defaults to 502.
- slave_id - Slave ID of the device. Defaults to 0.
The device type specific configuration of the Modbus driver takes place in a CSV file specified in the driver configuration file. An example file can be found in the voltron repository at volttron/drivers/catalyst371.csv
The CSV file should be comma delimited. An Excel spreadsheet converted to CSV should work fine, even with commas in the data.
The CSV file requires a header line with the following columns labeled in any order:
The name to used access the point. References to this point will use name.
Used for meta data when creating point information on the historian.
A string representing how to interpret the data register and how to read it it from the device. The string takes two forms:
- "BOOL" for coils and discrete inputs.
- A format string for the Python struct module. See http://docs.python.org/2/library/struct.html for full documentation. If the supplied format string produces a string it must only produce one value.
- Examples:
- ">f" - A big endian 32-bit floating point number.
- "
- ">l" - A big endian 32-bit integer.
Either TRUE or FALSE. Determines if the point can be written to. If TRUE an actuation point will be created in addition to the normal point representing periodically scraped data. Only points labeled TRUE can be written to through the ActuatorAgent.
Modbus address of the point. Cannot include any offset value, it must be the exact value of the address.
Additional notes for the point.
Additional columns may be added at the user discretion as long as they are labeled differently.
The following is a simple example:
Point Name | Volttron Point Name | Units | Units Details | Modbus Register | Writable | Point Address | Notes |
---|---|---|---|---|---|---|---|
SampleFloat | SampleFloat | PPM | 0.00-2000.00 | >f | FALSE | 1001 | CO2 Reading 0.00-2000.0 ppm |
SampleWritableFloat | SampleWritableFloat | PPM | 1000.00 (default) | >f | TRUE | 1003 | Setpoint to enable demand control ventilation |
SampleLong | SampleLong | Enumeration | 1 through 13 | >l | FALSE | 1005 | Status indicator of service switch |
SampleWritableShort | SampleWritableShort | % | 0.00 to 100.00 (20 default) | >H | TRUE | 1007 | Minimum damper position during the standard mode |
SampleBool | SampleBool | On / Off | on/off | BOOL | FALSE | 1101 | Status indidcator of cooling stage 1 |
SampleWritableBool | SampleWritableBool | On / Off | on/off | BOOL | TRUE | 1102 | Status indicator |
- Platform Agent
- VOLTTRON Central Agent
- Platform Commands
- Platform Configuration
- [Platform Hardening Security Recommendations] (Linux-Platform-Hardening-Recommendations-for-VOLTTRON-users)
- ...
- [Building VOLTTRON] (Building-VOLTTRON)
- Example Agents
- Agent Development
- [Shortcut Scripts] (Scripts)
- [VOLTTRON Conventions] (Conventions)
- [sMAP Test Server] (sMAP-Test-Instance)
- [Design Discussions] (Design Discussions)
- VIP
- VIP - VOLTTRON Interconnect Protocol
- RPC by example
- VIP - Known Identities
- VIP - Authentication
- VIP - Authorization
- Protecting Pub/Sub Topics
- Setup Eclipse for VOLTTRON
- Deployment Walkthrough
- Forward Historian Walkthrough
- [Create New Historian Agent] (Developing-Historian-Agents)
- [Create New Driver Agent] (Develop-Driver-Agent)
- [Developing With Eclipse] (Eclipse)
- Migrations
- [2.x to 3.x Migration](2.x-to 3.x-Migration)
- 1.2 to 2.0 Migration
- [Deployment Recommendations](Recommendations for Deployments)
VOLTTRON Versions and Features
Transactional Network Platform Overview
- Established Topics
- Working with the Actuator Agent
- Logging
- [Multi-Node Communication] (MultiBuildingMessaging)
Information Exchange Standards