hoejinkim, you wrote,
"I tried as you mentioned first, but it still didn't work (First picture)"Your
first picture would've caused the ECOM100 to do a
Modbus Function Code 04 "Read Input Register" 1072. Input Register 1072 is sometimes commonly written as 31072, but not always. The value 1072 comes from your RX's parameter V2057. V2057 is an octal address. When you convert this octal address to decimal you get 1071, but you must add 1 because V0 = Register 1, therefore V2057 = 1072. The reason it did a Function Code 04 "Read Input Registers" instead of a Function Code 03 "Read Holding Registers" is because the 2nd LD instruction's parameter K129 is an odd number (not even).
Also, I don't know your software that you are using as a Modbus TCP/IP Slave, however, in the Variable Settings box you have selected "
Input Registers" with an address of "
41200". I don't know what that means. But if that is where you are looking, you are looking in the wrong place. The place that got read from your Modbus TCP Slave was Input Register 1072.
You wrote,
"and i tried again by changing IR to Holding registers (but i don't understand offset 1072 value?)
but it didn't work.(Second and Third picture)"Your
second picture would've caused the ECOM100 to do a
Modbus Function Code 04 "Read Input Register" 1072 again... the same as your first picture. But this time you have your Modbus TCP/IP Slave looking at
Holding Register 1072 instead of
Input Register 1072.
Your
third picture, again, does a
FC04 "Read Input Register" 1072. But this time you now have your Modbus TCP/IP Slave looking at
Holding Register 41200.
The only iteration you didn't try was the one that would work. If you left your ladder logic the same and then set your Slave up to provide
Input Register 1072, then it should work.
You wrote,
"In the manual, 'ECOM100 does not support function code 4. Thus 30001 address ranges cannot be read from a server/slave device' So i think i need to change from IR to HR cause the funcion 03 has 'Read Holding Registers'"I realize the manual tells you this, but it is incorrect. We at Host Engineering designed the ECOM100 and we made a change to the firmware that allows it to do a FC04 and to read 30001 address if you want it to. This change has never made it into the manual. However, in 2005, when this was implemented, I wrote an FAQ to explain how it works.
http://www.hosteng.com/FAQFiles/ECOM.htm#FAQ0064You wrote,
"In terms of HR, Do i have to write like this:
LD K410
LD K129
LDA O1400
RX V2057
and the address for Modbus TCP/IP slave would be 41200 right??"No. To do Holding Registers your 2nd LD would have to be K128, not K129. Again, if the length parameter is an even number then FC03 "Read Holding Registers" will be done; if the length parameter is an odd number then FC04 "Read Input Registers" will be done.
Also, your RX's parameter (i.e. V2057) is what determines the address of the Register (whether it be Input Register or Holding Register).
2057 octal = 1071 decimal, add 1 = 1072.
You wrote,
"I just found excel file which called 'Modbus Conversion' and easily calculated Address for Client and slave.
I got 41072 Holding Registers (HR), and 31072 Input registers, but i am not going to use Input registers.
but i tried again with new value of HR but it didn't work too.(first picture)"Your ladder in this picture is the same, it is doing a
FC04 "Read Input Register" 1072. Your Slave is set to provide
Holding Register 41072.
You wrote,
"From second picture, i touched this setup communication ports little bit, is there anything wrong?? does it affect communication?"The setup dialog you have pulled up is for the serial port of your PLC, not the ECOM100.
Please try this:
LD K410
LD K129
LDA O1400
RX V2057
...and set your Modbus TCP/IP Slave software for "Input Registers", with "Address" set to 1072.