Hi
I have a Serial device connected via MOXA MB3270. MOXA act as Serial to TCP IP gateway.
When I send single read request i get error code 34207. I have 10 MBread blocks i send request to each MBread in incremental sequence.
I call this application in 500 ms cycle and very frequently i used to get 34207, then i called FB in 1000 ms cycle, I get Status 0 and still used to get 34207 but not frequently.
Now I see i dont get status 0 and get only 34207. How to improve read blocks of serial deice on TCP IP connect.
Slave is connected in IF3 port.
Regards
Mohamed Idris
FOS_FB.zip (1.1 KB)
After reboot of PLC system is back to normal with Mbread Status 0 for 2 cycle and 34207 for 2 cycle. Is there is workaround without rebooting PLC ?
Hi,
the status code 34207 means, that the internal modbus tcp driver queue is full, in my understanding that means that the’re still pending requests (from any former mbXXXX…() calls) that aren’t finished yet .
I can’t analyse in detail right now, but I assume your “mbReadBlock()” calls are instances of the mbReadDiscreteInputs() function block, right?
And in your code, it looks like that when you’re getting a status >0 and < 65534 (which means “error”), you go on in your sequence to read the next block of discretes, independent of which error was responded by the last call(s), right?
It’s hard to say why the’re still requests pending, but I would propose first to stop sending new requests at all and to analyse what’s the first error you got (should not be 34207 but something different).
Additionally, please check your settings about the number of pending requests in the “ModbusTcp_any” device (as I understood, you’re using the Automation Runtime internal ModbusTCP driver, therefore at least one device of this type should be there)…
Best regards!
Thanks Alexander for your reply.
I stopped all MBblock read request and just enabled 1 MBblock for while waiting for status change to different status , but all the time it remained 34207. It seems to me like that particular channel ‘IF3.ST75’ to the slave is blocked. Because i am using other TCP IP device around 35 numbers all are OK.
I did restart of Gateway still did not worked. Only had to reboot PLC.
Is there a way to find Mb read request is still active / waiting for response ?
Hi,
I’m not sure right now if there’s a status to query if some command is still pending / active.
Bit I would propose to check:
- the IOmapping of the ETH interface the master is running on
- the IOmapping of the affected slave
- and, also please check the logger for warning / error infos (I’m not sure. but I think it’s the “fieldbus” logger)
Master IOmapping:
Slave IOmapping:
Some more information about those diagnostic datapoints and also logger messages can be found here:
Best regards!