10.1 Basic Usage of the HMI

10.1.1 Main Purpose of the Human–Machine Interface

Human–machine interface (HMI, MMI) is generally used to communicate with PLC (frequency converter, PID) and other controllers. Human–machine interface is generally used to display and record the data collected or calculated by PLC and other controllers, and control the data that needs to be controlled. The set value or the switch signal of the equipment is sent to the PLC and other controllers. The man–machine interface with touch function can directly switch the buttons on the screen and input data on the LCD screen. If the human–machine interface uses membrane buttons, you need to press the buttons on the display to enter data. The screens of most man–machine interfaces are shown in Fig. 10.1.

Fig. 10.1
A screenshot of the Simatic panel. It includes three containers connected by pipes to a central processing unit. A large tank is at the bottom, with a conveyor belt system.

The screen of the man–machine interface

10.1.2 Wiring of the Man–Machine Interface

The general external wiring of the HMI is shown in Fig. 10.2.

Fig. 10.2
A pin configuration of the interface presents the following units, R J 45 or U S B, R J 232 or R S 485, and D C power supply.

General wiring of the man–machine interface

Most touch screen HMI are powered by DC24V and have two communication ports, one of which is a programming port (RJ45) for connecting to a PC with programming software installed, and the other (RS485) is a communication port for connecting to control devices (such as PLC).

10.1.3 Communication Connection of HMI

In the PC for programming the HMI, open the HMI programming software, first select the model of the HMI, then the PLC model. Select communication port, communication protocol, etc. This is the most important, the first step, beginners must solve this problem.

10.1.4 Display Data

Select the display component, click the component, and select the data block, memory or input and output register in the PLC corresponding to the display. Generally, there is no direct decimal function in the human–machine interface, so it is generally calculated in the PLC through addition, subtraction, multiplication and division without decimal points. Just define the position of the decimal point on the HMI. For example, if you want to display a pressure value, the analog input of the pressure is PIW288. Assuming that 1 MPa corresponds to the 27,648 in the PLC, then for any pressure, to display X.X X MPa on the HMI, define 2 decimal places, do the following calculation on the PLC.

$$ {{\left( {PIW288 \times 100} \right)} \mathord{\left/ {\vphantom {{\left( {PIW288 \times 100} \right)} {27648}}} \right. \kern-0pt} {27648}} = DB1.DBW0 $$
(10.1)

In order to prevent the overflow of numerical calculation, the above calculation should be performed in double-byte calculation or floating-point. Multiplication is performed first to reduce numerical calculation errors.

For example, the value of PIW288 is 13824, then DB1.BW0 is equal to 50, define two decimal points, 0.50 MPa is displayed on the HMI, and the value displayed on the HMI corresponds to the actual pressure value.

10.1.5 Set Data

Add a data input component, click this component, and select the data block or memory to be set. Setting parameters in the HMI is opposite to the displaying data. Assuming that the pressure in the production process is to be controlled by constant pressure, set the pressure to 0.40 MPa and store it in DB1.DBW2. That is, DB1.DBW2 = 40, and the corresponding value in the PLC is placed in DB1.DBW4, then do the following calculation in the PLC.

$$ {{\left( {DB1.DBW2 \times 27648} \right)} \mathord{\left/ {\vphantom {{\left( {DB1.DBW2 \times 27648} \right)} {100}}} \right. \kern-0pt} {100}} = DB1.DBW4 $$
(10.2)

Then DB1.DBW4 is the value corresponding to 0.40 MPa in the PLC, 11,059.

The program for pressure judgment in the PLC can be written as shown in Fig. 10.3.

Fig. 10.3
A schematic diagram of the control logic circuit. It includes two comparators with two inputs, A I W 0 and D B 1 D B W 4, and the outputs of the comparators are connected to the points M 0.0 and M 0.1.

Procedure for pressure judgment

In Fig. 10.3, M0.0 high indicates that the actual pressure is lower than the set pressure, and M0.1 high indicates that the actual pressure is greater than the set pressure. According to the state of M0.0 and M0.1, control the analog output value (such as PQW304), to increase or decrease the speed of the corresponding inverter.

10.1.6 On/off Display

For example, we want to display I0.0 of the PLC.

Select a lamp component, click on the component, select the IW0 of the PLC, select I0.0 bit, then this display component is connected to I0.0 bit.

When I0.0 closes, the lamp component displays on. When I0.0 opens, the lamp component is off.

10.1.7 On/off Control

For example, we want to control Q4.0 of the PLC, on or off.

Select the button component, click the component, select QW4, select Q4.0, then this component is connected to Q4.0 bit. Define the button to be pressed to close and raised to release.

When the button component is pressed, Q4.0 will close (on), when the button component releases, Q4.0 will open (off).

We can also define the button to be closed when pressed and held when raised.

10.1.8 Curve Display

Add a graph component, click the component, and select the analog input, the data block or memory to be displayed. In HMI programming software of the PC, directly select the corresponding curve display component and correspond to the corresponding data block (such as DB6.DBW16), memory (such as MW8) or analog input (such as PIW288).

10.1.9 Display of Bar Graph

Add a bar graph component, click this component, and select the analog input, the data block or memory to be displayed. In the HMI programming software of the PC, directly select the corresponding bar graph display component and correspond to the corresponding data block (such as DB6.DBW16), memory (such as MW8) or analog input (such as PIW288).

10.1.10 Appearance of HMI

Human–machine interface is used more and more in the field of automation, and it exists in a large number of fields such as machine tools, automated production lines, and process control. The appearance of the human–machine interface is generally shown in Fig. 10.4.

Fig. 10.4
Photos of five industrial control panels that have various graphical user interfaces. Each screen includes flowcharts, status lists, command lists, and system monitoring diagrams.

The appearance of the HMI

10.2 Configuration Software

10.2.1 Purpose of Configuration Software

In order to make the control process intuitive and maintain a large amount of historical data, people often need to program specific software on the computer with a programming language, so that the software can communicate with the on-site equipment (such as PLC, sensors, PID, etc.). In this way, the computer can be used to display and control the production process and save the production data, but such software needs to compile different software for different projects, the workload is extremely high and time-consuming. The configuration software is produced to solve this requirement. It no longer requires programmers to understand the computer programming language. The configuration personnel only need to combine various ready-made components to complete very complex data display, control and data processing.

With the popularization of computers and the decline in prices, in order to improve the intuitiveness of the control process and the rapidity of programming. The use of configuration software on the computer to directly display, store, control and share data on the industrial control process on the network has become very popular and very simple. There are many types of general configuration software available at home and abroad. Since the configuration software is installed on the computer, its functions are much more powerful than those in the HMI in the previous section. Migration, correction of calculated values, etc. have all become very convenient.

Figure 10.5 is the application screen of the configuration software in a production process.

Fig. 10.5
A screenshot of the industrial control system. It features the process flow between multiple tanks, valves, pumps, and pipelines. The left panel contains buttons and indicators for system status and control options.

Application screen of configuration software

10.2.2 General Usage of Configuration Software

  1. 1.

    First install the development version and running version (or common version for development and operation) of the configuration software on the industrial computer. If there is no driver corresponding to the monitored device in the software, you need to install the driver.

  2. 2.

    Open the configuration software and create a new project

  3. 3.

    Select the type of board (or communication port, communication format) used for communication between the computer (PC) and the following and the type of PLC (or other controller) connected below. This step is very important. Beginners must attach great importance to this link.

  4. 4.

    Define the memory, data block, input/output (I/O) storage area, etc. that need to be displayed, controlled, and recorded on the PLC as data labels.

  5. 5.

    Add a component that displays data, click on the component, and correspond to the above data label.

  6. 6.

    Add a data input component for setting parameters, click the component, and correspond to the data block and memory in the PLC.

  7. 7.

    Add a switch value display component, click on the component, and correspond to the above data label, and define which digit to display.

  8. 8.

    Add a control button component, click on the component, and correspond to the above data label, and define which bit is to be set or reset.

  9. 9.

    Add a bar graph component, click on the component, and correspond to the above data label.

  10. 10.

    Add a trend graph component, click on the component, and correspond to the above data label, and define the frequency of updating and recording the data and the total length of the data, etc.

  11. 11.

    Run the configuration software, then the PC will automatically establish the relationship between the data display, data input, switch display, switch control, data trend display, and storage of the above configuration with the downlink PLC.

10.2.3 Common Configuration Software

Common configuration software: Wincc, Intuch, Fix, etc.

10.3 Quick Start of WINCC Configuration Software

Siemens WINCC configuration software is connected with PLC and other industrial control equipment, which can realize the collection, control, display and storage of field data and equipment status, especially when it cooperates with Siemens’ own PLC and control equipment, it is very convenient.

10.3.1 Purpose

Take the configuration software Wincc and “S7–300” PLC to form a control and monitoring system as an example to realize the display of a hot water flow (analog input); by changing the frequency of the inverter, control the speed of a pump’s motor (analog output); A device running state (digital input); a device start/stop (digital output).

The PLC system that completes this function consists of a power supply module PS307 (2A), a CPU314, a 16-way input module “SM321-DI16XDC24V”, the 16-way relay output module “SM321-DO16XRelay”, an 8-way analog input module “SM331-AI8X12Bit”, a 4-channel analog output module “SM332-AO4X12Bit”.

After selecting the hardware board, remember the I/O address of each board, as shown in Fig. 9.25.

The address of the 16-way digital input module SM321 is I0.0~I3.7, IB0~IB1, IW0.

The address of the 16-way digital output module SM322 is Q4.0~Q5.7, QB4~QB5, QW4.

The address of the 8-way analog input module SM331 is PIW288~PIW302.

The address of the 4-way analog output module SM332 is PQW304~PQW310.

The address of default MPI communication port is 2, as shown in Fig. 9.25.

10.3.2 Basic Steps

  1. 1.

    The connection between the PC and the programmable controller is connected through a dedicated communication cable (PC/MPI) provided by Siemens.

  2. 2.

    The correspondence between input and output data between Wincc and programmable controller S7−300.

  3. 3.

    Wincc programming method.

10.3.3 Wincc Programming Software Operation and Communication Settings

After Wincc is installed correctly, it already has the driver of S7–300PLC. In the “Programs” under the “Start” menu, start “SIMATIC”−“Wincc”−“Windows Control Center”.

Click “New Project” in the “File” menu, in the opened “Wincc Project Manager”, select “Single User Project”, and click “OK”.

In the “Create New Project” dialog box, enter the name of the new project “TEST”, select the path to store the project, and click the “Create” button.

On the opened programming configuration screen, on the left side of the screen, right-click “Variable Management”, in the opened “Add New Driver” dialog box, select “SIMATIC S7 Protocol Suite.chn”, and click “Open”, as shown in Fig. 10.6 shown.

Fig. 10.6
A screenshot of the window. It features a pop-up dialog box for the add new driver, which includes SIMATIC S 5 profibun F D L, SIMATIC S 5 programmers port A S 511 dot C H N, SIMATIC S 5 serial 3964 R dot C H N, SIMATIC S 7 protocol suite dot c h n, and SIMATIC T I ethernet layer 4 dot C H N.

Adding a new driver

Click the newly loaded “SIMATIC S7 Protocol Suite.chn” under “Variable Management” on the left side of the screen, right-click “MPI”, and select “New Driver Connection”. In the opened “Connection Properties” dialog box, since the default MPI address of 300PLC is 2. In order to be simple and unchanged, write “MPI2” in the name column. Sometimes you can also write the name of the workshop or station where the PLC is located for easy memory, as shown in Fig. 10.7. The MPI bus is S7–300 comes with a standard bus, which can connect 127 PLCs or PCs and other equipment, and the cost is low. If users need more powerful communication, they can also choose “PROFIBUS” and other protocols.

Fig. 10.7
A screenshot of the window. It features a pop-up dialog box with the name, unit, and server list, along with a highlighted properties button. Some details are in a foreign language.

Naming the new connection

In the “Connection Properties” dialog box, click “Properties”, and in the opened “Connection Properties-MPI” dialog box, select “Station Address” as 2, which means the S7–300PLC of MPI address being 2 is connected. Click “OK”, as shown in Fig. 10.8.

Fig. 10.8
A screenshot of the Win C C explorer interface window. It features a pop-up dialog box for the connection parameters, which includes the following fields, network address, station address, rack, slot, and other settings. Most details are in a foreign language.

Define the MPI address of the PLC connected to WINCC

In this way, a PLC with MPI address 2 is installed under the “MPI” bus, and the name of the PLC station is “MPI2”, as shown in Fig. 10.9. If more PLCs need to be installed under the MPI bus, then continue to right-click “MPI”, select “New Driver Connection”, and add a new PLC. But the “name” of each PLC and the MPI “address” cannot be the same, and the MPI bus can connect up to 127 PLCs.

Fig. 10.9
A screenshot of the Win C C explorer interface window. The left panel lists various communication protocols and the right panel has a table with columns titled group name, address, and timestamp. Most details are in a foreign language.

Naming the name of the PLC station

10.3.4 Add “Variable” Connected with PLC

Add variables that need to be monitored or controlled in the PLC. Right-click “MPI2”, select “Add New Variable”, and in the “General” tab of the “Variable Properties” dialog box, enter the new variable “Name” as “Flow 1”. In the PLC, the first analog input signal PIW288 of the analog input module needs to be sent to DB1.DBW0 with the MOV instruction. For the specific method, please refer to the previous chapter of PLC. Select “Data Type” as “unsigned 16 digits”, click the “Select” button on the left of the “Address” to open the “Address Properties” dialog box, if you choose that the variable comes from DB1.DBW0 of the PLC, the “Data” is “DB”, and the “DB Number” is 1. Fill in “0” for “DBW”, as shown in Fig. 10.10.

Fig. 10.10
A screenshot of the Win C C explorer interface window. Two popup windows are open in the foreground titled properties and address properties with several fields. Most details are in a foreign language.

Add a new variable “flow 1”

In the “Linear Calibration” item, determine the corresponding relationship between the data of the variable in the PLC and the value displayed in the Wincc monitoring software. “Process value range” indicates the value of the variable signal in the PLC, 4–20 mA in S7–300 The analog input corresponds to “0–27,648”. Value1 of “Process Value Range” selects 0, and Value2 of “Process Value Range” is 27648. “Variable Value Range” indicates the display value of the variable in Wincc, assuming the flow full scale of the meter is 2000m3/h. Then the Value1 of the “variable value range” is 0, and the Value2 of the “variable value range” is 2000, as shown in Fig. 10.11.

Fig. 10.11
A screenshot of the Win C C explorer interface window. It features a pop-up window titled properties, which includes the name, data type, address, and limits. Most details are in a foreign language.

Define variable properties

Add a new variable “Flow 1” under “MPI2”. Right-click “MPI2”, “Add New Variable”, in the “General” tab of the “Variable Properties” dialog box. Enter the “Name” of the new variable as “Speed Output”, and select the “Data Type” as “Unsigned 16-bit”. Click the “Select” button on the left side of “Address” to open the “Address Properties” dialog box. If you select this variable to output to PLC's DB1.DBW2, then “Data” is “DB”, “DB No.” is 1. “ Fill in “2” for the “DBW” item. As shown in Fig. 10.12. Use the MOV command in the PLC to send DB1.DBW2 to the PQW304 analog output, and control the motor speed through the frequency converter.

Fig. 10.12
A screenshot of the Win C C explorer interface window. It features two pop-up windows in the foreground titled the properties and address properties. Each window includes various fields. Most details are in a foreign language.

Define a new variable “speed output”

In the “Linear Calibration” item, determine the corresponding relationship between the data of the variable in the PLC and the value displayed in the Wincc monitoring software. “Process value range” means that the corresponding value of the variable 0–10 V in the PLC is “0–27,648”, select 0 for Value1 of “Process Value Range”, Value2 of “Process Value Range” is 27648. “Variable Value Range” indicates the display value of the variable in Wincc, assuming that the rated speed of the motor is 1470 rpm, then “Variable Value Value1 of “Range” is 0, and Value2 of “Variable Value Range” is 1470, as shown in Fig. 10.13.

Fig. 10.13
A screenshot of the Win C C explorer interface window. It features a pop-up dialog box of properties, which includes name, data type, address, and variable limits. Most details are in a foreign language.

Defining variable properties

In this way, a new variable “speed control” is added under “MPI2”. Enter the running status indicator, the address in the PLC is I0.0. Right click “MPI2”, “Add New Variable”, in the “General” tab of the “Variable Properties” dialog box, enter the new variable “Name” as “Running Status”. Select “Binary Variable” for “Data Type”, click the “Select” button on the left of “Address” to open the “Address Properties” dialog box, select “Data” as “Input”, and “Address” as “Bit”. The “I” item is 0, the “bit” is 0, click “OK”. As shown in Fig. 10.14. So that the first input signal of the PLC digital input card can be collected. In this example, since the digital input card is in the first block position, it is I0 and the first input bit 0 is used.

Fig. 10.14
A screenshot of the Win C C explorer interface window. It features two pop-up windows in the foreground titled the properties and address properties. Each window includes various fields. Most details are in a foreign language.

Defining a new variable “running state”

A new variable “running status” is added under “MPI2”. Insert the button variable, corresponding to the address in the PLC is Q4.0. Right-click “MPI2”, “Add New Variable”, in the “General” tab of the “Variable Properties” dialog box, enter the new variable “Name” as “Switch Output”, select “Binary Variable” for “Data Type”. Click the “Select” button on the left of “Address” to open the “Address Properties” dialog box, select “Data” as “Output”, and “Address” as “Bit”, The “Q” item is 4, the “bit” is 0, click “OK”, as shown in Fig. 10.15. So that the first output signal of the PLC digital output card can be output. In this example, since the digital output card is in the second block, it is Q4 and uses the first output bit 0.

Fig. 10.15
A screenshot of the Win C C explorer interface window. It features two pop-up windows in the foreground titled the properties and address properties. Each window includes various fields. Most details are in a foreign language.

Define a new variable “switch output”

In this way, four variable labels are established: flow 1, speed output, running status and switch output, as shown in Fig. 10.16.

Fig. 10.16
A screenshot of the Win C C explorer interface window. It features a table with columns titled group name, data type, address, and timestamp. The text is written in a foreign language.

Complete 4 variable labels

10.3.5 Adding a New Screen

Click “Graphics Editor” on the left side of the screen to create a “New Screen”. The default file name of the new screen is “NewPd10.Pdl”. Right-click and rename the default name to “Control Experiment. Pdl”, as shown in Fig. 10.17.

Fig. 10.17
A screenshot of the Win C C explorer interface window. It features a pop up window that prompts for a new name, with the text field. Most details are in a foreign language.

New screen

10.3.6 Adding Static Text

Double-click “Control Experiment.Pdl” to edit and configure the screen. In the “Object Palette” on the left side of the “Graphic Editor” screen, click “Static Text”, click the position where the text is to be placed, and then, in the text prompt “???”. Enter the first text to be displayed: “Flow rate (m3/h):”. At the top of the screen, select “Arial” for “Font”, and 18 for “Font Size”, adjust the text position again. As shown in Fig. 10.18.

Fig. 10.18
A screenshot of the graphic user interface window. It features a layout in a grid pattern. The right panel contains various object properties such as font size, color, and alignment options. The left panel has a color palette.

Add text “flow (m3/h):”

Similarly, put 4 static texts, “Speed Control (1470r/min)”, “Jog Button” and “Running Status”, as shown in Fig. 10.19.

Fig. 10.19
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text boxes. The right panel contains various object properties such as font size, color, and alignment options. The left panel has a color palette.

Add 4 texts

10.3.7 Analog Value and Data Display

Insert the display of the variable “Flow 1”. Click the “Input/Output Field” under the “Smart Object” in the “Object Palette” on the right side of the screen, and place the logo prompt at the position where it needs to be placed. In the “I/O Field Configuration” In the dialog box, select “Type” as “Input”, the “Update” speed of the variable as 2 s. Select 12 for “Font Size”, select black for “Color”, click the “Variable Selection” button, and open “Variable-Project” dialog box, select the variable “Flow 1” to be displayed, and then click “OK”, as shown in Fig. 10.20.

Fig. 10.20
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes several pop-up windows for input or output fields with settings for font and color. The text is in a foreign language.

Flow display

Right-click the placed “Display Box”, select “Properties”, open the “Object Properties” dialog box, in the “Properties” tab. Click “Input Output”, in the “Output Format” item, select the 4-digit integer format “9999”, click “OK”, as shown in Fig. 10.21.

Fig. 10.21
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes a pop-up window of object properties with color palettes, grid settings, and various toolbars.

Define the traffic display format

10.3.8 Output Analog and Data

Insert the variable “speed control” output, click the “input/output field” under the “smart object” in the “object palette” on the right side of the screen. Put the mark prompt at the position where it needs to be placed, in the “I/O field configuration” dialog box, select “Type” as “Output”. So that after Wincc runs, the operator can click the variable with the mouse to input the control data, the “update” speed of the variable is 2 s, click the “variable selection” button, open the “Variable-Project” dialog box, select the variable “Speed Control” that needs to be controlled, and then click “OK”, as shown in Fig. 10.22.

Fig. 10.22
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes two pop-up windows titled input or output properties and Win C C tags. The details are in a foreign language.

Speed control

Right-click the placed “I/O” display box, select “Properties”, open the “Object Properties” dialog box, in the “Properties” tab, click “Input/Output”, in the “Output Format” dialog box, you can also According to the process requirements, in the “Input a Format” column, create a display format by yourself, such as 4 integers and 1 decimal, and the display style is “9999.9”, click “OK”, as shown in Fig. 10.23.

Fig. 10.23
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes several pop-up windows with tabs for properties and events. The details are in a foreign language.

Define the speed display format

10.3.9 Control Button

Insert the variable “Switch Control” button. Click “Button” under “Window Object” in the “Object Palette” on the right side of the screen, put the button at the desired position, and write in the “Text” item in the “Button Configuration” dialog box. Enter the text to be displayed on the button, write it as “Start”, and click “OK”, as shown in Fig. 10.24.

Fig. 10.24
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes a pop-up window of control properties with settings for text, font, color, and alignment. The details are in a foreign language.

Add button

Right-click “Button”, select “Properties”, open the “Object Properties” dialog box, in the “Event” tab, select the “Mouse” item. Right-click the arrow behind “Press the left button” in the dialog box on the left, and select “C Action”, as shown in Fig. 10.25.

Fig. 10.25
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes a pop-up window of object properties with several properties and events. The details are in a foreign language.

Defining the action of the button

In the pop-up “Edit Action” dialog box. Open “Internal Function”−“tag”−“set” on the left side of the screen, select the set function “SetTagBit”, open the “Assign Parameters” dialog box of this function, select the bit to be set “Variable”, as shown in Fig. 10.26.

Fig. 10.26
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes multiple pop-up windows of object properties and a color palette on the left. The details are in a foreign language.

Select the set function

In the “Assign Parameters” dialog box, click “Value” of the “Tag Name” item. Right-click “Variable Selection”, select “Switch Output”, and enter 1 in the “value” item, indicating that the variable value of “Switch Output” is set to 1. Click “OK”. In the pop-up dialog box, confirm the choice to recompile the source code of the action, as shown in Fig. 10.27.

Fig. 10.27
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes multiple pop-up windows of object properties, grid settings, and a color palette on the left. The details are in a foreign language.

Define allocation parameters

In the “Object Properties” dialog box of “Button”, on the “Event” tab, select “Mouse”. Right-click the arrow behind “Release Left Button” on the left, select “C Action”. In the pop-up “Edit Action” dialog box, open the “internal function”−“tag”−“set” on the left side of the screen. Select and click the set function “SetTagBit”, open the “Assign Parameters” dialog box of this function, in the “Tag Name” item, select “Variable”. Click “Variable Selection”, select the variable “Switch Output”, enter 0 in the “value” item, which means that the “Switch Output” variable is set to 0, click “OK”, and in the pop-up dialog box, confirm the selection to recompile the action source code, click “OK”, the action of the button is defined. After Wincc runs, press the button with the mouse, “switch output” Q4.0 = 1, when the mouse is lifted, “switch output” Q4.0 = 0, as shown in Fig. 10.28.

Fig. 10.28
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes multiple pop-up windows of object properties, grid settings, and a color palette on the left. The details are in a foreign language.

Defining mouse actions

10.3.10 Device Run/stop Display

Insert the “running status” indicator light, click the “circle” under the “standard object” in the “object palette” on the right side of the screen, place the circle at the desired placement position. Right click the “circle” and select “properties”, in the “object in the “Properties” dialog box, select the “Color”−“Background Color” item. Right-click the arrow behind “Change” on the left, and select “C Action”. In the pop-up “Edit Action” dialog box, open the “Internal Function” “−”tag“−”get”, select and click the read bit function “GetTagBit”. Open the “Assign Parameters” dialog box of the function, select the “variable” to be read, click “Variable Selection”, select the variable “Run State”, the address corresponding to the PLC is I0.0. Click “OK”, and in the pop-up dialog box, confirm the choice to recompile the source code of the action, click “OK”. The indicator light is defined. After Wincc runs, I0.0 is input, the color of the indicator light changes at the same time, as shown in Fig. 10.29.

Fig. 10.29
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes multiple pop-up windows of object properties, grid settings, and a color palette on the left, with a selected status. The details are in a foreign language.

Add and define the “running status” indicator light

In this way, the configuration screen of this case is basically completed. Next, define the size of the screen when WINCC is running. Right-click the screen and select “Properties”. “, determine the size of the screen display, and then click “Save” for the file, as shown in Fig. 10.30.

Fig. 10.30
A screenshot of the graphic user interface window. It features a layout in a grid pattern with several text fields. It includes a pop-up window of object properties with a list of properties and their values. The details are in a foreign language.

Define the size of the screen

10.3.11 PC Communication Address and Running Start Screen

Define the first start screen after startup, right-click the “Computer” item, in the opened “Computer Properties”–“Graphics Runtime” dialog box, click the “Browse” button on the right side of the “Start Screen”. In the pop-up “Screen” dialog box, select “Control Experiment.Pdl”. In this way, the “Start Screen” displayed after Winccc starts up is the “Control Experiment.Pdl” screen we compiled above, as shown in Fig. 10.31. Press the run button on the top of the software screen to start the program.

Fig. 10.31
A screenshot of the interface window. It features a pop-up window of computer properties with settings and parameters. The details are in a foreign language.

Define the start screen

In the computer installed with the “Wincc” running software, it is also necessary to configure the communication hardware and software of the MPI bus in the computer “Control Panel”, open the “Set PG/PC Interface” item, and install the “PC Adapter” adapter, as shown in Fig. 10.32. Select the MPI address. Generally, the MPI address of the PC is set to 0. This address cannot be the same as the MPI address of the PLC, otherwise it will not be able to communicate.

Fig. 10.32
A screenshot of a Windows desktop. It features the pop-up windows of the interface and installs an interface for selecting and installing the modules.

Configure the MPI communication hardware and address of the computer

10.3.12 Techniques for Reducing the Number of Variable Tags in Configuration Software

The sales price of the configuration software is directly related to the number of variables allowed by the software. In order to reduce the total number of variables, we can reduce the total number of variables by combining multiple switch variables into one variable, such as defining a digital input module IW4 is a variable. When the “status display” on the screen uses these variables, use the “GetTagBit” function to extract these bits and use them. Define the digital output module QW8 as a variable. When the “switch control” on the screen uses these variables, use the “SetTagBit” function to operate on a certain bit of the variable.