Case Studies: A Dynamic Duo
Advanced Machine Automation Inc. (AMA, Birmingham, AL), a system integrator specializing in custom development projects, implemented the RMC 70 motion controller from Delta Computer Systems Inc. (Vancouver, WA) in a testing application in the pipe manufacturing industry. The application was a pipe strength tester, installed by a manufacturer of rugged, flexible pipe that is used in offshore oil production.
In the system, a pipe made of synthetic material and steel mesh approximately 50 feet to 60 feet long and approximately 1.5 feet to 2 feet in diameter is loaded vertically into a test fixture. 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 are managed. 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.
The pipe bending motion was achieved with the Delta RMC’s sine move command. The primary axis was an angular position given by a flexible position transducer mounted in a stainless steel tube with a radius of 3 feet. The secondary axis is a pressure control axis providing a tension load on the bottom of the test pipe given by a load cell.
With very few discrete I/0 points needed for the application, the decision was made to forego the use of a programmable logic controller (PLC) and instead control the Delta RMC from a PC located in the control room. Delta’s RMCLink software package proved to be the best tool to use for communication with the motion controller.
Creating the InterfaceRMCLink software enables direct communication with any of Delta’s RMC family of motion controllers from numerous programming languages and applications that run on PCs. RMCLink software is run via Ethernet or RS 232 communications between the motion controller and the PC, and provides full functionality to read and write registers, read bits and issue commands to the controller. The software comes with sample projects to help users get up and running quickly, and the help facility provided with RMCLink includes detailed procedure tutorials and numerous code snippets.
At the start of the pipe-testing project, the pipe manufacturer supplied AMA with its current test parameters. AMA was given an Excel spreadsheet that contained all data that needed to be sent to the Delta motion controller to run the tests: positive and negative angle, maximum/minimum tension and number of repetitions. By building an interface using Microsoft Visual Basic for Applications (VBA) within Excel, AMA was able to import the spreadsheets unchanged, and send data directly to the RMC.
VBA is an implementation of Microsoft’s Visual Basic, an event-driven programming language and associated integrated development environment (IDE) that is built into most Microsoft Office applications. By embedding the VBA IDE into applications, developers can build custom solutions using Microsoft Visual Basic. Unlike the full Visual Basic, VBA can normally only run code within a host application rather than as a stand-alone application. Using Delta’s RMCLink coupled with VBA, communicating with the Delta controller from within Excel was relatively easy.
The motion controller and the PC were both given IP addresses on the local network. In order for the RMCLink commands to work in its VBA program, AMA’s engineer, Jason Woyak, first needed to import the RMC library file into the project. “The installation of the RMCLink software made this library available, easily configured for our application,” says Woyak. “An RMC object was then created within the VBA code, which would allow the interface to send and receive data to and from the controller.
“The actual data transfer was carried out by simple read and write commands,” says Woyak. “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 Delta 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.
Data Logging and MonitoringIn addition to transferring the test parameters into the Delta RMC, test data also needed to be logged. Because VBA does not support multithreading, AMA’s engineer was unable to accomplish this within the Excel application. Instead Woyak 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 setup for the Visual Basic program was identical to the VBA setup.
A routine within the RMC was written to capture plots during important test phases. The data logger constantly monitored plot data from the Delta RMC, and recorded data every time a new plot was completed.
The last element of the programming was a LabVIEW application that would allow the visual display and monitoring of test results. Using LabVIEW, a graphical development software package from National Instruments (Austin, TX), engineers can interface with measurement and control hardware, analyze data, share results and distribute systems.
The installation of RMCLink using the Delta’s RMCLink COM component interface allows the RMC to function as a LabVIEW virtual instrument (VI) component. After installing RMCLink, the operator needs to import the RMC type VIs into the LabVIEW application. By doing this the LabVIEW project can then be used to interact with any pertinent data register in the controller.
Smoothing Out Wrinkles“The initial tuning of the system proved to be somewhat difficult,” says Woyak. “After running through the tuning wizard provided in Delta’s RMC tools, we spent some time adjusting the PID [proportional integral derivative controller] 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 delta 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. After repairing the cylinders and refining the tuning, we were able to 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. Soon after, the customer had installed the test pipe and began tuning the axis, but got stuck.
The customer was able to send plots from the Delta controller showing AMA the current state of the PID loop. The sine wave profile was flattening at the maximums and minimums of the wave. From these plots AMA could determine that its customer had not adjusted the settings to accommodate for the positive overlap on the valve’s spool. After correcting this setting, the profile followed the target correctly through the entire sine wave.
Using a programmable motion controller can simplify the implementation of repetitive testing applications. By connecting a PC to the motion controller, the test system developer can take advantage of software packages, such as LabVIEW and Visual Basic, that ease the development of operator screens and test programs. In this case, Delta’s RMCLink software made it easy to connect the PC and motion controller.
Delta Computer Systems