I want to connect raspberry pi (3B+) with arduino (Mega + ethernet shield) using ArduinoModbus library on arduino and Codesys on Raspberry Pi. The point is to make the arduino (slave) as I/O device while Raspberry (master) is a PLC. I have a problem that i cannot connect to raspberry (program in attachment, ModbusTry_V2). I have noticed that something happens on codesys side as you can see on pic_1 and then come back to proper config (pic_2). I can ping arduino from raspberry. All posts i have seen were about stuff after connecting to modbus master. On youtube i can see few projects about my topic, but arduino program is not attached or link is not valid anymore. According to used library yet, cause i have seen posts about this, after compilation there is left over 6000B of RAM for local variables isn't really sufficent for this purpose? I have also used other library (ModbusTry_V3 and is based on this one https://forge.codesys.com/forge/talk/Runtime/thread/0d8b6b9f04/), but again is not working. But with this one i can see sometimes one shots that modbus slave is working properly. PLC program attached only for modbusTry_v2.
Log in to post a comment.