System integration: How to design a PC-based test system
Motion controller and DAQ PC combine to produce high performance pipe-testing applications. System integrator Advanced Machine Automation used National Instruments LabVIEW, Microsoft Visual Basic, Delta Computer Systems RMCLink software, and other tools for the system.
Birmingham, AL, system integrator Advanced Machine Automation Inc. (AMA) was faced with a challenge when asked to develop the control system for a large-scale testing application. The apparatus was a pipe strength tester, installed by a manufacturer of rugged, flexible pipe that is used in offshore oil production. AMA found that by connecting a PC using ActiveX control to a motion controller, a test system developer can take advantage of powerful software packages such as Microsoft Visual Basic and National Instruments' LabVIEW to make the development of operator screens and test programs almost as easy as point-and-click.
In the system, a pipe made of synthetic material and steel mesh that is approximately 50 to 60 ft. long and 1.5 to 2 ft. in diameter is loaded vertically into a test fixture (Figure 1.). The testing consists of bending the top of the pipe to a given degree while simultaneously pulling on the bottom of the pipe. Two control axes and a number of reference axes needed to be managed in order to fulfill the customer's needs (See Figures 2 and 3). Along with the motion control, AMA also had to design and implement a user interface and data capture system that would be reliable and easy to install.
To control the pipe bending motion, AMA needed a motion controller with ability to execute complex instructions such as a sinusoidal motion function, and also the ability to control and synchronize the motion of multiple axes at the same time. The primary axis measured parameter is an angular position read by a flexible position transducer that is mounted in a stainless tube with a radius of three feet. The secondary axis is a pressure control axis providing a tension load on the bottom of the test pipe monitored by a load cell.
PC-based motion control
With very few discrete I/0 points needed for the application, the decision was made to forego the use of a PLC and instead control the motion from a PC located in the control room. To support this, the integrator needed some special software to interface the PC over Ethernet to the motion controller. Rather than develop this themselves, AMA's engineer looked for solutions that were already available. He found it in the RMC75 motion controller and RMCLink software package from Delta Computer Systems, Inc. of Battle Ground, Washington.
At the start of the pipe-testing project, the pipe manufacturer supplied AMA with its current test parameters. AMA was given an Microsoft Excel spreadsheet that contained all the data that needed to be sent to the motion controller to run the tests (positive and negative angle, max/min tension, number of repetitions). By building an interface using Microsoft Visual Basic for Applications (VBA) within Excel, AMA's customer was able to import his spreadsheets unchanged, and send the data directly to the motion controller.
VBA is an implementation of Microsoft's Visual Basic, an event-driven programming language and associated integrated development environment (IDE), which is built into most Microsoft Office applications. Unlike the full Visual Basic, VBA can normally only run code within a host application (in this case Microsoft Excel) rather than as a standalone application.
The motion controller and the PC were both given IP addresses on the local network, and RMCLink provided a library of motion controller-related ActiveX control functions. These were imported into the VBA project to allow the PC to send and receive data to and from the controller, and to issue commands to the controller over the Ethernet connection between the two.
"The actual data transfer was carried out by simple read and write commands," said Jason Woyak, AMA engineer. "These commands allowed the application to transmit either floating point or integer values seamlessly to the motion controller."
The write statements transferred medium-sized arrays containing the test parameters to the motion controller's variable table. In much the same way, the test sequence was started using a write statement directed to the controller's command area. The read statements were used to monitor program status and other process data that the
customer wished to observe.
Custom programming needed
In addition to transferring the test parameters into the motion controller, the customer also wanted to log the data that the tests produced. Because VBA does not support multi-threading, AMA's engineer was unable to accomplish this within the Excel application. Instead he wrote a Visual Basic Version 6.0 program that would work in the background to capture the data without interrupting any monitoring or transferring within the VBA program. The communication set-up for the Visual Basic program was identical to the VBA set-up.
A software program was also written to take advantage of plot manager software, provided with the motion controller, which enables the controller to capture plots during specific important test phases. The data logger constantly monitored the plot data from the controller, and recorded the data every time a new plot was completed.
The last element of the programming was an HMI application to visually display and monitor the test results on the PC screen. For this function, AMA's customer wanted a graphical development software package that could be used to rapidly and cost-effectively interface with measurement and control hardware, analyze data, share results, and distribute systems. They chose National Instruments' LabVIEW, running on a second attached PC (see Figure 3).
Since Delta's RMCLink software also allows a motion controller to function as a LabVIEW virtual instrument (VI) component, the LabVIEW project can be used to interact with any pertinent data register in the controller. Figure 4 shows a PC screen with the virtual instruments displaying operational parameters.
Initial tuning difficulty and troubleshooting
"The initial tuning of the system proved to be somewhat difficult," said Jason Woyak. "As part of the initial tuning process, we spent some time adjusting the PID loop gains in an attempt to smooth out the moves. We noticed a significant drift in the position axis, which was odd considering that the valve we were using had a 20% positive spool overlap. Any attempts to adjust for the drift using a null bias from the motion controller were futile.
"We thought that the problem could be that the cylinders were bypassing fluid across their pistons. After testing the cylinders with one of the ports sealed, we did find this to be the case. Upon repairing the cylinders and refining the tuning, we were able to see this on the Delta plots and achieve much smoother move profiles."
A delay in the delivery of the customer's test pipe left AMA no choice but to leave the job site without ever tuning the pressure axis. AMA's best option was to help the customer tune the pressure axis over the phone, after the test piece was delivered.
Figure 4. Operator interface screen built with LabVIEW virtual instruments.
When the end customer had installed the test pipe and began tuning the axis, he called AMA to say that he was stuck at this point. He was able to send plots from the motion controller showing AMA the current state of his PID loop, but his sine wave profile was flattening at the maximums and minimums of the wave. From these plots, AMA determined that he had not adjusted the settings to accommodate for the positive overlap on the valve's spool. After this setting was corrected, the profile followed the target correctly and optimally through the entire sine wave.
AMA found that using a programmable motion controller and the visual information from the motion controller's plot manager can simplify the implementation of such repetitive testing applications.
Delta Computer Systems , Battle Ground, WA, provides motion controllers for servo-hydraulic and servo-motor applications featuring fieldbus communications, Ethernet, PROFIBUS-DP, Modbus Plus, Serial and Digital I/O (25+ protocols). Advanced Machine Automation , Birmingham, AL is a design/build company dedicated to providing innovative solutions to your production line problems
- Edited by Renee Robbins, senior editor
Control Engineering News Desk
- Events & Awards
- Magazine Archives
- Oil & Gas Engineering
- Salary Survey
- Digital Reports
Annual Salary Survey
Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.
There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.
But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.
Read more: 2015 Salary Survey