Rockwell Modbus Client AOI 2.2

Lovell

Lifetime Supporting Member
Join Date
Feb 2013
Location
Saskatchewan, Canada
Posts
120
Hardware: CompactLogix L36ERM FW ver:30

I am working on a project where I need to read 25 consecutive holding registers in about 16 different locations. I am using the Rockwell Modbus TCP AOI. It only provides 5 possible transactions. I have it working.

Now I decide to hack the AOI to increase the number of transactions to meet my needs. I increased to 35 transactions changing array sizes where applicable. I connected it to my data source and it is working except for overlap and overload alarms. I adjusted the polling rate down to where it would not alarm (1200ms). So I am reading 400 integers in different locations (groups of 25). It is quite unstable and I had to add some reset logic which is working but it seems to error when the processor gets busy (like an online edit) and sometimes it seems like it is in a reset loop.

I did consider using multiple AOI's to meet my need but the server has a number of connections limitation.


My question:

Is there a better way or other logic I could use to read multiple modbus holding registers over TCP?
 
Adding more AOIs pointing to the same server is the best solution, but most of small devices have a connection limits.
The way AOI is functioning, is that all transactions are executed sequentially using the same read/write socket. Adding transactions will increase time proportionally.
If you take a look at the performance data in the manual, it clearly states what you can expect with 1, 2, 3, 4 or 5 transactions.
You can extrapolate this timing data to 16 transactions and select polling rates accordingly. I would expect that you need to set it to 3-5 seconds to get all 16. 35 transactions will double that estimate.

Another method that we tried is to change data in each transaction dynamically:
Once transaction is done, you can disable it, change addresses and enable again. In this case no need to change number of transactions. But again, it will be slow, within the same 3-5 seconds pre 16 transactions that I would guess...
 
Thanks Contr Conn,

I have adjusted my polling rate to 1850ms for all 16 transactions and it seems stable. I switched from continuous task to periodic of 10ms and it becomes unstable. I decreased the periodic (increased scan rate) to 2.5ms and it is stable again. It seems to take a lot of processor.

A question, when you change data in each transaction dynamically, what did you use to detect that the transaction is done?
 
You should not go faster than 10ms because you will overload your processor. Basically it will not have time to do anything else.
Instead, you need to keep it AT 10ms and change polling rate to about 8 seconds. If this is not acceptable then you must use a dedicated Modbus card.

Each transaction has .TransComplete bit that you can monitor.

In theory, you can re-write this code to cut out all overhead for all other commands and data types, as well as use a dedicated socket for each transaction. But this is completely new task and it will be cheaper just to buy a dedicated card.
 
Thanks again Contr Conn,

I have set my periodic task to 10ms as you suggested. I had to reducing the polling to 5000ms for the 16 transactions and I achieved stability. I spent more time on this than purchasing a dedicated card (one of the seven deadly sins?), but I have learned a lot that I can apply to the future and that has value.

I appreciate your input and thoughts.:)
 
Just if you are not aware - there is a newer version 2.03 posted recently.
I don't think it will help you with performance.
Based on release notes it adds HMI displays and adds minor logic changes.
 
I'm running 4 messages(~400bytes) at 5ms on an L85E and they seem to run okay. The biggest problem I had was with the server not updating at the same time therefore getting partial results before making a decision. I have solved that by monitoring results from every message before making a decision with the data. But doing this slows down the maximum rate that I'm able to update. Also I had to modify the AOI to allow for faster rates and I'm scanning the Modbus AOIs at 1ms.
 

Similar Topics

I am trying to connect to a Chiller through Modbus TCP that has been setup as a Modbus slave and I see the Rockwell AOI and it looks pretty...
Replies
7
Views
410
Good Afternoon , I have a project coming up for a labeler and a CompactLogix PLC . The communication for this labeler is Modbus / TCP ...
Replies
1
Views
2,413
I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
239
Hi all. This is a very specific issue. My first time with a Modbus ProSoft. Customer setup doesn't make any sense but we're stuck with it...
Replies
8
Views
397
Hello, I am trying the AOI provided by Rockwell to read Modbus TCP, the version is 2.04 The connection looks good to the modbus server. I...
Replies
4
Views
687
Back
Top Bottom