6/21/2019 1:53 PM | |
Posts: 20 Rating:
|
Hi all! I need help with MODBUS TCP/PN. I'm trying to communicate with a device to read its data through modbus. The device uses FC 4 (input register) and the address starting at 40001. Usually it is used for input register addresses starting from 30001, but ok. When I used CAS MODBUS to read the device addresses it read from 30001 and not 40001, as expected. When I made the program I tried several times and nothing works, I have looked at the manual several times and it doesn't work. I am using the IM 154-8 CPU (ET 200 Pro). In the beginning I was giving some errors but I was fixing it, now I see the A006 address error and no matter how much I modify it, it doesn't work. One thing I found strange and noticed today, is that sometimes even if I change the program, when I go online to see the results it gives me the same errors of the previous program that I modified (for example, delete a DB and add a block to another DB). S7: Client I use the block: MODBUSPN Here are attached some prints of the program. I hope they help me, I'm almost going crazy with this program. Thank you in advance.
AttachmentScreenshot.pdf (346 Downloads) |
6/21/2019 5:42 PM | |
Posts: 3093 Rating:
|
Hello, Regards, |
6/21/2019 5:59 PM | |
Posts: 20 Rating:
|
Hi, I fixed it :) But the problem still continues with the address. I tried putting START_ADDRESS as 3000,30001,4000,40001 and 0 (it seems that this is the correct one) and it didn't work. in DB PARAM, I'm putting data_type: 4 db: my array table start: 0 (I also tried others like 1...) end: 3 and nothing... The pictures show the server address and what I'm getting online. . Regards FFGG
AttachmentScreenshot 3.pdf (318 Downloads) |
6/21/2019 7:31 PM | |
Posts: 20 Rating:
|
Hi, oh, sorrz..i didn't write all... I wanted to read it: date_type:4 db:1 start: 0 end: 3 date_type: 4 db: 1 start: 8 end: 14 |
6/22/2019 6:07 PM | |
Posts: 20 Rating:
|
Hi! Here it worked but I had a doubt... when I put it: Length = 14 and in PARAM I put it: DATE 1: data_type: 4 start: 0 end: 13 So it works right... but I would like to have the records separated as follows: Length = 14 and in PARAM I put it: DATE 1: data_type: 4 start: 0 end: 3 DATE 2: data_type: 4 start: 8 end: 13 but it doesn't work. What is the correct way to parameterize?
AttachmentScreenshot 4.pdf (315 Downloads) |
6/22/2019 8:11 PM | |
Posts: 20 Rating:
|
Thank you so much for your answer! I imagined it... so i made two requests like you said. So, i used two MODBUS blocks, MODBUS_DB1 and MODBUS_DB2 and did the same procedure i did for DB1 in DB2. I created a connection 2 in PARAM, with the data for that other MODBUS_DB2. But it's giving an error. In MODBUS_DB1 i can read all registers as I put above, i.e. from 0 to 115... but now, i need to read the rest, i.e. from 115 to the next 125 registers that I can read and so on, until I read all the registers. Do any parameterhave to be the same in both blocks? In the images you can see what i did. regards, FFGG AttachmentScreenshot 5.pdf (310 Downloads) |
Follow us on