0% found this document useful (0 votes)
179 views

Graphical Programming Software SCControl User Manual

The document provides an overview, features, and programming guide for AdvanTrol-Pro V2.50 graphical programming software. It describes the software's integrated editors for ladder logic, function block, sequence control, and ST programming. It also covers variable management, module database, project management, debugging tools, and the user interface.

Uploaded by

sugeng wahyudi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

Graphical Programming Software SCControl User Manual

The document provides an overview, features, and programming guide for AdvanTrol-Pro V2.50 graphical programming software. It describes the software's integrated editors for ladder logic, function block, sequence control, and ST programming. It also covers variable management, module database, project management, debugging tools, and the user interface.

Uploaded by

sugeng wahyudi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 476

AdvanTrol-Pro V2.

50
Graphical Programming Software
SCControl
User Manual

SUPCON TECHNOLOGY CO., LTD.


Table of Contents

Table of Contents
Section 1 Graphical Programming..............................................................................................1

1.1 Overview ...........................................................................................................................2

1.2 Performance And Features................................................................................................2

1.3 Programming Guide ..........................................................................................................4

1.3.1 Summary .................................................................................................................5

1.3.2 Project Management ...............................................................................................5

1.3.3 Function Block Diagram (FBD) Language .............................................................18

1.3.4 Ladder Diagram (LD) Language............................................................................26

1.3.5 Sequence Control Diagram ...................................................................................40

1.3.6 ST Language.........................................................................................................52

1.4 Graphical Programming User Guide................................................................................92

1.4.1 Running Environment............................................................................................92

1.4.2 Introduction Of Programming Interface .................................................................92

1.4.3 Introduction Of Menu Items ...................................................................................96

1.4.4 Description Of Variable Type ...............................................................................108

1.4.5 Project Design .....................................................................................................109

1.4.6 File Structure ....................................................................................................... 111

1.4.7 On-line Debugging .............................................................................................. 111

1.4.8 Password Protect ................................................................................................ 113

1.5 Graphical Programming Module Database.................................................................... 115

1.5.1 IEC Module Database ......................................................................................... 116

1
Table of Contents

1.5.2 Assistant Module Database .................................................................................267

1.5.3 Attach Module Database .....................................................................................419

2
Graphical Programming software SCControl

Section 1 GRAPHICAL PROGRAMMING


Graphical programming software is an important part of SUPCON
Distributed Control System. Designed on the basis of Windows operation
system, it fully makes use of advantages of Windows operation system and
has friendly user interface.

Overview

Describing control process by means of graph, so as to solve the


complexity of control process configuration, graphical programming makes
control engineers concentrate on control scheme.

Performance and features

Graphical programming is integrated with LD editor, FBD editor, SFC editor


and ST editor, data type editor, variable editor and DFB editor. Adopting
project documentation, it provides a powerful tool that is used to realize
program reuse and structuring.

Programming guide

Programming of graphical programming contains LD language


programming, FBD language programming, SFC language programming
and ST language programming. As the most important editors, FBD editor,
LD editor, SFC editor and ST editor compose a powerful programming
environment together with variable editor, data type editor and DFB editor.

Use guide

In use guide, it introduces running environment and work interface of


software and how to use menu function, diagram function module and other
tools to do LD, FBD, SFC and ST language programming favorably.

Module database

Module is function block of graphical programming. Graphical programming


software provides about 200 essential modules, including IEC module and

1
Graphical Programming software SCControl

not IEC module for users to select. Additionally, users can use
self-designed user-defined module.

1.1 OVERVIEW

Graphical programming software (SCControl), as an integrated graphical


programming tool, is the system control scheme configuration tool for
SUPCON DCS (Distributed Control System) Series. SCControl, one of the
important parts of the SUPCON DCS software package, provides users
with an effective graphical programming environment according to
IEC-61131-3 standard, and works with SCKey (System configuration
software) to complete the whole system configuration. SCControl is
designed and based on Windows Operating System and fully makes use of
its advantages, so it has the friendly user interface.

Configuration of SCControl is made with graphical user interface. For users,


only basic Windows operation skills are required.

SCControl provides flexible online debugging function and users can


observe program's running in detail.

SCControl provides perfect online help. During graphical programming,


users can get a full support from the context online helps simply through
clicking mouse or F1.

1.2 PERFORMANCE AND FEATURES

SCControl is integrated with LD editor, FBD editor, SFC editor, ST editor,


data type editor, variable editor and DFB editor. All editors use current
menus such as File, Windows, Help, etc. Special menus and toolbars of
different editors can be switched automatically.

Configuration of SCControl in graphical manner is very easy. When


connecting objects (function block, coil, contact, step, conversion etc.) in
various editors, syntax check is conducted during connection process and
irrelevant links of different data type will be forbidden when editing. Some
functions provided by SCControl like remarks and object alignment can
improve graphical program's appearance.

2
Graphical Programming software SCControl

SCControl adopt document management method with engineering.


Through import and export function, user can reuse code and data type in
different projects.

SCControl DFB supplies a mightiness function tool with realization program


and structuring.

Features of SCControl:

1. Has Windows friendly graphical interface, you can use both keyboard
and mouse to edit. All functions on toolbars have text prompts.

2. Editing environment adopts project file manager, which manages


multiple graphical files. It is easy to operate for user.

3. Configuration objects can be placed flexibly with automatic grids aligned.


Contacts, coils, functional blocks and variables can be remarked with
text.

4. Figure-drawing is based upon vectors with functions of block cut, copy,


paste and delete etc, which gets twice the result with half the effort.

5. With functions of last operation undo and resume, enhancing


programming efficiency.

6. Intelligent connection handling. For modules with matched data type


connection will be done automatically when pins are close to each other.

7. Dynamically check data type while connection and reject it if data types
aren't matched.

8. Powerful find and replace functions. You can find and mark variable,
constant, tag and module in either current program section or the whole
project. Users just click relative info to jump into required location
directly. It is the same for replace function. You can replace selected
variable, constant, tag and module one by one or totally in either current
program section or the whole project.

9. Provide function of Zoom, which enables users to look over pages more
clearly or see more contents in page according to zoomed-out

3
Graphical Programming software SCControl

proportion.

10. Software manages user defined tag and variable, user needn't care
physical memory address.

11. You can use system-defined essential function block (EFB) and
user-defined function block (DFB) in each editor. Every editing
environment is embedded with user-defined function block (DFB) editor,
which enhances program's reuse and reduces programming work
greatly.

12. The user can use EFB and DFB to create new DFB, which holds
powerful function expansibility and is easy for user's re-development.

13. The user can reuse function module by function of import and export.

14. The user can create user-defined data type through data-type editor.

15. Function block editor (FBD), ladder diagram editor (LD), and sequential
function chart (SFC) editor are integrated together, that can be called
each other, and they have powerful function expansibility.

16. Provide online debugging function.

17. Powerful online help function.

1.3 PROGRAMMING GUIDE

The programming of SCControl includes LD language programming, FBD


language programming, ST language programming and SFC language
programming. Programming flow includes creation of project, paragraph,
section, edition of program section, compilation and connection of project,
etc.

In graphical programming software, as the most important editors, FBD


editor and LD editor, and variable editor, data type editor and DFB editor
compose a powerful programming environment.

Users can do on-line debug. They can import the outer existing useful LD
and FBD program into project, and they can provide other projects with the

4
Graphical Programming software SCControl

practical file or other files that can be used in other projects of the project
through export operation to fully realize code reusing.

1.3.1 SUMMARY

Programming language of graphical programming includes function block


diagram, ladder diagram, sequence control chart and ST language, which
support international standard data type subset IEC61131-3. Users can
generate their data type by data type editor.

Every project in graphical programming corresponds to one control station.


One project contains many sections each of which can only select one
editor. According to standard of IEC61131-3, the essential element of FBD
programming language is function block, while the essential elements of LD
contain not only function block but also contact and coil. The essential
elements of SFC programming language are transition, step and jump. The
essential elements of ST programming language contain not only ST syntax
but also can call system functions. Different sections' execution period and
execution sequence in project can be appointed.

Graphical programming provides following editors:

‰ FBD Editor

‰ LD Editor

‰ SFC Editor

‰ ST Editor

When generating sections, users can appoint the type of section which
determines to use which editor. Except for editors related to programming
language, there are:

‰ Data type Editor

‰ Variable Editor

1.3.2 PROJECT MANAGEMENT

Introduce as follows:

5
Graphical Programming software SCControl

‰ Project

‰ Section

‰ Block

‰ Variable

‰ Remark Text

‰ Debugging Text

1. Project

Graphical programming software (SCControl) uses a project to describe all


programs in a control station. A project includes one or multiple sections.
Each project corresponds only to one control station and the project must
specify the address of corresponding control station. SCControl manages
lots of section files through project and keeps configuration info in project
file.

2. Section

Section normally means an archive and is the essential unit of a project.

Users must specify section's editing type and program type when creating a
new section.

According to editing type, sections can be classified into the following:

‰ FBD Section

‰ LD Section

‰ SFC Section

‰ ST Section

According to program type, sections can be classified into the following:

‰ Program Section

‰ Module Section

6
Graphical Programming software SCControl

To choose editing type is to choose what kind of editor for programming. To


choose program type is to choose creation of an executable program or
entering DFB editor for creating a DFB module.

3. Section management

Choose “Section Management” in “Project” menu to get into the dialog of


“Section Management”, shown as Figure 1-1.

Figure 1-1 Dialog of Section Management

You can click “New” to create a new section, which is the same with “New
Section” in “File” menu, shown as Figure 1-2.

Figure 1-2 Create a new section

Select a section, and then open this section through button of “Open”.

Select “Open Section” in “File”. Pop-up a dialog of “Open section”, then

7
Graphical Programming software SCControl

select the section required to open. Press “Open” button to open this
section, shown as Figure 1-3.

Figure 1-3 Dialog of Open section

Directly double click corresponding section name in Project column


(Workspace) to open that section is also OK, shown as Figure 1-4.

Figure 1-4 Project column (Workspace)

In the dialog of “Section Management”, click “Delete” to delete it after


selecting the section you want to delete.

8
Graphical Programming software SCControl

In column of project, select the section you want to delete, right-click to pop
up a floating menu, then select “Delete Section” to delete this section,
shown as Figure 1-5.

Figure 1-5 Section Operations

In the dialog of “Section Management”, select the section you want to


export, and then click “Export” to export this section to a file, shown as
Figure 1-6.

Figure 1-6 Section export

The export file name must be “*.exp”.

In column of project, choose the section you want to export, right-click to

9
Graphical Programming software SCControl

pop up a floating menu, then select “Export Section” to export this section.

In the dialog of “Section Management”, click “Import” to import a section to


project from file, shown as Figure 1-7.

Figure 1-7 Import section

When selecting one or multiple sections to export in the dialog of “Section


Management”, the user should specify the file name to save the exported
section. SCControl first checks all sections and it will automatically add
them if these sections include unselected DFB. Then SCControl checks
data type of variables contained in all sections and it will automatically add
them if it finds those data types are derived from user-defined data types.
During exporting, select created export file, and the contained data types
and sections will be added into project. During importing, it will remind the
user of replacing, keeping or changing if conflicts of section name are
found.

In the dialog of “Section Management”, click “Modify” to modify a section


name, shown as Figure 1-8.

Figure 1-8 Modify Section properties

4. Task management

If there are several programs, the execution period and execution

10
Graphical Programming software SCControl

sequence of program section will affect program’s running result. Select


“Task Management” in “Project” menu to pop up the dialog of “Task
Management” to setting execution period and execution sequence, shown
as Figure 1-9.

Figure 1-9 Task management

SCControl takes the control period setting in system’s configuration


software as 1Ts, i.e. if the control period setting in system’s configuration
software is 0.5s, then 1Ts=0.5s.

The user can also make use of some operations like “Move Top”, “Move
Up”, and “Move Down” and “Move Tail” to set up running priority of all
programs during the same running period, i.e. the program with the same
period in the front of queue will get preferential running. The priority among
programs with different running period cannot be compared.

5. Block

A block is sum of elements interconnected by data signals in the same


section. A section can include one or multiple blocks (SFC section can have
only one block).

In a block, the execution sequence of EFB or DFB is decided by data

11
Graphical Programming software SCControl

stream in the middle of block. The part into which singly-connecting


variable, tag or constant can be input in FBD block, or into which
singly-connecting variable, tag, constant or left power rail can be input in LD
block, or which acts as starting steps in SFC block, is called Starting
Module of a block. If there are multiple starting modules in a block, the top
one in a diagram region is called Startup Module. The execution of block
starts from startup module and continues step by step according to
requirements of data stream.

The execution sequence of blocks in one section is decided by location of


block’s startup modules in diagram region. The top startup module gets
priority in execution.

6. Data type

Data type Key word Length of Byte Range

Boolean BOOL 1 0~255

Word WORD 2 0 ~ 65535

Double word DWORD 4 0 ~ 4294967295

Integer INT 2 -32768 ~ +32767

Unsigned Integer UINT 2 0 ~ 65535

-2147483648 ~
Long Integer LONG 4
2147483647

Unsigned Long
ULONG 4 0 ~ 4294967295
Integer

Semi Float SFLOAT 2 -7.9997 ~ +7.9997

±1.175490351E-38 -
Float FLOAT 4
3.402823466E+38

Structure StructAcccum 8

7. Accumulate type

Accumulate type variable can be defined directly in program. It is one kind


structure type provided by system. That is structAccum. The definition of

12
Graphical Programming software SCControl

this structure is as following:

struct structAccum
{
sfloat remainder; //remainder
long accum; //accum
int reserved; //reserved, forbid for use
}

From the definition, we know that accumulate type variable contains three
members: remainder, accum and reserved. Therein, the remained part is
forbidden to use, remainder represents fractional part of accumulate, and
accum represents the integral part of accumulate. When remainder
exceeds representing range, it will carry to accum automatically.

Analog accumulate

It is frequently used in project, including two parts, as following:

sum1 sum0

Therein, sum1 occupies 32 digits, so it is long integer; sum0 occupies 16


digits and it is sfloat, which has no symbol 12 digits' fixed-point fractions
and 4 digits' integral part. When the analog accumulates to exceed the
indicated range of sum0 (0-15.999), it will carry into sum1 automatically.

For example: accum=12.123443, accum.sum0=12.123443,


accum.sum1=0.

accum=34.457638, accum.sum0=2.457638, accum.sum1=2. Because


sum1 starts from the seventeenth digit, sum1 equals 2 means 2 multiplies
16 equal to 32 actually.

8. Data type memory mode

In computer, all data shown with binary system

BOOL: One byte, zero is FALSE, not zero is TRUE;

WORD: Two bytes, account for 16 bits, unsigned;

13
Graphical Programming software SCControl

DWORD: Four bytes, account for 32 bits, unsigned;

INT: Two bytes, account for 16 bits, tiptop bit is sign bit, 0 is positive, 1 is
negative;

UINT: Two bytes, account for 16 bits, unsigned;

LONG: Four bytes, account for 32 bits, tiptop bit is sign bit, 0 is positive, 1 is
negative;

ULONG: Four bytes, account for 32 bits, unsigned;

SFLOAT: Two bytes, account for 16 bits, use fix point way shown. In fix
point shown, binary system decimal place always fix up can't change. The
decimal can fix up before numerical value bit, also can fix up after
numerical value bit. First entitle fix up point decimal notation, second entitle
fix up integer notation. SFLOAT fix up point decimal N commonly shown
form is:

Symbol bit Integer bit Mantissa

There into, number symbol account for 1 bit, 0 is positive, 1 is negative ;


integer bit account for 3 bits; mantissa account for 12 bits.

FLOAT: Four bytes, account for 32 bits, shown with floating point. When in
floating point shown binary system, the decimal place is floating, can't fixed.
Always any binary system can be written to:

N=2P*S

In model, S is mantissa of binary system, commissary actual value of N; P


is ladder code of N, can decide decimal place. So, any sign number N
make up of ladder code and mantissa. Ladder including ladder sign and
ladder code, mantissa is make up of number sign and mantissa . That form
is:

Ladder sign Ladder code Number sign Mantissa

There into, ladder sign account for 1 bit, ladder sign = 0 ladder code is

14
Graphical Programming software SCControl

pulse, ladder sign = 1 ladder code is negative ;ladder code account for 7
bits ,number sign account for 1 bit , number sign = 0 this number is pulse,
number sign = 1 this number is negative; mantissa is 23 bits.

9. Variable

Variable contains the data that is appointed name and in or between block,
and the tag number that does the data transformation between operating
station and control station.

According to organization form, variable is classified into:

‰ Basic variable

‰ Composite variable

The data type of basic variable is the basic data type while the data type of
composite variable is composite data type that is generated through data
type editor combined by basic data type and existing composite data type.

According to effect relation, variable is classified into:

‰ Global variable

Global variable means variable shared among sections. After declaration of


global variable in project, it can be accessed in all sections. Once declared,
global variable will be assigned a fixed control station address and put into
system data area, in which current data can be kept till next control period.

‰ Private variable

Private variable can be declared in programs. Once declared, private


variable will be assigned a fixed control station address and put into system
data area, in which current data can be kept till next control period. The
difference between private variable and global variable is that private
variable can be accessed only in the section where it is declared and that it
is invisible for other sections. The effect range of variable is limited in
current section. Variable package is in favor of user programming.

‰ Input variable and output variable

15
Graphical Programming software SCControl

In DFB section (the section whose project attribute is appointed as module),


input variable and output variable can be declared. Set up DFB's external
interface by specifying input variable and output variable. System does not
assign control station memory to input variable and output variable.

In DFB section, private variable can declared. However, the private variable
in this section will be assigned control station address only when DFB is
being used. Every time DFB is used, private variable will be created. DFB is
like a class that can create multiple examples while private variable is like
the member. The member address of each example is different. The private
variable in DFB section has no relation with DFB external interface and is
invisible for DFB's external. It is mainly used to save the data that needs to
keep current status to the next control period.

When using FFB that contains private variable to create new DFB, new
DFB will inherit the private variable contained in FFB. While the private
variable in DFB section ensures the reuse of DFB, it satisfies the controlling
requirement that is related to sequence in time.

System still contains one kind hot backup variable that is invisible for users.
Hot backup variable is the synchronous data between dual master control
card when DCS system is configured into dual master control card hot
redundancy. For example, integral module contains one hot backup
variable that is current value of synchronous integral. Thus, when host
computer switches, it ensures non-disturbance switching. System's security
is fully ensured through the mode that is from hot redundancy to module.

Hot backup variable is contained in all EFB modules that are related to time
and have accumulating effect.

When using FFB that contains hot backup variable to create new DFB, new
DFB will inherit the hot backup variable in DFB.

10. Remark text

Remark text adds remark info into programs, which increases program’s
readability. The size of text object lies on the length of text. According to the
size of text font, making more grids horizontally and vertically can extend

16
Graphical Programming software SCControl

the size of object. Remark text doesn’t occupy the memory of control
station. The font and color of remark text can be set.

11. Debugging text

Debug text is the text that displays actual value of variable or tag in control
stations under online status. Users can manipulate data in control stations
through debugging text. It is convenient to debug programs and monitor
system running. Debugging text doesn’t occupy the memory of control
station. The interface of "Property” is shown as Figure 1-10.

Figure 1-10 Debugging text

12. Find and Replace

The interface of “Find” is used to find user required info (Such as modules,
words, variable names, etc.). User can fill in by itself and find the required
info through browsing according to different types and data sources.

Press CTRL+F or use the command of “Find” in “Edit” menu to enter the
dialog of “Find”. Shown as Figure 1-11

Figure 1-11 Find

User can find variable and module though the function of find. Select
current section, then find target in current open section. Select current
project to find whole project. Click “Find next”, then mouse will jump to the

17
Graphical Programming software SCControl

next available target and highlight it. Click “Mark”, then all available targets
will display in info column (Output). Double click target info to open the
section target lies in and jump to target location.

Press CTRL+H or use the command of “Replace” in “Edit” menu to enter


the dialog of “Replace”, shown as Figure 1-12.

Figure 1-12 Replace

Click the button of “Find next” and mouse will jump to next available target
and highlight it. Then click “Replace”, and found target will be replaced by
replacing target. If click “Replace All”, then all qualified found targets will be
replaced.

1.3.3 FUNCTION BLOCK DIAGRAM (FBD) LANGUAGE

FBD editor makes essential function block (EFB) and signal (variable, tag
No.) composing into function block diagram (FBD) according to IEC1131-3.
EFB and variable can add remarks, essential element and text can be
placed freely in function block diagram. Parts of EFB's inputs can be
expanded for convenient use.

In FBD editor the background of window is coordinate grid. When creating,


function block will align in grid. If a new creating function block overlapped
with other function block, then will appear error information and this function
block isn't created. When actual parameters are created with input or output
pins of function block, may be overlapped with other object but doesn't
affect section graph. If one link connects with other function block, it should
be checked. If the link is not allowed, it will not be created.

Except these objects remark text and debugging text can be placed in FBD
section. Text size determines the size of text object. According to text size,

18
Graphical Programming software SCControl

object size can be extended by vertical and horizon grids.

1. FBD editor

According to IEC1131-3, FBD editor combines essential function/function


block (EFB) and signals (variable, tag) into function block diagrams (FBD).
EFB and variable can be explained with remarks. Essential elements and
texts can be freely placed in diagrams. Parts of EFB inputs can be
extended for convenient use.

There have already been some predefined EFB module databases that
contain about 200 essential modules in the graphical programming. Therein,
the modules are composed into different groups. Databases include:

‰ IEC database

It includes the function blocks in IEC61131-3, including arithmetic operation,


mathematics operation, logical operation, conversion, selection, trigger,
counter and timer.

‰ Assistant module databse

Include control module, communication assistant, cumulative function,


input manage and hybrid operation.

In FED programming, users can use the essential function block and
user-defined function block.

The user-defined modules generated by DFB editor are placed in custom


module database. After added into the module database, DFB can be used
by all kinds of language editors.

19
Graphical Programming software SCControl

Figure 1-13 Illustration of function block

2. FFB

FFB is a general designation of essential function blocks (EFB) and


user-defined function blocks (DFB). EFB is described through the diagram
frame with input and output. Input is on the left of diagram frame while
output on the right. The function name of function blocks appears in the
middle of diagram frame. The instance name of function blocks appears
above the diagram frame. The instance’s name of module is unique in the
same project.

All function blocks can be configured through one EN input and one ENO
output.

A function can not be executed when the value of EN equals 0 during


calling functions and the value of ENO is setting as default 0. A function will
be executed when the value of EN is 1, after executing, the value of ENO is
setting as default 1.

If EN is not required, then the pins of EN and ENO can be hidden. The
follows are the module diagrams with and without EN & ENO, Shown as
Figure 1-14.

Figure 1-14 Module diagrams

20
Graphical Programming software SCControl

FFB’s input/output relations will not be affected by ENO.

Both EFB and DFB can include private variable and hot backup variable.
When editing DFB, the user can add private variable. FFB’s private variable
and hot backup variable are transparent to users during reference.

3. Actual parameters

During running program, values from procedures and other data are
transferred through actual parameters to FFB. Actual parameters include
variable, tag and constant.

The data type of actual parameters should coincide with the type of
connected pins.

4. EFB Database

SCControl offers some essential function blocks, which includes such


modules:

‰ Arithmetic operation, such as ADD, SUB, MUL, DIV

‰ Comparison operation, such as GE, LT, NE

‰ Conversion operation, such as INT_TO_LONG

‰ Mathematics function, such as SIN, EXP, LOG

‰ Logical operation, such as AND, OR, XOR

‰ Selection operation, such as MUX, LIM

‰ Counter, timer, trigger, such as TON

‰ Cumulative function, such as ACCUM_TO_SUM

‰ Communication assistant function, such as GETBIT

‰ Control module, such as BSC,CSC

5. Link

Link is the connection among function blocks. One output of function block

21
Graphical Programming software SCControl

can link several inputs of function blocks. The input/output needing link
should have corresponding data type. It is allowed that link is overlapped
with other objects. Link cannot be used in circular configuration. Actual
parameters have to be added to solve problems under this kind of cycle,
shown Figure 1-15.

In LD section, when contact is close to left busbar as well as contact and


contact is close to contact and coil, link is created automatically.

Figure 1-15 Wrong connection

Solutions

Figure 1-16 Correct connection

6. Execution sequence

The part into which singly-connecting variable, tag or constant can be input
in FBD block is called Starting Module.

If there are multiple starting modules in a block, the top one in diagram
region is called Startup Module.

The execution of block starts from startup module.

The execution sequence in FBD block is decided by data stream in the


block.

The execution sequence of blocks in FBD section is decided by location of


block’s startup modules in diagram region. The top startup module gets
priority in execution.

22
Graphical Programming software SCControl

The following Figure 1-17 indicates the execution sequence of function


blocks.

Figure 1-17 Execution sequence

7. FBD language programming

FBD language programming is divided into creating new project, creating


new program section, programming of program section, compilation and
connection of project, etc.

‰ Create a new project

In the programming environment of graphical programming software, click


"file" item in the menu. Choose "new project" in the ejected menu and click
it, then it will eject a dialog box of "new project":

Figure 1-18 Create a new project

23
Graphical Programming software SCControl

Through browsing, users can select the reserving place for the project. Fill
in the project name in file name frame (project file takes .prj as suffix) and
click the save button, then a new project is created. Click “Cancel” button,
will give up creating work of current project.

In the programming environment of graphical programming software, users


can create multiple projects simultaneously that can be displayed in the
workspace.

‰ Create a new program section

After creating a new project successfully, it still requires to create one or


more program sections.

In the programming environment of graphical programming software, click


"file" item in the menu. Choose "new section" in the ejected menu and click
it, then it will eject a dialog box of "New Program Section":

Figure 1-19 Create a new section

Choose "FBD" namely FBD language type in the dialog box of "Program
Type".

Then users can choose either program or module from the two section
types:

1) Program--it can run independently. It includes one or more


modules;

2) Module--it equals a subroutine of common high-level language.


Instead of running independently, it can work only through called by
other programs.

24
Graphical Programming software SCControl

After selecting section type according to particular requirement, users fill in


program section name in the frame of section name, click “OK” button.
Then users have created a new program section successfully. Click
“Cancel” button to give up the creating work of current program section.

If user has already created or opened more than one project, he should pay
attention to activate the corresponding project (to confirm that click this
project name first) when creating a new program section, in order to avoid
creating it under other projects.

‰ Programming of program section

FBD editor is used to arrange essential function/function block (EFB) and


signals (variable) into function block diagram. Programming of FBD
language is similar to LD language. However, FBD programming does not
require logical row starting from the bus by contact input, yet it can apply a
lot of function blocks according to programming principle.

FBD programming language forms program sections into some essential


function and essential function blocks, export function blocks and
user-defined blocks. They are connected with practical parameters or links.

3) Essential element

Function and function block (when connected, they become logic unit)

4) Programming principle

a. Variable must be declared before using;

b. Input and output types must be the same;

c. Function block and variable could have remarks;

d. It does not allow forming circle through link.

5) Programming skill

For complicated or large FBD programming, user should split program into
simple program section first, then program one by one.

25
Graphical Programming software SCControl

‰ Compilation and connection

After programming, user save project in disc and then call on compilation
instruction to compile project; debug until the compilation is correct. Then
call the instruction of "Control Station Address", and it will eject a dialog
box:

Figure 1-20 Set address

Users fill in the master control board address of the control station and click
“OK”; then click menu item "connect" or the button to connect with the l
control station.

1.3.4 LADDER DIAGRAM (LD) LANGUAGE

According to IEC61131-3, LD editor combines essential function/function


blocks (EFB), coils, contacts and signals (variable, tag) into ladder
diagrams (LD). Essential elements and remark texts can be freely placed in
LD. Part of EFB inputs can be extended for convenient using.

Figure 1-21 LD editor

26
Graphical Programming software SCControl

The design of LD section corresponds to relay switch's ladder level (rung).


On the left of LD is power rail, which corresponds to the phase line (L) of
ladder level. Only elements that are directly or indirectly connected to
phase line in digital values can be "scanned" during programming. The right
power rail is not drawn up in default. However, it can be considered that all
coils and FFB digital value outputs are connected to the right power rail to
establish current loop.

In LD programming, users can use essential function blocks, user-defined


function blocks, coils and contacts.

User-defined modules generated by DFB editor are placed in custom


module database. DFB can be used by kinds of language editors after
adding to module database.

In LD editor the background of window is coordinate grid. When creating,


function block or coil and contact will align in grid. If a new creating function
block overlapped with other function block, then will appear error
information and this function block can not be created. When practical
parameters created with input or output pins of function block, may be
overlapped with other object but doesn't affect section graph. If a link
connected with another function block, then should examine this
connection. If it isn't allowed, this link will not be produced. If contact is near
to left bus, link will be produced automatically. Contact with contact and
contact with coil, if they are near each other, then link will be produced
automatically.

Except these objects, remark text and debugging text can be placed in LD
section. The size of text depends on the length of text. According to the
contents of text, it will occupy more or less grid in vertical or horizontal
direction. Text doesn't occupy memory of control station.

Introduce as follow:

‰ LD editor

‰ Contact

‰ Coil

27
Graphical Programming software SCControl

‰ FFB module

‰ link

‰ Execution sequence

‰ Import and Export

‰ Project file management

‰ LD programming

1. LD Editor

LD editor combines essential function/function blocks (EFB), coils, contacts


and signals (variable, tag) into ladder diagrams (LD) according to
IEC61131-3. Essential elements and remark texts can be freely placed in
diagrams.

The design of LD section corresponds to relay switch's ladder level (rung).


On the left of diagram is power rail, which corresponds to the phase line (L)
of ladder level. Only elements that are directly or indirectly connected to
phase line in digital value can be "scanned" during programming. The right
power rail is not drawn up in default. However, it can be considered that all
coils and FFB digital value output are connected to the right power rail to
establish current loop.

In LD programming, the user can use essential function blocks,


user-defined function blocks, coils and contacts.

28
Graphical Programming software SCControl

Figure 1-22 LD editor

2. Contacts

Contact is essential element of LD. It transfers status to the horizontal link


on the right. This status is the result of Boolean operation between status in
the horizontal link on the left and status of related variables. Contacts don’t
change the values of related variables.

‰ Normal-open contacts

‰ Normal-close contacts

‰ Positive-transition contacts

‰ Negative-transition contacts

1) Normal-open contacts

In normal-open contacts, if status of related Boolean variable is ON, status


of left link will be copied to right link. Or, otherwise, status of right link will be
OFF.

The following diagram uses LD and FBD to describe a normal-open


contact.

29
Graphical Programming software SCControl

Figure 1-23 Normal-open contacts

The following diagram describes the principle after normal-open contacts


are connected with vertical line.

Figure 1-24 Normal-open contacts

2) Normal-close contacts

In normal-close contacts, if status of related Boolean variable is OFF, status


of left link will be copied to right link. Otherwise, status of right link will be
OFF.

Figure 1-25 Normal-close contacts

Normal-close contacts correspond to function of AND_BOOL with two


inputs, of which one input is opposite in phase.

3) Positive-transition contacts

30
Graphical Programming software SCControl

In positive-transition contacts, if status of related Boolean variable jumps


from OFF to ON, and at the same time status of left link is ON, then status
of right link in next period will be ON. Otherwise, status of right link will be
OFF.

Figure 1-26 Positive-transition contacts

4) Negative-transition contacts

In negative-transition contacts, if status of related Boolean variable jumps


from ON to OFF, and at the same time status of left link is ON, then status
of right link in next period will be ON. Otherwise, status of right link will be
OFF.

Figure 1-27 Negative-transition contacts

3. Coils

Coil is element of LD. It transfers status of the horizontal link on the left to
the horizontal link on the right. Status of related variables will be saved.

‰ Normal-open coils

‰ Normal-close coils

‰ Set coils

‰ Reset coils

‰ Positive-transition coils

31
Graphical Programming software SCControl

‰ Negative-transition coils

1) Normal-open coils

In normal-open coils, status of left link will be copied to related Boolean


variable and right link. Coils are usually behind contacts, but they can also
be followed by point unit. Normal-open coils are related to function of
MOVE.

Figure 1-28 Normal-open coils

2) Normal-close coils

In normal-close coils, status of left link will be copied to right link. Neg.
status of left link will be copied to related Boolean variable. If status of left
link is OFF, then status of right link will be OFF while related variables will
be ON.

Figure 1-29 Normal-close coils

Normal-close coils correspond to function of MOVE with inverted output.

3) Set coils

In set coils, status of left link will be copied to right link. If status of left link is
ON, then related Boolean variable will be set as ON, otherwise it will keep
unchanged until it is changed by program or people. Related Boolean
variable can be reset under the help of reset coils. Set coil corresponds to
output of MOVE function and will always keep ON.

32
Graphical Programming software SCControl

Figure 1-30 Set coils

4) Reset coils

In reset coils, status of left link will be copied to right link. If status of left link
is ON, then related Boolean variable will be set as OFF, otherwise it will
keep unchanged until it is changed by program or people. Related Boolean
variable can be set under the help of set coils. Reset coil corresponds to
output of MOVE function and will always keep OFF.

Figure 1-31 Reset coils

5) Positive-transition coils

In positive-transition coils, status of left link will be copied to right link. If


status of left link jumps from OFF to ON, then related Boolean variable will
be ON in next period. Positive-transition coils correspond to the function
block of R_TRIG.

33
Graphical Programming software SCControl

Figure 1-32 Positive-transition coils

6) Negative-transition coils

In negative-transition coils, status of left link will be copied to right link. If


status of left link jumps from ON to OFF, then related Boolean variable will
be ON in next period. Negative-transition coils correspond to the function
block of F_TRIG.

Figure 1-33 Negative-transition coils

4. Link

Link is the connection among function blocks. Output of one function block
can link input of several function blocks. The data type of input/output
needing link should be corresponding data type. It is allowed that link is
overlapped with other objects. Link cannot be used in circular configuration.
cycles must be solves by actual parameters.

When contacts approach left power rail, link will be established


automatically. When contacts approach contacts or contacts approach coils,
link will also be established automatically.

34
Graphical Programming software SCControl

Figure 1-34 Wrong connection

Solutions

Figure 1-35 Correct connection

5. Execution sequence

The module, inputs of which only connect variable, tag or constant, in LD


section is called Starting Module of section.

If there are multiple starting modules in a section, the top one in diagram
region is called Startup Module.

The execution of section starts from startup module.

The execution sequence in LD section is decided by data stream in the


section.

The execution sequence of sections in LD region is decided by location of


section's startup modules in diagram region. The top startup module gets
priority in execution. Shown as follow:

35
Graphical Programming software SCControl

Figure 1-36 Execution sequence

6. LD language programming

LD language programming is divided into creating new project, creating


new program section, programming of program section, compilation and
connection of project, etc:

‰ Create a new project

In the programming environment of SCControl software, click the menu


item "file" and choose "new project" from the ejected menu pop. Then click
it and it will eject a dialog box of “New Project”:

36
Graphical Programming software SCControl

Figure 1-37 Create a new project

Through browsing, users can choose the reserving place of project. Fill in
project name (project name takes .prj as the suffix) in file name frame and
click button "Save", a new project is created successfully. Click button
“Cancel” to give up the creating work of the current project.

In the programming environment of SCControl software, users can create


more than one project that can be displayed in the workspace
simultaneously.

‰ Create a new program section

After creating a new project successfully, users need to create one or more
than one program sections.

In the programming environment of SCControl software, click the menu


item "file" and choose "New Program " from the ejected menu pop. Then
click it and it will eject a dialog box "New Program Section":

37
Graphical Programming software SCControl

Figure 1-38 Create a new section

Choose "LD" namely LD language type from "Program Type" in the dialog
box.

Then users can select either program or module.

7) Program--it can run independently, including one or more than one


modules;

8) Module--it equals a subroutine of common high-level language.


Instead of running independently, it can work only through called by
other programs.

After select section type according to particular requirement, users fill in


program section name in the frame of section name, click “OK”. Then users
have created a new program section successfully. Click “Cancel” to give up
the creating work of current program section.

If user has already created or opened more than one project, he should pay
attention to activate the corresponding project (to confirm that click this
project name first) when creating a new program section, in order to avoid
creating it under other projects.

‰ Programming of program section

LD editor is used to arrange essential function/function block (EFB), contact,


coil and signal (variable) into ladder diagram. As a tool of graphical
programming, SCControl can be used by users for it provides a lot of
function block, coil, contact etc. By meaning of the operations, such as
selection, dragging, placing, and moving, and take advantage of essential

38
Graphical Programming software SCControl

function block to create user-defined function block to complete series


programming easily.

1) Essential element

Function, function block, contact and coil

2) Programming principle

a. Variables must be declared before used;

b. Each logic row must start from left bus with contact input;

c. Using number of contact is unlimited;

d. EFB, contact, coil and variable could have remark;

e. When producing link, overlap and cross are permitted.

1) Programming skill

For complicated or large FBD programming, user should split program into
simple program section first, then program one by one.

2) Compile and connect

After programming, users save project in disc and then call on compilation
instruction, compiling project, debug until the compilation is correct. Then
call the instruction of "Control Station Address", and it will eject a dialog
box:

Figure 1-39 Set address

Users fill in the master control board address of the control station and click
“OK”, click menu item "connect" or the button to connect with the lower
computer.

39
Graphical Programming software SCControl

1.3.5 SEQUENCE CONTROL DIAGRAM

Elements and structure used in SFC editor

‰ Step

Step is a control program that is used to execute set action. Action is a


group of assign statement that could be used to assign the parameter of
normal control module. There are three types of steps: Start Step, Normal
Step and End Step. Each SFC module has one Start Step and one End
Step, but it may have multiple Normal Steps. Start Step is executed when
module is starting, while End Step is executed when SFC is normally
running to end or giving up execution, so as to ensure the SFC module
ends at a fixed status.

‰ Transition

Transition is a section of condition verdict program, which is used to realize


running transition among steps. Conditions are contained in transition.
When the condition verdict is met, the output of transition is TRUE. The
step before transition executes terminate, then execute the step after
transition.

‰ Link

It is used to connect step and transition.

‰ Text

Text is a remark text, which is used to make SFC module more readability.
Text could be placed at any place of the draw region.

‰ Sequence structure

40
Graphical Programming software SCControl

Figure 1-40 sequential structure

Sequence structure is used to realize the sequence execution of step.


According to structure, sequence structure can be classified into S-T-S
whose two ends are both steps and T-S-T whose two ends are both
transitions. Single step is also S-T-S structure, and single transition is also
T-S-T structure.

In sequence structure, when one step is activated, it's below transition


starts to verdict whether the inner conditions are met. If all of them are not
met, then execute this step continually; if all inner conditions are met, then
transfer to the next step to execute continually.

‰ Parallel structure

Figure 1-41 Paralleling structure

Parallel structure is used to realize parallel execution of several sequence


branches, which applies to the occasion when several operations are
needed to execute simultaneously. It starts with parallel branch (double
transverse), which is indicated by diagram and ends with parallel
connection, which is indicated by double transverse. In parallel structure,

41
Graphical Programming software SCControl

every sequence branch must be S-T-S structure. Only one common


transition is permitted in parallel structure. When this common transition is
true, every sequence branch starts parallel, after that, every branch is
processed separately. Only when all sequence branches are processed
does it verdict the transition after parallel connection.

‰ Selection structure

Figure 1-42 Selection structure

Selection structure realizes the function that selects any one to execute in
several sequence branches. It is used on the occasion when one operation
is completed, and it needs to select one operation according to current
status of industry process. Selection structure starts with single transverse
selection branch, which is indicated by diagram and ends with selection
connection, which is indicated by single transverse. Every branch must be
T-S-T structure in selection structure. If the conditions of several branches
are met simultaneously, then system will select one branch to execute
according to the priority from left to right. Sequence branches that are lead
out from one selection branch must join to one selection connection or jump
out through jump.

‰ Jump

42
Graphical Programming software SCControl

Figure 1-43 Jump

Jump allows program to continue running from different region. Jump has
two structures: sequential jump and cycle.

Sequential jump realizes to continue running after jumping several steps


when the condition of selection branch is met, shown as the following figure:
after executing S1, it can jump over S2 and S3 to execute S4 directly when
the condition is met.

Figure 1-44 sequential jump

Cycle realizes repetitive operation.

43
Graphical Programming software SCControl

Figure 1-45 Loop

Such as the above figure: execute S2 after executing S1, and after
executing S2, if the condition is met, it can execute S2 again instead of
executing the following S3. Consequently, it can execute S2 repetitively,
and it will not execute the following S3 until the repetitive condition is no
longer met.

Diagram of jump is an arrow in which there is the name of the step that is
jumped to.

1. Summarize

Element and structure of SFC editor including:

Figure 1-46 Elements of SFC

2. Step

Steps are a group of action set that is relatively independent in control flow.
In steps, the user can define all types of actions without any quantity limit.
Use these actions to control flow.

44
Graphical Programming software SCControl

Only when activated, do steps to execute relevant actions. Steps are


activated when transition conditions ahead are met. Steps will quit
activation status when following transition conditions are met.

In front of a step connects there are only transition, parallel branch or


alternative joint. Behind a step connects there are only transition, parallel
joint or alternative branch.

Steps have three types: Step-start, Step- normal, Step-end.

Figure 1-47 Steps

In a SFC diagram, there are only one Step-start and one Step-end.
Execution of SFC starts from Step-start and ends with Step-end.

Figure 1-48 Properties of Step

Running time

Appoint the variable that evaluates step's activation time to ULONG type to
display.

45
Graphical Programming software SCControl

Variable type

Appoint whether use system tag browse or variable browse when selecting
variable.

Qualifier

Appoint the current operation type

Time

Appoint limit time of current operation

Operation variable

Appoint operation

Operation describing

Add remark to current operation

Add or delete operation in current step through the “Add” or “Delete”


button.

Change sequence of execution through “Move up” and “Move down” after
selecting operation.

Modify the current operation through the “Modify” button.

3. Transition

Transition is used to specify the condition that control transits from one step
to another.

When transition conditions are met, status of the step ahead will change
from activation to deactivation while status of the followed step will change
from deactivation to activation.

Only when all steps ahead are activated, will transition conditions be tested.

Transition conditions are defined with a Boolean variable or Boolean


expression.

46
Graphical Programming software SCControl

In front of a transition connects there are only step, alternative branch or


parallel joint. Behind a transition connects there are only step, alternative
joint, parallel branch or jump.

4. Jump

Jump allows program to continue executing from different step. According


to different jump object, there are sequential jump and sequential loop. It is
not allowed to jump among different parallel regions.

The following diagram is sequential jump, which is mainly used for


exception handles.

Figure 1-49 Sequential jump

The following diagram is sequential loop.

47
Graphical Programming software SCControl

Figure 1-50 Sequential loop

5. Alternative Branch

Alternative branch provides the selection method of control flow which


realizes conditional control in SFC program.

Only one branch can be activated in alternative branch structure.

The priority of branch jump is from left to right. (I.e. if some branches’ judge
variable is met at the same time, the most left branch is executed.)

Alternative branch and alternative joint must be correspondent one by one.

The branch should end with the same alternative joint or jump.

Figure 1-51 Alternative branch

6. Parallel branch

48
Graphical Programming software SCControl

Parallel branch enables several sub-flows in a flow to execute


simultaneously. The execution of all branches carries out at the same time
and will not influence each other. Only when the last steps of all branches
are activated, will transition conditions followed by parallel joint be tested to
check if they are met.

Parallel branch and parallel joint must be correspondent one by one.

The jump inside parallel structure cannot jump to the outside of parallel
structure.

Figure 1-52 Parallel branch

7. Actions

Action is description of manipulating system signals (Variable and tag).

There are 0 or several actions in a step. For actions, there are many types
described by action qualifiers. An action can be a Boolean variable (action
variable) as well as an assignment expression.

You can edit in the window of step properties.

SFC editor provides the following action qualifiers complying with


IEC-61131-3:

1) Action N keeps activated during whole activation of step and will


become deactivation with step’s quitting activation.

2) Action S always keeps activated after step is activated.

49
Graphical Programming software SCControl

3) Action R always keeps status of deactivation after step is activated.

4) Action L keeps activated during limitative time after step is activated


and gets back to deactivation beyond the time.

5) Action D will become activated in limitative time after step is


activated and gets back to deactivation with step’s becoming
deactivation.

6) Action P keeps activated just one program scanning period after


activating step, then gets back to deactivation.

7) Action DS will become activated in limitative time after step is


activated and will always keep this status.

In the above types of actions, action variables can only be defined as


Boolean, of which limitative time should be specified when qualifiers of
action L, D and DS are used. Unit of limitative time is ms.

Figure 1-53 Action timing diagram

SCControl SFC editor provides extended action qualifiers:

= assign action qualifier. It shows section keeps going during the whole
period of step’s activation and will get back to deactivation after step quits
activation.

When using assign action qualifier, assignment expression must be


specified to add actions and the action can be double clicked to edit ST

50
Graphical Programming software SCControl

language program if complex expressions are needed.

SFC control variable

The user can set the following control variables to control SFC program’s
going:

‰ Running control

‰ Reset

‰ Transition forbidden

‰ Forcing stepping

‰ Operation enabled

When running control variable is ON, SFC program proceeds normally.


When it is OFF, all the other control variables are invalid and SFC program
stops running. Running control variables must be specified by program.

When status of reset variable is ON, the step-start of SFC will be set to an
activated step and other steps are forced to become deactivation. SFC
program will re-proceed from the very beginning and at the same time reset
variable will become OFF automatically. When running variable is OFF,
reset variable will be invalid.

When transition forbidden variable is ON, the current activated step will
keep executing no matter whether following transition conditions are met or
not. Transition conditions will not be tested. Transition forbidden variable is
affected by running variable and reset variable.

When forcing stepping variable is ON, the current activated step will
become deactivation no matter whether transition conditions are met or not.
Next step will become activated in order. It is affected by all of the above
variables.

Action enable variable: When it is ON, actions in steps can be executed.

51
Graphical Programming software SCControl

Figure 1-54 Control variables

1.3.6 ST LANGUAGE

ST language is used through combining with other graphical programming


language in graphical programming. It realizes one standard subset of
IEC61131-3.

Usage

Add ST language paragraph in project.

Text code module can be inserted in ladder diagram and function block
diagram and ST language is used to program in module.

Use the operation qualifier = in the step operation in sequential function


chart, use ST language to program.

Logical expression of ST language can be used to appoint condition for


then conversion condition of sequential function chart.

In SFC editor, when assign conversion conditions can use ST language


logic expression.

In actions, the user can use ST expressions when referred "=".

Note: loop statement will increase compiling time. In order to improve


compiling time, WHILE statement does not suggest to use and using

52
Graphical Programming software SCControl

REPEAT/FOR statement as less as possible.

1. ST language phrasing

1) ST language phrasing

ST language is used together with other graphical programming languages


in SCControl. It realizes one subset of IEC-61131-3, supporting multiple
data types, functions, structures and arrays. It can operate all kinds of
system variables.

Expression

An expression is the combination of variables, operators, constants and


functions. The result is single.

The evaluation process of expressions is conducted according to the order


of operators' priority. The operator with high priority is performed first. For
operators with equal priority, the sequence is from left to right.

The follows are some legal expression examples:

A + B * (C-3) + FUNC1 (2, D)

B1

FUNC1 ()

Usage

Designation identifier such as variable or function, must meet the following


conditions:

‰ Begin with letter;

Follow with letter, number or underline.

‰ Character length is less than 24 characters;

Identifier contains variable, function, function block and constant.

Keyword

53
Graphical Programming software SCControl

keyword Description

CASE...OF...ELSE...END_CASE CASE statement

BOOL WORD DWORD INT LONG


Data Types
UINT ULONG SFLOAT FLOAT

EXIT End Loop

FALSE Logic false

FOR...TO...BY...DO...END_FOR FOR statement

FUNCTION...END_FUNCTION Definition of function

FUNCTION_BLOCK
Definition of function block
END_FUNCTION_BLOCK

IF...THEN...ELSEIF...ELSE...END_IF IF statement

ON Logic true

OFF Logic false

REPEAT...UNTIL...END_REPEAT REPEAT statement

RETURN Return of function

TRUE Logic true

VAR...END_VAR

VAR_INPUT...END_VAR Definition of variable

VAR_OUTPUT...END_VAR

WHILE...DO...END_WHILE WHILE statement

Operator

Operators from high to low according to operation priority have follows

Operators Description Type Priority

() Expression operation 9

. Extract structure member 8

[] Extract array member 8

- Minus 7

54
Graphical Programming software SCControl

NOT Neg. Logic operation 7

* (MUL) Multiply Arithmetic operation 6

/ (DIV) Divided by Arithmetic operation 6

MOD MOD Arithmetic operation 6

+ (ADD) Add Arithmetic operation 5

- (SUB) Subtract Arithmetic operation 5

> Greater than Comparison operation 4

>= Greater than and equal Comparison operation 4

<= Less than and equal Comparison operation 4

< Less than Comparison operation 4

= Equal Comparison operation 4

<> Not equal Comparison operation 4

AND And Logic operation 3

XOR Exclusive or Logic operation 2

OR Or Logic operation 1

Statements

Follows are allowed statements table.

No. Statements Examples

A = B;
1 Assignment statement
A = B + 1;

Function call and A = FUNC(P1,P2);


2
function block call FB1(IN1,OUT1,OUT2);

A = FUNC(P1,P2);
3 RETURN
RETURN A;

IF A > 0 THEN

B = 1;
4 IF
ELSEIF A > -5 THEN

B = 2;

55
Graphical Programming software SCControl

ELSE

B = 3;

END_IF;

TW = FUNC1();

CASE TW OF

1 : I = 1;
5 CASE
2 : I = 2;

ELSE I = 3;

END_CASE;

J = 10;

FOR I = 1 TO 100 BY 2 DO

IF B1 THEN

6 FOR J = 1;

EXIT;

END_IF;

END_FOR;

J = 1;

WHILE J <= 100 AND B1 DO


7 WHILE
J = J + 2;

END_WHILE;

J = 1;

REPEAT

8 REPEAT J = J + 2;

UNTIL J = 101 OR B1

END_REPEAT;

J = 1;

WHILE J <= 100 AND B1 DO

J = J + 2;

9 EXIT IF J>= 50 THEN

EXIT;

END_IF;

END_WHILE;

FOR I = 1 TO 100 BY 2 DO

10 EMPTY ;

END_FOR;

56
Graphical Programming software SCControl

Assignment statement

An assignment statement assigns the value of the expression on the right


of ":=" to the variable on the left.

Statement of function call

The call of function and function block includes function name or function
block name followed by parenthesis. In parenthesis are parameters and
between parameters is comma.

The rule of function call:

ret = Func (in1,in2); (*As the return value of the expression*)

Func (in1, in2); (*As a subroutine*)

The call rule of function block:

The call of function block should strictly accord with the sequence of input
and output. First enter input parameters then output parameters and the
sequence of parameters should be the sequence of definition.

The output parameters must be variables:

FuncBlock (in1, in2, out1, out2);

2) ST language function and function block

Function definition

Only one output. Confirm the only output according to input.

Function block definition

More than one outputs, or output bears relation with not only current input,
but also the last inner status.

Call rule of function

ret = Func (in1,in2); (*as return value of expression*)

Func (in1, in2); (*handled as subprogram*)

57
Graphical Programming software SCControl

Call rule of function block

When calling function block, accord to the input output sequence strictly.
First, input the input parameter and then input output parameter. The
parameter sequence is according to the defined sequence.

The output parameter must be variable.

FuncBlock (in1, in2, out1, out2);

Usage restrictions

ST’s FUNCTION module

Can call other ST FUNCTION and allows nesting.

Can call standard functions.

ST’s FUNCTION_BLOCK module

Call ST FUNCTION.

Call other ST FUNCTION_BLOCK and doesn’t allow nesting.

Call standard functions

Call standard function blocks.

TEXTCODE module

Call ST FUNCTION.

Call ST FUNCTION_BLOCK.

Call standard functions

Call standard function blocks.

Call function blocks created with all kinds of programming languages.

Compiling speed

Because of ARM editor (SDT251) in current SCControl, using loop

58
Graphical Programming software SCControl

statement, especially WHILE statement, will increase compiling time


significantly, in order to improve compiling speed, we should not use
WHILE statement and use REPEAT/FOR statement as less as possible.

3) Function

FUNCTION FUNC3: BOOL

VAR_INPUT

IN1: BOOL;

END_VAR

VAR

TEMP1: BOOL;

END_VAR

FUNC3:= DoSomething ();

END_FUNCTION

Explanation:

a. Define input variables of function block with


VAR_INPUT/END_VAR.

b. Define temporary variables inside function block behind


VAR/END_VAR. (Temporary variable is stored in system's stack. And it
cannot be preserved till next period.)

c. The declaration sequence of all variables cannot be broken.

d. When call on must be according to declaration sequence.

4) Function block

FUNCTION_BLOCK FB3

VAR_INPUT

59
Graphical Programming software SCControl

IN1: BOOL;

END_VAR

VAR_OUTPUT

OUT1: BOOL;

END_VAR

VAR

TEMP1: BOOL;

END_VAR

DoSomething();

END_FUNCTION_BLOCK

Explanation:

a. Define input variables of function block with VAR_INPUT/END_VAR.

b. Define output variables of function block with VAR_OUTPUT/END_VAR

c. Define temporary variables inside function block with VAR/END_VAR.


(Temporary variable is stored in systems stack. And it cannot be preserved
till next period.)

d. The declaration sequence of all variables cannot be broken.

e. Output variable can do self operation

f. When call on must be according to declaration sequence.

5) Examples of ST language programming

Assignment statement

An assignment statement assigns the value of the expression on the right


of ":=" to the variable on the left.

60
Graphical Programming software SCControl

A = B;

A = B + C;

A = B * C + D;

A = B AND C AND D OR E;

A = AND_DWORD (B, C);

IF statement

IF (A AND (B > C) OR (E > F + 1)) THEN

AA = BB;

ELSEIF (B > G) THEN

AA = CC;

ELSE

AA = DD;

END_IF;

IF statement defines that a group of statements will be executed if the


specified logic expression is TRUE, and if the logic expression is FALSE,
these statements will never be executed or the other group of statements
specified in ELSE (ELSEIF) will be executed.

CASE statement

CASE A OF

1:

AA = BB;

2:

AA = CC;

61
Graphical Programming software SCControl

3:

AA = DD;

ELSE

AA = EE;

END_CASE;

CASE statement defines the optional variable (integer type) as well as


several statement lists for different values of the optional variable. If the
optional variable is equal to a specified value, the relevant statement list will
be executed. If no specified value is equal to the optional variable, the
statement list in ELSE will be executed (ELSE branch is defined in CASE
statement).

FOR statement

FOR I = 1 TO 100 BY 2 DO

DOSOMETHING ();

END_FOR;

In the above FOR statement, I is control variable, 1 is initial value, 100 is


stop value and 2 is stepping value. In FOR statement, the initial value, stop
value and stepping value of control variable should be integers with the
same type. The default stepping value is 1. From start continue to judge
termination conditions. If initial value is greater than stop value, then the
specified statement list will never be executed.

WHILE statement

WHILE conditions DO

... (* statement list*)

END_WHILE;

Conditions should be judged firstly. If the result of conditions is FALSE,

62
Graphical Programming software SCControl

then the specified statement list will never be executed.

REPEAT statement

REPEAT

... (* statement list*)

UNTIL Termination conditions

END_REPEAT;

First execute the statement list once, then judge termination conditions, so
the specified statement list will be executed for at least one time. When
termination conditions become TRUE, the cycle will be terminated.

2. ST call function list

Arithmetic operation

Comparison Function

Conversion Function

Boolean calculation

Mathematics Function

Select Function

Communication assistant function

System time Function

Especially Function

Other Function

Input manage

6) Arithmetic operation

ADD Function

63
Graphical Programming software SCControl

The function of this module is adding input values, its result will assign to
out. The function type as follows:

FLOAT ADD_FLOAT (FLOAT a, FLOAT b)

INT ADD_INT (INT a, INT b)

LONG ADD_LONG (LONG a, LONG b)

UINT ADD_UINT (UINT a, UINT b)

ULONG ADD_ULONG (ULONG a, ULONG b)

SFLOAT ADD_SFLAOAT (SFLOAT a, SFLOAT b)

Average Function

The function of this module is getting average value of input values, its
result will assign to out. The function type as follows:

FLOAT AVE_FLOAT (FLOAT a, FLOAT b)

INT AVE_INT (INT a, INT b)

LONG AVE_LONG (LONG a, LONG b)

UINT AVE_UINT (UINT a, UINT b)

ULONG AVE_ULONG (ULONG a, ULONG b)

SFLOAT AVE_SFLOAT (SFLOAT a, SFLOAT b)

AVE_FLOAT: The sum of two inputs can't overtopped the range of


floating-point

Divide Function

The function of this module is dividing of inputs and its result will assign to
out. The function type as follows:

FLOAT DIV_FLOAT (FLOAT a, FLOAT b)

INT DIV_INT (INT a, INT b)

64
Graphical Programming software SCControl

LONG DIV_LONG (LONG a, LONG b)

UINT DIV_UINT (UINT a, UINT b)

ULONG DIV_ULONG (ULONG a, ULONG b)

SFLOAT DIV_SFLOAT (SFLOAT a, SFLOAT b)

Mode Function

The function of this module is dividing of inputs and its remainder will assign
to out. The function type as follows:

INT MOD_INT (INT a, INT b);

LONG MOD_LONG (LONG a, LONG b);

UINT MOD_UINT (UINT a, UINT b);

ULONG MOD_ULONG (ULONG a, ULONG b);

Assign Function

The function of this module is taking of input and assigning to out. The
function type as follows:

BOOL MOVE_BOOL (BOOL a);

BYTE MOVE_BYTE (BYTE A);

DWORD MOVE_DWORD (DWORD a);

FLOAT MOVE_FLOAT (FLOAT a);

INT MOVE_INT (INT a);

LONG MOVE_LONG (LONG a);

UINT MOVE_UINT (UINT a);

ULONG MOVE_ULONG (ULONG a);

WORD MOVE_WORD (WORD a);

65
Graphical Programming software SCControl

SFLOAT MOVE_SFLOAT (SFLOAT a);

Multiply Function

The function of this module is multiplying of inputs and its result will assign
to out. The function type as follows:

FLOAT MUL_FLOAT (FLOAT a, FLOAT b);

INT MUL_INT (INT a, INT b);

LONG MUL_LONG (LONG a, LONG b);

UINT MUL_UINT (UINT a, UINT b);

ULONG MUL_ULONG (ULONG a, ULONG b);

SFLOAT MUL_SFLOAT (SFLOAT a, SFLOAT b);

Subtract Function

The function of this module is subtracting of inputs and its result will assign
to out. The function type as follows:

FLOAT SUB_FLOAT (FLOAT a, FLOAT b);

INT SUB_INT (INT a, INT b);

LONG SUB_LONG (LONG a, LONG b);

UINT SUB_UINT (UINT a, UINT b);

ULONG SUB_ULONG (ULONG a, ULONG b);

SFLOAT SUB_SFLOAT (SFLOAT a, SFLOAT b);

7) Comparison function

Equal

The function of this module is checking two inputs, if input value equals, it is
outputs ON, otherwise OFF. The function type shown as follows:

66
Graphical Programming software SCControl

BOOL EQ_BOOL (BOOL a, BOOL b);

BOOL EQ_BYTE (BYTE A, BYTE B);

BOOL EQ_DWORD (DWORD a, DWORD b);

BOOL EQ_FLOAT (FLOAT a, FLOAT b);

BOOL EQ_INT (INT a, INT b);

BOOL EQ_LONG (LONG a, LONG b);

BOOL EQ_UINT (UINT a, UINT b);

BOOL EQ_ULONG (ULONG a, ULONG b);

BOOL EQ_WORD (WORD a, WORD b);

BOOL EQ_SFLOAT (SFLOAT a, SFLOAT b);

Greater than or equal

The function of this module is checking if first input is greater than or equal
to the second input, if it is, outputs ON, otherwise OFF. The function type
shown as follows:

BOOL GE_FLOAT (FLOAT a, FLOAT b);

BOOL GE_INT (INT a, INT b);

BOOL GE_LONG (LONG a, LONG b);

BOOL GE_UINT (UINT a, UINT b);

BOOL GE_ULONG (ULONG a, ULONG b);

BOOL GE_SFLOAT (SFLOAT a, SFLOAT b);

Greater

The function of this module is checking if first input is greater than the
second one, if it is, outputs ON, otherwise OFF. The function type shown as
follows:

67
Graphical Programming software SCControl

BOOL GT_FLOAT (FLOAT a, FLOAT b);

BOOL GT_INT (INT a, INT b);

BOOL GT_LONG (LONG a, LONG b);

BOOL GT_UINT (UINT a, UINT b);

BOOL GT_ULONG (ULONG a, ULONG b);

BOOL GT_SFLOAT (SFLOAT a, SFLOAT b);

Less than or equal

The function of this module is checking if first input is less than or equal to
second input, if it is, outputs ON, otherwise OFF. The function type shown
as follows:

BOOL LE_FLOAT (FLOAT a, FLOAT b);

BOOL LE_INT (INT a, INT b);

BOOL LE_LONG (LONG a, LONG b);

BOOL LE_UINT (UINT a, UINT b);

BOOL LE_ULONG (ULONG a, ULONG b);

BOOL LE_SFLOAT (SFLOAT a, SFLOAT b);

Less

The function of this module is checking if first input is less than second input,
if it is, outputs ON, otherwise OFF. The function type shown as follows:

BOOL LT_FLOAT (FLOAT a, FLOAT b);

BOOL LT_INT (INT a, INT b);

BOOL LT_LONG (LONG a, LONG b);

BOOL LT_UINT (UINT a, UINT b);

68
Graphical Programming software SCControl

BOOL LT_ULONG (ULONG a, ULONG b);

BOOL LT_SFLOAT (SFLOAT a, SFLOAT b);

Unequal

The function of this module is checking if first input is unequal to second


input, if it is, outputs ON, otherwise OFF. The function type shown as
follows:

BOOL NE_BOOL (BOOL a, BOOL b);

BOOL NE_BYTE (BYTE A, BYTE B);

BOOL NE_DWORD (DWORD a, DWORD b);

BOOL NE_FLOAT (FLOAT a, FLOAT b);

BOOL NE_INT (INT a, INT b);

BOOL NE_LONG (LONG a, LONG b);

BOOL NE_UINT (UINT a, UINT b);

BOOL NE_ULONG (ULONG a, ULONG b);

BOOL NE_WORD (WORD a, WORD b);

BOOL NE_SFLOAT (SFLOAT a, SFLOAT b);

8) Conversion Function

LONG DWORD_TO_LONG (DWORD a);

The function of this module is taking the input of DWORD type and
converting to output of LONG type.

INT FLOAT_TO_INT (FLOAT a);

The function of this module is taking the input of FLOAT type and
converting to output of INT type.

FLOAT INT_TO_FLOAT (INT a);

69
Graphical Programming software SCControl

The function of this module is taking the input of INT type and converting to
output of FLOAT type.

LONG INT_TO_LONG (INT a);

The function of this module is taking the input of INT type and converting to
output of LONG type.

UINT INT_TO_UINT (INT a);

The function of this module is taking the input of INT type and converting to
output of UINT type.

WORD INT_TO_WORD (INT a);

The function of this module is taking the input of INT type and converting to
output of WORD type.

DWORD LONG_TO_DWORD (LONG a);

The function of this module is taking the input of LONG type and converting
to output of DWORD type.

FLOAT LONG_TO_FLOAT (LONG a);

The function of this module is taking the input of LONG type and converting
to output of FLOAT type.

INT LONG_TO_INT (LONG a);

The function of this module is taking the input of LONG type and
converting to output of INT type.

ULONG LONG_TO_ULONG (LONG a);

The function of this module is taking the input of LONG type and converting
to output of ULONG type.

INT UINT_TO_INT (UINT a);

The function of this module is taking the input of UINT type and converting

70
Graphical Programming software SCControl

to output of INT type.

ULONG UINT_TO_ULONG (UINT a);

The function of this module is taking the input of UINT type and converting
to output of ULONG type.

WORD UINT_TO_WORD (UINT a);

The function of this module is taking the input of UINT type and converting
to output of WORD type.

DWORD ULONG_TO_DWORD (ULONG a);

The function of this module is taking the input of ULONG type and
converting to output of DWORD type.

LONG ULONG_TO_LONG (ULONG a);

The function of this module is taking the input of ULONG type and
converting to output of LONG type.

UINT ULONG_TO_UINT (ULONG a);

The function of this module is taking the input of ULONG type and
converting to output of UINT type.

BYTE WORD_TO_BYTE (WORD A);

The function of this module is taking the input of WORD type and
converting to output of BYTE type.

WORD BYTE_TO_WORD (BYTE A);

The function of this module is taking the input of BYTE type and converting
to output of WORD type.

INT WORD_TO_INT (WORD a);

The function of this module is taking the input of WORD type and
converting to output of INT type.

71
Graphical Programming software SCControl

UINT WORD_TO_UINT (WORD a);

The function of this module is taking the input of WORD type and
converting to output of UINT type.

FLOAT SFLOAT_TO_FLOAT (SFLOAT A);

The function of this module is taking the input of SFLOAT type and
converting to output of FLOAT type.

SFLOAT FLOAT_TO_SFLOAT (FLOAT A);

The function of this module is taking the input of FLOAT type and
converting to output of SFLOAT type.

INT SFLOAT_TO_INT (SFLOAT A);

The function of this module is taking the input of SFLOAT type and
converting to output of INT type.

SFLOAT INT_TO_SFLOAT (INT A);

The function of this module is taking the input of INT type and converting to
output of SFLOAT type.

INT DEC_TO_BCD (BYTE dec);

The function of this module is taking the input of decimal type and
converting to output of BCD code, the algorism of input is BYTE type, the
maximum is 255.

9) Boolean calculation

Logic and Function

The function of this module is taking the inputs, carrying AND operation,
assigning to output.

BOOL AND_BOOL (BOOL a, BOOL a);

BYTE AND_BYTE (BYTE A, BYTE B);

72
Graphical Programming software SCControl

DWORD AND_DWORD (DWORD a, DWORD b);

WORD AND_WORD (WORD a, WORD b);

Not Function

The function of this module is taking the inputs, carrying NOT operation,
assigning to output.

BOOL NOT_BOOL (BOOL a);

BYTE NOT_BYTE (BYTE A);

DWORD NOT_DWORD (DWORD a);

WORD NOT_WORD (WORD a);

Or Function

The function of this module is taking the inputs, carrying OR operation,


assigning to output.

BOOL OR_BOOL (BOOL a, BOOL b);

BYTE OR_BYTE (BYTE A, BYTE B);

DWORD OR_DWORD (DWORD a, DWORD b);

WORD OR_WORD (WORD a, WORD b);

Cyclic shift left

The function of this module is taking the inputs, carrying cyclic shift left
operation, assigning to output.

DWORD ROL_DWORD (DWORD a, UINT b);

WORD ROL_WORD (WORD a, UINT b);

Cyclic shift right

The function of this module is taking the inputs, carrying cyclic shift right
operation, assigning to output.

73
Graphical Programming software SCControl

DWORD ROR_DWORD (DWORD a, UINT b);

WORD ROR_WORD (WORD a, UINT b);

Shift left

The function of this module is taking the inputs, carrying shift left operation,
assigning to output (fill zero in right side).

DWORD SHL_DWORD (DWORD a, UINT b);

WORD SHL_WORD (WORD a, UINT b);

Shift right

The function of this module is taking the inputs, carrying Shift right
operation, assigning to output (fill zero in left side).

DWORD SHR_DWORD (DWORD a, UINT b);

WORD SHR_WORD (WORD a, UINT b);

XOR Function

The function of this module is taking the inputs, carrying XOR operation,
assigning to output.

BOOL XOR_BOOL (BOOL a, BOOL b);

BYTE XOR_BYTE (BYTE A, BYTE B);

DWORD XOR_DWORD (DWORD a, DWORD b);

WORD XOR_WORD (WORD a, WORD b);

10) Mathematics Function

FLOAT ABS_FLOAT (FLOAT a);

INT ABS_INT (INT a);

LONG ABS_LONG (LONG a);

74
Graphical Programming software SCControl

The function of the three modules are taking the input's absolute value, and
assigning to output.

FLOAT ACOS (FLOAT a);

The function of this module is taking the input's arccosine operation,


assigning to output as arc.

FLOAT ASIN (FLOAT a);

The function of this module is taking the arcsine operation, and assigning to
output as arc.

FLOAT ATAN (FLOAT a);

The function of this module is taking the input's arctangent operation,


assigning to output as arc.

FLOAT ATAN2 (FLOAT a, FLOAT b);

The function of this module is taking the arctangent operation according


coordinates (x, y), and assigning to output as arc.

FLOAT COS (FLOAT a);

The function of this module is taking the cosine of input and assigning to
output.

FLOAT COSH (FLOAT a);

The function of this module is taking the input's project cosine operation,
and assigning to output, the value of input must be arc.

FLOAT EXP (FLOAT a);

The function of this module is taking the value of input as power based e
and assigning to output.

FLOAT LN (FLOAT a);

The function of this module is taking the logarithm of input based on e and
assigning to output.

75
Graphical Programming software SCControl

FLOAT LOG (FLOAT a);

The function of this module is taking the input's logarithm operation based
on 10, assigning to output.

FLOAT POW (FLOAT a, FLOAT b);

The function of this module is taking the value of y as power x as the base,
and assigning to output.

FLOAT SIN (FLOAT a);

The function of this module is taking the sine of input and assigning to
output.

FLOAT SINH (FLOAT a);

The function of this module is taking the input's project sine operation, and
assigning to output.

FLOAT SQRT_FLOAT (FLOAT a);

SFLOAT SQRT_SFLOAT (SFLOAT a);

The function of these two modules are taking the square root of input and
assigning to output. The input range of SQRT_SFLOAT is 0~1.

FLOAT TAN (FLOAT a);

The function of this module is taking the tangent of input and assigning to
output.

FLOAT TANH (FLOAT a);

The function of this module is taking the input's project tangent operation,
and assigning to output.

11) Select Function

Limit Function

The function of this module is limiting value, when input is greater than

76
Graphical Programming software SCControl

upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input. The function type as follows:

FLOAT LIM_FLOAT (FLOAT max, FLOAT a, FLOAT min);

INT LIM_INT (INT max, INT a, INT min);

LONG LIM_LONG (LONG max, LONG a, LONG min);

UINT LIM_UINT (UINT max, UINT a, UINT min);

ULONG LIM_ULONG (ULONG max, ULONG a, ULONG min);

SFLOAT LIM_SFLOAT (SFLOAT max, SFLOAT a, SFLOAT min);

Maximum Function

The function of this module is taking the maximum of inputs and assigning
to output. The function type as follows:

FLOAT MAX_FLOAT (FLOAT a, FLOAT b);

INT MAX_INT (INT a, INT b);

LONG MAX_LONG (LONG a, LONG b);

UINT MAX_UINT (UINT a, UINT b);

ULONG MAX_ULONG (ULONG a, ULONG b);

SFLOAT MAX_SFLOAT (SFLOAT a, SFLOAT b);

Minimum Function

The function of this module is taking the minimum of inputs and assigning to
output. The function type as follows:

INT MIN_INT (INT a, INT b);

LONG MIN_LONG (LONG a, LONG b);

UINT MIN_UINT (UINT a, UINT b);

77
Graphical Programming software SCControl

ULONG MIN_ULONG (ULONG a, ULONG b);

SFLOAT MIN_SFLOAT (SFLOAT a, SFLOAT b);

Selection Function

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out. The function type as
follows:

BOOL SEL_BOOL (BOOL sw, BOOL a, BOOL b);

DWORD SEL_DWORD (BOOL sw, DWORD a, DWORD b);

FLOAT SEL_FLOAT (BOOL sw, FLOAT a, FLOAT b);

INT SEL_INT (BOOL sw, INT a, INT b);

LONG SEL_LONG (BOOL sw, LONG a, LONG b);

UINT SEL_UINT (BOOL sw, UINT a, UINT b);

ULONG SEL_ULONG (BOOL sw, ULONG a, ULONG b);

WORD SEL_WORD (BOOL sw, WORD a, WORD b);

SFLOAT SEL_SFLOAT (BOOL sw, SFLOAT a, SFLOAT b);

BOOL SEL_1IN3 (BOOL pv1, BOOL pv2, BOOL pv3);

About this module, please refer FBD specification for details.

BOOL SEL_1IN5 (BOOL pv1, BOOL pv2, BOOL pv3, BOOL pv4,
BOOL pv5);

About this module, please refer FBD specification for details.

12) Communication assistant function

BOOL GETBIT (DWORD num, UINT serial);

The function of this module is getting appoint tab num from DWORD value
of input, if equals 1, output ON; if equals 0, output OFF.

78
Graphical Programming software SCControl

Serial rang is 0~31, if serial > 31, output OFF.

FLOAT GETFLOAT (DWORD num);

Function: Getting FLOAT type value from DWORD value of input.

INT GETINT (DWORD num, UINT serial);

Function: Getting integer type value (16 bit) from DWORD value (32 bit) of
input. SERIAL=0, take low 16 bit; SERIAL=1, take high 16 bit.

DWORD GETMSG (UINT nStation, UINT serial);

Function: receive specified position information of specified control station


by receive buffer according to control station order nStation and message
order serial.

UINT GETUIN T (DWORD num, UINT serial);

Function: Getting UINT value (16 bit) from 32 bit DWORD input value.
SERIAL=0, take low 16 bit; SERIAL=1, take high 16 bit.

WORD GETWORD (DWORD num, UINT serial);

Function: Getting WORD value (16 bit) from 32 bit DWORD input value
num. When SERIAL=0, take low 16 bit; SERIAL=1, take high 16 bit.

SFLOAT GETSFLOAT (DWORD num, UINT serial);

Function: Getting SFLOAT value (16 bit) from 32 bit DWORD input value.
When SERIAL=0, take low 16 bit; SERIAL=1, take high 16 bit.

void SENDMSG(UINT size);

Function: this module can share information broadcasting of control station


according to input message number, messages specified by broadcast are
sent to SCnetII network, then other control stations can receive the
information sent by the control station through SCnetII.

DWORD SETBIT (DWORD num, BOOL val, UINT serial);

Function: Setting serial bit valuable of input num, when val = OFF, this bit is

79
Graphical Programming software SCControl

0, otherwise, 1. Serial rang is 0~31, if serial > 31, return to 0.

DWORD SETFLOAT (FLOAT val);

Function: Input FLOAT type data and output DWORD type data.

DWORD SETINT (DWORD num, INT val, UINT serial);

Function: Getting SFLOAT value (16 bit) from 32 bit DWORD input value.
When SERIAL=0, take low 16 bit of input value num as val; when
SERIAL=1, take high 16 bit of input value num as val.

DWORD SETUINT (DWORD num, UINT val, UINT serial);

Function: Getting SFLOAT value (16 bit) from 32 bit DWORD input value.
When SERIAL=0, take low 16 bit of input value num as val; when
SERIAL=1, take high 16 bit of input value num as val.

DWORD SETWORD (DWORD num, WORD val, UINT serial);

Function: Getting SFLOAT value (16 bit) from 32 bit DWORD input value.
When SERIAL=0, take low 16 bit of input value num as val; when
SERIAL=1, take high 16 bit of input value num as val.

DWORD SETSFLOAT (DWORD num, SFLOAT val, UINT serial);

Function: Getting SFLOAT value (16 bit) from 32 bit DWORD input value.
When SERIAL=0, take low 16 bit of input value num as val; when
SERIAL=1, take high 16 bit of input value num as val.

13) System time Function

INT CENTURY ();

Function: Gained the first two numbers of the currently year, get along with
YEAR () function make up of currently year.

INT YEAR ();

Function: Gained the two further numbers of the currently year, get along
with CENTURY () function make up of currently year.

80
Graphical Programming software SCControl

INT MONTH ();

Function: Gained the currently month.

INT DAY ();

Function: Gained the currently day.

INT HOUR ();

Function: Gained the currently hour.

INT MINUTE ();

Function: Gained the currently minute.

INT SECOND ();

Function: Gained the currently second.

14) Especially Function

BOOL LIMITOR(INT IN1,INT IN2,INT IN3,INT IN4,INT IN5,INT IN6,INT


IN7,INT IN8,INT S9,INT S10);

Function: Monitor number variable input that is under eight and generate
one Boolean output according to the status set by S9 and S10. Refer FBD
specification for details.

SFLOAT NEWSQRT (SFLOAT IN, SFLOAT KP, SFLOAT DIS);

Function: Evaluate the square root of the Semi float input IN, OUT= KP *
SQRT (IN) + DIS. Refer FBD specification for details.

15) Other Function

BOOL ISSTANDBY ();

Function: Taking master control module redundancy state, return ON is


standby, OFF is working.

16) Input Manage

81
Graphical Programming software SCControl

WORD GETPATFLAG (INT N);

Function: Received PAT working sign of the Nth channel. Refer FBD
specification for details.

WORD GETPATSTATE (INT N);

Function: Received PAT state of the Nth channel. Refer FBD specification
for details.

SFLOAT GETPATPV (INT N);

Function: Received PV value with the Nth channel of PAT.

FLOAT SATENTHA (FLOAT P);

Function: Saturation steam enthalpy cost that calculation pressure bound is


(0~15989.867777) kpa. Unit of input press is KPa. Refer FBD specification
for details.

SFLOAT SATSTEAM (float press, float press0, SFLOAT Flow0);

Function: Saturation steam with temperature and pressure compensation.


Refer FBD specification for details.

SFLOAT SATSTEAM_DP (float PRESS, float DENSITY0, SFLOAT


FLOW0);

Function: Saturation steam with temperature and pressure compensation.


Refer FBD specification for details.

SFLOAT SATSTEAM_EX (BOOL SIGNALSEL, float PRESS, float


DENSITY0, SFLOAT SIGNAL);

Function: Saturation steam with temperature and pressure compensation.


Refer FBD specification for details.

SFLOAT COMPENSATE (SFLOAT SteamFlow0, FLOAT


SteamTemperture, FLOAT SteamPress, FLOAT DesignV);

Function: Supper steam's temperature_pressure compensation. Refer FBD

82
Graphical Programming software SCControl

specification for details.

SFLOAT FXY (SFLOAT x, INT n);

Function: Broken line table function, X is input value, n is which one broken
line table.

SFLOAT GET_FXY_X (INT num, INT n);

Function: Get X value of the numth in the Nth broken line table.

SFLOAT GET_FXY_Y (INT num, INT n);

Function: Get Y value of the numth in the Nth broken line table.

void SET_FXY_X (SFLOAT x, INT num, INT n);

Function: Set X value of the numth in the Nth broken line table.

void SET_FXY_Y (SFLOAT x, INT num, INT n);

Function: Set Y value of the numth in the Nth broken line table.

SFLOAT LINECPS (SFLOAT IN, SFLOAT KP, SFLOAT DIS);

Function: Output= IN*KP+DIS.

void SETPATCON (WORD CON,INT N);

Function: Set PAT especial sign bit of the Nth channel.

3. Import and Export

User-defined data type, global variable and section in SCControl all can be
imported or exported. Through importing and exporting user can reuse
former information easily and transmit configuration between projects.

Intelligent import and export of SCControl give user the most of


convenience.

When executing import and export uses section management of “Project”


menu, pops up dialog frame of “Project Manage”.

83
Graphical Programming software SCControl

When select one or several user-defined data type in dialog frame of “Data
Type Editor” to export, user should assign reserving file's name of exporting
data. SCControl will check all data type, if discovers that selected data type
is coming from deriving of unselected data type, SCControl will add this
user-defined data type automatically. In importing select already built up
export file, will add contained data type into project.

When select one or several variable in dialog frame of “Global Variables” to


export, user should assign reserving file's name of exporting data.
Exporting variable will reserved as ASCII text format for easy operation. In
importing select already built up export file, will add contained data type into
project.

When select one or several sections in dialog frame of “Section Manage” to


export, user should assign reserving file's name of exporting section.
SCControl will check all section first, if discovers that section includes
unselected DFB, SCControl will add these DFB sections. Then check data
type of contained variables of all sections, if discovers that data type among
them is coming from deriving of user-defined data type, SCControl will add
this user-defined data type automatically. In importing select already built
up export file, will add contained data type, section into project. When
discover that section's names are collision in importing, software will prompt
user if it is replacing, keeping or adopting a new name for importing.

4. Data type editor

The user creates user-defined data type through data type editor. When
defining new data type, the user can use essential data type and
user-defined data type established in project.

Graphical programming has inner data type editor, user can generate
user-defined data type through data type editor and it can be used in any
edited variable type.

Using the command of “Project management” in “Project” to open the


dialogue, and then select “Data type management” to enter data type editor.

Press “Add” to pop up the dialog of “Insert composite data type” and the

84
Graphical Programming software SCControl

user can choose array or structure.

Figure 1-55 Data Type Management

Select an array type and press “Edit” to pop up the dialog of “Array
declaration”, shown as Figure 1-56.

Figure 1-56 Array declaration

Select a structure type and press “Edit” to pop up the dialog of “Structure
declaration”, shown as Figure 1-57.

Figure 1-57 Definition of structure

85
Graphical Programming software SCControl

The user can save data type to a file through import/export function. Other
project can use these user-defined data types if importing this file.

Part of data types has been predefined in the system. These data types are
read-only and the user cannot modify or delete them.

5. Variable editor

Users define variable through variable editor.

Define the interface uniform of globe variable, private variable, input


variable and output variable. Define variable name, variable data type and
remark.

6. DFB editor

DFB editor is used to create DFB (Derived Function Blocks). DFB can be
comprehended as sub program.

DFB can generate by FBD editor and LD editor, it also can be called by
FBD, LD and SFC.

SControl DFB is used to create DFB (Derived Function Blocks). FBD, LD


and ST can all be used to design DFB.

A DFB is equal to a subroutine.

A DFB stands for a frame made up of user-defined input/output variables.


The inside contains user-defined program logic. DFB can be called again
and again.

86
Graphical Programming software SCControl

Figure 1-58 Module selection

In usage, there isn’t any difference between DFB and EFB.

Inside DFB, one or multiple EFB and other DFB can be referred. DFB
cannot nest loops of itself.

In SCControl, The user can enter DFB editor by creating or opening a


module section.

DFB variable

There are 4 types of variables in DFB:

‰ Private variable

‰ Input variable

‰ Output variable

‰ Hot backup variable

Input variable is used to transfer values to DFB and output variable is used
to extract values from DFB. These two types of variables are called “Formal
parameter”. These variables appear as external input/output pins when
DFB is used.

The name, data type and pin number of formal parameter are defined in
variable editor. The pin number is the natural order in variable editor.

87
Graphical Programming software SCControl

Up to 32 input/output variables can be defined in SCControl DFB.

When DFB is being used, actual parameter replaces formal parameter to


participate in arithmetic logic inside DFB.

Hot backup variable is invisible to users. When DFB refers FFB containing
hot backup variables, DFB will inherit FFB’s hot backup variables
automatically.

SCControl DFB provides private variables. It is different for private


variables in DFB and in program section. Each private variable in program
corresponds only to one memory address of control station, while private
variable in DFB will not correspond to actual address of control station if it
isn’t referred by other program. When DFB is referred by other program,
private variable in DFB will be assigned a different address of control
station for each reference. The private variable in DFB encapsulates
application for memory of control station. For each DFB instance’s creation,
DFB will apply for equal memory of control station according to number of
private variables. This memory is only referred by DFB instance and is
invisible to external programs. SCControl DFB’s support to private variables
and greatly enhances DFB’s flexibility and reuse.

When you use DFB containing private variables to build new DFB, new
DFB will inherit all private variables in DFB.

7. System resource

17) System resource

Timer

100ms timer UINT timerms[256]

s grade timer UINT timers[256]

m grade timer UINT timerm[256]

Application example:

Do something after pressing START button 20s

88
Graphical Programming software SCControl

IF NOT START THEN

Timers [20] = 0;

END_IF;

IF timers [20] >= 20 THEN

Dosomething ();

END_IF;

User-defined control module

Single circuit control module data block

g_bsc[64]

Cascade control module data block

g_csc[64]

Note: g_bsc and g_csc use system memory together, but they can not use
the same subscript simultaneously.

Shared data region among control station

DWORD g_msg[128]

Control station sharing this data region is to transfer data among stations.

Note: control stations can not share the same array subscript.

Application example:

Send data to other control stations from NO.2 control station (the address is
2 and 3) and use array subscript NO.6

g_msg[6] = 0;

g_msg[6] = setbit (g_msg[6] , BOOL1 , 0); (* send switching value 1 by


the zero digit *)

89
Graphical Programming software SCControl

g_msg[6] = setbit (g_msg[6] , BOOL2 , 1); (* send switching value 2 by


the first digit*)

g_msg[6] = setsfloat ( g_msg[6] , SFLOAT1 , 1); (* send analog 1 by


high 16 digit*)

sendmsg (7); (* the biggest used subscript is 6*)

Read data sent from NO.2 control station from other control stations (use
array subscript NO.6)

DWORD dw;

dw = getmsg ( 2 , 6); (* read data from NO.2 control station and use
array subscript NO.6*)

BOOL1 = getbit (dw , 0); (* read switching value from the zero digit*)

BOOL2 = getbit (dw, 1); (* read switching value from the first digit*)

SFLOAT1 = getsfloat (dw, 1); (* read analog 1 from high 16 digit*)

18) Quality specification

Method of application of flag

For SCX language does not have bit operation introduction, but flag adopts
bit definition, users can get the info that whether a signal is on alarm status
by means of "And" operation of flag and related value of one member. For
example, related value of upper limit alarm is 1.

Definition of analog input tag number data member Flag (tag number flag)

Related
Bit of flag Description Bit format
value

1--Alarm
D0 Upper limit alarm 1
0--Not alarm
D2=0
1--Alarm
D1 Lower limit alarm 2
0--Not alarm

90
Graphical Programming software SCControl

1--Alarm
D0 Upper upper limit alarm 5
0--Not alarm
D2=1
1--Alarm
D1 Lower lower limit alarm 6
0--Not alarm

D3

D4

D5

D6

D7

1--Fault, false signal


D8 Module fault 256
0--No fault

1--Alarm
D9 Speed alarm 512
0--Not alarm

1--Auto measure signal


D10 Manual/Auto input of signal 1024
0--Manual set signal

1--Alarm
Outrange alarm(channel fault
D11 2048
alarm)
0--Not alarm

1--Alarm
D12 Time limit alarm 4096
0--Not alarm

D13

D14

D15

If the circuit between measuring point and transmitter is short-circuit or


circuit, and it leads signal outrange, this can be called open-circuit alarm as
well. If the input is type current signal whose measuring span is between 4

91
Graphical Programming software SCControl

to 20mA, if the input circuit is short-circuited, then it is 0mA which can be


vindicated by D11 bit of flag.

For example, if you need to verdict whether one analog input signal is on
HH limit alarm, do "And" operation to member Flag and the related value 5
of member HH of this analog signal firstly (see the above table), that is to
shield non-related bit and only remain the related bit (D2D0) of FLAG, then
compare the value that is after completing "And" operation with this related
value 5, and verdict whether they are equal. If they are equal, then indicate
that this signal is on the status of HH limit alarm; or this signal is not on the
status of HH limit alarm. In principle, when HH limit alarms, upper limit also
alarms; in a similar way, LL limit alarms, lower limit also alarms.

1.4 GRAPHICAL PROGRAMMING USER GUIDE

It is convenient to use graphical programming software. Following will


introduce the use of software's running environment, editing interface,
menu item function, program type description, variable type description,
project design, file structure and on-line debug.

1.4.1 RUNNING ENVIRONMENT

SCControl is required to run in IPC with above PII 300 and 128M memory.

Operating system needs:

z Windows NT/2000, SP2 or above grade

z Windows 7

z Windows XP

If online debugging is required, SCControl should be connected to MPU or


simulation module of control station.

1.4.2 INTRODUCTION OF PROGRAMMING INTERFACE

The programming interface of SCControl software is very friendly. It


provides many modularized function blocks on a graphic interface. The
user can easily complete programming through selection, place, move and

92
Graphical Programming software SCControl

connection of modules, contacts, coils, etc. it is easier, more convenience


and visual.

Figure 1-59 Programming interface

The above figure is a programming interface of software, including column


of menu, toolbar, status, project, info and editing area of program.

1. Menu

Figure 1-60 Menu

Menu integrates most functions of software. To use menu efficiently can


help to complete editing of normal programs.

2. Toolbar

Figure 1-61 Toolbar

Toolbar makes many important functions in menu become icons, which


simplifies operation. The icons on toolbar are related to menu items and
rely on the status of menu items. If menu item is gray, related icon will be

93
Graphical Programming software SCControl

gray. If menu item is activated, then related toolbar icon will be also
activated.

‰ Configuration elements of LD

Figure 1-62 Configuration elements of LD

‰ Configuration elements of SFC

Figure 1-63 Configuration elements of SFC

‰ Configuration elements of FBD

Figure 1-64 Configuration elements of FBD

3. Workspace

Figure 1-65 Project column (Workspace)

4. Programming area

The program editing area shown in the following figure is used to design
and edit programs and modules. The background of window is logic
coordinate grid.

94
Graphical Programming software SCControl

Figure 1-66 Editing area

5. Information column

Info column is used to display related successful info of compiling and


project’s opening.

Info column will output “Open project succeed” if the user succeeds in
opening a project or creating a new project. Otherwise, it will output “Open
project failed”.

Figure 1-67 Information column

Info column will output “Compile succeed” if a program section or project is


compiled successfully.

Figure 1-68 Information of compile success

If the program section or project is not finished or has errors, the compiling
will not succeed and info column (Output) will output the unsuccessful
reason (Shown as the following figure). The user has to modify the program
and debug over and over again till info column outputs “Compiling succeed”,
then the user can turn to the next operation.

Figure 1-69 error info of compiling

95
Graphical Programming software SCControl

Besides, info column (Output) also displays error info during compiling.
Double-click error info to jump to related wrong diagram element. It is used
to easily correct errors.

6. Status

Figure 1-70 Status column

Status column lies in the bottom of interface, displaying status of editing.


E.g. it can remind the user of pressing F1 to get help information if the user
has any trouble.

1.4.3 INTRODUCTION OF MENU ITEMS

Brief introduction for menu items

Menu integrates all the functions of SCControl; you can edit the whole
project by making well use of the menu. SCControl software provides users
with File, Edit, View, Object, Project, Build, Window and Help, totally 8
types of menu items. They are introduced as follows:

File Edit

View Object

Project Compile

Window Help

1. Introduction of file menu function

There are many functions on file menu pop. Using or effective managing
these functions will be greatly helpful to edit of graphical programming
software.

New project

It is used to create a new project file of graphical programming software.


For its related content, please refer "Create New Project" in FBD language

96
Graphical Programming software SCControl

programming or in LD language programming. Users can create multiple


projects in the same editing environment in graphical programming
software.

Open

Open created or reserved project file of graphical programming. When


editing already existent project file, select file/ open instruction or click open
button of tool column directly by the left key of mouse, then screen will
appear dialog frame of open project. In this software users can open
multiple projects in the same editing environment.

Close

It is used to close a project file of graphical programming, which is being


editing or has been edited.

Save Project

After completing whole project's editing (including program section), click


save icon of tool column or select save project item of file menu. If the file
which is to be saved is an unnamed new file, then screen will appear save
as dialog frame, letting user enter in file name.

If editing a already existent old project file and saving it, then it will directly
save as original file name automatically instead of appearing a dialog frame.
Edited project's content will cover with original content.

Save Project As

It is used to save original project file as another type's file, or as a same


type's file with other file name.

New Section

It is used to create a new program section. For related content, please refer
"Create New Program Section" in LD or FBD language programming.

Open Section

It is used to open an already built and existent program section.

97
Graphical Programming software SCControl

Save

It is used to save program section which has been edited or is being edited.

Print

After saving project or program section file, if users want to print built file
content, click "Print" icon button or select file/print instruction to execute
print, and it will appear a dialog frame of "Print". Shown as figure:

Figure 1-71 Print

‰ Printer

The name of printer displayed in panel is the appointed model


when installing Windows 95. Change or add it in the pull-down
list frame.

‰ Print range

It is used to select and set the printed part. Choices:

All: print whole file.

98
Graphical Programming software SCControl

Page Number: point page NO. that needs to be printed in word


frame.

Select range: print user selected part in file.

‰ Print to file

This check box is to save the file content that needs to be printed
in one file instead of printing out by printer. When printing this file
in another computer that only has DOS system, users can enter
in command under DOS prompt:

TYPE File name

Print it out directly. Do not need to enter Window environment.

This function is related to hardware, so it contains not only printed content


but also configuration info of printer, such as printer model and sheet type
inside of the printed file. Consequently, when using this function, make sure
that the printer and print set of two computers are fully the same.

‰ Copy

Select the copy that needs to be printed.

‰ Attribute

Click "Paper" and it will appear the following dialog frame:

99
Graphical Programming software SCControl

Figure 1-72 Attribute

Therein, there are sheet, diagram and equipment item three parts. Users
can set separately according to requirement.

Before formal printing file, SUPCON flow chart making software provides
the function of browsing file printing status: file/print browse. It can avoid
unnecessary waster because of improper of printer's status.

Print Preview

It is used to observe actual printing effect before formal printing. For


specific info, please refer print function.

Print Setup

It is used to select required print set condition in dialog frame of "Print Set"
to get the best printing effect according to users' actual requirement. For
specific info, please refer print function.

Exit

Exit project editing status of graphical programming software. At that time, it

100
Graphical Programming software SCControl

will close all being edited programs or module files.

2. Introduction of edit menu function

Undo

It is used to cancel last time's operation. SCControl software offer time after
time undo function.

Redo

After executing undo operation, used to make edit status coming back to
before undo operation.

Cut

It is used to make designated content by user in program editing region


copying to paste plate, at the same time delete original content in this
region.

Paste plate means a part of memory in operation system. Use it can


transfer function block, coil, contact, text or their combination between
several module files and transfer them between several programs.

Operation process is as follows:

1) Select cutting content

Select cutting content with mouse.

2) Cut

Click cut button with mouse, selected content will be copied to paste
plate and at the same time delete original content of this region.

That time according requirement user can copy the content of paste
plate into other file of graphical programming software.

Copy

It is used to copy selected content in edit region to paste plate, besides


didn't delete selected content other function and using method are the

101
Graphical Programming software SCControl

same with cut. Particular users please see also "Cut function" detail.

Paste

It is used to copy the newest content of paste plate into designated edit
region. Click paste icon of tool column, a paste icon will appear and move
with mouse, at designated place click left button of mouse, the newest
content of paste plate will be pasted in this place.

This function should be used after cutting or coping, otherwise because


paste plate have no contents, so icon appears as gray, indicates this
function isn't effective.

This function may be executed by several times, between two operations


user may use left/right or up/down rolling bar to change editing zone place
in whole program.

Delete

It is used to delete a selected object.

Look up

It is used to search needed information by user for example module, text,


variable etc. User can fill in by him self or through browsing according
different type, data source etc and see also "Look up and Replace".

Replace

It is used to replace content of project or section by other content needed


by user and see also “Look up and Replace”.

Select all

It is used to select all contents in edit region, which include function block,
contact, link wire, coil and text etc.

3. Introduction of object function

SCControl provides many object functions; it is convenient for users to


select function blocks, kinds of contacts, coils and texts. Following objects

102
Graphical Programming software SCControl

are parts of them and other contents can refer “Jump function”.

Select

It is used to select module, link wire, coil etc. in editing region, it is default
operation.

Link

Link wire is used to connect module with module, module with coil, module
with bus, module with contact etc.

Vertical link

A vertical link wire is used to connect several inputs with an output. Inputs
may have several, they are module, bus, coil etc. Output is only one, may
connect with module or coil. Its function equals a module.

Last used function block

Place a function block used recently in editing region.

Reverse

It is used to take reverse action for input or output of module.

Remark text

The word description is used to remark in program editing region.

Select function block

It is used to select functions, which have different type (such as select


module, Boolean calculation, etc), different action (such as ADD, SHL, etc)
and different data type (such as FLOAT, INT, etc). User can select them in
dialog frame shown as following figure freely.

103
Graphical Programming software SCControl

Figure 1-73 Selection modules

Variable definition

It is used to declare variable, after declared variable may be used.

4. Introduction of project function

Control Station Address

It is used to appoint project corresponding control station address.

Data Type Declarations

It is used to edit user-defined data type.

Global Variables

It is used to define global variables.

Section Manager

It is used to manage program section in project, including open, cancel,


import and export.

Task Manager

This function is used to set running period of program in project. In one


project, there are always multiple programs whose importance or the calling

104
Graphical Programming software SCControl

period when running in project is different. In order to get reasonable


execution time, avoid conflict when each project is executed, and optimize
process procedure in project's shared time process, users can use this
function to arrange running period of each program according to practical
requirement.

Figure 1-74 Set running period

The above figure is dialog frame of setting running time. Users can click the
"modify period" button at the right side of the dialog frame to modify running
period.

Graphical programming uses the control period 1Ts set in system


configuration software, that is, if users set the control period as 0.1s
configuration process of system configuration software, then 1Ts equals
0.1s.

Users can set the priority of each program's running of the same running
period through several operations, such as "shift to head", "upper shift",
"lower shift" and "shift to end". That means the same period program that is
in the front will be executed first. The program's priority between different
running periods can be compared.

5. Introduction of Window

105
Graphical Programming software SCControl

Cascade

Cascade ranges all the opened windows and windows have opened before
are shown in the edit area, shown as following:

Figure 1-75 Cascade

Title Horizontally

Show all the opened windows in the edit area with the method of title
horizontally, shown as following:

106
Graphical Programming software SCControl

Figure 1-76 Title horizontally

Close All

Close all the opened windows.

6. Introduction of Help menu

Content

Submit online helps. When using graphical program software make LD,
FBD language programming or carry through other operations, will produce
questions, meet problem and hope helps, then may click this menu and get
a lot of detailed, related helping information from software.

About SCControl

Submit the edition right of software, version number and related


information.

7. Introduction of Build

Compile

It is used to compile projects consisted of programs, modules or an


independent project, in order to generate recognizable target code by

107
Graphical Programming software SCControl

machine.

Rebuild All

Redistribute control station memory in building.

Connect

It is used to connect projects and control station.

Debug

It is used to observe execution

Variable Debugger

It is used to set program variables by manual setting to debug the correct of


projects or programs when running projects.

Figure 1-77 Interface of variable debugger

1.4.4 DESCRIPTION OF VARIABLE TYPE

Graphical programming software supports multiple data types,


programming software use the compiling method of forcing type conversion,
there is no implicit type conversion between different types. Types which
are supported by system are shown as following:

108
Graphical Programming software SCControl

Types which are supported by system

Type Description

BOOL 1Byte

BYTE 1Byte

INT 2Bytes

UINT 2Bytes

WORD 2Bytes

SFLOAT 2Bytes

LONG 4Bytes

ULONG 4Bytes

DWORD 4Bytes

FLOAT 4Bytes

structAccum 8Bytes

structAI AIByte

structDI DIByte

structPAT PATByte

structCSC CSCByte

structBSC BSCByte

Graphical programming supports user-defined array and structure.


User-defined structure supports optional depth nesting.

1.4.5 PROJECT DESIGN

Main step of designing

Step 1 Start graphical programming

Start configuration software SCKey from Windows, and then start graphical
programming from user-defined graphical configuration after opening
object file.

Or directly start graphical programming from Windows

109
Graphical Programming software SCControl

Step 2 Create or open project

Select "New Project" from "File" menu. Enter project name in the dialog
frame of "New Project".

Select "Open project" from "File" menu. Select the project file that needs to
be edited in the dialog frame of "Open Project".

Select "Recent open files" from "File" menu.

Step 3 Programming

Select "New Section" from "File" menu. Enter section name in the dialog
frame and select section attributes.

Use toolbars or "Object" command in menu to create program.

Select "Task Manage" from "Project" menu to set program's execution


period and sequence.

Select "Control Station Address" from "Project" menu to set related control
station address.

Step 4 Save compiling

Select "Save project" or "Save Project as" from "File" menu.

Select "Compile" or "Rebuild all" from "Build" menu.

Step 5 Download and test

Select "Connect" from "Build" menu and then download.

Select "Debug" from "Build" menu.

Step 6 Optimum and disconnect

After revising program several times, should make memory optimum.


Select "Rebuild all" from "Build" menu will redistribute memory resource
and optimize compiling.

Select "Connect" again to disconnect.

110
Graphical Programming software SCControl

Step 7 Documentation

After completion of project debugging, a whole set of documentation should


be made.

1.4.6 FILE STRUCTURE

The file directory structure after successfully compiling is as the following:

Figure 1-78 File structure

Just as the above example, samples.prj is actual project file.

Samples.dbg includes project's memory mirror of control station and each


variable's address of control station is preserved in this file. To delete this
file will result in rebuilding that memory mirror.

Samples.bin is created by project code. Download this code to control


station to execute related control scheme.

The sub-directory of Samples includes project's section file.

1.4.7 ON-LINE DEBUGGING

After the connection of editor and control station, users can download
programs and do online debug. When doing inline debug, operating station
and actual control station should be checked first, if they are not the same,
do alarm. Current project in editor is actually connected to control station,
so switching value and switching link in program will display on and off

111
Graphical Programming software SCControl

status according to actual data. Debugging text (PV) in program will display
its actual value. Users can set the data of control station through PV set.

1. Connect

Only when connect is on work can it use debug command. Enter into
connection status by using connect instruction in Compile menu or click
connect button on tool pop. At that time, debug command become into
usable status from unusable status.

2. Debug

Press debug button to enter into debugging status. Under debugging


status, users can observe the changes of BOOL variable by motion picture
form and operate analog data from debugging text as well. Shown as
figure:

Figure 1-79 The status of debugging

When BOOL values of variable and link are ON, motion picture is green,
when OFF, it is red.

Press Variable Debugger to enter into dialog frame of debug variable.


Users can enter in the variable value that is needed to debug in the dialog
frame. Variable value will be refreshed real-timely.

112
Graphical Programming software SCControl

Figure 1-80 Variable debugging

Running time

Under debugging status, open running time window to observe the time
that every program spends on every execution.

Figure 1-81 Running time

1.4.8 PASSWORD PROTECT

‰ Set password

‰ Delete password

‰ Use attention

113
Graphical Programming software SCControl

1. Set password

Password composed with character, number or underline, left-click to


select the opened section and right-click to appear the setting menu of
password as follows:

Figure 1-82 Set password

The section set password or delete password must after opening edit
interface.

Close the section with password protect, the section is on password


protect status, users can't set password or delete password. Only when
after opening edit interface, then can set password or delete password.

2. Delete password

After opening section in edit interface, if have password then can delete
password operation. When deleting password, appeared confirm dialog box,
show as follows. After confirming delete password, the password deleted
from the project.

Figure 1-83 Delete password

114
Graphical Programming software SCControl

3. Use attention

Edition of the project file

When a section in project file is set password, old SCControl version can
not open the project file with password protection.

Import and export of section

The current exported section, if passwords are protected, the section led
out has a password that is protected all the time. When importing, the edit
interface is the same as close status as default, the password is the same
with before.

Renaming operation for section

If the current section edit interface with password protection is on open, the
corresponding section still has password protection after modifying and on
open. As well as if the current section edit interface with password
protection is on close, the corresponding section still has password
protection after modifying and on close.

Operation in the output column

When the current section is in the state of password protecting and editor
interface is on open, password input frame will appear when double clicking
the object in output frame. Section edit interface will be on open after
inputting a correct password and avoid password input frame right away to
double click afterwards.

Operation of the project file

If doing the operation of “Save as” for project file with password protection,
then the corresponding sections are still protected by password.

1.5 GRAPHICAL PROGRAMMING MODULE DATABASE

Graphical programming module database, including function blocks defined


in IEC61131-3 and some frequent function blocks, such as:

115
Graphical Programming software SCControl

‰ Arithmetic operation: addition, subtraction, multiplication,


division, modulo, etc;

‰ Flip-flop trigger: RS, SR, etc;

‰ Comparison operation: greater than or equal to, greater than,


less than or equal to, less than, equal to, not equal to, etc;

‰ Conversion operation: Conversion between different kinds of


data types.

‰ Select operation: single selection, multi-selection;

‰ Boolean calculation: logical AND, logical OR, logical NOT,


logical XOR, etc;

‰ Mathematics function: absolute value, cosine, sine, component,


logarithm, etc;

‰ Counter: CTD, CTU, CTUD;

‰ Timer: TON, TOFF, TP;

‰ Input manage: filtering, alarm, warm-pressing compensation


polygonal line interpolation;

‰ Control module: single loop PID, cascade control;

‰ Communication assistant function: send message, get


message;

‰ Cumulation function: cumulation function, cumulation


conversation;

1.5.1 IEC MODULE DATABASE

1. IEC comparing module

IEC Comparing module including six modules: Unequal, Greater, Greater


or equal, Equal, Less and Less or equal, shown as follows:

116
Graphical Programming software SCControl

Unequal module

Great module

Great or equal module

Equal module

Less module

Less or equal module

1) Unequal module

NE_BOOL

Brief Description

The function of this module is checking if first input value isn't equal
to the second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 !=IN2

OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 BOOL First input

117
Graphical Programming software SCControl

IN2 BOOL Second input

OUT BOOL Output

NE_DWORD

Brief Description

The function of this module is checking if first input value isn't equal to
the second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1!=IN2

OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 DWORD First input

IN2 DWORD Second input

OUT BOOL Output

NE_FLOAT

Brief Description

The function of this module is checking if first input value isn't equal to

118
Graphical Programming software SCControl

the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 != IN2

OUT = OFF if IN1 = IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output

NE_INT

Brief Description

The function of this module is checking if first input value isn't equal to
the second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

119
Graphical Programming software SCControl

Formula

OUT = ON if IN1!=IN2
OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT BOOL Output

NE_SFLOAT

Brief Description

The function of this module is checking if first input value isn't equal to the
second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1!=IN2
OUT = OFF if IN1= IN2

120
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT BOOL Output

NE_LONG

Brief Description

The function of this module is checking if first input value isn't equal to the
second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.


Representation

Symbol

Formula

OUT = ON if IN1!=IN2

OUT = OFF if IN1=IN2

Parameter describing

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT BOOL Output

121
Graphical Programming software SCControl

NE_UINT

Brief Description

The function of this module is checking if first input value isn't equal to the
second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1!=IN2

OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT BOOL Output

NE_ULONG

Brief Description

The function of this module is checking if first input value isn't equal to the
second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

122
Graphical Programming software SCControl

Symbol

Formula

OUT = ON if IN1!=IN2

OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT BOOL Output

NE_WORD

Brief Description

The function of this module is checking if first input value isn't equal to the
second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

123
Graphical Programming software SCControl

OUT = ON if IN1!=IN2
OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 WORD First input

IN2 WORD Second input

OUT BOOL Output

NE_BYTE

Brief Description

The function of this module is checking if first input value isn't equal to the
second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1!= IN2

OUT = OFF if IN1=IN2

Parameter Description

Parameter Data type Meaning

IN1 BYTE First input

IN2 BYTE Second input

124
Graphical Programming software SCControl

OUT BOOL Output

2) Greater module

GT_FLOAT

Brief Description

The function of this module is checking if the first input value is greater than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 > IN2

OUT =OFF if IN1<=IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output

GT_INT

125
Graphical Programming software SCControl

Brief Description

The function of this module is checking if the first input value is greater than
the second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 > IN2

OUT =OFF if IN1 <= IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT BOOL Output

GT_LONG

Brief Description

The function of this module is checking if the first input value is greater than
the second one; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

126
Graphical Programming software SCControl

Symbol

Formula

OUT = ON if IN1 > IN2

OUT = OFF if IN1 <= IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT BOOL Output

GT_SFLOAT

Brief Description

The function of this module is checking if the first input value is greater than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 > IN2

127
Graphical Programming software SCControl

OUT = OFF if IN1 <=IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT BOOL Output

GT_UINT

Brief Description

The function of this module is checking if the first input value is greater than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 > IN2

OUT =OFF if IN1 <= IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

128
Graphical Programming software SCControl

OUT BOOL Output

GT_ULONG

Brief Description

The function of this module is checking if the first input value is greater than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 > IN2

OUT =OFF if IN1 <= IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT BOOL Output

3) Great or equal module

GE_FLOAT

Brief Description

The function of this module is checking if the first input value is greater than

129
Graphical Programming software SCControl

or equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 >= IN2

OUT = OFF if IN1 < IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output

GE_INT

Brief Description

The function of this module is checking if the first input value is greater than
or equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

130
Graphical Programming software SCControl

Formula

OUT = ON if IN1 >= IN2

OUT = OFF if IN1 < IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT BOOL Output

GE_LONG

Brief Description

The function of this module is checking if the first input value is greater than
or equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula
OUT = ON if IN1 >= IN2

131
Graphical Programming software SCControl

OUT = OFF if IN1 < IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT BOOL Output

GE_UINT

Brief Description

The function of this module is checking if the first input value is greater than
or equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 >= IN2

OUT = OFF if IN1 < IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

132
Graphical Programming software SCControl

OUT BOOL Output

GE_SFLOAT

Brief Description

The function of this module is checking if the first input value is greater than
or equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 >= IN2

OUT = OFF if IN1 < IN2


Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output

GE_ULONG

Brief Description

The function of this module is checking if the first input value is greater than
or equal to the second one, it is then outputs ON, otherwise OFF.

133
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 >= IN2

OUT = OFF if IN1 < IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT BOOL Output

4) Equal module

EQ_BOOL

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

134
Graphical Programming software SCControl

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1 != IN2

Parameter Description

Parameter Data type Meaning

IN1 BOOL First input

IN2 BOOL Second input

OUT BOOL Output

EQ_DWORD

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

135
Graphical Programming software SCControl

OUT = OFF if IN1 != IN2

Parameter Description

Parameter Data type Meaning

IN1 DWORD First input

IN2 DWORD Second input

OUT BOOL Output value

EQ_INT

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

136
Graphical Programming software SCControl

OUT BOOL Output value

EQ_FLOAT

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output value

EQ_LONG

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other; it is then outputs ON, otherwise OFF.

137
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT BOOL Output value

EQ_SFLOAT

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

138
Graphical Programming software SCControl

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT BOOL Output value

EQ_UINT

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other; it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

139
Graphical Programming software SCControl

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT BOOL Output value

EQ_ULONG

Brief Description

The function of this module is checking two inputs. If input values are equal
to each other, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Parameter Meaning

IN1 ULONG First input

IN2 ULONG Second input

140
Graphical Programming software SCControl

OUT BOOL Output

EQ_WORD

Brief Description

The function of this module is checking two inputs. If input values are equal
to each other, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 WORD First input

IN2 WORD Second input

OUT BOOL Output value

EQ_BYTE

Brief Description

The function of this module is checking two inputs, if input values are equal
to each other; it is then outputs ON, otherwise OFF.

141
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 = IN2

OUT = OFF if IN1!= IN2

Parameter Description

Parameter Data type Meaning

IN1 BYTE First input

IN2 BYTE Second input

OUT BOOL Output value

5) Less module

LT_FLOAT

Brief Description

The function of this module is checking if the first input value is less than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

142
Graphical Programming software SCControl

Formula

OUT = ON if IN1 < IN2

OUT =OFF if IN1 >= IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output

LT_INT

Brief Description

The function of this module is checking if the first input value is less than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 < IN2

OUT =OFF if IN1 >= IN2

143
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT BOOL Output

LT_LONG

Brief Description

The function of this module is checking if the first input value is less than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 < IN2

OUT = OFF if IN1 >= IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT BOOL Output

144
Graphical Programming software SCControl

LT_SFLOAT

Brief Description

The function of this module is checking if the first input value is less than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 < IN2

OUT = OFF if IN1 >= IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT BOOL Output

LT_UINT

Brief Description

The function of this module is checking if the first input value is less than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

145
Graphical Programming software SCControl

Symbol

Formula

OUT = ON if IN1 < IN2

OUT = OFF if IN1 >= IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT BOOL Output

LT_ULONG

Brief Description

The function of this module is checking if the first input value is less than
the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 < IN2

146
Graphical Programming software SCControl

OUT =OFF if IN1 >= IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT BOOL Output

6) Less or equal module

LE_INT

Brief Description

The function of this module is checking if the first input value is less than or
equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 <= IN2

OUT = OFF if IN1>IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

147
Graphical Programming software SCControl

IN2 INT Second input

OUT BOOL Output

LE_FLOAT

Brief Description

The function of this module is checking if the first input value is less than or
equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 <= IN2

OUT = OFF if IN1 > IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT BOOL Output

LE_LONG

Brief Description

The function of this module is checking if the first input value is less than or
equal to the second one, it is then outputs ON, otherwise OFF.

148
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 <= IN2

OUT = OFF if IN1 > IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT BOOL Output

LE_SFLOAT

Brief Description

The function of this module is checking if the first input value is less than or
equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

149
Graphical Programming software SCControl

Formula

OUT = ON if IN1 <= IN2

OUT = OFF if IN1 > IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT BOOL Output

LE_UINT

Brief Description

The function of this module is checking if the first input value is less than or
equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 <= IN2

OUT = OFF if IN1 > IN2

Parameter Description

Parameter Data type Meaning

150
Graphical Programming software SCControl

IN1 UINT First input

IN2 UINT Second input

OUT BOOL Output

LE_ULONG

Brief Description

The function of this module is checking if the first input value is less than or
equal to the second one, it is then outputs ON, otherwise OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ON if IN1 <= IN2

OUT = OFF if IN1 > IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT BOOL Output

2. IEC Counter and timer module

IEC Counter and timer module including ten different kinds of function
module, parts of them is: RS trigger, SR trigger, R_TRIG trigger, F_TRIG

151
Graphical Programming software SCControl

trigger, TOFF timer, TON timer, TP timer, CTD, CTU and CTUD.

RS trigger module

Brief Description

The function of this module is used to store RS, reset has a priority.

If R1 = ON, Q1 becomes OFF.

If R1 = OFF, S = ON, then Q1 = ON.

If R1 = OFF, S = OFF, then Q1 keeps original status.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID RS (S, R1, Q1)

Parameter Description

Parameter Data type Meaning

S BOOL Set

R1 BOOL Reset(priority)

Q1 BOOL Output

SR trigger

Brief Description

The function of this module is used to store RS, set has a priority.

If S1 = ON, Q1 becomes ON.

152
Graphical Programming software SCControl

If S1 = OFF, R = OFF, then Q1 keeps original status.

If S1 = OFF, R = ON, then Q1 = OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

S1 BOOL Set (priority)

R BOOL Reset

Q1 BOOL Output

R_TRIG

Brief Description

The function of this module is raising trigger, that is when CLK changes
from OFF to ON, Q will be ON at next cycle and OFF at other situation.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID R_TRIG(CLK,Q)

153
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

CLK BOOL Input

Q BOOL output

F_TRIG

Brief Description

The function of this module is falling trigger, that is when CLK changes from
ON to OFF, Q will be ON at next cycle and OFF at other situation.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID F_TRIG(CLK,Q)
Parameter Description

Parameter Data type Meaning

CLK BOOL Input

Q BOOL Output value

TOFF

Brief Description

The function of this module is when input changes from ON to OFF, Q will
has a delay output

EN and ENO are set as additional parameters.

154
Graphical Programming software SCControl

Representation

Symbol

VOID TOFF (IN, PT, Q, ET)

Parameter Description

Parameter Data type Meaning

IN BOOL Input

PT ULONG Preset delay time (ms)

Q BOOL Output status

ET ULONG Inner clock

Detail

Any time, if IN = ON, then Q = ON, ET = 0.

If IN becomes OFF, will start inner clock ET, increase as (system running
period * number of task running period), delay start. For example, set
system running time in SCKey is 500ms, task management in SCControl
occupies 5 periods, so delay increases 2500ms every time. If inner clock
attains PT, Q becomes OFF, ET = PT. if IN becomes ON before ET attains

155
Graphical Programming software SCControl

PT, then ET = 0, Q = ON.

TON

Brief Description

The function of this module is when input changes from OFF to ON, Q will
has a delay output.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

IN BOOL Input

PT ULONG Preset delay time (ms)

Q BOOL Output status

ET ULONG Inner clock

Detail

156
Graphical Programming software SCControl

Any time, if IN = OFF, then Q = OFF, ET = 0.

If IN becomes ON, will start inner clock ET, increase as (system running
period * number of task running period), delay start. For example, set
system running time in SCKey is 500ms, task management in SCControl
occupies 5 periods, so delay increases 2500ms every time. If inner clock
attains PT, Q becomes ON, ET = PT. if IN becomes ON before ET attains
PT, then ET = 0, Q = OFF.

TP

Brief Description

The function of this module is building up a pulse, which has a certain time.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID TP(IN,PT,Q,ET)

Parameter Description

Parameter Data type Meaning

IN BOOL Input

PT ULONG Preset delay time (ms)

Q BOOL Output status

ET ULONG Inner clock

Detail

157
Graphical Programming software SCControl

If ET = 0, IN becomes ON, then Q becomes ON, will start inner clock ET,
increase as (system running period * number of task running period). For
example, set system running time in SCKey is 500ms, task management in
SCControl occupies 5 periods, so delay increases 2500ms every time. If
inner clock has not attained PT, IN becomes OFF, both ET and Q will be
impacted. If ET attains PT, Q becomes OFF (there is no relationship with
IN). IN becomes OFF if ET attains PT, inner clock stops ET= 0, Q = OFF.

CTD

Brief Description

The function of this module (counter down) is:

When LD = ON, CV = PV.

When LD = OFF, CD = ON, CV subtract 1 every period until -32767;

In despite of LD and CD, when CV>0, Q = OFF, when CV<=0, Q = ON.

EN and ENO are set as additional parameters.

Representation

Symbol

158
Graphical Programming software SCControl

VOID CTD (CD,LD,PV,Q,CV)

Parameter Description

Parameter Data type Meaning

CD BOOL Counting switch

LD BOOL Data input

PV INT Preset value

Q BOOL Output indication

CV INT Counting value

CTU

Brief Description

The function of this module (counter up) is:

When R = ON, CV = 0;

When R = OFF, CU = ON, CV add 1 every period;

In despite of R and CU, when CV<PV, Q=OFF; when CV>=PV, Q = ON.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID CTU (CU,R,PV,Q,CV)

159
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

CU BOOL Counting switch

R BOOL Reset

PV INT Preset value

Q BOOL Output indication

CV INT Counting value

CTUD

Brief Description

The function of this module (counter up/ down) is:

When R = ON, CV = 0, QU = OFF, QD = ON (counter up return to 0);

When LD = ON, CV = PV, QU = ON, QD = OFF (counter down return to 0);

If both the values of R and LD are ON, R is priority.

When R = LD = OFF, if CU = ON, CD = OFF, then it is up counter, CV add 1;


when CV>= PV, QU = ON, CV continue add to 32767.

When R = LD = OFF, if CU = OFF, CD = ON, then it is down counter, CV


subtract 1; when CV<=0, QD = ON, CV continue subtract to -32767.

EN and ENO are set as additional parameters.

Representation

Symbol

160
Graphical Programming software SCControl

VOID CTUD (CU, CD, R, LD, PV, QU, QD, CV)

Parameter Description

Parameter Data type Meaning

CU BOOL Up counting trigger input

CD BOOL Down counting trigger input

R BOOL Reset

LD BOOL Data load switch

PV INT Preset value

QU BOOL Up counting indication

QD BOOL Down counting indication

CV INT Counting value

3. IEC Boolean calculation module

IEC Logic operation module including: AND, OR, NOT, Cyclic shift left,
Cyclic shift right, Shift left, Shift right and XOR function operator and so on,
show as follows:

Tag and: perform and operation to every input, that is 1&1 equals 1,1&0
equals 0, and 0&0 equals 0. For example, 10011001&00101101 equals
00001001.

Tag or: perform or operation to every input that is 1|1 equals 1, 1|0 equals 1,
and 0|0 equals 0. For example, 10011001|00101101 equals 10111101.

Not: perform not operation to every input that is ~ 1 equals 0 and ~ 0 equals
1. For example, ~10011001 equal 01100110.

Left shift: perform left shift to input, and zeroes from right. For example,
a=01000000, a<<1=10000000 and a<<2=00000000.

Right shift: perform right shift to input and zeroes from left. For example,
b=1001011111101101 and b>>1=0100101111110110.

161
Graphical Programming software SCControl

Cycle left shift: perform left shift to input and high order's overflow item fills
in low order. For example, c equals 10101001, when cycle shifts two digits
to left, it becomes 10100110.

Cycle right shift: perform right shift to input and low order's overflow item
fills in high order. For example, d equals 10101001, when cycle shifts two
digits to right, it becomes 01101010.

Not or: perform tag not or operation to every input. That is 1^1 equals 0, 1^0
equals 1 and 0^0 equals 0. For example, 10100101^01101100 equals
11001001.

AND_BOOL

Brief Description

The function of this module is taking the inputs, carrying AND operation,
assigning to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 AND IN2 AND...INn

Parameter Description

Parameter Data type Meaning

IN1 BOOL First input

IN2 BOOL Second input

INn BOOL The Nth input

162
Graphical Programming software SCControl

OUT BOOL Output

AND_DWORD

Brief Description

The function of this module is taking the inputs, carrying AND operation,
assigning to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 AND IN2 AND...AND INn

Parameter Description

Parameter Data type Meaning

IN1 DWORD First input

IN2 DWORD Second input

INn DWORD The Nth input

OUT DWORD Output

AND_WORD

Brief Description

The function of this module is taking the inputs, carrying AND operation,
assigning to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

163
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT=IN1 AND IN2 AND...AND INn

Parameter Description

Parameter Data type Meaning

IN1 WORD First input

IN2 WORD Second input

INn WORD The Nth input

OUT WORD Output

AND_BYTE

Brief Description

The function of this module is taking the inputs, carrying AND operation,
assigning to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 AND IN2 AND...AND INn

164
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 BYTE First input

IN2 BYTE Second input

INn BYTE The Nth input

OUT BYTE Output

OR_BOOL

Brief Description

The function of this module is taking the inputs, carrying OR operation,


assigning to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1 OR IN2 OR ... OR INn

Parameter Description

Parameter Data type Meaning

IN1 BOOL First input

IN2 BOOL Second input

165
Graphical Programming software SCControl

INn BOOL The Nth input

OUT BOOL Output

OR_DWORD

Brief Description

The function of this module is taking the inputs, carrying OR operation,


assigning to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 OR IN2 OR...OR INn

Parameter Description

Parameter Data type Meaning

IN1 DWORD First input

IN2 DWORD second input

INn DWORD The Nth input

OUT DWORD Output

OR_WORD

Brief Description

The function of this module is taking the inputs, carrying OR operation,

166
Graphical Programming software SCControl

assigning to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 OR IN2 OR...OR INn

Parameter Description

Parameter Data type Meaning

IN1 WORD First input

IN2 WORD second

INn WORD The Nth input

OUT WORD Output

OR_BYTE

Brief Description

The function of this module is taking the inputs, carrying OR operation,


assigning to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

167
Graphical Programming software SCControl

Formula

OUT=IN1 OR IN2 OR...OR INn

Parameter Description

Parameter Data type Meaning

IN1 BYTE First input

IN2 BYTE second

INn BYTE The Nth input

OUT BYTE Output

NOT_BOOL

Brief Description

The function of this module is taking the input, carrying NOT operation,
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = NOT IN

Parameter Description

Parameter Data type Meaning

168
Graphical Programming software SCControl

IN BOOL Input

OUT BOOL Output

NOT_DWORD

Brief Description

The function of this module is taking the input, carrying NOT operation,
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = NOT IN

Parameter Description

Parameter Data type Meaning

IN DWORD Input

OUT DWORD Output

NOT_WORD

Brief Description

The function of this module is taking the input, carrying NOT operation,
assigning to output.

EN and ENO are set as additional parameters.

Representation

169
Graphical Programming software SCControl

Symbol

Formula

OUT = NOT IN

Parameter Description

Parameter Data type Meaning

IN WORD Input

OUT WORD Output

NOT_BYTE

Brief Description

The function of this module is taking the input, carrying NOT operation,
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = NOT IN

Parameter Description

Parameter Data type Meaning

170
Graphical Programming software SCControl

IN BYTR Input

OUT BYTR Output

SHL_DWORD

Brief Description

The function of this module is taking the inputs, carrying Shift left operation,
assigning to output (fill zero in right side).

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = SHL_DWORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN DWORD Input

N UINT Shift bit’s No.

OUT DWORD Output

SHL_WORD

Brief Description

The function of this module is taking the inputs, carrying Shift left operation,
assigning to output (fill zero in right side).

EN and ENO are set as additional parameters.

Representation

171
Graphical Programming software SCControl

Symbol

OUT = SHL_WORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN WORD Input

N UINT Shift bit's No.

OUT WORD Output

SHR_DWORD

Brief Description

The function of this module is taking the inputs, carrying Shift right
operation, assigning to output (fill zero in left side).

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = SHR_DWORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN DWORD Input

172
Graphical Programming software SCControl

N UINT Shift bit's No.

OUT DWORD Output

SHR_WORD

Brief Description

The function of this module is taking the inputs, carrying Shift right
operation, assigning to output (fill zero in left side).

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = SHR_WORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN WORD Input

N UINT Shift bit's No.

OUT WORD Output

ROL_DWORD

Brief Description

The function of this module is taking the inputs, carrying cyclic shift left
operation, assigning to output.

EN and ENO are set as additional parameters.

Representation

173
Graphical Programming software SCControl

Symbol

OUT = ROL_DWORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN DWORD Input

N UINT Shift bit's No.

OUT DWORD Output

ROL_WORD

Brief Description

The function of this module is taking the inputs, carrying cyclic shift left
operation, assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = ROL_WORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN WORD Input

174
Graphical Programming software SCControl

N UINT Shift bit's No.

OUT WORD Output

ROR_DWORD

Brief Description

The function of this module is taking the inputs, carrying cyclic shift right
operation, assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = ROR_DWORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN DWORD Input

N UINT Shift bit's No.

OUT DWORD Output

ROR_WORD

Brief Description

The function of this module is taking the inputs, carrying cyclic shift right
operation, assigning to output.

EN and ENO are set as additional parameters.

Representation

175
Graphical Programming software SCControl

Symbol

OUT = ROR_WORD(IN,N)

Parameter Description

Parameter Data type Meaning

IN WORD Input

N UINT Shift bit's No.

OUT WORD Output

XOR_BOOL

Brief Description

The function of this module is taking the inputs, carrying XOR operation,
assigning to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 XOR IN2 XOR... XOR INn

Parameter Description

176
Graphical Programming software SCControl

Parameter Data type Meaning

IN1 BOOL First input

IN2 BOOL Second input

INn BOOL The Nth input

OUT BOOL Output

XOR_DWORD

Brief Description

The function of this module is taking the inputs, carrying XOR operation,
assigning to output. The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 XOR IN2 XOR...XOR INn

Parameter Description

Parameter Data type Meaning

IN1 DWORD First input

IN2 DWORD Second input

INn DWORD The Nth input

OUT DWORD Output

177
Graphical Programming software SCControl

XOR_WORD

Brief Description

The function of this module is taking the inputs, carrying XOR operation,
assigning to output. The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=IN1 XOR IN2 XOR...XOR INn

Parameter Description

Parameter Data type Meaning

IN1 The same as other First input

IN2 The same as other Second input

INn The same as other The Nth input

OUT The same as other Output

XOR_BYTE

Brief Description

The function of this module is taking the inputs, carrying XOR operation,
assigning to output. The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

178
Graphical Programming software SCControl

Symbol

Formula

OUT=IN1 XOR IN2 XOR...XOR INn

Parameter Description

Parameter Data type Meaning

IN1 BYTE First input

IN2 BYTE Second input

INn BYTE The Nth input

OUT BYTE Output

4. IEC Mathematic function module

IEC Mathematic function module including LOG, ASIN, ACOS, ATAN, SINH,
COSH, TANH, ABS, POW, SQRT, EXP, SIN, COS, TAN twenty kinds of
functions module an so on, show as follow:

ACOS

Brief Description

The function of this module is taking the input's arccosine operation,


assigning to output as arc.

EN and ENO are set as additional parameters.

Representation

Symbol

179
Graphical Programming software SCControl

Formula

OUT= arccos (IN)

IN: [-π/2, π/2]

OUT: [0, π]

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output (arc)

ATAN

Brief Description

The function of this module is taking the input's arctangent operation,


assigning to output as arc.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT =arc tan (IN)

OUT: [-π/2, π/2]

180
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output(arc)

ATAN2

Brief Description

The function of this module is taking the arctangent operation according


coordinates (x, y), and assigning to output as arc.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = ±arc tan (|y/x|)

OUT: (-π/2, π/2)

Parameter Description

Parameter Data type Meaning

Y FLOAT Input Y

X FLOAT Input X

OUT FLOAT Output(arc)

ASIN

181
Graphical Programming software SCControl

Brief Description

The function of this module is taking the arcsine operation, and assigning to
output as arc.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=arc sin (IN)

IN: [-π/2, π/2]

OUT: [-π/2, π/2]

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output (arc)

COSH

Brief Description

The function of this module is taking the input's project cosine operation,
and assigning to output, the value of input must be arc.

EN and ENO are set as additional parameters.

Representation

Symbol

182
Graphical Programming software SCControl

Formula

OUT= COSH (IN)

e x + e−x
cosh( x) =
2

Parameter Description

Parameter Data type Meaning

IN FLOAT Input(arc)

OUT FLOAT Output

TANH

Brief Description

The function of this module is taking the input's project tangent operation,
and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT= TANH (IN)

e x − e−x
tanh( x) =
e x + e−x

183
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output(arc)

SINH

Brief Description

The function of this module is taking the input's project sine operation, and
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SINH (IN)

e x − e−x
cosh( x) =
2
Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output

ABS_FLOAT

Brief Description

184
Graphical Programming software SCControl

The function of this module is taking the input's absolute value, and
assigning to output.

EN and ENO are set as additional parameters

Representation

Symbol

Formula

OUT=|IN|

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output

ABS_INT

Brief Description

The function of this module is taking the input's absolute value, and
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

185
Graphical Programming software SCControl

OUT=|IN|

Parameter Description

Parameter Data type Meaning

IN INT Input

OUT INT Output

ABS_LONG

Brief Description

The function of this module is taking the input's absolute value, and
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=|IN|

Parameter Description

Parameter Data type Meaning

IN LONG Input

OUT LONG Output

ABS_SFLOAT

Brief Description

186
Graphical Programming software SCControl

The function of this module is taking the input's absolute value, and
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=|IN|

Parameter Description

Parameter Data type Meaning

IN SFLOAT Input

OUT SFLOAT Output

POW

Brief Description

The function of this module is taking the value of y as power x as base, and
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

187
Graphical Programming software SCControl

OUT = POW(X, Y)

Parameter Description

Parameter Data type Meaning

IN1 FLOAT Base

IN2 FLOAT Power

OUT FLOAT Output

SQRT_FLOAT

Brief Description

The function of this module is taking the square root of input and assigning
to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT= SQRT(IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output

188
Graphical Programming software SCControl

SQRT_SFLOAT

Brief Description

The function of this module is taking the square root of input and assigning
to output. The input range of SQRT_SFLOAT is 0~1.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT= SQRT(IN)

Parameter Description

Parameter Data type Meaning

IN SFLOAT Input

OUT SFLOAT Output

COS

Brief Description

The function of this module is taking the cosine of input and assigning to
output.

EN and ENO are set as additional parameters.

Representation

Symbol

189
Graphical Programming software SCControl

Formula

OUT= COS (IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input(arc)

OUT FLOAT output

TAN

Brief Description

The function of this module is taking the tangent of input and assigning to
output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT=TAN (IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input (arc)

190
Graphical Programming software SCControl

OUT FLOAT Output

SIN

Brief Description

The function of this module is taking the sine of input and assigning to
output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SIN (IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output

EXP

Brief Description

The function of this module is taking the value of input as power based e
and assigning to output.

EN and ENO are set as additional parameters.

Representation

191
Graphical Programming software SCControl

Symbol

Formula

and EXP( x) = e
x
OUT = exp (IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output value

LN

Brief Description

The function of this module is taking the logarithm of input based e and
assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = LN (IN) IN>0.

Parameter Description

Parameter Data type Meaning

192
Graphical Programming software SCControl

IN FLOAT Input

OUT FLOAT Output

LOG

Brief Description

The function of this module is taking the input's logarithm operation based
10, assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = LOG (IN) IN>0.

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT FLOAT Output

NEWSQRT

Brief Description

This module is evaluating the square root of the floating point between 0.0
and 1.0 and do linearity compensation according to inputted gradient and
displacement.

Representation

193
Graphical Programming software SCControl

Symbol

Arithmetic

This module only used with SFLOAT type between 0.0 and 1.0 :

When IN<0.0, OUT=0.0;

When IN>1.0, OUT=1.0;

When input between 0.0 and 1.0, the module gets 32 part with this section,
first received the square root value, which every point corresponding. Gets
the value leave in array's care, then gets a section curve to more section
table line. When input IN is in which table line, that can evaluation
according to line section.

Formula:

OUT=Kp x sqrt (IN) +DIS

Parameter Description

Parameter Data type Meaning

IN SFLOAT Input

KP SFLOAT Gradient when doing linearity compensation

DIS SFLOAT Displacement when doing linearity compensation

OUT SFLOAT Output

5. IEC Arithmetic operation module

IEC Arithmetic operation module including kinds of operations module:


Multiply, Divide, Assign, Add, Subtract, Average, mode and so on, show as

194
Graphical Programming software SCControl

follows:

1)Multiply module

MUL_FLOAT

Brief Description

The function of this module is multiplying of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1*IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT FLOAT Output

MUL_INT

Brief Description

The function of this module is multiplying of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

195
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT = IN1*IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT INT Output

MUL_LONG

Brief Description

The function of this module is multiplying of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1*IN2

196
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT LONG Output

MUL_SFLOAT

Brief Description

The function of this module is multiplying of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1*IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT SFLOAT Output

MUL_UINT

197
Graphical Programming software SCControl

Brief Description

The function of this module is multiplying of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1*IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT UINT Output

MUL_ULONG

Brief Description

The function of this module is multiplying of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

198
Graphical Programming software SCControl

Formula

OUT = IN1*IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT ULONG Output

2) Divide module

DIV_FLOAT

Brief Description

The function of this module is dividing of input Int1 to Int2 and its result will
be assigned to output.

EN and ENO are set as additional parameters.

If divisor is 0, return duotricemary notation to 0X0000ffff.


Representation

Symbol

Formula

OUT = IN1/IN2

199
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT FLOAT Output value

DIV_INT

Brief Description

The function of this module is dividing of input Int1 to Int2 and its result will
be assigned to output.

EN and ENO are set as additional parameters.

If divisor is 0, return duotricemary notation to 0X0000ffff.

Representation

Symbol

Formula

OUT = IN1/IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT INT Output value

200
Graphical Programming software SCControl

DIV_LONG

Brief Description

The function of this module is dividing of input Int1 to Int2 and its result will
assign to out.

EN and ENO are set as additional parameters.

If divisor is 0, return to 0X0000ffff.

Representation

Symbol

Formula

OUT = IN1/IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT LONG Output value

DIV_SFLOAT

Brief Description

The function of this module is dividing of input Int1 to Int2 and its result will
be assigned to output.

EN and ENO are set as additional parameters.

If divisor is 0, return duotricemary notation to 0X0000ffff.

201
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT = IN1/IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT SFLOAT Output

DIV_UINT

Brief Description

The function of this module is dividing of input Int1 to Int2 and its result will
be assigned to output.

EN and ENO are set as additional parameters.

If divisor is 0, return duotricemary notation to 0X0000ffff.

Representation

Symbol

Formula

202
Graphical Programming software SCControl

OUT = IN1/IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT UINT Output

DIV_ULONG

Brief Description

The function of this module is dividing of input Int1 to Int2 and its result will
be assigned to output.

EN and ENO are set as additional parameters.

If divisor is 0, return duotricemary notation to 0X0000ffff.

Representation

Symbol

Formula

OUT = IN1/IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

203
Graphical Programming software SCControl

OUT ULONG Output value

3) Assign module

MOVE_BOOL

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.


Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN BOOL First output

OUT BOOL Output

MOVE_DWORD

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

204
Graphical Programming software SCControl

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN DWORD First input

OUT DWORD Output

MOVE_FLOAT

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN FLOAT First input

OUT FLOAT Output

205
Graphical Programming software SCControl

MOVE_INT

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN INT First input

OUT INT Output

MOVE_LONG

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

206
Graphical Programming software SCControl

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN LONG First input

OUT LONG Output

MOVE_SFLOAT

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN SFLOAT First input

OUT SFLOAT Output

MOVE_UINT

Brief Description

207
Graphical Programming software SCControl

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN UINT First input

OUT UINT Output

MOVE_ULONG

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN

208
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN ULONG First input

OUT ULONG Output

MOVE_WORD

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN WORD First input

OUT WORD Output

MOVE_BYTE

Brief Description

The function of this module is taking of input and assigning to output.

EN and ENO are set as additional parameters.

209
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT = IN

Parameter Description

Parameter Data type Meaning

IN1 BYTE First input

OUT BYTE Output

4)Add module

Add module can part to FLOAT, INT, LONG, SFLOAT, UINT and ULONG,
totally six module data type and so on, show as follows:

ADD_FLOAT

Brief Description

The function of this module is adding the input values, its result will be
assigned to output. Number of Inputs isn't limit.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

210
Graphical Programming software SCControl

OUT = IN1+IN2+ ... +INn

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

INn FLOAT The Nth input

OUT FLOAT Output

ADD_INT

Brief Description

The function of this module is adding the input values, its result will be
assigned to output. Number of Inputs isn't limit.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1+IN2+ ... +Inn

Parameter Description

Parameter Data Meaning

IN1 INT First input

IN2 INT Second input

211
Graphical Programming software SCControl

INn INT The Nth input

OUT INT Output

ADD_LONG

Brief Description

The function of this module is adding the input values, its result will be
assigned to output. Number of Inputs isn't limit.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1+IN2+ ... +INn

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

INn LONG The Nth input

OUT LONG Output

ADD_SFLOAT

Brief Description

The function of this module is adding the input values, its result will be
assigned to output. Number of Inputs isn't limit.

212
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1+IN2+... +INn

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

INn SFLOAT The Nth input

OUT SFLOAT Output

ADD_UINT

Brief Description

The function of this module is adding the input values, its result will be
assigned to output. Number of Inputs isn't limit.

EN and ENO are set as additional parameters.

Representation

Symbol

213
Graphical Programming software SCControl

Formula

OUT = IN1+IN2+ ... +INn

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

INn UINT The Nth input

OUT UINT Output

ADD_ULONG

Brief Description

The function of this module is adding the input values, its result will be
assigned to output. Number of Inputs isn't limit.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1+IN2+... +INn

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

214
Graphical Programming software SCControl

IN2 ULONG Second input

INn ULONG The Nth input

OUT ULONG Output

5) Subtract module

SUB_FLOAT

Brief Description

The function of this module is subtracting of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1-IN2

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

OUT FLOAT Output

SUB_INT

Brief Description

215
Graphical Programming software SCControl

The function of this module is subtracting of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1-IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

OUT INT Output

SUB_LONG

Brief Description

The function of this module is subtracting of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

216
Graphical Programming software SCControl

Formula

OUT = IN1-IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT LONG Output

SUB_SFLOAT

Brief Description

The function of this module is subtracting of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1-IN2

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

217
Graphical Programming software SCControl

OUT SFLOAT Output

SUB_UINT

Brief Description

The function of this module is subtracting of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN1-IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT UINT Output

SUB_ULONG

Brief Description

The function of this module is subtracting of inputs and its result will be
assigned to output.

EN and ENO are set as additional parameters.

218
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT = IN1-IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT ULONG Output

6) Average

AVE_INT

Brief Description

The function of this module is getting average values of input, its result will
be assigned to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

219
Graphical Programming software SCControl

Formula

OUT = (IN1+IN2+ ... +INn)/ n

Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

INn INT The Nth input

OUT INT Output

AVE_FLOAT

Brief Description

The function of this module is getting average values of input, its result will
be assigned to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = (IN1+IN2+ ... +INn)/ n

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

220
Graphical Programming software SCControl

IN2 FLOAT Second input

INn FLOAT The Nth input

OUT FLOAT Output

AVE_LONG

Brief Description

The function of this module is getting average values of input, its result will
be assigned to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = (IN1+IN2+ ... +INn)/ n

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

INn LONG The Nth input

OUT LONG Output

AVE_SFLOAT

Brief Description

The function of this module is getting average values of input, its result will

221
Graphical Programming software SCControl

be assigned to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = (IN1+IN2+ ... +INn)/ n

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

INn SFLOAT The Nth input

OUT SFLOAT Output

AVE_UINT

Brief Description

The function of this module is getting average values of input, its result will
be assigned to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

222
Graphical Programming software SCControl

Formula

OUT = (IN1+IN2+ ... +INn)/ n

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

INn UINT The Nth input

OUT UINT Output

AVE_ULONG

Brief Description

The function of this module is getting average values of input, its result will
be assigned to output. Number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = (IN1+IN2+ ... +INn)/ n

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

223
Graphical Programming software SCControl

IN2 ULONG Second input

INn ULONG The Nth input

OUT ULONG Output

7) Mode module

MOD_INT

Brief Description

The function of this module is dividing of input values, its remainder will be
assigned to OUT1 while quotient will be assigned to OUT2.

EN and ENO are set as additional parameters.

If divisor is 0, then the output is 0.

Representation

Symbol

Formula

OUT1 = IN1 % IN2

OUT2 = (IN1-OUT1)/IN2

Parameter Description

Parameter Data type Meaning

IN1 INT First input (dividend)

IN2 INT Second input (divisor)

OUT1 INT Remainder

224
Graphical Programming software SCControl

OUT2 INT Quotient

MOD_LONG

Brief Description

The function of this module is dividing of input values, its remainder will be
assigned to OUT1 while quotient will be assigned to OUT2.

EN and ENO are set as additional parameters.

If divisor is 0, then the output is 0.

Representation

Symbol

Formula

OUT1 = IN1 % IN2

OUT2 = (IN1-OUT1)/IN2

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

OUT1 LONG Remainder

OUT2 LONG Quotient

MOD_ULONG

Brief Description

225
Graphical Programming software SCControl

The function of this module is dividing of input values, its remainder will be
assigned to OUT1 while quotient will be assigned to OUT2.

EN and ENO are set as additional parameters.

If divisor is 0, then the output is 0.

Representation

Symbol

Formula

OUT1 = IN1 % IN2

OUT2 = (IN1-OUT1)/IN2

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

OUT1 ULONG Remainder

OUT2 ULONG Quotient

MOD_UINT

Brief Description

The function of this module is dividing of input values, its remainder will be
assigned to OUT1 while quotient will be assigned to OUT2.

EN and ENO are set as additional parameters.

If divisor is 0, then the output is 0.

226
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT1 = IN1 % IN2

OUT2 = (IN1-OUT1)/IN2

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

OUT1 UINT Remainder

OUT2 UINT Quotient

6. IEC Conversion module

BYTE_TO_WORD

Brief Description

The function converts an input value from data type BYTE into a data type
of the WORD.

Representation

Symbol

227
Graphical Programming software SCControl

Formula

OUT = (WORD) IN

Parameter Description

Parameter Data type Meaning

IN BYTE Input

OUT WORD Output

DENORM

Brief Description

The function of this module is taking the input of integer type and converting
to output of SFLOAT type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = DENORM (IN)

Parameter Description

Parameter Data type Meaning

IN INT Input

OUT SFLOAT Output

DWORD_TO_LONG

Brief Description

228
Graphical Programming software SCControl

The function of this module is taking the input of DWORD type and
converting to output of LONG type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = DWORD_TO_LONG (IN)


Parameter Description

Parameter Data type Meaning

IN DWORD Input

OUT LONG Output

DWORD_TO_ULONG

Brief Description

The function of this module is taking the input of DWORD type and
converting to output of ULONG type.

EN and ENO are set as additional parameters.


Representation

Symbol

OUT = DWORD_TO_ULONG (IN)


Parameter Description

229
Graphical Programming software SCControl

Parameter Data type Meaning

IN DWORD Input

OUT ULONG Output

FLOAT_TO_INT

Brief Description

The function of this module is taking the input of FLOAT type and
converting to output of INT type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = FLOAT_TO_INT (IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT INT Output value

FLOAT_TO_LONG

Brief Description

The function of this module is taking the input of FLOAT type and
converting to output of LONG type.

EN and ENO are set as additional parameters.

Representation

230
Graphical Programming software SCControl

Symbol

OUT = FLOAT_TO_LONG (IN)


Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT LONG Output value

FLOAT_TO_SFLOAT

Brief Description

The function of this module is taking the input of FLOAT type and
converting to output of SFLOAT type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = FLIAT_TO_SFLOAT (IN)

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT SFLOAT Output value

INT_TO_FLOAT

231
Graphical Programming software SCControl

Brief Description

The function of this module is taking the input of INT type and converting to
output of FLOAT type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = INT_TO_FLOAT (IN)

Parameter Description

Parameter Data type Meaning

IN INT Input

OUT FLOAT Output

INT_TO_LONG

Brief Description

The function of this module is taking the input of INT type and converting to
output of LONG type.

EN and ENO are set as additional parameters

Representation

Symbol

OUT = INT_TO_LONG (IN)

232
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN INT Input

OUT LONG Output

INT_TO_SFLOAT

Brief Description

The function of this module is taking the input of INT type and converting to
output of SFLOAT type.

EN and ENO are set as additional parameters

Representation

Symbol

OUT = INT_TO_SFLOAT (IN)

Parameter Description

Parameter Data type Meaning

IN INT Input

OUT SFLOAT Output

INT_TO_WORD

Brief Description

The function of this module is taking the input of INT type and converting to
output of WORD type.

233
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = INT_TO_WORD (IN)

Parameter Description

Parameter Data type Meaning

IN INT Input

OUT WORD Output

ULONG_TO_DWORD

Brief Description

The function of this module is taking the input of ULONG type and
converting to output of DWORD type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = ULONG _TO_DWORD (IN)

Parameter Description

Parameter Data type Meaning

234
Graphical Programming software SCControl

IN ULONG Input

OUT DWORD Output

ULONG_TO_LONG

Brief Description

The function of this module is taking the input of ULONG type and
converting to output of LONG type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = ULONG _TO_LONG (IN)

Parameter Description

Parameter Data type Meaning

IN ULONG Input

OUT LONG output

ULONG_TO_UINT

Brief Description

The function of this module is taking the input of ULONG type and
converting to output of UINT type.

EN and ENO are set as additional parameters.

Representation

235
Graphical Programming software SCControl

Symbol

OUT = ULONG _TO_UINT (IN)

Parameter Description

Parameter Data type Meaning

IN ULONG Input

OUT UINT Output

WORD_TO_INT

Brief Description

The function of this module is taking the input of WORD type and
converting to output of INT type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = WORD_TO_INT (IN)

Parameter Description

Parameter Data type Meaning

IN WORD Input

OUT INT Output

236
Graphical Programming software SCControl

WORD_TO_UINT

Brief Description

The function of this module is taking the input of WORD type and
converting to output of UINT type.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = WORD _TO_UINT (IN)

Parameter Description

Parameter Data type Meaning

IN WORD Input

OUT UINT Output

WORD_TO_BYTE

Brief Description

The function converts an input value from data type WORD into a data type
of the BYTE. The least significant bits of the input value are transferred to
the output.

Representation

Symbol

237
Graphical Programming software SCControl

OUT = (BYTE) IN

Parameter Description

Parameter Data type Meaning

IN WORD Input

OUT BYTE Output

7. IEC Select module

IEC Selection module show as follows: Multi selection, Limit, Selection,


Maximum, Minimum and so on:

Multi selection module

Limit module

Selection module

Maximum module

Minimum module

1) Multi selection

MUX_BOOL

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

238
Graphical Programming software SCControl

Representation

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select No.

IN1 BOOL First input

IN2 BOOL Second input

INn BOOL The Nth input

OUT BOOL Output

MUX_DWORD

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

239
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

K INT Select No.

IN1 DWORD First input

IN2 DWORD Second input

INn DWORD The Nth input

OUT DWORD Output

MUX_FLOAT

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select No.

IN1 FLOAT First input

IN2 FLOAT Second input

240
Graphical Programming software SCControl

INn FLOAT The Nth input

OUT FLOAT Output

MUX_INT

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select NO.

IN1 INT First input

IN2 INT Second input

INn INT The Nth input

OUT INT Output

MUX_LONG

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,

241
Graphical Programming software SCControl

when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select NO.

IN1 LONG First input

IN2 LONG Second input

INn LONG The Nth input

OUT LONG Output

MUX_SFLOAT

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

242
Graphical Programming software SCControl

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select NO.

IN1 SFLOAT First input

IN2 SFLOAT Second input

INn SFLOAT The Nth input

OUT SFLOAT Output

MUX_ULONG

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

243
Graphical Programming software SCControl

Parameter Data type Meaning

K INT Select NO.

IN1 ULONG First input

IN2 ULONG Second input

INn ULONG The Nth input

OUT ULONG Output

MUX_UINT

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select NO.

IN1 UINT First input

IN2 UINT Second input

INn UINT The Nth input

244
Graphical Programming software SCControl

OUT UINT Output

MUX_WORD

Brief Description

The function of this module is when K=0 take input IN1 and assign to output,
when K=1 take input IN2 and assign to output. When K=n-1 take input INn
and assign to output.

The number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

K INT Select NO.

IN1 WORD First input

IN2 WORD Second input

INn WORD The Nth input

OUT WORD Output

2) Limit

LIM_FLOAT

Brief Description

The function of this module is limiting value, when input is greater than

245
Graphical Programming software SCControl

upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN if (IN >= MIN) & (IN <= MAX)

OUT = MIN if IN < MIN

OUT = MAX if IN > MAX

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

MAX FLOAT Upper limit

MIN FLOAT Low limit

OUT FLOAT Output

LIM_INT

Brief Description

The function of this module is limiting value, when input is greater than
upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input.

EN and ENO are set as additional parameters.

246
Graphical Programming software SCControl

Representation

Symbol

Formula

OUT = IN if (IN >= MIN) & (IN <= MAX)

OUT = MIN if IN < MIN

OUT = MAX if IN > MAX

Parameter Description

Parameter Data type Meaning

IN INT First input

MAX INT Upper limit

MIN INT Lower limit

OUT INT Output

LIM_LONG

Brief Description

The function of this module is limiting value, when input is greater than
upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input.

EN and ENO are set as additional parameters.

Representation

Symbol

247
Graphical Programming software SCControl

Formula

OUT = IN if (IN >= MIN) & (IN <= MAX)

OUT = MIN if IN < MIN

OUT = MAX if IN > MAX

Parameter Description

Parameter Data type Meaning

IN LONG First input

MAX LONG Upper limit

MIN LONG Lower limit

OUT LONG Output

LIM_SFLOAT

Brief Description

The function of this module is limiting value, when input is greater than
upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input.

EN and ENO are set as additional parameters.

Representation
Symbol

Formula

248
Graphical Programming software SCControl

OUT = IN if (IN >= MIN) & (IN <= MAX)

OUT = MIN if IN < MIN

OUT = MAX if IN > MAX

Parameter Description

Parameter Data type Meaning

IN SFLOAT First input

MAX SFLOAT Upper limit

MIN SFLOAT Lower limit

OUT SFLOAT Output

LIM_UINT

Brief Description

The function of this module is limiting value, when input is greater than
upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN if (IN >= MIN) & (IN <= MAX)

OUT = MIN if IN < MIN

OUT = MAX if IN > MAX

249
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN UINT First input

MAX UINT Upper limit

MIN UINT Lower limit

OUT UINT Output

LIM_ULONG

Brief Description

The function of this module is limiting value, when input is greater than
upper limit output upper limit, when input is less than lower limit output
lower limit, otherwise output input.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = IN if (IN >= MIN) & (IN <= MAX)

OUT = MIN if IN < MIN

OUT = MAX if IN > MAX

Parameter Description

Parameter Data type Meaning

250
Graphical Programming software SCControl

IN ULONG First input

MAX ULONG Upper limit

MIN ULONG Lower limit

OUT ULONG Output

3) Selection module

SEL_BOOL

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_BOOL (SW, IN1, IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 BOOL First input

IN2 BOOL Second input

OUT BOOL Output

251
Graphical Programming software SCControl

SEL_DWORD

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_DWORD (SW,IN1,IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 DWORD First input

IN2 DWORD Second input

OUT DWORD Output

SEL_FLOAT

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

252
Graphical Programming software SCControl

Symbol

Formula

OUT = SEL_FLOAT (SW, IN1, IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 FLOAT First input

IN2 FLOAT Second input

OUT FLOAT Output

SEL_INT

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_INT (SW, IN1, IN2)

253
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 INT First input

IN2 INT Second input

OUT INT Output

SEL_LONG

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_LONG (SW, IN1, IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 LONG First input

IN2 LONG Second input

254
Graphical Programming software SCControl

OUT LONG Output

SEL_SFLOAT

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_SFLOAT (SW, IN1, IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 SFLOAT First input

IN2 SFLOAT Second input

OUT SFLOAT Output

SEL_UINT

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

255
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_UINT (SW, IN1, IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 UINT First input

IN2 UINT Second input

OUT UINT Output

SEL_ULONG

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

256
Graphical Programming software SCControl

Formula

OUT = SEL_ULONG (SW, IN1, IN2)

Parameter Description

Parameter Data type Meaning

SW BOOL Input select switch

IN1 ULONG First input

IN2 ULONG Second input

OUT ULONG Output

SEL_WORD

Brief Description

The function of this module is when SW=OFF take input IN1 and assign to
out, when SW=ON take input IN2 and assign to out.

EN and ENO are set as additional parameters.

Representation

Symbol

Formula

OUT = SEL_WORD (SW, IN1, IN2)

Parameter Description

257
Graphical Programming software SCControl

Parameter Data type Meaning

SW BOOL Input select switch

IN1 WORD First input

IN2 WORD Second input

OUT WORD Output

4) Maximum

MAX_FLOAT

Brief Description

The function of this module is taking the maximum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MAX_FLOAT (IN1, IN2)

Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

INn FLOAT The Nth input

258
Graphical Programming software SCControl

OUT FLOAT Output

MAX_INT

Brief Description

The function of this module is taking the maximum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MAX_INT (IN1, IN2)


Parameter Description

Parameter Data type Meaning

IN1 INT First input

IN2 INT Second input

INn INT The Nth input

OUT INT Output

MAX_LONG

Brief Description

The function of this module is taking the maximum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

259
Graphical Programming software SCControl

Symbol

OUT = MAX_LONG (IN1, IN2)

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

th
INn LONG The N input

OUT LONG Output

MAX_UINT

Brief Description

The function of this module is taking the maximum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MAX_UINT (IN1, IN2)


Parameter Description

Parameter Data type Meaning

IN1 UINT First input

260
Graphical Programming software SCControl

IN2 UINT Second input

INn UINT The Nth input

OUT UINT Output

MAX_SFLOAT

Brief Description

The function of this module is taking the maximum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MAX_SFLOAT (IN1,IN2)


Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

INn SFLOAT The Nth input

OUT SFLOAT Output

MAX_ULONG

Brief Description

The function of this module is taking the maximum of inputs and assigning
to output, the number of inputs isn't limited.

261
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MAX_ULONG (IN1, IN2)

Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

INn ULONG The Nth input

OUT ULONG Output

5) Minimum

MIN_FLOAT

Brief Description

The function of this module is taking the minimum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

262
Graphical Programming software SCControl

OUT = MIN_FLOAT (IN1, IN2)


Parameter Description

Parameter Data type Meaning

IN1 FLOAT First input

IN2 FLOAT Second input

INn FLOAT The Nth input

OUT FLOAT Output

MIN_INT

Brief Description

The function of this module is taking the minimum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MIN_INT (IN1, IN2)


Parameter Description

Parameter Data type Meaning

IN1 INT First input

263
Graphical Programming software SCControl

IN2 INT Second input

INn INT The Nth input

OUT INT Output

MIN_LONG

Brief Description

The function of this module is taking the minimum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MIN_LONG (IN1, IN2)

Parameter Description

Parameter Data type Meaning

IN1 LONG First input

IN2 LONG Second input

INn LONG The Nth input

OUT LONG Output

MIN_SFLOAT

Brief Description

The function of this module is taking the minimum of inputs and assigning
to output, the number of inputs isn't limited.

264
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MIN_SFLOAT (IN1, IN2)

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

INn SFLOAT The Nth input

OUT SFLOAT Output

MIN_UINT

Brief Description

The function of this module is taking the minimum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MIN_UINT (IN1, IN2)

265
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 UINT First input

IN2 UINT Second input

INn UINT The Nth input

OUT UINT Output

MIN_ULONG

Brief Description

The function of this module is taking the minimum of inputs and assigning
to output, the number of inputs isn't limited.

EN and ENO are set as additional parameters.

Representation

Symbol

OUT = MIN_ULONG (IN1, IN2)


Parameter Description

Parameter Data type Meaning

IN1 ULONG First input

IN2 ULONG Second input

INn ULONG The Nth input

OUT ULONG Output

266
Graphical Programming software SCControl

1.5.2 ASSISTANT MODULE DATABASE

1. Control module

BSC

Brief Description

This module used to define single loop in the declaration of user-defined


loop, make sure that input and output, make up a control ring loop. System
input (PV), ring loop output (MV) are the objects should be controlled and
can change control object values in execution. Tags in corresponding
user-defined ring loop should be configured to k monitor interface in order
to set it’s values in monitor. BSC module extended the BSCX module, more
and more parameters in BSCX module are open to users.

Representation

Symbol

Arithmetic

This module is PID single loop control module, flow chart as follows:

267
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning Remarks

PV SFLOAT Measuring value

N UINT BSC serial No Scope[0,63]

MV SFLOAT Manipulated value

g_bs[N].SwSV BOOL Inner/Outer setting switch ON-outside

g_bs[N].SwAM BOOL Auto/Manual switch ON-Auto

g_b[N].SwNeg BOOL Positive/ Reverse Action switch ON-reverse

g_bs[N].SwTV BOOL Output tracking ON-tracking

g_bs[N].SwDT BOOL Derive mode switch ON=dPV/dt OFF=dErr/dt

268
Graphical Programming software SCControl

g_bsc[N].SV SFLOAT Inner setting value

g_bsc[N].ESV SFLOAT Outer setting value

g_bs[N].KP SFLOAT Proportional coefficient Kp*2 = 1/P

g_bs[N].TI INT Integrated time Unit 0.1 s

g_bsc[N].TD INT Derive time Unit 0.1 s

g_bsc[N].TV SFLOAT Output-tracking extent

g_bsc[N].IA SFLOAT Input compensation

g_bsc[N].OA SFLOAT Output compensation

g_bsc[N].ER SFLOAT Bias alarm

g_bsc[N].ML SFLOAT Output low limit

g_bsc[N].MH SFLOAT Output high limit

g_bsc[N].KV SFLOAT Adjustable gain

Modification description

This modification is adding a adjustable gain to ring loop, deciding using


adjustable gain or not by selection on-off g_bsc[N].RESERVED_6B. PV,
PID control algorithm (I-PD) and basic type PID algorithm are different with
each other. Integral action is executed when SV changes. While when SV is
imported by digital quantity and changes obviously, this algorithm can
assure stabilization of control characteristic. If characteristics are changes
in control process, this algorithm can do some control to response this
changes at the same time. Changes and disturbances can be slake by P, I,
D control action.

Note:

BSCX module must be note that the setting parameter can't be collide with
correlation parameter of AdvanTrol, otherwise can result in correlation
parameter inefficacy in AdvanTrol menu.

269
Graphical Programming software SCControl

CSC

Brief Description

This module used to set double loop in the user-defined loop, make up an
in series control ring loop. The tag corresponding user-defined loop group
in AdvanTrol menu, then can be set parameter in AdvanTrol menu. CSC
module extended the CSCX module; more and more parameters in BSCX
module are open to users.

Representation

Symbol

Arithmetic

Module flow chart as follows:

270
Graphical Programming software SCControl

271
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning Remarks

ExPV SFLOAT Outer loop feedback signal

InPV SFLOAT Inner loop feedback signal

N UINT CSC serial No. 0~63

g_csc[N].SwCas BOOL CSC/single switch ON-cascade

g_csc[N].SwSV BOOL Inner/ outside setting switch ON-outside

g_csc[N].SwAM BOOL Auto/ Manual switch ON-Auto

g_c[N].InSwNeg BOOL Inner loop positive/reverse switch ON-reverse

g_c[N].ExSwNeg BOOL Outer-loop positive/reverse switch ON-reverse

g_csc[N].SwTV BOOL Output tracking switch ON-tracking

g_cs[N].InSwDT BOOL Inner loop derive mode switch ON=dPV/dt OFF=dErr/dt

g_cs[N].ExSwDT BOOL Outer loop derive mode switch ON=dPV/dt OFF=dErr/dt

g_csc[N].InMV SFLOAT Inner loop controlling magnitude InMV = lastoutput

g_csc[N].ExMV SFLOAT Outer loop controlling magnitude ExMV = InSV - ExOA

g_csc[N].InSV SFLOAT Inner loop setting value

g_csc[N].ExSV SFLOAT Outer loop local setting value

g_csc[N].ExESV SFLOAT Outer loop remote setting value

g_csc[N].InKP SFLOAT Inner loop proportional coefficient Kp*2 = 1/P

g_csc[N].ExKP SFLOAT Outer loop proportional coefficient Kp*2 = 1/P

g_csc[N].InTI INT Inner loop integration time Unit 0.1 s

g_csc[N].ExTI INT Outer loop integration time Unit 0.1 s

g_csc[N].InTD INT Inner loop derive time Unit 0.1 s

g_csc[N].ExTD INT Outer loop derive time Unit 0.1 s

272
Graphical Programming software SCControl

g_csc[N].TV SFLOAT Output tracking

g_csc[N].InIA SFLOAT Inner loop input compensation

g_csc[N].ExIA SFLOAT Outer loop input compensation

g_csc[N].InOA SFLOAT Inner loop output compensation

g_csc[N].ExOA SFLOAT Outer loop output compensation

g_csc[N].InER SFLOAT Inner loop bias alarm value

g_csc[N].ExER SFLOAT Outer loop bias alarm value

g_csc[N].ML SFLOAT Output limit (low) Before tracking, after A/ M

g_csc[N].MH SFLOAT Output limit (high)

g_csc[N].InKV SFLOAT Inner loop adjustable gain

g_csc[N].ExKV SFLOAT Outer loop adjustable gain

Note

CSC module must be note that the setting parameter can't be collide with
correlation parameter of AdvanTrol, otherwise can result in correlation
parameter inefficacy in AdvanTrol menu.

DGAP2

Brief Description

The function of this module is two positions gap controller, it will use in two
statuses control, the function of output equals to switch.

Representation

Symbol

273
Graphical Programming software SCControl

Arithmetic

When ER >= GAP/2, output forward P = ON, output backward N = OFF;

When ER <= -GAP/2, output forward P = OFF, output backward N = ON;

When ER between -GAP/2 and GAP/2, output forward and output


backward are equals to last time.

Express with figure:

Parameter Description

Parameter Data type Meaning

ER SFLOAT Bias

GAP SFLOAT Gap

P BOOL Output increase switch

N BOOL Output decrease switch

274
Graphical Programming software SCControl

DGPA3

Brief Description

The function of this module is two positions gap controller, it will use in
three statuses control. The function is provided with dead area and switch.

Representation

Symbol

Arithmetic

For output P:

When ER >= GAP/2, output P=ON;

When ER <=GAP/2-HY, output P=OFF;

When ER between GAP/2-HY and GAP/2, output P retain the last output
value.

For output N:

When ER<= -GAP/2, output N=ON;

When ER>= -GAP/2+HY, output N= OFF;

When ER between -GAP/2 and -GAP/2+HY, output N retain the last output
value.

General logic is:

When ER increase by degrees:

When ER<= -GAP/2+HY, output P=OFF, N=ON;

When ER between -GAP/2+HY and GAP/2, output P=OFF, N=OFF;

275
Graphical Programming software SCControl

When ER>=GAP/2, output P=ON, N=OFF;

When ER digression:

When ER>=GAP/2-HY, output P = ON, output N = OFF;

When ER between GAP/2-HY and -GAP/2, output P=OFF, output = OFF;

When ER<= -GAP/2, output = OFF, output N = ON;

Show as follows:

Parameter Description

Parameter Data type Meaning

ER SFLOAT Bias

GAP SFLOAT Gap

HY SFLOAT Dead zone

P BOOL Output increase switch

N BOOL Output decrease switch

276
Graphical Programming software SCControl

EPID

Brief Description

This module inputs an error signal, gained a control output value based on
this error signal.

Representation

Symbol

Arithmetic

MVOUT = KP*(ERROR-ERROR_LASTTIME + ERROR*TS/TI +UDn )

UDn = (UDn-1 + 8*(ERROR-ERROR_LASTTIME))* TD / (8*TS + TD)

Where MVOUT is control output value , KP is proportion coefficient,


ERROR is input error, ERROR_LASTTIME is last control period error, TS is
control period, TI is integral time, UDn is output value differential coefficient
item, UDn-1 is output value differential coefficient item of last control
period, TD is differential coefficient time.

Parameter description

Parameter Data type Meaning Explain

ERROR FLOAT Input error

KP FLOAT Proportionality coefficient

TI FLOAT Integral time Units is Second

TD FLOAT Differential coefficient time Units is Second

TRACKVAL FLOAT Output tracking value

277
Graphical Programming software SCControl

MH FLOAT Upper limit

ML FLOAT Lower limit

When SWTR = ON, control output value


changes with TRACKVAL changed, when
SWTR BOOL Tracking switch
SWTR = OFF, control output value equals
to operate output value.

When SWLM = ON, limit control output


SWLM BOOL Output limit switch
value

MVOUT FLOAT Control output value

FLASH

Brief Description

Generate output signal of one pulse. When input IN1=OFF, then output
OUT=OFF;

When input IN1=ON and IN2=OFF, then the output tracks the status of IN1,
that is OUT=ON;

When input IN1=IN2=ON, then the output alternates between 1 and 0. The
alternative period is the scanning period.

Representation

Symbol

Arithmetic

When IN1=OFF, output OUT=OFF

When IN1=ON and IN2=OFF, output OUT=ON

When IN1=IN2=ON, output alternates between ON and OFF, the


alternative period is the scanning period, that is when the module is
executed the second time, output changes.

278
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN1 BOOL Alarm signal

IN2 BOOL Confirm alarm signal

OUT BOOL Output

INTEG

Brief Description

Output is the integral of input and go through limit transact with input. When
the output has exceeded the set high-low limit, it would be limited and
corresponding alarm sign would be set.

Representation

Symbol

Arithmetic

When SET=ON, output Y=YSET, if Y>=MAX, YMAX=ON, otherwise


YMAX=OFF; if Y<=MIN, YMIN=ON, otherwise YMIN=OFF.

When SET=OFF, the value of output Y is the integral value of input X. The
unit for sampling time is 0.1 ms. Transfer function and discrete calculation
equals to Integration (no limit) module.

If Y>=MAX, then Y=MAX, YMAX=ON, otherwise the integral value


YMAX made by output Y to input X equals to OFF.

279
Graphical Programming software SCControl

If Y< = MIN, then Y=MIN, YMIN=ON, otherwise the integral value


YMAX made by output Y to input X equals to OFF.

Parameter Description

Parameter Data type Meaning

SET BOOL SET

YSET SFLOAT Setting value

X SFLOAT Input

GAIN SFLOAT Gain

MAX SFLOAT High limit

MIN SFLOAT Low limit

YMAX BOOL High limit alarm

YMIN BOOL Low limit alarm

Y SFLOAT Output

INTEG1

Brief Description

When the output is the integral of input, which hasn't made any limit
transaction to input but only has exceeded the limit value, the alarm sign is
set up.

Representation

Symbol

280
Graphical Programming software SCControl

Arithmetic

When SET=ON, Y=YSET.

When SET=OFF, the output Y is the integral of output, lag time unit is 0.1s.

Transfer function:

Y ( S ) GAIN
G(S ) = =
X (S ) S

Transferred calculation formula of discrete:

S × Y ( S ) = GAIN × X ( S )

Y (n) = Y (n − 1) + GAIN × dt × X (n)

Taking integral calculation based on the input average value, then the
above formula changes to be:

X (n) + X (n − 1)
Y (n) = Y (n − 1) + GAIN × dt ×
2

Both of the above mentioned situations would have a limit judgment to the
input value. When the output Y>=MAX, YMAX=ON, otherwise the YMAX
=OFF; when the output Y<=MIN, MIND=ON, otherwise the YMIN=OFF.

Parameter Description

Parameter Data type Meaning

SET BOOL SET

YSET SFLOAT Setting value

X SFLOAT Input

GAIN SFLOAT Gain

MAX SFLOAT High limit

MIN SFLOAT Low limit

YMAX BOOL High limit alarm

281
Graphical Programming software SCControl

YMIN BOOL Low limit alarm

Y SFLOAT Output

LEPID

Brief Description

This module has offered locked and increased and decreased the function,
resisted the saturation function of the total mark, outputted the following
function, outputting the amplitude limiting function, its introduction, for the
deviations of the establishing value and measurement value.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

The transmission function expression formula of PID algorithm formula


adopted in this module is as follows:

1 Kd ∗ Td ∗ S
Y (S ) = ( K p + + ) E ( s ) + FF ( s )
Ti ∗ S Td ∗ S + 1

This module adopts the increment type algorithm, the formula after melting

282
Graphical Programming software SCControl

dispersedly is:

Ts Td Kd ∗ Td
Y ( n ) = K p ∗ e( n ) + ∗ e(n) + Y (n − 1) + ∗ Y ( n − 1) + ∗ [e(n) − e(n − 1)] + FF (n)
Ti Td + Ts Td + Ts

The corresponding increment of one of proportion is:

∆Y p = Y p (n) − Y p (n − 1) = K p ∗ ∆e

The corresponding increment of one of total mark is:

Ts
∆YI = YI (n) − YI (n − 1) = ∗ ∆e
Ti

The corresponding increment of one of differential is:

∆YD = YD (n) − YD (n − 1)

Whether so n pieces of total PID of cycle calculate increment value:

∆Y = ∆Y p + ∆YI + ∆YD

Among them: N pieces of differential a calculating value of cycle:

Td Kd ∗ Td
YD ( n ) = YD (n − 1) + ∗ ∆e
Td + Ts Td + Ts

N pieces of deviation increment of cycle:

∆e = e(n) − e(n − 1)

Parameter Description

Parameter Data type Meaning

The deviations of the establishing value and measurement


E FLOAT
value are input

YH FLOAT Upper limit outputted

YL FLOAT Lower limit outputted

TV FLOAT Export the following value

283
Graphical Programming software SCControl

SwTV BOOL Export and follow the switch, when SwTV =ON, Y =TV.

Lock and increase the switch, when LI =ON ,output Y stop


LI BOOL
increasing , but can reduce .

Lock and reduce the switch, when LD =ON ,output Y stop


LD BOOL
reducing , but can increase .

FF FLOAT Feedforward variable

The proportion enlarges coefficient, when Kp =0.0, there is


Kp FLOAT
no proportion one

Time constant of the total mark (0.1s is the unit), when


Ti FLOAT
Ti<=0.0, there is no total mark one

Time constant of the differential (0.1s is the unit), Td<=0.0 ,


Td FLOAT
there is no differential one

Kd FLOAT The differentiator enlarges coefficient

The difference of leaning towards when the integrator stops


Edb FLOAT
the total mark, when E>Edb>0, the total mark stops

The revision value of Kp when the integrator stops the total


DK FLOAT
mark, after the total mark stops: Kp =Original Kp +Dk

Mdb FLOAT Precise range of accusing of area0<|E|<Mdb

Mk FLOAT Precise coefficient of accusing of area 1>=Mk>0

Y FLOAT Operation exporting value of PID

PID outputs and crosses the upper limit sign, when Y>YH,
DH FLOAT
DH=ON.

PID outputs and crosses the lower limit sign, when Y<YL,
DL FLOAT
DL=ON.

LIMITOR

Brief Description

Monitor number variable input that is under eight and generate one boolean
output according to the status set by S9 and S10. When the input having
logic 1 status is less than, equal to or greater than the number that is
pointed by S9, it generates one corresponding output signal: if it is less than

284
Graphical Programming software SCControl

the number, then the output logic is 0; if S10 is not equal to 0 and the above
comparing result is equal, then output logic 1; if S10 equals 0 and the
above comparing result is equal or greater, then output logic 1.

Representation

Symbol

Arithmetic

First, statistic the number of logic 1 in eight input, record of b;

When b = S9 and S10 != 0, OUT=ON;

When b>= S9 and S10 = 0, OUT=ON;

The rest instance, OUT=OFF.

Parameter Description

Parameter Data type Meaning

IN1, IN2,..., IN8 INT Eight input

S9 INT Selection parameter

S10 INT Work mode parameter

OUT BOOL Output

NBSWITCH

Brief Description

285
Graphical Programming software SCControl

Select one from two inputs IN1 and IN2 according to the logic (0 or 1) of
input IN3. There are two non-disturbance switching qualifying parameters
S4 and S5. When the logical status of input IN3 changes, make switch
transit smoothly according to the corresponding qualifying parameter.
When IN3 is OFF, its output OUT equals IN1 when reaching balance; when
IN3 is ON, its output OUT equals IN2 when reaching balance.

Representation

Symbol

Arithmetic

1, When IN3 changes from OFF to ON, i.e. OUT changes from IN1 to IN2,
remember the last time output value of flatness manage is LY, then have
the same thing as follows:

When LY>IN2>IN1 or LY<IN2<IN1, OUT=LY-S5*(IN2-IN1)

When LY>IN2 and IN2<IN1 or LY<IN2 and IN2>IN1,


OUT=LY+S5*(IN2-IN1)

Judged if steady, When IN2>LY and OUT>IN2 or IN2<LY and OUT<IN2 or


LY=IN2; OUT=IN2;

2, When changes IN3 from ON to OFF, i.e. OUT changes from IN2 to IN1,
remember the last time output value of flatness manage is LY, then have
the same thing as follows:

When LY>IN1 and IN2>IN1 or LY<IN1 and IN1>IN2,


OUT=LY+S4*(IN1-IN2)

When LY<IN1<IN2 or LY>IN1>IN2, OUT=LY-S4*(IN1-IN2)

Judged if steady, When IN1>LY and OUT>IN1 or IN1<LY and OUT<IN1 or

286
Graphical Programming software SCControl

LY=IN1, OUT=IN1.

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT First input

IN2 SFLOAT Second input

IN3 BOOL Input select switch

S4 SFLOAT Velocity that output switches from IN2 to IN1

S5 SFLOAT Velocity that output switches from IN1 to IN2

OUT SFLOAT Output

RAMP_GNT

Brief Description

This module is used to produce ramp signal.

Note: Output lower limit don't greater than upper limit, otherwise when
starting switch changes from OFF to ON, Y=IV, other conditions this module
can't do any manage return immediacy.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

287
Graphical Programming software SCControl

When ST changes from OFF to ON, Y=IV.

When ST remains to ON:

(1) When HOLD=ON, Y remains the status as it was last time.

(2) When HOLD=OFF: if DE=ON, Y as an increased ramp characteristic,

if DE=OFF, Y as an decreased ramp characteristic,

LY is the last period output of Y, Ts is the control period of system, unit is s.

Initialization and produce ramp signal output, both limited with output, if
output great than upper limit, Y=H, if output less than lower limit Y=L.

Parameter Description

Parameter Data type Meaning

ST BOOL Startup switch

HOLD BOOL Remain switch

DE BOOL Select switch

IV SFLOAT Initialization

IR SFLOAT Rise rate

DR SFLOAT Decline rate

H SFLOAT Upper limit of output

L SFLOAT Lower limit of output

Y SFLOAT Output

THOSEL

Brief Description

Select output mode and output quality according to work mode parameter
MD and input quality flagIN1 and flagIN2 of two inputs.

288
Graphical Programming software SCControl

Representation

Symbol

Arithmetic

If work mode parameter MD equals 4, 5 or 6, then the value of output OUT


equals IN1, IN2 or IN3 correspondingly. If the quality of the corresponding
output point is bad, then output remains last period valuable and quality
alarm QO is logic 1.

If work mode parameter equals 0, 1, 2 and 3, then:

1. If MD = 0, output the mid of three input value.

2. If MD = 1, output the average of three input value.

3. If MD = 2, output the less value of three input value.

4. If MD = 3, output the biggish value of three input value.

Adjust the output according to input quality temporality:

1. If three inputs are all bad points, then output remains and quality alarm
Qo is logic 1;

2. If two points are bad points and the other is a good point, then select the
good point as output;

3. If only one point is bad, then according to other two good points select
output. If the warp of two good points can't exceeds DB, then output the
average of two good points, otherwise then output remains last period
valuable and quality alarm QO is logic 1.

4. If three points are both good points, then select according to whether the

289
Graphical Programming software SCControl

deviation between two inputs exceeds the setting value DB:

i. If the three both warp can't exceeds DB, then the output according to
MD selection.

ii. If only one warp exceeds DB, then output the mid of three input value.

iii. If two both warps exceeds DB, then output the other one.

iv. If the three both warps exceeds DB, then output remains last period
valuable and quality alarm QO is logic 1.

Quality output:

1. If IN1 is bad point, then the corresponding output quality Q1 is logic 1;


otherwise output quality Q1 is logic 0.

2. If IN2 is bad point, then the corresponding output quality Q2 is logic 1;


otherwise output quality Q2 is logic 0.

3. If IN3 is bad point, then the corresponding output quality Q3 is logic 1;


otherwise output quality Q3 is logic 0.

4. If has one bad point with IN1, IN2, IN3 ,then output quality QQ is logic 1;
otherwise output quality Q1 is logic 0.

5. If work mode parameter MD equals 4, 5 or 6, the corresponding input IN1,


IN2, IN3 are all bad points, output quality Q0 is logic 1.

6. If work mode parameter MD equals 4, 5 or 6, the three points are both


good points. If the three both warps exceeds DB, then output QO is logic 1.

7. If two both warps exceeds DB, output quality QQ is logic 1; otherwise


output quality Q1 is logic 0.

Parameter Description

Parameter Data type Meaning

IN1, IN2, IN3 SFLOAT Input

290
Graphical Programming software SCControl

flagIN1, flagIN2, flagIN3 INT Quality of inputted data

MD INT Select output mode

DB SFLOAT Upper limit of deviation

OUT SFLOAT Output

Q1, Q2, Q3 BOOL Corresponding input of quality output

QQ BOOL Quality total alarm

QB BOOL Warp alarm

QO BOOL Quality output

Application:

It is mainly used to select appropriate output between the three inputs,


selection conditions contains: input qualities and deviation between inputs.
Select the best one as the control parameter in the three inputs, it fit for high
quality input accuracy and sensitive random disturbance control process.

THERRPOSITION

Brief Description

Three position switch control module action ON and OFF by two contact
output , the controller have three mode open and close contact output pass
by comparing with PV and SV.

Representation

Symbol

VOID THREEPOSITION (SV, PV, DB, HYS, SEL, OUT1, OUT2)

291
Graphical Programming software SCControl

Arithmetic

When the sign select switch SEL= ON, that is positive control, according to
the position of warp between PV and SV, execute different output.

The operation output status when the warp E is increasing:

(1) When E < (-DB), output OUT1=OFF, OUT2 = ON

(2) When - (DB-HYS) <= E < DB, OUT1=OFF, OUT2 =OFF

(3) When E >= DB, OUT1=ON, OUT2=OFF.

The operation output status when the warp E is decreasing:

(1) When E>=DB, OUT1=ON, OUT1=OFF

(2) When -DB<E<=DB-HYS, OUT1=OFF, OUT2=OFF

(3) When En<=-DB, OUT1=OFF, OUT2=ON

Principle graph show as follow:

When then sign switch SEL=OFF, that is reverse control, according to the
position of warp between input value and setting value, then executable
different output.

292
Graphical Programming software SCControl

The operation output status when the warp E is increasing:

(1) When E < (-DB), OUT1=ON, OUT2=OFF

(2) When -(DB-HYS) <= E<DB, OUT1=OFF, OUT2=OFF

(3) When>=DB, OUT1=OFF, OUT2=ON

The operation output status when the warp E is decreasing:

(1) When E>=DB, OUT1=OFF, OUT2=ON

(2) When -DB<E<=DB-HYS, OUT1=OFF, OUT2=OFF

(3) When En<=-DB, OUT1=ON, OUT2=OFF

Principle graph show as follow:

Parameter Description

Parameter Data type Meaning

SV SFLOAT Setting value

PV SFLOAT Input value

HYS SFLOAT Switch lag value

293
Graphical Programming software SCControl

DB SFLOAT Mid-rang

SEL BOOL The sign selection switch

CPV BOOL Output value of operation

OUT1 BOOL Output switch 1 of contact

OUT2 BOOL Output switch 2 of contact

TWOPOSITION

Brief Description

Compared with PV and SV, selects the switch peculiarity of contact output
according to directional .This module executes ON/OFF control action by
contact output signal.

Representation

Symbol

VOID TWOPOSITION (SV, PV, HYS, SEL, CPV)

Arithmetic

When positive and negative selection switch SEL=ON, that is positive


control, if the difference exceeded HYS value of positive switch between
PV and SV, output CPV = ON; if the difference less then HYS value of
negative switch between PV and SV, output CPV = OFF.

When positive and negative selection switch SEL = OFF, that is negative
control, if the difference exceeded HYS value of positive switch between
PV and SV, output CPV = OFF; if the difference less then HYS value of
negative switch between PV and SV, output CPV = ON.

294
Graphical Programming software SCControl

The principle drawing show as follows:

Parameter Description

Parameter Data type Meaning

SV SFLOAT Setting value

PV SFLOAT Process variable

HYS SFLOAT Switch lag value

SEL BOOL Sign selection switch

CPV BOOL Operating output

TWOSEL

Brief Description

Select output mode and output quality according to work mode parameter
MD and input quality flagIN1 and flagIN2 of two inputs.

Representation

295
Graphical Programming software SCControl

Symbol

Arithmetic

If work mode parameter MD equals 3 or 4, then the value of output OUT


equals IN1 or IN2 correspondingly. If the quality of the corresponding
output point is bad, then output remains last period valuable and quality
alarm QO is logic 1.

If work mode parameter equals 0, 1 and 2, then:

1. If MD=0, output the average of two input value.

2. If MD=1, output the less value of two input value.

3. If MD=2, output the biggish value of two input value.

Adjust the output according to input quality temporality:

1. If two inputs are both bad points, then output remains and quality
alarm Qo is logic 1;

2. If one point is a bad point and the other is a good point, then select
the good point as output;

3. If two points are both good points, then select according to whether
the deviation between two inputs exceeds the setting value DB:

i.If the deviation exceeds the limit, then output remains and quality
alarm Qo is logic 1;

ii.If the deviation does not exceed the limit, then output work mode
value and quality alarm Qo is logic 0;

Quality output:

296
Graphical Programming software SCControl

1. If input points (IN1 and IN2) are bad points, then the corresponding
output quality (Q1 and Q2) is logic 1;

2. If two inputs are bad points, then quality total output QQ is logic 1.

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT Input1

IN2 SFLOAT Input2

flagIN1 INT Quality of inputted 1

flagIN2 INT Quality of inputted 2

MD INT Select output mode

DB SFLOAT Upper limit of deviation

OUT SFLOAT Output

Q1 BOOL Quality output of IN1

Q2 BOOL Quality output of IN2

QQ BOOL Quality total alarm

QO BOOL Quality output

2. Communication assistant function

GETBIT

Brief Description

The function of this module is getting appoint tab from DWORD value of
input, if equals 1, output ON; if equals 0, output OFF.

Representation

Symbol

297
Graphical Programming software SCControl

Formula:

Shift appointed SERIAL tabs through 1 and make an operation AND with
input X to get the information of appoint tab.

Parameter Description

Parameter Data type Meaning

X DWORD Input

SERIAL UINT Serial NO.[0,31]

Q BOOL Output

Description

1) Judges whether the SERIAL greater than and equal to sixteen in


program, be relate to efficiency of the formerly XA CMOS chip.

2) More and more SERIAL variable is INT type in program, the pin is UINT
type in SCControl module.

GETFLOAT

Brief Description

The function of this module is getting FLOAT type value from DWORD
value of input.

Representation

Symbol

298
Graphical Programming software SCControl

Parameter description

Parameter Data type Meaning

X DWORD Input

Y FLOAT Output

GETINT

Brief Description

The function of this module is getting INTGER type value (16 bit) from
DWORD value (32 bit) of input. When SERIAL=0, take low 16 bit; when
SERIAL=1, take high 16 bit.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SERIAL= 0, put input variable and 0XFFFF according to bit to and
return to INT type;

When SERIAL= 1, return INT type after shift input variable right for 16 bits.

Parameter description

Parameter Data type Meaning

X DWORD Input value

SERIAL UINT Serial NO.[0,1]

299
Graphical Programming software SCControl

Y INT Output value

GETMSG

Brief Description

The function of this module is getting information passed from other control
stations. Every control stations have a received buffer:

DWORD msg[4096]

That used to leave in share information that other control stations send care
from network, every control stations has 512 bit information.

Representation

Symbol

Arithmetic

This module according to input control stations serial NO. and information
NO., read the one control stations information you want from received
buffer directly.

Parameter description

Parameter Data type Meaning

STATION UINT No. of station

SERIAL UINT Serial No. of information[0,127]

MSG DWORD Information

300
Graphical Programming software SCControl

GETSFLOAT

Brief Description

The function of this module is getting SFLOAT value (16 bit) from 32 bit
DWORD input value. When SERIAL=0, take low 16 bit; when SERIAL=1,
take high 16 bit.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SERIAL= 0, put input variable and 0XFFFF according to bit to and,
return to SFLOAT type;

When SERIAL= 1, return SFLOAT type after shift input variable right for 16
bits.

Parameter description

Parameter Data type Meaning

X DWORD Input value

SERIAL UINT serial NO.[0,1]

Y SFLOAT Output value

GETUINT

Brief Description

The function of this module is getting UINT value (16 bit) from 32 bit
DWORD input value. When SERIAL=0, take low 16 bit; when SERIAL=1,

301
Graphical Programming software SCControl

take high 16 bit.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SERIAL= 0, put input variable and 0XFFFF according to bit to and,
return to INT type;

When SERIAL= 1, return INT type after shift input variable right for 16 bits.

Parameter description

Parameter Data type Meaning

X DWORD Input value

SERIAL UINT Serial NO.[0,1]

Y UINT Output value

GETWORD

Brief Description

The function of this module is getting WORD value (16 bit) from 32 bit
DWORD input value. When SERIAL=0, take low 16 bit; when SERIAL=1,
take high 16 bit.

Representation

Symbol

302
Graphical Programming software SCControl

Arithmetic

When SERIAL= 0, put input variable and 0XFFFF according to bit to and,
return to INT type;

When SERIAL= 1, return INT type after shift input variable right for 16 bits.

Parameter Description

Parameter Data type Meaning

X DWORD Input

SERIAL UINT Serial NO.[0,1]

Y WORD Output

SENDMSG

Brief Description

The function of this module is informing No. of information sent out, every
message occupies 4 bytes. Number of messages are defined by SIZE, the
contents of information are placed in g_msg[].

Data section shared by control stations: DWORD g_msg[128], used in


data communication between control stations.

Representation

Symbol

Arithmetic

303
Graphical Programming software SCControl

This module based on input NO. of information, information broadcast


shared by control stations, the information be destined for broadcast to
SCnetII network, other control stations can received information send
by this control station.

Parameter Description

Parameter Data type Meaning

SIZE UINT No. of information

SETBIT

Brief Description

The function of this module is that set digital value at assigning place of X
variable input, rest unchanged and then output it.

Representation

Symbol

Arithmetic

When input switch data Q = 0, reverse-code gained by left shifting SERIAL


tabs of intermediate variable and do the AND operation with input variable
X.

When input switch data Q = 1, reverse-code gained by left shifting SERIAL


tabs of intermediate variable and do the OR operation with input variable X.

Parameter Description

Parameter Data type Meaning

304
Graphical Programming software SCControl

X DWORD Input data

Q BOOL Switch data

SERIAL UINT Place serial No.

Y DWORD Output variable

SETFLOAT

Brief Description

The function of this module is that input FLOAT type data and output
DWORD type data.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

X FLOAT Input variable

Y DWORD Output variable

SETINT

Brief Description

The function of this module is setting input variable IN of INT type (16 bit)
from DWORD value (32 bit) of input, others are not changes and assign to
output. When SERIAL=0, setting IN of low 16 bit with input; when
SERIAL=1, setting IN of high 16 bit with input.

305
Graphical Programming software SCControl

EN and ENO are set as additional parameters

Representation

Symbol

Arithmetic

The function converts an input value from data type INT into an UINT data
type forcibly.

When SERIAL= 0, first take low 16 bits to zero, then and with input IN;

When SERIAL=1, first take high 16 bits to zero, then and with after shift left
16 bits;

Parameter Description

Parameter Data type Meaning

X DWORD Input data

IN INT Input setting value

SERIAL UINT Space NO.[0,1]

Y DWORD Output variable

SETSFLOAT

Brief Description

The function of this module is setting input variable SF of SFLOAT type (16
bit) from DWORD value (32 bit) of input, others are not changed and assign
to output. when SERIAL=0, setting SF of low 16 bit with input; when
SERIAL=1, setting SF of high 16 bit with input.

306
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SERIAL=0, first take low 16 bits to zero, then and with input SF;

When SERIAL=1, first take high 16 bits to zero, then and with after shift left
16 bits;

Parameter Description

Parameter Data type Meaning

X DWORD Input data

SF SFLOAT Input setting value

SERIAL UINT Space NO.[0,1]

Y DWORD Output variable

SETUINT

Brief Description

The function of this module is setting input variable of INT type (16 bit) from
DWORD value (32 bit) of input and others are the same. When SERIAL=0,
setting the UINT type IN of low 16 bit with input ; when SERIAL=1, setting
the UINT type IN of high 16 bit with input.

EN and ENO are set as additional parameters.

Representation

307
Graphical Programming software SCControl

Symbol

Arithmetic

The function converts an input value from data type INT into an UINT data
type forcibly.

When SERIAL= 0, first take low 16 bits to zero, then do OR operation with
input IN;

When SERIAL=1, first take high 16 bits to zero, then and do OR operation
with after shift left 16 bits;

Parameter Description

Parameter Data type Meaning

X DWORD Input data

X UINT Input setting value

SERIAL UINT Space NO.[0,1]

Y DWORD Output variable

SETWORD

Brief Description

The function of this module is setting input variable of WORD type (16 bit)
from DWORD value (32 bit ) of input and others are the same. when
SERIAL=0, setting the WORD type IN of low 16 bit with input ; when
SERIAL=1, setting the WORD type IN of high 16 bit with input.

EN and ENO are set as additional parameters.

308
Graphical Programming software SCControl

Representation

Symbol

Arithmetic

The function converts an input value from data type INT into an UINT data
type forcibly.

When SERIAL= 0, first take low 16 bits to zero, then do OR operation with
input IN;

When SERIAL=1, first take high 16 bits to zero, then and do OR operation
with after shift left 16 bits;

Parameter Description

Parameter Data type Meaning

X DWORD Input data

IN INT Input setting value

SERIAL UINT Space NO.[0,1]

Y DWORD Output variable

3. Accumulate Function

ACCUM_TO_AISUM

Brief Description

This function converts an accumulating value into simulating value, this


function equals to ACCUM_TO_SUM0 and ACCUM_TO_SUM1 module,
only that output is simulating value, can not use two functions that output

309
Graphical Programming software SCControl

two part of a simulating value.

Simulation and accumulation data type explain see cumulate data type
explain of help text.

EN and ENO are set as additional parameters.

Representation

Symbol

For example

Input cumulative quantity of SCControl: X=134217719.123291, output


simulation of accumulation is:

Y.SUM0=7.123291, Y.SUM1=8388607.

Parameter Description

Parameter Data type Meaning

X structAccum Input

Y structAI Output

ACCUM_TO_INTS

Brief Description

The function of this module is to output the INT variable in accumulation


structure.

Representation

Symbol

310
Graphical Programming software SCControl

Parameter describing

Parameter Data Type Meaning

x structAccum Input value

y1 INT Output (fractional part of x)

y2 INT Output (low part of the integral part of x)

y3 INT Output (high part of the integral part of x)

Implementation method

Output three INT type variables in accumulation variable structure


differently.

ACCUM_TO_SUM0

Brief Description

The function of this module is that convert accumulating value to analog


sum and then output it at SUM0.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

ACCUM structAccum Input

SUM0 SFLOAT Output

311
Graphical Programming software SCControl

Implementation method

Input accumulating value of the integral part changes to LONG type, the
last four bit (binary system) express -7~+7(the integral part of SFLOAT),
input the fractional part of accumulating value is the fractional part of
SFLOAT immediacy.

Note

SUM0 must be connects to SUM0 item of AI structure, otherwise


inanition.

ACCUM_TO_SUM1

Brief Description

The function of this module is that convert accumulating value to analog


sum and then output it at SUM1.

Representation

Symbol

Parameters Description

Parameter Data type Meaning

ACCUM structAccum Input

SUM1 LONG Output

Implementation method

Taking out the fractional part of input accumulating value, the integral part
converse LONG type and then shift right four bit managed, the request
SUM1 equals to the gained number.

312
Graphical Programming software SCControl

Note

SUM1 must be connects to SUM1 item of AI structure, otherwise


inanition.

ADD_ACCUM

Brief Description

The function of this module is adding accumulation values and then output
it.

EN and ENO are set as additional parameters.

The dimension of X1 and X2 must be identical, otherwise made a mistake.

Representation

Symbol

Formula

Y = X1 + X2

Parameter Description

Parameter Data type Meaning

X1 structAccum First input

X2 structAccum Second input

Y structAccum Output

Implementation method

Add the fixed-point part and integer part of input accumulations with

313
Graphical Programming software SCControl

integrals, fixed-point part should consider carrying, then convert data to the
format of accumulate.

ADD_ACCUM_RANGE

Brief Description

The function of this module is adding accumulate values, then the output
sum is the biggish of input quantity rang, must be note that the sum of
accumulate values can't exceeds rang.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When R1>R2, output SUM = X1+X2*R1/R2

When R2>R1, output SUM = X1*R2/R1+X2

For example

The sum of input accumulate values that corresponding quantity rang is:
X1= 117982.981934, R1= 133, X2 = 456.122803,R2 = 2, the accumulate
sum of output is :SUM = 148315.148193.

Parameter Description

Parameter Data type Meaning

X1 structAccum Input accumulate1

R1 INT The quantity rang of Input accumulate1

314
Graphical Programming software SCControl

X2 structAccum Input accumulate1

R2 INT The quantity rang of Input accumulate2

SUM structAccum The sum of output

AISUM_TO_ACCUM

Brief Description

This function converts an simulating value into accumulating value, that


function equals to SUM_TO_ACCUM,only that input is simulating value,
can not two part of SUM0 and SUM1.

EN and ENO are set as additional parameters.

Representation

Symbol

For example

Input simulation of cumulating value is: X.SUM0 = 7.123047, Y.SUM1 =


8388607, output cumulative quantity of SCControl: Y = 134217719.123047.

Parameter Description

Parameter Data type Meaning

X structAI Input value

Y structAccum Output value

BSET

315
Graphical Programming software SCControl

Brief Description

The function of this module is that complete calculating valve position of


fixed quantity unit and then output it.

Representation

Symbol

SV = BSET (ACCUM,ASET,AUP,TUP,ADOWN,TDOWN,MH,ML)

Explanation

In fixed quantity control about valve position setting curve it will be thus,
when start accumulating, require valve position at low limit ML, until
accumulating quantity attains AUP, valve position will open according
certain rate to high limit MH. When accumulating quantity attains ADOWN,
valve position will close according certain rate to low limit ML again. At last
accumulating quantity attains setting value, then valve will be fully shut.
This module will give out setting value of valve position according current
field accumulating quantity ACCUM.

In raised period will accumulate (MH + ML) * TUP / 2

316
Graphical Programming software SCControl

In fallen period will accumulate (MH + ML) * TDOWN /2

Parameter Description

Parameter Data type Meaning

ACCUM structAccum Current accumulating quantity

ASET structAccum Setting accumulating quantity

AUP FLOAT Accumulating quantity of starting raise

TUP UINT Raised time ( s )

ADOWN FLOAT Accumulating quantity of starting fall

TDOWN UINT Fallen time ( s )

MH SFLOAT High limit of valve position

ML SFLOAT Low limit of valve position

SV SFLOAT Setting value of valve position

COMP_ACCUM

Brief Description

The function of this module is comparing accumulating values and then


assigning it to output.

EN and ENO are set as additional parameters.

The dimension of X1 and X2 must be identical, otherwise make a mistake.

Representation

Symbol

317
Graphical Programming software SCControl

Formula

Y = 1 when X1 > X2

Y = 0 when X1 = X2
Y =-1 when X1 < X2

Parameter Description

Parameter Data type Meaning

X1 StructAccum First input

X2 StructAccum Second input

Y INT output

Implementation method

First compare with integral part of cumulating values, if they are equal, then
compare the decimal fraction part and output the result.

CONVERT_ACCUM

Brief Description

The function of this module is that converting structAccum value to FLOAT


value and then output it.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

318
Graphical Programming software SCControl

Parameter Data type Meaning

IN StructAccum Input

OUT FLOAT Output

Implementation method

Gets decimal fraction and integral part converts FLOAT then adding each
other.

CONVERT_TO_ACCUM

Brief Description

The function of this module is that converting FLOAT value to structAccum


value and then output it.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

OUT StructAccum Output

Implementation method

First gets integral part 16 high bit and 16 low bit (binary system) of FLOAT
type with input value that storage accum2 and accum1 difference, then the
decimal fraction part multiply of 4096 changed to FLOAT type equals to the

319
Graphical Programming software SCControl

decimal fraction part of accumulating value.

INTS_TO_ACCUM

Brief Description

The function of this module is to combine three two bytes variables into an
accumulating value, so as to realize the redundancy of the accumulating
value convenient.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

x1 INT Input (fractional part of y)

x2 INT Input (low part of the integral part of y)

x3 INT Input (high part of the integral part of y)

y structAccum Output

Implementation method

Get three INT type input variable that by way of cumulate variable three
parts to compose a cumulate type variable.

SUB_ACCCUM

Brief Description

320
Graphical Programming software SCControl

The function of this module is that take subtracting accumulating values


and then output it.

EN and ENO are set as additional parameters.

The dimension must be identical of X1 and X2, or else make a mistake.

Representation

Symbol

Formula

Y = X1 - X2

Parameter Description

Parameter Data type Meaning

IN1 StructAccum Be subtracted value

IN2 StructAccum Subtracting value

OUT StructAccum Output

Implementation method

First, subtracting integer part; second, subtracting decimal fraction part; and
then compose output Cumulative quantity.

SUB_ACCUM_RANGE

Brief Description

The function subtracts the value at input from two different rang of
SCControl cumulative quantity, output is the biggest of input rang.

321
Graphical Programming software SCControl

EN and ENO can be configured as additional parameters.

Representation

Symbol

Formula

When input rang R1>R2, SUM=X1-X2*R1/R2

When input rang R2>R1, SUM=X1*R2/R1-X2

For example

Input cumulative quantity and rang is: X1=1294967295.362549, R1=24,


X2=36952687.236328, R2=2, the difference of two output cumulative
quantity is: ERROR=851535036.526611.

Parameter Description

Parameter Data type Meaning

X1 structAccum Input cumulative quantity 1

R1 INT Input the rang of cumulative quantity 1

X2 structAccum Input cumulative quantity 2

R2 INT Input the rang of cumulative quantity 2

ERROR structAccum Output

SUM_TO_ACCUM

Brief Description

The function of this module is that convert analog sum to accumulating

322
Graphical Programming software SCControl

value.

EN and ENO can be configured as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

SUM1 LONG SUM1 of analog sum

SUM0 SFLOAT SUM0 of analog sum

ACCUM structAccum Output

Implementation method:

Get the last 12 bits from input value SUM0 as the decimal fraction of
accumulating part, add SUM1 shifted left 4 bits and higher 4 bits of SUM0
as the integer part of accumulating value.

TOTAL_ACCUM

Brief Description

The function of this module is taking accumulating values and then output it.
When Y and accum are the same type data, Y increases by X.

EN and ENO are set as additional parameters.

The dimension of accum and X must be identical, or else make a mistake.

Representation

323
Graphical Programming software SCControl

Symbol

Formula

Y =accum + X

Parameter Description

Parameter Data type Meaning

ACCUM structAccum Accumulated value

X SFLOAT Increased value

Y structAccum Output

Implementation method

Input accumulating value of the integral part changes to LONG type, the
part of decimal fraction add to increased value, then composed
accumulating value output.

Note

This module adds once per second, but must satisfy some condition as
follows:

1. Master block operate period less then 1s;

2. The programming operate period must be 1Ts, that is each master block
operate period call this module one time.

If can't satisfy the conditions above, this module working abnormality

4. Assistant calculation

BCD_TO_BIN

324
Graphical Programming software SCControl

Brief Description

This module converts four bits BCD code into sixteen bits binary digit
equals output.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

If input BCD code is B3B2B1B0, every bit coverts four bits binary system
number, example A15A14A13A12...A3A2A1A0, then every binary digit is 1
or 0, the output is ON or OFF.

Parameter Description

Parameter Data type Meaning

X UINT Input BCD code

D0~D15 BOOL Output binary digit state

BCD_TO_DEC

Brief Description

The function converts an input value from the data type BYTE into a data

325
Graphical Programming software SCControl

type of algorism output, input BCD code is BYTE type, the maximum is 99.
The rang of BCD code is [0,9], when input BCD one digit is exceeded 9,
output BCD alarm sign is 0X0F(15); when input BCD tens digit is exceeded
9, output BCD alarm sign is 0XF0(240); when input BCD one digit and tens
digit are all exceeded 9, output BCD alarm sign is 0XFF(255).

EN and ENO are set as additional parameters.

Representation

Symbol

DECOUT=BCD_TO_DEC (BCDIN)

Parameter Description

Parameter Data type Meaning

BCDIN BYTE Input BCD code

DECOUT BYTE Output algorism

BCDALM BYTE Alarm sign of BCD code

BCD_TO_DEC4

Brief Description

This module converts four bits BCD code into decimal system number.

EN and ENO are set as additional parameters.

Representation

Symbol

326
Graphical Programming software SCControl

Arithmetic

If input BCD code is B3B2B1B0, then the decimal system output is


B3*1000+B2*100+B1*10+B0, because the rang of BCD code is 0~9, if BCD
code exceeded 9, then the alarm sign of output set ON. Example: input
B0>9, then Q0=ON, the output of decimal system bit is 0.

Parameter Description

Parameter Data type Meaning

BCD UINT Input BCD code

DEC UINT Output decimal system number

Q0~Q3 BOOL The exceeded alarm bit of BCD code

BIN_TO_BCD

Brief Description

This module converts binary system number make up of sixteen digitals


into BCD code equals output.

EN and ENO are set as additional parameters.

Representation

Symbol

327
Graphical Programming software SCControl

Arithmetic

If input sixteen bits binary system number is


A15A14A13A12...A3A2A1A0, divide into four groups for four bits, every
four bits is one BCD code, that is B3, B2, B1, B0, the number is
B3*1000+B2*100+B1*10+B0, because of the rang of BCD code is 0~9, if
every four bits number exceeded 9, then corresponding Qi=ON, the output
of corresponding BCD code is 0.

Parameter Description

Parameter Data type Meaning

D0~D15 BOOL Input digitals

CPV UINT Output BCD code

Q0 BOOL BCD alarm corresponding of D0~D3

Q1 BOOL BCD alarm corresponding of D4~D7

Q2 BOOL BCD alarm corresponding of D8~D11

Q3 BOOL BCD alarm corresponding of D12~D15

DEC_TO_BCD

Brief Description

This function converts an input value from the data type BYTE into a data

328
Graphical Programming software SCControl

type of the BCD code output, input algorism is BYTE type, the maximum is
255.

EN and ENO are set as additional parameters.

Representation

Symbol

BCDOUT = INT DEC_TO_BCD (DECIN

Parameter Description

Parameter Data type Meaning

DECIN BYTE Input algorism

BCDOUT INT Output BCD code

DEC_TO_BCD4

Brief Description

This module converts unsigned decimal system number into four bits BCD
code.

Note: The max value of four bits BCD code is 9999, so the decimal system
of input can't be exceeded 9999, otherwise the BCD code of output is 0,
and the alarm sign bit is ON.

EN and ENO are set as additional parameters.

Representation

Symbol

329
Graphical Programming software SCControl

Arithmetic

If input decimal system number is D3D2D1D0, divide 10 received D0,


divide 100 received D1, divide 1000 received D2, divide 10000 received D3,
then four binary digits express one value, output after fit together. Because
of the output in SCControl display of decimal system, so converts decimal
system into hex.

Parameter Description

Parameter Data type Meaning

DEC UINT Decimal system number of input

BCD UINT The BCD code of output

ALM BOOL The alarm sign of input exceeded

DEC_TO_HEX

Brief Description

This module converts unsigned decimal system number into hex to output,
because of SCControl can't display letter, so the output divide into four pins
to display, each pin display one hex number.

EN and ENO are set as additional parameters.

Representation

Symbol

330
Graphical Programming software SCControl

Arithmetic

Pick-up four binary digit of four from input unsigned integer and assign to
the corresponding H0~H3 separately, that is H0~H3 express the four digital
codes of hex bits.

Parameter Description

Parameter Data type Meaning

DEC UINT Decimal system number of input

H0~H3 UINT Four hex bits of output

DIMENSIONLESS

Brief Description

This module converts engineer of input into dimensionless output according


to setting high-low limit. Input engineer can't set importune limit between
high-low limits, in order to exceed quantity rang using, users must be pay
attention to that.

Note: High limit of input must be greater than low limit, otherwise output
always is zero.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

X − LL
In this module, output Y=
HL − LL

331
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

X FLOAT Engineer of input

HL LONG High limit

LL LONG Low limit

Y FLOAT Dimensionless of output

ENGINEER

Brief Description

This module converts dimensionless of input into engineer output according


to setting high-low limit. Dimensionless between 0 to 1, but can't limited
over there, in order to exceeded quantity rang using, users must be pay
attention to that.

Note: High limit of input must be greater than low limit, otherwise output
always is zero. The precision of converts increases along with increase of
high-low limit.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

In this module, output Y = X * ( HL − LL ) + LL .

332
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

X SFLOAT Dimensionless of input

HL LONG High limit

LL LONG Low limit

Y FLOAT Engineer of output

FKDIVF

Brief Description

The function of this module is zooming out a semi float numeral with
integers.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

SF SFLOAT Semi float input

K INT Dividing coefficient

Y SFLOAT Output

Implementation method:

If divisor is 0, then output 7.999756 or -8.0; the two numbers convert LONG
type to division, if quotient exceed SFLOAT type rang then expression with
boundary value (if quotient > 7.999756, then show 7.999756, if quotient <

333
Graphical Programming software SCControl

-8.0, the show -8.0).

FKMULF

Brief Description

The function of this module is zooming in semi float numeral with integers.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

SF SFLOAT Semi float numeral

K INT Multiplying times

Y SFLOAT Output

Implementation method:

SFLOAT type variable deposited with INT, so can multiplying immediacy,


show SFLOAT type; if exceed SFLOAT expression rang then use boundary
value (if quotient > 7.999756, then show 7.999756, if quotient < -8.0, the
show -8.0).

FKMULK

Brief Description

The function of this module is make a integer numeral multiplying or


dividing with a semi float numeral and then output it's round value.

334
Graphical Programming software SCControl

Representation

Symbol

Parameter Description

Parameter Data type Meaning

SF SFLOAT Multiplying or dividing coefficient

K INT Input integer

Y INT Output

Implementation method:

Converts two input value into LONG type then to multiply, product shift right
11bits, if the last bit doesn't 0 then add 1 (round), shift right one bit also.
The multiply is LONG type variable, if it exceed the rang of INT type
expression then get boundary value (if multiply >32767 then show 32767; if
multiply <-32768 then show -32768). The multiply converts INT type into
output.

HEX_TO_DEC

Brief Description

This module converts four bits hex into decimal system number to output.

EN and ENO are set as additional parameters.

Representation

Symbol

335
Graphical Programming software SCControl

Arithmetic

Compose four bits hex number with input, than assign to output.

Parameter Description

Parameter Data type Meaning

H0~H3 UINT Input hex value of each bit

DEC UINT Output decimal system value

KFDIVK

Brief Description

The function of this module is make a integer numeral dividing with a semi
float numeral and then output it's round value.

Y = K/ SF.

Representation

Symbol

Parameter description

Parameter Data type Meaning

K INT Dividend

SF SFLOAT Divisor

336
Graphical Programming software SCControl

Y INT Output

Implementation method:

If divisor is 0, then output 32767 or -32768; two numbers divide after


dividend shift left 13 bits (binary system), if mantissa unequal 0 have
residual, divide 2 after add 1.If quotient overstep the INT type rang then
shown boundary value (if quotient>32767,then shown 32767;if
quotient<-32768,then shown -32768 ) .

KKDIVF

Brief Description

The function of this module is make an integer dividing with an integer


numeral and then output a semi float numeral.

Representation

Symbol

Parameter description

Parameter Data type Meaning

K1 INT Dividend

K2 INT Divisor

Y SFLOAT Output

Implementation method:

337
Graphical Programming software SCControl

If divisor is 0, then output 7.999756 or -8.0; otherwise dividend shift left 12


bits (binary system) divide divisor, if quotient overstep the SFLOAT type
rang then shown boundary value (if quotient >7.999756,then shown
7.999756;if quotient<-80,then shown -8.0 ) .

V_T_MEASURE

Brief Description

When voltage temperature measure sign FLAG=ON, this output all kinds of
voltage and environmental temperature of controller.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

FLAG BOOL Voltage temperature measure sign

F_5VA FLOAT 5VA voltage value

F_5VB FLOAT 5VB voltage value

F_24VA FLOAT 24VA voltage value

F_24VB FLOAT 24VB voltage value

338
Graphical Programming software SCControl

F_33V FLOAT 3.3V voltage value

F_18V FLOAT 1.8V voltage value

F_BAT FLOAT The voltage mothball batteries

TEMPERATURE FLOAT The environmental temperature of controller

5. Input manage

ACCELERATE_MV

Brief Description

This module use the method of average move value then can receive
average acceleration in appointed time Ts.

Note: The unit of Time unit Ts is 0.1s.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SET=ON, output equals to YSET, clear inner hide variable.

When SET=OFF, output average acceleration in time Ts, the arithmetic as


follows:

The average move value on the time of n:

V [m + 1] + V [m + 2] + L + V [n]
MV [n] =
n−m

339
Graphical Programming software SCControl

The average move value on the time of n-1:

V [m] + V [m + 1] + L + V [n − 1]
MV [n − 1] =
n−m

Both of the above formula then can received:

V [ n] − V [ m]
MV [n] = MV [n − 1] +
n−m

If V[m] = MV[n], then

V [n] − MV [m]
MV [n] = MV [n − 1] +
n−m

After predigest:

(n − m) * MV [n − 1] + V [n]
MV [n] =
n − m +1

Adjust:

V [ n] − V [ m]
A=
( n − m) * T 0 ,

Control period is T0.

After predigest:

MV [n] − MV [n − 1]
A=
T0

Parameter Description

Parameter Data type Meaning

SET BOOL SET

YSET FLOAT Setting value

PV FLOAT Input value

Ts UINT Time unit (unit is 0.1s)

340
Graphical Programming software SCControl

AIALM

Brief Description

This module is analyzing quality code of analog input and analyzing quality
code of alarm output.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

Alarm deal with input PV in master block, High-high warning limit = 0X05,
High warning limit = 0X01, Low warning limit = 0X02, Low-low warning limit
= 0X06, shadiness and error signal is equals to 0X0100 and 0X0800, this
module is analyzing this alarm information, compared with quality code and
this numerical value, output analyzing result.

If input FLAG = 0X05, then output HH = ON, indicate is High-high warning


limit.

If input FLAG = 0X0100 or FLAG = 0X0800, then output IO = ON, indicate


is channel error alarm.

Parameter Description

Parameter Data type Meaning

FLAG WORD Quality code

H BOOL High limit alarm

HH BOOL High high limit alarm

341
Graphical Programming software SCControl

L BOOL Low limit alarm

LL BOOL Low low limit alarm

IO BOOL Channel failure alarm

ALM_LEAK

Brief Description

The function of this module is that judges wrap between the input values of
accumulate currently and that of last period whether exceeded LK. When
wrap up LK, LEAK = ON; when wrap below (LK-HYS), LEAK = OFF. The
main usage is the measure of boiler's flow and the progress of qualities'
measurement.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID ALM_LEAK (PV, LK, HYS, SPV, LEAK)

Parameter Description

Parameter Data type Meaning

PV structAccum Input accumulating value currently

LK SFLOAT Leak setting value

HYS SFLOAT Lag value

LEAK BOOL Leak alarm

342
Graphical Programming software SCControl

AVE_C

Brief Description

This module used to gains the input data's average value in a period, which
is input once of every scan period, if don't reach the ordered time, then
output the output value of completed in the last given period.

EN and ENO are set as additional parameters.

Representation

Symbol

VOID AVE_C (SET,YSET,PV,NUM,GAIN,CPV)

Arithmetic

When set switch SET = ON, output CPY = YSET, set inner accumulate and
count variable zero.

SPV
When set switch SET=OFF, output, CPV = Gain × where SPV is
NUM
the accumulation of input variables in NUM scan periods.

Parameter Description

Parameter Data type Meaning

SET BOOL Set switch

YSET SFLOAT Setting value

PV SFLOAT Process variable input value

NUM UINT Scan period number

GAIN SFLOAT Gain

343
Graphical Programming software SCControl

Accumulate average value of


CPV SFLOAT
count output

COMPENSATE

Brief Description

The function of this module is supper steam's temperature_pressure


compensation. The steam specific volume below design status DV can gain
by supper steam's counter.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

Based on actual temperature and actual pressure value of steam, check list
received actual specific volume, adopt formula underside:

Y = (Design V/Actual specific volume) X Flow0

Parameter Description

Parameter Data type Meaning

FLOW0 SFLOAT The press signal with flow meter measurement, Numerical value bound: 0~100%

TEMP FLOAT Actual working temperature, Units: centigrade, Bound:260~800centigrade

PRESS FLOAT Actual working pressure, Units: Mpa, Bound0.5Mpa~32Mpa

DV FLOAT Design specific volume, Units:cm3/g

Y SFLOAT Flow rate after compensation, is dimensionless numbers, Numerical value bound:

344
Graphical Programming software SCControl

0~100%

DEADBND

Brief Description

This module is setting a dead zone [-DB, +DB], deal with dead zone of
input.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When input IN is between the -DB and +DB, output OUT=0;

When input IN >= DB, output OUT = (IN-DB)*K1;

When input IN <= -DB, output OUT = (IN +DB)*K2;

Parameter Description

Parameter Data Type Meaning

IN SFLOAT Input

DB SFLOAT Dead zone

K1 SFLOAT Increase proportional coefficient

K2 SFLOAT Decrease proportional coefficient

OUT SFLOAT Output

345
Graphical Programming software SCControl

DED

Brief Description

The function of this module is producing a dead lag output. Time-lapse:


t=NUM*T.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When set switch SET=ON, output Y=YSET, usually used in initialization.

When set switch SET=OFF, output is time-lapse of input.

− s*t
Transfer function: G ( s ) = Y ( s ) / X ( s ) = e

Parameter Description

Parameter Data type Meaning

SET BOOL SET

YSET SFLOAT Setting value

X SFLOAT Input

T UINT Time unit (unit is 0.1s)

NUM UINT No of time unit, 0<NUM<=50

Y SFLOAT Output

346
Graphical Programming software SCControl

EXHSTEAM

Brief Description

Supper steam's flow compensation with the temperature rang is


140-560 centigrade and pressure rang is 0.2MPa-16.0MPa.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

Based on actual pressure and actual temperature, check list received

1
enthalpy and specific volume, that densities ρ= adopt formula
µ
underside:

flow = ρ / density 0 × flow0

This function is put up temperature and pressure compensation with too hot
steam, input flow0 is dimensionless numbers measurement flow, output
flow is flow rate dimensionless numbers after compensation, have no use
for other management.

Parameter Description

Parameter Data type Meaning

Measurement steam flow, is dimensionless numbers.


flow0 SFLOAT
Numerical value bound: 0~100%

press FLOAT Press, Units :Kpa, Bound:189.86777~15989.867777kpa

347
Graphical Programming software SCControl

Actual temperature, Units :centigrade ,


temper FLOAT
Bound:140~560centigrade

density0 FLOAT Steam design density, Units :Kg/m3

flow SFLOAT Dimensionless numbers after compensation, Numerical value


bound: 0~100%

enthalpy FLOAT Currently steam enthlapy, Units: KJ/Kg

FXY

Brief Description

Users can custom two dimensions broken line table, the input range is
divided into ten sections and a linear input to output relationship is set up
for each of the ten sections, that including eleven point.

EN and ENO are set as additional parameters.

Note: This only treatment for two dimensions broken line table.

Representation

Symbol

Arithmetic

First ,the program judges the N whether exceeded, if between 0 and 63,
that the value of input X in the part of ten sections, then inserts linearity
value, the material arithmetic as follows:

When X between X[i] and X[i+1], output:

X − X [i ]
Y = Y [i ] + (Y [i + 1] − Y [i ]) ×
X [i + 1] − X [i ]

If input X < X [0], output Y = Y[0]; if input X > X[10], output Y=Y[10].

348
Graphical Programming software SCControl

If N can't between 0 and 63, then output Y=0.

Parameter Description

Parameter Data type Meaning

X SFLOAT Input

N UINT Table's order No. [0,63]

Y SFLOAT Output

GET_FXY_X

Brief Description

Users can custom two dimensions broken line table, the input range is
divided into ten sections and a linear input to output relationship is set up
for each of the ten sections, that including eleven point. Users can read the
X order NUM value of N table's order, which is in sixty-four table's orders.

Representation

Symbol

Arithmetic

Return to the point of X order NO. in that table's order immediacy.

Parameter Description

Parameter Data type Meaning

NUM UINT X order NO.[0, 10]

N UINT Table's order NO.[0, 63]

349
Graphical Programming software SCControl

X SLFOAT Read appoint dot of X order

GET_FXY_Y

Brief Description

Users can custom two dimensions broken line table, the input range is
divided into ten sections and a linear input to output relationship is set up
for each of the ten sections, that including eleven point. Users can read the
X order NUM value of N table's order, which is in sixty-four table's orders.

Representation

Symbol

Arithmetic

Return to appoint serial broken line table of coordinate Y.

Parameter Description

Parameter Data type Meaning

NUM UINT X order NO.[0,10]

N UINT Table's order NO.[0,63]

Y SLFOAT Output

GETPATFLAG

Brief Description

Reads the PAT working sign of the Nth channel.

Representation

350
Graphical Programming software SCControl

Symbol

Arithmetic

Gets the PAT working sign of the Nth channel.

Parameter Description

Parameter Data type Meaning

N INT (0<=n<64) PAT block channel number

F WORD PAT block working status sign

GETPATPV

Brief Description

Gets PV value with the Nth channel of PAT.

Representation

Symbol

Arithmetic

Return to PV value with the Nth channel of PAT immediacy.

Parameter Description

Parameter Data type Meaning

N INT PAT block channel number(0<=n<64)

PV SFLOAT Manipulated feedback value

351
Graphical Programming software SCControl

GETPATSTATE

Brief Description

Read the especial operate status of block.

Representation

Symbol

Arithmetic

User can setting especial operate command by SETPATCON module, if


users want to know the especial status of block, that can reads special
status Byte of FW342 by this module.

Byte13.0: 1: PAT increase output 0: without increasing output

Byte13.1: 1: PAT decrease output 0: without decrease output

Byte13.2: 1: trig status 0: working status

Byte13.3: 1: in process of self-study 0: self-study status end

Byte13.4: 1: echo self-study parameters 0: echo parameter of users


sets

Byte13.5~ Byte13.7: Remain zero

Parameter Description

Parameter Data type Meaning

N INT PAT block channel number(0<=n<64)

CON INT PAT block working status

352
Graphical Programming software SCControl

HAL

Brief Description

This module produces an input high- limited alarm sign in accordance with
the alarm limit and alarm dead.

Representation

Symbol

Arithmetic

When input X>ALM, output alarm switch Y=ON, it suggests that the input
has exceeded the set high limit at this time.

When input X<ALM-GAP, output alarm switch Y=OFF, it suggests that the
alarm has been dismissed; Note: this doesn't mean that the input which
declines below ALM has made Y=OFF, so as to dismiss the alarm, but do
mean that there's one dead area here.

When the input X is within the block of ALM-GAP and ALM, the output
alarm switch remains the status as it was last time.

Please see as follows:

353
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

X SFLOAT Input

ALM SFLOAT High limit

GAP SFLOAT Gap

Y BOOL Alarm output

LAG

Brief Description

The input signs would be dealt with 1st order lag and the unit for lag time
LAG is based on 0.1S, that is, when the LAG=1, it means that the lag time
is 0.1 second.

Note: the sum of input X (K) and X (K-1) should not exceed the maximum
SFLOA value 7.999756, otherwise there will be an overflow and cause a
mistake.

Representation

Symbol

354
Graphical Programming software SCControl

Arithmetic

When the set switch SET=ON, output Y=YSET.

When the set switch SET=OFF, the output Y is the 1st order lag output, lag
time unit is 0.1s.

The transfer function is:

GAIN
G ( s) =
1 + LAG × S

That is:

Y (S ) GAIN
=
X ( S ) 1 + LAG × S

After predigest:

Y ( S ) + LAG × S × Y ( S ) = GAIN × X ( S )

Predigest to time field and difference:

Y (k ) − Y (k − 1)
Y (k ) + LAG × = GAIN × X (k )
dt

Farther predigest:

GAIN × X (k ) − Y (k − 1)
Y (k ) = Y (k − 1) + × dt
dt + LAG

X (k ) + X (k − 1)
X (k) get in programming, put up average value
2
filter;

The end formula is:

355
Graphical Programming software SCControl

X (k ) + X (k − 1)
GAIN × − Y (k − 1)
Y (k ) = Y (k − 1) + 2 × dt
dt + LAG
−t

The transfer function time field expression: Y = GAIN × (1 − e LAG


)

Answer curve as follows:

Parameter description

Parameter Data type Meaning

SET BOOL Set

YSET SFLOAT Setting value

X SFLOAT Input value

GAIN SFLOAT Gain

LAG UINT Lag time(0.1s)

Y SFLOAT Output

LAL

Brief Description

The function of this module is producing a low limit alarm according to sets
alarm limit and alarm dead area.

Representation

Symbol

356
Graphical Programming software SCControl

Arithmetic

When input X<ALM, then output alarm switch Y = ON, input already
exceeded lowest temporality.

When input X>ALM + GAP, then output alarm switch Y = OFF, it suggests
that the alarm has been dismissed; Note: this doesn't mean that the input
which declines above ALM has made Y=OFF, so as to dismiss the alarm,
but do mean that there's one dead area here.

When the input X is within the block of ALM + GAP and ALM, the output
alarm switch remains the status as it was last time.

Please see as follows:

Parameter Description

Parameter Data type Meaning

X SFLOAT Input

ALM SFLOAT Low limit

GAP SFLOAT Gap

Y BOOL Alarm output

357
Graphical Programming software SCControl

LED

Brief Description

Producing an order derivative output for input, the uite of derivative time is
0.1s, input LED = 1, namely 0.1s.

Representation

Symbol

Arithmetic

When SET=ON, output Y=YSET

When SET=OFF, output Y is one order derivative output for input.

Transfer function:

LED × S
G(S ) =
1 + LED × S

Namely:

Y (S ) LED × S
=
X ( S ) 1 + LED × S

After predigest:

Y ( S ) + LED × S × Y ( S ) = LED × S × X ( S )

Predigest to time field and difference:

358
Graphical Programming software SCControl

Y (k ) − Y (k − 1) X (k ) − X (k − 1)
Y (k ) + LED × = LED ×
dt dt

End:

Y (k − 1) + X (k ) − X (k − 1)
Y (k ) = × LED
LED + dt

−t
Transfer function time field expression: Y = e LED

Answer curve as follows:

Parameter description

Parameter Data type Meaning

SET BOOL Set

YSET SFLOAT Setting value

X SFLOAT Input

LED UINT Derivative time(0.1s)

Y SFLOAT Output

LEDLAG

Brief Description

The function of this module is producing a one order derivative/ lag output,
the units of derivative and lag time constant is 0.1s. When LAG>LED, is
one order lag output; when LAG=LED output value equals to input value.

Representation

359
Graphical Programming software SCControl

Symbol

Arithmetic

When SET = ON, output Y = SET.

When SET = OFF, output Y is the value calculated for one order derivative.

The transfer function is:

1 + LED × S
G ( s ) = GAIN ×
1 + LAG × S

That is:

Y (S ) 1 + LED × S
= GAIN ×
X (S ) 1 + LAG × S

After predigest:

Y ( S ) + LAG × S × Y ( S ) = GAIN × [ X ( S ) + LED × S × X ( S )]

Predigest to time field and difference:

Y (k ) − Y (k − 1) X (k ) − X (k − 1)
Y (k ) + LAG × = GAIN × [ X (k ) + LED × ]
dt dt
The end formula is:

LAG × Y (k − 1) + [( LED + dt ) × X (k ) − LED × X (k − 1)] × GAIN


Y (k ) =
LAG + dt

The transfer function time field expression:

360
Graphical Programming software SCControl

−t
LAG − LED LAG
Y= e
LAG

Parameters Description

Parameter Data type Meaning

SET BOOL Set

YSET SFLOAT Setting value

X SFLOAT Input

GAIN SFLOAT Gain

LAG UINT Lag time

LED UINT Derivative time

Y SFLOAT Output

LINECPS

Brief Description

Perform linearity compensation to input variable IN according to the


inputted proportion Kp and the offset DIS, bind the compensative result to
the output.

Representation

Symbol

Formula

Calculate the compensative result as following:

OUT=IN X Kp + DIS

361
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN SFLOAT Input variable

KP SFLOAT Proportional coefficient

DIS SFLOAT Offset

OUT SFLOAT Output variable

MAV

Brief Description

Used to gained sample data average of input past, the units of sample time
space T is 0.1s, that is input 1 is 0.1s, the num between 0 to 8.

Representation

Symbol

Arithmetic

When SET=ON, output Y=YSET.

When SET=OFF, output Y is move and average value of input, material


arithmetic as follows:

X r + X r −1 + ∧ + X r − m +1
CPV = GAIN *
m

CPV equals output Y, Xj equals sample value of every sample point with
input, m equals NUM of sample value.

362
Graphical Programming software SCControl

This arithmetic is dead against the sampling data of the newest time section,
principle drawing as follows:

This module cut nine amortize section of input data, used to leave in
sampling value care, so the num is between 0 and 8. When num >8 or
num = 0, the output return to input value, videlicet when SET = ON, NUM =
0, input X determine output Y.

Parameter Description

Parameter Data type Meaning

SET BOOL Set

YSET SFLOAT Setting value

X SFLOAT Input

T UINT Sample time space

NUM UINT Sample No.[0,8]

Y SFLOAT Output

OHSTEAM

Brief Description

This module must be notice the relation between SIGNALSEL and SIGNAL,

363
Graphical Programming software SCControl

when SIGNALSEL = OFF, SIGNAL is pressure signal, when SIGNALSEL =


ON, SIGNAL is flow rate signal. Actually, the value after compensation is
actual flow value, have no use for other management.

Expression

OHSTEAM (SIGNALSEL, PRESS, TEMPER, SIGNAL, DENSITY0, FLOW,


ENTHALPY)

Arithmetic

Based on actual pressure and actual temperature, check list received

1
enthalpy and specific volume, that density is ρ= , If
µ
SIGNALSEL=ON, adopt formula underside:

FLOW = ρ / DENSITY × SIGNAL

When SIGNALSEL=OFF, deal with pressure signal, formula is:

FLOW = ρ / DENSITY 0 × SIGNAL

Parameter Description

Parameter Data type Meaning

Signal selection switch, when is OFF, deal with differential_pressure


SIGNALSEL BOOL
signal, when is ON, deal with flow rate signal

PRESS FLOAT Actual pressure, Units: Kpa, Bound is 189.86777~15989.867777kpa

TEMPER FLOAT Actual temperature, Units: Centigrade , Bound is140~560Centigrade

When SIGNALSEL = OFF is differential_pressure signal, when


SIGNAL SFLOAT
SIGNALSEL = ON is flow signal. Numerical value bound: 0~100%

DENSITY0 FLOAT Design steam density, Units:Kg/m3

364
Graphical Programming software SCControl

The value after steam compensation, is dimensionless numbers.


FLOW SFLOAT Numerical value bound: 0~100%

P_CMT

Brief Description

This module is put up deal with PT compensation that gas low rate signal
already by square root.

Representation

Expression

FLOW = P_CMT (PRESS0, PRESS, FLOW0)

Arithmetic

Actual press measurement value = Press tag range X Press heaps of times
value + Press tag of range lower limit

C = Actual press measurement value/Design press value

FLOW = FLOW 0 × C

Parameter Description

Parameter Data type Meaning

PRESS0 FLOAT Design press, Units: Mpa

PRESS structAI Press compensation tag

FLOW0 SFLOAT Flow measurement value

Heaps of times value after compensation,


FLOW SFLOAT
Numerical value bound: 0~100%

365
Graphical Programming software SCControl

PAT341H

Brief Description

The function of this module is setting die section of PAT block (FW341) and
inspect the alarm status.

EN and ENO can be set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

N INT The serial number of PAT dypass

PATMA BOOL Select dead zone

PV SFLOAT The PV value of this dypass

SUB BOOL If has a decrease pulse output

ADD BOOL If has a increase pulse output

PLIM BOOL positive limit alarm

NLIM BOOL negative limit alarm

Implementation method

When PATMA=ON, PAT341H changes die section to FF with the Nth PAT
channel; When PATMA=OFF, PAT341H changes die section to users
setting value .At the same time make sure the currently status a according
to status bit. When SUB=ON, that is on output moment of decrease pulse;
when ADD=ON, that is on output moment of increase pulse; When
PLIM=ON, that is on increase limit alarm; When NLIM=ON, that is on

366
Graphical Programming software SCControl

decrease limit alarm.

PAT342H

Brief Description

The function of this module is used in PAT block (FW342), which is detect
the alarm status and action status of control electrical.

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

N INT The serial number of PAT channel

PV SFLOAT PV value of this channel

AUTO BOOL Television Manual state (ON=automatism)

IO BOOL If IO state have a trouble (failure alarm, ON=failure)

SUB BOOL If has a decrease pulse output (ON=have)

ADD BOOL If has a increase pulse output (ON=have)

PLIM BOOL positive limit alarm (ON=alarm)

NLIM BOOL negative limit alarm (ON=alarm)

367
Graphical Programming software SCControl

STU BOOL If on self-learning (ON=on self-learning)

STOP BOOL If on brake status (ON=on brake status)

If has manual decrease output (ON=manual decrease


MSUB BOOL
output)

If has manual increase output (ON=manual increase


MADD BOOL
output)

Implementation method

Reads the alarm and status of FW342,

When PAT decrease sign output from 1 to 0, then get zero for especial
operate control byte;

When PAT increase sign output from 1 to 0, then get zero for especial
operate control byte;

When self-study sign output from 1 to 0, then get zero for especial operate
control byte.

PT_CMT

Brief Description

This module is put up deal with temperature and pressure compensation


that gas flow rate signal already by square root.

Representation

Symbol

Expression

368
Graphical Programming software SCControl

FLOW = PT_CMT (PRESS0, TEMP0, PRESS, TEMP,


FLOW0)

Arithmetic

Actual working temperature value = Temperature tag range X


Temperature dimensionless numbers value + Temperature tag of range
lower limit

Actual pressure measurement value = Pressure tag range X Pressure


dimensionless numbers value + Pressure tag of range lower limit

C = (Actual pressure measurement value/Design pressure value) X (Design


temperature /Actual working temperature)

FLOW = FLOW 0 × C

Parameter Description

Parameter Data type Meaning

PRESS0 FLOAT Design pressure, Units: Mpa

TEMP0 FLOAT Design temperature, Units: Centigrade

PRESS structAI Pressure compensation tag

TEMP structAI Temperature compensation tag

FLOW0 SFLOAT The flow need temperature and pressure compensation

The value of dimensionless numbers after compensation,


FLOW SFLOAT
Numerical value bound: 0~100%

RAMP

Brief Description

When input comes into being an order change, make the output has a
gradual change ramp peculiarity, it is the changes of output are relative
gently. Show as follows:

369
Graphical Programming software SCControl

Representation

Symbol

Arithmetic

When set switch SET=ON, output CPV=YSET, inner count is zero.

When set switch SET=OFF and input PV unequal zero, output according to
the step value (UNIT) of time space (T) , then attain the effect of the gradual
change ,until equals to the input value of PV.

Note: The units of sets time space T is 0.1s.

Parameter Description

Parameter Data type Meaning

SET BOOL Reset switch

YSET SFLOAT Setting value

370
Graphical Programming software SCControl

PV SFLOAT Input value

T UINT Given time set value

UINT SFLOAT Step length

CPV SFLOAT Output value

SATENTHA

Brief Description

Saturation steam enthalpy cost that calculation pressure bound is


0~15989.867777kpa. Unit of press input is KPa.

Representation

Symbol

Expression

Y = SATENTHA (P)

Arithmetic

Receive enthalpy by check list.

Parameter Description

Parameter Data Type Meaning

Practice pressure,
P FLOAT
Units:Kpa,bound:0~15989.867777kpa

Y FLOAT Enthalpy, Units: KJ/g

SATSTEAM

371
Graphical Programming software SCControl

Brief Description

This function adopt saturation steam with pore plate measure put up deal
with temperature and pressure compensation, input flow0 is dimensionless
numbers of measurement flow, output flow is dimensionless numbers of
flow after compensation, can't need other management.

Representation

Symbol

Arithmetic

Based on actual pressure, check list received enthalpy and specific volume,

1
that density ρ = , then adopt formula underside:
µ

flow = ρ / density 0 × flow0

Parameter Description

Parameter Data type Meaning

P FLOAT Pressure,Units:Kpa,Bound:0~15989.867777Kpa

D FLOAT Steam design density, Units:Kg/m3

Measurement steam flow ,is dimensionless numbers,


X SFLOAT
Numerical value bound: 0~100%

The dimensionless numbers after steam compensation,


Y SFLOAT
Numerical value bound: 0~100%

SATSTEAM_DP

Brief Description

372
Graphical Programming software SCControl

This function must be notice when using, input FLOW0 is differential_press


signal with pore plate measurement, value after compensation must be
deal with by square root module, then is flow rate value after
compensation.

Representation

Expression

FLOW = SATSTEAM_DP (PRESS, DENSITY0, FLOW0)

Arithmetic

Based on actual press, check list received enthalpy and specific volume,

1
that density ρ = , adopt formula underside:
µ

FLOW = ρ / DENSITY 0 × FLOW 0

Parameter Description

Parameter Data type Meaning

PRESS FLOAT Pressure,Units:Kpa,Bound:0~15989.867777kpa

Pressure signal of measurement steam, Numerical


FLOW0 SFLOAT
value bound: 0~100%

DENSITY0 FLOAT Steam design density, Units:Kg/m3

Dimensionless number after compensation,


FLOW SFLOAT
Numerical value bound: 0~100%

SATSTEAM_EX

Brief Description

373
Graphical Programming software SCControl

This module must be notice the relation between SIGNALSEL and SIGNAL,
when SIGNALSEL = OFF, SIGNAL is temperature_pressure signal.
Temporality, the value after compensation must be management by square
root then can receive dimensionless numbers of flow rate. When
SIGNALSEL = ON, SIGNAL is flow signal. At that time, the value after
compensation is actual flow rate value, have no use for other
management.

Representation

Expression

FLOW = SATSTEAM_EX (SIGNALSEL, PRESS, DENSITY0, SIGNAL)

Arithmetic

Based on actual press and actual temperature, check list received enthalpy

1
and specific volume, that density is ρ = , If SIGNAL SEL=ON, adopt
µ
formula underside:

FLOW = ρ / DENSITY 0 × SINGAL

When SIGNALSEL=OFF, deal with press signal, formula

FLOW = ρ / DENSITY 0 × SINGAL


is:

Parameter Description

Parameter Data type Meaning

Signal selection switch, when is OFF , deal with temperature pressure signal, when is ON,
SIGNALSEL BOOL
deal with flow rate signal

PRESS FLOAT Actual pressure, Units: Kpa, Bound is 0~15989.867777kpa

SIGNAL SFLOAT When SIGNALSEL = OFF is pressure signal, when SIGNALSEL = ON is flow signal, is

374
Graphical Programming software SCControl

dimensionless numbers. Numerical value bound: 0~100%

DENSITY0 FLOAT Design steam density, Units:Kg/m3

FLOW SFLOAT The dimensionless numbers after steam compensation, Numerical value bound: 0~100%

SET_FXY_X

Brief Description

Users can custom two dimensions broken line table, the input range is
divided into ten sections and a linear input to output relationship is set up
for each of the ten sections, that including eleven point. Users can read the
X order NUM value of N table's order.

Note

The table line with SCControl and SCKey is syncretism already, that is the
system supply sixty-four table line, users can defined one dimension and
two dimensions in SCKey, also can defined two dimensions in SCControl,
they leave in a address area's care, so the table line is differently with
SCControl and SCKey.

Representation

Symbol

Arithmetic

Firstly, users should judge that if the order numbers of table line and X axis
points are overage or not, when table line NO. between 0 and 63, X order
NO. between 0 and 10, then read-in data in X order of table line.

Parameter description

375
Graphical Programming software SCControl

Parameter Data type Meaning

X SFLOAT Read appoint dot of X order

NUM UINT X order NO.[0, 10]

N UINT Table's order NO.[0, 63]

SET_FXY_Y

Brief Description

Users can custom two dimensions broken line table, the input range is
divided into ten sections and a linear input to output relationship is set up
for each of the ten sections, that including eleven point. Users can read the
Y order NUM value of N table's order.

Representation

Symbol

Arithmetic

Firstly, users should judge that if the order numbers of table line and X axis
points are overage or not, when table line NO. between 0 and 63, Y order
NO. between 0 and 10, then read-in data in Y order of table line.

Parameter Description

Parameter Data type Meaning

Y SFLOAT Read appoint dot of Y order

NUM UINT Y order No.[0,10]

N UINT Table's order No. [0,63]

376
Graphical Programming software SCControl

SETPATCON

Brief Description

Set PAT especial sign bit.

Representation

Symbol

Arithmetic

void SETPATCON (WORD CON, INT N);

N: The channel needs operation.

CON: Express the ongoing operate, the meaning of each codes:

00: Replacement order

01: Trig

02: Startup

03: Automatism

04: Manual

05: Manual increase

06:Manual decrease

07: Start self-study

08: Remain

09: Reads the parameter of users setting

377
Graphical Programming software SCControl

0A: Reads self-study parameter

The object operated is the thirteen bit of PAT block configuration data area
(PATBUF+PATLEN X n+PAT_WR+0 X D)

Parameter Description

Parameter Data type Meaning

CON WORD Needs to working status parameter setting

N INT(0=<N<64) PAT block channel number

STAT_FLOAT

Brief Description

This module can receive additive value, average value, max. and min. in T
time.

Note: When statistical mode SM beside the rang [0, 3], this module unable
do any manage then return.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When reset signal RS from OFF to ON, output CPV equals to initial value
IV.

When RS in other instance:

378
Graphical Programming software SCControl

(1) If SM=0, the output select additive mode, output input data additive
value in time T, CPV (k) = CPV(k-1) + PV(k).

(2) If SM=1, the output select average mode, output input data average
value in time T, CPV=PV(1)+PV(2)+...+PV(k)/k.

(3) If SM=2, the output select max. mode, output input data max. value in
time T, CPV=MAX[PV(1), PV(2),...PV(k)].

(4) If SM=3, the output select min. mode, output input data min. value in
time T, CPV=MIN [PV(1), PV(2),...PV(k)].

Parameter Description

Parameter Data type Meaning

RS BOOL Reset signal

IV FLOAT Initial value

PV FLOAT Input signal

T UINT Time unit (unit is 0.1s)

SM INT Stat. method

CPV FLOAT Output statistic

T_CMT

Brief Description

This module is put up deal with PT compensation that gas low rate signal
already by square root.

Representation

379
Graphical Programming software SCControl

Expression

FLOW = T_CMT (TEMP0, TEMP, FLOW0)

Arithmetic

Actual working temperature value = Temperature tag range X


Temperature heaps of times value + Temperature tag of range lower limit

C = Design Temperature/Actual working temperature

FLOW = FLOW 0 × C

Parameter Description

Parameter Data type Meaning

TEMP0 FLOAT Design temperature, units: Centigrade

TEMP structAI Temperature compensation tag

FLOW0 SFLOAT Flow compensation tag

Heaps of times value after compensation,


FLOW SFLOAT
Numerical value bound: 0~100%

VELALARM

Brief Description

Restrain the rate of inputted points. If it exceeds limit, then alarm and
engineer can adopt measures according to the alarming type. The unit of
input setting time S1 & S4 is 0.1S, the module counter variable step is that
increasing with master control block sample period.

Representation

Symbol

380
Graphical Programming software SCControl

Arithmetic

When IN2=ON, clean alarm bit, OUT1=OUT2=OFF;

When IN2=OFF, put up speed alarm. If the increment of the input signal IN1
exceeds speed increase limit S2 in the prescriptive time, then send the
alarm signal of exceeding speed increase, OUT1=ON; if the decrement
exceeds speed decrease limit S3, then send alarm signal of exceeding
speed decrease ,OUT2=ON. Time after exceed speed alarm. If there is
new exceed speed alarm, it will time again. When timing to S4, clean alarm.

Parameter Description

Parameter Data type Meaning

IN1 SFLOAT Monitored point input

IN2 BOOL Switch of clean alarm

S1 ULONG Time limit of alarm

S2 SFLOAT Speed increase alarm limit

S3 SFLOAT Speed decrease alarm limit

S4 ULONG Alarm revert time

OUT1 BOOL Speed increase alarm

OUT2 BOOL Speed increase alarm

VLM

Brief Description

The function of this module is limiting change speed of output.

381
Graphical Programming software SCControl

When set is on, Y = YSET; when set is off, if X increases, Y also increases
to X according speed V1 and if X decreases, Y also decreases to X
according speed V2.

EN and ENO are set as additional parameters.

When InterSet = ON, used integral manage.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

SET BOOL Set

YSET SFLOAT Setting value

X SFLOAT Input

V1 SFLOAT Increase speed

V2 SFLOAT Decrease speed

Y SFLOAT Output

Implementation method

If used integral manage, the precision is quite high, be fit for low speed of
go up and drop, if speed is high can't adopt integral in order to improve
running speed.

6. TEXTCODE module

382
Graphical Programming software SCControl

TEXTCODE

Brief Description

The function of this module is to realize user-defined program by using ST


language.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

IN1 BOOL save

OUT1 BOOL save

Usage

Double click this module appear a window as follows:

Click "Code", entering textcode editor section

383
Graphical Programming software SCControl

Users can input ST program in this section, it can operate or excerpt all
kinds of system, tag, variable, function and so on.

User can select variable or tag of remarked TEXTCODE code in current


project. If the corresponding objects (variable, tag) can be researched in
TEXTCODE module, show the line number of corresponding object in
researching result output frame.

7. Electricity Calculation

The module of coulometer treatment deal with the signal of FW355


samples, that according to Virtual value voltage (Vrms),Virtual value current
(Irms) and Active power(P) cumulate Watch power (S),Power-factor(λ),
Reactive power(Q),Active electrical energy(E) and Reactive electrical
energy(EN).

Watch power (S), Power-factor(λ), Reactive power(Q),Active electrical


energy(E) and Reactive electrical energy(EN) is received by the formula as
follows:

1. Watch power (S) = Vrms*Irms

2. Power-factor ( ) = P/S = cos

3. Reactive power (Q) = S* sin

4. Active electrical energy(E) = P*Σt (t is unit add up time )

384
Graphical Programming software SCControl

5. Reactive electrical energy(EN) = EN= Q*Σt (t is unit add up time)

About use-wire system

One-phase two-wires system:

u1 is the voltage between A-phase (or B-phase, or C-phase) and neutral


line N;

i1 is the current of A-phase (or B-phase ,or C-phase )

A set of One-phase two-wires system composed by any phase line (or


A-phase ,or B-phase ,or C-phase ) and one neutral line.

Three-phase three-wires system:

u1 is the voltage between A-phase and B-phase

u2 is the voltage between C-phase and B-phase

i1 is the current of A-phase

i2 is the current of B-phase

(Note: this example is referenced by B-phase, also can referenced by


A-phase and C-phase)

A set of three-phase three-wires system composed by A-phase, B-phase


and C-phase

385
Graphical Programming software SCControl

Three-phase four-wires system:

u1 is the voltage between A-phase and neutral line N

u2 is the voltage between B-phase and neutral line N

u3 is the voltage between C-phase and neutral line N

i1 is the current of A-phase

i2 is the current of B-phase

i3 is the current of C-phase

A set of three-phase four-wires system composed by three


phases( A-phase, B-phase and C-phase)

ACMETER12

ACMETER33

ACMETER34

ACMETER12

Brief Description

This module used in FW355 that operation of one-phase two-wires system,


calculate the value of voltage, current and power.

Representation

Symbol

386
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

AI structAI Coulometer signal tag

SET BOOL Cumulate setting signal

ESET structAccum Active power cumulate

ENSET structAccum Reactive power cumulate

V SFLOAT Virtual value of AC voltage

I SFLOAT Virtual value of AC current

F SFLOAT Frequency

S SFLOAT Watch power

R SFLOAT Power-factor

P SFLOAT Active power

Q SFLOAT Reactive power

E structAccum Active electrical energy

NE structAccum Reactive electrical energy

Implementation method

When SET = ON, E= ESET, NE=ENSET.

FW355 samples quadruplet shunt-wound signals of each one-phase


two-wires signal as follows:

Virtual value voltage (Vrms)

Virtual value current (Irms)

Active power (P)

Frequency (F)

------>Producing five signals by Cumulating

387
Graphical Programming software SCControl

Reactive power(Q)

Watch power (S)

Active electrical energy(E)

Reactive electrical energy(EN)

Power-factor( )

Five signals by cumulating that is: Reactive power(Q), Watch power (S),
Active electrical energy(E), Reactive electrical energy(EN), Power-factor(λ),
in this application situation, FW355 most can sample quadruplet one-phase
two-wires system, the accumulation as follows:

ACMETER33

Brief Description

This module used in FW355 that operation of three-phase three-wires


system, calculate the value of voltage, current and power.

Representation

Symbol

388
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

AI1 structAI The first passage signal tag of coulometer

SET BOOL Cumulate setting signal

ESET structAccum Active power cumulate

ENSET structAccum Reactive power cumulate

V1 SFLOAT Virtual value of AC voltage1

V2 SFLOAT Virtual value of AC voltage2

I1 SFLOAT Virtual value of AC current 1

I2 SFLOAT Virtual value of AC current 2

F1 SFLOAT Frequency1

F2 SFLOAT Frequency2

S SFLOAT Watch power

R SFLOAT Power-factor

P SFLOAT Active power

Q SFLOAT Reactive power

E structAccum Active electrical energy

NE structAccum Reactive electrical energy

Implementation method

When SET = ON, E= ESET, NE=ENSET.

FW355 samples eight shunt-wound signals of each three-phase


three-wires signal as follows:

Virtual value voltage (Vrms1,Vrms2)

Virtual value current (Irms1,Irms2)

389
Graphical Programming software SCControl

Active power (P1,P2)

Frequency (F1,F2)

------>Producing six signals by cumulating

Active power(P)

Reactive power(Q)

Watch power (S)

Active electrical energy(E)

Reactive electrical energy(EN)

Power-factor( )

Six signals by cumulating that is: Active power(P),Reactive power(Q),


Watch power (S), Active electrical energy(E), Reactive electrical energy(EN),
Power-factor(λ), in this application situation, FW355 most can sample two
three-phase three-wires system, the accumulation as follows:

ACMETER34

Brief Description

This module used in FW355 that operation of three-phase four-wires


system, calculate the value of voltage, current and power.

Representation

390
Graphical Programming software SCControl

Symbol

Parameter Description

Parameter Data type Meaning

AI1 structAI The first passage signal tag of coulometer

SET BOOL Cumulate setting signal

ESET structAccum Cumulate setting signal

ENSET structAccum Reactive power cumulate

V1 SFLOAT Virtual value of AC voltage1

V2 SFLOAT Virtual value of AC voltage2

V3 SFLOAT Virtual value of AC voltage3

I1 SFLOAT Virtual value of AC current 1

I2 SFLOAT Virtual value of AC current 2

I3 SFLOAT Virtual value of AC current 3

F1 SFLOAT Frequency1

F2 SFLOAT Frequency2

F3 SFLOAT Frequency3

S SFLOAT Watch power

R SFLOAT Power-factor

P SFLOAT Active power

391
Graphical Programming software SCControl

Q SFLOAT Reactive power

E structAccum Active electrical energy

NE structAccum Reactive electrical energy

Implementation method

When SET = ON, E= ESET, NE=ENSET.

FW355 samples twelve shunt-wound signals of each three-phase


four-wires signal as follows:

Virtual value voltage (Vrms1,Vrms2,Vrms3)

Virtual value current (Irms1,Irms2,Irms3)

Active power (P1,P2,P3)

Frequency (F1,F2,F3)

------>Producing six signals by cumulating

Active power(P)

Reactive power(Q)

Watch power (S)

Active electrical energy(E)

Reactive electrical energy(EN)

Power-factor( )

Six signals by cumulating that is: Active power(P),Reactive power(Q),


Watch power (S), Active electrical energy(E), Reactive electrical
energy(EN), Power-factor(λ), in this application situation, FW355 most can
sample a set of three-phase four-wires system, the accumulation as
follows:

S=S1+S2+S3=V1rms×I1rms+ V2rms×I2rms+ V3rms×I3rms

P=P1+P2+P3

392
Graphical Programming software SCControl

λ=P÷S= (P1+P2+P3) ÷ (V1rms×I1rms+ V2rms×I2rms+ V3rms×I3rm)

Q = S × (1 − λ2 ) = ((V 1rms × I1rms + V 2rms × I 2rms + V 3rms × I 3rms)2 − ( P1 + P 2 + P3)2)

E =P×t

EN =Q×t

8. Signal selection module

AVE_1IN3_SFLOAT

Brief Description

This module output the average of three signals from one and the same
signal headstream.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

PV 1 + PV 2 + PV 3
Output value: CPV =
3

Parameter Description

Parameter Data type Meaning

PV1 SFLOAT Input signal 1

PV2 SFLOAT Input signal 2

PV3 SFLOAT Input signal 3

393
Graphical Programming software SCControl

CPV SFLOAT Output

AVE_1IN5_SFLOAT

Brief Description

This module output the average of three signals from one and the same
signal headstream.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

PV 1 + PV 2 + PV 3 + PV 4 + PV 5
Output value: CPV =
5

Parameter Description

Parameter Data type Meaning

PV1 SFLOAT Input signal 1

PV2 SFLOAT Input signal 2

PV3 SFLOAT Input signal 3

PV4 SFLOAT Input signal 4

PV5 SFLOAT Input signal 5

CPV SFLOAT Output

394
Graphical Programming software SCControl

SEL_1IN3

Brief Description

Input three digital value signals, output signal keeps the same with the
more input digital signal, shown as follows:

The NO. of "ON" 0 1 2 3

The NO. of "OFF" 3 2 1 0

Output CPV OFF OFF ON ON

Representation

Symbol

OUT=SEL_1IN3 (PV1,PV2,PV3)

Parameter Description

Parameter Data type Meaning

PV1 BOOL Digital value input1

PV2 BOOL Digital value input2

PV3 BOOL Digital value input3

OUT BOOL Output

SEL_1IN3_SFLOAT

Brief Description

According to the position of select switch, select three of one signal assigns
to output, from the same signal headstream.

395
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SW=1, select signal 1 to output, CPV=PV1.

When SW=2, select signal 2 to output, CPV=PV2.

When SW=3, select signal 3 to output, CPV=PV3.

If SW unequal 1, 2, 3, then the module remains the status as it was last


time.

Parameter Description

Parameter Data type Meaning

PV1 SFLOAT Signal 1 of input

PV2 SFLOAT Signal 2 of input

PV3 SFLOAT Signal 3 of input

SW UNIT Signal select switch

CPV SFLOAT Output

SEL_1IN5

Brief Description

Input five digital value signals, output signal keeps the same with the more

396
Graphical Programming software SCControl

input digital signal, shown as follows:

The NO. of "ON" 0 1 2 3 4 5

The NO. of "OFF" 5 4 3 2 1 0

Output CPV OFF OFF OFF ON ON ON

Representation

Symbol

OUT=SEL_1IN5 (PV1, PV2, PV3, PV4, PV5)

Parameter Description

Parameter Data type Meaning

PV1 BOOL Digital value input1

PV2 BOOL Digital value input2

PV3 BOOL Digital value input3

PV4 BOOL Digital value input4

PV5 BOOL Digital value input5

OUT BOOL Output

SEL_1IN5_SFLOAT

Brief Description

According to the position of select switch, select five of one signal assigns
to output, from the same signal headstream.

397
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SW=1, select signal 1 to output, CPV=PV1.

When SW=2, select signal 2 to output, CPV=PV2.

When SW=3, select signal 3 to output, CPV=PV3.

When SW=4, select signal 2 to output, CPV=PV4.

When SW=5, select signal 3 to output, CPV=PV5.

If SW unequal 1, 2, 3, 4, 5, then the module remains the status as it was


last time.

Parameter Description

Parameter Data type Meaning

PV1 SFLOAT Signal 1 of input

PV2 SFLOAT Signal 2 of input

PV3 SFLOAT Signal 3 of input

PV4 SFLOAT Signal 4 of input

PV5 SFLOAT Signal 5 of input

SW UINT Signal select switch

CPV SFLOAT Output

398
Graphical Programming software SCControl

SEL_2IN3

Brief Description

This module has three logic input variable, output equals the most of input
type. If input has two or three ON, output equals ON, otherwise equals
OFF.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

First calculate the number of ON in three logic input, when the number of
ON greater than two, output ON, otherwise output OFF.

Parameter Description

Parameter Data type Meaning

IN1 BOOL Input 1

IN2 BOOL Input 2

IN3 BOOL Input

OUT BOOL Output

SEL_DUAL

Brief Description

399
Graphical Programming software SCControl

Gain two input signal from the same signal headstream by two different
pass, auto select a signal output by redundancy collocation.

EN and ENO can be set as additional parameters.

Representation

Symbol

Arithmetic

When SW=1, select input signal 1 to output, CPV=PV1.

When SW=2, select input signal 2 to output, CPV=PV2.

When SW=3, adjust the output according to input quality and variety, select
corresponding signal output:

(1) If two inputs are both bad points, that is their quality code is 0x0100 or
0x0800, then output remains the status as it was last time.

(2) If signal 1 is a bad point, signal 2 is a good point:

If signal 2 change rate don't exceed, select input signal 2 to output,


CPV=PV2.

If signal 2 change rate exceed, output remains the status as it was last
time.

(3) If signal 2 is a bad point, signal 1 is a good point:

If signal 1 change rate don't exceed, select input signal 1 to output,


CPV=PV1.

If signal 1 change rate exceed, output remains the status as it was last
time.

400
Graphical Programming software SCControl

(4) If two points are both good points:

If two points change rate are both exceeded, output remains the status
as it was last time.

If signal 2 change rate exceed, select input signal 1 to output,


CPV=PV1.

If signal 1 change rate exceed, select input signal 2 to output,


CPV=PV2.

If two points change rate are both don't exceeded, select input signal 1
to output, CPV=PV1.

Parameter Description

Parameter Data type Meaning

PV1 SFLOAT Inputted 1

PV2 SFLOAT Inputted 2

FLAGPV1 WORD Quality of inputted 1

FLAGPV2 WORD Quality of inputted 2

RATE SFLOAT Change rate limit

SW UINT Sign selection switch

CPV SFLOAT Output

9. Deal with floating-point module

F_DEADBND

Brief Description

This module setting a dead zone [-DB, +DB], deal with dead zone of input.

NOTE: The dead zone parameter DB always is positive number.

401
Graphical Programming software SCControl

Representation

Symbol

Arithmetic

When input IN is between the -DB and +DB, output OUT=0;

When input IN >= DB, output OUT = (IN-DB)*K1;

When input IN <= -DB, output OUT = (IN +DB)*K2;

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

DB FLOAT Dead zone

K1 FLOAT Increase proportional coefficient

K2 FLOAT Decrease proportional coefficient

OUT FLOAT Output

F_ERRALM

Brief Description

This module judged the warp of two input whether in upper-lower limit,
usually input IN2 is setting value, input IN1 need to compare with this
setting value. If there warp in upper-lower limit, output OFF, if there warp
exceeded upper-lower limit, output ON.

EN and ENO are set as additional parameters.

402
Graphical Programming software SCControl

NOTE: Input upper-lower limit warp are positive number, if you want to set
lower limit is -5, then only set LL=5.

Representation

Symbol

Arithmetic

When -LL<=IN1-IN2<=HL, OUT=OFF.

When IN1-IN2>HL or IN1-IN2<-LL, OUT=ON.

Parameter Description

Parameter Data type Meaning

IN1 FLOAT Input 1

IN2 FLOAT Input 2

HL FLOAT Upper limit (positive number)

LL FLOAT Lower limit (positive number)

OUT BOOL Alarm output

F_FXY

Brief Description

This module treatment insert value for two dimensions broken line table,
output the value after treatment insert value.

EN and ENO are set as additional parameters.

Representation

403
Graphical Programming software SCControl

Symbol

Arithmetic

When X <= X0, output Y =Y0.

When X >=X10, output Y=Y10.

When X between X0 and X10, first judged X in what section, When X


between X[i] and X[10],Output:

Y [i + 1] − Y [i ]
Y = Y [i ] + ∗ ( X − X [i ])
X [i + 1] − X [i ]

Parameter Description

Parameter Data type Meaning

TabNum INT Table's order No. [0,31]

X0~X10 FLOAT The setting value of X coordinate

Y0~Y10 FLOAT The setting value of Y coordinate

F_GET_FXY

Brief Description

This module used to get corresponding broken line table data of X and Y
coordinate, refer to broken line table setting module.

EN and ENO are set as additional parameters.

Representation

Symbol

404
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

TabNum INT Table's order No. [0,31]

X0~X10 FLOAT The setting value of X coordinate

Y0~Y10 FLOAT The setting value of Y coordinate

F_HLALM

Brief Description

The function of this module is judged whether input value between upper
limit and lower limit, when input value exceed upper limit, output = ON,
when input less than lower limit, output = OFF, when input between upper
limit and lower limit, output keeps the last status as last period.

EN and ENO are set as additional parameters.

NOTE: The upper limit can't be less then lower limit, otherwise this module
can't do any manage return immediacy.

Representation

Symbol

405
Graphical Programming software SCControl

Arithmetic

When IN>H, OUT=ON

When IN<L, OUT=OFF

When L<=IN<=H, OUT remains the status as it was last time.

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

H FLOAT Upper limit

L FLOAT Lower limit

OUT BOOL Output of alarm

F_INTEG

Brief Description

Output is the integral of input and go through limit transact with input. When
the output has exceeded the set high-low limit, it would be limited and
corresponding alarm sign would be set.

Representation

Symbol

406
Graphical Programming software SCControl

Arithmetic

When SET=ON, output Y=YSET, if Y>=MAX, YMAX=ON, otherwise


YMAX=OFF; if Y<=MIN, YMIN=ON, otherwise YMIN=OFF.

When SET=OFF, the value of output Y is the integral value of input X. The
unit for sampling time is 0.1 ms. Transfer function and discrete calculation
equals to Integration (no limit) module.

If Y>=MAX, then Y=MAX, YMAX=ON, otherwise the integral value


YMAX made by output Y to input X equals to OFF.

If Y< = MIN, then Y=MIN, YMIN=ON, otherwise the integral value


YMAX made by output Y to input X equals to OFF.

Parameter Description

Parameter Data type Meaning

SET BOOL SET

YSET FLOAT Setting value

X FLOAT Input

GAIN FLOAT Gain

MAX FLOAT High limit

MIN FLOAT Low limit

YMAX BOOL High limit alarm

YMIN BOOL Low limit alarm

Y FLOAT Output

F_LAG

Brief Description

The input signs would be dealt with 1st order lag and the unit for lag time

407
Graphical Programming software SCControl

LAG is based on 0.1S, that is, when the LAG=1, it means that the lag time
is 0.1 second.

Representation

Symbol

Arithmetic

When the set switch SET=ON, output Y=YSET.

When the set switch SET=OFF, the output Y is the 1st order lag output, lag
time unit is 0.1s.

The transfer function is:

GAIN
G(S ) =
1 + LAG × 3

That is:

Y (S ) GAIN
=
X ( S ) 1 + LAG × 3

After predigest:

Y ( S ) + LAG × S × Y ( S ) = GAIN × X ( S )

Predigest to time field and difference:

Y (k ) − Y (k − 1)
Y (k ) = LAG × = GAIN × X (k )
dt

Farther predigest:

GAIN × X (k ) − Y (k − 1)
Y (k ) = Y (k − 1) + × dt
dt + LAG

408
Graphical Programming software SCControl

X (k ) + X (k − 1)
X(k) get, in 2 programming, put up average value filter ;

The end formula is:

X (k ) + X (k − 1)
GAIN × − Y (k − 1)
Y (k ) = Y (k − 1) + 2 × dt
dt + LAG

The transfer function time field expression:

−t

Y = GAIN ∗ (1 − e LAG )

Answer curve as follows:

Parameter description

Parameter Data type Meaning

SET BOOL SET

YSET FLOAT Setting value

X FLOAT Input

GAIN FLOAT Gain

LAG FLOAT Lag time(0.1s)

Y FLOAT Output

F_LINECPS

Brief Description

Perform linearity compensation to input variable IN according to the


inputted proportion Kp and the offset DIS, bind the compensative result to

409
Graphical Programming software SCControl

the output.

Representation

Symbol

Formula

OUT=IN X Kp + DIS

Parameter Description

Parameter Data type Meaning

IN FLOAT Input variable

KP FLOAT Proportional coefficient

DIS FLOAT Offset

OUT FLOAT Output variable

F_SET_FXY

Brief Description

Float type broken line table are all two dimensions broken line table, divided
into ten sections, X and Y coordinate point have eleven, one control station
have thirty-two pieces at best, each piece distribute 128 bits, the first four
bits is broken line table type, then leave in 88 bits X and Y coordinate value
care, the rest are remain bits.

NOTE: Input table's order between 0 and 31, X coordinate point of input,
assign to X0~X10 from small to big. Y coordinate points don't have this
limit.

410
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

TabNum INT Table's order NO.[0, 31]

X0~X10 FLOAT Setting value of X order (from small to big in turn )

Y0~Y10 FLOAT Setting value of Y order

F_THOSEL

Brief Description

Select output mode and output quality according to work mode parameter
MD and input quality flagIN1 and flagIN2 of two inputs .If signal input quality
is ON that is bad points, if quality code is OFF that is good points.

Representation

Symbol

411
Graphical Programming software SCControl

Arithmetic

If work mode parameter MD equals 4, 5 or 6, then the value of output OUT


equals IN1, IN2 or IN3 correspondingly. If the quality of the corresponding
output point is bad, then output remains last period valuable and quality
alarm QO is logic 1.

If work mode parameter equals 0, 1, 2 and 3, then:

1. If MD = 0, output the mid of three input value.

2. If MD = 1, output the average of three input value.

3. If MD = 2, output the less value of three input value.

4. If MD = 3, output the biggish value of three input value.

Adjust the output according to input quality temporality:

1. If three inputs are all bad points, then output remains and quality alarm
Qo is logic 1;

2. If two points are bad points and the other is a good point, then select the
leave good point as output;

3. If only one point is bad, then according to other two good points select
output. If the warp of two good points can't exceeds DB ,then output the
average of two good points, otherwise then output remains last period
valuable and quality alarm QO is logic 1.

4. If three points are both good points, then select according to whether the
deviation between two inputs exceeds the setting value DB:

i. If the three both warps can't exceed DB, then the output according to
MD selection.

412
Graphical Programming software SCControl

ii. If only one warp exceeds DB, then output the mid of three input value.

iii. If two both warps exceed DB, then output the other one.

iv. If the three both warps exceed DB, then output remains last period
valuable and quality alarm QO is logic 1.

Quality output:

1. If IN1 is bad point, then the corresponding output quality Q1 is logic 1;


otherwise output quality Q1 is logic 0.

2. If IN2 is bad point, then the corresponding output quality Q2 is logic 1;


otherwise output quality Q2 is logic 0.

3. If IN3 is bad point, then the corresponding output quality Q3 is logic 1;


otherwise output quality Q3 is logic 0.

4. If has one bad point with IN1, IN2, IN3 ,then output quality QQ is logic 1;
otherwise output quality Q1 is logic 0.

5. If work mode parameter MD equals 4, 5 or 6, the corresponding input IN1,


IN2, IN3 are all bad points, output quality Q0 is logic 1.

Parameter Description

Parameter Data type Meaning

IN1,IN2,IN3 FLOAT Input

flagIN1,flagIN2,flagIN3 BOOL Quality of inputted data

MD INT Select output mode

DB FLOAT Upper limit of deviation

OUT FLOAT Output

Corresponding input of quality


Q1,Q2,Q3 BOOL
output

QQ BOOL Quality total alarm

QB BOOL Warp alarm

413
Graphical Programming software SCControl

QO BOOL Quality output

F_TWOSEL

Brief Description

Select output mode and output quality according to work mode parameter
MD and input quality flagIN1 and flagIN2 of two inputs. If signal input quality
is ON that is bad points, if quality code is OFF that is good points.

Representation

Symbol

Arithmetic

If work mode parameter MD equals 3 or 4, then the value of output OUT


equals IN1 or IN2 correspondingly. If the quality of the corresponding output
point is bad, then output remains last period valuable and quality alarm QO
is logic 1.

If work mode parameter equals 0, 1 and 2, then:

1. If MD=0, output the average of two input values.

2. If MD=1, output the less value of two input values.

3. If MD=2, output the biggish value of two input values.

Adjust the output according to input quality temporality:

1. If two inputs are both bad points, then output remains and quality
alarm Qo is logic 1;

414
Graphical Programming software SCControl

2. If one point is a bad point and the other is a good point, then select
the good point as output;

3. If two points are both good points, then select according to whether
the deviation between two inputs exceeds the setting value DB:

i. If the deviation exceeds the limit, then output remains and quality
alarm Qo is logic 1;

ii. If the deviation does not exceed the limit, then confirm output
according to the selection of work mode parameter MD.

Quality output:

1. If input points (IN1 and IN2) are bad points, then the corresponding
output quality (Q1 and Q2) is logic 1;

2. If two inputs are bad points, then quality total output QQ is logic 1.

Parameter Description

Parameter Data type Meaning

IN1 FLOAT Input1

IN2 FLOAT Input2

flagIN1 BOOL Quality of inputted 1

flagIN2 BOOL Quality of inputted 2

MD INT Select output mode

DB FLOAT Upper limit of deviation

OUT FLOAT Output

Q1 BOOL Quality output of IN1

Q2 BOOL Quality output of IN2

QQ BOOL Quality total alarm

QO BOOL Quality output

415
Graphical Programming software SCControl

F_UDLMT

Brief Description

This module selects different mode output by working. When work on


up-down working, the output value according to given speed put up
up-output or down-output, that by set command parameter DN and UP.

EN and ENO are set as additional parameters.

NOTE: Set upper limit must be greater than lower limit, otherwise this
module can't do any manage return immediacy.

Representation

Symbol

Arithmetic

When MD=ON is tracking, that OUT=IN.

When MD=OFF is up-down output, select up-output or down-output by set


command parameter DN and UP.

When DN=OFF, UP=ON, OUT=OUT+RATE, output increase by degrees


according to RATE, until upper limit.

When UP=OFF, DN=ON, OUT=OUT-RATE, output descending according


to RATE, until lower limit.

When UP=ON, DN=ON, that is error command, output alarm ALM=ON,


output remains last period valuable.

When UP=OFF, DN=OFF, output remains last period valuable, can't do


up-down operation.

416
Graphical Programming software SCControl

Aside, in spite of tracking or up-down output, go through limit transact with


output at last:

If OUT>=HL, output upper limit, OUT=HL.

If OUT<=LL, output lower limit, OUT=LL.

Parameter Description

Parameter Data type Meaning

IN FLOAT Input

UP BOOL Up instruction

DN BOOL Down instruction

MD BOOL Working

RATE FLOAT Velocity

HL FLOAT Upper limit

LL FLOAT Lower limit

OUT FLOAT Output

ALM BOOL Error command alarm output

F_VLM

Brief Description

This module selects step process or smooth process by switch MD.

Note:

When working on step process, T set step space time, unit is 0.1s.

When working on smooth process, T is the unit of speed, unit is 0.1s. For
example: if VUP=10, T=2, then increase speed is 5/s. T must be great then
0, otherwise this module can't do any manage include manual setting.

417
Graphical Programming software SCControl

T must be great then 0, otherwise this module can't do any manage return.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

When SET=ON, output Y=YSET, reset inner counter, before running


SET=OFF, YSET=0, put up initialization.

When SET=OFF:

(1) When MD=ON, output working on step process, T is the unit of speed,
unit is 0.1s. If input X increase by degrees, then Y increase by degrees one
time every other T times according to the speed of VUP, until equals to X. If
X decreases, then Y decreases one time every other T times according to
the speed of VUP, until equals to X.

(2) When MD=OFF, output working on smooth process, If X increase by


degrees, converts the speed of VUP into the speed of every control period,
output increase by degrees every period according to this value, until
equals to X. If X descending, converts the speed of VUP into the speed of
every control period, output descending every period according to this
value, until equals to X.

Parameter Description

Parameter Data type Meaning

SET BOOL SET

YSET FLOAT Setting value

418
Graphical Programming software SCControl

MD BOOL Working parameter

X FLOAT Input

VUP FLOAT Increase speed

UDN FLOAT Decrease speed

Step process: step time unit, unit is 0.1s. Smooth


T ULONG
process: speed unit, unit is 1s.

Y FLOAT Output

1.5.3 ATTACH MODULE DATABASE

1. Especially module

D_INVERSE_COUNT

Brief Description

The time of cumulate digital value raising and falling.

Representation

Symbol

Arithmetic

(1) When RST from 0 to 1, output AV=0.

(2) When SL=0, cumulate the time of IN from 0 to 1 with input port.

(3) When SL=1, cumulate the time of IN from 1 to 0 with input port.

(4) When SL=2, cumulate the time that IN changed (the time of raising + the
time of falling)

(5) When SL equals other value, the result same as when SL=0.

419
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IN BOOL Boolean variable to be monitored

RST BOOL Reset signal

SL UINT Stat. type

AV FLOAT cumulative value

D trigger

Brief Description

Used to take reverse action for output when input is raising.

Representation

Symbol

Arithmetic

(1) Note: D and R connect the same bit actually. Correspond a normal-open
button, after D=ON one second D=OFF.

(2) When D changes from OFF to ON, Q reverse action one time and
produces the duration of pulses is 1s.

Logic sketch map

420
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

D BOOL Input

Q BOOL Output

R BOOL Reset input

MOTOR_PULSE

Brief Description

It is used for two bit electric engine of pulse RUN and STOP command. The
pulse motor control function block produces a RUN pulse with a specified
pulse duration when input the RUN command and a STOP pulse with a
specified pulse duration when input the STOP command. Besides, the
function block will check the input state and determine the shutdown alarm.

Representation

Symbol

Arithmetic

421
Graphical Programming software SCControl

(1) NOTE: In practical use, the RUN switch (SW_RUN) and the reset RUN
switch (RST_SW_RUN) must be assigned with the same tag; the STOP
switch (SW_STOP) and the reset STOP switch (RST_SW_STOP) must be
assigned with the same tag.

(2) When DCS_CON = ON, and there is no RUN state signal (STATE_RUN
= OFF) or STOP output (STOP_OUT = OFF), if SW_RUN = ON, each of
the RUN output (RUN_OUT) and the reset RUN switch (RST_SW_RUN) is
a ON pulse with a pulse duration of PULSE_WIDTH ms. That is, as soon as
SW_RUN has a OFF to ON transition, RUN-OUT and RST_SW_RUN
output ON. PULSE_WIDTHms later, RUN_OUT and RST_SW_RUN output
OFF.

(3) When DCS_CON = ON, and there is no STOP state signal


(STATE_STOP = OFF) or RUN output (RUN_OUT = OFF), if SW_STOP =
ON, each of the STOP output (STOP_OUT) and the reset STOP switch
(RST_SW_STOP) is a ON pulse with a pulse duration of PULSE_WIDTH
ms. That is, as soon as SW_STOP has a OFF to ON transition, STOP-OUT
and RST_SW_STOP output ON. PULSE_WIDTHms later, STOP_OUT and
RST_SW_STOP output OFF.

(4) If there is no stop command (SW_STOP = OFF), the function output


shutdown alarm when STATE_RUN has a ON to OFF transition.

(5) If STATE_RUN has a OFF to ON transition, or STOP switch is turned on


(SW_STOP = ON), the shutdown alarm will be reset (ALARM = OFF).

Logic sketch map

422
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

SW_RUN BOOL Run switch

STATE_RUN BOOL Run state

SW_STOP BOOL Stop switch

STATE_STOP BOOL Stop switch

DCS_CON BOOL DCS control

Pulse duration or pulse width (based on


PULSE_WIDTH ULONG
1ms)

RUN_OUT BOOL RUN output signal

STOP_OUT BOOL STOP output signal

RST_SW_RUN BOOL RUN switch to be reset

RST_SW_STOP BOOL STOP switch to be reset

ALARM BOOL Shutdown alarm

423
Graphical Programming software SCControl

MPSETB

Brief Description

This function outputs value according to the range of input.

Representation

Symbol

Arithmetic

(1) If < | I1 | <= PB1, AV = PA1

(2) If PB1 < | I1 | <= PB2, AV = PA2

(3) If PB2 < | I1 | <=PB3, AV = PA3

(4) If PB3 < | I1 | <= PB4, AV = PA4

(5) If PB4 < | I1 | <= PB5, AV = PA5

(6) If PB5 < | I1 | <= PB6, AV = PA6

(7) If PB6 < | I1 | <= PB7, AV = PA7

(8) If | I1 | > PB7, AV = PA8

(9) NOTE: DO keep the restriction: 0<=PB1 < PB2 < PB3 < PB4 < PB5 <
PB6 < PB7, otherwise the function will not work.

Parameter Description

424
Graphical Programming software SCControl

Parameter Data type Meaning

I1 SFLOAT Input

AV SFLOAT Output

PA1~PA8 SFLOAT Optional value for output

PB1~ PB7 SFLOAT Input range for each output option

ONOFF_TIME_ACCUM

Brief Description

Accumulate the on and off status time of digital.

Representation

Symbol

Arithmetic

(1) When RB=0, AV output accumulate time when IN=0.

(2) When RB=1, AV output accumulate time when IN=1.

(3) When RST from 0 to 1, AV=0.

(4) When OF=0, the unit of AV is s.

(5) When OF=1, the unit of AV is min.

(6) When OF=2, the unit of AV is h.

(7) When of is other value, the unit of AV is s.

Parameter Description

425
Graphical Programming software SCControl

Parameter Data type Meaning

IN BOOL Boolean variable to be monitored

RST BOOL Reset signal

OF UINT Output time format

RB BOOL Accumulate status select

AV FLOAT Cumulative value

PULPOS

Brief Description

The pulse positioned (PULPOS) function code compares two analog input
signals (SV and FB) and produces output pulses that are proportional in
time duration to the difference between these two analog signals. The
deviation that is between two inputs is converted to a timed forward or
reverse Boolean output. There are provisions for specifying the error dead
band and the cycle time.

Representation

Symbol

Arithmetic

(1) The subtraction between SV and FB is called deviation signal (get


absolute value).

(2) If |SV - FB| <= DB, can't output any signals.

(3) If |SV - FB| > DB:

426
Graphical Programming software SCControl

a) If FB less than SV, there will be a forward output (FP=ON), to


determine the forward output pulse widths use the calculation:

If forward output pulse OFF time greater than period time (CT),
forward output pulse OFF time=CT.

b) If FB greater than SV, by an amount greater than the dead band,


there will be a reverse output (RP=ON), to determine the reverse output
pulse widths use the calculation:

If reverse output pulse OFF time greater than period time (CT),
reverse output pulse OFF time=CT.

Note: Forward and reverse output pulse durations are computed to the
nearest ten milliseconds with a 50-millisecond minimum duration for
controller modules and a ten-millisecond minimum duration for all other
modules.

(4) Forward stroke time FSR: when SV > FB and greater than the dead
band, then the forward output will be held high one second for every FSR.

(5) Reverse stroke time RSR: when SV< FB and greater than the dead
band, then the forward output will be held high one second for every RSR.

(6) Cycle time (CT) sets the time between calculations, or how often this
function is calculated. It delays the processing of the block.

Parameter Description

Parameter Data type Range Meaning

SV SFLOAT 0~1 set point signal

427
Graphical Programming software SCControl

FB SFLOAT 0~1 feedback signal

FSR SFLOAT 0~1 Forward stroke rate (s-1)

RSR SFLOAT 0~1 Reverse stroke rate (s-1)

DB SFLOAT 0~1 absolute dead band

CT ULONG 0~4294967295 Cycle time (secs)

FP BOOL ON, OFF Output value of timed raise (forward pulse)

RP BOOL ON, OFF Output value of timed lower (reverse pulse)

VALVE_PULSE_CTL

Brief Description

This pulse is used to output two bit electric valve. The pulse valve control
function block produces an OPEN pulse with a specified pulse duration
when input the OPEN command and a CLOSE pulse with a specified pulse
duration when input the CLOSE command. Besides, the function block will
check the feedback signals of open state and close state to determine
whether the valve failed or not.

Representation

Symbol

Arithmetic

(1) NOTE: In practical use, the OPEN switch (SW_OPEN) and the reset
OPEN switch (RST_SW_OPEN) must be assigned with the same tag; the
CLOSE switch (SW_CLOSE) and the reset CLOSE switch

428
Graphical Programming software SCControl

(RST_SW_CLOSE) must be assigned with the same tag.

(2) When DCS_CON = ON, and there is no OPEN state signal


(STATE_OPEN = OFF) or CLOSE output (CLOSE_OUT = OFF), if
SW_OPEN = ON, each of the OPEN output (OPEN_OUT) and the reset
OPEN switch (RST_SW_OPEN) is a ON pulse with a pulse duration of
PULSE_WIDTH ms. That is, as soon as SW_OPEN has a OFF to ON
transition, OPEN-OUT and RST_SW_OPEN output ON.
PULSE_WIDTHms later, OPEN_OUT and RST_SW_OPEN output OFF.

(3) When DCS_CON = ON, and there is no CLOSE state signal


( STATE_CLOSE = OFF) or OPEN output ( OPEN_OUT = OFF), if
SW_CLOSE = ON, each of the CLOSE output (CLOSE_OUT) and the
reset CLOSE switch (RST_SW_CLOSE) is a ON pulse with a pulse
duration of PULSE_WIDTH ms. That is, as soon as SW_CLOSE has a OFF
to ON transition, CLOSE-OUT and RST_SW_CLOSE output ON.
PULSE_WIDTHms later, CLOSE_OUT and RST_SW_CLOSE output OFF.

(4) If the duration from the risen edge of OPEN_OUT to the moment when
there is a feedback signal of open state (STATE_OPEN = ON) exceed the
specified stroke time (PRO_TIME), the function block considers that a
failure occurred and output a pulse with a duration of 15 seconds.

(5) If the duration from the risen edge of CLOSE_OUT to the moment
when there is a feedback signal of close state (STATE_CLOSE = ON)
exceed the specified stroke time (PRO_TIME), the function block considers
that a failure occurred and output a pulse with a duration of 15 seconds.

Logic sketch map

429
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

SW_OPEN BOOL Open switch

STATE_OPEN BOOL Open state

SW_CLOSE BOOL Close switch

STATE_CLOSE BOOL Close state

DCS_CON BOOL DCS control

Pulse duration or pulse width (based on


PULSE_WIDTH ULONG
1ms)

PRO_TIME ULONG Stroke time (based on 1ms)

OPEN_OUT BOOL OPEN output signal

CLOSE_OUT BOOL CLOSE output signal

RST_SW_OPEN BOOL OPEN switch to be reset

RST_SW_CLOSE BOOL CLOSE switch to be reset

FAIL BOOL Valve failure

430
Graphical Programming software SCControl

INVALID_TIME_SFLOAT

Brief Description

The function of this module is used to analyse AI quality yard that signal
produce, accumulate AI time reported to the alarm to happen.

Representation

Symbol

Parameter Description

Parameter Data type Meaning

RS BOOL When RS=ON, accumulating value zero clearing to time.

SW UINT AI module quality yard

When SW=0,export and regard second as the unit; when SW=1,


FLAG WORD export and regard assigning to as unit; when SW=2, export and
regard hour as the unit; other value are exported by second.

OUT FLOAT Accumulate time, output module

2. Boiler module

COAL_AND_WIND

Brief Description

COAL_AND_WIND is the special control module of catenulate furnace


control Coal and Wind, the amalgamation more engineering experience in
boiler industry of my company.

The controlling of giving coal is an important control object that ensures the

431
Graphical Programming software SCControl

boiler running safely, our company according to the boiler's burning


specialty and the factor affect steam press change, original creation the
project of giving coal controlling. This project 's kernel according to steam
press state and steam press change current, then set up expert rule
storeroom and fallow the expert rule storeroom by change current of load.

Fuel quantity assort with air quantity by supply air controlling, ensure the
fuel's economical. Combined with operational experience, setting
appropriate air-coal ratio, the output of blower equals the product of given
coal and air-coal ratio.

This function is used with special upper computer software of SUPCON


boiler control, this software manage special regular storeroom primarily,
also can control download, copy of special data and so on.

Representation

Symbol

432
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

BoilerNo UINT Control module serial, rang : 0~7

Cycle UINT Control period, Unit :s

TimerSNo UINT The second timer serial number that the module used

VapP SFLOAT Main steam press

PHH SFLOAT Very high limit of the main steam pressure

PHM SFLOAT High school limit of the main steam pressure

PHL SFLOAT Level limit of the main steam pressure

PLH SFLOAT Low high limit of the main steam pressure

PLM SFLOAT Low-mid limit of the main steam pressure

PLL SFLOAT Low low limit of the main steam pressure

Very high limit of changing amount of the main steam


PVHH SFLOAT
pressure + 0.5

High school limit of changing amount of the main steam


PVHM SFLOAT
pressure + 0.5

Level limit of changing amount of the main steam


PVHL SFLOAT
pressure + 0.5

Low high limit of changing amount of the main steam


PVLH SFLOAT
pressure + 0.5

The main steam pressure is low in changing amount to


PVLM SFLOAT
hit the limit + 0.5

Low low limit of changing amount of the main steam


PVLL SFLOAT
pressure + 0.5

CoalBscNo UINT Stoker control all BSC loop serial number

Stoker control whether adopt DCS control (ON: DCS


SwCoalDcsCon BOOL
control, OFF: manual)

Stoker control whether adopt expert control project (ON:


SwCoalExp BOOL
expert control)

433
Graphical Programming software SCControl

SwCoalSV BOOL Stoker control whether outer setting value

CoalESV SFLOAT Stoker outer setting value

CoalOA SFLOAT Stoker control of output compensate

CoalPV SFLOAT Stoker measure

CoalFeedback SFLOAT Stoker control valve position feedback

CoalMVHH SFLOAT Stoker control output upper limit

CoalMVLL SFLOAT Stoker control output lower limit

WindBscNo UINT Blower control all BSC loop serial number

Whether blower control adopt DCS control (ON: DCS


SwWindDcsCon BOOL
control, OFF: manual)

WindPV SFLOAT Blower valuable

WindFeedback SFLOAT Blower valve position feedback

WindCoalFF SFLOAT The coefficient air-coal ratio

WindMVHH SFLOAT Blower control upper limit of output

WindMVLL SFLOAT Blower control lower limit of output

3. Generate Gas module

CtoG_SC001_POINT

Brief Description

This module is the time point which is used to evaluate used in twelve camp
stoves.

EN and ENO are set as additional parameters.

Representation

Symbol

434
Graphical Programming software SCControl

Explanation:

(1) If (timers>0) timers_o = 0; //The timer bring second pulse

(2) t_point01_o = t_point01_o +1; //1# camp stove time point add by self

(3) If (t_point01_o>=cycle01) or (t_point_o<=0), t_point01_o initial value is


0, and add 1 by self from 0, until equals to cycle01, then add 1 by self from
0 over again.

(4) If t_point01_o between 0 and cycle01(if cycle01=120, then t_point01_o


= 60) , t_point01_o initial value set 60, and add 1 by self from 0, until
equals to cycle01, then add 1 by self from 0 over again.

(5) The evaluate method of t_point02_o~t_point12_o is the same as


t_point01_o.

Parameter Description (time unit: s)

Parameter Data type Meaning Explanation

The second timer, commend bit


timers UINT Second timer timers[10], select anyone when
can't collide with other program.

t_point01~t_point12 INT Time point of 1~12# camp stove

cycle_01~cycle12 INT Cycle period of 1~12# camp stove

435
Graphical Programming software SCControl

timers_o UINT Second timer

t_point01_o~t_point12_o INT Time point of 1~12# camp stove

CtoG_SC002_INERTGAS

Brief Description

Make lazy and rich oxygen gasification to switch over in gasification that
this module is used for controlling 12 stoves.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation:

(1) working01~working12 take the post as one when being ON, to


oldinertgas2 _ o puts ON and OFF separately and inertgas_o is put as ON
and OFF, inertgas_o can't be put directly value.

(2) working01~working12 take the post as one when being ON (While

436
Graphical Programming software SCControl

opening the stove , can't carry on gasification / make and switch over lazily),
then

oldinertgas1_o = oldinertgas1;

oldinertgas2_o = oldinertgas2;

inertgas_o = oldinertgas2_o;

(3) If working01~working12 take the post as one when being OFF (While
stopping the stove , can carry on gasification / make and switch over lazily),
then

inertgas_o = inertgas;

oldinertgas2_o = oldinertgas1_o;

oldinertgas1_o = inertgas_o;

(4) If inertgas is ON, then

gas_hy_ox01_o~gas_hy_ox12_o are OFF.

(5) If working01 is ON (While running, can't switch over rich oxygen


gasification), then gas_hy_ox01_o can't be switched over while keeping the
initial value.

(6) The relation having same between gas_hy_ox02_o~gas_hy_ox12_o


and working02~working12.

Parameter Description

Parameter Data type Meaning Explanation

inertgas BOOL Make lazy order

Making lazy order of the


oldinertgas1 BOOL
previous cycle

Making lazy order of last


oldinertgas2 BOOL
two cycles

gas_by_ox01~ga Stove rich oxygen


BOOL
s_by_ox12 gasification order No.

437
Graphical Programming software SCControl

1~12

working01~worki Stove working state sign


BOOL
ng12 No. 1~12

Location quote number as same as the


inertgas_o BOOL Make lazy order
first input pin

Making lazy order of the Location quote number as same as the


oldinertgas1_o BOOL
previous cycle second input pin

Making lazy order of last Location quote number as same as the


oldinertgas2_o BOOL
two cycles third input pin

Stove rich oxygen


gas_by_ox01_o~ Location quote number as same as the
BOOL gasification order No.
gas_by_ox12_o 4~15 input pin
1~12

CtoG_SC003_FANLOCK

Brief Description

This module used in judged air fan interlock of twelve camp stoves.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation:

438
Graphical Programming software SCControl

(1) If fan_failed01 and lock_valid01 both of ON, and if queue01=1, then


fan_lock01=ON.

(2) If fan_failed02 and lock_valid02 both of ON, and if queue01=2, then


fan_lock01=ON.

(3) If fan_failed03 and lock_valid03 both of ON, and if queue01=3, then


fan_lock01=ON.

(4) If fan_failed04 and lock_valid04 both of ON, and if queue01=4, then


fan_lock01=ON.

(5) If fan_failed05 and lock_valid05 both of ON, and if queue01=5, then


fan_lock01=ON.

(6) If fan_lock02~fan_lock12 the action rule as same as fan_lock01.

Parameter Description

Parameter Data type Meaning Explanation

queue01~queue12 INT 1~12#queue air fan number

lock_valid01~lock_valid12 BOOL 1~5#air fan interlock command ON is interlock

an_failed01~an_failed05 BOOL 1~5#air fan stop signal ON is failure

fan_lock01~fan_lock12 BOOL 1~12#air fan interlock sign

CtoG_SC101_PARAMETER

Brief Description

This module is used in parameter limit, amend and pass parameter,


manage original parameter.

EN and ENO are set as additional parameters.

Representation

Symbol

439
Graphical Programming software SCControl

Explanation:

(1) Adding nitrogen valve delay time has been limited,


*jdv_dalay=jdv_dalay, if jdv_dalay>5, then *jdv_dalay=5; if *jdv_dalay<0,
then *jdv_dalay=0.

(2) Avoid the overlap wind function: If gasification, allow serious wind
appear serious wind, is it preserves time, is it preserves time reduce to blow
off to dry (can increase), total cycle increase (can reduce), preserve time
parameter can increase or reduce while being other.

(3) Can't be smaller than to blow time tempxx01 for 10 seconds on


preserving, otherwise put for 10 seconds.

(4) Must be greater than to blow time tempxx03 for 8 seconds on


preserving two, otherwise put as 8 seconds.

(5) On add by nitrogen the valves not wanting early it fall on the 8 second,
namely tempxx00 (preserve not lasting time) tempxx05 (preserve on add it
nitrogen time) - jdv_dalay (preserve on add by the valves nitrogen not
opening not delaying time) 8 second such as Y, otherwise, tempxx05
(preserve on add by nitrogen time) =Tempxx00 (preserve and dry time) -
jdv_dalay (on add by the valves nitrogen not opening not delaying time) - 8
second.

(6) Tempxx06 (preserves and dries and retrieves time) is not greater than
tempxx00 (preserve and dry time), otherwise tempxx06 =Tempxx00, and

440
Graphical Programming software SCControl

tempxx06 is not smaller than zero, otherwise tempxx06 =0.

(7) Cycle revises and reports to the police, act as and export and preserve
cycle tempcycle_o Not equal to present cycle cycle_o hour, unlink = ON;
Otherwise unlink =OFF; When revising circulation cycle, provide the
warning suggestion.

(8) Make lazy parameter manage , when choosing to make lazily , and
adopt and making briefly lazily briefly, (dry ,retrieve , make lazily 3 stages to
leave spaces to put to blow to have to dry ) is it put empty time equal to
total cycle make a reduction of and dry to blow on preserving. Is it blow, two
have, blow off, is it add four of nitrogen preserve parameter it forces to be 0
to blow to have to make.

(9) As the condition of the stove is safe (include stopping the stove), the
parameter of time of preserving seven (tempxx00-tempxx06 ) is composed
to the real time parameter, preserve circulation cycle compose give present
cycle , is it blow off starting point is it give at present blowing off the starting
point to compose to preserve.

(10) Is it make lazy outside making lazy stage , taking place cycle greater
than 300 or lighter than 110 briefly to adopt, four basic time parameters are
smaller than equaling 0, the sum of the parameter of real time is not equal
to real cycle ,etc. at the time of the situation . Provide the illegal parameter
and report to the police, and compose the primitive parameter to the actual
parameter. For dry one second, is it blow one second , one last one
second , blow off one second, is it is it mean cycle deduct above-mentioned
parameter to blow to lay to have primitive parameter. Cycle equals cycle_ini,
number value is confirmed at the time of the configuration.

Parameter Description

Parameter Data type Meaning Explanation

Is it dry , have and blow , leave


and blow , two have , blow off ,
tempxx00~tempxx06 INT
is it add the nitrogen , retrieve
time to have put to preserve

441
Graphical Programming software SCControl

tempcycle INT Preserve circulation cycle

Preserve and blow off the


temp_point INT
starting point

Add the nitrogen valve and


jdv_dalay INT
delay time

Insert primitive cycle directly, such as


cycle_ini INT Circulation time initializing value
120

inertgas BOOL Make lazy order

If it is otherwise OFF not including


laying and blowing and putting empty
simp_inertgas BOOL Make lazy order briefly
stage to put for ON to make lazy
course.

If does not allow the heavy wind , put for


overlap_forbid BOOL Wind order that forbid heavily
ON, otherwise OFF.

The heavy weathercock will Need to be judged by the heavy wind


overlap BOOL
appears through other module

Condition safety sign of the


safe_now BOOL
stove

Dry , have and blow , leave and


blow , two have , blow off , add
realxx00~realxx06 INT
the nitrogen , retrieve time to
have to put to actually

cycle_o INT Actual circulation cycle

Blow off the starting point


zero_point INT
actually

Used for delaying time and carrying on


amplitude limiting in adding the nitrogen
Add the nitrogen valve and
jdv_dalay_o INT valve, generally fill in while quoting this
delay time
module for the first time. Quote location
number as same as the tenth pin.

Quote location number as same as the


tempcycle_o INT Preserve circulation cycle
eighth pin.

Preserve and blow off the Quote location number as same as the
temp_point_o INT
starting point ninth pin.

Is it dry , have and blow , leave


tempxx00_o~tempxx and blow , two have , blow off , Quote location number as same as the
INT
06_o is it add the nitrogen , retrieve 1~7 pin.
time to have put to preserve

442
Graphical Programming software SCControl

unlink BOOL Cycle inconsistent signs

illegal_para BOOL Illegal parameter sign

CtoG_SC102_STEPS

Brief Description

This module is used for changing at the stage while starting, stopping the
stove and normal circulation in advance in advance.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation

(1) offset_point (skew time)=time_point (time indicator) + cycle (actual


circulation cycle) - zero_point (Blow off time), offset_point can't be smaller
than cycle, otherwise offset_point= offset_point - cycle; offset_point can't
be smaller than zero, otherwise offset_point = 0.

(2) Routine gasification circulation, realize drying , having blowing, making


blowing, having, blowing off, having and add the nitrogen, retrieve, give and
blow such stages as the atmosphere ,etc. to switch over two times .

443
Graphical Programming software SCControl

(3) Is it run to operate to intensify, is it dry, is it put empty, is it put empty


blow to make realize, two set empty stage free switch over.

(4) Make lazy to is it run to operate, is it dry , retrieve , is it put empty , is it


put empty blow to make realize, two set empty stage free switch over.

(5) Rich oxygen gasification operating and running, realize the rich oxygen
switches over at operation stage.

(6) In advance it start, it start not doing not having two times at first in
advance or put empty two (make lazy or not when not intensifying) 10s, and
then according to is it is it change normal running over to line up to dry, rich
oxygen gasification turn on stove carry out rich oxygen start 10 seconds
first, is it park stove is it start , is it start preface in advance to carry out at
parking stove promptly in advance to carry out still in advance to operate
during starting in advance.

(7) Park and must be drying in advance greater then behind the 8s , park
safely , carry out and park the stove safely too during starting in advance,
rich oxygen park stove carry out rich oxygen park stove 10s first safely
when the gasification.

(8) Air blower is it is it is it two have to cut to interlock to park, routine


gasification among the course , receive air blower is it interlock at cutting 2
signaling of paying to park, switch over operation stage as interlocking two,
returned to normal after only the stove stopped promptly.

Parameter Description

Parameter Data type Meaning Explanation

Dry , have and blow , leave and blow ,


realxx00~realxx07 INT two have , blow off , add the nitrogen ,
retrieve time to have to put to actually

cycle INT Actual circulation cycle

zero_point INT Blow off

jdv_delay INT Add the nitrogen valve to delay

444
Graphical Programming software SCControl

time_point INT Time indicator

emgt_stop BOOL The order of the stove stop promptly

hold_N2_in BOOL Dry the order of retrieving

cut_N2_out BOOL Retrieve and put the empty order

heat_colect BOOL Send to blow the atmosphere order

fire_up BOOL Intensify the order

inertgas BOOL Make lazy order

If there is two or more to work at the


same time to intensify the order , make
lazy order , rich oxygen gasification
gas_by_ox BOOL Gasification order of rich oxygen order, will stop the stove
automatically , will carry out and start
in advance at first after returning to
normal.

gas_in_blow BOOL Retrieve the gasification order

Set up for ON, put emptily in 10


shangfang BOOL Have the order of putting in initial stage seconds before having blowing at the
time of routine gasification

to_tun BOOL Operation sign in advance

running_flag BOOL Operation sign

Two signs of having that the air blower


fan_ershang BOOL
is danced

step INT Operation stage

offset_point INT Skew indicator

chuifeng INT Skew dries the starting point

shangchui INT Blow the starting point on skew

Make and blow the starting point in


xiachui INT
skew

Have the starting point two times in


ershang INT
skew

chuijing INT Skew blows off the starting point

shangjia INT Add the nitrogen starting point on skew

445
Graphical Programming software SCControl

Skew dries and retrieves the starting


chuihui INT
point

procedure INT Stage of circulating of inside

time_set INT It sets for time at present

running_time INT Present running time

hole_N2_in_o BOOL Dry the order of retrieving

cut_N2_out_o BOOL Retrieve and put the empty order

fire_up_o BOOL Intensify the order

running_flag_o BOOL Operation sign

safe_now_o BOOL Condition safety sign of the stove

working BOOL Working state sign

add_N2_flag BOOL Add the nitrogen sign

The transition is in charge of the foot ,


esflag BOOL
does not need to join

The transition is in charge of the foot ,


start_point_o INT
does not need to join

The transition is in charge of the foot ,


start_flag_o BOOL
does not need to join

The transition is in charge of the foot ,


ox_stop_o BOOL
does not need to join

CtoG_SC103_OPERATION

Brief Description

This module is used for adding and controls burnt, puts the dust to control,
interlock.

EN and ENO are set as additional parameters.

Representation

Symbol

446
Graphical Programming software SCControl

Explanation

(1)Several kinds add the burnt mode to switch over differently. Hands add
and in charge of foot auto burnt through the 11th introduction
automatically_feed is switched over. Add the burnt mode and in charge of
foot feed through the 6th introduction automatically_mode is chosen. Add
the burnt mode to include automatically: Dry at the same time opening , is it
blow at the same time opening , is it is it open , open , add burnt 5 mode in
succession sequentially to blow to make to have, blow at the same time
opening , opening , adding burnt 3 moding in succession sequentially on
rich oxygen gasification can only select for use, take vibration give to add
burnt plane can only be selected for use and does not add the burnt mode
in succession non-automatically material machine.

(2) Operate the light to control. Operate the light to control: If the stove is
running, light and operate the light live. Stop the light to control in advance:
Is it park procedure in advance to enter , light scene the light park in
advance.

(3) Put the dust to interlock and control. Must park stove and lay dust is it
turns on stove to allow expiring at putting dust.

(4) Response to operating live. The stove can be started and stopped in

447
Graphical Programming software SCControl

advance at the scene. When push and starts two buttons in advance, parks
at the same time at the scene, the stove stop promptly to carry out.

(5) Interlock and respond. Illegal parameter and valve examine signal is it
park closely to cause , air blower chain way is it is it cut two to interlock to
choose as, see off and interlock and cut two signs of having at jumping the
bike in air blower.

Parameter Description

Parameter Data type Meaning Explanation

Direct and CtoG_SC102_STEPS judges


the 1st output of the module is in charge
step INT Operation stage
of foot step and link to each other at
stage

offset_point INT Skew indicator

chuifeng INT Skew dries the starting point

shangchui INT Blow the starting point on skew

Make and blow the starting point in


xiachui INT
skew

feed_mode INT Add the burnt mode selection

t_feeder INT Establish for material time

The coal case valve is offered


t_coalbox INT
definitely

Enter the stove valve and offer it


t_furnace INT
definitely

Reinforced frequency of the


feed_ratio INT
intermittence

auto_feed BOOL Add the burnt order automatically

hv11_feeder BOOL Hold the order for material hands

Coal case valve hands hold the


hv12_coalbox BOOL
order

Enter stove valve hands and hold


hv13_furnace BOOL
the order

448
Graphical Programming software SCControl

Add and count the zero clearing


count_clear BOOL
order burnt

The order of the stove stop


emg_stop BOOL
promptly

run_command BOOL Make the order of the stove

ash_imform BOOL Gray order under the notice

dcs_unload BOOL Gray order under DCS

The scene opened the order of the The order of the on-the-spot button is
to_run_signal BOOL
stove in advance measured

The order of the stove stops in The order of the on-the-spot button is
to_stop_signal BOOL
advance at the scene measured

Feedback the order greyly under The order of the on-the-spot button is
ash_signal BOOL
the scene measured

The air blower interlocks and If technological requirement air blower is


ershang_lock BOOL transfers to and has the it two have to rotate to interlock, set up
configuration order two times for ON, otherwise OFF

running_flag BOOL Operation sign

working BOOL Working state sign

illegal_para BOOL Illegal parameter sign

fan_lock BOOL The air blower interlocks the sign

The valve is examined to interlock


v_lock BOOL
the sign

ash_v_opened BOOL Sign that the gray door is opened Detect the state of gray door

status INT Make gray operation stage

Add burnt hands and hold the


feed_count INT
order

hv11_feeder_o BOOL Hold the order for material hands

Coal case valve hands hold the


hv12_coalbox_o BOOL
order

Enter stove valve hands and hold


hv13_furnace_o BOOL
the order

count_clear_o BOOL Add and count the zero clearing

449
Graphical Programming software SCControl

order burnt

The order of the stove stop


emg_stop_o BOOL
promptly

run_command_o BOOL Make the order of the stove

ash_imform_o BOOL Gray order under the notice

dcs_unload_o BOOL Gray order under DCS

The scene opened the order of the


to_run BOOL
stove in advance

running_flag_o BOOL Operation sign in advance

Two signs of having that the air


fan_ershang BOOL
blower is danced

Two signs of having that the air


illegal_unload BOOL
blower is danced

Make the dust electromagnetic


v10_ash_unload BOOL
valve signal

v11_feeder BOOL Give the material signal

v12_coalbox BOOL Coal case valve signal

v13_furnace BOOL Enter the valve signal of the stove

working_lamp BOOL Light signal of the working state

The state light signal of the stove


to_stop_lamp BOOL
stop in advance

The transition is in charge of the


reset_count INT
foot , does not need to join

The transition is in charge of the


bM2 BOOL
foot , does not need to join

The transition is in charge of the


bM3 BOOL
foot , does not need to join

CtoG_SC104_VALVEOUTPUT

Brief Description

This module is used for realizing exporting in the manual operation, valve

450
Graphical Programming software SCControl

location.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation

(1)Stage hands are held, if handle=ON, step_handle=ON, stage is it can


put for ON one by one to operate.

(2)The single valve hand is held, if handle=ON, step_handle=OFF, single


valve is it can put for ON one by one to operate.

(3)Hands hold the shielding, if is running automatically when being


automatic, then handle =OFF, step_handle =OFF.

(4)Valve location export, according to "intermittence coal build steam stove


valve location configuration form" to realize valve location signal export and
make up.

451
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning Explanation

Direct and CtoG_SC102 _STEPS


judges the 1st
step INT Operation stage
output of the module is in charge of foot
step and link to each other at stage

handle BOOL Manual operation order

step_handle BOOL Stage hands hold the order

h_chuifeng BOOL Dry hands and hold the order

Have and blow hands and hold


h_shangchui BOOL
the order

Make and blow hands and hold


h_xiachui BOOL
the order

Two is grasped and held the


h_ershang BOOL
order

Have and go all out to hold the


h_shangfang BOOL Namely have and blow and put emptily
order

Make and go all out to hold the


h_xiafang BOOL Namely leave and blow and put emptily
order

452
Graphical Programming software SCControl

Go all out to hold the order


h_qiangfang BOOL Namely it is empty to put by force
strongly

Hands of total valve of coal hold


hv01_meizong BOOL
the order

Chimney valve hands hold the


hv02_yancong BOOL
order

Hands hold the order to do


hv03_shangxing BOOL
(valve) from head to foot

Steam total valve hands and


hv04_zhengzong BOOL
hold the order

Hands hold the order to blow


hv05_shangchui BOOL
(the valve) up and down

Hands hold the order to blow


hv06_chuifengqi BOOL
the atmosphere (the valve)

On add there aren't nitrogen


hv07_shangjiadan BOOL
(valve)

Dry valve hands and hold the


hv08_chuifeng BOOL
order

Rich oxygen valve hands hold


hv09_fuyang BOOL
the order

h_step INT Operation exports at stage

handle_o BOOL Manual operation order

step_handle_o BOOL Stage hands hold the order

h_chuifeng_o BOOL Dry hands and hold the order

Have and blow hands and hold


h_shangchui_o BOOL
the order

Make and blow hands and hold


h_xiachui_o BOOL
the order

Two is grasped and held the


h_ershang_o BOOL
order

Have and go all out to hold the


h_shangfang_o BOOL
order

Make and go all out to hold the


h_xiafang_o BOOL
order

453
Graphical Programming software SCControl

Hands of total valve of coal hold


hv01_meizong_o BOOL
the order

Chimney valve hands hold the


hv02_yancong_o BOOL
order

Hands hold the order to do


hv03_shangxing_o BOOL
(valve) from head to foot

Steam total valve hands and


hv04_zhengzong_o BOOL
hold the order

Hands hold the order to blow


hv05_shangchui_o BOOL
(the valve) up and down

Hands hold the order to blow


hv06_chuifengqi_o BOOL
the atmosphere (the valve)

On add there aren't nitrogen


hv07_shangjiadan_o BOOL
(valve)

Dry valve hands and hold the


hv08_chuifeng_o BOOL
order

The valve signal of rich oxygen


hv09_fuyang_o BOOL
exports

The coal total valve signal


v01_meizong BOOL
exporting

The valve signal of the chimney


v02_yancong BOOL
exports

The signal exports to do (valve )


v03_shangxing BOOL
from head to foot

Steam the signal of the total


v04_zhengzong BOOL
valve to export

The signal exports to blow (the


v05_shangchui BOOL
valve ) up and down

Blow the signal of atmosphere


v06_chuifengqi BOOL
(the valve ) to export

CtoG_SC105_VALVECHECK

Brief Description

This module is used for comparing the valve location to export and
feedback, measure the valve location.

454
Graphical Programming software SCControl

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation

(1) The valve delay time V_delay limited of 20 seconds, if v_delay>20,


putting the value of v_delay is 20.

(2) If valid01=ON, do_valve01 and di_valve01 states are inconsistent, keep


time greater than equaling v_delay, then v_alarm01=ON, otherwise
v_alarm01=OFF.

(3) If lock_valid=ON, any one of v_alarm01, v_alarm02, v_alarm03,


v_alarm04 is ON, then v_lock=ON, otherwise v_lock=OFF.

Parameter Description

Parameter Data type Meaning Explanation

It is UINT to pay special attention to the


v_delay UINT The valve is examined to delay time
type of the data

The valve is examined to interlock


lock_valid BOOL
the order

Valve No. 1 is examined and


validxx01 BOOL
ordered

Valve No. 2 is examined and


validxx02 BOOL
ordered

455
Graphical Programming software SCControl

Valve No. 3 is examined and


validxx03 BOOL
ordered

Valve No. 4 is examined and


validxx04 BOOL
ordered

Output the signal in valve location


do_v01 BOOL
No. 1

Output the signal in valve location


do_v02 BOOL
No. 2

Output the signal in valve location


do_v03 BOOL
No. 3

Output the signal in valve location


do_v04 BOOL
No. 4

Valve location feedback signal No. The valve location is closed and
di_v01 BOOL
1 feedbacked for ON

Valve location feedback signal No. The valve location is closed and
di_v02 BOOL
2 feedbacked for ON

Valve location feedback signal No. The valve location is closed and
di_v03 BOOL
3 feedbacked for ON

Valve location feedback signal No. The valve location is closed and
di_v04 BOOL
4 feedbacked for ON

Used for examining and


delaying time to carry on amplitude
limiting to the valve, generally fill in while
v_delay_o UINT The valve is examined to delay time
quoting this module forth first time. It
quote location the number as same as
the first pin

The valve is examined to interlock


v_lock BOOL
the sign

Valve No. 1 is examined and


v_alarmxx01 BOOL
reported to the police

Valve No. 2 is examined and


v_alarmxx02 BOOL
reported to the police

Valve No. 3 is examined and


v_alarmxx03 BOOL
reported to the police

Valve No. 4 is examined and


v_alarmxx04 BOOL
reported to the police

4. DEH module

456
Graphical Programming software SCControl

SERVOCON

Brief Description

This module is used for driving the servo valve and controlling the
module FW346 card, it is mutual to realize the data between FW346 card
and top management card, a different one is that this module mainly issue
and show the servo control parameter of controlling the module of
the valve.

Notice:

1. envelope serial number and trough location serial number should be


appointed, then check corresponding card pieces of ID correct while
operating the module when using, if machine that input envelope serial
number and being location serial number not in accordance with
configuration, trough put location card pieces of type mismatch report to the
police (SLOTERR), so as not to destroy the data of one of other cards.

2. The corresponding connection between serial number of machine


envelopes and data transmit block, if data transmit block is 0# and 1#, that
corresponding serial number of machine envelopes is 0# ; if data transmit
block is 2# and 3#, that corresponding serial number of machine envelopes
is 1#, serial number of machine envelopes can't be equals to data transmit
block, be able to work error data.

EN and ENO are set as additional parameters.

Representation

Symbol

457
Graphical Programming software SCControl

Arithmetic

Similar to DEH test the speed and protect module over the speed limit,
module this to is it issue control parameter, FW346 of card is it buffer
district to write to write under the card top management to realize too, issue
data, top management of card buffer FW346 card district read , the middle
go on any treatment to datum studying in.

Parameter Description

Parameter Data type Meaning

RackNum UINT Serial number of machine envelopes

SlotNum UINT Serial number of trough location

ManSv UINT Valve location establishing value of DEH

Manzero UINT LVDT manual and adjust the null value

ManFull UINT LVDT full manual amplitude value

Defend the frequency value of the astringent shock signal of the


Freq UINT
card (confines to 255)

Defend the astringent amplitude (confines to 255 ) of shaking


Range UINT
the signal of the card

458
Graphical Programming software SCControl

StepRate UINT Manual step value

Time of rising of speed when the amplitude modulation of


SpeedTr UINT
returning to zero

SwCardAM BOOL The card automatic sign of hand (OFF: Automatic; ON: Manual)

Whether return to zero amplitude modulation start the location


AutoTune BOOL
automatically (OFF. Stop, ON: Start)

ManEn BOOL LVDT manual zero-full value enable (OFF: Disable, ON: Enable)

Defend the permission location of the astringent shock signal of


SkEn BOOL
the card (OFF: Unallowed , ON: Allow)

KP UINT Proportion parameter

TI UINT Total mark parameter

TD UINT Differential parameter

ISV UINT Interior setting value(SwSV=0)

ESV UINT Other setting value(SwSV =1)

TV UINT Export the following amount

IA UINT Input the compensating value

OA UINT Output the compensating value

ER UINT Warning value of the deviation

ML UINT Export the low limit

MH UINT Export the high limit

KV UINT Gain variably

Whether give switch definitely while being internal and external


SwSV BOOL
(OFF: Give it definitely inside, ON: Give definitely outside)

SwAM BOOL Hand automatic switch of PID (OFF: Manual, ON: Automatic)

Positive and negative function switch (OFF: Acting on , ON:


SwNeg BOOL
Reaction)

SwTV BOOL Export and follow the switch (OFF: Does not follow , ON: Follow)

PidWrEn BOOL Servo card PID value download permit (OFF: Not download,

459
Graphical Programming software SCControl

ON: Download)

LvdtHi UINT High selecting value of LVDT

ManuMv UINT The manual setting value location of DEH

LvdtZ UINT Shows LVDT zero location value

LvdtF UINT Shows LVDT full amplitude

MV UINT Valve location exporting value of DEH

Show the automatic state of hand (OFF: Manual state, ON:


CardAM BOOL
Automatic state)

LVDT is adjusted and finished automatically of zero


ZeroOk BOOL
location (OFF: Finish, ON: Immature)

Finish automatically and whole definitely in a piece of location of


FullOk BOOL
LVDT (OFF: Finish, ON: Immature)

Tuning BOOL Tuning flag (OFF: Non-sucessful or not start, ON: Starting)

ALM BOOL Card start flag (OFF: Not starting, ON: Starting)

LVDT1 and LVDT2 deviation report to the police greatly (OFF:


LvdtErr BOOL
Does not have, ON: Have)

LoopAlm BOOL Manual zero-full error (OFF: Right, ON: Fault)

Control setting value and export the fault alarm (OFF: Does not
SvOutAlm BOOL
have, ON: Have)

Whether it is a trouble of the hardware to export the return circuit


OutHardAlm BOOL
(OFF: Does not have, ON: Have)

Whether the LVDT1 input channel hardware is a trouble (OFF.


Lvdt1Alm BOOL
Does not have,ON: Have)

Whether the LVDT2 input channel hardware is a trouble (OFF.


Lvdt2Alm BOOL
Does not have,ON: Have)

The card is a type mismatch alarm (OFF: Match, ON:


SlotErr BOOL
Mismatch )

SPEEDTST

Brief Description

This module is used for driving the measurement of rotational speed of the

460
Graphical Programming software SCControl

steam turbine and protecting module FW345 over the speed limit, realizing
FW345 card and data conversion, through this module, top management
card can give FW345 card to issue the parameter, can observe FW345
card and give the data of a card of top management too.

Notice:

1. envelope serial number and trough location serial number should be


appointed, then check corresponding card pieces of ID correct while
operating the module when using, if the machine input envelopes the serial
number and serial number of trough location not in accordance with
configuration, put A type mismatch of location card reports to the police
(SLOTERR), so as not to destroy the data of one of other cards.

2. Measured fluted disc and teeth of input is limited under 255, if it is more
than 255, it is under send as 255.

3. The corresponding connection between serial number of machine


envelopes and data transmit block, if data transmit block is 0# and 1#, that
corresponding serial number of machine envelopes is 0# ; if data transmit
block is 2# and 3#, that corresponding serial number of machine envelopes
is 1#, serial number of machine envelopes can't equal to data transmit
block, be able to work error data.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

Module this is it deposit top management parameter that card issues in and
write with the buffering area to realize, then convey to FW345 card, buffer

461
Graphical Programming software SCControl

from studying in the district and read the data that FW345 card pass to the
top management card, the middle carry on treatment any to data, and
Model SFLOAT data of two bytes regard as UINT is it punish to come in
module this, need to transform it well in advance.

103% alarm signals of compressor stages: When compressor stages actual


rotational speed exceeded rated rotational speed 103%, output alarm
signal. This signal is relay output. Currently, compressor stages rated
rotational speed is 3000r/min. 103% rotational speed is 3090r/min.

110% alarm signals of compressor stages: When compressor stages actual


rotational speed exceeded rated rotational speed 110%, output alarm
signal. This signal is relay output. Currently, compressor stages rated
rotational speed is 3000r/min. 110% rotational speed is 3300r/min.

The card is a type mismatch alarm SLOTERR: When the machine input
envelopes the serial number and serial number of trough location not in
accordance with configuration, SLOTERR=ON, the module return
immediacy, can't issue and receive data ,remains the status as it was last
time.

The sign of communication error COMERR: When detected the status


information is 0xFF of the card given, the communication of card is error, if
communication error continuous 10s, then COMERR=ON.

Parameter Description

Parameter Data type Meaning

RACK UNIT Serial number of machine envelopes [0,7]

SLOT UNIT Serial number of trough location [0,15]

The ones that input test the speed the tooth of one of tooth is
TNUM UNIT
counted

OPC exercises restraint in forbid the signal (OFF: Allow 103


OPCLMT BOOL
signal , ON: Forbid 103 signal)

OPC protects the signal of forbidden (OFF: Allow 110 action , ON:
OPCPRT BOOL
Forbid 110 action )

462
Graphical Programming software SCControl

Whether machinery is tested over the speed limit (OFF:


OVSPEED BOOL
Un-allowed ,ON: Allow)

OILSLIP BOOL Signal that the oil switch trips (OFF: Allow, ON: Forbidden )

SPEED UINT Rotational speed

Whether the channel is out of order to test the speed (OFF: Does
FAIL BOOL
not have, ON: Have)

ALM103 BOOL 103% alarm output (OFF: Does not have, ON: Have)

ALM110 BOOL 110% alarm output (OFF: Does not have, ON: Have)

STOP BOOL Park promptly (OFF: Does not have, ON: Have)

SLOTERR BOOL The card is a type mismatch alarm (OFF: Match, ON: Mismatch)

The sign communication error (OFF: No error, ON:


COMERR BOOL
Communication error )

5. Intelligent gateway block module

END_IMG_CFG

Brief Description

This module should be called when finishing a configuration, finishing


configuration allocation and put it at the end of a program.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation

Set INVALID pin is arbitrary of BYTE, this module is activation.

Parameter Description

463
Graphical Programming software SCControl

Parameter Data type Meaning

INVALID BYTE Enabled module

HOSTLINK_IMG

Brief Description

This module calls HostLink protocol, realizing mapped relation between


intelligent I/O point of ModBus and custom variable, realizing the control
action of intelligent equipment.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation

This module describes a communication command used HOSTLINK


agreement, set up mapped relation between data in PLC and custom bits in
DCS. Read-write operation of PLC changed to read-write custom data of
DCS. Each operational order in PLC is it define one agreement module set
up with self-defining location No. shining upon to need, they distinguish with
different IMGID number. The system offers 1000 to shine upon and operate
at most, namely the total of module of different agreements does not
exceed 1000 at most in the system.

The order is divided into the following several: Read and write IR register

464
Graphical Programming software SCControl

(preserve the contact coil state), read and write HR register (keep the
register, deposit configuration when cutting out), is it write LR register
(connects the register, spend to read Come to preserve with the operational
order at the time of other PLC communication), read AR register (auxiliary
register, preserve the historical mistake to write down, date, the key word of
the terminal mode), read TC state, read and write with DM area , reads the
mistake, read and write TC data, put strongly , cancel and put strongly.

IMGID: Shine upon number, 0-1000 wanton to choose, repeat all right.

COMID: serial port number is the channel number used now.

DATATYPE: The type of the data, refer the following list

ADDR: PLC address.

CHANEL: I/O channel for the initial trough number that is operated, it is a
start address to read and writing the inner register.

NUM: Count for the troughs operated in succession while clicking I/O (from
initial trough), the address in order to be operated in succession is counted
to read while writing the inside register.

BITNO: Set 0 as at ordinary times, in strong to put order use, is it needed


strong to put which I/O order to show only.

SCLBYTES: Show and operate the target that the number of self-defining
location is byte, 1 byte, 2 bytes, 4 bytes and 8 bytes.

TAGID: Define location number.

WR: read or write the order, 1 means read, 128 means write.

CYCLE: Sampling cycle, regard ms as the unit, written operation is invalid.


FW248 communicate with device every CYCLE, the value is insignificant
for the written operation, because the written operation will be taken at once
if corresponding user-defined variable or tag change, that is operation
priority, and written operation is only carried once unless user-defined tag
data changes again.

465
Graphical Programming software SCControl

Module command number list called by HostLink protocol:

DATATYPE Order type

1 IR

2 HR

3 AR

4 LR

5 TCStaus

6 DM

7 ERROR

8 STATUS

9 TCValue

10 FORCEDCANCEL

128 DATATYPE FORCEDSET

192 DATATYPE FORCEDRESET

Notice: when configuring, it is better to not do reading DATA and reading


and writing IR, reading LR and AR, reading HR and TCStatus at the same
time.

Parameter Description

Parameter Data type Meaning

IMGID WORD Set mapped number

COMID BYTE Set serial port

DATATYPE BYTE Set data type

ADDR BYTE The intellectual equipment address is set up

CHANEL WORD The starting point is set up

NUM BYTE Operate and count setting up

BITNO BYTE Use while setting up by force

466
Graphical Programming software SCControl

SCLBYTES BYTE The type of number of self-defining location is set up

TAGID WORD The number of self-defining location is set up

WR BYTE Read or write the order to set up

CYCLE WORD Set sample period

MODBUS_IMG

Brief Description

This module calls ModBus protocol, realizing mapped relation between


intelligent I/O point of ModBus and custom variable, realizing the control
action of intelligent equipment.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation

The command can be divided as follows: read-write digital, read-write


analog.

The input parameter explanation of SCControl module as follows:

IMGID: mapped sign, select from 0 to 1000, can't repeat.

COMID: serial port, the number of channel.

467
Graphical Programming software SCControl

DATATYPE: data type, 1 is coil, 2 is status, 3 is input register, 4 is


remaining register.

ADDR: PLC address.

CHANEL: the initiative point of operation, decide by configuration in


intelligent equipment.

NUM: It is points operated in succession while clicking I/O (from starting


point).

SCLBYTES: Show and operate the target that the number of self-defined
location is byte, 1byte, 2bytes, 4 bytes and 8 bytes.

TAGID: Define location number.

WR: read or write command, 1 means read, 128 means written.

CYCLE: Sampling cycle, regard ms as the unit, written operation is invalid.


FW248 communicate with device every CYCLE, the value is insignificant
for the written operation, because the written operation will be taken at once
if corresponding user-defined variable or tag change, that is operation
priority, and written operation is only carried once unless user-defined tag
data changes again.

Parameter Description

Parameter Data type Meaning

IMGID WORD Set mapped number

COMID BYTE Set serial port

DATATYPE BYTE Set data type

ADDR BYTE The intellectual equipment address is set up

CHANEL WORD The starting point is set up

NUM BYTE Operate and count setting up

SCLBYTES BYTE The type of number of self-defining location is set up

468
Graphical Programming software SCControl

TAGID WORD The number of self-defining location is set up

WR BYTE Read or write the order to set up

CYCLE WORD Set sample period

SETCOM

Brief Description

Set different serial port parameter with different agreement, so set serial
port parameter before transfer agreement module.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

COMID is 1~6, meaning the one of the six serial ports; BAUD is baud rate,
set by requires; DATALEN is data length, unit is bit, can set is 5, 6, 7, 8;
STOPLEN is stop bit with the unit is bit, can set is 1 and 2; VERIFY is verify
mode, 0 is non-verify, 1 is even, 2 is odd, 3 is set 0 verify, 4 is set 1 verify.

Parameter Description

Parameter Data type Meaning

COMID BYTE Set serial port

BAUD DWORD Set baud rate

DATALEN BYTE Set data length

469
Graphical Programming software SCControl

STOPLEN BYTE Set stop bit

VERIFY BYTE Set verify modes

START_IMG_CFG

Brief Description

This module is used to initialize before starting or compiling configuration, it


should be put at the beginning of program.

EN and ENO are set as additional parameters.

Representation

Symbol

Arithmetic

Set INVALID pin is arbitrary of BYTE, this module is activation.

Parameter Description

Parameter Data type Meaning

INVALID BYTE Enabled module

SUPCON_DCS

Brief Description

This module is used to set cards as following machine model for intelligent
devices, monitoring intelligent device command and responding to it.

EN and ENO are set as additional parameters.

470
Graphical Programming software SCControl

Representation

Symbol

Explanation

This is MODBUS following machine agreement, network as intercept


following machine outside equipment take place come over read and
writing the order constantly outpost of the tax office, and according to
commands to send out the necessary data. Conjunction communicates
operation with control station, network also can respond outside device to
read and write other control stations’ data commands of SCNET II. Network
is also as an interface of DCS system and outside devices.

MODBUS data frame head form of SUPCON _ DCS module:

Function
Address Start Address Hi Start Address Lo Quantity Hi Quantity Lo
code

8 bits 8 bits 8 bits 8 bits 8 bits 8 bits

Function code supported by SUPCON_DCS module:

Function code of MODBUS data frame Type of the data in DCS

0x01 DO Location number data

0x02 DI Location number data

0x03 AO Location number data

0x04 AI Location number data

0x05 Force and set up DO

0x06 Force and set up AO

0x0f Force and set up a lot of DO

0x10 Force and set up a lot of AO

0x20(Expand the order) Read number of custom location of 1 byte

471
Graphical Programming software SCControl

0x21(Expand the order) Read number of custom location of 2 bytes

0x22(Expand the order) Read number of custom location of 4 bytes

0x23(Expand the order) Write number of custom location of 1 byte

0x24(Expand the order) Write number of custom location of 2 bytes

0x25(Expand the order) Write number of custom location of 4 bytes

Parameter Description

Parameter Data type Meaning

IMGID WORD Set up the number of shining upon

IMGID WORD Set up one bunch of slogans

UPDATE_READ

Brief Description

This module is used to read data timelessly to update module.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation:

All operation of read the data from intelligent equipment that is according to
sample CYCLE, if it can't achieve scheduled cycle, and it will not give read
order to equipment. However, if this function block is executed, it is not
limited by sample and the operation will be done at once. After this
operation, the appointed mapping worked according to connatural sample
cycle, unless executing this UPDATE_READ function block again.

472
Graphical Programming software SCControl

Parameter Description

Parameter Data type Meaning

IMGID WORD Set mapped number

UPDATE_WRITE

Brief Description

This module is used to write data timelessly to update module.

EN and ENO are set as additional parameters.

Representation

Symbol

Explanation:

The normal write operation spring by instance of data changed, if the data
write to intelligent equipment are not changed that can't spring this
operation. Execute UPDATE_WRITE function block, then put up write
operation of IMGID appoint unconditionally. After the written operation, the
next operation will be executed after detecting the update data only, unless
executing this UPDATE_WRITE function block again.

Parameter Description

Parameter Data type Meaning

IMGID WORD Set mapped number

473

You might also like