Share this

PLC-based Ethernet LabVIEW control of AC motors

2026-04-06 05:32:47 · · #1

1 Introduction

In the past, engineering designs required extensive hardware systems and complex wiring, making remote system control nearly impossible. If designers wanted to improve the design, all irrelevant hardware had to be discarded, resulting in significant waste. With programmable logic controllers (PLCs), the entire design can be programmed via software, greatly reducing the hardware requirements. Furthermore, using PLCs offers the advantage of easy access and control via third-party software like LabVIEW, requiring only the installation of specific drivers.

2. Engineering Design Configuration and Preparation

2.1 NI OPC Server Based on OMRON Network Interface Card

The NI OPC server includes an Ethernet driver for the OMRON network card, enabling communication between the OMRON CJ1MCPU11 - ETN21 PLC and LabVIEW. Omron programmers typically use an Ethernet gateway as a dedicated interface for the software, allowing PLC users to achieve communication.

The NI OPC server comes equipped with an Ethernet driver for Omron PLCs. Users can configure the server with a few simple settings to create variable tags that can be directly linked to PLC registers; these tags are defined as OPC tags. The NI OPC server also provides the NI OPC Quick Client, enabling users to monitor the PLC status in real time. Once OPC tags are created and correctly configured, communication between LabVIEW and the PLC is simplified because the driver can automatically apply the relevant FINS commands. Meanwhile, in LabVIEW, programs can be designed using shared variables linked to OPC tags.

2.2 NI Virtual Instruments (USA)

LabVIEW, short for Lab Virtual Instrument Engineering Workbench, is a graphical development environment that enables the rapid creation of flexible, scalable design, control, and test applications at minimal cost.

Developed by National Instruments (NI), LabVIEW is similar to C and BASIC development environments. However, a significant difference between LabVIEW and other computer languages ​​is that while other languages ​​use text-based languages ​​to generate code, LabVIEW uses the graphical programming language G to write programs, producing block diagrams. LabVIEW software is the core of the NI design platform and is ideal for developing measurement or control systems. The LabVIEW development environment integrates all the tools engineers and scientists need to quickly build a variety of applications, designed to help them solve problems, improve productivity, and innovate continuously.

With LabVIEW, engineers can interact with real-world signals, analyze data to obtain meaningful information, and share results through intuitive displays, reports, and networks. Regardless of programming experience, LabVIEW allows all users to develop quickly and easily. LabVIEW has front-end interface applications that allow users to design and use them in control systems. Generally, LabVIEW has three main elements: the front panel, the block diagram, and the connector panel. The front panel allows users to build controls and indicators; controls include knobs, buttons, dials, and other input mechanisms, while indicators are graphics, LEDs, and other output displays.

2.3 Programmable Logic Controller

The PLC used for implementation is an Omron CJ series PLC, which has four units: a power supply unit (CJ1M-PA202), a CPU unit with Ethernet functionality (CJ1M-CPU11-ETN21), a basic input unit (CJ1M-ID211), and a basic output unit (CJ1M-OC211). All these units can be assembled together, and the slider is locked by moving them to the back of the unit. The final cover plate must be connected to the right side of the PLC; otherwise, a fatal error will occur.

2.4 Variable Frequency Drive

The OMRON SYSDRIVE 3G3MV-A2007 inverter is a variable frequency drive used to change the frequency supplied to the motor, thereby changing the motor speed. The advantage of vector control is that it guarantees 150% of the rated motor torque at an output frequency of 1 Hz, allows for larger torque at low frequencies, and suppresses speed fluctuations caused by the load. To effectively control a three-phase squirrel-cage induction motor, the functional parameters of the 3G3MV inverter need to be configured.

3. Implementation process

To implement this project, communication between the PLC and LabVIEW is crucial. The implementation uses LabVIEW to start and stop the motor, and to change its speed by altering its frequency in either the forward or reverse direction. However, this system is not a Supervisory Control and Data Acquisition (SCADA) system because no actual data measurements are obtained from the motor's actual output.

As shown in Figure 1, the user has the right to control the system via a laptop computer as the host. The user's input data is then converted into Boolean data and sent to the CJ1M-CPU11-ETN21 programmable logic controller (PLC) via Ethernet cable and router. Once the Boolean data is processed by the PLC, the relevant address in the PLC's basic output is opened. Based on the user's input data, this process allows the 3G3MV inverter/frequency converter to operate the three-phase squirrel-cage induction motor. Furthermore, when the input power is a single-phase power supply, the 3G3MV inverter/frequency converter acts as an inverter between the power module and the motor, while the squirrel-cage induction motor still operates in three-phase mode.

4. Implementation of VI Design

The purpose of this visual recognition (VI) program is to allow users to change the motor's start and stop operation by altering its frequency in both forward and reverse directions, and to change the motor's operating speed in two simple steps. First, press the forward or backward button on the VI's front panel to select the direction of rotation; second, change the speed by rotating the frequency knob to the user's desired frequency value.

Before running the VI, ensure that all hardware is correctly powered on and configured, and that the NI OPC Quick Client is started so that OPC tags can be browsed by shared variables in this VI. Five OPC tags were created in the implementation, and details of the tags are listed in Table 1.

Table 1. Details of the OPC tag and its connection to the inverter.

In Figure 2, the green button is the switch to ensure the motor runs in the forward direction, and the orange button is the switch to ensure the motor runs in the reverse direction. The green and orange indicator lights on the right show whether the buttons are turned on. The knob labeled "Frequency" is the key program for controlling the motor frequency and speed, and the button labeled "Stop" stops the program from executing.

The VI block diagram consists of two parts. The first part allows the user to control the forward or reverse direction of the squirrel-cage induction motor. The second part changes the motor frequency by altering the knob value. In Figure 3, if the user has already pressed the forward button, a signal will be sent to the shared variable "outputbit1" in write mode, meaning the signal will be written to the PLC. Once the signal is successfully written to the PLC, the indicator light at PLC output address 1.01 and the "Forward" indicator light on the LabVIEW front panel will illuminate. The reverse process is the same.

In Figure 4, the red box represents the formula node named VI, which uses the C programming language. After the user sets the frequency value using the "Frequency Variable" knob, the value will be sent to the formula node, represented here as "a".

The output of the formula node is divided into x, y, and z, where the numbers are 0 or 1. To make the shared variables readable, it is necessary to convert the numbers to Boolean format. When the signal is in Boolean format and sent to the shared variables, the information is written to the PLC, and the indicator lights at PLC output addresses 1.05, 1.06, and 1.07 will illuminate according to the desired output. Table 2 describes the relationship between multi-step speed references 1 to 3 and frequency references 1 to 8.

Table 2 Relationship between Multistep Velocity Reference and Frequency Reference

Since the PLC and the frequency converter communicate in Boolean format, the concept of frequency variation in Table 2 is crucial. Each frequency reference value can be set in the function parameters of the frequency converter. In this document, the values ​​of each frequency reference value are listed in Table 3. Whenever the user sets the input frequency according to any condition, this number will be converted to a Boolean value, which will be arranged according to the relevant multi-step speed reference. This Boolean value will then trigger the frequency converter to determine the frequency and speed of the squirrel-cage induction motor according to the output conditions listed in Table 3. For example, if the user sets the input to 8 Hz, where the input range is between 7 and 14, then the Boolean value for the multi-step speed setpoint 1 is 1, and the rest are 0. This signal then triggers the frequency converter to transmit a frequency of 7 Hz.

Table 3. Frequency Reference Conditions for Input Frequency Changes in LabVIEW

5. Conclusion <br>Overall, choosing LabVIEW for the implementation of the human-machine interface was a correct decision because it is easy to understand and use for various types of applications and functions. Furthermore, this approach is more economical because the system's objectives are achieved simply by using the basic functions of the LabVIEW toolkit (shared variables and NI OPC server). The Omron CJ1 series PLC is easy to install and set up; both hardware and software configuration can be easily accomplished. Additional functions can be performed by simply adding more units with various capabilities (such as Ethernet units).


Read next

CATDOLL 139CM Sasha Silicone Doll

Height: 139 Silicone Weight: 25kg Shoulder Width: 33cm Bust/Waist/Hip: 61/56/69cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22