Skip to content
rlutes edited this page Sep 19, 2015 · 7 revisions

Table of Contents

Configuring 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.

driver_config

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.

Registry Configuration

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:

Volttron Point Name

The name to used access the point. References to this point will use name.

Units

Used for meta data when creating point information on the historian.

Modbus Register

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.

Writable

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.

Point Address

Modbus address of the point. Cannot include any offset value, it must be the exact value of the address.

Notes

Additional notes for the point.

Example

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

Wiki Home

Quick Start Guide

Getting VOLTTRON

VOLTTRON Community

VOLTTRON Core Services

Historians

Drivers

Instance Management

Applications
  • ...
Examples
Developers
HOWTOS

VOLTTRON Versions and Features

Transactional Network Platform Overview

Platform Services

Volttron Restricted

Information Exchange Standards

FAQ

Project Home

Clone this wiki locally