-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm getting a wrong packet on fc03 #1
Comments
Hi, this is modbus over tcp (without crc part) http://www.simplymodbus.ca/TCP.htm From error I can only see that this lib was able to connect to modbus master but did not get respond and therefore request timeouts. It could be as you suspect - you may have different protocol for your plc. Atm only thing that I can recommend is to try same fc3 query with same ip/tcp/port with https://github.com/MightyPork/phpmodbus library. |
just to be sure you could start debugging by checking if you actually can connect from your pc to plc modbus port Under windows:
it should not give errors. NB: this lib is only tried with "Wago PLC 750-885 ETHERNET" and atm php version I am using is 'PHP 7.1.2 (cli) (built: Feb 14 2017 21:24:49) ( ZTS MSVC14 (Visual C++ 2015) x64 )'. Just tried to query one of Wago PLCs and got answer nicely. |
and have you set php error level to be strict enough? from that picture it seems to me that you are using phpstorm and 'ReadHoldingRegistersRequest' class has not been correctly imported (gray background). It is probably not the reason for you error as for me it results |
Thank you very much for your help and fast response! I'll try what you've say. |
With this code:
I'm getting this error
The text was updated successfully, but these errors were encountered: