I want to connect s7-1200 (master) to Arduino(slave) by modbus RTU and read its Holding registers.
I connected arduino to Modbus poll software and it's worked! and when one sensor connected to arduino, this software display :
000643-Tx:02 03 00 00 00 02 C4 38
000644-Rx:02 03 04 00 00 00 00 C9 33
000646-Tx:02 03 00 00 00 02 C4 38
000647-Rx:02 03 04 00 11 00 00 99 36
000649-Tx:02 03 00 00 00 02 C4 38
000650-Rx:02 03 04 00 13 00 00 38 F6
00 , 11 , 13 are responses of sensor.
but when I connect PLC to arduino, I got this error : http://cld.persiangig.com/preview/ceUKFGTDtZ/master.jpg
where is the problem?
Tag_REQ is correct?
I should use word or Dword as DATA_PTR?
I connected arduino to Modbus poll software and it's worked! and when one sensor connected to arduino, this software display :
000643-Tx:02 03 00 00 00 02 C4 38
000644-Rx:02 03 04 00 00 00 00 C9 33
000646-Tx:02 03 00 00 00 02 C4 38
000647-Rx:02 03 04 00 11 00 00 99 36
000649-Tx:02 03 00 00 00 02 C4 38
000650-Rx:02 03 04 00 13 00 00 38 F6
00 , 11 , 13 are responses of sensor.
but when I connect PLC to arduino, I got this error : http://cld.persiangig.com/preview/ceUKFGTDtZ/master.jpg
where is the problem?
Tag_REQ is correct?
I should use word or Dword as DATA_PTR?