Home » Categories » Protocols » Modbus

Why is the bit or coil level data incorrect?

Bit read and write commands are issuing properly, and responses are coming from the slave(s), but the data is not correct.

When setting the intaddress field for a bit or coil Modbus command (Modbus function codes 1, 5, and 15), the internal address specified in the command must be at the bit level.


Example:
If the command is issuing a bit read (function code 1), and you wish to place the data in word 600 of the MCM module, the intaddress field should be set to 9600 (600 * 16 bits per word = intaddress of 9600).
This would place the data in word 600, bit 0 of the MCM module. An intaddress of 9601 would place the data in word 600, bit 1.


Second Example:
If the command is issuing a bit read, and you wish to place the data in word 812 of the MCM module, the intaddress field should be set to 12992 (812 * 16 bits per word = intaddress of 12992).
This would place the data in word 812, bit 0 of the mcm module. An intaddress of 12993 would place the data in word 812, bit 1.

Custom Fields
    Attachments (0) Attachments
    There are no attachments for this article.
    Comments Comments
    There are no comments for this article. Be the first to post a comment.
    Related Articles RSS Feed
    How do I enter a Modbus address of 40001 or higher in the DevAddress command field of my MVI56-MCM?
    Viewed 1 times since Tue, Nov 28, 2006
    What's the difference between Modbus ASCII and Modbus RTU?
    Viewed 1 times since Wed, Mar 19, 2008
    I have multiple Modbus masters that need to communicate with 1 or more Modbus serial (RTU) slave devices. What product should be used??
    Viewed 1 times since Tue, Jan 23, 2007
    If I am reading the value from ProSoft 4x register, and it represents a digital input or digital output, how is the value stored?
    Viewed 1 times since Tue, Nov 28, 2006
    What Modbus address would we need to put into the MODSIM32 simulator if we specified on the MVI56-MCM device address to 8680HEX (-31104 decimal) when the MVI56-mcm is the slave?
    Viewed 1 times since Tue, Nov 28, 2006
    How can I detect the feedback status of individual command successful or failed?
    Viewed 1 times since Wed, Nov 29, 2006
    How do I monitor the health of coms to my slaves when the module is a Master?
    Viewed 1 times since Wed, Nov 29, 2006
    I am trying to use a ProSoft Modbus solution to send/receive data to a MSA Ultima X gas dectection system with Modbus interface and am having problems. How can I resolve this issue?
    Viewed 1 times since Thu, Apr 24, 2008
    I have a ProSoft Modbus Master solution and would like to know, is the Slave Status List the best place to monitor for communications health of the network?
    Viewed 1 times since Tue, Mar 18, 2008
    I have limited or no experience with Modbus. How can I find out more about the protocol and command structure?
    Viewed 1 times since Tue, Nov 28, 2006