Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus and shared variable performance in large application

Hi all,

 

I am preparing to work on an application which is going to reading from up to 500 Modbus input registers on a CompactRIO over Modbus Ethernet using the LVRT Modbus IO Server implementation.  I've put together some minor test VIs on the local network to test the Modbus connectivity and understand in the shared variable minding mechanism.

 

To save potential headaches in the future, do you all have any best programming/proejct management practices for using high channel count Modbus applications?  Has anyone done high channel count testing (similar to the link below) but for shared variables bound to a Modbus I/O Server?  Any caveats I should keep in mind?

 

Performance Benchmarks for Network Published Shared Variables

http://www.ni.com/tutorial/14675/en/

 

Thanks,

Chris

d2itechnologies.com

0 Kudos
Message 1 of 4
(5,627 Views)

Good day Chris,

 

In case you have LabVIEW 2012 or higher you can take a look at the “Supervisory Control and Data Acquisition Systemsample project. The architecture is meant for high channel count applications.

 

I hope this helps

 

Regards,

Alejandro C. | National Instruments
0 Kudos
Message 2 of 4
(5,589 Views)

If your application can deal with it I would recommend staying clear of the 'Networked Published' option.

 

When I started my Modbus development on cRIO....I left it enabled, and with ~100 shared variables on a 9074, the CPU was railing, and I saw a buffering behavior on the shared variables (which was not desirable in my application).

 

In my application I am using the old modbus library (as apposed to the new API) for cRIO to slave comms, the cRIO being the master.

I am also using the IOserver making the cRIO a slave to an external SCADA - and it passes essentially the same data arrays as I use on the modbus library for my local HMI [Not an NI product].....Which is two full Modbus frame writes (@ 120 words each, and about 60 words more for ~300 words outbound from the cRIO).

 

The IOserver slave was a recent addition and did not add much to the CPU load - although only 16 bytes is high speed, the balance of the total word package is at either 1 second or 3 seconds.

 

So, in my experince, the 'Networked Published' option adds significant CPU loading (on entery level cRIOs) YMMV.

I am huge fan of the shared variable engine (some at NI were pusing the CVT, and TCE etc...). However most of my shared variables are not the Networked Published variety (excepting local module channels) those have remained networked published for DSM (Distributed System Manager) use.

 

 

0 Kudos
Message 3 of 4
(5,535 Views)

If you have a static configuration, the modbus I/O server should work well for you I think (assuming you do as S1ack suggests and disable network publishing).

 

To hopefully clarify what its doing, the modbus I/O server is making data available via the shared variable API. In the process, it also makes it available over the network. The benchmarks you linked indicate network performance. What you want is probably local (since modbus is of course doing the networking for you).

 

0 Kudos
Message 4 of 4
(5,521 Views)