A Low-Cost System for Remote Access and Control of Automation Equipment (2)
2021/5/6 21:19:19 人气:
2. Materials and Methods
This section begins with an overview of the system in the form of a block diagram and an operation flflowchart. Following this, information about the system components and their integration is presented in detail. 2.1. Overview of System Figure 1 illustrates a block diagram of the remote laboratory system. A single PLC module (Schneider Compact PLC TM221CE24T [22]) is linked to two hardware equipment: a forward/reverse conveyor system (experiment 1) and a Festo sorting machine (experiment 2). In the original experimental setup, a 24-way Centronics cable directly connected the PLC module to one of the hardware equipment. The cable had to be manually transferred between the hardware equipment. This was subsequently replaced by an intermediate micro-controller that controls the switching between the two hardware. The PLC module, micro-controller, and camera are always connected to a laboratory computer via USB cables. The laboratory computer has the software for programming the PLC module (SoMachine Basic). A remote user can connect to the laboratory computer via a remote desktop connection software to program the PLC module and select the hardware equipment. The PLC modules are generic and shared between multiple courses and classes on campus (Figure 2). Due to constraints such as limited availability of PLC modules and shared learning spaces, the design utilises a single PLC module to control multiple hardware. The micro-controller serves as a secondary control device to power on/off the hardware and disable the hardware if there is a malfunction on the PLC module. Figures 3 and 4 show the hardware to be connected to the PLC module via the micro-controller.Machines 2021, 9, 138 4 of 18
Figure 1. Block diagram of the remote laboratory system.
Figure 2. Schneider TM221CE24T PLC module.
Figure 3. Experiment 1 forward/reverse conveyor system.
A simplifified flflowchart illustrating the procedure for operating the remote laboratory system is shown in Figure 5. Users are required to book time slots for using the system viaMachines 2021, 9, 138 5 of 18 a remote lab access schedule online document (Figure 6). When it is a user’s turn to use the system, they fifirst open the remote access software on their computer. Next, they connect to the laboratory computer via a username and password. Following this, they need to open the micro-controller software (Remote Lab, refer to Section 3.1) to select the camera and access serial port settings. After selecting an experiment hardware for use, the user can use the standard PLC programming software to write, download, and test programs. Upon completion of the experiment (or time period expiry), the user powers off the hardware, closes the micro-controller software, and disconnects from the laboratory computer.
Figure 4. Experiment 2 Festo sorting machine.
Figure 5. Simplifified flflowchart of the remote laboratory operating procedure.Machines 2021, 9, 138 6 of 18
Figure 6. Sample of remote lab access schedule.
2.2. System Component Descriptions 2.2.1. Remote Screen Sharing Software The purpose of the screen-sharing software is to allow a remote student computer to access and control the laboratory computer which is connected to the experiment hardware. Three possible options to facilitate this were evaluated: TeamViewer [23], ISL Online [24], and Web Server [25]. TeamViewer is a remote access and control computer software that permits maintenance of computers and other devices. It requires software to be installed on both the remote computer and the laboratory computer. ISL Online also provides remote access and control of computers and mobile devices. It also requires software to be installed on both the remote computer and laboratory computer. A Web Server hosts a web application that provides features such as lab registration, scheduling, and logging. A lab server connection provides the addresses and application (interface) through which users can work on experiments. Software such as LabVIEW player simplififies the development of the application interface. ISL Online and Web Server were not considered to be “low cost” for the development of the system. TeamViewer was selected for use because a functional free version is available that suits the requirements of the application. The main features of TeamViewer are: • Remote wake, restart, and install of applications on devices running TeamViewer client; • Secure remote access; • Control of a remote computer or Android device as if a user were sitting in front of it. Figure 7 illustrates the window that opens when TeamViewer is run on the remote computer. A partner ID and password (from the laboratory computer) is required to access and control the experiments on the laboratory computer. 2.2.2. Graphical User Interface (GUI) and Camera The purpose of the GUI is to provide the control buttons and visual layout for facilitating the powering and selection of the hardware. This is achieved via communication with the micro-controller. It also monitors the status of the hardware and displays a live camera feed. This allows the remote user to operate the equipment in a safe manner. The GUI is a Windows application and some programming languages that could be used to develop the application include C++, C#, Java, or Python. An importantMachines 2021, 9, 138 7 of 18 factor considered in the selection process was serial port communication to exchange data between the laboratory computer and micro-controller. Since there are many freely available tutorials on serial port communication with micro-controllers, the GUI was developed using Visual Studio [26] and C# programming language [27].
Figure 7. TeamViewer window. Since the control is effected by a micro-controller connected to the laboratory computer via USB, a standard USB web camera is suffificient to monitor the experiment hardware. A Logitech C920 HD Pro USB web camera [28] was selected for use (Figure 8). The camera has a diagonal fifield of view of 78◦ , dual microphones for stereo sound, auto focus, and auto light correction which are suffificient for the task.
Figure 8. Logitech C920 HD Pro web camera. 2.2.3. Micro-Controller A micro-controller is required to interface the hardware apparatus to the GUI program on the laboratory computer for switching and control. The micro-controller decodes the serial port logic commands from the GUI and connects or disconnects the required hardware to the PLC. It also sends feedback to the GUI via serial communication. A readily available example of controlling LEDs from a Visual Studio-based GUI via an Arduino micro-controller [29] was the inspiration for selecting the Duinotech MEGA 2560 r3 micro-controller [30]. The source code was developed in Visual Studio 2013 and required some modififications to be compatible with the latest versions of Visual Studio. In this remote laboratory implementation, a USB cable connects the micro-controller to the laboratory computer. The USB cable is used for data communication and also provides suffificient power to run the micro-controller. The main reason for selecting the MEGA 2560 is that it has a large number of digital inputs and outputs to interface the two hardware experiments with the PLC. There are also suffificient additional pin connections to control more hardware experiments if required. Arduino Integrated Development Environment (IDE) with C programming language was used to write and upload control programs to the Arduino board. Switching between the control lines of two hardware equipment is actuated by two sets of Arduino compatibleMachines 2021, 9, 138 8 of 18 12 V 8-channel relay boards. Two additional sets of 12 V DPDT relay power on/off the machines. Figure 9 illustrates a simplifified flflowchart of the micro-controller control program. Various commands are sent from the GUI program to the micro-controller program to facilitate the switching of control and power lines. Figure 10 shows the micro-controller and 8-channel relay boards.
Figure 9. Flowchart of the micro-controller control program.Machines 2021, 9, 138 9 of 18
Figure 10. Micro-controller hardware. (a) Duinotech MEGA 2560 r3; (b) 8 channel relay boards [30].