Using LabVIEW to Develop a PC-Based Control Panel and Software for a Static Test Machine
"With LabVIEW, a one-man company successfully executed the project in time. Development was reduced from at least six months to nearly 30 days, easing development effort by more than 80 percent."
- Sunil S. Gokhale,
S3 Embedded Systems
Designing and developing a user-friendly control panel and software for various control and testing operations.
Using NI LabVIEW software to implement all software requirements easily and quickly.
Sunil S. Gokhale - S3 Embedded Systems
Project and Company Background
For more than 10 years, S3 Embedded Systems, a one-man company, has developed electronic systems for one-off special-purpose machines, as well as software and hardware for control, automation, and test systems. Because most work is obtained by freelancing, a tool such as LabVIEW can make the difference in producing professional results independently, on time, and easily. LabVIEW can help turn a normal PC or programmable logic controller (PLC) CPU for various industrial machines and test systems (hydraulic presses, injection molding machines, or dynamic test machines) into programmable automation controllers.
Because we had previous experience with a specific company (we developed the electronics for a fatigue testing system), and because we develop LabVIEW applications, the company tasked us to develop a static testing machine (STM) application.
In principle, the theory of the STM is simple. It applies torque to a rubber/polymer coupling that is not allowed to rotate. Because of this constraint, the coupling deforms and an angular movement is generated proportional to the torque applied; the more torque, the greater the deformation. The extent of deformation is also a function of the elasticity/stiffness of the rubber part. In essence, this method of testing is used to determine the quality of the finished rubber coupling—the finished product. This is the objective of the load test. If the torque is increased beyond the rated value, a point is reached when the center metal hub separates from the rubber part and the coupling breaks.
The objective of the break test is to determine the maximum torque at which the coupling breaks. We also need to determine coupling life. To do so, the rubber coupling is subjected to continuous cycles of loading and unloading for a fixed number of cycles. If the coupling does not break during the cyclic test and does not deform beyond a predetermined limit, the rubber coupling is accepted and passed. This is the objective of the fatigue test.
The rubber coupling is mounted on a central shaft and a restraining plate is fixed around it on the mounting plate to prevent the coupling from rotating. An arm is attached to the central shaft for applying torque to the coupling. The end of the arm is attached to a hydraulic cylinder that applies a force as the cylinder extends, which in turn applies a torque to the rubber coupling. A servo potentiometer is mounted on the central shaft for measuring the deflection. A load cell mounted in line with the hydraulic cylinder measures the force applied. The force applied tangentially at the end of the arm, multiplied by the arm length, is the torque. Owing to mechanical design constraints, and to prevent fouling, swivel joints are attached to the end of the hydraulic cylinder and the arm. Due to this, the force applied by the hydraulic cylinder is not always tangential to the arm. The tangential force applied (hence, the torque) is a function of the angle of movement. The system must compensate for this. The signals from the load-cell transducer and potentiometer are connected to an S3 Embedded Systems data acquisition and control (DAC) module. Additionally, some of the DAC module I/O is wired between the PLC and PC to serve as an interface.
The PC communicates with the DAC module using an RS485 bus, which forms the physical layer of the protocol. The upper layer protocols are implemented using Modbus RTU. We used the NI Modbus RTU library to access the DAC module through LabVIEW. Since Modbus RTU communication is a master-slave protocol, data acquisition is based on the polling method. Before starting a test, data related to the rubber coupling is entered and stored in a master data file. Once the rubber coupling is mounted, the part is then selected from the master data file, which loads the part number, description, specification, and set torque. Set torque is the rated operational torque for which the rubber coupling was designed. On receiving a start command, the current angular position is noted and tared to calculate the angular movement or deflection. The forward motion of the hydraulic cylinder is then switched on, and the cylinder extends. This increases the torque the rubber coupling is subjected to. As the cylinder extends, the angle of deflection increases, and the torque has to be recalculated at each step, based on the current deflection, to compensate for the motion of the swivel joint.
During the forward motion, data is continually acquired, torque and arm speed are calculated, and data is stored in an array. You can control the forward motion either by the set torque the rubber coupling is subjected to or by the set deflection the part is subjected to. You do this using the control toggle switch on the front panel. Once the set torque or the set deflection is reached, the software issues a command to reverse the motion of the cylinder. As soon as the cylinder reaches the home position, motion is switched off. The table values for reporting are calculated, and the tables and graphs are displayed on the front panel. Since the table values of interest and acquired values will differ, the data needs to be interpolated, and only the required values are reported. The x-axis values for the table generation for display and reporting can be automatically calculated or manually entered on the front panel screen. Select this option by setting the table toggle switch on the front panel. Once the graphs and tables are displayed, reports are generated and either displayed or automatically saved based on the auto-save setting on the front panel. Also, the data related to the test is stored in a datalog file for future analysis. Depending on the set torque, set deflection, peak torque, and peak deflection, the graph scales are programmatically adjusted using property nodes to ensure proper display.
To analyze data previously logged and stored, an “analyze front panel” button is provided. You must provide the part number of interest and a date range to use this function. The program then searches the datalog file, filters records that meet the criteria, forms a table, and saves a report ready for printing.
Benefits of Using NI Products
LabVIEW is an extremely easy-to-use engineering tool for developing and deploying applications in the shortest possible time. It has a rich palette of functions to help solve most any kind of problem, while the alternatives are limited, purely functional, and not aesthetically pleasing.
For the STM application, LabVIEW is a boon. The front-panel controls helped us build a user-friendly control panel, and the block diagram wiring components and functions helped us easily build the application. Additionally, because of the NI India Planet NI small and medium enterprise (SME) benefit program, the special cost of LabVIEW was more than offset by the savings in effort required by the alternative approach. Lastly, and perhaps most importantly, one person independently developed the entire application. The alternatives would have required depending on outside programmers; developing and formulating specifications; performing project management functions, such as coordinating with stakeholders; keeping track of developer costs and travel schedules; and factoring in multiple risks. That is not the kind of project that a one-man company could have handled.
Professional Applications on a Small Budget
LabVIEW, with its libraries of customizable front-panel controls and graphical programming environment, is indispensable for engineers. It can help individuals and small companies with limited resources develop applications with a professional look and feel quickly and independently, meaning developers can focus resources on the application rather than the coding. Overall, with LabVIEW, a one-man company successfully executed the project well in time. With the STM, the development time was reduced from at least six months to nearly 30 days, easing development effort by more than 80 percent.
Explore the NI Developer Community
Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.
Who is National Instruments?
National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.