background
A client’s high-speed production application required rapid data transfer between Allen-Bradley controllers and Microsoft SQL Server, but the existing gateway architecture could not meet the timing requirements.
Challenge
The system integrator’s client needed a scalable solution for moving string-heavy User Defined Types (UDTs) from an Allen-Bradley PLC to a SQL database.
solution
RTA implemented the hardware-based RTConnect Historian to transform “chatty” individual tag requests into optimized fragmented reads, using custom JavaScript to parse and publish data to SQL in a single transaction.
Overview
A large, Allen-Bradley System Integrator needed to move high-volume, string-heavy data between an Allen-Bradley PLC and a SQL database fast enough to support a high-speed production application. Their existing architecture used LabVIEW software as the intermediary gateway, but performance didn’t meet the application’s timing requirements.
Real Time Automation worked with the integrator to implement an improved strategy using the RTConnect Historian connected to the production system Allen-Bradley PLCs using RTA’s low-level EtherNet/IP driver, delivering a consistent 2–4X improvement in data transfer performance without rewriting the Allen-Bradley PLC application logic or the SQL database.
Challenge
In high-volume Allen-Bradley environments, moving User Defined Types (UDTs) containing numerous strings often results in a “chatty” network. Using LabVIEW as the gateway, each String read or write was handled individually resulting in that less than optimized network.
The LabVIEW approach introduced two problems:
- High latency: SQL insert performance times ranged from 300 to 500 ms, depending on how much data was being moved.
- Excessive round-trip traffic: Individual reads and writes for each String element created unnecessary communication overhead between the PLC and the database.
For a high-speed application, this level of latency and variability created operational risk and limited scalability.
Solution
RTA analyzed the UDT structure and application logic and identified a more efficient communication strategy. By switching the Allen-Bradley communications model to tag fragmented reads and writes, and replacing the LabVIEW gateway software with the hardware-based RTConnect Historian, the system could request multiple String elements in a single transaction rather than one at a time.
Key elements of the solution included:
- RTConnect Historian for Allen-Bradley PLCs (1848ETC-HST): Chosen as the data transformation engine because it already supported the Allen-Bradley PLC driver, SQL integration and custom Javascript.
- Enhanced Allen-Bradley PLC driver: Updated to support custom logic and tag fragmented read/write behavior.
- Upgraded SQL publisher: Extended to support SQL queries in addition to inserts, enabling tighter application control.
- Custom JavaScript driver: Implemented to manage tag selection, data analysis, decision logic, and execution timing for SQL inserts and queries.
Using JavaScript allowed the integrator to retain existing application logic while achieving precise control over performance-critical decisions.
Results
Initial system tests showed:
- Typical SQL insert performance of 80 to 120 ms, compared to 300+ ms previously.
- Consistent performance, largely independent of data volume.
- No disruption to existing application logic, reducing deployment risk.
For a high-speed application, this level of latency and variability created operational risk and limited scalability.
| Metric | LabVIEW Gateway | RTConnect Solution | Improvement |
|---|---|---|---|
| Avg Transfer Time | 300-500 ms | 80-120mx | ~75% |
| Network Traffic | High (individual reads) | Low (tag fragmentaion) | Significantly reduced |
| Logic | Variable/Unpredictable | Consistent/Deterministic | Highly reliable |
The integrator approved deployment of the RTConnect PLC Historian hardware-based solution based on the demonstrated performance gains and architectural flexibility.
The RTA Advantage: Custom Capabilities, Standard Stability
To solve latency issues like this client faced, the integrators are traditionally forced to choose high-risk paths such as manually rewriting PLC code or ongoing PC updates and maintenance. RTA provided a stable, reliable third option.
The custom enhancements developed for this project are offered as configurable options for customers with similar requirements. This approach demonstrates how RTA meets unique requirements without modifying core source code and triggering extensive regression testing.
For the integrator, the result was faster data movement, lower latency, and a scalable path forward for high-speed PLC-to-database integration. Further, by offloading the data transformation to the RTConnect Historian for Allen-Bradley PLCs, the integrator can simply update the custom JavaScript without touching the PLC if the SQL table schema changes.
Need a solution for your challenge? Contact us:
Have questions about your application? Our Enginerds are available if you want to hop on a quick to discuss your performance issues. Let’s work together to improve your PLC to SQL latency.
