As mentioned before, this project has two major purposes: the development of the software to be delivered to the client and the development of internal tools to help along the fabrication of the cells. For each one of these purposes, several objectives to be accomplished are defined. These are listed below:
Goals to accomplish for the client:
1. Develop software for the PLCs that must be capable to control all the position actuators placed around the mirrors. This software is divided into two blocks:
a. Warping Harness. In charge of reshaping the mirrors to compensate static errors.
b. Positioning stage. Used to place the mirrors within the telescope.
2. Develop a mounting errors proof software. If any of the mirrors’ actuators is not set up properly, the software must be able to detect it and report it to prevent dangerous actions or erroneous movements.
Goals to accomplish for the company:
3. Monitor real time data provided by force, torque and position sensors to test the performance of the mechanical components.
4. Set a development environment able to automatically throw software tests whenever a new feature is added and deploy the new code if tests are successful or notice the developers the errors occurred.
5. Develop a HMI to ensure the proper positioning of the mirrors over the cells. This HMI must display the measures of thirty-two load cells, force sensors, placed around the cell structure in real time. In addition, the software must be able to tare each load cell individually.
2.1. Requirements and specifications
In this section the project requirements would be described (see Table 1) and also the specifications that the software developed must accomplish (see Table 2).
Project requirements that must be fulfilled:
Table 1.- Project requirements
# Requirements
1 The position actuators must be able to be moved synchronously.
2 Mounting errors must be automatically detected and reported by the software.
3 Unit Tests must be developed for the software, and it needs to pass all of them.
4 Acquire real time data from position, force and torque sensors.
Table 2 shows several specifications to the requirements described in Table 1
Table 2.- Project specifications
2.2. Methods and procedures
The software development process started in 2020. However, the hardware was not going to arrive until early 2021. So that, the software was started to being developed in a simulation environment that would behave like a PLC. In this scenario, there were mainly two tasks that could be started without the electronics: HMI and a Finite State Machine (FSM).
In one hand, the HMI is needed for the ELT technicians to set the position of the mirrors M2 and M3. The movement orders are sent from the HMI to the PLCs controlling the actuators via telemetries which contain the information about the movement ordered. In the other hand, the purpose of the FSM is to model the behavior of the position actuators, for example, if they are still, moving or if some error was detected and the movement had to stop before expected. An FSM pattern is really handy for this task, because we can control both the global state of the support cells and the state of each actuator. Below, the design of the FSM can be seen.
# Specifications
1.1 The position actuators must be able to be moved with a precision of micrometers.
1.2 The position actuators shall be able to move independently.
1.3 The position actuators must finish the movement at the same time.
2.1 If the displacement direction of any actuator is erroneous due to improper mounting, it must be detected and reported.
2.2 If any actuator is not able to finish its movement before 20s, the error must be detected and reported.
2.3 If the position of the actuator exceeds the +/-300N limit, it must be detected and reported.
4.1 The data flow needs to be controlled by the user who is monitoring it, that means it can be stopped, or played at any time.
4.2 The data must be able to be stored in a document at any time.
4.3 Data displayed must not have a greater delay than 1.5s.
The project is developed under the framework of the software department at SENER Aeroespacial. To begin with the development process, the first step was to start reading the Beckhoff’s documentation [5]. This would provide the base knowledge needed to start working with their PLCs and being familiarized with the Structured Text language.
Then, follow the same procedure with the documentation of each device and sensor used along this project provided by their respective manufacturers. For the Heidenhain’s EIB741[6] and the HBM’s ClipX [7], the company provided few sample programs written in C/C++ of some simple use cases. They could be used as a starting point to develop the project’s software. Next, the real-time sensor’s monitoring web application could be developed.
For unit-testing purposes, it was needed to understand the TwinCAT3 ecosystem and its TcUnit framework. Fortunately, the TcUnit organization provides online documentation [8]
of its framework and also guided programming examples. This would give enough background to start developing the unit-tests for the project.
Developing unit-tests first gave enough background knowledge to start developing the main software, also carried out in the TwinCAT3 environment and using the Structured Text language. Finally, in order to develop HMI for the PLCs software, it was needed to understand the TwinCAT3 HMI tool [9], and also the TwinCAT3 Scope View [10]. Beckhoff also provides an extensive documentation for both of them.