connecting s7-1200 plc to Arduino by Modbus RTU

smsebnaa

Member
Join Date
Nov 2014
Location
tehran
Posts
32
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 have never tried anything like that and I don't know modbus.

But I assume there is documentation for the block (try clicking on the block and pressing F1) and that should give you details about the status / error.
 
You need to determine what the error is to fix it.

I assume that when you have the 'error' bit that the 'status' gives details about what the actual error is.

What is your error? Does the block have documentation that lists all of the errors?
 
You need to determine what the error is to fix it.

I assume that when you have the 'error' bit that the 'status' gives details about what the actual error is.

What is your error? Does the block have documentation that lists all of the errors?
therer is not error but I can not received any response from slave! How do I speed down the modbus? I think this is very faster than slave.
 
when i use "P#DB3.DBX0.0 BYTE 2" at DATA_PTR, i must have data block that has 1 word data or seperately bytes? because I want to read one holding register.
 

Similar Topics

Hello all. When I try to connect to a S7-1200 PLC (Tia Portal v17) which has a CP 1243-1 module that is connected to my clients network I get...
Replies
7
Views
1,511
Hi All, I have a closed loop stepper motor (Nanotec make), https://en.nanotec.com/products/2512-pd4-e601l42-e-65-4. This uses MODBUS TCP for...
Replies
4
Views
3,864
Hi there I am new with this thing and i don't know how to connect Allen Bradley Micrologix 1200 PLC to Raspberry Pi using USB to RS485 in NodeRED...
Replies
3
Views
2,275
Hello all, I'm working with an s7-1200 and a stepper motor in Tia portal v17. This stepper motor is an SMD23E2 and I am attempting to connect...
Replies
19
Views
2,850
Hello, I have a MicroLogix 1200 controller that I'm trying to get to communicate with a PV 800 (CAT 2711R-T4T). This mostly likely means that I...
Replies
3
Views
2,496
Back
Top Bottom