Twido Read Input Address

rizkibayu

Member
Join Date
Sep 2022
Location
surabaya
Posts
2
Dear friend,
how to read the input register (3xxxxx) of device from twido plc.
i have tried the comm macro but it always read the holding register (4xxxxx) of the device.
thanks.
 
To read a Modbus slaves Input Registers, 3xxxxx, use Modbus Function Code [4 (0x04) Read Input Registers].

As you probably found, Modus function code [3 (0x04) Read Holding Registers] is used to read a Modbus slave's Holding Registers (4xxxxx).

I don't know where the convention of using prefixes 3 and 4 are used to designate Input and Holding registers, respectively, but those prefixes mean nothing to the basic protocol, and are not included "on the wire" in Modbus communications, because the function code makes explicit which type (memory area) of data is the target of the message.

What will vary from device to device (Modbus Masters) is how to select the function code. Some devices list the function codes explicitly; some devices use the prefix designation (0xxxx, 1xxxx, etc.), and a data transfer direction (Read or Write).

Also note that the formal Modbus Data Model specifies the numbering each type of registers ordinally, i.e. from 1 to 65536, but the actual "on the wire" protocol uses the offset of the register from the first register of its type, i.e. from 0 to 65535. Again, what will vary from device to device is how the registers are documented (Modbus Slaves) to, or specified (Modbus Masters) by, the user. In a slave this is seen in the documentation of the register map; a master this is seen in the user interface (typically a dialogue box) when configuring a Modbus request block.

Bottom line: there are two conventions used to specify the type of Modbus request; there are two conventions used to specify the address of specific registers; making the choice from the four possible combination accounts for the vast majority of all Modbus configuration problems.
 
Thanks for the explanation.
But im still confused about how to mapping the input register of device to memory of the twido.
Anyone have experience about it?
 
Thanks for the explanation.
But im still confused about how to mapping the input register of device to memory of the twido.
Anyone have experience about it?


"Input Registers" per se typically cannot be mapped to the memory of a Modbus Slave.

Input Registers, in data the model that is Modbus, are mapped to the physical inputs of the device running the Modbus Slave protocol. Evidence of this is apparent in the fact that there is a Modbus protocol function code, 4 (0x04) to Read Input Registers, but there is no function code to write Input Registers.

That is not to say there are no devices that allow one to map the Input Registers to arbitrary memory addresses, rather that Holding Registers exist for that purpose, so any PLC manufacturer is unlikely and very unwise to put forth the extra effort to re-map Input Registers and/or deal with the technical support confusion resulting from doing so.
 

Similar Topics

I have a twido TWDLCAE40DRF PLC, IP 192.168.0.1, connect to a network switch port 1. Also, I have a modbus Power Meter (Device ID: 5, PLC try to...
Replies
11
Views
8,947
Hi guys!! I'm New here and new with this type of plcs i have TWDLMDA40DTK and i need to get a copy of the program and i don't have an original...
Replies
6
Views
689
Good, how do I control through an Analog output of a valve, that is, open the valve from 10% to 10% until it reaches 100%, and then close it...
Replies
4
Views
2,241
Hi! I bought a secondhand Twido base unit to help me learn programming and also faultfind expansion modules (one of my customers machines uses...
Replies
4
Views
1,690
We're a second hand machinery merchant. We've just had a machine arrive that has a Schneider Twido TWDLCAA24DRF PLC and a Magelis XBT-R411 HMI...
Replies
4
Views
2,402
Back
Top Bottom