User Manual For MACS 5.2.5B

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1129

User Manual for

HOLLiAS MACS V5.2.5B

Version 1.0

May 2013

J13-B16-000247
Copyright Notice

The text, illustrations, charts, marks, trademarks, product models, programs,


page layout and other contents included in this manual are under protection of
“Copyright Law of the People’s Republic of China”, “Trademark Law of the
People’s Republic of China”, “Patent Law of the People’s Republic of China”
and the laws of applicable international conventions regarding copyright,
trademark right, patent right or other property ownership, and they are owned
or possessed exclusively by Beijing HollySys Co., Ltd.

Since the equipment explained in this manual has a variety of uses, the user
and those responsible for applying this equipment must satisfy themselves as
to the acceptability of each application and use of the equipment. Under no
circumstances will HollySys be responsible or liable for any damage, including
indirect or consequential losses resulting from the use, misuse, or application
of this equipment.

Due to the many variables associated with specific uses or applications,


HollySys cannot assume responsibility or liability for actual use based upon the
data provided in this manual.

This manual is provided only for commercial users to read. Without prior
written permission of Beijing HollySys Co., Ltd, no part of this manual should
be reproduced and transmitted in any forms by any means, including electronic,
mechanical or otherwise regardless of whatever reasons and purposes. We
will investigate violator’s legal liability in accordance with the relevant laws.

The text HOLLiAS MACS, HollySys, and the logos are registered
trademarks of Beijing HollySys Co., Ltd. All other trademarks are the property
of their respective holders.

Copyright © Beijing HollySys Co., Ltd. All rights reserved.

Hangzhou HollySys Automation Co., Ltd.


North No.1 , NO.19 Road
Xiasha Economic & Technology Development Area
310018 Hangzhou Zhejiang
P.R. China
Hotline: 400-881-0808
Email: info@hollysys.com
Website: http://www.hollysys.com
Symbol Declaration

In this manual following symbols are used to indicate corresponding


information:

• The further information or know-how for described subjects above which


helps user to understand them better.

• The safety note or using convention of system that user must pay attention
to.

• The prohibitory operations which may cause serious problems or threaten


the system safety.
CONTENT

SECTION 1 Introduction of HOLLiAS MACS ..................................... 1


1.1 What is in This Manual?.............................................................................. 1
1.2 Abbreviations .............................................................................................. 2
1.3 Indroduction of Softwares .......................................................................... 2
1.3.1 What is HOLLiAS? ............................................................................ 2
1.3.2 What is HOLLiAS MACS? ................................................................. 5
1.4 How to Install and Uninstall ...................................................................... 12
1.4.1 System Requirement ...................................................................... 12
1.4.2 Installation ....................................................................................... 14
1.4.3 Uninstallation .................................................................................. 28
1.5 Accessory Appliance Installation............................................................. 31
1.6 Configuration Procedure .......................................................................... 45

SECTION 2 Configuration Tools ........................................................ 3


2.1 System Configuration ................................................................................. 3
2.1.1 Overview ........................................................................................... 3
2.1.2 Interface of Main Window ................................................................. 3
2.1.3 Project Management ....................................................................... 10
2.1.4 Database Configuration .................................................................. 13
2.1.5 Project Case of System Configuration ............................................ 40
2.2 Device Configuration ................................................................................ 49
2.2.1 Introduction ..................................................................................... 49
2.2.2 What is Device Configuration Main Window ................................... 50
2.2.3 System Device Configuration .......................................................... 54
2.2.4 I/O Device Configuration ................................................................. 66
2.2.5 Flow chart of Device Configuration ................................................. 72
2.3 Graph Configuration ................................................................................. 77
2.3.1 Introduction ..................................................................................... 77
2.3.2 Graph Configuration Main Window ................................................. 78
2.3.3 Operation Instruction ..................................................................... 107
2.3.4 Flow Chart of Graph Configuration ............................................... 152
2.4 Report Configuration .............................................................................. 166
2.4.1 Introduction ................................................................................... 166
2.4.2 What is Report Configuration Main Window ................................. 167
2.4.3 Report Toolbar .............................................................................. 168
2.4.4 Example for Report Configuration: ................................................ 173
2.5 Download ................................................................................................. 179
2.5.1 Introduction ................................................................................... 179
2.5.2 What is ES Download Main Window ............................................. 180
2.5.3 Download Server .......................................................................... 181
2.5.4 Download OPS ............................................................................. 182
2.5.5 Readback ...................................................................................... 183
2.6 Historical Data Query .............................................................................. 184
2.6.1 Introduction ................................................................................... 184
2.6.2 What is the Historical Data Query Main Window........................... 185
2.6.3 Toolbar.......................................................................................... 189

SECTION 3 Control Station Algorithm Configuration .................. 191


3.1 Overview .................................................................................................. 191
3.2 Window Interface Introduction ............................................................... 192
3.2.1 Software Startup and Window Interface ........................................ 192
3.2.2 Menu Bar and Shortcut Button ...................................................... 199
3.2.3 Object Organizer ........................................................................... 250
3.3 Data and Operand.................................................................................... 267
3.3.1 Data .............................................................................................. 267
3.3.2 Operand ........................................................................................ 276
3.4 Operator ................................................................................................... 291
3.4.1 IEC Operator ................................................................................. 291
3.4.2 Standard Library Standard.hlf ....................................................... 294
3.4.3 Application Library Util.hlf ............................................................. 295
3.4.4 Other Libraries .............................................................................. 296
3.5 POU Introduction ..................................................................................... 297
3.5.1 New POU ...................................................................................... 297
3.5.2 POU Type ..................................................................................... 299
3.5.3 POU Language ............................................................................. 308
3.5.4 POU Trigger .................................................................................. 369
3.6 Compile .................................................................................................... 373
3.7 Download ................................................................................................. 377
3.7.1 Local Connect ............................................................................... 378
3.7.2 Communication Parameter ........................................................... 383
3.7.3 Initialization Download .................................................................. 385
3.7.4 Incremental Download .................................................................. 385
3.7.5 Download Tips .............................................................................. 386
3.8 Parameter Tools....................................................................................... 389
3.8.1 Param Read Back ......................................................................... 390
3.8.2 Parameter Write ............................................................................ 405
3.9 Example of control station algorithm configuration ............................ 410
3.9.2 Create new POU ........................................................................... 411
3.9.3 Name function block: .................................................................... 413
3.9.4 Call Program, when algorithm configuration completed: ............... 414
3.9.5 Build: Select Rebuild All in menu Project; ..................................... 415

SECTION 4 Online Operation ......................................................... 417


4.1 Operator Station Introduction ................................................................ 417
ii
4.1.1 Runtime Environment ................................................................... 417
4.1.2 OPS Hardware Equipment ............................................................ 418
4.1.3 Startup and Login of OPS ............................................................. 426
4.1.4 System Figure Layout and Menu Introduction .............................. 434
4.2 Function Instruction of OPS ................................................................... 447
4.2.1 Simulation Flow Chart ................................................................... 447
4.2.2 Table ............................................................................................. 448
4.2.3 Log ................................................................................................ 454
4.2.4 General Function .......................................................................... 467
4.2.5 Trend ............................................................................................ 475
4.2.6 Print Operation .............................................................................. 517
4.2.7 Equipment Graph Display ............................................................. 522
4.2.8 Engineer Right Click Function ....................................................... 527
4.2.9 Engineer Function ......................................................................... 544
4.3 Control Regulation .................................................................................. 558
4.3.1 PID Controller ............................................................................... 558
4.3.2 Analog MO (Open Loop) ............................................................... 567
4.3.3 Analog MO (Close Loop) .............................................................. 568
4.3.4 Sequence Control Equipment ....................................................... 570
4.3.5 Regulation Valve ........................................................................... 573
4.3.6 SLAVE .......................................................................................... 575
4.3.7 Circuit Breaker .............................................................................. 576
4.4 Other Operations ..................................................................................... 578
4.4.1 Keyboard Lock Operation ............................................................. 578
4.4.2 Light Test ...................................................................................... 579
4.5 Sever Operation ....................................................................................... 579
4.5.1 Server Modification and Settings .................................................. 579
4.5.2 Server’s Timing ............................................................................. 586
4.5.3 NOTICES ...................................................................................... 617

SECTION 5 Special Topics ............................................................. 623


5.1 How to Configure Audible Alarm ............................................................ 623
5.1.1 Audible Alarm Configuration through Database ............................ 623
5.1.2 Audible Alarm Configuration through Files .................................... 626
5.2 How to Filter Alarms ................................................................................ 629
5.3 How to Edit Reconfirm Button ............................................................... 631
5.4 Multi-Window Display on Screen ........................................................... 634
5.5 MACSV Database Import & Export ......................................................... 640
5.6 How to Configure Network Variable ....................................................... 646
5.7 User-Defined DP Slave ............................................................................ 659
5.7.1 DP slave of HOLLYSYS ................................................................ 659
5.7.2 Configuration of Third Party DP Slave .......................................... 671

iii
5.8 DCS Anti-virus ......................................................................................... 674
5.9 Using Log Packer .................................................................................... 676
5.10 Instruction of inter-domain tag............................................................... 681
5.11 Configuration Instruction of SM020 ....................................................... 689
5.12 Why the configuration is not generated when import GSD file ........... 697
5.13 The Usage of Configuration File Editor ................................................. 701
5.14 Introduction of Dongle ............................................................................ 704

APPENDIX 1 Function Blocks .......................................................... 705


1.1 HS_MathLogic.lib .................................................................................... 705
1.1.1 HSACCUM .................................................................................... 705
1.1.2 HSCHARC .................................................................................... 707
1.1.3 HSCMP ......................................................................................... 710
1.1.4 HSD .............................................................................................. 712
1.1.5 HSDCSSUM ................................................................................. 714
1.1.6 HSDOWN ..................................................................................... 715
1.1.7 HSDTIMESUM .............................................................................. 716
1.1.8 HSEXPT ....................................................................................... 718
1.1.9 HSFILTER..................................................................................... 719
1.1.10 HSONEFOLD................................................................................ 720
1.1.11 HSPOLY ....................................................................................... 722
1.1.12 HSQOR ......................................................................................... 723
1.1.13 HSRS ............................................................................................ 725
1.1.14 HSSLMTSUM ............................................................................... 727
1.1.15 HSSLOPE ..................................................................................... 729
1.1.16 HSTWOFOLD ............................................................................... 731
1.1.17 HSUP ............................................................................................ 735
1.1.18 RANDOM ...................................................................................... 735
1.2 HS_TimeField.lib...................................................................................... 737
1.2.1 HSCURVE .................................................................................... 737
1.2.2 HSDEV ......................................................................................... 739
1.2.3 HSFOP ......................................................................................... 741
1.2.4 HSFSMITH.................................................................................... 743
1.2.5 HSINTG ........................................................................................ 744
1.2.6 HSLDLG ....................................................................................... 747
1.2.7 HSLGCMP .................................................................................... 748
1.2.8 HSRAMP ...................................................................................... 749
1.2.9 HSSOP ......................................................................................... 751
1.2.10 HSSSMITH ................................................................................... 753
1.2.11 HSTIMER ...................................................................................... 755
1.2.12 OneStepLag .................................................................................. 759
1.2.13 TwoStepLag .................................................................................. 761
1.2.14 ThreeStepLag ............................................................................... 763
1.3 HS_Ctrol.lib .............................................................................................. 765

iv
1.3.1 HSALGMAN .................................................................................. 765
1.3.2 HSCSLAVE ................................................................................... 770
1.3.3 HSCSLAVE5 ................................................................................. 773
1.3.4 HSDigMAN.................................................................................... 776
1.3.5 HSDLCTRL ................................................................................... 778
1.3.6 HSDLCTRL2 ................................................................................. 782
1.3.7 HSDLCTRL5 ................................................................................. 787
1.3.8 HSPID ........................................................................................... 793
1.3.9 HSSCS ......................................................................................... 802
1.3.10 HSSCS5 ....................................................................................... 815
1.3.11 HSSSLAVE ................................................................................... 836
1.3.12 HSVALVE ..................................................................................... 838
1.3.13 HSVALVE5 ................................................................................... 840
1.3.14 HSVMAN ...................................................................................... 842
1.3.15 HSVPID ........................................................................................ 846
1.4 HS_AlmLimSec.lib ................................................................................... 853
1.4.1 AI_RED ......................................................................................... 853
1.4.2 AI_Red_Sel ................................................................................... 855
1.4.3 BOOL_RED .................................................................................. 858
1.4.4 HSALARMSPARK ........................................................................ 860
1.4.5 HSALM_AM .................................................................................. 862
1.4.6 HSALM_DV................................................................................... 865
1.4.7 HSALM_RT ................................................................................... 866
1.4.8 HSDIGSW ..................................................................................... 868
1.4.9 HSLIM_HL .................................................................................... 869
1.4.10 HSLIM_RATE ............................................................................... 871
1.4.11 HSMEDSEL .................................................................................. 872
1.4.12 HSSFT .......................................................................................... 878
1.5 HS_Special.lib .......................................................................................... 881
1.5.1 HSAMEMORY .............................................................................. 881
1.5.2 HSBAL2 ........................................................................................ 883
1.5.3 HSCHARC1 .................................................................................. 886
1.5.4 HSSC ............................................................................................ 887
1.5.5 HSSC1 .......................................................................................... 889
1.5.6 HSSC2 .......................................................................................... 893
1.6 HS_Cnvt.lib .............................................................................................. 901
1.6.1 E_H ............................................................................................... 902
1.6.2 ELC_E .......................................................................................... 904
1.6.3 FM148F_H_E................................................................................ 905
1.6.4 FM148F_H_ELC ........................................................................... 906
1.6.5 H_CT ............................................................................................ 908
1.6.6 H_CT_R ........................................................................................ 909
1.6.7 H_E ............................................................................................... 911
1.6.8 H_E_S .......................................................................................... 914
1.6.9 H_ELC .......................................................................................... 916
1.6.10 H_ELC_R ...................................................................................... 917
1.6.11 H_PI .............................................................................................. 920
1.6.12 H_RTD .......................................................................................... 921

v
1.6.13 H_TC ............................................................................................ 923
1.6.14 UpEnd ........................................................................................... 925
1.7 SIMU_FOP.lib (simulation algorithm) ..................................................... 927
1.7.1 Simu_AO ...................................................................................... 927
1.7.2 SIMU_DO ..................................................................................... 929
1.8 Standard ................................................................................................... 931
1.8.1 RS ................................................................................................. 931
1.8.2 SEMA ............................................................................................ 932
1.8.3 SR ................................................................................................. 933
1.8.4 CTD .............................................................................................. 933
1.8.5 CTU .............................................................................................. 935
1.8.6 CTUD ............................................................................................ 936
1.8.7 NetvarTON .................................................................................... 937
1.8.8 RTC .............................................................................................. 938
1.8.9 TOF............................................................................................... 940
1.8.10 TON .............................................................................................. 941
1.8.11 TP ................................................................................................. 942
1.8.12 F_TRIG ......................................................................................... 944
1.8.13 R_TRIG ......................................................................................... 944
1.8.14 CONCAT ....................................................................................... 945
1.8.15 DELETE ........................................................................................ 946
1.8.16 FIND ............................................................................................. 947
1.8.17 INSERT ......................................................................................... 947
1.8.18 LEFT ............................................................................................. 948
1.8.19 LEN ............................................................................................... 949
1.8.20 MID ............................................................................................... 950
1.8.21 REPLACE ..................................................................................... 950
1.8.22 RIGHT ........................................................................................... 951
1.9 Util............................................................................................................. 953
1.9.1 HYSTERESIS ............................................................................... 953
1.9.2 LIMITALARM ................................................................................ 953
1.9.3 BCD_TO_INT................................................................................ 954
1.9.4 INT_TO_BCD................................................................................ 955
1.9.5 BLINK ........................................................................................... 955
1.9.6 GEN .............................................................................................. 956
1.9.7 PACK ............................................................................................ 957
1.9.8 UNPACK ....................................................................................... 959
1.9.9 PUTBIT ......................................................................................... 960
1.9.10 EXTRACT ..................................................................................... 960
1.9.11 PD ................................................................................................. 961
1.9.12 PID ................................................................................................ 963
1.9.13 PID_FIXCYCLE ............................................................................ 965
1.9.14 CHARCURVE ............................................................................... 967
1.9.15 RAMP_INT .................................................................................... 968
1.9.16 RAMP_REAL ................................................................................ 969
1.9.17 DERIVATIVE................................................................................. 970
1.9.18 INTEGRAL .................................................................................... 971
1.9.19 STATISTICS_INT ......................................................................... 972

vi
1.9.20 STATISTICS_REAL ...................................................................... 973
1.9.21 VARIANCE.................................................................................... 974
1.10 HSSyslib ................................................................................................... 975
1.10.1 Get_Sys_Info ................................................................................ 975
1.10.2 Get_Task_Info .............................................................................. 975
1.10.3 HSGetIECInterval ......................................................................... 977
1.10.4 HSRTC ......................................................................................... 978
1.10.5 HSTIMERJUDGE.......................................................................... 979
1.10.6 NetLoad ........................................................................................ 980
1.10.7 Sysper ........................................................................................... 981
1.10.8 INIPULSE ..................................................................................... 982
1.11 Property setting for Persistent ............................................................... 988
1.11.1 Principle ........................................................................................ 988
1.11.2 Checked result .............................................................................. 988

APPENDIX 2 How to Use ForceList Reader .................................... 999

APPENDIX 3 Notes in Configuration ............................................. 1005

APPENDIX 4 Notes of Using Controller ......................................... 1011


4.1 Overview .................................................................................................1011
4.2 State Lights of Controller .......................................................................1011
4.2.1 General Description .................................................................... 1011
4.2.2 Detailed Description .................................................................... 1014
4.2.3 Process of Power On .................................................................. 1016
4.2.4 Normal Running and Redundancy of Two MCUs ....................... 1018
4.2.5 Both MCUs Being Completely Downloaded and
Synchronization ....................................................................................... 1020
4.2.6 Both MCUs Being Online Downloaded and Synchronization ...... 1021
4.3 Important Description about Power Fail Safeguard of Controller ..... 1023
4.4 Description about IP Address Settings of Controller ......................... 1025
4.5 Relevant Problems about Using Conmaker Software ........................ 1026
4.6 Relevant Problems about Using RTSLoader Software ...................... 1027

APPENDIX 5 Data Classes and Item .............................................. 1029

vii
SECTION 1
Introduction of HOLLiAS
MACS

1.1 What is in This Manual?


This manual is applicable to the users of HOLLiAS MACS V5.2.5B. Please DO
read this manual carefully for a full understanding before you start to work. You
can learn how to use all of the software applications integrated in MACS
system so as to configure your own DCS correctly and efficiently.

This manual is composed of five sections, which will help you understand the
software and make use of it in your application.

In Section 1, a brief introduction of the MACS system architecture will be given


to help you understand the implement of configuration. The
installation/uninstallation of the software as well as the configuration process is
also introduced for the preparation of further steps.

In Section 2, the Database Editor will be introduced along with Report


Configuration, Engineer Station Download, Hardware Configuration, Historical
Data Query and Graph Configuration, and you could get access to the entire
user interfaces and dialog boxes, meanwhile understand the functions of each
menu item and button. This section is mainly about how to set up a project and
configure it.

Section 3 is about the algorithm configuration software for controller. It will help
you set up the algorithm of your project using several IEC standard
programming languages. Both illustrations and samples will be provided to
help you understand how the software works. And some know-how can make
your work more efficient.

Section 4 is the using guide of online operation. It will indicate the operators on
site how to use our software after the system was started.
1
SECTION 1 Introduction of HOLLiAS MACS

At the end of this manual, there are a few necessary appendixes, such as the
detailed descriptions of function blocks, special topics for MACS 5.2.5B and
notes in configuration. The frequently asked questions and common
precautions are listed to help you to solve the problems, and the index with key
words helps you to quickly find what you want to read.

1.2 Abbreviations
The following abbreviations are in use, show in Table 1.2-1 :

Table 1.2-1 Abbreviations Use in the Contents

Full Name Abbreviation

Engineer Station ES
Operator Station OPS
Field Control Station FCS
Real-time Database RTDB
Historical Database HDB
Monitoring Net MNET
System Net SNET
Control Net CNET
Multi-Domain-Management MDM
Manufacturing Execution System MES
Client/Server CS
Communication Station CMS
Main Control Unit MCU

1.3 Indroduction of Softwares


1.3.1 What is HOLLiAS?
HOLLiAS (HollySys integrated Industrial Automation System) is a control
system platform which is developed by Beijing HollySys Co., Ltd based on

2
SECTION 1 Introduction of HOLLiAS MACS

advanced automation technology. With open system software, this platform


realizes flexible configuration and integration of HollySys automation systems
as well as devices. This system can provide professional solutions to different
costumers for plant automation and information management. The system
architecture is shown in Figure1.3.1-1.

3
SECTION 1 Introduction of HOLLiAS MACS

4
-Figure 1.3.1-1 HOLLiAS System
Architecture
SECTION 1 Introduction of HOLLiAS MACS

HOLLiAS consists of many sub-systems in DCS (Distributed Control System),


MES (Manufacturing Execution System) and Enterprise Management layer. It
has the following features:

 Information and Integration

 HOLLiAS realizes the multiple management sub-systems based on


open real-time relational database, and integrates various control
systems and devices to meet different customers’ requirement.
Integration is also reflected in the aspect that this system can widely
connect automation control systems, controllers, intelligent devices
and software modules of other manufacturers. Hybrid Control

 The controller configuration is compliant with the IEC61131-3 standard.


It not only has advanced high-performance general algorithm of control
platform, but also integrates control function in different
layers.Distributed/Centralized Architecture

Using field bus (especially Profibus-DP), HOLLiAS supports lots of


distributed controllers and intelligent instruments. At the same time, the
integrated monitoring platform can provide centralized management to
improve efficiency.
 Economical

Due to the improvement in system integration and field bus, users can
configure the system flexibly so as to reduce the total cost of projects.
 Open System and Dedicated Application Solution

HOLLiAS is an open system and supports multiple protocols/interfaces for


connection to other platforms and third party applications. On the other
hand, users could also access to the system from internet through the web
server.

1.3.2 What is HOLLiAS MACS?


1.3.2.1 Overview

MACS is the DCS system of HOLLiAS. As shown in the dash box in Figure
1.3-1, MACS, the base of the entire system, from which all the field data come.
MACS uses Client/Server structure to build its software system. In this
structure the Server plays the role that provides all kinds of service to the
Client such as historical data, print, etc, while the Client gets access to the
information through visiting Server. Regardless of the Client data type, the

5
SECTION 1 Introduction of HOLLiAS MACS

Server only replies to the requests that from the Client, which makes easy
configuration in both software and hardware.

MACS connects the third party system by OPC and ModBus protocol. Upper
computer communicates with lower computer by HollySys’ proprietary HSIE
industrial Ethernet protocol. Lower computer transfers data in the method of
Profibus-DP or HART bus.

MACS V5.2.5B has various powerful functions, including: data acquisition,


control regulation, alarm, trend, general appearance chart, simulated flow
chart, data list, log management, forms management, SOE, reports and data
statistics, display management, human-computer dialogue, print management,
fault diagnosis and monitoring, system configuration, operator online
parameter setting, archiving data off-line querying, control packet, control loop,
and so on.

The hardware of MACS V5.2.5B is responsible for the data collection and
transmission and command transceiving, etc. The main components of the
MACS hardware are:

6
SECTION 1 Introduction of HOLLiAS MACS

 Network -- consists of the switch, router, Ethernet card and cable.

 Operator Station -- is the computer providing HMI (Human Machine


Interface) to monitor and control the running condition of the system. It can
be also used as Communication Station, where some communication
software (e.g. Modbus, OPC etc.) runs to exchange data with third party
system or devices.

 Engineer Station -- is the computer responsible for system configuration,


with which the compiled project can be downloaded to FCS, Server and
OPS.

 Field Control Station -- consists of MCU (Main Control Unit), I/O module,
terminal module, rack and control cabinet, etc.

 System Server -- is the computer to provide the HDB (Historical Database),


RTDB (Real-time Database), report printing, alarm and I/O service. Any
computer that provides this kind of service can be considered as a System
Server. Therefore the service module such as RTDB, I/O Server, HDB, and
Printer can be deployed on different computers. The System Server is
generally collocated with redundant computers, and KVM is used to switch
the two computers.

 MCU (Main Control Unit) -- is a control module and also known as lower
machine. It deals with the field data through the algorithm pre-downloaded in
the memory, and then transfers the results to server or transfers the relevant
command to actuator to control the real process.

 I/O Module -- is a hardware module to switch or transfer the data/command


between controllers and field instruments/actuators.

1.3.2.2 System Architecture

The architecture of MACS V5.2.5B is based on the concept of


“Multi-Domain-Management”. The whole system is divided into several
individual sub-systems according to position, function and feature of the
controlled system. Each sub-system will be called as a “domain” and data in
which is relatively independent. With standard protocol, data can be
exchanged between the domains. This kind of structure is not only good at
system configuration but also easy to expand and rebuild: every domain
(sub-system) can be applied and tested respectively without disturbing other
domains. What’s more, a required node can be connected with the switch
directly when a new domain is added. As an example, the control system of a
power plant is divided into several domains, as shown in Figure 1.3.2-1.

7
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.3.2-1 Multi-Domain-Management

The network architecture of MACS can be classified into standard type and
single-domain type. In both cases, all of the important components like server,
controller and network are collocated redundantly in order to ensure the
reliability of the communication.

Standard Type

The standard architecture has three layers from top to bottom as shown in
Figure 1.3.2-2.

8
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.3.2-2 Standard Network Architecture

 Monitoring Net (MNET for short)

MNET is a TCP/IP Ethernet connecting OPS, ES, CMS, system server, etc.
Due to the redundancy of the system, a pair of switches is needed. The
functions of MNET are as follows:

 Obtain the data from system servers and display it to users on the
terminal displayer.

 Transmit the instruction from HMI to the servers.

 System Net (SNET for short)

SNET is an industrial Ethernet with the proprietary HSIE protocol. It connects


system servers to FCS. The functions of SNET are:

 Collect the data from FCS.

 Transmit the instruction from MNET to FCS.

9
SECTION 1 Introduction of HOLLiAS MACS

 Control Net (CNET for short)

CNET is the data communication net at control layer. The controller


communicates with I/O module and other hardware through Profibus-DP. Data
from I/O module is transited to FCS through Profibus. After it is processed
under algorithm existing in MCU, the data is transited back to I/O module to
output.

In standard type, system servers provide most system services. This kind of
structure improves the network quality and makes itself suitable for large-scale
system.

• Wherein the large-scale system is the one which includes more than 3000
I/O points and more than 7 I/O control stations; Middle-scale system is the
one which includes about 2000~2800 I/O points and 5~7 I/O control
stations.

Single-Domain Type

Comparing to standard type, single-domain type is more suitable for Middle-


and small-scale system. The whole system is configured in one single network
that helps to decrease the network complexity and cost. The structure of
single-domain type is shown in Figure
1.3.2-3.

10
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.3.2-3 Single-Domain Network Architecture

Monitoring and Control Layer

OPS, ES, HIS, switch and others are included in this layer. This layer
communicates with the lower layer through the redundant TCP/IP protocol
Ethernet. It displays the processed field data to users and then transfers users’
operational command to lower layer. The devices including OPS, ES, CMS,
HIS, printer, etc. are connect into a network by two switches, In order to
guarantee the communication reliability of the system, some important devices
such as HIS, switch, etc. are redundant configuration.

Field Control Layer

This layer consists of FCS, I/O modules, etc. FCS communicates with I/O
devices through Profibus-DP. I/O devices transfer the collected data to MCU.
MCU processes the data according to the pre-downloaded algorithm and
transfers the data needing to be displayed to the upper monitoring and control
layer. The instructions from upper layer or FCS are also transferred to the field
actuator. Field control layer supports HART and FF protocol through
specialized hardware modules.

1.3.2.3 The Software of MACS

HOLLiAS MACS is an expandable developing platform supporting script


editing, remote debugging and secondary application development.

This manual especially focuses on the offline configuration software of ES.


Main components are as follows:

 Database Control Center

It is the main interface for project configuration and management. It helps to


accomplish major operations including project creation/management,
hardware configuration, database editing, and user configuration, compiling
and downloading.

 Hardware Configuration

It is used to configure the hardware in the new project. The hardware includes
network devices on monitoring net and system net. The I/O unit configuration
is accomplished in the field control station.

11
SECTION 1 Introduction of HOLLiAS MACS

 Graphical Editor

It helps to generate online operation flow chart and interface template. The rich
symbol library can help users to draw varies graphic interface and plot charts
for data display. User-defined symbol library is also supported for diversity and
convenience.

 Control Algorithm Configuration

This is the algorithm software which helps to configure and download the
algorithm of the project. It integrates the function of editing, management,
simulation, online debugging and hardware configuration. It supports all six
programming languages specified in IEC61131-3.

 Report Configuration

This tool is used to edit the report according to field process data. That is to
define the report and add the dynamic point information.

 Engineer Station Download

This tool is used to download the files into system servers and engineer
stations.

 Historical Data Query

Historical data of the system is stored by dates. This tool can query all the
system historical data to help users to analyze the system running condition or
accident causes.

1.4 How to Install and Uninstall


The system software installation/uninstallation process, operating environment
and some precautions will be described in this section.

1.4.1 System Requirement


To ensure a steady and normal running environment for the HOLLiAS MACS
V5.2.5B in your computer, the following configurations are recommended.

To your OPS and CMS:

12
SECTION 1 Introduction of HOLLiAS MACS

 Operating system: Windows XP SP3, Windows Server 2003 R2, Windows


Server 2008 R2 32 and 64 bit (with Chinese language support),

 Applications: Microsoft Office 2003

 Hardware:

 Intel Pentium III 450 processor

 128M RAM

 40G Hard Drive or higher

 VGA graphics card supporting resolution up to 1280 x 1024 (4:3) or


1680 x 1050 (16:9)

 Dedicated Operator Keyboard

 2 Ethernet Cards

To your system server:

 Operating system: Windows Server 2003, Windows Server 2008 R2 32 and


64 bit (with Chinese language support)

 Applications: Microsoft Office 2003

 Hardware:

 Intel Xeon 2.4GHz processor

 512M DDR II ECC RAM

 36G SAS Hard Drive

 VGA graphics card supporting resolution up to 1280 x 1024 (4:3) or


1680 x 1050 (16:9)

 Dedicated Operator Keyboard

 4 standard Ethernet Cards

These are the minimum requirements for your computer.


13
SECTION 1 Introduction of HOLLiAS MACS

1.4.2 Installation
1.4.2.1 How to install

In actual project, each computer plays a different role which is usually


described as Engineer Station, System Server, and Operator Station with
different functions. . Please see Section 2 for more details.

Server is responsible for disposing and storing data as well as responding


user’s requirement.

OPS is to monitor and check the real-time data, and manipulate the devices.

ES has the function of offline configuration, online downloading and


debugging.

Therefore, you may select different components on your computer according


to its role.

Detailed instructions for each step are shown in the following sections.

• Use the following instructions for a clean installation of MACS V5.2.5B. If


some patches are needed for MACS V5.2.5B, please read the related
upgrade documentation published at the same time of the software for
reference

• You'd better uninstall the old version before you install a new one.

1. Find the setup.exe file from your installation path in Windows Explorer,
then double-click it, the Software Production Installation page will be
shown in Figure 1.4.2-1

14
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-1 Prepare Installing

2. Click Next on the Welcome to MACS V5.2.5B Install Shield Wizard


page, as shown in Figure 1.4.2-2.

Figure 1.4.2-2 Welcome to MACS V5.2.5B Installation Shield Wizard

3. Select the destination location where the program files are stored, as
shown in Figure 1.4.2-3.
The default installation path is <C:\ MACSV\>, or click Browse to specify
15
SECTION 1 Introduction of HOLLiAS MACS

another available path for the files, and then click Next.

Figure 1.4.2-3 Target Folder Information

Select Components as shown in Figure 1.4.2-4.

16
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-4 Select Components

On Select Components dialog box, select the components according to the


requirement of the station. The components are as follows:

 MACSV_OPS: components of OPS.

 MACSV_ENG: components of ENG.

 MACSV_SERVER: components of SERVER

Below the components box, the capacity requirements of the installation and
the capacity available in system will be calculated automatically and displayed.

Then click Next.

4. On the Select History Datas Directory page, shown in Figure 1.4.2-5,


choose the data folder where the history data is achieved.
The default folder is <D:\ >, or click Browse to specify another available
directory for the files. Then click Next.

17
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-5 Historical Data Path

5. Click Next to select the tool software, as shown in Figure 1.4.2-6.

18
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-6 Select Tools

The open source office software OpenOffice.org can substitute for Microsoft
Excel to complete the functions in system: assists in class structure editing,
database import and export, measuring point list import, report editing,
replacing tag names in batch, online report printing, etc. please select the tool
according to the software be installed on the computer.

The installation package of OpenOffice.org is offered as tool software of


installation disk.

6. Please select the tool you need, as shown in Figure 1.4.2-7 and then
click Next.

19
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-7 Installation Tool

If simplified Chinese-packet is not installed in your system, you must select


Yes. If it has been installed, you can select No.

This step is ignored when ENG is not selected.

7. On the Select A or B Server page, as shown in Figure 1.4.2-8, you


should define which role this computer acts, the server A (Master) or B
(redundant Slave). Then click Next.

20
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-8 Role of the Sever

• This step is just for the computer working as System Server.

• When installing server B, the item “B” must be checked!

• “A” and “B” here only means that the node number of servers in the
network are different. The one which starts first will be the primary server
(i.e. master server), and the other is secondary server (i.e. redundant
server). “Master” or “redundant” indicates the working status of a server.

8. On the timing mode for server page, three kinds of timing methods for
server are listed, shown in Figure 1.4.2-9.

21
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-9 Timing Mode

 GPS: Timing through GPS devices.

 FM197: Timing through FM197 module.

 Software CheckTime: Timing through a software application.

Select one of these methods and click Next.

• Only computer connected with FM197 or GPS hardware can select the
previous two choices.

9. If the item “by GPS” or “by FM197” is checked, the window Please
select Port will popup, after you click Next, as shown in Figure
1.4.2-10. Otherwise the program will skip this step.

22
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-10 Select Port Number

• Please ensure that you have selected the correct serial port for GPS signal
receiving: COM1 or COM2!

10. On the confirmation page, the components that will be installed are
listed, as shown in Figure 1.4.2-11.

23
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-11 Confirm Installation

On this page, please check whether these components are what you want to
install. If you want to change any setting before this step, click Back to the
corresponding page which you want. Otherwise, click Next to start installation.

Click About on each window, you can see the version information of current
software, as shown in Figure 1.4.2-12:

Figure 1.4.2-12 Version

11. On the installation state page, there is a bar showing the progress of
installation, shown in Figure 1.4.2-13.

24
SECTION 1 Introduction of HOLLiAS MACS

Wait until it is finished. It is forbidden to click Cancel when the software is


installing. There may be some unexpected results if you cancel the installation.
Please wait patiently, and then the computer will be automatically restarted
after installation is completed.

Figure 1.4.2-13 Installation Progress Bar

1.4.2.2 Cancel Installation

• If some unexpected matter occurs, please cancel the installation and


restart the computer, then install once more.

After the installation starts, click Cancel to stop and quit the procedure of
installation. The following dialog box will pop up, as shown in Figure 1.4.2-14.

25
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.2-14 Cancel the Installation

Click Yes to exit the installation. There is a page to remind that the installation
has been interrupted.

• It is not recommended to cancel the installation after it starts.

1.4.2.3 Contents of Installation

After Typical Installation, you can check the components of the software. Open
the [Start] → [Programs] → [MACS] menu, as shown in Figure 1.4.2-15.

Figure 1.4.2-15 Items of Software

The following are the items of each component:

 MACS_ENG

 Device Configuration Download


26
SECTION 1 Introduction of HOLLiAS MACS

 FCS

 Download

 Force List Tool

 Graph Configuration

 Historical Data Query

 Report Configuration

 RTSLoader

 System Configuration

 MACS_OPS

 Configuration

 Start OPS

 MACS_SERVER

 Start Server

 MACSV_TOOLs

 ControlerLogTool

 Logpacher

 ModuleConfig

 SM020Config

• In operator station, to guarantee the stable running of online operating


system, the relevant operating station must configure hardware
device—dongle. There are 3 kinds of dongle levels in this system: 3000
tags, 6000 tags, 30000 tags; the configured dongle tags number cannot be
less than the total number of tags in project. For the number of data tags,
27
SECTION 1 Introduction of HOLLiAS MACS

please check “number of project tags” which is tipped in compiling of


Database master control software in project.

There are some important folders in the installation folder of MACS:

 Codesys: it provides executable program and library to make the industrial


algorithm strategies, and download the compiled files to the Field Control
Station.

 Datas: provides data format files for data transference.

 Dbedit: provides the executive program on variable database, the


corresponding dynamic link library and drivers.

 Graph: provides the graphs and icon libraries supplied by the software.

 Report: provides the executive program and the corresponding dynamic link
library on report edit.

 Target: provides the gsd files for hardware configuration.

 User: stores all project files including the data of project settings, graph,
report and so on.

1.4.3 Uninstallation

• Exit the HOLLiAS MACS services and program before the uninstallation.

The following contents describe the method about how to uninstall the
HOLLiAS MACS software:

Please follow the instructions below to uninstall the software from the control
panel:

28
SECTION 1 Introduction of HOLLiAS MACS

 Close all programs of HOLLiAS MACS. Click Start, and then click Control
Panel in Settings.

 Click Change or Remove Programs, as shown in Figure 1.4.3-1.

 Select the HOLLiAS MACS line. in the list of Currently installed Programs.

 Click Remove.

Figure 1.4.3-1 Change or Remove Programs

It will pop-up a prompt to remind you whether to delete the program or not, as
shown in Figure 1.4.3-2.

Figure 1.4.3-2 Uninstall Prompt

Click Yes to start uninstallation, as shown in Figure 1.4.3-3.

29
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-3 Deleting the Files

Wait until the unintallation is finished. There is a dialog box to remind the
uninstalation has finished. You are required to restart the computer right now or
later, it is recommended to restart the computer right now to delete the
components completely as shown in Figure 1.4.3-4. Click Yes.

Figure 1.4.3-4 Restart the Computer

• Uninstalling the program is just to delete the registration information and


the executable files of MACS V5.2.5B, and the related information about
the projects such as historical data ,graphs, logs, Conmaker programs,
simplified Chinese-packet and the compiled files are all left in your
30
SECTION 1 Introduction of HOLLiAS MACS

computer. If the software is installed again, these files will not be lost and
be still in related directory.

• If you want to delete all the files of the projects, please delete them
manually in the installation path folder.

• If there are patches for this software, please read the instructions provided
by the patch program.

1.5 Accessory Appliance Installation


In this section, it will briefly introduce the installation process of
OpenOffice.org1. This software could replace Microsoft Excel to complete
following functions in MACS: assists in class structure editing, database import
and export I/O tag list import, report editing, replacing tag name in batch, online
report printing, etc.

If Calc of OpenOffice is used as spreadsheet editing tool when installing MACS,


it is required to install OpenOffice.org 3.2 manually.

• OpenOffice.org 3.2 supports the editing Excel files. It means that, when
configuring report, even the“.xls” report file can be edited and printed by
Calc of OpenOffice 3.2.

The main installation steps of OpenOffice.org are shown as follows:

1. Start OpenOffice installation program

1
OpenOffice.org: OpenOffice.org offers an open source product which can be applied on multi-platforms,
including word processor, spreadsheet software, and presentation program, like writer, impress, calc,
draw, math, base.

31
SECTION 1 Introduction of HOLLiAS MACS

Find OpenOffice installation program “\\report version\tools\OpenOffice


\OpenOffice3.2.0_WinXP.exe” in installation CD, double-click the file, it tips
information of software decompressing, as shown in Figure 1.4.3-1:

Figure 1.4.3-1decompress OpenOffice

Click Next, it tips setting the storage directory of decompressed files, as shown
in Figure 1.4.3-2:

32
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-2 storage directory of decompressed files

After setting target folder, click button Unpack, it shows progress bar of
decompression process, as shown in Figure 1.4.3-3:

33
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-3 decompression process

2. Installation guide of OpenOffice.org


After decompressing, enter installation welcome page of OpenOffice.org, it
shows software name, version, and installation tips; click button Next, the
installation guide page is shown as in Figure 1.4.3-4:

34
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-4 OpenOffice.org installation guide

3. Type in user info


Please input user name and organization name according to actual condition
of the computer, and then click Next, as shown in Figure 1.4.3-5:

35
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-5 OpenOffice.org user info

4. Select installation type


There are two types of installation and only one can be selected, as shown in
Figure 1.4.3-6:

 Complete Installation

The default is complete installation, which means installing all function


component of OpenOffice.org.

 Custom Installation

Custom installation can also be selected, which means user can selectively
install OpenOffoce.org modules.

36
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-6 OpenOffice.org installation types

When Custom type is selected, click button Next, and it pops up a module for
selecting window “custom install”, as shown in Figure 1.4.3-7:

37
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-7 OpenOffice.org installation types

User must select module OpenOffice.org Calc which is under the node of
OpenOffice.org program modules. The default installation path is “C:\Program
Files\”. Click button Change and it pops up a Change Current Destination
Folder dialog box, input target folder name in the field of Folder name, click
OK to finish the process of target folder altering.

After setting the target folder and installation types, click button Next, shown as
in Figure 1.4.3-8:

38
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-8 OpenOffice.org setting window of installation target


folder

For canceling the installation of one module, click the name of the module, and
select This feature will not be available in dropdown menu, then cancel it, as
shown in Figure 1.4.3-9:

39
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-9 Module installation setting

5. Start installation
After above settings, click Next, a prompt will pop up to remind you whether to
start installation, as shown in Figure 1.4.3-10.Click Install to start, while click
Back if the steps above need to be changed. Click Cancel to exit the wizard.

40
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-10 preparing to install window of OpenOffice.org

The installation progress of OpenOffice.org is shown as Figure 1.4.3-11:

41
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-11 install progress indicating of OpenOffice.org

When the installation is finished, it popups a Installation Wizard Completed


dialog box, then click Finish to close the dialog box, as shown in Figure
1.4.3-12:

Figure 1.4.3-12 Installation of OpenOffice.org has finished

6. For the first time starting registration guide of OpenOffice


With the first start, the registration guide of OpenOffice will guide you to
complete registration of OpenOffice, as shown in Figure 1.4.3-13. The guide
will not be prompted again after restarting.

42
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-13 Registration guide 1 for OpenOffice

It will prompt to set user name, update online or not, and register or not, as
shown in Figure 1.4.3-14, Figure 1.4.3-15, Figure 1.4.3-16. OpenOffice will
start when finished.

43
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-14 Registration guide 2 for OpenOffice

Figure 1.4.3-15 Registration guide 3 for OpenOffice

44
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.4.3-16 Registration guide 4 for OpenOffice

1.6 Configuration Procedure


HOLLiAS MACS provides a universal platform to configure and control system.
You can combine the modules of certain functions together to set up your
unique system by the logic you need. All the sub-systems, such as database,
algorithm program, historical database, monitoring diagram and other product
management report are made through this kind of configuration.

A complete project is set up through all these steps as shown in Figure 1.6-1.
Then the components of the diagram will be discussed individually in the
following sections.

1. Preparation
You’d better to finish some work before starting configuration. It will be very
useful for further steps if they are done:

 List of I/O points


A table, which contains detailed information of all physical I/O
points such as name, signal type, description, measuring arrange,
etc, should be sorted out.
45
SECTION 1 Introduction of HOLLiAS MACS

Control Schema
Logic flow charts for every control unit should be on hand.

P&I Diagram, report form

2. Setting up project
Before setting up a project, you need to name the project first. Then set the
number of group and domain. The database is therefore set up after you name
the project.

3. Hardware configuration
There are two kinds of configurations of the hardware you need to do for the
new project.

 System Configuration is to arrange the network equipments in


both system network and monitoring network.

I/O Configuration is to arrange the I/O points in each FS.

46
SECTION 1 Introduction of HOLLiAS MACS

47
SECTION 1 Introduction of HOLLiAS MACS

Figure 1.6-1 Flow Chart of Configuration

4. Database configuration
Database configuration is to define and edit the information of tags in every
station. This step is the base of the whole system.

There are two kinds of points in this manual: Point means the real measured
variable like temperature, pressure etc, while Tag is virtual variable in database.
Every point must have one or more responsible tag, but some tags could have
no responsible point in the real system.

Database configuration includes class structure configuration and data


processing.

 Class structure definition


Every tag must be assigned to a class. User can define the
structure of a class according to requirement. The flexibility and
generality of system database is ensured by the functions of
database configuration which include:

 Add self-define structure (diagram in database)

 Add data item (field in database)

 Delete structure

 Delete data item

Note that all these operations are not capable of jeopardizing the integrality of
the database. You can redesign the interface after configure the diagram
structure without making change to source code.

• This function is only for developers. The engineers are not recommended
to make any change of it.

48
SECTION 1 Introduction of HOLLiAS MACS

 Data processing
This function is for the engineers to edit data. It supports many
engineers to configure at the same time and combine the data into
one database to improve efficiency. The combined data is also
available to edit, search, print, etc.

• After the compile commands are executed in database general control,


tags will be complied into corresponding control algorithm project
automatically, as well as controller algorithm into corresponding database.

5. Algorithm configuration
This step is ready to go right after database configuration. Algorithm
configuration is to write control algorithm program and download it into FCS.

There are six language tools in MACS that meet the protocol of IEC61131-3

 FBD

 LD

 ST

 SFC

 IL

 CFC

Please refer to Section 3 for more details of Conmaker.

6. Graph configuration
Graph configuration is to draw the process flow diagram consists of static
background, dynamic object and the correspondence between dynamic object
and database.

7. Diagram configuration
Diagram configuration is to create the report of field process data including
diagram appearance and definition of dynamic point.

49
SECTION 1 Introduction of HOLLiAS MACS

8. Compiling
The download file is created through compiling in the system database.

9. Engineer station download


Related contents are downloaded separately to servers and operator stations
right after the download file is created.

• Algorithm configuration is downloaded to field control station in algorithm


configuration tools.

50
1
SECTION 2
Configuration Tools

2.1 System Configuration


2.1.1 Overview
System Configuration is the project management software. It is used to create,
configure and build projects. After all the configuration is completed, the data
will be compiled to create download files. The Database Configuration and
control table editor is accessed through system configuration.

2.1.2 Interface of Main Window


2.1.2.1 Startup and Interface Summary

From Start menu, select Programs → MACS → MACS_ENG → System


Configuration, the System Configuration main window will appear as shown in
Figure 2.1.2-1.

3
SECTION 2Configuration Tools

Figure 2.1.2-1 System Configuration Main Window

The components in the main window are:

 Title bar: it is on the top of the interface and shows the name of the software.

 Menu bar: it Includes all menu commands needed by operation, some of


them can be selected through shortcut menu on toolbar. For detail about this
component please see in chapter 2.1.2.2.

 Toolbar: it includes shortcuts to the frequently used functions in the menu to


improve the efficiency. If a function is currently not active, the associated
toolbar button and menu item are inactive. For detail about this component
please see in chapter 2.1.2.3.

 Project window: it is the container of all sub-windows. By startup, only the


project information and a welcome page are showed here. The project
information includes Project name, Domain number, Group number of this
domain and Total of system tags.

4
SECTION 2Configuration Tools

• The “Total of system tags” here can be reference standard for choosing
dongle, there are 3 dongle levels in this system: 3000 tags, 6000 tags,
30000 tags; the configured tags number of dongle can’t be less than the
total number of tags in project.

 Message window: it shows the result and information of the compiling


progress. The information can help user to identify the location of the wrong
data.

 Status bar: the text at left part shows the software status. There are three
boxes at right part which indicate the status of the special keys “Caps Lock”,
“Num Lock” and “Scroll Lock” in keyboard.

2.1.2.2 Menu Bar and Shortcuts

All menus and its items will be instructed in this chapter. The title of each item
is organized as “Menu Name – Item Name”.

The menu Edit is shown as Figure 2.1.2-2:

Figure 2.1.2-2 Menu "Edit"

1. Edit – Edit Database (E)


Shortcut button:
It can open the Database Configuration for the current opened project.
Details about Database Configuration please see the chapter 2.1.4.
2. Edit – Close Database (C)
Shortcut button:
It can close an opened database.
3. Edit – Domain Setting (D)
It is used to set the group and domain number of a project.
4. Edit – Exit (X)

5
SECTION 2Configuration Tools

Shortcut button:
User can quit the software with this command. The program will prompt to
save the project if the user didn’t.
The menu Compile is shown as Figure 2.1.2-3

Figure 2.1.2-3 Menu "Compile"

5. Compile – Compile All (A)


Shortcut button:
User can use it to compile all data of the project. An existing project must
be selected first and then this command is selectable.
Details of the menu Project please see in 2.1.3 Project Management. It is
shown as Figure 2.1.2-4:

Figure 2.1.2-4 Menu "Project"

6. Project – New Project (N)


Shortcut button:
User can use it to create a new project. The configuration dialog boxes will
appear after executing this command.
7. Project – Del Project (D)
Shortcut button:
User can use it to delete an existing project.
8. Project – Import Project (I)
It imports an existing project from a user-specified folder.
9. Project – Export Project (E)
It exports the currently opened project to a user-specified folder.
10. Project – Change Project Description (C)
It is allowed user to modify the description of currently opened project.
6
SECTION 2Configuration Tools

11. Project – User Manage (U)


Shortcut button:
It configures the access privilege of different users for currently opened
project. Selected this command ,as shown in Figure 2.1.2-5.

Figure 2.1.2-5 User Manage

There are 5 kinds of Privileges, which Privilege1 to Priviledge4 is respectively


corresponding to the four privilege locks of dedicated operator keyboard, and
Priviledge0 is corresponding to no dedicated operator keyboard. Select
“Add/Modify User Information” to add and delete the specific users, as well as
modify their permissions.

12. Project – Lock Setting (L)


Shortcut button:
It assigns the defined user privileges to corresponding positions of
privilege lock on the dedicated keyboard.
User can set the view style of the main window with the commands in
menu View. This menu is shown as Figure 2.1.2-6:

Figure 2.1.2-6 Menu "View"

7
SECTION 2Configuration Tools

13. View-Tool Bar (T)


User can choose whether to show the toolbar, in front of this menu
means to show it, or else, not to show.
14. View-Status Bar (S)
User can choose whether to show the status bar, in front of this menu
means to show it, or else, not to show.
15. View-Message Window (M)
User can choose whether to show the message window, in front of this
menu means to show it, or else, not to show.
User can view the version and copyright of the System Configuration in
menu About. It is shown as Figure 2.1.2-7:

Figure 2.1.2-7 Menu "About"

16. About-About Env… (A)

Shortcut button:
It shows the version of the System Configuration.
17. About-Help (H)
It shows the manual of MACS system configuration.
2.1.2.3 Toolbar

The toolbar provides access to basic commands for editing and adding control
elements as shown in Figure 2.1.2-8.

Toolbar buttons, like their associated menu items, can be active or inactive. If a
function is active, both the toolbar button and the menu item are active.

Figure 2.1.2-8 System Configuration Toolbar

Tool Icon Name Description

Edit Database
Edit the database of current

8
SECTION 2Configuration Tools

Tool Icon Name Description


project.

Close Database Close the opened database.

Compile the data of current


Basic Compile
project.

Link Link the compiled project.

Generate Download To generate download files after


Files compiling.

Compile,Link and Generate


Compile All
Download Files.

User Manage Configure user privilege.

Assign privileges to lock on


Lock Setting
dedicated keyboard.

Quit Exit MACS system configuration.

Shows the manual of MACS


About
system configuration.

Project Name
Display all the projects.
Pull-down List

New Project To create a new project.

Del Project Delete the current project.

2.1.2.4 Message Window

Message window shows the result and information of the compiling progress,
as shown in Figure 2.1.2-9. The information can help user to identify the
location of the wrong data.

9
SECTION 2Configuration Tools

Figure 2.1.2-9 Message Window

2.1.2.5 Status Bar

The status bar shows the working status of the software, as shown in Figure
2.1.2-10.

Figure 2.1.2-10 Status Bar

2.1.3 Project Management


2.1.3.1 Creating Project

At the beginning of using this software, a project must be created before


starting other work such as configuration. To create a new project, select
Project → New Project, or click in the toolbar, a popup window appears as
shown in Figure 2.1.3-1.

Figure 2.1.3-1 Create Project

Input the project name in the blank, in this case the project is named
ExamplePro.

• The name must be modified to a string of any combination of character,


Arabic numeric or Chinese characters, the length must not exceed 31
characters.

Click OK and the name can be found in the pull-down list of project box, as
shown in Figure 2.1.3-2.

10
SECTION 2Configuration Tools

Figure 2.1.3-2 Pull-down List of Project Box

If other software of this project is open, this project can’t be opened, a tip
window pops up as shown in Figure 2.1.3-3, the user should close the related
software and then open this project.

Figure 2.1.3-3 Import Error

2.1.3.2 Deleting Project

To delete a project, first choose the project to be deleted, and select Project →
Del Project, or click in the toolbar, a popup window appears. An example
is shown in Figure 2.1.3-4 Confirm to Delete .

Figure 2.1.3-4 Confirm to Delete Project

Click OK to delete the project, otherwise click Cancel.

2.1.3.3 Importing Project

To import the configuration backup of project into System Configuration,


select Project → Import Project, Browse for Folder window is shown as Figure
2.1.3-5.

11
SECTION 2Configuration Tools

Figure 2.1.3-5 Browse for Folder

Choose the folder that contains the project to be imported, and Click OK.

• Do not place the project to be imported in the User folder of offline


configuration software. During the import process, the system will
automatically create a new folder named after the selected project in the
installation path of offline configuration. If there does such a folder exist
before import, an error message will popup as shown in Figure 2.1.3-6.

Figure 2.1.3-6 Import Error of Project Existing

2.1.3.4 Domain Number Configuration

To configure the domain number, select Edit → Domain Setting, A popup


window appears. Figure 2.1.3-7 shows an example.

12
SECTION 2Configuration Tools

Figure 2.1.3-7 Domain Setting

In the Project List, choose the project to configure and set the group number
(from 1 to 32) along with domain number (from 0 to 7) by clicking in the
window. If it is needed to configure all again, click Reset All.

• The domain number of each group must start with number 0.

• User must assign group number and domain number to the project to
generate download files. All projects can be divided into 32 groups at the
maximum, and only domains within the same group can communicate with
each other.

2.1.4 Database Configuration


2.1.4.1 Introduction

Database editor is divided into two parts:

1. Class structure editor


It is used to define structure and property of all data classes in application

13
SECTION 2Configuration Tools

system, and can modify defined structure and property.


2. Data operation
It is to be filled with original data provided by users into relevant class of
database.
Tags in the system are classified according to types, such as AI (Analog
Input), AO (Analog Output), DI (Digital variable Input), DO (Digital variable
Output) and etc. One type is defined as one class and the structure of
each class is different from the other. Note that each class must contain
the PN (Point Name) property.
The configuration is arranged in the form of table-filling. If original data is
stored in an EXCEL file or a text file, Database Configuration can import
it into database. The database can be exported and saved in form of text
file as well for further use.
While you are operating data, take notice at these tag items:
 Tag Name

A tag is often named according to its technique, functionality or position. If


the first four characters are same of a group of tags, they will be archived
as a Basic System.

• The number of Basic System in one Domain can’t exceed 2000, and the
number of tags in one Basic System also can’t exceed 2000.

• Tag name must be consisted of English letters, numbers or underlines. The


first character can’t be a number, and the length can’t exceed 12
characters. There shall not be spaces between characters.

 Tag Description

Tag Description describes the character of a tag. The length can’t exceed
32 characters, there shall not be single quote mark, brackets or asterisk.

14
SECTION 2Configuration Tools

2.1.4.2 What is the Database Configuration Main Window

• Database Configuration can conduct operation according to two levels:

• Engineer level – Highest authorization level with full privilege to


define/modify structure of class and conduct data operation

• Operator level – Conduct data operation only.

In the System Configuration main window, select Edit → Open Database, or


click in the toolbar, and a login window appears. An example is shown as
shown in Figure 2.1.4-1.

Figure 2.1.4-1 Login Window to Database Configuration

Input User ID and Password, and click OK.

• For the first time to login, the default is to access the engineer level with
User ID hollymacs and password macs.

• The system will check the user ID and password. If input error occurs three
times straight, the access will shut down.

If the user ID and password is correct, the Database Configuration main


window appears as shown in Figure 2.1.4-2.

15
SECTION 2Configuration Tools

Figure 2.1.4-2 Database Configuration Main Window

The components in Database Configuration main window are:

 Title bar

It is on the top of the window showing the project name.

 Menu

The menu System is shown as Figure 2.1.4-3:

Figure 2.1.4-3 Menu "System"

1. System-Stru Modify
Shortcut key: <Ctrl>+<O>

16
SECTION 2Configuration Tools

It can modify the structure of database as shown in Figure 2.1.4-4,


includes tag category, type, description, max points, visible or not, etc.

Figure 2.1.4-4 Database Structure Modify

2. System-Data Modify
Shortcut key: <Ctrl>+<I>
It can modify the data recorded in database as shown in Figure 2.1.4-5.

17
SECTION 2Configuration Tools

Figure 2.1.4-5 Modify Data

3. System-Password
User can add, delete and modify user password here as shown in Figure 2.1.4-6.

Figure 2.1.4-6 Database Password

4. System-Toolbar
User can set the position and type of toolbar as shown in Figure 2.1.4-7.

18
SECTION 2Configuration Tools

Figure 2.1.4-7 Toolbar Setup

5. System-Print
It prints the data information in the database.
6. System-Print Setup
User can setup the printer.

Figure 2.1.4-8 Print Setup

7. System-Quit
Shortcut key: <Alt>+<X>
User can quit the database configuration software.
The menu Window is shown as Figure 2.1.4-9.

Figure 2.1.4-9 Menu "Window"

19
SECTION 2Configuration Tools

8. Window-Layer
It arranges the opened windows in layer.
9. Window-Cascade
It arranges the opened windows in cascade.
10. Window-Horizon
It arranges the opened windows horizontally.
11. Window-Vertical
It arranges the opened windows vertically.
The menu Help is shown as Figure 2.1.4-10.

Figure 2.1.4-10 Menu "Help"

12. Help-About
Show the version of the Database Configuration.
 Toolbar

The toolbar is a shortcut to the frequently used functions in the menu to


improve the efficiency. It provides access to basic commands for editing and
adding control elements as shown in Figure 2.1.4-11.

Figure 2.1.4-11 Toolbar of Database Configuration

Tool Icon Name Description


Structure
To modify database structure
Modify

Data Modify To modify data in database

Quit System Quit Database Configuration software

20
SECTION 2Configuration Tools

• Figure 2.1.4-11 is an example of the user ID with engineer privilege. If the


user is at operator privilege level, the icon will be inactive.

 Status bar

It shows the working status of the software, as shown in Figure 2.1.4-12.

Figure 2.1.4-12 Status Bar of Database Configuration

2.1.4.3 Data Operation

In the Database Configuration main window, select System → Data Modify,


or click in the toolbar, a dialog box appears as shown in Figure 2.1.4-13.

Figure 2.1.4-13 Data Style Configuration Window

21
SECTION 2Configuration Tools

This window consists of four parts:

 Select Category – list of data class. Select the data class to configure
first.

 Select Item – After the data class is selected, the name of the item
related to the data class will appear. (For the detail of items related to
the data class, please see in the following table).

 Style – the way tags will be arranged.

 Sort Window – shows the result of chosen items in a certain order.

Select the data class (such as AI) to configure first and select the item to
configure. Click OK and the related data input window will appear (In this case,
it is data input of AI) as shown in Figure 2.1.4-14.

Figure 2.1.4-14 Data Input of AI

• The items arrangement style of data input window is based on the contents
and order selected by the user.

Please see introduction of data class and list tables of items of common used
data class in Appendix 5 of this manual.

Note that once the data is modified, the Database Configuration main
window will turn into as Figure 2.1.4-15.
22
SECTION 2Configuration Tools

Figure 2.1.4-15 Data Modified Main Window

Both of the contents of System menu and Edit menu of the Database
Configuration will change. In data operation window, click Edit, the Edit menu
as shown in Figure 2.1.4-16, and click System, the System Menu as shown in
Figure 2.1.4-17 Menu "System".

Figure 2.1.4-16 Menu "Edit"

23
SECTION 2Configuration Tools

Figure 2.1.4-17 Menu "System"

1. System-Close
Shortcut key: <Alt>+<Q>

Select Close, or click in toolbar, it will close the Data Input window as
shown in Figure 2.1.4-14.
2. System-Import Data
Shortcut key: < Ctrl >+<Ins>

Select Import Data, or click in toolbar, the data in a text file will be
imported into the Data Input window currently opened.
3. System-Export Data
Shortcut key: < Ctrl >+<S>

Select Export Data, or click in toolbar, the data in the Data Input
window currently opened will be exported into a text file (*.txt).
4. Edit-Print Preview
Shortcut key: <Ctrl>+<Shift>+<P>

Select Print Preview, or click in the toolbar to preview and check


printing results. Repeat this operation will cancel the print preview.
5. Edit-Query
Shortcut key: <Ctrl>+<F>

Select Query, or click in the toolbar, the query window will appear as
shown in Figure 2.1.4-18.

24
SECTION 2Configuration Tools

Figure 2.1.4-18 Query Selection Window

Column Name – All columns in database configuration can be selected.


Symbol – There are seven options: = (equivalent), > (more than), < (less
than), >= (more than or equivalent), <= (less than or equivalent), <> (not
equivalent) and LIKE. Query display results are displayed according to
alphabetic sequence or number value. For example, select point
name >BA05PC01, the display result is the point name of which the first
alphabetic sequence is larger than B.
Value – It’s an optional configuration based on the requirement. It is
necessary to use single quote mark or double quote mark to enclose
character string type of data on both sides.
Condition – it is the relationship between conditions such as AND and OR.
Input query name and query condition, click OK to save the generated
query condition as per query name and close the window.

• When the LIKE option is selected from Symbol, It is necessary to use


double percent mark to enclose character string type of data on both sides.

Set style for data input table.

6. Edit-Max
It’s the maximum system default value for upper limit of measuring range
and upper limit of alarm.

25
SECTION 2Configuration Tools

7. Edit-Min
It’s the minimum system default value for lower limit of measuring range
and lower limit of alarm.
8. Edit-Add
Shortcut key: <Ctrl>+<A>

Select Add, or click in the toolbar to add a record row at the end of
table.
9. Edit-Del
Shortcut key: <Ctrl>+<Del>

Select Del, or click in the toolbar to delete the selected row.


10. Edit-Insert
Shortcut key: <Ctrl>+<N>

Select Insert, or click in the toolbar to insert one row in front of


current point. The serial number of insertion point is arranged backwards
in original order.
11. Edit-Restore
Shortcut key: <Ctrl>+<R>

Select Restore, or click in the toolbar to display all data.


12. Edit-Update Database
Shortcut key: <Ctrl>+<U>

Select Update database, or click in the toolbar to store the modified


data into database.
13. Edit-Verify:
Shortcut key: <Shift>+<V>

Select Verify, or click in the toolbar, the verify result window will
appear as shown in Figure 2.1.4-19.

26
SECTION 2Configuration Tools

Figure 2.1.4-19 Verify Result Window

The operation verifies activity of database data, and verifies whether there
are points that are left in database due to improper operation and are
impossible to manage. In order to prevent error of database compilation
and verification for user before each time of compilation, the system
implements Verify operation automatically at each time of Update
database operation.
2.1.4.4 Data Import and Export

In Database Configuration window, select System | Data Modify,it will open a


data input window to configure the data with Data Import to import data from a
text file, and with Data Export to export data from Data Input window to a text
file.

1. Data Import
First, it will introduce how to import data from a text file to the Data Input
window.

Step 1. Configure Tag list

27
SECTION 2Configuration Tools

Create a table file with Microsoft Excel or Openoffice.org Calc, sort out the
database according to data types as AI, AO, DI, DO, PI, PO etc. Each type
is in one sheet of the table file, as shown in Figure 2.1.4-20:

Figure 2.1.4-20 A example table file of database

Take AI as an example, as shown in Table 2.1.4-1. The table must include


Line Number, Tag name, Station Number, Device Number, Channel
Number and Signal Range at least.
Table 2.1.4-1 Import format of tag

Column
Abbr. Description Comment
Number
1 Num Line Number Must have this information

2 PN Tag Name It consists of English letters, numbers


and underlines. The first character can’t
be a number, and the length can’t

28
SECTION 2Configuration Tools

Column
Abbr. Description Comment
Number
exceed 12 characters. There shall not
be space, %, ~, | and –(mid-line), and
case sensitive.

3 DS Tag Description The length can’t exceed 32 characters.

The station number of a tag, it is from


4 SN Station Number
10 to 49.

The module number of a tag. For FM


modules, the start number is 1, and for
5 DN Device Number SM modules, the start number is 2. The
end number is 125 for both FM and SM
modules.

The channel number of a tag. For


8-channels module, the channel
6 CN Channel Number number is from 0 to 7, and For
16-channels module, the channel
number is from 0 to 15.

Each number represent a kind of signal


7 SA Signal Range
range, as shown in Table 2.1.4-2

Upper Limit of
8 MU Upper Limit of Measure Range
Measure Range

Lower Limit of
9 MD Lower Limit of Measure Range
Measure Range

10 HH HH Alarm HH alarm limit

11 AH H Alarm H alarm limit

12 AL L Alarm L alarm limit

13 LL LL Alarm LL alarm limit

29
SECTION 2Configuration Tools

Column
Abbr. Description Comment
Number
There are 5 kinds of alarm, they are red
alarm, yellow alarm, white alarm, green
alarm and none alarm, each number
14 H2 H2 Alarm Level
represent a kind, 0- none alarm,1-red
alarm,2-yellow alarm, 3-white alarm,
4-green alarm.

There are 5 kinds of alarm, they are red


alarm, yellow alarm, white alarm, green
alarm and none alarm, each number
15 H1 H1 Alarm Level
represent a kind, 0- none alarm,1-red
alarm,2-yellow alarm, 3-white alarm,
4-green alarm.

There are 5 kinds of alarm, they are red


alarm, yellow alarm, white alarm, green
alarm and none alarm, each number
16 L1 L1 Alarm Level
represent a kind, 0- none alarm,1-red
alarm,2-yellow alarm, 3-white alarm,
4-green alarm.

There are 5 kinds of alarm, they are red


alarm, yellow alarm, white alarm, green
alarm and none alarm, each number
17 L2 L2 Alarm Level
represent a kind, 0- none alarm,1-red
alarm,2-yellow alarm, 3-white alarm,
4-green alarm.

Whether
If need cold-junction, filled this item with
18 CL cold-junction
“1”, otherwise filled with none.
compensate

If CL is filled with “1”, then fill this item


Cold-junction
19 CC with the compensation tag, for example
Compensation Tag
COLD10.

The collect cycle for historical data, the


20 CP Collect Cycle default is 1, fill it with a integral number
as times of Cycle.

Signal Range: filled with a code which represents a kind of Signal Range, as
shown in Table 2.1.4-2:
30
SECTION 2Configuration Tools

Table 2.1.4-2 the relationship of Signal Range and Signal Code

Signal Range Signal Code


T0_10mA 0

T0_20mA 1

T4_20mA 2

T0_5V 3

T1_5V 4

PT10_RTD 11

PT100_RTD 12

PT1000_RTD 13

CU50_RTD 14

CU100_RTD 15

BA1_RTD 16

BA2_RTD 17

G_RTD 18

PT10_NEGATIVE_RTD 19

PT100_NEGATIVE_RTD 20

PT1000_NEGATIVE_RTD 21

CU50_NEGATIVE_RTD 22

31
SECTION 2Configuration Tools

Signal Range Signal Code


CU100_NEGATIVE_RTD 23

BA1_NEGATIVE_RTD 24

BA2_NEGATIVE_RTD 25

G_NEGATIVE_RTD 26

mv 50

LL_2_TC 51

B_TC 52

E_TC 53

J_TC 54

K_TC 55

R_TC 56

S_TC 57

T_TC 58

CK_TC 59

EA_2_TC 60

EU_2_TC 61

LB_3_TC 62

N_TC 63

32
SECTION 2Configuration Tools

Signal Range Signal Code


T0_10V 64

Frequency type 70

Accumulate type 71

When editing data tables, the often used data types and its items which
must be set in a data table at least list as in Table 2.1.4-3:
Table 2.1.4-3 Essential items when import data

Data Type Items(at least) Comment


If MU<MD for a AI tag,
set its IS as TRUE.
Choose E_TC as the
AI Num, PN, SN, DN,CN, SA Cold-junction
Compensation Tag’s
signal range, that is
53.

AO Num, PN, SN, DN,CN, SA

SE: SOE property, if it


DI Num, PN, SN, DN,CN, SE has SOE property for a
digital tag, set SE as 1.

DO Num, PN, SN, DN,CN

Signal
Type:70-frequency
PI Num, PN, SN, DN,CN, SA
Type, 71-Accumulate
Type

Step 2. Import the text file

After editing the data list, save it as a text file. The file name and saving
path can all be set as the user’s wish. Open the text file, which is shown
as Figure 2.1.4-21.

33
SECTION 2Configuration Tools

Figure 2.1.4-21 Save as a text file

• When executing Import Data, the content of import are from the second
line of the imported file(Text file), so the first line of the file could be some
description or none.

• The sequence of items from database should keep pace with the I/O tag
list

Step 3. Set style for data input table

For example, select AI data type, and choose Items Name in consistent
with the sequence of the items of the text file. Shown as in Figure
2.1.4-22:

34
SECTION 2Configuration Tools

Figure 2.1.4-22 Select Items

• After selected items, you can save it as the Default Style if the Modify
Default Style is selected as . Then, when you set the table style next
time, click Old Style button to show the default style which you have settled
in recent time. Or, you can set it as Style1 or Style2, no more description in
the following.

• The selected item name in database list and the order should be the same
as which in tag list.

Click OK, Open Data Input-AI Window, shown as in Figure 2.1.4-23:

35
SECTION 2Configuration Tools

Figure 2.1.4-23 Data Input Window-AI

Select System| Import Data, it will open Import Filename dialog box shown
as in Figure 2.1.4-24, select the text file you have modified, click Open.

Figure 2.1.4-24 Select a text file to import

It will prompt an Import… dialog box shown as in Figure 2.1.4-25, set the
position for Source Start Column, Source End Column and Destination
Start Column, then click OK, it will import the contents of the text file
shown as in Figure 2.1.4-25.

36
SECTION 2Configuration Tools

Figure 2.1.4-25 Import text file options

Figure 2.1.4-26 Imported Data

37
SECTION 2Configuration Tools

• After Import Data for the first time, if you want to add data by the operation
of Import Data again, the new data will be add just below the data you have
imported, but the No. will not sort automatically, and it can’t be modified in
Data Input dialog box. So when you have big change to your data, you’d
better modify your text file, and delete the data in Data Input dialog box,
then import all again. Thus, you can avoid the problems of repeated No. or
repeated tags.

• If you want to modify only a few tags of database, you’d better modify them
in Data Input dialog box, double click the cells, and you can modify them
easily. Remember that the No. is unmodified.

Step 4. Update and Verify data

Select Edit| Update Database, or click in the toolbar, it will update


your modifition to database shown as in Figure 2.1.4-27.

Figure 2.1.4-27 Update database

When updating, if there are any problems, it will prompt error messages.
Otherwise, it will go on checking data automatically. The results will show

38
SECTION 2Configuration Tools

in Verify Result dialog box, shown as in Figure 2.1.4-28. Click OK to finish


checking.

Figure 2.1.4-28 Verify data

Please refer to the above operations to import other data types, no more
description in the following.

• When import data, the names, sequence and numbers of the items in Data
input dialog box must be the same as in text file.

2. Data Export
Export data to a text file, suffix is “.TXT”.
After opening a Data input dialog box, select System| Export Data, or click
in the toolbar, it will prompt a Save as dialog box shown as in Figure
2.1.4-29:

39
SECTION 2Configuration Tools

Figure 2.1.4-29 Export data

Input a File name, then click Save to save as a text file.

2.1.5 Project Case of System Configuration


In this section, it will describe the steps of System Configuration by a project
case.

2.1.5.1 Flow chart of System Configuration:

creat new project

domain setting

adjust database

add database tags

Database update
and verify

Figure 2.1.5.1 Flow chart of System Configuration

Thereinto, adjusting the database includes the following 4 sections:

1. Adjust tag list;

40
SECTION 2Configuration Tools

2. Create EXCEL worksheets of AI, AO, DI, DO, PI, and etc, according to
data types;
3. Check up whether duplication of name or being over limit of characters
exist;
4. Save EXCEL worksheets as txt files.
2.1.5.2 Create new project

1. Open System Configuration


Select Start -> Program -> MACS -> MACS_ENG -> System
Configuration, and click it.
2. Create new project

(1) Click New Project in menu Project or Icon ;

(2) Open dialog box Add Project;

(3) Input project name, such as ExamplePro, click OK (for project naming
please refer to 2.1.3.1), as shown in Figure 2.1.5-1.

41
SECTION 2Configuration Tools

Figure 2.1.5-1 Add Project

By Explore, it can view the folder which is named by new project name
under the install catalog MACS_ENG\\user\
3. Domain setting
4. Click command Domain Setting in menu Edit to open setting dialog
box;
5. In setting dialog box, set Group Number and Domain Number for the
selected project, then click OK (please refer to 2.1.3.4), as shown in
Figure 2.1.5-2.

42
SECTION 2Configuration Tools

Figure 2.1.5-2 Domain and Group number

As project ExamplePro, set group number as 1, domain number as 0.


2.1.5.3 Adjust database

1. Adjust tag list


Take adjusting AI as example:
(1) Create new EXCEL worksheet, and name as AI;

(2) Fill in worksheet header – related content items of tags AI, and fill the
tags information in by the order of header contents. as shown in
Figure2.1.5-3.

43
SECTION 2Configuration Tools

Figure2.1.5-3 Database(excel)

For the filling details please refer to 2.1.4.4.


2. Check up whether duplication of name or being over limit of characters
exist;
3. Convert EXCEL file to TXT file
(1) After checking, delete header of worksheet AI.xls

(2) Save it as file AI.txt. as shown in Figure 2.1.5-4.

44
SECTION 2Configuration Tools

Figure 2.1.5-4 Database(txt)

(3) When converting and saving the file, it will prompt as following dialog
box, as shown in Figure2.1.5-5.

Figure2.1.5-5 Save Tips Box(1)

(4) Click OK, it will popup tips, as shown in Figure 2.1.5-6:

Figure 2.1.5-6 Save Tips Box(2)

45
SECTION 2Configuration Tools

(5) Click YES.

The adjusting steps of worksheets AO, DI, DO, PI and etc are the same as
AI’s.
2.1.5.4 ADD tags in database

1. The first time adding tags in database, it is suggested to import TXT file
into database for convenience.

(1) Click Edit Database in menu Edit or icon ;

(2) Input user name and password (engineer level) in entering interface,
then click OK;

(3) If it is the first time for entering, the user name is hollymacs, and
password macs;

(4) Click command Data Modify in menu System or icon ;

(5) Open dialog box Select Database Style, select AI;

(6) Select Modify Default Style, select items one by one according to
sequence of database header, then click OK (please refer to 2.1.4.4);
as shown in Figure2.1.5-7.

46
SECTION 2Configuration Tools

Figure2.1.5-7 Edit Database

(7) Click Data Import in menu System or icon to open dialog box
Import Filename;

(8) Select AI.txt in the dialog box and click Open;

(9) It will popup dialog box Import condition, click OK, then AI importing
has finished (please refer to 2.1.4.4), as shown in Figure2.1.5-8.

47
SECTION 2Configuration Tools

Figure2.1.5-8 Finished Importing Database

The import of AO, DI, DO, PI, etc is the same as AI’s.

2. For some projects which have finished system configuration, there are
2 ways if it need to modify or delete/add several tags:
The first way: export firstly, then import.
(1) Export the tags which need to be modified from database (please refer
to 2.1.4.4);

(2) Open the exported file by EXCEL;

(3) Look up and modify target tags in EXCEL;

(4) When adding/deleting tags (without adding/deleting of I/O modules):

Replace information of reserved tags by information of newly added tags;


Modify information of deleted tags as reserved tags;

• When adding tags, it is suggested to select location of reserved tags from


control station which the new tags belong to, and the corresponding
modules which have more reserved tags.

After modifying, save the TXTfile, and import if into system database
again.
The other way: modify in the system database directly

48
SECTION 2Configuration Tools

Open edit window of database;

Look up the tags which need to be modified (please refer to Look Up of


2.1.4.3);

Modifying, adding, and deleting are the same with step 4 of the first way.

2.1.5.5 Database update and verify

1. After importing, modifying, adding, deleting and etc, the database must
be updated and verified. Click Update date in menu Edit or icon ;
1. Open dialog box Verify Result, and click OK;

2. Click Verify in menu Edit or icon ;


3. Open dialog box Verify Result, and click OK;

4. Click Close in menu System or icon to close the current data


sheet.

2.2 Device Configuration


2.2.1 Introduction
Device configuration software is used to define hardware setup of application
system on engineer station.

System setup is divided into two parts:

 System device configuration – to complete hardware setup of network


devices and monitor the network.

 I/O device configuration – to complete I/O unit setup of each FCS.

User can access each configuration from the main window and complete
configuration process of each part simply and easily. Once the edit information
is saved, the relevant source files that store configuration information of user
will be generated. It is forbidden to modify at discretion.

• Project must be created in system configuration software before system


device configuration.

49
SECTION 2Configuration Tools

When all the edit configurations are completed, it is required to proceed with
compilation. Automatic error correction function is available in compilation
process, and prompt will be given automatically when error is found.

2.2.2 What is Device Configuration Main Window


From Start menu, select Programs → MACS → MACS_ENG → Device, The
device configuration main window will appear as shown in Figure 2.2.2-1.

Figure 2.2.2-1 Device Configuration Main Window

The components in Device Configuration main window are:

50
SECTION 2Configuration Tools

 Title bar

 Menu

 Toolbar

 Project information window

 Message window

 Status bar

In the following chapters, the function of each part will be introduced to help
use the software more efficiently.

2.2.2.1 Title Bar

Title bar is on the top of the main window which shows the name of the project.

2.2.2.2 Menu

All menus and their items will be instructed in this chapter. The title of each
item is organized as “Menu Name – Item Name”.

The menu File is shown as Figure 2.2.2-2:

Figure 2.2.2-2 Menu "File"

1. File-Open Project
It can open an existing project to do device configuration for it.
2. File-Exit
User can exit this software with this menu.
The menu Edit is shown as Figure 2.2.2-3:

Figure 2.2.2-3 Menu "Edit"

3. Edit-System device

51
SECTION 2Configuration Tools

User can add a device to the system with wizard of five steps, please see
details in chapter 2.2.3.
4. Edit-I/O device
It shows all the I/O devices in the system, the user can do configuration
operation for the devices.
User can set the view style of the main window with the commands in
menu View. This menu is shown as Figure 2.2.2-4:

Figure 2.2.2-4 Menu "View"

5. View-ToolBar
User can choose whether to show the toolbar, in front of this menu
means to show it, or else, not to show.
6. View-StatusBar
User can choose whether to show the status bar, in front of this menu
means to show it, or else, not to show.
7. View-Custom Device
User can define a new I/O device with this menu.
The menu Help is shown as the Figure 2.2.2-5:

Figure 2.2.2-5 Menu "Help"

8. Help-About Device Editor…


It shows the version of the Device Configuration.
2.2.2.3 Toolbar

The toolbar is a shortcut to the frequently used functions in the menu to


improve the efficiency. It provides access to basic commands for editing and
adding control elements as shown in Figure 2.2.2-6.

Figure 2.2.2-6 Toolbar of Device Configuration Main Window

52
SECTION 2Configuration Tools

Tool Icon Name Description


Open a project to do device
Open project
configuration.

System device
Wizards for device configuration.
wizard

Delete module Delete the selected module.

Add I/O module Add an I/O module.

Automatic To assign addresses for the device


assign address automatically.

Compile Compile device information.

Compile Show/Hide the compile information


window window.

Data sum Show device statistics information.

2.2.2.4 Message Window

Message window shows the result and information of the compiling progress,
as shown in Figure 2.2.2-7. The information can help users to identify the
location of the wrong data.

Figure 2.2.2-7 Message Window of Device Configuration Main Window

2.2.2.5 Status Bar

The status bar shows the working status of the software, as shown in Figure
2.2.2-8.

53
SECTION 2Configuration Tools

Figure 2.2.2-8 Status Bar of Device Configuration Main Window

2.2.3 System Device Configuration


System device configuration is to define all devices mounted on SNET and
MNET. Some basic concepts to be used for system device configuration are
introduced as follows:

Node – unit that is connected to SNET and can complete function


independently. It can be classified into server node (SVR node), field control
station node (FCS node), operator station node (OPS node) and etc.

Device – hardware devices mounted on each node on system network. It can


be main control unit, operator host computer, central server host computer,
Ethernet card and etc.

Field control station node includes following devices:

 Main control unit

 Ethernet card

• Field control station node consists of 2 main control units and 6 Ethernet
cards.

Operator station node includes following devices:

 Operator station host computer

 Ethernet card

• Operator station node consists of 1 main control unit and 2 Ethernet cards.

Server station node includes following devices:

54
SECTION 2Configuration Tools

 Central server host computer

 Ethernet card

• Server node consists of 1 central server host computer and 4 Ethernet


cards.

2.2.3.1 System Device Wizard

In Device Configuration main window, select Edit →System device, and a


wizard dialog box will appear as shown in Figure 2.2.3-1.

1. In network setting, use default setup value (Net A: 130/Net B: 131). Then
click Next.

Figure 2.2.3-1 System Device Wizard 1/5

2. In server setup, use default setup value (Redundancy). Then click Next, as
shown in Figure 2.2.3-2.

55
SECTION 2Configuration Tools

Figure 2.2.3-2 System Device Wizard 2/5

3. In I/O Control Station number, input Start Address (from 10 to 49) and
Amount (the default number is 1, the maximum is 40). Then click Next. As
shown in Figure 2.2.3-3.

Figure 2.2.3-3 System Device Wizard 3/5

4. In Operation Station number, input Start Address (from 50 to 79) and


Amount, (the default is 1, the maximum value is 30). Then click Next, as shown
in Figure 2.2.3-4.

56
SECTION 2Configuration Tools

Figure 2.2.3-4 System Device Wizard 4/5

5. Check results shown in the final step window. Then click Start... to complete
adding of system device. An example is shown in Figure 2.2.3-5.

Figure 2.2.3-5 System Device Wizard 5/5

After completing wizard setup, system device configuration window will appear
automatically as shown in Figure 2.2.3-6. The left section of edit window
displays a device tree and the right section displays attribute or data of a
certain node or device.

57
SECTION 2Configuration Tools

Figure 2.2.3-6 System Device Configuration Window

To run the system device configuration again, click in toolbar, a popup


window appears as shown in Figure 2.2.3-7, Click Yes, the system will popup
wizard dialog box again for the user to add other system device.

Figure 2.2.3-7 Create Confirmation

The automatic generation rules of device point name are listed in the following
table.

Types Point name rules Examples

“OPSNode_” + station
Operator node OPSNode_50
number

58
SECTION 2Configuration Tools

Types Point name rules Examples

“OPSDev_” + station
Operator host computer OPSDev_50
number

“OPS_” + station number +


A network card OPS_50_MNetA
“MNetA”

“OPS_” +station
B network card OPS_50_MNetB
number+”MNetB”

A server node: SVRNode_A SVRNode_A

Server host computer SvrDev_A SvrDev_A

Management network A SVR_A_MNetA SVR_A_MNetA

Management network B SVR_A_MnetB SVR_A_MnetB

System network A SVR_A_SNetA SVR_A_SNetA

System network B SVR_A_SNetB SVR_A_SNetB

B server node: SVRNode_B SVRNode_B

Server host computer SvrDev_B SvrDev_B

Management network A SVR_B_MNetA SVR_B_MNetA

Management network B SVR_B_MnetB SVR_B_MnetB

System network A SVR_B_SNetA SVR_B_SNetA

System network B SVR_B_SNetB SVR_B_SNetB

“FCSNode_” + station
IO station node: FCSNode_10
number

59
SECTION 2Configuration Tools

Types Point name rules Examples

“MCUDev_” + station
Main control unit A MCUDev_10A
number + “A”

“IO_” + station number +


System network A IO_10A_SNetA
“A_SNetA”

“IO_” + station number +


System network B IO_10A_SNetB
“A_SNetB”

“IO_” + station number +


Backup network IO_10A_Bnet
“A_BNet”

“MCUDev_” + station
Main control unit B MCUDev_10B
number + “B”

“IO_” + station number +


System network A IO_10B_SNetA
“B_SNetA”

“IO_” + station number +


System network B IO_10B_SnetB
“B_SNetB”

“IO_” + station number +


Backup network IO_10B_BNet
“B_BNet”

2.2.3.2 Adding Node Manually

Using wizard is not the only way to add node and device. In case additional
devices need to be added after the system configuration, adding node
manually is also available.

To add node manually, right-click MACS device configuration and select Add
Node, a popup window will appear as shown in Figure 2.2.3-8.

60
SECTION 2Configuration Tools

Figure 2.2.3-8 Adding Node Manually

There are two kinds of node that users can add to the system:

 Field control station (FCS)

In Node Type pull down list, select Field control station, the window will
change as shown in Figure 2.2.3-9.

Figure 2.2.3-9 Adding Field Control Station Node

Input the number of Start Address and Node Amount. The default number
of Nodes is 1. Then click OK. The related control station will be added to
the system and can be seen in the device configuration tree.
 Operator station(OPS)

In Node Type pull down list, select Operator station, the window will
change as shown in Figure 2.2.3-10.

61
SECTION 2Configuration Tools

Figure 2.2.3-10 Adding Operator Station Node

Input the number of Start Address and Node Number. The default number
of Nodes is 1. Then click OK. The related control station will be added to
the system and can be seen in the device configuration tree.

• The number of nodes in Add Node window is the sum of the operator
station nodes already added and operator station nodes to be added. If the
input number is less than original number of this kind of node, even user
click OK, the original configuration will not be changed.

If you have not added any System device, then you will have three kinds of
Node Types. Select Add Node, a popup window will appear as shown in
Figure 2.2.3-11:

Figure 2.2.3-11 Adding Node Manually

62
SECTION 2Configuration Tools

 Server Station

In Node Type pull down list, select Server station, click OK,it will add
Server station 0(Server A) in default, then if you add a Server station node
again, it will add Server station 1(Server B).
You can add only two Server nodes at most in one project.
2.2.3.3 Device Property

To see and change the property of the device, right-click the device icon in the
device tree, and select Property in the popup menu, the property window will
appear. Due to the property differences, the contents of property window are
not the same. Several property windows of different devices are shown as
Figure 2.2.3-12, Figure 2.2.3-13, Figure 2.2.3-14, Figure 2.2.3-15 and Figure
2.2.3-16.

Figure 2.2.3-12 Server Property

Figure 2.2.3-13 MCU Property

63
SECTION 2Configuration Tools

Figure 2.2.3-14 OS Property

Figure 2.2.3-15 SNET Card Property

Figure 2.2.3-16 MNET Card Property

Note that there is no need to set up IP address for SNET card. On the contrary,
it is necessary to set up IP address for MNET card and the default address has
already been set up. This address can be modified in the MNET card property
as shown in Figure 2.2.3-16.

The set up rule of default MNET card address is listed in the following table.

64
SECTION 2Configuration Tools

Type IP address setup rule Example

Operator station A network


130.0.0.station number 130.0.0.50
card

Operator station B network


131.0.0.station number 131.0.0.50
card

Server A, network card A 130.0.0.1

Server A, network card B 131.0.0.1

Server B, network card A 130.0.0.2

Server B, network card B 131.0.0.2

2.2.3.4 Compiling, Saving, Closing and Quitting of System Device


Configuration

To compile the system device configuration, click in the toolbar, and the
compile information will be displayed in the message window. If the compiling
succeeds, the information will show as Figure 2.2.3-17.

Figure 2.2.3-17 Compiling Succeeds

To save the device configuration information, select File → Save, the current
system device information will be saved after compiling.

To close the current device configuration, select File → Close, a popup window
will appear as shown in Figure 2.2.3-18.

65
SECTION 2Configuration Tools

Figure 2.2.3-18 Save Data before Closing

 Save the data and close the device configuration, click Yes.

 Close the device configuration without storing, click No.

After system device configuration is closed, the device configuration window


will show automatically. It is available to open system device configuration
again or open I/O device configuration.

To quit the system device configuration, select File → Exit, and the device
configuration software will shut down.

2.2.4 I/O Device Configuration


I/O device configuration is used to configure the internal device of field control
station. The configuration includes adding of link and I/O board in the station.

In MACSV system, IO device configuration adopts the idea to mount “device”


on “communication link”, i.e. multiple devices can be mounted on one
communication link, and there are several points of different types on each
device. Basic concepts to be used for field control station are introduced as
follows:

66
SECTION 2Configuration Tools

 Communication link: refers to physical circuit of identical


communication medium, communication parameter and
communication port. Such as PLC, COM, MULTICOM, DP,
HART, LONWORKS, RS-485 and etc, which are all referred to as
communication link.

 Communication parameter: refers to parameter and device


configuration information required to complete link communication.

 Device: refers to I/O devices that are mounted on communication link


and are capable of independent addressing, such as various types of
I/O unit. Each device has corresponding device address and device
description, and different device attributes.

2.2.4.1 Adding I/O Device

To add I/O device, select Edit → I/O device in the device configuration main
window, the I/O device window will appear as shown in Figure 2.2.4-1.

Figure 2.2.4-1 I/O Device Window

The left section of I/O device window displays field control station added in
system device configuration and the right section displays the relevant
attribute of the device.
67
SECTION 2Configuration Tools

Double click the FCS in the left section to show the DP of it as shown in Figure
2.2.4-2.

Figure 2.2.4-2 DP of FCS

Right click the DP, the right-click menu is shown in Figure 2.2.4-3.

Figure 2.2.4-3 Right-click Menu of DP

Select Add Module, or click in the toolbar, the Add I/O Module window
will appear as shown in Figure 2.2.4-4.

68
SECTION 2Configuration Tools

Figure 2.2.4-4 Add I/O Module

Select the module to add in the list and input the number of module, then click
Add. The newly added module will be found in the left section of I/O device
window, an example is shown in Figure 2.2.4-5.

Figure 2.2.4-5 Newly Added Module

Number in the bracket is the device address of I/O device. It is generated


according to the adding order by default. Note that the address can be
modified manually.
69
SECTION 2Configuration Tools

2.2.4.2 Operation of I/O Device

Right click the I/O device added, the right-click menu will popup to show the
available operation of this device, as shown in Figure 2.2.4-6.

Figure 2.2.4-6 Right-click Menu of I/O Device

 Property

Select Property in the menu, the property window will appear as shown in
Figure 2.2.4-7.

Figure 2.2.4-7 Property of I/O Device

The new added SOE module SM611 and SM619 supports two configurations,
single module or double-module mode. The default device configuration is
software timing and double-module mode.

If user parameter is 0x01, the device is hardware timing and double-module


mode.

If user parameter is 0x03, the device is hardware timing + 0.5ms and


double-module mode.

If user parameter is 0x04, the device is software timing and single-module

70
SECTION 2Configuration Tools

mode.

If user parameter is 0x05, the device is hardware timing and single-module


mode.

If user parameter is 0x04, the device is hardware timing +0.5ms and


single-module mode.

 Address represents the device address that can be chosen from 1


to 127 at FM series. Note that the address must be unique.

 Description is the description of the device which will be added


automatically.

 External Power Supply can be selected according to actual


situation.

 Use Auto-Generate Parameter is selected by default.

• Users can modify the some Parameter of a device, then dash out “Use
Auto-Generate Parameter”.

• As the limit of DP date capacity, both the input area and output area is
3583 bytes, 14 double modules can be added at most in an IO station, the
input area of each SOE module is 244 bytes, or 28 single modules can be
added, the input area of each SOE module is 124 bytes.

 Auto Address

Select Auto Address in the menu, or click in the toolbar, a popup


window will appear as shown in Figure 2.2.4-8.

Figure 2.2.4-8 Automatically Arrange Address Confirmation

Click Yes to let system assign device address automatically in accordance


with current arrangement sequence.

71
SECTION 2Configuration Tools

 +Redundancy

Select +Redundancy, and the figure in front of device will turn into
which stands for redundant configuration. Double click the device, and the
redundant device will be displayed under main device in the device tree.
 Delete Device

Select Delete Device or click in the toolbar, the selected I/O device
will be deleted.
2.2.4.3 Compiling, Saving, Closing and Quitting of I/O Device
Configuration

Select the FCS to be compiled, and click in the toolbar. The compiling will
be done and the result will be displayed in the compiling message window.

Saving, closing and quitting operations are similar to that of system device
configuration, for more detail please see in chapter 2.2.3.4 Compiling, Saving,
Closing and Quitting of System Device Configuration

2.2.5 Flow chart of Device Configuration

Allocation of station number create new project


and device number

adjust database

System device configuration


add database tags

IO device configuration Database update and verify

Compile

Figure 2.2.5-1 Flow Chart of Device Configuration

1. Select Start -> All Programs -> MACS -> MACS_ENG -> Device
Configuration;
2. It will popup dialog box Project List, select target project, click OK. In
this section, System Device Configuration will be described by taking
project ExamplePro as example.
72
SECTION 2Configuration Tools

2.2.5.2 System Device Configuration

Confirm the number of Field Control Station and Operator Station (sum of
Operator Station and Engineer Station), then enter System Device
Configuration, the detailed steps are as following:

1. Click System device in menu Edit to enter System Device


Configuration
2. It will popup dialog box System device Wizard (the setting please refer
to 2.2.3.2);
3. Click Save in menu File;
4. Click File in menu File.

• The properties of System device can be modified on the basis of actual


condition, normally the NIC address of server, so deselect item Auto
Comment in menu View before System device modification.

 If it needs to add Field Control Station or Operator Station after System


Device Configuration:

5. Click System device in menu Edit to enter System device


Configuration;
6. Add System device (please refer to 2.2.3.3);
7. Click Save in menu File;
8. Click Close in menu File.
 If it needs to delete Field Control Station or Operator Station after
System Device Configuration:

9. Click System device in menu Edit to enter System device


Configuration;
10. Select the device which is to delete under the sub-catalog of MACS
Device Configuration.
11. Right click it, and click Delete in shortcut menu; as shown in
Figure2.2.5-2.

73
SECTION 2Configuration Tools

Figure2.2.5-2 Property of System Device Node

12. It will prompt Confirm operation tip, Then click OK;


13. Click Save in menu File;
14. Click Close in menu File.
2.2.5.3 I/O Device Configuration

When create new project, the steps of I/O device Configuration for the first time
are as following:

1. Click I/O device in menu Edit to enter I/O device Configuration;


2. Add I/O device (please refer to 2.2.4.1);
3. Click Save in menu File;
4. Click Close in menu File.

• The properties of I/O device can be modified on the basis of actual


condition, so deselect item Auto Comment in menu View before I/O device
modification (please refer to 2.2.4.2).

 If it needs to add modules after I/O Device Configuration:

5. Click I/O device in menu Edit to enter I/O device Configuration;


6. Select DP and right click to open shortcut menu; as shown in
Figure2.2.5-3.

74
SECTION 2Configuration Tools

Figure2.2.5-3 Property of DP

7. Click Add module to add modules which are needed (please refer to
2.2.4.1);
8. Click Save in menu File;
9. Click Close in menu File.
 If it needs to delete modules after I/O Device Configuration

10. Click I/O device in menu Edit to enter I/O device Configuration
11. Select the I/O device which is to delete, right click it to open shortcut
menu; as shown in Figure2.2.5-4.
12. Click Delete device;

Figure2.2.5-4 Property of I/O device

13. It will prompt as The deleted data is unrecoverable, are you sure?
Click OK;
14. Click Save in menu File;
15. Click Close in menu File.

75
SECTION 2Configuration Tools

2.2.5.4 System Compile

According to the configuration condition of tag information in database, system


device, and I/O device, system will generate project file of control station and
corresponding files.

When System configuration and Device Configuration are finished, execute


System Compile:

1. Select Start -> All Programs -> MACS -> MACS _ENG -> System
Configuration, and click it;
2. Select project which is to compile, such as ExamplePro;

3. Click Compile All in menu Compile or icon ;


4. It will popup a prompt box, and click OK then; as shown in
Figure2.2.5-5.

Figure2.2.5-5 Compile tips box

5. Start Compiling; as shown in Figure2.2.5-6.


6. When Compiling finished, close window System Configuration.

76
SECTION 2Configuration Tools

Figure2.2.5-6 Compiling

2.3 Graph Configuration


2.3.1 Introduction
Graph configuration is used to generate graphs of a project, so that the
operator can view the whole system of the project conveniently.

Industrial control system flow diagram includes static graph and dynamic
graph:

77
SECTION 2Configuration Tools

 Static graph represents the static information in the system and has
nothing to do with database.

 Dynamic graph represents the dynamic information which changes


along with the real time value of database tags. The changing contents
can be color, size, shape and etc.

Graph configuration software provides various of editing tools including graph


generation, filling, compose, discompose, rotate, stretch, cut, copy, paste and
etc which make it flexible to change the graph.

Graph configuration software can also edit the dynamic and interactive
features of the graph.

 Dynamic features – color change, text, blink, show/hide, move


horizontally, filling, scale, rotate, curve, X-Y graph and etc.

 Interactive features – push window, switch based graph,


increase/decrease value, online change database point value and etc.

Each graph page corresponds to one file.

• In this chapter, unless specified graph size is in unit of 0.1 pixels.

2.3.2 Graph Configuration Main Window


From Start menu, select Programs → MACS → MACS_ENG → Graph
Configuration, select the project in the list, and click Select, as shown in Figure
2.2.3-1. The graph configuration main window will show as Figure 2.3.2-2.

78
SECTION 2Configuration Tools

Figure 2.3.2-1 Select Project from Graph Configuration.

79
SECTION 2Configuration Tools

Figure 2.3.2-2 Graph Configuration Main Window

The components in Graph Configuration main window are:

80
SECTION 2Configuration Tools

 Title bar

 Menu

 Toolbar

 Graph library

 Working area

 Color box

 Status bar

 Cursor position

 Graph specification

The sub-windows in this window can be fixed or active by double clicking, for
example, double click the graph library, it will turn active as shown in Figure
2.3.2-3. Double click this active window; it will turn fixed in its original position.

81
SECTION 2Configuration Tools

Figure 2.3.2-3 Active Sub-window

2.3.2.1 Menu

All menus and their items will be introduced in this chapter. The title of each
item is shown as “Menu Name – Item Name”.

The menu File is shown as Figure 2.3.2-4:

82
SECTION 2Configuration Tools

Figure 2.3.2-4 Menu "File"

1. File-Open Project

Shortcut button:
It can open an existing project.
2. File-Close Project

Shortcut button:
It can close an opened project. If the project is already changed, the
software will prompt tips for saving the project.
3. File-New

Shortcut button:
Shortcut key: <Ctrl> + <N>
It can create a new graph file, and the initial file name is "Untitled ". It is
recommended that the user should better change this file name when
saving the graph.
4. File-Open

Shortcut button:
Shortcut key: <Ctrl> + <O>
It can open an existing graph file.
5. File-Close
83
SECTION 2Configuration Tools

It can close the opened graph file. If the file is already changed, the
software will prompt tips for saving this file.
6. File- Save

Shortcut button:
Shortcut key: <Ctrl> + <S>
It can save changes for the current file. If the file is saved as "Untitled ", it's
necessary to change its name.
7. File-Save All

Shortcut button:
It can save all the opened files in current project.
8. File-Save As
It can save the current file by another name without changing the initial
file.
9. File-Import (File)
User can import graphs from existing files, the types are as shown in the
following figure, Standard Shapes means to import the standard graph to
the working area; Control Configuration means to import the control
configuration file; Device Configuration means to transform the files
generated by device configuration to graph file.

Figure 2.3.2-5 Menu "Import (File)"

10. File-Import (Clipboard)


User can import graphs from system clipboard, its type is shown in Figure
2.3.2-6:

Figure 2.3.2-6 Menu "Import (Clipboard)"

11. File-Property
It shows the property of the current file which includes file name, created
time, modified time and shapes size.
12. File-Print Setup
User can set up the print option.
13. File-Print Scheme

84
SECTION 2Configuration Tools

User can set up the print scheme.

14. File-Exit
It can exit the current opened file, and the system will prompt to save
changes for this file.
The menu Edit is shown as Figure 2.3.2-7:

Figure 2.3.2-7 Menu "Edit"

15. Edit-Undo

Shortcut button:
Shortcut key: <Ctrl>+<Z> or <Alt >+<Backspace>
It cancels the latest action in this file. Repeat this command, all the actions can
be canceled back to the moment the file was opened.

16. Edit-Redo

Shortcut button:
User can restore the undone actions (Edit->Undo) in current file use
Redo.
17. Edit-Cut

Shortcut button:
Shortcut key: <Ctrl>+<X> or <Shift>+<Delete>

85
SECTION 2Configuration Tools

Use this command the user can send the current selected graph from
editor to clipboard, and delete this graph from editor.
18. Edit-Copy

Shortcut button:
Shortcut key: <Ctrl>+<C> or <Ctrl>+<Ins>
With this command the user can copy the current selected graph from
editor to clipboard, and this does not change the contents of editor
window.
19. Edit-Paste

Shortcut button:
Shortcut key: <Ctrl>+<V> or <Shift>+<Ins>
With this command the user can paste the content of the clipboard onto
the current position of the editor. After choosing this command, the
window pops up as shown in Figure 2.3.2-8 to choose paste format.

Figure 2.3.2-8 Choose Paste Format

20. Edit-Accurate Paste


User can set the accurate coordinates of position for the graph to be
pasted. Note that this command is active only after operation of Cut or
Copy.

86
SECTION 2Configuration Tools

Figure 2.3.2-9 Accurate Paste

21. Edit-Compose
It can compose separate graph objects as one object.
22. Edit-Decompose
It decomposes a composed object into separate graph objects. This
command is enabled after Compose operation.
23. Edit-Change Order
It can exchange the front/back order of two overlapped graph objects.
24. Edit-Flip Horizontal
It can revolve the selected graph object around axis-X.
25. Edit-Flip Vertical
It can revolve the selected graph object around axis-Y.
26. Edit-Select All
Select all objects on graph page.
27. Edit-Define Function Key
It can define the keys F1~F32 to specific function.
28. Edit-Prompt When Paste
Select whether prompt tips to choose paste format when paste, in front
of this menu means to show it, or else, not to show.
29. Edit-Convert
It can change the graph unit from mm to 0.1pixel.
30. Edit-Remove Dynamic Feature
It can disable the dynamic feature of the graph.
The menu Draw shows the shapes can be drawn in the file, it is shown as
Figure 2.3.2-10, for each shape, user can set its border mode and filling
color first.
87
SECTION 2Configuration Tools

Figure 2.3.2-10 Menu "Draw"

31. Draw-Line

Shortcut button:
It can draw lines in working area, user can click mouse in drawing area to
identify the start position (the cursor will turn into the shape “+”), hold the
left mouse key and drag it to the target position before releasing, a line will
be drawn. Note: Horizontal, vertical and 45º lines can be drawn by
pressing Shift key simultaneously when drawing.
32. Draw-Arc

Shortcut button:
It can draw arcs in working area, user can click mouse in drawing area to
identify the start position (the cursor will turn into the shape “+”), hold the
left mouse key and drag it to the target position before releasing, an arc
will be drawn. Note: 90 º arcs can be drawn by pressing Shift
simultaneously.
33. Draw-Polyline

Shortcut button:
It can draw poly lines in working area, user can click mouse in drawing
area to identify the start position (the cursor will turn into the shape “+”),
hold the left mouse button and drag to target position of the first line before
releasing, then drag to target position of the second line before clicking left
button, repeat the above operation until the last border, finally click right
button, then it is done. Note: for closed polygon, filling mode is inactive.
34. Draw-Text

Shortcut button:
It can draw text box in working area, user can click mouse in drawing area
to identify the start position (the cursor will turn into the shape “+”), hold
88
SECTION 2Configuration Tools

the left mouse key and drag along diagonal line to create a text box. Then
user can type texts in the text box.
35. Draw-Chord

Shortcut button:
It can draw chords in working area, user can click mouse in drawing area
to identify the start position (the cursor will turn into the shape “+”), and
release left key and drag the mouse to form a satisfied arc shape, then
click the mouse to finish drawing.
36. Draw- Rectangle

Shortcut button:
It can draw rectangles in working area, user can click mouse and drag it to
the target position before releasing. Note: A square can be drawn by
pressing Shift key simultaneously.
37. Draw-Pie

Shortcut button:
It can draw pies in working area, user can click mouse to identify the start
position (the cursor will turn into the shape “+”), and hold the left mouse
key and drag the cursor to create satisfied pie shape, then release the
mouse to finish drawing.
38. Draw- Ellipse

Shortcut button:
It can draw ellipses in working area, user can click mouse to identify the
start position (the cursor will turn into the shape “+”), and hold the left
mouse key and drag the cursor to create satisfied pie shape, then release
the mouse to finish drawing. Note: A regular circle can be drawn by
pressing Shift key simultaneously.
39. Draw- Polygon

Shortcut button:
It can draw polygons in working area, user can click mouse to identify the
start position (the cursor will turn into the shape “+”), release left mouse
button and drag the cursor to target point of the first line and left click
again, the drawing of the first border of polygon is completed. Then draw
the other lines in the same way, finally right click mouse to finish drawing.
40. Draw- Round Rectangle

Shortcut button:
It can draw round rectangles in working area, user can click mouse to
identify the start position (the cursor will turn into the shape “+”), hold the
left mouse key and drag the cursor to create satisfied round rectangle
89
SECTION 2Configuration Tools

shape. Note: Regular round rectangle can be drawn by pressing Shift key
simultaneously.
Being different from rectangle, round rectangle has one additional black
square in the middle as shown in Figure 2.3.2-11. In comparison with
rectangle, place cursor on the square, radian of four corners of rectangle
can be changed by moving this square.

Figure 2.3.2-11 Round Rectangle

41. Draw-Image

Shortcut button:
It can draw images in working area, user can click mouse to identify the
start position (the cursor will turn into the shape “+”), hold the left mouse
key and drag the cursor to satisfied size for the image frame.
Release left key, a window pops up as shown in Figure 2.3.2-12, user can
select the image to be inserted and press Open to insert it.

Figure 2.3.2-12 Open Image

42. Draw-Button

Shortcut button:
It can draw buttons in working area, user can click mouse to identify the
start position (the cursor will turn into the shape “+”), and hold the left
mouse key and drag the cursor to satisfied size of button, then release the
mouse.

90
SECTION 2Configuration Tools

After creating the button, right click it, a menu pops up as shown in Figure
2.3.2-13:

Figure 2.3.2-13 Button Right Click Menu

To modify the button style, select Button Style, the function window will
appear as shown in the Figure 2.3.2-14:

Figure 2.3.2-14 Button Style Configuration

The menu View is shown as Figure 2.3.2-15:

91
SECTION 2Configuration Tools

Figure 2.3.2-15 Menu "View"

43. View-Tool Bar


User can choose whether to show the toolbar, in front of this menu
means to show it, or else, not to show.
44. View-Status Bar
User can choose whether to show the status bar, in front of this menu
means to show it, or else, not to show.
45. View-Graph Library
User can choose whether to show graph library, in front of this menu
means to show it, or else, not to show.
46. View-Palette
User can choose whether to show palette, in front of this menu means
to show it, or else, not to show.
47. View-Drawing Toolbar
User can choose whether to show drawing toolbar, in front of this
menu means to show it, or else, not to show.
48. View-Filling Toolbar
User can choose whether to show filling toolbar, in front of this menu
means to show it, or else, not to show.
49. View-Edit Bar
User can choose whether to show edit bar, in front of this menu means
to show it, or else, not to show.
50. View-Full Screen

Shortcut button:
It can switch to full screen mode.
51. View-Simulating

92
SECTION 2Configuration Tools

Shortcut key: <Ctrl> + <Tab>


It can run simulation mode of the project.
The menu Window is shown as Figure 2.3.2-16:

Figure 2.3.2-16 Menu "Window"

52. Window-New
It can create a new window for graph drawing.
53. Window-Cascade
It arranges the opened windows in cascade.
54. Window-Horizontal
It arranges the opened windows horizontally.
55. Window-Vertical
It arranges the opened windows vertically.
56. Window-Close All
It closes all the opened windows.
The menu Property is shown as Figure 2.3.2-17:

Figure 2.3.2-17 Menu "Property"

93
SECTION 2Configuration Tools

57. Property-Set Grid


It can edit the windows background of the working area as shown in
Figure 2.3.2-18:

Figure 2.3.2-18 Edit Windows Background

58. Property-Set Size


It can set the size of the working area window as shown in Figure
2.3.2-19:

Figure 2.3.2-19 Set Size

59. Window-Set Background


There are two backgrounds that can be set in the menu as shown in
Figure 2.3.2-20:

Figure 2.3.2-20 Set Background

Select Image background, a popup window will appear as shown in


Figure 2.3.2-21:

94
SECTION 2Configuration Tools

Figure 2.3.2-21 Select Image Background

Select file name of background graph and click Open to set the working
area background use this graph.
If user selects Color background, a screen color board window will
appear as Figure 2.3.2-22:

Figure 2.3.2-22 Color Background Window

To set the background in basic colors, select the color in the board and
click OK.
To set the background in other color, click Define Custom Colors, and
the defined custom color window will appear as shown in Figure 2.3.2-23.

95
SECTION 2Configuration Tools

Select an initial color in light spectrum, and move the cursor on the right
until color is satisfying. Click Add to Custom Colors to add the color to
Custom colors. Click OK to set the background using this color (or input
new value in H/S/L and R/G/B boxes).

Figure 2.3.2-23 Define Custom Colors

60. Property-Set Authority


It assigns authority to certain users.
61. Property-Simplify Graph
There are two modes to simplify the graph as shown in Figure 2.3.2-24:

96
SECTION 2Configuration Tools

Figure 2.3.2-24 Simplify Graph

62. Property-Time Tool


It shows the time of current operation as Figure 2.3.2-25:

Figure 2.3.2-25 Time Tool

63. Property- Statistics of Tag Name


It shows the list of tag name in the database and tag related operations.

97
SECTION 2Configuration Tools

Figure 2.3.2-26 List of Tag Name

64. Property-Search Swap Tags

Shortcut button:
It can find and replace tags, text and domain number.

Figure 2.3.2-27 Find and Replace

65. Property-Batch Swap Tag Name


It can batch replace tags in database.
66. Property-Validity Check
Check if the tags are valid database tags.
The menu Help is shown as Figure 2.3.2-28:

98
SECTION 2Configuration Tools

Figure 2.3.2-28 Menu "Help"

67. Help-About Graph Config Tool…

Shortcut button:
It shows the version of the Graph Configuration.
2.3.2.2 Toolbar

The toolbar is a shortcut to the frequently used functions in the menu to


improve the efficiency. It provides access to basic commands. Toolbar buttons,
like their associated menu items, can be active or inactive. If a function is
currently not active, the associated toolbar button and menu item are inactive.
If a function is active, both the toolbar button and the menu item are active.
The toolbars are also dock able which means all the toolbar can be relocate in
the main window by dragging.

There are four toolbars on the Graph Configuration main window:

 System toolbar

 Edit toolbar

 Filling toolbar

 Drawing toolbar

System toolbar is shown in Figure 2.3.2-29.

Figure 2.3.2-29 System Toolbar on the Graph Configuration Main Window

Tool Icon Name Description

Open Project Open a project.

Close Project Close the current project.

New Created a new Graph.

99
SECTION 2Configuration Tools

Tool Icon Name Description

Open Open an existing Graph.

Save Save the current Graph.

Save all Save all the opened Graphs.

Cut To cut the selected object.

Copy To copy the selected object.

Paste To paste an object.

To replace the current object with the


Replace
contents on clipboard.

Undo Return to the last operation.

Redo Cancel the return operation.

Zoom In Zoom in the selected shapes.

View View restoration of the selected


Restoration shapes.

Zoom Out Zoom out the selected shapes.

Display All
To display all shapes
Shapes

Show shapes
which have Show shapes which have show/hide
show/hide feature
feature

100
SECTION 2Configuration Tools

Tool Icon Name Description


Show shapes
which have Show shapes which have show/hide
show/hide feature
feature

Dynamic
Set Dynamic Features of the Object
Features

Interactive
Set Interactive Features of the Object
Features

Grid
Set Grid Background of the Object
Background

Show Dynamic
To show dynamic features.
Features

Show Button
Show Button Text Range
Text Range

The current graph to full screen


Full Screen
mode..

Rotate Rotate the selected shape.

Simulate Do simulation of current project.

Print Print current file.

About Show version of this software.

Edit toolbar is shown in Figure 2.3.2-30.

Figure 2.3.2-30 Edit Toolbar on the Graph Configuration Main Window

101
SECTION 2Configuration Tools

Tool Icon Name Description

Flip Horizontal Reverse Around Line X.

Flip Vertical Reverse Around Line Y

Rotate 90
CW Rotate 90 degrees.
degree CW

Compose
To compose all the selected objects.
objects

Decompose To decompose all the composed


objects objects.

Change order
Change order of two objects
of two objects

Move down one


Move the object down one layer
layer

Move up one
Move the object up one layer
layer

Select All Select all of the objects in this graph

Align left Align all the objects to left.

Align right Align all the objects to right.

Align top Align all the objects to top.

Align down Align all the objects to down.

Make all the objects to a vertical


Vertical center
center.

Horizontal Make all the objects to a horizontal

102
SECTION 2Configuration Tools

Tool Icon Name Description


center center.

Equidistant Make all the objects to an equidistant


horizontal horizontal.

Equidistant Make all the objects to an equidistant


vertical vertical.

Same width Make all the objects to the same width

Make all the objects to the same


Same Height
height

Same size Make all the objects to the same size

No rotate With no rotate

Center rotate Make center rotate.

Filling toolbar is shown in Figure 2.3.2-31.

Figure 2.3.2-31 Filling Toolbar on the Graph Configuration Main Window

The first six buttons stand for border mode, user can select any style as border
of graph at discretion, null stands for no border; the last eight buttons stand for
filling mode, user can select any style as filling mode of graph at discretion.

Tool Icon Name Description

solid line Set border as solid line

dotted line Set border as dotted line

dash line Set border as dash line.

103
SECTION 2Configuration Tools

dash and dot


Set border as dash and dot line
line

double dots line Set border as double dots line

null Set no border

Drawing toolbar is shown in Figure 2.3.2-32.

Figure 2.3.2-32 Drawing Toolbar on the Graph Configuration Main


Window

Tool Icon Name Description

Draw Rectangle Draw a rectangle

Draw Round
Draw a round rectangle
Rectangle

Draw Ellipse Draw an ellipse

Draw Polygon Draw a polygon

Draw Pie Draw a pie

Draw Chord Draw a chord

Image Draw an image

Draw Button Draw a button

Text Type text.

Draw Line Draw a line

104
SECTION 2Configuration Tools

Tool Icon Name Description

Draw Polyline Draw a polyline

Draw Arc Draw an arc

Select Select an object

2.3.2.3 Graph Library

Graph library includes system graph library and user graph library. System
graph library stores system graph symbol objects user graph library stores
graph symbol objects defined by user. The graph symbol can be dragged to
any position of the page using mouse. The graph library window is shown in
Figure 2.3.2-33.

Figure 2.3.2-33 Graph Library Window

105
SECTION 2Configuration Tools

2.3.2.4 Color Box

Color box is used to select foreground color and background color as shown in
Figure 2.3.2-34. The display method is as shown in Figure 2.3-22, in
which 1 represents foreground color (border color) and 2 represents
background color (filling color). The system lists 36 types of color blocks. In
case it is necessary to customize a color, double click on any color block and a
dialog box for editing color will appear.

Figure 2.3.2-34 Color Box

2.3.2.5 Footer

The footer provides the information of your work like Status information, Cursor
position and Graph specification.

Status information bar explains and describes each item of orders. When
mouse is moved to pull-down menu, toolbar or an item of system tools,
relevant operation information will be displayed as shown in Figure 2.3.2-35 .

Figure 2.3.2-35 Status Information Bar

Cursor position bar displays the information of cursor position in working area
as shown in Figure 2.3.2-36.

Figure 2.3.2-36 Cursor Position Bar

Graph specification bar displays the information of graph dimension in the


working area as shown in Figure 2.3.2-37.

106
SECTION 2Configuration Tools

Figure 2.3.2-37 Graph Specification Bar

2.3.3 Operation Instruction


2.3.3.1 Import File

There are three ways to import files which users can choose from the menu.

 Standard Shapes

One group of standard shape graphs that are overlaid together appears
on screen. These standard graphs include triangle, quadrilateral,
pentagon, hexagon, heptagon, octagon, enneagon, decagon and
pentacle.
 Device Configuration

A dialog box of import device configuration will appear as shown in Figure


2.3.3-1.

Figure 2.3.3-1 Device Configuration

1. Select a system device status diagram template, in this case


devmodel.hsg. Click Next, the I/O template will appear as shown in
Figure 2.3.3-2.

107
SECTION 2Configuration Tools

Figure 2.3.3-2 I/O Template Files

2. Select I/O device template according to the FCS. Click Next. The
template files list of each I/O station will appear as shown in Figure
2.3.3-3.

Figure 2.3.3-3 Template Files List of Each I/O Station

3. Click Choose All, device status diagram of all FCS will be generated.
Then click Next, the Domain Num window will appear as shown in
Figure 2.3.3-4

108
SECTION 2Configuration Tools

Figure 2.3.3-4 Choose Domain Number

4. Input the domain number in the blank.

• The default number is 0.

Then click Next. The execution window will appear, an example is shown
in Figure 2.3.3-5.

Figure 2.3.3-5 Start to Execute Command

5. Click Start… to generate system device status graph, I/O device status
graph and I/O station operation version display graph.

109
SECTION 2Configuration Tools

2.3.3.2 User Custom Symbols

User custom symbol refers to the graph symbol that made based on the
project need. The dynamic and interactive features can also be set at the same
time.

 Define symbol name

Right click the graph symbol and select Name as shown in Figure 2.3.3-6.

Figure 2.3.3-6 Define Symbol Name

And the shape name window will appear as shown in Figure 2.3.3-7.

Figure 2.3.3-7 Shape Name Window

Fill in the shape name and click OK.


Add new symbol into user custom symbol library
Right click User Graph Library in the Graph Library window and select
New Directory as shown in Figure 2.3.3-8.

Figure 2.3.3-8 Create New Directory

A default name will be given to the new directory which can be modified by

110
SECTION 2Configuration Tools

user. In this case, the default name is Directory 3 as shown in Figure


2.3.3-9

Figure 2.3.3-9 New Directory Name

2.3.3.3 Dynamic Features

The dynamic object corresponds to the point defined in the database. Through
the features of the dynamic object user can monitor the point status online.

There are several universal items in the dynamic/interactive window of graph


object that are listed in the following table.

Item Filling-in contents

Tag Name Name of database point.

Field name (item name) recorded in database. Usually it


refers to the current value of database point (for example,
Item Name AV for analog point, DV for digital variable point, DS for
description of database point). For more detail please see
the category name of data and content of item name.

Domain
The domain that the point belongs to.
Number

Right click the object which need to set the dynamic feature, the menu will
shown in Figure 2.3.3-10.

Figure 2.3.3-10 Setting Dynamics Features

Select Dynamic Features, the set up window will appear as shown in Figure
111
SECTION 2Configuration Tools

2.3.3-11.

Figure 2.3.3-11 Definition of Dynamic Feature Window

There are eleven tabs on the window, each stands for a group of dynamic
features that can be set by user.

 Color Change Feature

After the real time value of database point of the object is set to have
color change when the condition is met.

In Figure 2.3.3-11, select Color Changing to make the color feature


setup active.

The five tabs labeled from Color 1 to 5 stands for five different color
112
SECTION 2Configuration Tools

definitions. Each color definition has its own dialog box. Priority order
of color change is from Color 1 to 5.

On each tab, the items are all the same listed below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

 Color: Pull-down list provides 16 different colors, from which user


can select one as specified color for color change.

 Total change condition: After completing color change feature


definition of a color and click Add, the result of the change
condition will appear in the window in list.

 Add: Click Add to add the defined color change condition to the list
in Total change condition window.

 Modify: Select a condition in Total change condition window and


click Modify to change the feature setting of the condition.

 Del: Select a condition in Total change condition window, and click


Del to delete this condition in the list.

• Total change condition is a group of logic arithmetic combination. Each


condition arithmetic result stands for Boolean value of true/false,
conditions form a total result through “AND”, “OR” arithmetic.

 Text

Text feature is only active for text object. After text feature of object is
defined, value of its corresponding database tag can be displayed in
format of graph configuration, database and time. This tab is shown in
Figure 2.3.3-12.

113
SECTION 2Configuration Tools

Figure 2.3.3-12 Text Feature Tab

Select Text Feature to make this tab contents active. The items are listed
below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Left: Align left.

 Right: Align right.

 Middle: Align middle.


114
SECTION 2Configuration Tools

 Graph Configuration: Display the text in the graph format that is set
up in the Analog Format and Digital Format.

 Database: Display the text in the format of database configuration.

 Hex: Display the text in the format of hexadecimal.

 Relative Time: Value of the database point is a time interval.

 Absolute Time: If the object corresponds to time point, any time


format can be selected from pull-down menu.

 Analog Format: Use format of XXXX.XX to represent number of


bits in front of/behind analog decimal point.

 Digital Format: Display the content after the number that is


selected.

If Show System Time is selected, the system time will be shown and all
of the above time format cannot be used.
 Blink

After blink feature of object is defined, the object will blink when the
condition is met. This tab is shown in Figure 2.3.3-13.

115
SECTION 2Configuration Tools

Figure 2.3.3-13 Blink Feature Tab

Select Blink to make this tab contents active. The items are listed below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

116
SECTION 2Configuration Tools

 Total Conditions: After completing blink feature definition and click


Add, the result of the blink condition will appear in the window in
list.

 Add: Click Add to add the defined blink condition to the list in Total
condition window.

 Modify: Select a condition in Total conditions window and click


Modify to change the feature setting of the condition.

 Delete: Select a condition in Total conditions window, and click


Delete to delete this condition in the list.

 Show/Hide

After show/hide features of object are defined, the graph will show or
hide when the condition is met. This tab is shown in Figure 2.3.3-14.

117
SECTION 2Configuration Tools

Figure 2.3.3-14 Show/Hide Feature Tab

Select Show/Hide Feature to make the tab contents active. The items are
listed below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

118
SECTION 2Configuration Tools

 Total Conditions: After completing Show/Hide feature definition


and click Add, the result of the Show/Hide condition will appear in
the window in list.

 Add: Click Add to add the defined Show/Hide condition to the list in
Total condition window.

 Modify: Select a condition in Total conditions window and click


Modify to change the feature setting of the condition.

 Delete: Select a condition in Total conditions window, and click


Delete to delete this condition in the list.

 Move

After move feature of object is defined, the object will move when the condition
is met. This tab is shown in Figure 2.3.3-15.

119
SECTION 2Configuration Tools

Figure 2.3.3-15 Move Feature Tab

Select Move horizontally to make the contents in Horizontal window


active or select Move vertically to make the contents in Vertical window
active. The items in these two windows are same and listed below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Default: When this option is selected the lower limit is set to 0 and
upper limit to 100. When it is not selected the range can be reset
by inputting the new lower/upper limit.

120
SECTION 2Configuration Tools

 Lower: Set up the minimum value of corresponding database point


value when move feature occurs.

 Upper: Set up the maximum value of corresponding database


point value when move feature occurs.

 Move pixels: The distance measured in unit of pixel that the object
set to move

 Filling

After filling feature of object is defined, the object will be filled when the
condition is met. This tab is shown in Figure 2.3.3-16.

Figure 2.3.3-16 Filling Feature Tab

121
SECTION 2Configuration Tools

Select Filling Feature to make the tab contents active. The items are listed
below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Direction: Set up direction of filling.

 Color: Set up color of filling

 Default Range: When this option is selected the lower limit is set to
0 and upper limit to 100. When it is not selected the range can be
reset by inputting the new lower/upper limit.

 Lower: Set up the minimum value of corresponding database point


value when filling feature occurs.

 Upper: Set up the maximum value of corresponding database


point value when filling feature occurs.

 Scale

After scale feature of object is defined, the object will be zoomed when
the condition is met. This tab is shown in Figure 2.3.3-17.

122
SECTION 2Configuration Tools

Figure 2.3.3-17 Scale Feature Tab

Select Zoom Feature to make the tab contents active. The items are listed
below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Zoom Center: The center spot of graph object zooms.

 Min. Scale Ratio: Zoom ratio corresponding to lower limit of


display.

123
SECTION 2Configuration Tools

 Max. Scale Ratio: Zoom ratio corresponding to upper limit of


display.

 Zoom horizontal: Graph size changes in horizontal direction.

 Zoom vertical: Graph size changes in vertical direction.

 Default: When this option is selected the lower limit is set to 0 and
upper limit to 100. When it is not selected the range can be reset
by inputting the new lower/upper limit.

 Lower: Set up the minimum value of corresponding database point


value when scale feature occurs.

 Upper: Set up the maximum value of corresponding database


point value when scale feature occurs.

 Rotate

After rotate feature of object is defined, the object will be rotated when the
condition is met. This tab is shown in Figure 2.3.3-18.

124
SECTION 2Configuration Tools

Figure 2.3.3-18 Rotate Feature Tab

Select Rotate to make the tab contents active. The items are listed below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Default: When this option is selected the lower limit is set to 0 and
upper limit to 100. When it is not selected the range can be reset
by inputting the new lower/upper limit.

 Lower: Set up the minimum value of corresponding database point


value when rotate feature occurs.
125
SECTION 2Configuration Tools

 Upper: Set up the maximum value of corresponding database


point value when rotate feature occurs.

 Rotate Center: Define the rotate center of graph object.

 Fixed Center Position: Fill in the coordinate of the rotate center.

 Rotate automatically: Select this option to make the automatically


rotate contents active.

 Default Condition: Condition of occurrence of auto rotate, auto


rotate will occur when set up conditions are met, it does not rotate
according to change of database point value.

 Rotate Speed: Rotate speed when reaching auto rotates.

 Min Angle: Display angle corresponding to lower limit.

 Max Angle: Display angle corresponding to upper limit.

 Curve

After curve feature of object is defined, the object traces and displays
real time value of database in form of curve. This tab is shown in
Figure 2.3.3-19.

126
SECTION 2Configuration Tools

Figure 2.3.3-19 Curve Feature Tab

Select Curve Feature to make the tab contents active. The items are listed
below:

 Curve: select the number to active certain curve

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Color: Set the color of curve

127
SECTION 2Configuration Tools

 Y Display Range: Database point value range corresponding to full


scale of curve window.

 Coordinates: 8 types of coordinates as curve display method for


the user to choose.

 BG Color: Set the color of curve window.

 Scroll Trace: When final point of time axis is traced and displayed,
curve continues tracing after scrolling time axis for a distance in
reverse direction. Scrolling distance can be 1/4, 1/2 and 3/4 of
window or the entire window.

 BG Grid: Display grid pattern of curve window.

 Grid Color: Set the color of the grid.

 Point Interval: Pixel number corresponding to each point interval.

 Grid Interval (X/Y): Pixel number between adjacent grids in X line


or Y line direction.

 X-Y Curve

This tab is shown in Figure 2.3.3-20.

128
SECTION 2Configuration Tools

Figure 2.3.3-20 X-Y Curve Feature Tab

Select X-Y Curve Feature to make the tab contents active. The items are
listed below:

 Tag Name: Name of database point on X or Y axis.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Value Range: Range value of database point.

 Display Mode: ● and X can be selected.

129
SECTION 2Configuration Tools

 Connect Points or Not: Single point and Form 1 line nodes can be
selected.

 Color of Newest Point: Set the color of newest point.

 Color of other Points: Set the color of historical point.

 Time Interval: Set the interval of two value points.

 Tag Amount: Set the amount of the tags.

• X-Y curve is only active for rectangle.

• When a rectangle has this feature, other dynamic features are all inactive.

 Boot Curve

This tab is shown in Figure 2.3.3-21.

130
SECTION 2Configuration Tools

Figure 2.3.3-21 Boot Curve Feature Tab

Select Boot Curve to make the tab contents active. The items are listed
below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

In Start condition tab:

 Hand: Select to active the boot curve manually.

131
SECTION 2Configuration Tools

 Or, meet following condition, start automatically: Select to active


the boot curve by the condition set below.

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

 Add: Click Add to add the defined blink condition to the list in the
left window.

 Modify: Select a condition in the left window and click Modify to


change the feature setting of the condition.

 Delete: Select a condition in the left window, and click Delete to


delete this condition in the list.

In End condition tab:

 Stop by hand: Select to stop the operation manually.

 After continues -hour-recording, stop automatically: Select to stop


the operation by a setting time.

 OR, meet following conditions, stop automatically: Select to stop


the operation on the condition set below.

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

 Add: Click Add to add the defined blink condition to the list in the
left window.

132
SECTION 2Configuration Tools

 Modify: Select a condition in the left window and click Modify to


change the feature setting of the condition.

 Delete: Select a condition in the left window, and click Delete to


delete this condition in the list.

In Show & Save tab:

 Color of static curve: Set the color of static curve.

 Color of dynamic curve: Set the color of dynamic curve.

 Background Color: Set the background color

 Line Weight (upper): Set the weight of static curve line.

 Line Weight (lower): Set the weight of dynamic curve line.

 Static Curve File Name: Set the name of static curve file.

 Fluctuate % around the curve while be shown like belt: Set the
percent of the curve to be shown like belt.

 Interval of two points is seconds by saving this curve: Set the time
by seconds to save the curve.

2.3.3.4 Interactive Features

By using interactive features, user can modify point value of database and run
authorization check (except for tip show) online. The user name must be input
correctly to enable the operation of interactive features.

To edit the interactive features, right click the object and select Interactive
Features in the menu as shown in Figure 2.3.3-22.

133
SECTION 2Configuration Tools

Figure 2.3.3-22 Right Click Menu

The interactive features definition window will appear as shown in Figure


2.3.3-23. There are seven tabs in the window and each stands for a group of
interactive features that can be set by user.

134
SECTION 2Configuration Tools

Figure 2.3.3-23 Interactive Feature Window

 Popup Window

Set to popup a window online such as PID adjust window. This tab is
shown in Figure 2.3.3-23.

Select Popup Window to make the tab contents active. The items are
listed below:

 Start coordinate: Set the position where the popup action starts.

135
SECTION 2Configuration Tools

 Popup window while the parent base graph opened: After opening
base graph, user can push window without clicking with mouse.

 Window Type: Window types include common window, PID


window, manual operator (open loop), manual operator (close
loop), sequence control, regulating valve and etc, user can
selected from pull-down list.

 Window Name: The item matches with selected window type, if


window type is “PID window”, the item corresponds the HSPID
type name in database.

• If window type is “common window”, it is necessary to fill in graph name


including suffix, such as: XXX.HSG.

 Tag Name: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

 Popup window only if conditions be filled: popup window only when


condition is met.

 Check Authority: Select to enable the authority check.

 <<Add: Click this button and a dialog box will appear as shown in
Figure 2.3.3-24.

Figure 2.3.3-24 Input Authority Check User Name

136
SECTION 2Configuration Tools

Input the user name and click OK to set this name in the authority list
and it will be shown in the left window.

 Remove>>: Choose the name and click this button to remove the
name from authority list.

• Window is different from base graph, base graph can occupy the whole
screen while online, and can not be moved; window is normally smaller,
and can move freely on base graph.

 Switch base graph

This tab is shown in Figure 2.3.3-25.

137
SECTION 2Configuration Tools

Figure 2.3.3-25 Switch Base Graph Feature Tab

Select Switch Base Graph to make tab contents active. The contents are listed
below:

 File Name: Fill in name of the switch picture, such as XXX.HSG.

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

138
SECTION 2Configuration Tools

 Mask: It is used to find out the value of a certain place in a 4-byte


number. For example, to execute AND with 0010 (Number 2 in the
binary) can show if the second place of a number (also in binary) is
1 or not.

 Check Authority: Select to enable the authority check.

 <<Add: Click this button and a dialog box will appear as shown in
Figure 2.3.3-26.

Figure 2.3.3-26 Input Authority Check User Name

Input the user name and click OK to set this name in the authority list
and it will be shown in the left window.

 Remove>>: Choose the name and click this button to remove the
name from authority list.

 Value Increase/Decrease

Set to increase/decrease the value of defined point automatically


online. This tab is shown in Figure 2.3.3-27.

139
SECTION 2Configuration Tools

Figure 2.3.3-27 Value Increase/Decrease Feature Tab

Select Increase/Decrease Feature to make tab contents active. The


contents are listed below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Increment: Increment or decrement of each time.

140
SECTION 2Configuration Tools

For analog, input 2 if it is intended to increase by 2; input -2 if it is


intended to decrease by 2.

For digital variable, if only 1 can be inputted, it means that the digital
variable is 0 initially which becomes 1 after implementation of the
operation, and returns to 0 after implementation of the operation again.
For example: used to realize button featuring self-locking function.

In Check Limit window:

 Enable: Set to enable the check limit function.

 Default Range: When selected, the upper and lower of limit is set
to 100 and 0. When not selected, the upper and lower limit can be
adjusted by inputting new limit.

 Reconfirm: Input the confirmation alert that will be shown when the
increase/decease occurs.

• For digital variable, “character string 0110 character string” can be added
into the second time confirmation information, then when operator is online,
different confirmation information will pop up according to its point value,
when value changes from 0 to 1, character string in front of 0110 pops up,
when value changes from 1 to 0, character string behind 0110 pops up.

 Check Authority: Select to enable the authority check.

 <<Add: Click this button and a dialog box will appear as shown in
Figure 2.3.3-28.

Figure 2.3.3-28 Input Authority Check User Name

Input the user name and click OK to set this name in the authority list
and it will be shown in the left window.

141
SECTION 2Configuration Tools

 Remove>>: Choose the name and click this button to remove the
name from authority list.

 Modify Tag Value Online

This tab is shown in Figure 2.3.3-29.

Figure 2.3.3-29 Modify Tag Value Online Feature Tab

Select Online Modify to make the tab contents active. The contents are
listed below:

 Tag: Name of database point.

142
SECTION 2Configuration Tools

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Permit: Set to enable the check limit function.

 Default Range: When selected, the upper and lower of limit is set
to 100 and 0. When not selected, the upper and lower limit can be
adjusted by inputting new limit.

 Check Authority: Select to enable the authority check.

 <<Add: Click this button and a dialog box will appear as shown in
Figure 2.3.3-30.

Figure 2.3.3-30 Input Authority Check User Name

Input the user name and click OK to set this name in the authority list
and it will be shown in the left window.

 Remove>>: Choose the name and click this button to remove the
name from authority list.

 Refresh Base Graph Once

The function can refresh parameter value on current screen when


being on line, so as to display one group of new value. This tab is
shown in Figure 2.3.3-31.

143
SECTION 2Configuration Tools

Figure 2.3.3-31 Refresh Base Graph Once Feature Tab

Select Refresh to make tab contents active. The contents are listed
below:

 Time Tag: Display time point of refresh.

 Domain: The domain that the point belongs to.

 Check Authority: Select to enable the authority check.

 <<Add: Click this button and a dialog box will appear as shown in
Figure 2.3.3-32.

144
SECTION 2Configuration Tools

Figure 2.3.3-32 Input Authority Check User Name

 Input the user name and click OK to set this name in the authority
list and it will be shown in the left window.

 Remove>>: Choose the name and click this button to remove the
name from authority list.

 Show Tip

The function is to display description content automatically, when


online, place mouse on object, a window describing selected object
can pop up automatically. Descriptive text can be set up separately,
and can be displayed according to relevant items of database
configuration. This tab is shown in Figure 2.3.3-33.

145
SECTION 2Configuration Tools

Figure 2.3.3-33 Show Tip Feature Tab

Select Show Tip to make tab contents active. The contents are listed
below:

 Tag: Name of database point.

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Show fixed string: type in character string of tip display in window.

146
SECTION 2Configuration Tools

 Show value or tag name: The tip will show the value or tag name
while fixed string becomes unavailable.

 Set Switch

This function can set digital variable to 0, and set to 1 after one
arithmetic cycle. This tab is shown in Figure 2.3.3-34.

Figure 2.3.3-34 Set Switch Feature Tab

Select Set Switch to make tab contents active. The contents are listed below:

 Tag: Name of database point.

147
SECTION 2Configuration Tools

 Item: Name in the database.

 Domain: The domain that the point belongs to.

 Reconfirm: Input the confirmation alert that will be shown when the
increase/decease occurs.

 Check Authority: Select to enable the authority check.

 <<Add: Click this button and a dialog box will appear as shown in
Figure 2.3.3-35.

Figure 2.3.3-35 Input Authority Check User Name

Input the user name and click OK to set this name in the authority list
and it will be shown in the left window.

 Remove>>: Choose the name and click this button to remove the
name from authority list.

2.3.3.5 Standard Algorithm Block Symbol in User Graph Library

In the User Graph Lib, there is an item named Standard Algorithm Block
Symbol as shown in Figure 2.3.3-36.

Figure 2.3.3-36 Standard Algorithm Block Symbol

Standard Algorithm Block Symbol is a group of symbols provided by the


system which possess the classic dynamic and interactive features to simplify
the user’s work. To use it, drag the symbol into the flow chart and right click it,

148
SECTION 2Configuration Tools

the menu will appear as shown in Figure 2.3.3-37.

Figure 2.3.3-37 Right Click Menu

Select Dynamic Shortcut Define, a window will show to help user define the
shortcut, an example is shown in Figure 2.3.3-38.

Figure 2.3.3-38 Shortcut Define

Fill in substitutive point name (should be point name already defined in


database) in cell behind .

2.3.3.6 Simulating Display

The command is used to simulate online mode when being offline to display
dynamic and interactive feature of graph and text.

To use this command, select View → Simulating Ctrl + Tab, or click in the
toolbar, the simulating window will appear as shown in Figure 2.3.3-39.

149
SECTION 2Configuration Tools

Figure 2.3.3-39 Simulating Window

Fill in the User Name and Password and click OK to login the system, the
default is to login at engineer level.

Move the cursor to lower left of the screen, and the offline simulating input
window will appear as shown in Figure 2.3.3-40.

150
SECTION 2Configuration Tools

Figure 2.3.3-40 Offline Simulating Input Window

Fill in an analog tag name in database behind “Analog Tag Name”, then move
sliding index pointer below from 0 to 100%, enabling value of the analog to
vary from project zero scale to project full scale, if no specific point name is
filled in, then all analog value in database can vary from project zero scale to
project full scale.

Fill in a digital tag name in database behind “Digital Tag”, then click “Set 0” and
“Set 1” button below, the digital variable can be set to 0 or 1, if no specific point
is filled in, then all digital variables in database can be set to 0 or 1

151
SECTION 2Configuration Tools

2.3.4 Flow Chart of Graph Configuration


Generate system
status graph

Create Graph
page

Static graph
configuration

Assist graph
configuration

Assist graph
configuration

Page link

Figure2.3.4-1 Flow Chart of Graph Configuration

1. Select Start -> All Programs -> MACS -> MACS_ENG -> Graph
Configuration, and click it;
2. Select project name which is to graph configurate in Project
Information list, and click button Select to enter Graph Configuration
interface. as shown in Figure2.3.4-2.

152
SECTION 2Configuration Tools

Figure2.3.4-2 Graph Edit interface

2.3.4.2 Generate System Status Template

Step 1. Click Import(File) in menu File and select Device Configuration


in its submenu.

Step 2. It will popup dialog box System Status Template, then select
template style, devmodel.hsg is suggested to use. as shown in
Figure2.3.4-3.

153
SECTION 2Configuration Tools

Figure2.3.4-3 System Status Template1

Step 3. Click Next, it will prompt dialog box Choose IO Template File,
according to hardware series which are being used and
arranging situation of modules in control cabinet, select modules
from option box on the left, the styles will be displayed in the
right box. As shown in Figure2.3.4-4.

Figure2.3.4-4 System Status Template2

Step 4. Click Next, it will popup dialog box Template Files List of Each IO
Station, in the left box, select modules according to arranging
situation modules in each control cabinet. As shown in
Figure2.3.4-5.

Example: When there is only main cabinet in Station 10#, and 3 standard racks
154
SECTION 2Configuration Tools

in cabinet, select SM1X4 Model.hsg; in Station 11#, when expansion cabinet


exists or there are more than 4 racks in cabinet, select SM2X4 Model.hsg then
(select Station 11#, and double-click it, select from the dropdown menu).

The same as other stations. When all stations are done, click button Select All.

Figure2.3.4-5 System Status Template3

• When selecting modules finished, if there is difference between the


arranging in control cabinet and arranging of module, it can be modified
one by one after generating of system status graph.

Step 5. Click Next, it will popup dialog box Specify Domain Number, it is
suggested to select Specify Domain Number, and input domain
number of current project (be corresponding with System
Configuration), the default value is 0. As shown in Figure2.3.4-6.

155
SECTION 2Configuration Tools

Figure2.3.4-6 System Status Template4

Step 6. it will popup dialog box Start to Execute Command, displaying all
setting contents above and saving path of graph files which is to
be generated, which are used for reviewing and verifying. As
shown in Figure2.3.4-7.

Figure2.3.4-7 System Status Template5

Step 7. Click Start… to start generating system status graph and module
arranging graph of each control station. As shown in
Figure2.3.4-7Figure2.3.4-8.

156
SECTION 2Configuration Tools

Figure2.3.4-8 system status graph

• The size of generated System status graph is matched with 19’’ displayer,
if the project uses other size of displayer, please modify oneself.

The size could be adjusted by Set Size in menu Porperty, size sets area for
graph, graph in the area will be displayed when it is online, otherwise, will not;
the size is determined by displayer size, as shown in Figure2.3.4-9.

CRT Size Resolution Standard graph size

≤19" 1280*1024 12760*9000

21" 1600*1200 15960*10770

22"width 1680*1050 16760*9260

157
SECTION 2Configuration Tools

23"width 1920*1080 19160*9560

24"width 1920*1200 19160*10760

n" (Screen resolution width×10-40)*

(Screen resolution height×10 -


1240)

Figure2.3.4-9 Reference of graph size setting

2.3.4.3 Modify module arrangement diagram

1. Click Open… in menu File or icon ;


2. Select module status graph in dialog box Open, as iodevice10.hsg in
Station 10# shows, double click it; as shown in Figure2.3.4-10.

158
SECTION 2Configuration Tools

Figure2.3.4-10 No.10 Station IO Module State graph

3. The below 2 racks of IO module status graph in Station 10# are all
reserved, which can be cut to adjust the size, as shown in
Figure2.3.4-11.

159
SECTION 2Configuration Tools

Figure2.3.4-11 Adjusting Graph Size Completed

• For cutting IO module status graph, only cut the rack which slots are all
reserved (power module is not included).

4. Click Save in menu File or icon to save the file;


5. Click Close in menu File to close current graph.
2.3.4.4 Create graph page

1. Click New in menu File or icon ;


2. New page, the style as graph edit interface shows;
3. Set Size: click Set Size in menu Property;
4. Set background: click Set Background in menu Property, and select
Color background (please refer to 2.3.2.1); example, set color as gray
(red: 192, green: 192, blue: 192).
5. Add the title of this graph on the upper middle position, such as steam
160
SECTION 2Configuration Tools

and water circuit.


2.3.4.5 Static Graph Configuration

1. In Graph Lib on the left, select static graph from System Graph Lib and
Common used in thermal power two sections;
2. Select static graph, as select tank and right click it, then click Browse in
submenu, it will popup window Browse object library; as shown in
Figure2.3.4-12.

Figure2.3.4-12 Browse static graph

3. Select target graph in Browse object library, click and drag it to graph
edit area. As shown in Figure2.3.4-13.

161
SECTION 2Configuration Tools

Figure2.3.4-13 Select Static Graph

4. Static graphs are connected by pipelines, which is selectable in static


graph library, as well as lines in menu Draw (please refer to 2.3.2.1);
5. After static graph editing, click Save As… in menu File to save current
graph. Its save path is file graph under folder of project name, such
as ExamplePro, its graph save path is:
D:\MACSV\MACSV_ENG\User\ExamplePro\graph.
2.3.4.6 Dynamic Graph Configuration

Dynamic Graph Configuration includes adding of dynamic tags and dynamic


devices two sections.

1. In Common used in thermal power of Graph Library on the left,


dynamic graph can be selected;
2. According to type of dynamic tag to add, select analog tag or digital
tag:
It is suggested to select Analog Measure Tag + UT in Standard Algorithm
Block Symbol for analog tag;
It is suggested to select any one of Digital Point in Electric Dynamic Graph
Lib for digital tag as required;
It is suggested to select dynamic device from Electric Dynamic Graph Lib.

162
SECTION 2Configuration Tools

3. The selection of dynamic tag and device is the same as selection of


static graph: after selecting, drag to graph edit area;
4. Select dynamic tag or device, and right click, a shortcut menu comes
up; as shown in Figure2.3.4-14.

Figure2.3.4-14 Property of Dynamic Tag

5. Select Dynamic shortcut Define, it will popup dialog box Shortcut –


Replace Tag Name; as shown in Figure2.3.4-15.

Figure2.3.4-15 Add Tag Name

6. Fill analog measure tag name in position of !ANALOGTAG, fill domain


number in position of Default local domain. The process of dynamic
digital tag an device is the same as the process of analog tag;
7. Click Save.
8. When add of all dynamic tags and devices are finished, click Save
as … in menu File to save the current graph. The save path is file
graph under folder of project name.
2.3.4.7 Assist small graph Configuration

For some measure tags or monitoring conditions, if select displaying when


needed, and select hiding when no need, take them as small graphs to

163
SECTION 2Configuration Tools

achieve requirement of displaying and hiding, as shown in Figure 2.3.4-16.

Figure 2.3.4-16 small graph style

The configuration of small graph is the same as System Graph Configuration


except Set Size, it is determined according to number of measure tags or
conditions to display, without considering size of displayer.

2.3.4.8 Graph Link

There are many linking methods for small graph and system graph, normally
button is used for linking tool.

1. Click Open… in menu File or icon ;


2. Select system graph which the small graph links to in dialog box Open;

3. In system graph, click tool in Draw;


4. Add button in system graph and name the button as title of the small
graph (please refer to 2.3.2.1); as shown in Figure 2.3.4-17.

164
SECTION 2Configuration Tools

Figure 2.3.4-17 Link Tool - Button

5. Select the button and right click, shortcut menu comes up;
6. Select Interactive Features in shortcut menu, it will popup dialog box
Interactive Features Definition;
7. Select Popup Window, and tick Popup Window, select Normal for
Window Type in dropdown menu, fill the file name of small graph need
to be linked in Normal window name, example, temperature parameter
of BW Steam Drum Wall.hsg (please refer to 2.3.3.4); as shown in Add
button in system graph and name the button as title of the small graph
(please refer to 2.3.2.1); as shown in Figure 2.3.4-18.

165
SECTION 2Configuration Tools

Figure 2.3.4-18 Interactive Features Definition

8. Click OK;
9. Click Save as … in menu File to save the current graph. The save
path is file graph under folder of project name.

2.4 Report Configuration


2.4.1 Introduction
Report configuration is used to create report of current system status into an
166
SECTION 2Configuration Tools

Excel file. With the help of report, user can monitor the system in real time
information and store the valuable information for further use.

• When using report configuration, editing tool like excel (Microsoft Office) or
Calc ( OpenOffice ) must be installed firstly.

• When installing MACS, the default report editing tool is OpenOffice: find
the install file
“\\report version\tools\OpenOffice \OpenOffice3.2.0_WinXP.exe” in install
CD”, and install the program manually. For the install process and install
steps, please read “chapter 1.5 software install of assistant tools”.

• The editing of Excel report and print settings are supported by


OpenOffice 3.2.

There are two kinds of report:

 Fixed time report: The report consists of data record and statistics of
production process that printed at a fixed time based on configuration.

 Real time report: The report consists of data record and statistics of
production process that printed at a random time chosen by user.

2.4.2 What is Report Configuration Main Window


From Start menu, select Programs → MACS → MACS_ENG → Report
Configuration, the database selection window will appear, an example is
shown in Figure 2.4.2-1.

Figure 2.4.2-1 Select Database

167
SECTION 2Configuration Tools

Double click the database and the report configuration main window will
appear as shown in Figure 2.4.2-2.

Figure 2.4.2-2 Report Configuration Main Window

Note that this window is familiar to the Microsoft Excel except a toolbar on the
right top as shown in Figure 2.4.2-3.

Figure 2.4.2-3 Report Toolbar in the Main Window

The report is based on the Microsoft Excel. The detail is discussed in the
following chapter.

2.4.3 Report Toolbar


There are four buttons on the report toolbar as shown in Figure 2.4.2-3, from
left to right are:

168
SECTION 2Configuration Tools

 Report

 Tag

 Compile

 Exit

2.4.3.1 Report

Click Report, the menu will appear as shown in Figure 2.4.3-1

Figure 2.4.3-1 Report Menu

 New report: Create a new report.

 Close: Close a report file.

 Print preview: Simulate to see the print effect

 Print: Print the report file.

2.4.3.2 Tag

Click Tag, the menu will appear as shown in Figure 2.4.3-2.

Figure 2.4.3-2 Point Menu

 History tag:

Click History Tag, a popup window will appear as shown in Figure


2.4.3-3.

169
SECTION 2Configuration Tools

Figure 2.4.3-3 History Tag Window

The contents are listed below:

 Tag name: Name of database point.

 Direction: The arrangement direction of printed historical data,


vertical and horizontal is available.

 Num: Point number required to be printed.

 Format: Select the data display format in print according to


different types of history library point. Five types of default, integer,
switch, floating point and scientific counting can be selected. When
selecting different format types, display format information will
change accordingly.

 Time Forward: The time interval from the time when report is
printed to the first point demanded to be printed.

 Time Interval: The time interval between two adjacent history


points.

 Col/Row: Set the position to insert dynamic point by clicking on the


button left.

 Write: Click to insert dynamic point edited currently into selected


cell, meanwhile definition format of the dynamic point can be
displayed in the cell.

 Verify: Click to verify the dynamic point in the database.

 Close: close this window.


170
SECTION 2Configuration Tools

 Real-time Tag

Click Real-time Tag, a popup window will appear as shown in Figure


2.4.3-4.

Figure 2.4.3-4 Real-time Tag Window

The contents are listed below:

 Tag name: Database point name.

 Format: Select relevant data display format according to different


data points.

 Item Name: Item name of the data point which can not be voided.

 Write: Click to insert dynamic point into selected cell, meanwhile


definition format of the dynamic point can be displayed in the cell.

 Verify: Click to verify the dynamic point name in the database.

 Close: Close this window.

• The input character size of “tag name”, mentioned above in “history tag”
and “real time tag”, is limited no more than 12.

171
SECTION 2Configuration Tools

 Time Tag

Click Time Tag, a popup window will appear as shown in Figure


2.4.3-5.

Figure 2.4.3-5 Time Tag Window

The contents are listed below:

 Time Forward: The time interval from the time when report is
printed to the first point demanded to be printed.

 Time Interval: The time interval between two adjacent history


points.

 Display Format: Select print format of time type data point.

 Show Direction: The arrangement direction of printed historical


data, vertical and horizontal is available.

 Number: Point number required to be printed.

 Col/Row: Set the position to insert dynamic point by clicking on the


button left.

 Write: Click to insert dynamic point edited currently into selected


cell, meanwhile definition format of the dynamic point can be
displayed in the cell.

 Close: close this window.

172
SECTION 2Configuration Tools

 Modify Tag

Click to modify the tag in database.

2.4.3.3 Compile

Click to compile the file to check the correctness of dynamic point description
and point name/item name. If the compiling is successful, a popup window will
appear, as shown in Figure 2.4.3-6.

Figure 2.4.3-6 Compile Successfully

2.4.3.4 Exit

Click to exit the report configuration.

2.4.4 Example for Report Configuration:

Create new report

Add dynamic tag

Download OPS

Report print
configuration

Print setting

Report exprot

Figure 2.4.4-1 Flow chart of Report Configuration

2.4.4.1 Template Configuration

1. Select Start -> All Programs -> MACS -> MACS_ENG -> Report

173
SECTION 2Configuration Tools

Configuration, and click it;


2. It will popup dialog box Select Database, select the project name to
execute report configuration;
3. Double click it to open report configuration window, which is a blank
work sheet, the report edit tools include excel (Microsoft Office) and
Calc (OpenOffice), here take excel as example, as shown in Figure
2.4.4-2.

4. Figure 2.4.4-2 Interface of Report Configuration


5. In blank work sheet, add report header and corresponding content; as
shown in Figure 2.4.4-3.

Figure 2.4.4-3 Report Header

6. Add dynamic tag:


174
SECTION 2Configuration Tools

(1) Select table cell which is to be added dynamic tag;

(2) Click menu Dynamic Tag;

(3) Select dynamic tag type which is to be added (please refer to 2.4.3.2);

(4) If adding time point, select a table cell, e.g. in A4 table, cell of column 1,
row 4, set the collecting frequency of time point as once per hour
everyday; as shown in Figure 2.4.4-4.

Figure 2.4.4-4 Time Tag

(5) Click Write in, the A4 cell will display


;

(6) Click Close to complete adding time point.

The adding of history tag and real-time tag is the same as adding of time
point.
7. When adding dynamic tags finished, click Compile;
8. It will popup dialog box Compile successfully, click OK;
9. Click Print Preview in menu Report;
10. Effect Diagram of Report Print comes up; as shown in Figure 2.4.4-5.

175
SECTION 2Configuration Tools

Figure 2.4.4-5 Report Print Preview

11. Close Print Preview mode;


12. Save report to folder report which is in project path;
13. Select Exit.
14. Download Operator Station (please refer to 2.5.4).
In folder start which is under Operator install folder, report file with format
excel will be generated.
2.4.4.2 Print Configuration

When report file is downloaded to file start, start Operator Station (please refer
to4.2.9.1Login), report print configuration and print setting will be completed in
Operator Online.

1. Login Operator Online as Engineer level (please refer to 4.2.9.1);

2. Click icon in main mene of screen;


3. Double click command Report Configuration in the menu;
It will popup dialog box Report Print Configuration, fill in correct
information as needed (please refer to4.2.9.10Report Configuration); as

176
SECTION 2Configuration Tools

shown in Figure 2.4.4-6.

Figure 2.4.4-6 Configuration of Report Print

4. Select OK;

5. Double click command Print Setting in icon ;


6. Open dialog box Print Setting, Select Print report automatically and set
Log print Direction (please refer to 4.2.6.1); as shown in Figure 2.4.4-7.

177
SECTION 2Configuration Tools

Figure 2.4.4-7 Print Setting

7. Click OK;
8. Report Print can be triggered by any command below:
Triggered by button Report Request Print in dialog box Report Print
Configuration (please refer to4.2.9.10Report Configuration);

Triggered by command Report Request Print in icon which is in


screen main menu (please refer to 4.2.6.2).
9. Tips box in lower right corner of online graph will prompt whether
report exports successfully. As shown in Figure 2.4.4-8.

178
SECTION 2Configuration Tools

Figure 2.4.4-8 Request Successfully

• Understand of 4 time points:

Time of creating task: set auto print time online (time of operation step 4);

Time of the first time executing printing: the time of folder named by excel
report file name, which is under catalog of folder start in folder of OPS install
(time of operation step 9); e.g. Main Tags for Thermal Control_xls.

As well as last print time of report file and present time of auto print.

• The 4 time points must meet requirement that the former is earlier than the
latter in proper order, otherwise, the report might not be generated when
using function Auto Print;

• The proper order above does not affect result of report print manually .

2.5 Download
2.5.1 Introduction
Download includes three parts:

179
SECTION 2Configuration Tools

 Download controller,

 Download server

 Download operator station.

Download controller is part of the controller algorithm configuration and is


introduced in Section 3.

Since the other two downloads is accomplished in engineer station, the ES


download is introduced in the following chapter.

• Make sure to compile the project before downloading.

2.5.2 What is ES Download Main Window


From Start menu, select Programs → MACS → MACS_ENG →Download, a
popup window will appear for the user to select the project, an example is
shown in Figure 2.5.2-1.

Figure 2.5.2-1 Select Project

Select the project to download and click OK, the logon window will appear as
shown in Figure 2.5.2-2.

180
SECTION 2Configuration Tools

Figure 2.5.2-2 Login Window

In order to prevent unauthorized operation, the ES must be accessed by the


password. Input the correct User ID and Password, and click OK, the ES
Download main window will appear as shown in Figure 2.5.2-3.

Figure 2.5.2-3 Main Window of ES Download

2.5.3 Download Server


In the left part of Download window, select a server to download (A Master in
this case) as shown in Figure 2.5.3-1.

181
SECTION 2Configuration Tools

Figure 2.5.3-1 Select Master A to Download

Current IP address of selected server is displayed, check the IP address and


relevant field control station list. Note that all download files are selected by
default shown in the window below, click Download to download the files to
server.

• In order to make download take effect, select Logout and Reboot the
Server after download before download.

2.5.4 Download OPS


In the left part of Download window, select Operator and all the operators will
be shown in a list. Select the OPS which want to be downloaded in the list as
shown in Figure 2.5.4-1.

182
SECTION 2Configuration Tools

Figure 2.5.4-1 Download OPS

All download files are selected by default as shown in the below window, click
Download, then graph and report contents in download file will be downloaded
to the Start directory in OPS.

2.5.5 Readback

Select Readback command in Command menu or click button on the


left part of the main window, as shown in Figure 2.5.5-1.

183
SECTION 2Configuration Tools

Figure 2.5.5-1 Readback

Readback, mainly used in database and permission devices, is an system


function that reads the online values of database back to off-line database and
save them, as well as permission online value back to off-line permission
settings to save.

This function can effectively make the parameter modification of measure


range, alarm and unit conveniently.

• Before database combined compilation, users should readback the


database to make sure the consistency between online and offline
parameters in database. Please pay attention to select correct server
(main server of current domain) and there will be a prompt after success to
readback. If the prompt is not pop-up, readback should be executed again.

• Please close the database control center firstly before use readback
command, while close all Codesys programs before controller readback.

2.6 Historical Data Query


2.6.1 Introduction
The historical data query is used to find the data specified in the database to

184
SECTION 2Configuration Tools

help user monitor the system status and make relevant decision.

2.6.2 What is the Historical Data Query Main Window


From Start menu, select Programs → MACS → MACS_ENG →Historical Data
Query, the window will appear as shown in Figure 2.6.2-1.

Figure 2.6.2-1 Historical Data Query Main Window

The components in Historical data query main window are:

 Title bar

 Menu

 Toolbar

2.6.2.1 Title bar

Title bar is on the top of the main window which shows the name of the
software.

2.6.2.2 Menu

All menus and their items will be instructed in this chapter. The title of each

185
SECTION 2Configuration Tools

item is organized as “Menu Name – Item Name”.

The menu File is shown as Figure 2.6.2-2:

Figure 2.6.2-2 Menu "File"

1. File-Query Directory Choice

Shortcut button:
User can choose a historical data file to query.
2. File-Network Query
User can choose a network file path to query as shown in Figure 2.6.2-3.

Figure 2.6.2-3 Network Query

3. File-End Query

Shortcut button:
User can end the query.
4. File-Exit

Shortcut button:
Exit the Historical Data Query software.
The menu Query is shown as Figure 2.6.2-4:

186
SECTION 2Configuration Tools

Figure 2.6.2-4 Menu "Query"

5. Query-Trend

Shortcut button:
Query trend of the historical data file.
6. Query-All Log

Shortcut button:
Query all log of the historical data file.
7. Query- Operation Log

Shortcut button:
Query operation log of the historical data file.
8. Query-Device Log

Shortcut button:
Query device log of the historical data file.
9. Query-SOE Log

Shortcut button:
Query SOE log of the historical data file.
10. Query-Trend Group Settings

Shortcut button:
User can set start time and end time of the query, and then click Next to
select trend group tag names as shown in Figure 2.6.2-5.

187
SECTION 2Configuration Tools

Figure 2.6.2-5 Trend Group Setting

The menu View is shown as Figure 2.6.2-6:

Figure 2.6.2-6 Menu "View"

11. View-Toolbar
User can choose whether to show the toolbar, in front of this menu
means to show it, or else, not to show.
12. View-Status Bar
User can choose whether to show the status bar, in front of this menu
means to show it, or else, not to show.
The menu Help is shown as Figure 2.6.2-7:

Figure 2.6.2-7 Menu "Help"

13. Help-About MACSHDBQuery…


Show the version number of the Historical Data Query.

188
SECTION 2Configuration Tools

2.6.3 Toolbar
The toolbar is a shortcut for the frequently used functions in the menu to
improve the efficiency. It provides access to basic commands for editing and
adding control elements as shown in Figure 2.6.3-1

Figure 2.6.3-1 Toolbar on Historical Data Query Main Window

Tool Icon Name Description

Directory
To select a historical data file
choice

End Query To end the current query

Trend To query the trend

All Log To query all log

Operation
To query operation log
Log

Device Log To query device log

SOE Log To query SOE log

Trend Group
To set trend group
Settings

Exit To exit historical data query

189
SECTION 3
Control Station Algorithm
Configuration

3.1 Overview
Conmaker (Alias CoDeSys) is controller algorithm configuration software of
MACS system. It supports six programming languages which are provided by
IEC-61131 standard, as well as the editor and debugger. With advanced
structure and powerful function, Conmaker is easy to learn and master by
configuration engineer.

As a developed platform for control scheme, the main functions of Conmaker


can be shown as follows:

 Control scheme configuration. Firstly, editing equipment and database


through different components, then, the basic algorithm project will be
generated after compiling in System Configuration, and load it into
Conmaker, then control scheme can be programmed and compiled in
it. The related editing components can be shown as follows:

 Hardware configuration: edit in Device Configuration

 Database definition: edit in System Configuration

 Edit and compile control scheme: program user control scheme


with different languages in Conmaker.

 Simulation debug: the compiled algorithm by simulation.

 Download and run: Login the controller and download the program to
MCU (controller), then the program is running and be debugged
online.

In real project, each control station corresponds with a controller algorithm


project which contains the control scheme to run. Control algorithm mainly
contains object set up, task configuration, hardware configuration (MACS
configuration), main program (MACS_PRO) creation and program algorithm
through adding POU (Program Organization Unit).

191
SECTION 3 Control Station Algorithm Configuration

The using method of Conmaker will be introduced in the following, it contains


programming languages, downloading and debugging of control algorithm. By
reading this chapter, user may have a good understanding of the control
algorithm configuration mehod control algorithm debugging.

3.2 Window Interface Introduction


This chapter mainly about the software startup and the composition of window
interface.

3.2.1 Software Startup and Window Interface


First start Conmaker. Click Start, Open All Programs -> MACS
->MACS_ENG -> FCS, after start this component,the Select Project window
pops up, as shown in Figure 3.2.1-1:

Figure 3.2.1-1 Project List Window

First select Project Name from the project list, then click Select button, the
FCSEditor window pops up, as shown in Figure 3.2.1-2.

192
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.1-2 Control Station List Window

Control station number can be selected from the control station list window.

Algorithm configuration interface is shown as Figure 3.2.1-3:

193
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.1-3 Control Algorithm Configuration Interface

The components in Conmaker main interface including:

194
SECTION 3 Control Station Algorithm Configuration

 Title bar: Display software identification, algorithm project name, station


number and the object name being edited.

 Menu bar: Including all menu commands which are required for
configuration, some of them can be selected through shortcut menu on
toolbar.

 Toolbar: By selecting the shortcut menu on toolbar, some operation


commands can be realized quickly.

 Object organizer: Composed of four tabs which are program, data type,
visualization and resource, each of them can open a corresponding
manager window.

 Working space: Including all of editor windows, as language editor,


declaration editor.

 Message window: Displaying the information of compiling, look up and


comparison result.

 Status bar: Displaying the information of current project and current


command.

1. Title bar
The contents of Title Bar from left to right are: software identification
(software icon and name), project name (project status), object being
edited (object name, type), window control button (maximize, minimize,
close the button), as shown in Figure 3.2.1-4:

Figure 3.2.1-4 Title Bar

After modification of project, the project name will be displayed as "project


name. pro*", the status "*" means have not be saved after modification, "*"
will disappear after Save .
2. Menu bar
Menu bar is below the title bar. Click the menu name, select menu
command item on the dropdown menu. The options displayed on the
menu bar varies according to the editing contents in working space, in
general, it includes some menu groups, as shown in Figure 3.2.1-5:

195
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.1-5 Menu Bar

File: Executable operations related to project file, as open, save, close,


etc.

Edit: Edit, replace, look up and other operations for existing content.

Project: Compile, setup, view log and other operations for the project being
edited.

Insert: This menu can be selected when configuring user program, the
user can insert component of graphic programming language, add and
delete variables.

Extras: Load different operation commands which can assist editing


program according to the edit content in working space,

Online: Provide the related operation commands for project with real
system or simulation system, as download, online, simulation, etc.

Window: Provide operation commands for current opened windows, as


arrangement, switch display and close, etc.

Help: Provide help information of this software.

All of the commands which are included in each menu can be realized by
operating shortcut key or pressing shortcut button in toolbar, please see
relative information for more details in"3.2.2Menu Bar and Shortcut ".
3. Toolbar
There are several groups of shortcut buttons (or tool buttons), usually
displayed as common tools and dedicated tools. The tool buttons offer
shortcut operation commands as well as "tool tips" function, when moving
the mouse onto a tool button, a yellow rectangle block will be displayed
below the mouse arrow and with content about name of the tool and
shortcut key.
 Common toolbar

Tool Icon Name Description

New(N) Build a new project.

196
SECTION 3 Control Station Algorithm Configuration

Tool Icon Name Description

Open(O) Open an existing project.

Save(S) Save the current project.

Run(R) Start to run current project.

Stop Stop running.

Execute the program in single step, the


Jump out program will stop when this command is
selected.

Break point Set break point.

Start online monitor mode to monitor the


Login(I)
running state of the system.

Exit(X) Exit the online monitor mode.

Global search(S) Search in the whole project.

Cut(T) Cut the selected content to clipboard.

Copy(C) Copy the selected content to clipboard.

Paste the content from clipboard to


Paste(P)
current window.

Search content in line with the search


Find(F)
condition.

Search next content in line with the


Find next(F)
search condition.

In scaling setup window, the scale can


Setup display
be selected on dropdown menu, or input

197
SECTION 3 Control Station Algorithm Configuration

Tool Icon Name Description


scale tool the display scale manually,the setup
range is 10%~500%.This tool can only
used in hardware configuration and
POU edit window of CFC language.

 Dedicated toolbar

The contents of dedicated toolbar vary according to the current contents in


working space and the language currently used, as well as the tool icons.
The common used icons are: CFC toolbar, LD toolbar, FBD toolbar, SFC
toolbar, visualization toolbar, as shown in Figure 3.2.1-6:

Figure 3.2.1-6 Shortcut Buttons on Toolbar

Detailed descriptions will be shown in the following chapters related to


specific content.
4. Object organizer
Object organizer includes four tabs: POUs, Data Types, Visualizations,
and Resources. Click each tab, the user can switch to the corresponding
manager: "POUs", "data types", "visualizations", "resources ".
Contents in each window are managed by tree structure, the name of
each object unit is root node, the user can add object of this type under
the root node, click "+" or "-" in the tree, and the user can unfold or close
the sub node, as shown in Figure 3.2.1-7:

198
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.1-7 Object Organizer Management Tree

 POUs: Manage the POU (Program Organize Unit) of the project, such
as program, custom functional blocks and functions.

 Data types: In this window, the user can add and edit the custom data
type which are including structure and ENUM.

 Visualizations: In this window, the user can plot graph by using the
system geometry components, and integrate the data tag in algorithm
project, dynamically display and track the data variation.

 Resources: Manage global variable, hardware configuration, object


setup, project option and task configuration, display log and referenced
library information in project.

Please see detail information of the objects in "3.2.3 Object ".

3.2.2 Menu Bar and Shortcut Button


3.2.2.1 File

File menu offer project file operation commands as open, close, save, print
and exit, as shown in Figure 3.2.2-1, detailed functions will be introduced in the
following.

199
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-1 Menu "File"

1. New

Shortcut button:
The user can build a new project by using this command, and the initial file
name is "Untitled ". It is recommended that user should better change this
file name when saving the project.

• Currently, the algorithm project is generated automatically through


compiling of system configuration, so the user can only open the project
file to do algorithm configuration without building a new project. The user
can not use 9 characters as \ / : * ? “ < > | in project name, otherwise,
there will be tips for invalid file name.

If user wants to build a project by "New", please see the specific process
in 3.2.3.1Program Organize Unit (POUs).
2. New from template…
The user can build a new project from an existing template 2 by using this
command. After select this item, a dialog pops up, the user can select the
project from existing templates in corresponding path, click Open, then
the user can build project in the corresponding template.
3. Open…

2
Template:Existing project file, can be used as the basic project for the new project, you can add
specific object and content for the new project. If you want to build some similar projects, the template
can decrease the amount of working.

200
SECTION 3 Control Station Algorithm Configuration

Shortcut button:
Shortcut key: <Ctrl>+<O>
The user can open an existing project by using this command. After
selecting this command, the dialog Open pops up, as shown in Figure
3.2.2-2, then the user can find the path for project.

Figure 3.2.2-2 Dialog Box “Open”

If user selects Open command on an opened and already changed


project, it will prompt tips for asking if saving the project or not, as shown
in Figure 3.2.2-3, after selection, the user should close the current project
and open the new one.

Figure 3.2.2-3 Dialog Box “Save”

4. Close
The user can close the current project by using this command. If the
project has already changed, it will prompt tips for asking if saving the
project or not, as shown in Figure 3.2.2-3.
5. Save

201
SECTION 3 Control Station Algorithm Configuration

Shortcut button:
Shortcut key: <Ctrl>+<S>
With this command the user can save changes of the project. If the project
is saved as "Untitled ", it's necessary to change the name. Select this
command, the "Save as" dialog will pop up, as shown in Figure 3.2.2-4,
then the user can set the project name and its saving path.

Figure 3.2.2-4 Dialog Box “Save As”

There are three common save types:


 CoDeSys Project: file suffix is ".pro";

 Internal library: file suffix is ".lib". The library file is a set of common
function block and functions, and it can be called by library manager.
Usually, the library is provided by system, it includes control scheme
functional block and functions which are frequently-used in industrial
system. The variable definition and program realization are in this file.

 External Library: file suffix is ".lib". External library is the header file for
variable definition, the program is realized in other files (e.g. C), and
cooperation of the two files can complete a certain function.

6. Save as…
The user can save the current project to another file or library file without
changing the initial project file.
Select File->Save as, the Save as dialog pops up. Then select an existing
file name or type in a new name and the file type, click OK to finish the

202
SECTION 3 Control Station Algorithm Configuration

saving.
7. Save/Mail Archive…
The user can create compressed file for a project by using this command.
Select File->Save/Mail archive…, the Save Archive dialog pops up, as
shown in Figure 3.2.2-5, the user can set the catalog of the file which can
be added to the compressed package, click Save and set the name and
path for the compressed file; click the Mail, the project file is compressed
automatically and added as the default mail attachment; click Cancel to
cancel the operation and close the dialog.
In the control algorithm system, all the referenced files can be packaged
and compressed to zip file, and the zip file can be directly saved or sent by
email.

Figure 3.2.2-5 Dialog Box "Save Archive"

8. Print
Shortcut key: <Ctrl>+<P>
User can print the contents of active window by using this command.
Select File->Print, the Print dialog pops up as shown in Figure 3.2.2-6,
the user can select printer and set print range (page number), number of

203
SECTION 3 Control Station Algorithm Configuration

copies in the dialog, also the user can output the print content to file. Click
Print button, the current active window will be printed.

Figure 3.2.2-6 Dialog Box “Print”

9. Printer Setup…
The user can edit the page layout to print the control scheme page onto
user-defined project drawing. Select File->Printer Setup, the page layout
dialog pops up as shown in Figure 3.2.2-7.

Figure 3.2.2-7 Dialog Box of Print Setup

Type in file name with extension name ".dfr" in File field, the page layout
204
SECTION 3 Control Station Algorithm Configuration

will save in this file. The default file to save page layout is DEFAULT.DFR.
If the user wants to add other layout format, please click Browse, find the
file needed in Open window. Open printer setup window by clicking
Printer Setup (P) button, user can select whether or not to start a new
page for a project and subproject.
Click Edit (E) to open the specific page layout, as shown in Figure 3.2.2-8:

Figure 3.2.2-8 Print Layout

The user can insert graph component or placeholder by the commands in


Insert menu or the corresponding shortcut menu. Placeholder is to display
project information as page number, date, file name and POU name. The
common placeholders are shown in Table 3.2.2-1, its actual value will be
displayed when printing. Also you can use Extras menu can be used to edit
the inserted components, as arrangement, set background color, etc.

Table 3.2.2-1 Common Placeholder List

Item Placeholder Description

Page {Page} Print page No. at this position

POU
{POUName} Print POU name at this position
name

File name {FileName} Print project name at this position

date {Date} Print date at this position

205
SECTION 3 Control Station Algorithm Configuration

Content {Contents} Print POU content at this position

10. Exit
Shortcut key: <Alt>+<F4>
User can exit the algorithm configuration tool by using this command, if
the current project has any changes, the system will prompt to save.
3.2.2.2 Edit

Edit menu provides a series of operation commands to edit the opened project,
it can be used in all kinds of editor (language editor, declaration editor), as
shown in Figure 3.2.2-9, the detailed functions are introduced in the following.

Figure 3.2.2-9 Menu "Edit"

1. Undo
Shortcut key: <Ctrl>+<Z>
This command cancels the latest action in editor or object organizer.
Repeat this command, all the actions can be canceled and get back to the
moment if the window was opened. This applies to all the actions in editor
or object organizer. With Edit->Redo, user can restore the action which
user have undone.
2. Redo
Shortcut key: <Ctrl>+<Y>
With this command user can restore the undone actions (Edit->Undo) in
206
SECTION 3 Control Station Algorithm Configuration

editor window or object organizer. As the command Undo, user can also
execute the command Redo.
3. Cut

Shortcut button:
Shortcut key: <Ctrl>+<X> or <Shift>+<Delete>
With this command user can copy the currently selected object from editor
to clipboard, and delete this object from editor at the same time. In object
organizer, this command applies to the currently selected object, but not
all of objects can be deleted.
4. Copy

Shortcut button:
Shortcut key: <Ctrl>+<C>
With this command user can copy the currently selected object from editor
to clipboard, and this does not change the contents of editor window. In
object organizer, this command applies to the currently selected object,
but not all objects can be copied, e.g. the MACS configuration. Not all
editors support copying and it is limited to certain editors. It applies to the
objects which can do Edit->Cut operation.
The operation Copy does not pop up any dialog, after the Paste operation,
according to paste frequency, there will be an underline and a number
added behind the original object to identify the new object.
5. Paste

Shortcut button:
Shortcut key: <Ctrl>+<V>
With this command user can paste the content from the clipboard onto the
current position of the editor. In the graphic editor (FBD/CFC/LD), the
command can only be executed when the insertion is a correct structure.
The object to be pasted is from clipboard. Not all editors support pasting
and it is limited to certain editors.
6. Delete
Shortcut key: <Del>
With this command user can delete the selected region from the editor
window. This operation do not change the contents of the clipboard. This
operation also applies to delete the selected object in object organizer, but
not all objects can be deleted, e.g. the MACS configuration. For the types
of selected contents, it is the same with Edit->Cut.
7. Find…

207
SECTION 3 Control Station Algorithm Configuration

Shortcut key:
With this command user can search a certain text in the current editor
window, open the Find dialog as shown in Figure 3.2.2-10:

Figure 3.2.2-10 Dialog Box "Find"

 Find what: Input the string which user are looking for in the field Find
what;

 Match whole: Set whether to search the contents match whole with
the content of Find what;

 Match case: Set whether to distinguish between capital letter and


lowercase;

 Direction: Set whether the search should proceed Up or Down, the


default direction is Down;

 Find next: Search the contents which meet search condition one by
one until the system prompts "** not found " to finish task.

The Find dialog do not close automatically with the termination of


searching, it only closes if the user click Cancel button or Close
button.
The Find command only applies to the current page. Global search in
Project menu can search in the assigned position of the whole project.
8. Find next

Shortcut button:
Shortcut key: <F3>
With this command user can execute once searching with the same string
as with the most recent searching action Edit->Find.
9. Replace…
Shortcut key: <Ctrl>+<H>
With this command user can search a certain string just like the command
Edit->Find, then replace the content with other string automatically.

208
SECTION 3 Control Station Algorithm Configuration

Choose this command, and then the Replace dialog opens as shown in
Figure 3.2.2-11

Figure 3.2.2-11 Dialog Box "Replace"

 Find what: Input the string which user are looking for in the field Find
what;

 Replace with: Input the new string which user want to replace in the
field Replace with ;

 Match whole word only: Set whether to search the contents match
whole word with the content of Find what;

 Match case: Set whether to distinguish capital letter and lower case;

 Find Next: Search the contents which meet search condition one by
one until the system prompts "** not found " to finish task.

 Replace: After clicking this button, the former string be searched will be
replaced by the new string. Click Find next, the user can continue
searching the content which meets the search condition, once find,
click Replace to replace, repeat the operation until the system prompts
"** not found ", then the replace is finished.

 Replace All: With this button user can replace all the strings meets the
condition at the same time. When the replace operation is completed,
a dialog will pop up to prompt how many replacements have made, as
shown in Figure 3.2.2-12

Figure 3.2.2-12 "Replace" Finished

209
SECTION 3 Control Station Algorithm Configuration

The Replace dialog does not close automatically with the termination of
searching, it only closes when the user click Cancel button or Close
button.
Also, the Replace command only applies to the current page. Global
Replace in Project menu can search in the assigned position of the whole
project.
10. Input Assistant…
Shortcut key: <F2>
This command can quickly display the tips related to the selected cursor
contents.
Press F2 on the current cursor position in edit window, the Help Manager
pops up as shown in Figure 3.2.2-13:

Figure 3.2.2-13 Help Manager Window

Help Manager displays the options can be inserted in the current position,
as operator, function, functional block and variable type. The left column
displays the input type can be selected, and select the desired input in the
right column, click OK to confirm the choice. The user's selection will be
inserted in the position of cursor.
11. Auto Declare…
Shortcut key: <Shift>+<F2>
This command can assist user to complete the declaration of the variable
automatically. Select a variable and select this command or using shortcut

210
SECTION 3 Control Station Algorithm Configuration

key, declare variable dialog pops up as shown in Figure 3.2.2-14:

Figure 3.2.2-14 Dialog Box of Declare Variable

This function in working space can assist to display, define or edit the
variable and its related items include variable name, type, catalog, initial
value and notes, etc.
12. Next Error
Shortcut key: <F4>
This command can assist to locate compile information. When the
message window displays incorrect compilation of a project, the user can
select Edit->Next error or press F4 to find the next compile error. The edit
window of the corresponding error will be located, and the corresponding
error message is active.
13. Previous Error
Shortcut key: <Shift>+<F4>
This command can assist to locate compiled information. When the
message window displays incorrect compilation of a project, user can
select Edit->Previous Error or press F4 to find the previous compiled
error. The edit window of the corresponding error will be located, and the
corresponding error message is active.
14. Macros
With this command user can open macros list in the project by select and
executing the macro operation. User can define a macro by selecting
Project->Options->Macros.
3.2.2.3 Project

Project menu offers operation commands related to project edit, as compile,


import, etc. As shown in Figure 3.2.2-15, its functions are introduced in the
following.

211
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-15 Menu "Project"

1. Build
Shortcut key: <F11>
With this command user can compile the project, compiled information will
be displayed in the message window. The compiling process is basically
incremental, that is the changed program will be recompiled only. A
non-incremental compiling can also be obtained if the command
Project->Clean all is executed before.
The compile process will be carried out automatically if the Online->Login
command is executed.
2. Rebuild all
Unlike the incremental compiled command, with this command the user
can completely recompile the whole project. The download information will
not be discarded without executing Clean all command.
3. Clean All
With this command, all of the compiled information can be cleared,

212
SECTION 3 Control Station Algorithm Configuration

recompilation will be needed after execution of is command.


Select Project->Clean all, the dialog pops up as shown in Figure
3.2.2-16:

Figure 3.2.2-16 Dialog Box "Clear all"

Select Yes to clear all compiled information of the project; select No not to
do the clear operation.

• After Clear all, the system will prompt to initialize download when login the
controller next time.

4. Load download information…


With this command user can load the download information from a
designed file which with file suffix ".ri". The dialog pops up as shown in
Figure 3.2.2-17.

Figure 3.2.2-17 Dialog Box “Load Download Information"

5. Object
With this command user can do operations on the selected object as
delete, add, rename, convert, copy, edit and property, etc.

213
SECTION 3 Control Station Algorithm Configuration

 Delete: Delete the selected object (program, data type, visualization or


global variable) or folders in the tree diagram without any prompts,
after deleting, the user can restore by Edit->Restore after deleting.

 Add: Add new object (program, data type, visualization or global


variable), user can confirm the popup adding diagram according to the
organizer type of the cursor position.

 Rename: Rename the selected object (program, data type,


visualization or global variable) or folder in the tree diagram. Select
Project->Object->Rename command, the Rename Object dialog
pops up as shown in Figure 3.2.2-18.

Figure 3.2.2-18 Dialog Box "Rename Object"

Type the changed object name in New Name, Click OK to finish the
rename operation.

• The object name should only be consisted of letters, numbers and


underlines, and starts with letter or underline without number. The object
name is not case sensitive.

• Also the software key words cannot appear in the object name, as VAR,
return, and the default display of key words in the software is blue font.

214
SECTION 3 Control Station Algorithm Configuration

 Conversion: User can convert the POUs from the languages SFC, ST,
FBD, LD or IL into one of the three languages which are IL,FBD or LD.
Select Project->Object->Convert command, the Convert Object
dialog pops up as shown in Figure 3.2.2-19:

Figure 3.2.2-19 Dialog Box "Convert Object"

After selecting language type of the object unit, the object can be
converted into new POU, type in new name in the New POU Name and
click OK, and then a new POU is converted. Otherwise, the original POU
is converted. Please notice that the project must be compiled without error
before the convert operation. Or else there will be an error message
window pops up as shown in Figure 3.2.2-20:

Figure 3.2.2-20 Dialog Box of Compile

• Actions can not be converted.

 Copy: Copy selected object (program, data type, visualization or global


variable) or folder in the tree diagram. Select Project->Object->Copy,
the Copy Object dialog pops up as shown in Figure 3.2.2-21

Figure 3.2.2-21 Dialog Box "Copy Object"

215
SECTION 3 Control Station Algorithm Configuration

Type in new name in New POU name, and click OK to generate a new
object. This command is different from Edit->Copy, the Edit->Copy
command does copy to the clipboard without dialog popping up.

 Edit: Execute this command after selecting objects (program, data type,
visualization or global variable), and the corresponding editor is
loading in the working space.

There are two ways to open the editor window:

 Double click the object;

 Locate the cursor on the object in the tree diagram of organizer


window, type the first letter of target object, and Select object to
be opened dialog pops up as shown in Figure 3.2.2-22:

Figure 3.2.2-22 Dialog Box "Select Object to be Opened"

This dialog is Select object to be opened dialog, it displays all the


objects which starts with the input letter, the user can select the
desired object in the list and click the button Open in order to open its
editor and load its contents.

 Property: Display the property window of the selected object (program,


data type, visualization or global variable), the property window of
different objects are also different.

The related commands can be found in the right click menu of the objects,
and the executing processes are identical.

216
SECTION 3 Control Station Algorithm Configuration

6. Options…
With this command user can open the Options settings dialog, the
options are divided into several categories as shown in the left list in
Figure 3.2.2-23. Click the category name in the list and the corresponding
setting states are shown in the right window, different options have
different settings.

Figure 3.2.2-23 Dialog Box "Options"

Options contains: Load & Save, User Information, Editor, Desktop, Colors,
Directories, Log, Build, Passwords, Source download, Database-
connection, Macros.
The user can also open "Option" dialog by clicking Working Space in
Resource Management window.
The common used functions are introduced here as Load & Save, Source
download and symbol download, the parameters of the other options can
use the default value.
 Load & Save

Click this option and the corresponding setting states are shown in the
right window as shown in Figure 3.2.2-24:

217
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-24 Setting Dialog of Load & Save Option

 Create Backup: when saving the project, a project backup file with
extension ".bak" will be generated and saving the last project file.
Default is not selected.

 Auto Save: Auto save the project into a temporary project file with
extension ".asd" after a certain time interval. The file is
automatically deleted if the Conmaker closes normally; otherwise,
when reopen the Conmaker, the system will prompt to select if
open the saved the temporary file or the initial file.

 Auto Save Interval [Min]: Default interval is 10 minutes, this default


value is recommended to use.

 Auto Save before compile: Auto save the project into a temporary
project file with extension ".asd" every time before compiling, this
action is same as " Auto Save ".

 Ask for project info: With this option there will be a "Project
Information" dialog pops up when the user saves a project with
new name, the dialog displays the file name, catalog and change
date, and demands to input the project info: title, author, version,
description, as shown in Figure 3.2.2-25:

218
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-25 Settings of Project Information

 Auto Load: With this option the last opened project file will be
loaded automatically when the controller algorithm software starts
up.

 Remind of boot project on exit: When closing the project, if there is


no boot project created after last download, a prompt dialog pops
up to remind creating boot project or exit. Click Cancel to create a
new boot project; click OK to exit.

Figure 3.2.2-26 Dialog Box of Generating Boot Project

 Save ENI3 Credentials: ENI related user name and password will
be saved with the project.

3
ENI:ENI is a kind of interface component. It connects the CoDeSys programming system with the
external database.

219
SECTION 3 Control Station Algorithm Configuration

 Source download

Dialog pops up as shown in Figure 3.2.2-27:

Figure 3.2.2-27 Dialog Box "Source Download"

To make sure the time project source code which will be downloaded into
the controller in "Timing" check box.

 Implicit at load: This option allows the selected file range to be


automatically loaded into the controller by the command
Online->Login.

 Notice at load: After executing Online->Login command, there will


be a popup dialog "Do you want to write the source code into the
controller system?” Press Yes to download automatically the
selected file into control system, or you can finish it with No.

 Implicit on create boot project: Download the source code into


controller when the boot project and symbol table are
downloading.

 Only on demand: The source code will only be loaded into control
system when executing the command Online->Source code
download.

Select the download file range in Extent checkbox:

220
SECTION 3 Control Station Algorithm Configuration

 Source code only: Download control algorithm file (with file


extension .pro) only.

 All files: Download all the files including corresponding library,


visualization and bitmap file, setting file, etc.

• In real project configuration, usually select Only on demand and All files.

 Symbol configuration

After selecting this command, the dialog pops up as shown in Figure


3.2.2-28. User can make sure whether to download it into controller and
configure the contents of symbol table.

Figure 3.2.2-28 Dialog Box "Symbol Configuration"

• In project application, Dump symbol entries should be selected.

7. Translate into other language


This menu includes some sub-items related to the language settings, as
shown in Figure 3.2.2-29:

221
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-29 Language Commands

 Create translation file: Create a translation file with an extension .tlt of


the current project.

 Translate this project: Use "translation file" to translate the current


project into "Object language".

 View translated project: User can view the translated project files.

 Toggle translation: Once the project have been toggled, the translate
project option will be turn gray so that user can not do translation to
this project no longer. User can translate the project after reselection
the toggle translation.

8. Document…
With this command, user can print all the files or part of the files which are
included in current project. Usually, a project includes components as
POUs, document, data type, visualization, resource (global variable, log,
variable setting, sample track, MACS configuration, and task
configuration), POU call tree and data type, etc. After selection of this
command, the Project document dialog pops up as shown in Figure
3.2.2-30, the configuration tree with project name as its root node is
shown and user can select multiple project components with Ctrl key, the
selected components are highlighted in blue. Then click OK to start Print
window to output.

222
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-30 Dialog Box " Document Project "

9. Export…
With this command, user can import and export the project components
about controller algorithm. It's easy for program change among different
IEC programming systems.
Select Project->Export, "Export project" window pops up as shown in
Figure 3.2.2-31:

223
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-31 Dialog Box "Export project"

User can select the export components in the configuration tree with
project name as its root node.
There is a standard exchange format for the programs, which is written in
IL, ST, and SFC (description about these programming languages will be
in the following). For the program in LD, FBD and other objects, there is
no appropriate text format for IEC1131-3, so the control algorithm has its
own text format. The selected objects will be written into ASCII file. The
program, data type, visualization and resource can be exported and saved
as ".exp" file.
10. Import…
With Project->Import command, select the desired file with extension
".exp" in the opened "Import project" dialog,, and the data will be imported
into the current project.
If an object have already exists in the same project with the same name, a
dialog pops up to ask "The object already exists. Do you want to replace
it?", as shown in Figure 3.2.2-32:

224
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-32 Dialog Box "Import Project"

The title of this dialog is the name of object, if Yes is selected, the object in
the project will be replaced by the object from the import file; if No is
selected, the name of the new objects receives as a supplement an
underline and a digit ("_0","_1",…); with Yes, all or No, all, the
corresponding operation will be executed to all the objects.
11. Siemens Import
This menu item includes the submenu of language settings, as shown in
Figure 3.2.2-33:

Figure 3.2.2-33 "Siemens import" command

In its submenu, there are commands to import program and variables from
Siemens-STEP5 or STEP7 files.
 Import an SEQ symbol file

With this command, the global variables are imported from STEP5, and
this importation should before "Import an S5 project file ", therefore, the
symbol name can be created in absolute address when the program is
imported. Select the symbol file with extension ".seq".
 Import an S5 project file

User can import program from Siemens S5 file, and select the S5 file with
extension ".s5d".
12. Merge…
With this command, the objects (program, data type, visualization and
resource) from other project can be merged into current project. Select
Project->Merge, find the desired project in "Copy project" dialog, then the
"Merge project" dialog pops up as shown in Figure 3.2.2-34:

225
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-34 Dialog Box "Merge Project"

Select the desired merge objects, the selected objects are highlighted in
blue, the user can select multiple objects with Ctrl key. Then click OK to
finish. If an object with the same name already exists in the project, there
will be a dialog box pops up to ask whether to cover the existed one.
13. Compare…
With this command, there will be a compare window to display the
comparison of the opened project and other project. For example, before
saving, user can compare the current version of this project to its previous
version to see changes.
After executing this command, the "Project comparison" dialog pops up as
shown in Figure 3.2.2-35:

226
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-35 "Project Comparison" Dialog

Select project to compare:


 Project to compare: this textbox displays the path of the project to
compare. The default path is the current project. Click Browse to
conform the other location of project.

Set the restrict condition of comparison in the Options box, default


selection is Compare differences:
 Ignore whitespaces: Do not compare the differences from blank space;

 Ignore comments: Do not compare the comments;

 Ignore properties: Do not compare the properties of the project.

 Compare differences: Compare the differences of the project.

Click OK to start compare, open the comparator in the current working


space, the comparison result displays as shown in Figure 3.2.2-36:

Figure 3.2.2-36 Project Comparison Result

227
SECTION 3 Control Station Algorithm Configuration

The compare area is divided into left part and right part, the left is current
project, and the right is the project to compare, each project is displayed
as tree diagram, identify the similarities and differences of the comparison
result with using different colors, there are four kinds of results as the
following:

 Blue: Objects only available in current project, there will be a space


in the corresponding position of the compare project.

 Green: Objects only available in the compare project, there will be


a space in the corresponding position of the current project.

 Black: Identical objects in both projects.

 Red: Objects with same name in both projects but actually are
inconsistent.

Double click the information line of the compare window to unfold the
detailed compare window. Click the Close button of the compare window
to close the compare result.
14. Project Info…
With this command, User can save the information of the project. Select
Project->Project info, a dialog pops up as shown in Figure 3.2.2-37:

Figure 3.2.2-37 Dialog Box "Project information"

228
SECTION 3 Control Station Algorithm Configuration

The following project information displays: file name, path, the time of the
most recently change (change date). The information can not be changed
manually.
In addition, user can add the following information: title of the project,
author, version number, description of the project. These information are
optional.
Press the Statistics button in Project Information dialog, the static
information of the project will be displayed. The static information includes
POUs, data type, global variables and local variables about their last
compilation. As shown in Figure 3.2.2-38:

Figure 3.2.2-38 Dialog Box "Project Statistics"

If the Ask for project info in the category Load&Save in the option dialog
is selected, then when saving a new project or saving a new project with a
new name, the project dialog will be called automatically.
15. Global Search…

Shortcut key:
With this command, user can search the specified contents in selected
object of current project, and search the desired objects according to the
key word.
Select Project->Global Search command, the search scope setting
window pops up as shown in Figure 3.2.2-39:

229
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-39 Search Scope Setting Window

The default selection is including all objects, and user can set search
scope according to the actual situation, click OK, and then Global search
dialog pops up as shown in Figure 3.2.2-40:

Figure 3.2.2-40 Dialog Box of Global Search Settings

Type in string to search in Search content, and set search demand:


Match whole word only or Match case, click Find Next to search one by
one; or click Message window to display the search result and the
number of information which meet the demands for user to locate the
information position which meet the search demands according to the
information in the message window.
16. Global Replace…

230
SECTION 3 Control Station Algorithm Configuration

With this command, user can search the specified content in the selected
object of current project, and replace the desired object according to the
key word.
Select Project->Global Replace command, the search scope setting
window also pops up, after setting, the Replace dialog pops up as shown
in Figure 3.2.2-41:

Figure 3.2.2-41 Dialog Box of Global Replace Settings

Type the corresponding string in Find what and Replace with, and set
search demand, then click Find Next and Replace to replace one by one.
Click Replace All to replace all objects meet the demands. This is
executing in the same way as Edit->Replace.
17. View Instance…
Open the function instance to view. User should first do Online->Login
operation to the compiled and errorless program, and then the instance
can be viewed.
18. Show Call Tree
With this command, user can open a window displays the call tree of the
POU object.
Select a POU object in POU organizer window, select Project->Show
Call Tree, the call tree window of the object pops up as shown in Figure
3.2.2-42:

Figure 3.2.2-42 Call Tree

The call tree takes the selected node as root node, and unfolds the related
POU objects. User can open call tree windows of several objects. Please

231
SECTION 3 Control Station Algorithm Configuration

notice that the project must be compiled before executing this command,
only after compilation is successful, user can view call tree.
19. Show Cross Reference…
With this command, user can view variables, address or the cross
reference of program in current project.
Select Project-> Show Cross Reference, the Cross references dialog
pops up as shown in Figure 3.2.2-43:

Figure 3.2.2-43 Dialog Box "Cross References"

In Selection box, the object category can be set and name can be
viewed:

232
SECTION 3 Control Station Algorithm Configuration

 Category: User can view the object category from the dropdown list of
the category to select variable, address, POU.

 Name: Type in the name of the object to view.

 Get References: Click Get References button, user can get the
reference information in List of box. The selected information is
highlighted in blue.

 Go To: After selecting the information in reference list, click Go To


menu, the edit window of the information will be opened.

 To message window: Click To message window, the Cross


References dialog will be closed automatically , and the cross
reference information will be displayed in the message window, double
click the message to open its edit window.

 Cancel: Click Cancel button to close the Cross References dialog.

20. Check
This menu item includes the operations about view variable information as
shown in Figure 3.2.2-44:

Figure 3.2.2-44 Submenu Items of Dialog Box "Check"

This menu can help execute check command. The check result is
displayed in the message window. Check command includes:
 Unused variable: check if there are any unused variables, if not, the
message window will give tips as: No unused variables found.

 Overlapping memory areas: check if there is any overlapping memory


area, if not, the message window will give tips as: No variables with
overlapping memory areas found.

 Concurrent access: check if there is concurrent access, if not, the


message window will give tips as: No concurrent accesses found.

 Multiple write access on output: check if there is multiple write access


about output, if not, the message window will give tips as: No output
found which are written more than one at location.

21. Add Action

233
SECTION 3 Control Station Algorithm Configuration

With this command, user can add new program branch for the selected
POU object.
Select Project->Add action, New Action dialog pops up as shown in
Figure 3.2.2-45:

Figure 3.2.2-45 Dialog Box "New Action"

Type in the new action name and select the action language, click OK to
finish.
22. User Group Password…
With this command, user can create access password for the access
users of different levels in the algorithm project.
The Password for user group window pops up when the project is
opening, after select the user group level, input the correct password to
open the project, or else, the system will prompt that the password is
incorrect. Only user in group 0 can set use group password and have the
access rights of the objects.
There are 8 user groups in controller algorithm, and they have different
access rights about program, data type, view and resource, access rights
for single objects or all of which can be established. Only a member of a
certain user group can open a project, a member of such a user group
must identify himself by password.
The user groups are numbered from 0 to 7, user in group 0 has the
administrator rights. Only member of group 0 may determine passwords
and have access rights for all of groups and objects.
When a new project is launched, then all passwords are initiallied empty.
Until a password has been set for the 0 group, user will enter the project
automatically as a member of the 0 group.
If a password for the user group 0 existing while the project is loaded, then
password will be demanded for all groups when the project is opened. As
shown in Figure 3.2.2-46:

234
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-46 Dialog Box " Password for User Group "

The project can be opened only by the correct password. If the password
does not agree with the saved password, then the message box pops up:
”The password is not correct”.
With the command Password for user group, user can assign the
passwords, and with Access rights in Object->Property as shown in
Figure 3.2.2-47 , user can define the rights for single objects or all of them.

Figure 3.2.2-47 Dialog Box of Access Rights

With this command, user can determine different passwords for user
groups. This command can only be executed by members of group 0.
When the command is executing, the following dialog pops up as shown
in Figure 3.2.2-48:

235
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-48 Dialog Box of User Group Password Settings

Select group in User Group and type in the corresponding password, for
each typed character an asterisk (*) appears in the field. User should
repeat the same password in the field Confirm Password. Close the
dialog with OK, if a message box appears as:
"The password does not agree with the confirmation". It means that the
two inputs are inconformity, so please repeat until the dialog box does not
appear. Then, if necessary, assign a password for the next group by
calling the command again.
3.2.2.4 Insert

When programming, the insert tool can help to define variable, call function
block, operator and function. For different programming languages and the
current positions, the items to be inserted in the insert menu are also different.

Take LD language for example, the using method of Insert menu is introduced
in several cases.

1. Cursor in working space


The dropdown menu when the cursor is in variable definition area of
working space is different from the one when the cursor is in programming
area of working space, as shown in Figure 3.2.2-49:

236
SECTION 3 Control Station Algorithm Configuration

a) Cursor is in variable definition area b) Cursor is in programming area

Figure 3.2.2-49 Menu "Insert" (1)

User can insert some function block, output, comment and definition key
word, variable type of the LD language, etc.
2. Cursor is in the visualization object of Visualization tab.
If a new visualization object is established in Visualization tab, the insert
operation is to insert visualization component, as shown in Figure
3.2.2-50:

Figure 3.2.2-50 Menu "Insert" (2)

3. Cursor in MACS configuration of Resource tab

237
SECTION 3 Control Station Algorithm Configuration

In MACS Configuration of Resources tab, insert operation is to insert


modules First insert the main module, then insert the corresponding sub
modules, as shown in Figure 3.2.2-51:

Figure 3.2.2-51 Menu “Insert” (3)

4. Cursor in Watch-and-Recipe Manager of Resources tab


In Watch-and-Recipe Manager of Resources tab, select New Watch
List in Insert menu or right click in the left part of Watch-and-Recipe
Manager list area, select Add watch list in the popup menu, and type in
an appropriate name for the list, then the new watch list is inserted, as
shown in Figure 3.2.2-52:

238
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-52 "Insert" menu (4)

The specific functions of insert menu items are introduced in detail in the
following chapters and nodes.

3.2.2.5 Extras

For different programming languages and the current positions, the items
displayed in the Extras menu are different. Take LD language for example, the
using method of Extras menu is introduced in several cases。

1. Cursor in working space


In the Program item of Resources tab, the Extras menu is shown as
Figure 3.2.2-53:

239
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-53 Menu "Extras" (1)

 Negate: Do NOT on contact and coil. The value of coil after do NOT
operation will be saved in the corresponding logic variable. If do NOT
on contact, only the logic variable is FALSE allowed to connect the
contact.

 Set/Reset: The coil can be defined as Set or Reset state. Coil symbol
(S) indicates a set coil. Once be set as TRUE, the coil will keep TRUE
until be reset. Coil symbol (R) indicates a reset coil. Once be set as
FALSE, the coil will keep FALSE until be set again.

 Zoom: Its shortcut key is" Alt+Enter ". In ladder diagram, do Zoom on
the selected function block, the Help file appears as Library Manager,
then user can see the application of this function block.

2. Cursor is in visualization object of Visualization tab.


In Visualization tab, after building a new visualization object, the Extras
menu is shown as Figure 3.2.2-54, it can do layout and configuration
operations on the visualization components.

Figure 3.2.2-54 Menu "Extras" (2)

240
SECTION 3 Control Station Algorithm Configuration

3. Cursor is in MACS configuration of Resources tab.


The Extras menu in MACS configuration of Resources tab is shown as
Figure 3.2.2-55:

Figure 3.2.2-55 Menu "Extras" (3)

 Replace element: Replace the main module.

 Calculate addresses: Calculate the addresses automatically.

 Add configuration file: Configuration files can be added as *.eds、


*.gsd、*.cfg. This software do not need to add any configuration file.

 Standard configuration: Select this option, the dialog pops up as shown


in Figure 3.2.2-56. Click Yes to recover the default configuration, or
else configuration will not be changed.

Figure 3.2.2-56 Standard Configuration prompt

 Properties: Select whether to check the property page.

4. Cursor is in Watch-and-Recipe Manager of Resources tab


In Watch-and-Recipe Manager of Resources tab, select New watch list
in Extras menu, the Extras menu is shown as Figure 3.2.2-57:

241
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-57 Menu "Extras" (4)

 Monitoring active: Select this item," √" is shown before Activate, then
activate the watch list, the user can watch the variables in the list.

 Write Recipe: Change the variable value into set value.

 Read Recipe: Read the current value of the variable.

 Rename Watch List: Change the name of watch list.

 Save Watch List: Save the watch list as *.wtc.

 Load Watch List: Reload the saved watch list with .wtc as its extension.

3.2.2.6 Online

Menu Online offers operation commands for the project online running and
simulation, as online, run, simulation and other command items. As shown in
Figure 3.2.2-58:

Figure 3.2.2-58 Menu "Online"

1. Login

242
SECTION 3 Control Station Algorithm Configuration

Shortcut button:
Shortcut key: <Alt>+<F8>
Combine programming system with controller, with this command, the files
related to the project are downloaded to the controller, the system turns
into online debugging state.
2. Logout

Shortcut button: 。
Shortcut key: <Ctrl>+<F8>>
With this command, user can logout the debug state and switch to
program edit state.
3. Run
Shortcut key: <F5>
Start the program to enter running state. Select Online->Login command,
or select this command after Stop in online state can enter running state.
4. Write Values
Shortcut key: <Ctrl>+<F7>
With this command, user can change the value of the variable when
debugging. Double click the variable in the running program, a dialog pops
up as shown in Figure 3.2.2-59:

Figure 3.2.2-59 Dialog Box of Write Value

Old Value displays the current value, input the new value in New Value,
click OK to confirm, and then select Online->Write Values to change the
variable value.
5. Force Values
Shortcut key: <F7>
This command can also set variable value when debugging. At the end of
a cycle, the forced variables are written with a fixed value until executing
Release Force command. The operation of force value is basically
similar as the write value, the difference is that force to click OK to confirm
input, then select Online->Force Values to finish, the forced variable is
displayed in red font . Double click the forced variable to release

243
SECTION 3 Control Station Algorithm Configuration

this force value, a dialog pops up as shown in Figure 3.2.2-60 , select


Release force for this variable, click OK to release the force.

Figure 3.2.2-60 Dialog Box "Release Force"

6. Release Force (A)


Shortcut key: <Shift>+<F7>
Select Online->Release force to finish the force command of variable.
7. Write/Force-Dialog
Shortcut key: <Ctrl>+<Shift>+<F7>
Enable to write new values into multiple variables, or write into the
controller at the same. For Write/Force Values, the value can be written
only once, and can be assigned by other program immediately. With
Online/force value, the value is written into force value at the end of a
cycle until Release force.
After selecting this command, a dialog pops up as shown in Figure
3.2.2-61, the Forcelist lists all the current force tags, user can
centralized processing each forcing tag in this window.

244
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-61 Value of Forced Tag

8. Simulation Mode
If simulation mode is chosen, then the check symbol "√" will appear in
front of the menu item. In simulation mode, user program runs on the local
PC with operating system. This mode is used to test the project. If it is not
in simulation mode, the program will run on the controller.
9. Create boot project
In the case of debugging with controller, with this command user can
download the boot project and symbol table to the project path of local PC.
10. Write file to PLC
In cases of debugging with controller, with this command user can write
the files related to project to controller.
11. Read file from PLC
In cases of debugging with controller, with this command user can read
back the files related to project from controller.
3.2.2.7 Window

The Window menu offers commands to set the layout pattern of the windows
in working space, offers commands to open library manager, log and
information window, and switch displays the opened window, as shown in
Figure 3.2.2-62, the specific functions are introduced in the following.
245
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-62 Menu “Window”

1. Tile Vertical
With this command user can arrange all the windows vertically display in
working space without overlap and filling in entire working space.
2. Tile Horizontal
With this command user can arrange all the windows horizontally display
in the working space without overlap and filling in entire working space.
3. Cascade
With this command user can arrange all the windows cascading as one
behind another, staggers successively.
4. Arrange Symbols
With this command user can arrange all the minimized windows in a row
in the lower end of the working space.
5. Close All
With this command user can close all the opened windows.
6. Messages
With this command user can open/close the message window. Select
Message, a check symbol appears in front of the command, then the
message window is open, select the Message again, the check symbol
disappears, the message window is closed.
7. Library Manager
With this command user can open the library manager window, add
/delete library to/from the library list in the top left corner. Select
Window-> Library Manager, and open the window as shown in Figure
3.2.2-63:

246
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-63 Window of Library Manager

There are four parts in this window:

 Library file list: All the library file that the project currently used are
in the top left corner of the window, user can select one of the
library names to visualization the contents of the library;

 Function block and function list: All the function blocks and function
list included in the selected library are displayed in the bottom left
corner of the window, user can select one function block to
visualize its pin description and graphic symbol in the right window;

 Function definition: All the function definitions as input, output,


internal items and descriptions are displayed in the top right part of
the window;

 Graphic symbol: The graphic symbol of the functions that is viewed


currently will be displayed in the bottom right part of the window.

If user needs to add new library, please right click in the top left part of the
window, and a dialog pops up as shown in Figure 3.2.2-64:

247
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-64 Add Library

User can view property or do delete operation to the selected library,


select Add library, find the path of the new library from the Open window,
click OK to finish adding of the new library.
8. Log
The Log dialog pops up as shown in Figure 3.2.2-65, it records the online
operation information of the program:

248
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.2-65 Window "Log"

The name of opened edit window in the current workspace is displayed at


the bottom of the dropdown menu of the window. Click the window name,
and user can switch the window to active. A check symbol will appear
in front of the current active window name.
Notice to record the log information, and remember to set the saving path
in log option in Project->Options, and to activate the log, or else, there
will be no log record. The default state of this option is selected, it's
suggested to maintain the default setting.

Figure 3.2.2-66 Dialog Box Log " Options"


249
SECTION 3 Control Station Algorithm Configuration

3.2.2.8 Help

This menu includes 3 common help windows as contents, search and index,
select one of them to open the help window, and three tabs can be switched.

Click About menu item, the system software product trademark pops up to
display the information of software name, identification, version, copyright, etc.

3.2.3 Object Organizer


The object organizer manage the objects in project on the basis of the different
category of the objects, the objects are divided into several categories in
algorithm project:

 Program : Programming units in project which is to edit and manage


the Program Organization Unit, POU is consist of program, function
block and function, please see specific differences introduction in "3.5
POU ".

 Data type : Edit and manage the custom data type in project which is
divided as structure and ENUM.

 Visualization : Edit and manage the visualization object in project.

 Resource : Edit and manage the objects as global variables,


hardware configuration, Target Settings, project option and task
configuration in project.

User can see detailed explanation of concept and operation in the online help
of this software.

The four parts above are corresponding with the four tabs of the object
organizer, click each tab to switch among the four managers, each manager
manages the object resources by tree diagram, as shown in Figure 3.2.3-1:

250
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-1 POU Tree Diagram

In the following, there is a brief introduction about how to create a new project
by using each object.

3.2.3.1 Program Organize Unit (POUs)

1. Create project
Select POUs tab in the object organizer, open the POUs management
window to write program, the steps are as following:

Step 1. Start controller algorithm software

Click File->New, the Target Settings window pops up as shown in Figure


3.2.3-2:

251
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-2 Target Settings - Target Platform

Select the controller type, select Hollysys CoDeSys SP for HOLLiAS


MACS in the dropdown menu of Controller type, there are five tabs in the
window as controller platform, storage configuration, common parameter,
network variables, visualization. These are default configuration
information of the project and can not be changed.
For example, click General tab to visualize its setting, the project
Download symbol file, Initialize inputs have been selected and can not
be changed.

Figure 3.2.3-3 Target Settings - General

252
SECTION 3 Control Station Algorithm Configuration

Select Target Settings, and click OK to close this window. If user wants to
view this window again or change the controller type, user can open
Resource tab, double click Target Settings object to open this window.

Step 2. Each controller algorithm project should setup a main program

After operation above, the dialog box pops up as shown in Figure 3.2.3-4,
user can create a new main program with the default name
"MACS_PRG".

Figure 3.2.3-4 New Main Program

POU type is "Program", usually select "ST" as program language. Click


OK to generate the main program MACS_PRG(PRG), as shown in Figure
3.2.3-5:

253
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-5 Create Main Program MACS_PRG

The default program name is (Untitled)*, user can change the file name by
saving it.

• MACS_PRG is a special predefine POU. Each program must include this


program. Each control cycle calls the POU once. Therefore, the created
subprograms should be added in this program, so they can be called by
MACS_PRG.

Step 3. Add subprogram

Right click the root node-POUs of the program manager. The menu pops
up is shown as Figure 3.2.3-6:

254
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-6 Popup Menu

Select Add command (with the same operation as Project->


Object->Add), a dialog pops up as shown in Figure 3.2.3-7:

Figure 3.2.3-7 Create POU

Type POU name in the Name of the new POU, select type of POU and
language of the POU, and click OK to finish the operation. There will be a
program branch added below the root node of the POUs manager window,
as shown in Figure 3.2.3-8:

255
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-8 POUs Tree

2. Command operation
Right click the mouse in each node of the program manager, the items in
the right click menu will be displayed as enabled or disabled according to
the selected object type, black is enabled and gray is disabled. User can
add, delete, change or group the POU by the right click menu, as shown in
Figure 3.2.3-6, the operation of add, delete, copy, rename and convert
should reference the corresponding commands in Project->Object, which
have the same operation.
The common used right click menus are introduced in the following:

256
SECTION 3 Control Station Algorithm Configuration

 Edit: Execute this command on POU sub node or double click POU
name, user can open POU edit window in working space;

 New folder: Create new folders below the root node, the default name
is "New Folder+number", the first created folder name is "New Folder".
The folder is available to do sort management on the POU below root
node, select POU sub node and drag the left mouse button to move it
in the target folder in program manage window, then release the
mouse and the sun node is in the folder. Or, user can right click the
folder to add POU node in another way.

 Property: Configure access property for POU, user can set access
rights of group 0-7 as shown in Figure 3.2.3-9:

Figure 3.2.3-9 POU Properties

 No access: There is an identification"<X>" at the back of the object


name, when the user click POU name or use Edit in right click
menu, the system prompt dialog pops up as shown in Figure
3.2.3-10:

Figure 3.2.3-10 POU Property-No Access Right

257
SECTION 3 Control Station Algorithm Configuration

 Read-only access: There is an identification"<R>" at the back of


the object name, user can only view the contents in POU edit
window, but can not call right click menu in the edit window, so that
the object is can not be edited.

 Full access: Can edit and change the POU object.

 Unfold/fold node: Unfold/fold the folder node.

 No participate in compiling: Set the selected POU to participate in


compiling or not. The default setting is to participate in compiling, the
color of POU is black; POU turns to green after selecting not
participate in compiling.

Other commands in the right click menu will not be introduced here,
please view the menu bar description or the POU using description
subsequently.
3.2.3.2 Data Type

As standard data type, user can define own data type and define structure,
ENUM, reference and sub-range in data type manager.

Take structure for example, the specific operations of adding a structure is


named StructExample are as following:

Open data type manager

Click Data types in object organizer, and open the data types manager
window as shown in Figure 3.2.3-11

258
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-11 Add Custom Data Types

The current operation tips are shown in the status bar of Conmaker. Right
click the Data types root node in the current manager window (this
manager is also displayed as tree diagram), select the Add Object
command in right click menu.
Name data type

After selecting Add Object command, the dialog New data type pops up
as shown in Figure 3.2.3-12:

Figure 3.2.3-12 Name Data Type

Type in the name of new data type in New data type box, take"
StructExample" for example, click OK, then the sub node " StructExample"
is added below the Data types root node in data type manage window,
and open the edit window of this data type in the working space, as shown
in Figure 3.2.3-13:

259
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-13 Type-Structure of Data

Edit data type

In StructExample edit window, it is added as structure type, and the


declaration key words of the structure are added, here it is need to add
structure member between "STRUCT" and "END_STRUCT" as shown in
Figure 3.2.3-14.

Figure 3.2.3-14 Type-Structure Member of Data

Call custom data type

260
SECTION 3 Control Station Algorithm Configuration

The StructExample structure can be referenced in program after compiling,


as shown in Figure 3.2.3-15:

Figure 3.2.3-15 Custom Data Type Reference

The definition of custom structure and using of its members are displayed
in the figure, type in structure case name in programming area, all the
members of the structure are displayed after inputting member symbol ".",
user can select the members of this structure by mouse or the up and
down key of keyboard.
The custom data type in data type manager can also be ENUM, reference
or sub-range, different types corresponds with different grammar key word,
and please see detailed contents in "3.3.1 Data".
The defined custom data types can be recognized in the whole project,
they can be used as standard data type. Please notice that the names of
them should be different, type name offered by the system.
3.2.3.3 Visualizations

The controller algorithm offers visualization to display project variables. User


can plot geometry components off-line with visualization. The forms of
geometry components can be changed according to the specific variable
value.

3.2.3.4 Resources

The resource manager is in charge of global variables definition, hardware


configuration, Target Settings and task configuration. Among the Target
Settings which has been referred in 3.2.3.1 Program Organize Unit (POUs will
not be introduced here.

261
SECTION 3 Control Station Algorithm Configuration

 Global variables: Variables can used in the whole project;

 Hardware configuration: Configure the hardware structure, which has


been configured in Device Configuration and generated in control
station algorithm after compiling in System Configuration, so here it
is not need to be added manually.

 Sample track: Used for the graphical display of variables;

 Task configuration: Need to define task name, priority and trigger


condition. User can appoint the start program of the task to boot the
program to finish the task.

 Tools: Parameter tools contain parameter readback and wite.

1. How to create task:


Open Resource manager in object organizer, double click Task
configuration node, open task configuration window in working space, as
shown in Figure 3.2.3-16:

Figure 3.2.3-16 Task Configuration Window

Right click on node, select Append Task in the popup


menu, as shown in Figure 3.2.3-17:

262
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-17 Task Configuration Append Window

Add task "New Task" in the left task list, the Taskattributes window is
displayed as a task tree on the right as shown in Figure 3.2.3-18:

Figure 3.2.3-18 Create Task

263
SECTION 3 Control Station Algorithm Configuration

 Name (N): The default task name is NewTask. Select task name and
click mouse, the edit control box appears, then the user can rename
the task, it is suggested to changed it as " MACSTask +Station No."

 Priority(0…31): The task priority is represented as number 0~31, 0


represents the highest priority and 31 represents the lowest one, the
default priority is 1;

 Type: There are 3 task types:

 Running periodically: The task takes a looping execution on the


programs and it is following the time interval set in the property box,
its task icon is .

 Run with full speed (run as fast as possible): The task starts to
execute as soon as the program starts. Once the task is completed,
it will take looping execution immediately, there is no need of loop
interval. Its icon is .

 Run as triggered by events: The task is triggered to run by the


rising edge of the defined variable. Its icon is .

 Run as triggered by external time: The task starts to run as soon


as the system event occurs. The events are supported by task and
offered by select list. This item is disabled.

 Interval: The running cycle of the program, its format is in line with the
time variable format, the default format is T#250ms.

 Watchdog: Each task is assigned a time control arrangement, it is


watchdog. The task will be interrupted if the task execution time is
beyond the defined time.

 Active watchdog: Select this item, the function of watchdog is


available.

 Time: Watchdog time, the task will be interrupted if the task


execution time is beyond this setting time.

 Sensitivity: It does not generate errors and can receive the times of
watchdog timeout error occurs.

Add the program name to be called after defining the task property. Right
click mouse on task, the menu is shown as Figure 3.2.3-19 , select
Append Program Call, then add MACS_PRG() to this task.

264
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-19 Add Program to Task

As shown in the right click menu, user can do common operation as cut,
copy, paste, delete and other operations as following:
 Insert task: Select one task name in the task tree, right click mouse,
select Insert Task in right click menu, then a new task is inserted in the
currently selected task;

 Enable task: Select one task name in the task tree, right click mouse,
select Enable/disable task in right click menu to switch the task active
or not. The enabled task is gray, or else, it's black.

For example: the Figure 3.2.3-20 shows a task with name is MACSTask,
priority is 1, cycle interval is 50 ms,it's enabled and user can call
MACS_PRG through this task.

265
SECTION 3 Control Station Algorithm Configuration

Figure 3.2.3-20 Task Configuration

• For a project, user can configure multiple tasks as need. But it is


suggested to define one task and call the main program MACS_PRG by
this task, and the other programs are called by main program.

• The time interval property is available when the task type is running
periodically. Input the numbers of time format, as T#50ms, the cycle value
is set here should be integral multiple of 50, e.g. T#250ms. Please see
related contents in 3.5.4.1Trigger POU.

2. Tools:Parameter tools
Conmaker parameter tools contain Param Readback and Parameter Write.
Param Readback is to read the online changed parameter online to offline
status in controller.This tool only helps to readback parameter to offline
project at present. Parameter Write.is to download the offline changed
parameter of database control center to controller online without clearing
Refer to “3.8 Parameter” for details.

266
SECTION 3 Control Station Algorithm Configuration

3.3 Data and Operand


The operate object of control and operation is data. The data are from two
sources, one is the physical parameters (switch, key, temperature, pressure,
flow, length and speed, etc.) from production process and the equipment, the
other is the result of programming and the parameter which is set manually.
The data can be divided into two kinds according to whether it is variable, one
is variable which is called variable, and it has the variable name; the other is
invariable which is called constant, and it has constant name.

3.3.1 Data
Data is the operation object of control and operation in industrial system, and it
is stored in memory of CPU module. The data must be defined before be used,
and the definition of data includes two parts: data name and data type, the
common used data types are introduced here.

The data types (or variable type) supported by this software which are divided
as standard data type and custom data type, they are shown as follows:

3.3.1.1 Standard Data Type

This software supports all the data types in IEC1131-3 standard:

 BOOL

 Integer

 REAL/LREAL

 String

 Date

1. BOOL
BOOL type data is logic value which occupies 8 bits in memory. Its value is
"0"or"1", "TRUE" or "FALSE".
2. Integer
The data type of Integer is divided as BYTE, WORD, DWORD, SINT,
USINT, INT, UINT, DINTand UDINT. The feature of integer is that it has no
decimal place. The data range is shown in Table 3.3.1.1:
Table 3.3.1.1 Data Range and Storage Space of Integer Data

267
SECTION 3 Control Station Algorithm Configuration

Type Lower limit Upper limit Storage space


BYTE 0 255 8 Bit

WORD 0 65535 16 Bit

DWORD 0 4294967295 32Bit

SINT -128 127 8 Bit

USINT 0 255 8 Bit

INT -32768 32767 16 Bit

UINT 0 65535 16 Bit

DINT -2147483648 2147483647 32 Bit

UDINT 0 4294967295 32 Bit

• There will be information lost when the data is conversed from the larger
range type to smaller range type.

3. REAL
REAL type data is also called float data, its feature is that it has decimal
place and can be expressed as integer, decimal or exponential format.
REAL type data is divided as REAL and LREAL (long real).
The data of REAL occupies 32 bit storage space, its value range in
negative is -3.4028235E+38 to -1.401298E-45 and it is in positive
is1.401298E-45 to 3.4028235E+38 in positive.
The data of LREAL occupies 64 bit storage space, its value range in

268
SECTION 3 Control Station Algorithm Configuration

negative is -1.79769313486231570E+308 to
-4.94065645841246544E-324, it is 4.94065645841246544E-324 to
1.79769313486231570E+308 in positive.
e.g. R1:LREAL:=23.34、R2:REAL:=1.64e+009.

• There will be 1#INF1 and #QNAN0 appears in the operation involves


REAL data, its meanings are:

• 1#INF means infinity number, there is positive infinity and negative infinity,.
It is get from 0 divides the limited number except 0, or exceed the upper or
lower limit of REAL data. There is no error when 0 divides a REAL number.

• 1#QNAN0 means not a number . It is caused by meaningless operations.

• 1#IND means data overflow.

• Invalid means invalid data.

4. String
A string can include a sequence of characters. The value in the round
brackets is the defined character number. The default length is 80
characters if there is no assigned storage space.
This software does not force the string length, but the string function can
only handle the strings whose length is between 1 and 255.
For example: declare a string with length is 35:
str:STRING(35):='This is a String';
5. DATE
The DATE data type is helps to define time(TIME), time of the day (TOD),
date(DATE), and date time(DT).
 Time(TIME)

The identifier of time data is TIME, it is used to define operation time.


There are four formats to define the time: TIME# , time#, T# , t#, the time
data are behind the format character #, and hour, minute, second and
millisecond is given in order. As shown in TimeVar1 in Figure 3.3.1-1.
For example: correct definition
TIME1 := T#14ms;

TIME1 := T#100S12ms; (*The highest component may be allowed


269
SECTION 3 Control Station Algorithm Configuration

to exceed its limit*)

TIME1 := t#13d12h34m15s;

Incorrect definition:
TIME1 := t#5m68s; (*limit exceeded in a lower component*)

TIME1 := 15ms; (*T# is missing*)

TIME1 := t#4ms13d; (*incorrect order of entries*)

• The highest component may be allowed to exceed its limit, but the lower
one can not exceed its limit.

 Date(DATE)

The identifier of date data is DATE, it is used to store dates. There are four
formats to define the date: D# , d# , DATE# , date# , the date data is
behind the format character #, and year, month, day are given in order. As
shown in TimeVar2 in Figure 3.3.1-1.
 Date time(DT)

The identifier of date time data is DT, it is used to store date and time.
There are four formats to define the date time: DT#, dt#,
DATE_AND_TIME#, date_and_time#, the date and time data is behind
the format character #, and year, month, day ,hour, minute, second are
given in order. As shown in TimeVar3 in Figure 3.3.1-1.
 Time of day(TOD)

The identifier of time of day data is TOD, it is used to store time of day.
There are four formats to define the date time: TOD#, tod#,
TIME_OF_DAY#, time_of_day#, the time of day data is behind the
format character #, and hour, minute, second are given in order, among
which the second is REAL, so it has decimal number. As shown in
TimeVar4 in Figure 3.3.1-1.

• Define the second in time of day is REAL, so it has decimal number.

270
SECTION 3 Control Station Algorithm Configuration

Figure 3.3.1-1 Date

3.3.1.2 Custom Data Type

Besides standard data types, user can define data types as need:

 Array

 Structure

 ENUM

 reference

 sub-range

 pointer

The data type structure, ENUM, reference and sub-range must be defined in
Date type manager, and used in variable definition area in programming area.
The grammar, declaration, access and notes are briefly introduced in the
following.

1. Array
One-dimension, two- dimension and three- dimension array are basic data
type. User can define arrays in declaration area or in global table in
program.
 Grammar:

<array name>:ARRAY [<Ll1>..<ul1>,< ll2>..<ul2>] OF <basic data type>


Among which, Ll1, ll2 indicates the minimum value of the field range;
ul1,ul2 indicates the maximum value. The range must be an integer.
 For example:

Card_game: ARRAY [1..13, 1..4] OF INT;


 Init array:

 Examples of full initialization of the array

271
SECTION 3 Control Station Algorithm Configuration

arr1 : ARRAY [1..5] OF INT := ,2,3,4,5];

arr2 : ARRAY [1..2,3..4] OF INT := 1,3(7);(* is abbreviation of 1,7,7,7 *)

arr3 : ARRAY [1..2,2..3,3..4] OF INT := 2(0),4(4),2,3;(* is abbreviation


of 0,0,4,4,4,4,2,3 *)

 Examples of full initialization of the structure array:

Structure definition:

TYPE STRUCT1

STRUCT

p1:int;

p2:int;

p3:dword;

END_STRUCT

END_TYPE

Array initialization:

ARRAY[1..3] OF STRUCT1:=
[(p1:=1,p2:=10,p3:=4723),(p1:=2,p2:=0,p3:=299),
(p1:=14,p2:=5,p3:=112)];

 Examples of partly initialization of the array:

arr1 : ARRAY [1..10] OF INT := 1,2;

 Check array bounds:

Use implicit function CheckBouds to check if the array bounds are over
limits.

 Examples:

In the following program, the array "a" exceeds its upper limit.
PROGRAM PLC_PRG
VAR

272
SECTION 3 Control Station Algorithm Configuration

a: ARRAY[0..7] OF BOOL;
b: INT:=10;
END_VAR
a[b]:=TRUE;
In the above program, the implicit called CheckBounds function changes
the index from 10 to upper limit value 7, then TRUE is assigned to array
component a[7]. This is the process of CheckBounds to correct the access
which exceeds the limits.
2. Structure
Structure is a dataset which is consists of a series of data of same type or
different type.
 Grammar:

TYPE <structure name>:


STRUCT
<variable declaration 1>..
< variable declaration n>
END_STRUCT
END_TYPE
 Examples:

TYPE Polygonline:

STRUCT

Start:ARRAY [1..2] OF INT;

Point1:ARRAY [1..2] OF INT;

Point2:ARRAY [1..2] OF INT;

End:ARRAY [1..2] OF INT;

END_STRUCT

END_TYPE

 Structure initialization examples:

Poly_1:polygonline:=(Start:=3,3,Point1:=5,2,Point2:=7,3, End := 3,5);

273
SECTION 3 Control Station Algorithm Configuration

Notice that the variable can not be used to init a structure, the structure
must be initialized with a specific value.

 Access structure member:

<Structure name>.<Structure member name>


For example: Poly_1.Start means to access the member "Start" of
structure Poly_1.
3. Enumeration:
Enumeration is user-defined data type which is consist of several string
constants, these constants are called enumeration value.
 Grammar:

TYPE < enumeration name>:(<Enum_0> ,<Enum_1>, ...,<Enum_n>);

END_TYPE

"Enum_*" means enum item values, these values can be numerical,


character, also the values can be assigned to each ENUM item, if that is
not an appointed initial value, the items are assigned default from 0, and
increases in sequence. The program will helps to check the validity of the
values when running.
 Examples:

TYPE TRAFFIC_SIGNAL: (Red, Yellow, Green:=10); (*The initial value of


each items are: red 0, yellow 1,green 10 *)
END_TYPE
TRAFFIC_SIGNAL1 : TRAFFIC_SIGNAL;
TRAFFIC_SIGNAL1:=0; (* The value of the traffic signal is red*)
FOR i:= Red TO Green DO
i := i + 1;
END_FOR;
4. Reference:
Reference is used to define a new reference data type,which is used to
create variables.
 Grammar:

TYPE <reference name>: <Assignment term>;


END_TYPE

274
SECTION 3 Control Station Algorithm Configuration

 Examples:

TYPE message:STRING[50];
END_TYPE;
Var1:message;
Var1:='This is a String';
5. Sub-range
Reference is used to define a new reference data type, and it can reset
the data range of the basic data type so as to create variables. User can
define it in Data type manager, or define it in variable declaration.
 Grammar:

TYPE <sub-range name> : <Int type> (<ug>..<og>)


END_TYPE;
<Inttype> is a data type which is one of SINT, USINT, INT, UINT, DINT,
UDINT, BYTE, WORD, DWORD (LINT, ULINT, LWORD). <ug> and
<og>are constants, which are accord with basic data type. <ug>set the
lower limit of range, and <og> should be set the higher limit of range.
 Examples:

TYPE
SubInt : INT (-4095..4095);
END_TYPE
Or use variable declaration directly:
VAR
i : INT (-4095..4095);
ui : UINT (0..10000);
END_VAR
6. Pointer
The pointer is used to store addresses of variable, program, function block
and function when program is running. The pointer can point to data type,
function block or user-defined data type.
Address operator ADR is used to assign address of variable or function
block to pointer. Add "^" operator behind the pointer identifier can get the
contents of the address which be pointed by the pointer.

275
SECTION 3 Control Station Algorithm Configuration

 Grammar:

<pointer identification>: POINTER TO <data type/function block>;

 Examples:

pt:POINTER TO INT; (* declare a pointer pt *)


var_int1:INT := 5; (* declare variable var_int1and var_int2 *)
var_int2:INT;
pt := ADR(var_int1); (*assign address of var_int1 to pointer pt *)
var_int2:= pt^; (*By getting the contents at address of pt, assign var_int1's
value 5 to var_int2 *)
The defined custom data type can be identified in the whole project, which can
be used as standard data type. Notice not to define its name the same as
system data type name.

3.3.2 Operand
The working process of PC is the execution process of PC program, and PC
program is a series of instructions which are arranged in a certain order. An
instruction includes operation code and operand. Operation code is usually
called operator, it will be introduced in the following section. In this section, the
operand is introduced which is divided into constant and variable.

3.3.2.1 Constant

1. Constant types:
Divided by data type, the constants has BOOL constant, TIME constant,
DATE constant, TIME_Of_DAY constant, DATE and TIME constant,
number constant, REAL/LREAL constant, STRING constant.
 BOOL constant

Logical values is TRUE or FALSE

 TIME constant

TIME constants are generally used to operate the timer in the standard
library. A TIME constant is always made up of an initial "t" or "T" and a
symbol "#". The actual declaration of time includes day("d"), hour("h"),
minute("m"), second("s") and millisecond("ms"). Please notice that the
correct order is d,h,s,m,ms.

Correct TIME constant assignment in ST language:

276
SECTION 3 Control Station Algorithm Configuration

TIME1 := T#14ms;

TIME1 := T#100S12ms; (*The highest


component may be
allowed to exceed
its limit *)

TIME1:= t#12h34m15s;

The followings are incorrect:


TIME1:= t#5m68s; (*The lower component is not
allowed to exceed its limit *)

TIME1:=15ms; (*T# is missing *)

TIME1 :=t#4ms13d; (*incorrect order*)

 DATE constant

A DATE constant is declared beginning with "d","D","DATE" or "date"


followed by "#". User can input any date with format Year-Month-Day.

Example:

DATE#1996-05-06

d#1972-03-29

 TIME_OF_DAY constant

A TIME_OF_DAY declaration begins with " tod#"," TOD#", "


TIME_OF_DAY#",or " time_of_day#" which is followed by a time with
the format: Hour: Minute:Second. User can input seconds as real
numbers.

Example:

TIME_OF_DAY#15:36:30.123

tod#00:00:00

DATE_AND_TIME constant
DATE_AND_TIME constants begin with " dt#", " DT#", "
DATE_AND_TIME# " or " date_and_time# " followed by date and time.
277
SECTION 3 Control Station Algorithm Configuration

Example:

DATE_AND_TIME#1996-05-06-15:36:30

dt#1972-03-29-00:00:00

 Number constant

Number values can appear as binary numbers, octal numbers, decimal


numbers and hexadecimal numbers. If an integer value is not a
decimal number, user can write symbol "#" in front of the integer
constant. The values of the numbers 10-15 in hexadecimal numbers
will be represented as A-F.

Example:

14 (decimal number)

2#1001_0011 (binary number)

8#67 (octal number)

16#A (hexadecimal number)

The data type of the variables can be BYTE、WORD、DWORD、SINT、


USINT、INT、UINT、DINT、UDINT、REAL or LREAL。

Conversions from "larger" to "smaller" data type are not permitted, this
means that a DINT variable can not simply be used as an INT variable.
User must use type conversion.

 REAL/LREAL constant

REAL and LREAL can be used as decimal fraction and represented


exponentially. The length of REAL is 32 bits, and LREAL is 64 bits.

Example:

7.4 instead of 7,4

1.64e+009 instead of 1,64e+009

 STRING constant

STRING constants are begin and finished by single quotation marks.


User may also enter blank space and special character which will be
278
SECTION 3 Control Station Algorithm Configuration

treated just like all other characters.

With character, the combination of the symbol " $" followed by two
hexadecimal numbers is interpreted as a hexadecimal representation
of the eight bit character code.

In addition, the combination of two characters that begin with "$" are
interpreted as shown in the following when they appear in a character
sequence.

Characters Description
$$ $ character

Single quotation
$'
mark

$L or $l Line input

$N or $n New line

$P or $p Page input

$R or $r Line feed

$T or $t Tab

2. Constant type declaration


IEC constants is the least possibility data type will be used. If another
data type must be used, this can be achieved with the help of constant
type declaration without the necessity of declaring the constants. This
is written as follows:

 Grammar:

<Data type>#<constant value>


The data type can be BOOL, SINT, USINT, BYTE, INT, UINT, WORD,
DINT, UDINT, DWORD, REAL, LREAL, the type must be written in
uppercase letters.

279
SECTION 3 Control Station Algorithm Configuration

The constant value must fit with the appointed data type.

 Example:

var1:=DINT#34;

If there is data loss in constant conversion, an error message is


generated; Constant type declaration can be used wherever normal
constant can be used.

3.3.2.2 Variable

The main object of control operation is data, and the values of data vary with
real-time, these data are called variable. Or rather, variables are the
identifications stored data units in PC. The name and data type of the variables
which are used in control algorithm configuration should be definite in advance,
so user must define the variables. This definition course is called variable
declaration.

1. Name variables
Data is the object of control and operation, the variable data is called
variable which is stored in memory in CPU module. Each variable should
have a name called variable name for user to call and identify these
variables during data calculation.
This section is mainly introduces the variable type, declaration format,
declaration rule, declaration of local variables and declaration of global
variables.
 Variable naming convention

 Use combination of letters, numbers and underlines, begin with


letters or underlines without numbers;

 Do not use blank space, Chinese characters or other special


characters, neither the symbol'-';

 Do not use the reserved word of the system;

 The length should be as short as possible( within 12 combination


of letters and numbers);

 Do not have the duplication of name.

2. Classify variable
The variables are classified on the basis of six points as follows:

280
SECTION 3 Control Station Algorithm Configuration

 According to variable name;

 According to variable data type;

 According to variable structure: simple variables and function block


instance;

 According to variable valid range (use range): global variables and


local variables;

 According to variable properties: intermediate variables, input


variables, output variables, input and output variables, global
variables;

 According to power fall safeguard: reserved variables and


non-reserved variables.

3. Variable data type


Each variable has a definite data type. The software supports multiple
data type storage.
The common used data types are: bool(BOOL), integer(INT,BYTE,WORD,
etc.),real(REAL,LREAL), string (STRING),time(TIME)…
Other data types are: date and time, time and date, date, custom
one-dimension array, two-dimension array and three-dimension array,
pointer, enumeration, structure, etc.
This section is mainly introduces how to classify the variables according to
the data types, the concept and usage of these data types.
BOOL variable

The logical value of BOOL variable is TRUE or FALSE, it takes 8 bits


storage space.
Integer variable

BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT and UDINT, all the
above data types are integer type, their range are different as shown in Table
3.3.2.1:

Table 3.3.2.1 Data range and Storage Space of Integer Data

Type Lower limit Upper limit Storage space


BYTE 0 255 8 Bit

281
SECTION 3 Control Station Algorithm Configuration

WORD 0 65535 16 Bit

DWORD 0 4294967295 32Bit

SINT -128 127 8 Bit

USINT 0 255 8 Bit

INT -32767 32767 16 Bit

UINT 0 65535 16 Bit

DINT -2147483647 2147483647 32 Bit

UDINT 0 4294967295 32 Bit

• There will be information lost when the data is conversed from the larger
range type to smaller range type.

TIME variable

It is allowed to declare time in control algorithm software, they are generally


used to operate time in the standard library. Its format is : " t#", "T#", " TIME#",
" time#" followed by time declaration which include dates, hours, minutes,
seconds and milliseconds. Please notice that the correct order is
Date-Hour-Minute-Second-Millisecond.

For example: correct definition

TIME1 := T#14ms;

TIME1 := T#100S12ms; (*The highest component may be allowed to


exceed its limit *)

TIME1 := t#13d12h34m15s;

282
SECTION 3 Control Station Algorithm Configuration

Incorrect definition:

TIME1 := t#5m68s; (*limit exceeded in a lower component *)

TIME1 := 15ms; (*T# is missing*)

TIME1 := t#4ms13d; (*incorrect input order*)

TOD variable

Variables of this type can store time of day. Its declaration format is :" TOD#", "
tod#", " TIME_OF_DAY#" and " time_of_day#" followed by time of day, its
format is Hour: Minute: Second. User can input seconds as real number or with
fractions.

For example:TIME_OF_DAY#15:36:30.123

tod#00:00:00

DT variable

The DATE variable and TOD variable can combined into date+time_of_day
variable, which is called " DATE_ AND_TIME ".Its declaration format is " DT#",
" dt#"," DATE_AND_TIME#", " date_and_time#" followed by time+
time_of_day with format: Year -Month -Day - Hour: Minute: Second.

For example:

DATE_AND_TIME#1996-05-06-15:36:30

dt#1972-03-29-00:00:00

REAL, LREAL variable

The variable type of REAL, LREAL can be used for decimal data including
decimal fraction and represented exponentially. REAL represents
single-precision floating number, LREAL represents double-precision floating
number.

For example: R1:LREAL:=23.34

R2:REAL:=1.64e+009

STRING variable

A string can include a sequence of characters. The value in the round brackets

283
SECTION 3 Control Station Algorithm Configuration

is the defined character number. The default length is 80 characters if there is


no assigned storage space size.

For example: declare a string with length is 35:

STR1:STRING(35):=’This is a string’

Definition of array

One-dimension, two- dimension and three- dimension array are basic data
type. User can define arrays in declaration area or the global table in program.

Grammar:<array name>:ARRAY [<ll1>..<ul1>,<ll2>..<ul2>] OF <data type>.

ll1,ll2,ll3 indicates the minimum value;ul1,ul2 and ul3 indicates the maximum
value. The range must be an integer.

For example: Card_game: ARRAY [1..13, 1..4] OF INT;

 Init array

User can init all the components of an array or not init it.

For example: arr1 : ARRAY [1..5] OF INT := 1,2,3,4,5;

arr2:ARRAY [1..2,3..4] OF INT:= 1,3(7);(*is 1,7,7,7 *)

arr3:ARRAY [1..2,2..3,3..4] OF INT:= 2(0),4(4),2,3;(* is 0,0,4,4,4,4,2,3 *)

 Access components of two-dimension array

<Field_Name>[ Index1,Index2]

Figure 3.3.2-1 Array Definition

Application example: Define a three-dimension array in variable


284
SECTION 3 Control Station Algorithm Configuration

definition area of the program: ARR1; assign the array value to A1 in


the program. As shown in Figure 3.3.2-1.

When program is running, user can see as shown in Figure 3.3.2-2:

Figure 3.3.2-2 Example

4. Structure type of variable


Divided from structure, there are simple variable and function block
instance.
Simple variable

Simple variable means single variation. It can be assigned a definite


value.
Declaration format of simple variable: name: data type:=constant;
(*point description*)

For example:
AM01:REAL:=50.0; (*analog variable 01*)

DM01:BOOL:=FALSE; or DM01:BOOL:=TRUE; (*switch variable 01*)

AM02:INT:=2; (*integer variable 02*)

NAME01:STRING:=’TASK10’; (*STRING variable 01*)

T01:TIME:=T#1s500ms; (*TIME variable 01*)

The above is the full format of variable declaration. If the initialization


value of variable is not needed, user can take out the initialization
part":=constant". That is: simple variable name: data type; (*point
description *)
285
SECTION 3 Control Station Algorithm Configuration

For example:
AM01:REAL; (*analog variable 01*)

Function block instance


The simple variable is variation. A function block instance is made up by a
series of specific variables which are determined by the function block
type of this function block. Therefore, function block instance is similar to
the conception of data structure.
Declaration format of function block instance is as following:
function block instance name: function block type:=(item name1:=constant,
item name2:= constant, … ,item name:= constant); (*function block
instance name *)
PID_LIC_1002:HSPID:=(PT:=10,TI:=30,SV:=100,KD:=5,TD:=2,DI:=0,Out
T:=100,OutB:=0,OutR:=5,DL:=10,MU:=100,MD:=0,PK:=0,OutM:=0,AD:=1
,TM:=FALSE,RM:=1,ME:=TRUE,AE:=TRUE,CE:=TRUE,MTE:=FALSE,AT
E:=FALSE,AV:=50,PVMU:=100,PVMD:=0,MC:=1,cycle:=1); (*PID
regulator of flow 1002 signal *)
The above is the full format of function block instance declaration. If the
initialization values of function block instance items are not needed, the
user can take out the initialization part. That is: function block instance
name: function block instance type; (*function block instance description *)
For example:
TIMER01:TP; (*fixed width pulse timer TIMER01*)

5. Valid range of variable


The valid ranges of the variables are distinguished according to their
definition position in controller algorithm software. The variables are
divided into two classes according to their valid range: local variable,
global variable.
Global variable
Valid range: the whole project
Definition position: resource/global variable/a certain form
Define key words: VAR_GLOBAL
END_VAR

Place variable declaration between the above keywords.


For example:
VAR_GLOBAL

286
SECTION 3 Control Station Algorithm Configuration

AM01:REAL:=50.0;

END_VAR

AM01 is a global variable.


The variable can be referenced by any program in the project, and they
are valid in the whole project and can be used in the whole project.
Local variable

Only valid in the program in which this variable is defined, other program
can not reference these variables.
Local variables are defined for the current program, and the grammar is
shown in Figure 3.3.2-3:

Figure 3.3.2-3 Program to Define Local Variables

AM1, AM2, AM3 are intermediate variables, here is a simple ADD


operation. That is to say, these three variables can only be used in "test"
program. If user wants to use them in other programs, one method is to
generate new variable with the same name in "Variable definition area",
the second one is to add these three variables to global variables.
6. Variable property
There are three variable properties:

287
SECTION 3 Control Station Algorithm Configuration

 VAR: Intermediate variable which is used to declare the key words of


intermediate variable. It is local variable, only valid in the program in
which this variable is declared;

 VAR_INPUT: Input type which is used to declare the input variable in


function block, and it is only valid in function block;

 VAR_OUTPUT: Output type which is used to declare the output


variable in function block, and it is only valid in function block;

 VAR_IN_OUT: Input and output type which is used to declare the


variable used to input and output in function block and it is only valid in
function block;

 VAR_GLOBAL: Global variable which is used to define the key words


of global variables. And it is valid in the whole program.

• Each variable can only correspond with one of the above five types.

Select one variable name, use shortcut key "Shift+F2" or Edit ->Auto
Declaration to open the Declare Variable dialog of this variable, as shown in
Figure 3.3.2-4 :

Figure 3.3.2-4 "Declare Variable" Dialog- variable Type

There are five properties in the dropdown menu of Class, user can select
the variable category, e.g. change the local variable into input variable,
and then the changed variable declaration can be added between
VAR_INPUT and END_VAR key words, as shown in Figure 3.3.2-5:

Figure 3.3.2-5 Input Variable


288
SECTION 3 Control Station Algorithm Configuration

If it is changed into global variable type, this variable will move to


Global_Variables automatically in Resources-> Global Variables, as
shown in Figure 3.3.2-6:

Figure 3.3.2-6 Global Variable

• The properties of global variables can not be changed by Declare Variable.


User can cut the variable and move it to the declaration window of the
program to change type key words.

7. Variable power-off protection


 Retain Variable

Define the important data which need power-off protection and data
backup with key word "RETAIN", these variables are called Retain
Variable
The declaration format of retain variable is:
VAR_GLOBAL RETAIN
AM01:REAL:=50.0;
END_VAR
or
VAR RETAIN
DM01:BOOL;
END_VAR
 Access Variable

"Access" is "use", the access of variable in calculation process includes:


read variable value and assign value for variable. User can access a
simple variable by this variable name.
For example: AM01:=AM02+AM03;
The above example shows: read the values of AM02 and AM03 and add
them, then assign this adding value to AM01.
The Writing format of accessing an item of function block instance is:

289
SECTION 3 Control Station Algorithm Configuration

function block name.item name.


For example: PID01.SP(read the presetting item of PID01, the premise is
the user has declared PID01 as type HSPID ).

• In controller algorithm, it is allowed to define global variable and local


variable with the same name, so if the data capacity in program permits,
it's suggested to define all the variables in global variable area in
Resource, so all the programs can call the variables.

• Note: Please ensure that the variable data types keep conformity in the
whole program! That is to say, the variables types which at the two
terminals of a signal connection must be identical!

8. Variable declaration
The variable name and data type used in control algorithm configuration
must be pre-defined, so user should define the variable first, this definition
process is called variable declaration.
Each variable can be used only after declaration (definition). As shown in
Figure 3.3.2-7, variable declaration should take the following aspects into
account: declaration position, declaration format, variable name, and
variable data type.

290
SECTION 3 Control Station Algorithm Configuration

Figure 3.3.2-7 Declare Variable

Variable declaration format:


Variable name: data type:= initial value; (* textual description*)--applied to
the declaration of points in the system;
Tag name AT %I(Q)W(X) word no. : bit no.: data type:= initial value; (*
textual description)--applied to the declaration of I/O points.

3.4 Operator
Here is a brief introduction of operators used in algorithm configuration, as IEC
operator, standard library, application library and procedure operation library,
Please see detailed descriptions of input and output terminals and their
function in <<HOLLiAS MACS V5.2.5B FCS function block manual >>.

3.4.1 IEC Operator


Controller algorithm supports all IEC operators. To contrast with the standard
functions, these operators are default in the project, user need not to add
library file. The system supports the following IEC operators, as shown in Table
3.4.1.1:

Table 3.4.1.1 IEC Operators List

291
SECTION 3 Control Station Algorithm Configuration

Category Operator Description

ADD addition

SUB subtraction

MUL multiplication

Arithmetic DIV division


operators
MOD get remainder of the division

INDEXOF index

get number of bytes of the


SIZEOF
data type

AND logical and

OR logical or
Logical
operators
XOR logical xor

NOT logical not, get negation

SHL bitwise left-shift

SHR bitwise right-shift


Bit shift
operators
ROL bitwise rotation to the left

ROR bitwise rotation to the right

SEL binary selection

MAX get the maximum one


Selection
MIN get the minimum one
operators
LIMIT limiting operation

MUX Multiple-choice operation

Comparison GT greater than

292
SECTION 3 Control Station Algorithm Configuration

Category Operator Description


operators LT less than

LE less than or equal to

GE greater than or equal to

EQ equal to

NE not equal to

Address
ADR address function
operators

Calling
CAL call function block or program
operators

conversion from BOOL to any


BOOL_TO Conversions
other type

conversion from any other


TO_BOOL Conversions
type to BOOL

Integral Number conversion from integer to


Conversions any other type
Type
conversions REAL_TO/LREAL_TO conversion from REAL or
Conversions LREAL to any other type

conversion from TIME_TO or


TIME_TO/TIME_OF_DAY
TIME_OF_DAY to any other
Conversions
type

conversion from DATE or


DATE_TO/DT_TO
DATE_AND_TIME to any
Conversions
other type

ABS return absolute value

return the square root of a


Elementary SQRT
number
numeric
operators
LN natural logarithm of a number

LOG the logarithm of a number in

293
SECTION 3 Control Station Algorithm Configuration

Category Operator Description


base 10

EXP exponential function

SIN sine function

COS cosine function

TAN tangent function

ASIN arc sine function

ACOS arc cosine function

ATAN arc tangent function

EXPT exponentiation function

3.4.2 Standard Library Standard.hlf


The Standard.hlf afforded by system includes the following operators. They are
usually used as trigger and timer as shown in Table 3.4.2.1:

Table 3.4.2.1 Standard Operators List

Category Operators Description

SR set bistable function block


Bistable
RS reset bistable function block
function block
SEMA software interrupt semaphore

CTU incrementer function block

CTD decrementer function block


Counter
incrementer / decrementer function
CTUD
block

Timer RTC the function block starts in the given

294
SECTION 3 Control Station Algorithm Configuration

Category Operators Description


time, return current date and time

TP timer

TON turn-on delay function block

TOF turn-off delay function block

R_TRIG rising edge trigger function block


Trigger
F_TRIG falling edge trigger function block

3.4.3 Application Library Util.hlf


This library includes multiple function blocks which can be used for BCD
conversion, bit/byte functions, and mathematic auxiliary functions, as controller,
signal generator, function manipulator and analog value processing. As shown
in Table 3.4.3.1:

Table 3.4.3.1 Application Library Operators List

Category Operator Description

HYSTERESIS hysteresis
Analog value
monitor
LIMITALARM limit alarm

BCD_TO_INT convert BCD into INT value


BCD
conversion
INT_TO_BCD convert INT value into BCD format

bit extract.Split a type into bits, return


EXTRACT
BOOL value

bit integration. Pack the input bits


PACK B0,B1,...B7 into a byte,is the oppisite
Bit/byte of UNPACK
function
bit split.converts the input B into 8
UNPACK
BOOL bit outputs

PUTBIT bit assignment

295
SECTION 3 Control Station Algorithm Configuration

Category Operator Description

PD proportional differential controller

proportional integration differential


PID
Regulator controller

proportional integration differential


PID_FIXCYCLE
controller

CHARCURVE characteristic curve


Function
RAMP_INT integer limit
manipulator
RAMP_REAL real limit

DERIVATIVE differential

INTEGRAL integration
Mathematical
auxiliary STATISTIC_INT INT statistics, the input is INT
function
STATISTIC_REAL REAL statistics, the input is REAL

VARIANCE variance

BLINK pulse signal generator


Signal
generator
GEN typical periodic signal generator

3.4.4 Other Libraries


Besides the above operator libraries needed by basic operation, the system
also affords abundant operators applied in procedure calculating as following.

296
SECTION 3 Control Station Algorithm Configuration

 HSsyslib.hlf affords operators to calculate system performance;

 HSDPEXT612.hlf affords operators to return DP diagnose state and


related parameters;

 IO.hlf affords operators to convert data types and return data values
and states.

 HS_CTROL.hlf, HS_ALMLIMSEC.hlf, HS_MATHLOGIC.hlf,


HS_TIMEFIELD.hlf, HS_SPECIAL.hlf affords operators for procedure
equipment control, procedure parameter and performance judge,
procedure process regulation.

Please see details in Appendix 2-function block manual.

3.5 POU Introduction


POU is the abbreviation of Program Organization Unit, which is the basic
component of Conmaker and the user programs based on POU.

POU includes Program, Function Block and Function. Among the three types,
program is the main part, it can call function block and function to construct
application program.

Each POU is consists of declaration area and program area, program area is
write in IEC4 language, the program language can be IL, LD, FBD, SFC, ST o
r CFC.

The controller algorithm supports all POUs which meet the standard, but it
needs the support from function library standard.lib.

3.5.1 New POU


Click POUs tab to open POU manager window root node, then right click this
POUs root node in the current manager window(this manager window is also
displayed as tree diagram),select Add Object in the right click menu, there is
operation tips in the status bar of Conmaker. As shown in Figure 3.5.1-1:

4
IEC:INTERNATIONAL ELECTROTECHNICAL COMMISSION.

297
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.1-1 POU Manager

After executing Add Object command, the New POU dialog pops up as shown
in Figure 3.5.1-2:

Figure 3.5.1-2 Create New POU

298
SECTION 3 Control Station Algorithm Configuration

 POU name: Input new POU name in Name of the new POU box, if the
name is invalid, OK button is disable. This button is usable only if the
name is valid.

 POU type: Select POU type in Type of POU radio button which has
program, function block and function. Please see detailed description
in "3.5.2POU instruction".

 POU language: Select programming language in Language of the


POU radio box, there are IL(Instruction List), LD(Ladder Diagram),
FBD(Function Block Diagram), SFC(Sequence Function Diagram),
ST(Structured Text), CFC(Continues Function Diagram). Please see
detailed descriptions in "3.5.3POU Language".

Click OK to finish the creation of POU, and open the edit window of this POU
in working space.

• The first created POU is named MACS_PRG automatically, the project


starts from here to access other POUs(is similar to main program of C
language).

• The identifiers of POUs of different languages in the User Program tree


are also different.

3.5.2 POU Type


There are three POU types:

 Program

Program is programmed to the sentence series in order to accomplish a


certain task, or a set of instructions. Program is the only executable body
of the application, and it can call function block, function and other
programs. A program can be activated by task configuration, or be called
by other programs.
But, this call is different from function and function block call in the
changing values. This call changes the value from calling program, and
when function and function block are called, another call changes the
value from the program instance of the call.
The program declaration starts with key word PROGRAM, and ends up
with END_PROGRAM.

299
SECTION 3 Control Station Algorithm Configuration

 Function Block

The function block is a precompiled program to realize a certain operation.


It cannot be executed independently, and can only be executed by calling
from programs or function blocks. A function block has one or more inputs
and executing results as outputs. Unlike function, a function block does
not have return value.
Function block declaration starts with key word FUNCTION_BLOCK and
ends up with END_FUNCTION_BLOCK.
 Function

The function is a precompiled program to realize a certain operation. It


cannot be executed independently, and can only be executed by calling
from programs or function blocks. The function block has one or more
inputs and only one executing result as output.
When a function is executing, a certain series inputs will generate an
output result with determinant data type, this output is assigned to the
function itself. Type a colon behind the function name and then input data
type.

• In the following description, POU type program is called program for short;
POU type function block is called function block for short; POU type
function is called function for short.

• Only function block (FB) and function (Function) can be added to Library.

Each POU is consist of variable declaration and algorithm programming:

300
SECTION 3 Control Station Algorithm Configuration

 Declaration: The user can declare variables in declaration area of POU


editor in working space or in Resource->Global Variables, the former
declares local variable and the latter one declares global variable. The
user can define variables before reference them and also can define
them in Declare Variable box when referencing. All the variables
should be defined following a certain format, please see details in
“3.3.2.2Variable”.

 Algorithm: The user can program algorithm in programming area of


POU editor in working space. The algorithm program is written in IEC
language, it can be IL, LD, FBD, SFC, ST or CFC. Add different types
of POU nodes in POUs manager window, double click each node
name, the user can open the corresponding program edit window in
working space.

The structure diagram of POU is shown as Figure 3.5.2-1:

Function Name
Program Name Function_block Name
and Type

Variable Declaration

Text and Object


Code
Instruction Set

Figure 3.5.2-1 Structure of POU

 POU trigger ways:

 By task configuration: please see details in the following parts.

 Called by other triggered POUs.

• Called by other triggered POU should follow the following principles:

301
SECTION 3 Control Station Algorithm Configuration

 Program can call other programs, function blocks and functions;

 Function block can call functions and function blocks;

 Function can call functions.

The declaration and calling methods of the three POU are introduced as
following.

3.5.2.1 Program

The program can return several values in operating, and it is recognized in the
whole project. All the values in program hold up from the previous operation to
the next operation.

1. Create
Select POU type Program in Create POU dialog, as shown in Figure
3.5.2-2:

Figure 3.5.2-2 Add Program

2. Declaration
Key words: PROGRAM program name
The program can be written in different POU languages, please see
details in 3.5.3 POU as shown in Figure 3.5.2-3, there is a program written
in IL language.

302
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.2-3 "Program" Example

3. Call
Key words: PROGRAM program name.

Figure 3.5.2-4 “Program” Example

3.5.2.2 Function Block

The function block can output one or more values based on assigned input
parameters. Unlike function, the function block does not have any return value.

1. Create
Select POU type Function Block in Create POU dialog, as shown in
Figure 3.5.2-5:

Figure 3.5.2-5 Add Function Block

303
SECTION 3 Control Station Algorithm Configuration

2. Declaration
Key words: FUNCTION_BLOCK function block name
The function block can be written in different POU languages, please see
details in 3.5.3 POU Figure 3.5.2-6 shows a function block written in IL
language.

Figure 3.5.2-6 "Function Block" Example

3. Call
The function block is called by function block instance. The internal
conditions of function block determine whether the output is the same
when there are same inputs.
The user can call function block by different POU languages, please see
details in 3.5.3POU, Figure 3.5.2-7 shows an example of calling function
block written in CFC language, "FUB1" is function block instance.

304
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.2-7 "Calling Function Block" Example

3.5.2.3 Function

A function can return a result (can include several components as structure


type).

1. Create
Select POU type Function in Create POU dialog, as shown in Figure
3.5.2-8:

Figure 3.5.2-8 Add Function

Click button in Return Type, select function return data type in the
Help Manager window, as shown in Figure 3.5.2-9, and then click OK to
close the help manager and finish the selection of return value data type.
Please notice that the function can not select SFC language.

305
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.2-9 Specify the Return Value Type of Function

2. Declaration
Key words: FUNCTION function name: data type

• Function name is the output variable of a function.

The user can call function by different POU languages, please see details
in 3.5.3POU, Figure 3.5.2-10 shows a function written in IL language.

306
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.2-10 "Function" Example

3. Call
There is no internal conditions in function, it return same values when
input parameters are same. The user can call function by different POU
languages, please see details in 3.5.3POU, Figure 3.5.2-11 shows a
function calling by IL language.

Figure 3.5.2-11 "Calling Function" Example

• In ST language, the function can act as the operators of expressions.

• In SFC language, the function can only appear in step actions and
conditions.

3.5.2.4 Calling Relations of POUs

There are two methods to call POU:

307
SECTION 3 Control Station Algorithm Configuration

 Called by other POU which has been called;

 Called by task configuration. This method is confined in program


calling.

Calling POU should follow the following principles as shown in Figure


3.5.2-12:

 Program can call other programs, function blocks and functions;

 Function block can call functions and function blocks;

 Function can call functions.

Program

Function Function Block Program

Function Function Block Function

Figure 3.5.2-12 Calling Relations of POUs

3.5.3 POU Language


POU can be written in six languages: IL, LD, FBD, SFC, ST, CFC, these
languages are provided by IEC-61131 standard, each of them has their own
editor. Details of the languages are introduced in the following.

3.5.3.1 IL

IL is the abbreviation of Instruction List, it is a textual programming language.

IL is consisted of a series instructions, one instruction in a line, each instruction


includes an operator and one or more operands, the operands are separated
by comma ",". Each line can start with a tag followed by colon ":", and end up
with comments which are bracketed by "(* *)"; there can be blank lines
between instructions.

1. IL editor

308
SECTION 3 Control Station Algorithm Configuration

As shown in Figure 3.5.3-1, IL editor is a textual editor with the common


functions of Windows text editor, the user can edit by menu bar or right
click menu.

Figure 3.5.3-1 "IL" Example

IL and ST textual editor has the following common points:


Each line of the implementation section of the program has a unique line
number. In offline mode, click the line number can mark the whole line as
blue; in online mode, the background color of the line indicates the state of
this line in break point:
 Dark gray: can set break point on this line.

 Light blue: already set break point on this line, click line number to add
a break point.

 Red: the program runs here.

In online mode, if the line number is dark gray, click it to add a break point,
and then it shows light blue; click it again to cancel the break point state of
this line.
2. IL operator
Common used IL operators are shown as Table 3.5.3.1:

309
SECTION 3 Control Station Algorithm Configuration

Table 3.5.3.1 All Operators of IL

Operator Modifier Meaning Example

LD N assign current result to operator LD iVar

ST N save current result to operator ST iErg

if current result is TRUE, set


S S bVar1
bool operator as TRUE

if current result is TRUE, set


R R bVar1
bool operator as FALSE

AND N,( bit logical operator AND AND bVar1

OR N,( bit logical operator OR OR bVar1

XOR
XOR N,( bit logical operator XOR
N,(bVar1,bVar2)

ADD ( add ADD (iVar1,iVar2)

SUB ( subtract SUB iVar2

MUL ( multiply MUL iVar2

DIV ( divide DIV 44

GT ( > GT 23

GE ( >= GE iVar2

310
SECTION 3 Control Station Algorithm Configuration

Operator Modifier Meaning Example

EQ ( = EQ iVar2

NE ( <> NE iVar2

LE ( <= LE 5

LT ( < LT cVar1

JMP C,N jump to tag JMPN next

CAL C,N call program function block CAL prog1

RET C,N exit POU and return to the caller RET

) calculate delay operation

The user can use bracket "()" to calculate the contents in bracket first, as
shown in Figure 3.5.3-2:

(* ERG=7*)

(* ERG=10*)
Figure 3.5.3-2 "()" Using Example

3. IL modifier
Modifiers are behind the operators, there are three modifiers:

311
SECTION 3 Control Station Algorithm Configuration

 C: Laid behind JMP, CAL, RET, execute this instruction only when the
last instruction result is TRUE;

 N : Laid behind JMP, CAL, RET, execute this instruction only when the
last instruction result is FALSE;

 N: Laid behind LD, ST, S, R, AND, OR, XOR, execute bit operation
after negate the operands.

4. Operation description
(1) Insert->Operator: the cursor can be anywhere of the programming
area, click this command, select from the popup help manager
window.

(2) Insert->Operand: the cursor can be anywhere of the programming


area, click this command, select from the popup help manager
window.

(3) Insert->Function: the cursor can be anywhere of the programming


area, click this command, select from the popup help manager
window.

(4) Insert->Function Block: the cursor can be anywhere of the


programming area, click this command, select from the popup help
manager window.

• Insert->Operator as shown in Figure 3.5.3-3, all similar introductions in


the following sections indicates the menu bar and submenu bar.

Figure 3.5.3-3 Description

312
SECTION 3 Control Station Algorithm Configuration

3.5.3.2 LD

LD is the abbreviation of Ladder Diagram. It is a graphical programming


language.

LD includes logical switch and can construct network similar as circuit loop like
FBD. LD is consist of contact, coil, function block etc. and connects plane net
diagram by horizontal and vertical lines.

1. LD editor
As shown in Figure 3.5.3-4, LD editor is a graphic editor. User can edit by
menu bar, tool bar and right click menu command.

Figure 3.5.3-4 "LD" Example

The vertical line in far left or far right is called “energy line”, it is always
TRUE. Program components are connected by certain rules and finally
connected to energy lines to form networks and to complete specific
logical operation. Lines on the network are called buses, the contacts,
coils and function blocks can be added to bus. The LD logic is from left to
right and from up to down.
2. LD component
(1) Contact: Each contact includes a BOOL variable, it transmit values
from left to right.

313
SECTION 3 Control Station Algorithm Configuration

: When it is TRUE, the value is transmitted from left to right.

: When it is FALSE, the value can not be transmitted from left to right.
(2) Coil: the coil transmits logic value from left to right, and assigns the
value to BOOL variable.

: When it is TRUE, the variable value is TRUE.

: When it is FALSE, the variable value is FALSE.

: When it is TRUE, the variable value is TRUE until it is set by the


subsequence instruction.

: When it is FALSE, the variable value is FALSE until it is reset by the


subsequence instruction.
(3) Function block: includes function block, function, and program. Please
see details in 3.5.2 POU.

(4) Graphic instruction

Take a network consist of contacts and coils for example, Figure 3.5.3-5
shows the meanings of graphs in LD editor.

Figure 3.5.3-5 Programming Components in LD Language


314
SECTION 3 Control Station Algorithm Configuration

Each network has a node number which is assigned by the system


automatically; each component displays component graphic, variable
name and variable description included in it.
3. Operation description
The LD related operations can be done in LD graphic edit window, the
operation approach includes menu command, tool bar and right click
menu in edit window, as shown in Figure 3.5.3-6 , Figure 3.5.3-7 and
Figure 3.5.3-8, the execute result of the same command items are also
the same.

Figure 3.5.3-6 Menu "Insert" and "Extras" of Programming with LD

Figure 3.5.3-7 Toolbar of Programming with LD

315
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-8 Right Click Menu in LD Programming Area

• In LD programming area, the commands in right click menu vary as the


edit objects.

Introduction of the common LD command:

316
SECTION 3 Control Station Algorithm Configuration

 Network node (before): insert a new network node before current


node.

 Network node (after): insert a new network node after current node
with shortcut key <Ctrl + T>.

 Series connection: insert a contact when the cursor is on coil or the


connection line between contact and coil, the new contact is with text
to input operands. That is to insert a contact before the selected
contact. The shortcut key is <Ctrl + K>.

 Parallel connection: insert a contact parallel to the selected contact,


the shortcut key is <Ctrl + R>.

 Function block: Insert a function block in the current position, the


shortcut key is <Ctrl +B>.

 Set negated: Set the selected contact negated, the shortcut key is
<Ctrl +N>.

 Coil: insert a coil in the right end of this node.

 Set/Reset: Assign the coil S/R property.

(1) Cursor position:

Cursor position is the focus of current edit object, usually is recognized by


a dotted rectangle, the following is its description:
Cursor on text
field

On contact or
function block

On coil

On connection
line

317
SECTION 3 Control Station Algorithm Configuration

On node
number

(2) Move components: Select the desired component and keep the mouse
key pressed until drag the component to the target position, on this
moment, the possible target position is recognized by rectangle with
high green color, and the default color of the rectangle is gray, as
shown in Figure 3.5.3-9, release the mouse, the component is moved
to the target position.

Figure 3.5.3-9 Component name

(3) Network node operation

Node is the basic unit in LD program. Each POU written in LD is consist of


Nodes. Default node number starts with 0001.
 Insert node

When the cursor is on a node, the user can insert a node in LD edit area
by selecting Insert-> Network node(before), Insert-> Network
node(after) or corresponding right click menu.
 Node copy and paste

The user can copy and paste the selected node in the same POU or other
POUs.

 Select single node: Select Edit->Copy or Copy command in right


click menu to copy the selected node.

 Select multiple nodes: If the user needs to select multiple nodes,


please select the first one, then press Shift key, and click the last
one. All the nodes between the two nodes will be selected. Notice
to keep pressing Shift key, right click on the last node, select Copy
in the menu or select Edit->Copy to copy all the nodes.

318
SECTION 3 Control Station Algorithm Configuration

 Paste: Select node in the target POU, right click the mouse, select
Paste command in the right click menu, the node copied to
clipboard is pasted before this node.

 Node comments

Each network node can have a multi-lined comment. First the user should
open Function Block and Ladder Diagram Options by
Extras->Options, as shown in Figure 3.5.3-10:

Figure 3.5.3-10 "Show Network Node Comment" Option

Set Minimum Comment Size and Maximum Comment Size in this dialog.
In LD edit window, the default comment text is "comment" as shown in
Figure 3.5.3-11:

Figure 3.5.3-11 Default Network Node Comment

Click "comment" to edit the comment, click other place of the edit window to
finish input. As shown in Figure 3.5.3-12:

319
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-12 Insert Network Node Comment

(4) Contact and coil operation

 Insert series connected contacts

Shortcut button:
Shortcut key: <Ctrl>+<K>
Insert a contact in front of the current cursor position. Main steps are as
follows:

Click Insert->Series Connection or click shortcut button on toolbar, a


series connected contact shows on the programming line, as shown in Figure
3.5.3-13 .

Figure 3.5.3-13 Insert series Connected "Contact"

Click contact name (default text field is "???"), input the variable name, as
shown in Figure 3.5.3-13.
After input the variable name, click mouse or press "Enter" key, the Declare
Variable window pops up, as shown in Figure 3.5.3-14, it has the following
columns:

320
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-14 Variable Declaration

Select the data type of contact inType, as BOOL, click button on the
right of Type, and the Help Manager window pops up as shown in Figure
3.5.3-15 , select Standard Types on the left, click the desired type on right
as BOOL, then click OK to close help manager.

Figure 3.5.3-15 Variable type-Help manager (contact)

Input comment contents in Comment as "Start Button", then click OK on


Declare Variable dialog to finish writing contact S1, and add variable
declaration in variable declaration window, as shown in Figure 3.5.3-14.
There are two conditions to insert a series connected "contact":

 If the cursor is on the node, and the line of this node has no
contact, then insert the new contact in the header of the program,
as the contact S1 shown in Figure 3.5.3-16 (a):

321
SECTION 3 Control Station Algorithm Configuration

 If the cursor is on the contact S1 of program line, please use


Insert->Series Connection. The new contacts are inserted in
front of the previous one by one, as the contact S2 shown in Figure
3.5.3-16 (b).

• After inserting a contact, the cursor will be moved to the new contact
automatically.

Figure 3.5.3-16 Positions to Insert Series Connected "Contact"

 Insert parallel contacts

Shortcut button:
Shortcut key: <Ctrl>+<R>
Insert a parallel contact in front of the current cursor position. Main steps
are as follows:

Click Insert->Parallel or select shortcut key in toolbar, a parallel


contact shows on the programming line, as shown in Figure 3.5.3-17.Click
contact name(default text field is "???"), input the variable name, type and
comments, the operation is the same as the above inserting series
connected contacts, here will not repeat it.

322
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-17 Insert Parallel Contact

There are four conditions to insert parallel contacts:

 If the cursor is on node, and the program line has no contact, it is


not allowed to insert parallel contacts.

 If the cursor is on contact (as K1), then insert the new contact
below this one. As contact K2 shown in Figure 3.5.3-18(a).

 If the user needs to insert a new contact below the paralleled one,
please select the contact and click the button , place the new
contact below the selected one. As shown in Figure 3.5.3-18(b),
select K1, the new inserted contact is K3; select K2, the new
inserted contact is K4.

 If the user needs to insert a new parallel contact below the series
connected two contacts, please keep pressing <Shift> and select
the two series connected contacts, then click button to place
the parallel contact below the two series connected contacts. As
shown in Figure 3.5.3-18(c), select series connected contacts K1
and K5, the new inserted contact is K6.

323
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-18 Positions to Insert Parallel Contact

 Insert coil

Shortcut button:
Shortcut key: <Ctrl>+<L>
Insert a coil in current cursor position. Main steps are as follows:

Click Insert->Coil or select shortcut key in toolbar, a coil shows at the end

324
SECTION 3 Control Station Algorithm Configuration

of the programming line, as shown in Figure 3.5.3-19.

Figure 3.5.3-19 Insert Coil

Click coil name(default text field is "???"), input the variable name, type and
comments, the operation is the same as the above inserting series connected
contacts, here will not repeat it. The coils must be parallel, and transmit logical
values from left to right, and save the result into appropriate logical variables.
The user can preset state ON(corresponds to logical TRUE) or
OFF(corresponds to logical FALSE),

There are two conditions to insert coils:


 If the cursor is on node, and the program line already has contacts but
no coils, then insert the new coils at the end of the program line. As coil
R1 shown in Figure 3.5.3-20(a).

 If the cursor is on coil as R1, then insert the new coil on top of the
precious one as R2.

Figure 3.5.3-20 Positions to Insert Coil

(5) Negation

325
SECTION 3 Control Station Algorithm Configuration

Shortcut button:
Shortcut key: <Ctrl>+<N>
Negation is to negate the contact, coil and function block. Click negation
button on toolbar, or use Negation in right click menu and
Extras->Negation, the user can negate the contact and coil. After negation,

the components are displayed as contact , coil , EN

POU , as a slash or circle on the component.


For example, in Figure 3.5.3-21(a), negate contact S1, if S1=FALSE,
R1=TRUE; else if S1=TRUE, R1=FALSE;
For example, in Figure 3.5.3-21(b), negate contact S2, if S2=FALSE,
R2=TRUE; else if S2=TRUE, R2=FALSE;

Figure 3.5.3-21 Negate Contacts and Coils

(6) Set/Reset

Shortcut button:
The coils can be defined as set or reset state.
Set(S) means: if the operation condition is meet, set coil "Set(S)" TRUE,
this coil will keep TRUE even if the operation condition is not meet, until
be "Reset(R)", the coil will change to FALSE.
For example, in Figure 3.5.3-22(a), if S1=FALSE and S2=TRUE, then
R1=TRUE; even if S1 or S2 is changed, R1 keeps to be TRUE; until in
Figure 3.5.3-22(b), S3=TRUE and S4=FALSE, the R1 will be reset, even if
R1= FALSE.
326
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-22 "Set/Reset" Operation

Reset(R) means: if the operation condition is meet, set coil " Reset(R)"
FALSE, this coil will keep FALSE,even if the operation condition is not
meet, until be "Set(S)", the coil will change to TRUE.
For example, in Figure 3.5.3-23(a), if S5= TRUE and S6=FALSE, then
R2= FALSE; even if S5 or S6 is changed , R2 keeps to be FALSE; until in
Figure 3.5.3-23(b), S7= FALSE and S8=TRUE, the R2 will be set, even if
R2= TRUE.

Figure 3.5.3-23 "Set/Reset" Operation

Main steps:

When cursor is on coil, click button on toolbar or use


Insert->Set/Reset to set/reset the coil. For example, the coil R1 is reset(R)
in Figure 3.5.3-22and the coil R2 is set(S) in Figure 3.5.3-23.
(7) Function block operation

327
SECTION 3 Control Station Algorithm Configuration

 Insert function block

Shortcut key: <Ctrl>+<B>


With this command the user can insert operands, function blocks,
functions, and programs. When the cursor is on coil or the connection line
between contact and coil, click Insert->Function Block or press shortcut
key <Ctrl>+<B> to select the inserted POU from the pop up Help
Manager window, as shown in Figure 3.5.3-24:

Figure 3.5.3-24 Insert Function Block

• The first input and output of POU are placed on the connection line, so
they must be BOOL.

 EN operation

If the user wants to let LD call other POUs like PLC, then the POU must
have EN input. When the cursor is on coil or the connection line between
contact and coil, click Insert-> EN operator, a new EN POU will parallel
connected to the coil.
Operands, function blocks, functions and programs with EN has the same
function with POU in FBD except the EN. The POU is executed if EN is
ON.
(8) Comment

To let the program be readable, the user should add comments for
program, network node and variables. Also the user can input jump label
to appoint the jump direction of the program.
The comments are divided as follows:
 Network node comment

State for the current node: First use Insert->Comment, then the default
comment text in programming area is "comment", click the blue comment

328
SECTION 3 Control Station Algorithm Configuration

area at the back of the comment, and input comment content, click other
place in the edit window to finish the input. As shown in Figure 3.5.3-25:

Figure 3.5.3-25 Program Comment

 Variable comment

It is allowed to comment for variable name. The declaration for contact


and coil variables will be displayed in LD programming window. The user
can comment for the variables in Declare Variable dialog or in Variable
Definition area, as shown in Figure 3.5.3-26:

Figure 3.5.3-26 Variable Comment

 Jump label

Especially, each node (each programming line) has a label position at the
first line of the node, it is null as default. Click first line of each line, and it is
displayed as editable state, the user can only input jump label, please
notice to conform the label name. As shown in Figure 3.5.3-27:
329
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-27 Jump Label Name

Jump and return


Jump and return are changes of program scan sequence. In normal
condition, the controller scans the main program by node sequence.
 Jump:

Jump to the corresponding node of the assigning label when the condition
is met.
When the cursor is on node, select Jump in the right click menu or use
Insert->Jump to insert jump instruction, as shown in Figure 3.5.3-28.
It is needed to input jump label (default is "Label") after inserting the jump.
The jump label is used to identify the jump destination, as shown in Figure
3.5.3-28, when the jump condition is meet, jump to the third node without
executing the contents in the second node.
Each network has a label at the first line of the network with null as default.
Click the first line of the node, it is displayed as blue input box, the user
can only input jump label.

330
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-28 Jump

Main steps of inserting "Jump (J)" in the cursor position are:


When the cursor is on the node, select Insert->Jump or Jump in the right
click menu, the user can insert jump label at the end of the program,
default is "Label", as shown in Figure 3.5.3-29 (a);
If there is output coil at the end of the program, then the jump label is
parallel connected to the coil as shown in Figure 3.5.3-29 (b);
Click the jump label to be changed, and input the new label to finish
change, as "Label", as shown in Figure 3.5.3-29 (c).

Figure 3.5.3-29 Insert "Jump (J)"

 Return

The user can use return in calling POU, when the condition is meet, the
called POU will not continue executing and return to the calling POU.
331
SECTION 3 Control Station Algorithm Configuration

When the cursor is on node, select Return in right click menu, or use
Insert->Return to insert return, as shown in Figure 3.5.3-30:

Figure 3.5.3-30 Return instance

Main steps of inserting "Return(R)" in the cursor position are:


When the cursor is on the node, select Return, the user can insert return
operator at the end of the program, default is "Return", as shown in Figure
3.5.3-31(a).If there is coil at the end of the program, then the return
operator is parallel connected to the coil as shown in Figure 3.5.3-31(b).

Figure 3.5.3-31 Insert "Return (R)"

3.5.3.3 FBD

FBD is the abbreviation of Function Block Diagram. It is a graphic


programming language.

1. FBD editor
As shown in Figure 3.5.3-32, FBD editor is a graphic editor, the user can
edit by menu bar or right click menu.

332
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-32 "FBD" Example

2. FBD components
 Input

 Operator, function block, function, program

 Output

3. Operation instructions
(1) Cursor position

The possible cursor positions are shown in the following:

No. Position Graphical representation

a Each text field

333
SECTION 3 Control Station Algorithm Configuration

No. Position Graphical representation

b Each input pin

Each operator,
c function,
function block

d Each output pin

e Cross line

At the right of
the last object of
f a network node,
the cursor can
select this node

334
SECTION 3 Control Station Algorithm Configuration

No. Position Graphical representation

Cross line
g between
assignments

On the
h
assignment line

(2) "Insert" "Input":

Shortcut button:
Shortcut key: <Ctrl>+<U>
With this operation the user can insert input pins when the cursor is on
operators, functions, function blocks (c position). Different operators can
insert different inputs, for example, ADD can have two or more inputs. The
inserted input has text , the text must input constants, variables, or
delete .
(3) "Insert" "Operator ":

Shortcut button:
Shortcut key: <Ctrl>+<O>
The user can insert input operators when the cursor is on input pin(b
position), output pin(d position) and the right of the last object(f position).
First insert AND, and the AND can be changed to another name. Or select
AND, press F2 and select available operator name from Help Manager
window.
(4) "Insert" "Assign":

Shortcut button:
Shortcut key: <Ctrl>+<A>
The user can insert assignment when the cursor is on input pin(b position),
and the right of the last object(f position).

335
SECTION 3 Control Station Algorithm Configuration

(5) "Insert" "Comment":

The user can input comments when the cursor is on input pin (b position),
operators, functions, function blocks(c position), output pin(d position) ,
cross line(e position),the right of the last object(f position) and between
cross line and assignment(g position).
(6) "Insert" "Negate":

Shortcut button:
Shortcut key: <Ctrl>+<N>
The user can negate which is "Negation logic" when the cursor is on input
pin (b position) and output pin(d position) .
(7) "Extras" "Set/Reset":

Shortcut button:
The user canset/reset when the cursor is on output pin(d position) ,
between cross line and assignment(g position) and on the assignment
line(h position).

Set means when left value is TRUE, the right variable keeps TRUE.

Reset means when left value is TRUE, the right variable keeps
FALSE.
(8) "Extras" "Zoom"

Shortcut key: <Alt>+<Enter>


The user can zoom this graph to get the internal structure instruction when
the cursor is on operators, functions, function blocks(c position).
3.5.3.4 SFC

SFC is the abbreviation of Sequential Function Chart, it is a graphic


programming language. In SFC, the user can do nesting programming in other
languages (including SFC).

SFC is used to control the sequence of different actions. Step, transition


condition and action are the three main components of SFC, step is to define
action and transition control sequence.

1. SFC editor
As shown in Figure 3.5.3-33, SFC is a graphic editor, it can be edited by
menu bar and right click menu.

336
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-33 "SFC" Example

2. SFC component
The components of SFC can be edited by Insert->Extras, shortcut button
on toolbar or right click menu in SFC programming edit window, as shown
in Figure 3.5.3-34:

337
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-34 Right click menu in "SFC" edit window

(1) Step:

Step is the logical unit of program executing. The user must assign a
name for the step to identify it.
Step name, which is SFC step name, is implicit declaration variable. The
system will generate a default name for the new added step like Step 8,
Init, Step 3, etc. The user can use this default name or self-define step
name, the naming rule of step is the same as variable. A step name must
be unique in the POU.
There are two kind of common steps:
 Simplified step

This step includes an action and an active mark. If any action is in the step,
there will be a little triangle in the upper right corner. In which the steps
with double frames is called initial step, and the system online runs starts
from the initial step. Current run step is called active step.

 Initial step: A SFC can only have one initial step. It is the first step
for SFC program to run, and also the first step after create a new
SFC.

338
SECTION 3 Control Station Algorithm Configuration

 Common step: A SFC can have several steps. It is shown as single


frame.

 Jump step: A SFC can have several jump steps, they are the "Go
to" sign when a SFC is ending and can be changed. As shown in
Figure 3.5.3-35:

Figure 3.5.3-35 "SFC" Example

According to its running state, the steps can be divided into active step
and inactive step.

 Active step: The current running step is called "active step", also
called "current step". A running SFC program may have one or
more active steps (current steps). The SFC programs do not have
parallel branches ,and only have one active step in a moment.

339
SECTION 3 Control Station Algorithm Configuration

 Inactive step: Inactive steps are those not in running state. A


running SFC program A running SFC program may have one or
more inactive steps in a moment. When the system scans or
executes the SFC program, only active steps will be executed, and
the inactive steps will not be executed.

 IEC step

It includes an active mark and one or more actions or BOOL variables.


Actions are on the right side of the steps. Please see detailed instruction
of IEC step in online help.
(2) Action

"Action" means the codes will be executed when SFC is running. There
are three types of actions: step action, entrance action, exit action. The
simple steps can insert actions by double click steps or Extras->Zoom
Action/Transition.

When inserting entrance step, a symbol is added to the rectangle of


step; when inserting exit step, a symbol is added to the rectangle of
step; when inserting action, a symbol is added to the rectangle of step;
Action can be written by any one of the six languages, initial step does not
have "Entrance Action", and simplified SFC is different from the step
action of IEC SFC.
(3) Transition: The components between steps are called transition. The
transitions inserted transition conditions are displayed as state,
double click the transition component to open transition condition edit
window.

(4) Transition condition

The transition contents are called transition condition, which must have a
value TRUE or FALSE. It can be BOOL constants, BOOL variables, or
sentence with BOOL results. It can be written in any languages but can
not include program, function block or be assigned.

• The transition condition in editor is prior to the conditions written in the


transition mark. As shown in Figure 3.5.3-36, if i>100, the transition
condition will be FALSE in spite of transition mark is TRUE.

340
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-36 Transition Condition Priority

3. Operation instruction
(1) Select component

The selected components are identified by dotted line rectangle box. Click
mouse or use up and down key to select the component; press Shift key
and click mouse can select a group of components.

• When deleting steps, the user must delete the transitions in front or at the
back of the steps.

(2) Step and transition

 Insert step and transition

The steps and transition components are combined inserted.

 "Insert" "Before step transition":

Shortcut button:
Shortcut key: <Ctrl>+<T>
With this command the user can insert a step and a transition in front of
the selected components (step or transition). The initial step can only
insert back step and transition.

 "Insert" "back step transition":

Shortcut button:
Shortcut key: <Ctrl>+<E>
With this command the user can insert a step and a transition at the back
of the selected components.

341
SECTION 3 Control Station Algorithm Configuration

 Insert branch

A section of SFC program can be executed in branch, that is to say the


executing route can be divided into two or more routes ("branch").
"Parallel branch" will be parallel processing (in the same time span), while
"Selection branch" will determine one branch to execute based on the
previous transition condition. A parallel branch must start and end up with
step.

 "Insert" " right parallel branch"

Shortcut button:

Shortcut key: <Ctrl>+<L>

The selected components must start and end up with step, with this
command the new branch is inserted as the right branch of the
selected component, and the new branch includes a step. The parallel
branch should add mark if it needs to be jumped from other
components.

 "Insert" " left parallel branch":

Shortcut button:

The selected components must start and end up with step, with this
command the new branch is inserted as the left branch of the selected
component, and the new branch includes a step. The parallel branch
should add mark if it needs to be jumped from other components.

After inserting the parallel branch, the connection lines in front and at
the back of the parallel branch area are displayed as double lines, as
shown in Figure 3.5.3-37. When online running, if the Trans 1 condition
is meet, Step2, Step3, Step4 are activated at the same time.

342
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-37 Insert Parallel Branch

 "Extras" "right parallel paste"

The selected components must start and end up with step, with this
command, the contents in clipboard will be the right branch of the
selected components. The contents of clipboard also must start and
end up with step

 "Extras" "back paste":

Select the component, with this command, the contents of clipboard


will be pasted to the back of the first step or transition of the selected
components.

 "Extras" "Add label to parallel branch"

After selecting the front transition components of the parallel branch, with
this command, a label will be shown on top of the parallel branch. The
default label is "Paralel"+"Sort No.", and it is editable, as shown in Figure
3.5.3-38, change the default label as "abc", delete the label name to
delete the jump label.

343
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-38 "Add Label to Parallel Branch"

 Delete step or transition

When deleting a step or transition, the user must use Shift key to select a
group of both step and transition, then press Delete to finish deletion, the
step action and transition condition are deleted at the same time, there is
no delete tip.
(3) Selection branch

A selection branch must start and end up with transition. Selection branch
can include parallel branch and other selection branch. The connection
line in front and at the back of the branch area is single line.
 "Insert" "right selection branch":

Shortcut button:
Shortcut key: <Ctrl>+<A>
The selected components must start and end up with transition, with this
command the new branch is inserted as the right branch of the selected
component, and the new branch includes a transition.
 "Insert" "left selection branch":

Shortcut button:
The selected components must start and end up with transition, with this
344
SECTION 3 Control Station Algorithm Configuration

command the new branch is inserted as the left branch of the selected
component, and the new branch includes a transition.

• With Paste command (Edit->Paste), the components in clipboard will be


pasted in front of the selected components.

In transition from the last step to the next step, the program transits to
different branches when meet different conditions. These branch
conditions should meet "exclusive" in configuration. If there is no
"exclusive ", the program will be executed following the priority order from
left to right. As shown in Figure 3.5.3-39 :

Figure 3.5.3-39 Add Selection Branch

If current step is Init, judge the transition conditions of Trans0 and Trans1
to execute the corresponding branch; if the two conditions are meet at the
same time, then execute from left to right.

345
SECTION 3 Control Station Algorithm Configuration

(4) Action operation

Adding and deleting actions are introduced in the follows.


 Add step action

 Add step action:

Double click the step, or select step and use Extras->Zoom


Action/Transition, the New Action dialog pops up as shown in Figure
3.5.3-40:

Figure 3.5.3-40 Add Step Action

The dialog shows the current step name, select action language and click
OK to open the edit window of this action, as shown in Figure 3.5.3-41,
the window add initial step Init, a transition Trans0 and a jump
automatically.

Figure 3.5.3-41 Step Action Edit Window

Add step action in this window. The corresponding action edit window will
pop up after select "Add entrance action" or "Add exit action ", and the
346
SECTION 3 Control Station Algorithm Configuration

steps are identical, here will not repeat.

 "Insert" "Add entrance action ":

Shortcut button:

The entrance action only executes once when the step is activated,
and it can be written in a selected language. There is an "E" at the
bottom left of the steps with entrance action.

 "Insert" "Add exit action ":

Shortcut button:

The exit action only executes once when the step is inactivated, and it
can be written in a selected language. There is an "X" at the bottom
right of the steps with exit action.

The steps added the above actions are shown as Figure 3.5.3-42:

Figure 3.5.3-42 Steps Added Actions

 Delete step action

Select step and use Extras->Clear Action/Transition to clear the


step actions If the step has entrance action, exit action or step action,
then select this command, and a dialog pops up as shown in Figure
3.5.3-43

Figure 3.5.3-43 Delete Step Action

347
SECTION 3 Control Station Algorithm Configuration

Select the action type to be deleted, and then click OK to delete this
action.
(5) Transition operation

The adding and deleting of transition and transition condition are


introduced as follows.
 Add transition condition

Double click the transition component, or select transition component


and use Extras->Zoom Action/Transition, the New Transition dialog
pops up as shown in Figure 3.5.3-44:

Figure 3.5.3-44 Add Transition

The dialog shows the current transition name, select transition language
and click OK to open the edit window of this action, as shown in Figure
3.5.3-45, the transition condition can be edit in this window.

Figure 3.5.3-45 Transition Edit Window

The step added the above transition is shown as Figure 3.5.3-46:

348
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-46 Transitions Added Condition

 Delete transition condition

Select transition component and use Extras->Clear


Action/Transition to clear the transition condition, there is no delete
tips.

(6) Jump operation

Jump is consists of vertical line with a horizontal arrow and the name of
the jump target. Jump is used to select which step to execute if the
previous transition condition is TRUE. The process connection line can
not cross or back execute, so jump is needed here.
The jump only can be used at the end of a branch besides the default
jump at the end of SFC. When the last transition of a branch is selected,
the user can use Insert->Jump to insert a jump.
The target of a jump can be an appointed string in this or other POU, a
step name, or a label of parallel branch.
 "Insert" "Jump":

Shortcut button:
Shortcut key: <Ctrl>+<U>
The branch which selected component located on must be a selection
branch, with this command the jump can be inserted at the end of this
branch. There is a text string beside the new jump, and the user
can change it into target step name or the jump label of parallel branch.
 "Insert" "Transition jump":

Shortcut button:
The branch of which selected component located on must be a selection
branch, with this command the transition and jump can be inserted at the
end of this branch. There is a text string beside the new jump, and
the user can change it into target step name or the jump label of parallel
branch.
(7) Step property

349
SECTION 3 Control Station Algorithm Configuration

 Option

Select Extras->Option or right click mouse in SFC programming area and


select Option in the right click menu, the Sequential Function Chart
Option dialog pops up as shown in Figure 3.5.3-47:

Figure 3.5.3-47 Dialog Box of Sequential Function Chart Option

The meanings of each item in the dialog are:

 Height of Steps: Control the icon height of the rectangle of the step,
default is 4;

 Width of Steps: Control the icon width of the rectangle of the step,
default is 6;

 Width of Comment: Control the comment width of the step, default


is 6, and the comment will be displayed only if the Display at
Step->Comment is selected.

 Display at Step: Select the contents displayed in rectangle of the


step: None, do not display the comment or time limit; comment,
display comment; time limit, display the time limit setup.

 Step property

Each step can set its own run limit and comments to identify step property.
Select Extras->Step property or right click mouse in SFC programming
area and select Step property in the right click menu, the Step Attributes
dialog pops up as shown in Figure 3.5.3-48:

350
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-48 SFC Step Property Dialog Box

The following contents can be set here:

 Minimum time: The minimum time length of processing this step, it


is a constant or variable of TIME type. This command is used with
Extras-> Option.

 Maximum time: The maximum time length of processing this step,


it is a constant or variable of TIME type. This command is used
with Extras-> Option. As shown in Figure 3.5.3-49(a):

 Comment: Text to introduce the information of this step. It is used


with Extras-> Option. As shown in Figure 3.5.3-49(b).

Figure 3.5.3-49 SFC Step Property

 Time preview

After setting the time limit of each SFC steps, the user can use Time
Preview to view, add or change the time limit. Use Extras->Time
Preview or right click mouse in SFC programming area and select Time
Preview in right click menu, the SFC Time Limit Overview dialog pops
up as shown in Figure 3.5.3-50 :

351
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-50 Dialog Box of SFC Step Time Limit Preview

The List of Steps displays all the steps and their time limit in current POU.
Click any step in List of Steps, the corresponding line turns into blue and
its step name, minimum time and maximum time are displayed at the
bottom of the dialog, the user can change the time setting and click OK to
save the change.
3.5.3.5 ST

ST is the abbreviation of Structured Text. It is a textual programming language.

ST is consisted of a series sentence as high-level language.

1. ST editor
As Figure 3.5.3-51 shows, ST editor is a textual editor, and it has the
common functions of text editor in Windows. The user can edit programs
by menu bar or right key of mouse.

352
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-51 "ST" Example

2. ST operator
Common ST operators and their operations are shown in Table 3.5.3.1:
Table 3.5.3.1 Common ST Operators

Operators Operations Priority


(expression) bracket
high

Function name
call function
(parameter list)

exponent
EXPT
operation

-,NOT negation

* multiply

353
SECTION 3 Control Station Algorithm Configuration

Operators Operations Priority


/ divide

get
MOD
complement

+ add

- minus

compare
<,>,<=,>=
operation

= equal to

low
<> not equal to

AND and

XOR xor

OR or

3. ST sentence
Common instruction types and examples of ST sentence are shown in
Table 3.5.3.2:
Table 3.5.3.2 Common Instruction Types of ST Sentence

Instruction type Examples


Assign sentence A:=B; CV := CV + 1; C:=SIN(X);

Call function CMD_TMR(IN := %IX5, PT := 300);


block and
reference A:=CMD_TMR.Q
function block

354
SECTION 3 Control Station Algorithm Configuration

Instruction type Examples


output

return RETURN;

D:=B*B;

IF D<0.0 THEN

C:=A;

ELSIF D=0.0 THEN


IF
C:=B;

ELSE

C:=D;
END_IF;

CASE INT1 OF

1:BOOL1 := TRUE;

2:BOOL2 := TRUE;

CASE ELSE

BOOL1 := FALSE;

BOOL2 := FALSE;

END_CASE;

J:=101;

FOR I:=1 TO 100 BY 2 DO


FOR
IF ARR[I] = 70 THEN

J:=I;
EXIT;

355
SECTION 3 Control Station Algorithm Configuration

Instruction type Examples


END_IF;

END_FOR;

J:=1;

WHILE J<= 100 AND ARR[J] <> 70


WHILE DO

J:=J+2;
END_WHILE;

J:=-1;

REPEAT

REPEAT J:=J+2;

UNTIL J= 101 OR ARR[J] = 70

END_REPEAT;

Exit EXIT;

Null ;

3.5.3.6 CFC

CFC is the abbreviation of Continuous Function Chart, and it is a graphical


programming language. CFC is based on FBD language, but it does not have
network limit, so it has a flexible component layout.

1. CFC editor
As shown in Figure 3.5.3-52, CFC editor is a graphical editor, it can be
edited by menu bar or right click menu. The components can be placed
anywhere in the programming area. Drag the connection lines between
components. The editor will adjust the length of connection lines when the
components are moved. If there is not enough space between
components, the lines will turn into red, otherwise, the red line will return
back.

356
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-52 "CFC" Editor

2. CFC component
CFC affords multiple graphic components for edit, the user can use Insert
menu, toolbar or right click mouse in CFC programming area and select
right click menu to add graphic component, as shown in Figure 3.5.3-53 :

357
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-53 Right Click Menu in "CFC" Edit Window

After selecting the added component, one component will be added at


each clicking in edit window.
The components used in CFC are shown in Table 3.5.3:
Table 3.5.3 CFC Component Instructions

Component
Symbol Instruction
name
Select "???" text field to
input change it into input variable
name

Select "???" text field to


output change it into output
variable name

358
SECTION 3 Control Station Algorithm Configuration

Component
Symbol Instruction
name
The default AND block
component, the user can
operation changed AND into operator,
block function, function name or
user program name

Used with jump, set special


label label name for jump

means to jump to appointed


label position, "???" text
jump field is changed into the
label name to jump to.

return return

Click the blank area in


rectangle box, and change
comment conmment which is the
instruction for other
components or programs

The selected input pin is


identified as dotted line, the
Inout pin user can press the mouse
and drag it to other function
block or input pin.

The selected output pin is


identified as dotted line, the
Output pin user can press the mouse
and drag it to other function
block or output pin.

• Besides input and comment components, each added component will get
a number in the upper right corner, the number starts from 0 and increase
by sequence order. It is the program executing order from small to large.
By default, the user can adjust the numbers in Extras->Order.

359
SECTION 3 Control Station Algorithm Configuration

3. Operation instruction
(1) Cursor position:

Description illustration

On block, input, output,


jump, label, return and
middle line of comment, this
position is also the position
of selected component

On block, input, output,


jump, label, return and text
field of comment

On the input and output pin


of the component

(2) Select component

Click mouse on the middle line of the component to select the component.
If the user wants to select multiple components, please press Shift and
click the components. Also the user can use left key of the mouse to draw
rectangle area in the editor to select multiple components.

360
SECTION 3 Control Station Algorithm Configuration

The user can select all the components by using Extras->All.


(3) Move component

If the cursor is on position a or press Shift to select multiple components,


click mouse to move the component to desire place, then release the
mouse. If the release position has other components or it is beyond the
edit area, the moved component will go back to its initial position, moving
operation failed.
(4) Add or delete connection line:

 Add component connection line

The input pin of a component can only be connected to an output


pin(output pin of this component or other components), but the output pin
of a component can be connected to multiple input pins(input pin of this
component or other components)
As shown in Figure 3.5.3-54, there are three ways to connect between
E1(T2A22T)and E2(FOP01):

Figure 3.5.3-54 Connection

 Press mouse on the output pin of E1 and drag it to the input pin of
E2, then release the mouse.

 Press mouse on the input pin of E2 and drag it to the output pin of
E1, then release the mouse.

 Press mouse and move E1 and E2, keep their input pin and output
pin contact, when connecting line the editor will check if the data
types from the two sides are matched, if not, the cursor will turn to
"Forbid" , and the connection fails.

 Delete connection line

There are three ways to delete the connection line between


E1(T2A22T)and E2(FOP01):

361
SECTION 3 Control Station Algorithm Configuration

 Select the output pin of E1, press Delete key or Edit->Delete. If


there are multiple lines on E1, all of them will be deleted.

 Select the input pin of E2, press Delete key or Edit->Delete.

 Select the input pin of E2, drag it to the blank area in editor and
then release it.

(5) Input, output, block component:

 "Insert" "Block":

Shortcut button:
Shortcut key: <Ctrl>+<B>
With this command the user can insert operator, function, function block
and program. The newly inserted block moved with mouse to an
appropriate place, then click the mouse to finish insertion. The initial
insertion is AND, it can be changed into another name. Or select AND,
press F2, select name from Help Manager.
 "Insert" "Input":

Shortcut button:
Shortcut key: <Ctrl>+<I>
With this command the user can insert input. The newly inserted input
moved with mouse to an appropriate place, then click the mouse to finish
insertion. The text field "???" should be input variable or constant. Also the
user can press F2 and select from Help Manager.
 "Insert" "Output":

Shortcut button:
Shortcut key: <Ctrl>+<O>
With this command the user can insert output. The newly inserted output
moved with mouse to an appropriate place, then click the mouse to finish
insertion. The text field "???" should be input variable. Also the user can
press F2 and select from Help Manager.
An example is shown in Figure 3.5.3-55:

Figure 3.5.3-55 Example to add function block, input and output

362
SECTION 3 Control Station Algorithm Configuration

components

(6) Jump and label:

In CFC, jump and label are used in cooperation, and the following part will
introduce how to add jump and label.
 "Insert" "Jump":

Shortcut button:
Shortcut key: <Ctrl>+<J>
With this command the user can insert jump. The newly inserted jump
moves with mouse to an appropriate place. Click the mouse to finish
insertion. The text field "???" should be input the label to be jumped to.
And this name should accord with the name defined in label, and the jump
type must be BOOL.
 "Insert" "Label":

Shortcut button:
Shortcut key: <Ctrl>+<L>
With this command the user can insert label. The newly inserted label
moves with mouse to an appropriate place. Click the mouse to finish
insertion. The text field "???" should be input the jump label.
If the jump condition is FALSE, var1=1; If it is TRUE, var1=10, then the
program will run jump over the sections in front of the label and execute
the program section labeled by the jump label. As shown in Figure
3.5.3-56, when VAR1 in Program 1 is TRUE, jump over Program2 to
execute the third program which label0 is on.

363
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-56 Add Jump and Label

In online mode, the editor inserts label "RETURN" automatically at the end
of POU.
(7) "Insert" "Return":

Shortcut button:
Shortcut key: <Ctrl>+<R>
With this command the user can insert return. The newly inserted label
moves with mouse to an appropriate place. Click the mouse to finish
insertion.

• Return here is different from the "RETURN" at the end of POU, "RETURN"
is for auto executing next cycle when this cycle of POU is over.

(8) Negation

Shortcut button:
Shortcut key: <Ctrl>+<N>
With this command the user can negate the input, output, jump and return.
Select the input or output pin of a component, use shortcut button or
shortcut key of Negation command or Extras->Negation, the
corresponding position will display negation symbol , it is adding a little
circle in the position of pin.

364
SECTION 3 Control Station Algorithm Configuration

(9) "Insert" "Comment":

Shortcut button:
Shortcut key: <Ctrl>+<K>
With this command the user can insert comment with <Ctrl>+<Enter> to
break line. The newly inserted label moved with mouse to an appropriate
place, then click the mouse to finish insertion.
(10) Execution order and sort number:

At the top right corner of operation block, output, jump, return and label in
CFC programming area, numbers have been automatically added. This
number is to make sequence execution of CFC components in online or
simulation mode.
The newly added components get a sort number according to the
topological sequence (from left to right and from above to below). The
number of the new component pluses 1 based on the last added
component; if the exist components are resorted, and then the number of
the new component pluses 1 based on the maximum one of their numbers.
The number of a component keeps constant when it is moved.
Execution starts from the component with number 0. The user can right
click mouse in CFC working space and select Sequence->Order->Order
everything according to data flow, or change the execution order of
each component by using the submenu of sequence item, as shown in
Figure 3.5.3-57:

365
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-57 Menu "Execution Order"

These commands can be called by Extras menu.

366
SECTION 3 Control Station Algorithm Configuration

 Display order: If select this command, the component number will


be displayed on the top right corner of the component in CFC
programming area, else there is no display;

 Order topologically: With this command, the components are ordered


in a topological sequence from left to right and from above to below;

 Move forward: With this command all selected components change


their number with their previous component, this command is invalid
for 0 component;

 Move backward: With this command all selected components change


their number with their next component, this command is invalid for
component with the maximum number;

 Move to front: Set the number of selected component as 0, other


components in front of this one will plus 1 automatically;

 Move to end: Set the number of selected component as the maximum


one in the order, other components at the back of this one will minus 1
automatically;

 Ordering according to data flow: Reordering the components in edit


area according to data flow rather than component position.

The user can change execution order under circumstances in view of the
execution order may have influence on result.

• The execution order is displayed on the top right corner of the component.

4. CFC application
 Start-stop control on pump

There are two redundant ejector pumps. Each pump sends two digital
signals to DCS to indicate the state of start and stop; DCS sends two
digital signals to each pump to control the pump to start and stop; each
pump sends a digital signal to DCS to indicate whether be controlled by it.
The exits of the two pumps are connected to main pipe, if the pressure of
exit id detected too low by instrument, the DCS will receive a digital signal.
According to the above information, and edit based on the method
mentioned in previous part, a POU is established as shown in Figure
3.5.3-58, the figure shows the logic of one pump, the other is the same,

367
SECTION 3 Control Station Algorithm Configuration

please see detailed instruction of function block HSSCS6 in " Quick


Manual".

Figure 3.5.3-58 Start and Stop for Pump

Define the name of this function block in database of project control, its
type is "Sequential control 6", the function block declaration is generated
in Resource->Global Variable " AMDMTagVar " after compiling, as
shown in Figure 3.5.3-59 :

Figure 3.5.3-59 Declarations

 Regulation control on analog value

A pressure transmitter sends analog signal indicates pressure value to


DCS. A control valve can change this pressure, it sends an analog signal
indicates its opening to DCS, and the DCS sends an analog signal to the
control valve to regulate it to an appropriate opening.
According to the above information, and edit based on the method
mentioned in previous part, a POU is established as shown in Figure
3.5.3-60, please see detailed instruction of function block HSPID and
HSAlgMAN in " Appendix function block instruction".

368
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.3-60 Analog Regulation

Define the name of this function block in database of project control, its
type is " PID ","Analog manual operator" , the function block declaration is
generated in Resource->Global Variable " AMDMTagVar " after
compiling, as shown in Figure 3.5.3-61 :

Figure 3.5.3-61 Corresponding declaration

• Declaration should be written in one line, the variable declaration can be


written in multiple lines.

• The data need to be sent to system configuration should be global


variables.

3.5.4 POU Trigger


POU can call other POUs, but it is not allowed to recursive call. The POU can
be operated after triggered.

3.5.4.1 Trigger POU by task configuration

1. Task configuration
Double click Resource->Task Configuration, the dialog pops up as shown
in Figure 3.5.4-1:

369
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.4-1 Dialog Box of Task Configuration

(1) Task name: Self-defined as "TASK10", system reverse word is


"MACSTask ".

(2) Priority: Numbers between 0-31, 0 is the highest one and 31 is lowest
one.

(3) Type:

Cycle: Processing task periodically, the cycle is defined in


Property->Interval.

Freewheeling: The task starts to execute as soon as the program starts,


and it restarts after one cycle.

Triggered by event: Start the task if the variable has rising edge, the
variable definition is in Property->Event.

Triggered by external event: Invalid.

(4) Property:

Interval: Invalid if the type is "Cycle", input number of TIME format as


T#50ms, this number must be integer times of 50.
Event: Invalid if the type is "Triggered by event ", input global variable, use
370
SECTION 3 Control Station Algorithm Configuration

button or F2 key to get the global variable list.


After adding task in Task Configuration, the name is editable and click
task name to change it. Right click mouse on the task icon to select the
task, the right click menu is shown as Figure 3.5.4-2 , the user can edit the
task.

Figure 3.5.4-2 Edit Task

Select Delete, a dialog pops up as shown in Figure 3.5.4-3, click Yes to


delete the task.

Figure 3.5.4-3 Delete Task

• The default interval of server algorithm project as examplepro_0.pro is


T#1s0ms.

• The delete function should be used with caution, because the deleted task
can not be restored in Edit->Restore.

2. Program call
Select task name and right click mouse, select Append Program Call
from the dropdown menu, the dialog pops up as shown in Figure 3.5.4-4.
Input POU name in Program Call or click to find the calling target
program, this POU can be triggered.

371
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.4-4 Dialog Box of Program Call

3.5.4.2 Program Call Subprogram

Call the POU to be triggered by the triggered POU. As shown in Figure 3.5.4-5,
MACS_PRG() is triggered by method in "3.5.4.1 Trigger POU by task
configuration ", the user can call the POU to be triggered in MACS_PRG.

Compile the POU in project general control. The algorithms of each control
station are added main task MACSTask with cycle as 100ms.

The main program MACS_PRG is generated automatically in the program,


and it is added a POU calling sentence: "UserPou100", the cycle of this POU is
100ms.

Figure 3.5.4-5 Main Program Calls Subprograms

Generally speaking, put digital variables related subprograms into


"UserPou100" to call, the cycle is 100ms, as " SCS*", as shown in Figure

372
SECTION 3 Control Station Algorithm Configuration

3.5.4-6:

Figure 3.5.4-6 Call Different Subprograms in Cycle

• The control algorithm uses this method as the default one to trigger POU.

3.6 Compile
The user can use compile command to verify the correctness and operability of
the program, in this section, the differences between Compile and Compile All,
and common compile errors and processing method are introduced.

1. Compile
After finishing project configuration, please compile it to check if there are
errors, and the compile results are displayed in the Information window.

373
SECTION 3 Control Station Algorithm Configuration

Two files will be generated after compiling as *.SDB and symbol file *.SYM,
please see file types in Table 3.6-1:

Table 3.6-1 Type of Files Generated by Compile

File extension
Examples Description Format
name
controller
.pro Project01.pro algorithm project binary file
file

Compile
information of the
last time, created
when saving the
.ci Project01<No.>.ci project. binary file

<No.>: target ID of
the code

download
information of the
last time, created
when
.ri Project01<No.>.ri downloading. binary file

<No.>: target ID of
the code

output file, created


.exp Project01.exp in "Project" text file
"Output"

.sym Project01. sym symbol table file text file

.sdb Project01. sdb symbol table file binary file

.bak Project01.bak backup file binary file

The meanings of the two commands "Project/Compile" or


"Project/Compile All" are different according to the contents to change, the

374
SECTION 3 Control Station Algorithm Configuration

instructions are as follows:


 Compile all

Do compile all operation in any one of the following conditions.

 Compile the project for the first time, compile all projects.

 Change hardware configuration

 Change task name or time interval

 Add or delete task

 Increment compile

 Change project options

 Change user program, variable declaration, data type and the


library

If it is the first time for project to be compiled, the above two options will
compile the whole project. The differences between "Increment compile "
and " Compile all" are compile range; as for rebuilding all the object
files(download all) or appending on the original file(increment download),
it is determined by the contents changed before compiling the
project.(please see the part of download)
2. Common Compile Errors
There are two types of compile results:
One is all correct, as shown in Figure 3.5.4-1(a), it indicates the whole
project is correct.
The other is there are errors or warnings, as shown in Figure 3.5.4-1 (b),
the error information is displayed as red color. Double click the compile
error, the user can locate the error position and modify it.

Figure 3.5.4-1 Compile Results Contrast

375
SECTION 3 Control Station Algorithm Configuration

Common compile error tips in message window and the corresponding


resolutions are shown as follows:
Error: Type mismatch in parameter ‘WH’ of ‘H_E’: Cannot convert ‘REAL’
to ‘WORD’
Explanation: WH is WORD, the user connected it with a REAL data.

Error: Unknown type ‘HSPID’


Explanation: The user did not add the function library of HSPID to library
manager.

Error: Error in initial value


Explanation: Maybe grammar error or unknown initial value leaded by
unknown function block type.

Error: MACS_PRG(1):At least one Statement is required


Explanation: One POU needs at least one statement or one operation, it
can not be null. This error shows the user should add an operation
statement to the first line of MACS_PRG, as call a program.

Error: SCS(7):Expecting’:’before’;’
Explanation: In the 7th line of program SCS declaration, there should be
a ’:’ before ’;’. The variable initial assignment symbol is ':=' not ';='.

Error: Task configuration(1): The task ’TASK10’ must contain at least one
program call
Explanation: The first task ’TASK10’ must contain at least one program
call, or else the program is meaningless like a null POU can not compile
successfully. Please right lick mouse on ’TASK10’ to add a program call.

Error: ACCUM(5):Expecting ‘;’ or before END_VAR


Explanation: In the 5th line of program ACCUM declaration, there should
be a ';' before END_VAR. The grammar rule sets that the variable
declaration should end up with a ';'. So ST statements should end up with
a ';'.

376
SECTION 3 Control Station Algorithm Configuration

Error: Name used in interface is not identical with POU name


Explanation: Variable name and POU name are not allowed to be
identical, and can not use system reverse key words.

Error: MCS(0):Identifier ’ASP_CYQL’ not defined


Explanation: Please define this variable.

Error: POU1(1) :Duplicate definition of identifier’VAR1’


Explanation: Any variable must be declared once! Only a local variable
and global variable with the same definition may not conflict.

3.7 Download
The program compiled successfully can be downloaded to main control unit.
Before downloading, the user should configure the parameters and select
download way according to different types of fields.

In the following, we will take a simple project for example to introduce the
settings of network address and communication parameter. There are four
PCs in the example system. One of them is taken as IO (#10 FCS) station. The
system uses a simple architecture of two network layers. PC names are OP80,
OP81, OP82, OP83, they have different roles here:

 OP80: Engineering Station

 OP81: Server A (be set to afford all services);

 OP82: Server B (be set to afford all redundant services);

 OP83: Operator Station

The network configuration is shown as Figure 3.5.4-1:

377
SECTION 3 Control Station Algorithm Configuration

Figure 3.5.4-1 Network Architecture

3.7.1 Local Connect


Each PC in the above example needs to configure network address, which is
to create the network connection between CPU module of controller and PC,
Take engineering station OP80 for example, the main steps of configuring
network address are:

Step 1. First use twisted-pair line to do physical connection between


controller and PC (engineering station), then start the project
and click network icon" SNETA " in PC, the SNETA Status
window pops up as following:

378
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.1-1 Local Connecting

Step 2. Click Properties menu in SNETA Status window, the SNETA


Properties window pops ups as shown in Figure 3.7.1-2:

379
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.1-2 SNETA Property

Step 3. Find Internet Protocol (TCP/IP) in This connection uses the


following items list and double click it, or select it and click
Properties button the Internet Protocol (TCP/IP) Properties
window pops up as shown in Figure 3.7.1-3:

380
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.1-3 Internet Protocol (TCP/IP) Property

Step 4. Click using the following IP address in Internet Protocol


(TCP/IP) Properties window, then input IP address of upper
computer (PC) in IP Address as "128.0.0.50"; click Subnet
mask, the mask "255.255.0.0" is added automatically, as shown
in Figure 3.7.1-4:

381
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.1-4 Add IP Address

Step 5. Click OK in Internet Protocol (TCP/IP) Properties window to


view SNETA Status window as shown in Figure 3.7.1-5:

382
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.1-5 SNETA Status

Click Close menu to close local connect dialog. At present, the network icon
"SNETA" in PC turns into , this shows that the connection is successful.

As the same, the user can configure the SNETB address as "129.0.0.80"
according to the above steps. It's the same as the address configuration of
other roles.

In actual project, the user should configure the PC address according to the
actual allocation circumstances of the project.

3.7.2 Communication Parameter


Before downloading, the communication connection between engineering
station and main control unit should be setup. Each controller algorithm aims
at a FCS, and the MCU is redundant configured, so here the user can preset
the communication parameters of two network segments(128 segment,129
segment) of controller A and B, the four communication parameters in total is
convenient for communication parameter address switching when
downloading. But the downloading must through IP address of master PC.

Take #10FCS for example, the main operations of configuring available

383
SECTION 3 Control Station Algorithm Configuration

channels and communication parameters are as follows.

Click Login in Online menu after complied and passed through, the dialog
pops up as shown in Figure 3.7.2-1:

Figure 3.7.2-1 Communication Parameter Configuration

There are four channels list in the Local node, they are "128.10", "128.138" ,"
129.10","129.138", the corresponding IP address are "128.0.0.10"
"128.0.0.138" , " 129.0.0.10"," 129.0.0.138",all based on the station number. It
is provided by the compile in database software.

• The user only need to download master operation service, and the system
will make redundancy in slave server after downloading. The download
method is the same as controller algorithm.

• After compiled by project control, the communication parameters will be


generated automatically in each control station.

Select one of the communication parameter name as , and click OK.

• Select the communication parameter of currently running MCU before


downloading, for example, if the controller B of 10# FCS is running, the
user should select IP address 128.0.0.138 or 129.0.0.138 as
communication parameter.

• Each network of the master and slave controller user redundant


configuration as 128 network segment and 129 network segment; the
download address of master controller is set as 128.0.0."Station No.",
129.0.0."Station No.", the download address of slave controller is set as
384
SECTION 3 Control Station Algorithm Configuration

128.0.0."Station No.+128", 129.0.0."Station No.+128". The user can select


either of 128 net and 129 net. The four communication parameters are
generated automatically after compiled by the project control.

3.7.3 Initialization Download


Download the fresh new target file into running MCU, the MCU is reset and all
the variables of MCU are reset as initial values. In any one of the following
conditions, Compile or Compile All will rebuild all the target files, when Login
MCU, it will be downloading all:

 Download after compile the project for the first time;

 After executing Project->Clear, the original target files are cleared, the
system tip dialog is shown in Figure 3.7.3-1;

 Modify MACS configuration: including view module property, modify


tag name in channel, add and delete modules;

 Modify task property in task configuration;

 Modify contents in Target Settings;

 Lost programs in MCU.

Figure 3.7.3-1 Clear-Initialization Download Tip

• initialization download all will reset all the variables, so it is forbidden in


online running.

3.7.4 Incremental Download


The target file appends contents to the original target file rather than rebuild.

385
SECTION 3 Control Station Algorithm Configuration

Increment download only download the modified content to MCU, for running
MCU, it is non-disturbance download.

Conditions support incremental download:

 POU modification(add or delete POU, modify exist POU);

 Add, delete or modify variables.

3.7.5 Download Tips


In the process of control algorithm download and exit, the system will give
corresponding operation tips according to real conditions. Main tips are:

1. Initialization download
Select Online->Login, the Communication Parameters window pops up
as shown in Figure 3.7.5-1, the user can select available communication
addresses:

Figure 3.7.5-1 Communication Parameter Tips by Downloading

Click OK to finish initialization download, the dialog box pops up as shown


in Figure 3.7.5-2.

Figure 3.7.5-2 System Tips by Initial Downloading

Click Download All to confirm initialization download; click Cancel to


maintain project in controller and do not download; the download process
dialog is shown as Figure 3.7.5-3. This dialog will be closed after
download, and the controller will run automatically.

386
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.5-3 System Tips by Downloading

The project name is displayed with identification "*" after download, it


means the project needs to be saved, click Save and "*" disappears. Or,
select Yes to confirm save operation when closing the algorithm project,
as shown in Figure 3.7.5-4.

Figure 3.7.5-4 System Tips of Saving Download Project

In this way, after exit the monitor state (Online->Logout), when login
again, the user only need to select normal communication channel, the
download tip dialog will not show up.
2. Incremental download
The incremental download is after increment modification of the project,
select download communication channel, then the system will detect
whether the control algorithm opened in the editor which will be
downloaded this time is accord with the project in current target controller,
if not , the system tips dialog pops up as shown in Figure 3.7.5-5:

Figure 3.7.5-5 System Tips by Increment Downloading

Click Yes to confirm increment download; click No to maintain project in


controller and do not download; click Cancel to cancel this download
operation.
After confirm the download, the download process dialog will be closed
after download, then the user can do other operations.

387
SECTION 3 Control Station Algorithm Configuration

3. Duplicate login
It is not allowed for multiple algorithm projects to login the MCU of one
control station at the same time. For example, the control algorithm is
already login 10# station and start online monitor, if there is another
algorithm project wants to login MCU of 10# station, the system tips dialog
will pop up as shown in Figure 3.7.5-6:

Figure 3.7.5-6 System Tips by Logging in Same FCS

Click OK to exit the login, please confirm whether the version of opened
project is the project last modified, this is to avoid multiple modification of
the project in the same station.
4. Communication interrupt
Select Online->Login, and select available communication addresses
displayed as blue in Communication Parameters window, then click OK
to enter online monitor state. If the network connects control algorithm and
controller are interrupted at this time, the system tips dialog pops up as
shown in Figure 3.7.5-7:

Figure 3.7.5-7 Tips for Network Interrupted

Click OK, the control algorithm will exit the monitor state automatically, the
controller still runs normally. If the user wants to login again, please select
available communication channel.
5. Forcing operations in downloading
After forcing operation on variables in online monitor state, when execute
Online->Logout, the system tips dialog pops up as shown in Figure
3.7.5-8 :

388
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.5-8 Logout Project after Forcing Operation

Click Yes to release the forcing operation on variable, the real-time value
of this variable will be displayed on the next login; click No to maintain the
forcing, the forcing value of this variable will be displayed on the next login;
click Cancel to cancel this operation.

3.8 Parameter Tools


Conmaker parameter tools contain Param Readback and Parameter Write.

 Param Readback:It will read on-line modified parameters from


controller and save them in an off-line status engineering. Currently, it
only supports the process of reading parameters back to CodeSys
off-line engineering.

 Parameter Write: It is used for modifying parameters to the controller


on line when data which are modified off line by the general controller
of the database are not emptied and downloaded.

Parameter tool is in CodeSys tab “Resource”, Double-click “Tools” on resource


tree,as shown in Figure 3.7.5-1. Double-click parameter readback and
parameter download node to open the corresponding configuration tools.

389
SECTION 3 Control Station Algorithm Configuration

Figure 3.7.5-1 Tools-Parameter download and Parameter read back

3.8.1 Param Read Back


1. The Steps of Using Param Read back tool
Please refer to the following steps of using Param Read back:

Step 1. Open CodeSys project, in Resource table, double-click


Tools->Param Read back to popup an interface as shown in
Figure 3.8.1-1.

Figure 3.8.1-1 Control window of Param Read back

Step 2. Click “Param Read back” to log on, if you have not logged on, it
will popup interface of communication parameter, as shown in
FFigure 3.8.1-2. If the interface do not popup, please switch
CodeSys to foreground.

390
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.1-2 Dialog interface of Param Read back

Select correct IP address, Click OK to finish parameter read back;


Click Cancel to exit read back.

Step 3. When read back is finished, a dialog box will popup as shown in
Figure 3.8.1-3.

Figure 3.8.1-3 Param Readback ending interface

Step 4. Please log out Conmaker to check whether inspection


parameters are read back correctly or not, and save this project.

Param Read back effects are illustrated as follows:


Before read back of MAN01:
MAN01:HSAlgMAN:=(BS:=0,OU:=5,OT:=100,OB:=0,MU:=50,MD:=0,MR:
=5,ME:=TRUE,AE:=TRUE,FE:=TRUE,RM:=0);
If MU is written to 60 on line, then the following effects can be got after
read back:
MAN01:HSAlgMAN:=(BS:=0,OU:=5,OT:=100,OB:=0,MU:=60,MD:=0,MR:
=5,ME:=TRUE,AE:=TRUE,FE:=TRUE,RM:=0);

• If the parameter do not read back correctly, please look up the following
notes. If it is not meet the following conditions, the default read back
parameter table may not configure the parameter that need to read back,
please refer to Table of Configuration Read back Parameter.
391
SECTION 3 Control Station Algorithm Configuration

 Read-back to variables in parameter type of ARRAY and variables


in pointer type is not supported.

 Param Readback should have a communication with the controller,


and it will last longer if the volume of data is large.

 Adding annotation in initialization statement represents that


Parameter Read-back is not needed on this line, it is shown as
follows:HSAlgMAN:=(BS:=0,OU:=5,OT:=100,OB:=0,(**)MU:=60,M
D:=0,MR:=5);

 The maximum layer of nested functional block supporting


read-back is 2 currently..

 After read-back, the initialization format and initialization sequence


of parts of parameters will be changed, and original parameter
items can not be lost.

 Please delete the POUs which were not called before executing
Param Readback, otherwise the results will be uncertain and might
lead to complied errors after readback.

2. Default Supported Parameter Read-back List.


Table 3.8-1 Default read-back parameter table

Function Block Name Item Name Type


AI_Red_Sel MD BYTE

BD1 UINT

BD2 UINT

error REAL

UP REAL

LO REAL

AlarmUP REAL

392
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


AlarmLO REAL

HSALM_RT HL REAL

DP DWORD

AP DWORD

HSSCS6 RT DWORD

QR BOOL

SC BOOL

ZF BOOL

T1 DWORD

T2 DWORD

HSVMAN SU REAL

SD REAL

BS REAL

MD BYTE

HSVPID PT REAL

TI REAL

TISI BOOL

OT REAL

393
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


OB REAL

TISO BOOL

TD REAL

KD REAL

AD UINT

SV REAL

DL REAL

TM BOOL

SU REAL

SD REAL

MPT REAL

MK REAL

MKD REAL

FA REAL

DI REAL

OU REAL

CP REAL

HSAlgMAN BS REAL

394
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


OU REAL

OT REAL

OB REAL

MU REAL

MD REAL

HSDLCTRL T1 UINT

T2 UINT

HSDLCTRL2 T1 WORD

T2 WORD

T3 WORD

HSPID CP REAL

MC UINT

PT REAL

TI REAL

KD REAL

TD REAL

OT REAL

OB REAL

395
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


SV REAL

OU REAL

DL REAL

MU REAL

MD REAL

PK BYTE

OM UINT

AD UINT

TM BOOL

ME BOOL

AE BOOL

CE BOOL

TE BOOL

FE BOOL

PU REAL

PD REAL

HSSCS RT DWORD

DE BYTE

396
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


SC BOOL

CM BOOL

OS BOOL

CS BOOL

OU BOOL

HSSCS5 DE BYTE

SC BOOL

QR BOOL

CD BOOL

CM BOOL

OS BOOL

CS BOOL

OU BOOL

HSVALVE5 T1 REAL

T2 REAL

T3 REAL

DB REAL

DL REAL

397
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


OT REAL

OB REAL

HSACCUM IV REAL

MS LREAL

MC LREAL

bPositiveAccum BOOL

HSCHARC PS UINT

HSCMP CEQ BOOL

CNE BOOL

CGE BOOL

CLE BOOL

CGT BOOL

CLT BOOL

HSFILTER IS BYTE

FM ENUM

HSONEFOLD VN BYTE

HSQOR SL BOOL

S9 BYTE

398
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


HSSLMTSUM AH REAL

AL REAL

SOF BYTE

HSTWOFOLD VN BYTE

HSAMEMORY IV WORD

OT REAL

OB REAL

HSBAL2 HL REAL

LL REAL

OUTR REAL

HSCURVE PS USINT

TB DWORD

TE DWORD

TL REAL

BL REAL

HSRAMP IR REAL

DR REAL

TL REAL

399
SECTION 3 Control Station Algorithm Configuration

Function Block Name Item Name Type


BL REAL

IV REAL

HSSSMITH OT DINT

OB DINT

HSTIMER TT ENUM

3. Configurate ReadBack Parameter List


Values corresponding to parameters are not existed in Default Parameter
List, which can’t be read back correctly in parameter read back. At this
time, it needs to click List Setting to configure manually, and operation
steps are as follows::

Step 1. Open the functions of Configuration Read Back Parameter List

Open “My Computer” and select Tools->Folder Options to ensure the


extension function of the hidden given file types which are not checked, as
shown in Figure 3.8.1-4.

400
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.1-4 Folder option window

Open MACSV Installation Directory\MACSV_ENG\CodeSys, modify


Param.ini file, modify superman=0 to superman=1, as follows:
[Setting]
superman=1
Then restart the Tools node->Param Readback, meanwhile button “list
setting” is displayed on the interface of Param Readback, as shown in
Figure 3.8.1-5. Click “Configurate parameter Table” button to increase or
decrease operation of parameter options.

Figure 3.8.1-5 Read back control window

Step 2. Click “List Setting” to display the dialog box “Configure Table of
Read back Parameter”, as shown in Figure 3.8.1-6.

401
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.1-6 Dialog box “ Configurate ReadBack Parameter List”

How to add read back options of system and custom function block as
following:
 Add Read back Option of System Function Block

Example: Add parameter D to read back option of the function block


AI_RED.
Find AI_RED->D in “library Function Block”, select D:UINT by clicking, and
click Add in the top left corner, then parameter D of function block AI_RED
is added to read back configuration table as following:

402
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.1-7 Add Read back Option

 Add Read back Option of Custom Definition Function Block

If the function block is defined by user, user need to enter the custom
function block name, parameter name and parameter type, then click
button “add”.
If want to modify one parameter type at one function block in " Configurate
ReadBack Parameter List ", you can double-click the parameter node,
then its property will automatically appear in “Other Function”, “Param
Name”, “Param Type”, and after modify the type of the parameter can be
increased after the click.
Example: the nested function block HSSCSTEST need to read back two
options as following:
AAAA:TEST
SC:BOOL;
Operation:
Add the custom function block TEST, fill in parameter name and type, and

403
SECTION 3 Control Station Algorithm Configuration

then click “Add”, as shown in Figure 5.12.9.

Figure 3.8.1-8 Custom TEST parameter table window

TEST is regarded as REAL type to use after definition, as shown in Figure


3.8.1-9.

Figure 3.8.1-9 Custom HSSCSTEST parameter table window

The tag item of AAAA is added completely. Adding SC, you need to
change parameter name SC and parameter type BOOL, then click “Add”
to save the changed information.

Step 3. Look up the added result Read back Configuration Table, then
click “Save” to save the added options.

404
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.1-10 Option of saving readback configuration

• Click button “Save” to save the change of configuration options after


changing readback configuration table.

• Parameter types input by users are shown as follows: BYTE,WORD,


DWORD,SINT, USINT,INT,UINT,DINT,UDINT,REAL,LREAL,
BOOL, DT, as well as types of functional block, and enumeration type is
written to ENUM.

• The types of parameters that were not supported include array type and
pointer type.

• The names of self-defined functional blocks should not be duplicated with


the names of system functional blocks.

3.8.2 Parameter Write


If detect the database had changed when load engineering (also start
CodeSys) , the following prompt box will pop up, which prompt the user use
the “Parameter Write” tool to download parameters after login engineering.

405
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.2-1 prompting of database had changed when load


engineering

1. The steps of Using parameter download


Please refer to the following steps of using parameter download:

Step 1. Open the database system configuration , Click Edit ->Edit


Database, as shown in Figure 3.8.2-2. Input user name correctly
and password to enter database edit, as shown in Figure
3.8.2-3.

Figure 3.8.2-2 Database Edit

Step 2. Select System->Data Modify to change the corresponding


parameter.

Figure 3.8.2-3 Database Edit


406
SECTION 3 Control Station Algorithm Configuration

• Do not use the tag name of deleted modules, otherwise, it will cause
output error after download controller.

Step 3. After the operation, please click button to update database.

Figure 3.8.2-4 Database update

Step 4. Switch to “Database System Configuration”, select Database


Edit->Full Compile to recompile project, as shown in Figure
3.8.2-5.

Figure 3.8.2-5 Project compile

Step 5. Select Program-> MACS->MACS_ENG->Controller Algorithm


Configuration to open the corresponding project of station
number ,which is changed parameter. After logging on controller,
double-click Tools->Parameter Download to open dialog box
“ Parameter Download”, as shown in Figure 3.8.2-6.

407
SECTION 3 Control Station Algorithm Configuration

Figure 3.8.2-6 Parameter download process

Step 6. Click “Write” to popup a dialog box, as shown in Figure 3.8.2-7.

Figure 3.8.2-7 Confirm parameter download

Click “Yes” to write the parameter; Click “No” to cancel the wrote parameter.

Step 7. After this operation, a tooltip will popup, as shown in Figure


3.8.2-8. Click “OK” to finish writing.

Figure 3.8.2-8 Parameter download confirm interface

• If the popup is shown as below. when inputing, it means no parameter is


needed to input.

Figure 3.8.2-9 prompt when no changes of parameters

408
SECTION 3 Control Station Algorithm Configuration

• If you have not logged on controller, click Parameter Download->Write to


popup as shown in Figure 3.8.2-10. Click “Ok” to log on controller again.

Figure 3.8.2-10 Tip of project logging on unsuccessfully

2. Types of parameter write are supported currently


Parameter download only supports the following types currently:

409
SECTION 3 Control Station Algorithm Configuration

 AI Type: Upper Limit of Measure Range, Lower Limit of Measure


Range, Signal Type, Square Root or not, Single-signal Cut Off,
Reverse Measure Range or not, Line Resistance A, Line Resistance B,
Line Resistance C and Right Bridge-arm Resistance.

 AO Type: Upper Limit of Measure Range, Lower Limit of Measure


Range, Lower Limit of Electric Measure Range, and Lower Limit of
Electric measure Range.

 PI Type: Signal Range.

3.9 Example of control station algorithm


configuration
Rebuild All

Creat new POU

Algorithm Edit

Function Block
definition

Program Call

Rebuild All

1. Select and click Start ->All Programs -> MACS -> MACS_ENG -> FCS;
2. Dialog box Select Project comes up;
3. Select project which need to execute algorithm configuration, e.g.
ExamplePro;
4. Click Select;
5. Dialog box FCSEditor comes up;
6. Select control station which need to execute the operation, e.g. No. 10
Station;
7. Click OK;
8. No. 10 Station is open, select Rebuild all in menu Project;
410
SECTION 3 Control Station Algorithm Configuration

9. The Build result is displayed in information window:


(1) If SOE module is add in this control station, the build information will be
correct, otherwise, it will prompt an error;

(2) Rolling the information bar, double click on error which is labeled to
red;

(3) It will be linked to specific position, and be labeled to blue;

(4) Select the labeled area, and delete (this step is only used in the first
time of Build).

3.9.2 Create new POU


The example of POU in this section(please refer to 3.5.1), POU type: (please
refer to 3.5.2.1), POU language: CFC (please refer to 3.5.3.6), as shown in
Figure 3.9.2-1.

Figure 3.9.2-1 New POU

1. In sub-catalog of POUs, icon comes up, select and


double click it;
2. the project page SCS01, configurate the algorithm in algorithm edit
area; as shown in Figure3.9.2-2.

411
SECTION 3 Control Station Algorithm Configuration

Figure3.9.2-2 Blank POU

3. Add component:

Select and click component from , then move mouse


pointer to edit area and click, or right click in edit area and select from shortcut

menu. E.g. adding Box, the initial status is ;

4. Click AND, and type in function block name, e.g. HSSCS5 (sequence
controller) (please refer to APPENDIX 1);
5. The sequence controller comes up, add input/output components to
input/output pins;
6. Adding corresponding measure tags; as shown in Figure3.9.2-3
.

412
SECTION 3 Control Station Algorithm Configuration

Figure3.9.2-3 Sequence Controller

3.9.3 Name function block:


1. Select red question mark above the function block HSSCS5;
2. Type in function block name, e.g. B04M01B, click any other blank
space;
3. Dialog box Declare Variable comes up, and input correct information;
as shown in Figure3.9.3-1.

Figure3.9.3-1 Declare Variable

 Class: define the apply property of variable, including 5 properties,


VAR and VAR_GLOBAL are used in common:

VAR means it is a local variable, is only effective in current project page;

VAR_GLOBAL means it is a global variable, is effective in the current control


station;

413
SECTION 3 Control Station Algorithm Configuration

 Type: used for select data type, including REAL, BOOL, INL, etc,
normally, REAL (analog value) and BOOL (digital value) are used in
common, type of function block is allocated automatically, without
selecting.

 Symbol List: used for select file where the variable will be saved, it is
effective when the variable type is VAR_GLOBAL only; if none file in
list is suitable, new file can be created here (type in new file name
directly in Symbol list). Create SCS01 as in example,
icon comes up in Resources.

 Retain: used for the variable retain without being lost when controller
power off and start again.

 The name of Middle Point is the same as name of function block.

4. Variable definition: main apply object is function block, double click


in Resources, define it when it is open; or define it in
Initial Value of dialog box Declare Variable; as shown in Figure3.9.3-2.

Figure3.9.3-2 Function Block Definition

When definition is completed, return to POUs, and configurate other algorithm.

3.9.4 Call Program, when algorithm configuration


completed:
1. Double click page MACS_PRG(PRG), as shown in Figure3.9.4-1:

Figure3.9.4-1 Select Mian Program

2. The main program page is open, write in the name of project page
from the first line, as shows in Figure3.9.4-2:

414
SECTION 3 Control Station Algorithm Configuration

Figure3.9.4-2 Type in Project Page

3.9.5 Build: Select Rebuild All in menu Project;


1. Rebuild result will be displayed in information window, please refer to
step 9; And a downward blue arrow will be displayed in front of the
called project name, as shown in Figure3.9.5-1:

Figure3.9.5-1 Build Called Project Page

Save: select command Save in menu File or icon .

415
SECTION 4
Online Operation
In general, online operating system is also called “Computer Monitoring
System”. It is a part of MACS software system as HMI (Human Machine
Interface), and supports peripherals like dedicated industrial keyboard and
printer, the functions of online operation are:

 Real-time dynamic display of data, session, query, statistic, print

 Monitoring, detection and operation on alarm

 Log display and management

 Auto control, sequential control and advanced control of process

Online operation system is oriented to operators. It offers data by ways of


analog flow chart, bar chart, numerical table, trend curve, table, button and
dialog. It gets operational orders from operators by input equipment and
transfers the operational orders to FCS.

With online operating system, the operators and engineers can monitor the
process of auto control, take manual intervention and modification on real-time
information5 and auto print and required print of working report on monitoring
computer, they can also offer the manager the figures and data by monitor of
field level like MIS network.

4.1 Operator Station Introduction


Software run on OPS is online operating system which is the dedicated
real-time monitoring software of MACS system. It is run in multi-task operating
system. On OPS, the operator and field running project are real-time
interactive by using online operating system.

4.1.1 Runtime Environment


1. Hardware environment

5
Real-time information: means real-time point, clock, alarm information, system announcement
information, operation instruction and configuration instruction.

417
SECTION 4Online Operation

CPU Intel Pentium 2.4GHz or above, RAM 1G, CD-ROM, single-screen or


double-screen VGA card, full-color CRT, resolution 1280*1024, true color,
refresh frequency 85 HZ, mouse or trackball, dedicated operator
keyboard, two Ethernet cards, industrial crate.
2. Software environment
System platform: Windows XP, Windows Server 2003
Application software: HOLLIAS MACS dedicated OPS software, Microsoft
Excel.

4.1.2 OPS Hardware Equipment


To realize online monitoring and session response, the input and output
equipments needed by OPS are as follows:

1. OPS monitoring screen configuration


Use 21” full-color CRT (or bigger monitor than 21”) as operator monitoring
screen. Each OPS can be connected to one full-color monitor or two
monitors. On condition of multi-monitor, the monitors share a dedicated
operator keyboard and a mouse.
2. Dedicated operator keyboard
In industrial field, besides common keyboard and mouse, operators are
equipped with a set of dedicated operator keyboard and trackball to
convenient their operation.
 Dedicated key board1

Dedicated key board is divided into initial functional keys and auxiliary
functional keys by function.

 Initial functional key: At any moment when the system is running,


pressing this key will cause figure switch and display on screen, it
is the display function of operation station.

 Auxiliary functional key: Assistant with the initial functional keys, it


can only act when the particular figure displays. If the unfitted
auxiliary functional keys are used , the system will give tips as
Invalid key or limited authority.

• Each basic function of the session is accessed by an initial functional key,


no matter what states the keyboard is, the initial functional keys are always
available.

418
SECTION 4Online Operation

• The appearance of the dedicated operator keyboard is shown as Figure


4.1.2-1:

Figure 4.1.2-1 Appearance of the dedicated operator keyboard

According to using methods, the keys on the dedicated operator keyboard


are described by the following several areas as shown in Table 4.1-1:
Table 4.1-1 Descriptions of the dedicated operator keyboard

Key area Sub-key area Function description

"General trend", "Digital", "Report record" are


Trend used to access analog tags or digital tags and
Dedicated the trend figure tags of statistic type
functional
key area
(11 Log used to access to log display window
sub-areas)
List used to access to list display window

419
SECTION 4Online Operation

Key area Sub-key area Function description

Table used to access to event table display window

used to access event recall of digital tags and


Post trip and SOE
analog tags and SOE trend display figure

Used to access function operation interface of


OPS, the function of "Playback" button is :
Engineer
press this button and the history playback
mode is accessed.

Used by the operator to call control regulation


windows (such as PID controller, manual
operator, digital manual operator, sequence
Operator control equipment, regulating valve) to switch
among operation figure and running mode
and the regulation of setting values and output
values.

"Menu" key is used to access the main menu


of procedure flow figure, "Device Status" key
Monitor
is used to access the status figure of the
system

used to access print session interface to


Print
realize report print and screen copy function

"Alarm monitoring" key is used to access


Alarm monitoring common alarm monitoring interface, the other
two keys are to confirm alarm

there are 32 user-defined keys(F1-F32), the


Custom function user can define the keys’ meaning by
keys configuration, like sub-menu user-definition of
flow chart: turbine general appearance

Numerical Alphanumeric Keys’ functions in this area are the same as


key area keys the keys’ functions on common keyboard

Other keys Light test key


used to test the status of lights on the

420
SECTION 4Online Operation

Key area Sub-key area Function description

keyboard

CRT1,CRT2,CRT3 without switch function

Used to define operation privileges of OPS,


the signs in four positions take turn clockwise
as "Privilege 1", "Privilege 2", "Privilege 3",
"Privilege 4". Each position of the privilege
Privilege lock lock has a status light, it is lighten when the
key turns to its position and this is
implemented by keyboard circuit. The
configuration assigns on which each privilege
operates.

audio alarm according to configuration


loudspeaker
settings

• After defining the function keys, F function keys in engineer keyboard (PC
keyboard) and operator keyboard are enabled.

 Dedicated key board2

Besides dedicated operator keyboard 1, a recent new type of dedicated


operator keyboard is FP025-USB-A01.
The appearance of the dedicated operator keyboard is shown as Figure
4.1.2-2 and Figure 4.1.2-3:

421
SECTION 4Online Operation

Figure 4.1.2-2 Appearance of the dedicated operator keyboard-front side

Figure 4.1.2-3 Appearance of the dedicated operator keyboard-back side

According to using methods, the keys on the dedicated operator keyboard


are described by the following several areas as shown in Table 4.1-2:
Table 4.1-2 Descriptions of the dedicated operator keyboard2

Key area Key Tips Icon Function description

used to access function operation


Engineer Login
interface of OPS

422
SECTION 4Online Operation

Key area Key Tips Icon Function description

Trend used to access to General trend

Main Menu used to access to the main menu

Overview
System
used to access System Status
Status

Technical
used to access to Technical Alarm
Alarm

Alarm Device Alarm used to access to Device Alarm

Acknowledge used to acknowledge alarm information

used to access print session interface to


Print
realize report print
Print
used to access print session interface to
Screen Print
realize screen copy function

Device Log used to access to Device Log

Log SOE Log used to access to SOE Log

Operation
used to access to Operation Log
Log

there are 32 user-defined keys(P1-P32),


the user can define the keys’ meaning by
User defined configuration(the corresponding key
P1~P32
key words are F1-F32), like sub-menu
user-definition of flow chart: turbine
general appearance

423
SECTION 4Online Operation

Key area Key Tips Icon Function description

Used to define operation privileges of


OPS, the signs in four positions take turn
clockwise as "Privilege 1", "Privilege 2",
Privilege "Privilege 3", and "Privilege 4". Each
lock position of the privilege lock has a status
light, it is lighten when the key turns to its
position, and this is implemented by
keyboard circuit.

Light test used to test the status of lights on the


key keyboard

audio alarm according to configuration


loudspeaker
settings

• At the right part of the backboard of FP025-USB-A01, there is a black


plastic stopper. Pull it out, and there is the dial switch to match the version
of configuration software. If set the dial switch to the A direction as shown
in Figure 4.1.2-3, the dedicated operator keyboard is designed for MACS
V5.2.3, MACS V1.1.0, MACS V5.2.5B etc. If set the dial switch to the B
direction as shown in Figure 4.1.2-3, it is designed for serial of SmartPro
3.1.3, MACS V4.5.1 etc. For MACS V5.2.5B, please switch to the A
direction.

• When connect FP025-USB-A01 to the USB port of a mainframe box,


please use the USB port at the back of the mainframe box, otherwise, the
USB port at the front of the mainframe box may cause a low and unsteady
power supply to FP025-USB-A01.

• For the default drivers of some Lenovo Server which have been installed
may conflict with FP025-USB-A01, so when you found this happened,
please uninstall the default drivers in the Server, and install the driver for
FP025-USB-A01 provided in installation package.

The following functional description is based on dedicated operator


keyboard 1. Refer to Table 4.1-2 for the relationship about dedicated
operator keyboard 2.
3. Trackball
Trackball can be used to select basic function or function menu, if basic
function key is selected. The figure is switched to the corresponding basic
424
SECTION 4Online Operation

function, if function menu is selected. The operator can select basic


functions in this window to switch figure display. Once the basic function is
selected, the menu window closes up automatically.
Applications of trackball are:
 Select base figure procedure system

 Select tags on flow chart and analog chart

 Select buttons on the second sub-figure screen

 Display and close the important information tips

 Close window figures

4. Softdog
To ensure the continuous and stable operation of online operation system,
Softdog must be configured in corresponding OPS. Otherwise, the
online operation system will last 2 hours and exit then.
The relation between softdog and online operation system:

 In OPS, if softdog is plugged in, online operation system runs normally;

 When unplugging softdog in running or does not plug in when starting,


the system will prompt Can’t detect the softdog, as Figure 4.1.2.1
shows. If softdog is still not plugged in after retry 3 times, system
turns to trial status, and will quit in 2 hours automatically. Click button
Cancel, and plug in softdog, online operation system could be
restarted.

Figure 4.1.2.2 Softdog tips

 If replug in softdog before quit, and click button Retry, OPS will be
rerunning normally.

According to limit of database tags, there are 3 softdog levels in this system:
3000 tags, 6000 tags, 30000 tags, the selected tags number of soft cannot be
less than the total number of tags in project. For the number of data tags,
425
SECTION 4Online Operation

please check total number of project tags which is prompted in compiling of


system configuration in project.

4.1.3 Startup and Login of OPS


1. Startup and configuration of OPS
Comply with the standard boot order, boot peripherals first, then the host.
Please do OPS online configuration after login the desktop of the
operating system, and before starting OPS.
Select [All Programs] \ [ MACS ] \[MACS_OPS]\[Configuration] in Start
menu to start MACS2001 Settings window as shown in Figure 4.1.3-1:
 Keyboard Settings

In Keyboard Settings tab, set the keyboard configuration, set parameters


according to the actually used keyboard interfaces and the alarm sound.

Figure 4.1.3-1 OPS Configuration - Keyboard Settings

 System Settings

In System Settings tab, set Initial Login Domain, its default value is 0.
The parameters of alarm display mode, title of multi-domain alarm and
switcher reconfirm can also be set as shown in Figure 4.1.3-2:

426
SECTION 4Online Operation

Figure 4.1.3-2 OPS Configuration-System Settings

 Advanced Settings

In Advanced Settings tab, set page name, number and position in initial
figure of online running, as shown in Figure 4.1.3-3. When multi-screen
display card is inserted into your server, the display property should be set
of this computer. Please set the Multi-screen display as Up & Down
when the two screens are arranged vertical, and set it as Left & right if
the two screens are arranged horizontally, as shown in Figure 4.1.3-4 and
Figure 4.1.3-5.then select the corresponding information in Advanced
Settings.

427
SECTION 4Online Operation

Figure 4.1.3-3 OPS Configuration-Advanced Settings

Figure 4.1.3-4 Left & Right Mode

428
SECTION 4Online Operation

Figure 4.1.3-5 Up & Down Mode

The window opened position is related to the display resolution of PC, in


general single screen mode, the setting is current display resolution.
Window Position of window 0 is set as format "coordinate in top left
corner, coordinate in bottom right corner", as "0,0,1280,1024". In
multi-screen Up & Down mode, the Window Position of window 0 is set
as t(he up-left coordinate of window 0, the down-right coordinate of
window 0), for example, (0.1024.1280.1024), Window Position of
window 1 is set as format "coordinate in down-left corner, coordinate in
down-right corner", as "0,0,1280,2047". In multi-screen Up & Down mode,
the Window Position of window 0 is set as t(he up-left coordinate of
window 0, the down-right coordinate of window 1), for example,
(0.1024.1280.2048), the set of other window is similarly. In multi-screen
Left & Right mode, Window Position of window 0 is set as format
"coordinate in top left corner, coordinate in bottom right corner", as
"0,0,1280,1024". In multi-screen Up & Down mode, the Window Position
of window 0 is set as t(he up-left coordinate of window 0, the down-right
coordinate of window 0), for example, (0.1024.1280.1024), Window
Position of window 1 is set as format "coordinate in up-right corner,
coordinate in down-left corner of window 1", as "1280,0,2560,1024".
 Voice Alarm Setting

Switch to Voice Alarm item, set the total number of voice alarm online, the
429
SECTION 4Online Operation

range of which is 0-800, as well as the tag name and station No. (Range is
0-49), Type in database and wav file. Please save the wav file
in …\MACSV\MACSV_OPS\start before setting wav file, as shown in
Figure 4.1.3-6.

Figure 4.1.3-6 MACS2001 Settings-Voice Alarm

• The default value is used when the OPS is not configured.

• After modifying OPS configuration by Configuration, the OPS must be


restarted.

2. Start OPS
Select [MACS] \[MACS_OPS]\[Start OPS] in Start or start from shortcut of
Start OPS on the desktop.
If the OPS program is installed correctly, it will access OPS figuration
figure with default monitoring level. Before the sever starts, the application
system is not in the real running state. And the OPS displays static data,
all functions can’t be called correctly.
If the project is sole, the system will access to the main menu of this
project, if there are multi-domain projects, the user can select the desired
project, the way is: in ENG Functions in main menu, select Select
Domain button to access Set Current Domain window as shown in
Figure 4.1.3-7, select the domain and click OK to access the main page of
the selected domain.

430
SECTION 4Online Operation

Figure 4.1.3-7 Select Domain

• The three preconditions should be met before OPS starting online running:

 OPS daemon process runs normally;

 Sever runs normally;

 The download file of OPS is the same as Server (with same version
number).

• The OPS must manually logout and restart after the following
modifications:

 Download new project to OPS (project with a different name from the
current one);

 Project domain number is modified;

 The system device information in hardware configuration is modified.

Multi domain setting should be set in Config->System setting, please


refer to the contents about Config above. In OPS running figure, there are
multiple alarm tips areas in the header, as shown in Figure 4.1.3-8:

431
SECTION 4Online Operation

Figure 4.1.3-8 OPS-Alarm Tips-Multi Domain

From left to right, the alarm tip buttons of corresponding domain lays out
with domain number from small to big. The red rectangle box identifies the
alarm tip area of the two domains, the left one is domain 0 and the right
one is domain 1.
3. User login
The user should get the privilege and its corresponding password first and
login, then the operations related to privilege can be done.

Press Login on dedicated operator keyboard, or select Login in ENG


Functions in the main menu, the login window is shown as Figure 4.1.3-9,
please input the corresponding user name and password, then click OK to
access OPS.

Figure 4.1.3-9 User Login

If the dedicated operator keyboard is not installed, the initial privilege will
be 0 as the default one after OPS was started. Otherwise, the privilege will
be as the keyboard privilege lock indicates.
The privilege lock is hardware lock, the user can plug in the key and turn it
to different positions for the system to identify four operation levels, which
are Privilege 1, Privilege 2, Privilege 3 and Privilege 4 as clockwise, the
corresponding status light of the key position will be lighten.
If the operation privilege on flow chart figure is set, this operation can be
done after the users login with corresponding privilege.

• Please notice to add operation privileges for the engineer if the operation
privilege is set on the figure, if not, the engineer cannot do this operation
even after login.

4. Operator privilege

432
SECTION 4Online Operation

After the server is started normally, the default OPS login level is
monitoring level, if not set other user name and password in User
Configuration, there is a default engineer user can login:
 User Name: hollymacs

 Password: macs

After login with this user name and password, new user can be added by
opening User Management in ENG Functions, the user name and
password are saved in the server, they need to be reset if the install
program of the sever is updated.

• The server must have been run before user logged in the OPS. Otherwise,
users of any level cannot login.

• After start OPS, first login the working domain, then login the management
level, there are three levels to choose: monitor, operator and engineer,
enter correct user name and password to login.

The main differences of different monitoring levels are:


 Monitoring level: can only monitor system data and view figures,
cannot do any operations and modifications on system.

 Operator level: can view operations on field in monitoring interface,


and start device, modify actuator output and settings, confirm alarm
and print report, etc. This privilege is suitable for qualified DCS
operators.

 Engineer level: can modify important parameters like PID of control


system; can exit the system. Can make maintenance on the system,
add and delete operators; modify the privilege and password of
operators and other special system functions. This privilege is suitable
for DCS system maintenance staff.

The operation levels and content are shown in Table 4.1-3:


Table 4.1-3 Operation Levels and Content

Operation level
Monitor Operator Engineer Remark
Operation content

433
SECTION 4Online Operation

Monitor √ √ √

Alarm confirm √ √

Control
manipulator √ √
regulation

"Graph
management" √ √ √
menu

"ENG Functions"

menu

"General functions"
√ √ √
menu

"Trend" menu √ √

Technical alarm
and device alarm in
this menu can be
viewed by users of
"Table" menu √ √ monitor, operator
and engineer, but
the force table can
be view only by
engineer.

SOE Log/Device
√ √
Log

"All Log" √

"Operation Log" √

4.1.4 System Figure Layout and Menu Introduction


In OPS, the system is composed of header menu bar, main figure display area

434
SECTION 4Online Operation

and footer information area, they are introduced in the following.

4.1.4.1 System Figure Layout

The monitor screen can be divided into 10 areas as shown in Figure 4.1.4-1:

Figure 4.1.4-1 Monitoring interface

The functions of the 10 areas are:

 Area I

Main menu of the toolbar, it is the buttons on toolbar in the header, click
each button to display the corresponding function menus, then the
corresponding system figure is shown or the operation window pops up.
 Area II

Project description area, displays current Project Description, it can be


achieved by offline configuring database of "SYSNAME" category, can be
modified in database table or by Project->Change Project Description
in Database Configuration Software.

435
SECTION 4Online Operation

 Area III

Alarm tips area, it includes technical alarm, device alarm and SOE log. If
there is new alarm information, the corresponding button blinks with red
color. If the alarm is recovered, the button is red without blink. If there is no
alarm, the button is gray. Click the button to access the corresponding
monitor window. Click Alarm Display button, the main figure switches to
Technical Alarm window; click button, the main figure switches
to Device Alarm window; click button, the main figure switches to
SOE Log window.
 Area IV

Time and version area, it displays the name of this OPS, current system
time (or the running time length of the current OPS) and the software
version number of current MACS system. Click this area the display
content changes between Current System Time and Running Time
Length of the Current OPS.
 Area V

LOGO area, it displays the developer logo of this system.


 Area VI

Alarm light area, it displays the recent 10 alarm information, and they are
arranged from top to down, from left to right according to time order. The
alarm information displays in different blink rectangles according to the
different alarm status, as shown in Figure 4.1.4-2:

436
SECTION 4Online Operation

Figure 4.1.4-2 Alarm Indication

This alarm bar can be displayed and hided according to the operations in

Show Alarm Bar in Graph Management . If the Show Alarm Bar


displays before it is selected status, the alarm bar will be displayed,
click the command again, the selecting identification disappears, the
alarm bar will not be displayed and the graph area moves up.
 Area VII

Operation log display area, it displays the updated operation log


information. The operation log and OPS information display area in the
right can be displayed and hided according to the operations in

Information Bar in Graph Management .


 Area VIII

OPS information area, it displays the computer name, login domain


number, station number, login level, privilege and the memory using
information of OPS.

437
SECTION 4Online Operation

 Area IX

Main figure area, the windows in this area display different contents
according to the main menu, such as procedure flow chart, log information,
alarm information, etc.
 Area X

Status bar area. It displays the current user level, privilege, domain
information, and the identification of current master and slave server, if the
sever is offline, the identification is displayed as with blinking.
Click server identification, the server status window pops up as shown in
Figure 4.1.4-3:

Figure 4.1.4-3 Server Status

Server with blue color is master server, the yellow one is slave server, red
represents fault (includes that the server is not running), * represents
currently selected domain number.
4.1.4.2 Toolbar Menu Introduction

The toolbar in the footer is shown as Figure 4.1.4-4, from left to right, their
functions and applications are introduced briefly in the following.

Figure 4.1.4-4 Toolbar

1. System menu

438
SECTION 4Online Operation

Button icon:
Click System icon, the system menu pops up as shown in Figure 4.1.4-5,
the title is System, the function of this menu is to quit system, prompt
version information and display online help.

Figure 4.1.4-5 System Menu

 Quit system: Quit OPS.

Select Quit System command, quit in engineer level, the tip dialog pops
up as shown in Figure 4.1.4-6, click Yes, the reconfirmation dialog pops
up as shown in Figure 4.1.4-7, click Yes to quit the OPS.

Figure 4.1.4-6 Quit Dialog

Figure 4.1.4-7 Quit Reconfirmation Dialog

If the user login the OPS with monitoring level or operator level, the Quit
System in System menu is disabled and shown as gray, as shown in
Figure 4.1.4-8:

Figure 4.1.4-8 Quit Command is Disabled

439
SECTION 4Online Operation

 About: Display the version information of MACS system.

Select About, the About MACS dialog pops up as shown in Figure


4.1.4-9, the OPS version information is shown, please click OK to close
this dialog.

Figure 4.1.4-9 System Version Information

 Help: Display the online help window of OPS.

2. Page turning button

: Previous page, this button has memory function, it can open all the
pages in sequential order, with this icon the graphic files can be displayed
and switched in order, and the previous flow chart is shown in the current
window.

: Next page, this button has memory function, it can open all the
pages in sequential order, with this icon the graphic files can be displayed
and switched in order, and the next flow chart is shown in the current
window.
3. Graphic management menu

Button icon:
Menu command: click Graphic Management icon, the system menu pops
up as shown in Figure 4.1.4-10, the title is Graphic Management, the
function of this menu is to open and switch the graph, display and hide the
sub windows of operation page.

440
SECTION 4Online Operation

Figure 4.1.4-10 Graphic Management Menu

 Graph list: Show base graphs.

Click this command, the Active Base Graph dialog pops ups as
shown in Figure 4.1.4-11, the dialog lists 8 splitter windows and the
names of graphic files saved in cache which have been shown in the
windows, double click the file items in the list, the corresponding
graphic files will be shown in their windows.

Figure 4.1.4-11 Active Base Graph List

441
SECTION 4Online Operation

To support multi-window display function, the OPS setting should be


modified in Configuration Tool.

 Main graphic: Open assigned main graphic files

With this menu the main graphic file will be shown in the current active
window, this main graphic file is the file with name "main.hsg".

 Open base graph: Open the assigned graphic files.

With this command the Open graphic files dialog pops up as shown
in Figure 4.1.4-12, in this dialog, the user can open all the graphic files
with suffix ".hsg" in the project.

Figure 4.1.4-12 Open File

• Only the users with engineer level can use Open Base Graph command.

442
SECTION 4Online Operation

 Reopen: Refresh the graphic file in cache.

 The graph opened in OPS is saved in cache, it is get from cache when
reopening it, the cache has a fixed size, so the previous graph will be
covered by the followed one, if the graph has been modified, the
displayed graph will still be the one in cache without modification, only
when the cache is full and the graph is covered, the graph will be
refreshed when reopening it. So if the initial graphic file is modified,
please click Reopen icon, this graphic file in the disk will be recalled to
cache, then the user can view the updated graph.

 Reopen all

Clear the graphs in cache, recall all the graphic files in disk and display
main page.

 System graph

With this menu the system status graph will show in current active
window, as shown in Figure 4.1.4-13:

Figure 4.1.4-13 System Graph

443
SECTION 4Online Operation

 Print Screen

With this menu, the graph in current window will be sent to printer to
print.

 Show Alarm Bar

If this menu item is selected as in front of it, the alarm bar will be
shown in current screen, as shown in the VI area below the toolbar in
Figure 4.1.4-14; if there is no in front of the menu item, the alarm
bar will not be shown in current window.

 Information Bar

If this menu item is selected as in front of it, the information bar will
be shown in current screen, otherwise, the alarm bar will not be shown
in current window.

Click the information bar, the user can drag it to the other place of the
window, click the close button on top of this window to hide it. Or
double click this information window, the window will go back to the
right of the main window automatically.

 Alarm Sound

During connecting the dedicated operator keyboard, If this menu item


is selected as in front of it, the system will be send up alarm sound
if there is alarm information, otherwise, the alarm sound is closed.

 SOE Sound

During connecting the dedicated operator keyboard, If this menu item


is selected as in front of it, the system will be end up alarm sound
if there is SOE variable information, otherwise, the SOE sound is
closed.

4. Engineer Functions

Button icon:
Menu command: click engineer icon ,the system menu pops up as shown
in Figure 4.1.4-15, the title is ENG Functions. All the menu items are
enabled when the login user is in engineer level, users with other levels
can use Login, Simulation Keyboard and Select Domain.
Please see detailed functions of each menu item in "4.2.4 Engineer

444
SECTION 4Online Operation

Function".

Figure 4.1.4-15 Menu Engineer Functions

5. General Function

Button icon:
Menu command: The general function menu is shown in Figure 4.1.4-16,
the functions are variable group, basic system, post trip, or report print,
please see the detailed functions in chapter 4.2.4 General Function.

Figure 4.1.4-16 Menu General Function

6. Trend

Button icon:
Menu command: The system menu is shown as Figure 4.1.4-17, the trend
related menus are shown, the user can switch to trend curve display page
or define trend group, please see details in "4.2.5 Trend".

445
SECTION 4Online Operation

Figure 4.1.4-17 Menu Trend

7. Table

Button icon:
Menu command: The system menu is shown as Figure 4.1.4-18. The user
can access technical alarm, device alarm or force table page. Please see
detailed functions in "Table 4.2.2 ".

Figure 4.1.4-18 Menu Table

8. Log

Button icon:
Menu command: The system menu is shown as Figure 4.1.4-19, the user
can access All Log, SOE Log, Operation Log or Device Log, please see
detailed functions in "4.2.3Log".

Figure 4.1.4-19 Log Menu

• The functions described above are the ones that can be operated by users
login with engineer level, if the users are monitoring level or operator level,
the menus corresponded with the level are displayed, the disabled
operations are gray.
446
SECTION 4Online Operation

4.2 Function Instruction of OPS


4.2.1 Simulation Flow Chart
1. Introduction
The flow chart is used to display main procedure flow and related dynamic
information. Each chart can display 1024 dynamic tags and call 30
operation panels at most. The users can configurate the flowchart in
accordance with their needs.

Figure 4.2.1-1 Dynamic Data Display

The flow chart is composed of background chart and dynamic information.


Dynamic information includes analog values and digital values display, it
can be labeled, the labeled description of tag is displayed when the mouse
is on dynamic tag, as shown in Figure 4.2.1-1. The analog values can be
displayed in number or in bar chart; the real-time state of digital value can
be displayed in different figures or symbols, hot point can be set in flow
chart to call another chart.
If the data displayed in each flow chart: with "U", this data is invalid data;
with "M", this data is force data; with "?", this data is suspicious data. The
data in flow chart will blink if it is invalid.
The refresh cycle of dynamic element in the chart is 500 ms. The flow
chart displayed can be output to assigned printer or file by printing screen.
2. Calling of flowchart
There are four ways to call simulation flow chart:
 Menu call

No matter what state the previous session operation is, once the Menu
key is pressed, the flow chart main menu figure will be shown on the
screen, the user can select a chart to display.
 Active window display

Select Graph List or Open Base Graph in Graph Management, and


select the desired page name in the popup dialog, the corresponding
figure will be displayed.

447
SECTION 4Online Operation

 Auto figure display

No matter what state the current figure is, the system will push a key figure
if the specific event occurs. The relation between the specific event and
the figure can be defined in function block configuration.
 Hot point call

Multiple hot points can be defined on each figure when configuration, the
operator can switch to corresponding figure by hot point.
If the option of check operation level is selected in interactive feature
configuration, then the operation privilege will be checked first before
operating on dynamic object. If the operation is permitted, the user is
operator level and this object is defined to check operation level, the
operator’s user name and password need to be checked, or else, the user
can’t do operation. The operator name is recorded in operation log.
Engineer level or objects without checking operation level do not need to
be checked, the operator name field in operation log is "Engineer" or
"Operator".

4.2.2 Table
In OPS online system, if the system alarms, the OPS will issue alarm sound
through PC audio device to make caution to the operator. The alarm display
area and alarm tip area are blinking in the monitor, there are several ways to
view alarm information by accessing to alarm monitoring interface:

 By Table menu command: table menu corresponds with alarm


monitoring function. Alarm monitoring is to concentrate monitor the

alarm information of IO tags, devices or events. Select icon in


toolbar, the Table menu pops up, the user can access technical alarm,
device alarm and force table.

 By alarm tips area: the alarm indication button is blinking if there is an


alarm, click this button, the user can access to the corresponding
technical alarm, device alarm and SOE log.

The alarm monitoring contents are:

 Alarm content

It includes analog over-limit alarm, digital switch alarm, and system device
alarm.
 Alarm levels

Analog has four alarm levels. Each of them is displayed in different colors

448
SECTION 4Online Operation

as shown in Table 4.2-1. Alarm sounds are classified as four sounds


according to alarm levels. Digital is switch alarm, it has one alarm sound.
Table 4.2-1 Colors Corresponds Alarm Levels

Status Colors

Alarm level 4 Green

Alarm level 3 White

Alarm level 2 Yellow

Alarm level 1 Red

 Alarm display

It is in alarm display area (see in section VI of function area) and alarm


tips area (see in III section of function area).
 Alarm display area

See in section VI of function area, the alarm information displayed here


are the alarms which have happened but not have been confirmed, the
alarm amount is 10, the newest one lays first, the next one will cover the
former one, the alarm not been confirmed will blink, its color is determined
by the color of configured alarm level. Click the alarm bar to confirm the
alarm information.
 Alarm tips area

See in section III of function area, there are technical alarm, SOE (log),
device (alarm), the alarm tips area is blinking if there are alarms which
have happened but not have been confirmed, the color of alarm display
and device alarm is red, when SOE blinks, click tips area, the SOE Log
figure is displayed.
 Alarm confirm

There are Line Confirm and Page Confirm. The records of alarm recover
will be deleted after confirmation, but the records of alarm will stop blinking.
If any record is deleted, the screen display will adjust automatically. The
alarm confirmation will affect the alarm monitoring information status of
other displayed OPS.

449
SECTION 4Online Operation

 Alarm response time

Alarm response time is 1s.

• Page Confirm is valid to the alarm monitoring information displayed on


current screen, e.g. records 201-230 are being displayed on screen, the
alarm confirm is only valid to these 30 records.

The specific operations in monitoring figure of alarm information are introduced


in the following.

4.2.2.1 Technical Alarm

Pressing Alarm monitoring key on dedicated operator keyboard or select


Technical Alarm in menu Table, the alarm monitoring interface is
displayed on screen as shown in Figure 4.2.2-1.

Alarm information

Alarm number

Operation button

Figure 4.2.2-1 Alarm Display Window

450
SECTION 4Online Operation

The two parts of technical alarm figure are: alarm information display area and
screen button area.

1. Alarm information display area


The information are displayed in information output format
It is displayed in time format as default:<Alarm occur time><variable name
and property><variable description symbol><alarm value or status when
alarming>
The alarms are displayed in different colors according to their alarm levels
by default, all the alarm information is arranged by their order.
Digital alarm is divided into 0->1 alarm and 1-> 0 alarms; Analog alarm
has four types: LL alarm, L alarm, H alarm and HH alarm.
If there is alarm information displayed on alarm monitoring interface, this
information blinks in corresponding color, and issues sound in the same
time.
One page of alarm monitoring can display 64 pieces of information at most.
They are displayed in tracking mode as default. If the information number
is over 32, the earliest alarm information shifts out the screen upward, and
is saved in corresponding alarm buffer, the figure is real-time updated, the
user can query all the alarm information in buffer by scroll bar, the scroll
bar scrolls upward, it can scroll over a screen or a record, the status on
top of the figure will switch from track mode to history mode if the scroll
bar scrolls upward over a screen.
2. Screen button area
Query alarm information in different ways by the operation buttons below
the screen.
The buffer size is 570, alarm information are saved in form of cycling
queue, it they are over 570, the new information will cover the oldest.
Alarm monitoring can at most display 570 pieces of information in track
mode. The alarm information will be deleted from buffer after recovered
and confirmed.
The instructions of keys in alarm display screen button area are:
 Query mode

 Time

Set date and time in time setting box, the format of date is:
Year-Month-Day, format of time is: Hour: Minute: Second, as shown in
Figure 4.2.2-2, all the alarm information before this time will be
displayed on current figure after this setting is completed.

451
SECTION 4Online Operation

Figure 4.2.2-2 Set Time

 Alarm level

If Filter by Alarm Level is selected, the alarm information is classified


as class 1, 2, 3, 4 and displayed, the alarm colors can be set in the
system configuration. As shown in Figure 4.2.2-3:

Figure 4.2.2-3 Alarm Information Filtered by Alarm Level

Set alarm level by the dropdown menu of


alarm level.

 Operation

The user can do operations like confirm, print, disable alarm sound on
alarm information, the operations are:
452
SECTION 4Online Operation

 Line confirm

If alarm information are displayed on the monitoring interface and


blinks, please click Line Confirm in the toolbar below or press Line
Confirm key on dedicated operator keyboard, the blink stops; if this
alarm is recovered, the alarm information on monitoring interface
switches to alarm recover information and blinks, select this line and
click Line Confirm in the toolbar below or press Line Confirm key on
dedicated operator keyboard, this recovered information is deleted
from the monitoring interface.

 Page confirm

Page Confirm is limited to confirm the information on current screen.


The way and result is similar to Line Confirm. That is if there are
multiple alarm information blinking on current screen, they will stop
blinking after confirmation; and the recover information is deleted
automatically after Page Confirm on the toolbar or dedicated operator
keyboard has been selected.

 Print

Click Print button, the print dialog pops up, the alarm information on
current figure will be printed.

 Disable alarm sound

Enable or disable the alarm sound with Alarm Sound or SOE Sound
in Graph Management menu.

• The instructions of function keys on alarm monitoring toolbar are: Users


with higher level than operator level can operate all the function keys.
Monitor level can do print and disable alarm sound operation.

• Users with monitor level cannot do alarm confirm operation.

• Operator cannot do alarm print operation

4.2.2.2 Device Alarm

Press Device Alarm key on dedicated operator keyboard or select Device


Alarm in Table menu, the device alarm information is displayed on screen,

453
SECTION 4Online Operation

as shown in Figure 4.2.2-4 . Record alarm information of device, the related


operations are the same as technical alarm, please see descriptions of
operation buttons in chapter 4.2.2.1

Device alarm information

Figure 4.2.2-4 Device Alarm

4.2.3 Log
The log is to record all the events of machine set, and saved by their
occurrence order, in mature; the events essentially are the deviation of digital
and analog.

The log is classified as: All Log, SOE Log, Operation Log, and Device Log.

The contents recorded by log is: all event information recorded in table,
parameter setting event in OPS, alarm monitoring, test alarm and timing, all
these information is recorded in All Log, then recorded in specific log class
according to its property.

There are two log display modes: track mode and history mode. Track mode is
to display the recent information. History mode is to display the information
occurred in the past by scroll bar, and the user can view by page.

454
SECTION 4Online Operation

4.2.3.1 All Log

Press All Log key in dedicated operator keyboard or select All Log menu in
toolbar, All Log is displayed in screen as shown in Figure 4.2.3-1.

There are several types of information in All Log buffer, and each piece of
information occupies one line of the screen. Each piece of information includes
time and most of the information includes IO tag name and description, the "*"
before tag name indicates that this IO tag has property of simplified log, this
property is configured in the corresponding database.

All log buffers is a circular buffer with size of 30000, this buffer is empty when
the system is booted, and the logs recorded at the head will be deleted if the
logs number in buffer exceeds 30000. The recent system event information is
always on the log display figure.

Information number
Log operation buttons All log

Log operation buttons

Figure 4.2.3-1 All Log

There are three parts of All Log display screen: title display area, information
display area and operation button area.

1. Title display area

455
SECTION 4Online Operation

(1) Log name: All Log.

(2) Numerical information in the right of title line: the first information is the
number of that day with format is: serial number of that day/ total
number of that day.

2. Information display area


Display event information in information output format. Description: log
page is used to query the record information of system, includes:
 All log: Display information of all logs.

 SOE: Record SOE log information.

 Operation log: Record log information of all operations. Information


modification includes: disable and force variable, analog alarm limits
modification, parameter modification, request stop, request archive,
basic system test status modification, alarm property modification.

 Device log: Log information of system device including device default


information of PC system (components and peripherals).

• In log information area, click one line of the information, the selected
information is marked as blue background and white font.

The logs defined in system and their sizes are shown in Table 4.2-2:

Table 4.2-2 Log Information Size Table

Log
Operation Device
All Log SOE Log
Log Log
Size

Information
 0000 2000 10000 1000
area size

3. Operation button area


 Mode: The log mode switch button is displayed in the left top of log
information-"Track" and "History".

 Track
456
SECTION 4Online Operation

Press Track button, the recently occurred system events are displayed
in log display figure. In default condition, the Track button is enabled.

 History

Press History button, the All Log information meet query filter
conditions will be displayed in log figure, and it can be viewed by
dragging scroll bar.

 Query: The log query button is displayed in the bottom of log


information, and the query condition can be used in combination.

 Time

The starting time of query can only be set in History mode, press
History button, history mode is accessed to, then select
, the filter by time is enabled. Starting time box turns
from gray(disabled) to black(enabled). Please set starting time in front
of the arrow, and the ending time at back of the arrow, as shown in
Figure 4.2.3-2:

Figure 4.2.3-2 Select Time

Once the setting is completed, the current alarm information is


displayed according to the selected time segment, as shown in Figure
4.2.3-3:

457
SECTION 4Online Operation

Figure 4.2.3-3 Filter Log Information by Time

• Notice that the ending time must be after starting time, or else, the query
operation cannot be done correctly.

 Tag name

Filter by tag name is enabled when is selected. Click


Custom Query Tag, the Customize Log Tag dialog pops up as
shown in Figure 4.2.3-4:

458
SECTION 4Online Operation

Figure 4.2.3-4 Select Tag Dialog

Click forward arrow , the basic system and its variables box shows
up, the basic system names in current system are displayed in Basic
System box, click basic system name, its Tag Name and Description
are displayed in the following Basic System Variables, they can be
viewed by scroll bar.

Click a line of Tag Name, the selected tag name is displayed in Tag
Name Setting box in the left top corner of Customize Log Tag dialog
as shown in Figure 4.2.3-5:

459
SECTION 4Online Operation

Figure 4.2.3-5 Set Tags

Click Add, the tag in tag name setting box will be added to Tag List,
please add the tags to view one by one, as shown in Figure 4.2.3-6.
Also the user can type the entire tag name in Tag Name Setting box
and then add it to Tag Name List.

460
SECTION 4Online Operation

Figure 4.2.3-6 Tag Name List

After setting, please click close button to close the dialog, the log
information of selected tags are displayed in log information area.

• Notice to keep conformity with the tags in database when manually input
tag name, and fuzzy query is not supported here; the tag name is case
insensitive.

• Click tags in Tag Name, the selected tag is with blue background and white
font, the user can click several times to select multiple tags, click Del
button to delete the tags from Tag Name List. Click the selected tag name
again to cancel its selected status.

• 20 tags can be selected at most when query by tag name, or else, the tip
box is shown as Figure 4.2.3-7:

461
SECTION 4Online Operation

Figure 4.2.3-7 Number Limit Tip Box in Tag Name Query

 Alarm level

Filter by alarm level is enabled and the dropdown list of alarm level is
enabled when is selected. Then the log
information of current figure is displayed by alarm level as level 1, level
2, level 3 and level 4.

The query mode enabled in each type of log is shown in Table 4.2-3:
Table 4.2-3 Query Mode of Logs

Log Category
Device Operation
All Log SOE Log
Log Log
Query Mode

Query by Alarm
√ √ √ √
Level

Query by Tag
√ √ √ √
Name

Query by Time √ √ √ √

 Other operations

 Print

Click Print button at left top corner of log information, and if the print
request is send successful, it will pop up a message box as shown in
Figure 4.2.3-8, then the user can select the print file saving path
according to the printer setting.

462
SECTION 4Online Operation

Figure 4.2.3-8 Select Printer

 Close log window

Click Close button to close the log window, or switch to other


window by buttons in toolbar, the log window will close automatically.

4.2.3.2 SOE Log

SOE log is to display the information of digitals with SOE property.

Each piece of information in SOE log occupies one line, each piece of
information includes time, and most of information includes IO tag name and
description.

The information is blink and there is alarm sound if any alarm information
occurred in monitoring interface.

SOE log buffer is a circular buffer with size of 2000, this buffer is empty when
the system is booted, and the logs recorded at the head will be deleted if the
logs number in buffer exceeds 2000.

Press SOE Log key in dedicated operator keyboard or select SOE Log in
toolbar, the system will access SOE Log, and SOE alarm figure is displayed on
screen, as shown in Figure 4.2.3-9.

463
SECTION 4Online Operation

Figure 4.2.3-9 SOE Log

There are three parts of SOE log: title display, information display area and
operation button area.

1. Title display
(1) Log name: SOE log.

(2) The first information is the sequence number of that day with format is:
sequence number of that day/ total number of that day.

2. Information display area: Display event information in information


output format.
3. Operation button area: Please see operation instructions in “4.2.3.1All
Log”.
4.2.3.3 Operation Log

Operation log records the operation record information of operator and alarm
information of tags be configured with operation record property.

Press Operation Log in dedicated operator keyboard or select


Operation Log in toolbar, the system accesses to Operation Log figure as
464
SECTION 4Online Operation

shown in Figure 4.2.3-10.

Figure 4.2.3-10 Operation Log

Operation log buffer is a circular buffer with size of 1000. This buffer is empty
when the system is booted. The logs recorded at the head will be deleted if the
logs number in buffer exceeds 1000.

The display format of operation log is date, time, device tag name, tag
description, current value and OPS no.(in bracket).

There are three parts of operation log: title display, information display area
and operation button area.

1. Title display
(1) Log name: Operation log.

(2) The first information is the sequence number of that day with format is:
sequence number of that day/ total number of that day.

2. Information display area: Display event information in information


output format.
3. Operation button area: Please see operation instructions in “4.2.3.1All
465
SECTION 4Online Operation

Log”.

• Operation log records current value of operation, the system will record the
return value of the operation automatically.

4.2.3.4 Device Log

Device log records the fault information of OPS device.

Press Device Log in dedicated operator keyboard or select Device Log


in toolbar, the system accesses to Device Log figure as shown in Figure
4.2.3-11

Device log buffer is a circular buffer with size of 1000. This buffer is empty
when the system is booted. The logs recorded at the head will be deleted if the
logs number in buffer exceeds 1000.

Figure 4.2.3-11 Device Log

466
SECTION 4Online Operation

There are three parts of operation log: title display, information display area
and operation button area.

1. Title display
(1) Log name: Operation log.

(2) The first information is the sequence number of that day with format is:
sequence number of that day/ total number of that day.

2. Information display area: Display event information in information


output format.
3. Operation button area: Please see operation instructions in Section
“4.2.3.1All Log”.

• The condition of exit OPS online or OPS is not in this domain is device fault
alarm in this domain, and the fault is displayed on node.

4.2.4 General Function


Variable group: This menu is to view the information of selected variables in
group, please see details in “4.2.4.2Variable group”.

Basic system: This menu is to view the variable information in selected basic
system in list format, please see details in “4.2.4.1Basic System”.

Report request print: This menu is to view the print status of configured report,
and do print operation; please see details in “4.2.4.3Report Quest Print”.

Select icon in toolbar, the General Functions menu pops up. It includes
basic system, variable group, report request print, the detail function of each
page is shown in the following.

4.2.4.1 Basic System

Press Basic System key on keyboard or Basic System menu in toolbar, the
system accesses to Basic System figure, the basic system information
defined in database, as shown in Figure 4.2.4-1:

467
SECTION 4Online Operation

Title bar
Print Button

Basic system name

Page turning Button

Page turning button


Selection items Variable information

Figure 4.2.4-1 Basic System

There are four parts in basic system: title display, basic system information
display area, basic system variable information display area, and filter button
area.

1. Title display
The title of this page is Basic System, and there are Print Basic System
and Print Basic System Variable button, and close button.
 Print basic system

With Print Basic System button, all the basic system groups can be
printed, and the printer can be set in Print Setup in ENG Functions.
 Print basic system variable

First select the basic system name to be printed, click Print Basic
System Variable button, all the basic system variables can be printed,
and the printer can be set in Print Setup in ENG Functions.
2. Basic system information display area
Display the basic system name compiled in current database, only the first

468
SECTION 4Online Operation

four characters are displayed. in the middle left is page turning


button, current sub system number and total tag number in system are
displayed in message box .
3. Basic system variable information display area
Display tag information in current basic system with format: <Number>
<Tag name> <Tag description> <Current value>. And "sub system
number" and "total tag number in system" are displayed in the right,
4. Filter button area
Instructions of function keys of toolbar in basic system display figure are:
 All: Display all basic systems in this project, open all basic system
groups in default.

 Analog: With this button, only the analog basic system groups are
displayed.

 Digital: With this button, only the digital basic system groups are
displayed.

4.2.4.2 Variable group

Variable group is used for field staff to read meter, there are two display modes:
numerical mode and graphic mode, the default one is numerical mode. Select
Variable group menu in General Function , the dialog pops up as shown
in Figure 4.2.4-2.

469
SECTION 4Online Operation

Variable information list

Operation button area

Switch to graphics mode

Figure 4.2.4-2 Variable group

There are two parts of variable group figure: information display area and
screen button area.

1. Information display area


The parameter information is in information output format. 80 information
on one page at most, with number 1-80.
Information is displayed in table format: <Number> <Tag name> <Tag
description> <Current value> <Range upper limit> <Range lower limit >
<Dimension>.
2. Screen button area
 Group No.

Display current group number, it is set from 0.

 Display

Previous Group : Display the variable information of previous


group.

470
SECTION 4Online Operation

Next Group : Display the variable information of next group.


 Group edit

Group edit is to add or delete variables from the current variable group,
click Group Edit button the dialog pops up as shown in Figure 4.2.4-3:

Tag list

Figure 4.2.4-3 Add Group Variable

Enter tag name in Tag Name input box, click Add button, the input tag is
added to tag list. Click Del button, the tag is deleted from tag list. Then

click to close this window.

Also the user can click forward arrow , select tags from the tag
selection window to add, tag selection window is shown in Figure 4.2.4-4:

471
SECTION 4Online Operation

Figure 4.2.4-4 Tag Selection

All basic system names in current system are displayed on top of this
window, the corresponding tag name and descriptions are displayed in the
following basic system variable table.

 Add: First select system name in basic system list, and its
variables will be displayed in basic system variable list. Select the
desired variable and click Add, and then this variable will be added
to this group. A variable group can be added 80 variables at most.

 Delete: Select variables to be deleted in the left list box, then click
Del to delete this variable from this group.

 Operation

 Print

472
SECTION 4Online Operation

Output all variable information of current window in number order to


printer set by system.

 Graphics

Display analogs in current group in bar chart. Click this button, and
then the dialog will pop up as shown in Figure 4.2.4-5. The window can
only display 10 analogs in one page, if the analog number is more than
10, they can be viewed by page turning
button . Click Close button to close this
bar chart display figure.

Figure 4.2.4-5 Variable group Figure Display Window

 Exit

 Click Exit button in Variable group Variable List page to close this
page.

4.2.4.3 Report Quest Print

Report request print is used to print the configuration report. Select menu item
Report Request Print in General Function , the user can set parameters
473
SECTION 4Online Operation

like report name and print time, please see details in "4.2.6.2Report Print”.

4.2.4.4 SOE PostTrip

The main function of SOE is collecting all alarm information of SOE variables.

Press SOE key in PostTrip/SOE area of the dedicated operator keyboard, or


select SOE PostTrip menu in toolbar , the collected information will be
displayed in prompted frame, as shown in Figure4.2.4-6.

Figure4.2.4-6 SOE PostTrip Window

Each piece of information takes a row, including time and other information
which include tag name, description and alarm status.

Click Show, it will popup window as shown in Figure 4.2.4-7.

Figure 4.2.4-7 SOE PostTrip

474
SECTION 4Online Operation

The “#”in the front of record means tag switch of event source, “#”from second
to later mean the tag switch of event source which causes event overlap.

Special situation: alarm recover event is not recorded in SOE; without event
source trigger, tags of SOE are not recorded in SOE.

4.2.5 Trend
There are four types of trend: general trend, digital trend, XY trend and
compare trend.

General trend, digital trend and XY trend can be displayed in Track and
History, the default mode is track mode. In track mode, the figure always
displays the recent history data, and tracks the recent value of IO tags and
status. If the figure is full, the displayed data will be translated and the system
continues tracking, and it is also that time scale and date will change. History
mode is used to display the trend values in an assigned history time range.
The tag values saved in history library of sever which has the same version
with current database can be viewed by turning page operation.

General trend can be displayed in curve mode or digital mode, called Curve
and Value, and the default mode is curve trend display. Digital trend and XY
trend can only be displayed in curve mode.

The user can define custom trend group, and general trend group can include
analog and digital. In analog and digital trend display, trend of 8 IO tags at most
can display in the same time; in XY trend display, 4 curves can display at most.
The displayed ranges of a curve can be amended according to the fluctuation
range of the curve displayed on screen to distinguish the change of curve. This
function of each curve can be enabled or disabled by operator. Compare trend
can display 4 figures, which is used to compare between the trend tags
displayed and entered.

Trend response time: 1s.

Curve is drawn from left to right in time order; the display contents include
variable text description and variable curve trend figure. Different curves are
distinguished by different colors.

In curve display area, X-axis means time range and Y-axis means value range.
The whole X-axis area is divided into four cells. Coordinate on Y-axis is the one
of current curve. Its color is the same as this curve.

4.2.5.1 General Trend

Click General Trend key on dedicated operator keyboard or select General


Trend in menu , the general trend window pops up to display analog and

475
SECTION 4Online Operation

digital trend, the default mode is curve mode, as shown in Figure 4.2.5-1:

Tag information area

Trend curve diagram

Operation button area

Figure 4.2.5-1 General Trend Group Curve Figure

The content displayed on current figure is information of trend sub group. A sub
group has 8 curves at most, and the tags included in this curve can be analogs
or digitals. The display format is: description: group name: group description
initial time of current group data (original point time of the coordinate axis).

Trend figure includes information area and button operation area.

1. Information area: Can be displayed in curve mode or valued mode.


In curve mode, the information area is divided into two parts, the upper
part is tag information area, and the lower part is curve figure.
 Tag information area

 Check box: means display data information of this tag in


figure display area, means not display data information of this
tag in figure display area; In curve display, the number of curves
can be set in this check box to increase or decrease(number of
curves displayed in sub group is less than or equal to 8)

476
SECTION 4Online Operation

 Curve color: Curve color illustration, the information and curve


color of a tag are same;

 No.: Serial number of this tag in sub group;

 Tag name: Its display format is tag name item in database;

 Tag description: Description about this tag, it is conform with


database;

 Select value: History value and quality of the time appointed by


curser;

 Current value: Real-time value of this tag in current moment, or


else, the tag value of curser time will be displayed;

 Dimension: Dimension in database, it is physical unit;

 Upper limit: Upper limit of range in database;

 Lower limit: Lower limit of range in database;

Click a line of information in tag information area, and click Modify Range
to modify range of current curve, then the upper limit and lower limit of the
tag information area about the corresponding curve are modified, the
coordinate upper limit and lower limit also be modified, and the curve
changes as shown in Figure 4.2.5-2 . The upper limit and lower limit here
does not influence the range upper limit and lower limit of database.

477
SECTION 4Online Operation

Figure 4.2.5-2 Tag Information Range Modify

Color of tag information and curve are conformity.


 Trend figure/ data display area

The tag value in setting time is displayed in curve or value mode


according to query mode. In curve mode, time is X-axis and value is Y-axis,
the curve is drawn from left to right in time order, the tags selected in
check box are displayed curve figure in trend figure; in value display mode,
the first row is tag name and the first column is time, curves are
distinguished by different colors.
The X-axis in curve display area means time range, Y-axis means value
range. X-axis scale is set according to Select Time; Y-axis scale is set
according to the upper limit and lower limit of selected tag range.

 X-axis: It is divided into 5 cell, each cell is divided into 4 scales, the
length of X-axis is value in Select Time.

 Y-axis: Y-axis of trend groups have analog tags is divided into 5


cells, each cell is divided into 5 scales. Vertex of Y-axis is the
upper limit of current tag, and original point of Y-axis is the lower
limit of this tag.

478
SECTION 4Online Operation

The variables are distinguished by different colors, colors of variable


textual description and curve color are conformity, and the scale color of
Y-axis is conformed with current tag color and different from other tags
color.
Analog trend is displayed in curve, curve figure of one tag is displayed on
the whole figure area; digital trend is switch figure, the curve is drawn
according to switch value and switch time.
Analog figure area is divided into 8 parts from up to down, each figure area is
separated by white line with number 1-8, and the digitals are displayed in trend
sub group from up to down in order as shown in Figure 4.2.5-3:

Cursor indication

Figure 4.2.5-3 Digital Trend Figure

Right click mouse in curve figure, the curve operation menu pops up as shown
in Figure 4.2.5-4:

Figure 4.2.5-4 Right Click Menu of Trend Figure


479
SECTION 4Online Operation

(1) Curve revert

After shift up and shift down operation, with this command, the curve
can go back to its former position;

(2) Curve shift up

With this command, the curve can move up. The curve moves up once
when this command executes, the move range is 10% of the
measuring range, as shown in Figure 4.2.5-5:

Figure 4.2.5-5 Trend Figure of Shift Up

(3) Curve shift down

With this command, the curve can move down. The curve moves down
once when this command executes, the move range is 10% of the
measuring range.

(4) Show large grid

The background of the trend figure is divided by coordinates, with this


command, the user can show or close large grid, as shown in Figure
4.2.5-6. Selection identification is shown in front of this command
when it is selected, or else, the command is not selected;

480
SECTION 4Online Operation

Figure 4.2.5-6 Trend Curve with Large Grid Background

(5) Show small grid

The background of the trend figure is divided by coordinates, with this


command, the user can show or close small grid, as shown in Figure
4.2.5-7. Selection identification is shown in front of this command
when it is selected, or else, the command is not selected;

Figure 4.2.5-7 Trend Curve with Small Grid Background

(6) Setup of curve display


481
SECTION 4Online Operation

With this command, the Setup of Curve Display dialog pops up as


shown in Figure 4.2.5-8, it can make the curve more clear and print
well to modify related parameters.

Figure 4.2.5-8 Setup of Curve Display

 Modify width of curve and grid: With Width of Curve (1~9) and
Width of Grid, the width of grid and curve can be modified with
range 1~9.

 Colors of background, selection line, grid line, X scale: These


colors can be set separately, click Select, the Color dialog pops up,
and the user can set basic colors or custom colors, as shown in
Figure 4.2.5-9.

482
SECTION 4Online Operation

Figure 4.2.5-9 Color Dialog

 Draw points: Display tag values of each moment, at this time, the
trend is not a continuous curve but a series of points in time order,
as shown in Figure 4.2.5-10:

Figure 4.2.5-10 Point Trend Figure

483
SECTION 4Online Operation

 X axis time grid: The user can select Show Time & Date , Show
Time or Show Relative Time. In Show Time &D ate, the time
format is two lines, the first line is " hh:mm:ss ", the second line is "
yyyy:mm:dd "; in Show Time the format is " hh:mm:ss ", the Show
Relative Time takes original time as 0 moment, its format is "
h:m:s ", as shown in Figure 4.2.5-11:

Figure 4.2.5-11 Relative Time Trend Figure

2. Operation button area


Operation button area is in the right. Select the corresponding menu items
to view desired data information, the items include mode selection, display
mode switch, set time interval, select group, self-define group, etc.
The trend figure is displayed according to different modes and conditions,
the items in operation tool are as shown in Table 4.2-4:
Table 4.2-4 Instruction of Trend Operation Button

Area Button Style Button Function

Display in track mode


Mode
Display in history mode

484
SECTION 4Online Operation

Area Button Style Button Function

Display in curve mode


Display Mode
Display in value mode

Turning "<<" means turn left, that is former data;


Page(valid in / " >>" means turn right, that is next data.
history mode) Click once to turn one page.

Select the group number in drop down


Group
menu, and the group description varies
Number
with the group name.

Select time length and block time needed


by current figure. Time types are 5
minutes(1 second), 10 minutes(2
seconds), 25 minutes(5 seconds), 50
Time Interval minutes(10 seconds), 60 minutes(12
seconds), 4 hours(48 second), 8
hours(96 seconds), 24 hours(288
seconds), they are corresponds with data
length of screen.

Switch Query Query digital switch information

Curve Group
Switch trend group
Selection

Select Query
Set query time in history mode.
Time

Define Query
Define query tag
Tag

Modify the upper limit and lower limit of


Modify Range
current curve.

Output contents of current screen to


Print
assigned printer or files.

485
SECTION 4Online Operation

Functions and instructions of function keys in general trend toolbar are:


(1) Trend group selection

The opened trend group number is displayed in Trend Group No., the
user can select group number with 1~90 in drop down menu of Select
Group, every 8 variable tags form a group.

Click Format, the Decimal Setting dialog pops up as shown in Figure


4.2.5-12. This dialog can only set decimals for analog tags with range
0~3, click OK to confirm setting, the values in tag information area
displays according to this format setting.

Figure 4.2.5-12 Format Setting Dialog

Group Description displays group name according to the fields in


Select Group.

Click Select Group, the dialog pops up as shown in Figure 4.2.5-13,


select group number in drop down list of Trend Group, and click OK to
switch to the selected group.

486
SECTION 4Online Operation

Figure 4.2.5-13 Trend Group Select Dialog

(2) Display mode selection

Click Track or History to access corresponding display mode. In


history mode, the curve stops changing and the page turning button is
enabled, click previous page button , the trend page turns to show
the trend of a time interval previously before the current time; click
to query history trend curves after current time.

Take the 10 minutes time interval as an example, click the left page
turning button, the trend curves 10 minutes before will be displayed, if
the tag values of this time is not recorded in the history library, there
will no display; click right page turning button, the curves 10 minutes
after will be displayed until the time length is less than 10 minutes
since the moment clicking History button.

Click Track in History mode, the track mode is accessed.

In track mode, the time on right end of time axis is current time of
system, set time length according to Select Time (means block time).
The time scale refreshes with curve translation.

Select History mode to switch to history display, the switch time will be
the time on right end of time axis; but, if the user has set start time in
Select Query Time, then this time will be the original point time on the
curve.

(3) Display mode selection

Click Curve or Value in Display Mode to switch display mode.

The trend curve displays from left to right in time order, the values display from
up to down. Select Value, the trend will switch to value display mode as shown
in Figure 4.2.5-14:
487
SECTION 4Online Operation

Back to curve mode

Figure 4.2.5-14 Trend Figure in Value Mode

This window displays the value trend of digitals, the information


between lines has 1 second interval, the user can view value
information by scroll bar. The time at bottom end of trend list is the up
to date time, in history mode, the time at this position is switch time.
Click previous/ next page button to turn trend pages, the page turning
scale is time interval.

• Only general trend can switch display mode (curve/value).

(4) Time setting

The time selected in drop down list of Select Time is the length of
X-axis on screen. The display cycle varies with the different time
intervals.

The time intervals set in different trend pages are different, so as to the
display cycles.
488
SECTION 4Online Operation

 General trend: Time intervals can be set as : 5 minutes, 10 minutes,


25 minutes, 50 minutes, 60 minutes; the cycles are 1 second, 2
seconds, 5 second, 10 seconds, 12 seconds.

 Digital trend: Time intervals can be set as: 12 seconds, 5 minutes,


10 minutes; the cycle is 1 second.

 XY trend: Time intervals can be set as: 5 minutes, 10 minutes, 25


minutes, 50 minutes, 100 minutes, 5 hours.

 Compare trend: Cannot set time interval, the system setting is 12


minutes, with cycle as 2 seconds.

• The maximum time interval of digital trend enabled in system is 10 minutes,


so, if there are analog tags and digital tags in general trend, the time
intervals which can be selected in General Trend are 5 minutes and 10
minutes.

(5) Selected tag time

The time displayed in Selected Time is the cursor time in curve.

The line with white triangular signs at the two ends is selection line, the
white triangle is called cursor, it is used to calibrate the value of a tag in
a certain time, the collection value of this tag is displayed in Select
Value in tag information area, the time of this tag is displayed in
Selected Time.

Click mouse and drag the cursor to change the position of selection
line, the value in Selected Time will change at the same time, and so
as to the Select Value, as shown in Figure 4.2.5-15:

489
SECTION 4Online Operation

Figure 4.2.5-15 Tag Curve

(6) Selected curve

The selected tag name in tag information area is displayed in this


display box, the default name is the first tag name. If there is no
selected curve, the selection line takes the first curve to identify
Selected Time and Selected Curve; click the check box of the first
column in tag information area to select display the curve of this tag or
not; click a record, the Y-axis is changed to the range of this variable
and set this tag as the current selected curve.

(7) Digital switch query

Only in Digital Trend page, the Digital Switch Query button is


enabled. Click this button, the Set Query Condition dialog pops up as
shown in Figure 4.2.5-16:

490
SECTION 4Online Operation

Figure 4.2.5-16 Set Query Condition

Type tag name in Tag Name, here the name is case insensitive, or
type tag no. in Tag No.. Then set begin time and end time, click OK to
finish setting, then the Digital Switch Query window pops up as
shown in Figure 4.2.5-17:

Figure 4.2.5-17 Digital Switch Information

This window displays switch information of this digital tag: tag name,
tag no., tag description, switch number and time range, the event
491
SECTION 4Online Operation

information at switch moment is displayed in list: switch time, tag value,


invalid, suspicious, forbid, force.

Click Set Query Condition to reset the query condition. Click Print to
print out the switch information, as shown in Figure 4.2.5-18:

Figure 4.2.5-18 Digital Switch Information

If the user wants to switch to main page, click button to close this
window.

(8) Select query time

Switch to history mode, the Select Query Time button will be enabled.
Click this button, the Please select time dialog pops up as shown in
Figure 4.2.5-19:

492
SECTION 4Online Operation

Figure 4.2.5-19 Select Time Dialog

Set date and time for the query tag, and click OK, the original point of
curve changes to this time.

(9) Define query tag

Click this button, the Trend List Definition dialog pops up, please see
details in "Figure 4.2.5-20".

Modify range of current curve

Click Modify Range, the Modify Curve Range dialog pops up as shown
in Figure 4.2.5-20:

Figure 4.2.5-20 Modify Curve Range Dialog

Modify the upper limit and lower limit of current curve, the modification
range cannot over 120% of the initial range. After modification, the

493
SECTION 4Online Operation

curve changes according to the up to date upper limit and lower limit,
so as to the Y-axis and curve position on curve figure and Upper Limit
and Lower Limit in tag information area will change, only the display
range is changed, the range value in database will not be changed.

(10) Print curve

Click Print Curve, the Trend Print Request Sending Success


message box pops up as shown in Figure 4.2.5-21, all the contents of
current figure will be printed, and the trend figure type, print date and
project name will be displayed.

Figure 4.2.5-21 Print Trend

(11) Trend floating window

Select General Trend Window in Trend menu , the General Trend


floating window pops up as shown in Figure 4.2.5-22:

494
SECTION 4Online Operation

Figure 4.2.5-22 General Trend Floating Window

This window is smaller than general trend page and is floating, the
user can do maximum, minimum, close, and fix/float operation by
control buttons on title bar, the operations in this window is the same
as General Trend page.

Similarly, Select Digital Trend Window in Trend menu , the Digital


Trend floating window pops up as shown in Figure 4.2.5-23, the
operations are the same as digital page.

495
SECTION 4Online Operation

Figure 4.2.5-23 Digital Trend Floating Window

4.2.5.2 Switch Trend

Click the Digital Value button in dedicated operator keyboard or select the
Switch Trend command in toolbar menu above the screen, then pops up
Switch Trend used to display digital value trend, the default is curve mode, as
shown in Figure 4.2.5-24:

496
SECTION 4Online Operation

Figure 4.2.5-24 Switch Trend

Digital value trend display is similar to general trend display, the differences
are:

 Digital value display in 0/1 mode. 8 curves of digital I/O tags display
uncrossed, Y axis divided for each tag is 0-1 mode.

 Digital value only has curve trend, no digital trend.

 Digital Switch Query can be operated only in digital trend page.

 Real time tracking mode is displayed always in full screen and cannot
be changed.

 Modify current curve range is invalid, because only have 0,1 mode.

 Digital value display cycle for 1 second which will not change
according to time setting.

Other operations please refer to “4.2.5.1 General Trend”.

497
SECTION 4Online Operation

4.2.5.3 XY Trend

Click XY Trend key or select XY Trend command in the toolbar above the
screen, then XY trend curve pops up which displays the value changing of the
two related analog value, as shown in Figure 4.2.5-25:

Figure 4.2.5-25 XY Trend

XY trend display is similar to general trend display, the differences are:

498
SECTION 4Online Operation

 The number of User custom groups for XY trend is 8; each group


contains only 4 curves.

 X,Y axis are both analog value, rather than time value. And X,Y axis
are representative for 2 analog values respectively.

 The screen displays the curves in periods of time set by current time.
Take 5 minutes time setting for example, in track mode, it displays
curves in history time period for 5 minutes. In history mode, after page
turning each screen displays curves in a time interval of 5 minutes.

 Move the selection line to a certain point of X axis, the list at right
bottom of screen will list all Y values corresponding to the tag of the
current curve. Click certain line in the list, then it displays the
production time of the tag in the time frame which above the selection
value list.

 When trend query tag positioning, the display curve is the trend curve
which sets the start point as query time and set length as time setting
in the period.

Other operations please refer to “4.2.5.1 General Trend”.

4.2.5.4 Compare Trend

Click the Compare Trend command in dedicated operator keyboard or select


Compare Trend command in toolbar above the screen, then pops up the
page of compare trend, as shown in Figure 4.2.5-26:

499
SECTION 4Online Operation

Figure 4.2.5-26 Compare Trend

The screen with four compare trend diagram can compare four groups
simultaneously, and the titles are Trend 1~4. The total tags for each default
curve is 301, curve interval is 1, curve display time is 15 minutes, cycle is 2
seconds, UL/LL of display is 100/0, curve color is green, display mode for
track.

Type in the tag name in Input Track Tag edit box and click enter button, then
the certain point curve added into the corresponding small trend screen, which
can insert the compare curve constructed to compare the deviation range of
the curve.

First introduce how to add compare curve, the specific steps are as following:

1. Edit compare curve


First set a reference curve according to the parameter value of the
standard curve, then to compare to the real produced curve. Click

, then pops up Input Contrast Curve window, as


shown in Figure 4.2.5-27:

500
SECTION 4Online Operation

Figure 4.2.5-27 Contrast Curve Setting

Example: add a compare curve

Step 1. Add curve name

Type in compare curve name in Curve Name edit box, the default name is
Expected Curve which can be modified as Curve 1.
Set the UL/LL of curve display in Range edit box, the default range is
0~100.

• Only edit 100 reference curves at most.

Step 2. Plot curve

In Relative Time and Project Value list , it has listed 12 insert tag
information, double click the cells of Relative Time or Project Value to
modify the values. Modifying the tag in curve can add as the key tags in
curve diagram and add wiring between the two tags automatically. The
vertical and horizontal axis value range also follows the related value
setting, as shown in Figure 4.2.5-28:

501
SECTION 4Online Operation

Figure 4.2.5-28 Point Setting on Contrast Curve

The default color of the curve is for yellow. If to modify the curve color click
the Curve Color button on the window, then select the color from the color
panel pops up, the color of the compare curve will correspondingly
changed. If not to close compare curve access window then edit other
compare curves that the last selected color will be used. Only after closed
window, the default color can be used by coordinate axis and curves when
opening Input Contrast Curve window again.

Step 3. Save curve

After adding key tag, click button, then pops up the prompt
box as shown in Figure 4.2.5-29:

Figure 4.2.5-29 Save Prompt Box

Click OK button to save before the close operation, otherwise the just
added or modified information will not be automatically saved. Curve is
saved to the default folder “..\MACSV_OPS\config ” under the installation

502
SECTION 4Online Operation

path of the certain operator, save name as Curve Name.csv, then saves
Curve Name.ref files which please do not delete.
After curve saved, if modify the curve related value again, then pops up
prompt box of whether save the modification when saving, as shown in
Figure 4.2.5-30, click OK button to save the modification.

Figure 4.2.5-30 Save the Modified Content Prompt Box

Click button can preview the curve display.

Step 4. Open curve

After adding compare curve, click Open button then pops up Open dialog
box, as shown in Figure 4.2.5-31:

Figure 4.2.5-31 Open Contrast Curve

Default display for curve default saving path, select the curve name want
to open then click Open button to upload the curve parameter and display
compare curve in Input Contrast Curve window.
2. Insert compare curve
After editing compare curve, it can be added to each small screen.
Click the small screen to select one of the 4 trend diagrams in screen, type
in FUHE0 in Input Track Tag, click enter button to confirm then pops up

503
SECTION 4Online Operation

prompt box as shown in Figure 4.2.5-32:

Figure 4.2.5-32 Open Contrast Curve

Curve diagram display in small screen, as shown in Figure 4.2.5-33:

Figure 4.2.5-33 Insert Contrast Curve

Click Insert button, then pops up Open Curve button as shown in Figure
4.2.5-34:

504
SECTION 4Online Operation

Figure 4.2.5-34 Insert Contrast Curve

The dialog box displays all compare curve name currently saved. Click the
curve name in the list which display into the File Name box, then click OK
button to finish insert, as shown in Figure 4.2.5-35:

Figure 4.2.5-35 Insert Contrast Curve Trend 1

If want to insert other compare curves, click Insert button to select other

505
SECTION 4Online Operation

compare curve names, then the compare in figure correspondingly switch.


3. Delete compare curve
Select a small screen trend diagram, click Delete button to delete the
corresponding compare curve in trend diagram.
4. Other compare curve operations
In each small trend diagram, it can switch between history mode and track
mode by clicking the corresponding mode switching button at the bottom
of the diagram. Selecting History mode as shown in Figure 4.2.5-36 will
show page turning button which can check curve deviation forward or
backward.

Figure 4.2.5-36 Trend Contrast-history Mode

Click or button, turning range for 1 minute; click or


button, turning range for full screen, namely 15 minutes.
Select a trend diagram, click Full Screen button can zoom in the selected
trend diagram to full screen, as shown in Figure 4.2.5-37; it can recover
the original four trend diagram mode by clicking Trend Recover button
again.

506
SECTION 4Online Operation

Figure 4.2.5-37 Trend Compare-full Screen Mode

Click the Close button at right bottom of the page can close compare trend
page.

Right click on each trend diagram, then pops up curve edit menu, the specific
operations please refer to “4.2.5.1 General Trend”.

4.2.5.5 Content of Trend Group Definition

Trend group definition is to define a group of variables set need to be focused


for operator, which is easy for online checking, the set is called trend variable
group.

Only operator level and above level can add trend group. User-defined
variables groups defined online, each OPS has independent custom variables
group. Operator can define the variable group name according to specific
function when defining new variable groups which can rapidly find out the
variables need to display when operating.

1. Define query tag


Respectively access into pages of general trend, digital trend, XY trend,

507
SECTION 4Online Operation

click Define Query Tag button on the right side of the page can open
Trend List Definition dialog box. Take general trend group for example to
configuration setting, as shown in Figure 4.2.5-38.

Figure 4.2.5-38 Group Definition

In general trend group, the same group can both contain analog values
and digital values.
Maximum 90 variable groups can be defined for online system. Each
variable group contains 8 tags at most. For group edit and trend page
display both use group for the unit shows, namely operator can choose
variable group list need to be displayed through the group name.
Custom trend group allows online modification or adding in OPS. After
modification, trend and list displaying will correspond changed.

508
SECTION 4Online Operation

The specific steps of adding user-defined trend group in certain page are
as following:

Step 1. Select group

Click the trend group number need to be edited in Analog Group List of
Trend List Definition, the line information of the selected group identify
blue. Double click the table cell of Description, then display group
description edit rectangle box, as shown in Figure 4.2.5-39, click other
blank spaces in dialog box to finish group description input;

Figure 4.2.5-39 Group Description Definition

• Group description cannot exceed 32 characters.

Step 2. Edit group tag

According to the Basic System selection, display all the tag names
contained in the Basic System Variables list. Click one tag in the list,
then click Add button to add the tag into Analog Group List. In another
way, directly type in the tag name need to add in edit box on the left of the
Add button.
If delete the tags in group list, and then select the tag record in Analog
Group List, click Delete button can delete the variable in the certain
group.

Step 3. Modify color

In default condition, system distributes one color for each tag to mark the
curve and tag information of the certain tag, which can distinguish to other
tags. Select one piece of information in Analog Group List, then click

509
SECTION 4Online Operation

button to open Color panel, as shown in Figure 4.2.5-40:

Figure 4.2.5-40 Edit tag Color

Click the Define Custom Colors button in Color panel, then default
display the color parameter. At this time, you can select the color in Basic
Color panel. It also can open up Add to Custom Colors of the panel,
after setting then click OK button to close the panel, the Curve Color
legend of the tag correspondingly changed in Analog Group List.

Step 4. Confirmation and group selection

Click OK button in Trend List Definition dialog box to finish group edit,
then the dialog box automatically close. Trend page display the
information of the first page, through group selection switch to other trend
group to display.
Trend List Definition dialog box basically divided into 3 areas: group list
area, group variable list area, selection tag area (basic system and
variable list).
In Digital Trend page click Custom Tags button, then pops up digital
trend definition, as shown in Figure 4.2.5-41:

510
SECTION 4Online Operation

Figure 4.2.5-41 Digital Value Trend Table Definition

Click Custom Tags button in XY Trend page, then pops up Define XY


Curve, as shown in Figure 4.2.5-42:

511
SECTION 4Online Operation

Figure 4.2.5-42 XY Trend Group Definition

2. Edit trend group

Select Edit Trend Group command of toolbar above the screen, then
pops up Edit Custom Trend Group dialog box, as shown in Figure
4.2.5-43:

512
SECTION 4Online Operation

Figure 4.2.5-43 Edit Custom Trend Group

The dialog box contains the following operations:


 Add: type in custom trend group name in group name input box, such
as tr1, then click Add button to display the group name to List of
Defined Trend Group.

 Delete: click the group name of List of Defined Trend Group, after
selected click Delete button can delete the certain group.

After adding or deleting operation in the above window, click OK to


confirm the operation. Otherwise, if click Cancel or button to close the
dialog box, that is the operation unconfirmed, the content added or
deleted will not update to List of Defined Trend Group.
3. Trend group display

Select Show Trend Group command of toolbar menu above the


screen, and then pops up Select Custom Trend Group dialog box, as
shown in Figure 4.2.5-44, select the custom trend group name need to
display from the dropdown list.

Figure 4.2.5-44 Select Custom Trend Group Dialog Box

Click OK button, then pops up the certain trend group display window, as
shown in Figure 4.2.5-45:

513
SECTION 4Online Operation

Figure 4.2.5-45 Custom Trend Group Display Window

Step 1. Select group

In Trend Group Name drop-down list, user can switch the current group.
In Trend Panel display corresponding trend group name. If not add any
tag for the new trend group, then do not show any tips when switching
from drop-down list to other groups. If had edited the certain trend group,
then directly switch to other groups display the prompt box as shown in
Figure 4.2.5-46, prompt whether save the modification to the current trend
group.

Figure 4.2.5-46 Custom Trend Group Modification Prompt Box

Click OK button to save the current trend group information, then switch to
other selected trend groups which has the same effect as click Save
button. Click No button to cancel the edit for current trend group, directly
switch to other trend groups window.

Step 2. Edit group tags

Right click the edit box marked with color and box around shows a gray

514
SECTION 4Online Operation

rectangle box as , then pops up Trend Tag


Setting dialog box, as show in Figure 4.2.5-47:

Figure 4.2.5-47 Trend Tag Setting Dialog Box

Type in the tag name in Please input the name of a trend tag box or
click Select Tag button, then pops up a dialog box, as shown in Figure
4.2.5-48:

515
SECTION 4Online Operation

Figure 4.2.5-48 Trend Tag Selection Dialog Box

Select Basic System, and then select the tag needed to add in
corresponding Basic System Tag list. Double click the tag to add to
Please input the name of a trend tag box automatically, and then click
OK to finish. Enter each tag in turn, for each group can add 8 tags at most.
The tag name, selection value show in tag information area up left of the
window, tag change curves shows in the area below, as shown in Figure
4.2.5-49:

516
SECTION 4Online Operation

Figure 4.2.5-49 Trend Group Window

You can change the tags, set the time interval, move up and down the curves,
etc. Please refer to the content of “4.2.5.1 General Trend” for these specific
operations.

Clicking the window control button on the right of window title bar can
maximize, minimize, fix/float/close the current custom trend group window.

4.2.6 Print Operation


Print operations of OPS mainly contain: print screen, alarm, log, parameter list.
According to the document type, the print operation can be mainly divided into
document printing and graph printing. Before print, user needs to set print
media as output for file or output to printer.

4.2.6.1 Print Setup

Click ENG Functions menu in screen main menu. Select Print Setup
command then pops up dialog box as shown in Figure 4.2.6-1 Setup Default
Printer to set print.

517
SECTION 4Online Operation

Figure 4.2.6-1 Setup Default Printer

In Print Setup dialog box to set Print at Once, Print Orientation, Color
Conversion for Print Screen. The functions are as followed:

 Print at Once: there is a configurated report scheduling. auto print


content for optional.

 SOE Auto Print: click the selection box for SOE Auto Printing.
When select , it will print SOE automatically at the moment when
SOE events occur. When canceled for not auto print as , you
need manually click Print button to set output printing.

 Report Auto Print: the same as SOE Auto Printing to set whether
auto print. It can also be chosen to Only Save to File or Print and
Save to File. Output file can be printed at any time after storage.

518
SECTION 4Online Operation

 Print Screen: the same as Report Auto Printing to set whether


auto print and output location.

 Alarm Print Orientation: set alarm table (technical alarm, device alarm,
force table) direction as Printer default value, Horizontal or Vertical.

 Log Print Orientation: set log print direction as Printer default value,
Horizontal or Vertical.

 Color Quality: set the color range as Bits of screen color or (16 bits
color).

 Color Conversion for Print Screen: replace originally print screen color
(unfavorable to print) to the color favorable to print checking. Max 4
kinds of color can be set as replacement color, each color correspond
to choose as Originally Color and New Color.

After setting, click OK button to finish printer setup.

Click the Print button in alarm page, log page or parameter list, it will print the
contents by default printer or the printer you have set.

• Select Print Screen, the hard-copy button of function keyboard is valid,


otherwise invalid.

4.2.6.2 Report Print

Press Report Query key or select Report Query Print command in General
Function menu of screen main menu, then pops up the Report Print dialog
box as shown in Figure 4.2.6-2 Report Print Query Panel:

519
SECTION 4Online Operation

Figure 4.2.6-2 Report Print Query Panel

The report name shown in Select Report drop down list is already setup by
Report Configuration of ENG Functions menu. Click Request Print button
after selected then pops up dialog box please select print request time… as
shown in Figure 4.2.6-3 Report Request Print Setup Dialog Box:

Figure 4.2.6-3 Report Request Print Setup Dialog Box

In this dialog box user can set print date, time and output mode then click OK
button. System sends the print request according to the setup time to complete
the print tasks.

The open office software has been installed selectively during installing system
software. Print documents are saved in the list of OPS software installation
folder ..\MACSV_OPS\start\folder named as report name (e.g., technology

520
SECTION 4Online Operation

parameters) \”. The file name is report


name**year**month**day.hour.minute. second.XLS and saved at print time.

4.2.6.3 Document Printing

Document print mode is uesd for Alarm page, log page and parameter list
etc(as Table 4.2-5). Print to files or printer can be set in Print Setup dialog
under ENG Functions menu.

Table 4.2-5 Table of Document Printing Contents

Print type Print item

All Log

SOE Log
Log
Operation Log

Device Log

Basic system list


List
Parameter group list

Process alarm

Table Device alarm

Force table

Select each page print button will trigger print task, then pops up message box
as shown in Figure 4.2.6-4 Print Message Box:

521
SECTION 4Online Operation

Figure 4.2.6-4 Print Message Box

4.2.6.4 Print Screen

Click on the copy diagram, then click Hard Copy of the keyboard, or press
shortcuts ALT+P, or select Print Screen command in Graphic Management
menu that can complete the print screen hard copy. Print documents are saved
in the list of OPS software installation folder ..\ MACSV_OPS\config\date
files(eg.2010 year 11 month 05 day\ as shown in Figure 4.2.6-5:

Figure 4.2.6-5 Print Screen Output Files

When outputting, the files will be saved to the above directory shown as in
Figure 4.2.6-5. The file is named as the combination of print date and time, e.g.
11month 08 day 15 hour 04 min 36 sec.bmp, and the year mark for ellipsis.

• Hard copy pre-condition: select Print Screen item in Print Setup dialog box
of ENG Functions menu.

4.2.7 Equipment Graph Display


Press Device Graph button of dedicated operator keyboard or select System
Graph in menu of screen main menu, then the screen basic diagram will
display system device graph and the load of control station A and B, as is
shown in Figure 4.2.7-1 System Equipment Running Mode Diagram.

522
SECTION 4Online Operation

Figure 4.2.7-1 System Equipment Running Mode Diagram

Real time graph reflects system device performance. Using different colors
represent the current status of the device. The corresponding relationship of
device and color is shown as Table 4.2-6:

Table 4.2-6 System Equipment Status Description Table

Device Green Yellow Red White

Sever Host normal Backup normal Fault ------

Program
Backup DPU unit
DPU DPU unit normal Fault not
normal
download

Fault or not
I/O unit Module normal ------ ------
insert module

Network Normal ------ Fault ------

523
SECTION 4Online Operation

Device Green Yellow Red White

OPS Normal ------ Fault of offline ------

Communi
cation Normal ------ Fault of offline ------
station

Printer Normal ------ Fault of offline ------

Press Server* of screen status bar can check server information list as shown
in Figure 4.2.7-2:

Figure 4.2.7-2 Server Information

 Server

For double hot standby system, using the host of green as working server;
host of yellow as back-up server; red for server fault.
 I/O field control station

The two lights of FCS in Figure 4.2.7-3 present DPU mode: green for DPU
normal, yellow for back up DPU normal, red for DPU unit fault, white for
DPU not download any program.
Figure 4.2.7-3 shows each I/O unit mode: green for I/O unit normal; red for
I/O unit fault or not insert module.

524
SECTION 4Online Operation

When A/B character of control station icon display for red means IEC
operation of controller corresponding to the control station in error, shown
as Figure 4.2.7-3:

Figure 4.2.7-3 Control Station IEC Error

 Network

The system network is double net structure. Green represents network


normal, red for fault.
 OPS

Green for operator is online, red for offline or fault.


 Printer

Green is for printer online and normal, and red is for offline or fault.
I/O acquisition station can further examine its board mode and tag mode. Click
I/O acquisition station in Figure 4.2.7-3, the screen basic diagram is shown in
Figure 4.2.7-4.

525
SECTION 4Online Operation

Figure 4.2.7-4 IO Station Model Status Diagram

The diagram shows the current mode of each slot in the acquisition station;
green represents for I/O unit normal, red for fault, white for I/O not exist, yellow
for I/O configuration fault.

Click any module in Figure 4.2.7-4, the screen will display the value of tag
name, tag description, current value, channel number, etc as shown in Figure
4.2.7-5. Click module information window close button to shut down the
window.

Click lock button of the sub window and the button shows locked mode ,
when switching the page and the current sub window will not be closed. Click
the lock button again locked mode will be released.

526
SECTION 4Online Operation

Figure 4.2.7-5 Module Channel Information Panel

• Several channel information windows of different type module can be


opened at the same time, but channel information windows of the same
type module can be opened only one at the same time.

4.2.8 Engineer Right Click Function


The online system operation setting is completed by engineer. After system
configuration, operations are completed by operator. All the operation of
operator can be done by engineer. When operator is login, the panel set the
privilege to unrelated item online. The right-click menu of operator function and
online system menu item have no changes. The function which the operator
has no permission is gray and not optional.

Right-click on flow diagram and the main functions of engineer right-click are
shown as following.

4.2.8.1 Engineer Right Click Menu

Right-click the dynamic tags of analog flow diagram, system mode diagram or
channel list, then there will pop up right menu as Figure 4.2.8-1, Figure 4.2.8-2,
Figure 4.2.8-3. The menu contains the following commands: tag trend, force
tag, tag detail, graph size, zoom, restore, show text or value. There is also little
distinction according to the page location of the dynamic tags.

527
SECTION 4Online Operation

Figure 4.2.8-1 Engineer Right-click Menu 1

Figure 4.2.8-2 Engineer Right-click Menu 2

Figure 4.2.8-3 Engineer Right-click Menu 3

4.2.8.2 Tag Trend

The tag trend panel mainly displays the trend information of current dynamic
tag. The time interval, curve UL/LL, switch display mode and display mode can
be set through the panel.

Example: select the load tag in system mode diagram then click right key to
select Tag Trend command, the system pops up an active window as is
shown in Figure 4.2.8-4. The real time changes will be displayed as default
value in curve mode.

528
SECTION 4Online Operation

Tag information

Switch between
History Mode and
Track Mode

Page turning
button

Figure 4.2.8-4 “Tag Trend (curve)” Window

The trend window contains:

 Trend value display space: display curves or value list according to the
trend Display Mode.

Curve display mode divided into two parts:

 Tag information space: display the following curve contents in the


trend panel: tag name, tag description, selecting value, current
value, UL/LL and dimension. The selecting value is the certain tag
value which time is selected by cursor. The current value is the real
time value currently.

 Curve diagram space: display the certain tag curve diagram or


value list.

Value display mode shows the value list. The first column is time value,
the user can check the value or other tag value through scroll bar, as is
shown in Figure 4.2.8-5:

529
SECTION 4Online Operation

Figure 4.2.8-5 Tag Trend(value) Window

530
SECTION 4Online Operation

 Tag group information: display the certain group name and group
description. Click Format button to set the decimal digits of each tag in
the group. The default Group is 1.

 Display state: Track or History can be selected. In history mode can


display the data or curves in history database according to the start
time. In Track mode it can display real time data or curves.

 Display mode: set information space as curve mode or value mode.

 Time interval: sample time interval can be set in Select Time column
as 5 mins, 10 mins, 25 mins, 50 mins, 60 mins.

 Selected time: tag time corresponds to the time value indicated by


slide indicator in curve mode. Dragging the small white triangle in the
curve can modify the tag time.

 Selected curve: display tag name , modify the UL/LL value of the
current tag scale, or print the curves.

 Digital switch query: when displaying digital trend information, it


can set digital value switch information.

 Select trend group: when setting multiple trend groups, click the
certain button to switch to other groups to display.

 Select query time: in history mode, the time point can be set by
moving the slide indicator in curve diagram. Click the button, then
popping up Select Time dialog box to set the data and time
parameter of the time point. After setting, click OK button to finish
time point setting. The time of coordinate axis origin at the most left
position fix to the setting moment, as shown in Figure 4.2.8-6:

531
SECTION 4Online Operation

Figure 4.2.8-6 Curve Time Point Setting Dialog Box

 Define trend tag: click the button can display trend definition dialog
to define trend group.

 Modify range: click the button then pops up Change Range of


Curve dialog box. The default display is the UL/LL of the range in
database. After modification, click OK to finish.

Figure 4.2.8-7 Curve Range Modification Dialog Box

532
SECTION 4Online Operation

• The range after modification cannot exceed 120% of the original tag range,
otherwise pops up system tip box as shown in Figure 4.2.8-8.

Figure 4.2.8-8 Tip Box of Range Exceeding Curve Modification

The curve after modification automatically adjusts the position


according to the UL/LL of the new range, as shown in Figure 4.2.8-9:

Figure 4.2.8-9 Curve Diagram after Modify the Display Range

 Print Curve: click the button to send print task, then print trend.

 Page turning: choose half page turning forward and backward, 1/2
screen.

533
SECTION 4Online Operation

 Start time setting: set the start time (coordinate axis origin time) of
curve display. After setting click OK button to confirm.

 Group number: user can choose the certain number of group


through the drop down list.

• User can drag and drop the dynamic tag to the tag window which already
opened to show the certain tag curve trend.

4.2.8.3 Add Tags to Trend Group

On line define general variable trend group and digital value trend group in
OPS. General variable trend group is used to display trend of analog and
digital value. Digital value trend group is only used to display digital value trend,
so digital value trend group only contains digital value.

Each group definition is saved in the related files of OPS. Add, modify and
delete or other operations on one OPS will not affect the trend group operation
of other OPS.

Click to select dynamic tag, then select the Add Tag to Trend Group
command in right click menu, then pops up Add Tags to Trend Group dialog
box as shown in Figure 4.2.8-10:

534
SECTION 4Online Operation

Figure 4.2.8-10 “Add Tags to Trend Group” Dialog Box

The steps of trend group edit are as follows:

Step 1. Set group type and number

Select defined group style as general trend group or digital value trend
group in Group Type drop-down menu. Then, select group number in
Trend Group Number drop-down menu. System has default adds 1~90
groups, set group number for 1.

Step 2. Add trend tags to group

Select basic system name in Basic System list,, then select variable in
related Variables of Basic System. The Tag editor box auto shows the
selected tag name, click Add button to add tag into Tags in
Group list, as shown in Figure 4.2.8-11:

535
SECTION 4Online Operation

Figure 4.2.8-11 Add Tags to Trend Group

Step 3. Trend display

Click OK button and quit the window, the adding modification is effective;
If click Cancel button and quit the window, the adding modification is
invalid.
Click Trend button also can confirm the adding modification effective and
display the related general trend or digital trend according to the trend
group type and trend group number, then quit Add Tags to Trend Group
window, as shown in Figure 4.2.8-12:

536
SECTION 4Online Operation

Figure 4.2.8-12 Trend Diagram

4.2.8.4 Tag Detail

Click right key on certain dynamic tag, then select tag detail and pops up dialog
box shown as in Figure 4.2.8-13. Header line displays the tag name and tag
type of the current tag. Type in tag name in Type in Tag Name box then click
enter can check the tag information of the certain tag.

537
SECTION 4Online Operation

Title bar Tag name


Tag description

Tag value

Tag value in white means


enable modification for
current user.

Tag value in gray means


invalid modification for
current user.

Figure 4.2.8-13 Tag Detail Window

Click right button for spread on Tag Detail window, then it will display the
basic system and basic system variable name list box, as shown in Figure
4.2.8-14. You can modify the tag in current Tag Detail window:

538
SECTION 4Online Operation

Figure 4.2.8-14 Tag Detail Window

The selected tag names of the right side will be displayed the Tag Name and
Tag descrip in the edit box of Tag Detail. Also you can type in tag serial
number or name. Update other information display by using update key, as
shown in Figure 4.2.8-15.

539
SECTION 4Online Operation

Figure 4.2.8-15 Tag Detail Window

4.2.8.5 Window Operations

1. Zoom
Zoom the current diagram.
Operations: right click the technical diagram, select Zoom command.
Press left click then drag mouse to draw a rectangle box as the zoom
region, then the current diagram will display the content after zoomed in.
2. Restore
3. Restore the diagram after zoomed in.
Operations: right click the diagram and select Restore command, then
display the current diagram in initial set size. For multi-window diagram,
the Restored diagram displayed in current window, as shown in Figure
4.2.8-16:

540
SECTION 4Online Operation

Figure 4.2.8-16 Diagram Zoom In-restore

4. Full/Part window
Operator diagram can be set to multi-window style through Configuration
Tool of OPS. The method is: select
[program]\[MACS]\[MACS_OPS]\[configuration tool], then start
MACS2001 Setting window, switch to Advanced Settings tab, as shown
in Figure 4.2.8-17:

Figure 4.2.8-17 Multi-window Setting

Allow to display 8 windows at most. First to set Total Number of Basic


Graphs such as 4, click OK button then shows 4 window edit line
information. Fill in the file name of window needed to be opened in Files
Opened by Window. If selecting Do you want to assign the size
541
SECTION 4Online Operation

automatically?, then set the window position of the screen in The


Number of Popup window drop-down menu. Click the OK button at the
bottom of the MACS 2001 Settings dialog box to finish multi-window
setting.
Also you can choose not to distribute size automatically, manually choose
the window position where the base drawing displayed.
After modify the OPS settings in Configuration Tool, you should restart
the operator online program, the multi-window after restarting as shown in
Figure 4.2.8-18:

Figure 4.2.8-18 Multi-window Diagram

Move the cursor to any window, right click to select Full/Part window
command to fill the whole window with the selected diagram. Select this
command again to recover to the multi-window mode. The Full/Part
window command can switch the diagram between multi and single
diagram.

• For the Full/Part window option, the full screen window is the window

542
SECTION 4Online Operation

clicked by mouse. If not chosen, system will choose number 0 window as


the full screen window in default.

5. Full Window
The command Full Window can make the current diagram full of the
whole page.
6. Show text or value
7. Show text or value command can switch the display of dynamic tag
between the value and database tag name, which easy to check the
tag name of each dynamic tag.
Right click on diagram to select Show text or value command, value
display mode of the dynamic tag switch to text mode as shown in Figure
4.2.8-19. The selected mark shows head of the command.

Figure 4.2.8-19 Show Text or Value Diagram Before and After

8. Graph size
This command used to check suitable size of the current diagram.
Right click on diagram to choose Graph size command, then pops up
system message box as shown in Figure 4.2.8-20 to display the most
suitable size of diagram long * wide.

Figure 4.2.8-20 Graph Size Message Box

9. Open for base diagram


Select this menu item, then pops up Open graph files dialog box, as
shown in Figure 4.2.8-21. In this dialog box, user can choose to open any
drawing file with .hsg suffix under the project directly.

543
SECTION 4Online Operation

Figure 4.2.8-21 Dialog Box of Open Graph Files

10. Window layout


When opening device information or module channel information panel,
user can arrange small window layout through tile (Horizontally/vertically)
command and cascade command of right-click menu.

4.2.9 Engineer Function


Engineer has the special function, press Engineer Station key of dedicated
operator keyboard or ENG Functions menu of screen main menu, it will pop
up windows as shown in Figure 4.2.9-1.

Figure 4.2.9-1 Engineer Function Menu

ENG Functions contain the following contents:

544
SECTION 4Online Operation

 Login

 Simulate keyboard

 Select domain

 User management

 Set server time

 Switch master server

 Switch controller

 Print Management

 Start option

 Report configuration

 Disable function key

User who has logged into the online system with engineer privilege can use
the system function keys and switch to system desktop; user with other level
have no privilege to use function keys which will be shielding.

4.2.9.1 Login

The process of engineer level and operator level is the same for log in, the
login window as shown in Figure 4.2.9-2. Type the correct User ID and
Password to login the operation interface of corresponding level.

Figure 4.2.9-2 Login Window

User ID and password are not case-sensitive. If the input is error, the system
will keep the last user login successfully. Click Cancel button can close the
window.

545
SECTION 4Online Operation

4.2.9.2 Simulated Keyboard

Click ENG Functions menu in screen main menu, then select Simulate
Keyboard, there will pop up the small simulate keyboard, as shown in Figure
4.2.9-3:

Figure 4.2.9-3 Simulated Standard Keyboard

In small simulated keyboard, simple digital input operation could be done. Click
Login button to close simulated keyboard, then pops up OPS Login dialog
box; click Standard button to display simulated operator keyboard, as shown
in Figure 4.2.9-4:

546
SECTION 4Online Operation

Figure 4.2.9-4 Simulated Login Keyboard

The operation of simulated and dedicated operator keyboard is the same. Click
Keypad button of login keyboard can switch back to the simulated keyboard
style.

4.2.9.3 Select Domain

When the project has multiple domains, select Select Domain command of
ENG Functions menu in screen main menu, then pops up Set Current
Domain dialog box, as shown in Figure 4.2.9-5:

547
SECTION 4Online Operation

Figure 4.2.9-5 Select Current Domain

Select the project name which the login domain belongs to and click OK
button, the system will directly access the main interface of the selected
domain.

• System support No. 0~7 domains.

4.2.9.4 User Management

Click ENG Functions menu in screen main menu to select User


Management command, then pops up the dialog box shown as Figure 4.2.9-6:

Figure 4.2.9-6 Settings of Super User

548
SECTION 4Online Operation

In this dialog, user can select whether to use super user, click OK to conform
the selection.

• User management belongs to the on-line modification function. Server


must be running normally and the modified data is saved in server. If the
server catalog is deleted, the modified data will be lost.

4.2.9.5 Set Server Time

1. Summary
System of each server, workstation and acquisition station has the local
clock, these clocks are synchronized by central server. System allows
engineers to set the clock’s initial time, after confirmed it will send to
central server, then from a central server broadcast to each workstation,
print server, communication server and data acquisition station, etc.
2. Special cases
(1) Because setting process has to pass two level network communication
to arrive the target station, the local clock modification of target station
will lag several milliseconds. For this reason, the clock modification
should avoid operating at the critical tag before zero tag.

(2) Clock modification is for seconds level, so the absolute time of system
correct to seconds level. For the digital tag need milliseconds to
represent, the display of milliseconds value is relative.

(3) After clock modification, the system data may appear inconsistency.

The system clock modification has the following influences:


The corresponding time scale of history data also is modified, namely the
history data of time according to the new time to display. The information
of log and alarm already happened will no longer be modified which make
the inconsistency between history and alarm information.
For backward time modification (time after modification < current time), in
time difference, the event record as log or alarm may be not in sequence
according to time.
3. Operation

Click ENG Functions menu in screen main menu, select Set Server
Time command, then pops up Select Time dialog box, as shown in Figure
4.2.9-7:

549
SECTION 4Online Operation

Figure 4.2.9-7 Set Server Time

Modify system data and time, click OK button to finish setting, then the system
time of OPS will be updated.

4.2.9.6 Switch Master Server

1. Summary
Two servers run the same data processing. If master server thread or
other tasks in fault, master/salve server can also manually switch. Slave
server can send data packet to network message queue after switch to
master server. The certain server refers to which can take on real-time,
history and print services.
2. Operation

Click ENG Functions menu of screen main menu, select Switch


Master Server command, then pops up prompt box, as shown in Figure
4.2.9-8:

Figure 4.2.9-8 Switch Master Server

550
SECTION 4Online Operation

For confirm information, click Yes button to switch; click No button to


cancel the operation.
3. Server indication

Figure 4.2.9-9 Status Bar on Right Button of the Window

When server switching, the server name in the status bar on right bottom
of screen will be changed, as shown in Figure 4.2.9-9. Click server
information in status bar, then pops up server information panel as shown
in Figure 4.2.9-10:

Figure 4.2.9-10 Server Information

4.2.9.7 Switch Controller

1. Summary

Click ENG Functions menu of screen main menu, select Switch


Controller command, then pops up Input Control Station No. dialog box
as shown in Figure 4.2.9-11:

Figure 4.2.9-11 Input Control Station Number


551
SECTION 4Online Operation

Type in the station number needed to switch in the Control Station NO.
box of dialog box, click OK button, then pops up the prompt box as shown
in Figure 4.2.9-12:

Figure 4.2.9-12 Prompt Box of Confirm to Switch Controller

Click Yes button to finish switching.


4.2.9.8 Print Management

1. Summary
Print management can set auto print function and screen hard copy.
 Auto print contents: SOE auto print, report auto print.

 Conditions of starting auto print:

 SOE auto printing occurs after accident source event occurs, then
it will be printed automatically.

 Report: When the time defined in Report Configuration for


outputting report comes, then it will be printed automatically.

 Auto printing disable and recovery treatment:

 Auto printing can disable and recover auto printing on certain OPS.

 When SOE auto printing suppressed, operator only can query


whether accident events occur.

2. Priority level
When print tasks in conflict: auto printing priority level is higher than
request printing’s; report printing priority level is lower than SOE auto
printing’s.
3. Operation

Click ENG Functions menu of screen main menu, select Print


Setup command, then pops up Print Setup panel, as shown in Figure
4.2.9-13:

552
SECTION 4Online Operation

Figure 4.2.9-13 Print Setup

Please see details of specific print setup in chapter 4.2.6.1 Print Setup.

4.2.9.9 Start Options

Click ENG Functions menu of screen main menu, select Start Options
command, then pops up OPS Startup Options dialog box, as shown in Figure
4.2.9-14:

553
SECTION 4Online Operation

Figure 4.2.9-14 Startup Options

Startup options instructions:

 Automatically login the operation system: if selected , the operator


automatically login the system when startup and cancel the password
limit.

 Automatically run OPS applications: if selected , the OPS


automatically run OPS online application when login the system.

• Suggest select the two above items after OPS running normally, which can
help to rapidly login online system when OPS restart for accident reasons.

4.2.9.10 Report Configuration

Click ENG Functions menu of screen main menu, select Report


Configuration command, then pops up Configuration of Report Printing
dialog box, as shown in Figure 4.2.9-15:

554
SECTION 4Online Operation

Figure 4.2.9-15 Configuration of Report Printing Dialog box

In this dialog box to set report printing events:

Step 1. Schedule setting

First add schedule events under Report schedule node, the main
operations are as following:
 Add schedule: type in the report schedule name in Schedule
Description edit box as task 1, then set schedule time:

 Frequency: set the frequency of schedule events, per hour, per


day , per month, per year can be selected. Different
frequencies correspond to different interval setting items.

 Time: set time of occurrence, the format is:


hours:minutes:seconds . Only vaild for the selected frequency
for per day , per month or per year .
555
SECTION 4Online Operation

 Date: set date of occurrence, the format is: months: days . Only
valid for the selected frequency for per month or per year .

 Minutes: set minutes of occurrence, the format is: minutes .


Only valid for the selected frequency for per hour , that the setting
is valid.

After the above schedule parameters setup, click Add Schedule button,
then the schedule is added to Report schedule tree node on the left.
 Modify schedule: select the schedule needed to be modified in the tree
diagram on the left of the window, and then modify the schedule
description and time. Click Confirm button to finish the modification.

 Delete schedule: select the schedule node needed to be deleted in the


tree diagram on the left of the window, then click Delete Schedule
button to finish the delete operation.

Step 2. Set printing event of schedule report

Select the schedule node in the tree diagram on the left of the
Configuration of Report Printing window, and then add report print
events.

556
SECTION 4Online Operation

 Add events: type in the report name in Report Name edit box, e.g.
Technical Parameter or click button to find the path of the report
need to open, and then select the report file to set Report Description.
Click Add Events button, the report events will be added into the node
on the left of the tree diagram, as shown in Figure 4.2.9-16.

 Confirm modification: select the schedule events which need to be


modified in the tree diagram on the left of Configuration of Report
Printing window. Then input in the report the name or description, and
click Confirm to modify and finish the modification.

 Delete schedule: select the schedule events node need to be deleted


in the tree diagram on the left of Configuration of Report Printing
window, then click Delete Event button to finish the delete operation.

 Request print report: after report print event setting in Configuration


of Report Printing window, then click Request Print Reports button,
pops up the dialog box as shown in Figure 4.2.9-16:

Figure 4.2.9-16 Report Request Print Setup Dialog Box

Set the date, time and the output mode of printing, click OK button to
finish report request event setting. Also you can use Request Print
Reports command under the General Function menu to start the
certain setting dialog box.

Click OK button in Configuration of Report Printing window to finish


report print event configuration. The detail content of report printing
please refer to chapter “4.2.6.1 Print Setup”.
557
SECTION 4Online Operation

4.2.9.11 Disable Function Key

After operator online start, the operation system function keys will be disable.
Only the user with engineer level can release the setting. Click ENG
Functions menu of screen main menu, select Disable Function Key
command, then pops the dialog box as shown in Figure 4.2.9-17:

Figure 4.2.9-17 Disable Function Key

The default Disable Function Key setting is in selected mode. Click the
setting item, the setting box display for , click the operation system button
can switch to operation system.

4.3 Control Regulation


The control regulation function provided by the system is accomplished
through instrument regulation in a flow-technical diagram. Regulation
instruments regulation contains PID controller, manual operator (open/close
loop), sequence control device (thermal power), sequence control device (heat
and power), regulation valve, combined servo amplifier, circuit control breaker,
etc.

• The tips about an item appear when you move the mouse in sequence
control device, manual operator, regulating valve, breaker state indicator
windows.

• In the operation panel, if the buttons are gray that could not be operated.

4.3.1 PID Controller


PID controller is also called the loop regulator, the specific functions that
regulator provide contain: mode switching of manual, auto, cascade, and track;
set value, the manual output value regulation, PID parameters tuning, etc.

558
SECTION 4Online Operation

PID regulation include three kinds of panels: loop operation panel, trend
display panel, and parameters tuning panel. The information and application
introduction of each panel are as followed.

4.3.1.1 Loop Operation Panel

Figure 4.3.1-1 Loop Operation Panel

Pre-click the focus of PID, the screen will pop up operation panel as shown in
Figure 4.3.1-1. Through the loop operation panel can turn into other two panels
separately.

1. Instruction of display information


The loop regulation panel contains: bar graph of set value (SP), process
value (PV), output value (AV) and value display, operation mode display,
alarm mode display, etc.
 Bar graph display

Three bar graphs on the left represent for set value (SP), process
value (PV) and output value (AV). The colors of the bar are
respectively: blue, sky blue, pink.

The height of SP bar corresponds to the ratio in percentage of current


value to measure range. If PID runs in cascade mode, then the set bar
display extern cascade SP, in other mode display intern SP.

559
SECTION 4Online Operation

PV bar height corresponds to process input value.

AV bar height corresponds to AV.

 Value display

The data shown in the three boxes at right bottom are respectively: the
current value of SP, PV and AV. The color of each value corresponds to
the bar color.

When PID controller runs in manual, auto or track mode, the SP is


intern SP; when runs in cascade mode, display cascade input value.

When PID controller runs in manual mode, the output value is given by
manual operation; in auto and cascade mode, the output value is given
by algorithm; in track mode, the set value is tracking tag value.

 Alarm mode display

When bias alarm occurs, the top-left light turns on (red). When alarm
vanished, it is back to the normal color.

 Operation mode display

PID controller contains 4 operation modes: manual, auto, cascade and


track. When a certain mode light is green which indicate the regulator
running in the certain mode.

 Others

The PID controller static panel contain: tag name, tag description
(instruction), etc. Click can close loop operation panel.

2. Operation instruction
The operations of the panel contain: working mode (manual, auto,
cascade and track) switch, modify SP/AV by increase or decrease button,
switch to trend display panel and parameter regulation panel.
PID contains four working modes: manual, auto, cascade and track which
undisturbed switch to each other.

 In manual mode, PID unit stop operation and rely on operation key
to regulate control output.

 In auto mode, PID calculates the value by intern SP set by


operator according to the formula.

560
SECTION 4Online Operation

 In cascade mode, PID calculates according to the extern value


from main loop or other operation module; if the cascade input
terminal have no input signal that cannot switch to cascade mode.

When switching to track, PID unit stopped calculation, the value is


following with track value. According to the access method, track mode is
divides into two modes: Manual Track and Auto Track. It could access
Manual Track mode through the PID controller panel tracking button. Auto
Track mode will access when tracking switch to 1 position, when switch to
0, go back to the first working mode.
 Working mode switching

The certain panel supports following operations: working mode switching,


SP/AV regulation and panel switching, etc. All the operations are
accomplished by pressing keys. With various limitations, the keys are
invalid when gray.
Working mode switching is shown as Figure 4.3.1-2 and Figure 4.3.1-3. In
working modes switching diagram, texts in round cycle are working modes,
texts above the horizontal line indicates the operation modes after
switching.
If the parameter setting dialog box sets auto enable or manual enable,
then click Manual or Auto key to switch PID controller working mode
into manual or auto mode.
If defined cascade enable when configuration (decided by input signal),
then click cascade key or press Cascade key of dedicated operator
keyboard to switch regulator mode to cascade mode.

561
SECTION 4Online Operation

Manual track enable, press track key


Manual enable, press manual key Manual
Manual Aut Track
y
o e ack ke
nab tr ack ut
o
Ma
nu
aut le
o ,p n ual s tr ss a
al ke res a
M re s e
y p pr
ma enab
s
l e, l e,
nu ab b
na key

ss
al le,p en o e

re
key res t

ey
Au
Ma

Ca
s

key le,p

e k
nua

sc asc Auto

cad
ade ad

ab
l e

tra k en

cas
nab

en

k
abl key

c
c

ss
le,

tra
Auto Cascade
e

pre
e,p
pre

enable enable,

al

le,
res
ss

nu
,press press

ab
s

Ma
man

auto cascade

n
e e
key key
ual

ca d
ke

Cas
y

Cascade

Figure 4.3.1-2 Manual Track Mode Switching Diagram

562
SECTION 4Online Operation

Track switch from 0 to 1


Track switch from 1 to 0,last Auto
Manual Au operation mode for manual 1 Track
Ma to to
nua en a 0 o
ro m 1 t uto
l e au ble f
ma nabto k ,p r h rom a
nua l e ey ess witc ch f for
l k pr, s t ion
wi
Ca ey ess ck
Ta ck s erat

1
sca p
Tra st o

to
Man ma

de a
Auto 0,l

ade t
ual nua

ena

asc as
rom

l
ble

r c 0,
en l ke

h f
abl y

,pr

fo to
itc
Auto Cascade
e,p

ess

1
sw
enable, enable,

m
res

n m fr o
ack
ca

press press

od e
s

sca

Tr

tio ch
auto cascade
de

era it
key key

op k sw
key

ac
Tr

Cascade

Figure 4.3.1-3 Automatic Track Mode Switching Diagram

In track mode, PID outputs adapt to track tag. According to the mode of
access, it is divided into key manual switch tracking (manual tracking) and
switch control auto switch tracking (auto tracking). The mode by which
PID accesses the tracking is decided by the setting of offline configuration,
the rules shown as Table 4.3-1.
Table 4.3-1 Track Mode Instruction

Track switch Track tag Track mode

Unable access track


None None
mode

None Yes Enable manual track

Unable access track


Yes None
mode

Yes Yes Enable auto track

563
SECTION 4Online Operation

If the configuration result for manual track that operation mode as shown
in Figure 4.3.1-2, click Track key in PID panel can switch working mode to
track mode; if click other keys can quit track mode then access relevant
working modes.
If the configuration result for auto track that operation mode as shown in
Figure 4.3.1-3, when tracking switch for 1, auto switch into track mode.
Only when tracking switch for 0, quit track mode then get back to
advanced working mode.
Auto track mode switching is executed by subordinate computer. When
operation work station in auto track mode, tracking operation light is on
and other keys are gray; when quit, keys return to normal.
 SP modification

SP can be modified when PID controller runs in manual or auto mode.

SP can be increased or decreased by clicking , icon under the

SP bar or ↑↓ of dedicated operator keyboard. Clicking or

pressing left key each time, SP regulate 1% of the range, and Clicking ,
SP regulate 5% of the range. User can modify SP by type in value directly,
click on the position of SP displayed then type in the value and press
enter.
 AV modification

Only when PID controller in manual mode that can modify AV.
In input box at right side of the bar chart can modify SP, PV and AV.
4.3.1.2 Trend Display Panel

Besides retaining the display function of loop operation panel, it also can
display PV, SV and AV changing trend.

Trend panel is under PID control panel as shown in Figure 4.3.1-4.

564
SECTION 4Online Operation

Figure 4.3.1-4 Trend Panel

The color of three curves is the same as corresponding bar chart.

At the bottom of trend panel display the UL and LL value of SP, PV and AV from
up to down. On the left is UL value of range and the right for LL value.

4.3.1.3 Parameter Tuning Panel

Parameter tuning panel can display and modify the control operating
parameter of regulator.

Tuning parameter item displayed on the right side of PID operation panel is
shown as Figure 4.3.1-5.

565
SECTION 4Online Operation

Figure 4.3.1-5 PID Tuning Panel

Parameter tuning panel can display and modify the control calculation
parameters of regulator:

 Manual and auto enable item is optional in any case.

 When offline configuration defined cascade input tag name, then


cascade enable item is optional. Otherwise the value position is unable
and not optional.

 When track switch is vacant and the track tag is not vacant, then track
enable item is optional. Otherwise the value position is unable and not
optional.

 When certain parameter item in gray, then the item is not optional or
tuning.

566
SECTION 4Online Operation

 When parameter tuning modified, press Confirm key to be effective.

Click Exit key to close the dialog box.

• After set input dead band/ On/Off limit, if input bias less than the value,
then PID have no response to input bias. This function can be used to
avoid PID output frequent output in allowable bias range.

• After setting integral separate/opposite quadrant, if input bias is more than


the value, then stop integral calculating. This function can be used to avoid
integral saturation.

4.3.2 Analog MO (Open Loop)


Analog MO is the soft MO for analog value of internal system, which gives
out the tuning AV artificially.

The system provides the functions: manual AV tuning, etc.

Analog MO provides display panel: operation panel.

1. Operation panel

Figure 4.3.2-1 Open Loop MO Operation Panel

567
SECTION 4Online Operation

Pre-click the focus of analog MO, screen will pop up operation panel as
shown in Figure 4.3.2-1.
2. Information displayed instruction
Analog MO panel contain: value display of track tag (TP), feedback value
(FP), command value (AV), scale display of input and output value, etc.
 Value display

Panel value box displays the current value of valve pos. value and valve
pos. AV.
 Scale display

The up-down scale pointers are following valve position feedback value
and AV. The length corresponds to the ratio in range percentage of
feedback value and valve position command AV.
3. Operation instruction
 AV regulation

Through the panel manual increase/decrease button or manual quick


increase/quick decrease button to regulate AV.
In system, clicking manual increase , decrease button or press
dedicated operator keyboard ▲ , ▼ key once, AV will be regulated
according to manual deviation rate, and the default deviation range is 1%
of output range; Clicking quick manual increase , decrease button
or press dedicated operator keyboard , key once, AV will be
regulated according to manual deviation rate, and the default deviation
range is 5% of output rage.
In addition, users can modify directly by type in value, double click the AV
display position then type in the figure.
If the contents of a certain item box display gray means it cannot be
operated.

4.3.3 Analog MO (Close Loop)


Analog MO is the soft MO for analog value of internal system, which can cut off
the results calculated by algorithm then artificially to set AV.

System provides regulation functions as: manual/auto mode switching, manual


AV tuning, etc.

Analog MO provides panel: operation panel.

1. Operation panel

568
SECTION 4Online Operation

Figure 4.3.3-1 MO Operation Panel

Click the mouse on analog MO hot point set in advance, screen will pop
up operation panel as shown in Figure 4.3.3-1.
2. Information display instruction
The contests of analog MO panel contain: value display of PV, process SP,
valve position feedback value, valve position command AV; scale of valve
position feedback value, valve command AV, working modes, working
mode switch display, etc.
 Value display

The panel value box contains: current value of PV, process SP, valve
position feedback value, and valve command AV.
 Scale display

The up-down scale pointers follow valve position feedback value and AV.
The length corresponds with the ratio in range percentage of valve
position feedback value and command AV
 Operation mode display

Operator has two kinds of operation mode, manual and auto. Click the
auto or manual button, the current operation mode will display in the
dialog box which located above the button. If the control algorithm has set
Force manual and the Force Manual is true, then the operation mode will
be force manual; if the Manual and Auto button is gray and it cannot be
optional.
3. Operation instruction
The panel operations contain: working mode (manual, auto) switching,
modify AVs through the increase or decrease button or directly type in
value.

569
SECTION 4Online Operation

 Working mode switching

If manual or auto be set in parameter tuning, then click Manual or Auto


key or dedicated operator keyboard Manual or Auto key which can switch
MO working mode to manual or auto.

• When force condition occurs, manual or auto switching cannot be


operated.

 AV regulation

In manual mode, through manual increase/decrease button in the right


lower area of the diagram to regulate AV.
In system, click manual increase , decrease button or press
dedicated operator keyboard ▲ , ▼ key once, AV will be regulated
according to manual deviation rate and the default deviation range is 1%
of output range; click quick manual increase , decrease button or
press dedicated operator keyboard , key once, AV will be regulated
according to manual deviation rate and the default deviation range is 5%
of output rage.
In addition, users can modify directly by type in value. Settle the cursor in
the AV indicates position then type in the value.
If the content of a certain box displays gray, means it cannot be operated.

4.3.4 Sequence Control Equipment


Sequence control device mainly completes the driver control function of three
typical sequence control device as motor, electric gate and electromagnetic
valve. The start-stop control, protection logic and alarm processing work
required complex configuration previously, and now it can be completed by
modules automatically.

The functions sequence control device provided contains: set start/on, stop/off,
reset, repair and confirmation.

Sequence control device can provide display panel: operation panel.

1. Operation figure
Click mouse on sequence control device hot point set previously, the
screen will pop up operation panel as shown in Figure 4.3.4-1.
2. Information displayed instruction
570
SECTION 4Online Operation

Operation panel mainly contains: algorithm block name, instruction,


operation mode light, repair mode, enable operating mode light, protection
status light, and device mode light. It also contains buttons of start, stop,
and repair and confirm and mode tips.
Start and stop mode instructions are shown as Table 4.3-2.

Figure 4.3.4-1 Sequence Control Operation Panel

Table 4.3-2 Operation Mode Instruction

Indicator light
Device mode
Green light Red light

blink off In close direction running

off blink In open direction running

on off Closed mode

off on Open mode

Current mode Current state El. fault/mode feedback error

Close running timeout/mode deviation


blink Current state
close to open

571
SECTION 4Online Operation

Open running timeout/mode deviation


Current state blink
open to close/device protection off

 Repair mode: red for repair mode.

 El. fault: tips in mode information box.

 Remote/Local: SD blocks displays in red for local, dark gray for


remote.

 Open enable: L4 block displays in red for open enable allowed,


dark gray for forbidden.

 Close enable: L5 block displays in red for close enables allowed,


dark gray for forbidden.

 Open command: press Open/Start button to send out open


command pulse, light color from gray to red.

 Close command: press Close/shut button to send out close


command pulse, light color from gray to green.

 Pause: press Pause button to send out Pause pulse, light color
from gray to green.

 Open feedback indicator mode: red blink for opening, red light on
for Open mode already.

 Close feedback indicator mode: green blink for closing, green light
on for close mode already.

 Device mode: red for open; green for close; yellow for feedback
mode error; gray for no operation feedback mode.

 Mode tips: if in normal shows Normal;

 If execute Open command without open feedback in setting time,


display Open Timeout ;

 If execute Close command without open feedback in setting time,


display Close Timeout ;

 If normal mode without open or close feedback, display Mode


Feedback Error ;

572
SECTION 4Online Operation

 If not for panel operating device or feedback vanished, display


Deviation Open to Close or Deviation Close to Open.

3. Operation instruction
Panel operations contain: start/on, stop/off, repair and confirmation.
 Set Output Command

Device working mode contains 4 buttons, if conditions allowed then click


buttons to execute operation.
When mode is operated to another, the same operation is forbidden in
current mode.
Start device should satisfy: open enable conditions(or open enable
floating),no El. fault (or open enable floating), remote operation enable (or
open enable floating), no protection close command, external loop normal.
Device feedback displays correctly, otherwise prompt mode error in
indication space.
Device protection is not restricted by close enable. When device
protection occurs, the dynamic tag of operator interface will be in yellow
blink.
Plant prot. On/off are not restricted by close enable. When plant prot. on,
dynamic tag of the operator interface will be in yellow blink.
Auto open (close) command is restricted by open (close) enable. When
auto open/close occurs, mode light follows the auto open command.
Click Reset button when error mode occurs for next step operation.
When configuration internal items QR are TRUE, the Reset button will
change into confirm button. When in open/close command operation then
open operation confirm function in setting time(default for 8 scanning
cycle).If reset button is not pressed in setting time then the open/close
operation is invalid.
 Overhaul

When pressing overhaul repairing button, sequence control device will be


banned from all operation and output.

4.3.5 Regulation Valve


Regulation valve completes the driver control function for sequence control
devices. The switch control, limit protection logic and alarm processing
required complex configuration previously, and now these can be completed
by modules automatically.

The functions regulation valve provided contain: set open and close

573
SECTION 4Online Operation

commands and parameter tuning.

Regulation valve can provide display panel as: operation panel.

1. Operation panel
Click mouse on regulation valve hot dot set previously, the screen will pop
up operation panel as shown in Figure 4.3.5-1.

Figure 4.3.5-1 Regulation Valve Operation Panel

2. Information display instruction


Operation panel mainly displays static contents: device name, device
instruction, etc; dynamic content as: valve position feedback value, scale
tips for valve position command AV, etc. In addition, device name and
device instruction are set by off-line configuration. The valve position
pointer of scale follows valve position value.
 Value display

The data is shown in panel box respectively: valve position feedback value
and the current value of valve position command value.
 Scale display

The up-down scale pointers follow valve position feedback value and AV.
The length corresponds to the ratio in percentage of valve position
feedback value and command AV.

574
SECTION 4Online Operation

3. Operation instruction
4. The panel operations contain: set output command.
Through the manual increase/decrease button at right lower corner of the
panel can regulate the AV.
In system, click manual increase , decrease button or press
dedicated operator keyboard ▲ ,▼ key once, AV will be regulated
according to manual deviation rate, the default deviation range is 1% of
output range; Click quick manual increase , decrease button or
press dedicated operator keyboard , key, AV will be regulated
according to manual deviation rate, the default deviation range is 5% of
output range.
Double click command AV can type in the value.
The panel operations contain: repair button.

4.3.6 SLAVE
CS is the soft servo-amplification for analog MO. In manual mode, analog MO
controls the output through increase/decrease button. In auto mode, analog
MO controls the output through CS according to the input mode deviation.

1. Operation panel

Figure 4.3.6-1 CS Equipment Operation Panel in Manual Mode

Click the mouse on hot point of regulation valve set previously, the screen
will pop up the operation panel as shown in Figure 4.3.6-1.
2. Information displayed instruction

575
SECTION 4Online Operation

Operation panel mainly displays the following dynamic contents: working


mode, working mode operation button, valve position feedback value and
AV, valve AV feedback scale indicating PV, process SP, valve position AV
display, etc.
 Value display

Display the current value of PV, process SP, valve position feedback value
and valve position command AV.
 Scale display

The up-down scale pointers follow valve position feedback value and AV.
The length corresponds to the ratio in percentage of valve position
feedback value and command AV.
3. Operation instruction
The operations in the panel contain: output command setting.
Through the manual increase/decrease button at right lower corner of the
panel can regulate the AV.
In system, click manual increase , decrease button or press
dedicated operator keyboard ▲ , ▼ key, AV will be regulated according
to manual deviation rate, the default deviation range is 1% of output range;
Click quick manual increase , decrease button or press dedicated
operator keyboard , key, AV will be regulated according to manual
deviation rate, the default deviation range is 5% of output range.
Double click command AV can type in the value.
The panel operations contain: repair button.

4.3.7 Circuit Breaker


Circuit breaker panel contains: operation panel.

Circuit breaker can provide the following control functions: set switch on/off,
repair, confirm, reset.

1. Operation panel
Click the mouse on hot point of circuit breaker set previously, the screen
will pop up the operation panel as shown in Figure 4.3.7-1.

576
SECTION 4Online Operation

Figure 4.3.7-1 Circuit Breaker Operation Panel

2. Information displayed instruction


Operation panel mainly contains: algorithm block name and instruction,
running mode light, repair mode, all kinds of enable operation mode light,
protection status light, device condition light, etc. It also contains buttons
of start, stop, repair, and confirm and mode tips.

 Repair mode: red.

 El. fault: red for El. fault. Dark gray for no El. fault.

 Remote/Local: red for local. Dark gray for remote.

 Enable switch on: red for enable; dark gray for unable.

 Enable switch off: green for enable; dark gray for unable.

 Auto command mode: red for auto switch on/off command exist.
Green for auto switch on/off command not exists and switch
enable not allowed. Gray for no setting.

 Device mode: shown in mode indication area according to the


circuit breaker mode.

 Mode tips: if in normal shows Normal;

 If execute Switch On command without switch on feedback in


setting time, display Open Timeout ;
577
SECTION 4Online Operation

 If execute Switch Off command without switch off feedback in


setting time, display Close Timeout ;

 If normal mode without on/off feedback, display Mode Feedback


Error ;

 If not for panel operating device or feedback disappear, display


Deviation On to Off or Deviation Off to On.

3. Operation instruction
The operations for panel contain: switch on/off, repair, confirm, reset.
 Output command setting

Device working mode contains 5 buttons, if conditions allowed then click


buttons to execute operation.
When change operation from one mode to another, the same operation is
forbidden in current mode.
Switching on should satisfy: enable switch on conditions(or open enable
floating),no El. Fault (or open enable floating), remote operation enable
(or open enable floating), no auto switch off command, external loop
normal. First press Switch On button, and after confirmation that the
switch on command could be send out. Device feedback display correctly,
otherwise, prompt mode error in indication area.
Switch off should satisfy enable switch off and without auto switch on
command. First press Switch Off button, and after confirmation that the
switch on command could be send out.
Auto switch on/off command is restricted by switch on/off enable. When
auto switch on/off command occurs, the mode light follows the auto switch
command.
When in error mode, press reset button for next step operation.

4.4 Other Operations


4.4.1 Keyboard Lock Operation
The system has 4 operation levels. Different levels corresponds to different
privilege when online operation. The privilege corresponds to the certain
operation of online system. User can insert different login keys and rotate to
different location, which system can identify the different operation level and
offer corresponding privilege.

578
SECTION 4Online Operation

4.4.2 Light Test


Dedicated operator keyboard provide function key Light Test button for light
test, above which there is an indicate light. When presses function key the light
and the keyboard light will be lit. The not bright lights are fault and need to be
repaired. When loosen the key all lights get back to previously mode. In
addition, press the Light Test button can reduce the sound when alarm of
dedicated operator keyboard occurs.

4.5 Sever Operation


Chapters above describe the operation and notes for each level of users on
OPS, next, related items and introductions on sever operation will be
introduced specific to maintenance engineer, so as to help them timely analyze
and process some simple and operational sever questions in routing
maintenance.

The server setting is introduced in this chapter , copy related files in site sever
to analytic system questions, solving server’s questions and notes for server.

• Check, modify and exit each server process must be authorized and
guided by Hollysys and related technical. Strictly forbid to change and exit
each process of server and associated settings.

4.5.1 Server Modification and Settings


After start system on server station, user can see the server manage icon
in the taskbar. Right click on this icon, then display server management context
menu, as shown in Figure 4.5.1-1.

Figure 4.5.1-1 Server Management Menu

Only User Login is available in default, other menu command can be used
after succeed login with engineer level username and password, functions are
as follows:

579
SECTION 4Online Operation

 User Login: verify correctness of the server management authority.

 User Logout: log administrative privileges off, and hide server


management operation command.

 Server Settings: Open the dialog Server Settings, then server A or B,


GPS port, history database path and accident review path can be
modified.

 Server Show: show the process windows for each server


management.

 Server Hide: hide the process windows for each server management.

• The username and password of server management authority have set


well in engineer off-line configuration, and it should keep accordance with
ES’s.

• Maintenance engineer should save the username and password, it is


forbidden to use it without authority of hollysys and relate technical.

1. User Login
Right-click the server management icon in the taskbar, select User
Login in the drop-down menu, it will show a User Login dialog box as in
Figure 4.5.1-2, input the user name and password, then click OK, it will
login successfully.

Figure 4.5.1-2 Login

2. Server Settings

580
SECTION 4Online Operation

After login the server management, right-click the server management


icon in the taskbar, select Server Settings in the drop-down menu, it
will show a Server Settings dialog box as in Figure 4.5.1-3, modify
parameters in this dialog box.

Figure 4.5.1-3 Server settings

3. Server Show
After login the server management, right-click the server management
icon in the taskbar, select Server Show in the drop-down menu, it will
show all server processes in taskbar.
4. Server Hide
After login the server management, right-click the server management
icon in the taskbar, select Server Hide in the drop-down menu, it will
hide all server processes in taskbar. If you select Server Show, it will
show all server processes in taskbar again.
5. User Logout
After login the server management, right-click the server management
icon in the taskbar, select User Logout in the drop-down menu, it will
logout the server management, all server management commands will
turn gray and unavailable.
The following introduce the content can be modified and settings in project.

4.5.1.2 Storage Path of History Database

There is a method to modify the storage path of history database; the specific
operation is like the following:

1. Modify Server Settings by Server Process Management.


581
SECTION 4Online Operation

Step 1. View the status of server

User can view server’s running state through operator on-line system, so
as to definitude the master-standby server. Example: A is master server, B
is standby server. Click the server management icon in the taskbar,
select command Server Settings, open dialog Server Settings, as
shown in Figure 4.5.1-4.

Figure 4.5.1-4 Server Settings Dialog

Step 2. Modify standby server settings

Firstly, modify standby server B, user should copy the history database file
which saved in the history data directory HISDATA of standby server B to
target path.
Then, select Node B through drop-down list Server A or B in dialog
Server Settings, modify the path parameters in History Database Path
and Accident Review Path, click on button OK to finalize the modification
and close dialog Sever Setting.

Step 3. Restart standby server

Exit server B, and restart server program. Open the setting of dialog
Server Settings once again, check whether the storage path in history
database server of second revised path.

• The online trend time from copy history data file to restart server (about 10
minutes) will be lost, but other online trends will not be affected.

582
SECTION 4Online Operation

Step 4. Modify the other server settings when switching master server
and standby server

Switching server means that standby server B changes to master server


while master server A changes to standby server. If there is no abnormal
an occurrence after few minutes, the old history data can be deleted on
server B.
Following the operation above to modify the current standby server A,
then restart, and delete the old data storage file after server running
stable.
2. Note
This method need to modify server A and server B respectively. User can
first modify the history database path of standby server, then switch server
and modify the history database storage path of current standby server.
The old history database path is selected when users install the server
software, and system will automatically create correlate files after
installation. System will also create the modified storage folder after
configuration server modifies the path automatically. If you have modified
the history database storage path manually, then you have to create the
modified storage folder on disk manually.
4.5.1.3 History Database Storage Reserved Space

The free space of driver is 1024M in default, if the residual space is less than
the reserved space, system will delete the earliest history database files to
reserve space. User can manually modify Reserved Space in window History
Database V2.1, and then click Confirm Modification, thus to reset Current
Reserved Space.

After login the server management, right-click the server management icon
in the taskbar, select Server Show in the drop-down menu, it will show all
server processes in taskbar. Select MACS history v2.1,the dialog box is shown
as in Figure 4.5.1-5:

583
SECTION 4Online Operation

Figure 4.5.1-5 MACS history v2.1process

Modify, input a space, then click OK, and the reserved space is changed.

• Do these operations respectively for server A and server B.

• If the residual space is less than the reserved space, system will
automatically delete the earliest history database files to protect space. So,
important history database files need to be saved to other disks on fixed
days, and user can look up these history data through off-line query
software.

• The old history files are not deleted after reset reserved space, it can be
looked up through off-line query software.
584
SECTION 4Online Operation

4.5.1.4 Server Node/Port

There are two methods to modify the server node A/B and timing port, the
specific operation is like following:

1. Modify Server Settings in Server Process Management


Click on server management icon in the taskbar, after login, select
command Server Settings, then dialog Server Settings opened, as
shown in Figure 4.5.1-6:

Figure 4.5.1-6 Server Setting Dialog

Then modify parameter GPS Port:


 0: for not access GPS signals;

 1: for GPS signals access serial port 1;

 2: for GPS signals access serial port 2.

Modify the parameter of GPS Port corresponding to server A or B, then


click button OK to close this dialog. The parameter will come into effect
after restart server.
2. Note
Do these operations separately for server A and B.
The former server nodes and ports are selected in setup server software,
user can modify them here.

585
SECTION 4Online Operation

4.5.2 Server’s Timing


There are many methods for HOLLiAS MACS server’s timing:

 Without GPS or FM197, uses server’s clock timing.

 Uses GPS timing.

 Uses FM197 timing.

 Uses GPS+FM197 timing.

Different timing methods with different cabling methods, besides, the


configuration of two files in server are different, one file is MACS.ini in server’s
installation directory C:\MACSV\MACSV_SERVER, the other one is
CAS2000serverExe.ini in C:\WINDOWS(or C:\WINNT).

HOLLiAS MACS server uses network timing for OPS and FCS.

4.5.2.1 System Server Timing

User could use server’s clock timing when there is no GPS and FM197(timing
HUB)timing, neither check GPS when install server software, nor modify the
file CAS2000serverExe.ini in the directory of C:\WINDOWS(or C:\WINNT).
Otherwise, user should modify the following two parameters as shown in
Figure 4.5.2-1 and Figure 4.5.2-2 .

586
SECTION 4Online Operation

Figure 4.5.2-1 Macs.ini

Figure 4.5.2-2 CAS2000serverExe.ini

587
SECTION 4Online Operation

4.5.2.2 GPS Timing

GPS is the standard clock when user use GPS timing, it check the system
server after each second begins and before the next second comes. System
server refreshes OPS’s standard time by LAN.

1. Connection method
 Device connection

The devices connect method for GPS timing, as shown in Figure 4.5.2-3.

Figure 4.5.2-3 GPS Connection Method

 The connection of GPS and server

General GPS devices provide communication standard RS232, it


connects with server’s serial port, and the cable connections is shown in
Table 4.5-1: (In the table, pins take DB9 connector as standard, NC for
unconnected)
Table 4.5-1 Cable Connections

Crossover cable
Pins Server-RS232
GPS-RS232

588
SECTION 4Online Operation

Crossover cable
Pins Server-RS232
GPS-RS232

1 NC NC

2 RS232(T) RS232(R)

3 RS232(R) RS232(T)

4 NC NC

Clock signal
5 Clock signal earthling
earthling

6 NC NC

clock pulse
7 NC
input

8 NC NC

9 Clock pulse input NC

The connection of GPS and server as shown in Figure 4.5.2-4, the pins 2
and 3 are connected by a pair of twisted-pair, so do the pins 5 and 9(7).

Figure 4.5.2-4 Cable Connections

2. Configuration of HOLLiAS MACS server


When user is installing server software with GPS timing, select GPS
589
SECTION 4Online Operation

timing and choose the proper serial port, the file CAS2000serverExe.ini in
directory C:\WINDOWS(or C:\WINNT)do not need to be modified.
Otherwise, modify the two parameters as shown in Figure 4.5.2-5 and
Figure 4.5.2-6.

Figure 4.5.2-5 Macs.ini

590
SECTION 4Online Operation

Figure 4.5.2-6 CAS2000serverExe.ini

3. GPS setup steps


Firstly, connect GPS to server serial port through communication cable
according to GPS timing connection method (specify the serial port which
the GPS is connected in installing server software), after power up, GPS
configurator runs (sub panel\tools\ GPSMON.EXE), then open the
program window and select the current serial port and baud rate, as
shown in Figure 4.5.2-7.

591
SECTION 4Online Operation

Figure 4.5.2-7 GPS Configurator Window

Next, click button Binary Mode to configurate working mode, in the


working mode dialog, as Figure 4.5.2-8 shows, select the mode NMEA,
then click OK to confirm.

592
SECTION 4Online Operation

Figure 4.5.2-8 Configurate Working Mode

As shown in Figure 4.5.2-9, select command Xmit Msg-NMEA-Output


Configuration in menu, popup parameter configuration dialog, as Figure
4.5.2-10 shows.

593
SECTION 4Online Operation

Figure 4.5.2-9 Xmit Msg Menu

Figure 4.5.2-10 Parameter Configuration Dialog

Configure the parameters according to Figure 4.5.2-10, then click button


Send to send the parameters to GPS, meanwhile, the yellow light in front
panel of GPS glisten.
After above all, select command Ports Config-Config-Save Config in
menu, to save configuration according to Figure 4.5.2-11.

594
SECTION 4Online Operation

Figure 4.5.2-11 Save Command

After all configurations are completed, user can see the current date data
in terminal window. Otherwise, without receives the satellite signal,
because the location of mushroom head is bad, so the higher the position
is, the more effective the satellite signal will be.
The notes for GPS control panel light as shown in Table 4.5-2.
Table 4.5-2 Notes for GPS Control Panel Light

Pilot lamp State Description

red light Power on

yellow blink Receive corrected parameter

green blink Receive satellite signals

4.5.2.3 FM197(Timing HUB)Timing

FM197 takes local clock as standard clock when use FM197 for timing, and
take the rising edge of timing pause for minute as the start of each minute, then
keep high level 1 second and low level 59 seconds. The whole system takes
the rising edge of timing pulse for minute as the timing standard, so the
systems can timing in minute. User can use button SET, SELECT, UP and
DOWN in the front panel of FM197 to modify timing clock in real time when
master timing HUB not attach GPS.

1. Connection method
(1) Device connection

The non-cascade connection method of FM197’s timing as shown in


Figure 4.5.2-12. The cascade connection method of FM197’s timing as
shown in Figure 4.5.2-13.

595
SECTION 4Online Operation

Figure 4.5.2-12 The Non-cascade Connection Method of FM197’s


Timing

596
SECTION 4Online Operation

Figure 4.5.2-13 The Cascade Connection Method of FM197’s Timing

(2) Connect FM197 and server

RS485-RS232 converter is a must in FM197 timing HUB timing with


server through clock pulse outputs (communication interface 3-16). The
connecting cable between FM197 timing HUB and RS485-RS232
converter is communication cable RS485. Take RS485-232 converter in
the type of Model2485FM as example, the connections of cable as shown
in Table 4.5-3(The definition of pins in this table according to DB9
connector)NC for unconnected:
Table 4.5-3 Cable Connections

FM197’s
(master)
Pins RS485-RS232 communicator Server-RS232
communication
interface 3-16

1 NC RS485 NC NC
communication
negative

597
SECTION 4Online Operation

FM197’s
(master)
Pins RS485-RS232 communicator Server-RS232
communication
interface 3-16

terminal

RS485 RS485
2 communication communication RS232(T) RS232(R)
positive terminal positive terminal

RS485
3 communication NC RS232(R) RS232(T)
negative terminal

4 NC NC NC NC

Clock signal Clock signal Clock signal Clock signal


5
earthling earthling earthling earthling

6 NC NC NC NC

Clock pulse Clock pulse Clock pulse Clock pulse


7
output input output input

8 NC NC NC NC

9 NC NC NC NC

As shown in Figure 4.5.2-14, FM197 (communication interface 3-16)


connect with server through RS485-RS232 converter, pins 2 and
3(corresponding to 1 and 2 in the serial port converter) interconnected by
a pair of twisted pair cable, so do pins 5 and 7.

598
SECTION 4Online Operation

Figure 4.5.2-14 Cable Connections

After right connect FM197 and server, the received 9 bytes data will be
shown below the timing state window, and above it shows the time for
server timing. In MCSV, the standby server’s clock signal ranks below the
master server’s, so in fact only the master server receives FM197 signal.
(3) Connect FM197 and FM161E-48-SOE

FM197 timing HUB sends timing signal to FCS’s I/O module through
timing communication cable, which composed by one UTP cable and one
DB9 connector, one end of the cable connects clock pulse outputs
(communication interface 3-16) of FM197 timing HUB, and the other
connects terminal 31 and 32 in FM131A of FM161E-48-SOE.
The connections of cable as shown in Table 4.5-4 (the pins subject to DB9
connecter), NC signify unconnected.
Table 4.5-4 Cable Connections

FM197(master-standby )communication
Pins FM161E-48-SOE/FM131A
interface 1 and 3-16

1 NC /

2 RS485 communication positive terminal /

3 RS485 communication negative terminal /

4 NC /

5 Clock signal earthling 32

599
SECTION 4Online Operation

FM197(master-standby )communication
Pins FM161E-48-SOE/FM131A
interface 1 and 3-16

6 NC /

7 Clock pulse output 31

8 NC /

9 NC /

NC-unconnected, /-no correlation.


The connect method of FM197 and FM131A in FM161E-SOE, as shown
in Figure 4.5.2-15.

Figure 4.5.2-15 Cable Connections

(4) FM197’s cascade

In cascade using FM197 timing HUB, the communication interface 1 and


3-16 in the rear panel are the master timing HUB’s cascade signal output,
the communication interface 2 is the standby timing HUB’s cascade signal
input, both the master and the standby timing HUB connected by cascade
cable, which consists of one UTP cable (with five types and eight cores)
and two DB9 connectors.
The connections of cable as shown in Table 4.5-5 (the pins subject to DB9
connecter), NC signify unconnected.

Table 4.5-5 Cable Connections

600
SECTION 4Online Operation

FM197(master) communication FM197(standby)


Pins
interface1, 3-16 communication interface 2

1 NC NC

RS485 communication positive RS485 communication


2
terminal positive terminal

RS485 communication negative RS485 communication


3
terminal negative terminal

4 NC NC

5 Clock signal earthling Clock signal earthling

6 NC NC

7 Clock pulse output Clock pulse input

8 NC NC

9 NC (Clock pulse input)

The connect method of master FM197 and standby FM197 as shown in


Figure 4.5.2-16.

Figure 4.5.2-16 Cable Connections

• The pins 7 and 9 in communication interface type D, number 2 of FM197

601
SECTION 4Online Operation

timing HUB default short.

• Pins 2 and 3 should be interconnected by a pair of twisted pair, so do pins


5 and 7.

• Master timing HUB will automatic reset if it doesn’t send timing message in
about 4 seconds.

• Standby timing HUB will automatic reset if it doesn’t receive timing


message in about 6 seconds.

• The master-standby light in front panel blinks every other second when the
master HUB using local clock.

2. Configure FM197
(1) Configure FM197’s master-standby state

Local clock circuit generates the standard clock of FM197 timing HUB,
user need to configure the master-standby of FM197 timing HUB through
No.1 of dial switch S1 on FB197 panel, the state OFF for master and ON
for standby. The alone FM197 must set to master, but in cascade, set the
level 1 for master and others for standby.

• To modify the master-standby state and the standard clock are not allowed,
so the dial switch S1 is placed in FM197 in case of misoperation.

The master-standby light in the front panel of FM197 timing HUB stands for
master-standby’s state. After power up, the meanings of the light can be shown
in Table 4.5-6.

Table 4.5-6 Notes for Master Light

Master light Meaning

FM197 is the master timing device in local


blink
clock.

light FM197 is the standby device

602
SECTION 4Online Operation

Master light Meaning

FM197 is the master timing device for


go out
attach GPS

(2) Configure the standard clock

User should set the standard clock by No.2 of dial switch S1 on FB197
panel when taking FM197 as the master timing HUB, OFF for attach GPS
and ON for generate by local clock circuit. The set is invalid when FM197
is taken as standby timing HUB.

• To modify the master-standby state and the standard clock are not allowed,
so the dial switch S1 is placed in FM197 in case of misoperation.

(3) Set and adjust time

User can set time through time buttons in the front panel when the master
timing HUB with-out attached GPS but local clock to create standard
clock.
The method for set time is like following:
After pressing button SET to enter set state, choose time unit by button
SEL. Press SEL each time in accordance with the blink time unit in digital
display move 1 unit to the right. Choose the time unit, and then set the
right value through UP and DOWN. After all finished, press SET again to
make the set time effective, then quit the set state and the digital display
recovers to the normal time state.

• In order to unify the time, to set and adjust time is permitted only when
master timing HUB without attaches GPS, and system will not in response
to the time set for standby timing HUB.

• Press SET to set state, after set well, presses SET again to confirm and
quit the set state, otherwise, system will keep waiting.

• System will ignore the time that is less than second after the set effective
because the time’s minimum unit is second.

• User could set the range of year between 2000 and 2099, other time unit is

603
SECTION 4Online Operation

also changed in a certain range in setting process.

3. Configurate HOLLiASMACS server


When user use FM197 for timing, select GPS timing during install server
software, choose the right serial port number and modify the content in file
CAS2000serverExe.ini of directory C:\WINDOWS (or C:\WINNT), as
shown in Figure 4.5.2-17 and Figure 4.5.2-18.

Figure 4.5.2-17 Macs.ini

604
SECTION 4Online Operation

Figure 4.5.2-18 CAS2000serverExe.ini

• The extra –F in CAS2000serverExe.ini of C:\WINDOWS (or C:\WINNT)


must be capitalized, lower case will show messy code.

• The extra –F indicates FM197 timing, and it is a must term. It is GPS timing
without this parameter.

• Add -D stand for showing timing state window on running server, and the
window is used for judging the data. It is needed when timing is wrong.

• Add -1 stands for the GPS’s serial port of server is 1.

• The GPS port number is according to specific situation.

• Logout and restart server program are needed after modify files.

4.5.2.4 GPS+FM197(Timing HUB)Timing

FM197 timing HUB attaches GPS as standard clock, and timing FM197 during
the whole second. FM197 timing HUB adopt the rising edge of timing pulse for

605
SECTION 4Online Operation

minute as each minute’s starting point, then keep high level 1 sec. and low
level 59 sec., so the whole system will be based on the rising edge of FM197
timing pulse for minute and it will be timing in the whole second.

1. Connection method
(1) Connected equipment

The connection method of GPS+FM197 (timing HUB) timing


(non-cascade) as shown in Figure 4.5.2-19, and the connection method of
GPS+FM197 (timing HUB) timing (cascade) as shown in Figure 4.5.2-20.

Figure 4.5.2-19 Connection Method of GPS+FM197 Timing (Non-cascade)

606
SECTION 4Online Operation

Figure 4.5.2-20 Connection Method of GPS+FM197 Timing (Cascade)

The No.2 communication interface in rear panel can be regard as the input
of attach GPS standard clock, only when FM197 timing HUB act as
master timing HUB.

• The cascade distance between GPS and timing HUB is no more than 1.5m,
and minute pulse is used for timing, so the whole timing system will be
timing in one minute. When standard clock generated by attach GPS,
master HUB will automatic reset if it doesn’t receive clock pulse in 4
seconds, the clock digital displays tube in front panel blinks.

(2) Connect FM197 and GPS

GPS device provides RS232 communication standard, user can select


crossover cable according to the pins of GPS. The connections of two
DB9 connectors through eight-core UTP cable as shown in

607
SECTION 4Online Operation

Table 4.5-7(the pins subject to DB9 connecter), NC signify unconnected.

Table 4.5-7 Cable Connections

FM197(master) GPS-RS232 crossover


Pins
communication interface 2 cable

1 NC NC

2 RS232(T) RS232(R)

3 RS232(R) RS232(T)

4 NC NC

5 Clock signal earthling Clock signal earthling

6 NC NC

7 Clock pulse input NC

8 NC NC

9 (Clock pulse input) Clock pulse output

The connect method of FM197 and GPS as shown in Figure 4.5.2-21.

Figure 4.5.2-21 Cable Connections


608
SECTION 4Online Operation

(3) Connect FM197 and FM161E-48-SOE

FM197 timing HUB sends timing signal to FCS’s I/O module through
timing communication cable, which composed by one UTP cable and one
DB9 connector, one end of the cable connects clock pulse outputs
(communication interface 3-16) of FM197 timing HUB, and the other
connects terminal 31 and 32 in FM131A of FM161E-48-SOE.
The connections of cable as shown in Table 4.5-8 (the pins subject to DB9
connecter), NC signify unconnected.
Table 4.5-8 Cable Connections

FM197 (master-standby)
Pins FM161E-48-SOE/FM131A
communication interface 1,3-16

1 NC /

RS485 communication positive


2 /
terminal

RS485 communication negative


3 /
terminal

4 NC /

5 Clock signal earthling 32

6 NC /

7 Clock pulse output 31

8 NC /

9 NC /

NC-unconnected, /-no correlation.


The connect method of FM197 and FM131A in FM161E-SOE, as shown
in Figure 4.5.2-22.

609
SECTION 4Online Operation

Figure 4.5.2-22 Cable Connections

4. FM197’s cascade

In cascade using FM197 timing HUB, the communication interface 1 and


3-16 in the rear panel are the master timing HUB’s cascade signal output,
the communication interface 2 is the standby timing HUB’s cascade signal
input, both the master and the standby timing HUB connected by cascade
cable, which consists of one UTP cable (with five types and eight cores)
and two DB9 connectors.
The connections of cable as shown in Table 4.5-9(the pins subject to DB9
connecter), NC signify unconnected.
Table 4.5-9 Cable Connections

FM197 (master)
FM197(standby )communication
Pins communication interface 1
interface 2
and 3-16

1 NC NC

RS485 communication positive RS485 communication positive


2
terminal terminal

RS485 communication negative RS485 communication negative


3
terminal terminal

4 NC NC

5 Clock signal earthling Clock signal earthling

610
SECTION 4Online Operation

FM197 (master)
FM197(standby )communication
Pins communication interface 1
interface 2
and 3-16

6 NC NC

7 Clock pulse output Clock pulse input

8 NC NC

9 NC (Clock pulse input)

The connect method of master FM197 and standby FM197 as shown in


Figure 4.5.2-23.

Figure 4.5.2-23 Cable Connections

• The pins 7 and 9 in communication interface type D, number 2 of FM197


timing HUB default short.

• Pins 2 and 3 should be interconnected by a pair of twisted pair, so do pins


5 and 7.

• Master timing HUB will automatic reset if it doesn’t send timing message in
about 4 seconds.

• Standby timing HUB will automatic reset if it doesn’t receive timing


message in about 6 seconds.

• The master-standby light in the front panel blinks every other second when
the master HUB using local clock.
611
SECTION 4Online Operation

2. Configure FM197
(1) Configure FM197’s master-standby state

GPS generates the standard clock of FM197 timing HUB, user need to
configurate the master-standby of FM197 timing HUB through No.1 of dial
switch S1 on FB197 panel, the state OFF for master and ON for standby.
The alone FM197 must set to master, but in cascade, set the level 1 for
master and others for standby.

• To modify the master-standby state and the standard clock are not allowed,
so the dial switch S1 is placed in FM197 in case of misoperation.

The master-standby light in the front panel of FM197 timing HUB stands
for master-standby’s state. After power on, the meanings of the light are
shown in Table 4.5-10.
Table 4.5-10 Notes for Master Light

Master light Meaning

FM197 is the master timing device


blink
in local clock.

light FM197 is the standby device

FM197 is the master timing device


go out
for attach GPS

(2) Configure the standard clock

User should set the standard clock by No.2 of dial switch S1 on FB197
panel when taking FM197 as the master timing HUB, OFF for attached
GPS and ON for generated by local clock circuit. The setting is invalid
when FM197 is taken as standby timing HUB.
(3) HUB’s internal receive settings

HUB’s internal receive settings need to be adjusted because GPS device


provide RS232 communication standard.

612
SECTION 4Online Operation

• HUB’s receive settings is RS485 in default, so the receiver sets jumper is


placed in HUB in case of misoperation.

HUB’s internal receiving settings is connecting to the pins1 and 2 of JP4


directly, JP5, JP6 and JP7 which are all three-wire jumper, and this kind of
setting is usually called RS232 communication standard (RS485 in default,
which is shorted pins 2 and 3 of three-wire jumper JP4, JP5, JP6 and
JP7 ).
3. Configure HOLLiAS MACS server
When user installed server software used GPS+FM197 for timing, select
GPS timing and choose the proper serial port, the file
CAS2000serverExe.ini in directory C:\WINDOWS(or C:\WINNT)need
not to be modified, as shown in Figure 4.5.2-24 and Figure 4.5.2-25.

Figure 4.5.2-24 Macs.ini

613
SECTION 4Online Operation

Figure 4.5.2-25 CAS2000serverExe.ini

• The extra –F in CAS2000serverExe.ini of C:\WINDOWS (or C:\WINNT)


must be capitalized, lower case will show messy code.

• The extra –F indicates FM197 timing, and it is a must term. It is GPS timing
without this parameter.

• Add -D stand for appear timing state window on running server, and the
window is used for judging the data. It needed when timing wrong.

• Add -1 stand for the GPS’s serial port of server is 1.

• The GPS port number according to specific situation.

• Logout and restart server program are needed after modify files.

4. Configure GPS

614
SECTION 4Online Operation

Please refer to GPS setup steps in 4.5.2.2 GPS for detail.

4.5.2.5 Multi-domain System Timing

Multi-domain system timing is divided into FM197 timing without GPS, GPS
timing, FM197 timing or GPS+FM197 timing.

1. FM197 timing without GPS


FM197 timing without GPS takes the master server with minimum domain
as standard clock, timing each domain’s server and OPS, FCS through
network.
2. GPS timing
For multi-domain system, user only needs to connect the minimum
domain server to GPS device. The connection method and configuration
of GPS and server are the same as that in 4.5.2.2GPS.
The server with minimum domain is timing each domain’s server and OPS,
FCS through network.
3. FM197 timing or GPS+FM197 timing
Connecting the server with minimum domain and FM197. The method and
configuration of FM197 and GPS, FM197 cascade are the same as which
in 4.5.2.3FM197(Timing HUB)and 4.5.2.4GPS+FM197(Timing HUB).
The server with minimum domain is timing each domain’s server and OPS,
FCS through network. The connect method of GPS+FM197 timing as
shown in Figure 4.5.2-26.

615
SECTION 4Online Operation

Figure 4.5.2-26 GPS+FM197 Timing Connect Method

• Take the master server in minimum domain as time standard for timing in
multi-domain system.

• No matter whatever timing method to choose in multi-domain system, ES


configuration in each domain must contain all domain projects. One
domain ES not only contains the specific configuration of its project, but
also contains other domains project name. Both the domain project and
other’s project are in one group.

Example: system contains two domains, the project names are “unit 1 control
system” and “unit 2 control system”. The two projects will be created in ES of
domain 0 and domain 1, the project names are “unit 1 control system” and “unit
2 control system”, grouping the two projects in Domain Setting, and allocating
project “unit 1 control system” as domain 0 and project “unit 2 control system”
as domain 1. Configuration of project “unit 1 control system” is finished in
domain 0 ES, so project “unit 2 control system” may not contain configuration
contents, it only needs to create project. Configuration of project “unit 2 control
system” is finished in domain 1 ES, so project “unit 1 control system” may not
contain configuration contents, it only needs to create project. After working,
domain 1 which is project “unit 2 control system” ’s timing will take master
system of domain 1 as standard clock.

616
SECTION 4Online Operation

4.5.3 NOTICES
4.5.3.1 Notes of Using Server

1. Notes about installation and processes


 Disable the following process after installation of MACS V5.2.5B:

Disable service Computer Browser in Control Panel-> Administrative


Tools->Services.
Disable service Windows Time in Control Panel-> Administrative
Tools->Services.
 Enable the following process after installation of MACS V5.2.5B:

Enable the server daemon process SysManage.exe. Otherwise it can’t


download.
2. Network settings
After successful installation of server software, the protocol program of
industrial Ethernet will change the four net connection names in Network
and Dial-up Connections to SNETA, SNETB, MNETA, MNETB. And the
former two names are used if there are only two network cards. Industrial
Ethernet protocol distinguishes Net A and Net B according to the
connection name SNETA and SNETB, but if there are something wrong
with the names or corresponding segment, it will cause communication fail
between server and subnet
When configuring the IP of server’s network card, user may configure
management net’s IP instead of system’s. If only running server software,
user may not select TCP/IP protocol for the two network cards of SNET.
The name of network card may disorder after reinstall server’s software,
which will cause abnormal communication between master control and
server. So after installing software, user should check the name of network
card which is corresponding to network segment.
3. The Storage Path of HDS
To modify the settings of server A/B and the location of HDS after
installation, user should reinstall server software of modify the
configuration files, the descriptions can refer to “4.5.1.2 Storage Path of
History Database ”.
4. Error log packeting
When error occurs in server, the error reason could be analyzed on the
basis of various logs and data files recorded in server, use LogPacker.exe
to packet the error information (logs and data) which recorded in the
server.

617
SECTION 4Online Operation

• When the communication tag can not be found in main control while the
server starting, it will tip and generate files under “server install
catalog\Macs\”.

5. Limit of total communication tags


Under the period of 500ms, communication tags of each IO station are
less than 5000, and communication tags number of all IO station are less
than 75000 (if modify the period of data communication to 250ms, the total
tags number of communication is limited to 35000). The total tags of
system could be looked up in “server install catalog\macs\WATCH.log”.
Calculate communication tags as shown in Table 4.5-11.
Table 4.5-11 Corresponding Relationship between Tag Type and
Communication Tags Number

Corresponding
Tag type
communication tag number

HSPID 48

HSSCS 37

HSALGMAN 24

HSDLCTRL5 37

HSCSLAVE5 18

HSVALVE5 12

SGC 10

SSB 11

SLC 5

618
SECTION 4Online Operation

Other Global Tags 1

4.5.3.2 To reduce communication tags, user can modify the items in


class structure to forbid them upload.Questions and Answers about
Server

1. Q&A 1: Whether to see each station I/O’s symbol table in native


gatewaywatch of a running Server, no matter it is Master Server or
Standby Server?
Only on master server the communication states of each station I/O’s
symbol table can be seen in native gatewaywatch.
2. Q&A 2: After HOLLiAS MACS server start, why the two servers on
error: the socket of double server?
The two servers’ backup goes wrong, and with fault communication: 1.
check up the settings of server AB. 2.make sure to install the right network
protocol, for standalone version, check network settings.
3. Q&A 3: Whether to change the historical trend path of HOLLiAS MACS
server? And how?
Historical trend path can be set when installing the server software. User
can change the path at configure server in server process management,
after modifying the found historical trend path, restart server.
4. Q&A 4: Dedicated operator keyboard in the OPS and server doesn’t
work properly, the lights is on, but the privilege level is invalid but
display 0, sometimes restart computer will operate normally.
When initial install server software, user selects GPS to install, it occupies
the serial port. Open the file \MACS.ini in server installation directory, and
change the last line to GPS Port=0, then restart server program to solve
the problem.
5. Q&A 5: Whether the initial trend is cleared after HOLLiAS MACS
server download? How to look up trend offline? How long the data can
be saved?
The initial trend is not cleared after server download, the trend only cannot
look up online, but it can look up through offline query software. In
software Historical Data Query, select Trend Group Settings in menu

Query, or click button in toolbar start the settings of the wizard:step1,


popup dialog, select the start time to query; step 2, define the tag name in
each trend group, it contains analog and digital. After enter the time period,
query the data needs. Time of history data storage depend on the space
of disk in history directory, 1G space for about one day’s trend storage.
6. Q&A 6: Popup warning dialog NO parameters! While running program
GetwayWatch.exe in server process management, and the number of

619
SECTION 4Online Operation

warning dialog is equal to the number of station IO. Why? And how? as
shown in Figure 4.5.3-1:

Figure 4.5.3-1 No Parameters Prompt Dialog

After that, server cannot get any data in station IO. Then examine
drwtsn32.log and see error messages as the following:
Application exception occurred:
App: (pid =1168)

When:2007-10-20@09:09:00.733

Exception number: c0000005 (access violation)

*----> System Information <----*


Computer Name: SERVER1

User Name: Administrator

Number of Processors: 2

Processor Type: x86 Family 6 Model 15 Stepping 2

Windows 2000 Version: 5.0

Current Build: 2195

Service Pack: 4

Current Type: Multiprocessor Free

Registered Organization: hollysys

Registered Owner: administrator

The reasons and solutions are as follows:


The parameters of GetwayWatch.exe are fixed-parameter. They can't be
620
SECTION 4Online Operation

adjusted, so parameter error can be considered as the damage of


GetwayWatch.exe and Gmonitor.exe.
The main cause for damage has in three aspects: occasional cause, virus
and project problem.
If occasional causes result in the damage of GetwayWathc.exe and
Gmonitor.exe, reinstall server software can solve this problem, and it will
not occur after reinstall.
By setting another server to validate if it is project problem.
Besides the two causes above, the problem can also be basically caused
by virus, attention: VKing can cause this problem, killing method:
download VKing killer on net.
7. Question 7: System is divide into 4 domains (domain 0-3), why timing
of domain 1 with domain 0 as time standards, but domain 3 with
domain 2 in stand of domain 0 as time standards.
In multi-domain system, no matter with what sorts of timing methods, it
must contains all domains’ projects in each domain’s ES configuration. In
local domain ES, not only contains specific configuration of local domain
projects, but also contains the name of other domains’ projects, both local
domain project and others’ are in a group.
The reason is that ES of domain 2 and 3 are not creating projects of
domain 0 and 1, but only creating projects of domain 2 and 3. Following
this principle: the master server which has the minimum domain number
will be considered as the time standard for a multi-domain system. On
these grounds, the project of domain 2 will be regarded as the time
standard for the project of domain

621
SECTION 5
Special Topics

5.1 How to Configure Audible Alarm


Requirements:

 Tag: must exist in database

 Alarm settings: set the corresponding items in database

 Configuration files: alarmwave.txt, the WAV files, corresponding to the


audible alarm tags, suffix is .txt. The storage path
is ..\MACSV_OPS\start\alarmwave.txt.

5.1.1 Audible Alarm Configuration through Database


If you want to make an audible alarm, please follow the instructions below:

Step 4. Open the database configuration editor

From Start menu, select All Programs → MACSV → MACS_ENG


→System Configuration, the main window of System Configuration
shows on the desktop, then select the project name from the drop-down
menu, click the button to open the Database Configuration editor, as
shown in Figure 5.1.1-1

623
SECTION 5Special Topics

Figure 5.1.1-1 Database Configuration Software

Step 5. Tag’s property setting in database

In the Database Configuration window, select Data Modify, then choose


the tag category in which you want to set audible alarm, for example, AM.
Set the Operate Record property to Record and Sound, as shown in
Figure 5.1.1-2.

624
SECTION 5Special Topics

Figure 5.1.1-2 Database Configuration-OR

The tags which can generate the audible alarm include 5 categories: AI,
AM, DI, DM, PI.

Step 6. Recording WAV files

Record audio files require microphone equipment, please use Voice


Recorder software which supplied by the operating system to record
audio files, and save the audio files with suffix.wav.
Naming rules:
 Analog (AI,AM) and Pulse(PI): corresponding to each level needs 4
audio alarm files:

 tag name + “-HH”+”.wav”, HHL alarm;

 tag name + “-H” +”.wav”, HL alarm;

 tag name + “-L” +”.wav”, LL alarm;

 tag name + “-LL” +”.wav”, LLL alarm.

 Digital (DI, DM): only needs 1 audio alarm file, and use the tag name
directly:

 tag name +”.wav”;

Step 7. Storage path of the audio alarm files

625
SECTION 5Special Topics

After the audio alarm files completed recording, please copy these files to
the start directory of OPS for online calling. The default path
is ..\MACSV_OPS\ start\, as shown in Figure 5.1.1-3.

Figure 5.1.1-3 Audio Files

Step 8. Start audible alarm function online

Besides the configurations above, you also need to have sound card
and speaker, and setup them correctly in OPS.
Then, the system will automatically deal with audible alarm tags, sound
wave is played out through the sound card and speaker, and the interval
of continuous alarm is 1 second.
You can change the WAV files without restarting the OPS.

5.1.2 Audible Alarm Configuration through Files


After the first two steps in 5.1.1 when configuring the audible alarm, if the OPS
can’t find any WAV files of related tags, it will continue to look for the
configuration items setting in the configuration file which is stored
in ..\MACSV_OPS \start\alarmwave.txt, as shown in Figure 5.1.2-1.

626
SECTION 5Special Topics

Figure 5.1.2-1 Audible Configuration File

There are five WAV files provided by default at the directory “OPS software
installation folder\start\”, as shown in Figure 5.1.2-2:

627
SECTION 5Special Topics

 Def_H_Level.wav: Analog higher limit alarm wav file;

 Def_HH_Level.wav: Analog HH limit alarm wav file;

 Def_L_Level.wav: Analog lower limit alarm wav file;

 Def_LL_Level.wav: Analog LL limit alarm wav file;

 Def_Other.wav: alarm wav file for other types of tags.

Figure 5.1.2-2 WAV files provided by system

Modify the contents of this file to set WAV files. Without specified WAV files, it
will use these default wav files for alarming.

Specific configuration is shown in Table 5.1-1:

Table 5.1-1 Audible Configuration File

ITEM Description
Amount of audible alarm conditions, the number
is according to the following items you have set,
[COUNT] NUM=5 here is 5, the operator will find configuration
conditions in the following sub-items from
[ALARM1] to [ALARM5].

The name of WAV file. Here is a.wav, the file in


[ALARM1] WAV=a.wav
the first audible alarm condition.

628
SECTION 5Special Topics

ITEM Description
The station number of the native station that use
STATION=10
the a.wav.

The tag name that use the WAV file, it also can
be the beginning letters of the tag name, then
TAGNAME=aaa
system will use the WAV file for the alarm tags
which confirm with these beginning letters.

The database type of audible tag, it can only


TAGTYPE=AI
be AI, AM, DI, DM or PI.

WAV=b.wav

STATION=11
The settings of ALARM2 to ALARM5 are similar
[ALARM2]
to ALARM1 which is shown above.
TAGNAME=bbb

TAGTYPE=DM

In a project, you can flexibly configure the alarm voice according to station
number, tag name or tag type. The priority of these three conditions from
higher to lower is tag name, station number, tag type.

When the tag has the alarm event, it will choose the audible WAV file in the
item which has the most coincidence item to play, Besides, If there is no items
coincide, it will play the latest audible WAV file listed in this file. If there is still
no items coincide, it will play the default WAV files provided by default.

5.2 How to Filter Alarms


Requirements:

 Configuration file: “alarmtable+” domain number”.txt”, corresponding to


the filtered station number or the tag name with suffix.txt. The storage
path is ..\MACSV_OPS\start\.

The Alarm filtered configuration file name is “alarmtable+“domain number” “,


for example, alarmtable0, it means that this file will filter through the alarm

629
SECTION 5Special Topics

information in domain0. As shown in Figure 5.2-1.

Figure 5.2-1 Alarm Filtered Configuration File

The keywords in this file are: BEGIN, StationBegin, StationEnd,


TagNameBegin, TagNameEnd, END. If there is such file in the start directory,
No one should be left, or the operator online system will not start up. It will
prompt Fail to initiate alarm definition table.

If there is such file in the start directory, you must configure the corresponding
items in the file, or there will be no alarm information of the pointed domain in
the alarm pages of the operator online systems.

Different OPS can be differently configured according to division of


responsibility.

Specific configuration is like following, as shown in Table 5.2-2:

Table 5.2-2 Alarm Filtered Configuration File

ITEM Description
BEGIN Keyword, start the configuration

StationBegin Keyword, alarm filter by station No.

The alarm in station 10 will alarm normally


10
not filtered.

11
The alarm in station 11 will alarm normally,

630
SECTION 5Special Topics

ITEM Description
not filtered.

Alarms in the stations list here will alarm



normally, not filtered.

StationEnd Keyword, end filter by station No.

TagNameBegin Keyword, alarm filter by tag name.

Fill all tag names needed alarm in each line,


… if the tags do not appear here, their alarms
will be filtered.

TagNameEnd Keyword, end filter by tag name.

END Keyword, end the configuration

The logical relationship is OR between the station number filter and the tag
name filter.

That is to say: alarm tags listed in the TagName section will alarm, no matter
their station numbers are listed in the Station section or not.

Note: For the network node, whether listed here or not, their alarm will not be
filtered.

5.3 How to Edit Reconfirm Button


If you want to edit a reconfirm button, please follow the instructions below:

1. Open the interactive feature


From Start menu, select All Programs → MACSV → MACS_ENG →
Graph Configuration, the main window of Graph Configuration
software show in the desktop, then open the HS2000CAS graph file which
you want to add a reconfirm function button, as shown in Figure 5.3-1.

631
SECTION 5Special Topics

Figure 5.3-1 Interactive Feature-Value Increase/Decrease

2. Add a value increase/decrease feature


Right click the button, and choose the interactive feature command, then
popup the Interactive Feature Definition window. Turn to the Value
Increase/Decrease item, as shown in Figure 5.3-1.
3. Edit the Value Increase/Decrease tab
Edit the Value Increase/Decrease tab, set Tag, Item, Increment,
Domain item of the variable to be controlled, as shown in Figure 5.3-2.
 Tag: CWGGLS

 Item: DV

 Domain: 0

632
SECTION 5Special Topics

 Increment: 1

Figure 5.3-2 Edit Value Increase/Decrease

Then set the Check Limit, the default range is the limits recorded in the
corresponding database. If you want different prompt in accordance with
the tag value, write as the following format:
 Reconfirm message of increase + 0110 + Reconfirm message of
decrease. To be specific, when you click the button to increase the tag
value, then popup the left string before 0110; when you click the button
to decrease the tag value, then popup the right string after 0110.

4. Observe the reconfirm efficiency


Save the graph file, download it to the OPS, start the operator online
program.
Click the button, it will show the prompt in Figure 5.3-3 the same as the left
633
SECTION 5Special Topics

string, you can see the tag value change from 0 to 1.Then, click the button
again, as shown in Figure 5.3-4, the same as the right string, the tag value
change from 1 to 0.

Figure 5.3-3 Increase

Figure 5.3-4 Decrease

5.4 Multi-Window Display on Screen


If you want to display a multi-window on OPS screen, please do follow the
instructions below.

There are two types of multi-window settings.

 One OPS with one screen.

 one OPS with multi- screens.

1. One OPS with one screen

634
SECTION 5Special Topics

Step 1. Open the Configuration window

From Start menu, select All Programs → MACSV → MACS_OPS→


Configuration, then the MACS2001 Settings window as shown in Figure
5.1.2-1.

Figure 5.1.2-1 MACS2001 Settings

Step 2. Configure the settings

Click to display the Advanced Settings, set the multi-window display


parameters as shown inFigure 5.1.2-2.

635
SECTION 5Special Topics

Figure 5.1.2-2 MACS2001 Settings

 Files Opened by Window: it is the default page name to be opened


when operator online system starting. Its position is determined by
these parameters: Window Position and The Number of popup
window.

 Window Position: it prescribes the top-left coordinate and the


bottom-right coordinate of the page. e.g.0,0,400,400, “0,0” is the
top-left coordinate, and “400,400” is the bottom-right coordinate. But, if
you have chosen Do you want to assign the size automatically?, it
will distribute the pages equally.

 The Number of popup window: it is the sequence number by which


the page will be arranged followed in the screen. The number is
related to the Total Number of Basic Graphs. For example, if the
Total Number of Basic Graphs is 3, then in The Number of Popup
window drop-down menu, you can use 0, 1 and 2, and so on.

For example, you want to have 3-windows displayed in one screen,


please follow the instructions below:
First, in the Total Number of Basic Graphs: input frame set the number
that you want to the screen be divided into, set it to 3, then click OK, and
you will get the corresponding editable items in the middle.

636
SECTION 5Special Topics

Second, in line 1, set the page name you want display at the beginning,
set sysdevice.hsg, and set the position of this page, then choose 1 for
The Number of popup window. Line 2 is done as line 1, here will not go
further on it.
Third, choose Do you want to assign the size automatically?, then click
OK at the bottom of this window, there is a prompt shown in Figure 5.1.2-3,
click OK. It is to prompt you to restart the OPS application.

Figure 5.1.2-3 Prompt Information

Step 3. Multi-window display

From Start menu, select All Programs → MACSV → MACS_OPS→


Start OPS, the OPS application displays as shown in Figure 5.1.2-4.

Figure 5.1.2-4 Multi-Window

After login, you can operate in these windows separately.


Please note that the system pages, such as trend, alarm and log can
only be configured in the first window. Click to set the focus in each
sub-window.

637
SECTION 5Special Topics

2. One OPS with multi- screens


For example, there is an OPS connected to two hardware screens, please
follow the instructions below:

Step 1. Set screen property

Right-click at the desktop, select Properties, it will show a Display


Properties dialog box. Switch to Settings tab, as shown in Figure 5.1.2-5.
Switch to tab “setting”, click on screen 2, as figure 1.4-5 shows, tick off
“expend Windows desktop to the monitor”. If taking screen 2 as main
screen, tick “take the device as main monitor”.

Figure 5.1.2-5 Setting of Display Properties 1

As figure 1.4-6 shows, it is already in screen 2 that “expend Windows desktop


to the monitor”. Switch to setting, the default setting of screen 1 is main
screen, click button “OK” to finish setting.

638
SECTION 5Special Topics

Figure 1.4.6 display properties setting 2

Step 2. Open and set the Configuration window

Refer to the step 2 of Situation No.1 to set Advanced Settings. Set the
Total Number of Basic Graph according to supervision needs, and
adjust Window Position for each screen. Assign the top-left coordinate,
and the bottom-right coordinate according to the resolution and Page size.
Choose Do you want to assign the size automatically?, all basic
graphs will be even distributed. Without chosen of Do you want to assign
the size automatically?, all basic graphs will be distributed according to
the coordinates.

Step 3. Multi-window display

After set as the above, restart the OPS. Only the main screen will display
the menu bar, and the other screen will not display the menu bar.

639
SECTION 5Special Topics

5.5 MACSV Database Import & Export


If the file dbedit.db in the new release software is updated (it will be tipped off
in the release note), if you want the new dbedit.db to be effective, database
export and import of old version project must be done.

Step 1. Install the configuration software of new version. Refer to the


section 1 in the manual.

Step 2. Import the old project.

From Start menu, select All Programs → MACSV → MACS_ENG →


System Configuration, the main window of System Configuration show
in the desktop, as shown in Figure 5.1.2-1. Then select Project → Import
Project, choose the project in the window Browse for Folder.

Figure 5.1.2-1 Import Project

Step 3. Prepare the data files.

640
SECTION 5Special Topics

 Dbedit.db

Back up this dbedit.db file in project directory\HSDB\, as shown in Figure


5.1.2-2. This backup file has no use in the following steps, it is just a
countermeasure.

Figure 5.1.2-2 Dbedit.db

 Database

Click the button to open the database editor, open the tags table of AI,
AO, DI, DO, PI, PO, AM, DM etc., export these database to a specific file
respectively. Take AI as example, select command “data operation”
under menu “system” in database configuration window, open dialog box
“select window style of data”, and select AI in type name list, click button
“select all”, then all items of AI will be displayed on the bottom of the dialog
box, as shown in Figure 1.5-3.

641
SECTION 5Special Topics

Figure 1.5.3 setting style of data item

Click button “OK”, and open dialog box “data entry - AI”, click “data export”,
then the saving dialog box is displayed, as Figure 1.5.4 shows, save the
exported data as file with suffix “.txt”.

642
SECTION 5Special Topics

Figure 5.1.2-3 Export Database

• Please ensuring the consistency of the item order of importing/exporting


data: in the process of exporting, when setting the data window style,
please set “select all”. Thus, all items of this type data will be arranged by
alphabet sequence from left to right. When importing after exporting,
please also set “select all” when setting the data window style, for ensuring
consistency of the item order of importing/exporting data and avoiding
causing disorder of data items.

• Particularly, when importing/exporting data of AO, because the data types


of LO, UP are added into AO after system upgrading, so when importing
type data of AO, after setting “select all”, please click LO and UP to cancel
selection of these two item in list of “please select item name”. In this way,
the consistency of data item order for importing/exporting could be
ensured.

643
SECTION 5Special Topics

Step 4. Close Database Configuration window and exit System


Configuration.

Step 5. Update the data files.

 Dbedit.db

Copy dbedit.db file in the installation directory (as shown in Figure 5.1.2-4)
to project directory\HSDB\, and overwrite the original file.

Figure 5.1.2-4 Installation Directory

Delete the files with the suffix .log in project directory \HSDB\, as shown in
Figure 5.1.2-5.

644
SECTION 5Special Topics

Figure 5.1.2-5 Log Files

 Database

Open the Database Configuration software, Click the button to open


the database editor, open the tags table of AI, AO, DI, DO, PI, PO, AM,
DM etc., import the corresponding file which exported in the third step
respectively, as shown in Figure 5.1.2-6.

645
SECTION 5Special Topics

Figure 5.1.2-6 Import Database

After finish the database importing, then compile in the Database


Configuration software.

5.6 How to Configure Network Variable


Network variable implement the variables transmission among different FCS.
You could configure the network variable group in pairs in the two
communicated FCS projects:

 A writable network variable group: in a sender project(*.pro);

 A readable network variable group: in a receiver project.

Follow the configuration instructions as below.

646
SECTION 5Special Topics

1. Enable the interface


Open Conmaker, double click the sub node Target Settings of
Resources tree in Resources tag, as shown in Figure 5.1.2-1.

Figure 5.1.2-1 Target Settings

Popup the Target Settings window, as shown in Figure 5.1.2-2, select


Support network variables in Network functionality tag, write UDP in
Names of supported network interfaces: frame, then click OK.

647
SECTION 5Special Topics

Figure 5.1.2-2 Network Functionality in Target Settings

• The word UDP must be in uppercase, lowercase is invalid.

2. Add library concerning the network variable


Open the Library Manager from the window menu or double click the sub
node in Resources tree, as shown in Figure 5.1.2-3.
Right click in the library list, select Additional library… command, add
NetVarUdp_lib.lib in the path of ..\MACSV_ENG\CODESYS\
Library_Linux\ manually, the system will automatically add other libraries:

648
SECTION 5Special Topics

 SysLibCallback.lib

 SysLibSocketsForLinux.lib

 HSNetvarHSIE.lib

Figure 5.1.2-3 Library Manager

Or you can add these four libraries automatically by Build or Rebuild all
in Project menu. Check the additional library in the Library Manager.
3. Add network variable list
Right click on the sub node Global Variables of the Resources tree, as
shown in Figure 5.1.2-4, select Add Object… in the Properties popup
window, click the button Add network, as shown in Figure 5.1.2-5.

Figure 5.1.2-4 Add Variable

649
SECTION 5Special Topics

Figure 5.1.2-5 Add Network Variable

In sending (write network variable) node Conmaker file, add global


network variable list, add the Properties as following format, as shown in
Figure 5.1.2-6:
 Checkbox Write (the same list only allow “read” or “write” property, not
allow “read” and “write” property at the same time);

 Checkbox Cyclic transmission;

 Checkbox Pack variables;

 Interval should be set in accordance with the actual requirements. It is


recommended that for preventing sending too much data, do not set the
Interval too short. The minimum of the interval is 500ms, and usually used
value is 500ms or 1000ms.

 User can set any List identifier value, range from 0-65535. List
identifier in different global network variable list should be different. The
List identifier of the network variable lists in pairs both in the sender
project and the receiver project should be the same.

For example, the No.11station sends network variables to No.10


station, thus, the List identifier of the writable network variable list in
No.11 station must be the same as the List identifier of the readable
network variable list in No.10 station.

650
SECTION 5Special Topics

Figure 5.1.2-6 Add Writable Network Variable List

• In a plant project, when there are many FCS, you should generally
consider the List identifier to all the network variable lists in all of the FCS.
Forbid to have the same List identifier in different pairs of writable and
readable network variable lists.

4. Broadcast address setting


Here are two interactive modes of network variable: broadcast and
peer-to-peer. MACS V5.2.5B is peer to peer. (The broadcast mode does
not need to set station number of receiver, but peer-to-peer mode it
requires to set destination station number.)
The following steps are to set up the destination station number in

651
SECTION 5Special Topics

peer-to-peer mode.

• Just set the destination station number for the writable nodes, the readable
need not.

Step 1. Set destination station number in writable network variable list

When you click the Add network button, you had already added a
Connection 1(UDP).
Click Settings to open the popup window UDP Settings, as shown in
Figure 5.1.2-7, just modify the destination station number in Broadcast
address frame. For example, you want to send the network variable of the
No.10 to No.11, set 11 instead of the first 255 in Broadcast address, as
shown in Figure 5.1.2-7.

652
SECTION 5Special Topics

Figure 5.1.2-7 Set the Destination Station Number-One

Step 2. Set Port number

Keep the default port number in Port for all networks, 1202.

• If you want to send network variable to a destination station, just need to


add the destination station number. For example, if you want to send
network variable to No.11, input 11 in Broadcast address.

• Permit to write to only one destination station in the Broadcast address.

• The network variable groups with writing property can’t exceed 32.

• Use the default port number in “Port for all networks”.


653
SECTION 5Special Topics

5. Add network variables

Step 1. Set RETAIN property

Choose Resources organization of a project, double click the network


variable list node under the Global Variables sub node on the left side,
add a space behind the keyword VAR_GLOBAL in the network variable
editor window on the right side, then add the word RETAIN as shown in
Figure 5.1.2-8.

Figure 5.1.2-8 Add Retain Property

Step 2. Add network variables

The format of the network variable is the same as the normal variable, as
shown in Figure 5.1.2-9.

654
SECTION 5Special Topics

Figure 5.1.2-9 Add Network Variables

Step 3. Copy and paste the network variables

Copy the variable list as shown in Figure 5.1.2-9, make sure to copy all of
the variables in the list, keep the consequence, order, quantity and the
type completely the same. Open another receiver project, set up a
network variable list as shown in Figure 5.1.2-10, then paste the variables
you just copied into it, as shown in Figure 5.1.2-11.

655
SECTION 5Special Topics

Figure 5.1.2-10 The Receiver Property

656
SECTION 5Special Topics

Figure 5.1.2-11 Paste Network Variables

• In the network variable list of receiver project, change “write” to “read”,


keep the List identifier the same as the network variable list of the sender
project, no longer to set the destination station number.

• Keep the correspondence of the variables both in the writable list and the
readable list in different projects.

6. Compile
After you have finished defining the network variables, execute Project →
Rebuild/Rebuild All, you may find this error in the Messages window as
shown in Figure 5.1.2-12.

Figure 5.1.2-12 Error

Add a network variable called in POU, and this error will prompt no more.
657
SECTION 5Special Topics

• If you want to remove the network variable function in a project after you
had added, please uncheck the UDP settings in Target Settings, then
execute Project → Clean All and Rebuild All before login and download
the project.

7. Restrictions
 Transmission types

Data Types that passed the test: BYTE, WORD, DWORD,


SINT, USINT, INT, UINT, DINT, UDINT BOOL, REAL, LREAL.
The others are not supported currently.

 Capacity of network variable list

Capacity of each global network variable list: 50 analog variables and 50


digital variables. If amount of network variables is more than this value in a
single network variable list, you should create more groups to put the
network variable, and the amount of the writable network variable list
should not exceed 32.
8. Points
(1) For the same global network group, definition of global network group
including variable name, data type, number of variables and the
sequence in ConMaker file (*.pro file) must be exactly the same on
each nodes (sending node and receiving node).

(2) Method of copy and paste keep exactly the same. If global variable list
definition is not same, network variable will not work properly.

(3) For project with multi-controller, unified consideration on List Identifier


of global network group in all controller ConMaker files is required, not
allow the situation that variable list different, List Identifier same to
happen.

(4) Previous MACSV 1.2 version, does not support the incremental
download function on global network variable list modification, that is,
when SNET variables running normally, the system will read and write
in accordance with the network variable reading and writing rule that
have been compiled, incremental download invalid.

(5) After MACSV 1.2 version (including MACSV 1.2), support incremental
download function on global network variable list modification.

658
SECTION 5Special Topics

(6) Recommend that: add margin of global network variable list at the
beginning of actual project configuration, that is add some spare REAL,
BOOL variables, in order to reduce the times of incremental download.

5.7 User-Defined DP Slave


HOLLiAS MACS system uses standard Profibus-DP protocol to carry out data
communication of field layer, so it can widely connect device with DP protocol
port in field.

In the process of engineering station configuration in current MACSV (here


refer to the serial softwares of MACS V5.*.* in general, and the same
explaination in this manual referred to this writing), firstly, configurate system
device and I/O device using device configuration in offline configuration
software. Then, when operating system binding, the system will create
control station file (Conmaker file) automatically, Thereinto, necessary device
configuration information are needed when generating control station file..

In this article, it will show you how to define a DP slave station, as two
situations like below:

DP slave station configuration of Hollysys

DP slave station configuration of third party from other manufacturers

DP slave station of Hollysys need to be export exp file first, and generate GSD
file. But DP slave station configuration from other manufacturers can use
offered GSD file directly.

5.7.1 DP slave of HOLLYSYS


1. Prepare the GSD file

Step 1. Open Conmaker, create a new project, and select Hollysys


CODESYS SP for HOLLiAS MACS in the target setting box, as
shown in Figure 5.7.1-1.

659
SECTION 5Special Topics

Figure 5.7.1-1 Target Settings

Step 2. Add a new module

Double click the MACS Configuration node in Resources organization,


and open the MACS Configuration editor in the work field. Append
sub-element FM121, and SM520 in the sub-level of FM121, as shown in
Figure 5.7.1-2.

Figure 5.7.1-2 Append Sub-elements

Step 3. Export MACS Configuration

Select Project → Export Project command in the menu bar, just export
the MACS Configuration component in the tree, as shown in Figure
5.7.1-3.

660
SECTION 5Special Topics

Figure 5.7.1-3 Export the MACS Configuration

Click OK, and save the file in Notepad, suffix is .exp.


Double click this file, and open it with Notepad, just copy the contact about
SM520 and save to a new file named “SM520.exp”, as shown in Figure
5.7.1-4.

661
SECTION 5Special Topics

Figure 5.7.1-4 Copy Content

Step 4. Put the file under the designed path

Copy SM520.exp to “MACSV_ENG\Datas” directory;


Copy SM520.exp to “MACSV_ENG\Target\Hollysys\PCBasedIO” directory,
and rename as HSSM520.GSD.
2. Import GSD file

Step 1. From Start menu, select All Programs → MACSV →


MACS_ENG→ Device Configuration, Open the Device
Configuration software. Then, select View → Custom Device
in the menu bar, as shown in Figure 5.7.1-5.

Figure 5.7.1-5 Device Definition


662
SECTION 5Special Topics

Step 2. Import GSD file

As shown in Figure 5.7.1-6 is the custom device window.


Select DP in the drop-down menu of Data Link, and the Imported GSD
file tree display in the right box.

Figure 5.7.1-6 Imported GSD File

Right click on it, select Import… command in the menu bar, find the
hssm520.gsd file under MACSV_ENG\Target\Hollysys\PCBasedIO path,
as shown in Figure 5.7.1-7, and click Open to import this file.

663
SECTION 5Special Topics

Figure 5.7.1-7 Add GSD File

Step 3. 3. Define device information

When the GSD file mentioned above is imported successfully, the device
needs to be user-defined.

Step 4. Step 1 Edit the device and channel information

Choose the SM520 node in the Imported GSD file tree, right click on it,
and select Define Device command, as shown in Figure 5.7.1-8.

Figure 5.7.1-8 Define Device

In the Productor Hollysys window, set a name for this device in Device
Name frame, select channels from the Module Name list above, click
Add, the selected item will add into the frame below, the No. is 0, as
shown in Figure 5.7.1-9.

664
SECTION 5Special Topics

Figure 5.7.1-9 Add Channel

Choose No. 0 line in the list below, click Define Module, then popup the
Module Byte Definition window as shown in Figure 5.7.1-10.
Select Channel Type and input the length in Length, for example WORD
and 1, click Add, it is add the first line in Input Area, click OK.

665
SECTION 5Special Topics

Figure 5.7.1-10 Edit the Channel

You can check the channel information in the bottom frame of Productor
Hollysys window, as shown in Figure 5.7.1-11.

666
SECTION 5Special Topics

Figure 5.7.1-11 The Channel Information

Step 5. Step 2 Edit the device and channel information

Choose the SELF sub node of SM520 node in the Imported GSD file tree,
right click on it, and then select Device Property command, as shown in
Figure 5.7.1-12.

667
SECTION 5Special Topics

Figure 5.7.1-12 Device Property

Show the Device Channel Information window, as shown in Figure 5.7.1-13.


Click Modify… to change the channel amount, input the new amount of
channels, click OK, and you will see the modified result in the Device Channel
Information window, as shown in Figure 5.7.1-14.

668
SECTION 5Special Topics

Figure 5.7.1-13 Device Channel Information

Figure 5.7.1-14 Modify Device Channel

Click the button to close this window.

669
SECTION 5Special Topics

Step 6. Step 3 Check the device information

Choose the SELF sub node of SM520 node in the Imported GSD file tree,
you will see information in the left part, set the Description and select the
Channel File (refer to graph information) for this device, as shown in
Figure 5.7.1-15.

Figure 5.7.1-15 Check Device Information

Click Save, the dialog box will be prompted as shown in Figure 5.7.1-16,
click OK.

Figure 5.7.1-16 Save New Device Prompt

Then, when you add I/O device to FCS, the new device appear in the
device list, as shown in Figure 5.7.1-17.

670
SECTION 5Special Topics

Figure 5.7.1-17 Add I/O Device

5.7.2 Configuration of Third Party DP Slave


In order to implement the normal application in project, import of third party DP
device need for a flexible method in MACS V5 system. Note four
characteristics of MACS V5 system:

1. Changes of I/O information in Database will cause the rewriting of IO


definition and DP state information in Conmaker.
2. When system creates Conmakerfile automatically, the relevant
information is fixed in the corresponding variable groups and program
groups, group name is fixed within the system.
3. Changes of device configuration will cause the modification of
hardware configuration in corresponding Conmakerfile, other database
changes will not affect hardware configuration.
4. DP slave of third party usually connect back of own DP products.

671
SECTION 5Special Topics

Based on the above considerations, and make the fourth article as a


prerequisite, configuration of third party DP device can be carried out as
follows:

Step 1. Import GSD file

In “device configuration” of offline configuration, choose command


“custom device” under menu “view”. Then select “belonged link” as DP
in dialog box “custom device”, on the right side of the window, tree
diagram of “import GSD file” is displayed, add GSD file offered by third
party here.

Step 2. Add third party device

After adding successfully, in configuration window of “IO device”, select


DP link of field control station, choose command “add device”, then select
third party device imported successfully. Configure own DP device
correctly in IO device configuration, and define IO tags correctly.

Step 3. Generate control station file by binding

System create Conmaker file automatically in Database compiling


procedure, including hardware configuration and variable declaration.

Step 4. Edit 3rd party device parameters

Open MACS configuration of Conmaker, add third party DP device, such


as ACS800 slave (as shown in Figure 5.7.2-1): note the correct
configuration of I/O output region and device address. Taking into account
that user may add/delete hardware, it is suggested that reserve some
address space between I/O region memory and third party device.

672
SECTION 5Special Topics

Figure 5.7.2-1 Macs Configuration

Step 5. Set up variable group

Add new variable group to store state detection variable(s) of the third
party device, and covert the device channel tags to AM or DM type
variables. Do not modify the variable groups and programs which system
created in Conmaker file automatically, such as Global_Variable_SysDev.

Step 6. Programming of third party variable

Write state detection program of third party device and variable


conversion program.

Step 7. Backup 3rd party configuration information

Export the variable group and program of third party device (exp file), so
that user can import them rapidly after hardware change.
After above treatment, system can compile all normally, communication
information of third party DP device as AM/DM type variables can be displayed
on the graphics. If user do not want to add part of the intermediate variables to
AM/DM database of Database, you can place the intermediate variables
horizontal side-by-side, or insert space, e.g.: “DM01:BOOL;” to “DM01:
BOOL;” etc.

Methods above can mitigate the contradiction between need of connection of


3rd Party device with progress of development modification, it also be proven
to be an effective method of configuration.

673
SECTION 5Special Topics

However, it needs to be considered that the issue of temporary modification


caused by change of user device configuration.

5.8 DCS Anti-virus


These instructions as the DCS system anti-virus guiding principles, apply to
the DCS system on site.

 Strongly recommended that the system must have anti-virus measures


in the project implementation, and users should be required to
strengthen preventive maintenance later.

 A considerable proportion of viruses enter the network through system


vulnerability, so the most effective measure is to install system patch
first, and then install anti-virus software.

Here are some specific anti-virus measures:

1. The operating system must be installed the corresponding patch: be


subjected to the latest patch issued by the producer.
2. Remove floppy drive, or disable floppy drive in BIOS.
No longer purchase floppy drive for project computer (except special
requirements), for the computer in project that has equipped with
floppy drive, the internal wiring can be removed or demolish the floppy
drive, or disable floppy drive in the BIOS. For example:

For a computer:

Press F2(or Delete) when booting and enter BIOS menu, select
Legacy Diskette A item, change original value 1.44/1.25MB (see
Figure 5.7.2-1) to Not Installed (see Figure 5.7.2-2).

674
SECTION 5Special Topics

Figure 5.7.2-1 Diskette A

Figure 5.7.2-2 Disabled Diskette A

675
SECTION 5Special Topics

To different types of computers, the diskette name may have some


nice distinction, just disable it.

3. Remove CD-ROM, or disable CD-ROM in BIOS.


Except the ES, all the OPS unplug the wiring of CD-ROM device or
disable CD-ROM device in BIOS, set as follows:

press F2(or Delete) when booting and enter BIOS menu, select Drive
item value CD-ROM Reader, press Enter and enter sub menu, set
Drive Type to OFF.

• Since hard disk now use the SATA interface, only the CD-ROM device use
IDE interface, so IDE controller can be disabled in some kinds of
computers.

4. Install anti-virus software or firewall in the ES, Symantec AntiVirus10.0


client (not to accept management) is recommended, require users to
regularly update virus libraries (at least update every two weeks). Pay
attention not to check Live Update item, or it will continue trying
access internet to automatically update the virus library files.
5. All shared directory on the computer must be set to read-only mode.
6. Strict requirement: only the ES can connect the external storage
device. Before connecting, you must scan the device with anti-virus
software first. Prohibit connecting the system with external
computer(s).
7. Before the system commissioning, put into operation, and equipment
maintenance, use anti-virus software on ES to scan other computer of
the system, prevent infection.

• Please do not install the anti-virus software in the same directories of the
MACS and the historical data storage, in order to prevent file(s) being
locked and result of the failure of data access and high computer load.

5.9 Using Log Packer


This updated version V5.2.5B provides the function of Log Packer to help the
field personnel to collect the various files and history data when the system
has problems. It is used for searching the corresponding contents in this

676
SECTION 5Special Topics

computer and packing.

The packed log files have various types, including server log files, server
history data, ES log files and Windows system log, the functions of these
packed log files are shown as below.

 Log file of the server: the Server log files except history data.

 Historical data of the server: the Sever data files of the history data
tags.

 Log file of ENG: the log files on ES.

 Windows system log: the log files of Windows system.

After packing, a folder named “log file” will be generated automatically under
the folder of LogPacker. Exe for saving packed content.

The steps of using log packer and the information of related log files are
described as below:

1. The Steps of Using Log Packer:

Step 1. The setup program of LogPacker.exe is stored in “\\Installtion


disk525\Tools\LogPacker “. Copy it to local hard disk before

using. Double-click the file . After the operation,


please click to select packed files, the storage capacity of the
packed file selected is displayed in the bottom of the dialog box,
as shown in Figure 5.9.1.

677
SECTION 5Special Topics

Figure 5.7.2-1 select packed file

If you select in the dialog box above, you


will set “the fault date and the fault time” to filter historical data, or select
the data in the data list, as shown in Figure 5.9.2.

678
SECTION 5Special Topics

Figure 5.7.2-2 history data of the server

finish the operation, then start packing.

Step 2. After Selecting packed files, you can click “Start Pack” to
generate packed files, the tip dialog box is shown in Figure
5.9.3.

Figure 5.7.2-3 Packing Complete

• Please close the browsing log folder before packing, otherwise packing will
fail.

679
SECTION 5Special Topics

Step 3. Click “OK” to confirm the operation, Log File will be generated
in the same directory as “LogPacker.exe”, as shown in
Figure5.9.4.

Figure 5.7.2-4 log file storage path

Step 4. If you need to delete packed log files, click “Cancel Pack”, as
shown in Figure5.9.5.

Figure 5.7.2-5 Cancel Packing

Click “OK”, Log File in the same directory of “LogPacker.exe” will be


deleted.

Step 5. Click Exit to close the program.

2. Information of Log Files


The sever log file, sever history data, ES log file and Windows system log
are corresponding with files in “Log File”, as shown in Table 1.
Table 1 Information of Log Files

File Format Historica


Log file Log Window
Sub-folder of Saved l data of
Log File of the file of s system
of Log File Log the
server ENG log
Information server

Log File .TXT × × × √


Dr Watson
of

680
SECTION 5Special Topics

File Format Historica


Log file Log Window
Sub-folder of Saved l data of
Log File of the file of s system
of Log File Log the
server ENG log
Information server
Operatio Log
n System
System
.TXT × × × √
Event Log

MACS Log .LOG √ × × ×

History Data
.DAT* × √ × ×
Log

Task .LOG √ × × ×
Log File
of Sever Event
A .LOG √ × × ×
Processing

Time
Synchronizat .LOG √ × × ×
ion

Diagnosis .LOG √ × × ×

ES Log
Comaker Log .LOG × × √ ×
File

*The file of “.DAT” can use tool to look up.

‘√”:Sub-folder of log file has packed log information.

“×’:Sub-folder of log file does not have packed log information.

5.10 Instruction of inter-domain tag


V5.2.5B don’t support the network variable between domains, however, you

681
SECTION 5Special Topics

can use the inter-domain reference tag. It is used as follows:

Project description: the project with domain No 0 is source domain, while


project test1 with domain No. 1 is the destination domain, that is to transfer
data from domain No. 0 to domain No. 1. The both projects are compiled in a
group, which means compile in a engineer station, when there are multi
projects with different domain No, first compile in a engineer station and
communication of downloading control table normally, then download in
different engineer station will not affect the communication function of control
table.

Step 1. Confirm the tag name in domain No. 0 referenced in other


domain. And define the related mid-tag in domain No. 1 as
assignment tag which is referenced.

In our example, the referenced tag in domain No. 0 is AM001, AM002, AM003
and be referenced tag in domain No. 1 is D0AM001, D0AM002, D0AM003, as
shown in Figure 5.10-1 and Figure 5.10-2

Figure 5.10-1 Referenced Tag in Domain No.0

682
SECTION 5Special Topics

Figure 5.10-2 Mid-Tag of Domain No.0 to be Referenced in Domain No.1

Step 2. The edition function of control table is shield in the version after
MACSV5.2.5B. Please modify configuration file if you want to
edit control table. The path of configuration file is
C:\WINDOWS\DB_Env.INI, please modify [CtrlTab] Enable to 1
whose default value is 0, as shown in Figure 5.10-3

Figure 5.10-3 Modify Configuration File

• [CtrlTab] Enable is interface of opening and closing the edit function of

683
SECTION 5Special Topics

control table, it is not recommended to open if you don’t edit the control
table..

Figure 5.10-4 Control Table Edition Button

Step 3. Defined the control table in domain No.0, which is the current
project in System Management, as in our example, the domain
No of project test is 0, the domain No of project test1 is 1, as
shown in Figure 5.10-5 If the project shown in System
Configuration is not the control table to be edited, when you
login, the control table is nor the one to be edited..

684
SECTION 5Special Topics

Figure 5.10-5 Control Table Window

Click button to edit the control table after login successfully, as shown
inFigure 5.10-6. Select domainref as the first layer in control table, and the
second layer dr_TagTab must be selected, click OK to finish, as shown
inFigure 5.10-7.

Figure 5.10-6 Configuration Window of Control Table

685
SECTION 5Special Topics

Figure 5.10-7 Control Table Selection

Step 4. Type in CCte Pnt Num, MCte Pnt Num, CTed Dm No in the first
layer, as shown in.Figure 5.10-8

Figure 5.10-8 First Layer of Control Table

CCte Pnt Num is the tag number currently referenced, MCte Pnt Num is the
maximum tags can be referenced in current project, CTed Dm No is the
domain No of referenced project.

In out example, current project is project with domain No.0, and is referenced
by project with domain No.1, so the CTed Dm No is 1.

686
SECTION 5Special Topics

Step 5. Type the tag name of domain No.0 which is source domain and
tag name of domain No.1 which is destination domain in Other
DM PN,This DM PN, as shown in Figure 5.10-9

Figure 5.10-9 Second Layer of Control Table

Please edit the first layer before editing the second layer, or the second layer is
gray and cannot be edited. The tag names can be different, but the largest tag
number can be referenced is 20.

Step 6. The database should be updated through update button after


finishing editing control table, as shown inFigure 5.10-10. Then
close the control table, full-compile the project with domain No.0
in System Configuration. Download the server and restart it,
the value of referenced tag in domain No.1 is same as tag that
transfer data in domain No.0, as shown in Figure
5.10-11and.Figure 5.10-12

687
SECTION 5Special Topics

Figure 5.10-10 Update Control Table

Figure 5.10-11 Online Display

688
SECTION 5Special Topics

Figure 5.10-12 Online Display

The maximum number of reference tag is 20. Please modify the Max Tags if it
exceeds 20, as shown in Figure 5.10-13

Figure 5.10-13 Modify Max Tags

5.11 Configuration Instruction of SM020


The configuration of SM020 is as follows:

Step 1. Import the configuration files

689
SECTION 5Special Topics

The first step is to import the SM020_M_MTF.gsd file in device configuration. If


it has been imported and defined, please delete the file named ‘Station No. +
ChannelParm.dat’ in project path, then reopen the device configuration, as
shown in Figure 5.11-1

Figure 5.11-1 Import SM020_M_MTF.gsd file

Step 2. Add the corresponding module

Name the imported file as SM020_M_MTF and sequentially add field


status,control,In xx Words, control, In xx Words, Out xx Wods, Read xx Words,
Out xx Wods and Read xx Words,Write xx Words for module SM020. Please
add enough amount tag according to tag number provided by third-party
manufactures, as shown in Figure 5.11-2

690
SECTION 5Special Topics

Figure 5.11-2 Add Module

Step 3. Define the Module and Set Properties of Channel

The parameters of four modules should be defined after being added, which
are named status, control, In xx Words, Out xx Words, as shown in Figure
5.11-3and Figure 5.11-4

691
SECTION 5Special Topics

Figure 5.11-3 Status Module

692
SECTION 5Special Topics

Figure 5.11-4 In 15 Words Module

• The length of added read or write module cannot be longer than 1000, and
the total length cannot be longer than 1200.

Save it and then set the properties of device channels, as shown in Figure
5.11-5. For example, the definition of NO.2 Modbus slave station, set reading
60 tags, type 2 in device No. and 45001 in address, and so on.

693
SECTION 5Special Topics

Figure 5.11-5 Set Channel Properties

Save and compile it in System Configuration, check the result in Codesys,


as shown in Figure 5.11-6

Figure 5.11-6 Open CodeSys

Step 4. Generate algorithm by SM020Config

Open SM020Config tool to select the project, as well as the station in which
the SM020 module be defined. In the example project, the length of empty

694
SECTION 5Special Topics

module is defined as 60 words. it sets up a space of 60 words. so the tags


which length is 60 words should be defined. The tags defined here are
mid-tags which will not be uploaded to the database, as shown in Figure
5.11-7.

Figure 5.11-7 Define the Tags in SM020Config

• You should define the same tags with the space you set up

• The tag description can be empty, which will not affect the generation of
algorithm.

• Tag can be named casually. In the example project only 10 tags be added,
but in actual configuration, enough tags should be added to match the
added module, otherwise the project cannot be saved.

Save it and click the red arrow to generate algorithm. It will enter CodeSys
automatically so that the corresponding algorithm can be found.

• The SM020Config tool can be ignored if you familiar with algorithm code.

695
SECTION 5Special Topics

 Problem Description

When sending or receiving the data package as multiple frames, if the length
of a complete communication variable is longer than 1 byte such as WORD,
REAL, etc., and it is just in subcontracting, , like some bytes are in Package i
and some in Package i+1. When the communication variable changes, it may
receive an intermediate value, and the data package will be incomplete.
Solution:

 Solution:

Through the project configuration to avoid this problem.

 Align Input and Output data is in the order of Bits first and then
the Words;

 Add the communication variable in the address of an integer


multiple of 2 when configuring WORD type variable. Ensure that
Bit type variable occupies the even number of bytes (8 bits occupy
one byte) when reading and writing Bits. Sometimes, it only needs
odd bytes, add one byte in the end to make the actual sending and
receiving bytes are even. This guarantees that word type
variables are allocated on even address, and effectively avoiding
the word type variables to be separated in two packages.

 When adding four bytes variable, such as a REAL, configure a


communication variable in the address of multiples of 4 to avoid
the package separation.

 Example

According to the OUT 15 WORDS, each package of the output data is 15*2=30
bytes. For example, if the actual configured variable is 8 bits, so the total length
of output data is 31 bytes which exceeds the maximum length for each
package 30 bytes. Consequently, this data will be sent in two packages, which
is multiple-frame sending.

The first package with length 30 bytes includes the following data: 8 digital
variables with length 1 byte, and then 29 bytes analog variables. The first
package is end at the first byte of the fifteenth word.

The second packet sends the second byte of the fifteenth word.

696
SECTION 5Special Topics

Figure 5.11-8 SM020 Configuration

As the configuration shown in the above figure, the initial address of word-type
variable is 1, which will make the variable with 15 words sending in two
packets and the data is not completed. In this case, when the data changes,
and intermediate value will appear. To avoid the appearance of intermediate
value, please configure it as following:

Figure 5.11-9 SM020 Configuration

Add a module ‘write 8 bits’ to make the word type variable ‘write 15 words’ is
allocated in address 2. All the word-type variables are allocated in even
address.

The first packet includes 2 bytes digital variables and the former 14 words.

The second packet includes the 15th word.

So as to make sure the 2 bytes data of each word-type variable is in same data
packet, and can be sent at the same time completely.

5.12 Why the configuration is not generated


when import GSD file
Problem:

697
SECTION 5Special Topics

 Compile in System Configuration, open IO device station in Codesys,


the MACS configuration is not generated.

Solution:

Step 1. Select project | import in Codesys, select CONFIG.EXP


in …\project name\station No.\import, as shown in ,the tip
information is as shown in .locate the error in CONFIG.EXP, as
shown in Figure 5.12-1

Figure 5.12-1 Tips Information of Import Error

Step 2. Take an example of module FM121, whose GSD file is ETM152.


Click MACS Configuration | Hardware Configuration on
right-click menu |FM121, as shown inFigure 5.12-2.

698
SECTION 5Special Topics

Figure 5.12-2 Add Module FM121

Right click the added module FM121 , Select Append Subelement |


ETM152,as shown in Figure 5.12-3

Figure 5.12-3 Add GSD File ETM152

Configure the parameter information in opened window, as shown in Figure


5.12-4

699
SECTION 5Special Topics

Figure 5.12-4 Configure Parameter of Module

Import the right information of module, as shown in Figure 5.12-5

Figure 5.12-5 Export Right Information of Module

Step 3. Compare the CONFIG.EXP actually generated in project


file\station No.\Import with exported .exp file, and modify the
located error according to the exported .EXP file, then check the
generation of MACS configuration.

Step 4. If the generation of configuration is correctly, modify the content

700
SECTION 5Special Topics

of corresponding position in GSD file.

For example, the ’0x80,0xFB’ in exported .EXP is capital, the character in


actually generated file is lowercase, modify it to capital and the configuration
will be right, as shown in Figure 5.12-6

Figure 5.12-6 Modify GSD FIle

Delete the ioflag.ini and io.dat files in …\project name\station No., recompile in
System Configuration.

5.13 The Usage of Configuration File Editor


Open Configuration File Editor, the interface and operation method is as
shown in Figure 5.7.2-1.

701
SECTION 5Special Topics

Figure 5.7.2-1 Configuration File Editor Window

The introduction includes the detail description about the function and meaning
of the current key.

• Configuration file editor is only valid for MACS V5.2.5B at present.

Select Start-> Generate Terminal Wiring Diagram to open generate terminal


wiring diagram tool. The interface and operation method is as shown in Figure
5.7.2-2.

702
SECTION 5Special Topics

Figure 5.7.2-2 Generate Terminal Wiring Window

The path of generated terminal wiring is:

Project path\MACSV\MACSV_ENG\User\project name\CAD.

703
SECTION 5Special Topics

5.14 Introduction of Dongle


Dongle program can be running by clicking Start -> MACSV -> MACS TOOLS
-> Dongle Update Tool. The window is as shown in Figure 5.7.2-1:

Figure 5.7.2-1 Dongle Update Tool

The window shows the authorization information of inserted dongle, which


includes Product Type, Version, Tags Number, Item Number, Item Name,
Bar Code and Authorization Data. Type the Bar Code in edit box and click
the update button to update the authorization information of dongle.

704
APPENDIX 1
Function Blocks
1.1 HS_MathLogic.lib
This library contains the mathematic function blocks which are used to
simulate non-linear function as well as hardware, to perform accumulation or
calculation, and to detect signal switch.

1.1.1 HSACCUM

Figure 1.1.1-2 HSACCUM

Alias

Flow Accumulation

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 REAL Input 0.00 No

RS BOOL Reset 0 No

Output

AV REAL Accumulation Output 0.00 Yes

SS BOOL Selection Output 0 No

Internal Parameters

705
APPENDIX 1 Function Block

Data Initial
Parameter Description Supplement Persistent
Type Value

Initial Vluae for Yes


IV REAL 0.00
Calculation

1.797693 Yes
LREA
MS Total Accumulation 1348623
L
2E308

LREA Yes
MC Instrument Faktor 1
L

bPositiveAcc Yes
BOOL Accumulation Mode 0
um

Output Features

Conditions Output Formula

AV (k  1)  MS , AV (k )  AV (k  1)  I1(k )  MC ,
I1  0 SS  0
Positive Mode
bPositiveAccum=1
AV (k  1)  MS , AV (k )  AV (k  1)  I1(k )  MC  MS ,
I1  0 SS  1
RS  0
AV (k )  AV (k  1)  I1(k )  MC ,
AV (k  1)  MS
SS  0
Total Mode
bPositiveAccum=0
AV (k )  AV (k  1)  I1(k )  MC ,
AV (k  1)  MS
SS  1

RS (k  1)  0, RS (k )  1 LR : AV (k  1); AV (k ) : IV ; SS : 0;

Description

This function block is designed to accumulate analog input. The block can be
set to positive accumulation. It will send a completion signal and start the
accumulation again automatically when it accumulates to the total
accumulation. It can also restart this process with the reset pin RS.

706
APPENDIX 1 Function Block

This block is usually used to accumulate a variety of flows in field and it


supports different modes as required. In positive mode (bPositiveAccum=1), it
only accumulates positive flows; in total mode, it accumulates positive and
negative flows. In each cycle, it calculates the flow increment in accordance
with I1 and MC, and then adds it to the result of the previous cycle. As long as
RS is not equal to 0, the accumulation will continue, till the result reaches to
the preset total accumulation (MC). SS will be set to 1, indicating the
calculation is completed.

When MS is reached, for positive mode, the accumulation will restart on the
basis of the accumulation result subtracting the preset total accumulation; for
total mode, it will restart on the basis of the current accumulation result. When
RS changes from 0 to 1, the accumulation result is recorded by LR
( LR  AV (k  1) ), and the output is set to the initial value ( AV (k )  IV ), and SS
is set to 0.

• When you use this function block, you must set MC correctly in
accordance with the processing cycle and the time unit. For example, in
the case of accumulation of flow through a coal feeder, suppose the
processing cycle is 0.5S and the flow unit is T/h, then
MC  0.5 / 3600  1.3888888888888888888888888888888e  4 .

Example

The following diagram shows an example of flow accumulation through a coal


feeder with this function block.

Figure 1.1.1-3 Example of HSACCUM

1.1.2 HSCHARC

707
APPENDIX 1 Function Block

Figure 1.1.2-1 HSCHARC

Alias

Broken Line

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 REAL Input 0.00 No

Output

AV REAL Output 0.00 No

1: Number of
breaking points,
Fault
ERR BYTE 0 2: X is not No
Indication
incremental,
3: Illegal input

Internal Parameters

Initial
Parameter Data Type Description Supplement Persistent
Value

Number of Breaking
PS UINT 2 1  PS  11 Yes
Points

Point number
X REAL Values of X1 to X11 0 Yes
is up to 11.

Point number
Y REAL Values of Y1 to Y11 0 Yes
is up to 11.

Output Features

708
APPENDIX 1 Function Block

Conditions Output Formula

I1  3.402823466 E  38 or
AV (k )  AV (k  1), ERR  3
I1  3.402823466 E  38
Error
Processing PS  2 or PS  11 AV (k )  AV (k  1), ERR  1

X [i]  X [i  1] AV (k )  AV (k  1), ERR  2

AV (k )  (Y [ PS ]  (Y [ PS ]  Y [ PS  1]) *
X [ PS ]  X [ PS  1]
( I1(k )  X {PS ] /( X [ PS ]  X [ PS  1]))
Normal I1  X [ PS ]

X [ PS ]  X [ PS  1] AV (k )  Y [ PS ]

Description

This function block uses 10 broken lines to approximate a nonlinear function.


For any input, it calculates an output by linear interpolation with preset broken
line points.

If I1 stays between the minimum and the maximum values of a given X, it is


calculated from adjacent two (X,Y) values. Otherwise I1 is calculated with the
gradient of first or last segment. The following diagram illustrates the principle
of this block with 8 points.

Figure 1.1.2-2 Principle of HSCHARC

709
APPENDIX 1 Function Block

• When you use this function block, you must set the parameters correctly.
Ensure that the elements of X are sorted in ascending order and the
number of break points is set within the allowable interval.

Example

In power plant, it needs select different density for saturated steam and water
under different pressure, in order to calculate the water level in PID loop. Or in
another example, user selects different flow rate under different turbine power.
This function block is used for this art calculation. The following diagram shows
an example of the application.

Figure 1.1.2-3 Example of HSCHARC

1.1.3 HSCMP

Figure 1.1.3-1 HSCMP

Alias

Comparator

Pins

Input Data Type Description Initial Value Supplement Persistent

I1 REAL Input 1 0.00 No

I2 REAL Input 2 0.00 No

710
APPENDIX 1 Function Block

Output

DV BOOL Output 0 No

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

CEQ BOOL Operation 1 0 Equal Yes

CNE BOOL Operation 2 0 Unequal Yes

Greater or Yes
CGE BOOL Operation 3 0
equal

CLE BOOL Operation 4 0 Less or equal Yes

CGT BOOL Operation 5 0 Greater Yes

CLT BOOL Operation 6 0 Less Yes

Output Features

Conditions Output Formula Supplement

I1  I 2 DV  1
CEQ  1
I1  I 2 DV  0

1. If all of the results of the 6 logical


I1  I 2 DV  1
comparisons are 0, then DV=0;
CNE  1
I1  I 2 DV  0 2. The priorities of the 6 comparison
are decremented; for example, if both
CEQ=1 and CNE=1, then CEQ is in
I1  I 2 DV  1
effect; if I1=I2, then DV=1.
CGE  1
I1  I 2 DV  0

CLE  1 I1  I 2 DV  1

711
APPENDIX 1 Function Block

I1  I 2 DV  0

I1  I 2 DV  1
CGT  1
I1  I 2 DV  0

I1  I 2 DV  1
CLT  1
I1  I 2 DV  0

Description

This function block accomplishes comparison between two floating point


numbers. It provides six comparison operations, and their priorities are
decremented from 1 to 6. User can choose the appropriate comparison
operator as required.

• By using this function block, you must pay attention to the priorities of the
comparison operators. If you choose an operator with a low priority, then
the values of all operators with higher priorities must be set to 0. For
example, if you want judge whether I1 is greater than I2, you must set
CGT=1, and set CEQ, CNE, CGE, and CLE to 0.

Example

In a power plant, this block can be used for comparison in different cases. The
following diagram shows the logic for judging whether the primary blower inlet
baffle is closed. If the opening of baffle is less than 3, it is deemed that the
baffle is closed.

Figure 1.1.3-2 Example of HSCMP

1.1.4 HSD

712
APPENDIX 1 Function Block

Figure 1.1.4-1 HSD

Alias

D Trigger

Pins

Input Data Type Description Initial Value Supplement Persistent

IN BOOL Input 0 No

CK BOOL Clock 0 Yes

RS BOOL Reset 0 Yes

DST BOOL Set 0 Yes

Output

DV BOOL Output 0 Yes

RV BOOL Reverse Output 0 No

Output Features

Conditions Output Formula Supplement

RS (k )  0 DV (k )  0

DST (k )  0 DV (k )  1 The priorities of the four


conditions are decremented; for
example, if both RS and ST are
CK (k )  1, CK (k  1)  0 DV (k )  IN (k ) 0, then DV(K)=0.

Other cases DV (k )  DV (k  1)

713
APPENDIX 1 Function Block

Description

This function block simulates a hardware D trigger. It allows you to choose


whether the output keeps track of IN or sets to 0 or 1 directly. When there is a
rising edge signal at CK, then DV (k )  IN (k ) . However, no matter CK is 1 or 0,
DV can be set to 0 or 1 at RS and ST. RV is the reverse output of DV.

1.1.5 HSDCSSUM

Figure 1.1.5-1 HSDCSSUM

Alias

Digital Signal Switch Accumulator

Pins

Initial
Input Data Type Description Supplement Persistent
Value

Digital to be
I1 BOOL 0 No
monitored

RS BOOL Reset 0 No

Output

AV REAL Current Value 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

0: Rising-Edge
Statistic
SL BYTE 0 1: Falling-Edge Yes
Mode
2 Both

714
APPENDIX 1 Function Block

Output Features

Conditions Output Formula

SL  0
I1(k  1)  0
RB  1
SL  1 AV (k )  AV (k  1)  1
I1  I1(k  1)
I1(k  1)  1

SL  2

RS  1 AV (k )  0

Description

This function block is designed to perform statistics of status changes of digital


signal. It accumulates rising-edge, falling-edge switches, or both of them for
the monitored digital signal. In mode 0, only the rising-edge switches of the
digital signal are accumulated, but falling-edge transitions are not. Similarly, in
the mode 1, only the falling-edge transitions of the digital signal are
accumulated. In mode 3, both type switches of the digital signal are
accumulated. When RS is set to 1, the output AV will be cleared for the next
accumulation cycle.

1.1.6 HSDOWN

Figure 1.1.6-1 HSDDOWN

Alias

Falling-Edge Trigger

Pins

Initial
Input Data Type Description Supplement Persistent
Value

715
APPENDIX 1 Function Block

IN BOOL Input 0 No

Output

Out BOOL Output 0 No

Output Features

Conditions Output Formula

IN (k )  0, IN (k  1)  1 OUT (k )  1

Other cases OUT (k )  0

Description

This function block detects the falling-edge of digital input. It sets the output to
1 (return to 0 after a cycle) if and only if a falling-edge of signal occurs. In other
cases, it sets OUT=0.

1.1.7 HSDTIMESUM

Figure 1.1.7-1 HSDTIMESUM

Alias

Digital Status Time Accumulator

Pins

Input Data Type Description Initial Value Supplement Persistent

Input to be
IN BOOL 0 No
monitored

RS BOOL Reset 0 No

716
APPENDIX 1 Function Block

Output

Its format is
AV REAL Current Value 0.00 decided by No
SOF.

AV1 TIME Current Value T#0ms Unit: ms No

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

0: Second
1: Minute
Output Format 2 Hour
SOF BYTE 0 Yes
of AV 3:
Millisecon
d

0:
Accumulat
e for status 0;
RB BOOL Output Mode 0 Yes
1:
Accumulat
e for status 1.

L1 DWORD accumulation1 0 Yes

L0 DWORD accumulation0 0 Yes

Output Features

Conditions Output Formula Supplement

AV (k )  ( L1(k  1)  TS ) / factor L1: Accumulation of 1


I1  1
AV 1  L1(k  1)  TS L2: Accumulation of 0
RS  0 RB  1 TS: Operation cycle
SOF=0,factor=1000
AV (k )  L1(k  1) / factor
I1  0
AV 1(k )  L1(k  1) SOF=1,factor=1000×60

717
APPENDIX 1 Function Block

AV (k )  L0(k  1) / factor SOF=2,factor=1000×3600


I1  1
AV 1(k )  L0(k  1)
RB  0
AV (k )  L0(k  1) / factor
I1  0
AV 1(k  1)  L0(k  1)  TS

RS  1 AV (k )  0, AV 1(k )  T #0ms L1,L0 are set to 0.

Description

This function block is designed to perform time accumulation of status 0/1 of


the monitored digital signal. This block has two parameters: SOF is used to
determine the output time format; RB is used to determine whether it
accumulates for state 0 or 1.

The block has two outputs AV and AV1, both of them are accumulation results.
AV can provide result in different time formats, depending on the SOF
parameter set by the user. AV1 outputs directly in ms. When RS is set to 1, the
accumulation results AV and AV1 will be cleared for next accumulation cycle.

1.1.8 HSEXPT

Figure 1.1.8-1 HSEXPT

Alias

Exponentiation

Pins

Input Data Type Description Initial Value Supplement

x REAL Base 0.00 x>0

y REAL Exponent 0.00

HSEXPT REAL Current Value 0.00

718
APPENDIX 1 Function Block

Output Features

Output Formula

HSEXPT  X y

Description

This function block is designed to perform exponential operation with X as the


base and Y as the exponent.

1.1.9 HSFILTER

Figure 1.1.9-1 HSFILTER

Alias

Digital Filter

Pins

Initial Supplement Persistent


Input Data Type Description
Value

Digital to be No
IN REAL 0.00
monitored

Output

AV REAL Current Value 0.00 No

Internal Parameters

Paramete Data Initial


Description Supplement Persistent
r Type Value

IS BYTE Term Number of Input 10 2  IS  10 Yes

719
APPENDIX 1 Function Block

0: Mean;
FM ENUM Filter Mode 0 Yes
1: Median.

Output Features

Conditions Output Formula Supplement

FM  0 AV (k )  ( IN (k )  IN (k  1)  ...  IN (k  ( IS  1))) / IS

IS samples are
sorted by value,
1/3 higher
values and 1/3
FM  1 AV (k )  temp /( IS / 3) lower values
are discared.
The sum of rest
1/3 values is
the temp.

Description

This function block provides arithmetic mean filtering and median filtering that
are commonly used in software filtering technique. The user can choose filter
mode by setting the parameter FM. 0 indicates arithmetic mean filtering, which
means arithmetic average of IS samples; 1 indicates median filtering, which
means the sum of 1/3 median values in IS samples. The maximum allowable
value of IS is 10 in this block.

1.1.10 HSONEFOLD

Figure 1.1.10-1 HSONEFOLD

Alias

One-Dimensional Interpolation

Pins

Input Data Type Description Supplement Persistent


Initial

720
APPENDIX 1 Function Block

Value

I1 REAL Input 0.00 No

Output

AV REAL Output 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

VN BYTE Valid Number 16 1  VN  16 Yes

Corresponding to Max. number


XV REAL 0 Yes
X1 to X16 XV is 16.

Corresponding to Max. number


YV REAL 0 Yes
Y1 to Y16 YV is 16.

Output Features

Conditions Output Formula

I1  XV [VN ]
AV [k ]  AV [k  1]
I1  XV [1]

XV [1]  I1  XV [VN ]

I1  XV [i] and
XV[i] is the
minimum of the AV [k ]  YV [i  1]  (YV [i]  YV [i  1]  ( I1  XV [i  1]) /( XV [i]  XV [i  1])
values which are
greater than I1.

XV [i]  XV [i  1]

721
APPENDIX 1 Function Block

Description

This function block uses 15 broken lines to approximate a nonlinear


function Y  f (x) . If I1 stays between the minimum and the maximum values of
a given X, it is calculated from adjacent two (XV,YV) values. Otherwise I1 will
be not calculated, and AV will keep its last value. The following diagram
illustrates the principle of this block with 9 points.

Figure 1.1.10-2 Example of HSONEFOLD

• When you use this function block, you must set the parameters correctly.
Ensure that the elements of X are sorted in ascending order and the
number of break points is set within the allowable interval.

1.1.11 HSPOLY

Figure 1.1.11-1 Example of HSPOLY

Alias

Polynomial

Pins

722
APPENDIX 1 Function Block

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

Output

AV REAL Output 0.00 No

Internal Parameters

Data
Parameter Description Initial Value Supplement Persistent
Type

REA Cofficients of each


CF Seven “1” Array Yes
L Order

Output Features

Output Formula

AV  CF [1]  CF [2]  IN  CF [3]  IN 2  CF [4]  IN 3  CF [5]  IN 4  CF [6]  IN 5  CF [7]  IN 6

Description

This function block uses a polynomial to approximate a nonlinear


function Y  f (x) . The highest order of polynomial is 7. User can choose the
order number and coefficients in accordance with the function to be
approximated.

Example

Suppose the function to be fitted is f ( x)  sin( x), x  [0,  ] , then the best square
approximation function 1  span1, x, x 2  is
 ( x)  0.050454  1.312215 x  0.417691x 2 .

1.1.12 HSQOR

723
APPENDIX 1 Function Block

Figure 1.1.12-1 HSQOR

Alias

Restricted OR

Pins

Input Data Type Description Initial Value Supplement Persistent

I1 BOOL Input 1 0 No

I2 BOOL Input 2 0 No

I3 BOOL Input 3 0 No

I4 BOOL Input 4 0 No

I5 BOOL Input 5 0 No

I6 BOOL Input 6 0 No

I7 BOOL Input 7 0 No

I8 BOOL Input 8 0 No

Output

DV BOOL Current Value 0 No

Internal Parameters

724
APPENDIX 1 Function Block

Data Initial
Parameter Description Supplement Persistent
Type Value

0: equal or
greater
SL BOOL Mode 0 Yes
1: only equal

The preset number


S9 BYTE of inputs which are 8 Yes
equal 1.

Output Features

Conditions Output Formula Supplement

SL  0, counter  S 9
DV  1
Counter is the number of inputs,
SL  1, counter  S 9
which are equal 1.

Other cases DV  0

Description

This function block judges whether the number of inputs which are equal 1
reaches the preset number (i.e. S9) in accordance with the mode SL.

Example

This block can be used for protection logic in engineering. For example, boiler
flame detection is divided into multiple layers. Each layer has 4 corners, and a
flame detector is deployed in each corner. Whether there is flame on a specific
layer can be judged with the logic algorithm "Select 3 from 4" implemented by
this function block. If there is no flame in three or more corners, it is deemed no
flame exists on that layer. In this case, you can set S9 =3 and SL=0. DV=1
means “No Flame”, and the "No Flame" protection logic will be triggered for
that layer.

1.1.13 HSRS

725
APPENDIX 1 Function Block

Figure 1.1.13-1 HSRS

Alias

RS Trigger

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 BOOL Input 1 0 Set No

I2 BOOL Input 2 0 Reset No

Output

DV BOOL Output 1 0 Yes

Reverse
RV BOOL Output 2 0 No
output of DV

Output Features

Conditions Output Formula

I2 1 DV (k )  0, RV (k )  1

I 2  0, I1  1 DV (k )  1, RV (k )  0

Other cases DV (k )  DV (k  1), RV (k )  RV (k  1)

Description

This function block is designed to simulate a hardware RS trigger. RV is the


reverse output of DV, its truth table is as follows:

726
APPENDIX 1 Function Block

I1 I2 DV RV

1 0 1 0

0 1 0 1

1 1 0 1

0 0 hold hold

Example

This block can be used for equipment start/stop. An example of start/stop of


the frequency converter of blower A is shown as follows:
A08HS03AQD: frequency converter starts up
A08HS03ATZ: frequency converter stops
A08HS03AQ: start up/stop/hold frequency converter

Figure 1.1.13-2 Example of HSRS

1.1.14 HSSLMTSUM

Figure 1.1.14-1 HSSLMTSUM

Alias

Analog Over-Limit Time Accumulator

727
APPENDIX 1 Function Block

Pins

Initial
Input Data Type Description Supplement Persistent
Value

Analog to be
I1 REAL 0.00 No
monitored

0: normal
Analog Quality Bit to
I1DQ BOOL 0 Yes
be monitored 1: fault

RS BOOL Reset No

Output

Format is
AV REAL Current Value 0.00 decided by Yes
SOF.

AV1 TIME Current Value T#0ms Unit: second Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

0:second

1:minute
Output Format
SOF BYTE 0 Yes
of AV 2:hour

3:milionsecond

AH REAL Upper Limit 0.00 Yes

AL REAL Lower Limit 0.00 Yes

Output Features

728
APPENDIX 1 Function Block

Conditions Output Formula Supplement

LJ: Accumulation

RS  0, TS: Operation Cycle(ms)


I1DQ  1 or AV (k )  ( LJ (k  1)  TS ) / factor
Factor: Time convention
I1  AH or AV 1  LJ (k  1)  TS coefficient
I1  AL SOF=0, factor=1000
SOF=1, factor=1000×60
SOF=2, factor=1000×3600

RS  1 AV (k )  0, AV 1(k )  T #0ms LJ is also set to 0

AV (k )  AV (k  1)
Other cases
AV 1(k )  AV 1(k  1)

Description

This function block can accumulate the bad quality time of the analog to be
monitored. "Bad Quality" means the item I1DQ of the inputted analog is 1. You
can set the parameters AH and AL to perform simple over-limit quality
judgment for the analog input point. AV can output accumulation result in
different time formats, depending on the SOF parameter set by the user, while
AV1 directly in ms. When RS is set to 1, AV and AV1 will be cleared for next
accumulation.

1.1.15 HSSLOPE

Figure 1.1.15-1 HSSLOPE

Alias

Input Change Rate

Pins

Input Data Type Description Initial Value Supplement Persistent

729
APPENDIX 1 Function Block

IN REAL Input 0.00 No

SW BOOL Switcher 0 Yes

Output

AV REAL Result 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

Numbers of
AP WORD 1 Yes
Calculation Cycles

Output Features

Conditions Output Formula Supplement

CT (k )  0
AV (k )  (20  IN (k ) 
IN [k  4]  IN [k  3]
10  IN (k  1) 
CT (k )  AP IN [k  3]  IN [k  2]
10  IN (k  3) 
IN [k  2]  IN [k  1]
20  IN (k  4)) /(100  AP  TS )
SW  1 IN [k  1]  IN [k ]
CT (k ) is
a
CT (k )  AP AV (k )  AV (k  1) CT (k )  CT (k  1)  1 counter
variable.

CT (k )  0
IN [k  4]  IN [k  3] 
SW  0 AV (k )  0
IN [k  2]  IN [k  1] 
IN [k ]

Description

730
APPENDIX 1 Function Block

This function block calculates the change rate (variation/access cycle) of the
input values in the present and 4 past access cycles, i.e., it calculates the
slope of the line with the present and 4 past points

Parameter AP represents the calculation interval, which is an integral multiple


of TS (sample cycle). The program utilizes CT as the counter internally. If
CT<AP, CT will increment by 1 in each cycle. In that stage, the block doesn't
calculate the change rate but keeps the output. If CT is accumulated to AP, the
change rate will be calculated and CT will be reset to 0 to restart the
accumulation, till it obtains the next change rate. The block repeats that
process to calculate the change rate of a signal in a specified period.

• AP shall be set during configuration. It should not be changed after it is


downloaded, otherwise there will be disturbance to the output.

Example

If you want to monitor the change rate of temperature per half hour, i.e.,
TS=0.5s, you can set AP  (30  60) / 0.5  3600 .

1.1.16 HSTWOFOLD

Figure 1.1.16-1 HSTWOFOLD

Alias

Two-Dimensional Interpolation

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 REAL Input 1 0.00 No

I2 REAL Input 2 0.00 No

Output

731
APPENDIX 1 Function Block

AV REAL Output 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

VN BYTE Valid Number 16 1  VN  16 Yes

Corresponding to Max. number


XV REAL 16 “0” Yes
X1 to X16 XV is 16.

Corresponding to Max. number


YV REAL 16 “0” Yes
Y1 to Y16 YV is 16.

Corresponding to Max. number


ZV REAL 16×16 “0” Yes
Z1 to Z16 ZV is 16×16.

Output Features

Conditions Output Formula

I1(k )  XV [VN ] ,

I1(k )  XV [1] ,

I 2(k )  YV [VN ] ,
Z1[k ]  ZV [i  1, j  1]  ( ZV [i  1, j ]  ZV [i  1, j  1]) 
I 2(k )  YV [1] ( I 2  YV [ j  1]) /(YV [ j ]  YV [ j  1]);
and Z 2[k ]  ZV [i, j  1]  ( ZV [i, j ]  ZV [i, j  1]) 
I 2(k )  YV [ j ] , ( I 2  YV [ j  1]) /(YV [ j ]  YV [ j  1];
AV [k ]  Z1[k ]  ( Z 2[k ]  Z1[k ]) /( XV [i ]  XV [i  1])  ( I1  XV [i  1]);
I 2(k )  YV [ j  1] ,

I1(k )  XV [i ] ,

I1(k )  XV [i  1]

Other cases AV [k ]  AV [k  1]

732
APPENDIX 1 Function Block

Description

This function block is used to approximate a nonlinear function Z  f ( X , Y ) .


The interpolation process is as follows:

Figure 1.1.16-2 Principle Schematic of HSTWOFOLD

Step 1. Find the interval in X-axis where I1 is, for


example XV [i  1]  I 1  XV [i ] ; find the interval in Y-axis where I2
is, for example YV [ j  1]  I 2  YV [ j ] .

Step 2. Fix XV [i  1] , and perform one-dimensional interpolation in


coordinate system Y-Z to calculate Z1. The interpolation point
are YV [ j  1], ZV [i  1, j  1]) and YV ([ j ], ZV [i  1, j ]) .

Step 3. Fix XV [i] , and perform one-dimensional interpolation in


coordinate system Y-Z to calculate Z2. The interpolation point
are YV [ j  1], ZV [i  1, j  1]) and (YV [ j ], ZV [i, j ]) .

Step 4. Perform one dimensional interpolation in region X-Z to calculate


Z. The interpolation points are ( XV [i  1], Z1) and ( XV [i], Z 2) .

733
APPENDIX 1 Function Block

• When you use this function block, you must set the parameters correctly, to
ensure that the elements of X and Y are in ascending order and the
number of break points is set within the allowable limit.

Example

For the purpose of simplification, we use quadratic interpolation to


approximate linear function Z  f ( X , Y )  2 X  3Y .

Module_HSTWOFOLD :HSTWOFOLD:=(VN:=16,XV:=1,2,3,4,5,6,7,8,9,10,6(1
1),YV:=2,4,6,8,10,12,14,16,18,20,6(22),ZV:=8,14,20,26,32,38,44,50,56,62,6(6
8),10,16,22,28,34,40,46,52,58,64,6(70),12,18,24,30,36,42,48,54,60,66,6(72),
14,20,26,32,38,44,50,56,62,68,6(74),16,22,28,34,40,46,52,58,64,70,6(76),18,
24,30,36,42,48,54,60,66,72,6(78),20,26,32,38,44,50,56,62,68,74,6(80),22,28,
34,40,46,52,58,64,70,76,6(82),24,30,36,42,48,54,60,66,72,78,6(84),26,32,38,
44,50,56,62,68,74,80,6(86),28,34,40,46,52,58,64,70,76,82,6(88));

The defined interpolation table seems like following:

Y1(2) Y2(4) Y3(6) Y4(8) Y5(10) Y6(1)2 Y7(14) Y8(16)

X1(1) 8 14 20 26 32 38 44 50

X2(2) 10 16 22 28 34 40 46 52

X3(3)

X4(4)

X5(5)

X6(6)

X7(7) 20 26 32 38 44 50 56 62

X8(8) 22 28 34 40 46 52 58 64

Suppose X=7.5,Y=2.5:
Z1  20  (26  20)  (2.5  2) /(4  2)  21.5;
Z 2  22  (28  22)  (2.5  2) /(4  2)  23.5;
Z  Z1  ( Z 2  Z1)  ( I1  X i 1 ) /( X i  X i 1 )  21.5  (23.5  21.5)  (7.5  7) /(8  7)  22.5.
734
APPENDIX 1 Function Block

Actually, Z  2  7.5  3  2.5  22.5

1.1.17 HSUP

Figure 1.1.17-1 HSUP

Alias

Rising Edge Trigger

Pins

Initial
Input Data Type Description Supplement Persistent
Value

IN BOOL Input 0 No

Output

Out BOOL Output 0 No

Output Features

Conditions Output Formula

IN (k  1)  0, IN (k )  1 OUT (k )  1

Other cases OUT (k )  0

Description

This function block detects the rising-edge of digital input. It sets the output to 1
(return to 0 after a cycle) if and only if a rising-edge of signal occurs. In other
cases, it sets OUT=0.

1.1.18 RANDOM

735
APPENDIX 1 Function Block

Figure 1.1.18-1 RANDOM

Alias

Random Generator

Pins

Initial
Input Data Type Description Supplement Persistent
Value

OT REAL Upper Limit 100 Yes

OB REAL Lower Limit 0 Yes

Output

OUT REAL Output 0 No

Description

This function block is used to generate a random number within a limited range.
The generated number stays in interval [OB, OT], and the same sequence will
be produced by each restart of this block.

736
APPENDIX 1 Function Block

1.2 HS_TimeField.lib
This library contains the function blocks which are used to simulate real
process in the field, to implement control functionality, and to perform signal
processing.

1.2.1 HSCURVE

Figure 1.2.1-1 HSCURVE

Alias

Spline

Pins

Input Data Type Description Initial Value Supplement Persistent

SS BOOL Start Switcher 0 Yes

RS BOOL Restart 0 Yes

Output

AV REAL Output 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

Number of
PS USINT Breaking 1 1  PS  9 Yes
Points

TB  4294967295Minutes
TB DWORD Start Time 0 Yes

737
APPENDIX 1 Function Block

TE  4294967295Minutes

TE DWORD Stop Time 0 Yes


TE should be equal to
the value of last T.

Upper Limit of
TL REAL 0.00 Yes
Output

Lower Limit of
BL REAL 0.00 Yes
Output

The number of its


elements must stay in
Time
[1,9]. TX is one of its
correspondin
T DWORD 0 elements. Yes
g for Point 1
to 9 T  4294967295Minutes

The number of its


Set Value for
Y REAL 0.00 elements must stay in Yes
Point 1 to 9
[1,9].

Output Features

Conditions Output Formula Supplement

TX  TE TX  TX  TS T[i],T[i+1] are
the last two
S1  0, adjacent
TimeOut  0 TX  TE , points of TX
TX  TE on the time
TimeOut  1
K (i )  (Y (i  1)  Y (i )) / axis. Y[i]
(T (i  1)  T (i )), corresponds
to T[i], and
AV (k )  Y (i )  K (i ) 
Y[i+1]
((SS (k )  1, SS (k  1)  0) TX  TB (TX  T (i )) corresponds
to T[i+1]. K[i]
or TimeOut  0
is the slope
( SS (k )  1, RS (k )  1) RS  0 between the
two adjacent
points.

738
APPENDIX 1 Function Block

Description

This function block simulates time function Y  f (t ) with up to 8 broken lines.


It calculates the output value at a time point with the predefined broken line
function. Its algorithm seems similar to block HSCHARC. The time unit used in
this block is minute which can be set to 4294967295.

This block is used for set value control related to time. It means that the output
should be a specific value at a certain time after the operation began.

PS ( 1  PS  9 ) data groups must be predefined. Each group comprises a time


value and the set value corresponding to the time value. In that way, a broken
line diagram ( PS  1 sections) is defined, with time as X-coordinate and output
as Y-coordinate.

TX is used as the timing variable internally; RS is the restart signal sent


from OPS; TimeOut is the set value of stop time, where TimeOut=1 indicates
the end of timing.

During the operation, If TX  TE , TX will be increased by one cycle time in


each cycle. If TX  TE , set TX  TE and TimeOut=1, the operation will be
terminated.

K (i ) in the output formula is the slope in section i. TX beyond the minimum


or maximum value of T is calculated with the first or the last slope.

• When you use this function block, you must set the parameters correctly, to
ensure the elements of array T are in ascending order and the number of
break points is set within the allowable limit.

• TB is usually equal to 0. TE shall usually be equal to the T value of the


last break point. Otherwise, in this function block, if the time variable goes
beyond the last set point of time but doesn't reach to TE , the output value
shall be still calculated with the slope determined by the last and the
penultimate point.

1.2.2 HSDEV

739
APPENDIX 1 Function Block

Figure 1.2.2-1 HSDEV

Alias

Differential

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

Differential Yes
KG REAL 1
Gain

Differential Yes
TC REAL 1
Time

Output

AV REAL Output 0.00 Yes

Output Features

Output Formula

KG  ( IN (k )  IN (k  1))  TC  AV (k  1)
AV (k ) 
(TS  TC )

Description

This function block is used to calculate the differential of the input variable. The
formula in frequency domain seems like following:

KG  S
AV ( S )   IN ( S )
1  TC  S

740
APPENDIX 1 Function Block

Its differential equation is:

KG  ( IN (k )  IN (k  1))  TC  AV (k  1)
AV (k ) 
(TS  TC )

The following diagram describes the response of the differential function block
with step input.

Figure 1.2.2-2 Step Response of HSDEV

Example

Please refer to the examples of function block PID.

1.2.3 HSFOP

Figure 1.2.3-1 HSFOP

Alias

First-Order Inertance

Pins

Initial
Input Data Type Description Supplement Persistent
Value

IN REAL Input 0.00 No

741
APPENDIX 1 Function Block

Proportional Yes
KG REAL 1
Gain

TC REAL Time Constant 1 Yes

Output

AV REAL Output 0.00 No

Output Features

Output Formula

KG  TS  IN (k )  TC  AV (k  1)
AV (k ) 
(TS  TC )

Description

This function block is often used to perform filtering for input signal or simulate
field objects. It is usually used with controller. The formula in frequency domain
seems like following:

KG  IN ( S )
AV ( S ) 
1  TC  S

Its differential equation is:

KG  TS  IN (k )  TC  AV (k  1)
AV (k ) 
(TS  TC )

The following diagram describes the response of the differential function block
with step input.

742
APPENDIX 1 Function Block

Figure 1.2.3-2 Step Response of HSFOP

1.2.4 HSFSMITH

Figure 1.2.4-1 HSFSMITH

Alias

First-Order Lag Compensator

Pins

Initial
Input Data Type Description Supplement Persistent
Value

IN REAL Input 0.00 No

KG REAL Proportional Gain 1 Yes

TC REAL Time Constant 1 Yes

Number of
LGT BYTE Lag Time 1 operation cycles, Yes
1  LGT  20

Output

743
APPENDIX 1 Function Block

AV REAL Output 0.00 No

Output Features

Conditions Output Formula Supplement

P(k )  C1  P(k  1)  D1  IN (k  1) TS TS


TC  0 C1  e

, D1  KG  (1  e TC )
AV (k )  P(k )  P(k  LGT )
TC

TC  0 AV (k )  IN (k  LGT )

Description

This function block is used to compensate the first-order-lag object. It is usually


used together with the controller. The formula in frequency domain seems like
following:

KG
AV ( S )   (1  e  LGT S )  IN ( S )
1  TC  S

Its Z transfer function is:

AV ( Z ) AV ( Z ) P( Z ) D1
Dx ( Z )     (1  Z LGT ) 
IN ( Z ) P( Z ) IN ( Z ) Z  C1

TS TS

Where, C1  e , D1  KG  (1  e TC )
TC

The differential equation is:


TS
P(k )  C1  P(k  1)  D1  KG  (1  e TC ) ;

AV (k )  P(k )  P(k  LGT ) ;

If TC=0, the block performs pure lag operation, i.e., AV (k )  IN (k  LGT ) .

1.2.5 HSINTG

744
APPENDIX 1 Function Block

Figure 1.2.5-1 HSINTG

Alias

Integral

Pins

Input Data Type Description Initial Value Supplement Persistent

SP REAL Set Value 0.00 No

PV REAL Process Value 0.00 No

TS BOOL Tracking Mode 0 Yes

Set Value of No
TP REAL 0.00
Tracking

TB REAL Operation Cycle 0.5 Yes

KI REAL Gain 1 Yes

TI REAL Time Constant 1 Yes

DI REAL Input Dead Band 0 Yes

OT REAL Upper Limit of Input 100 Yes

OB REAL Lower Limit of Input 0.00 Yes

745
APPENDIX 1 Function Block

Change Rate of Yes


OTR REAL 100
Output

0:Negative Yes
AD BOOL Work Mode 0
1:Positive

Output

AV REAL Output 0.00 Yes

Output Features

Conditions
Output Formula Supplement
TS Mode

When the input


1 Auto AV (k )  AV (k  1)  TB  KI  IN (k ) / TI ( sp  pv ) stays in dead
band, AV (k )  AV (k  1)

Automatically in this mode,


2 Track AV  TP
if TS is 1.

Description

This function block implements an integral controller. The formula in frequency


domain seems like following:

KI
AV ( S )   IN ( S )
TI  S

The differential equation is the formula in the table above, and for this
equation:

 IN (k )  SP (k )  PV (k ), if AD  0

 IN (k )  PV (k )  SP (k ), if AD  1
;

This function block has two work modes: Auto and Track. The priority of Track
is higher than the one of former. By Track mode, the block stops to calculate
and the output changes with TP. By another mode, that means TS  0 , the
output will be calculated according to the formulas in the table above. In this
case, the block will keep the output value if input ( sp  pv ) is in the dead band.
746
APPENDIX 1 Function Block

Whatever in which mode, the change rate of output is limited under OTR.
AV (k )  AV (k  1)  OTR if it exceeds the limit. The value of output is also
limited in the range [OB, OT].

1.2.6 HSLDLG

Figure 1.2.6-1 HSLDLG

Alias

Feed Forward Compensation

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

KG REAL Proportional Gain 1 Yes

BT REAL Lead Time 1 Yes

LGT REAL Lag Time 1 Yes

Output

AV REAL Output 0.00 Yes

Output Features

Output Formula

LGT TS  BT BT
AV (k )   AV (k  1)  KG   IN (k )  KG   IN (k  1)
TS  LGT TS  LGT TS  LGT

747
APPENDIX 1 Function Block

Description

This function block is used for dynamic compensation in feed forward control.
It is usually used with controller. The formula in frequency domain seems like
following:

1  BT  S
AV ( S )   IN ( S )
1  LGT  S

The differential equation is the formula in the table above. The following
diagram describes the principle of this block.

Figure 1.2.6-2 Principle of HSLDLG

1.2.7 HSLGCMP

Figure 1.2.7-1 HSLGCMP

Alias

Hysteresis

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

748
APPENDIX 1 Function Block

HL REAL Upper Limit 100 Yes

LL REAL Lower Limit 0 Yes

Output

DV BOOL Output 0 Yes

Output Features

Conditions Output Formula

IN  HL DV=1

IN  LL DV=0

LL  IN  HL DV (k )  DV (k  1)

Description

This function block accomplishes the operation similar to the hysteresis effect
of relay. The output is set to 1 when it is greater than the upper limit and to 0
when it is smaller than the lower limit.

1.2.8 HSRAMP

Figure 1.2.8-1 HSRAMP

Alias

Ramp

Pins

Input Data Type Description Initial Value Supplement Persistent

749
APPENDIX 1 Function Block

HD BOOL Hold 0 Yes

DE BOOL Direction Switch 0 Yes

RST BOOL Restart 0 Yes

Output

AV REAL Output 0 Yes

Internal Parameters

Initial
Data
Parameter Description Valu Supplement Persistent
Type
e

IR REAL Rising Rate 1 Yes

DR REAL Falling Rate 1 Yes

TL REAL Upper Limit of Output 100 Yes

BL REAL Lower Limit of Output 0.00 Yes

IV REAL Initial Value 0.00 Yes

Output Features

Conditions Output Formula Supplement

RST  0 or HD  1 AV (k )  AV (k  1)

RST (k )  1 and RST (k  1)  0 AV (k )  IV (k )

D0 AV (k )  AV (k  1)  IR  TS If AV (k )  TL ,
HD  0 and
RST (k )  1 and AV (k )  TL
RST (k  1)  0 D 1 AV (k )  AV (k  1)  DR  TS
If AV (k )  BL ,

750
APPENDIX 1 Function Block

AV (k )  BL

Description

This function block can output a ramp signal with a certain rate. It can generate
two type signals: positive ramp by DE=1 and negative ramp by DE=0. The hold
switch HD can suspend the calculation and keep the output value at last result.
When HD changes back to 0 from 1, the block will continue the suspended
calculation.

1.2.9 HSSOP

Figure 1.2.9-1 HSSOP

Alias

Second-Order Lag

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

KG REAL Gain 1 Yes

TF REAL Time Constant 1 1 Yes

TS REAL Time Constant 2 1 Yes

Output

AV REAL Output 0.00 No

Internal Parameters

751
APPENDIX 1 Function Block

Data Initial
Parameter Description Supplement Persistent
Type Value

OT DINT Upper Limit of Output 100000 Yes

OB DINT Lower Limit of Output -100000 Yes

Output Features

Output Formula Supplement

KG  cycle 2
a
(cycle  TF )  (cycle  TS )
cycle  (TF  TS )  2TF  TS
AV (k )  a  IN (k )  b  AV (k  1)  c  AV (k  2) b
(cycle  TF )  (cycle  TS )
 TF  TS
c
(cycle  TF )  (cycle  TS )

Description

This function block is often used to simulate field objects and it is usually used
with controller. The formula in frequency domain seems like following:

KG  IN ( S )
AV ( S ) 
(TF  S  1)  (TS  S  1)

Its differential equation is given in the table above. The following diagram
describes the response of the differential function block with step input.

752
APPENDIX 1 Function Block

Figure 1.2.9-2 Principle of HSSOP

1.2.10 HSSSMITH

Figure 1.2.10-1 HSSSMITH

Alias

Second-Order Lag Compensator

Pins

Initial
Input Data Type Description Supplement Persistent
Value

IN REAL Input 0.00 No

KG REAL Proportional Gain 1 Yes

T1 REAL Time Constant 1 1 Yes

T2 REAL Time Constant 2 1 Yes

753
APPENDIX 1 Function Block

Number of
operation
LGT BYTE Lag Time 1 Yes
cycles,
1  LGT  20

Output

AV REAL Output 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

OT DINT Upper Limit of Output 100000 Yes

OB DINT Lower Limit of Output -100000 Yes

Output Features

Output Formula Supplement

TS TS TS TS
 (  )
C1  e T 1  e T2
, C 2  e T1 T 2

TS TS
P(k )  C1  P(k  1)  C 2  P(k  2) 
T 1  (e T 1  1)  T 2  (e T 2  1)
D1  IN (k  1)  D2  IN (k  2) D1  KG 
T 2  T1
AV (k )  P(k )  P(k  ( LGT  1)) TS TS TS TS
KG  (T 2  e  (e  1)  T 1  e  (e T 1  1))
T1 T2 T2
D2 
T 2  T1

Description

This function block is used to compensate the second-order-lag object, so that


the compensated object doesn’t contain pure lag part. The formula in
frequency domain seems like following:

KG
AV ( S )   (1  e  LGT S )  IN ( S )
(1  T1  S )  (T 2  S  1)

Its Z transfer function is:


754
APPENDIX 1 Function Block

AV ( Z ) AV ( Z ) P( Z ) D1  Z  D2
Dx ( Z )     (1  Z LGT )  2
IN ( Z ) P( Z ) IN ( Z ) Z  C1  Z  C 2

 TS

TS TS TS
(  )
 C1  e T 1  e T 2 , C 2  e T 1 T 2
 TS TS
 T 1  (e T 1  1)  T 2  (e T 2  1)
 D1  KG 
 T 2  T1
TS TS TS TS

 D 2  KG  (T 2  e  (e  1)  T 1  e  (e  1))
T1 T2 T2 T1

Where,  T 2  T1

The differential equation is given in the table above:

1.2.11 HSTIMER

Figure 1.2.11-1 HSTIMER

Alias

Timer

Pins

Input Data Type Description Initial Value Supplement Persistent

SS BOOL Start 0 No

RS BOOL Reset 0 No

TC DWORD Time Constant 1 Yes

Output

DV BOOL Output 0 Yes

Internal Parameters

755
APPENDIX 1 Function Block

Paramete Data Initial Persistent


Description Supplement
r Type Value

0: Basic Yes

1: Pulse Follow

2: Fixed-Width-Pulse
TT ENUM Timer Type 0
3: Lagged Set

4: Lagged Reset

5: Hold Lagged Reset

Output Features

Conditions Output Formula

TT=0

TT=1

TT=2
RS  0 See the description.
TT=3

TT=4

TT=5

DV  0
RS (k  1)  0, RS (k )  1
ALM  0

In this table: T  TC  TS

Description

This function block implements a variety of timing functions. Totally 5 types are
integrated in this block: Basic, Pulse Follow, Fixed-Width-Pulse, Lagged Set,
Lagged Reset, and Hold Lagged Reset. Their timing diagram seems like
following:

Type Basic:
756
APPENDIX 1 Function Block

Figure 1.2.11-2 Timing Diagram of Type Basic

From this diagram you can understand that the block stop timing and reset DV
if RS changes from 0 to 1. It waits for the next SS signal.

Type Pulse Follow:

Figure 1.2.11-3 Timing Diagram of Type Pulse Follow

When SS changes from 0 to 1 and holds, DV will follow SS and hold for a pulse
in width of time T. If SS doesn't hold in state "1" long enough, DV will follow SS
to 0. Once the rising-edge of RS arrives, DV will be reset immediately.

Type Fixed-Width-Pulse:

Figure 1.2.11-4 Timing Diagram of Type Fixed-Width-Pulse

As long as SS changes from 0 to 1 and RS doesn’t occur, DV will hold for a


pulse in width of time T. Once the rising-edge of RS arrives in the timing period,
DV will be reset immediately and hold in that state, till the rising-edge of the
next SS signal arrives.

Type Lagged Set:

757
APPENDIX 1 Function Block

Figure 1.2.11-5 Timing Diagram of Type Lagged Set

When SS changes from 0 to 1, DV signal will rise to high level after time T and
then follow SS to 0. Once the rising-edge of RS arrives, DV will be reset
immediately.

Type Lagged Reset:

Figure 1.2.11-6 Timing Diagram of Type Lagged Reset

After a rising-edge of SS occurs, the DV output will rise to high level after time
T and then hold, till the up-edge of RS arrives. After the DV output is reset, it
will not be set until the rising-edge of the next SS occurs, even if SS is high
level.

Type Hold Lagged Reset:

Figure 1.2.11-7 Timing Diagram of Type Hold Lagged Reset

After a rising-edge of SS occurs, DV will rise to high level after time T and then
hold, till the rising-edge of RS arrives. After DV is reset, it will not be set until
the rising-edge of the next SS occurs, even if SS is high level.

• For backward compatibility, during the configuration, the timer type can be
represented with a figure in 0~5 or identified with an identifier. The
758
APPENDIX 1 Function Block

mapping relation is as follows:

0: Basic TM_BS

1: Pulse Follow TM_PF

2: Fixed-Width-Pulse TM_EW

3: Lagged Set TM_DS

4: Lagged Reset TM_DR

Example

The following is the use case of Fixed-Width-Pulse and Lagged Reset timer in
steam drum.

Figure 1.2.11-8 Example of HSTIMER

1.2.12 OneStepLag

759
APPENDIX 1 Function Block

Figure 1.2.12-1 OneStepLag

Alias

First-Order Lag

Pins

Input Data Type Description Initial Value Supplement Persistent

uk REAL Input 0.00 No

Output

yk REAL Output 0.00 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

k REAL Gain 1 Yes

b REAL Coefficient of S 1 Yes

c REAL Constant Coefficient 1 Yes

The unit is
I UINT Time Constant of Lag 20 operation cycle, Yes
0  I  300

Output Features

Output Formula

760
APPENDIX 1 Function Block

b
k  uk ( I  1)   yk (k  1)
yk ( K )  TS
b
c
TS

Description

This function block is used to simulate field objects. The formula in frequency
domain seems like following:

k  e  I S  uk ( S )
yk ( S ) 
bS c

The differential equation is given in the table above. The following diagram
describes the response of the differential function block with step input.

Figure 1.2.12-2 Step Response of OneStepLag

1.2.13 TwoStepLag

Figure 1.2.13-1 TwoStepLag

Alias

Second-Order Lag

Pins

761
APPENDIX 1 Function Block

Input Data Type Description Initial Value Supplement Persistent

uk REAL Input 0.00 No

Output

yk REAL Output 0.00 Yes

Internal Parameters

Paramete Data Initial


Description Supplement Persistent
r Type Value

k REAL Gain 1 Yes

a REAL Coefficient of S2 1 Yes

b REAL Coefficient of S 1 Yes

c REAL Constant Coefficient 1 Yes

The unit is
operation
I UINT Time Constant of Lag 20 Yes
cycle,
0  I  300

Output Features

Output Formula

a b a
k  uk ( I  1)  (2  2
 )  yk (k  1)  2  yk (k  2)
yk ( K )  TS TS TS
a b
c 2 
TS TS

Description

This function block is used to simulate field objects. The formula in frequency
domain seems like following:

762
APPENDIX 1 Function Block

k  e  I S  uk ( S )
yk ( S ) 
aS2 bS  c

The differential equation is given in the table above.

1.2.14 ThreeStepLag

Figure 1.2.14-1 ThreeStepLag

Alias

Third-Order Lag

Pins

Input Data Type Description Initial Value Supplement Persistent

uk REAL Input 0.00 No

Output

yk REAL Output 0.00 Yes

Internal Parameters

Paramete Data Initial


Description Supplement Persistent
r Type Value

k REAL Gain 1 Yes

a REAL Coefficient of S3 1 Yes

b REAL Coefficient of S2 1 Yes

c REAL Coefficient of S 1 Yes

d REAL Constant Coefficient 1 Yes

763
APPENDIX 1 Function Block

The unit is Yes


operation
I UINT Time Constant of Lag 20
cycle,
0  I  300

Output Features

Output Formula

3a 2b c 3a b a
k  uk ( I  1)  ( 3
 2  )  yk (k  1)  ( 3  2 )  yk (k  2)  3  yk (k  3)
yk ( K )  TS TS TS TS TS TS
a b c
3
 2  d
TS TS TS

Description

This function block is used to simulate field objects. The formula in frequency
domain seems like following:

k  e  I S  uk ( S )
yk ( S ) 
aS3 bS2  cS  d

The differential equation is given in the table above.

764
APPENDIX 1 Function Block

1.3 HS_Ctrol.lib
This library contains the function blocks which are used for broken circuit
control, for driving of sequential control devices, for simulating manual operator,
for simulating combined servoamplifier, and for PID controller.

1.3.1 HSALGMAN

Figure 1.3.1-1 HSALGMAN

Alias

Analog Manual Operator

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN REAL Analog Input 0.00 No

FM BOOL Force Manual 0 Yes

Program Control
PA BOOL 0 Yes
Automatic

TS BOOL Track 0 Yes

TP REAL Set Value of Track 0.00 No

C0 BOOL Increase Interlock 0 Yes

765
APPENDIX 1 Function Block

C1 BOOL Decrease Interlock 0 Yes

Program Control
C2 BOOL 0 Yes
Increase

Program Control
C3 BOOL 0 Yes
Decrease

0: Manual

1: Automatic
RM USINT Mode 0 Yes
2: Track

3: Force Manual

PV REAL Process Value 0.00 Yes

Output

AV REAL Output 0.00 Yes

0: Automatic
AM BOOL Mode 0 Yes
1: Not Automatic

Output of Set
SP REAL 0.00 No
Value

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

BS REAL Output Offset 0.00 Yes

Same
Change Rate of
OU REAL 0.00 dimension with Yes
Output
MU and MD

Upper Limit of
OT REAL 0.00 Yes
Output

766
APPENDIX 1 Function Block

Lower Limit of
OB REAL 0.00 Yes
Output

Measuring Range
MU REAL 0.00 Yes
Upper Limit

Measuring Range
MD REAL 0.00 Yes
Lower Limit

Manual Change Percentage,


MR REAL 0.00 Yes
Rate Range: [0,100]

1:Enable
ME BOOL Enable Manual 1 0:Prohibit(Susp Yes
ended)

1:Enable
AE BOOL Enable Automatic 1 0:Prohibit(Susp Yes
ended)

1:Enable
FE BOOL Enable Track 1 Yes
0:Prohibit

TI BOOL Manual Increase 0 No

TD BOOL Manual Decrease 0 No

FI BOOL Fast Increase 0 No

FD BOOL Fast Decrease 0 No

Output Features

Conditions
Output Formula Supplement
RM Mode

AV (k )  AV (k  1)  MR  ( MU  MD) “+” is for


0 MAN Normal
AM  1, SP  PV increase;

767
APPENDIX 1 Function Block

AV (k )  AV (k  1)  OU “-” is for
Quick decrease.
AM  1, SP  PV

AV (k )  IN (k )  BS
1 Auto
AM  0

If AV (k )  OT ,

AV (k )  OT
AV (k )  TP
2 Track
AM  1, SP  PV
If AV (k )  OB ,

AV (k )  OB

Force AV (k )  AV (k  1)  OU Only when FM  1 ,


3
MAN AM  1, SP  PV works in this mode.

Description

This function block enables the operator to set its output value directly and use
the output value to control the actuators, such as control valve, etc. It is usually
used with PID controller. There are four working modes: Manual, Force Manual,
Automatic and Track. Priority: Track > Force Manual > Manual/Automatic.

In Track mode, any other value assignment to RM is invalid. When TS


changes from 1 to 0, the block will be switched to the previous mode before
that.

In Force Manual mode, the block has the same functionality as it in Manual
mode, and can only be switched to Track mode.

In Manual mode, C2 and C3 can be set to increase or decrease the output


value.

If neither Forced nor Track condition is met (FM=0 and TS=0), the block can be
switched to Automatic mode. In that mode, RM=1, and block can be switched
to other modes.

• The parameter PA is the interface for switching this block with means of
algorithm into Automatic mode.

During mode switching, if the manual controller is switched from any other
768
APPENDIX 1 Function Block

mode to Manual (Force Manual) mode, the output will hold. If it is switched
from Manual mode to any other mode, AV will slide to IN at the output change
rate OU, to ensure uninterrupted output.

In any working mode, the maximum output change amplitude must not exceed
OU, otherwise output value AV (k )  AV (k  1)  OU .

The output value is limited between OT and OB. If AV goes above OT, it will be
reduced to OT. If AV goes below OB, it will be increased to OB.

In any mode, if increase block is enabled (C0=1), the output value AV can't be
greater than the output value. For example, suppose the time point i when
C0=1 and the output value is AV (i ) , then AV (k  i)  AV (i) , where k is the
sample point in the time interval L0=1. If decrease is enabled (C1=1), the
output value AV can't be smaller than the output value.

• Here the internal logic relationship of the algorithm block is described. This
function block shall be used with the corresponding regulating template in
the monitoring layer. Please see appropriate instruction of the template for
the difference.

• Difference between Force Manual and Manual: In Force Manual mode, the
block can't be switched to Manual/Automatic mode. In Manual mode, the
block can be switched to Automatic mode. Force Manual and Manual are
two working modes. FM is the conditional switch for the former, and RM=3
is status indication, however RM can't be assigned to 3 directly. The
condition to work in Manual mode is RM=0.

• Relation between Automatic and Program Automatic: When the Program


Automatic switch changes from 0 to 1, the block will be set to Automatic
mode. Then it can be switched to any work mode. Program Automatic is a
one-off action of switching Program Control to Automatic.

Example

The following diagram shows an example of the application of this block. The
PID state is controlled with the manual controller. When the manual controller
is in AUTO mode, PID will operate automatically; when the manual controller is
in MANUAL mode, PID will keep track of it; the manual controller and PID
display the same procedural value.

769
APPENDIX 1 Function Block

SP AV IN AV
HSALGMAN AO
HSPID FM
PV
AI SP
PA
TS
AM
TS TP
PV
TP

Figure 1.3.1-2 Example of HSALGMAN

Commonly steps:

1. The value tracked by manual operator and usually PID is the feedback
of valve position or process value PV.
2. In case the PID error by self-tuning is too high, the Force Manual logic
(FM=1) can be used to prevent the oscillation. I.e., the program will
switch to "Force Manual" mode automatically and keeps in that mode
till all conditions that cause FM=1 disappear.
3. The set value of PID is assigned from SP of the manual operator.

1.3.2 HSCSLAVE

Figure 1.3.2-1 HSCSLAVE

Alias

Combined Servoamplifier

Pins

770
APPENDIX 1 Function Block

Initial
Input Data Type Description Supplement Persistent
Value

I1 REAL Output of Controller 0.00 No

Position Feedback No
I2 REAL 0.00
Input

LC0 BOOL Over-Torque for On 1 Yes

LC1 BOOL Over-Torque for Off 1 Yes

LC2 BOOL Position Limit for On 0 Yes

LC3 BOOL Position Limit for Off 0 Yes

LC4 BOOL Manual On 0 Yes

LC5 BOOL Manual Off 0 Yes

LC6 BOOL Soft Operation On 0 Yes

LC7 BOOL Soft Operation Off 0 Yes

LC8 BOOL Forced On 0 Yes

LC9 BOOL Forced Off 0 Yes

Status of Yes
LC10 BOOL 0
Manual/Automatic

LC11 BOOL Status of Loop 0 Yes

Output

DV BOOL Output 0 Yes

RV BOOL Inverse Output 0 No

Internal Parameters

771
APPENDIX 1 Function Block

Data Initial
Parameter Description Supplement Persistent
Type Value

DI REAL Dead Band 0.00 Yes

Output Features

Output Formula

DV  ( DV 1 and LC10 or ( LC 4 or LC 6) and (not ( LC10)) or LC 8)


and not ( LC 2) and LC 0 and not ( RV )
RV  ( RV 1 and LC10 or ( LC 5 or LC 7) and (not ( LC10)) or LC 9)
and not ( LC 3) and LC1 and not ( DV )

DV1 and RV1 are calculated with the algorithm used in conventional
servoamplifier.

Description

This function block simulates hardware servoamplifier and accomplishes some


complex logic operations, to implement direct connection between DCS and
the electrical actuators.

This block implements the functionality of combined servoamplifier by adding


some logic controls on conventional servoamplifier algorithm. The process
comprises two parts: at first, calculate the output DV1 and RV1 with the
algorithm used in conventional servoamplifier (see the following table).

Condition DV1(k) RV1(k)

I1(k )  I 2(k )  3DI 1 0

DI  I1(k )  I 2(k )  3DI NOT ( DV (k  1)) 0

 DI  I1(k )  I 2(k )  DI 0 0

 3DI  I1(k )  I 2(k )   DI 0 NOT ( RV (k  1))

I1(k )  I 2(k )  3DI 0 1

Then calculate the output DV and RV of the combined servoamplifier with all

772
APPENDIX 1 Function Block

logic control variables and DV1, RV1.

The priority order of instructions is: LC0/LC1/LC2/LC3>LC8/LC9>LC4/LC5


/LC6/LC7/Logic On/Logic Off. Here the Logic On/Off is the output instruction
calculated by I1, I2 and DI according to the algorithm of conventional
servoamplifier.

• Only when LC0=1, the instruction ON can be sent. Only when LC1=1, the
instruction OFF can be sent.

• For LC10, 1 means automatic mode enabled and 0 means manual mode
enabled.

• If one of DV and RV is 1, another one is not allowed to be sent.

• By application, the instruction from controller and the signal of position


feedback should be connected respectively with I1 and I2. In this case, DV
is the instruction ON for the actuator while RV is OFF. By configuration, the
other pins not being used can not be connected or bound with a tag name.
In addition, this block is usually set in the control panel or hardware
module.

1.3.3 HSCSLAVE5

Figure 1.3.3-1 HSCSLAVE5

Alias

Combined Servoamplifier 5

Pins

Data Initial
Input Description Supplement Persistent
Type Value

773
APPENDIX 1 Function Block

IN REAL Output of Controller (0-100%) 0.00 No

Position Feedback Input No


ZT REAL 0.00
(0-100%)

PV REAL Controlled Process Value 0.00 No

External Switcher to Manual Yes


FM BOOL 0
Mode

AO BOOL Automatic On 0 Yes

AC BOOL Automatic Off 0 Yes

MS REAL Set Value of Valve Position 0.00 Yes

Output

DV BOOL Output of ON 0 No

RV BOOL Output of OFF 0 No

SP REAL Set Value from PID 0.00 Yes

AM BOOL Manual/Automatic 0 Yes

GZ BOOL Actuator Fault 0 No

Internal Parameters

Paramete Data Initial


Description Supplement Persistent
r Type Value

JC BOOL Overhaul 0 Yes

MO BOOL Manual On 0 Short pulse Yes

MC BOOL Manual Off 0 Short pulse Yes

M1 BOOL Manual On 0 Long pulse Yes

774
APPENDIX 1 Function Block

M2 BOOL Manual Off 0 Long pulse Yes

Offset Limit of Long


DL REAL 10 In percentage Yes
Pulse

DB REAL Dead Band 2.5 In percentage Yes

T1 REAL Pulse Width 250 In ms Yes

T2 REAL Pulse Interval 1500 In ms Yes

Enabled Sticky Time


T3 REAL 1000 In ms Yes
of Buttons

0: MAN

1: Auto

2: Track
RM USINT Work Mode 0 Yes
3: Forced
MAN

4: Actuator
Fault

Output Features

Output Formula

DV  (MO or AO or M1) and (not (MC or AC or M 2)) and (not JC)

RV  (MC or AC or M 2) and (not (MO or AO or M1)) and (not JC)

AM  SEL((GZ or FM ), AM ,0)

GZ  (ZT GT OB) or (ZT LT OT )

SP  SEL((( AO or AC or MO or MC or M1 or M 2) or

QC or AM or GZ ) or FM or (not AM ), SP, PV )

775
APPENDIX 1 Function Block

Description

This function block replaces the old block of combined servoamplifier and
accomplishes some complex logic operations. In control loop, it implements
direct connection between DCS and the electrical digital actuators. However, it
can also be used independently to replace digital control gate valve.

By using manual operator with combined servoamplifier, the process value and
position feedback should be connected with the two inputs IN and ZT; FM
connects external switch to force-manual mode; AO/AC connect with interlock
ON/OFF. The Output DV is the instruction ON for electrical actuator, while RV
is OFF. PV is the process value of the controlled object; SP is the set value
from PID. The other pins not being used can not be connected.

For the manual operator, manual ON/OFF and automatic ON/OFF are set bits;
MAN/AUTO switcher and overhaul are incremental; manual in-/decrease are
analog type. There are five work modes: Manual, Automatic, Track, Forced
Manual and Actuator Fault. The mode is instructed by status light.

 Manual Mode: manual in-/decrease is modified by the output


in-/decrease buttons.

 Forced Manual Mode: when MO/MC/M1/M2/AO/AC=1, the automatic


in-/decrease buttons on manual operator are invalid. The output
position will follow the feedback of valve position.

 Automatic Mode: if there is not in forced manual or fault mode, the


operator will work in automatic mode with clicking “MAN/AUTO” button.
The output will not be disturbed by mode switching.

 Fault Mode: when valve position feedback exceeds limit or jitters, the
fault signal will be sent. In this case, you can only operate through the
“forced operate” button.

1.3.4 HSDigMAN

Figure 1.3.4-1 HSDigMAN

Alias

Digital Manual Operator

Pins

776
APPENDIX 1 Function Block

Initial
Input Data Type Description Supplement Persistent
Value

IN BOOL Analog Input 0 No

1: On
FM BOOL Force Manual 0 Yes
2: Off

1: On
Program Control
PA BOOL 0 Yes
Automatic 2: Off

0: Manual

1: Automatic
RM USINT Mode 0 Yes
2: Track

3: Force
Manual

Output

DV BOOL Output 0 Yes

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

1:Enable
ME BOOL Enable Manual 1 No
0:Prohibit

1:Enable
AE BOOL Enable Automatic 1 No
0:Prohibit

Output Features

Conditions Output Formula Supplement

777
APPENDIX 1 Function Block

RM Mode

0 MAN DV(k) is set by operator.

1 Auto DV (k )  IN (k )

Work in this mode only if


2 Forced Manual DV(k) is set by operator.
FM  1 .

Description

This function block is used to simulate a real digital manual operator. It


implements the control functionality for digital objects. If FM  0 and RM  2 ,
then RM  0 . If PA changes from 0 to 1 and RM  0 , then RM  1 . If
RM  0 or RM  2 , the operator can set ON/OFF output for DV directly. If the
breaker is in status switched-off and I2=1, it indicates a tripping fault. Then C1
is set to 1, and C2 holds at high level for T3 cycles and then returns to 0. If
electrical fault occurs, DX will be set to 1.

1.3.5 HSDLCTRL

Figure 1.3.5-1 HSDLCTRL

Alias

Circuit Breaker

Pins

Data
Input Description Initial Value Supplement Persistent
Type

I1 BOOL Feedback of Position 0 No

778
APPENDIX 1 Function Block

of Switching On

Feedback of Position No
I2 BOOL 0
of Switching Off

Electrical Fault/Circuit No
I3 BOOL 0
Broken

Instruction Automatic Yes


ZH BOOL 0
Switching On

Instruction Automatic Yes


ZF BOOL 0
Switching Off

IP BOOL Initial Pulse 0 Yes

T1 UINT Cycle of Timer 1 0 Yes

T2 UINT Cycle of Timer 2 0 Yes

Output

Output of Instruction No
DV BOOL 0
Switching On

Output of Instruction No
RV BOOL 0
Switching Off

Internal Parameters

Initial
Data Supplem
Parameter Description Valu Persistent
Type ent
e

Z1 BOOL Manual Pre-Switching-On 0 Yes

Manual Z2 BOOL Manual Switching On 0 Yes


Operation
Instructions Z3 BOOL Manual Pre-Switching-Off 0 Yes

Z4 BOOL Manual Switching Off 0 Yes

779
APPENDIX 1 Function Block

YH BOOL Pre-Switching-On 0 No

HZ BOOL Switching On 0 Yes

HH BOOL Switched On 0 Yes

YF BOOL Pre-Switching-Off 0 Yes

FZ BOOL Switching Off 0 Yes

FH BOOL Switched Off 0 Yes

Status C1 BOOL Tripping 1 0 No


Instruction
Parameter C2 BOOL Tripping 2 0 No

HP BOOL Red Light Normal 0 No

HS BOOL Red Light Blink 0 No

LP BOOL Green Light Normal 0 No

LS BOOL Green Light Blink 0 No

JC BOOL Operating Forbidden 0 Yes

DX BOOL Control Loop Broken 0 No

Output Features

Conditions Output Formula Supplement

(not HH and Z1 and I1)


YH  1
or ( Z1 and FH and (not JC ))

(not JC and YF and I 2)


YH  0
or HZ

780
APPENDIX 1 Function Block

(Z 2 and (not JC) and YH )


HZ  1
or ZH

( HZ and ( D1 or I1)) or
HZ  0
( I1 and IP)

( HZ and ( D1 or I1)) or
HH  1
( I1 and IP)

YF HH  0

(not FH and Z 3 and I 2) or


YF  1
(Z 3 and HH and (not JC))

(not JC and YH and I1) or FZ YF  0

(Z 4 and (not JC)) and YF ) or ZF FZ  1

( FZ and ( D2 or I 2))
FZ  0
or ( I 2 and IP)

( FZ and ( D2 or I 2))
FH  1
or ( I 2 and IP)

YH FH  0

In any cases HZ and I2

DV  HZ and I2 D3 is the
output of
RV  FZ and I1 Timer 3.

781
APPENDIX 1 Function Block

C1  HH and I2

C 2  D3; DX  I 3

HP  (YH or HZ or HH ) and I1 and (not I 3)

LS  (not I 3) and ((YH or HZ or HH ) or (not (YF or

FZ or FH ))) and I2

LP  I 2 and (not I 3) and (YF or FZ or FH )

HS  (not I 3) and (not (YH or HZ or HH ) or

(YF or FZ or FH )) and I1

Description

This function block is used to implement the control functionality of circuit


breaker. It can accomplish device start/stop control, protection logic, and alarm
handling, etc. This block performs logic operations for the input instructions
and creates an output instruction. The priority of the input instruction is:
ZH/ZF>Z1-Z4. Once an input instruction with higher priority occurs, other
instructions with lower priority will be blocked. If the breaker is in status
switched-off and I2=1, it indicates a tripping fault. Then C1 is set to 1, and C2
holds at high level for T3 cycles and then returns to 0. If the breaker is in status
switched-off and I1 is 1, the breaker will switch on automatically and C3 will be
set to 1.

1.3.6 HSDLCTRL2

782
APPENDIX 1 Function Block

Figure 1.3.6-1 HSDLCTRL2

Alias

Circuit Breaker 2

Pins

Data Initial
Input Description Supplement Persistent
Type Value

Feedback of Position of No
I1 BOOL 0
Switching On

Feedback of Position of No
I2 BOOL 0
Switching Off

I3 BOOL Power Monitoring 0 Yes

I4 BOOL Switching of MAN/AUTO 0 Yes

T1 WORD Cycle of Timer 1 0 Yes

T2 WORD Cycle of Timer 2 0 Yes

T3 WORD Cycle of Timer 3 0 Yes

HX BOOL Enable Switching On Yes

783
APPENDIX 1 Function Block

FX BOOL Enable Switching Off Yes

BH BOOL Switching-On Protection Yes

BF BOOL Switching-Off Protection Yes

ZH BOOL Automatic Switching-On 0 Yes

ZF BOOL Automatic Switching-Off 0 Yes

Prevention Interlock of MAN Yes


FM BOOL and AUTO. 0: interlock; 1: 0
normal

IP BOOL Initial Pulse 0 Yes

Output

Output of Instruction Switching No


DV BOOL 0
On

Output of Instruction Switching No


RV BOOL 0
Off

C1 BOOL Output of Tripping 1 0 No

C2 BOOL Output of Tripping 2 0 No

C3 BOOL Output of Tripping 3 0 No

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

Manual Yes
Z1 BOOL
Manual Pre-Switching-On
Operation
Instructions Manual Switching Yes
Z2 BOOL 0
On

784
APPENDIX 1 Function Block

Manual Yes
Z3 BOOL 0
Pre-Switching-Off

Manual Switching Yes


Z4 BOOL 0
Off

Operating No
JX BOOL 0
Forbidden

HP BOOL Red Light Normal 0 No

HS BOOL Red Light Blink 0 No

Green Light No
LP BOOL 0
Normal

LS BOOL Green Light Blink 0 No

Output Features

Output
Conditions
Formula

((not HH ) and I1 and (Z1 and (not ( FM or I 4) or

FM ))) or ((Z1 and (not ( FM or I 4) or FM )) and FH YH  1

and (not JC))

(not JC and YF and I 2) or HZ YH  0

(((not JC and YH and (Z 2 and (not ( FM or I 4) or

FM ))) or ((ZH and not ( JC) and ( FM or I 4)) and I 2)) HZ  1

and (not ( BF ) and HX )) or (not ( BF ) and not ( JC) and BH )

( D1 or ( I1 and HZ )) or ( I1 and IP) HZ  0

(not JC and YH and (Z 2 and (not ( FM or I 4) or SH  1

785
APPENDIX 1 Function Block

FM ))) or ((ZH and not ( JC) and ( FM or I 4))

HH SH  0

(( D1 or I1 and HZ )) and SH ) or ( IP and I1) HH  1

YF or ((ZF and not ( JC) and ( FM or I 4)) and


HH  0
(not ( BH ) and not ( JC) and FX ))

(not ( FH ) and I 2 and (Z 3 and (not ( FM or I 4) or

FM ))) or ((Z 3 and (not ( FM or I 4) or FM )) and HH YF  1

and not (JC))

((not JC) and YH and I1) or FZ YF  0

(((not JC and YF and (Z 4 and (not ( FM or I 4) or

FM ))) or ((ZF and not ( JC) and ( FM or I 4)) and I1)) and FZ  1

(not ( BF ) and not ( JC) and FX )) or (not ( JC) and BF )

( D2 or ( I 2 and FZ )) or ( I 2 and IP) FZ  0

(not ( JC) and YF and (Z 4 and (not ( FM or I 4) or


SF  1
FM ))) or ((ZF and not ( JC) and ( FM or I 4))

FH SF  0

(SF and ( D2 or ( I 2 and FZ ))) or ( I 2 and IP) FH  1

YH or ((ZH and not ( JC) and ( FM or I 4)) and


FH  0
(not ( BH ) and HX ))

786
APPENDIX 1 Function Block

DV  HZ

RV  FZ

C1  HH and I2

C 2  D3; DX  not ( I 3)

C3  ( I1 and FH )

HP  (YH or HZ or HH ) and I1 and (not I 3)

LS  (not I 3) and (not (YF or FZ or FH ) or YH or

HZ or HH ) and I2

LP  I 2 and (not I 3) and (YF or FZ or FH )

HS  (not I 3) and (YF or FZ or FH or

(not (YH or HZ or HH ))) and I1

Description

This function block is used to implement the control functionality of circuit


breaker. It can accomplish device start/stop control, protection logic, and alarm
handling, etc. This block performs logic operations for the input instructions
and creates an output instruction. The priority of the input instruction is:
ZH/ZF>Z1-Z4. Once an input instruction with higher priority occurs, other
instructions with lower priority will be blocked. On the other side, only if there is
no electrical fault like circuit broken etc., these instructions are valid. When an
input instruction occurs and all conditions are met, this block will create an
output instruction (ON/OFF); meanwhile, it will log the status of the current
instruction internally, till the next occurs.

1.3.7 HSDLCTRL5

787
APPENDIX 1 Function Block

Figure 1.3.7-1 HSDLCTRL5

Alias

Circuit Breaker 5

Pins

Data
Input Description Initial Value Supplement Persistent
Type

I1 BOOL On Position Feedback 0 No

I2 BOOL Off Position Feedback 0 No

I3 BOOL Electrical Fault 0 No

RL BOOL Remote Local Input 0 Yes

Pulse Length of Yes


T1 WORD 0
Switching-On

Pulse Length of Yes


T2 WORD 0
Switching-Off

HX BOOL Enable Switching On Yes

FX BOOL Enable Switching Off Yes

Automatic Yes
ZH BOOL 0
Switching-On

788
APPENDIX 1 Function Block

Automatic Yes
ZF BOOL 0
Switching-Off

IP BOOL Initial Pulse 0 Yes

Output

Output of Instruction No
DV BOOL 0
Switching On

Output of Instruction No
RV BOOL 0
Device Off

Switching-On No
C1 BOOL 0
Overtime

Switching-Off No
C2 BOOL 0
Overtime

Internal Parameters

Initial
Data Type Description Valu Supplement Persistent
e

Manual Yes
Z1 BOOL 0
Pre-Switching-On

Z2 BOOL Manual Switching On 0 Yes

Manual Yes
Z3 BOOL 0
Pre-Switching-Off

Z4 BOOL Manual Switching Off 0 Yes

JC BOOL Overhaul 0 Yes

MR BOOL Manual Reset Pulse 0 Yes

HP BOOL Red Light Normal 0 No

789
APPENDIX 1 Function Block

HS BOOL Red Light Blink 0 No

LP BOOL Green Light Normal 0 No

LS BOOL Green Light Blink 0 No

Fault Tip. No

0: normal

1: status feedback
conflict

2: local operation

3: operating
forbidden
FN BYTE 0
4: switching-on
overtime

5: switching-off
overtime

6: error off to on

7: error on to off

8: electrical fault

1: instruction No
switching-on exists
(red)

2: instruction
CE BYTE 0
switching-off exists
(green)

3: instruction conflict
(yellow)

1: switching-on (red) No

2: switching-off
SE BYTE (green) 0

3: status conflict
(yellow)

790
APPENDIX 1 Function Block

YH BOOL Pre-Switching-On 0 No

Test Instruction for Yes


single device
SY BOOL 0
1: normal

2: testing

HH BOOL Switched On 0 Yes

YF BOOL Pre-Switching-Off 0 No

FH BOOL Switched Off 0 Yes

Status of Error On to No
OC BOOL 0
Off

Status of Error On to No
CO BOOL 0
On

Output Features

Output
Conditions
Formula

Z1 and (not I1) and I 2 and ((not I 3 and not RL)


YH  1
or SY )

( IP or MR) or HH YH  0

(YH and Z 2) or ZH or ( I1 and not I 2 and ( IP or MR)) HH  1

Z 3 and ZF or (not I1 and I 2 and ( IP or MR)) HH  0

Z 3 and I1 and (not I 2) and (((not I 3) and


YF  1
(not RL)) or SY )

791
APPENDIX 1 Function Block

FH or ( IP or MR) YF  0

(YF and Z 4) or ZF or (not I1 and I 2 and ( IP or MR)) FH  1

FH or ( IP or MR) FH  0

(not DV ) and (not I1) C1  1

I1 or MR C1  0

(not RV ) and (not I 2) C2  1

I 2 or MR C2  0

DV  (((YH and Z 2) or (ZH and not ZF and not SY ))

and (not I1) and (SY or ( HX and not RL and not

I 3))) and (not I1)

RV  (((YF and Z 4) or (ZF and (not ZH ) and not SY )))

and I1 and (not ( I 2)) and (SY or ( FX and (not ( I 3)) and (not ( RL)))))

and (not I 2)

HP  I1 and HH

LS  (YH or HH ) and I2

LP  I 2 and FH

HS  (YF or FN ) and I1

Description

This function block is used to implement the control functionality of circuit


breaker. It can accomplish device start/stop control, protection logic, and alarm
handling, etc. This block performs logic operations for the input instructions
792
APPENDIX 1 Function Block

and creates an output instruction. The priority of the input instruction is:
ZH/ZF>Z1-Z4. Once an input instruction with higher priority occurs, other
instructions with lower priority will be blocked. On the other side, only if there is
no electrical fault like circuit broken etc., these instructions are valid. When an
input instruction occurs and all conditions are met, this block will create an
output instruction (ON/OFF); meanwhile, it will log the status of the current
instruction internally, till the next occurs. If the overhaul status JC=1, sequential
device will prohibit all operations and outputs.

• The Parameter SY is only for single device testing. It blocks the Enable,
Automatic and Fault of sequential control. Please don’t use it in your
configuration.

1.3.8 HSPID

Figure 1.3.8-1 PID

Alias

PID

Pins

Data Initial
Input Description Supplement Persistent
Type Value

793
APPENDIX 1 Function Block

For single PID and


primary PID, SP is
the set value of
the controller. For
SP REAL Set Value 0.00 Yes
secondary PID,
it’s the output of
the primary
controller.

PV REAL Process Value 0.00 Yes

IC REAL Input Compensation 0.00 Yes

Output
OC REAL 0.00 Yes
Compensation

TP REAL Track Point 0.00 No

TS BOOL Track 0 Yes

CP REAL Calculation Cycle 0.5 In second. Yes

0: Single PID

1: Cascade
MC UINT Controller Type 0 Primary PID Yes

2: Cascade
Secondary PID

Only valid for


primary controller
in the cascade
Work Mode of loop, but invalid
CM USINT Secondary 0 for single PID and Yes
Controller secondary PID (it
needs not be
assigned in this
case).

Only valid for


Process Value of primary controller
CC REAL Secondary 0 in the cascade Yes
Controller loop, but invalid
for single PID and
secondary PID (it

794
APPENDIX 1 Function Block

needs not be
assigned in this
case).

By definition of
PID, it’s the initial
work mode; by
program running,
it’s the current
work mode.

0: MAN

RM USINT Work Mode 0 1: AUTO Yes


2: Cascade

3: Manual Track

4: Automatic
Track

Others: keep the


last mode.

PT REAL Proportional Band 100 In percentage (>0) Yes

TI REAL Integral Time 30 >0 Yes

KD REAL Derivative Gain 1.0 >0 Yes

TD REAL Derivative Time 0.00 0 Yes

Upper Limit of
OT REAL 100 Yes
Output

Lower Limit of
OB REAL 0.00 Yes
Output

Output

Output of Instruction
AV REAL 0 Yes
Switching On

Internal Parameters

795
APPENDIX 1 Function Block

Paramet Initial
Data Type Description Supplement Persistent
er Value

Integral Separation
SV REAL
Value
100 Percentage (  0 ) Yes

DI REAL Input Dead Band 0.00 Percentage (  0 ) Yes

Output Change Same dimension


OU REAL 100 Yes
Rate with MU and MD

DL REAL Alarm Limit of Bias 30 Percentage (  0 ) Yes

0: normal

1: intelligence
PK BYTE Controller Type 0 Yes
Currently only
normal type is
supported.

0: position mode

1: incremental
mode
OM UINT Output Mode 0 Yes
Please set OB to
-100 when
incremental mode
is selected.

0: normal
AD UINT Integral Mode 0 Yes
1: reverse

0: not track
TM BOOL Track Mode 0 Yes
1: track

Internal set value,


it is usually used
CS REAL Internal set value 0.00 in secondary loop Yes
of cascade
control.

796
APPENDIX 1 Function Block

Set value actually


Set Value for used in
RS REAL 0.00 Yes
Calculation calculation. It’s
usually filtered.

Change Rate of Set


FA REAL 0.1 Yes
Value

Quick Increment of
MI REAL 1.5 Yes
Manual Output

Slow Increment of
MS REAL 0.5 Yes
Manual Output

1: quick
decrement

2: quick
decrement
MM BYTE Manual Output 0 Yes
3: slow
increment

4: slow
decrement

1: enable
ME BOOL Enable Manual 1 Yes
0: disable
(suspended)

1: enable
AE BOOL Enable Automatic 1 Yes
0: disable
(suspended)

1: enable
CE BOOL Enable Cascade 1 Yes
0: disable
(suspended)

1: enable
Enable Manual
TE BOOL 1 Yes
Track 0: disable
(suspended)

797
APPENDIX 1 Function Block

1: enable
Enable Automatic
FE BOOL 1 Yes
Track 0: disable

PU REAL Upper Limit of PV 100 Yes

PD REAL Lower Limit of PV 0.00 Yes

Alarm Level:

0: general

AC UINT 1: important 0 suspended Yes

2: urgent

3: critical

Output Features

Conditions Output Formula


Supplement
RM Mode Position Mode Incremental Mode

1: AV  MI
“+” is for manual
AV (k )  AV (k  1) 2: AV  MI increment
0 MAN
 MI ( MS ) AV  MS “-“ is for manual
3:
decrement
4: AV  MS

AV (k )  AV (k  1) AV (k )  du  du: proportional and


1 Auto integration terms in
 du  oc1  du  dk oc1  du  dk
this calculation
(invalid by integral
separation)

du · dk: derivative
AV (k )  AV (k  1) AV (k )  du  term in this
2 Cascade
 du  oc1  du  dk oc1  du  dk calculation

oc1: output
compensation term

798
APPENDIX 1 Function Block

Manual
3 AV  TP AV  TP
Track

Automati Automatic in this


4 AV  TP AV  TP
c Track mode when TS=1

Description

This function block provides general-purpose PID control functions. This blcok
supports 5 working modes: MANUAL, AUTO, CASCADE, MANUAL TRACK,
and AUTO TRACK. It provides also two output modes: Increment Mode and
Position Mode. It supports separate PID and cascaded PID (combination of
two PIDs). The input compensation IC is used to implement pure lag control,
while the output compensation OC is used to implement feed forward control;
the track switch TS can be used to set the function block into Track mode.

The algorithm of this block seems like following:

 CP TD 
AV (k )  K p  K s E (k )   E (k )  (E (k ))
 TI CP 

E (k )  SP(k )  PV (k )
100 MU  MD
Kp  ; Ks 
PT PU  PD
Where, E (k )  E (k )  E (k  1)

In the formulas:

KP: proportional gain


KS: scale conversion coefficient
PT: proportional band(%)
PV(k): process value (engineering unit)
SP(k): set value (engineering unit)
PU: upper limit of PV
PD: lower limit of PD
MU: upper limit of output
MD: lower limit of output
The priority of the five working modes is: MANUAL TRACK/AUTO
TRACK>MANUAL>AUTO/CASCADE.

 Track

In this mode, the PID block stops the calculation, and the value varies with
799
APPENDIX 1 Function Block

the variable that is tracked. RM can be set to other valid values if RM=3
currently. If RM=4, the block can work in AUTO mode automatically by
TS=1, but in this case assignment of RM to another value is invalid. It will
return to the last mode.
The combination of track switch and track point determines the track
mode. The cases of track are listed in the following table:

Track Switch Track Point Track Mode

No No Not in track mode

No Yes Enable manual track

Yes No Not in track mode

Yes Yes Enable manual track

 MANUAL

If TS=0, you can change RM to 0 to force the block into MANUAL mode. If
the output is in incremental mode (OM=1), the output value in the current
cycle is determined in accordance with the value of MM. If the output is in
position mode (OM=0), the output value current cycle is determined as the
output in the previous cycle plus the output increment (MI, -MI, MS or -MS)
in this cycle.
 AUTO

If the Track condition is not met (TS=0), you can change RM to 1 to make
the block work in AUTO mode. In this case, PID will perform fixed value
operation with the expression.
 CASCADE

If the Track condition is not met (TS=0), you can change RM=2 to make
the block work in CASCADE mode. This mode is usually for the
secondary controller. In this case, the PID operation will be performed with
the output from the primary controller as the set value.
IC is used to compensate for the bias. That is to say, if there is a signal at
IC, this value must be added to the bias E(n) (pure lag control). In reverse
action, E (n)  ( SP  PV )  IC ; in normal action, it is  ((SP  PV )  IC ) . In
contrast to above, OC is for the compensation of AV(n). The change rate
of set value must be under (( PU  PD)  FA . The output is also limited
between OT and OB.

800
APPENDIX 1 Function Block

• The output of the primary controller in CASCADE mode will track the set
value of the secondary controller, if it is not in CASCADE mode.

• In Track or MANUAL mode, for the single controller or primary controller,


you can choose whether the set value of PID tracks the process value. For
the secondary controller, its set value will track the process value
automatically.

• The set value of this block has three forms: SP, CS, and RS. For single and
primary controller, SP is the set value (takes part in the calculation); for the
secondary controller, SP is the output value of the primary controller. CS is
exclusively used for AUTO mode of the secondary controller. When the
secondary controller is in AUTO mode, CS is used instead of SP (i.e., the
output from the primary controller is not used); when the secondary
controller is in CASCADE mode, CS will strictly track the output of primary
controller; when the secondary controller is in MANUAL or Track mode, CS
will strictly follow the value of the controller (PV-IC). In that way, the mode
switching of controller can be performed uninterruptedly. RS is the actual
set value used in operation. It can be deemed as the actual set value
obtained from SP or CS through change rate limitation.

Example

The following diagram is the example of controlling drainage water level with a
single PID:

801
APPENDIX 1 Function Block

Figure 1.3.8-2 Example of Controlling with Single PID

The next diagram is the same example but with cascade control loop:

Figure 1.3.8-3 Example of Controlling with Cascade PID

1.3.9 HSSCS

802
APPENDIX 1 Function Block

Figure 1.3.9-1 HSSCS

Alias

Sequential Controller

Pins

Input Data Type Description Initial Value Supplement Persistent

On Position Status No
V1 BOOL 0
Feedback

Off Position Status No


V2 BOOL 0
Feedback

L0 BOOL Electrical Fault 0 Yes

L1 BOOL Device Protection 0 Yes

L2 BOOL Site Protection On 0 Yes

L3 BOOL Site Protection Off 0 Yes

L4 BOOL Enable On 1 Yes

L5 BOOL Enable Off 1 Yes

L6 BOOL Automatic On 0 Yes

803
APPENDIX 1 Function Block

L7 BOOL Automatic Off 0 Yes

L8 BOOL Initial Pulse 0 Yes

TP BOOL Manual On 0 Yes

TC BOOL Manual Off 0 Yes

TS BOOL Manual Stop 0 Yes

Output

Current No
DV BOOL Device On 0
Value

Reverse No
RV BOOL Device Off 0
Value

Internal Parameters

Para
mete Data Type Description Initial Value Supplement Persistent
r

Number of
cycle. It needs
to multiply with
the operation
RT DWORD Running Time 1 cycle of Yes
schema page,
to get the
result in
second.

0:
electromot
or
DE BYTE Device Type 0 Yes
1: electric
gate valve

2:
electromag

804
APPENDIX 1 Function Block

netic valve

SC BOOL Stop Control 0 0: no 1: yes Yes

0: no
Instruction
CM BOOL 1
Memory 1: yes (electric Yes
gate valve)

0: no
Stop Connection
OS BOOL 1 1: yes Yes
of Instruction On
(non-electrom
agnetic valve)

0: no
Stop Connection
CS BOOL 1 1: yes Yes
of Instruction Off (non-electrom
agnetic valve)

0: no
Reverse Output of
OU BOOL 0 1: yes Yes
Instruction On (electromagnet
ic valve)

Output Features

Conditions Output Formula Supplement

If the condition is met, the


Discrete
duration of the output
(*1)
CM  OS  CS  0 instruction is the same as
the input instruction.

Input instruction is
Running remembered. I.e., once
Mode Continuous
input instruction is valid,
(*2)
CM  OS  CS  1 output instruction will keep
till ON/OFF position status
feedback arrives.

Interlock The execution process is (*3)


essentially identical to that

805
APPENDIX 1 Function Block

CM  1, OS  CS  0 in the continuous mode,


with the only different as:
the termination condition of
output instruction doesn't
include arrival of ON/OFF
position feedback.

The instruction ON of input


corresponds to instruction
RUN, and DV=1. The
instruction OFF of input
Electromotor corresponds to instruction
STOP, and RV=1. If both
DV and RV are 0, the
motor status will not
change.

The instruction ON of input


corresponds to instruction
ON, and DV of the electric
gate valve is 1. The
instruction OFF of input
corresponds to OFF of
Priority of
output, and the RV of the
Manual Stop
electric gate valve will be 1.
is higher than
The instruction MANUAL
Manual
Device Electric Gate Valve STOP of input corresponds
On/Manual
Type to STOP of output (HSSCS
Off/Automatic
has no output of STOP. By
On/Automatic
online, when you click
off.
STOP button, TS will be
set to 1, and the electric
gate valve will stop). If both
DV and RV are 0, the
status of the electric gate
valve will not change.

It has only one output


instruction DV, RV is
invalid. The DV output
determines power on or off
Electromagnetic of the valve. By
Valve configuration, if OU is set
to "not selected" and
DV=1, the valve will be
powered on and powered
off when DV=0. If "OU" is
set to "selected", the valve

806
APPENDIX 1 Function Block

will be powered on when


DV=0, and powered off
when DV=1.

If the ON/OFF position


status feedback of the
device is different to the
status set by the sequential
controller, a STATE
Status Error ERROR (ON to OFF) or
Monitoring STATE ERROR (OFF to
ON) signal will occur, and
the status error will keep,
till it is confirmed. An alarm
signal will be triggered in
case of state error.

If there is no position state


feedback over a specified
Running Overtime time after the instruction is
Monitoring sent, an (ON/OFF) timeout
signal and an alarm will be
produced.

Status If both ON and OFF


Monitoring position status feedback
are "0" or "1" (only "1" for
Position Status
electric gate valve), a
Feedback Monitoring
position "state feedback
error" signal and an alarm
will be produced.

When MANUAL
ON/MANUAL OFF and
AUTO ON/AUTO OFF, or
two instructions at same
priority but in opposite
Instruction Block
directions occur, or the
Monitoring
permissive condition in the
direction is not met, an
instruction block signal will
be produced, but no alarm
signal.

Electrical fault signal of


Electrical Fault electromotor is produced
by electrical protection. An

807
APPENDIX 1 Function Block

alarm will also be


produced.

Once the instruction of


manual switching or the
initialization pulse is valid,
the alarm signals, e.g.,
STATE ERROR (ON to
Signal Confirm
OFF), STATE ERROR
(OFF to ON), Device
Protection OFF, Running
Overtime, etc., will be
confirmed.

*1: this mode is applicable for electromotor, electric gate valve and
electromagnetic valve.
*2: this mode is applicable for electromotor, electric gate valve and
electromagnetic valve. For cases where the instructions will be terminated
please see Description.
*3: this mode is applicable for electromotor. For cases where the instructions
will be terminated please see the Description.

Description

This function block integrates the drive control functionality of three typical
sequential controllers: electromotor, electric gate valve and electromagnetic
valve. It can accomplish device startup/stop, protection logic, and alarm
handling, etc.

1. Priority
The priority order of its instructions is: DEVICE PROTECTION OFF/SITE
PROTECTION OFF > SITE PROTECTION ON > MANUAL STOP >
MANUAL OFF/AUTO OFF > MANUAL ON/AUTO OFF. Once an input
instruction with higher priority occurs, the others with lower priority will be
blocked. In addition, MANUAL ON, MANUAL OFF, AUTO ON, and AUTO
OFF are restricted by ON/OFF condition, i.e., they are valid only when ON
or OFF condition are met. However, DEVICE PROTECTION OFF, SITE
PROTECTION ON, and SITE PROTECTION OFF are not restricted by
ON/OFF condition. When an input instruction occurs and all execution
conditions are met, the sequential controller will create an output
instruction (ON/OFF). Meanwhile, it will log the status of the current
instruction internally, till the next input instruction occurs.
2. RunMode
The output instructions generated by this function block are in different
forms, depending on the RUN mode. The following first two modes pass
to electromotor, electric gate valve and electromagnetic valve:
(1) Discrete mode: if the condition is met, the duration of the output
instruction is the same as the input.
808
APPENDIX 1 Function Block

(2) Continuous mode: in this mode, the input instruction is memorized, i.e.,
once the input instruction is valid, the output instruction will keep
regardless of whether it persists, till either of the following conditions
occurs:

- The instruction memory is cleared when an electrical fault, reverse


instruction or confirm signal occurs;

- When the ON/OFF position status feedback reaches, or a STATE


ERROR (ON to OFF) or STATE ERROR (OFF to ON) occurs.

(3) The electromotor also has an instruction block mode. In that mode, the
input instruction is memorized. That is to say, once the input instruction
is valid, the output instruction will keep regardless of whether the
output instruction persists, till either of the following conditions occurs:

- The instruction memory is cleared when an electrical fault, reverse


instruction or confirm signal occurs;

- When a "STATE ERROR" occurs.

The RUN mode of the device is set by configuration. For discrete mode,
set Instruction Memory to "No", and set ON as well as OFF Instruction
Disconnection to "No"; for Continuous Mode, set Instruction Memory to
"Yes", and set ON as well as Instruction Disconnection to "Yes"; for
Instruction Block mode, set Instruction Memory to "Yes", and set ON as
well as OFF Instruction Disconnection to "No".
3. Device Type
This function block integrates the drive control function of three typical
controllers: electromotor, electric gate valve and electromagnetic valve.
The specific device can be chosen by configuration of "Device Type".
Hereunder the input and output instructions of each device type will be
described:
 Electromotor

Electromotor has 7 input instructions: DEVICE PROTECTION OFF, SITE


PROTECTION OFF, SITE PROTECTION ON, AUTO OFF, AUTO ON,
MANUAL OFF, and MANUAL ON. It has two output instructions: RUN and
STOP. The ON instruction corresponds to RUN instruction, and the DV=1;
the OFF input instruction corresponds to STOP, the RV=1. If both DV and
RV are 0, the motor status will not change.
If the device protection is OFF and the motor position status feedback is
RUN, the device protection OFF triggering signal will be produced, and a
motor stop instruction will be sent. At the same time, a STATE ERROR
(ON to OFF) signal will be produced and keep. If ON instruction still exists
when DEVICE PROTECTION OFF signal is triggered, the motor will
restart after the DEVICE PROTECTION OFF signal is confirmed and
disappears. The operator can confirm the DEVICE PROTECTION OFF
signal at any time. DEVICE PROTECTION OFF has the top priority. When
809
APPENDIX 1 Function Block

it occurs, all other instructions will be blocked, the instruction memory will
be cleared. The last output instruction will be stopped, and no alarm signal
will be created. This command is not limited by state error.
When SITE PROTECTION OFF or SITE PROTECTION ON occurs, no
alarm signal will be created. However, these instructions are limited by
STATE ERROR (ON to OFF) and STATE ERROR (OFF to ON). I.e., if
there is a state error, these commands will be blocked, till the status error
is confirmed. SITE PROTECTION OFF and SITE PROTECTION ON are
at the second priority level. When either of them occurs, MANUAL OFF,
AUTO OFF, MANUAL ON, and AUTO ON will be blocked.
MANUAL ON, MANUAL OFF, AUTO ON and AUTO OFF instructions are
at the lowest priority level. If any exception occurs during their produce, an
alarm signal will be created. If STATE ERROR (ON to OFF) or STATE
ERROR (OFF to ON) is valid, these instructions will be blocked.
 Electric Gate Valve

Electric gate valve has 8 input instructions: DEVICE PROTECTION OFF,


SITE PROTECTION OFF, SITE PROTECTION ON, MANUAL STOP,
AUTO OFF, AUTO ON, MANUAL OFF, and MANUAL ON. It has 3 output
instructions: ON, OFF, and STOP. The ON input instruction corresponds to
ON output instruction, and DV is 1; the OFF input instruction corresponds
to OFF output instruction, and RV will be 1; the MANUAL STOP input
instruction corresponds to STOP output instruction (the sequential
controller has no STOP instruction output; by online, when you click STOP
button, TS will be set to 1, and the electric gate valve will stop). If both DV
and RV are 0, the status of the electric gate valve will not change.
The priorities of the input instructions of electric gate valve and the
executed functionalities when the input instructions occur are similar to
those of electromotor with the following two differences:
- If the position status feedback of electric gate valve is ON when DEVICE
PROTECTION OFF occurs, a DEVICE PROTECTION OFF triggering
signal will be produced, and an OFF instruction will be output; in addition,
a STATE ERROR (ON to OFF) signal will be created and keep.
- The priority of MANUAL STOP is higher than MANUAL ON, MANUAL
OFF, AUTO ON, and AUTO OFF; when MANUAL STOP occurs, no alarm
signal will be created; MANUAL STOP is not limited by STATE ERROR
(ON to OFF) and STATE ERROR (OFF to ON).
 Electromagnetic Valve

Electromagnetic valve has 7 input instructions: DEVICE PROTECTION


ON, SITE PROTECTION OFF, SITE PROTECTION ON, AUTO OFF,
AUTO ON, MANUAL OFF and MANUAL ON; it has only one output DV,
and RV is in invalid status. The DV determines Power On or Power Off
status of the electromagnetic valve. By the configuration, if OU is set to
"not selected", the valve will be powered on when the DV=1; it will be
powered off when DV=0. If OU is set to "selected", the valve will be
powered on when the DV=0; it will be powered off when the DV=1.

810
APPENDIX 1 Function Block

ON input instruction corresponds to ON output instruction, and OFF input


instruction corresponds to OFF output instruction.
If the position state feedback of valve is in ON state when Device
Protection OFF occurs, a Device Protection OFF triggering signal will be
produced, and a valve OFF instruction will be the output; in addition, a
STATE ERROR (ON to OFF) signal will be created and keep.
The priorities of the input instructions of electromagnetic valve and the
executed functionalities when the input instructions occur are similar to
those of motor.
4. Monitoring function
(1) State error monitoring

In case of an ON/OFF output command, the sequential controller will


memorize the status of the current command, till the next input
instruction occurs. If the ON/OFF position status feedback of the
device is different to the status set by the sequential controller, a
STATE ERROR (ON to OFF) or STATE ERROR (OFF to ON) signal
will be produced, and the status error will keep, till it is confirmed. The
types are shown in the following table:

Positon Status Status Error Status Error


Set Status
Feedback (On to Off) (Offto On)

On Not On 1 0

On Off 1 0

Off Not Off 0 1

Off On 0 1

MANUAL ON/OFF, AUTO ON/OFF, and SITE PROTECTION ON/OFF


don't produce state error. A state error will be produced in any of the
following cases:

- When the state feedback of electric gate valve, electromagnetic valve,


or electromotor is different to the set status of the previous instruction
memorized by the sequential controller due to manual operation or
operation with a hardware manual operator, the sequential controller
will produce a status error signal;

- If an electrical fault signal of the motor occurs when it is in RUN state,


the output instruction will be terminated, the motor will be stopped, and
a STATE ERROR (ON to OFF) signal will be produced.

811
APPENDIX 1 Function Block

- If the position state feedback is ON when DEVICE PROTECTION ON


occurs, a DEVICE PROTECTION OFF triggering signal will be
produced, and a STATE ERROR (ON to OFF) signal will be produced.
-When there is a status error, all input instructions will be blocked,
except for DEVICE PROTECTION OFF, till the error is "confirmed". An
alarm signal will be produced when there is a state error.

(2) Running Overtime Monitoring

If there is no position status feedback over a specified time after the


instruction is sent, an (ON/OFF) running overtime signal and an alarm
signal will be produced. The run time can be set during configuration or
set online.

(3) Position status feedback monitoring

If both ON and OFF position status feedback are "0" or "1" (only "1" for
electric gate valve), a position "status feedback error" signal and an
alarm signal will be produced. The status error and overtime signal will
be blocked.

For electromotor and electromagnetic valve, the position status


feedback monitoring will be blocked till the operation monitoring time is
reached, which means double-signal position status feedback can be
used to provide ON and OFF status.

(4) Instruction Block Monitoring

When the instruction can't be executed due to any of the following


causes, an instruction block signal will be produced:

- For MANUAL ON/OFF or AUTO ON/OFF, two input instructions at the


same priority but in opposite directions occurs;

- For MANUAL ON/OFF or AUTO ON/OFF, the permissive condition in


the instruction execution direction is not met.

The instruction block signal will be blocked in any of the following


cases:

- A position state feedback signal exists in the instruction direction;

- An instruction output exists in the instruction direction;

- A confirmation signal exists.

No alarm signal will be produced when the command is blocked.

(5) Electrical Fault (electromotor)

The electrical fault signal of electromotor is produced by electric


protection. If an electrical fault signal exists, then:
812
APPENDIX 1 Function Block

- The output instruction will be terminated;

- The instruction memory will be cleared;

- If the device is in RUN status, a STATE ERROR (ON to OFF) signal


will be produced.

An alarm signal will be produced when an electrical fault signal of


motor occurs.

(6) Signal confirmation

Once the manual switching instruction becomes effective (press


MANUAL button during online operation), or the initialization pulse
signal becomes effective (click the dynamic initialization pulse point
during online operation or set by logic operation), the alarm signals,
such as STATE ERROR (ON to OFF), STATE ERROR (OFF to ON),
DEVICE PROTECTION OFF, ON Running Overtime, and OFF
Running overtime, will be "confirmed".

Example

The following are examples of HSSCS for electromotor, electric valve and
electromagnetic valve.

813
APPENDIX 1 Function Block

Figure 1.3.9-2 Example of HSSCS for Electromotor

Figure 1.3.9-3 Example of HSSCS for Electric Gate Valve

814
APPENDIX 1 Function Block

Figure 1.3.9-4 Example of HSSCS for Electromagnetic Valve

1.3.10 HSSCS5

Figure 1.3.10-1 HSSCS5

Alias

Sequential Controller 5

Pins

Data Initial
Input Description Supplement Persistent
Type Value

815
APPENDIX 1 Function Block

On Position Status
V1 BOOL 0 No
Feedback

Off Position Status


V2 BOOL 0 No
Feedback

L0 BOOL Electrical Fault 0 Yes

L1 BOOL Device Protection 0 Yes

L2 BOOL Site Protection On 0 Yes

L3 BOOL Site Protection Off 0 Yes

L4 BOOL Enable On 1 Yes

L5 BOOL Enable Off 1 Yes

L6 BOOL Automatic On 0 Yes

L7 BOOL Automatic Off 0 Yes

L8 BOOL Initial Pulse 1 Yes

TP BOOL Manual On 0 Yes

TC BOOL Manual Off 0 Yes

TS BOOL Manual Stop 0 Yes

0:remote/DCS
SD BOOL Remote Operation 0 Yes
1:local/manual

Output

DV BOOL Device On 0 Current Value No

RV BOOL Device Off 0 Reverse Value No

OC BOOL Bias On to Off 0 No

816
APPENDIX 1 Function Block

SP BOOL Pause 0 No

CO BOOL Bias Off to On 0 No

Internal Parameters

Para
Data Initial
mete Description Supplement Persistent
Type Value
r

0:needs no confirmation
QR BOOL Reconfirm 0 Yes
1:need confirmation

0:operable
JC BOOL Overhaul 0 Yes
1:prohibit operation

RT DWORD Running Time 0 0-65535 Yes

0:electromotor

DE BYTE Device Type 0 1:electric gate valve Yes

2:electromagnetic valve

SC BOOL Stop Control 0 0: no 1: yes Yes

0: no
Instruction
CM BOOL 0
Memory 1: yes (electric gate Yes
valve)

0:no
Stop
OS BOOL Connection of 0 1:yes Yes
Instruction On (non-electromagnetic
valve)

0:no
Stop
CS BOOL Connection of 0 1:yes Yes
Instruction Off (non-electromagnetic
valve)

817
APPENDIX 1 Function Block

0:no
Reverse
OU BOOL Output of 0 1:yes (electromagnetic Yes
Instruction On valve)

Output Features

Conditions Output Formula Supplement

If the condition is met, the


Discrete
duration of the output
(*1)
CM  OS  CS  0 instruction is the same as
the input instruction.

Input instruction is
remembered. I.e., once
Continuous
input instruction is valid,
(*2)
CM  OS  CS  1 output instruction will keep
till ON/OFF position status
Running
feedback arrives.
Mode

The execution process is


essentially identical to that
in the continuous mode,
Interlock with the only different as:
the termination condition of (*3)
CM  1, OS  CS  0 output instruction doesn't
include arrival of ON/OFF
position feedback. (Valid
for motor only and DE=0)

The instruction ON of input


corresponds to instruction
RUN, and DV=1. The
instruction OFF of input
Electromotor corresponds to instruction
STOP, and RV=1. If both
Device DV and RV are 0, the
Type motor status will not
change.

The instruction ON of input Priority of


Electric Gate Valve corresponds to instruction Manual Stop
ON, and DV of the electric is higher than
gate valve is 1. The Manual

818
APPENDIX 1 Function Block

instruction OFF of input On/Manual


corresponds to OFF of Off/Automatic
output, and the RV of the On/Automatic
electric gate valve will be 1. off.
The instruction MANUAL
STOP of input corresponds
to STOP of output (HSSCS
has no output of STOP. By
online, when you click
STOP button, TS will be
set to 1, and the electric
gate valve will stop). If both
DV and RV are 0, the
status of the electric gate
valve will not change.

It has only one output


instruction DV, and RV is
invalid. The DV output
determines power on or off
of the valve. By
configuration, if OU is set
Electromagnetic to "not selected" and
Valve DV=1, the valve will be
powered on and powered
off when DV=0. If "OU" is
set to "selected", the valve
will be powered on when
DV=0, and powered off
when DV=1.

If the ON/OFF position


status feedback of the
device is different to the
status set by the sequential
controller, a STATE
Status Error ERROR (ON to OFF) or
Monitoring STATE ERROR (OFF to
Status ON) signal will occur, and
Monitoring the status error will keep,
till it is confirmed. An alarm
signal will be triggered in
case of state error.

If there is no position state


Running Overtime feedback over a specified
Monitoring time after the instruction is
sent, an (ON/OFF) timeout

819
APPENDIX 1 Function Block

signal and an alarm will be


produced.

If both ON and OFF


position status feedback
are "0" or "1" (only "1" for
Position Status
electric gate valve), a
Feedback Monitoring
position "state feedback
error" signal and an alarm
will be produced.

When MANUAL
ON/MANUAL OFF and
AUTO ON/AUTO OFF, or
two instructions at same
priority but in opposite
Instruction Block
directions occur, or the
Monitoring
permissive condition in the
direction is not met, an
instruction block signal will
be produced, but no alarm
signal.

Electrical fault signal of


electromotor is produced
Electrical Fault by electrical protection. An
alarm will also be
produced.

Once the instruction of


manual switching or the
initialization pulse is valid,
the alarm signals, e.g.,
STATE ERROR (ON to
Signal Confirm
OFF), STATE ERROR
(OFF to ON), Device
Protection OFF, Running
Overtime, etc., will be
confirmed.

*1: this mode is applicable for electromotor, electric gate valve and
electromagnetic valve.
*2: this mode is applicable for electromotor, electric gate valve and
electromagnetic valve. For cases where the instructions will be terminated
please see Description.
*3: this mode is applicable for electromotor. For cases where the instructions
will be terminated please see the Description.

820
APPENDIX 1 Function Block

Description

1. Executive Function
The function block of sequential controller 5 mainly make logic operations for
the input command, and also output command and related device and alarm
information. The output will be influenced by related parameters.

Input / Output parameters and commands

 In maintenance: When instruction (JC=1) in maintenance, all the


operation and output command will be prohibited.

 Remote and local operation: When SD=1, local/manual mode will be


selected, and the following operations will be prohibited, such as
manual ON/OFF and automatic ON/OFF; block site protection on and
non-block site protection off; when SD=0 remote/DCS mode will be
selected, and the sequential controller 5 can be operated.

 Reset(RP): The function block has reset function and there is reset
confirmation button on operation panel. The reset needn’t to confirm
when secondary operation(OR) is FALSE and panel reset is valid. The
reset function is not valid when secondary operation(OR) is TRUE and
the reset key becomes confirm key. If there is no open or close
operation the reset key is valid, and if there is open or close operation,
operation confirmation is valid in specified time (2 seconds by default),
reset function is not pressed and open or close operation is not effect
this time.

 Test of debugging: When SY=1, the sequential controller permission ,


automatic and fault condition are shielded, and the device can be
operated. Use it with caution!

 Output pulse limit: When CD=1, the status of output to device changed
short-pulse, which is use for field loop self-keeping; When CD=0, as it
is then. Use with caution!

Input / Output Commands: Input and output commands contain


factory-protection-off, factory-protection-open, automatically open,
automatically off, manually open, close and stop command in online operation.

The priority of these functions from high to low are: device-protection-off/on >
factory-protection-on > manually stop > manually/automatically open >
manually open/automatically open. The command with lower priority is
shielded when higher priority command happens.

On the other hand, manually open/close and automatically open/close is


restrained by on/off permission. These commands are not valid unless
open/close permission is effective. In contrary, device-protection-on/off,
factory-protection on /off is not limited by on/off permission.

Only when input command meets the demand of all execution condition,
821
APPENDIX 1 Function Block

HSSCS5 module outputs command; meanwhile, the module will record the
setting status of this command until the next one happens.

Running Mode

The running mode is not same when module parameters are different. The
parameters which affect them are CM, OS and CS.

There are two running modes for electromotor, electric gate valve and
electromagnetic valve:

 Discrete mode: if the condition is met, the duration of the output


instruction is the same as the input.

 Continuous mode ( CM  OS  CS  1 ) : in this mode, the input


instruction is memorized. Once the input instruction is valid, the output
instruction will keep unless the following conditions occur:

1)The instruction memory is cleared by an electrical fault, reverse instruction


or confirmation signal;

2)When there is ON/OFF position status feedback, or a STATE ERROR (ON


to OFF) or STATE ERROR (OFF to ON) occurs.

HSSCS5 module integrated the driver control function of electromotor, Electric


Gate Valve and solenoid valve, which can be configured in Device Type of the
software.

(1) Electromotor:

Electromotor has 7 input instructions: DEVICE PROTECTION OFF, SITE


PROTECTION OFF, SITE PROTECTION ON, AUTO OFF, AUTO ON,
MANUAL OFF, and MANUAL ON. It has two output instructions: RUN and
STOP. The ON instruction corresponds to RUN instruction, the DV=1; the OFF
input instruction corresponds to STOP, the RV=1. If both DV and RV are 0, the
motor status will not change.

If the device protection is OFF and the motor position status feedback is RUN,
the device protection OFF triggering signal will be triggered, and a motor stop
instruction will be sent. At the same time, a STATE ERROR (ON to OFF) signal
will be generated and keep.

If ON instruction still exists when DEVICE PROTECTION OFF signal is


triggered, the motor will restart after the DEVICE PROTECTION OFF signal is
confirmed and disappeared.

The operator can confirm the DEVICE PROTECTION OFF signal at any time.
DEVICE PROTECTION OFF has the top priority. When it occurs, all other
instructions will be blocked, the instruction memory will be cleared. The last
output instruction will be stopped, and FALSE alarm signal will be created. This
command is not restrained by state error.
822
APPENDIX 1 Function Block

When SITE PROTECTION OFF or SITE PROTECTION ON occurs, no alarm


signal will be created. However, these instructions are restrained by STATE
ERROR (ON to OFF) and STATE ERROR (OFF to ON). I.e., if there is a state
error, these commands will be shield, till the status error is confirmed.

SITE PROTECTION OFF and SITE PROTECTION ON are at the second


priority level. When either of them occurs, MANUAL OFF, AUTO OFF,
MANUAL ON, and AUTO ON will be blocked.

MANUAL ON, MANUAL OFF, AUTO ON and AUTO OFF instructions are at the
lowest priority level. If any exception occurs, an alarm signal will be created. If
STATE ERROR (ON to OFF) or STATE ERROR (OFF to ON) is valid, these
instructions will be blocked.

The relationship between input command and output command in different


mode is as follows:

 Continuous Mode

L1 (device-protection-off): the rising edge can trigger the output command RV


as TRUE. Then, if the feedback status is running, status deviation OC is
generated and output command RV=1, which means the device-protection-off
command is issued but the device is still in running status. If the off feedback is
1 and on feedback is 0 during RT , then RV=0. If there is no feedback of device
status (on or off) during RT and feedback is overtime at the same time, RV=0.
After the overtime, the off status is feedback and overtime alarm is cleared.
Status bias must be manually confirmed. You should click initial pulse or make
it effect by logic computation when panel is manually off or in online operation.

Device-protection-off command is triggered, and RV command outputs 1, then


the module is in running status and generates status bias OC from on to off. If
off status (V1=0, V2=1) is feedback in RT time, output command RV is 0, OC
will be not cleared until confirmation.
L1=1

RT

L1 t

V1=0
V2=1

RV

OC

Device-protection-off command is triggered, and RV command outputs 1, then


the module is in running status and generates status bias OC from on to off. If
off status (V1=0, V2=1) is not feedback in RT time, output command RV is- 0
and overtime signal CT appears, OC and CT will be not cleared until
confirmation.

823
APPENDIX 1 Function Block

L1=1

RT

L1 t

RV

CT

OC

Device-protection-off command is triggered, and RV command outputs 1, then


the module is in running status and generates status bias OC from on to off. If
off status (V1=0, V2=1) is not feedback in RT time, output command RV is- 0
and overtime signal CT appears. If there are no feedback before confirmation,
V1=0, V2=1, CT will be cleared while OC will be cleared after confirmation.
L1=1

RT

L1 t

V1=0
V2=1

RV

CT

OC

L2 (factory-protection-on), L6 (automatically on), TP (manually on), rising pulse


can trigger output command DV=1, the band of which is affected by RT time. If
the feedback on status is 1 in RT time, output DV is 0. If there is no correct
feedback status, the feedback is overtime. It is restrained by status bias, when
there is status bias, this command will be shield.

When there is no status bias, input command DV=1, and feedback V1=1, V2=0
in RT time, DV=0.

824
APPENDIX 1 Function Block

L2=1

RT

L2 t

V1=0
V2=1

DV

When there is no status bias, input command DV=1 and no feedback in RT


time (V1=1, V2=0), DV=0 and running overtime. If feedback V1=1, V2=0 or
operation is confirmed, OT clears.
L2=1

RT

L2 t

V1=1
V2=0

DV

OT

L2=1 Confirmation

RT

L2 t

DV

OT

For L3 (factory-protection-off), TC (manually off), rising pulse can trigger output


command DV and can feedback running overtime. Limited by status bias,
when there is status bias, the command is shield.

When there is no status bias, output command L3 or L7 or TC, RV=1. V1=0,


V2=1, RV=0 in RT time.

825
APPENDIX 1 Function Block

L3=1

RT
L3
t

V1=0
V2=1

RV

When there is no status bias, output off command (L3, L7 or TC), RV=1. If
there is no feedback in RT time, V1=0, V2=1, RV=0, and on running overtime
is generated. If there is no status feedback V1=0, V2=1 or no confirmation
operation, CT clears.
L3=1

RT

V1=0
V2=1

RV

CT

L3=1 Confirmation

RT

RV

CT

 Interlock mode of electromotor

L1 is device-protection-off signal and the rising pulse can trigger output


command RV. If running status is feedback when device-protection-off signal is
issued, status bias OC from on to off is generated. If correct status is not
feedback in RT time, overtime alarm appears and RV signal stops outputting 1.
Then, if the correct status feedback arrives, RV outputs 1 again.

826
APPENDIX 1 Function Block

If device-protection-off command is triggered, RV outputs 1 and module is in


running status, in addition, status bias from on to off is generated. If device off
status is feedback in RT time (v1=0, V2=1), output command RV keeps
outputting 1 and OC clears after confirmation. RV command maintains until the
end condition is met.

Terminal
L1=1 Confirmation condition is
met

RT

V1=0
V2=1

RV

OC

If device-protection-off command is triggered, RV outputs 1 and module is in


running status, in addition, status bias from on to off is generated. If device off
status is feedback in RT time (v1=0, V2=1), output command RV =0 and
running overtime signal CT generates. If device off status is feedback before
confirmation (V1=0, V2=1), CT clears and RV outputs 1 again. OC clears after
confirmation. RV command RV command maintains until the end condition is
Terminal
L1=1 COnfirmationcondition is
met

RT

V1=0
V2=1

RV

OC

CT

met.

If device-protection-off command is triggered, RV outputs 1 and module is in


running status, in addition, status bias from on to off is generated. If device off
status is feedback in RT time (v1=0, V2=1), output command RV =0 and
running overtime signal CT generates. OC clears after confirmation. RV
command RV command maintains until the end condition is met.

827
APPENDIX 1 Function Block

L1=1 Confirmation

RT

RV

OC

CT

Rising pulse of L2 (factory-protection-on), L6 (automatically on) or TP


(automatically on) can trigger outputting command DV, the band of which is
effected by RT time. If no correct status is feedback in RT time, feedback is
overtime. Restrained by status bias, when there is status bias, the command is
shield.

When there is no status bias, output on command L2, L6 or TP, and DV=1. If
v1=1, V2=0 is feedback in RT time, DV keeps outputting 1 until end condition is
met.

L2=1 Terminal
condition is
met

RT

V1=1
V2=0

DV

When there is no status bias, output on command L2, L6 or TP, and DV=1. If
v1=1, V2=0 is feedback in RT time, DV keeps outputting 0 and running
overtime signal OT appears, OT disappears after confirmation.

828
APPENDIX 1 Function Block

L2=1 Confirmation

RT

DV

OT

Rising pulse of signals L3 (factory-protection-off), TC (automatically off) can


trigger RV command, and running overtime can feedback. Limited by status
bias, when status bias exists, the command will be shield.

When there is no status bias , open command will input L2, L6 or TP and DV=1.
In RT time, if V1=1,V2=0, DV will be 1 until terminal condition comes true.

Terminal
L2=1 condition is
met

RT

V1=0
V2=1

RV

When there is no status bias, close command will output( L3, L7 or TC ) and
RV=1. When no feedback in RT time, V1=0, V2=1and RV keeps outputting 0
after RT time. Then close overtime generated and CT will be cleared after
confirmation.
L3=1 Confirmation

RT

RV

CT

When there is no status bias, close command will output (L3, L7 or CT), if no is
feedback in RT time, V1=0, V2=1 and RV=0. Then close overtime is generated
and V1=0, V2=1. CT will be cleared. Output of RV will be 1 until terminal
829
APPENDIX 1 Function Block

condition comes true.

Terminal
L3=1 condition is
met

RT

V1=0
V2=1

RV

CT

(2) ElectricValve

Electric valve has 8 input instructions: DEVICE PROTECTION OFF, SITE


PROTECTION OFF, SITE PROTECTION ON, MANUAL STOP, AUTO OFF,
AUTO ON, MANUAL OFF, and MANUAL ON. And 3 output instructions: ON,
OFF, and STOP. The ON input instruction corresponds to ON output instruction,
and DV is 1; the OFF input instruction corresponds to OFF output instruction,
and RV will be 1; the MANUAL STOP input instruction corresponds to STOP
output instruction (the sequential controller has FALSE STOP instruction
output; by online, when you click STOP button, TS will be set to 1, and the
electric valve will stop). If both DV and RV are 0, the status of the electric gate
valve will not be changed.

The priorities of the input instructions of electric valve and the executed
functionalities are similar to electromotor with the following two differences:

 If the position status feedback of electric gate valve is ON when


DEVICE PROTECTION OFF occurs, a DEVICE PROTECTION
OFF signal will be triggeres, and an OFF instruction will be output;
in addition, a STATE ERROR (ON to OFF) signal will be
generated.

 The priority of MANUAL STOP is higher than MANUAL ON,


MANUAL OFF, AUTO ON, and AUTO OFF; when MANUAL STOP
occurs, FALSE alarm signal will be generates; MANUAL STOP is
not limited by STATE ERROR (ON to OFF) and STATE ERROR
(OFF to ON).

(3) Continuous Mode of Electric Valve

Rising pulse of L1 (device-protection-off) can trigger output RV=1.

When device-protection-off command is triggered, RV command outputs 1 and


in running states, in addition, states bias from on to off generates. If device
close states (V1=0, V2=1) is feedback in RT time, output command RV is 0
and OC clears after confirmation.
830
APPENDIX 1 Function Block

L1=1

RT

L1 t

V1=0
V2=1

RV

OC

When device-protection-off command is triggered, RV command outputs 1 and


the in running states, in addition, states bias from on to off generates. If device
close states (V1=0, V2=1) is not feedback in RT time, output command RV is 0
and overtime signal CT generates, at the same time, OC and CT clears after
confirmation.
L1=1

RT

L1 t

RV

CT

OC

When device-protection-off command is triggered, RV command outputs 1 and


in running states, in addition, states bias from on to off generates. If device
close states (V1=0, V2=1) is not feedback in RT time, output command RV is 0
and overtime signal CT generates. If V1=0, V2=1 is feedback before
confirmation, CT clears but OC clears after confirmation.

831
APPENDIX 1 Function Block

L1=1

RT

L1 t

V1=0
V2=1

RV

CT

OC

Rising pulse of L2 (factory-protection-on), L6 (automatically on) or TP


(manually on) can trigger output DV=1.

When there is no states bias, open command will output L2, L6 or TP, DV=1.
If device on status is feedback in RT time (V1=0, V2=1), DV outputs 0.
L2=1

RT

L2 t

V1=0
V2=1

DV

When there is no states bias , open command willoutput (L2, L6 or TP), and
DV=1. If no on status feedback in RT time (V1=0, V2=1), DV =1 and running
overtime will generated. If V1=1, V2=0 after overtime or confirm the
operation, OT clears.

832
APPENDIX 1 Function Block

L2=1

RT

L2 t

V1=1
V2=0

DV

OT

L2=1 Confirmation

RT

L2 t

DV

OT

Rising pulse of L3 (factory-protection-off), L7 (automatically off) or TC


(automatically off) can trigger output RV=1.

When there is no states bias, close command will output (L3, L7 or TC), RV=1.
If no close feedback in RT time, RV=0, and V1=0, V2=1 after overtime or
confirmation operation, CT clears.

833
APPENDIX 1 Function Block

L2=1 Confirmation

RT

L2 t

DV

OT

L3=1 Confirmation

RT

RV

CT

(4) Electromagnetic Valve

Electromagnetic valve supports 7 input instructions: DEVICE PROTECTION


ON, SITE PROTECTION OFF, SITE PROTECTION ON, AUTO OFF, AUTO
ON, MANUAL OFF and MANUAL ON; it has only one output DV, and RV is in
invalid status. The DV determines Power On or Power Off status of the
electromagnetic valve. By the configuration, if OU is set to be not Selected, the
valve will be powered on when the DV=1; it will be powered off when DV=0. If
OU is set to be Selected, the valve will be powered on when the DV=0; it will
be powered off when the DV=1.

ON input instruction corresponds to ON output instruction (power on), and OFF


input instruction corresponds to OFF output instruction (power off).

If the position state feedback valve is in ON state, when Device Protection OFF
occurs, a Device Protection OFF triggering signal will be generated, and a
valve OFF instruction will be output. In addition, a STATE ERROR (ON to OFF)
signal will be created and keep.

In continuous mode the electromagnetic valve statues related to the


input/output instruction are similar to the motor under blocking mode.

2. Monitor Function
(1) Status deviation monitoring

When outputting on/off command, HSSCS5 module records the set state of
this command until the next command outputs. If the on/off location of device
differs from set status, state bias generates form on to off appears, which
834
APPENDIX 1 Function Block

keeps until it is confirmed. The type is as shown in the following table.

Table 1.3.1 Set status and the corresponding relationship between the
state deviation and feedback

Status Deviation Status Deviation


Position Status
Set Status
Feedback (On to Off) (On to Off)

On Not On 1 0

On Off 1 0

Off Not Off 0 1

Off On 0 1

State bias will generate in the following situations:

 When there is human operation or hard-manual is used in field,


resulting the motor state to be different from the record last
command, HSSCS5 module will generate state bias signal.

 When motor failure signal exists, if the motor is in running status, it


will trigger protection-off signal. At the same time, status bias
signal will appear.

 When device-protection-off is valid, if location feedback status is


ON, it will trigger device-protection-off signal. At the same time,
status bias signal will generate.

(2) Running Overtime Monitoring

If location status is not feedback in specified time after outputting command,


running overtime signals will generate and alarm signals will appear. Running
time can be configured in software or justified online, which is controlled by RT
signal and can be confirmed and cleared by manual switch or initial pulse.

(3) Position status feedback monitoring

 When on/off status feedbacks are same (for motor, only when the
feedbacks are 1), position status feedback error and alarm signals
will generate, then status bias and running overtime signals are
blocked.

 For motor and electromagnetic valve, when running monitoring


time has not been over, monitoring of position status feedback is
blocked. It means that double-signal position status feedback can
be used to set on and off status respectively.
835
APPENDIX 1 Function Block

(4) Command Block Monitoring

When command cannot be executed in the following situations, command


block signals will generate:

 For both manual on/off, automatically on/off command, two signals


with same priority but with different direction are inputted at the
same time.

 For both manual on/off, automatically on/off command, the


permission condition is not satisfied in command execution
direction.

Command block signals will be shield in the following situations:

 There is already position feedback signal in command direction.

 There is already the same command output in command direction.

 Confirm signals exist.

There will be no alarm information when command is blocked.

(5) Electrical Fault (electromotor)

The electrical fault signal of electromotor is generated by electrical protection.


If electrical fault signal exist:

 Output command DV or RV is aborted.

 Command memory is cleared.

 Status bias from on to off will generate if device is in running


status.

Alarm signal will generate if electrical fault signal exist.

(6) Signal Confirmation

The alarm signals such as status bias from on to off, status bias from off to on,
device protection off trigger, on-running overtime and off-running overtime is
confirmed once manual command is valid or the initial pulse is valid.

Initial pulse can confirm all the status. Manual ON command can confirm
status bias from OFF to ON, off running overtime, while Manual OFF command
can confirm status bias from on to off, on running overtime.

1.3.11 HSSSLAVE

836
APPENDIX 1 Function Block

Figure 1.3.11-1 HSSSLAVE

Alias

Servoamplifier

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 REAL Output of Controller 0.00 No

Position Feedback No
I2 REAL 0.00
Input

Output

DV BOOL Output 0 No

RV BOOL Inverse Output 0 No

Internal Parameters

Paramete
Data Type Description Initial Value Supplement Persistent
r

DI REAL Dead Band 0.00 Yes

Output Features

Condition Output Formula

I1(k )  I 2(k )  DI DV  1, RV  0

I1(k )  I 2(k )   DI DV  0, RV  1

837
APPENDIX 1 Function Block

 DI  I1(k )  I 2(k )  DI DV  0, RV  0

Description

This function block simulates hardware servoamplifier to implement direct


connection between DCS and the electrical actuators.

1.3.12 HSVALVE

Figure 1.3.12-1 HSVALVE

Alias

Control Gate Valve

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 REAL Output of Controller 0.00 No

OT REAL Position of Full Open 100.00 Yes

Position of Full Yes


OB REAL 0.00
Close

L0 BOOL Automatic Open 0 Yes

L1 BOOL Automatic Close 0 Yes

Output

DV BOOL Valve Open 0 No

RV BOOL Valve Close 0 No

838
APPENDIX 1 Function Block

Internal Parameters

Paramete Initial
Data Type Description Supplement Persistent
r Value

TP BOOL Manual Open 0 Yes

TC BOOL Manual Close 0 Yes

OL BOOL Indicator of Open Light 0 No

Device Indicator Red No


RL BOOL 0
Light

Indicator of Open No
OA BOOL 0
Arrow Blink

Device Indicator Red No


RF BOOL 0
Blink

CL BOOL Indicator of Close Light 0 No

Device Indicator No
GL BOOL 0
Green Light

Indicator of Close No
CA BOOL 0
Arrow Blink

Device Indicator No
GF BOOL 0
Green Blink

Output Features

Conditions Output Formula

I1  OT OL  1, RL  1

I1  OT OL  0, RL  0

839
APPENDIX 1 Function Block

I1  OB CL  0, GL  0

I1  OB CL  1, GL  1

DV  (TP or L0) and not OL, OA  RF  DV

RV  (TC or L1) and not CL, CA  GF  RV

Description

This function block is a typical sequential control device droved block, and it
can accomplish valve open/close control, limit protection logic, and alarm
handling automatically.

When OL=1 and RL=1, in this case if DV=1, it will be set to 0.

When CL=1 and GL=1, in this case if RV=1, it will be set to 0.

• This block doesn’t refer to interlock of Open/Close, please don’t send this
kind of instructions at same time!

1.3.13 HSVALVE5

Figure 1.3.13-1 HSVALVE5

Alias

Remote Regulating Gate Valve

Pins

Data Initial
Input Description Supplement Persistent
Type Value

ZT REAL Position Feedback Input 0.00 0-100% No

840
APPENDIX 1 Function Block

AO BOOL Automatic Open 0 Yes

AC BOOL Automatic Close 0 Yes

Output

DV BOOL Open Output 0 No

RV BOOL Close Output 0 No

Internal Parameters

Paramete Data Initial


Description Supplement Persistent
r Type Value

Analog control
QC BOOL Force 1 is invalid by Yes
QC=1.

OB REAL Full Open Position 1.0 0-100% Yes

OT REAL Full Close Position 98.0 0-100% Yes

DB REAL Dead Band 2.5 DB>=1 Yes

JC BOOL Overhaul 0 Yes

Manual Slowly
MO BOOL 0 (modified) Yes
Open Pulse

Manual Slowly
MC BOOL 0 (modified) Yes
Close Pulse

Manual Quickly
M1 BOOL 0 Yes
Open Pulse

Manual Quickly
M2 BOOL 0 Yes
Close Pulse

Valve Position
MS REAL 0 Yes
Instruction Setting

841
APPENDIX 1 Function Block

T1 REAL Pulse Width 250 In ms Yes

T2 REAL Pulse Interval 1500 In ms Yes

Pulse Time of
T3 REAL 1000 In ms Yes
Quick Open/Close

Analogue
control is invalid
when
MQ BOOL Force switch 1 Yes
MQ=1,MO and
MC have set
feature.

Output Features

Output Formula

DV  (M1 or MO or AO) and (not (M 2 or MC or AC)) and (not JC)

RV  (M 2 or MC or AC) and (not (M1 or MO or AO)) and (not JC)

Description

This function block will send fault signal when valve position feedback fault
occurs. In this case, analog operation is invalid and the block can be only
opened or closed by buttons on panel. When valve position feedback is in
normal, you can modify valve position instruction through keyboard and open
or close valve with forced operation button. The output will track valve position
feedback, if condition of automatic/manual open/close, prohibition of operation,
or actuator fault is met.

1.3.14 HSVMAN

842
APPENDIX 1 Function Block

Figure 1.3.14-1 HSVMAN

Alias

Self-Balancing Manual Operator

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN REAL Analog Input 0.00 No

Automatic
TA BOOL 0 Rising-Edge invalid Yes
Program Control

TM BOOL Forced Manual 0 Yes

TS BOOL Track 0 Yes

If there is no value for


Set Value of
TP REAL 0.00 TP, it can be connected No
Track
with FB

Position
FB REAL 0.00 Yes
Feedback Input

Upper Limit of
OT REAL 100 Yes
Output

Lower Limit of
OB REAL 0.00 Yes
Output

PV REAL Process Value 0.00 No

843
APPENDIX 1 Function Block

Output

AV REAL Output 0.00 Yes

0: Automatic
AM BOOL Mode 0 No
1: non-automatic

Output of Set For the set value of PID


SP REAL 0.00 Yes
Value block

YB REAL Offset Output 0.00 No

Internal Parameters

Para Data Initial


Description Supplement Persistent
meter Type Value

Given Upper
SU REAL 100 Yes
Limit

Given Lower
SD REAL 0.00 Yes
Limit

Offset Input Modifiable only within ±


BS REAL 0.00 Yes
from Panel 15

0: Not balancing.
YB  BS , AV  IN  YB b
y automatic mode;
YB  BS by manual
mode; there is
disturbance of YB by
disturbed switching.
MD BYTE Balancing Mode 0 Yes
1: Self-balancing.
YB  BS , AV  IN  YB b
y automatic mode;
SB  AV  IN , YB  0 by
manual mode, and it
implements
non-disturbed switching.

844
APPENDIX 1 Function Block

0: MAN

1: AUTO
RM USINT Work Mode 0 Yes
2: TRACK

3: Forced MAN

Output Features

Conditions
Output Formula Supplement
RM Mode

AM  1, SP  PV
0 MAN

AV (k )  IN (k )  YB
1 Auto
AM  0 If AV (k )  OT , AV (k )  OT

If AV (k )  OB , AV (k )  OB
AV (k )  TP
2 Track
AM  1, SP  PV

Force AM  1, SP  PV
3
MAN

Description

This function block enables the operator to set its output value directly and use
the output value to control the actuators, such as control valve, etc. It is usually
used with PID controller. This block can be set in four modes to output. In
manual mode, operator control the output value through operation panel; in
automatic mode, the output is calculated with input value IN; in track mode, the
output changes with the set value; in force manual mode, it can not switch to
the manual and automatic mode.

In Track mode, any other value assignment to RM is invalid. When TS


changes from 1 to 0, the block will be switched to the previous mode before
that. In order to avoid output disturbance, the PID block must also track the
output of this block.

In Force Manual mode, the block has the same functionality as it in Manual
845
APPENDIX 1 Function Block

mode, and can only be switched to Track mode.

In Manual mode, user can increase or decrease the output value through the
panel.

If neither Forced nor Track condition is met (FM=0 and TS=0), the block can be
switched to Automatic mode. In that mode, RM=1, and block can be switched
to other modes.

During mode switching, if the manual controller is switched from any other
mode to Manual (Force Manual) mode, the output will hold. If it is switched
from Manual mode to any other mode, it needs self-balancing to implement:
- MD=0 means Not Balancing. YB  BS , AV  IN  YB by automatic mode;
YB  BS by manual mode; there is disturbance of YB by disturbed switching.
- MD1 means Self-Balancing. YB  BS , AV  IN  YB by automatic mode;
SB  AV  IN , YB  0 by manual mode, and it implements non-disturbed
switching.
The output can change itself only within ±15.

The output value is limited between OT and OB. If AV goes above OT, it will be
reduced to OT. If AV goes below OB, it will be increased to OB.

• Here the internal logic relationship of the algorithm block is described. This
function block shall be used with the corresponding regulating template in
the monitoring layer. Please see appropriate instruction of the template for
the difference.

• Difference between Force Manual and Manual: In Force Manual mode, the
block can't be switched to Manual/Automatic mode. In Manual mode, the
block can be switched to Automatic mode. Force Manual and Manual are
two working modes. FM is the conditional switch for the former, and RM=3
is status indication, however RM can't be assigned to 3 directly. The
condition to work in Manual mode is RM=0.

• Relation between Automatic and Program Automatic: When the Program


Automatic switch changes from 0 to 1, the block will be set to Automatic
mode. Then it can be switched to any work mode. Program Automatic is a
one-off action of switching Program Control to Automatic.

1.3.15 HSVPID

846
APPENDIX 1 Function Block

Figure 1.3.15-1 HSVPID

Alias

Separation PID

Pins

Data Initial
Input Description Supplement Persistent
Type Value

SP REAL Set Value 0.00 Yes

PV REAL Process Value 0.00 Yes

Output
OC REAL 0.00 Yes
Compensation

Connects with PV
of secondary PID
TP REAL Track Point 0.00 No
or the output of
manual operator.

Connects with
status of manual
operator.
TS BOOL Track 0 Yes
0: Automatic

1: Track

PT REAL Proportional Band 100 In percentage (>0) Yes

TI REAL Integral Time 30 >0 Yes

847
APPENDIX 1 Function Block

Can be connected
with the
TISI BOOL Separation Input 0 Yes
separation output
of secondary PID.

Upper Limit of
OT REAL 100 Yes
Output

Lower Limit of
OB REAL 0.00 Yes
Output

Output

Output of Instruction
AV REAL 0 Yes
Switching On

Output by Integral
TISO BOOL 0 No
Separation

Internal Parameters

Paramet Data Initial Persist


Description Supplement
er Type Value ent

KD REAL Derivative Gain 30 >0 Yes

TD REAL Derivative Time 0 0 Yes

0: normal
AD UINT Integral Mode 0 Yes
1: reverse

Integral Separation
SV REAL
Value
100 Percentage (  0 ) Yes

DL REAL Alarm Limit of Bias 30 Percentage (  0 ) Yes

0: not track
TM BOOL Track Mode 0 Yes
1: track

SU REAL Set Upper Limit 1000000 Yes

848
APPENDIX 1 Function Block

SD REAL Set Lower Limit -100000 Yes

PT=PT+MPT
Correction of PT when
MPT REAL 1 after the Yes
integrator stops.
correction.

Coefficient of Fine
MK REAL 1 1  MK  0.1 Yes
Control Range

If ek  MKD  0
PT=PT*MK; if
MKD REAL Fine Control Range 100 Yes
ek  MKD PT
doesn’t change.

The change rate


Change Rate Limit of of SP for each
FA REAL 10 Yes
SP time should not
exceed FA.

DI REAL Dead Band of Bias 0.00 Absolute value Yes

Same dimension
OU REAL Output Change Rate 100 Yes
with MU and MD

CP REAL Operation Cycles 0.25 In seconds Yes

>0. the
MeK REAL Bias Gain 1 multiplication Yes
factor of bias.

Output Features

Conditions
Output Formula Supplement
TS Mode

du: proportional and integration


terms in this calculation (invalid
AV (k )  du  OC  du  dk by integral separation)
0 Auto
du · dk: derivative term in this
calculation

849
APPENDIX 1 Function Block

OC: output compensation term

1 Track AV  TP Only if TS=1

Description

This function block provides general-purpose PID control functions. This block
has 2 working modes: AUTO and TRACK. It also supports cascaded PID. In
order to avoid integral saturation, it separates the integral by too great bias or
exceeding output. When the integral of secondary controller is separated, the
primary controller can also separate its integral. The output compensation OC
can be used to implement feed-forward-control. With this new PID block, user
can implement various-proportion-control and various-integral-control.

The algorithm of this block seems like following:

 CP TD 
AV (k )  Mek  K P  E (k )   E (k )  (E (k ))
 TI CP 

E (k )  SP(k )  PV (k )
100
Kp 
PT
Where, E ( k )  E (k )  E (k  1)

In the formulas:

KP: proportional gain


PT: proportional band(%)
PV(k): process value (engineering unit)
SP(k): set value (engineering unit)
Mek: bias gain, equivalent to change coefficient
Its formula in frequency domain is:

1 K T  S
Y ( s)  Mek ( K P   d d )  E ( s)  FF ( s)
 In Auto mode: Ti  S Td  S  1

 In Track mode: Y ( s)  TP( s)

Y(s) is limited in [YH , YL] .

If there is input at OC, the AV(n) must be added the value of OC to


compensate it (feed-forward-control).

850
APPENDIX 1 Function Block

E (n)  SV
If or output exceeds limit, TISO=1. In this case, it is PD controller.
E (n)  SV
If and output stays under limit, TISO=0. In this case, it is PID
controller.

During mode switching, if it switched from any other mode to manual mode,
the output will hold. If it switched from manual mode to any other mode, it
calculates in new mode based on the last output.

Example

Single loop regulating

Figure 1.3.15-2 Single Loop Example of HVPID

Cascaded Loop

851
APPENDIX 1 Function Block

Figure 1.3.15-3 Cascaded Loop Example of HVPID

852
APPENDIX 1 Function Block

1.4 HS_AlmLimSec.lib
This library contains function blocks which are used to select signals, to
perform signal alarm, and to switch signal undisturbed.

1.4.1 AI_RED

Figure 1.4.1-1 Module AI_RED

Alias

Analog Input Alternative

Pins

Data Initial
Input Description Supplement Persistent
Type Value

I1 REAL Analog Input 1 0.00 No

I1 of the
A1 UINT corresponding 0 Yes
module address

I2 REAL Analog Input 2 0.00 No

I2 of the
A2 UINT corresponding 0 Yes
module address

Work Mode by 0:hold output


D UINT Fault of Both 0 1:select input 1 Yes
Modules 2:select input 2

Output

853
APPENDIX 1 Function Block

Hold last value


when both
O1 REAL Output 0.00 No
inputs broke
down.

0: nomal,
1: both
ALM BOOL Status Output 0 No
backplane
broke down

Output Features

Conditions Output Formula Supplement

D0 O1(k )  O1(k  1)

S1  0, S 2  0 D 1 O1(k )  I1(k )
ALM  1
D2 O1(k )  I 2(k )

S1  1, S 2  random O1(k )  I1(k ) ALM  0

S1  0, S 2  1 O1(k )  I 2(k ) ALM  0

Description

With calling HSDPGetSlaveState internally, this function block diagnoses the


status of the module, from which redundant input signals come, and decides
which signal to select. In the table “Output Features”, S1 and S2 mean the
module status. 1 is normal while 0 is fault.

• Configuration of attention please correct redundant signals in the module


address: the two numbers should be different.

Example

This block is normally used with the analog module for the selection of
redundant analog input signal. The following figure shows an example in case
of module FM148R. The function block H_E is used to data acquisition from

854
APPENDIX 1 Function Block

modules.

Figure 1.4.1-2 AI_RED Example

1.4.2 AI_Red_Sel

Figure 1.4.2-1 Module AI_Red_Sel

Alias

Redundant Analog Input Alternative

Pins

Input Data Type Description Initial Value Supplement Persistent

AI1 REAL Input 1 0.00 No

AI2 REAL Input 2 0.00 No

0:select Yes
Selection automatically
MAN BOOL 0
Mode 1:select
manually

855
APPENDIX 1 Function Block

Switch of Yes
0:select AI1
MAN12 BOOL Manual 0
1:select AI2
Selection

Output

O REAL Output 0.00 No

0: normal No
Fault 1: fault
ER UINT 0
Indications 2: select
manually

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

0:average
Select Work Mode
MD BYTE 0 1:select lowest Yes
Automatically
2:select highest

Module station
BD1 UINT 2 Yes
address of Tag 1

Module station
BD2 UINT 2 Yes
address of Tag 2

Relative Error Limit


error REAL 0.1 Yes
for Tag 1 and 2

Measuring Range
UP REAL 100 Yes
Upper Limit

Measuring Range
LO REAL 0.00 Yes
Lower Limit

AlarmUP REAL Alarm Upper Limit 0.00 Yes

AlarmLO REAL Alarm Lower Limit 0.00 Yes

856
APPENDIX 1 Function Block

Output Features

Conditions Output Formula Supplement

MD  0 O(k )  ( AI1(k )  AI 2(k )) / 2

Both O(k )  MIN ( AI1(k ), AI 2(k ))


signals MD  1 This block decides
are automatically,
normal. whether the signal
O(k )  MAX ( AI1(k ), AI 2(k )) is normal. It can
MD  2 ER  0 decide three type
MAN  0 faults: Module
Fault,
AI1 O(k )  AI 2(k ) Over-Amplitude
One of fault
them and Deviation.
broke
down. AI 2 O(k )  AI1(k )
fault

Both broke O(k )  O(k  1) ER  1


down.

MAN12  0
O(k )  AI1(k )
ER  2
MAN  1
MAN12  1
O(k )  AI 2(k )

Description

Through fault diagnosis and deviation monitoring, this function block can be
used to diagnose redundant analog signals and switch between them. It
selects automatically or manually one from two input signals as output,
according to their status and selection parameters.

With calling HSDPGetSlaveState internally, the block diagnoses the status of


the backplane, from which redundant signals come. The signal will be also
recognized as invalid, if its corresponding backplane is in fault (item “bactive”
is 1).

If an input exceeds the set upper or lower limit of its measuring range, that
means AI1( AI 2)  UP or AI1( AI 2)  LO , it will be diagnosed as invalid.

The block decides whether there is deviation between the two input signals,
AI1  AI 2  error  (UP  LO)
according to the expression . No deviation when
the result is 1, and yes by 0.
857
APPENDIX 1 Function Block

• By configuration, please notice to write the backplane ordinal of redundant


signal correctly: the two numbers should be different. That means, in order
to implement a real redundancy, the signals should come from two
separate acquisition modules.

Example

For some important physical objects in the field, it needs more than two
instruments to measure them, and this function block is normally used in this
case. The following figure shows the example of furnace pressure signal
alternative in a power station.

Figure 1.4.2-2 AI_RED_Sel Example

1.4.3 BOOL_RED

Figure 1.4.3-3 BOOL_RED

Alias

Redundant Digital Input Alternative

Pins

858
APPENDIX 1 Function Block

Initial
Input Data Type Description Supplement Persistent
Value

I1 BOOL Input 1 No

I1 of the
A1 UINT corresponding Yes
module address

I2 BOOL Input2 No

I2 of the
A2 UINT corresponding Yes
module address

Output when
both signals
broke down.
D UINT Yes
0: hold output
1: output I1
2: output I2

Output

O1 BOOL Output No

Status
0: normal
ALM BYTE 1: both No
backplanes
broke down

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

Output when at
least one signal
CHOOSE BOOL is normal. 0 Yes
0: I1
1: I2

859
APPENDIX 1 Function Block

Output Features

Conditions Output Formula Supplement

D0 O1(k )  O1(k  1)

S1  0, S 2  0 D 1 O1(k )  I1(k ) ALM  1

D2 O1(k )  I 2(k )

S1  1, S 2  0 O1(k )  I1(k )
ALM  0
S1  0, S 2  1 O1(k )  I 2(k )

Description

This function block selects one of the two input signals as output automatically,
according to their status (S1 and S2 in the table “Output Features”, 1=normal
and 0=fault).

With calling HSDPGetSlaveState internally, the block diagnoses the status of


the backplane, from which the signals come. The signal will be also recognized
as invalid, if its corresponding backplane is in fault (item “bactive” is 1).

If I1 or I2 becomes from 1 to 0, it will be recognized as invalid.

If one input (e.g. I1) is normal and the current selected input (e.g. I2) is
broke-down, then the block selects I1 as new output, even though I2 becomes
normal later. I2 will be selected again, until I1 breaks down.

1.4.4 HSALARMSPARK

Figure 1.4.4-1 HSALARMSPARK

Alias

Alarm Blink

860
APPENDIX 1 Function Block

Pins

Input Data Type Description Initial Value Supplement Persistent

I1 BOOL Alarm Input 0 No

I2 BOOL Alarm Reset 0 No

Output

Alarm occured and No


O1 BOOL 0
confirmed

Alarm occured and No


O2 BOOL 0
not confirmed

Alarm restored No
O3 BOOL 0
and not confirmed

Output Features

Conditions Output Formula Supplement

I1(k )  1, I 2(k )  1 O1(k )  1, O2(k )  0, O3(k )  0

I1(k )  1, I 2(k )  0 O1(k )  0, O2(k )  1, O3(k )  0

I1(k  1)  1, I1(k )  0,
O1(k )  0, O2(k )  0, O3(k )  1
I 2(k )  I 2(k  1)  0

O3(k )  1, I 2(k )  1 O1(k )  0, O2(k )  0, O3(k )  0

Description

This function block is used to replace the conventional blink alarm devices in
power station. The following figure shows its logic diagram:

861
APPENDIX 1 Function Block

Figure 1.4.4-2 Logic Diagram of HSALARMSPARK

• In the field, O1 is usually indicated by red light and O2 by red blink, O3 by


yellow light.

1.4.5 HSALM_AM

Figure 1.4.5-1 HSALM_AM

Alias

Amplitude Alarm

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN REAL Input 0 No

862
APPENDIX 1 Function Block

Alarm Higher Upper


HH REAL 1E10 Yes
Limit

AH REAL Alarm Upper Limit 1E9 Yes

Alarm Lower Low


LL REAL -1E10 Yes
Limit

AL REAL Alarm Lower Limit -1E9 Yes

DI REAL Alarm Dead Band 1 Yes

Output

DV BOOL Alarm Output 0 Yes

0: No Alarm
1: AMHH
AM BYTE Alarm Status 0 2: AMH Yes
3: AML
4: AMLL

AMHH BOOL Over-HH-Limit Alarm 0 No

AMH BOOL Over-AH-Limit Alarm 0 No

AMLL BOOL Over-LL-Limit Alarm 0 No

AML BOOL Over-AL-Limit Alarm 0 No

Output Features

Conditions Output Formula Supplement

DV  1, AM  1, AMHH  1,
IN  HH HH Alarm
AMH  1, AMLL  0, AML  0
No alarm
last takt
DV  1, AM  2, AMHH  0,
AH  IN  HH AH Alarm
AMH  1, AMLL  0, AML  0

863
APPENDIX 1 Function Block

DV  1, AM  3, AMHH  0,
LL  IN  AL AL Alarm
AMH  0, AMLL  0, AML  1

DV  1, AM  4, AMHH  0,
IN  LL ALL Alarm
AMH  0, AMLL  1, AML  1

DV  0, AM  0, AMHH  0,
AL  IN  AH No Alarm
AMH  0, AMLL  0, AML  0

HH alarm occures
when IN  ( HH  DI ) .
AH alarm occures when
HH Alarm
( AH  DI )  IN  ( HH  DI ) .
The other cases of alarm please
see condition “No alarm last takt”.

AH alarm occures when


( AH  DI )  ( AL  DI ) .
AH Alarm The output of
The other cases of alarm please “No Alarm”
Alarm see condition “No alarm last takt”. and all kinds
occurred of alarm see
last takt AL alarm occures when condition “No
( AH  DI )  ( AL  DI ) . alarm last
AL Alarm takt”.
The other cases of alarm please
see condition “No alarm last takt”.

LL alarm occures
when IN  ( LL  DI ) .
AL alarm occures when
LL Alarm
( LL  DI )  IN  ( AL  DI ) .
The other cases of alarm please
see condition “No alarm last takt”.

Description

This function block is used to monitor over-amplitude of some physical objects.


From the table “Output Features” you can see that based on the alarm status
of last TAKT, this block classifies alarms in two cases to process.

864
APPENDIX 1 Function Block

 No alarm last TAKT


In this case, alarm dead band will not be considered. That means
alarm is triggered immediately once the input exceeds an alarm limit.

 Alarm occurred last TAKT


On the contrary to above, alarm status will be changed, until input
exceeds the dead band.

The pins indicate all kinds of necessary information. DV is the status of alarm:
1 means alarm occurred and 0 for no alarm. AM provides the alarm type.
AMHH to AML indicates it is in which alarm case.

• All alarm cases are exclusive with each other. No alarm can occur at same
time with another.

1.4.6 HSALM_DV

Figure 1.4.6-1 HSALM_DV

Alias

Deviation Alarm

Pins

Data Initial
Input Description Supplement Persistent
Type Value

I1 REAL Input 1 0.00 No

I2 REAL Input 2 0.00 No

HL REAL Positive Deviation Limit 1E9 Yes

LL REAL Negative Deviation Limit 1E9 Yes

865
APPENDIX 1 Function Block

Output

DV BOOL Alarm Output 0 No

Output Features

Conditions Output Formula Supplement

I1  I 2  HL or I1  I 2  LL DV  1

 LL  I1  I 2  HL DV  0

Description

This function block is used to estimate whether there is deviation between two
input signals. Alarm occurs when deviation exceeds the set limit.

Example

In the field, user applies this block to estimate whether the two from different
instruments redundant signals of one physical object is equal. Or, whether
there is bias between the set and feed-back value in a control loop.

1.4.7 HSALM_RT

Figure 1.4.7-1 HSALM_RT

Alias

Change Rate Alarm

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

Output

866
APPENDIX 1 Function Block

DV BOOL Alarm Output 0 Yes

Internal Parameters

Initial
Parameter Data Type Description Supplement Persistent
Value

Upper Limit of
HL REAL 1E9 Yes
Change Rate

DP DWORD Interval Cycles 0 0  DP  9 Yes

AP DWORD Over-Rate Cycles 10 Yes

LC DWORD Over-Rate Timer 0 No

Output Features

Conditions Output Formula Supplement

I1  I 2  HL or I1  I 2  LL DV  1

ABS ( IN (k )  IN[k  DP])  HL DV (k )  1, LC (k )  0


LC is a
counter
DV (k )  1,
LC (k )  AP variable.
ABS ( IN (k )  IN [k  DP])  HL, LC (k )  LC (k  1)
DV (k  1)  1
LC (k )  AP DV (k )  0, LC (k )  0

Description

This function block can measure the change rate of input signal and give out
alarm based on the result.

DP: the No. DP cycle before this cycle, or in another word, it’s the cycle
number of interval between the two compared inputs. By default, the input of
current cycle is compared with the one of last cycle, namely DP = 1.

AP: the number of over-rate cycles. After over-rate condition disappeared, the
program accumulates with a counter variable LC from 0. In each cycle, it will
867
APPENDIX 1 Function Block

increase by 1 if over-rate doesn’t occur. The alarm is deemed to disappear if


there is no over-rate to AP consecutive cycles, and DV will be reset to 0. The
schematic diagram is showed as Figure 1.4.7-2.

Figure 1.4.7-2 Schematic Diagram of Output Features for HSALM_RT

• By default, this block compares the values in adjacent cycles. After the
over-rate condition disappears, it will judge for additional 10 cycles; Alarm
will be cleared only if no more over-rate occurs in the 10 cycles. You can
set DP and AP values as required.

1.4.8 HSDIGSW

Figure 1.4.8-1 HSDIGSW

Alias

Digital Switch

868
APPENDIX 1 Function Block

Pins

Input Data Type Description Initial Value Supplement Persistent

I1 BOOL Input 1 0 No

I2 BOOL Input 2 0 No

1:select I1 Yes
SW BOOL Selection Switch 0
0:select I2

Output

DV BOOL Output 0 No

Output Features

Conditions Output Formula Supplement

SW  1 DV (k )  I1(k )

SW  2 DV (k )  I 2(k )

Description

This function block is used to switch between two digital inputs.

1.4.9 HSLIM_HL

Figure 1.4.9-1 HSLIM_HL

Alias

Amplitude Limit

Pins

869
APPENDIX 1 Function Block

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

HL REAL Upper Limit 0.00 Yes

LL REAL Lower Limit 0.00 Yes

Output

AV REAL Result 0.00 No

Error Indication
ER BOOL 0 No
of Over-Limit

Output Features

Conditions Output Formula Supplement

LL  IN (k )  HL AV (k )  IN (k ), ER(k )  0

IN (k )  HL AV (k )  HL, ER(k )  1

IN (k )  LL AV (k )  LL, ER(k )  1

Description

This function block can limit the input signal between preset upper and lower
limit before it provides the output. If the input is out of the amplitude, it will
provide an error indication. The schematic diagram is showed as followed:

870
APPENDIX 1 Function Block

Figure 1.4.9-2 Schematic Diagram of HSLIM_HL

1.4.10 HSLIM_RATE

Figure 1.4.10-1 HSLIM_RATE

Alias

Velocity Limit

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Input 0.00 No

HL REAL Positive Limit 0.00 HL  0 Yes

LL REAL Negative Limit 0.00 LL  0 Yes

871
APPENDIX 1 Function Block

Output

AV REAL Result 0.00 Yes

Output Features

Conditions Output Formula Supplement

IN (k )  AV (k  1)  HL AV (k )  AV (k  1)  HL

IN (k )  AV (k  1)   LL AV (k )  AV (k  1)  LL

 LL  IN (k )  AV (k  1)  HL AV (k )  IN (k )

Description

The rate limit (HSLIM_RATE) module limits the change rate of the input IN, so
that the change rate of output AV of the module is limited within the preset
range in each cycle. This block can be used in the control cases where sudden
change must be prevented.

It compares the current input IN with the output AV in the previous cycle, and
decides how much the output AV in the current cycle can change on the basis
of the output in the previous cycle, in accordance with the difference between
HL/LL. The following diagram describes the actions of the module against
input change:

Figure 1.4.10-2 Change Rate Limit Procedure of HSLIM_RATE

1.4.11 HSMEDSEL
872
APPENDIX 1 Function Block

Figure 1.4.11-1 HSMEDSEL

Alias

Triple Selection

Pins

Initial
Input Data Type Description Supplement Persistent
Value

X1 REAL Input 1 0.00 No

X1ALM BOOL Alarm of Input 1 0 Yes

X2 REAL Input 2 0.00 No

X2ALM BOOL Alarm of Input 2 0 Yes

X3 REAL Input 3 0.00 No

X3ALM BOOL Alarm of Input 3 0 Yes

MD BYTE Work Mode 0 s. Description Yes

DB REAL Deviation Limit 0.00 Yes

Output

AV REAL Current Output 0.00 Yes

Q1 BOOL Quality Output of X1 0 No

Q2 BOOL Quality Output of X2 0 No

873
APPENDIX 1 Function Block

Q3 BOOL Quality Output of X3 0 No

QQ BOOL Least one bad input 0 No

Q0 BOOL Three inputs all bad 0 No

874
APPENDIX 1 Function Block

Output Features

Conditions Output Formula Supplement

AV (k )  AV (k  1),
Three inputs are all bad. Q1(k )  Q 2(k )  Q3(k )  QQ( k )  Q0( k )  0

MD  4 AV (k )  X 1(k )

MD  4MD  5 AV (k )  X 2(k )

MD  6 AV (k )  X 3(k )

Only one good AV (k ) 


this good input. 1. Over-limit
input.
means that
the absolute
The difference
deviati between two
on inputs is
betwe greater than
The en two AV (k )  the average of the DB. E.g.:
Ther
re good two good inputs. X 1(k )  X 2(k )  DB
e is
is at inputs
at
leas is not
leas 2. Q1, Q2 and
t over-li
t Q3 is quality
one Tow mit.
one of X1, X2 and
goo
bad good X3.
d inputs. The
inp MD  4
inpu
ts. deviati 3. QQ is the
ut. on quality of
betwe inputs. If one
en two AV (k )  AV (k  1) input is bad,
good QQ is set to 1.
inputs 4. Q0 is the
is quality of
over-li AV (k ) .
mit.

Thre The MD  0 AV (k )  the middle value of


e deviati three inputs.
inpu on
ts betwe
MD  1 AV (k )  the average of three
are en any
inputs.
all two

875
APPENDIX 1 Function Block

goo inputs MD  2 AV (k )  the samllest value of


d. is not three inputs.
over-li
mit.
MD  3 AV (k )  the highest value of
three inputs.

The
deviati
on
betwe
en one
input
and
the
others
over-li AV (k )  the average of two
mit. inputs whose deviation is not
The over-limit. E.g.:
deviati AV (k )  ( X 1(k )  X 2(k ) / 2
on
betwe
en the
At other
least two
two inputs
inputs is not
whose over-li
deviati mit.
on is
over-li The
mit. deviati
on
betwe
en one
input
and
the AV (k )  the input whose
others deviation to the other two
is not inputs is not over-limit.. e.g.:
over-li AV (k )  X 3(k )
mit.
The
deviati
on
betwe
en the
other
two
876
APPENDIX 1 Function Block

inputs
is
over-li
mit.

The
deviati
on
betwe
en any AV (k )  AV (k  1)
two
inputs
is
over-li
mit.

Description

This function block compares the signals of three inputs and chooses one from
the signals automatically or calculates a value as the output in accordance with
signal quality and working mode. The quality of input signals of this module is
reflected at corresponding output pins. The work mode of MD is: 0-select
middle value; 1-select average; 2-select lowest; 3-select highest; 4-signal from
transmitter 1; 5- signal from transmitter 2; 6- signal from transmitter 3.

The block estimates the inputs quality firstly. If all inputs are bad, the output will
be hold, and their qualities will be bad. If at least one input is good, the output
is different according to the cases listed in the table above.

By the cases showed in the table “Output Features” that output quality is bad,
Q0 is 1, otherwise 0.

• This function block doesn't have signal quality estimation logic. User has to
estimate input signal quality through other logic and then connects the
processed quality signal to the corresponding quality input pins.

Example

877
APPENDIX 1 Function Block

Figure 1.4.11-2 Example of HSMEDSEL

The above diagram describes an example of using the module for selection of
the compensation of water level in steam drum. In this example, the three
quality inputs are connected to the outputs of other diagnosis function blocks.

1.4.12 HSSFT

Figure 1.4.12-1 HSSFT

Alias

Undisturbed Switch

Pins

Input Data Type Description Initial Value Supplement Persistent

I1 REAL Input 1 0.00 No

I2 REAL Input 2 0.00 No

878
APPENDIX 1 Function Block

SW BOOL Switcher 0 Yes

Output Change 0<RT<1, i.e.


RT REAL 1 Yes
Rate 1-100%

Output

AV REAL Output 0.00 Yes

Output Features

Conditions Output Formula Supplement

SW changed from 0 to 1 AV (k )  AV (k  1)  RT  ( I 2(k )  I1(k )) Until


and hold. AV (k )  I 2(k )

SW changed from 1 to 0 AV (k )  AV (k  1)  RT  ( I1(k )  I1(k )) Until


and hold AV (k )  I1(k )

Changing SW (k )  0 AV (k )  I1(k  1)
never
happend, or
changing SW (k )  1 AV (k )  I 2(k  1)
ended.

Description

This function block chooses output I1 or I2 in accordance with the status of the
switcher SW. The switching between the two values is done undisturbed.

If SW switched again before AV reaches to the target value, AV will be


calculated according to the formula in the table “Output Features” and
approaches to the other target value starting from the current value.

• If the tag name which representing the switcher is null, then AV (k )  I1(k ) .
The initial value of SW determines the first-run value of this block. If the
initial value is 0, then AV (0)  I1(0) , when the module runs for the first time,
otherwise AV (0)  I 2(0) .

879
APPENDIX 1 Function Block

1.5 HS_Special.lib
This library contains function blocks usually used in chemical industry for some
special technical processes. They can record fault and source cause, they can
also simulate access process and non-linear function.

1.5.1 HSAMEMORY

Figure 1.5.1-1 HSAMEMORY

Alias

Analog Memory

Pins

Initial
Input Data Type Description Supplement Persistent
Value

IN REAL Input 0.00 No

IC BOOL Increase Instruction 0 Yes

DC BOOL Decrease Instruction 0 Yes

0:set mode
SW BOOL Mode 0 Yes
1:track mode

SR REAL Set Change Rate 0.1 Yes

Output

AV REAL Output 0.00 Yes

Internal Parameters

881
APPENDIX 1 Function Block

Data Initial
Parameter Description Supplement Persistent
Type Value

IV WORD Initial Value 20 Yes

OT REAL Upper Limit of Output 100 Yes

OB REAL Lower Limit of Output 0 Yes

Output Features

Conditions Output Formula Supplement

SW  1 AV (k )  IN (k ),V 1(k )  0 V1 is a counter


variable.
TS is the sample cycle.
IC (k )  DC (k ) AV (k )  AV (k  1),V 1(k )  0
The “+” in “  ” means
increase operation to
SW  0 AV when IC  1 ; The
AV (k )  AV (k  1)  R  TS , “-” in “  ” means
IC (k )  DC (k )
V 1(k )  V 1(k  1)  1 Decrease operation to
AV when DC  1 .

Description

This function block is designed to control the increase/decrease of the output


based on the work mode. By track mode, the output is equal with the input; and
by set mode, the output is increased/decreased as required from input,
depending on IC and DC. The schematic logic is shown as Figure 1.5.1-2:

882
APPENDIX 1 Function Block

Figure 1.5.1-2 Schematic Logic of HSAMEMORY

What needs to notice, by set mode the change rate of output doesn’t reach the
set value immediately, but in IV sample cycles. The formula of change rate is
like following:

SR  V 1(k ) / IV if V 1(k )  IV


R 
 SR if V 1(k )  IV

If the calculated AV (k ) exceeds the limit OT or OB, one of the two limits will
be outputted as result.

1.5.2 HSBAL2

Figure 1.5.2-1 HSBAL2

Alias

Dual Balancer

Pins

Input Description
Data Initial Supplem Persisten

883
APPENDIX 1 Function Block

Type Value ent t

IN REAL Control Instruction 0.00 No

IOF REAL Offset 0.00 Yes

Z1 REAL Position Feedback of Vavle A 0.00 No

Z2 REAL Position Feedback of Vavle B 0.00 No

D1 BOOL Valve A in MANUAL Mode 0 Yes

D2 BOOL Valve B in MANUAL Mode 0 Yes

Output

O1 REAL Instruction for Valve A 0.00 No

O2 REAL Instruction for Valve B 0.00 No

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

HL REAL Positive Limit 0.00 Yes

LL REAL Negative Limit 0.00 Yes

OUTR REAL Change Rate Limit 0.00 Yes

Output Features

Conditions Output Formula Supplement

D1  1, D2  1 O1  Z1, O2  Z 2 Valve A and B are in


MANUAL mode.

D1  0, D2  1 O1  2  IN  Z 2, O2  Z 2 Valve A is in Auto
mode; B is in MANUAL
884
APPENDIX 1 Function Block

mode.

Valve A is in
D1  1, D2  0 O1  Z1, O2  2  IN  Z1 MANUNAL mode; B is
in Auto mode.

D1  0, D2  0 O1  IN  IOF , O2  IN  IOF Valve A and B are in


Auto mode.*1

*1: O1 and O2 in the formula are final valve aperture. During the regulating, the
change rates of O1 and O2 are limited by OUTR. In addition, the change rate
of IOF is limited by HL and LL.

Description

This function block is used to balance aperture of two control valves, so as to


meet variable field requirements without changing the total system output.

The change rates of O1 and O2 are limited by OUTR. The change rate of O1
OUTR  ( IOF  ( IN  ( IN  O1(k  1)))
doesn’t exceed , and the change rate of O2
OUTR  ( IOF  ( IN  ( IN  O 2(k  1)))
doesn’t exceed .

No sudden change of the offset IOF is permitted. It is limited by HL and LL. The
positive offset change of two adjacent cycles can't exceed HL, otherwise the
offset participating in the calculation in the current cycle will be the offset in the
previous cycle plus HL. The negative change of offset can't exceed LL,
otherwise the offset participating in the calculation in the current cycle will be
the offset in the previous cycle plus HL. The function block keeps the control in
that way, till the offset reaches to the preset value gradually.

Example

This function block is usually used with PID block and Manual Operator block.
The output AV of the PID is connected to IN of this block, and the two valve
position instruction pins of this block are connected to the IN pins of two
manual operators. The following diagram shows an example of application of
this block in furnace negative pressure control. When both manual operators
are in MANUAL mode, and the dual balancers and the PID controller are in
TRACK mode, the PID output IN  ( Z1  Z 2) / 2 . In other cases, the control is
carried out in accordance with the PID output pin IN.

885
APPENDIX 1 Function Block

Figure 1.5.2-2 Example of HSBAL2

1.5.3 HSCHARC1

Figure 1.5.3-1 HSCHARC1

Alias
886
APPENDIX 1 Function Block

Broken Line Function 1

Description

This function block has the same functionality with HSCHARC in


HS_MathLogic.lib. But in this block, the parameters PS, X and Y are changed
as input pins, so that they can be modified online.

1.5.4 HSSC

Figure 1.5.4-1 HSSC

Alias

First Fault 8

Pins

Initial
Input Data Type Description Supplement Persistent
Value

I1 BOOL Source Signal 1 0 No

I2 BOOL Source Signal 2 0 No

I3 BOOL Source Signal 3 0 No

I4 BOOL Source Signal 4 0 No

I5 BOOL Source Signal 5 0 No

I6 BOOL Source Signal 6 0 No

I7 BOOL Source Signal 7 0 No

887
APPENDIX 1 Function Block

I8 BOOL Reset 0 No

Output

O1 BOOL Fault Indication for I1 0 No

O2 BOOL Fault Indication for I2 0 No

O3 BOOL Fault Indication for I3 0 No

O4 BOOL Fault Indication for I4 0 No

O5 BOOL Fault Indication for I5 0 No

O6 BOOL Fault Indication for I6 0 No

O7 BOOL Fault Indication for I7 0 No

O8 BOOL General Fault Indication 0 Yes

Output Features

Conditions Output Formula Supplement

I1(k ) AND NOT ( I1(k 1)) AND NOT (O8) O1(k )  1, O8  1

I 2(k ) AND NOT ( I 2(k 1)) AND NOT (O8) O2(k )  1, O8  1

I 3(k ) AND NOT ( I 3(k 1)) AND NOT (O8) O3(k )  1, O8  1

I 4(k ) AND NOT ( I 4(k 1)) AND NOT (O8) O4(k )  1, O8  1

I 5(k ) AND NOT ( I 5(k 1)) AND NOT (O8) O5(k )  1, O8  1

I 6(k ) AND NOT ( I 6(k 1)) AND NOT (O8) O6(k )  1, O8  1

I 7(k ) AND NOT ( I 7(k 1)) AND NOT (O8) O7(k )  1, O8  1

888
APPENDIX 1 Function Block

O1(k )  O 2(k ) 
O3(k )  O 4(k ) 
I 8(k )  1
O5(k )  O6(k ) 
O7(k )  O8  0

Description

This function block is used to log faults and to analyze the cause of first fault. It
can perform fault monitoring for up to 7 signal sources.

As long as one of the monitored signal sources fails, the output O8 will be set
to 1. That indicates there is a fault. If several signals fail, this block can judge
which failed first, and sets the corresponding output to 1. The other fault
signals will not be logged. This function block holds in this status, till I8 is reset.
Then the block will detect fault signals again.

• If a group of signal sources failed, only two outputs of this block will be set
to 1: one is the fault indication corresponding to the fault signal that
occurred first; the other one is the general fault indication O8. When reset
pin I8 is set to 1, all output pins will be set to 0.

1.5.5 HSSC1

Figure 1.5.5-1 HSSC1

889
APPENDIX 1 Function Block

Alias

First Fault 16

Pins

Initial Supplem Persisten


Input Data Type Description
Value ent t

I1 BOOL Source Signal 1 0 No

I2 BOOL Source Signal 2 0 No

I3 BOOL Source Signal 3 0 No

I4 BOOL Source Signal 4 0 No

I5 BOOL Source Signal 5 0 No

I6 BOOL Source Signal 6 0 No

I7 BOOL Source Signal 7 0 No

I8 BOOL Source Signal 8 0 No

I9 BOOL Source Signal 9 0 No

I10 BOOL Source Signal 10 0 No

I11 BOOL Source Signal 11 0 No

I12 BOOL Source Signal 12 0 No

I13 BOOL Source Signal 13 0 No

I14 BOOL Source Signal 14 0 No

I15 BOOL Source Signal 15 0 No

I16 BOOL Reset 0 No

Output

890
APPENDIX 1 Function Block

O1 BOOL Fault Indication for I1 0 No

O2 BOOL Fault Indication for I2 0 No

O3 BOOL Fault Indication for I3 0 No

O4 BOOL Fault Indication for I4 0 No

O5 BOOL Fault Indication for I5 0 No

O6 BOOL Fault Indication for I6 0 No

O7 BOOL Fault Indication for I7 0 No

O8 BOOL Fault Indication for I8 0 No

O9 BOOL Fault Indication for I9 0 No

O10 BOOL Fault Indication for I10 0 No

O11 BOOL Fault Indication for I11 0 No

O12 BOOL Fault Indication for I12 0 No

O13 BOOL Fault Indication for I13 0 No

O14 BOOL Fault Indication for I14 0 No

O15 BOOL Fault Indication for I15 0 No

O16 BOOL General Fault Indication 0 Yes

Output Features

Conditions Output Formula Supplement

I1(k ) AND NOT ( I1(k  1)) AND NOT (O16) O1(k )  1, O16  1

I 2(k ) AND NOT ( I 2(k  1)) AND NOT (O16) O 2(k )  1, O16  1

891
APPENDIX 1 Function Block

I 3(k ) AND NOT ( I 3(k  1)) AND NOT (O16) O3(k )  1, O16  1

I 4(k ) AND NOT ( I 4(k  1)) AND NOT (O16) O 4(k )  1, O16  1

I 5(k ) AND NOT ( I 5(k  1)) AND NOT (O16) O5(k )  1, O16  1

I 6(k ) AND NOT ( I 6(k  1)) AND NOT (O16) O6(k )  1, O16  1

I 7(k ) AND NOT ( I 7(k  1)) AND NOT (O16) O7(k )  1, O16  1

I 8(k ) AND NOT ( I 8(k  1)) AND NOT (O16) O8(k )  1, O16  1

I 9(k ) AND NOT ( I 9(k  1)) AND NOT (O16) O9(k )  1, O16  1

I10(k ) AND NOT ( I10(k  1)) AND NOT (O16) O10(k )  1, O16  1

I11(k ) AND NOT ( I11(k  1)) AND NOT (O16) O11(k )  1, O16  1

I12(k ) AND NOT ( I12(k  1)) AND NOT (O16) O12(k )  1, O16  1

I13(k ) AND NOT ( I13(k  1)) AND NOT (O16) O13(k )  1, O16  1

I14(k ) AND NOT ( I14(k  1)) AND NOT (O16) O14(k )  1, O16  1

I15(k ) AND NOT ( I15(k  1)) AND NOT (O16) O15(k )  1, O16  1

O1(k )  O 2(k ) 
O3(k )  O 4(k ) 
O5(k )  O 6(k ) 
O 7(k )  O8(k ) 
I16(k )  1
O9(k )  O10(k ) 
O11(k )  O12(k ) 
O13(k )  O14(k ) 
O15(k )  O16  0

Description

892
APPENDIX 1 Function Block

This function block is used to log faults and to analyze the cause of first fault. It
can perform fault monitoring for up to 15 signal sources.

As long as one of the monitored signal sources fails, the output O16 will be set
to 1. That indicates there is a fault. If several signals fail, this block can judge
which failed first, and sets the corresponding output to 1. The other fault
signals will not be logged. This function block holds in this status, till I16 is
reset. Then the block will detect fault signals again.

• If a group of signal sources failed, only two outputs of this block will be set
to 1: one is the fault indication corresponding to the fault signal that
occurred first; the other one is the general fault indication O16. When reset
pin I16 is set to 1, all output pins will be set to 0.

Example

It can be used for equipment shutdown, furnace shutdown, and protection for
major equipments, in order to indicate the source cause of the protection
action, without analysis and checking.

1.5.6 HSSC2

893
APPENDIX 1 Function Block

Figure 1.5.6-1 HSSC2

Alias

First Fault 32

Pins

Initial Supplem Persisten


Input Data Type Description
Value ent t

I1 BOOL Source Signal 1 0 No

I2 BOOL Source Signal 2 0 No

I3 BOOL Source Signal 3 0 No

894
APPENDIX 1 Function Block

I4 BOOL Source Signal 4 0 No

I5 BOOL Source Signal 5 0 No

I6 BOOL Source Signal 6 0 No

I7 BOOL Source Signal 7 0 No

I8 BOOL Source Signal 8 0 No

I9 BOOL Source Signal 9 0 No

I10 BOOL Source Signal 10 0 No

I11 BOOL Source Signal 11 0 No

I12 BOOL Source Signal 12 0 No

I13 BOOL Source Signal 13 0 No

I14 BOOL Source Signal 14 0 No

I15 BOOL Source Signal 15 0 No

I16 BOOL Source Signal 16 0 No

I17 BOOL Source Signal 17 0 No

I18 BOOL Source Signal 18 0 No

I19 BOOL Source Signal 19 0 No

I20 BOOL Source Signal 20 0 No

I21 BOOL Source Signal 21 0 No

I22 BOOL Source Signal 22 0 No

I23 BOOL Source Signal 23 0 No

I24 BOOL Source Signal 24 0 No

895
APPENDIX 1 Function Block

I25 BOOL Source Signal 25 0 No

I26 BOOL Source Signal 26 0 No

I27 BOOL Source Signal 27 0 No

I28 BOOL Source Signal 28 0 No

I29 BOOL Source Signal 29 0 No

I30 BOOL Source Signal 30 0 No

I31 BOOL Source Signal 31 0 No

I32 BOOL Reset 0 No

Output

O1 BOOL Fault Indication for I1 0 No

O2 BOOL Fault Indication for I2 0 No

O3 BOOL Fault Indication for I3 0 No

O4 BOOL Fault Indication for I4 0 No

O5 BOOL Fault Indication for I5 0 No

O6 BOOL Fault Indication for I6 0 No

O7 BOOL Fault Indication for I7 0 No

O8 BOOL Fault Indication for I8 0 No

O9 BOOL Fault Indication for I9 0 No

O10 BOOL Fault Indication for I10 0 No

O11 BOOL Fault Indication for I11 0 No

O12 BOOL Fault Indication for I12 0 No

896
APPENDIX 1 Function Block

O13 BOOL Fault Indication for I13 0 No

O14 BOOL Fault Indication for I14 0 No

O15 BOOL Fault Indication for I15 0 No

O16 BOOL Fault Indication for I16 0 No

O17 BOOL Fault Indication for I17 0 No

O18 BOOL Fault Indication for I18 0 No

O19 BOOL Fault Indication for I19 0 No

O20 BOOL Fault Indication for I20 0 No

O21 BOOL Fault Indication for I21 0 No

O22 BOOL Fault Indication for I22 0 No

O23 BOOL Fault Indication for I23 0 No

O24 BOOL Fault Indication for I24 0 No

O25 BOOL Fault Indication for I25 0 No

O26 BOOL Fault Indication for I26 0 No

O27 BOOL Fault Indication for I27 0 No

O28 BOOL Fault Indication for I28 0 No

O29 BOOL Fault Indication for I29 0 No

O30 BOOL Fault Indication for I30 0 No

O31 BOOL Fault Indication for I31 0 No

O32 BOOL General Fault Indication 0 Yes

Output Features
897
APPENDIX 1 Function Block

Conditions Output Formula Supplement

I1(k ) AND NOT ( I1(k  1)) AND NOT (O32) O1(k )  1, O32  1

I 2(k ) AND NOT ( I 2(k  1)) AND NOT (O32) O2(k )  1, O32  1

I 3(k ) AND NOT ( I 3(k  1)) AND NOT (O32) O3(k )  1, O32  1

I 4(k ) AND NOT ( I 4(k  1)) AND NOT (O32) O4(k )  1, O32  1

I 5(k ) AND NOT ( I 5(k  1)) AND NOT (O32) O5(k )  1, O32  1

I 6(k ) AND NOT ( I 6(k  1)) AND NOT (O32) O6(k )  1, O32  1

I 7(k ) AND NOT ( I 7(k  1)) AND NOT (O32) O7(k )  1, O32  1

I 8(k ) AND NOT ( I 8(k  1)) AND NOT (O32) O8(k )  1, O32  1

I 9(k ) AND NOT ( I 9(k  1)) AND NOT (O32) O9(k )  1, O32  1

I10(k ) AND NOT ( I10(k  1)) AND NOT (O32) O10(k )  1, O32  1

I11(k ) AND NOT ( I11(k  1)) AND NOT (O32) O11(k )  1, O32  1

I12(k ) AND NOT ( I12(k  1)) AND NOT (O32) O12(k )  1, O32  1

I13(k ) AND NOT ( I13(k  1)) AND NOT (O32) O13(k )  1, O32  1

I14(k ) AND NOT ( I14(k  1)) AND NOT (O32) O14(k )  1, O32  1

I15(k ) AND NOT ( I15(k  1)) AND NOT (O32) O15(k )  1, O32  1

I16(k ) AND NOT ( I16(k  1)) AND NOT (O32) O16(k )  1, O32  1

I17(k ) AND NOT ( I17(k  1)) AND NOT (O32) O17(k )  1, O32  1

I18(k ) AND NOT ( I18(k  1)) AND NOT (O32) O18(k )  1, O32  1

898
APPENDIX 1 Function Block

I19(k ) AND NOT ( I19(k  1)) AND NOT (O32) O19(k )  1, O32  1

I 20(k ) AND NOT ( I 20(k  1)) AND NOT (O32) O20(k )  1, O32  1

I 21(k ) AND NOT ( I 21(k  1)) AND NOT (O32) O21(k )  1, O32  1

I 22(k ) AND NOT ( I 22(k  1)) AND NOT (O32) O22(k )  1, O32  1

I 23(k ) AND NOT ( I 23(k  1)) AND NOT (O32) O23(k )  1, O32  1

I 24(k ) AND NOT ( I 24(k  1)) AND NOT (O32) O24(k )  1, O32  1

I 25(k ) AND NOT ( I 25(k  1)) AND NOT (O32) O25(k )  1, O32  1

I 26(k ) AND NOT ( I 26(k  1)) AND NOT (O32) O26(k )  1, O32  1

I 27(k ) AND NOT ( I 27(k  1)) AND NOT (O32) O27(k )  1, O32  1

I 28(k ) AND NOT ( I 28(k  1)) AND NOT (O32) O28(k )  1, O32  1

I 29(k ) AND NOT ( I 29(k  1)) AND NOT (O32) O29(k )  1, O32  1

I 30(k ) AND NOT ( I 30(k  1)) AND NOT (O32) O30(k )  1, O32  1

I 31(k ) AND NOT ( I 31(k  1)) AND NOT (O32) O31(k )  1, O32  1

899
APPENDIX 1 Function Block

O1(k )  O 2(k ) 
O3(k )  O 4(k ) 
O5(k )  O 6(k ) 
O 7(k )  O8(k ) 
O9(k )  O10(k ) 
O11(k )  O12(k ) 
O13(k )  O14(k ) 
O15(k )  O16(k ) 
I 32(k )  1 O16(k )  O17(k ) 
O18(k )  O19(k ) 
O 20(k )  O 21(k ) 
O 22(k )  O 23(k ) 
O 24(k )  O 25(k ) 
O 26(k )  O 27(k ) 
O 28(k )  O 29(k ) 
O30(k )  O31(k ) 
O32  0

Description

This function block is used to log faults and to analyze the cause of first fault. It
can perform fault monitoring for up to 31 signal sources.

As long as one of the monitored signal sources fails, the output O32 will be set
to 1. That indicates there is a fault. If several signals fail, this block can judge
which failed first, and sets the corresponding output to 1. The other fault
signals will not be logged. This function block holds in this status, till I32 is
reset. Then the block will detect fault signals again.

• If a group of signal sources failed, only two outputs of this block will be set
to 1: one is the fault indication corresponding to the fault signal that
occurred first; the other one is the general fault indication O32. When reset
pin I32 is set to 1, all output pins will be set to 0.

900
APPENDIX 1 Function Block

1.6 HS_Cnvt.lib
This algorithm library contains algorithm of module input, module output,
thermal resistance and thermocouple, conversion algorithm among quantities,
electrical range, and code value.

The property PERSISTENT is set for each function block, shown as table
below:

History information
Function blocks Parameters modified online Summation
relevant to output

E_H MU、MD、UP、LO

ELC_E WG、MU、MD、BV

FM148F_H_E MU、MD、UF、LC

FM148F_H_ELC BV、UF

H_CT CP

A1、A2、SET、FT、OT、
H_CT_R
OB、CP

WG、MU、MD、BV、BS、
H_E
SQ、LC、OM、IV

H_E_S MU、MD、LC

H_ELC WG、BV

A1、A2、SET、FT、OT、
H_ELC_R
OB、TP、WG、BV、CP

H_PI WG、BV、Lim、RES AV

TP、WG、BS、LA、LB、
H_RTD
LC、LG

H_TC TP、CT、WG、BS、cycle、
901
APPENDIX 1 Function Block

FILTERTIME

1.6.1 E_H

Figure 1.6.1-1 E_H

Alias

Convert quantities to hexadecimal data

Pins

Initial
Input Data Type Description Supplement Persistent
Value

AV REAL quantities data 0 No

upper limit of
MU REAL 0 Yes
quantities range

lower limit of
MD REAL 0 Yes
quantities range

types of
MT EmBoard 0 No
output module

WG WORD module gain 0 No

optional upper
UP REAL limit of electrical 20 Yes
range

LO REAL optional lower 4 Yes


limit of electrical

902
APPENDIX 1 Function Block

range

Output

hexadecimal
WH WORD 0 No
data

Correct;

upper limit of
electrical range is
equal to or less than
lower limit;

upper limit of
quantities is equal
to or less than lower
limit;

ER BYTE error code 0 upper limit of No


custom electrical
range UP is greater
than upper limit of
module default
electrical range;

lower limit of
custom electrical
range LO is less
than the lower limit
of module default
electrical range

Description

1. Judge whether the input parameter is correct.


Judge the size relationship between UP and LO, MU and MD, UP and
default upper limit of electrical range, LO and default lower limit of
electrical range respectively. If they correspond with correct logical
relationship, the program keeps running; otherwise, ER reports error and
the program returns and stops.
2. Get default electrical range
Two situations for getting default electrical range: one is module of
multi-gain, get the range according to the gain; the other one is module of
single gain, the range is default as 4~20mA.

903
APPENDIX 1 Function Block

3. calculation of code value


On the basis of input quantities value MU and limit of quantities MD,
calculate code value WH corresponded with quantities.

1.6.2 ELC_E

Figure 1.6.2-1 ELC_E

Alias

Convert electrical signal to quantities

Pins

Data
Input Description Initial Value Supplement Persistent
Type

electrical
AI REAL 0 No
signal data

MT EmBoard module type 0 No

WG WORD module gain 0 Yes

upper limit of
MU REAL quantities 0 Yes
range

lower limit of
MD REAL quantities 0 Yes
range

electrical
BV BOOL 0 1-voltage , Yes
signal type
0-current

Output

904
APPENDIX 1 Function Block

output
AV REAL 0 No
quantities data

information 0-normal ,
ER BYTE 0 No
code 2-WG error

Description

1. Judge whether the module type is matching with gain of data tag.
If matching, keep running; otherwise, ER reports error, the program
returns and stops.
2. Calculation of quantities value AV.
On the basis of input signal AI, upper and lower limits of electrical range
get from module type and gain of data tag, upper and lower limits of
quantities range MU and MD, convert to quantities value - AV.

1.6.3 FM148F_H_E

Figure 1.6.3-1 FM148F_H_E

Alias

Convert hexadecimal data to quantities

Pins

Data Initial
Input Description Supplement Persistent
Type Value

WH WORD hexadecimal data 0 No

upper limit of quantities


MU REAL 0 Yes
range

lower limit of quantities


MD REAL 0 Yes
range

905
APPENDIX 1 Function Block

UF BOOL over range or not 0 Yes

Output

AV REAL Quantities data 0 No

0- normal

3- out of
range
ER BYTE information code 0 No
4- small
signal
resection

Internal Parameters

Data
Parameter Description Initial value Supplement Persistent
type

resection of the unit is


LC REAL small signal 0 percentage Yes
limit of the range

Description

Convert hexadecimal data to quantities data, which is only suitable for


FM148F.

1. Normal calculation
Get output quantities AV on the basis of WH, MU, and ML.
2. Judge out of range or not
If it is out of range, the output AV is the value of last cycle adding full
quantities range.
3. Small signal resection
Judge AV for small signal resection or not When the limit of small signal
resection - LC is not 0. If it is small signal, output 0.

1.6.4 FM148F_H_ELC

906
APPENDIX 1 Function Block

Figure 1.6.4-1 FM148F_H_ELC

Alias

Convert hexadecimal data to electrical signal

Pins

Data Initial
Input Description Supplement Persistent
Type Value

hexadecimal
WH WORD 0 No
data

WG WORD module gain 0 No

electrical
BV BOOL 0 1-voltage,0-current Yes
signal type

Out of range
UF BOOL 0 Yes
or not

Output

data of
AV REAL electrical 0 No
range

normal
information
ER BYTE 0 2-WG error No
code
3- out of range

Description

Convert hexadecimal data to electrical signal data, which is only suitable for
FM148F.

907
APPENDIX 1 Function Block

1. Normal calculation
Get electrical signal AV, which is corresponded with WH, on the basis of
code value WH, module type MT, upper and lower limits of electrical range
get from WG.
2. Judge out of range or not
If it is out of range, AV is value of last cycle adding upper limit of electrical
range.

1.6.5 H_CT

Figure 1.6.5-1 H_CT

Alias

Specified compensation of thermocouple cold junction Compensation

Pins

Data
Input Description Initial Value Supplement Persistent
Type

code value
captured
WH WORD from 16340 No
hardware
module

Output

temperature
AV REAL value of cold 0 No
junction

Resistance of
AR REAL Cu50 at cold 0 No
junction

Internal Parameters

908
APPENDIX 1 Function Block

Data
Parameter Description Initial value Supplement Persistent
type

Value of
CP REAL temperature -1.3 Yes
compensation

Description

Calculate the temperature value of cold junction according to code value get
from module.

Get resistance of Cu50 – AR from WH, and according to AR and value of


temperature compensation, get temperature value by looking up the table.

1.6.6 H_CT_R

Figure 1.6.6-1 H_CT_R

Alias

Cold junction compensation

Pins

Data
Input Description Initial Value Supplement Persistent
Type

code value
captured in
WH1 WORD 16340 No
hardware
module A

module number
A1 BYTE 0 Yes
that module A in

code value
WH2 WORD in 16340 No
captured
hardware

909
APPENDIX 1 Function Block

module B

module number
A2 BYTE 0 Yes
that module B in

Output

temperature
AV REAL value of cold 0 No
junction

0-alarm
free
1-module A
broken
ALM BYTE alarm 0 2-module B No
broken
3-two
modules
broken

0-non
output
output of
1-module A
MC BYTE module 0 No
output
selection
2- module B
output

Internal Parameters

Data
Parameter Description Initial value Supplement Persistent
type

temperature
CP REAL compensation -1.3 Yes
value

default
SET INT 25 Yes
temperature

unit:
FT BYTE filtering factor 10 Yes
second

910
APPENDIX 1 Function Block

judge upper
OT INT quality limit of 40 unit: degree Yes
output value

judge lower
OB INT quality limit of 5 unit: degree Yes
output value

Description

Selection functional block of cold junction compensation redundancy (H_CT_R)


is used for dealing with analog signal which is captured from two hardware
blocks as compensation temperature of cold junction. After scale conversion,
quality judge, alarm setting and output non-disturbed switch, output the results
– quantities value, quality information of the quantities, and module block
selection value. This functional block judges whether the two redundant
temperature signals out of limit or not, and select outputting a temperature
value or default temperature value as compensation temperature of cold
conjunction.

This module is frequently used for dealing with signal of redundant


temperature compensation in thermocouple series module FM147A
transferred from FM192B-CC.

1. Referring to status of module A and B, input signal quality, module


selection mark and default temperature value, output temperature of
cold junction.
When the status of two modules is good: if the input signal quality of
selected module is good, output temperature signal value of selected
module; check the other quality of input signal if input signal quality of the
selected module is fault, if it is good, output the value from the other
module, otherwise, output set value – SET.
When outputting, if selecting signal value of module A as output, MC=1; if
selecting signal value of module B as output, MC=2; if selecting default as
output, MC=0.
2. Referring to status of module A and B, input signal quality, output alarm
message – ALM.
3. Non-disturbed switch
If the selected output module of last cycle is not corresponding with
selected output module of current cycle, on the basis of filtering factor FT,
non-disturbed switch between input signals of two modules and assign to
output AV.

1.6.7 H_E
911
APPENDIX 1 Function Block

Figure 1.6.7-1 H_E

Alias

Signal conversion module of input analog

Pins

Data
Input Description Initial Value Supplement Persistent
Type

MT EmBoard module types 0 No

hexadecimal
WH WORD 0 No
data

WG WORD module gain 0 Yes

upper limit of
MU REAL quantities 0 Yes
range

lower limit of
MD REAL quantities 0 Yes
range

types of
1-voltage
BV BOOL electrical 0 Yes
0-current
signal

Output

quantities
AV REAL 0 No
data

255-fault;
information
ER BYTE 0 No
code convert
normally II,
912
APPENDIX 1 Function Block

zoom the
range by
proportion;

convert
normally II;

root
conversion,
small signal
resection ,
output
retaining;

extract
conversion,
small signal
resection ,
output initial
value;

Root
conversion
normally.

Internal Parameters

Data
Parameters Description Initial value Supplement Persistent
type

BS REAL offset 0 Yes

extract 1-extract
SQ BOOL 0 Yes
option 0-no extract

Percentage of
signal value/full
resection range must be
LC REAL of small 0.02 positive. When Yes
signal limit input value <
percentage*range,
stop extraction.

output form
1-retain
OM BYTE after 0 Yes
0-output IV
resection
of small

913
APPENDIX 1 Function Block

signal

output
initial value
after
IV REAL 0 Yes
resection
of small
signal

Description

Functional block of analog input (H_E) is used for analog signal captured from
single channel of hardware module. After scale conversion, alarm setting,
and quality judge for the signal, output results – quantities value and quality
message of the quantities.

1. Calculate normally
On the basis of module type MT, gain WG, code value WH and upper and
lower limit of quantities, calculate the quantities value corresponded with
WH.
2. Extracting
Judge whether extracting a root on the basis of SQ.
3. Resection of small signal
If the resection of small signal limit LC is not 0, and the signal is within limit
of small signal, cut off the signal, then output value of last cycle or initial
value IV as value of AV, on the basis of OM.

1.6.8 H_E_S

Figure 1.6.8-1 H_E_S

Alias

Convert hexadecimal data to quantities

Pins

914
APPENDIX 1 Function Block

Data
Input Description Initial Value Supplement Persistent
Type

module types
MT EmBoard of hardware 0 No
module

hexadecimal
WH WORD 0 No
data

upper limit of
MU REAL quantities 0 Yes
range

lower limit of
MD REAL quantities 0 Yes
range

Output

output
AV REAL quantities 0 No
data

0-normal
information 4-resection
ER BYTE 0 No
code of small
signal

Internal Parameters

Data
Parameters Description Initial value Supplement Persistent
type

resection of
LC REAL small signal 0.02 Yes
limit

Description

Linear convert input hexadecimal data of analog – WH (0-65535) to quantities


– (MD-MU).

915
APPENDIX 1 Function Block

1. Calculate normally
On the basis of input hexadecimal data of analog – WH (0-65535), upper
and lower limit of quantities MU and ML, Linear convert WH to quantities
AV.
2. Resection of small signal
If the resection of small signal limit LC is not 0, and the signal is within limit
of small signal, cut off the small signal, otherwise, do not cut off the small
signal.

1.6.9 H_ELC

Figure 1.6.9-1 H_ELC

Alias

Convert hexadecimal data to electrical signal

Pins

Input Data Type Description Initial Value Supplement Persistent

module
MT emBoard 0 No
types

hexadecimal
WH WORD 0 No
data

WG WORD module gain 0 Yes

types of
1-voltage
BV BOOL electrical 0 Yes
0-current
signal

Output

electrical unit: mV or
AV REAL 0 No
range data A

916
APPENDIX 1 Function Block

information 0-normal
ER BYTE 0 No
code 2-WG error

Description

Convert hexadecimal code value to electrical range data.

1. Calculate normally
On the basis of module type MT, upper and lower limit of electrical range
from gain of data tag WG, and code value WH, calculate and output
electrical signal AV.
2. Error processing
Judge MT is matching with WG or not, if not, return without calculation,
and ER=2.

1.6.10 H_ELC_R

Figure 1.6.10-1 H_ELC_R

Alias

Cold junction compensation

Pins

Data
Input Description Initial Value Supplement Persistent
Type

Acquisition code
WH1 WORD value of module 16340 No
A

station address
A1 BYTE 0 Yes
of Module A

917
APPENDIX 1 Function Block

Acquisition code
WH2 WORD value of module 16340 No
B

station address
A2 BYTE 0 Yes
of Module B

Output

output
temperature electrical
AV REAL value of cold 0 range data, No
junction unit: mV or
A

0-alarm
free
1-module A
broken
ALM BYTE alarm 0 2-module B No
broken
3-two
modules
broken

0-non
output
output of
1-module A
MC BYTE module 0 No
output
selection
2- module B
output

Internal Parameters

Data Initial
Parameters Description Supplement Persistent
type value

temperature
CP REAL compensation -1.3 Yes
value

default
SET INT 25 Yes
temperature

918
APPENDIX 1 Function Block

unit:
FT BYTE filtering factor 10 Yes
second

Quality upper
OT INT limit judgment 40 unit: degree Yes
of output value

Quality lower
OB INT limit judgment 5 unit: degree Yes
of output value

input signal
TP EmTC K_TC Yes
type of analog

WG WORD gain of data tag 0 Yes

electrical signal 1-voltage


BV BOOL 0 Yes
type 0-current

Description

Selection functional block of cold junction compensation redundancy (H_CT_R)


is used for dealing with analog signal which is captured from two hardware
blocks as compensation temperature of cold junction. After scale conversion,
quality judge, alarm setting and output non-disturbed switch, output the results
– quantities value, quality information of the quantities, and module block
selection value. This functional block judges whether the two redundant
temperature signals out of limit or not, and select outputting a temperature
value or default temperature value as compensation temperature of cold
conjunction.

This module is frequently used for deal with signal of redundant temperature
compensation in thermocouple series module SM470 or SM471.

1. Referring to status of module A and B, input signal quality, module


selection mark and default temperature value, output temperature of
cold junction.
When the status of two modules is good: if the input signal quality of
selected module is good, output temperature signal value of selected
module; check the other quality of input signal if input signal quality of the
selected module is fault, if it is good, output the value from the other
module, otherwise, output set value – SET.
When outputting, if selecting signal value of module A as output, MC=1; if
selecting signal value of module B as output, MC=2; if selecting default as
output, MC=0.
919
APPENDIX 1 Function Block

2. Referring to status of module A and B, input signal quality, output alarm


message – ALM.
3. Non-disturbed switch
If the selected output module of last cycle is not corresponding with
selected output module of current cycle, on the basis of filtering factor FT,
non-disturbed switch between input signals of two modules and assign to
output AV.

1.6.11 H_PI

Figure 1.6.11-1 H_PI

Alias

Conversion module of pulse value

Pins

Input Data Type Description Initial Value Supplement Persistent

MT EmBoard module types 0 No

hexadecimal
WH WORD 0 No
data

pulse
WG WORD 0 Yes
equivalent

types of pulse 1-累积型


BV BOOL 0 Yes
signal 0-频率型

Output

AV REAL quantities data 0 Yes

information 0-correct
ER BYTE 0 No
code else-error

920
APPENDIX 1 Function Block

Internal Parameters

Data
Parameter Description Initial value Supplement Persistent
type

If the
difference of
sample
values in
adjacent cycle
limit value of
Lim WORD 10000 is greater Yes
sampling
than the limit
value, the
output will not
be
accumulated

reset button
under
RES BOOL accumulate 0 Yes
working
mode

Description

Functional block of pulse input (H_PI) is used for pulse signal captured from
single channel of hardware module. After scale conversion, and quality judge
for the signal, output results – quantities value and quality message of the
quantities.

1. Calculate normally
 Frequency type:

Calculate and output quantities data AV, on the basis of pulse signal type
BV, code value WH, and pulse equivalent WG.
 Summation type:

Calculate and output quantities data AV, on the basis of pulse signal type
BV, code value WH, pulse equivalent WG, and output of last cycle.
2. Reset
If it is summation type, when reset signal RES is effective, AV clearing
zero.

1.6.12 H_RTD

921
APPENDIX 1 Function Block

Figure 1.6.12-1 H_RTD

Alias

Conversion module of thermal resistance

Pins

Data
Input Description Initial Value Supplement Persistent
Type

MT EmBoard module types FM143 No

thermal
TP EmRTD resistance 0 Yes
signal types

hexadecimal
WH WORD 0 No
data

gain of data
WG WORD 8 Yes
tag

Output

output
AV REAL temperature 0 No
value

0-correct
ER BYTE information 0 2-WG error No
5-RTD type error

Internal Parameters

Data
Parameter Description Initial value Supplement Persistent
type

922
APPENDIX 1 Function Block

BS REAL offset 0 Yes

line
LA REAL 0 Yes
resistance A

line
LB REAL 0 Yes
resistance B

line
LC REAL 0 Yes
resistance C

bridge arm
LG REAL 50 Yes
resistance

Description

Convert hexadecimal data sampled from thermal resistance module to


corresponded temperature value.

1. Resistance obtain
If it is bridge thermal resistance module, on the basis of signal type TP,
line resistance LA, LB, and LC, bridge arm resistance LG, and reference
voltage, calculate the resistance corresponded with code value WH; if it is
thermal resistance module of constant flow source, on the basis of module
type MT, gain of data tag WG, and code value WH, calculate the
resistance.
2. Temperature obtain
Look up temperature AV in the table on the basis of signal type TP and
resistance.

1.6.13 H_TC

Figure 1.6.13-1 H_TC

Alias

Conversion module of thermocouple


923
APPENDIX 1 Function Block

Pins

Data Initial
Input Description Supplement Persistent
Type Value

MT EmBoard module types 0 No

signal type of
TP EmTC 0 Yes
thermocouple

0- no need for cold


temperature of
CT REAL 0 junction Yes
cold junction
compensation

hexadecimal
WH WORD 0 No
data

Output

output
AV REAL 0 No
temperature

0-correct
ER BYTE information code 0 2-WG error No
6-TC type error

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
type value

BS REAL offset 0 Yes

Cycle REAL operation cycle 0.25 unit: second Yes

filtering time of cold


FILTERTIME REAL 0 unit: second Yes
junction

Description

Functional block of thermocouple conversion module (H_TC) is used for digital


signal captured and converted from single channel of hardware module. After
filtering and cold junction compensation for the signal, output result –
temperature value of quantities.
924
APPENDIX 1 Function Block

1. Normal calculation
Get temperature AV corresponded with actual electrical signal by looking
up the table, on the basis of module type MT, upper and lower limit of
electrical range WG from gain of data tag, sampling code value WH,
signal type TP, and cold junction compensation.
2. Error reporting
Check whether module type MT is matching with gain of data tag WG, if
not, report ER=2, return without calculation.
3. Cold junction compensation
In calculating process, if cold junction compensation is needed – that is
CT is not equal to 0, calculate filtering factor on the basis of cycle and
FILTERTIME. And calculate filtered temperature of cold junction using
filtering factor

1.6.14 UpEnd
1.6.14.1 Function overview

In4~in1 form a 32-bit real by high to low order in module UpEnd.

Figure1.6.14-1 UpEnd

Alias

Convert quantities to hexadecimal data

Pins

Data
Input Description Initial Value Supplement Persistent
Type

In1 BYTE Input 1 0 No

In2 BYTE Input 2 0 No

In3 BYTE Input 3 0 No

In4 BYTE Input 4 0 No

925
APPENDIX 1 Function Block

Output

Out REAL Output port 0 No

Description

Obtain data address of type DWORD which is formed by input in1~in4, and
take the real variable “out” in the address.

926
APPENDIX 1 Function Block

1.7 SIMU_FOP.lib (simulation algorithm)


Functional block of simulation includes analog simulation and switching value
simulation.

The variables of PERSISTENT set in this library for each functional module are
shown in the table as below:

Functional Parameters modified History information relevant to


Summation
blocks online output

AIR_OPEN_CLOSE、
Simu_AO
SIMU_TC、SIMU_KG

R_F_SEL、TON_PT、
Simu_DO
TOF_PT

1.7.1 Simu_AO

Figure 1.7.1-1 SIMU_AO

Alias

Functional block of simulation for analog

Pins

Data Initial
Input Description Supplement Persistent
Type Value

pneumatic 0- air close


AIR_OPEN_CLOSE BOOL 1 Yes
selection switch 1- air open

simulating
IN_AO REAL controlled variable 0 0-100 No
of analog valve

927
APPENDIX 1 Function Block

First order inertia


SIMU_TC REAL time constant for 1 Yes
simulation object

First order inertia


proportional gain
SIMU_KG REAL 1 Yes
for simulation
object

Output

output value of
AV_D REAL 0 No
forward object

output value of
AV_R REAL 0 No
reverse object

Output Feature

Conditions Output formula

SIMU _ KG * TS * IN _ AO( K )  SIMU _ TC * AV _ D( K  1)


AV _ D 
SIMU _ TC  TS
AIR_OPEN_CLOSE=0
AV _ R  100  AV _ D

SIMU _ KG * TS * (100  IN _ AO( K ))  SIMU _ TC * AV _ D( K  1)


AV _ D 
SIMU _ TC  TS
AIR_OPEN_CLOSE=1
AV _ R  100  AV _ D

Description

Functional block of simulation for analog is normally used by connecting with


PID. Input IN_AO connects with output AV of PID, output AV_D or AV_R
connects with actual measured value of PID – PV.

On the basis of air open/air close characteristics (the value of


AIR_OPEN_CLOSE), controlled variable of analog valve IN_AO, inertance
time constant SIMU_TC, and proportional gain SIMU_KG, simulate output
AV_D or AV_R of controlled object, like valve and so on.

928
APPENDIX 1 Function Block

1.7.2 SIMU_DO

Figure 1.7.2-1 SIMU_DO

Alias

Functional block of switching value simulation

Pins

Data
Input Description Initial Value Supplement
Type

switch order selecting


R_F_SEL BOOL 0 Yes
switch

IN_DO BOOL simulating switch order 0 No

TON_PT TIME delay setting of open time T#2S Yes

TOF_PT TIME delay setting of close time T#2S Yes

Output

simulating status of switch


DL_OPEN BOOL 0 No
valve delaying open

simulating status of switch


DL_CLOSE BOOL 0 No
valve delaying close

Description

1. Detailed description
Functional block of simulation for switch valve is normally used by
connecting with functional blocks like sequential control. Switch order
output of sequential DV or RV connects with input port IN_DO of the
functional block; DL_OPEN and DL_CLOSE connects with input ports of
switch position feedback VI and V2 in sequential control.

929
APPENDIX 1 Function Block

On the basis of switch order selecting switch (the value of R_F_SEL),


simulated switch order IN_DO, and setting time of switch delay TON_PT
or TOF_PT, simulate the process of creating switch status feedback when
controlled object received switch order.
2. Sequence chart
The sequence chart is shown as below when R_F_SEL=0:

Figure 1.7.2-2 Sequence chart 1

The sequence chart is shown as below when R_F_SEL=1:

Figure 1.7.2-3 Sequence chart 2

930
APPENDIX 1 Function Block

1.8 Standard
1.8.1 RS

Figure 1.8.1-1 RS

Alias

Reset Prior Bistable Trigger

Pins

Input Data Type Description Initial value Supplement Persistent

SET BOOL Set Input 0 No

Reset
RESET1 BOOL 0 No
Input

Output

Q1 BOOL Output 0 Yes

Description

It realizes the function that reset prior RS trigger.

Its Truth Table is as follows.

RESET1 SET Q(n+1)


0 0 Q(n)
0 1 1
1 0 0
1 1 0

931
APPENDIX 1 Function Block

1.8.2 SEMA

Figure 1.8.2-1 SEMA

Alias

Break Signal Algorithm by Software

Pins

Input Data Type Description Initial Value Supplement Persistent

CLAIM BOOL Set Input 0 No

RESET1 BOOL Reset Input 0 No

Output

BUSY BOOL Output 0 No

Internal Parameters

Data Initial
Parameter Description Supplement Persistent
Type Value

X BOOL Initialization is FALSE 0 Yes

Description

Its truth table is as follows.

CLAIM RELEASE BUSY(n+1)


0 0 BUSY(n)
0 1 0
1 0 1

932
APPENDIX 1 Function Block

1 1 1

1.8.3 SR

Figure 1.8.3-1 SR

Alias

Set Prior Bistable Trigger

Pins

Input Data Type Description Initial Value Supplement Persistent

Reset
RESET BOOL 0 No
Input

SET1 BOOL Set Input 0 No

Output

Q1 BOOL Output 0 Yes

Description

It realizes the function that set prior RS trigger.

Its truth table is as follows.

RESET SET1 Q(n+1)


0 0 Q(n)
0 1 1
1 0 0
1 1 1

1.8.4 CTD
933
APPENDIX 1 Function Block

Figure 1.8.4-1 CTD

Alias

Counter of Decrease

Pins

Input Data Type Description Initial Value Supplement Persistent

Rising Edge
CD BOOL 0 No
Detection Pin

The variable
CV is initialized
LOAD BOOL 0 No
for PV when
LOAD is TRUE

PV WORD Set Value 0 Yes

Output

Q will output
Q BOOL TRUE when CV 1 No
is 0.

CV WORD Output Count 0 Yes

Internal Parameters

Parameter Data Type Description Initial Value Supplement Persistent

CD Detect
M BOOL 0 Yes
Variable

Description

934
APPENDIX 1 Function Block

It contains the functions which are used for initializing count value that equal to
0.If rising edge and count value are greater than 0,count value will decrease
one to output.

1.8.5 CTU

Figure 1.8.5-1 CTU

Alias

Counter of Increase

Pins

Input Data Type Description Initial Value Supplement Persistent

Rising Edge
CU BOOL 0 No
Detection Pin

The variable CV
is initialized for 0
RESET BOOL 0 No
when RESET is
TRUE

PV WORD Set Value 0 Yes

Output

When CV value
is greater than or
Q BOOL 1 No
equal to PV,Q will
output TRUE.

CV WORD Output Count 0 Yes

Internal Parameters

935
APPENDIX 1 Function Block

Data Initial Supplement


Parameter Description Persistent
Type Value

M BOOL CU Detect Variable 0 Yes

Description

It contains the functions which are used for initializing count value that equal to
0.If rising edge and count value are greater than 0,count value will decrease
one to output.

1.8.6 CTUD

Figure 1.8.6-1 CTUD

Alias

Counter of Increase and Decrease

Pins

Data Initial
Input Description Supplement Persistent
Type Value

Rising Edge Detection


CU BOOL 0 No
Pin

Rising Edge Detection


CD BOOL 0 No
Pin

The variable CV is
initialized for PV when
RESET BOOL LOAD is TRUE;but 0 No
when RESET is also
TRUE,CV=0.

936
APPENDIX 1 Function Block

The variable CV is
initialized for PV when
LOAD BOOL LOAD is TRUE;but 0 No
when RESET is also
TRUE,CV=0.

PV WORD Set Value 0 Yes

Output

When CV value is
greater than or equal
QU BOOL 1 No
to PV,QU will output
TRUE.

When CV value is
QD BOOL equal to 0,QD will 1 No
output TRUE.

CV WORD Output Count 0 Yes

Internal Parameters

Parameter Data Type Description Initial Value Supplement Persistent

CU Detect
MU BOOL 0 Yes
Variable

CD Detect
MD BOOL 0 Yes
Variable

Description

It contains the functions which are used for initializing count value that equal to
set value, and for counting increase/decrease.

1.8.7 NetvarTON

937
APPENDIX 1 Function Block

Figure 1.8.7-1 NetVarTON

Alias

Network variables delay timer

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN BOOL Input 0 No

PT TIME Time to pass T#0S Yes

Output

Q BOOL Output 0 No

ET TIME Elapsed time T#0S Yes

Internal Parameters

Parameter Data Type Description Initial Value Supplement Persistent

M BOOL 0 Yes

StarTime TIME T#0S Yes

Description

Timer on delay. Q is TURE, PT millionseconds after IN had a rising edge.

1.8.8 RTC

938
APPENDIX 1 Function Block

Figure 1.8.8-1 RTC

Alias

Timing of algorithm set time

Pins

Input Data Type Description Initial Value Supplement Persistent

EN1 BOOL Enable Terminal 0 No

Controller
time when
PDT DT Set time first Yes
download
project

Output

Q BOOL Valid Identification 0 Yes

When EN is
FALSE ,output will
output
1970-01-01-00-00 DT#1970-0
CDT DT : 00 : 00;In 1-01-00:00: No
reverse,output 00
increase time in
accordance with
second for PDT.

Internal Parameters

Initial
Parameter Data Type Description Supplement Persistent
Value

M BOOL 0 Yes

939
APPENDIX 1 Function Block

DiffTime TIME T#0S Yes

Description

RTC module can record initial time only, and then accumulate by the running
cycle of RTS itself. Since the system timing is not considered, the function
cannot be used to get the controller time.

In use:

 If PTD is not assigned, and EN=TRUE, CDT is accumulated on the


base of controller time when first downloaded in initial download,
and new added CDT is accumulated on the base of
unperturbed .downloaded time if the project is downloaded.

 Set PTD time and EN=TRUE, CTD is accumulated on the base of


set time.

The example is as follows:

1.8.9 TOF

Figure 1.8.9-1 TOF

Alias

Delay Timer of Power Off

Pins

Input Data Type Description Initial Value Supplement Persistent

IN BOOL Input 0 No

940
APPENDIX 1 Function Block

PT TIME Delay Time T#0S Yes

Output

Q BOOL Output 0 Yes

ET TIME Time T#0S No

Internal Parameters

Parameter Data Type Description Initial Value Supplement Persistent

M BOOL 0 Yes

Start Time TIME T#0S Yes

Description

Close instruction of output is delayed.

Timing Diagram:

1.8.10 TON

Figure 1.8.10-1 TON

Function

Delay Timer of Power On

941
APPENDIX 1 Function Block

Pins

Input Data Type Description Initial Value Supplement Persistent

IN BOOL Input 0 No

PT TIME Delay Time T#0S Yes

Output

Q BOOL Output 0 Yes

ET TIME Time T#0S No

Internal Parameters

Parameter Data Type Description Initial Value Supplement Persistent

M BOOL 0 Yes

StarTime TIME T#0S Yes

Description

Open instruction of output is delayed.

Timing Diagram:

1.8.11 TP

942
APPENDIX 1 Function Block

Figure 1.8.11-1 TP

Alias

Ordinary Timer

Pins

Input Data Type Description Initial Value Supplement Persistent

IN BOOL Input 0 No

PT TIME Delay Time T#0S Yes

Output

Q BOOL Output 0 Yes

ET TIME Time T#0S No

Internal Parameters

Data
Parameter Description Initial Value Supplement Persistent
Type

StarTime TIME T#0S Yes

Description

There is the function of timing.

Timing Diagram:

943
APPENDIX 1 Function Block

1.8.12 F_TRIG

Figure 1.8.12-1 F_TRIG

Alias

Falling Edge Detect Trigger

Pins

Input Data Type Description Initial Value Supplement Persistent

CLK BOOL Input 1 No

Output

Q BOOL Output 0 No

Internal Parameters

Initial Supplement
Parameter Data Type Description Persistent
Value

M BOOL 1 Yes

Description

Input of falling edge is detected.

1.8.13 R_TRIG
944
APPENDIX 1 Function Block

Figure 1.8.13-1 R_TRIG

Alias

Rising Edge Detect Trigger

Pins

Input Data Type Description Initial Value Supplement Persistent

CLK BOOL Input 0 No

Output

Q BOOL Output 0 No

Internal Parameters

Parameter Data Type Description Initial Value Supplement Persistent

M BOOL 0 Yes

Description

Input of rising edge is detected.

1.8.14 CONCAT

Figure 1.8.14-1 CONTACT

Alias

Combine strings

945
APPENDIX 1 Function Block

Pins

Input Data Type Description

STR1 STRING String1

STR2 STRING String2

Output

Q BOOL Output is equal to “STR1 STR2”

Description

Combine two strings together, than output the combination of strings.

1.8.15 DELETE

Figure 1.8.15-1 DELETE

Alias

Detect characters of string

Pins

Input Data Type Description

STR STRING string

The number of the characters which will


LEN INT
deleted

The begin position in the string which will


POS INT
be deleted from and behind it

Output

946
APPENDIX 1 Function Block

DELETE STRING The deleted string

Description

Delete LEN characters of STR, beginning at the POS-th character position.


POS=1 is the first character.

1.8.16 FIND

Figure 1.8.16-1 FIND

Alias

Find designated string in a string

Pins

Input Data Type Description

STR1 STRING String1

STR2 STRING String2

Output

Find the character position of the beginning


of first occurrence of SRT2 in STR1, if no
FIND INT
occurrence of STR1 is finded, then the
result is 0

Description

Find STR2 in STR1.

1.8.17 INSERT

947
APPENDIX 1 Function Block

Figure 1.8.17-1 INSERT

Alias

Insert string

Pins

Input Data Type Description

STR1 STRING String1

STR2 STRING String2

POS INT Insert position

Output

Insert STR2 into STR1 after the POS-th


character position. POS=0, insert before
INSERT STRING the first character. POS=1, insert after the
first character. If POS is longer than STR1,
output STR1.

Description

Insert STR2 into STR1 at the designated position.

1.8.18 LEFT

Figure 1.8.18-1 LEFT

Alias

Get characters from the left of a string

948
APPENDIX 1 Function Block

Pins

Input Data Type Description

STR STRING string

The number of characters that will be fetch


SIZE INT
from STR

Output

LEFT STRING Return leftmost SIZE characters of STR

Description

Output the number of leftmost characters which is designated.

1.8.19 LEN

Figure 1.8.19-1 LEN

Alias

String length

Pins

Input Data Type Description

STR STRING string

Output

LEN INT Return the number of characters in STR

Description

Return the number of characters in STR.

949
APPENDIX 1 Function Block

1.8.20 MID

Figure 1.8.20-1 MID

Alias

Get characters in middle of a string

Pins

Input Data Type Description

STR STRING string

The number of characters that will be fetch


LEN INT
from STR

The begin position in the string which will


POS INT
be get from and behind it

Output

Return LEN characters of STR, beginning


MID STRING
at the POS-th character position.

Description

Get designated number of characters from designated position. POS=1 is the


first character.

1.8.21 REPLACE

Figure 1.8.21-1 REPLACE

950
APPENDIX 1 Function Block

Alias

Detect characters of string

Pins

Input Data Type Description

STR1 STRING string 1

STR2 STRING string 2

The number of characters that will be


L INT
replaced from STR1

P INT The replace position

Output

REPLACE STRING Replace L characters of STR1 by STR2

Description

Replace L characters of STR1 by STR2, starting at the POS-th character


position and return the new string. POS=1 is the first character.

1.8.22 RIGHT

Figure 1.8.22-1 RIGHT

Alias

Get characters from the right of a string

Pins

Input Data Type Description

STR STRING String

951
APPENDIX 1 Function Block

The number of characters that will be fetch


SIZE INT
from STR

Output

RIGHT STRING Return rightmose SIZE characters of STR

Description

Output the number of rightmost characters which is designated.

952
APPENDIX 1 Function Block

1.9 Util
1.9.1 HYSTERESIS

Figure 1.9.1-1 HYSTERESIS

Alias

Lag Processing Algorithm

Pins

Initial
Input Data Type Description Supplement Persistent
Value

IN INT Input Value 0 No

LOW INT Low threshold Value 0 Yes

HIGH INT High threshold Value 0 Yes

Output

OUT BOOL Output 0 Yes

Description

When input value is less than low limit value, output will be set to TRUE;

When input value is greater than high limit value, output will be set to TRUE;

When input value is between high and low limit value, output will be held.

1.9.2 LIMITALARM

953
APPENDIX 1 Function Block

Figure 1.9.2-1 LIMITALARM

Alias

Alarm Algorithm of Upper and Lower Limit

Pins

Input Data Type Description Initial Value Supplement Persistent

IN INT Input Value 0 No

LOW INT Low threshold Value 0 Yes

HIGH INT High threshold Value 0 Yes

Output

Input is greater than


O BOOL 0 No
high limit value

Input is less than low


U BOOL 0 No
limit value

Input is between
IL BOOL high and low limit 0 No
value

Description

When input value is less than low limit value, output U will be set to TRUE;

When input value is greater than high limit value, output 0 will be set to TRUE;

When input value is between high and low limit value, output IL will be set to
TRUE.

1.9.3 BCD_TO_INT

954
APPENDIX 1 Function Block

Figure 1.9.3-1 BCD_TO

Alias

BCD Code Convert to Integer Instruction

Description

The algorithm(BCD_TO_INT) require type of input value for BYTE, and output
value for INT. There is the following function:

 It completes transition of BCD code to integer value.

1.9.4 INT_TO_BCD

Figure 1.9.4-1 TO_BCD

Alias

Integer Convert to BCD Code Instruction

Description

The algorithm(INT_TO_BCD) require type of input value for INT, and output
value for BYTE. It completes transition of integer to BCD code.

1.9.5 BLINK

Figure 1.9.5-1 BLINK

Alias

Pulse Signal Generator

Pins

955
APPENDIX 1 Function Block

Data
Input Description Initial Value Supplement Persistent
Type

ENABLE BOOL Enable 0 Yes

Time of low
TIMELOW TIME T#0S Yes
level

Time of high
TIMEHIGH TIME T#0S Yes
level

Output

OUT Output BOOL 0 Yes

Description

Output high level in accordance with designated time;

Output low level in accordance with designated time.

1.9.6 GEN

Figure 1.9.6-1 GEN

Alias

Cycle Signal Generator

Pins

Initial
Input Data Type Description Supplement Persistent
Value

956
APPENDIX 1 Function Block

Selected Function
Type:

TRIANGLE

TRIANGLE_POS

MODE GEN_MODE SAWTOOTH_RISE 0 Yes


SAWTOOTH_FALL

RECEANGLE

SINUS

COSINUS

BASE BOOL Circulated Selection 0 Yes

Defined Cycle
PERIOD TIME T#1S Yes
Period

CYCLES INT 1000 Yes

AMPLIT Amplitude of
INT 0 Yes
UDE Function

Be re-set to 0 when
RESET BOOL 0 Yes
reset for 0

Output

OUT INT Output 0 Yes

Description

It can select type of cycle function, define functional cycle and amplitude.

1.9.7 PACK

957
APPENDIX 1 Function Block

Figure 1.9.7-1 PACK

Alias

Bit Integration Instruction

Pins

Input Data Type Description Initial Value Supplement

B0 BOOL 0

B1 BOOL 0

B2 BOOL 0

B3 BOOL 0
Input Variable for BOOL
B4 BOOL 0

B5 BOOL 0

B6 BOOL 0

B7 BOOL 0

PACK BYTE Output 0

Description

Eight BOOL variables of input will be packed to BYTE variable to output.

958
APPENDIX 1 Function Block

1.9.8 UNPACK

Figure 1.9.8-1 UNPACK

Alias

Bit Unpacked Instruction

Pins

Initial
Input Data Type Description Supplement Persistent
Value

Input Variable for


B BYTE 0 No
BYTE

Output

B0 BOOL 0 No

B1 BOOL 0 No

B2 BOOL 0 No

Output Variable for


B3 BOOL 0 No
BOOL

B4 BOOL 0 No

B5 BOOL 0 No

B6 BOOL 0 No

959
APPENDIX 1 Function Block

B7 BOOL 0 No

Description

BYTE variable will be divided into eight BOOL variables to output.

1.9.9 PUTBIT

Figure 1.9.9-1 PUTBIT

Alias

Bit Assignation Instruction

Pins

Initial
Input Data Type Description Supplement
Value

X DWORD Operated Variable 0

N BYTE Location 0

B BOOL Designated Value 0

Output

PUTBIT DWORD 0

Description

Designated value of input is set to designated value.

1.9.10 EXTRACT

960
APPENDIX 1 Function Block

Figure 1.9.10-1 EXTRACT

Alias

Bit Extracted Instruction

Pins

Input Data Type Description Initial Value Supplement

X DWORD Operated Variable 0

N BYTE Location 0

Output

EXTRACT BOOL Output 0

Description

Designated value of input is set to designated value.

1.9.11 PD

Figure 1.9.11-1 PD
961
APPENDIX 1 Function Block

Alias

Proportion Differential Controller

Pins

Data Initial Supplem


Input Description Persistent
Type Value ent

ACTUAL REAL Actual Value 0 No

SET_POINT REAL Set Value 0 No

KP REAL Scale Factor 0 Yes

TV REAL Differential Time 0 Yes

Output Y is equal
to input
Y_MANUAL REAL Y_MANUAL when 0 Yes
MANUAL for
TRUE.

Offset for
Y_OFFSET REAL manipulated 0 Yes
variable

Lower Limit for


Y_MIN REAL manipulated 0 Yes
variable

Upper Limit for


Y_MAX REAL manipulated 0 Yes
variable

Manual Operation
MANUAL BOOL 0 Yes
Switch

RESET BOOL Reset Signal 0 Yes

Output

Y REAL Output 0 Yes

962
APPENDIX 1 Function Block

Output exceed
LIMITS_ACTIVE BOOL mark of the upper 0 Yes
and lower limit

Description

Actual value of processing will be gradually close to set value in accordance


with scale factor 、differential time and offset.

PD will convert to proportional controller when the differential time for 0.

1.9.12 PID

Figure 1.9.12-1 PID

Alias

Proportion Integration Differentiation Controller

Pins

Data Initial Supplem


Input Description Persistent
Type Value ent

ACTUAL REAL Actual Value 0 No

SET_POINT REAL Set Value 0 No

963
APPENDIX 1 Function Block

KP REAL Scale Factor 0 Yes

TN REAL Integral Time 0 Yes

TV REAL Differential Time 0 Yes

Output Y is equal to
input Y_MANUAL
Y_MANUAL REAL 0 Yes
when MANUAL for
TRUE.

Offset for manipulated


Y_OFFSET REAL 0 Yes
variable

Lower Limit for


Y_MIN REAL 0 Yes
manipulated variable

Upper Limit for


Y_MAX REAL 0 Yes
manipulated variable

Manual Operation
MANUAL BOOL 0 Yes
Switch

RESET BOOL Reset Signal 0 Yes

Output

Y REAL Output 0 Yes

Output exceed mark of


LIMITS_ACT
BOOL the upper and lower 0 Yes
IVE
limit

When integral part


overflow that is TRUE,
OVERFLOW BOOL controller will pause to 0 Yes
wait for next initialized
activation.

Description

Actual value of processing will be gradually close to set value in accordance


with scale factor 、differential time and offset.

964
APPENDIX 1 Function Block

PID will convert to proportional controller when the differential time for 0.

1.9.13 PID_FIXCYCLE

Figure 1.9.13-1 PID_FIXCYCLE

Alias

Proportion Integration Differentiation Controller of Cycle Period

Pins

Data Initial Persist


Input Description Supplement
Type Value ent

ACTUAL REAL Actual Value 0 No

SET_POINT REAL Set Value 0 No

proportionality
KP REAL 0 Yes
constant

TN REAL Integral Time 0 Yes

TV REAL Differential Time 0 Yes

Output Y is equal
Y_MANUAL REAL to input 0 Yes
Y_MANUAL

965
APPENDIX 1 Function Block

when MANUAL
for TRUE.

Offset for
Y_OFFSET REAL manipulated 0 Yes
variable

Lower Limit for


Y_MIN REAL manipulated 0 Yes
variable

Upper Limit for


Y_MAX REAL manipulated 0 Yes
variable

TRUE: manual, Y is
not influenced by
Manual
MANUAL BOOL 0 controller. FALSE, Yes
Operation Switch
controller determines
Y.

Set Y output to
RESET BOOL Reset Signal 0 Y_OFFSET and reset Yes
integral part

CYCLE REAL Cycle Period 0 Yes

Output

Y REAL Output 0 Manipulated variable Yes

Output exceed TRUE, set value


LIMITS_ACT
BOOL mark of the upper 0 would exceed limits Yes
IVE
and lower limit Y_MIN or Y_MAX.

When integral
part overflow that
is TRUE,
OVERFLOW BOOL controller will 0 Yes
pause to wait
next initialized
activation.

Description
966
APPENDIX 1 Function Block

Actual value of processing will be gradually close to set value in accordance


with scale factor 、differential time and offset;

PID will convert to proportional integral controller when the differential time for
0;

Cycle period is set by input parameter rather than internal function with
automatic.

1.9.14 CHARCURVE

Figure 1.9.14-1 CHARCURVE

Alias

Curve Algorithm

Pins

Input Data Type Description Initial Value Supplement Persistent

IN INT Operated Variable 0 No

Tag Number of
N BYTE 0 Yes
characteristic curve

Output

Value after
OUT INT 0 Yes
Operated

ERR BYTE Error Info 0 No

Internal Parameters

Parameter Data Type Description Initial Value Persistent

PX ARRAY[0..10] X axle point range of 0 Yes

967
APPENDIX 1 Function Block

OF DINT characteristic curve

ARRAY[0..10] Y axle point range of


PY 0 Yes
OF DINT characteristic curve

Description

Beforehand function value is gradually displayed.

IN is the integer which input operational value .N is the byte which decided tag
number of characteristic curve and its range : 2=<N<=11.It generate a
characteristic row in array PX[0..10] and PY[0..10] for DINT. The variable OUT
of integer is operated value. The variable ERR of byte output error information.

1.9.15 RAMP_INT

Figure 1.9.15-1 RAMP_INT

Alias

Rate-limiting Algorithm of Integer

Pins

Data Initial Suppl


Input Description Persistent
Type Value ement

IN INT Operated Variable 0 No

Maximum Rising
ASCEND INT Value within 0 Yes
Interval of Time

Maximum Falling
DESCEND INT Value within 0 Yes
Interval of Time

968
APPENDIX 1 Function Block

TIMEBASE TIME Time Interval T#0S Yes

RESET BOOL Restart Signal 0 Yes

Output

Value through
OUT INT 0 Yes
Rising and Falling

Description

The rising and falling of given function value for integer is limited.

Input contains three integer value, such as IN、ASCEND and DESCEND.IN is


the input of function; ASCEND and DESCEND is maximum increase and
decrease value in time interval, which define from TIMEBASE of TIME type.
RESET is set to TRUE to make RAMP_INT to reinitialize. Output is integer
which is function value through rising and falling limit. When TIMEBASE is set
to t#0s, ASCEND and DESCEND has nothing to do with the time interval.

1.9.16 RAMP_REAL

Figure 1.9.16-1 RAMP_REAL

Alias

Rate-limiting Algorithm of Real

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN REAL Operated Variable 0 No

969
APPENDIX 1 Function Block

Maximum Rising
ASCEND REAL Value within Interval 0 Yes
of Time

Maximum Falling
DESCEND REAL Value within Interval 0 Yes
of Time

TIMEBASE TIME Time Interval T#0S Yes

RESET BOOL Restart Signal 0 Yes

Output

Value through
OUT REAL 0 Yes
Rising and Falling

Description

The rising and falling of given function value for real is limited.

Input contains three real value, such as IN、ASCEND and DESCEND.IN is the
input of function; ASCEND and DESCEND is maximum increase and decrease
value in time interval, which define from TIMEBASE of TIME type. RESET is
set to TRUE to make RAMP_INT to reinitialize. Output is integer which is
function value through rising and falling limit. When TIMEBASE is set to t#0s,
ASCEND and DESCEND has nothing to do with the time interval

1.9.17 DERIVATIVE

Figure 1.9.17-1 DERIVATIVE

Alias

Differential Algorithm

Pins

970
APPENDIX 1 Function Block

Data
Input Description Initial Value Supplement Persistent
Type

IN REAL Input Variable 0 No

TM DWORD Time Constant 0 Yes

RESET BOOL Restart Signal 0 Yes

Output

Approximate
OUT REAL 0 Yes
Differential value

Description

It approximately solve differentiation of the input function.

1.9.18 INTEGRAL

Figure 1.9.18-1 INTEGRAL

Alias

Integral Algorithm

Pins

Initial
Input Data Type Description Supplement Persistent
Value

Input
IN REAL 0 No
Variable

Time
TM DWORD 0 Yes
Constant

971
APPENDIX 1 Function Block

Restart
RESET BOOL 0 Yes
Signal

Output

Approximate
OUT REAL 0 Yes
Integral value

Overflow
OVERFLOW BOOL 0 Yes
Mark

Description

It approximately solve integration of the input function.

1.9.19 STATISTICS_INT

Figure 1.9.19-1 STATISTICS_INT

Alias

Statistic Algorithm of Integer

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN INT Operated Variable 0 No

RESET BOOL Initialize 0 Yes

Output

MN INT Output Minimum 32767 Yes

972
APPENDIX 1 Function Block

MX INT Output Maximum -32768 Yes

Output Average
AVG INT 0 No
Value

Description

It can calculate minimum, maximum and average value.

1.9.20 STATISTICS_REAL

Figure 1.9.20-1 STATISTICS_REAL

Alias

Statistic Algorithm of Real

Pins

Data Initial
Input Description Supplement Persistent
Type Value

IN REAL Operated Variable 0 No

RESET BOOL Initialize 0 Yes

Output

MN REAL Output Minimum 3E+38 Yes

MX REAL Output Maximum 1E-37- Yes

AVG REAL Output Average Value 0 Yes

Description

973
APPENDIX 1 Function Block

It can calculate minimum 、maximum and average value.

1.9.21 VARIANCE

Figure 1.9.21-1 VARIANCE

Alias

Square Deviation Algorithm

Pins

Input Data Type Description Initial Value Supplement Persistent

IN REAL Operated Variable 0 No

RESET BOOL Initialize 0 Yes

Output

Output Variance
OUT REAL 0 No
Value

Description

It can calculate all variance of input variables.

974
APPENDIX 1 Function Block

1.10 HSSyslib
1.10.1 Get_Sys_Info

Figure 1.10.1-1 Get_Sys_Info

Alias

Get system information

Pins

Initial Suppleme Persiste


Output Data Type Description
Value nt nt

Main information of
MainInfo MAIN_INFO 0 No
task

Communication No
RedInfo RED_INFO
information

TimeAdjus TIMEADJUS Time adjustment No


tInfo T_INFO information

Description

Get the controller runtime information about task information, communication


information and time adjustment information etc.

1.10.2 Get_Task_Info

Figure 1.10.2-1 Get_Task_Info

Alias

975
APPENDIX 1 Function Block

Get Task Information

Pins

Initial Suppleme Persiste


Input Data Type Description
Value nt nt

pstTaskN POINTER TO Task Name of


0 No
ame STRING Configuration

Output

dwCount:DWORD;
Task accumulatively
running times

dwCycleTime:
DWORD; Task run a
cycle that real cost
time.

dwCycleTimeMin:
DWORD; Task run a
cycle that really cost
minimum time.
TSAK_INFO dwCycleTimeMax:
TaskInfo StructureTyp DWORD; Task run a 0 No
cycle that really cost
e
maximum time.

dwCycleTimeAvg:
DWORD;Task run a
cycle that really cost
average time.

wStatus: DWORD;
Running Status of
Current Task

wMode: DWORD;

Running mode

Description

When pstTaskName is byte group of a entered task name, TaskInfo output

976
APPENDIX 1 Function Block

related information of this task.

dwCount : Task accumulatively running times;

dwCycleTime: Task run a cycle that really cost time;

dwCycleTimeMin: Task run a cycle that really cost maximum time;

dwCycleTimeMax: Task run a cycle that really cost maximum time;

dwCycleTimeAvg: Task run a cycle that really cost average time.

wStatus is running status of task.

wStatus =0: Running;

wStatus =1: Stop from upper computer instruction;

wStatus=6: Stop because of watchdog;

wStatus=7: Stop because of error.

wMode is running mode of task.

wMode=1:normal;

wMode=other:Occur mistake.

1.10.3 HSGetIECInterval

Figure 1.10.3-1 HSGetIECInterval

Function

Get Operation Time of Task

Pins

Data Initial
Input Description Supplement Persistent
Type Value

0-the runtime of IEC


Get Type of task in the current
bFix BYTE 0
Task Time cycle

1-the configuration

977
APPENDIX 1 Function Block

time for IEC task

Output

Task
GetIECInterval DWORD Operating 0 Unit:ms
time

Description

HSGetIECInterval will output configurable time of IEC task when bFix=1;

HSGetIECInterval will output this cycle IEC task which has ran time when
bFix=0.

1.10.4 HSRTC

Figure 1.10.4-1 HSRTC

Alias

Get Controller Time

Pins

Output Data Type Description Initial Value Supplement Persistent

ss DWORD Controller Time 0 Unit: Second No

The remainder
of the
ms WORD 0 Unit: millisecond No
millisecond time
for controller

Description

The function block is running that output current time of controller. its time
format is ss.ms.SS stands for time of second level, ms stands for time of
millisecond level. When getting the controller time, the value of SS port will be
978
APPENDIX 1 Function Block

the second value that accumulated on the base of 1970-01-01 00:00:00. The
value of ms is the accumulation of each second in me level. If ms accumulate
to 1000, it can be converted into DT type by connecting DORD_TO_DT to SS
port.

1.10.5 HSTIMERJUDGE

Figure 1.10.5-1 HSTIMERJUDGE

Alias

Time Judge

Pins

Initial Persiste
Input Data Type Description Supplement
Value nt

I1 DT input1: time 0 No

TV DT Set time value 0 Yes

I2 TIME Input2:time interval 0 No

PV TIME Set interval value 0 Yes

Output

DV1 BOOL Time judgement output1 0 No

DV2 BOOL Time judgement output2 0 No

Internal Parameters

Data Initial Supplement


Parameter Description Persistent
Type Value

979
APPENDIX 1 Function Block

Only available in
HO BOOL Judge month 0 time compare Yes
calculation

HD BOOL Judge day 0 Yes

HH BOOL Judge hour 0 Yes

HM BOOL Judge minute 0 Yes

Judge Yes
HS BOOL 0
second

Judge Yes
HI BOOL 0
millionsecond

Compare 0 ==,1 !=,2 >=,


JS BYTE 0 Yes
symbol 3 <=,,4>,5 <

Description

According to judgement type (HO, HD, HH, HM, HS, HI), judge if the set time is
consistent with the relationship of input time. If it is coincidence, then output
TRUE, or it will output FALSE.

1.10.6 NetLoad

Figure 1.10.6-1 NetLoad

Alias

Get Controller Network Load

Pins

Output Data Description Initial Supplement Persistent

980
APPENDIX 1 Function Block

Type Value

Network flow
eth0_load REAL 0 No
of net 128,Unit: KByte/s

Network load of net


eth0_per REAL 0 No
128 ,Unit:percentage

Network flow of net 129,Unit:


eth1_load REAL 0 No
KByte/s

Network load of net


eth1_per REAL 0 No
129 ,Unit:percentage

Description

The function block is running that output current load and flow for each network
of controller. E.g. eth0_load = 7,eth0_per=0.56,eth1_load =
6,eth1_per=0.48 .That is to say, flow of net 128 for controller is 7 KByte/s, load
is 0.56%;flow of net 129 for controller is 6 KByte/s, load is 0.48%;

Network load of net 128 and 129 for general system aren’t exceed 20%.

1.10.7 Sysper

Figure 1.10.7-1 Sysper

Alias

Get the system load of controller

Pins

Output Data Type Description Initial Value Supplement Persistent

loader
Load REAL 0 No
percentage

981
APPENDIX 1 Function Block

Description

The function block is running that output current load of controller, and unit is
percentage.

E.g. Load of output is equal to 12, that is to say, load of controller is 12%.Load
of general system are less than 40%.

1.10.8 INIPULSE

Figure 1.10.8-1 Initial Pulse

Alias

INPULSE is to judge whether the moudle is power down and restart or clear
download.

PINS

Input Data Type Description Initial Value Retain

Task cycle
CYCNUM WORD number if initial 10 Yes
pulse

Output Data Type Description Initial Value Retain

Q BOOL Initial pulse 0 No

Initial
Output Data Type Description Retain
Value

Running status: clear


download or power off, reset.
INIRun WORD 16#AAAA No
The value is 16#AAAA, and is
15#5555 when normally run

Used for output pulse timing,


CY_N WORD can guarantee the following in 0 No
M zone: the module is cleared
982
APPENDIX 1 Function Block

to 0 when power off and


restart, the pulse band of
master and slave machine is
synchronized.

In MACS V5.2.5B, INIRum and CY_N will be automatically generated after the
combinite compilling in system configuration.

Description

1. Detail function instruction


INPULSE module judges the local parameter INIrun, if it is the initial value
16#AAAA, it indicates the controller clears download or power off or reset and
restart, then the output port Q=TRIE and keeps CYCNUM cycles, after then, Q
is set to FALSE and INRun=16#5555.

Figure 1.10.8-2 Output Process of Initial Pulse

• Please add retain properties before you define this function block

• You should add local parameter INRun, CY_N of word type in M zone, the
properties of which are not retain and the initial value is 16#AAAA and 0,
as shown below:

INIRum and CY_N will be automatically generated after the combine compiling
in MACS V5.2.5B.

2. Application Example
In the field with higher safe level, when main controller ia instantly power off
983
APPENDIX 1 Function Block

and restart, safety cutdown programe is needed. The abnormal can be


identified by INI_Plus_Q and is the trigger condition of safety cutdown.

In field, the start/stop or on/off of valve can be controlled by HSSCS5 or HSPID


block. According to the safety requirement of different field when
double-controller is power off and restart, field device should be controlled to
enter into a safety mode by HSSCS5 or HSPID block, which can be realized by
configuring the HSSCS5 or HSPID by using function block INIPLUS.

The example is as follows:

(1) At first define the instance of INIPLUS block and correlated variable

Add a POU named INIpou, the function of which is to flag whether the
controller is power on, as shown in Figure 1.10.8-3

Figure 1.10.8-3 INIpou

The red variable in above figure should be declared in Globle Variables, as


shown in Figure 1.10.8-4

Figure 1.10.8-4 Global Variables

In above figure, INIMC_XOH01 is the power flag of double controller when


restarting, INIZQ_XOH01 is the keep cycle life when restarted. In field,
different field device has different time retirement when entering into safe
position. The configuration can be as shown in Figure 1.10.8-5

984
APPENDIX 1 Function Block

Figure 1.10.8-5 Field Configuration

(2) On the basis of safety requirement in field, the controller should has
different configuration when controller enters safe position in double
controller system. Take the example of HSSCS5 and HSPID:

The logic configuration of HSSCS5 is as shown in Figure 1.10.8-6. Connect


the set pulse with the protection switch PIN L1 of HSSCS5 block.

Figure 1.10.8-6 HSSCS5 Configuration

985
APPENDIX 1 Function Block

Logic configuration of PID logic:

Add POU scheme page and guide the PID outputs to safe state with ST
language, as shown in Figure 1.10.8-7

Figure 1.10.8-7 PID Configuration

You should pay attention to the following:

If the TS definition logic of PID is TRUE after the controller is power off and
restarted, it traces the specified TP value. The value of the trace tag TP
defined in POU scheme page is same as this tag.

If the TS of PID is not defined, INIPID is executed and guides the device to
sate state, which is specified by field.

Figure 1.10.8-8 PID Configuration

According with the above logic, in the period of the set pulse is 1, the program
controls the PID to output to safe state (which is specified by field). In Figure
1.10.8-8, the set value of function block SEL is set by the safety state in field,
and should be same with the specification value in INIPID scheme page.

(3) New added POU page will be execute in MACS_PRG


986
APPENDIX 1 Function Block

According with the above modification, INIpou and INIPID is new added POU
scheme page, and in MACS_PRG, INIpou is in front and INIPID is on the end.

3. Usage Notice
(1) Please add retain properties when using INIPULSE module, so as to
record the CYCNUM parameter value written before power off. If it is
not added, the output of initial pulse will not be effected, refer to the
restart flag is parameter in M zone.

(2) If the module and controller are power off at the same time, output
value is the initial value.

(3) If only the controller is power off, the module is hold before controller
algorithm starts. About 40 seconds are needed from the controller
restarts to outputs value. That is to say, the power up of controller will
not let the output to be initial value immediately even if the initial pulse
is added.

(4) Only one instance can be defined in the INIPULS project, as a result of
the local parameter in M zone has only one. If more than one
parameter are declared, the pulse band will subject to the shortest one.
If initial pulses with multiple band is needed, please add TP function
block after the module.

(5) The calling of this function block should be placed in top of


MACS_PRG.

987
APPENDIX 1 Function Block

1.11 Property setting for Persistent


1.11.1 Principle
Principle of property setting for Persistent:

 Parameters modified online;

 History information relevant to output (including internal variable used


for calculation of internal algorithm)

 Summation

1.11.2 Checked result


1. Result of library HS_Ctrol

Summation
Functional History information
Parameters modified online
Blocks relevant to output

FM、PA、TS、C0、C1、C2、
C3、RM、BS、OU、OT、OB、AV、preRM、nowRM、
HSAlgMAN
MU、MD、MR、ME、AE、 prePA
FE

HSCSLAVE LC0~LC11、DI DV

FM、AO、AC、MS、MO、 SP 、 AM 、 TP11 、
MC、M1、M2、JC、RM、T1、TP12、TP22、TPMS、
HSCSLAVE5
T2、T3、DB、DL、OT、OB、TP31 、 TP32 、
QC、MQ TOFZH、ZLRT

HSDigMAN FM、PA、RM DV、nowRM、prePA

ZH、ZF、IP、T1、T2、Z1、 HZ、HH、YF、FZ、
HSDLCTRL
Z2、Z3、Z4、JC FH

HSDLCTRL2 I3、I4、T1、T2、T3、HX、
FX、BH、BF、ZH、ZF、FM、

988
APPENDIX 1 Function Block

IP、Z1、Z2、Z3、Z4、JC

RL、T1、T2、HX、FX、ZH、HH、FH、TIMEWH、
HSDLCTRL5 ZF、IP、Z1、Z2、Z3、Z4、 TIMEWF、IP1、IP2、
JC、MR、SY IP3

SP、IC、OC、TS、CP、MC、
CM、CC、RM、PT、TI、KD、
PV、AV、CS、RS、
TD、OT、OB、SV、DI、OU、
DA、SV1、D1、U1、
HSPID DL、MU、MD、PK、OM、AD、
preRM 、 nowRM 、
TM、FA、MI、MS、MM、ME、
EK_1、DD
CE、TE、FE、PU、PD、AC、
CSRL、AE

L0~L8、TP、TC、TS、RT、 CT 、 YL 、 YF 、
HSSCS DE、SC、CM、OS、CS、OU、preopen、preclose、
SE、CP prestop

L0~L8、TP、TC、TS、SD、
JC、RP、DE、SC、QR、SY、TP_TP、TP_TC、IP1、
HSSCS5
CS、T1、CM、OS、CS、OU、IP2、IP3
RT

OT、CT、AM、TP_TP、
L0~L7、SD、MO、MC、TP、TP_TC 、 TP_TS 、
HSSCS6 TC、TS、JC、RP、SY、RT、TON_V1、TON_V2、
QR、SC、ZF、T1、T2 TP_RP 、 TPDV 、
TPRV、RTDV、RTRV

HSSSLAVE DI

HSVALVE OT、OB、L0、L1、TP、TC

TP11、TP12、TP22、
AO、AC、MO、MC、M1、
TPMS、TP31、TP32、
HSVALVE5 M2、MS、JC、T1、T2、T3、
TOFZH 、 ZLRT 、
DB、DL、OT、OB、QC、MQ
AMZH

HSVMAN
TA、TS、TM、OT、OB、SU、FB、AV、SP、preRM、

989
APPENDIX 1 Function Block

SD、BS、MD、RM nowRM、prePA

SP、PT、TI、TISI、OC、TS、
OT、OB、TD、KD、AD、SV、
PV、AV、RS 、D1、
HSVPID DL、TM、SU、SD、MPT、
ukout、U1、DD、EK_1
MK、MKD、FA、DI、OU、
CP、Mek

2. Result of library Standard

Functional Parameters modified History information


Summation
Blocks online relevant to output

RS Q1

SEMA X

SR Q1

CTD PV M CV

CTU PV M CV

CTUD PV MU、MD CV

NetvarTON PT M、StartTime ET

RTC PDT M、DiffTime CDT

TOF PT M、StartTime ET

TON PT M、StartTime ET

TP PT StartTime ET

F_TRIG M

990
APPENDIX 1 Function Block

R_TRIG M

3. Result of library HSSysLib

Parameters modified History information


Functional Blocks Summation
online relevant to output

TV, PV, HO, HD, HH、


HSTIMERJUDGE
HM, HS, HI, JS

4. Result of library HS_AlmLimSec

Parameters modified History information


Functional Blocks Summation
online relevant to output

AI_RED A1, A2, D CHOOSE

MAN, MAN12, MD,


AI_Red_Sel BD1, BD2, error, UP, O_1
LO, AlarmUP, AlarmLO

BOOL_RED A1, A2, D CHOOSE

HSALARMSPARK R1, R2

HSALM_AM HH, AH, LL, AL, DI DV, AM

HSALM_DV HL, LL

HSALM_RT HL, DP, AP DV, IK

HSDIGSW SW

HSLIM_HL HL, LL

HSLIM_RATE HL, LL AV

HSMEDSEL AV
X1ALM, X2ALM,

991
APPENDIX 1 Function Block

X3ALM, MD, DB

AV, ENDVALUE,
STEPVALUE,
HSSFT SW, RT
PRESWITCH,
CHANGSTATE

5. Result of library HS_Cnvt

Functional Parameters modified History information


Summation
Blocks online relevant to output

E_H MU、MD、UP、LO

ELC_E WG、MU、MD、BV

FM148F_H_E MU、MD、UF、LC

FM148F_H_ELC BV、UF

H_CT CP

s1_1、s2_1、b1_1、
A1、A2、SET、FT、OT、b2_1、flag_1、av_1、
H_CT_R
OB、CP Step 、 StepSum 、
Total、intial

WG、MU、MD、BV、BS、
H_E prerEng
SQ、LC、OM、IV

H_E_S MU、MD、LC

H_ELC WG、BV

s1_1、s2_1、b1_1、
A1、A2、SET、FT、OT、b2_1、flag_1、av_1、
H_ELC_R
OB、TP、WG、BV、CP Step 、 StepSum 、
Total、intial

992
APPENDIX 1 Function Block

H_PI WG、BV、Lim、RES CU、AV

TP、WG、BS、LA、LB、
H_RTD
LC、LG

TP、CT、WG、BS、cycle、
H_TC CT_FLAG
FILTERTIME

6. Result of library HS_MathLogic

Functional Parameters modified History information


Summation
Blocks online relevant to output

IV 、 MS 、 MC 、
HSACCUM AV、perRS、rs2
bPositiveAccum

HSCHARC PS、X、Y

CEQ、CNE、CGE、CLE、
HSCMP
CGT、CLT

HSD CK、RS、DST DV、C1

HSDCSSUM SL DP、AV LJ

HSDOWN IN_1

HSDTIMESUM SOF、RB L1、L0

HSFILTER IS、FM IK

HSONEFOLD VN、XV、YV AV

HSPOLY CF

HSQOR SL、S9

993
APPENDIX 1 Function Block

HSRS DV

HSSLMTSUM I1DQ、AH、AL、SOF AV、AV1 LJ

AV、K1、K2、K3、K4、
HSSLOPE SW、AP
CT

HSTWOFOLD VN、XV、YV、ZV AV

HSUP IN_1

RANDOM OT、OB last_out

7. Result of library HS_TimeField

Functional Parameters modified History information


Summation
Blocks online relevant to output

IC、DC、SW、SR、IV、
HSAMEMORY AV V1
OT、OB

ChangeState 、
IOF、D1、D2、HL、LL、 PremidValue 、
HSBAL2
OUTR StepValue、EndValue、
PreOF

HSCHARC1 PS、X1~X11、Y1~Y11 AV

HSSC O8、I_1~I_7

HSSC1 O16、I_1~I_15

HSSC2 O32、I_1~I_31

8. Result of library HS_TimeField

Summation
Functional Parameters modified History information

994
APPENDIX 1 Function Block

Blocks online relevant to output

SS、RS、PS、TB、TE、
HSCURVE AV、TimeOut、LastSs TX
TL、BL、TT、YY

HSDEV KG、TC、OT、OB AV、IK_1、OK_1

HSFOP TC、KG OK_1

HSFSMITH KG、TC、LGT、OT、OB PK、IN_1

TS、TB、KI、DI、TI、OT、
HSINTG AV
OB、OTR、AD

HSLDLG LGT、BT、KG、OT、OB AV、OK_1、IK_1

HSLGCMP HL、LL DV

HD、DE、RST、IR、DR、
HSRAMP AV、LS
TL、BL、IV

HSSOP KG、TF、TS、OT、OB

KG、T1、T2、LGT、OT、 AV、PK、IN_1、IN_2、
HSSSMITH
OB OK_1

DV 、
HSTIMER TT、TC CURRENTCOUNT 、
PreSt

OneStepLag k、b、c、i yk、yk_k、uk_l

ThreeStepLag k、a、b、c、d、i yk、yk_k、uk_l、OK_1

TwoStepLag k、a、b、c、i yk、yk_k、uk_l、OK_1

9. Result of library SIMU_FOP


995
APPENDIX 1 Function Block

Functional Parameters modified History information


Summation
Blocks online relevant to output

AIR_OPEN_CLOSE 、
Simu_AO FOP1
SIMU_TC、SIMU_KG

R_F_SEL 、 TON_PT 、
Simu_DO TON_D、TOF_D
TOF_PT

10. Result of library Util

Parameters History information


Functional Blocks Summation
modified online relevant to output

HYSTERESIS HIGH、LOW OUT

LIMITALARM HIGH、LOW

KP 、 TV 、
Y_MANUAL 、 Y、LIMITS_ACTIVE、
PD Y_OFFSET 、 CLOCK 、 D 、 INIT 、
Y_MIN 、 Y_MAX 、 Y_ADDOFFSET
MANUAL、RESET

KP 、 TN 、 TV 、
Y、LIMITS_ACTIVE、
Y_MANUAL 、
OVERFLOW 、
PID Y_OFFSET 、
CLOCK、I、D、INIT、
Y_MIN 、 Y_MAX 、
Y_ADDOFFSET
MANUAL、RESET

KP 、 TN 、 TV 、
Y_MANUAL 、
Y、LIMITS_ACTIVE、
Y_OFFSET 、
PID_FIXCYCLE OVERFLOW、I、D、
Y_MIN 、 Y_MAX 、
INIT、Y_ADDOFFSET
MANUAL、RESET、
CYCLE

CHARCURVE N、P OUT

996
APPENDIX 1 Function Block

ASCEND 、
DESCEND 、 OUT 、 OLD_IN 、
RAMP_INT
TIMEBASE 、 CLOCK
RESET

ASCEND 、
DESCEND 、 OUT 、 OLD_IN 、
RAMP_REAL
TIMEBASE 、 CLOCK
RESET

OUT、X1、X2、X3、
DERIVATIVE TM、RESET
T1、T2、INIT

INTEGRAL TM、RESET OUT、OVERFLOW

COUNTER、
STATISTICS_INT RESET MN、MX
SUM

STATISTICS_REAL RESET MN、MX、AVG COUNTER

VARIANCE RESET Z、A、B

ENABLE 、
BLINK TIMELOW 、 OUT、CLOCK
TIMEHIGH

MODE 、 BASE 、
PERIOD 、
OUT 、 COUNTER 、
GEN CYCLES 、
CLOCK
AMPLITUDE 、
RESET

997
APPENDIX 2
How to Use ForceList Reader
Macs V5.2.5 provides a convenient tool ForceList Reader. It can be used it to
check out the forced variable list in a domain. This file is the introduction about
how to operate with this tool.

Step1. Click the icon of ReadForceList.exe, the start dialog will appear.
The names of existing projects are showed in the drop down list
like the following Figure 1, if you click the arrow button of List
of Project.

Figure 1 List of Existing Projects

Step2. If a project was selected, the numbers of all control stations will be
shown in the table List of Station like Figure 1. By default, the
forced variable list is saved under folder TEST of CoDeSys
installation path which is shown in the edit box at the bottom of
the dialog box, such as Figure 2.

Step3. If you want to modify the path of list to be read, click Browse and
select a position from folder selecting dialog box Figure 3 and
Figure 4 show this operation.

999
APPENDIX 2How to Use ForceList Reader

Figure 2 Select a Project

Figure 3 Select Path

1000
APPENDIX 2How to Use ForceList Reader

Figure 4 Interface after Modification of Path

Step4. To select a control station which you want to read, please click the
corresponding number in the table List of station. For
multi-selection, press the key Shift or Ctrl by clicking numbers.
Then click Read to read the forced variable lists of the selected
control stations. Please see Figure 5 and Figure 6.

Figure 5 Select a Control Station

1001
APPENDIX 2How to Use ForceList Reader

Figure 6 Select more Control Stations

Step5. Click Next in the popup dialog box shown as in Figure 7.

Figure 7 Click Next

Step6. After reading, a dialog box will appear which let you select whether
to display the result. Click OK to display and Cancel to check
out the txt file under the selected path, shown as in Figure 8.

1002
APPENDIX 2How to Use ForceList Reader

Figure 8 Click Button to Show Result

Step7. The result will be shown as in Figure 9.

Figure 9 Result

1003
APPENDIX 3
Notes in Configuration
1. Use the device configuration of MACSV to add SM module of FCS, the
default address of module begins from two. Use the Conmaker to open
a project, and add a module in MACS Configuration manually, the
address of module is set to the number one automatically, which leads
the module not to communicate. Solution:Don’t set the address of
module as 1.
2. When run on Windows 2008 platform, please close the mmc.exe
process. After the computer starting, right click on the "Computer" icon,
and select "Manage" menu on the pop-up menu, as shown in Figure
1:

Figure 1 Manage of Windows 2008

Pop-up "Server Manager" panel, choose the "Do not show me this
console at logon" check box, as shown in Figure 2:

1005
APPENDIX 3 Notes in Configuration

Figure 2 Server Manager

3. After uninstall server, the network card will be renamed if the server is
re-installed. For example, SNETA that exits before uninstalling may
becomes SNETB, which leads the server to communication failure.
Solution:After re-install the server, check the name of network card
each time. Make sure that the names of network card that 128 network
segment used are all SNETA, and the names of network card that 129
network segment used are all SNETB.
4. Window7 can not be used as server.
5. RTSLoader can not be used on the Windows 2008 platform.
6. SM020, FM020 module is added by the custom module command in
the Device Configuration application, and the module names of master
station and slave station must be set to FM020-M, SM020-M, FM020-S,
SM020-S respectively. For example, if a master SM020 need to be
added, the module name must be defined as SM020-M in the Device
Configuration application.
7. When the OS of OPS is Window7, UAC must be adjusted to the
minimum level,as shown in figure 3:

1006
APPENDIX 3 Notes in Configuration

Figure 3 Adjust UAC

8. This product can only be installed on Chinese or English Operating


system, in English Operating system, the follow steps must be done in
the Regional and Language Option in Control Panel:
In Languages: Install files for East Asian languages, as shown in
Figure 4.

In Advanced: Select “Chinese(PRC)” to match the language version of


the non-Unicode programs, as shown in Figure 5.

1007
APPENDIX 3 Notes in Configuration

Figure 4 Language Setting in Control Panel

Figure 5 Advanced Setting in Control Panel

1008
APPENDIX 3 Notes in Configuration

9. Before you install OPS or ENG, install Open Office 2.2.1 first. Run the
scalc before starting the configuration.
10. If use Windows XP or 2003 for OPS, it is suggested to Set Theme to
“Windows Classic” in Display properties, as shown in Figure 6.

Figure 6 Windows Classic Mode

11. Use the RTSLoader to refresh controller if it is necessary.

1009
APPENDIX 4
Notes of Using Controller

4.1 Overview
This part describes the notes of using controller. It is based on controller
version RTS525.

The running environment of RTS525 is shown as in the following table:

Table 4.1-1 Running Environment of RTS525

Name Description
Controller Version RTS525
Last Release Date
VARN Information
Compatible HMI HMI Version Compatibility
MAC V5.2.5B Supported
Hardware Type Compatibility
Compatible MCU
FM Series Supported
SM Series Supported

4.2 State Lights of Controller


4.2.1 General Description
MACS V5.2.5B supports FM and SM series controllers. The meanings of their
Status Indicators are same. So only the controller SM203 is introduced here as
an example, as shown in the following figure:

1011
APPENDIX 4Notes of Using Controller

RUN
STANDBY
ERROR

CNET
CNETA
CNETB
SNET1
SNET2
RNET

S1_LAN
S1_LINK
S2_LAN
S2_LINK
R_LAN
R_LINK

SM203

Figure 4.2.1-1 Status Indicators of SM203

The names and functions of these status indicators are shown as in the
following table:

Table 4.2-1 Functions of Status Indicators

Led Status Definition


RUN (green) On IEC programs are running.
Off No project or IEC stop running.
On MCU is slave. Or the master is being
downloaded.
STANDBY (yellow) Off MCU is master.
Single MCU. Or one MCU is fault of redundant
Flashing
MCUs. Or master is being downloaded. Or slave
is backing up data from master.
On Just power on.
ERROR (red) Off Master or slave working normally.
Flashing No project files or there are errors in them. Or
the downloaded symbol table is error.
CNET (green) On No connection with DP module or the
communication with DP failed.

1012
APPENDIX 4 Notes of Using Controller

Led Status Definition

The master card of DP is fault. Or the project


Off files related to DP wasn’t downloaded. Or the
project configuration related to DP is error.

Flashing At least one DP control net working normally.


On DP control net A working normally.
CNETA (yellow)
Off No data flow in DP control net A.
Flashing Connection of DP control net A is broken.
On DP control net B works normally.
CNETB (yellow)
Off No data stream in DP control net B.
Flashing Connection of DP control net B is broken.
Flashing There is data exchange between system net 1
SNET1 (yellow) and computer.
Off There is no data exchange between system net
1 and computer.
Flashing There is data exchange between system net 2
SNET2 (yellow) and computer.
Off There is no data exchange between system net
2 and computer.
Flashing Redundant net (i.e. 130 Net) is normally
RNET (yellow) redundant.
Off Redundant net (i.e. 130 Net) is not redundant.
On System net 1 is power on normally.
S1_LAN (yellow)
Flashing Data is sent through system net 1.
Off System net 1 is fault or module is power off.
Net cable of system net 1 working normally
On
connected.
S1_LINK (green)

Off Net cable of system net 1 is broken off or not


connected.
On System net 2 is power on normally.
S2_LAN (yellow)
Flashing Data is sent through system net 2.
Off System net 2 is fault or module is power off.
S2_LINK (green) On Net cable of system net 2 is normally
connected.

1013
APPENDIX 4Notes of Using Controller

Led Status Definition


Off Net cable of system net 2 is broken down or not
connected.
On Redundant net is power on normally.
R_LAN (yellow)
Flashing Data is sent through redundant net.
Off Redundant net is fault or module is power off.
On Net cable of redundant net is normally
R_LINK (green) connected.
Off Net cable of redundant net is broken off or not
connected.

4.2.2 Detailed Description


Only a few important LED indicators will be introduced here.

Light STANDBY
This LED indicator means the state of single or redundant controller. In
addition, it can also indicate some downloading or redundant process. For
more details please refer to the following table:

Table 4.2-2 Details of the Light STANDBY

Cases Status
Single MCU Flashing
Redundant MCUs Normal Master Off
Slave On
Downloading to master Downloading code to master. On
Downloading project files to master. Flashing
Slave is backing up Master copies project files to slave. Flashing
project from master.
Master copies project data to slave. On

By copying or non-downloading, the LED indicator


STANDBY of the one of two MCUs flashs, because
Special cases
the multi-function card of one controller is fault. It
causes that the other controller considers the master
as single MCU.

CNET
This light means the state of control net. For more details please refer to the

1014
APPENDIX 4 Notes of Using Controller

following table:

Table 4.2-3 Details of the Light CNET

Cases Status
Master card of DP is default. Off
Project files related to DP wasn’t Off
downloaded.
The project configuration related to DP is Off
Master
error.

Master card of DP is DP module isn’t On


normal. connected.
The correct project
data related to DP DP communication On
has been is broken.
downloaded.
At least one module
is successfully Flashing
connected.

Cases CNETA
DP control net A works normally. On
No data flow in DP control net A Off
Downloading code to master.
Connection of DP control net A is broken. Flashing
Downloading project files to master.
Cases CNETA
DP control net B works normally. On
No data flow in DP control net B Off
Downloading code to master.
Connection of DP control net B is broken. Flashing
Downloading project files to master.

• Special case: by redundant mode, the LED indicators CNET of master and
slave are in state on if there is no module in FCS. The LED indicators
CNETA and CNETB are off. But in this case the LED indicators CNETA and
CNETB of slave will be on, because in work state the master will send
packages to poll slave.

Light Error
For more details please refer to the following table:

1015
APPENDIX 4Notes of Using Controller

Table 4.2-4 Details of the Light Error

Cases Status
After power on On
Master or slave checks whether there are project files, or whether Flashing
these files are error.
Master or slave work normally. Off

• Special case: if the LED indicator ERROR of master flashs after


downloading, it may be caused by the following reasons:

1. Two running Conmaker open the same project. Operate one


Conmaker and download incrementally, and another Conmaker
execute clear-download. If you exit the second Conmaker and online
login in the first Conmaker, it will prompt to clear-download. The LED
indicator ERROR will falsh after download.
2. LED indicator RUN is on while ERROR is blinking, because the project
was closed without saving after it was modified and downloaded
incrementally in Conmaker. The LED indicator ERROR will flash if
you open the project again, online login and download incrementally.
For the special cases above, it is suggested that the downloaded projects must
be saved and don’t use two Conmaker to login or download. If these problems
happened, Conmaker will prompt tips. Please operate along with tips to
recover the project.

4.2.3 Process of Power On


For single MCU, the process of power on is shown as the following table:

Table 4.2-5 Process of Power On – Single MCU

Cases Status Illustrations


Before power on All LED indicator s off -

1016
APPENDIX 4 Notes of Using Controller

Cases Status Illustrations

Power on ERROR is on

RUN off

No project after power on STANDBY flashing

ERROR flashing

There is project after power on Please refer to 4.3 for -


more details.

For redundant MCU, the process of power on is shown as following table:

Table 4.2-6 Process of Power On – Redundant MCU

Cases Status Illustrations


Before power on All LED indicator s off -

ERROR is on.

All other LED indicators are


off.
Power on
At this time, master and slave
can’t be determined. The left
controller is A, and the right is
B.

1017
APPENDIX 4Notes of Using Controller

Cases Status Illustrations

LED indicator RUN of master


and slave are off.

STANDBY of slave is on.


No project after
power on ERROR of master and slave
is on.

RNET of master and slave


flashing.
Cases Lights Illustrations
State
There is project Please refer to 4.3 for more
after power on details.

4.2.4 Normal Running and Redundancy of Two MCUs


The normal running of redundant MCUs is classified into two cases as shown
in the following table:

Table 4.2-7 Normal Running of Redundant MCUs

Cases Status Illustrations


LED indicators RUN of
master and slave are
on.

LED indicators CNET


Not connected with of master and slave
computer. flashing.

LED indicators
ERROR of master and
slave are off

LED indicators RNET


of master and slave
blink.

1018
APPENDIX 4 Notes of Using Controller

LED indicators RUN of


master and slave are
on.

LED indicators CNET


of master and slave
flashing.

LED indicators
Connected with ERROR of master and
computer. slave are off

LED indicators RNET


of master and slave
flashing.

If there is data
communication in net
128 (129), SNET1
(SNET2) will flash.

When the both MCUs run normally, they may not synchronize after a time. In
this case, master will copy running data to slave and synchronize again. This
process is composed of two phases, as shown in the following table:

Table 4.2-8 Synchronization of Redundant MCUs

Phases Status Illustrations

LED indicators master


and slave are off.
Master stops running
and copies memory
data to slave. LED indicators RNET
of master and slave
flashing.

1019
APPENDIX 4Notes of Using Controller

Synchronization LED indicators RUN of


finished. Master and master and slave are
slave start running. on.

4.2.5 Both MCUs Being Completely Downloaded and


Synchronization
The complete-downloading contains five phases shown as the following table:

Table 4.2-9 Complete-Downloading of Redundant MCUs

Phases Status Illustrations

LED indicators
STANDBY of master
flashing.
Downloading to master
LED indicators RNET
of master and slave
flashing.

LED indicators RUN of


master is off.
Master loads project
from file. LED indicators
STANDBY of master is
off.

1020
APPENDIX 4 Notes of Using Controller

Phases Status Illustrations


LED indicators RUN of
master is on.

LED indicators
Master is running and STANDBY of master is
copies project to slave. off.

LED indicators
STANDBY of slave
flashing.

LED indicators RUN of


master is off.
Master stops running
and copies memory
data to slave. LED indicators
STANDBY of slave is
on.

Synchronization LED indicators RUN of


finished. Master and master and slave are
slave are running. on.

4.2.6 Both MCUs Being Online Downloaded and


Synchronization
The online-downloading contains five phases shown as the following table:

1021
APPENDIX 4Notes of Using Controller

Table 4.2-10 Online-Downloading of Redundant MCUs

Phases Status Illustrations


LED indicators RUN of
master and slave are
on.

Downloading data to LED indicators


master STANDBY of master is
on.

LED indicators RNET


of master and slave
flashing.

LED indicators
Downloading files to
STANDBY of master
master.
flashing.

LED indicators
STANDBY of master is
off.
Master is running and
copies project to slave.
LED indicators
STANDBY of slave
flashing.

1022
APPENDIX 4 Notes of Using Controller

Phases Status Illustrations

LED indicators RUN of


master is off.
Master stops running
and copies memory
data to slave. LED indicators
STANDBY of slave is
on.

Synchronization LED indicators RUN of


finished. Master and master and slave are
slave are running. on.

4.3 Important Description about Power Fail


Safeguard of Controller
Please refer to the descriptions about power fail safeguard of controller in the
following table:

Table 4.3-1 Descriptions about Power Safeguard of Controller

Description Details

Controller version no.: RTS525


Important
description Important description: After success download of controller by
1 Conmaker(includes download all and online download), If reset
the controller immediately, it could not be started.

1023
APPENDIX 4Notes of Using Controller

After success download of controller by Conmaker, the user


project has been saved in memory of controller, it could be lost in
case of power failure, the project must be written into DOC for
permanent save. This course will cost a long time, so the
Cause controller writes the project into DOC step by step.
analyze
Obviously, after success download of controller by Conmaker, if
reset controller immediately, the project in memory could be lost,
and the DOC has not been written the whole project file, so the
controller can not run.

After success download of controller by


Recommended
Conmaker, please wait for at least 2 minutes
method 1
before resetting the controller.
Handling
method
If you reset the controller immediately after
Recommended
success download of controller by Conmaker,
method 2
you can re-download the controller.

Please see descriptions about plug and pull MCU and power outage in the
following table:

Table 4.3-2 Descriptions about Plug and Pull MCU and Power Outage

Description Details

Controller version no.RTS525


Important
description Important description: It is inappropriate to do plug, pull and
2 power outage of MCU after download or in the course of master
and slave redundancy.

As a general rule, the MCU will not be influenced by power


outage, but in the course of writing file, important data is stored in
memory, if the power is outage at this time, the data in memory
Cause
has not been saved into DOC, this will cause loss of project file,
analyze
even damage of file system. The write file operation is in
download and redundancy, so it is strongly recommended not do
active power outage operation of MCU in these courses.

Handling Don’t do plug and pull MCU or power outage operation during
method download or project redundancy.

1024
APPENDIX 4 Notes of Using Controller

4.4 Description about IP Address Settings


of Controller
Please refer to the descriptions about IP address settings in the following table:

Table 4.4-1 Descriptions about IP Address Settings

Description Details

Controller version no.RTS525

Important description:
Important
description The controller can’t login if its IP address network segment is
set too large, only refresh DOC or change the network
segment into 223, and add 223 segment IP in PC, after reset
the controller, Conmaker can not link to controller, and the PC
can not ping controller successfully all the time.

TCP/IP provides that, the IP address with 224-240 as its first


byte is broadcast address, so this network segment is reserved
as broadcast address, and 240-248 is reserved as special
purpose. So, the user should avoid this IP area when setting
the IP address.

There are three network cards in controller, the one set by user
Cause analyze is first network card, the IP of the other two cards plus 1 in
order, if the first one is set as 223, then the following two will be
224 and 225, these addresses has exceeded the available
addresses, errors will occur.

Remedy method: please select network segments smaller than


221. In addition: TCP/IP provides that network segment 127 is
used for self loop test, user also can not use this value.

Recommended Set the network segment smaller than


method 1 221(127 also can not be used).
Handling
method If you have set the IP in forbidden network
Recommended
segment, it is recommended to refresh the
method 2
DOC.

1025
APPENDIX 4Notes of Using Controller

4.5 Relevant Problems about Using


Conmaker Software
Some problems about using Conmaker are listed in the following table:

Table 4.5-1 Problems about Using Conmaker

NO. Problem Cause analyze Recommended operation

If two module addresses


are similar, Conmaker
No errors will not prompt error
reminds when sometimes. Project like
two module this is false, if it is Forbid this operation in
1
stations are set downloaded into Conmaker configuration
the same controller, there will be
address. errors when running,
and the indicators will
change irregularly.

After manually modify


the project, Conmaker
If you compile the
will compile it, and SDB
project and
file will be updated. If
increment Forbid this operation in
you do not save the
download it, but Conmaker configuration
project when closing it,
not save it when
the PRG and SDB file
closing. Re-open
2 will be inconformity. If you have done this
this project and
When reopen the operation, please save or
download it to the
project and download it, re-download after
same controller,
the project downloaded compiling.
ERROR will be
to controller is not
flashing and RUN
conformed to SDB this
is on.
will cause error in
controller running.

Add one module


(of any type) in In Conmaker
general control, configuration, at most In configuration, the station
3 set its address as 125 modules can be address cannot exceed
127, and add all mounted, and the 126.
channels highest address is 126.
required, then
compile to
generate

1026
APPENDIX 4 Notes of Using Controller

NO. Problem Cause analyze Recommended operation

controller
program. The
controller resets
during
downloading.

4.6 Relevant Problems about Using


RTSLoader Software
The problems about using RTSLoader are listed in the following table:

Table 4.6-1 Problems about Using RTSLoader

Recommended
NO. Problem Cause analyze
operation

The software can


be used after
making some
modifications on
Win7: Control
RTSLoader cannot
Panel->System
be used in lastest Win2008 and Win7 auto
Security->Action
1 Windows server 20 forbid applications may
Center->User
08, Windows7 affect system security
Account Control
operating system
Setting, set it to
never notify. The
similar setting in
Win2008 has not
been found yet.

1027
APPENDIX 4Notes of Using Controller

Recommended
NO. Problem Cause analyze
operation

If you have ping MCU


before changing the
position, an ARP table will Execute command
be established in local “arp -d” in cmd
Change the position PC, it saves the mapping command line to
of master and slave relationship between clear arp table, then
2 in one rack, the MAC address and IP of the MCU can be
MCU cannot be MCU; if the position of ping successfully.
ping in a while. MCU has been changed,
but the ARP table hasn’t
been reestablished, so
the MCU cannot be ping
successfully.

1028
APPENDIX 5
Data Classes and Item
1. AI-Analog Input

Item Type and Length


Item
Description Comment
Name
Before After Modify
Download
Compile Compile Online

upper limit of
AH D F no no Positive
alarm
range, if
alarm is
lower limit of required:
AL D F no no
alarm
MU>=HH>=A
alarm HH H>=AL>=LL>
HH D F no no =MD;
limit
negative
range is
alarm LL opposite
LL D F no no
limit

Cold
junction
compensatio Analog compensation
CC S12 yes yes
n tag name tag name tag name of
thermocouple
tag

0:no
cold junction
CL compensatio I B1 yes no 1:cold
n junction
compensation

CN channel no. I USI yes no

1029
APPENDIX 5Data Classes and Item

sample
CP I USI yes no Unit: second
cycle

CY cycle S4 I yes yes

alarm dead
DI D F no no default: 0
zone

DN device no. I UC yes no

tag
DS S32 S32 no no
description

turns to
formula
FN S12 UI yes no formula no.
name
after compile

0-4 (no alarm/


HH alarm special/urgent
H1 UI USI no no
level /less urgent/
common)

0-4 (no alarm/


upper alarm special/urgent
H2 UI USI no no
level /less urgent/
common)

reverse 0:positive
IS range I B1 yes no range 1:
attribution reverse range

cut out init


IV DF F yes no
value

0-4 (no alarm/


L1 alarm special/urgent
L1 UI USI no no
value /less urgent/
common)

L2 alarm 0-4 (no alarm/


L2 UI USI no no
value special/urgent
/less urgent/

1030
APPENDIX 5Data Classes and Item

common)

LA line resist A DF F yes no

LB line resist B DF F yes no

LC line resist C DF F yes no

little signal
LD DF F yes no default: 0.2
cut

R-bridge
LG DF F yes no
resist

lower limit of Meet:


MD DF F yes no
range MU>=MD
(positive
range) or:
upper limit of MU<=MD
MU DF F yes no (reverse
range
range)

cut output
MM I USI yes no
type

output The format of


OF UI USI no no
format output value

Three kinds
of selection:
operation
OR I B2 yes yes none, record,
record
record and
sound.

PN tag name S12 S12 no no

please refer
to CAN
SA signal range I UI yes no
communicatio
n protocol

1031
APPENDIX 5Data Classes and Item

over-range
SD DF F yes no default: 0
dead zone

SN station no. I UC yes no 10~49

SQ square I B1 yes no

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

UT dimension S8 S8 no no

2. AO-Analog Output

Item Type and Length


Item
Description Comment
Name
Before After Modify
Download
Compile Compile Online

CN channel no. I USI yes no

sample
CP I USI yes no Unit: second
cycle

DN device no. I UC yes no

tag
DS S32 S32 no no
description

KK KKS code S32 S32 no no

lower limit of Meet:


MD DF F yes no
range MU>=MD
(positive
upper limit of range) or:
MU DF F yes no MU<=MD
range
(reverse

1032
APPENDIX 5Data Classes and Item

range)

output The format of


OF UI USI no no
format output value

Three kinds
of selection:
operation
OR I B2 yes yes none, record,
record
record and
sound.

PN tag name S12 S12 no no

SN station no. I UC yes no 10~49

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

UT dimension S8 S8 no no

3. DI-Digital Input

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

alarm
AF I USI yes no
attribute

Set Alarm
color

0-no alarm;
AT alarm level I USI yes no
1-red;

2-yellow;

1033
APPENDIX 5Data Classes and Item

3-white;

4-green;

CN channel no. I USI yes no

DD on-off switch S32 S32 no no

DN device no. I UC yes no

tag
DS S32 S32 no no
description

description of
E0 S8 S8 no no
set 0

description of
E1 S8 S8 no no
set 1

KK KKS code S32 S32 no no

Three kinds
of selection:
operation
OR I B2 yes yes none, record,
record
record and
sound.

PN tag name S12 S12 no no

interrupt 0:non-interru
SA I B1 yes no
attribute pt 1:interrupt

0:non SOE
attribute
SE SOE attribute I B1 yes no
1:SOE
attribute

SN station no. I UC yes no 10~49

1034
APPENDIX 5Data Classes and Item

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

4. DO-Digital Output

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

CN channel no. I USI yes no

DN device no. I UC yes no

tag
DS S32 S32 no no
description

description of
E0 S8 S8 no no
set 0

description of
E1 S8 S8 no no
set 1

KK KKS code S32 S32 no no

Three kinds
of selection:
operation
OR I B2 yes yes none, record,
record
record and
alarm sound.

PN tag name S12 S12 no no

operation Three kinds


OR I B2 yes yes of selection:
record
none, record,
record and

1035
APPENDIX 5Data Classes and Item

alarm sound.

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

0:non SOE
attribute
SE SOE attribute I B1 yes no
1:SOE
attribute

SN Station no. I UC yes no 10~49

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

5. PI-Pulse input

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

upper limit of
AH D F no no
alarm

if alarm is
lower limit of required:
AL D F no no
alarm
MU>=HH>=A
alarm HH H>=AL>=LL>
HH D F no no =MD;
limit

LL alarm LL limit D F no no

CN channel no. I USI yes no

1036
APPENDIX 5Data Classes and Item

CP sample cycle I USI yes no Unit: second

alarm renew
DI DF F no no Default: 0
dead zone

DN device no. I UC yes no

tag
DS S32 S32 no no
description

coefficient/pul
EF DF F yes no
se

0-4 (no alarm/


HH alarm special/urgent
H1 UI USI no no
level /less urgent/
common)

0-4 (no alarm/


upper alarm special/urgent
H2 UI USI no no
level /less urgent/
common)

KK KKS code S32 S32 no no

0-4 (no alarm/


L1 alarm special/urgent
L1 UI USI no no
value /less urgent/
common)

0-4 (no alarm/


L2 alarm special/urgent
L2 UI USI no no
value /less urgent/
common)

lower limit of Meet:


MD DF F yes no
range MU>=MD
(positive
upper limit of range) or:
MU DF F yes no MU<=MD
range
(negative

1037
APPENDIX 5Data Classes and Item

range)

The format of
OF output format UI USI no no
output value

Three kinds of
selection:
operation
OR I B2 yes yes none, record,
record
record and
sound.

PN tag name S12 S12 no no

SA signal range I I yes no

SN Station no. I UC yes no 10~49

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

UT dimension S8 S8 no no

6. PO-Pulse Output

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

CN channel no. I USI yes no

CP sample cycle I USI yes no Unit: second

DN device no. I UC yes no

DS S32 S32 no no
tag

1038
APPENDIX 5Data Classes and Item

description

FQ frequent I USI yes no

0-4 (no alarm/


special/urgent
HL duty cycle UI USI no no
/less urgent/
common)

KK KKS code S32 S32 no no

The format of
OF output format UI USI no no
output value

Three kinds of
selection:
operation
OR I B2 yes yes none, record,
record
record and
alarm sound.

PN tag name S12 S12 no no

SN station no. I UC yes no 10~49

terminal row
TC S8 S8 no no
no.

TN terminal no. S4 UI no no

UT dimension S8 S8 no no

7. AM-Internal Analog

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

AH D F no no Positive
upper limit of
range, if

1039
APPENDIX 5Data Classes and Item

alarm alarm is
required:
lower limit of
AL D F no no MU>=HH>=
alarm
AH>=AL>=
LL>=MD;
alarm HH reverse
HH D F no no range is
limit
opposite

alarm LL
LL D F no no
limit

alarm
AP monitor I B2 yes no
condition

current
AV DF F yes no
value

calculation
CP I USI yes no unit: second
cycle

calculation
CT I USI yes no
attribute

alarm
DI recover DF F no no default: 0
dead area

tag
DS S32 S32 no no
description

0-4 (no
alarm/
HH alarm special/urge
H1 UI USI no no
level nt/less
urgent/
common)

upper alarm 0-4 (no


H2 UI USI no no alarm/
level
special/urge
nt/less

1040
APPENDIX 5Data Classes and Item

urgent/
common)

KK KKS code S32 S32 no no

0-4 (no
alarm/
L1 alarm special/urge
L1 UI USI no no
value nt/less
urgent/
common)

0-4 (no
alarm/
L2 alarm special/urge
L2 UI USI no no
value nt/less
urgent/
common)

lower limit of Meet:


MD DF F yes no
range MU>=MD
(positive
range) or:
upper limit of MU<=MD
MU DF F yes no ( reverse
range
range)

The format
output
OF UI USI no no of output
format
value

0: do the
over
check
OP physical I B1 yes yes
1: not do
range check
the check

Three kinds
of selection:
none,
operation
OR I B2 yes yes record,
record
record and
alarm
sound.

1041
APPENDIX 5Data Classes and Item

PN tag name S12 S12 no no

modify
PT DF F no no
pre-limit

SN station no. I UC yes no 10~49

standard
SV DF F yes no
value

UT dimension S8 S8 no no

0:fixed limit
alarm
1:variable
variable
limit alarm,
VA alarm I B1 yes no
implemente
condition
d by
assignment
algorithm

0:not do
variation
rate
variation
calculation
VL rate I B1 yes yes
1:do
calculation
variation
rate
calculation

8. AS-Analog Constant Tag

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

current
AV DF F yes no
value

DS S32 S32 no no
tag

1042
APPENDIX 5Data Classes and Item

description

lower limit of Meet:


MD DF F yes no
range MU>=MD
(positive
range) or:
upper limit of MU<=MD
MU DF F yes no ( reverse
range
range)

The format
output
OF UI USI no no of output
format
value

PN tag name S12 S12 no no

SN station no. I UC yes no 10~49

standard
SV DF F yes no
value

UT dimension S8 S8 no no

9. VI-Value Input

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

upper limit of Positive


AH D F no no
alarm range, if
alarm is
required:
lower limit of
AL D F no no
alarm
MU>=HH>=
AH>=AL>=
HH alarm HH limit D F no no LL>=MD;
reverse
range is
LL alarm LL limit D F no no opposite

1043
APPENDIX 5Data Classes and Item

0: no alarm
monitor;
1:do
monitor
when alarm
monitor tag
is 0; 2: do
monitor
when alarm
monitor tag
alarm monitor
AP I B2 yes no is 0;
condition
3:continues
alarm
monitor;
alarm
monitor tag
name
should be
configured
in condition
1 and 2.

CN channel no. I USI yes no

Unit:
CP sample cycle I USI yes no
second

0: normal
1:over
Multi-measur
tolerance
DF e over I B1 yes no
(set
tolerance
“calculation
error ”)

DN device no. I UC yes no

tag
DS S32 S32 no no
description

0-4 (no
lower alarm alarm/
H1 UI USI no no
level special/urge
nt/less
urgent/

1044
APPENDIX 5Data Classes and Item

common)

0-4 (no
alarm/
upper alarm special/urge
H2 UI USI no no
level nt/less
urgent/
common)

0-4 (no
alarm/
L1 alarm special/urge
L1 UI USI no no
value nt/less
urgent/
common)

0-4 (no
alarm/
L2 alarm special/urge
L2 UI USI no no
value nt/less
urgent/
common)

LN digit I UI yes yes minimum: 1

The format
OF output format UI USI no no of output
value

Three kinds
of selection:
none,
operation
OR I B2 yes yes record,
record
record and
alarm
sound.

PN tag name S12 S12 no no

SN station no. I UC yes no 10~49

TC S8 S8 no no
terminal row

1045
APPENDIX 5Data Classes and Item

no

TN terminal no. S4 UI no no

0:fixed limit
alarm
1:variable
variable alarm limit alarm,
VA I B1 yes no
condition implemente
d by
assignment
algorithm

10. VO-Value Output

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

AV current value DF F yes no

CN channel no. I USI yes no

CP sample cycle I USI yes no unit: second

DN device no. I UC yes no

tag
DS S32 S32 no no
description

LN digit I UI yes yes minimum: 1

Three kinds
of selection:
none,
operation
OR I B2 yes yes record,
record
record and
alarm
sound.

1046
APPENDIX 5Data Classes and Item

PN tag name S12 S12 no no

SN Station no. I UC yes no 10~49

terminal row
TC S8 S8 no no
no

TN terminal no. S4 UI no no

11. DM-Internal Digital

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

alarm
AF I USI yes no
attribute

0: no alarm
monitor;
1: do monitor
when alarm
monitor tag is
0; 2: do
monitor when
alarm monitor
alarm monitor tag is 0; 3:
AP I B2 yes no
condition continues
alarm
monitor;
alarm monitor
tag name
should be
configured in
condition 1
and 2.

AT alarm level I USI yes no Unit: second

calculation
CT I USI yes no
attribute

1047
APPENDIX 5Data Classes and Item

tag
DS S32 S32 no no
description

DV current value I B2 yes no

description of
E0 S8 S8 no no
set 0

description of
E1 S8 S8 no no
set 1

KK KKS code S32 S32 no no

Three kinds
of selection:
operation
OR I B2 yes yes none, record,
record
record and
alarm sound.

PN tag name S12 S12 no no

0:non SOE
attribute
SE SOE attribute I B1 yes no
1:SOE
attribute

SN Station no. I UC yes no 10~49

12. DS-Digital Constant Tag

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

tag
DS S32 S32 no no
description

DV current value I B2 yes no

1048
APPENDIX 5Data Classes and Item

description of
E0 S8 S8 no no
set 0

description of
E1 S8 S8 no no
set 1

PN tag name S12 S12 no no

SN station no. I UC yes no 10~49

13. TM-Time

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

conversion 0:time
CT I B1 yes no
type 1:interval

tag
DS S32 S32 no no
description

time
MS I UI yes no
millisecond

Three kinds
of selection:
none,
operation
OR I B2 yes yes record,
record
record and
alarm
sound.

PN tag name S12 S12 no no

SN station no. I UC yes no

TV time(second) I UI yes no seconds of


date time
from the

1049
APPENDIX 5Data Classes and Item

year 1970

14. DV-Device State Tag

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

0:normal
1:error (total
total load
AC I B1 yes no means
attribute
module or
board)

DN device no. I UC yes no

0:normal
1:invalid
(device
invalid
DQ I B2 yes no configuratio
attribute
n error or
device
offline)

0:normal
Sub read 1:error (sub
DR back I SI yes no means
attribute specific
channel)

tag
DS S32 S32 no no
description

DT device type I UC yes no

current 0: correct
DV I B2 yes no
value 1:fault

LN Link no. I UC yes no

1050
APPENDIX 5Data Classes and Item

LT Link type I UC yes no

0:normal
1:error (sub
total load
MC I USI yes no means
attribute
specific
channel)

PN tag name S12 S12 no no

0:normal
Total read 1:error (total
RC back I B1 yes no means
attribute module or
board)

Lower bit
means
server A,
higher bit
means
server B;
RS run attribute I B2 yes yes
use lower
bit if there is
no
redundancy
0:normal
1:error

0: correct
device
initialization
SI configuratio I B2 yes no
1: error in
n attribute
initialization

SN Station no. I UC yes no 10~49

0: device
nonexistent online
SO I B2 yes no
attribute 1: device
offline

Startup 0:run
SS I B2 yes yes
attribute 1:startup
(set when

1051
APPENDIX 5Data Classes and Item

DBS_OKS
is re-sent)

ST state type I UC yes no

Lower bit
stands for
server A,
higher bit
stands for
server B;
work use lower
SW I B2 yes no
attribute bit if there is
no
redundancy
0:work
server
1:redundac
y

software
VR S32 S32 yes no
version

15. GP-Group Tag

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

tag
DS S32 S32 no no
description

Init reference
FI I USI yes no
tag no.

IN Index no. S4 S4 no no

max tag
MN number in I USI yes no
group

1052
APPENDIX 5Data Classes and Item

PN tag name S12 S12 no no

real tag
RN I USI yes no
number

SN Station no. I UC yes no

16. FM182

Item Type and Length


Item
Description Comment
Name Before After Modify
Download
Compile Compile Online

1:permit
Manual auto
AE I B yes yes 0: not
permit
permit

MAN current
AV DF F yes no
value

MAN output
BS DF F yes yes
offset

open over
C1 I C yes yes
moment

close over
C2 I C yes yes
moment

SLAVE in
DI DF F yes yes
dead zone

Max 32
tag characters/
DS S32 S32 no yes
description 16 Chinese
characters

SLAVE 0:correct
DV I B2 yes no
current value 1:fault

1053
APPENDIX 5Data Classes and Item

MAN quick
FD hand I B yes yes
decrease

1:permit
MAN trace
FE I B yes yes 0: not
permit
permit

MAN quick
FI I B yes yes
hand increase

MAN force
FM I C yes yes
hand switch

regulator
I1 DF F yes yes
output

position
I2 DF F yes yes
feedback

MAN init work


IM I C yes yes
mode

IN MAN input DF F yes yes

MAN range
MD DF F yes yes
lower limit

MAN hand
ME I B yes yes
permit

numerator
of
fraction,0-1
MAN hand
MR DF F yes yes 00. TD and
vary rate
TI varies
according to
it

MAN range
MU DF F yes yes
upper limit

1054
APPENDIX 5Data Classes and Item

numerator
of
fraction,0-1
MAN output
OA DF F yes yes 00. TD and
vary rate
TI varies
according to
it

MAN output
OB DF F yes yes
upper limit

MAN output
OT DF F yes yes
lower limit

Manual
program
PA I B yes yes
control auto
switch

FM182 tag
name in
PN tag name S12 S12 no no device
configuratio
n

can select
from
MAN run manual,
RM I USI yes yes
mode auto, track,
force
manual

SLAVE
RV I C yes yes
reverse value

No. of
station
SN station no. I USI no no
which
FM182 is in

MAN hand
TD I B yes yes
decrease

1055
APPENDIX 5Data Classes and Item

MAN hand
TI I B yes yes
increase

MAN trace
TP DF F yes yes
variable

MAN trace
TS I B yes yes
switch

Can select
from
common,
WM work mode I C yes no
MAN,
SLAVE 1,
SLAVE 2

1056
INDEX
A Control Net.................................................... 10

Action ......................................................... 340 control scheme............................................ 191

Add Module .................................................. 68 curve ........................................................... 126

AI 1029 D

All Log ......................................................... 455 Data ............................................................. 267

AM ............................................................ 1039 Data type ..................................................... 250

anti-virus measures .................................... 674 Database Configuration ................................ 15

AO ............................................................. 1032 DATE ............................................................ 269

AS 1042 Dedicated operator keyboard ..................... 418

B Deleting Project............................................. 11

Basic System ............................................... 467 Device............................................................ 54

blink ............................................................ 115 Device Alarm ............................................... 453

BOOL ........................................................... 267 Device configuration ..................................... 49

Boot Curve .................................................. 130 Device Log ................................................... 466

C DI 1033

CFC .............................................................. 356 DM ............................................................ 1047

Circuit Breaker ............................................ 576 DO ............................................................. 1035

CNET ................................................... 10, 1014 Domain Number............................................ 12

Color box .................................................... 106 Download ............................................ 179, 377

Color Change Feature ................................. 112 draw buttons ................................................. 90

Communication link ...................................... 67 DS 1048

Compare Trend ........................................... 499 DV 1050

Compile ...................................................... 373 Dynamic features .......................................... 78

Constant ..................................................... 276 Dynamic Features ........................................ 111


1057
INDEX

Dynamic Shortcut Define ............................ 149 Graph library ............................................... 105

E Grid ............................................................... 94

Engineer Station ............................................. 7 H

Enumeration ............................................... 274 historical data query ................................... 184

ES Download ............................................... 181 History Tag .................................................. 169

External Library ........................................... 202 HMI ............................................................. 417

F HOLLiAS ........................................................... 2

FBD ............................................................. 332 HOLLiAS MACS .............................................. 11

Feed Forward Compensation...................... 747 Hot point ..................................................... 448

Field Control Layer ........................................ 11 Hysteresis .................................................... 748

Field Control Station ....................................... 7 I

filling ........................................................... 121 I/O device configuration ............................... 66

First-Order Inertance .................................. 741 I/O Module ...................................................... 7

First-Order Lag Compensator ..................... 743 IL 308

Fixed time report ........................................ 167 Import File .................................................. 107

FM182....................................................... 1053 Import Project ............................................... 11

FM197 ........................................................... 22 Increment download ................................... 387

Function .............................................. 300, 305 Initialization download................................ 386

Function Block .................................... 300, 303 Input Change Rate ....................................... 729

Function block instance .............................. 286 Integer ......................................................... 267

G Integral ........................................................ 745

General Trend ............................................. 475 interactive features ..................................... 133

GP 1052 Internal library ............................................ 202

GPS ....................................................... 22, 591 IP address settings..................................... 1025

Graph configuration ...................................... 77

1058
INDEX

L Operation Log.............................................. 464

LD 313 Operator ...................................................... 291

Light Error ................................................. 1015 Operator privilege ....................................... 432

M Operator Station ............................................. 7

Macros ........................................................ 211 P

MACSV_ENG ................................................. 17 PI 1036

MACSV_OPS.................................................. 17 PID controller .............................................. 558

MACSV_SERVER ............................................ 17 PO1038

Main Control Unit ........................................... 7 Popup Window ........................................... 135

MCU ................................................................ 7 POU ............................................................. 297

Message window ............................................ 5 POU Trigger ................................................. 369

MNET .............................................................. 9 power fail safeguard ................................. 1023

Modify Tag Value Online ............................. 142 privilege lock ............................................... 432

Monitoring Net ............................................... 9 Program............................................... 250, 302

move ........................................................... 119 Program Organization Unit .......................... 191

Multi-window display ................................. 637 Project window ............................................... 4

N Q

Network .......................................................... 7 Query-SOE Log ............................................ 187

Network variable ........................................ 646 Query-Trend ................................................ 187

New Project .................................................. 10 R

O REAL ............................................................ 268

Object organizer ......................................... 198 Real time report .......................................... 167

Online operation ......................................... 417 Real-time Tag............................................... 171

OpenOffice .................................................... 19 Redundancy .................................................. 72

Operand ...................................................... 276 Refresh Base Graph Once ............................ 143

1059
INDEX

Report configuration................................... 166 System Device Wizard ................................... 55

rotate .......................................................... 124 System Net ...................................................... 9

Runtime Environment ................................. 417 System Server............................................ 7, 21

S System-Password .......................................... 18

scale ............................................................ 122 T

Set Switch ................................................... 147 Tag Detail..................................................... 537

SFC .............................................................. 336 template ...................................................... 200

Show Tip ..................................................... 145 Text .............................................................. 113

show/hide ................................................... 117 text box ......................................................... 88

Simulating Display ...................................... 149 TIME ............................................................ 269

Simulation Flow Chart ................................ 447 Time Tag ...................................................... 172

single-domain type ....................................... 10 TM ............................................................. 1049

SNET................................................................ 9 Trackball ...................................................... 424

SOE Log ....................................................... 463 Transition .................................................... 340

ST 352 Transition condition .................................... 340

Standard Algorithm Block Symbol .............. 148 Trend ........................................................... 475

Standard Shapes ......................................... 107 Trend Group Settings .................................. 187

Standard Type ................................................. 8 Two-Dimensional Interpolation .................. 731

STANDBY ................................................... 1014 U

Step ............................................................. 338 User custom symbol .................................... 110

String .......................................................... 269 User ID ........................................................... 15

Structure ..................................................... 273 V

Switch base graph ....................................... 137 Value Increase/Decrease ............................. 139

System Configuration...................................... 3 Variable ....................................................... 280

System device configuration ......................... 54 VI 1043

1060
INDEX

View-Simulating............................................ 92 X

VO ............................................................. 1046 X-Y Curve ..................................................... 128

XY Trend ...................................................... 498

1061

You might also like