Category:Modbus
From Digi Developer
Contents |
Modbus Starting Page
A guide and index to Modbus resources in this Wiki
Python Code Samples
At present there is no complete "Modbus Library" since by itself it cannot do anything - thus one needs to define how one wants Modbus to integrate with a Python application before one can have a library. Here are Wiki pages which explain the basic concepts for creating Modbus requests under Python:
- Python_CRC16_Modbus_DF1 : How to calculate the 16-bit CRC used by Modbus/RTU and Allen-Bradley DF1
- How_to_create_Modbus/RTU_request_in_Python : Creating a basic Modbus/RTU message as a binary-string
- Modbus_class_design_in_Python : The class hiearchy related to Modbus PDU, TCP, RTU and ASCII
- Modbus_Floating_Points : How to encode 32-bit floating points in Modbus
Leveraging the Modbus Bridge in the WAN IA / X4 / X8 products
Some Digi products include a powerful multi-master Modbus Bridge which freely converts between Modbus/TCP, Modbus/RTU and Modbus/ASCII. Thus your Modbus Python code can be quite simple, yet have full function. This page explains the integration:
- Integrating_the_Digi_IA_Modbus_Bridge_to_Python : Overview of leveraging existing Digi Modbus features with Python
- Modbus_Bridge_on_CPX4 : Overview of the standard Digi Modbus bridge
- Modbus_Example_X4_Setup : Configuring a CPX4 to bridge Modbus/TCP to Modbus serial devices over Xbee networks.
- Modbus_Example_Ethernet_Adapter : how to configure a CPX2 to enable Modbus serial requests over Xbee network to query remote Modbus/TCP slave/servers.
- Modbus_Example_Serial_Adapter : how to configure XBee 232 and 485 adapters to enable Modbus serial requests over Xbee network to query remote Modbus serial devices.
- Understanding_XBee_EndPoints : to enable Modbus over Xbee to work concurrently with Python and iDigi/Dia, you must move the Modbus traffic to a new end-point (away from 0xE8). This page explains how this is done.
External resources
What is Modbus? It is a 30 year old protocol which is best described as a "remote memory table access protocol". It literally allows a client/master to go to a server/slave and ask "return 16-bit words, starting at offset 23 and include 4 words". Modbus places no interpretation on that data; it assumes the client/master and server/slave AGREE as to the meaning. So 4 words of data might consist of:
- one word with 16 status (on/off) bits
- one word of unsigned data with only valid meaning from 0 to 10,000
- two words as a 32-bit float, however Modbus doesn't even promise WHICH of the two words is the upper word and which is lower word
The Modbus specification is here: http://www.modbus-ida.org
Here is background info on Modbus: http://iatips.wikispaces.com/Modbus
Pages in Category Modbus
Pages in category "Modbus"
There are 23 pages in this category.
CDEHIM |
M cont. |
M cont.
PSU |
