Control and data acquisition system for rotary compressor

The rotary compressor (crimping machine) is a machine designed for making hollow forgings. The rotary compressor is a prototype device designed and built at the Technical University of Lublin. The compressor is dedicated to perform laboratory tests related to the hollow forgings of various shapes using different materials. Since the rotary compressor is an experimental device, there is no control and acquisition data system available. The article presents the concept and the capabilities of the computer control and data acquisition system supporting rotary compressing process. The main task of software system is acquisition of force and kinetic parameters related to the analysed process of the rotary forging compression. The software allows the user to declare the course of the forming forgings. This system allows current recording and analysis of four physical values: feed rate (speed of working head movement), hydraulic oil pressure at inlet and outlet of hydraulic cylinder and the torque of engine. Application functions can be divided into three groups: the configuration of the pressing process, the acquisition and analysis of data from the pressing process and the recording and presentation of stored results. The article contains a detailed description about hardware and software implementation of mentioned functions.


Introduction
Designing data acquisition systems for experimental devices is a complex task.The difficulties are introduced by an incomplete set of information about the functioning of the device, the course of the process under investigation, or an imprecise description of the expectations of end users of the device.For this reason, the practical implementation of the data acquisition and control system is a multiphase process.In the process of developing the system one can distinguish the following stages [1]: -feasibility study (concept exploration), -decomposition and definition (concept of operations, system requirements, high level design, detailed design), -implementation process (hardware and software development, field installation), -integration and definition (device testing, subsystem verification, system verification, system validation), -operations and maintenance, -changes and upgrades.
Depending on the complexity of the process under study, the number of measurement points and the financial means available, data acquisition and control systems vary widely.It is possible to build several channel information systems based on a single platform Raspberry Pi [2,3,4].The advantages of such systems are low manufacturing costs and an open software platform.At the opposite extreme are highly complex systems requiring high-speed operation requiring programming of FPGA embedded systems [5,6,7].A particular group of measurement systems are systems dedicated to the analysis of particle behaviour or cosmic radiation [8,9].In their case, it is often a problem to develop a sensor capable of recording the desired values.A wide range are universal systems adapted to the study of a particular phenomenon.In such cases, an often used environment for programming is LabVIEW (National Instruments) [10,11,12,13].This article presents the original measurement system dedicated to collecting information from an experimental rotary crimping machine.The system is based on the LabVIEW graphical programming environment.

Rotary crimping machine
Hollow shafts and axles are used, inter alia, in drive systems of machinery, equipment and vehicles.The great popularity of hollow elements is primarily due to their comparable strength properties relative to full equivalents (mainly for bending and twisting loads), while their mass is significantly reduced.Currently the main recipients of the hollow elements are the automotive and aerospace industries [14].For the purposes of the research, the construction of a forge assembly for rotary crimping, further called the rotary crimping machine, was developed.The designed and constructed machine had a segment structure and consisted of ten major sets [15].Due to the originality of the study, there was no ready-made measurement system that could be used in such a device (Figure 1).

Fig. 1. The view of rotary compressor device with control panel
The device was experimental and subject to current modifications.Following an analysis of the way of its functioning, the physical quantities critical for the crimping process were determined.The design and construction of the measuring system included four parameters: -feed (linear displacement of pistons in hydraulic cylinders); -oil pressure in the hydraulic cylinder at the inlet and outlet of the hydraulic power supply; -torque of the crimping machine's motor; -critical value of the offset at which the cylinder feed should end.

System requirements
In the analysed case, the measurement system did not have to record all the possible process parameters.From the user's point of view, the behaviour of the electrical and hydraulic equipment is insignificant.It is not essential to measure such parameters as operating voltage, current value, the power of the device, or the time of switching contacts.The accumulated amount of information about the electrical parameters would rather describe the operation of the crimping machine's drive system rather than the crimping process itself.Redundant data on electrical parameters could slow down the acquisition of the remaining values and make it difficult to search the values needed for analysis.
The main parameters characterising the course of the crimping process are the displacement value of the actuator piston, the crankcase torque value and the pressure in the cylinders of the actuators.In terms of time constraints, two restrictions were specified.The measurement process series can reach a maximum of 20 seconds.All measuring channels at this time are to sample parameters at speeds of at least 100 measurements per second.At the same time, it should be noted that in the case of applicable sensors, each of them will have a different output.The requirements for the measuring system are shown in Table 1.

Hardware layer
The block diagram of the control and data acquisition circuits is shown in Figure 2. In the data collection part, the information flow is unidirectional (sensors, measurement cards, personal computer).The record is maintained for the duration of the crimping process by the declared cycle length (default 20 seconds).In the part responsible for automatic control of the device the PLC is programmed once.The program is implemented in the loop throughout the device.Control panel initialisation functions are as follows: main engine start-up, pump start-up, tool feed, tool feed rate control, tool off, system shutdown when tool position limit is exceeded, emergency shutdown of the entire system.The selected Novotechnik TS 50 displacement transducer performs a direct displacement measurement.The transmitter housing is mounted to a fixed mechanical element.The transducer bar is attached to the moving piston of the pressure cylinder.Along the entire length of the sensor is mounted a resistance path.Thanks to this potentiometer it is possible to determine the position based on the ratio of the resistance corresponding to the position of the slider and the resistance of the whole path.Figure 3 shows the TS 50 after mounting on a test bench.

Fig. 4. Wika A-10 sensor in laboratory conditions and after installation
The Wika A-10 pressure transmitter is dedicated to general industrial applications.It is compact and offers the accuracy required in this application.Because the user can select 0.25% or 0.5% nonlinearity, the one ensuring a higher accuracy of the measurement was selected.Typical applications include machines, machine tools, measuring and control technology, hydraulics and pneumatics, pumps and compressors.This range of applications perfectly matches the requirements of this project.Figure 4 shows the A 10 converter in laboratory conditions and after mounting on a test bench.
The BCM 1811 torque converter measures the torque transmitted by the rotating drive shaft.Throughout the BCM 1811 range, it is possible to measure torque from 5 to 150000 Nm at half-percent accuracy over the whole measuring scale.The output signal is of a frequency nature.There are transducer implementations coupled to a speed sensor.Figure 5 shows the BCM 1181 in laboratory conditions and after mounting on a test bench.

Fig. 5. BCM 1181 sensor in laboratory conditions and after installation
The National Instruments USB-6009 measurement card can measure and generate both analogue and digital signals.It is shown in Figure 6.The card is equipped with 8 analogue inputs with a resolution of 11 bits to measure voltages ranging from -10V to 10V with respect to the ground terminal.It is possible to programmatically switch the voltage measurement method and connect the inputs in pairs to the 12 bit inputs.The card has two independent voltage sources with a resolution of 12 bits, generating variable voltages of any shape ranging from 0V to 5V.They were protected against overload by an internal 50Ω resistor connected in a series.The maximum sampling rate of analogue signals is 10 kS/s.The digital part of the card contains 12 digital connectors in two ports, both as input and output, two voltage sources of +2.5V and 5V, and ground output.The card is also equipped with a 12-bit counter.

Fig. 7. Programmable Logic Controller EASY822-DC-TCX with MFD display unit
As previously mentioned, the controllable range of the control is governed by functions such as starting the motors, starting the pump drive, starting the tool feed, controlling the tool feed rate, moving the tool off, or shutting down the entire system.The control algorithm is performed physically using a Moeller EASY822-DC-TCX PLC.The EASY822-DC-TCX controller is capable of handling 12 digital inputs, 4 analogue configurations, 8 binary outputs.In order to enable the user to monitor the execution state of the program, the system is enriched with an MFD-80-B multifunction display (Figure 7).

Software layer
The data acquisition and control system is a hybrid.The EASY822-DC-TCX PLC controller is responsible for controlling the crimping machine.The NI-USB 6008 card is responsible for the measurement process.

Control system
The functions of the crimping machine control system with a PLC controller described in the previous section are combinatorial and sequential functions forced by the state of the input variables declared by the user in the panel of Figure 1.Four possible PLC programming methods have been selected for ladder diagram programming.This is a natural way of programming control systems in the relay contactor systems.The control of such components of the crimping machine as motors and valves is perfectly reproducible by means of a ladder diagram.The ladder language is so flexible that it can be used even for programming alarm systems [16,17].The control program was developed in the "easySoft-Pro" V6.92 (Eaton Industries GmBH) graphical environment.

Data acquisition system
The data acquisition system corresponds to the NI-USB 6008 measurement card system with sensors and software.The block structure of the components of the system is shown in Figure 2.
Data acquisition software has been implemented in a graphical development environment dedicated to the LabVIEW Professional Development System (2015, Service Pack 1, ver.15.0.1, 64 bit, National Instruments).Figure 9 shows a scheme of a program algorithm that performs the functions listed in Chapter 2. The algorithm shows the interrelations of the program blocks for use by the end user.It describes possible action scenarios that can be initiated by the user.
The algorithm is based on the architecture of the state machine, so that from the user's point of view it is possible to go straight to the selected range of activities.The only exception to this rule is the mandatory declaration of the disk directory where the hardware settings and measurement results will be stored.Without this initial step, it is not possible to call other procedures.At any time, you can return to these settings and modify them.
All procedures supported by the measurement software can be divided into three groups: -configuration operations, -activities related to system component testing and measurement, -presentation of results and operations on results files.
In the first, so-called configuration group of operations, there is a mandatory declaration of location on the disk space to save the configuration settings and the location of the measurement files.The configuration files store information about the correction factor of the card, data on where to save the files with the results, the duration of the measurement, or how to trigger the measurement series.
The second group of procedures refers to the operation of the measurement card.It has the ability to test card operation (physical operation of each channel).The key element is the recording of measurement data.It is possible to manually trigger the measurement procedure.It is more convenient, however, to initiate the measurement procedure after the declared travel displacement or torque is declared.Both of these stages should be preceded by a declaration of the maximum duration of the measurement series.
The third group of procedures supports the presentation and conversion operations.Immediately after a series of measurements, the results are gathered from the file in the place indicated by the user.The program gives you the opportunity to view them as a time chart.This means that displacement time graphs, two pressure graphs and torque are displayed.It is also possible to access results in the form of numbers corresponding to the values read from the sensors.Using converters built into the program, it is possible to convert a disk file into a spreadsheet format.Conversion to *.ods, *.xls, and *.xlsx formats was validated.
The measurement software works with the experimental crimping system.Its driving elements are high power electric motors, while the processed elements are metal parts, heated to temperatures above 1000°C.For this reason, after launching, the program presents a dialog box in which the user is informed about the need to read the instruction manual (Fig. 10).

Fig. 10. Welcome window with a warning message
As soon as the program is started, the "Default Directory Settings" window (Figure 11, Figure 9) is displayed each time.You are asked to select two directories for the measurement files (*.lvm) and files with results converted to the spreadsheet format (*.xls).

Fig. 11. Window for declaration of file directory location
Selecting the "Card and Measurement Settings" button (Figure 10) displays the "DAQ Setup" window (Figure 12, Figure 9).The left part of the panel is used to declare the settings, the right part is a control displaying the values that will be applied after selecting the "Save changes" button.

Fig. 12. DAQ setup window
The frequency of sampling of signals from individual channels is determined by the capabilities of the measurement card.In the current configuration it is possible to define a sampling frequency in the range of 1000 to 5000 samples per second (Fig. 12).Each channel is sampled at the same frequency.

Fig. 13. Sensors setup window
By selecting the "Sensor settings" button (Figure 10), the "Settings" window will be displayed (Figure 13, Figure 9).The five data ranges concern five sensors that can be connected to inputs 1-5 of the measuring system.
Selecting the "Functional Test" button (Figure 10) initiates the "DAQ Card Test" window.The system performs two tests: communication with the measuring card and the presence of sensors.

Fig. 14. Sensors and DAQ test window
The message "No connection to the data acquisition card" may suggest the following card issues: -another device connected to the USB port (not necessarily a measuring board), -another measurement card connected (a different Dev than the one selected), -incorrectly declared sampling frequency, -problems with the USB cable connection.The lack of co-operation of the sensors with the system may result from: -confusion of sensor inputs (position sensor connected instead of pressure sensor and vice versa); -bad electrical connection of the sensors (unplugged plug, loose contacts, broken/fractured wire); -connection of a device not intended for the system (another similar, but not hardware-compatible sensor), -physical damage to the sensor (short circuit, open, malfunction).The "Active" and "Detected" signals signal only communication with the expected data card channels in the expected voltage ranges.They do not guarantee a correct measurement because it depends on the sensor settings being run as described above.
The transition to conducting measurements is only useful after: -declaring a place to record results, -declaring how the card works, -choosing how to start the measurement, -entering sensor parameters.The "Measurement" window (Figure 15) is displayed after selecting the "Measurement" button (Figure 10).If automatic triggering is declared, the "Measurement Settings" field indicates that the procedure is ready to run.If you choose to manually start the measurement, the system is waiting for the "Start" button to be pressed.Successful completion of the measurement procedure depends on the time elapsed since the initiation of the procedure and is signalled by the status bar.

Fig. 15. Data acquisition window
In the data collection and presentation system there is no immediate relationship between the value recorded and the time presented.Multiple measurement series are possible and results may be reviewed at another time or place.Loading of the presented data from the file is initiated by the button "Displaying results" (Figure 16).The result is a dialogue box that allows you to select a file.For a file to be correctly interpreted, it must be a result file of the measurement system, i.e. a file with an extension of *.lvm.It contains undistorted measurement data which, after rescaling, are presented in graphs and in a table (Figure 16).In the case shown in Figure 16, the upper timeline contains data from two pressure sensors, the lower passage -data from the displacement and torque sensors.

Fig. 16. Data presentation window
Conversion to a spreadsheet is possible by selecting the "Save as Datasheet" button located at the bottom of the window (Figure 16).As a result, a dialog box is displayed allowing you to choose where to save the file.The saved file is a text file of the *.tsv type.An effective record of the file is signalled by the filled "Datasheet location" field.
The LabVIEW Professional Development System programming environment provides tools for developing applications.One such tool is the ability to browse the structure of programs and subroutines (Figure 17).Overview of the hierarchy of two levels of data acquisition system subroutines shows that the previously described functions are implemented by one master program, 6 original subprograms, and 7 subprograms in the LabVIEW package.Further tracking of the structure shows the use of dozens of functions included in the package associated with the subroutines used.

Practical test results
The data acquisition and control system is used during the process of rotating hollow rotary hollows in laboratory conditions with the use of real materials.Practical research involved the development of hollow forgings from tubular blanks.An example data set obtained from the data acquisition system is shown in Figure 18 (force calculated on the basis of recorded pressure and torque).As part of the research work on the crimping process outside of data recording, time and power characteristics based on FEM simulation were determined.On the basis of the recorded data and experimental research, differences in maximum forces and moments can be observed, as well as in their distribution over time.Experimenters find the reason for the discrepancy in terms of the difference between the actual thermal conditions and the ones taken into account [14].

Conclusions
The constructed and practically tested computer control and data acquisition system of the rotary crimping machine allows for the following conclusions to be drawn: -it is possible to build a hybrid control and data collection system with the software included with the controllers and measurement cards; -despite its simplicity, the system provides experimenters with all the data; -during the development of the system, all stages of the professional design of data acquisition systems were involuntarily introduced [1]; -the ability to improve the functionality of the system was enhanced by introducing additional features, such as storing system settings (cards, sensors, triggers) based on the user's login name.

Table 1 .
Requirements for a data acquisition system.measuring channel: 100 Hz Data file format: compatible with csv, tsv (for Notepad, Excel, Open/Libre Office)

Fig. 2 .
Fig. 2. A schematic diagram of the connection of the control and data acquisition system with the rotary crimping machine.

Fig. 17 .
Fig. 17.The hierarchy of system components

Fig. 18 .
Fig. 18.The course of force (a) and torque (b) as a function of time (v -tool movement speed)[14]

Fig. 19 .
Fig. 19.The course of as a function of time: (a) -determined by the FEM method; (b) -experimental data[14]