3/1/2017 6:57 PM | |
Joined: 1/24/2009 Last visit: 3/29/2024 Posts: 85 Rating:
|
Dear ola84, after checking on site, reading process works on a right way but only when running only step1 ( until Network 4 ) There is a limit from the slave side, of 48 words for reading during each REQuest. I have tottaly to read 170 Words, so i must read 170 Words in 4 steps. When step2 is running ( Network 5 and 6 ), "done" bit is triggered but error 8200 occurs random. It seems that a new REQuest is on, but in the same time, the previous request has not been completed yet. Do you think a time delay in Network 5 is the right solution ? 2. Step 1 ( until network 4 ) works only if start adress is 40002 and not 40001. Attached the code in order to help somebody else, maybe for reading at once and not in multiple steps AttachmentModbus2.pdf (431 Downloads) |
Last edited by: kosmous at: 3/3/2017 7:39:16 AM |
|
3/1/2017 9:17 PM | |
Posts: 3093 Rating:
|
Hello Kosmous, Regards, |
3/2/2017 10:38 AM | |
Posts: 3093 Rating:
|
No, as long as you evaluate the outputs of MB_MASTER correctly, no time delay is required. |
3/3/2017 10:24 AM | |
Joined: 1/24/2009 Last visit: 3/29/2024 Posts: 85 Rating:
|
Could somebody check the attached code in order to suggest the best solution for the above problem ? AttachmentModbus2.pdf (428 Downloads) |
Last edited by: kosmous at: 3/3/2017 10:24:57 AM |
|
3/3/2017 4:15 PM | |
Joined: 1/24/2009 Last visit: 3/29/2024 Posts: 85 Rating:
|
Hello ola84, thank you for your interest, you ere right, but i already use the RESET to REQ immediately after Master call. ( See attached ) Just it was not appeared in the pdf file that i had attached. The problem still remains. The communication is established, leds are blinking, the slave responds that communication is ok, but every 2 sec, error 8200 is appeared for 1 sec and dissapered again cyclically. When i use "done" contact in Network 6 in series with " busy normal close ", 8200 error is never appeared, but do i lose data in that way ? When only step 1 is called, everyhting works perfect ! May be i need to check somewhere the "done" bit before start step 2 ? AttachmentModbus_3.docx (423 Downloads) |
Last edited by: kosmous at: 3/3/2017 4:25:18 PMLast edited by: kosmous at: 3/3/2017 4:43:14 PMLast edited by: kosmous at: 3/3/2017 4:43:31 PM |
|
3/4/2017 10:23 AM | |
Joined: 1/24/2009 Last visit: 3/29/2024 Posts: 85 Rating:
|
Hello ola84, many thanks for your suggestion. You are right ! The only strange issue now is that when start adress to read the slave is 40001, error 8383 still occurs even if i try to read only 2 words. Error 8383 means : " Error in the data address or address outside the valid range of DATA_PTR " When starting adress for reading process is 40002, no error occurs ! Attached is the structure of the adress that slave demands. Do you see anything strange issue about 1st reading register 40001 ? ------------------------------------------------------------------------------------------------- By the way, to help somebody else, my communication process worked with MODBUS blocks of TIA PORTAL and not with MODBUS ( RTU ) blocks. AttachmentPLC reads form this slave device.pdf (542 Downloads) |
Follow us on