Modbus Command Address Format (From a Master)?

skyfox

Lifetime Supporting Member
Join Date
Nov 2006
Location
CA
Posts
279
Good Morning,

Hopefully someone with LOT's of (or little of) MODBUS experience can help me out to get enlightened a bit.


When a "MODBUS MASTER" device send out a command to read or write to a slave, what is the format of the adress it uses along with the function code?

For example, MASTER sends out a command to the slave saying it wants to read 10 registers of data starting at address 30001. Does the master then send.......

MODBUS FC = 04 (Read Input Registers)
Start Address = Is this 0, or is this 30001?
Number of registers to read = 10

This command would then return data from Modbus slave registers 30001 - To 30010.

My question is regarding the Address format used by Modbus Master(s) when issuing a data Read/Write command to a slave...

Is it Universal?

or,

Can it vary from master to master?



Thanks to All
 
Last edited:
When a "MODBUS MASTER" device send out a command to read or write to a slave, what is the format of the adress it uses along with the function code?

ans: This graphic shows the entire message:
65mxvr.jpg


The graphic below shows an example of an 04 'read input register' message minus the first byte, the slave node address, and the CRC bytes at the end of the message.
o6mhb5.jpg


For example, MASTER sends out a command to the slave saying it wants to read 10 registers of data starting at address 30001. Does the master then send.......

you missed the Slave node address xx

MODBUS FC = 04 (Read Input Registers) ans: yes
Start Address = Is this 0, or is this 30001?

ans: See example above. It is never 30001. The leading 3 is for human consumption only, so that we can communicate which data register for which command (04 command uses 3xxxx registers). The leading numeral 3 is never included in the message itself (nor is the leading 4 in a 40001 read holding register message used by the 03 command)

Number of registers to read = 10
ans: your number is decimal, the actual message is binary bits)

This command would then return data from Modbus slave egisters 30001 - To 30010

ans: correct

My question is regarding the Address format used by Modbus Master(s) when issuing a data Read/Write command to a slave...
Is it Universal?

ans: Depends on the command

or, Can it vary from master to master?

ans: If does not vary from master to master. All masters use the same format. Modbus is a protocol. A protocol is a set of rules. The rules are what the message consists of.
 
Oops, my mistake. I posted the example for the 03 read holding register function command

Here's the 04 read input register command:
2drtj4m.jpg
 

Similar Topics

I have a wago controller that will be setup for Modbus. We are using ETHERNET_MODBUSMASTER_TCP function block. I understand the modbus mapping...
Replies
2
Views
1,962
Hello, I have a Modbus device hooked to a Micro1400 via Port0, comms are set up at each end OK. I need to read a float value on registers...
Replies
2
Views
3,192
Hello Everyone. I am using a 1769-SM2 Module to communicate Modbus RTU to a third party device, using the first serial port. I am using MSG...
Replies
0
Views
3,354
Hi friends, i'm purusoth and i'm having one Twido PLC , XBTN 200 and ATV 71, i want to communicate between Twido and ATV 71 ( AC Drive...
Replies
0
Views
2,365
I currently have a E1101 talking across Modbus to a DSE 5220 Genset Controller using the following driver… Com1 – modicon Master/Modbus Naster...
Replies
3
Views
6,994
Back
Top Bottom