Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
12 views162 pages

Manual of Ethernet HMI Configure Functions

The document is a detailed catalogue of configuration software functions, outlining various chapters and sections related to interface layout, menu options, application examples, and specific functionalities such as alarm and animation functions. It covers topics from basic interface elements to advanced features like macro commands and multilingual applications. Each chapter provides insights into specific tools and settings available within the software, aimed at enhancing user experience and functionality.

Uploaded by

Adelfran Sanchez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views162 pages

Manual of Ethernet HMI Configure Functions

The document is a detailed catalogue of configuration software functions, outlining various chapters and sections related to interface layout, menu options, application examples, and specific functionalities such as alarm and animation functions. It covers topics from basic interface elements to advanced features like macro commands and multilingual applications. Each chapter provides insights into specific tools and settings available within the software, aimed at enhancing user experience and functionality.

Uploaded by

Adelfran Sanchez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 162

Catalogue

Chapter1 Configuration Software Functions .............................................................. 1


1.1 Interface Layout ................................................................................................1
1.2 Menu Bar .......................................................................................................... 2
1.2.1 file ........................................................................................................... 2
1.2.2 edit .......................................................................................................... 3
1.2.3 view .........................................................................................................5
1.2.4 control ..................................................................................................... 6
1.2.5 Mapping .................................................................................................. 9
1.2.6 Add ........................................................................................................10
1.2.7 Tool ....................................................................................................... 11
1.2.8 Help .......................................................................................................12
1.2.9 Language ...............................................................................................12
1.3 toolbar ............................................................................................................. 12
1.3.1 standard toolbar .....................................................................................12
1.3.2 Expand toolbar ......................................................................................16
1.3.3 Standard state column ...........................................................................17
1.3.4 Information output window .................................................................. 17
information output window. ..................................................................................18
1.4 staging .............................................................................................................18
1.4.1 system parameter .................................................................................. 18
Chapter2 Application Examples of Window Screen .................................................22
2.1 Engineering Business Card .............................................................................24
2.1.1 Initial window number and startup screen settings ...............................24
2.1.2 QR code display information ................................................................28
2.2 Data display and input .................................................................................... 30
2.2.1 numeric display .....................................................................................31
2.2.2 ASCII Display .......................................................................................32
2.3.1 System default keyboard .......................................................................33
2.3.2 Customize Keyboard .............................................................................34
2.4 Public window function .................................................................................. 37
Chapter3 Example of Animation Function Application ........................................... 42
3.1 Analog instrument display .............................................................................. 42
3.2 Animation function configuration ...................................................................46
3.2.1 GIF ........................................................................................................ 46
3.2.2 Twinkle ................................................................................................. 51
3.2.3 horse race lamp ..................................................................................... 53
3.3 Multi state display ...........................................................................................55
Chapter4 Application Examples of Alarm Function .................................................60
4.2 Real time alarm configuration ........................................................................ 61
4.2.2 Word alarm configuration ..................................................................... 66
4.2.2 Multi condition alarm configuration .....................................................69
4.3 Alarm information display and operation ....................................................... 72
4.3.1 Alarm bar .............................................................................................. 72
4.3.2 alarm display .........................................................................................74
4.3.3 Event display .........................................................................................76
Chapter5 Trend Curve and Data Processing ............................................................. 79
5.1 Real time trend curve ......................................................................................79
5.2 Historical data function ...................................................................................91
Chapter6 Application Cases of Multiple Repetitive Values ....................................101
Chapter7 Application Examples of Pointer Function ............................................. 106
Chapter8 Example of Formula Function Application ............................................. 110
8.1 Configuration Recipe Group ......................................................................... 111
8.2 Recipe Group Components ........................................................................... 116
8.2.1 Recipe display components .................................................................117
8.2.2 Recipe selector component ................................................................. 119
Chapter9 Production Process Preview Application Example ................................. 121
9.1 Basic and Annotation Properties of XY Curve ............................................. 121
9.2 Curve attributes of XY curve ........................................................................ 124
Chapter10 Introduction to Macro Command Functions ......................................... 132
10.1 Summary of Macro Instruction Knowledge ............................................... 132
10.1.1 Introduction to Macro Instruction Editor .......................................132
10.1.2 Introduction to Language Elements ..................................................133
10.2 Basic sentence rules and applications .........................................................137
10.3 Script error checking ...................................................................................142
Chapter11 Application Examples of Library Functions ......................................... 145
11.1 Using Help to Guide ................................................................................... 145
11.2 function library ............................................................................................146
11.3 graphics library ........................................................................................... 150
Chapter12 Examples of Multilingual Function Application ...................................154
12.1 Multi language settings ...............................................................................154
12.2 Text Library ................................................................................................ 156
Chapter1 Configuration Software Functions

This chapter briefly introduces the configuration structure of the software.

1.1 Interface Layout

After opening the configuration software project, the startup interface is shown

in Figure 1.1-1:

Chat 1.1-1

a. Menu bar;b.Toolbar;c.Workbench

1
1.2 Menu Bar

1.2.1 file

Chat 1.2-1
 [New Project]: Use this command to create a blank project.
 [Open Project]: Use this command to open project files that the user has created
and saved in Windows, and to open project configuration files.
 [Close Project]: Use this command to close the current project screen
configuration without exiting the configuration software.
 [Save Project]: Use this command to save the current modified screen
configuration. The file name and save path default to the original file name and
save path.
 [Save As]: Use this command to save the current screen configuration and rewrite
the name and save path of the project screen configuration.
 [Recently opened projects]: Projects that the user has recently used or opened.
 [Quit]: Use this command to exit the configuration software.
 [Auxiliary Functions]: Use this command to pop up the engineering auxiliary
setting window and set the attributes of the entire project.

2
1.2.2 edit

Chat 1.2-2
 [Redo]: Shortcut keys Ctrl+Shift+Z, use this command to restore the last
operation command, and use this command to restore your last operation.
 [Undo]: Shortcut key Ctrl+Z, use this command to cancel the last operation
command, and use this command to cancel your last operation.
 [Cut]: With the shortcut keys Ctrl+X, you can delete the selected graphic objects
and copy them into the paste buffer.
 [Copy]: With the shortcut keys Ctrl+C, you can copy the selected graphic object
into the paste buffer.
 [Paste]: With the shortcut keys Ctrl+V, you can copy the graphic objects in the
paste buffer to the current screen.
 [Multiple Replication]: With the shortcut key Ctrl+D, you can copy multiple
selected graphics that the user needs horizontally and vertically, and increase the
address by 0-255 units in sequence.

3
 [Find/Replace]: With the shortcut key Ctrl+D, you can copy multiple selected
graphics that the user needs horizontally and vertically, and increase the address
by 0-255 units in sequence.
 [Delete]: Use the shortcut keys Ctrl+Del to delete the selected graphic object
from the screen.
 [Select All]: The shortcut key Ctrl+A allows you to select all objects in the
current screen of the current project using this command.
 [Alignment]: Use this command to align multiple selected objects (two or more)
according to the selected alignment method. Alignment methods include top
alignment, bottom alignment, vertical center, left alignment, right alignment, and
horizontal center.
 [Arragement]: Use this command to place the selected object in different levels of
the screen. The hierarchy items that can be selected include getting to the top
layer, getting to the previous layer, getting to the bottom layer, and getting to the
next layer.
 [Combination]: This command can be used to combine multiple selected objects
(two or more) into one control, or to split objects that can be split or combined
into the original objects.
 [Image Scale]: This command allows you to scale the current screen to a certain
ratio for more detailed control operations. The scaling options you can choose
include image magnification, image proportional restoration, and image reduction
by one time.
 [Grid]: Use this command to arrange and cancel the selected width grid of the
current screen.
 [Upload Data]: Use this command to upload the touch screen program to the PC.
 [Macro Find]: Find the location where the input macro appears.
 [Macro Manager]: List all macros under the given conditions.

4
1.2.3 view

Chat 1.2-3
 [Configuration Toolbox]: Whether to display the configuration toolbox, which is
the control toolbox on the right side of the software.
 [Information output window]: Whether to display the information output window,
which is the second to last layer in the software.
 [ProManager]: Whether to display the project manager, which is the tree menu on
the left side of the software.
 [Standard toolbar]: Whether to display the standard toolbar, which is the first
layer of toolbar in the software.
 [Extended toolbar]: Whether to display the extension toolbar, which is the second
layer toolbar in the software.
 [Standard status Bar]: whether to display the Standard state column, that is, the
lowest status column in the software.

5
1.2.4 control

Chat 1.2-4
 [Bit Status Indicator]: Click to open the bit status button setting window, and set
the operation type of the bit button.
 [Bit status indicator light]: Click to open the bit status indicator light setting

6
window, and set the indicator light monitoring address and status appearance.
 [Multi status Indicator]: Click to open the multi state button setting window, and
set the operation type of the multi state button.
 [Bit Status Setting]: Click to open the bit status setting window and set the type of
bit status operation.
 [Multi status Indicator]: Click to open the multi status indicator light setting
window, and set the indicator light monitoring address and status appearance.
 [Multi State Settings]: Click to open the Multi State Settings window and set the
operation type for multi state settings.
 [Function Button]: Click to open the function button setting window, set the type
of function operation, etc.
 [Multifunction Button]: Click to open the multi function button setting window,
and set the operation properties of the multi function.
 [Sliding Switch]: Click to open the sliding switch settings window and set the
sliding switch properties.
 [Checkbox]: Click to open the checkbox setting window and set the checkbox
properties.
 [Value Display]: Click to open the numerical display settings window and set the
numerical display properties.
 [ASCII Display]: Click to open the ASCII Display Settings window and set the
ASCII display properties.
 [Date/Time]: Click to open the date/time setting window and set the date/time
display content.
 [Timer]: Click to open the timer settings window and set timer properties.
 [Item Menu]: Click to open the project menu settings window, and set the display
type and appearance properties of the project menu.
 [Picture Display]: Click to open the image display settings window and select the
image as the display content.
 [GIF Display]: Click to open the GIF display settings window, and select the GIF
dynamic image as the display content.
7
 [Text]: Click to open the text setting window and set the text as the display
content.
 [Message Display]: Click to open the message display settings window and set
the text message as the display content.
 [Alarm]: click to select the alarm bar/alarm display/time display/Gantt chart chart
setting window, and set the display properties, etc.
 [Data Acquisition]: click to select data to display its/Run chart/disc curve chart
setting window, and set the data items to be displayed.
 [Recipe related]: Click to select the formula display/formula selector/setting
window, and set the formula items to be displayed
 [Dynamic Drawing]: Click to select a flow block/dynamic drawing/dynamic
scale/mobile graphics/animation settings window, set appearance properties, etc
 [Chart]: Click to open the chart setting window, and set the chart display type and
appearance attribute content.
 [Data Transmission (window)]: Click to open the window data transfer settings
window, modify/add data transfer items, etc.
 [QR Code]: Click to open the QR code setting window, and set the content and
attributes of the QR code.
 [Direct Window]: Click to open the direct window settings window, set the
display type of the direct window, and so on.
 [Indirect Windows]: Click to open the Indirect Window Settings window and set
the display type of the indirect window.
 [Action Trigger (window)]: Click to open the action trigger (window) setting
window, modify/add/delete action trigger (window) actions, etc.
 [File Browser]: Click to open the file browser settings window, and set the file
browser properties.

8
1.2.5 Mapping

Chat 1.2-5
 [Line]: Use this command to draw a straight line in any direction within the
current screen.
 [Broken Line]: Use this command to draw a line in any direction within the
current screen.
 [Curve/Arc]: Use this command to draw a straight line in the current screen,
right-click to cancel the drawing, and adjust the arc as needed.
 [FreeLine]: Use this command to draw a line in any direction within the current
screen, and the line will be drawn as the mouse moves.
 [Rectangle]: Use this command to draw a rectangle of any size within the current
screen.
 [RoundRect]: Use this command to draw any rounded rectangle in the current
screen.
 [Polygon]: Use this command to draw any polygon in the current screen.
 [Circle/Ellipse]: Use this command to draw an ellipse of any size in the current
screen.
 [Sector]: Use this command to draw any fan in the current screen.
 [Table]: Use this command to create the desired number of rows and columns in
the current screen as the underlying table.
 [Scale]: Use this command to draw the scale that the user needs.

9
1.2.6 Add

Chat 1.2-6
 [Alarm Event]: Open the alarm event setting window to create or modify alarm
events.
 [Data Acquisition]: Open the data collection settings window to establish or
modify data collection.
 [Recipe]: Open the recipe setting window to create or modify the recipe.
 [Custom Keyboard]: Open the custom keyboard settings window to select
keyboard styles and modify keyboard button styles.
 [Schedule]: Open the scheduling settings window to create or modify the
schedule.
 [Text Library]: Open the text library settings window to create or modify the text
library.
 [Data Transmission]: Open the data transmission settings window to establish or
modify data transmission.
 [PLC Control]: Open the PLC control settings window and modify the PLC
control settings.
 [Initialize Macro]: Open the initialization macro setting window, and modify the
macro instruction with or without calling it.
 [Global Macro]: Open the global macro settings window and modify macro
instructions with or without calling them.

10
 [Data Synchronization]: Open the bit setting window for the data synchronization
word address/bit address/word, and make settings and modifications.
 [Action Trigger (Background)]: Open the action trigger (background) setting
window and make settings modifications.

1.2.7 Tool

Chat 1.2-7
 [Upload Data]: After connecting the PC and touch screen using a download
cable/Ethernet cable, click Upload Data in the menu bar tool, and the system will
pop up a dialog box as shown in the following figure.
 [Download Project]: Use this command to download the set configuration to the
screen.
 [Offline Simulator]: Using this command, the simulation panel can be opened,
and users can simulate the current project configuration on a PC to observe the
effect and correct the screen. Please save before offline simulation.
 [Online simulation]: This command can be used to open the simulation panel,
which allows users to simulate the current project configuration on a PC to
observe the effect and correct the screen. Please save before offline simulation.
 [Upgrade]: Use this command to open the upgrade window, click Browse to
select the underlying file to be upgraded, and update the touch screen's
underlying file.
 [Bottom version number]: Use this command to open a query window, query the
current software version information, and click Query to view the current bottom
version of the touch screen.

11
1.2.8 Help

Chat 1.2-8
[Help]: Enter the configuration software help system.
[About]: Prompt for configuration software version number and copyright description.

1.2.9 Language

Chat 1.2-9
[Chinese]: Select the Simplified Chinese version of the software.
[English]: Select the English version of the software.

1.3 toolbar

The configuration screen editing software provides four toolbars, including


"standard toolbar, extended toolbar, configuration toolbox, Standard state bar,

information output window, project manager" and other toolbars。

1.3.1 standard toolbar

Chat 1.3-1

 :New construction projects. The shortcut key Ctrl+N allows you to create a
blank project using this command;

12
 :Create a new screen. Use this command to create a new screen in the current
project;

 :Open the project. The shortcut key Ctrl+O allows you to open project files
that have been created and saved by the user under Windows;

 :Save. The shortcut key Ctrl+S allows you to save the current modified
screen configuration. The file name and save path default to the original file name
and save path;

 :Grid. Click to add grid lines on the screen;

 :Lock. Use this command to lock the selected buttons on the screen, which
cannot be moved after being locked;

 :Unlock. Use this command to unlock the screen buttons;

 :Combination. Use this command to combine multiple selected graphic


objects into one graphic object;

 :Ungroup. Using this command can decompose the selected graphic object
generated by the combination command into a single graphic object, which is the
inverse operation of the combination command;

 :Revoke. Shortcut keys Ctrl+Z, use this command to cancel the last operation
command, and use this command to cancel your last operation;

 :Restore. Shortcut key Ctrl+Y, use this command to restore the last operation
command, and use this command to restore your most recent operation;

 :Previous screen. Switch the current screen to the previous screen;

 :Next screen. Switch the current screen to the next screen;

 :Align left. Use this command to align the left boundary of multiple selected
graphic objects on the left side;

13
 :Center horizontally. Use this command to center multiple shapes you have
selected horizontally;

 :Align right. Use this command to align the right boundary of multiple
selected drawing objects on the right side;

 :Align up. Use this command to align the upper boundaries of multiple
graphic objects you have selected with the upper edges;

 :Vertically centered. Use this command to center multiple shapes you have
selected vertically;

 :Bottom alignment. Use this command to align the lower boundaries of


multiple selected graphic objects at the bottom;

 :Same width. Use this command to make the graphic width of the selection
group the same; Set the benchmark based on the last selected control;

 :Same height. Use this command to make the height of the selected group's
graphics the same; Set the benchmark based on the last selected control;

 :The height and width are the same. Using this command can make the width
and height of the selected group's graphics the same; Set the benchmark based on
the last selected control;

 :Color consistency. Use this command to unify the colors of different shapes
into consistency, using the last selected control as the setting benchmark;

 :Horizontally equidistant. Use this command to perform horizontal equidistant


operations between multiple (3 or more) shapes you have selected;

 :Vertically equidistant. Use this command to perform vertical equidistant


operations between multiple (3 or more) shapes you have selected;

 :Equal distribution. Average the horizontal distance of the selected control;

14
 :The horizontal center point of the window. Adjust the selected content to the
horizontal center position of the screen/window;

 :The vertical center point of the window. Adjust the selected content to the
vertical center position of the screen/window;

 :Move to the top level. Use this command to place the selected graphic object
at the top of the screen;

 :Move to the lowest level. Use this command to place the selected graphic
object at the bottom of the screen;

 :Move to the previous layer. Use this command to move the selected graphic
object up one level;

 :Move to the next level. Use this command to move the selected graphic
object down one layer;

 :Flip vertically. Use this command to flip a single or multiple selected shapes
around the horizontal center axis;

 :Flip horizontally. Use this command to flip a single or multiple selected


shapes around the vertical center axis;

 :Restore. Use this command to restore the current screen to its standard size;

 :Zoom in. Use this command to double the current screen size. To continue
zooming in, please continue executing this command;

 :Zoom out. Use this command to double the current screen size. To continue
shrinking, please continue executing this command;

 :Move up one grid. Move the selected content up one pixel;

 :Move down one grid. Move the selected content down one pixel;

 :Move left one grid. Move the selected content to the left by one pixel;

15
 :Move one grid to the right. Move the selected content to the right by one
pixel;

 :Reduce height. Reduce the height of the selected control by one pixel;

 :Increase height. Increase the height of the selected control by one pixel;

 :Reduce width. Reduce the width of the selected control by one pixel;

 :Increase the width. Increase the width of the selected control by one pixel.

1.3.2 Expand toolbar

Chat 1.3-2
 :Offline simulation. Offline simulation can be achieved as long as the
software communicates with the PC;

 :Online simulation. It requires software, a PC, and a touch screen to achieve


online simulation, which is more intuitive and realistic;

 :Download the project. Download the written configuration to the touch


screen;

 :Upload data. Upload the configuration from the touch screen to the PC;

 :Upgrade. Connect the computer and HMI with a download cable to perform a
low-level upgrade of the HMI;

 :Macro instruction editor. Open the script browser and enter the macro
instruction editing interface;

 :Global macro. Enter the Global Macro Manager;

 :Initialize macro. Enter the initialization macro manager;

 :Macro instruction manager. Open the Macro Command Manager and view
the call details of macro commands in the configuration screen;

 :Macro instruction lookup. Find the call status of the specified macro
instruction in the project based on its name;

16
 :Attribute settings. Open the selected control property settings window;

 :Text list. Open the text list to view the text information of the specified
screen/all screens of the project, and edit and modify the text;

 :List of controls. Open the control list and view the usage of the specified
screen/all screens/custom display controls for the project;

 :List of addresses. Open the address list and view the usage status of the
specified screen/all screens/custom display addresses for the project;

 :Drawing library. Enter the Drawing Library Manager;

 :Cut. Cut the selected content;

 :Copy. Copy the selected content;

 :Paste, paste the cut/copied content onto the screen;

 :Delete, delete the selected content;

 :Find/Replace, open the Find/Replace window to find the usage of the


project's text/address in the project screen, and replace the text.

1.3.3 Standard state column

Chat 1.3-3
Standard state Bar: When a control is selected, the left and top coordinates of the
control, as well as the width and height of the control are displayed.

1.3.4 Information output window

Chat 1.3-4
The main function of the information output window is to output information about a
certain function currently being operated, such as address search, input address, click
OK, and the control name with the same written address will be output in the

17
information output window.

1.4 staging

1.4.1 system parameter

18
Chat 1.4-1
Used to configure parameters related to the entire project, such as setting the
cover window, permissions to run the project, and startup screen. There are several
control buttons:
 [Connections Setting]: Mainly used to set communication parameters between the
touch screen and the connected device through the communication port.
 [Screen]: Set the HMI screen.
 [Window]: Set the HMI window.
 [Startup screen]: Set the HMI startup display interface.
 [Custom Keyboard]: When users need to use their own defined keyboard
functions and styles, they can set the required custom keyboard through the
combination of function key controls, numerical controls, character controls,
images, text, and other controls.
 [System Window]: The built-in window of the system.
 [System Settings]: In order to ensure the normal operation of the configuration
project in the touch screen, including normal communication with the PLC, the
parameters must be set in the configuration.
 [Parameter Setting]: Set the selection and initial parameters of the project
 [Condition Setting]: Set the conditions in advance and call them in Alarm Event
Multi condition Alarm and Permission Setting.
 [Network Settings]: Set up the local network.
 [Download Status Setting]: Set the download project.
 [HMI Status]: Set the HMI status.
 [PLC control]: The data transmission between PLC and HMI is controlled by the
value of the trigger address.
 [Clock]: The clock can be written to the HMI system through the PC, or the HMI
system time can be synchronized to the PLC or the PLC time can be
synchronized to the HMI system clock through settings.
 [File Protection]: Protects the project. When file protection is set, the correct
password needs to be entered every time the project is opened.

19
 [HMI Protection]: Set the usage period of the HMI and notify the expiration date
in advance.
 [Language Settings]: When multiple languages are needed, language types can be
added to the language settings and used in conjunction with the text library.
 [Text Library]: When the control needs to use the labels in the [Text Library], it
can add labels in the [Text Library] and set corresponding states and text in
different languages. When adding a new language, it can be added in the
[Language Settings].
 [Macro Instructions]: Macro instructions are an advanced touch screen control
method that makes the touch screen more powerful. By programming macro
instructions, the touch screen can have the same logic and arithmetic operation
functions as PLC. Flexible use of macro instructions can achieve many powerful
functions that conventional controls cannot achieve, making your human-machine
interface more perfect, including global macros and initialization macros.
 [Recipe]: To use the recipe function, it is necessary to first complete the
configuration design of the recipe group before using the recipe components or
functions to display and edit the recipe.
 [Data transmission]: Data transmission refers to the transmission of data (word
values or bit states) from the source address to the target address at a fixed time
frequency, and the transmission method is timed.
 [Alarm Event]: The trigger conditions and alarm information of the alarm event
can be defined here. The HMI system will trigger the event according to the set
trigger conditions, and the alarm information will be displayed in [Alarm Bar],
[Alarm Display], [Event Display] and [Gant chart Chart].
 [Data acquisition]: the data can be collected in real time/historically, and the
trigger mode can be periodic/triggered. The collected data can be displayed in
[Data Display], [Run chart] and [Disk Curve Chart], or the collected data can be
saved to the USB flash disk.
 [Schedule]: Set the status of the bit address to ON or OFF at the specified time, or
write a value to the word address.
 [Data synchronization]: Data synchronization can achieve data exchange between
two serial ports on the touch screen.
 [Recipe Import/Export]: Recipe import/export can export existing recipes to a
USB drive, or import recipes from a USB drive into a recipe database.
20
 [Action trigger (background)]: When the conditions for idle time/numerical
changes are met, the action will be triggered.
 [Operation Record Settings]: Click to enable the operation record function, and
the operation record will be displayed in Operation Record Display.

21
Chapter2 Application Examples of Window Screen

The window display screen of the human-machine interface bears the heavy
responsibility of directly interacting with engineering users. This chapter displays
several commonly used window screen display methods through configuration
software, allowing users to quickly grasp the commonly used window screen function
configuration methods.
As shown in Figure 2-1, users can click [New Screen] and set user screen
attributes (such as screen name) in the screen attribute settings. Window Similarity.

Chat 2-1

22
Chat 2-2
Enter [Screen Properties] to set the screen name, number, etc. As shown in
Figure 2-3.

Chat 2-3

23
2.1 Engineering Business Card

This section mainly introduces how to set the initial window number, startup
screen, and QR code display information function for the project.

2.1.1 Initial window number and startup screen settings

Initial window number and startup screen function: For configuration software
engineering, the startup sequence of user window screens is: startup screen → initial
window. If the project selects' No startup screen required ', the' Initial window 'will be
displayed directly during offline simulation.
 Startup screen
The startup screen serves as the first user interface displayed in the project, and
its display time can be manually specified. When the startup screen runs, wait for the
cover window display time to run out, and the project will automatically open [Initial
Screen].
The method for setting the startup screen is as follows:
Method 1: When creating a new project, after setting the project name, click
[Next] → [Next]. The following interface will appear, where you can set the image
position and time of the startup screen. As shown in Figures 2.1-4;

24
Chat 2.1-4
Method 2:
① Select and right-click on [Start Screen] in the left system parameter bar, click on
[Add Start Screen], as shown in Figure 2.1-5.

25
Chat 2.1-5
② Set the startup screen image and time, click [OK] to set the successful startup
screen.

26
Chat 2.1-6
 Initial screen
Initial screen: As the user window that starts after the display of the startup
screen is completed, it also needs to be manually set by the user. The initial screen can
be set by the following methods.
① Double click on [Parameter Setting] in the left system parameter bar to enter
the parameter setting interface, select [General Properties] → [Initial Window
Number], as shown in Figure 2.1-7.
Note: This number refers to the numerical number before the screen name.

27
Chat 2.1-7

2.1.2 QR code display information

Users who use configuration software can display character information in a QR


code format through the built-in QR code control of the software. Users can use an
app with a "scan" function on their phone or directly use a QR code scanner to scan
and obtain the displayed QR code information while the project is running.
The method for setting the QR code is as follows:
① Click on the [QR Code] control in Figure 2.2-1 to enter the attribute setting
interface of the QR code control; Set the bit address in the QR code control property

28
setting interface, as shown in Figure 2.2-2; The QR code control needs to be used
with an ASCII display or numerical display. By inputting data to a specified word
address, a corresponding QR code of the data can be generated in the window for
scanning.

Chat 2.2-1
② Double click on the QR code control in Figure 2.2-1 to enter the attribute setting
interface of the QR code control shown in Figure 2.2-2;

29
Chat 2.2-2
QR code attribute configuration information
a. Calibration standards:The fault tolerance of the QR code can be selected.
(Fault tolerance refers to the ability of QR codes to read content even in a damaged
state).
b. Color: Select the display color for the QR code.
c. Unicode: When checked, the content of the two-dimensional barcode will be
generated in Unicode encoding form.
d. Length: The length of data displayed in the QR code.

2.2 Data display and input

The display and input of data are commonly used functions by users during
engineering configuration. Configuration software provides dedicated label controls
and input box controls to achieve data display and input functions.

30
2.2.1 numeric display

Numeric controls include numerical input and display, where data is written in
numerical form to a specified register address or read from a specified register address
and displayed in numerical form.
The usage method is as follows:
① Click on the [Numerical Display] control in Figure 2.2-3 to enter the
numerical display property setting interface, where you can set bit addresses and other
information;

Chat 2.2-3

② Double click on the numerical display control in Figure 2.2-3 to enter the
interface for setting the properties of the numerical display control;
Numerical display attribute configuration information
a. Enable input function: Check this option and when clicked, a keyboard will
pop up for numerical input.
b. Address: Select the address corresponding to the protocol in the device,
which can be an external address or an internal address (word address) of the touch
screen.

c. Offset address: When this option is checked, the read/write address can be
specified through the offset address; Actual address=value of read/write address+offset
address.

31
2.2.2 ASCII Display

Enter or display text and symbols within a word address.


The usage method is as follows:
① Click on the [ASCII Display] control in Figure 2.2-4 to enter the ASCII
Display Attribute Setting interface, where you can set bit addresses and other
information;

Chat 2.2-4

② Double click on the ASCII display control in Figure 2.2-3 to enter the ASCII
display control property setting interface;
ASCII Display Attribute Configuration Information
a. Enable input function: If this option is checked, it means that the keyboard will
pop up when touching the ASCII code display, allowing you to input the desired
characters on the keyboard. If this option is not checked, it means that the ASCII code
display can only display characters and cannot input characters.
b. Multi line display: When the number of input characters reaches the maximum
number of digits on a single line of the display, the excess will be displayed in a new
line (alignment methods are top, center, and bottom).
c. Password: After checking this option, the display of characters when entering
characters is in the form of *, which is a mask.

32
d. High and low byte swapping: The value taken by the user from the word
monitoring address is swapped between high and low bytes before being displayed,
that is, the first input character is converted to the second input character before being
displayed. For example, when entering AB, BA is displayed, and every two characters
are swapped.

e. Address: Select the address corresponding to the protocol in the device, which can

be an external address or an internal address (word address) of the touch screen.

f. 2.3 Enter keyboard settings


Components with input functions (such as input boxes and label components)
can be set with keyboard types. The configuration software supports the following
two keyboard input methods:
System default keyboard: The system keyboard is selected by default without
selecting a custom keyboard;
Custom keyboard: The input keyboard customized by users during engineering
configuration. The configuration software comes with three custom keyboards.
This section mainly explains the usage of the system default keyboard and
custom keyboard.

2.3.1 System default keyboard

Taking the ASCII display as an example, the default keyboard setting method for
the system is as follows:
[ASCII Display]→[Numeric Input] → Uncheck [Use Custom Keyboard].

33
Chat 2.3-1

2.3.2 Customize Keyboard

A custom keyboard can be used to replace the system default keyboard, which
essentially places the keyboard button in a specified window and then calls this
window through components such as input boxes to implement the custom keyboard
function.
When users need to use their own defined keyboard functions and styles, they
can use the combination of function key controls, numerical controls, character
controls, images, text, etc. to set the desired custom keyboard.
The system comes with a custom keyboard, as shown in Figure 2.3-2,

Chat 2.3-2

34
There are two ways to set up a custom keyboard.
Method 1: Add a custom keyboard.
① Select a custom keyboard and right-click to add a new one.

Chat 2.3-3
② Add function buttons on the custom keyboard screen and select keyboard input.

Chat 2.3-5
③ Select the corresponding kinetic energy in the keyboard input, such as Enter, and
note the function in the text position.

35
Chat 2.3-6
④ After clicking OK, place it in the appropriate location.

Chat 2.3-7
Operation attribute configuration information
a. Enter: Enter operation on the same keyboard.

36
b. Backspace: Same as the Backspace operation on the keyboard.
c. Clear: Clears data that has been entered but not confirmed by the input control.
d. Esc:Can be used to close pop-up keyboard windows.
e. Delete:Delete operation on the same keyboard.
f. Left:Left arrow key(←) operation on the same keyboar.
g. Right:Right arrow key (→) operation on the same keyboard.
h. Line feed:line feed.
i. Inc:Add one to the current value.
j. Dec:Reduce the current value by one.
k. ASCII / UNICODE:Set the text that needs to be input.

2.4 Public window function


The 'public window (screen)' can be seen as a template window referenced by
other windows (screens). Corresponding to the concept of public window (screen) is
"host window (screen)", which refers to the user window (screen) that references the
public window (screen). In the same project, any user window (screen) can be
designated as a public window (screen) of another user window (screen). All
components in the public window (screen) can be inherited by the host window
(screen) and displayed at the bottom level of the host window (screen).
The operation steps are as follows (taking the window as an example):
① Run the configuration software and create two new user windows, as shown
in Figure 2.4-1:

37
Chat 2.4-1
② We choose ‘Window 4’ as the host window and ‘Window 3’ as the public
window. Double click on window 3 to enter the configuration screen of window 3;
③ Follow the steps shown in Figure 2.4-2 to add a "Time/Date" configuration in
the "Window 3" screen, and save the project after adding it;

Chat 2.4-2
④ Right click on window 3, click on 'Properties' to open the attribute setting
interface of window 3, check' Set as Public Window ', as shown in Figure 2.4-3;

38
Chat 2.4-3
⑤ Right click on window 4, click on 'Properties' to open the attribute setting
interface of window 4. Check' Use Public Window 'and set the public window as
window 3. As shown in Figures 2.4-4;

39
Chat 2.4-4
⑥ After completing the above steps, "Window 4" will display as shown in
Figure 2.4-5. You can see that the screen of the host window "Window 4" displays the
specified configuration of "time/date" in the public window "Window 3".

40
Chat 2.4-5
Precautions for setting public windows (screens):
 Components and window scripts in public windows (screens) can be displayed or
executed normally in the host window (screen);
 The components in the public window (screen) are displayed at the bottom of the
host window (screen) and can only be edited in the public window (screen);
 The background color of the public window (screen) will not be displayed in the
host window (screen);
 One common window (screen) can be referenced by multiple host windows
(screens), but one host window (screen) can only reference one common window
(screen).

41
Chapter3 Example of Animation Function Application

This chapter mainly introduces the usage methods and application examples of
several simple and commonly used components, as well as the properties, method
functions, and event functions of components or windows.

3.1 Analog instrument display

Function definition: Use the instrument to display numerical values within a


word address.
The rotating instrument component is a kind of animated figure simulating the
rotating pointer instrument, which is used to display the values of the connected
integer and Floating-point arithmetic variables. The pointer of the rotating instrument
component constantly changes its position with the change of variable value, and the
scale value pointed by the pointer is the current value of the connected variable.
① Click on the instrument component on the right toolbar and place it in the
appropriate position and size on the screen. As shown in Figure 3.1-1;

Chat 3.1-1
② Double click on the instrument component to pop up the 'Instrument Attribute
Settings' interface, as shown in Figures 3.1-2 and 3.1-3;

42
Chat 3.1-2

Chat 3.1-3
43
Basic Attribute Configuration Information
1) General attributes
a. Minimum value: Set the minimum value of the instrument;
b. Maximum value: Set the maximum value of the instrument;
c. Display numerical representation: After checking, you can set the color and
value of the upper/lower limit;
2) Appearance Properties

A.Dial Style:

a. Quick mode:Select the system style as needed. There are the following
options:Circle: Set the performance as a circle, and the pointer can be up, down, left,
or right; Three quarters of a circle: Set the dial to three quarters of a circle, and the
pointer can be up, down, left, or right; Half circle: Set the dial to half circle, with
options of left half circle, right half circle, upper half circle, and lower half circle;
Quarter circle: Set the dial to quarter circle, and options include right, bottom right,
left, top left, bottom left, bottom left, top right, and top right;
b. Use image:Check this option to select system image or external image as the
instrument panel;
c. Custom style: Start angle - Set instrument start angle, End angle - Set
instrument end angle;
d. System Image Library: Click this button to select an image from the system
as the background for the instrument;
e. External image library: Click this button to select an image from the external
(local to the computer) as the background for the instrument;
B. Watch Pin Style
a.Use Background: Check this option to customize the background and border
colors of the instrument;
b.Background color: Set the instrument background color;
c.Border color: Set the instrument border color;
C. Scale Style (Check this option to set the instrument scale style, otherwise

44
the scale will not be displayed)
a. Display Scale Axis: Check this option to set the scale axis style. Scale color
- Set the color of the instrument scale; Scale position - Set the scale to be located
inside or outside the instrument scale axis; Number of main divisions - Set the number
of main divisions on the dial; Number of sub divisions - Set the number of sub
divisions on the dial; Main scale length - Set the main scale length of the dial; Sub
scale length - Set the sub scale length of the dial;
b. Scale Text: Check this option to set the scale font type and size, as well as
the decimal places. Font - Set the scale font; Font size - Set the font size for the scale;
Decimal Places - Set the scale decimal places.
③ To demonstrate the operational effectiveness of the instrument, we add a numerical
display component that associates bit addresses with the instrument, as shown in
Figures 3.1-4;

chat 3.1-4
④ After saving the project, download it and start running. Enter a value of 0-100
in the numerical display, and you can see the pointer pointing back to the
corresponding position. As shown in Figures 3.1-5.

45
Chat 3.1-5

3.2 Animation function configuration

3.2.1 GIF

When users need to use an existing animation effect, they can use GIF
components to load GIF animations, which can be displayed multiple times or looped
during runtime. Let's take loading the following animation as an example to explain it
to everyone.
① Click on the GIF display component on the right toolbar (or double-click on the
GIF display component in the screen) to enter the GIF display component attribute
setting interface, as shown in Figure 3.2-1;

46
Chat 3.2-1
② Click on the select file icon next to 'Run Test' and select the GIF image path. Select
the image and click the [OK] button; As shown in Figure 3.2-2;

Chat 3.2-2
③ After adding GIF animation, a preview of the image will appear on the property
settings interface for users to view the effect. Click on 'Run Test' to preview, as shown
47
in Figure 3.2-3;

Chat 3.2-3
④ Add the GIF component to the appropriate position and size in the screen, as
shown in Figures 3.2-4;

48
Chat 3.2-4
⑤ Set [Controlled Setting], When the positioning address is set to ON/OFF, the image
will be dynamically displayed, and vice versa, a static action will be displayed. Set bit
address: Refers to the control address of the location address, as shown in Figure
3.2-5;

49
Chat 3.2-5
⑥ After saving the project, download it and start running it, as shown in Figure 3.2-6;

Chat 3.2-6

50
3.2.2 Twinkle
There are two types of twinkling effects, text flickering and control twinkling.
Below are the usage and effects of these two twinkling methods.
① Text twinkling . Each control with text attribute settings can be set to text
flashing with three frequencies (none, 0.5 seconds, 1 second). The setting method is
as follows: a. Click (or double-click) the control to enter the attribute setting
interface; b. Click [Text] to enter the text attribute setting interface; c. Set the
flashing frequency, as shown in Figure 3.2-7;

chat 3.2-7
② The control flashes. Only the [Bit Status Indicator] control can be set to flash. The
setting method is as follows: a. Click (or double-click) the bit status indicator button
to enter the bit status button property setting interface; b. Set the flashing mode, as
shown in Figure 3.2-8.
51
Chat 3.2-8
There are five twinkling modes:
Mode I : Normal display of 0 state and 1 state images;
Mode II: When the state is selected as 0, the images will be displayed alternately.
When the address reading state is 1, the 0 state image and 1 state image will switch
back and forth at the set fixed frequency. For example, if the frequency is set to 0.5S,
the 0 state image will be displayed for 0.5S, and after 0.5, the 1 state image will be
displayed. This cycle switches. If the address reading state is 0, the 0 state image will
be displayed, and there will be no cycle switching images;
Mode III: When the state is 1, the images are displayed alternately. When the
address reading state is 0, the 0 state image and 1 state image will switch back and
forth at a set fixed frequency. For example, if the frequency is set to 0.5S, the 0 state
will be displayed for 0.5S, and after 0.5, the 1 state image will be displayed. This

52
cycle of switching occurs. If the address reading state is 1, the 1 state image will be
displayed, and there will be no cyclic switching of images;
Mode IV: Blinking when the state is 0. When the address reading state is 0, the 0
state image will be displayed and hidden at a fixed frequency. For example, if the
frequency is set to 0.5S, the 0 state image will be displayed for 0.5S, and then the 0
state image will be hidden after 0.5. This cycle switches to flashing. If the address
reading state is 1, the 1 state image will be displayed without flashing;
Mode V: Blinking when the state is selected as 1. When the read address state is
1, the 1 state image will be displayed and hidden at a fixed frequency. For example, if
the frequency is set to 0.5S, the 1 state image will be displayed for 0.5S, and then the
1 state image will be hidden after 0.5. This cycle switches to flashing. If the read

address state is 0, the 0 state image will be displayed without flashing;

3.2.3 horse race lamp

In order to make the prompt content more eye-catching, you can set a marquee
effect on the text, which is a scrolling display of the prompt text.Every control with
text attribute settings can be set with a running light. The setting method is as follows:
click on the control to enter the text setting interface → set the text to be displayed →
set the direction of the running light (as shown in Figure 3.2-14) → set the speed of
the running light (as shown in Figure 3.2-15). If the moving direction is set to "not
moving", there is no need to set the speed.

53
Chat 3.2-14

54
Chat 3.2-15

3.3 Multi state display

3.3.1 Multi state button


① Operation mode: divided into four modes: increasing, decreasing, increasing
bypass, and decreasing bypass;
Increment: Each time the control is pressed, the value written to the address is
incremented by 1, and the increment stops when it reaches its maximum state;
Decrement: Every time the control is pressed, the value written to the address is
reduced by 1, and the decrease stops when it reaches the minimum state;
Incremental bypass: Each time the control is pressed, the value written to the
address is incremented by 1. When it reaches the maximum state, it returns to the
minimum state and continues to increment;
Decreasing and bypassing: Each time the control is pressed, the value written to
the address is reduced by 1. When it decreases to the minimum state, it returns to the
55
maximum state and continues to decrease;
Use Status Settings: Check this option to define the values corresponding to each
state, and click the Settings button to define the values for each state.

Chat 3.2-16
② Mode: divided into two types: data and LSB;
Data: Display image status or text content based on the numerical value of the
read address.
LSB: Converts the read value to binary, with the lowest bit not 0 as the current
displayed image state or text content.

3.3.2 Multi state settings


Action Type: Set the action type of the control;
Write Constant: Click this button to write the set value to the specified register
address;
Write Constant (Press&Release): Click and release this button to write the set

56
value to the specified register address;
Incremental: Click this button to add the incremental value to the value in the
specified register, but increase the value to [maximum value] to stop the incremental
process;
Decrement: Click this button to subtract the decreasing value from the value in
the specified register, but decrease the value to the minimum value to stop decreasing;
Press and hold the button while incrementing: When the button is clicked for
more than [Delay Time], the value in the specified word address will be incremented
by [Incremental Speed] and [Incremental Value], and incrementing will stop when it
reaches [Maximum Value];
Decrement when pressing and holding the button: When the control is pressed
for more than [hysteresis time], the numerical value within the specified word address
will be subtracted from [decreasing value] at [increasing speed]. Decrement to
[minimum value] will stop decreasing;
Cycle cycle (0 → maximum value → 0): According to the cycle set in
[Frequency], add [Incremental value] to the value in the specified word address until
the value equals [Maximum value], and then return to the 0 value to continue
repeating the above action;
Automatic increment (increase to maximum value): According to the cycle set
in [Frequency], add [Incremental Value] to the value within the specified word
address, and stop incrementing when it reaches [Maximum Value];
Automatic increment (decrease to minimum value): Subtract the value within
the specified word address from the cycle set in [Frequency] by [Decrement value],
and decrease to [Minimum value] to stop decrement;
Cycle cycle (custom range): According to the cycle set in [Frequency], add
[Incremental value] to the [Minimum value] set at the specified word address until the
value equals [Maximum value], then subtract [Incremental value] from [Maximum
value] until [Minimum value], and cycle back and forth;
Cycle increment (from low to high): According to the cycle set in [Frequency],
add [Incremental Value] to the minimum value set for the specified word address until
57
the value equals [Maximum Value], and then return to the minimum value to continue
repeating the above action;
Cycle increment (from high to low): According to the cycle set in [Frequency],
subtract [Descending value] from the [Maximum value] set at the specified word
address until the value equals [Minimum value], and then return to the maximum
value to continue repeating the above action;
Set when the window is opened: When the interface where the control is located
is opened, the set constant is automatically written to the specified word address;
Set when the window is closed: Automatically write the set constant to the
specified word address when exiting the interface where the control is located;
Set when the backlight is turned on: When the backlight is turned on, the set
constant is automatically written to the specified word address;
Set when the backlight is turned off: Automatically write the set constant to the
specified word address when the backlight is turned off;
Recurrent addition: When pressing and releasing the control, add the value
within the specified word address to the [Incremental Value], and increase it to the
[Maximum Value] to return to the minimum value and repeat the above action;
Circular decrement: When pressing and releasing the control, subtract the value
within the specified word address from the [decrement value], and reduce it to the
[minimum value] to return to the maximum value and repeat the above action;
Cyclic addition while holding down the button: When the control is pressed
and not released, the numerical value within the specified word address is
automatically added to the [Incremental Value], and when it reaches the [Maximum
Value], the minimum value is returned and the above action is repeated;
Cyclic decrement while holding down the button: When the control is pressed
and not released, the value within the specified word address is automatically
subtracted from the [decrement value]. If it is reduced to the [minimum value], the
maximum value is returned and the above action is repeated;
Configuration information for basic attributes:
The appearance attribute settings are mainly used for the multi-state display of
58
components' appearance and text. Components can display the appearance and text of
corresponding segmentation points based on the values of associated variables; Or
when the conditions are met, automatically switch and display the appearance and text
of each segmentation point according to the specified frequency, and dynamically
switch and display multiple images and text to achieve specific animation effects.
The basic properties of the animation button are mainly used to increase or
decrease the number of way points and set the corresponding appearance features for
each waypoint. The basic properties page includes the appearance and text.

59
Chapter4 Application Examples of Alarm Function

The MGC configuration software provides real-time and historical alarm


functions. By configuring the alarm function, users can better grasp the operation of
on-site equipment and ensure product production safety.

4.1 Introduction to alarm functions


Add alarm event: define the trigger condition and alarm information of the alarm
event. The HMI system will trigger the event according to the set trigger condition,
and the alarm information will be displayed in [Alarm Bar], [Alarm Display], [Event
Display] and [Gantt chart Chart].
The [Add Alarm Event] interface is shown in Figure 4.1-1.

chat 4.1-1
You can click the [Add] or [Batch Add] button to add alarm events. After adding,
you can use the [Alarm Bar], [Alarm Display], [Event Display] and [Gantt chart Chart]
controls and display the alarm information. The components that support alarm
60
display are shown in Figure 4.1-2.

Chat 4.1-2

4.2 Real time alarm configuration


After restarting the touch screen, the real-time alarm information will be cleared.
The real-time alarm configuration process is as follows:
On site users may need to monitor the data of the lower computer in real-time and
display its alarm information. We will learn various forms of alarm through an
example. Taking MGC070 as an example, Figure 4.1-3 shows the running effect of
the example.

Chat 4.1-3
Four commonly used alarm forms:
a. Bit alarm: Triggering an alarm by reading the status of a bit. When the status
of the bit address LB-3800 is off, a fault will be prompted, and this alarm information
will be scrolled and displayed on the screen through the "alarm bar" component;
b. Word alarm (upper and lower limit alarm): Trigger the alarm by reading the
61
value of the word and using different triggering conditions. When the value of the
word address LB-3810 is greater than 1000, it will prompt that the temperature is too
high. This alarm message is scrolled and displayed on the screen through the "alarm
bar" component;
c. Multi condition alarm: By setting [Condition trigger], multiple conditions are
set to trigger the alarm based on OR/AND logic. For multi condition alarms, the
condition index must be set first. Once the condition set by the condition index is
triggered, abnormal alarm information will be displayed on the screen.

4.2.1 Bit alarm configuration


When the status of the bit address LB-3800 is off, a fault will be prompted, and
this alarm information will be scrolled and displayed on the screen through the "alarm
bar" component.
Solution: The alarm content of address LB-3800 is fixed, and the alarm attributes
of the corresponding variable are directly set, and then displayed in the user window
using the "alarm bar" component (running light).
Add bit channel: In the parameter setting column on the left side of the software
interface, double-click "Alarm Event" to enter the alarm event setting interface, as
shown in Figure 4.2-4.

62
Chat 4.2-4
The method for adding alarm events using two buttons is as follows:
a. New alarm event: Click on the [Alarm Event] button at the bottom of the
alarm event interface → select the group number (range from 0 to 255) → set the
level → set the alarm type to "bit alarm" → set the bit address of the bit alarm → set
the triggering conditions (there are four types) → complete the setting and click
"Confirm" to see that the device editing window has successfully added an alarm
event;

63
Chat 4.2-5
b.Batch add alarm events: Click on the [Alarm Events] button at the bottom of
the alarm event interface, select the group number (range from 0 to 255), set the batch
creation quantity, read the interval address, set the level, set the alarm type to "bit
alarm", set the bit address of the bit alarm, set the triggering conditions (there are four
types), and click "Confirm" after setting, You can see that the device editing window
has successfully added alarm events in batches.

64
Chat 4.2-6
Here are four triggering conditions for word alarms:
 ON trigger: If the current alarm event item is set to ON trigger, an alarm will be
generated when the bit status of the alarm event item is read as ON;
 OFF trigger: If the current alarm event item is set to OFF trigger, an alarm will be
generated when the bit status of the alarm event item is read as OFF. As shown in
the following figure, if the alarm address of the alarm event item is set to M0 and
OFF is triggered;

65
 ON →OFF: An alarm will only be generated when the bit address changes from
ON to OFF state;
 OFF→ON: An alarm will only be generated when the bit address changes from
OFF to ON state.

4.2.2 Word alarm configuration

When the value in bit address LB-3810 is greater than 1000, a fault will be
prompted, and this alarm message will be scrolled on the screen through the "alarm
bar" component.
Solution: The alarm content of address LB-3820 is fixed, and the alarm
properties of the corresponding variable are directly set, and then displayed in the user
window using the "alarm bar" component (running light).
① Add word channel: In the parameter setting bar on the left side of the software
interface, double-click "Alarm Event" to enter the alarm event setting interface, as
shown in Figure 4.2-4;

66
Chat 4.2-7
The method for adding alarm events using two buttons is as follows:
a. New alarm event: Click on the [Alarm Event] button at the bottom of the
alarm event interface → select the group number (range from 0 to 255) → set the
level → set the alarm type to "word alarm" → set the word address of the bit alarm →
set the triggering conditions (there are six types) → complete the setting and click
"Confirm" to see that the device editing window has successfully added an alarm
event.

67
Chat 4.2-8
b. Batch add alarm events: Click on the [Alarm Events] button at the bottom of
the alarm event interface, select the group number (range from 0 to 255), set the batch
creation quantity, read the interval address, set the level, set the alarm type to "bit
alarm", set the bit address of the bit alarm, set the triggering conditions (there are six
types), and click "Confirm" after setting, You can see that the device editing window
has successfully added alarm events in batches;

Chat 4.2-9

68
Here are six triggering conditions for bit alarms:
 >If greater than trigger, if the current alarm event item is set to select a word, an
alarm will be generated when the value of the word address of the alarm event
item is read to be greater than the status value. If it is less than 10, the alarm will
be cleared.
 <: less than trigger, if the current alarm event item is set to select a word, an
alarm will be generated when the value of the word address of the alarm event
item is read to be less than the status value, and the alarm will be released when it
is greater than 20.
 ==If the current alarm event item is set to the selection word, an alarm will be
generated when the value of the word address of the alarm event item is read to
be equal to the status value. If it is not equal, the alarm will be cleared.
 <>: Not equal to triggering. If the current alarm event item is set to the selected
word, an alarm will be generated when the value of the word address of the alarm
event item is not equal to the status value. If it is equal, the alarm will be cleared.
 <=: Trigger if less than or equal to. If the current alarm event item is set to the
selected word, an alarm will be generated when the value of the word address of
the alarm event item is read to be less than or equal to the status value. If it is
greater than or equal to, the alarm will be cleared.
 >=Triggered if greater than or equal to, if the current alarm event item is set to the
selected word, an alarm will be generated when the value of the word address of
the alarm event item is read to be greater than or equal to the status value, and the
alarm will be cleared if it is less than or equal to.

4.2.3 Multi condition alarm configuration

① Add multi condition alarm channel: In the parameter setting bar on the left side of
the software interface, double-click "Alarm Event" to enter the alarm event setting
interface, as shown in Figure 4.2-4;

69
Chat 4.2-7
The method for adding alarm events using two buttons is as follows:
a.New alarm event: Click on the [Alarm Event] button at the bottom of the alarm
event interface → select the group number (range from 0 to 255) → set the level →
set the alarm type to "multi condition alarm" → set the condition index → select the
condition index → complete the setting and click "Confirm" to see that the device
editing window has successfully added an alarm event;

70
Chat 4.2-8
b.Batch add alarm events: Click on the [Alarm Events] button at the bottom of the
alarm event interface → select the group number (range from 0 to 255) → set the
level → set the level → set the alarm type to "multi condition alarm" → set the
condition index → select the condition index → click "confirm" after setting, and you
will see that the batch add alarm events are successful in the device editing window.

71
Chat 4.2-9

4.3 Alarm information display and operation

4.3.1 Alarm bar

When the current system meets the conditions for [Alarm Event], the alarm bar
will display a single line of customized event information in the alarm event.
Therefore, when using an alarm bar, an alarm must be established in the alarm event.

72
Note: To use this control, you must first establish alarm information in the "Alarm
Event" section.
The attribute setting diagram for the alarm bar is shown in Figures 4.3-11.

Chat 4.3-11
The method to display alarm events using an alarm bar is as follows:
① Add an alarm event first, please refer to section 4.2 for specific methods;
② Click on the alarm bar control icon on the right toolbar to enter the alarm bar
properties interface;
③ Set the range category to be displayed and the sorting and display order in
Sort;
There are two types of sorting:
Time sequence: If time sequence is selected, when moving, the old alarm
information will come first and the new alarm information will come later;
Time reversal: If time reversal is selected, when moving, the new alarm

73
information will come first and the old alarm information will come later;
Display order:
Display items: The selected display items will be displayed in the display order
item bar, and after an alarm, the alarm bar will display the selected display items;
Display order: The display order of the items displayed in the alarm bar after the
alarm is generated can be adjusted, as shown in the following figure. The display
order is the date of the alarm occurrence, the time of the alarm occurrence, and the
alarm information;

Chat 4.3-12

4.3.2 alarm display

Real time display of alarm information in the form of a table. Note: To use this
control, you must first establish alarm information in the "Alarm Event" section.
The attribute setting diagram for [Alarm Display] is shown in Figures 4.3-11.

74
Chat 4.3-13
The method of using an alarm display to display alarm events is as follows:
① Add an alarm event first, please refer to section 4.2 for specific methods;
② Click on the alarm display control icon on the right toolbar to enter the alarm
display properties interface;
③ Set the range category to be displayed and the sorting and display order in Sort;
There are two types of sorting:
① Time sequence: When sorting the alarm events that occur in chronological order,
the earliest alarm event that occurred will be displayed at the top, and the subsequent
alarm events will be sorted from the bottom in chronological order;
② Reverse sorting: When sorting alarm events in reverse chronological order, the last
alarm event that occurred will be displayed at the top, and the previous alarm events
will be sorted from the bottom in reverse chronological order;

Display order:

75
Alarm occurrence date: Display the alarm occurrence date, in a certain year, time,
month;
Alarm occurrence time: Display the alarm occurrence time, in hours, minutes, seconds,
and months;
Alarm information: Display the alarm content that needs to be displayed when setting
an alarm in the alarm event project;
Alarm count: displays the cumulative number of occurrences of the same alarm event;
Accumulated time: displays the accumulated time of the alarm when the same alarm
event item is triggered. When the alarm is cleared, it will no longer accumulate, but
the accumulated time will not automatically reset. When the event is triggered again,
it will continue to accumulate and display on the previous accumulated time;
Display items: After checking the relevant items, the corresponding item information
will be displayed in the alarm display, and the display order can be adjusted;

4.3.3 Event display

Real time/historical display of alarm information in tabular form. Note: To use


this control, you must first establish alarm information in the "Alarm Event" section.
The attribute setting diagram for Event Display is shown in the figure.

76
Chat 4.3-14
The method of using event display controls to display alarm events is as follows:
① Add an alarm event first, please refer to section 4.2 for specific methods;
② Click on the event display control icon on the right toolbar to enter the event
display properties interface;
③ Set the range category to be displayed and the sorting and display order in Sort;
There are two modes for event display:
Instant: Display the current alarm event after HMI startup. When an alarm event
occurs, the color of the message text can be changed by acknowledging the alarm
event. The HMI system will also write the confirmation value set in advance in the
event to the confirmation address during the alarm event;
History: You need to first check 'Save as Historical Alarm' in the alarm event to view
the alarm start time and alarm end time period in all historical alarm event items
based on the time settings, and view the alarms within this time period;

77
There are two types of sorting:
① Time sequence: When sorting the alarm events that occur in chronological order,
the earliest alarm event that occurred will be displayed at the top, and the subsequent
alarm events will be sorted from the bottom in chronological order;
② Reverse sorting: When sorting the alarm events that occurred in reverse
chronological order, the last alarm event that occurred will be displayed at the top,
and the previous alarm times will be sorted in reverse chronological order from the
bottom;

The property settings are as follows:


 Sequence number: Sort the alarms that occur by sequence number;
 Alarm occurrence date: Display the alarm occurrence date, in a certain year, time,
month;
 Alarm occurrence time: Display the alarm occurrence time, in hours, minutes,
seconds, and months;
 Event information: Display the alarm content that needs to be displayed when
setting an alarm in the alarm event project;
 Confirmation event: can display the time of confirming the alarm event item after
the alarm occurs;
 Restore normal time: can display the time to restore normal after the alarm is
cleared;
 Number of occurrences: displays the cumulative number of occurrences of the
same alarm event;
 Accumulated time: Display the accumulated time of the alarm when the same
alarm event item is triggered. When the alarm is cleared, it will no longer
accumulate, but the accumulated time will not automatically reset. When the
event is triggered again, it will be displayed in the previous accumulated time.

78
Chapter5 Trend Curve and Data Processing

An important application of touch screens is to display real-time trends and


historical trend curves, as well as to process received PLC data. This chapter's tutorial
mainly explains the trend curve display and data processing functions of the
configuration software.
Function: Display sampling data collected in a continuous line segment manner.
Note: To use this control, you must first set the collection address in "Data
Collection".

5.1 Real time trend curve

By providing real-time curve components through configuration software, it is


possible to display real-time trends of specified variables during project operation,
and to add curve components through configuration software tools, as shown in
Figure 5.1-1.
Real time collection: If this option is selected, the data obtained by calling this
data collection control does not support power-off saving.

79
Chat 5.1-1
This tutorial will explain the 2 trend curve types supported by real-time curve
components:
 Absolute clock trend curve: The Y-axis represents the value of the target
variable, while the X-axis represents the system time. It displays the change curve
of the variable relative to time and is the most commonly used type of real-time
curve.
 Relative clock trend curve: The Y-axis represents the value of the target
variable, while the X-axis represents other variables, displaying the change curve
of one variable relative to another variable. The relative clock trend curve can be
achieved through the "XY curve component".
The following is an introduction to the absolute clock trend curve:
Display the trend curve of the analog device channel address variable
"temperature" through the real-time curve component, requiring the Y-axis of the
curve to be the "temperature" value and the X-axis to be the system time. The curve in
the real-time curve component can be cleared through buttons. We learn real-time
trend curves by configuring an example.

Real time trend curve configuration:

The steps for setting up data collection are as follows:


① Double click on 'Data Collection' in the left system parameter selection bar, as
shown in Figure 5.1-2; Double click to enter the data collection add delete modify
query interface, as shown in Figure 5.1-3 (three samples have been added in the
figure);

80
Chat 5.1-2

Chat 5.1-3
② Click the [Add] or [Batch Add] button to add data collection and enter the new
data collection interface, as shown in Figure 5.1-4;

81
Chat 5.1-4
③ Select the collection mode as real-time collection, and there are two triggering
modes. The introduction of two triggering modes follows the steps.
④ Click on [Number of Channels...] to enter the interface for adding new channels, as
shown in Figure 5.1-5;

82
Chat 5.1-5
⑤ Click 'Add' or 'Batch Add' to add channels, and click 'OK' button to successfully
add channels;
⑥ Set the sampling technology address (specify a word register to record the current
total number of samples), check the enable sampling count address, as shown in
Figure 5.1-6;

83
Chat 5.1-6
⑦ Set the sampling address (set the designated word address as the starting address
for this data collection), as shown in Figure 5.1-7, where the sampling address starts
from LW-0;

Chat 5.1-7

84
⑧ Set the clear data address (set the ON/OFF status of the specified location address
to clear real-time data), check the enable clear data address, as shown in Figure 5.1-8;

Chat 5.1-8
⑨ Set the pause sampling address (set the ON/OFF status of the positioning address
to pause data collection), check the enable pause sampling address, as shown in
Figure 5.1-9;

85
Chat 5.1-9
Two triggering modes:
Periodic: If this mode is selected, the data collection will be based on the
set sampling cycle time. Collect one piece of data in one second.
Trigger mode: If this mode is selected, the data collection will be based
on the specified [bit address] status, such as when LB0 address is OFF → ON, a piece
of data will be collected.
Note: In step 7, the sampling address set is the starting address for data collection,
while other sampling addresses are incremented according to the set channel data
type.

The steps to use real-time trend curve configuration are as follows:

① Click the Run chart control on the toolbar, as shown in Figure 5.1-10. Enter the
Run chart attribute setting interface, as shown in Figure 5.1-11;

Chat 5.1-10

86
Chat 5.1-11

② Set the data collection index and select index 1: temperature collection from the
drop-down box, as shown in Figure 5.1-12;

87
Chat 5.1-12

③ Set the display mode to "Real time" (Display mode: select according to the
collection mode selected in "Data Collection", real-time "Real time
Collection"/historical "Historical Collection" mode);

④ Select channels: Click [Select from Current Line] or manually select. If you click
[Select from Current Line], a maximum of 64 channels will be selected in sequence.
As shown in Figures 5.1-13;

88
Chat 5.1-13

General Property Settings:

a. Automatically update data: If this option is checked, the historical data display
will automatically update and display on the historical data display after collecting
data. If it is not checked, the historical data display will not automatically update after
collecting data, and will only be updated once when switching to the interface where
the control is located;
b. If the data in the back stroke is too long, do not draw a line to connect: Check this
option. When the time is adjusted and the current data is continuously sampled, no
line will be drawn between the data at both ends to connect the distance between the
two sampling points. Select this option to set the line drawing distance between the
two sampling points;

89
c. The X-axis represents the time range: select this option to set the line drawing
distance between two sampling points within the set N seconds;
d. Dynamically adjust the X-axis time range: Set the value of the specified word
address to control the X-axis time range;
e. Display control: Set the positioning status to control the display of the curve;
f. View: Set the specified word address to display the numerical value of the selected
point;
Channel attribute settings:
a. Minimum value: Set the minimum value that can be displayed on the Y-axis of the
curve;
b. Maximum value: Set the maximum value that can be displayed on the Y-axis of
the curve;
c. Take from register: set the value of the specified word address as the minimum
and maximum value of the Y axis of the Run chart;
d. Channel display control: Set the bits of the specified word address to control the
display/non display of the channel.

Note: The acquisition mode in the data acquisition and the display mode in the Run
chart must correspond one by one, that is, the [Data Display] determines whether to
save after power-off according to the selection of the acquisition mode, and the
display mode of the [Run chart] is selected according to the data acquisition called, as
shown in Figure 5.1-13-14. Otherwise, a window as shown in Figure 5.1-15 will pop
up;

90
Chat 5.1-13

Chat 5.1-14

Chat 5.1-15

5.2 Historical data function

This tutorial mainly introduces the storage, display, and operation of historical
data.
History collection: If this option is selected, the data obtained by calling this data
collection control supports power-off saving.
By using the historical curve components provided by the configuration software,
real-time trends of specified variables can be displayed during project operation, and
curve components can be added through the configuration software tool, as shown in
Figure 5.1-1.

91
Chat 5.2-1
Historical trend curve configuration:
The steps for setting up data collection are as follows
① Double click on [Data Collection] in the left system parameter selection bar, as
shown in Figure 5.2-2; Double click to enter the data collection add delete modify
query interface, as shown in Figure 5.2-3 (three samples have been added in the
figure);

Chat 5.2-2

92
Chat 5.2-3
② Click the [Add] or [Batch Add] button to add data collection and enter the interface
for adding data collection, as shown in Figure 5.2-4;

Chat 5.2-4
③ Select the collection mode as historical collection, and there are two triggering
modes;

93
④ Click on [Number of Channels...] to enter the interface for adding new channels, as
shown in Figure 5.2-5;

Chat 5.2-5
⑤ Click 'Add' or 'Batch Add' to add channels, and click 'OK' button to successfully
add channels;
⑥ Set the sampling technology address (specify a word register to record the current
total number of samples), check the enable sampling count address, as shown in
Figure 5.2-6;

94
Chat 5.2-6
⑦ Set the sampling address (set the designated word address as the starting address
for this data collection), as shown in Figure 5.2-7. The sampling address starts from
LW-5700;

Chat 5.2-7

95
⑧ Set the clear data address (set the ON/OFF status of the specified location address
to clear real-time data), check the enable clear data address, as shown in Figure 5.2-8;

Chat 5.2-8
⑨ Set the pause sampling address (set the ON/OFF status of the positioning address
to pause data collection), check the enable pause sampling address, as shown in
Figure 5.2-9;

96
Chat 5.2-9
Two triggering modes:
Periodic: If this mode is selected, the data collection will be based on the
set sampling cycle time. Collect one piece of data in one second.
Trigger mode: If this mode is selected, the data collection will be based on
the specified [bit address] status, such as when LB0 address is OFF → ON, a piece of
data will be collected.
Note: The sampling address set in step 7 is the starting address for data collection,
while other sampling addresses are incremented according to the set channel data
type.
The steps to configure using historical trend curves are as follows:
① Click the Run chart control on the toolbar, as shown in Figure 5.2-10. Enter the
Run chart attribute setting interface, as shown in Figure 5.2-11;

Chat 5.2-10

97
Chat 5.2-11

② Set the data collection index and select index 1: temperature collection from the
drop-down box, as shown in Figure 5.1-12;

98
Chat 5.2-12

③ Set the display mode to "Real time" (Display mode: select according to the
collection mode selected in "Data Collection", real-time "Real time
Collection"/historical "Historical Collection" mode);

④ Select channels: Click [Select from Current Line] or manually select. If you click
[Select from Current Line], a maximum of 64 channels will be selected in sequence.
As shown in Figures 5.2-13;

99
Chat 5.2-13

100
Chapter6 Application Cases of Multiple Repetitive
Values

In the process of configuring the screen, it is often necessary to quickly create a


batch of animation components with different addresses (variables) of the same
quality, and in this case, multiple copy functions can be used.
Multiple replication components can be configured with items such as plain text,
multilingual text, variable names, and expressions.
 Multilingual text: Attribute values use multilingual item content, automatically
creating or associating corresponding multilingual item content. Not using
multilingual content, still not using multilingual content;
 Variable name: Automatically create corresponding variables in the real-time
database when the variable name does not exist;
 Expression: Automatically create corresponding variables in the real-time
database when there are unknown variables in the expression.
The multiple replication function only distributes content changes to items that
have been checked in the configuration of the changed item. Other unchecked items
remain consistent with the basic component content.
Here are the steps to use multiple copies of a single control:
① Drag a 'tag' component to the appropriate position and size in the screen. Double
click on the component to open the attribute setting interface. On the Attribute Setting
function page, set the attributes of the control such as Format, Image, and Font. Click
OK to save the settings and close the setting interface. Drag the control to the upper
left of the screen, leaving enough space for the next multiple repeated values, as
shown in the numerical display control added in Figure 6-1;

101
Chat 6-1
② Right click on this control and select 'Multi Copy' to open the multi copy attribute
setting interface, as shown in Figure 6-2;

Chat 6-2

102
③ Set the x/y direction attributes, for example, in Figure 6-3, set the number of copies
in the x direction to 8, the number in the y direction to 5, the interval in the x direction
to 5, and the interval in the y direction to 10;

Chat 6-3
④ Set whether the address is incremented, which is not checked by default. However,
in engineering applications, address incrementation is generally checked. Set whether
the address is incremented to the right (priority horizontal growth address) or
downwards (priority vertical growth address), as shown in Figure 6-4. Set the address
to the right and set the address increment interval to 1;

103
Chat 6-4
⑤ The rendering is shown in Figures 6-5.

Chat 6-5
Multiple replication configuration information
a. Number of components in the horizontal direction: the number of components in
the matrix in the horizontal direction, which cannot exceed the size of the image;
b. Number of vertical components: The number of components in the vertical
direction of the component matrix, which cannot exceed the size of the image;
104
c. Horizontal interval pixels: The interval pixels of the component matrix in the
horizontal direction, which cannot exceed the length of the image;
d. Vertical spacing pixels: The spacing pixels of the component matrix in the vertical
direction cannot exceed the width of the image;
e. Select the increasing order: address right increasing (priority horizontal allocation),
address down increasing (priority vertical allocation).

105
Chapter7 Application Examples of Pointer Function

The function of address offset is to collect the offset PLC address value through the
device driver's address offset, which is associated with the device channel's
[connection variable]. The read/write address can be specified by offsetting the
address.

The formula for calculating the offset address is: actual address=read/write
address+offset address value (actual address=LW [read/write address+offset address
value]). The offset address value is based on LW-0 offset, and the offset address value
can only be a positive number.

The offset address setting method is as follows:

① Drag and drop a component to set an offset address to the appropriate position and
size in the screen. Taking the numerical display component as an example, in order to
better demonstrate it, we will use the control introduced in Chapter 6 to replicate
multiple addresses consecutively. As shown in Figure 7.1-1;

106
Chat 7.1-1

② Double click on the component to pop up the attribute setting interface. Select to
check the offset address setting in the LW-106 attribute setting interface, where
LW-106 is the read write address and the offset address is set to LW-112. Click [OK]
as shown in Figure 7.1-2;

107
Chat 7.1-2

③ The effect image after offline simulation is shown in Figure 7.1-3. The read/write
address LW-106 and the offset address LW-100 are transformed together. For
example, if 10 is input in address LW-100, the value in address LW-106 is
synchronously transformed to 10;

108
Chat 7.1-3

109
Chapter8 Example of Formula Function Application

In the manufacturing field, formulas are used to describe the proportional


relationship between different ingredients used in the production of a product, and are
a set of parameter settings corresponding to some variables in the production process.
For example, when a bakery produces bread, there is an ingredient formula. This
recipe lists all the ingredients to be used to produce bread (such as water, flour, sugar,
salt, honey, etc.), and different flavors of bread will have different dosage of
ingredients. For example, sweet bread uses more sugar, while low sugar bread uses
less sugar. In the configuration software, the dosage information of each flavor of
bread ingredient is called a formula, and all bread formulas combined are called
formula groups. You can imagine a formula group as a table, where each column
represents a type of ingredient, each row represents a formula, and the data in the cells
represents the specific dosage of each ingredient.
The formula function of the configuration software series products can be
achieved through the formula selection dialog box, formula editing dialog box, and
various script operations to add, delete, modify, and query formula data. Below is an
explanation of the terms involved in recipe configuration:
 Formula group: A formula group is a collection of similar formulas that have the
same formula components. The difference is that the number of formula
components is different. In a formula group, formula names can be used to
distinguish these different formulas. The above table is a formula group as a
whole.
 Formula item: The formula item refers to the formula components of the formula,
such as sugar, salt, etc., as shown in Figure 8-1. Each column in the above table
represents a formula item.
 Recipe: The data members in the recipe group have the same recipe ingredients
but different quantities. Each row in the above table represents a formula.

110
 Variable Name: The name of the variable associated with the recipe item.
 Column Title: The recipe item is used to display the title text of (recipe
components, recipe editing), supporting multilingual settings; When importing
and exporting formulas, it serves as a matching basis and distinguishes between
languages, that is, formulas that cannot be imported or exported in Chinese in
English. The first row of the table above is the column title.

8.1 Configuration Recipe Group

To use the recipe function, it is necessary to first complete the configuration


design of the recipe group before using the recipe components or recipe functions to
display and edit the recipe.
 Configure a bread recipe group using the recipe function of McgsPro, which
includes three recipes: sweet bread recipe, low sugar bread recipe, and sugar free
bread recipe. Each recipe has 5 recipe items: sugar, salt, flour, water, and honey.
The steps to create a recipe group are as follows:
① Find [Recipe] on the left side, double-click to enter the recipe adding interface, as
shown in Figure 8.1-1;

Chat 8.1-1

111
② Add the recipe to the recipe list, add three recipes according to the example and
change their names, representing sweet bread recipe, low sugar bread recipe, and
sugar free bread recipe, as shown in Figure 8.1-2;

Chat 8.1-2
③ Click the [Add] or [Batch Add] button to add formula items, add 5 formula items
according to the sample and change their names, representing sugar, salt, flour, water,
and honey, as shown in Figure 8.1-3;

112
Chat 8.1-3
④ Click [OK] to create a new formula and complete it.
 Recipe import/export: Recipe import/export can export existing recipes to a USB
drive or import recipes from a USB drive to a recipe database.
The steps for creating a new recipe import/export are as follows:
① Find [Recipe Import/Export] on the left side, double-click to enter the Recipe
Import/Export Add interface, as shown in Figure 8.1-4;

Chat 8.1-4
113
② Click [New] to enter the interface for importing/exporting new formulas, as shown
in Figure 8.1-5;

Chat 8.1-5
③ Select the recipe to import/export and set the control address, as shown in Figure
8.1-6;

114
Chat 8.1-6
④ Set the file name and address, input the file name using an ASCII display, as
shown in Figure 8.1-7;

115
Chat 8.1-7
⑤ The practical application is to insert a USB flash drive on the touch screen and
enter the name of the folder already in the USB flash drive.

8.2 Recipe Group Components

After the creation of the recipe group, it is also necessary to display and edit the
recipe group. This section introduces the configuration process of using the [Recipe]
component to control the bread production process.

116
8.2.1 Recipe display components

The steps to set up the configuration recipe display components are as follows:
① Click on the [Recipe Display] component from the toolbar to enter the recipe
display attribute setting interface, as shown in Figure 8.2-1;

Chat 8.2-1
② Select the recipe name, that is, set the source of recipe data to be displayed, set the
text and appearance properties of the recipe display, click OK after setting, and the
effect image is shown in Figure 8.2-2;

117
Chat 8.2-2
Basic Attribute Configuration Information:
 Name: Set the source of recipe data to be displayed;
 Enable: After enabling, the sorting method of recipe content can be set;
 Order: Recipe data will be displayed in sequential order;
 Reverse order: Formula data will be displayed in reverse order;
 Transparent: When enabled, the title of the recipe display will be transparent
without background color;
 Font: Set the font for the recipe display;
 Font size: Set the font size of the recipe display;
 Number of lines: Set the number of lines of formula content in the formula
display;
 Number of columns: Set the number of formula content rows in the formula
display;
 Alignment: Set the alignment of the recipe content in the recipe display;
 Font color: Set the font color for the recipe content of the recipe display;
 Do not use grid: When checked, cancel the grid of the recipe display;
 Selection box color: Set the selection box color for the recipe display.

118
8.2.2 Recipe selector component

The steps to set up the configuration recipe selector component are as follows:
① Click on the 'Recipe Chooser' component from the toolbar to enter the recipe
selector attribute setting interface, as shown in Figure 8.2-3;

Chat 8.2-3
② Set the display method to list or drop-down list, select to display the current recipe
or recipe group switch, and the effect is shown in Figure 8.2-4;

Chat 8.2-4

119
Basic Attribute Configuration Information:

Display current formula: used to select the formula group in the current formula,
as shown in the following figure. The background color of the current formula group
in the selected formula display is light green. When formula 1 in report0 switches to
formula 2, the selected formula 2 will have a light green background color;
Recipe Group Switching: Used for switching between recipe groups, it is
necessary to select an adaptive recipe group in the [Recipe Display] control. As shown
in the following figure, select two formula groups.
Using macro instructions: If checked, the recipe selector will execute the macro
once every time it is selected, as shown in the following figure. If the recipe is
selected from Repece0 to Repece1, the macro instruction will be executed once.

120
Chapter9 Production Process Preview Application
Example

If users need to preview the trajectory, graphics, and other curves before the
formal production of the product, in order to reduce the cost of actual production trial
and error, they can use the XY curve component function provided by the
configuration software.

9.1 Basic and Annotation Properties of XY Curve

 Firstly, the attribute setting function of the XY curve component is introduced,


and its basic attribute settings are shown in Figure 9.1-1;

Chat 9.1-1

121
Basic Display Configuration Information:
a. Number of main grid lines on the X-axis: The number of main grid lines on the
X-axis can be set, with a value range of [1, 8];
b. Number of sub grid lines on the X-axis: The number of sub grid lines on the
X-axis can be set, with a value range of [1, 10];
c. Number of Y-axis main grid lines: The number of Y-axis main grid lines can be set,
with a value range of [1, 8];
d. Number of sub grid lines on the Y-axis: The number of sub grid lines on the
Y-axis can be set, with a value range of [1, 10];
e. Scale size of X-axis: The length of the scale line on the X-axis can be set, with a
value range of [1, 12];
f. Y-axis scale size: The length of the Y-axis scale line can be set, with a value range
of [1, 12];
g. X-axis text size: The numerical text size of the X-axis can be set, with a value
range of [1, 16];
h. Y-axis text size: The numerical text size of the Y-axis can be set, with a value
range of [1, 16].
 The annotation attribute settings for XY curve construction are shown in Figure
9.1-2:

122
Chat 9.1-2
Annotation attribute configuration information:
Transparent: If checked, the control has no background color or outline;
Outer frame: If transparency is not checked, the outer frame color of the control can
be set, as shown in the following figure. The outer frame color is red;
Background: If transparency is not checked, the color of the control's outer frame can
be set, as shown in the following figure. The background color is yellow;
Color: The color of the lines in the style, the color of the tracing points, and the fill
color of the enclosed area in the enclosed area style can be set;
Width: Set the thickness of the connecting lines during drawing;
Line type: The style of the line when setting the line style, including solid lines,
dashed lines, dashes, dotted lines, and other styles;
Brush attribute: can set the width of the points to be displayed in the drawing;

123
9.2 Curve attributes of XY curve

The x/y curve component has two functions: firstly, it is used to draw
two-dimensional coordinate data<x, y>, making it easy to visually observe the
changes of y with x; secondly, the X-axis increases by a positive integer, reflecting
the trend of a set of data changes. Curve data source: Set the reading address of the
x/y data, and then read it through the bit address; Supports simultaneous drawing of
16 curves (channels).
The steps to use the x/y curve are as follows:
① Click on the 'x/y curve' component from the toolbar to enter the recipe selector
attribute setting interface, as shown in Figure 9.2-3;

Chat 9.2-3
② Set the number of channels (up to 16 channels can be set), set the address:
including control address, x data address, and y data address (detailed instructions are
attached at the end of the steps), as shown in Figure 9.2-4;

124
Chat 9.2-4
③ Set the display area, including appearance, curve settings for each channel,
and reference lines, as shown in Figure 9.2-5;

125
Chat 9.2-5
④ Add a numerical display with the corresponding address, taking Figure 9.2-6
as an example, there is a channel where the control address is set to LW-1900, that is,
the command address is LW-1900, and the number of control line segments (that is,
the number of input points) address is LW-1901. Check [X axis data and Y axis data
are taken from different addresses] and [upper and lower limits are taken from
registers], set the starting address of X data to LW-1910, set the starting address of Y
data to LW-1930, and set the data type to 16 bit integers, that is, LW-1910 is the
lower limit address of X axis, LW-1911 is the upper limit address of X axis, LW-1930
is the lower limit address of Y axis, LW-1931 is the upper limit address of Y axis, and
LW-1912-LW-1929 is the input address of X axis data, LW-1932-LW-1949 as input
address for Y-axis data;

126
Chat 9.2-6
⑤ The operation effect diagram is shown in Figure 9.2-7. First, enter the x/y data,
then enter the number of points, and finally enter a dash at the command address;

Chat 9.2-7
Illustrate:
1) The usage method of the control address can be accessed by clicking on [How to
use...], as shown in Figure 9.2-8;

127
Chat 9.2-8
2) The usage method of the upper and lower limit register addresses can be accessed
by clicking on [Usage...], as shown in Figure 9.2-9;

128
Chat 9.2-9
3) Control address: The control word address to be occupied during curve drawing
can be set. By writing a specific value in the corresponding word address, the
corresponding command can be triggered. After the operation is completed, the
value of the control address will automatically reset to zero. Three values can be
entered for the control address:
a. When the value is set to 1, draw a curve, as shown in Figure 9.2-10. LW-1900 is
the control address, LW-1901 is the number of data displayed, and X and Y data
are read from 8 sets of data. When the data of X and Y are the following 8 sets of
data, input 1 in LW-1900 to plot and automatically reset, and the current plot will
not clear the previous plot;

129
Chat 9.2-10
b. When the value is set to 2, clear the graph, as shown in Figure 9.2-11. LW-1900 is
the control address, LW-1901 is the number of data displayed, and X and Y data
are read from 8 sets of data addresses. After drawing, entering 2 in LW-1900 will
clear all drawings and LW-1900 will automatically reset to zero;

Chat 9.2-11
c. When the value is set to 3, clear it first and then plot the curve, as shown in

130
Figure 9.2-12. LW-1900 is the control address, LW-1901 is the number of data
displayed, and X and Y data are read from 8 sets of data. After drawing, enter 3 in
LW-1900 to clear the drawing of the previous XY address data, and then draw the
current XY address.

Chat 9.2-12

131
Chapter10 Introduction to Macro Command Functions

10.1 Summary of Macro Instruction Knowledge

Macro instructions are an advanced touch screen control method that makes the
touch screen more powerful. By programming macro instructions, the touch screen
can have the same logic and arithmetic operation functions as PLC. Flexible use of
macro commands can achieve many powerful functions that conventional controls
cannot achieve, making your human-machine interface more perfect.
10.1.1 Introduction to Macro Instruction Editor

The macro instruction editor is the most important place for users to write scripts,
and the operation interface is divided into the following parts:

Chat 10.1-1

a. Toolbar: There are operations such as creating new macro instructions and
compiling macro instructions, as detailed in the "Toolbar Description" section below;

b. Macro instruction drop-down box: optional macro instruction for editing;

132
c. Script editing box: The script editing box is the most important place for users to
write scripts, and all script content is displayed here. The script editing box supports
automatic completion function. The auto complete function is mainly used to
automatically prompt the user to enter relevant content when entering content, to help
the user complete the input quickly;

d. Information output and variable setting: This window outputs the status
information of the program during compilation and connection. Users can debug and
modify the program based on this information prompt.

Toolbar Description:
 New: Create a new macro instruction;
 Revoke: Revoke the current operation;
 Restore: Restore the revoked operation;
 Save: Save the edited macro instruction;
 Copy: Click to select a macro instruction, then click "Copy" to copy the content
of the selected macro instruction;
 Paste: Pastes the copied content;
 Cut: Cut the selected macro instruction content;
 Import/Export: Import and Export of Macro Instructions;
 Compile: compile the source code of the current macro instruction and check
Syntax error;
 Compile All: compile all macro instruction source codes and check Syntax error;
 Expand/collapse: The information output box can be expanded and collapsed as
needed;
 Find: Find the corresponding address or variable name in a macro instruction.

10.1.2 Introduction to Language Elements

① variable

133
 Data object: equivalent to Global variable, shared by all program segments. It
can be defined by creating a new variable setting under the macro instruction
compiler, as shown in Figure 10.1-2. In script editing, the name of the data object
can be used to read and write the value of the data object, and the properties of
the data object can also be manipulated, supporting multiple data types.

Chat 10.1-2
 Local variable: supports four data types: integer, Floating-point arithmetic,
string, and byte. It can only be used in the current macro instruction. You can
directly enter script statements to declare Local variable. It should be noted that
declaration statements cannot be nested within any other statement. As shown in
Figure 10.1-3;

Chat 10.1-3
 Local array variable: supports four data types: integer array, Floating-point
arithmetic array, string array and byte array, which can only be used in the
134
current script. The declaration method is the same as [Local variable]. The
maximum length of an array variable is 65535, and the way it accesses elements
is array [index], where "array" is the array variable and "index" is the position of
the access element (starting from 0), as shown in Figure 10.1-3.

Chat 10.1-3
② constant
 Integer constant: an integer similar to 123;
 Hexadecimal integer constant: a hexadecimal integer similar to 0x123;
 Floating-point arithmetic constant: value with Decimal separator, such as 12.45;
 String constant: A string within double quotation marks, such as "OK" or
"normal";
 The following escapes are supported within string constants:
“\n”: Represent Wrap
“\r”: Need to be used together with ' \n' (' \r\n') to represent line breaks in
Microsoft environments
“\"”:Represent double quotation marks
“\t”:Represent Tabs
“\\”:Represent the backslash itself
Other characters starting with '\' will be treated as illegal strings.
③ expression

135
The operation formula composed of variables, parentheses, and various operators
is called an expression, and the calculation result of the expression is called the value
of the expression. For example:a=b+c; str=”aa”+”bb”.
④ operator
 Arithmetic operators
operator name describe

+ addition Add two operands

- subtraction Subtract the second operand from the first operand

* multiplication Multiplying two operands

/ division Divide numerator by denominator

% remainder Modulo operator, remainder after integer division

++ auto-increment increasing integer value by 1

-- Self decrement integer value reduced by 1

 Logical connective
operator name describe

&& Logical AND If both operands are non zero, then the condition is true

If either of the two operands is non-zero, then the condition


|| Logical or
is true
If the condition is true, the Negation operator will make it
! Logical not
false
 Comparison operator
operator name describe

If the values of two operands are equal, then the condition


== equal to
is true
If the values of two operands are not equal, then the
!= Not equal to
condition is true

136
If the value of the left operand is greater than the value of
> greater than
the right operand, then the condition is true
If the value of the left operand is less than the value of the
< less than
right operand, then the condition is true
greater than If the value of the left operand is greater than or equal to
>=
or equal the value of the right operand, then the condition is true
less than or If the value of the left operand is less than or equal to the
<=
equal value of the right operand, then the condition is true
⑤ Precedence
priority operator
high ( ) ++ --
* / %
+ -
< > <= >= = !=
low && || !
⑥ note
 All object names that can be used in scripts (such as windows, variables, policies)
cannot be named with the following keywords:
if, then, else, endif, while, break, endwhile, and, or, xor, not, exit, break, byte,
integer, single, float, string;
 Cannot start with a number;
 Cannot contain special characters other than the underscore (_), and cannot have
only the underscore;
 Cannot be empty.

10.2 Basic sentence rules and applications

Script programs are designed to control processes and handle object operations,
including the following statements:

137
Assignment statement, conditional statement, loop statement, exit statement, comment
statement, declaration statement, jump out statement, as shown in Figure 10.2-1.

Chat 10.2-1
① assignment statement
A simple assignment operator that assigns the value of the right operand to the
left operand.
The format of the assignment statement is: data object=expression.
The left side of the assignment sign (equal sign) must be a data object that can be
read and written.
The right side of the assignment number is an expression, and the data type of the
expression must match the type of the value of the left data object, otherwise the
system will prompt an error message of "type mismatch".
The application examples of assignment statements are as follows:
Assuming an integer variable A, two floating point variables B and C, and a
character variable D have been declared. Then assign values to A, B, C, and D as
follows:

138
assignment statement illustrate
A=1 Assign the integer constant 1 to A
B = 3.14 Assign floating-point constant 3.14 to B
B = C = 2.5 Assign floating-point constant 2.5 to B and C
D= ‘F’ Assign the character constant F to D
② Conditional statement
The general form of judging structure is as follows:

Chat 10.2-1
The C language provides the following types of judgment statements:
 Judgment statement 1: if statement (an if statement consists of a Boolean
expression followed by one or more statements);
 Judgment statement 2: if Else statement (an if statement can be followed by an
optional else statement, which is executed when the Boolean expression is false;
 Judgment statement 3: nested if statement: using another if or else if statement
within an if or else if statement.

139
Conditional statements allow multiple levels of nesting, meaning that they can contain
new conditional statements.
③ loop statement
The flowchart of the loop statement is as follows:

Chat 10.2-2
The C language provides the following types of loops:
 Loop type 1: While loop (repeats a statement or group of statements when the
given condition is true. It tests the condition before executing the loop body);
 Loop type 2: for loop (executes a sequence of statements multiple times to
simplify the code for managing loop variables);
 Loop type 3: do While loop (similar to a while statement, except that it tests the
condition at the end of the loop body);
 Loop type 4: nested loop (using one or more loops within a while, for, or do..
While loop).
④ jump statement

140
In C language, also known as loop control statements, loop control statements change
the execution order of your code. Through it, you can achieve code jumping.
The C language provides the following loop control statements:
 Loop control statement one: break statement (terminates the loop or switch
statement, and the program flow will continue to execute the next statement
following the loop or switch);
 Loop control statement 2: continue statement (telling a loop body to immediately
stop the current loop iteration and restart the next loop iteration);
 Loop control statement 3: goto statement (transfers control to the marked
statement. However, it is not recommended to use goto statements in the
program).
⑤ Comment statement
The green text in Figures 10.2-11 is the comment statement, which is not executed
during script execution and only serves as an explanation. It can be achieved by
entering a double slash "//" before the statement or placing the text to be annotated in
the middle of "/*... */".

Chat 10.2-11
⑥ Declaration statement
Variable declaration ensures to the compiler that a variable exists with the
specified type and name, and there are two situations when declaring a variable:

141
1、One is to establish storage space. For example, int a already established storage

space when declared;

2、Another method is to declare a variable name without defining it by using the

extern keyword without establishing storage space. For example, extern int a where
variable a can be defined in other files.
Unless there is an extern keyword, it is the definition of a variable.

Chat 10.2-12

10.3 Script error checking

After completing the macro instruction writing, you can click the 'Compile' icon
in the toolbar above to compile the program code to confirm whether the script
program is written correctly. During the inspection process, if an error is found in the
script program, corresponding information will be returned to indicate the possible
cause of the error and help users find and troubleshoot the error.

142
Chat 10.2-13
Common prompts include:
 Unrecognized identifier: This identifier is not a Local variable or a globally
accessible object;
 Unrecognized type: variable declaration did not input the correct type;
 No parameters filled in: Function call (requires parameters) No parameters filled
in;
 A logical value is required: the value of the expression in conditional judgment in
conditional statements and circular statements must be byte type, integer,
Floating-point arithmetic, not string and array;
 Reference parameter required: The current parameter type of the function is a
reference;
 Need a data object: the current parameter type of the function is a data object;
 Local variable declaration error: Local variable declaration format error;
 Local array variable declaration error: The format of the local array variable
declaration is incorrect;
 Illegal length of local array variable declaration: The initial length of the local
array declaration is incorrect and must be between 0 and 65535;
143
 Index access type mismatch: When accessing elements of an array, the index type
is incorrect; Must be a byte/integer, preferably an integer;
 Expressions without side effects: In addition to function calls, general expressions
require an assignment statement to use the result of the expression;
 Type mismatch: Generally, the operation type of the expression does not match,
such as “integer+string”;
 Number of parameters mismatch: The number of parameters of the function does
not match;
 Parameter type mismatch: The parameter types of the function do not match.

144
Chapter11 Application Examples of Library Functions

This chapter mainly introduces the functional functions and application examples
of configuration software.

11.1 Using Help to Guide

For a detailed introduction and usage instructions of script functions, please refer
to the configuration software help. Taking macro instruction functions as an example,
click [Help] on the toolbar to find library functions, where you can view the meanings,
parameters, return values, instances, and other descriptions of each function.

145
Chat 11.1-1(注:英文帮助出来后,以上两张图要改成英文帮助)

11.2 function library

The method for inserting library functions is as follows:


① There are several methods to enter the macro instruction compiler interface,
as follows:
Method 1:
Right click on the left [Macro Command] and click on [Add Macro
Command], as shown in Figure 11.2-1;

146
Chat 11.2-1
Method 2:
Right click on the left [Macro Instruction] and click [ Open Macro
Instruction Editor], as shown in Figure 11.2-2.

Chat 11.2-2
② Enter the macro command name in the pop-up box, click [OK] to enter the
macro command editor, as shown in Figure 11.1-2;

147
Chat 11.2-2
③ Click on [Function Library] to open the function library folding basket. You can
select the corresponding library function in the function name list box, as shown in
Figure 11.2-3;

Chat 11.2-3
④ Click the right button to have the option to insert an example. After clicking, the
function will automatically be inserted at the current cursor position in the editing
window, as shown in Figure 11.2-4;

148
Chat 11.2-4
Introduction to Library Function Summary:
1. ADDSUM: Calculate the sum of N numerical values;
2. ASCII2DEC: Converts a string to a Decimal number;
3. ASCII2FLOAT: Converts a string to a Decimal number;
4. ASCII2HEX: Convert string to hexadecimal number;
5. BCD2BIN: Convert BCD value to Decimal number;
6. BIN2BCD: Convert Decimal number to BCD value;
7. CRC: Calculate the 16 bit CRC check value;
8. DEC2ASCII: Converts a Decimal number to a string;
9. FLOAT2ASCII: Converts a Floating-point arithmetic number to a string;
10. GETBIT: Gets the value of the pointer, with a value of 0 or 1;
11. GETCHARS: Obtaining data from the communication port, PortID - serial port,
COM1=0, COM2=1, successful operation returns the number of data, failure
returns -1 (this function is only applicable to free port communication);
12. HEX2ASCII: Converts a hexadecimal number to a string;
13. HIBYTE: Take the high byte of a word;
14. HIWORD: Take a double character high character;
15. INVBIT: Invert the consistently specified value;
16. LOBYTE: Take the low byte of a word;

149
17. LOWORD: Take the lower 16 bits of a doubleword word;
18. PUTCHARS: Send data to the communication port, PortID - serial port,
COM1=0, COM2=1. If the operation is successful, the number of data will be
returned. If the operation fails, the number of data will be returned. This function
is only applicable to free port communication;
19. SWAPB: Swap the high and low bits of a word;
20. SWAPW: Swap a double word high and low word;
21. SETBIT: Set the positioning value as the set value;
22. XORSUM: XOR value used to calculate N numerical values;
23. DELAY: Set delay time;
24. GETBUFFERLENGTH: The communication port obtains the buffer data length.
PortID - serial port, COM1=0, COM2=1, successful operation returns buffer data
length, failure returns -1 (this function is only applicable to free port
communication);
25. CLEARBUFFER: Clear the buffer data of the communication port. PortID -
serial port, COM1=0, COM2=1, operation success returns 1, failure returns 0
(this function is only applicable to free port communication);
26. ScreenOpe: Jump to screen, PageID=0: screen, PageID=1: window;
27. DISABLELCD: Illuminate the LCD display screen;
28. ENABLELCD: Turn off the LCD display screen;
29. SWAPBU: Swap the high and low bytes of a word with an integer data type;
30. SWAPWU: Swap the high and low words of a doubleword with an integer data
type.

11.3 graphics library

The method of inserting Graphics library is as follows:


① Right click on the left [Macro Command] and click on [Add Macro
Command], as shown in Figure 11.3-1;

150
Chat 11.3-1
② Enter the macro command name in the pop-up box, click [OK] to enter the
macro command editor, as shown in Figure 11.1-3;

Chat 11.3-2
③ Click [Function Library] to open the folding basket of the Graphics library, and
select the corresponding library function in the graphic name list box, as shown in
Figure 11.3-3;

151
Chat 11.3-3
④ Click the right button to have the option to insert an example. After clicking, the
function will automatically be inserted at the current cursor position in the editing
window, as shown in Figure 11.3-4;

Chat 11.3-4
Introduction to Graph Function Summary:
PutPixel: Draw pixel points;

152
DrawLine: Draw line segments;
DrawHLine: Draw a horizontal line;
DrawVLine: Draw vertical lines;
Rectangle: Draw a rectangle;
FilledRectangle: Draw a filled rectangle;
Circle: Draw a circle;
Fill_Circle: Draw a filled circle.

153
Chapter12 Examples of Multilingual Function
Application

When users need to use the same project in multiple countries or provide the
project to personnel in different languages in the factory for operation, the project can
use the multilingual function of the configuration software.

12.1 Multi language settings

When multiple languages are needed, language types can be added to the
language settings and used in conjunction with the text library.

The method for setting language is as follows:


① Find [Language Settings] in the left column, double-click to enter the language
settings interface, as shown in Figure 12.1-1;

Chat 12.1-1
② Set the 'total number of languages', with a maximum of 10 languages, taking 6 as
examples, as shown in Figure 12.1-2;

154
Chat 12.1-2
③ Set the 'Current Language', which is the language currently displayed by the
system. Set "Language Name" and select "Font" as shown in Figure 12.1-3.

155
Chat 12.1-3

12.2 Text Library

When the control needs to use labels in the Text Library, you can add labels and
set corresponding states and text in different languages in the Text Library. To add a
new language, add it in the Language Settings section.
The method for setting up a text library is as follows:

① Find [Text Library] in the left column, double-click to enter the text library setting
interface, as shown in Figure 12.2-1;

156
Chat 12.2-1
② Click on [Add Tag] below, set the "Tag Name" and "Number of States", and set the
tag name to EX_ 1. The number of states is 20, click [OK], as shown in Figure 12.2-2;

Chat 12.2-2
③ The rendering is shown in Figures 12.2-3;

157
Chat 12.2-3
④ Use a text library in other controls, such as in the text settings of a multi-state
button control with 20 states, check Use Text Library, as shown in Figure 12.2-4.

158
Chat 12.2-4

159

You might also like