S7-1500 Modbus RTU Poll Interval

Hal9000

Member
Join Date
Jun 2010
Location
London
Posts
140
Hi all,

I'm using my 1500 PLC to communicate to two modbus slaves devices via RTU comms:

Comms settings being: 9600 8N1

Every now and then the modbus slave devices seems to hang up momentarily. The manufacturer states I should reduce my polling rate to 500ms to reduce the overhead on the slave device.

I'm using the standard Modbus_Com_Load block to parametrise the comms settings, but I don't see any poll rate adjustment in the DB?? Is this done somewhere else?

I carry out 3x read requests and 1x write request / slave. My code only sends the write pollss on exception.

Would adjusting the INCHAR_GAP parameter in the Modbus_Com_Load block give me the same effect as poll rate adjustment? It is by default set to 0ms, I have set it to 200ms and I can see the Tx Rx LEDs have slowed.

If anyone has any thoughts, Id be very grateful!!

Many thanks!
 
https://support.industry.siemens.com/tf//ww/en/posts/modbus-communication-polling-time-interval/226450?page=0&pageSize=10

"Your code controls the polling interval.
The interval is the duration between successive rising edges of the REQ input to the Modbus_Master block.
So you will need to setup a cycle in your code. Generate a rising edge on REQ, wait for BUSY to be set, then negate REQ, Then wait until DONE or ERROR and not BUSY, then repeat."

Adjusting the INCHAR_GAP will set the timing between individual characters in the Modbus packets.

Regards,
 
Hi Garry,

I've put a delay in between each poll and that works great. Interestingly if the interval time is too great then the slave device times out and revers the system to local control.

On one occasion today my communications cycle locked up after I re-initialised one of my DB's in the program. I tried to manually advance my indexer, but the only way I could kick start the comms again was to stop / start the cpu.

Is there a way I can reset comms in my program without having to stop / start the PLC?

Just so you are aware,I use multiple instances of Modbus_Master in my program and one instance of Modbus_Com_Load, the later which I call once at start-up.

Justin

Modbus_Master.PNG
 
MB master block Instance DB is connected with Comm load block.


If you have used also eneble input of FB640 for indexer, and own FB which have inside this MB_master block / FB640, this leads to that outputs are still on last state of call, if your FB is not anymore called.


I needed to reset all bits (busy signals) on startup and com init, because there was still busy signal coming from block which was not active anymore because en input was false.



I had some other problems if multiple FB640 blocks had en input on. Probably it was something of busy, error and done bits which had status of different modbus query as I maded multi instances.
 
Last edited:

Similar Topics

I inherited a system with the Micrologix 1500 talking to 8 VFDs using Modbus RTU protocol. One of the VFDs was replaced with a Toshiba VF AS1...
Replies
1
Views
1,206
Does anyone have an example program using control techniques EN drives?RSLogix 500 ver 6.3, to be put in the upload section on here. I’m wanting...
Replies
2
Views
1,365
Hi, Need to communicate Allen Bradley Micrologix 1764 LRP with my Laptop to read data (coil & holding registers) via modbus rtu protocol using...
Replies
5
Views
5,417
Does the Micrologix 1500 can communicate with the device with MODBUS RTU? The device is a temperature transmitter. The processor is Ser. C Rev. D...
Replies
0
Views
2,660
We have an old modicon bit of kit that receives 48 registers (24 reals) from a PC system via modbus TCP. We're looking to upgrade the PLC to...
Replies
3
Views
1,966
Back
Top Bottom