SEBOL Instruction Manual

October 25, 2017 | Author: Nahusha Kulkarni | Category: Data Type, Array Data Type, Variable (Computer Science), Subroutine, Array Data Structure
Share Embed Donate


Short Description

A comprehensive guide to SEBOL software. Includes all codes and syntaxes to be an awesome SEBOL programmer. You could us...

Description

SEBOL Reference

IM 33K03K10-50E

IM 33K03K10-50E 3rd Edition

i

Introduction This document is the reference manual for SEBOL. SEBOL(SEquence and Batch Oriented Language) is a programming language designed for sequential control. A SEBOL program can be created and edited on the SEBOL editing windows of Function Block Details Builder, SFC Sequence Builder and SEBOL User’s Function Builder. In the document, SEBOL syntaxes, functions, error codes and all the SEBOL details for creating SEBOL programs are explained.

Media No. IM 33K03K10-50E (DVD) 3rd Edition : Jun. 2013 (YK) All Rights Reserved Copyright © 2011 , Yokogawa Electric Corporation

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

ii

CENTUM VP Document Map Installation CENTUM VP Installation IM 33K01C10-50E

License Management IM 33K01C20-50E

CENTUM VP Security Guide IM 33K01C30-50E

Field Control Stations Reference

Function Blocks Overview

Function Blocks Reference Vol.1

Function Blocks Reference Vol.2

IM 33K03E10-50E

IM 33K03E21-50E

IM 33K03E22-50E

IM 33K03E23-50E

Function Blocks Reference Vol. 3

Human Interface Stations Reference Vol. 1

Human Interface Stations Reference Vol. 2

Engineering Reference Vol. 1

IM 33K03E24-50E

IM 33K03F21-50E

IM 33K03F22-50E

IM 33K03G21-50E

Engineering Reference Vol. 2

Engineering Reference Vol. 3

Batch Management System Reference

IM 33K03G22-50E

IM 33K03G23-50E

Consolidated Alarm Management Software Reference IM 33K03H20-50E

SEBOL Reference

Communication with Subsystems Using RIO

Communication with Subsystems Using FIO

Communication Devices Reference

IM 33K03K10-50E

IM 33K03L10-50E

IM 33K03L20-50E

IM 33K03M10-50E

Optional Functions Reference

Communication with PROFIBUS Systems

Compliance with FDA: 21CFR Part 11

Generic Subsystem Gateway Reference

IM 33K03N10-50E

IM 33K03P10-50E

IM 33K03Q10-50E

IM 33K03R10-50E

System Integration OPC Station Reference

Unified Gateway Station Reference

Vnet/IP

Engineering Test Guide

IM 33K03R20-50E

IM 33K03R30-50E

IM 33K10A10-50E

IM 33K10H20-50E

Engineering Tutorial

APCS

CENTUM Data Access Library

FOUNDATION fieldbus Reference

IM 33K02E10-50E

IM 33K15U10-50E

IM 33K15P10-50E

IM 33K20T10-50E

Engineering

IM 33K03J10-50E

FOUNDATION fieldbus Engineering Guide IM 33K20T20-50E

Operation and Monitoring HIS Operation

Operating Messages

IM 33K02D10-50E

IM 33K02D20-50E

Hardware Peripherals

Field Control Stations

Input & Output Modules

Turbomachinery I/O Modules

IM 33K50C10-50E

IM 33K50E40-50E

IM 33K50G10-50E

IM 33K10U10-50E

Communication Devices

Migrated-FCS(FIO)

IM 33K50D10-50E

IM 33K55W10-50E

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

iii

Safety Precautions for Use n Safety, Protection, and Modification of the Product •

To protect the system controlled by the Product and the Product itself and to ensure safe operation, please observe the safety precautions described in this Manual. Yokogawa Electric Corporation ("YOKOGAWA") assumes no liability for safety if users fail to observe the safety precautions and instructions when operating the Product.



If the Product is used in a manner not specified in the User's Manuals, the protection provided by the Product may be impaired.



If any protection or safety circuit is required for the system controlled by the Product or for the Product itself, please install it externally.



Use only spare parts that are approved by YOKOGAWA when replacing parts or consumables of the Product.



Do not use the Product and its accessories such as power cords on devices that are not approved by YOKOGAWA. Do not use the Product and its accessories for any purpose other than as intended by YOKOGAWA.



Modification of the Product is strictly prohibited.



The following symbols are used in the Product and User's Manuals to indicate the accompanying safety precautions: Indicates that caution is required for operation. This symbol is labeled on the Product to refer the user to the User's Manuals for necessary actions or behaviors in order to protect the operator and the equipment. In the User's Manuals, you will find the precautions necessary to prevent physical injury or death, which may be caused by accidents, such as electrical shocks resulting from operational mistakes. Identifies a protective grounding terminal. Before using the Product, ground the terminal. Identifies a functional grounding terminal. Before using the Product, ground the terminal. Indicates an AC supply. Indicates a DC supply. Indicates the ON position of a power on/off switch. Indicates the OFF position of a power on/off switch.

n Notes on Handling User's Manuals •

Hand over the User's Manuals to your end users so that they can keep the User's Manuals on hand for convenient reference.



Thoroughly read and understand the information in the User's Manuals before using the Product.



For the avoidance of doubt, the purpose of the User's Manuals is not to warrant that the Product is suitable for any particular purpose but to describe the functional details of the Product.



Contents of the User's Manuals are subject to change without notice.



Every effort has been made in the preparation of the User's Manuals to ensure the accuracy of their contents. However, should you have any questions or find any errors, contact

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

iv us or your local distributor. The User's Manuals with incorrectly ordered pages or missing pages will be replaced.

n Warning and Disclaimer •

Except as specified in the warranty terms, YOKOGAWA shall not provide any warranty for the Product.



YOKOGAWA shall not be liable for any indirect or consequential loss incurred by either using or not being able to use the Product.

n Notes on Software •

YOKOGAWA makes no warranties, either expressed or implied, with respect to the Software Product's merchantability or suitability for any particular purpose, except as specified in the warranty terms.



Please purchase the appropriate number of licenses of the Software Product according to the number of computers to be used.



No copy of the Software Product may be made for any purpose other than backup; otherwise, it is deemed as an infringement of YOKOGAWA's Intellectual Property rights.



Keep the software medium of the Software Product in a safe place.



No reverse engineering, reverse compiling, reverse assembling, or converting the Software Product to human-readable format may be performed for the Software Product.



No part of the Software Product may be transferred, converted, or sublet for use by any third-party, without prior written consent from YOKOGAWA.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

v

Documentation Conventions n Symbol Marks The following symbols are used throughout the User's Manuals. Identifies instructions that must be observed to avoid physical injury, electric shock, or death. Identifies instructions that must be observed to prevent damages to the software or hardware, or system failures of the Product. Identifies important information required to understand operations or functions. Identifies additional information.

Identifies referenced content. In the online manuals, clicking on the reference link shown in green displays the referenced content. This action does not apply to the reference link shown in black.

n Typographical Conventions The following typographical conventions are used throughout the User's Manuals.

Commonly Used Conventions throughout the User's Manuals

l •

Character string to be entered The characters that must be entered are shown in monospace font as follows: Example: FIC100.SV=50.0



▼ Mark This symbol indicates the description for an item for which you should make a setting in the product's engineering window. While operating an engineering window, the help information for the selected item can be accessed from "Builder Definition Items" in the Help menu. Listing more than one definition item after this symbol implies that the paragraph on the page describes more than one definition items. Example: ▼ Tag Name, Station Name



Δ Mark Indicates that a space must be entered between character strings. Example: .ALΔPIC010Δ-SC



Character string enclosed by braces { } Indicates character strings that may be omitted. Example: .PRΔTAG{Δ.sheet name}

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

vi Conventions Used to Show Key or Button Operations

l •

Characters enclosed by brackets [ ] When characters are enclosed by brackets in the description of a key or button operation, it indicates a key on the keyboard, a key on the operation keyboard, a button name in a window, or an item in a list box displayed in a window. Example: To alter the function, press the [ESC] key.

Conventions Used in Command Syntax or Program Statements

l

The following conventions are used within a command syntax or program statement format: •

Characters enclosed by angle brackets < > Indicate character strings that user can specify freely according to certain guidelines. Example: #define



"..." Mark Indicates previous command or argument that may be repeated. Example: Imax (arg1, arg2, ...)



Characters enclosed by brackets [ ] Indicate character strings that may be omitted. Example: sysalarm [, …]



Characters enclosed by separators | | Indicates character strings that can be selected from more than one option. Example: opeguide [, ...] OG,

n Drawing Conventions Drawings used in the User's Manuals may be partially emphasized or simplified for convenience of description, so that the unnecessary parts are omitted from the drawings. Drawings of the window may be slightly different from the actual screen shots with different settings or fonts; the difference is not extended to the range that may hamper the understanding of basic functionalities and operation and monitoring tasks.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

vii

Copyright and Trademark Notices n All Rights Reserved The copyright of the programs and online manuals contained in the software medium of the Software Product shall remain in YOKOGAWA. You are allowed to print the required pages of the online manuals for the purposes of using or operating the Product; however, reprinting or reproducing the entire document is strictly prohibited by the Copyright Law. Except as stated above, no part of the online manuals may be reproduced, transferred, sold, or distributed to a third party in any manner (either in electronic or written form including, without limitation, in the forms of paper documents, electronic media, and transmission via the network). Nor it may be registered or recorded in the media such as films without permission.

n Trademark Acknowledgements •

CENTUM, ProSafe, Vnet/IP, PRM, Exaopc, and STARDOM are registered trademarks of YOKOGAWA.



Microsoft, Windows, Windows Vista, Windows Server, Visual Basic, Visual C++, and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries.



Adobe, Acrobat, and Adobe Reader are registered trademarks of Adobe Systems Incorporated.



Ethernet is a registered trademark of Xerox Corporation.



EtherNet/IP is a trademark of the Open DeviceNet Vendor Association (ODVA).



in

fieldbus is a registered trademark of Fieldbus Foundation.



HART is a registered trademark of the HART Communication Foundation.



Java is a registered trademark of Oracle Corporation.



MELSEC is a registered trademark of Mitsubishi Electric Corporation.



Memocon-SC is a registered trademark of Yaskawa Electric Corporation.



Modicon and Modbus are registered trademarks of Schneider Electric SA.



PLC is a registered trademark of Rockwell Automation, Inc.



PROFIBUS is a registered trademark of the PROFIBUS User Organization.



SIEMENS and SIMATIC are registered trademarks of Siemens Industrial Automation Ltd.



SmartPlant is a registered trademark of Intergraph Corporation.



SYSMAC is a registered trademark of OMRON Corporation.



All other company and product names mentioned in the User's Manuals are trademarks or registered trademarks of their respective companies.



We do not use TM or ® mark to indicate those trademarks or registered trademarks in the User's Manuals.



We do not use logos in the User's Manuals.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Blank Page

Toc-1

SEBOL Reference IM 33K03K10-50E 3rd Edition

CONTENTS 1.

2.

3.

4.

5.

Basics of SEBOL.................................................................................. 1-1 1.1

Program Units of SEBOL............................................................................. 1-2

1.2

Identifiers of SEBOL.....................................................................................1-3

1.3

Rules for SEBOL Programming.................................................................. 1-4

1.4

Data Types Available in SEBOL...................................................................1-5

1.5

Constants Available in SEBOL.................................................................... 1-7

1.6

Variables Available in SEBOL......................................................................1-9

1.7

Implicit Declarations of Variables..............................................................1-11

1.8

Substitution of Character String............................................................... 1-13

1.9

Include File.................................................................................................. 1-15

1.10

Syntax of Expressions............................................................................... 1-22

Operators and Expressions.................................................................2-1 2.1

Arithmetic Operators....................................................................................2-3

2.2

Comparison Operators.................................................................................2-5

2.3

Logical Operators......................................................................................... 2-6

2.4

Bitwise Operators......................................................................................... 2-7

2.5

Character-String Operands..........................................................................2-9

2.6

Operation Priority....................................................................................... 2-10

2.7

Conversion of Operands............................................................................2-12

2.8

Assignment Statement...............................................................................2-14

Local Variables..................................................................................... 3-1 3.1

Declaring and Referencing Simple Variables.............................................3-2

3.2

Declaring and Referencing Array................................................................3-4

Functions.............................................................................................. 4-1 4.1

User-Defined Functions............................................................................... 4-2

4.2

Calling a Function.........................................................................................4-4

4.3

Function Arguments.....................................................................................4-5

4.4

Arguments for Function Block Data........................................................... 4-9

4.5

Variables Declared Within Functions........................................................4-13

4.6

Built-In Functions....................................................................................... 4-15

4.7

Range for Variables and Expressions...................................................... 4-24

Function Block Data.............................................................................5-1 IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Toc-2

6.

7.

8.

9.

5.1

Usage of Function Block Data.....................................................................5-2

5.2

Group Assignment Statement................................................................... 5-10

5.3

compare Statement.................................................................................... 5-16

5.4

drive Statement...........................................................................................5-20

5.5

Referencing Block Mode............................................................................5-24

5.6

Modifying Block Mode................................................................................5-26

5.7

Referencing Block Status.......................................................................... 5-27

5.8

Checking Data Status.................................................................................5-30

5.9

Modifying Data Status................................................................................ 5-33

5.10

Referencing Alarm Status..........................................................................5-34

5.11

Status Control for Process Alarm............................................................. 5-35

5.12

Referencing Alarm Status Individually..................................................... 5-39

5.13

Operation of Process I/O and Software I/O.............................................. 5-42

5.14

One-Shot Execution of a Function Block................................................. 5-48

5.15

Sequence Table (ST16, ST16E) Block Operation.....................................5-51

5.16

Logic Chart Block (LC64, LC64-E) Operation.......................................... 5-57

5.17

Timer Block (TM) Operation.......................................................................5-61

Process Management...........................................................................6-1 6.1

Accessing Common Block Data..................................................................6-2

6.2

Manipulating Unit Recipes...........................................................................6-5

6.3

Reserving Recipes......................................................................................6-10

6.4

Built-In Functions with Batch ID............................................................... 6-14

Subsystem Communication................................................................ 7-1 7.1

Reading Subsystem Data.............................................................................7-3

7.2

Writing Subsystem Data.............................................................................. 7-5

7.3

Writing to a Subsystem Data Bit Field........................................................7-7

7.4

Communication Examples with a Subsystem........................................... 7-9

Program Control Statements...............................................................8-1 8.1

if......................................................................................................................8-2

8.2

for................................................................................................................... 8-4

8.3

while...............................................................................................................8-6

8.4

repeat............................................................................................................. 8-8

8.5

wait until........................................................................................................ 8-9

8.6

switch...........................................................................................................8-11

8.7

goto.............................................................................................................. 8-13

8.8

delay.............................................................................................................8-15

8.9

delaycycle....................................................................................................8-16

SEBOL Message Statements...............................................................9-1 9.1

opeguide........................................................................................................9-4

9.2

dialogue Statement.......................................................................................9-6

9.3

message...................................................................................................... 9-12

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Toc-3 9.4

history..........................................................................................................9-14

9.5

request.........................................................................................................9-16

9.6

sysalarm...................................................................................................... 9-17

9.7

prcsalarm.....................................................................................................9-18

9.8

unit prcsalarm............................................................................................. 9-22

9.9

Character String Format............................................................................ 9-23

9.10

Limitations on Message Output................................................................ 9-26

10.

Allocating CPU Time Using nopreempt Statements....................... 10-1

11.

Managing Shared Resources Using semlock and semunlock Statement............................................................................................ 11-1

12.

Signal Processing.............................................................................. 12-1

13.

12.1

Signal Transmission Processing.............................................................. 12-2

12.2

Processing of Queue Signal...................................................................... 12-5

12.3

Masking the Interrupt Signal................................................................... 12-10

Error Handling.................................................................................... 13-1 13.1

Error Handling for Statements with I/O or Communication....................13-2

13.2

Comparison of Actions by Error Class Code when an Error Occurs........... ......................................................................................................................13-7

13.3

Error Class Codes...................................................................................... 13-8

13.4

Detail Error Codes.................................................................................... 13-18

13.5

Values Used when an Error Occurred.................................................... 13-32

14.

Referencing the Information of SEBOL Activities...........................14-1

15.

Reserved Words in SEBOL................................................................15-1

16.

Application Size..................................................................................16-1

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Blank Page

1-1



1.

Basics of SEBOL ▼ Basics of SEBOL

SEBOL is a programming language that is suitable for process control. In this section, basic items regarding the SEBOL are explained.

n What is SEBOL (SEquence and Batch Oriented Language) SEBOL is a programming language designed for process control. It has special features for process control, in addition to the functions of a generic programming language. Programs written in SEBOL are executed as an action equivalent to one SFC step on the FCS.

n Basics of SEBOL Listed below are the basic items with regard to SEBOL: •

Program units of SEBOL



Identifiers of SEBOL



Description rules for SEBOL programming



Data types available in SEBOL



Constants available in SEBOL



Variables available in SEBOL



Implicit declaration of variables



Substituting with a character string



Include file



syntax of expressions

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

1-2



1.1

Program Units of SEBOL SEBOL consists of two types of program units: “SEBOL programs” and “SEBOL functions.”

n SEBOL Programs A SEBOL program is a program scripted in SEBOL. It is defined as an action equivalent to one SFC step, and is executed when an SFC block or an operation is executed.

SEE ALSO

For more information about SFC block, refer to: 1, “Sequential Function Chart” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E) For more information about Operation, refer to: 2.8, “Operations” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

n SEBOL Functions A SEBOL function is a subprogram that is written in SEBOL. It is also simply called a “function.” The functions can be called from a SEBOL program, and the process results can be returned to the SEBOL program. SEBOL provides a number of built-in functions. The user can also define new functions as desired.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

1-3



1.2

Identifiers of SEBOL A SEBOL identifier is a character string that represents a variable or a label used in SEBOL program.

n Description of Identifiers The variables or labels used in SEBOL programs need to be put identifiers. Data without identifiers are not subject to processing by the system. The identifiers must follow the rules below: •

Characters that can be used are: alphabetical characters (A to Z and a to z), numerical characters (0 to 9), underscore (_), dollar sign ($) and percent sign (%).



The identifier must begin with a letter or a percent sign (%).



The length of the identifier has no limitation. However, only the first eight characters are used for identification. Therefore, two identifiers having the same first eight characters are treated as the same identifier. As for tag name identifiers, the first 16 characters are used for identification.

SEE ALSO



Upper-case and lower-case letters are not distinguished.



The SEBOL reserved identifiers cannot be used for purposes other than as reserved.

For more information about the SEBOL reserved words, refer to: 15., “Reserved Words in SEBOL” on page 15-1

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

1-4



1.3

Rules for SEBOL Programming This section explains the rules for statements, comments and labels in SEBOL programs.

n Statement A SEBOL program is composed of several statements. Usually, a statement is written in one line. If a statement cannot be completed in one line, you can use "\” or “//” to end the line and continue the script in next line. “\” or “//” to indicates that the statement is continued from the previous line. However, the statement will cause a compile error if a line including the “\” or “//” exceeds 511 bytes. The following are the examples in multiple lines: ...... if ((A >= ichr("A") and A = ichr("a") and A = 100) then %%.COUNT = 1 else %%.COUNT = %%.COUNT + 1 end if

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

6-13



format "BATCH301-%03d",%%.COUNT;bchid recipe = "RECIPE-3" * * --- recipe setup --* if (rpreserve (2,recipe,bchid,"") 0) then message "Reservation error; recipe = %s, batch ID = %s",recipe,bchid %%.BSTS = "ABORT" ! aborts the current unit instrument quit end if * * --- confirms the start of execution --* wait until (%%.BSTS == "RUNNING" AND %%.BATCHID ==bchid) ;ierr ;time 300 if (ierr 0) then message "Execution does not start even after 300 seconds; recipe = %s, batch I D = %s (BATCHID = %s)",\ recipe,bchid,%%.BATCHID %%.BSTS = "ABORT" ! aborts the current unit instrument quit end if quit

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

6-14



6.4

Built-In Functions with Batch ID The following explains how to access common block data and how to manipulate unit recipes using built-in functions with batch ID specification. In the unit monitoring operation, the built-in functions lcmread(), dcmread(), ccmread(), cmwrite(), urload() and urassign() cannot be used.

n Reading Common Block Data (Batch ID Specification) Use the built-in functions lcmreadbid(), dcmreadbid() and ccmreadbid() to read common block data with batch ID specification. The built-in functions lcmreadbid(), dcmreadbid() and ccmreadbid() behave in the same manner as lcmread(), dcmread() and ccmread() except that the batch ID and recipe group number are specified for the first three. • Simple variable lcmreadbid (, , , ) dcmreadbid (, , , ) ccmreadbid (, , , ) One-dimensional array element lcmreadbid (, , , , ) dcmreadbid (, , , , ) ccmreadbid (, , , , ) • Two-dimensional array element lcmreadbid (, , , , , ) dcmreadbid (, , , , , ) ccmreadbid (, , , , , ) Specify the recipe group number using a variable or constant. Specify the batch ID using a character-string variable or character-string constant. Use uppercase letters for the batch ID. Specify the common block name using a character-string variable or character-string constant. Use uppercase letters for the common block name. Specify the data item name using a character-string variable or character-string constant. Use uppercase letters for the data item name. Specify the array subscript(s) using a variable or constant. An expression comprising two or more terms such as “i + 1” cannot be specified. Figure 6.4-1 The format of the built-in functions "lcmreadbid()", "dcmreadbid()" and "ccmreadbid()"

lcmreadbid() is a built-in function of long type, dcmreadbid() of double type and ccmreadbid() of char*n type. To read numeric data from a common block, use lcmreadbid() or dcmreadbid(). If the type of the common block data is different from that of the built-in function, the common block data is converted to the type of the built-in function. It is recommended that lcmreadbid() be used when reading integer-type and long-type common block data, while dcmreadbid() be used when reading float-type and double-type common block data. Use ccmreadbid() when reading character-string type common block data.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

6-15

Table 6.4-1 Reading Common Block Data Function name

Type

Return value at normal execution

lcmreadbid

long

Common block data other than of long type are converted to long type.

dcmreadbid

double

Common block data other than of double type are converted to double type.

ccmreadbid

char*n

A character string of the string length of the common block data will be returned.

n Writing Common Block Data (Batch ID Specification) Use the built-in function cmwritebid() to write common block data with batch ID specification. The built-in function cmwritebid() behaves in the same manner as cmwrite() except that the batch ID and recipe group number are specified for the former. • Simple variable cmwritebid (, , , , ) • One-dimensional array element cmwritebid (, , , , , ) • Two-dimensional array element cmwritebid (, , , , , , ) Specify the recipe group number using a variable or constant. Specify the batch ID using a character-string variable or character-string constant. Use uppercase letters for the batch ID. Specify the common block name using a character-string variable or character-string constant. Use uppercase letters for the common block name. Specify the data item name using a character-string variable or character-string constant. Use uppercase letters for the data item name. Specify the array subscript(s) using a variable or constant. Specify the data to be set as common block data using a variable or constant. Figure 6.4-2 The format of the built-in function "cmwritebid()"

cmwritebid() sets as common block data. If the type of the specified as an argument of the built-in function is different from that of the common block data, is converted to the type of the common block data. However, if is of numeric type and the common block data is of character-string type, or if is of character-string type and the common block data is of numeric type, a run-time error occurs and data will not be set. Table 6.4-2 Setting Common Block Data Function name cmwritebid

Type integer

Return value at normal execution

Return value at error

0

-1

n Conditions for Accessing Common Block Data The following explains the conditions that must be met before common block data can be accessed using the built-in functions lcmreadbid(), dcmreadbid(), ccmreadbid() and cmwritebid() with batch ID specification. Common block data can be accessed if either of the following two conditions is met: •

Condition (A)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

6-16



In the FCS where the common block data is downloaded, the data can be accessed if the recipe status is either READY or ACTIVE. •

Condition (B) In the FCS where the common block data is not downloaded, the data can be accessed if there is a unit recipe of the specified batch ID within the FCS and if the status of the unit recipe is either READY or ACTIVE. If one of the unit recipes in a recipe is READY or ACTIVE, the recipe status will be READY or ACTIVE.

In the FCS that satisfies either of the two conditions above, common block data can be accessed from any SFC block or operation by specifying a batch ID. Access is also possible from an SFC block started independently or from an operation not related to the recipe. An example of a recipe comprising two unit recipes is shown below. Unit Recipe 1 is executed by the unit instrument UNIT101 at FCS 1. Unit Recipe 2 is executed by the unit instrument UNIT201 at FCS 2. The common block data is downloaded to FCS 1 in which Unit Recipe 1 exists. Control Station 1 satisfies Condition (A). At FCS 1, the common block data can be accessed using a built-in function with batch ID specification if the recipe status is either READY or ACTIVE. FCS 2 satisfies Condition (B). At FCS 2, the common block data can be accessed using a built-in function with batch ID specification only while the unit recipe status of Unit Recipe 2 is either READY or ACTIVE Recipe Download

Common block data

Download

Unit Recipe 1

Download

FCS1

Unit Recipe 2

FCS2 UNIT201

UNIT101 Unit Recipe 1

Common block data

Unit Recipe 2

Accessible

Note: The common block data must be downloaded to the unit recipe 1 and the same FCS.

Figure 6.4-3 Conditions for Accessing Common Block Data

While a unit recipe is being executed by a unit instrument, the monitoring operation that belongs to that unit can obtain a batch ID and recipe group number from the unit instrument data items BATCHID and RECIPEGR and access common block data using a built-in function with batch ID specification. While a unit recipe is being executed, the executing unit instrument data items BATCHID and RECIPEGR store the corresponding batch ID and recipe group number. •

Unless the unit instrument data item BATCHID contains a null character string (character string of length 0), the unit instrument is executing a unit recipe. The data items BATCHID and RECIPEGR store the corresponding batch ID and recipe group number.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

6-17





If the unit instrument data item BATCHID contains a null character string, the unit is not executing a unit recipe.

The following example shows how a monitoring operation obtains the batch ID and recipe group number from the unit instrument data items BATCHID and RECIPEGR and read User Code 1 (USER1) and User Code 2 (USER2) from the system-fixed common block SYSRCM: integer char*16 char*16 char*16

grp_no batch_id user1 user1

! ! ! !

variable variable variable variable

that that that that

stores stores stores stores

the recipe group number the batch ID User Code 1 User Code 2

if (%%.BATCHID == " ") then ! processing when no unit recipe is being executed ...... else grp_no = %%.RECIPEGR ! obtains the recipe group number batch_id = %%.BATCHID ! obtains the batch ID ! "SYSRCM" is a system-fixed common block name user1 = 1cmreadbid (grp_no,batch_id,"SYSRCM","USER1") user2 = 1cmreadbid (grp_no,batch_id,"SYSRCM","USER2") ...... end if ......

n Manipulating Unit Recipes (Batch ID Specification) Unit recipes can be manipulated using built-in functions with batch ID specification. urassignbid() assigns a unit recipe to a unit instrument. The urassignbid() behaves in the same manner as urassign() except that the batch ID and recipe group number are specified for the former. urloadbid() downloads a unit recipe already assigned to a unit instrument, from the HIS to the control station. The urloadbid() behaves in the same manner as urload() except that the batch ID and recipe group number are specified for the former. urassignbid (, , , ) urloadbid (, , ) Specify the recipe group number using a variable or constant. Specify the batch ID using a character-string variable or character-string constant. Use uppercase letters for the batch ID. Specify the unit recipe number using a variable or constant. Specify the unit instrument tag name using a character-string variable or character-string constant. Use uppercase letters for the unit name. Figure 6.4-4 The format of the built-in function "urassignbid()"

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

6-18

Table 6.4-3 Manipulating Unit Recipes Function name

Manipulating recipe

Type

Return value at normal execution

Return value at error

urassignbid

Dynamic assignment of units

integer

0

-1

urloadbid

Download

integer

0

-1

Executing urassignbid() or urloadbid() to manipulate a unit recipe and the built-in function being completed without generating an error means the process management functions acknowledged the manipulation directive. It does not mean the operation has been completed. For example, urassignbid() and urloadbid() do not generate an error even when a batch ID that does not exist is specified. •

The dynamic assignment of units can be performed for a unit recipe using urassignbid() only while the status of the unit recipe is either NOASSIGN, ASSIGNED or READY.



When the dynamic assignment of units is performed for a unit recipe using urassignbid(), the request message for dynamic assignment of units shows a blank space instead of the recipe name.



A system error occurs when the dynamic assignment of units fails. The main causes of system alarms are shown below: •

The specified batch ID does not exist.



The status of the specified unit recipe is neither NOASSIGN, ASSIGNED nor READY.



The downloading of units can be performed for a unit recipe using urloadbid() only while the status of the unit recipe is ASSIGNED.



When downloading of units is performed for a unit recipe using urloadbid(), the request message for unit recipe download shows a blank space instead of the recipe name.



A system error occurs when the download fails. The main causes of system alarms are shown below: •

The specified batch ID does not exist.



The status of the specified unit recipe is not ASSIGNED.



A sufficient area to which the unit recipe is downloaded cannot be allocated in the FCS.

A unit recipe can be started, aborted, deleted or canceled by setting a corresponding status change directive with cmwritebid() in the common block data status of the system-fixed common block for each unit recipe. However, when cmwritebid() has been executed without generating an error, it means that the manipulation directive was acknowledged by the process management functions; it does not mean the operation has been completed.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-1



7.

Subsystem Communication ▼ Subsystem Communication

Communication I/O data can be exchanged between FCS and subsystems such as a programmable controller. In SEBOL, statements for reading and writing communication I/O data are available to exchange communication I/O data between subsystems and the FCS.

n Statements Used for Communication with Subsystems The system will communicate with subsystems by accessing the communication I/O data area within the FCS based on the contents defined via the communication I/O definition builder. The subsystem data area and communication I/O data area within FCS are equalized to make periodical communications possible. There are three statements that are used for communication with subsystems: •

Reading subsystem data (“ssread” statement)



Writing subsystem data (“sswrite” statement)



Writing subsystem data bit-field (“sswritebit” statement) sswritebit

ssread, sswrite Read/Write in words

Write in bits

Communication I/O data range

Subsystem

Figure 7-1 Accessing by “ssread,” “sswrite,” and “sswritebit”

The “ssread” statement can read multiple data from continuous communication I/O areas with a single statement. Further, the “sswrite” and “sswritebit” statements can write multiple data to continuous communication I/O areas with a single statement. The “ssread,” “sswrite” and “sswritebit” statements cannot access data that extend in multiple, non-continuous communication I/O areas with a single statement. The data position within a block is determined by “relative position.” Definitions of communication I/O data (communication I/O terminal number) and correlation to each data for the block are set on the Communication I/O definition builder.

n Data status of Subsystem Data Data status is available for each subsystem data block. As for bit position, the most significant bit (left-most) is 1, and the least significant bit (right-most) is 32. All bits other than 1, 20 through 22 are always 0.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-2

Table 7-1 Bit Configuration of Data Status to Be Obtained Bit type

Symbol

Name

1

BAD

20

NRDY

PI/O not ready

21

PFAL

PI/O power failure

22

LPFL

PI/O prolonged power failure

Invalid data status

If data status of subsystem data block is NRDY, “ssread” cannot read subsystem data. The “sswrite” statement and “sswritebit” statement cannot write data, either. Table 7-2 Data Status Combinations and Card Statuses Data status BAD NRDY PFAL LPFL

Card status

Data use

0

0

0

0

Both card and subsystem communication are normal.

Possible

0

1

0

0

Card is normal, and communication with subsystem has not been completed.

Impossible

1

1

1

1

Card is abnormal or communication with subsystem is abnormal.

Impossible

The data status obtained by an “ssread” statement can be checked by the built-in function “dscheck()”. The following example shows how to check whether or not the read data is usable. To determine whether the data read by an “ssread” statement is usable, check the data status NRDY. In the example below, the data status returned to the local variable “ds” by “ssread” statement is checked by the built-in function “dscheck()”. long ds integer i1, i2, i3 ssread 1, 1, 10, 0; ds; i1:integer, i2:integer, i3:integer if (dscheck(ds, "NRDY") 0) then ! processing when data status is NRDY. ! data read into i1, i2 and i3 cannot be used. ...... end if ......

SEE ALSO

For more information about the usage of “dscheck()” , refer to: 5.8, “Checking Data Status” on page 5-30

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-3



7.1

Reading Subsystem Data The “ssread” statement reads subsystem data from the communication I/O data area in the FCS.

n Format of “ssread” Statement ssread , , , [, ] ; ; : [, : ...] [;] [;error/errorsub[,] ]

Always designate 1.



Always designate 1.



For accessing %WW data, designate 1. For accessing %XW data (in the expanded communication I/Os) of FFCS-V, designate 2.



Designate the %WW element number or %XW element number of the data to be read.



Express with a 32-bit integer. If $00000001 is designated as the option, the "ssread" statement generates a run-time error when the data status is "data value invalid"(BAD). If an option is not designated, the "ssread" statement terminates normally even if the data status is invalid (BAD).

Designate a long integer type variable for storing data. Designate a local variable for storing data.Simple variables, array variables and arrays can be designated.

Designate a data type specified via the Communication I/O Builder.



Designate a local variable to which the error code is stored when an error occurs.



Designate the branching destination at the time an error occurs.



Designate a variable or a constant to identify where the error was generated in the error handling section.

Figure 7.1-1 The format of the “ssread” statement



The “ssread” statement retrieves data in the from the and stores the data into its corresponding . For :, a maximum of 32 combinations can be designated.



If an is designated, 0 will be set when operation is normal, and the error code will be set when an error occurs.



The branching destination when an error occurs can be designated by designating a . Also, by adding an , the location where the error was generated IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-4



can be identified in the error handling section. In the error handling section, the value can be obtained using the built-in function.

IMPORTANT •

When the “ssread” statement generates a subsystem communication execution error (error class code 500), data cannot be stored in any of the . The will remain the same value as before the execution of the “ssread” statement.



When the data type in the read target is DI/DO, the data is read in a “no bit reversing” condition regardless of the bit reversing designation.



For the error variable, designate one simple variable or array element. The entire array cannot be designated. An error is not returned to the error variable in the “ssread” statement for each : pair, but one error code is returned for each “ssread” statement.

Types of data to be read by “ssread” statement and shown as follows. integer:

16-bit integer data

uinteger: 16-bit unsigned integer data

SEE

ALSO

long:

32-bit integer data

ulong:

32-bit unsigned integer data

float:

32-bit floating point data

char4:

4 byte (2 word) character

char8:

8 byte (4 word) character

char16:

16 byte (8 word) character

char32:

32 byte (16 word) character

For more information about error handling, refer to: 13., “Error Handling” on page 13-1

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-5



7.2

Writing Subsystem Data The “sswrite” statement writes data in word units to a subsystem. The “sswrite” statement is terminated normally when write is performed properly with respect to the I/O image of the subsystem in the FCS.

n Format of a “sswrite” Statement sswrite , , , [,] ; : [, : . . . ] [;] [;error/errorsub [,] ]

Always designate 1.



Always designate 1.



For accessing %WW data, designate 1. For accessing %XW data (in the expanded communication I/Os) of FFCS-V, designate 2.



Designate the element number of the %WW or the %XW to which to write the data.



Not used.



Designate a local variable for storing data. Simple variables, array variables and entire arrays can be designated.



Designate a data type specified via the Communication I/O Builder.



Designate a local variable to which the error code is stored when an error occurs.



Designate the branching destination at the time an error occurs.



Designate a variable or a constant to identify where the error was generated in the error handling section.

Figure 7.2-1 The format of the “sswrite” statement



The “sswrite” statement converts a SEBOL to a and writes this to communication I/O data determined by the . For :, a maximum of 32 combinations can be designated.



If an is designated, 0 will be set when operation is normal, and the error code will be set when an error occurs.



The branching destination when an error occurs can be designated by designating a . Also, by adding an , the location where the error was generated can be identified in the error handling section. In the error handling section, the value can be obtained using the built-in function.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



7-6

IMPORTANT

SEE ALSO



Data can only be written to a destination where the data type is DO or AO**. Data cannot be written to the data types DI or AI**.



If the “sswrite” statement generates a communication I/O execution error (error class code 500), no data at all can be written. The communication I/O data will retain the same value as before the “sswrite” statement was executed.



When the data type of the write destination is DO, the value of the will be set as is, regardless of whether there is a bit reversing designation.



For the error variable, designate one simple variable or array element. The entire array cannot be designated. An error is not returned to the error variable in the “sswrite” statement for each : pair, but one error code is returned for each “sswrite” statement.

For more information about error handling, refer to: 13., “Error Handling” on page 13-1

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-7



7.3

Writing to a Subsystem Data Bit Field The “sswritebit” statement writes to a bit field. The “sswritebit” statement is terminated normally when write is performed properly with respect to the I/O image of the subsystem in the FCS.

n Format of the “sswritebit” Statement sswritebit , , , [,] ;, , [;] [;error/errorsub [,] ]

Always designate 1.



Always designate 1.

For accessing %WW data, designate 1. For accessing %XW data (in the expanded communication I/Os) of FFCS-V, designate 2. Designate the element number of the %WW or the %XW to which to write the data.

Not used.



Designate the position of the bit from the most significant bit using an integer-type constant or variable (1 to 16). The most significant bit (left-most) is 1 and the least significant bit (right-most) is 16.



Designate the number of bits to be written using an integer-type constant or variable.



Designate an integer-type constant or variable in which the data to be written is filled in from the right.



Designate a local variable to which the error code is stored when an error occurs.



Designate the branching destination at the time an error occurs.



Designate a variable or a constant to identify where the error was generated in the error handling section.

Figure 7.3-1 The format of the “sswritebit” statement



The “sswritebit” statement treats the communication I/O data determined by the as 32-bit integer data and writes the data in the designated bit field. Only the number of specified in is written, starting from the number counted from the most significant bit. Any portion other than the designated bit field retains the same value as before the “sswritebit” statement was executed.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-8

MSB

LSB

1

32 ...... 1 2 n

SEBOL 1 Data to be written in the subsystem

m

m+n-1 1 2 ...... n

32

Figure 7.3-2 Writing Bit Field Data



If an is designated, 0 will be set when operation is normal, and the error code will be set when an error occurs.



The branching destination when an error occurs can be designated by designating a . Also, by adding an , the location where the error was generated can be identified in the error handling section. In the error handling section, the value can be obtained using the built-in function.

IMPORTANT

SEE ALSO



Data can only be written when the data type of the write destination is DO or AO**.



Designate an integer from 1 to 32 for . An error occurs if a value larger than 32 or a negative value is designated. If 0 is designated, an error does not occur but data will not be written.



Care should be taken when the data type of the write destination is DO, since the value of the will be written as is regardless of whether there is a bit reversing designation.



For , designate a multiple of 2 (4 byte boundary).



An error occurs if the total of the and greater than or equal to 33.

For more information about error handling, refer to: 13., “Error Handling” on page 13-1

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

7-9



7.4

Communication Examples with a Subsystem This section gives an example of communication I/O configuration and SEBOL sample programs for accessing the communication I/O data.

n An Example of Communication IOM Builder Definition An Example of Communication IOM Builder definition is shown as follows Element Number %WW0001

Station Number

Device & Address

4

1

TI001 *

*

Buffer Size Data Size 4

Data Type Analog Input (16-bit, Signed Integer)

%WW0002

*

*

*

%WW0003

*

*

*

*

*

%WW0004

*

*

*

*

*

%WW0033

8

4

1

D0001

%WW0034

*

*

*

*

*

%WW0035

*

*

*

*

*

%WW0036

*

*

*

*

*

%WW0037

*

4

1

D0005

%WW0038

*

*

*

*

*

%WW0039

*

*

*

*

*

%WW0040

*

*

*

*

*

%WW0048

4

4

1

TS001

%WW0049

*

*

*

*

*

%WW0050

*

*

*

*

*

%WW0051

*

*

*

*

*

%WW0052

*

*

*

*

*

























Analog Input (32-bit, Signed Integer)

Analog Input (32-bit, Floating-point)

Analog Output (16-bit, Signed Integer)

Figure 7.4-1 An Example of Communication IOM Builder Definition

n Sample Programs for Accessing Communication I/O Data Sample programs for communication I/O data is shown as follows.

l

Sample Program 1 A sample program to read 2 data start from relative address 1 (%WW0001) ! sample program 1 integer data1, data2 long dSts ssread 1, 1, 1, 1 ; dSts ; data1:integer, data2:integer ...... end

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



l

7-10

Sample Program 2 A sample program to read 4 data start from relative address 33 (%WW0033) ! sample program 2 long n1, n2 float f1, f2 long dSts ssread 1, 1, 1, 33 ; dSts ; n1:long, n2:long, f1:float, f2:float ...... end

l

Sample Program 3 A sample program to write 4 data start from relative address 48 (%WW0048) when the data are 10, 20, 30 and 40 is shown as follows. When write to all array elements (data[*]) is specified, the data can be written to all array elements. ! sample program 3 integer data[4] data[1] = 10 data[2] = 20 data[3] = 30 data[4] = 40 sswrite 1, 1, 1, 48; data[*]:integer ...... end

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8.

8-1

Program Control Statements ▼ Program Control Statements

SEBOL has control statements to control the order of execution for programs.

n Program Control Statements SEBOL includes nine control statements as shown below: •

if



for



while



repeat



wait until



switch



goto



delay



delaycycle

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8.1

8-2

if The “if” statement controls execution of the program according to the condition of the expression in the statement.

n Usage of “if” Statement (1) if () (2) if () then ...... [else ......] end if (3) if () then ...... else if () then ...... [else ......] end if

A numeric expression. (0)...True When calculation result of is other than 0. (=0) ...False When calculation result of is 0 . A statement that is executed when is true.

Figure 8.1-1 The format of the “if” statement

n Action of “if” Statement The “if” statement controls execution of the program according to the condition of the in the statement. In format (1), the is calculated first. If the result is true, the is executed. In format (2), the is calculated first. If the result is true, the statements entered between “then” and “else” is executed. If the result is false, the “else” clause is executed. In format (3), the s are successively evaluated, and if the result of one of the s is true, the statements following the “then” for that expression before the “else” statement are executed. If none of the s are true, the “else” clause is executed if it is present.

TIP Branching out of an “if ~ end if” structure can be instructed using a “goto” statement, but branching into an “if ~ end if” structure is not allowed.

n Description Example of “if” Statement Description examples of “if” statement are shown below.

l

Example of Determining Local Variable A integer function FUNC(A,MSG) integer A,B ...... B = 0

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-3



if (A == 0) then MSG = "RUN" else if (A == 1) then MSG = "STOP" else MSG = "ERROR" B = 1 end if ...... return B ......

l

Example of Branching Actions According to the Process Variable (PV) In the following example, when the process values (PV) of counter (CT001) are 1, 2 and 3, SC001’s SV values are set to low speed, mid speed and high speed, respectively. In this example, if the process values (PV) are other than 1, 2 and 3, an operator guide message is output and the SC001 SV value will be set to low speed. block CT CT001 block PID SC001 ...... if (CT001.PV == 1) then [SC001.MODE.SV = "AUT",10] ! low-speed control. else if (CT001.PV == 2) then [SC001.MODE.SV = "AUT",50] ! mid-speed control. else if (CT001.PV == 3) then [SC001.MODE.SV = "AUT",100] ! high-speed control. else opeguide "%aRPM {rotation} setting abnormal",1 ! operator guide(red) [SC001.MODE.SV = "AUT",10] ! low-speed control {Control}. end if ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8.2

8-4

for The “for” statement repeatedly performs a series of statements between the “for” statement and “next” statement.

n Usage of “for” Statement for = to [step ] ...... next or for = to [step ] ...... next@

A numeric variable. Only local variables can be used. Numeric type expressions which designates initial value of . Numeric type expressions which designates final value of . Numeric type expressions which designates increment of . The is assumed to be 1 when omitted. A negative value can be used as an increment.

Figure 8.2-1 The format of the “for” statement

The “for to next” structure can be nested. In this case, the “next” statement is associated with the nearest “for” preceding the “for”. Each “for” statement must be concluded with a “next” of its own.

n Action of a “for” Statement The “for” statement repeats execution of a series of statements between the “for” and “next” statements, with a delay of one scan period imposed following each “for...next” loop processing. The delay after the loop can be cancelled using “next@” instead of “next” at the end of the “for” loop. In this case, the loop is repeatedly executed without delay. The in the “for” statement is first set to the . Actions thereafter vary according to the relationship of , and .

l

When is Positive and is Equal to or Less than , or is Negative and is Equal to or Greater than Statements from the “for” statement to “next” statement are executed, and the value of the increments or decrements by the amount specified by . Next, the and the are compared. If the sign of the difference remains unchanged since the last comparison, the control returns to the statement following the “for” statement to iterate the same operation. The and are calculated only once before the start of iteration. The and thus calculated are used until the control exits from the loop, instead of being recalculated for each iteration. If the data type of the , , or is not the same as that of the , the data type is converted to the data type of before calculation.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-5



When is Positive and is Greater than , or is Negative and is Less than

l

Lines from the “for” statement to “next” statement are never executed.

TIP



Branching out of an “for to next” structure can be instructed using a “goto” statement, but branching into a “for to next” structure is not allowed.



If of “for” statement is a numeric value with a decimal point, might not be calculated due to the calculation error in real number.

n Description Example of “for” Statement A description examples of “for” statement are shown below:

l

Example of a Function to Obtain SM by Repeating the Loop N-Times integer function SUM(N) integer N,I,SM ...... SM = 0 for I = 1 to N step 1 SM = SM + 1 next@ return SM ......

l

Example of Clearing Data of Local Variable Buffer IBUFF integer IBUFF[50] integer i ...... for i =1 to 50 IBUFF[i] = 0 next@ ...... for i =50 to 1 step -1 IBUFF[i] = 0 next@ ......

! cleared in ascending order

! cleared in descending order

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-6



8.3

while If the evaluated result of in a “while” statement is true, the system will execute the statements between “while” statement and “wend” statement one by one before returning to the “while” statement.

n Usage of “while” Statement while () ...... wend or while () ...... wend@

A numeric expression (0)... True When calculation result of is other than 0. (=0)... False When calculation result of is 0.

Figure 8.3-1 The format of the “while” statement

The “while to wend” structure can be nested. In this case, each “wend” statement is associated with the nearest “while” preceding the “wend”. Each “while” statement must be concluded with a “wend” of its own.

n “while” Statement Action If the evaluation result of in a “while” statement is true, the system will execute the statements between “while” statement and “wend” statement one by one before returning to the “while” statement. A delay of one scan period is imposed after each loop processing. This delay process is repeated until evaluation becomes false. When becomes false, the control moves to the “wend” statement. If “wend@” is used, the loop is executed without delay after completion of processing between “while” and “wend.” The result of first evaluation of of a “while” statement is false, statements between the “while” and “wend” statements are never executed.

TIP Branching out of an “while ~ wend” loop can be instructed using a “goto” statement, but branching into an “while ~ wend” structure is not allowed.

n Description Example of “while” Statement A description examples of “while” statement are shown below:

l

Example of a Function to Increment SM by 1 as long as N is Greater than 0 integer function SUM1(N) integer N,SM ...... SM = 0 while (N>0)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-7



SM = SM + 1 N = N - 1 wend@ return SM ......

l

Example of Checking Flow Amount Until Totalization is Completed and Stops Control When Flow Rate Becomes Abnormal block BSETU-2 FC001 ...... while (FC001.SUM < FC001.BSET) if (FC001.ALRM "NR") then [FC001.SW = 3] %.BSTS = "STOP" end if wend ......

! % is the present block

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8.4

8-8

repeat As long as the condition of in a “repeat” statement is false, the system will repeat execution of statements between “repeat” statement and “until” statement.

n Usage of “repeat” Statement repeat ...... until () or

repeat ...... until@ ()

A numeric expression (0)... True When calculation result of is other than 0. (=0)... False When calculation result of is 0.

Figure 8.4-1 The format of the “repeat” statement

The “repeat to until” structure can be nested. In this case, each “until” statement is associated with the nearest “repeat” preceding the “until”. Each “repeat” statement must be concluded with an “until” of its own.

n Action of “repeat” Statement As long as the condition of in a “repeat” statement is false, the system will repeat execution of statements between the “repeat” statement and “until” statement. A delay of one scan period is imposed after each loop processing. The line following the “until” statement is executed when condition becomes true. Since condition determination to escape from loop is executed at the end of each loop, statements between the “repeat” and “until” are executed at least once. If “until@” is used, the loop is executed without delay after condition judgment.

TIP Branching out of an “repeat to until” loop can be instructed using a “goto” statement, but branching into an “repeat ~ until” structure is not allowed.

n Description Example of “repeat” Statement Description examples of “repeat” statement are shown below: integer function SUM2(N) integer N,SM ...... SM = 0 repeat SM = SM + 1 N = N - 1 until@ (N 50); time 30, error LBL1 ...... exit LBL1 ......

l

Operating Mixer MX1 for 60 Seconds block SIO-11 MX1 block TM TM001 #define START 2 #define STOP 0 ...... drive [MX1 = START];errorsub DRVERR ...... TM001.PH = 60 TM001.OP = 2 wait until (TM001.ALRM == "CTUP") TM001.OP = 1 ...... drive [MX1 = STOP]; erorsub DEVERR ...... exit ...... DEVERR: opeguide "Mixer operation abnormal." % BSTS = "STOP" ......

! timer start. ! timer stop.

! % is present block.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-11



8.6

switch The “switch” statement checks whether the designated matches one of the in the “case” statement, then the control is branched according to the evaluation.

n Usage of “switch” Statement switch () case [, ...: ...... [case [,] ...: [otherwise: ...... ]] end switch

State the expression to be evaluated as an integer or character string. Designate an integer or character-string constant to be compared with the . The data type of in a "switch" statement must agree with the in the "case" statement.

Figure 8.6-1 The format of the “switch” statement

When “switch” statement is executed, the value is calculated first, then the result is compared with of the “case” statement. The “switch” statement checks whether the matches any of the constants stated in the “case” statement, then the control is branched according to the evaluation as shown below: •

If the value is equal one of the , the statement following the “case” statement is executed.



If the result does not equal any of the constants, the “otherwise” statement is executed.



If “otherwise” statement is not present, none of the statements placed between the “switch” statement and “end switch” statement are executed.

When processing following a “case” statement or “otherwise” statement is completed, the control escapes from the “switch” statement and is passed to the line following the “end switch” statement.

TIP Branching out of an “switch” to “end switch” structure can be instructed using a “goto” statement, but branching into an “switch” to “end switch” structure is not permitted.

n Description Example for “switch” Statement A description example of “switch” statement is shown below:

l

Example of Branching Processing According to the Value of Local Variable A Being 0, 1 or Other Value integer function FUNC1 (A, MSG) integer A,B char*10 MSG ...... B = 0 switch (A)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8-12

case 0: MSG = "Run" case 1: MSG = "Stop" B = 0 otherwise: MSG = "ERROR" B = 1 end switch ...... return B ......

l

Example of Operator Guide Message Output According to Error Variable of “drive” Statement block SI0-11 NO1, PO1 MX1 #define OPEN 2 #define START 2 integer ERR char*12 MSG ...... drive [VO1 = OPEN];errorsub DRVERR,1 ...... drive [PO1 = START];errorsub DRVERR,2 ...... drive [MX1 = START]; errorsub DRVERR,3 ...... exit ...... DREVERR: ERR = lerroid() switch (ERR) case1: MSG = "Valve" case2: MSG = "Pump" case3: MSG = "Mixer" otherwise: MSG = "Switch instrument" end switch opeguide "%a%s not operable",1,MSG ereturn

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8.7

8-13

goto The “goto” statement executes unconditional branching to the line with the specified .

n Usage of “goto” Statement goto

Label held by the branching destination.

Figure 8.7-1 The format of the “goto” statement

The “goto” statement executes unconditional branching to the line with the specified . A compile error is caused if the specified is not present in the program.

n Description Example of “goto” Statement A description example of “goto” statement is shown below:

l

Example of Branching to the Labels NML and RTN function SUB (A,MSG) integer A,B char*10 MSG ...... if (A == 1) then MSG = "Run" goto NML else if (A == 1) then MSG = "Stop" goto NML else MSG = "ERROR" end if B = 1 goto RTN ...... NML: B = 0 RTN: return B ......

l

Example of Branching to the Label LBL1 when Temperature Controller TIC5 PV is Less than 50.0 block PID TIC5 block TM TM001 ...... IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



8-14

[TIC5.MODE.SV = "AUT", 60.0] [TM001.PH.OP = 90,2] wait until (TM001.ALRM == "CTUP") TM001.OP = 1 ...... if(TIC5.PV < 50.0) goto LBL1 ...... exit ...... LBL1: opeguide "%a low internal temperature", 3 % BSTS = "STOP" !% is the present block. ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-15



8.8

delay Program execution delays as long as the of a “delay” statement.

n Usage of “delay” Statement delay

Designate the period of delay in msecs using an integer-type real number or variable.

Figure 8.8-1 The format of the “delay” statement

The “delay” statement causes a delay in processing time of a program for a designated period of time in msecs. The precision of the delayed time is dependent on the basic scan period.

n Description Example of “delay” Statement A description example of “delay” statement is shown below:

l

Example of Causing a Delay by 200 Seconds after Setting FIC001 SV block PID FIC001 ...... FIC001.SV = 10 delay 200000 ......

l

Example of Waiting for a Batch End after Starting the FIQC1 Batch Data Set Unit: block BSETU-2 FIQC1 ...... FIQC1.BSET = 100.0 [FIQC1.MODE.SV = "AUT",1] delay 1000 wait until (FIQC1.ZONE == 7 or FIQC1.ZONE == 0) ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

8-16



8.9

delaycycle The “delaycycle” statement causes a delay in program execution as much as designated x basic cycles.

n Usage of “delaycycle” Statement delaycycle []

Designate the period of delay in msecs using an integer-type real-number or variable.

Figure 8.9-1 The format of the “delaycycle” statement

The “delaycycle” statement causes a delay in program execution as much as designated x basic cycles. If is omitted, the program execution delays as long as one basic cycle.

n Description Example of “delaycycle” Statement Description examples of the “delaycycle” statement are shown below:

l

Example of Delaying for One Cycle After Setting FIC003 SV block PID FIC003 ...... FIC003.SV = 30.0 delaycycle ......

l

Example of Waiting for a Batch End After Starting the FIQC1 Batch Data Set Unit lock BSETU-2 FIQC1 ...... FIQC1.BSET = 200.0 [FIQC1.MODE.SV = "AUT",1] delaycycle wait until (FIQC1.ZONE == 7 or FIQC1.ZONE == 0) ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-1



9.

SEBOL Message Statements ▼ Message Statements

SEBOL has message statements to output each message for operation and monitoring functions and to interact with operator.

n Message Statements SEBOL has the following eight messages:

l

“opeguide” Statement This statement is used to print as an operator guide message an arbitrary character string or the character string specified by operator guide message element number, and to store it in the historical file.

l

“dialogue” Statement This statement is used to exchange data with operator through the message window dialogs of the HIS.

l

“message” Statement This statement is used to print as a message an arbitrary character string or the character string specified by print message element number, and to store it in the historical file.

l

“history” Statement This message is used to store as a message an arbitrary character string or the character string specified by print message element number, and to store it in the historical file.

l

“request” Statement This statement is used to output a message by specifying the element number.

l

“sysalarm” Statement This statement is used to generate a system alarm using an arbitrary character, or to recover from the status in which a system alarm has occurred.

l

“prcsalarm” Statement This statement is used to generate a process alarm in a SFC block, or to recover from the status in which a process alarm has occurred.

l

“unit prcsalarm” Statement This statement is used to generate a unit process alarm, or to recover from the status in which a unit process alarm has occurred. The following table shows the sizes and display colors for each message statement: Table 9-1 Message Statements Message statement

opeguide

Specification

Size

Default color (*1)

%a color specification (*2) Print Window out

Line feed ("\n") (*3) Print Window out

Arbitrary character string (*4)

128 bytes max (*5)

White

Valid

(*6)

Valid

Valid

Element number

Fixed (*7)

White

···

···

···

···

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-2



Message statement

Specification

Size

Default color (*1)

%a color specification (*2) Print Window out

Line feed ("\n") (*3) Print Window out

Arbitrary character string(*4)

192 bytes max (*8)

White

Valid

(*6)

Valid

Valid

Element number

Fixed (*7)

White

···

···

···

···

Arbitrary character string (*4)

128 bytes max

···

(*6)

···

Valid

Element number

Fixed (*7)

(Not displayed)

···

···

···

···

Arbitrary character string (*4)

128 bytes max

···

Fixed(*7)

···

(Not printed)

···

Element number

(Not displayed)

···

(Not printed)

request

Element number

Fixed(*7)

(Not displayed)

···

···

···

···

sysalarm

Arbitrary character string(*4)

128 bytes max (*9)

White

Valid

(*6)

Valid

Valid

prcsalarm

Character string (*10)

8 bytes max

White

Invalid(*10)

(*6)

···

···

unit prcsalarm

Character string(*10)

8 bytes max

White

Invalid(*10)

(*6)

···

···

dialogue

message

history

*1: *2: *3:

The default color of the message character strings that appear on the screen. Specify with a format character string. Specify with a format character string. If “\n” (line feed code) is used, a line feed is inserted to the format character string for window display and printout. *4: The horizontal tab character "\t" cannot be used. *5: When specifying color for “%a”, six bytes per color and one byte per line feed are used. The total byte length of these and the formatted character string is limited to 128 bytes. Up to 70 bytes can be displayed in one line on a window (excluding the number of bytes for “%a” escape sequence). *6: Whether the designation of “%a” is enabled or not depends on the individual printer. *7: Element number *8: Up to 70 bytes can be displayed in one line on the window, and up to seven lines can be displayed in a dialog window display. For the “%a” color, six bytes per color and one byte per line feed are used. The total byte length of these and the formatted character string is limited to 192 bytes. *9: When specifying the “%a” color, six bytes per color and one byte per line feed are used. The total byte length of these and the formatted character string is limited to 128 bytes. Up to 76 bytes can be displayed in one line on a window (excluding the number of bytes for “%a” escape sequence). Up to 58 bytes can be displayed in a message window. *10: Process alarm character string defined via the builder.

Table 9-2 Range of Element Numbers Message statement

Symbol

Range of element number

“opeguide” statement “dialogue” statement

OG

0001 to 0200 (%OGnnnn for nnnn) (*1) 0001 to 0500 (%OGnnnn for nnnn) (*2) 0001 to 1000 (%OGnnnn for nnnn)(*3)

“message” statement “history” statement

PR

0001 to 0200 (%PRnnnn for nnnn) (*4) 0001 to 0400 (%PRnnnn for nnnn) (*5) 0001 to 1000 (%PRnnnn for nnnn) (*2) 0001 to 2000 (%PRnnnn for nnnn) (*3)

VM

0001 to 0100 (%VMnnnn for nnnn)

PQ

0001 to 0200 (%PQnnnn for nnnn)

CP

0001 to 9999 (%CPnnnn for nnnn)

M3

0001 to 9999 (%M3nnnn for nnnn)

“request” statement

*1: *2: *3: *4: *5:

Range for KFCS, LFCS, SFCS Range for KFCS, FFCS-S, KFCS2, LFCS2 Range for FFCS-V Range for SFCS Range for KFCS, LFCS

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



9-3

n Addition of Tag Name to a Message If an operation started by a unit instrument executes a message statement, the tag name added to the message will be the name of the unit instrument. If the SFC block is started individually, the tag name of the SFC block is added to the message. The message is transferred to all HISs. However, the message will not be displayed on the HIS to which a user with no operation and monitoring authority against the originating FCS is logged in.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-4



9.1

opeguide An “opeguide” statement is the message statement that prints out an arbitrary character string, or the character string designated by an operator guide message element number, as an operator guide message. The character string is stored in the historical file.

n Usage of “opeguide” Statement opeguide [, ...] OG,

*1:

Define the format character string. The output value is designated as a numeric type expression or as a character string. A maximum of eight values can be designated. The operator guide message element number (nnnn of %OGnnnn) is an integer number (*1).

For KFCS, LFCS, SFCS, it ranges between 0001 and 0200. For FFCS, KFCS2, LFCS2, it ranges between 0001 and 0500. For FFCS-V, it ranges between 0001 and 1000.

Figure 9.1-1 The format of the “opeguide” statement

The following points need to be noted when using “opeguide” statement.

SEE

ALSO



When displaying an arbitrary character string, the color can be changed using the %a designation of the format character string. The default color is white.



Up to 70 bytes can be displayed per line in an operator guide window. If there are more than 70 bytes, they will be displayed in two lines. Character strings that can be printed or stored in a historical file can contain up to 128 bytes.



When designating the color for %a, six bytes are used per color. The six bytes for color designation are not included in the 70 bytes that can be displayed in one line, but they are included in the 128 bytes that are printed or stored in a historic file.



The message is transferred to all HISs. However, the message will not be displayed on the HIS to which a user with no operation and monitoring authority against the originating FCS is logged in.

For more information about format character string, refer to: 9.9, “Character String Format” on page 9-23

n Description Example of “opeguide” Statement Description examples of an “opeguide” statement are shown below:

l

Description Example for Displaying an Arbitrary Character String as an “opeguide” Message #define WHITE 7 #define GREEN 2 integer temp ! local variable retaining the temperature ...... * Only the temperature section shows a green message, all others show a white message. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-5



opeguide "current temperature is %a%d%a degrees" ,GREEN, temp, WHITE ......

l

Description Example for Displaying the Present FCS “opeguide” Message %OG0001 ...... opeguide OG,1 ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-6



9.2

dialogue Statement The dialogue statement is a message statement for exchanging data between the program and the operator through the dialogue message window in the HIS. There are three types of “dialogue” statements as below: •

Data entry dialogue messages



Acknowledgment dialogue messages



Reentry dialogue messages

n Usage of “dialogue” Statement (Data Entry Dialogue Message) dialogue [] ;

[,] ...] OG,

; , [;] [;time [, error errorsub error errorsub

[,] ] ] [;

The dialogue name is designated with a character-type constant or variable (maximum 8 bytes). If the name is omitted, this becomes eight asterisks (********).

Define the format character string.

The output value is designated as a numeric type expression or as a character string. A maximum of eight values can be designated.

The operator guide message element number (nnnn of %OGnnnn) is an integer number (*1).

Designate the input prompt message with a character-type constant or variable (maximum 32 bytes).



Designate the maximum operation wait time (in seconds) with an integer-type constant or local variable.



Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

*1:

For KFCS, LFCS, SFCS, it ranges between 0001 and 0200. For FFCS, KFCS2, LFCS2, it ranges between 0001 and 0500. For FFCS-V, it ranges between 0001 and 1000.

Figure 9.2-1 The format of the “dialogue” statement (data entry dialogue messages)

The following points need to be noted when using “dialogue” statement (with dialog message for data entry.) •

A data entry dialogue message calls up the dialogue message window, and the operator can enter data by pressing the dialogue button. The target SFC block stays in a wait state at the “dialogue” statement until the operator inputs data. When the operator inputs data,

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-7



this data is stored in the input variable designated in the subject “dialogue” statement, and execution of the SFC block resumes from the line following the “dialogue” statement.

SEE

ALSO



For a data entry dialogue or an acknowledgment dialogue message, the desired character string to be displayed or the operator guide message is displayed in the dialogue message window. The desired character string can contain a maximum of 70 bytes per line. The dialogue window displays up to seven lines. The desired character string is limited to a total of 192 bytes. The prompt character is not stored in the historical file and will not be printed.



The dialogue name is displayed in windows such as the tuning window of the subject SFC block.



The maximum input wait time can be specified in seconds by designating the . If the maximum input wait time is exceeded, a timer count up run-time error occurs. If in a situation where the PC is not operating as an HIS must be taken into consideration, then specify infinite wait by not designating a wait time or use a sufficiently long wait time specification (it must be at least longer than the time it takes for HIS to start up).



The branching destination when a run-time error occurs can be specified by designating a . Also, when an is specified, an inquiry can be made on the value of the error identifier from the error handling section by using the built-in functions, lerrorid(), derrorid() or cerrorid(). The function lerrorid() is used for referencing an integer-type error identifier, derrorid() for a real-type error identifier and cerrorid() for a character-type error identifier.



A dialogue message output from an operation using a “dialogue” statement becomes the dialogue message with respect to the unit instrument that started the operation, and displays a dialogue in the unit instrument tuning window, etc., to prompt the operator to perform an entry or acknowledgment operation.

For more information about the format character string, refer to: 9.9, “Character String Format” on page 9-23 For more information about error handling, refer to: 13., “Error Handling” on page 13-1

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-8



n Usage of “dialogue” Statement (Acknowledgment Dialogue Message) dialogue [] ; [,] ...] OG, ;confirm

[;]

[;time [, error error errorsub

errorsub

[,] ] ] [;



The dialogue name is designated with a character-type constant or variable (maximum 8 bytes). If the name is omitted, this becomes eight asterisks (********).



Define the format character string.



The output value is designated as a numeric type expression or as a character string. A maximum of eight values can be designated.

The operator guide message element number (nnnn of %OGnnnn) is an integer number (*1).

Designate the maximum operation wait time (in seconds) with an integer-type constant or local variable.



Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

*1:

For KFCS, LFCS, SFCS, it ranges between 0001 and 0200. For FFCS, KFCS2, LFCS2, it ranges between 0001 and 0500. For FFCS-V, it ranges between 0001 and 1000.

Figure 9.2-2 The format of the “dialogue” statement (acknowledgment dialogue messages)

The following points need to be noted when using “dialogue” statement (with confirmation action for operation). •

For an acknowledgment dialogue message, the operator performs the acknowledgment operation with the confirm button.



For a data entry dialogue or an acknowledgment dialogue message, the desired character string to be displayed or the operator guide message is displayed in the dialogue message window. The desired character string can contain a maximum of 70 bytes per line. The dialogue window displays up to seven lines. The desired character string is limited to a total of 192 bytes. The prompt character is not stored in the historical file and will not be printed.



The dialogue name is displayed in windows such as the tuning window of an SFC block or an operation.



The maximum input wait time can be specified in seconds by designating the . If the maximum input wait time is exceeded, a timer count up run-time error occurs. If in a situation where the PC is not operating as an HIS must be taken into consideration, then IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-9



specify infinite wait by not designating a wait time or use a sufficiently long wait time specification (it must be at least longer than the time it takes for HIS to start up).

SEE

ALSO



The branching destination when a run-time error occurs can be specified by designating a . Also, when an is specified, an inquiry can be made on the value of the error identifier from the error handling section by using the built-in functions, lerrorid(), derrorid() or cerrorid(). The function lerrorid() is used for referencing an integer-type error identifier, derrorid() for a real-type error identifier and cerrorid() for a character-type error identifier.



A dialogue message output from an operation using a “dialogue” statement becomes the dialogue message with respect to the unit instrument that started the operation, and displays a dialogue in the unit instrument tuning window, etc., to prompt the operator to perform an entry or acknowledgment operation.

For more information about the format character string, refer to: 9.9, “Character String Format” on page 9-23 For more information about error handling, refer to: 13., “Error Handling” on page 13-1

n Usage of “dialogue” Statement (Reentry Dialogue Message) dialogue ;retry [,]...] [;time

[, error error errorsub

errorsub

[,] ] ] [;



Designates the reentry prompt message with a character type constant or variable (maximum 32 bytes).



Designates the local variable where data input by the operator is stored. Either a numeric type or character string type can be used for the input variable, but when the input variable is a character string type, the string that can be input has a maximum of 32 bytes.



Designate the maximum operation wait time (in seconds) with an integer-type constant or local variable.



Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

Figure 9.2-3 The format of the “dialogue” statement (reentry dialogue message)



In the case of a reentry dialogue message, the dialogue message that the SFC block output immediately before becomes effective once again in the operator guide window. Even if it is a reentry, the message is printed and is also stored in the historical file.



When the dialogue message which is the target of the reentry dialogue message is a data entry type, if the input variable of the data entry type “dialogue” statement executed immediately before is a numeric value, then also use a numeric value for the input variable of the reentry type “dialogue” statement. Likewise, if the input variable of the data entry type “dialogue” statement executed immediately before is a character string, then use a IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-10



character string for the input variable of the reentry type “dialogue” statement. If the input variable types do not match, a run-time error occurs in the reentry dialogue statement.

SEE

ALSO



The maximum input wait time can be specified in seconds by designating the . If the maximum input wait time is exceeded, a timer count up run-time error occurs. If in a situation where the PC is not operating as an HIS must be taken into consideration, then specify infinite wait by not designating a wait time or use a sufficiently long wait time specification (it must be at least longer than the time it takes for HIS to start up).



The branching destination when a run-time error occurs can be specified by designating a . Also, when an is specified, an inquiry can be made on the value of the error identifier from the error handling section by using the built-in functions, lerrorid(), derrorid() or cerrorid(). The function lerrorid() is used for referencing an integer-type error identifier, derrorid() for a real-type error identifier and cerrorid() for a character-type error identifier.



The message is transferred to all HISs. However, the message will not be displayed on the HIS to which a user with no operation and monitoring authority against the originating FCS is logged in.



A dialogue message output from an operation using a “dialogue” statement becomes the dialogue message with respect to the unit instrument that started the operation, and displays a dialogue in the unit instrument tuning window, etc., to prompt the operator to perform an entry or acknowledgment operation.



If a dialog type message output from the SFC block is deleted before SFC block runs a dialog statement for reentering the dialog type message, the message is fixed as “dialog retry message.” The previous message can not be retrieved. This phenomenon also occurs when the data entry message is deleted or confirmation message is deleted from operator guide message confirmation window.

For more information about error handling, refer to: 13., “Error Handling” on page 13-1

n Description of “dialogue” Statement Examples of “dialogue” statement usage are shown below:

l

Description of a Data Entry Dialogue Message or Reentry Dialogue Message block PID FIC001 long setvalue ...... dialogue "MSG001";"Enter setpoint value."\ ";"value? ",setvalue ;time 120,error LBL2 while (setvalue < 50 or setvalue > 100) dialogue "Input range error, reentry."\ ;retry setvalue;time 120,error LBL2 wend ...... FIC001.SV=setvalue ! set the value input by the operator (setvalue) in ! the SV value ...... exit IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



9-11

...... LBL2: * Write error handling for the case operator did not perform dialogue input. In this example, the program is written so that the message “Enter setpoint value”. is displayed in the dialogue message screen or dialogue message window. The program checks to see if the data input from the dialogue message window is a value within the range (50 to 100), and if it is out of range, the reentry dialogue message “Input range error, reentry”. is displayed.

l

Description of an Acknowledgment Dialogue Message ...... dialogue "MSG002";"Catalyst charge complete?";confirm;time 120,error LBL2 ...... exit ...... LBL2: * Write error handling for the case operator did not perform dialogue acknowled gment. In this example, the program is written so that the message “Catalyst charge complete?” is displayed and the program waits until acknowledgment is given with the confirm key.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-12



9.3

message The “message” statement is used for printing out the desired character string or the character string designated by the printout message element number, as a sequence message. The character string is stored in the historical file.

n Usage of “message” Statement message [, ...] PR, [, ] Define the format character string.

The output value is designated as a numeric type expression or as a character string. A maximum of eight values can be designated.



Designate the print message number (nnnn of %PRnnnn) with an integer number (*1).



Designate the parameter value with an integer-type expression (0 to 65535).

*1:

For SFCS, it ranges between 0001 and 0200. For KFCS, LFCS, it ranges between 0001 and 0400. For FFCS, KFCS2, LFCS2, it ranges between 0001 and 1000. For FFCS-V, it ranges between 0001 and 2000.

Figure 9.3-1 The format of the “message” statement

The following points need to be noted when using “message” statement.

SEE ALSO



In the case of a desired character string, the length of the character string that can be printed or stored in the historical file is up to 128 bytes.



When there is an element number designation, a maximum of three process data designated via the Print Message Builder are added to the message.



When there is an element number designation, a can be designated. Of the three process data that are added to the message to be printed out, if the first data is not designated by the Print Message Builder, then the value of the designated is printed out as the first data value. If the first data is designated by the Print Message Builder, then the designated data is printed out and the designated in the “message” statement is not output. If neither the first data is designated by the Print Message Builder nor a designated, the data value becomes 0. If the value falls outside the range of 0 to 65535, a run-time error occurs.



The message is transferred to all HISs. However, the message will not be displayed on the HIS to which a user with no operation and monitoring authority against the originating FCS is logged in.



The tag name of the unit instrument that started the operation is added to the message output by the operation using the “message” statement.

For more information about format character string, refer to: 9.9, “Character String Format” on page 9-23

n Description Example of “message” Statement Description examples of “message” statement are shown below:

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-13



l

Description Example of Printing the Desired Character String as a Message ...... message "Valve abnormal" ...... With the above message statement, the message [valve malfunction] is printed out.

l

Description Example of Printing the Printout Message %PR0003 of the Present FCS ...... message PR,3 ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-14



9.4

history The “history” statement is a message statement for storing the desired character string or the character string designated by the printout message element number, as a message in the historical file. The message that is output by a “history” statement will not be printed. Except for the fact that the message is not printed, the “history” statement has the same action as the “message” statement.

n Usage of “history” Statement The format of “history” statement is shown below: history [, ...] PR, [, ] Define the format character string.

The output value is designated as a numeric type expression or as a character string. A maximum of eight values can be designated.



Designate the print message number (nnnn of %PRnnnn) with an integer number (*1).



Designate the parameter value with an integer-type expression (0 to 65535).

*1:

For SFCS, it ranges between 0001 and 0200. For KFCS, LFCS, it ranges between 0001 and 0400. For FFCS, KFCS2, LFCS2, it ranges between 0001 and 1000. For FFCS-V, it ranges between 0001 and 2000.

Figure 9.4-1 The format of the “history” statement

SEE ALSO

For more information about format character string, refer to: 9.9, “Character String Format” on page 9-23

n Action of “history” Statement •

In the case of a desired character string, the length of the string stored in the historical file is up to 128 bytes.



When there is an element number designation, a maximum of three process data designated via the Sequence Message Request Builder are added to the message.



When there is an element number designation, a can be designated. Of the three process data that are added to the message to be printed out, if the first data is not designated by the Print Message Builder, then the value of the designated is printed out as the first data value. If the first data is designated by the Print Message Builder, then the designated data is printed out and the designated in the “message” statement is not output. If neither the first data is designated by the Print Message Builder nor a designated, the data value becomes 0. If the value falls outside the range of 0 to 65535, a run-time error occurs.



The message is transferred to all HISs. However, the message will not be displayed on the HIS to which a user with no operation and monitoring authority against the originating FCS is logged in.



The tag name of the unit instrument that started the operation is added to the message output by the operation using the “history” statement. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-15



n Description Example of “history” Statement Description examples of “history” statement are shown below:

l

Description for Logging Character String as a Message to Historical Log File ...... history "Pump abnormal" ...... With the above history statement, the message [pump malfunction] will be stored in a historical file.

l

Description Example of Logging Printout Message %PR0003 of the Present FCS to Historical Log File ...... history PR,3 ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-16



9.5

request The “request” statement is a message statement that outputs various messages by designating the message type and element number.

n Usage of “request” Statement request ,

Designate the type of message to be output.



Designate the element of the message to be output with an integer number.

Figure 9.5-1 The format of the “request” statement

Message types and message element numbers are shown as follows. Table 9.5-1 Message types and message element numbers Symbol

Description

Range of Element Number

VM

Multimedia start message

0001 to 0100 (nnnn in %VMnnnn)

RQ

Sequence Message Request

0001 to 0200 (nnnn in %RQnnnn)

CP

Supervisory Computer event message

0001 to 9999 (nnnn in %CPnnnn)

M3

Supervisory Computer event message for PICOT

0001 to 9999 (nnnn in %M3nnnn)

n Action of request Statement •

The destination of the message transfer conforms to the operation group definition.



The tag name of the unit instrument that started the operation is added to the message output by the operation using the “request” statement.

n Description Example of “request” Statement A description example of outputting the number 3 sequence message request is shown below: ...... request RQ,3 ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-17



9.6

sysalarm The “sysalarm” statement is a message statement that generates a system alarm using the desired character string. Normal status can be restored from a state where a system alarm has been generated.

n Usage of “sysalarm” Statement • Alarm occurrence sysalarm [,...] • Alarm recovery sysalarm recover [,...]

Define the format character string.



The output value is designated as a numeric type expression or as a character string. A maximum of eight values can be designated.

Figure 9.6-1 The format of the “sysalarm” statement

The following points need to be noted when using “sysalarm” statement.

SEE ALSO



Generates a system alarm of the current FCS using the desired character string created by following the format character string, and recovers from the alarm state. When the alarm is generated, the message mark in the system alarm message view turns red, and it turns green after recovery.



The length of the character string that can be stored in the historical file or printed is 128 bytes.



The message is transferred to all HISs. However, the message will not be displayed on the HIS to which a user with no operation and monitoring authority against the originating FCS is logged in.

For more information about format character string, refer to: 9.9, “Character String Format” on page 9-23

l

Description Example of Generating a System Alarm Message and Recovering from the Alarm State block PVI T100 ...... if (T100.ALRM == "IOP") then sysalarm "Thermometer T100 failure" end if ...... if (T100.ALRM "IOP") then sysalarm recover "Thermometer T100 recovered" end if ...... With the above “sysalarm” statement, the message “Thermometer T100 failure” is output when the alarm status of T100 becomes IOP, and the message “Thermometer T100 recovered” is output when the status returns to normal. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-18



9.7

prcsalarm The “prcsalarm” statement is a message statement that generates a process alarm in the SFC block where the “prcsalarm” statement has been executed. An operation can initiate an alarm or recovery message using “unit prcsalarm” statement or “unit prcsalarm recovery” statement.

SEE

ALSO

For more information about “unit prcsalarm” statement or “unit prcsalarm recovery” statement, refer to: 9.8, “unit prcsalarm” on page 9-22

n Usage of “prcsalarm” Statement • Alarm occurrence prcsalarm • Alarm recovery prcsalarm recover [ ] Designate the character string for the alarm status to generate or recover, as a constant or variable. The alarm status character string can contain a maximum of 8 bytes. Figure 9.7-1 The format of the “prcsalarm” statement



By using the “prcsalarm” statement, a process alarm occurrence message can be output using the designated character string. If the corresponding alarm has already occurred, the process alarm message is not output.



The alarm status strings are using the strings defined on User-Defined Status Character String Builder for alarms. In one set of alarm status strings, 23 strings can be defined. The user-defined strings and a NR string (string for normal status) comprise a set of userdefined status character strings. What set of the stings to be applied can be specified for each SFC block, the default set of strings for SFC blocks is USER10. When prcsalarm statement using an undefined string as its parameter, an error will occur when running this statement.



A “recover” designation in the “prcsalarm” statement will output a process alarm recovery message using the designated process alarm character string. The status (data item ALRM) of the corresponding alarm becomes the alarm recovery status. If the corresponding alarm has not occurred, the process alarm recovery message is not output. If an alarm status character string is not designated, all alarms occurring in the subject SFC block will recover and a process alarm recovery message will be output for each alarm that has recovered. If a “prcsalarm” statement is executed with the “recover” designation in and all alarms in the subject SFC block are recovered, a process alarm recovery message for normal alarm status (NR) is output.



In the SFC block, the data item STEPNO at the point the message occurred is added as data to the process alarm occurrence and recovery messages.



One SFC block can output one process alarm message during each basic scan period. If an attempt is made to output two process alarms in one period, that SFC block delays for one period. The second “prcsalarm” statement will be executed during the next basic scan period.



Each time the SFC block is started, the alarm status (ALRM) is initialized to a normal state (NR). In other words, if the SFC block is terminated while the process alarms generated during the previous execution still exist, those process alarms are recovered by the system when the SFC block starts up and a process alarm recovery message is output. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-19





The builder can designate to output a repeating alarm when the SFC block continues to be executed for more than the fixed time, without having the process alarm generated by a “prcsalarm” statement recover using the “prcsalarm recover” statement. Only the SFC block that is currently running (block status is RUN or PAUS) will be subject to the repeating alarm. Even if the SFC block terminates execution with the process alarm still generated, (block status changes to STOP or ABRT), a repeating alarm is not output. Except for the fact that the currently running SFC block is the only subject to the repeating alarm, it is the same as other function blocks.



There are two data items in an SFC block: alarm detect specification (AF) and alarm masking specification (AOFS). The process alarm message output by the “prcsalarm” statement conforms to the designation of these data items.

TIP The SFC block has the “alarm flashing status” data item (AFLS). The relationship between the alarm flashing

status and the alarm flashing action of the SFC block in the operation and monitoring function conforms to the general function blocks.

The following flowchart shows process alarm occurrence actions for an SFC block: Start

Execute prcsalarm

Alarm detect ion group bypass is enabled

Yes

No Alarm group suppression is enabled

No

Yes Suppress the alarm flashing action

The corresponding alarm is already generated

Yes

No

Generate a process alarm

End

Figure 9.7-2 Actions of Process Alarm Occurrence in an SFC Block

The following flowchart shows the recovery actions from an SFC block process alarm.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-20

Start

Execute prcsalarm recover

Alarm detection group bypass is enabled

Yes

No Alarm group suppression is enabled

No

Yes Suppress the alarm flashing action

The corresponding alarm is already generated

No

Yes Recover from process alarm

Process alarm being generated is cleared.

No

Yes Output NR process alarm recovery message

End

Figure 9.7-3 Actions of Process Alarm Occurrence in an SFC Block

SEE ALSO

For more information about the explanation of alarm processing, refer to: 5.15.1, “Alarm Display Flashing Actions” in the Function Blocks Overview (IM 33K03E21-50E) For more information about data items related to SFC block alarms, refer to: 1.6.9, “SFC Block Alarm Processing” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

n Description Example of “prcsalarm” Statement Description Example of Outputting the Process Alarm HIGH are shown below: IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



*

9-21

...... At this point, the alarm has not been generated. prcsalarm "HIGH" ! The message, alarm "HIGH" occurrence, is output. ...... prcsalarm recover "HIGH" ! The two messages, alarm "HIGH" recovery and ...... ! normal state (NR) are output.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



9.8

9-22

unit prcsalarm A process alarm of a unit instrument is referred to as a unit process alarm. The “unit prcsalarm” statement is a message statement that generates a unit process alarm. It also recovers to the normal state before the unit process alarm was generated.

n Usage of “unit prcsalarm” Statement • Alarm occurrence unit prcsalarm • Alarm recovery unit prcsalarm recover [ ] Designate the character string for the alarm status to generate or recover, as a constant or variable. The alarm status character string can contain a maximum of 8 bytes. Figure 9.8-1 The format of the “unit prcsalarm” statement



By using the “unit prcsalarm” statement, a process alarm occurrence message can be output using the designated process alarm character string. The status (unit instrument data ALRM) of the corresponding alarm becomes the alarm occurrence status. If the corresponding alarm has already occurred, the process alarm message is not output.



The alarm status strings are using the strings defined on User-Defined Status Character String Builder for alarms. In one set of alarm status strings, 23 strings can be defined. The user-defined strings and a NR string (string for normal status) which comprises a set of user-defined status character strings. What set of the strings to be applied can be specified for each unit instrument, the default set of strings for unit instruments is USER11. When prcsalarm statement using an undefined string as its parameter, an error will occur when running this statement.



A “recover” clause in the “unit prcsalarm” statement will output a process alarm recovery message using the designated process alarm character string. The status (unit instrument data ALRM) of the corresponding alarm becomes the alarm recovery status. If the corresponding alarm has not occurred, the process alarm recovery message is not output. If an alarm status character string is not designated, all alarms occurring in the unit instrument will recover and a unit alarm recovery message will be output for each alarm that has recovered. If a “unit prcsalarm” statement is executed with the “recover” designation and all alarms in the unit instrument are recovered, a unit alarm recovery message for normal alarm status (NR) is output.



The value for the unit instrument data STEPNO at the time a “unit prcsalarm” statement or “unit prcsalarm recover” statement is executed, is added to the unit process alarm occurrence and recovery messages.



The operations that are started up from the same unit instrument can output only one unit alarm message during each basic scan period. If an attempt is made to output two unit alarms in one period, that operation delays for one period (even if another operation started up by the same unit instrument is outputting a unit process alarm, the delay occurs). The second “unit prcsalarm” statement (or “unit prcsalarm recover” statement) is executed during the next basic scan period.



Each time the unit instrument is started up, the unit instrument data ALRM is initialized to a normal state (NR). In other words, if the unit instrument is terminated while the unit alarms generated during the previous execution still exist, those unit process alarms are recovered by the system when the unit instrument starts up and a unit process alarm recovery message is output.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-23



9.9

Character String Format The character string format is the designation to edit output messages.

n Usage of Character String Format By using the format character string, messages can be edited by format designations such as flag characters and field minimum width for output. A format character string roughly has the following two elements: •

Regular character strings, which are output as is.



Conversion specification, which converts the character according to the designated format and then outputs it. The conversion specification starts with a % and ends with a conversion character, as shown below. If ‘%’ is to be output, use %%. %[] [] [.]

Figure 9.9-1 The format of the character string format

Flag Character (can be Omitted)

l

-: shifts the conversion result to the left. +: attaches a sign to a numeric value.

Field Minimum Width (can be Omitted)

l

This is a decimal string that designates the field minimum width. When the converted value becomes a character string narrower than the this value, fillers are added on the left side. If the field minimum width designation does not begin with a 0, a space will be used as the filler, and if it begins with 0, 0 is used.

Accuracy (can be Omitted)

l

Designates the maximum number of characters that can be output for a character string, or the digits below the decimal point that can be output for a float or double value.

Conversion Character

l •

a The output value is received as a color code and changes the display color thereafter. In this format (a-format), the color code is converted to a character string called “escape sequence”. This character string is embedded into the output character string and is converted to a color designation at the time of display. The color codes and corresponding colors are indicated below: 0 : black

8

: steel blue

1 : red

9

: pink

2 : green

10 : blue-green

3 : yellow

11 : gold yellow

4 : blue

12 : moss green

5 : magenta 13 : purple



6 : cyan

14 : cyan blue

7 : white

15 : gray

d IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-24



The output value is converted to a decimal number. The smallest digit to be output is designated in the accuracy. The default accuracy is 1. •

e The output value is received as float or double, and converted to a decimal number in the format, [-]m.nnnnnnE[±]xx. In this expression, there is one digit before the decimal point and the number of digits designated in the accuracy exists after the decimal point. The default accuracy is 6.



f The output value is received as float or double, and converted to a decimal number in the format, [-]mmm.nnnn. The default accuracy is 6.



g This is output in either the e-format or f- format. The number of digits designated in the accuracy becomes the number of significant digits. The e-format is used when the exponent obtained by the conversion of an e-format is smaller than -4 or when it is larger than the designated accuracy. A decimal point is added only when there is a number that follows it. A zero at the left that has no significance is not output.



o Converts the output value to an octal number. Designates the smallest digit to be output as the accuracy. The default accuracy is 1.



s Receives the output value as a character string, and outputs all characters in the character string or outputs the number of characters designated in the accuracy.



x Converts the output value to a hexadecimal number without a lower case sign ($ is not placed at the top). The smallest digit to be output is designated in the accuracy. This default accuracy is 1.



X Converts the output value to upper-case hexadecimal numbers. Besides that, this character is the same as x.

n Conversion of the Character String “YOKOGAWA SEBOL” (14 characters) Using %s Each output range is enclosed in colons to make it more recognizable. Output ranges vary depending on the specification for %s. :%s: :%10s: :%.10s: :%-10s: :%20s: :%.20s: :%-20s: :%20.10s: :%-20.10s:

:YOKOGAWA :YOKOGAWA :YOKOGAWA :YOKOGAWA :YOKOGAWA :YOKOGAWA :YOKOGAWA :YOKOGAWA :YOKOGAWA

SEBOL: SEBOL: S: SEBOL: SEBOL: SEBOL: SEBOL: S: S:

n format Statement The “format” statement is an instruction statement to format the character string and store it in a character-string variable.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



9-25

format [,...] ; Define the format character string.

Designate data to be formatted with a numerical expression or character string (maximum of eight data).

Designate a local character-string variable that stores the format character string. Figure 9.9-2 The format of the “format” statement

l

Example of Editing Time with a “format” Statement integer year,mon,day integer hour,min,sec char*80 str ...... getdate(year,mon,day) gettime(hour,min,sec) ...... format

! ! ! !

getdate is the built-in function for acquiring the year, month, day gettime is the built-in function for acquiring the hour, minute, second

" '%2dyear:%2dmonth:%2dday(%2dhour:%2dminute:%2dsecond)",\ year,mon,day,hour,min,sec;str

...... end When the above program is executed, the character string [’ 8year: 3month:14day (08hour: 12minute:07second)] is set in the character string variable “str”. Since the year, month and day conversion specification is %2d, for one-digit data as in 3, a space is added to make it two digits as in [ 3month] (one space is placed before the 3). Since the hour, minute and second conversion specification is %02d, for one-digit data as in 8, a zero is used to make it two digits, as in [08hour].

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-26



9.10

Limitations on Message Output

The number of messages that can be output with a message statement are subject to the following limitations: •

The maximum number of messages that an SFC block can output during each basic cycle is 3.



The maximum number of messages that all the SFC blocks within the same control station can output is 30.

n SFC Block Actions When the Number of Messages Reaches the Output Limit When the total number of messages output via a message statement such as the “opeguide” statement and SEBOL error messages reaches the limit during one cycle, the SFC block that attempted to execute the message statements (the message statement will be executed in the next cycle) and the SFC block (SEBOL error messages are output in the relevant cycle) that output the SEBOL error messages (errors that can continue the operation) are delayed for one cycle.

n Messages Subject to the Limitations The table below lists the messages that are subject to the limitations as well as the SFC block operations when the SFC block has attempted to output a message in excess of the number limitation. Table 9.10-1 Messages Subject to the Limitations Output method

Operation

opeguide statement dialogue statement message statement history statement request statement sysalarm statement sysalarm recover statement

When an SFC block attempts to output a message in excess of the number limit, that SFC block delays one cycle, and the message statement is executed during the next cycle.

prcsalarm statement (*1) prcsalarm recover statement (*1) unit prcsalarm statement (*2) unit prcsalarm recover statement (*2)

SEBOL error message

*1: *2: *3:

The error message is output during the basic cycle in which the error was detected. In the case of an error that can continue the operation (*3), if the number of messages exceeds the limit, the relevant SFC block delays one cycle and execution is resumed from the next cycle.

In addition to this limitation, another limitation is applied that only one process alarm can be generated during each cycle. In addition to this limitation, another limitation is applied that only one unit process alarm can be generated during each cycle. If it is not an error that can continue the operation, the relevant SFC block is forcefully terminated.

n Limitations when CPU Time is Monopolized The following explains the limitations when CPU time is monopolized by a “nopreempt” statement, etc. There are three instances when CPU time is monopolized:

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

9-27





Between “nopreempt begin” and “nopreempt end”



SEBOL one-shot execution step in an SFC block



Pre-status change processing of an SFC block

The following limitations apply to messages that can be output during a monopoly on CPU time:

(A) Total Number of Statement Messages that can be Executed is Three or Less

l

The total number of messages that can be output by an “opeguide” statement, “message” statement, “history” statement, “request” statement, “sysalarm” statement and “sysalarm recover” statement must be three or less. If an attempt is made to output the fourth message, a run-time error occurs. Error handling is not performed and a SEBOL error message is output. If the CPU time was monopolized by a “nopreempt” statement or a SEBOL one-shot execution step, the fourth message is output during the next cycle. If the operation is pre-status change processing, the fourth message is discarded.

(B) A “dialogue” Statement cannot be Executed

l

If a “dialogue” statement is executed, a run-time error occurs. Error handling is not performed and a SEBOL error message is output. If CPU time was monopolized by a “nopreempt” statement or a SEBOL one-shot execution step, the “dialogue” statement is executed the next time CPU time is allocated. If the operation is pre-status change processing, the dialogue message is discarded.

(C) The Number of Messages that can be Output with a prcsalarm Statement or prcsalarm recover Statement is One

l

While CPU time is being monopolized by a “nopreempt” statement or a SEBOL one-shot execution step, the number of messages that can be output by a “prcsalarm” statement or “prcsalarm recover” statement is one. If an attempt is made to output the second message, a runtime error occurs. Error handling is not performed and a SEBOL error message is output. The second message is output during the next cycle.

(D) A “prcsalarm” Statement and “prcsalarm recover” Statement cannot be Executed

l

In pre-status change processing, a “prcsalarm” statement and “prcsalarm recover” statement cannot be executed. If they are, a run-time error occurs and the message is discarded. The number of messages that can be output from message statements is subject to the following limitations: •

Limitation (1) The maximum number of messages that can be output from one SFC block during one basic period is 3.



Limitation (2) The maximum number of messages that can be output from all of the SFC blocks in one control station during one basic period is 30.

When CPU time is not monopolized, the following relationships exist between limitation (A) and limitations (1) and (2) explained above: •

The three messages that can be output during the monopolization on CPU time do not include the messages that have already been output during the same cycle prior to the monopoly on CPU time occurred. However, the messages output during the CPU time monopolization are included in the number of messages for (1) and (2).



At the time when the monopolization on CPU time by a “nopreempt” statement or SEBOL one-shot execution step is canceled, if the total number of output messages (including those output prior to the monopoly on CPU time) exceeds the limits in (1) or (2), that SFC IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



9-28

block delays one cycle. After the pre-status change processing, there will be no delay even if the number of messages exceeds the limits in (1) or (2). The following explains the one cycle delay that accompanies the limits in (C): when beginning an execution that will monopolize CPU time, in other words, when beginning to execute a “nopreempt” statement or a SEBOL one-shot execution step, if that SFC block has already executed a “prcsalarm” statement or “prcsalarm recover” statement during that cycle, the SFC block delays one cycle. The processing that monopolizes CPU time will be executed in the next cycle.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



10.

10-1

Allocating CPU Time Using nopreempt Statements

▼ Allocating CPU Time

With the FCS, multiple SFC blocks can be executed simultaneously. CPU time is allocated to each SFC block, which is then executed.

n Allocating CPU Time in SEBOL When multiple SFC blocks are simultaneously executed, if only the data in the FCS to which the SFC blocks belong is to be accessed, usually the CPU is allocated to each SFC block so that the SEBOL program in each SFC block will execute 20 lines at a time. However, if other FCS data is accessed while these 20 lines are being processed, or if a statement that performs communication and waits for completion of that communication — such as the “dialogue” statement — is executed, that SFC block enters the wait state and the CPU is allocated to the next SFC block. In SEBOL, normally 20 lines are treated as a single block and executed at the same time. However, it cannot be determined where to delimit processing in the lines that are executed at the same time. For example, when an interrupt signal or status change command is received, the interrupt processing will be executed. Thus it cannot be guaranteed that multiple lines will be executed with the same timing. This is because depending on the interrupt processing, the statements prior to and after the interrupt will not necessarily be executed at the same time. In this case like this, use the “nopreempt” statement in SEBOL to allocate CPU time solely to one SFC block. nopreempt begin nopreempt end Figure 10-1 The format of the “nopreempt” statement

n Rules for Governing the Allocating of CPU Time The following explains the rules governing the allocation of CPU time. •

The SFC block between the “nopreempt begin” and “nopreempt end” statements will monopolize CPU time and continue to be executed. Even if an interrupt signal or a status change command is received, interrupt processing will not be performed until the “nopreempt end” statement is executed. Thus, statements occurring in this section are guaranteed to be executed using the same timing.



If the “nopreempt begin” statement is executed between the “nopreempt begin” and “nopreempt end” statements, a run-time error occurs and the monopolization of CPU time will be canceled. If the “nopreempt end” statement is executed without executing the “nopreempt begin” statement, it will be ignored and no error will occur.



A SEBOL one-shot execution step in the SFC block will monopolize CPU time when executed in exactly the same way as a statement placed between the “nopreempt begin” and “nopreempt end” statements.



If a “nopreempt begin” statement is executed during an SFC block interrupt program and interrupt processing is completed with a “return” statement without executing the “nopreempt end” statement, the CPU time monopoly will be canceled. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



10-2



When the function is terminated by“return” statement, the CPU time monopoly will still exist cannot be canceled.



If the execution of step actions is terminated with a “quit” statement in an SFC block, the CPU time monopoly will be canceled.

Limitations in the Section between the “nopreempt begin” and “nopreempt end” Statements

l

The SFC block monopolizing CPU time continues to execute processing, and if a wait state occurs, CPU time cannot be allocated to other SFC blocks in the FCS. Because of this, statements that can be described between the “nopreempt begin” and “nopreempt end” statements are subject to the limitations given below. If these limitations are disregarded, a run-time error occurs. •

The statements between the “nopreempt begin” and “nopreempt end” statements must be described within 20 lines. The “nopreempt begin” and “nopreempt end” statements are not included in these 20 lines. The 21st line and those after are executed when CPU time is allocated for the next time, without monopolizing CPU time. If there is an error or errorsub indication in the 21st line, even if there is common error handling, it will not branch into error handling and a SEBOL error message will always be output.



The data of other FCS cannot be accessed. If an attempt to access data is made, a runtime error occurs and data cannot be read or written.



When a condition is not satisfied at one time in a “compare” statement, the statement acts the same way as when the time designation counts up.



A “drive” statement cannot be used.



“drive vpmon” statement and “drive vpmoff” statement cannot be used.



The drivewait designation cannot be used in “seqtable” statement and “logicchart ” statement.



“while to wend,” “repeat to until” and “for to next” cannot be used, since they create a one-cycle delay each time processing is repeated. On the other hand, “while to wend@,” “repeat to until@” and “for to next@” do not create a delay each time processing is repeated, and therefore can be used.



A “wait until” statement cannot be used.



A “delay” statement and “delaycycle” statement cannot be used.



A signal cannot be sent to another FCS.



A “qsigcancel” statement and “qsigmove” statement cannot be used in an SFC block in another FCS.



A “dialogue” statement cannot be used.



A “nopreempt begin” statement cannot be used.



A “semlock wait” statement cannot be used. However, a “semlock” statement without a wait designation can be used.



A “wait for qsignal” statement cannot be used.



An “ssdtwrite” statement and “ssdtwritebit” statement cannot be used.

If an on-demand run-time error occurs between a “nopreempt begin” and a “nopreempt end” statement, the monopolization of CPU time will be canceled. Even if an error variable is designated, if an error is detected during execution, the monopolization of CPU time will be canceled. Also, even if an error or errorsub is designated or the control branches into common error handling, the monopolization of CPU time will be canceled.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

10-3



SEE ALSO

For more information about the “drive vpmon” statement, refer to: 3.8.2, “drive vpmon Statement” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E) For more information about the “drive vpmoff” statement, refer to: 3.8.3, “drive vpmoff Statement” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

l

Limitations on CPU Time Monopolization Table 10-1 Limitations on CPU Time Monopolization Statement

Action when an error occurs

Limitations

Expression, assignment statement, built-in function

Cannot access data in other stations

Action 1

drive

Cannot use

Action 2

compare

Compares only once

Action 1

seqtable

Cannot designate drivewait

Action 2

logicchart

Cannot designate drivewait

Action 2

for to next

Error when a delay occurs

Action 3

while to wend

Error when a delay occurs

Action 3

repeat to until

Error when a delay occurs

Action 3

wait until

Cannot use

Action 2

delay

Cannot use

Action 2

delaycycle

Cannot use

Action 2

dialogue

Cannot use

Action 2

signal

Send destination cannot be another station

Action 1

qsigcancel

SFC block of operation target cannot be another staAction 1 tion

qsigmove

SFC block of operation target cannot be another staAction 1 tion

semlock wait

Cannot use

Action 2

nopreempt begin

Cannot use

Action 2

wait for qsignal

Cannot use

Action 2

Actions when an error occurs when limitations are disregarded during execution are divided into the following three types:

l

Action 1 Branching occurs if a branch destination is designated with the “error” or “errorsub” statement, or if there is common error handling. If the control branches into error handling, a SEBOL error message will not be output. When CPU time is allocated to that SFC block for the next time, execution continues from the next line after the line in which the error occurred (if there is error handling, then error handling).

l

Action 2 The control does not branch into error handling, even if a branch destination is designated with the error or “errorsub” statement, or if there is common error handling. The SEBOL error message is always output. When CPU time is allocated to that SFC block for the next time, the line in which the error occurred is executed once again. In other words, execution continues from the line in which the error occurred.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

10-4



Action 3

l

Branching occurs if there is common error handling. If the control branches into the error handling processing, a SEBOL error message will not be output. When CPU time is allocated to that block for the next time, execution continues from the line after the “next,” “wend” or “until” statement (if there is error handling, then the error handling).

TIP Actions at the time of an error are the same as usual, except that CPU time monopolization is canceled. SEE

ALSO

For more information about error handling, refer to: 13., “Error Handling” on page 13-1

n Example of a “nopreempt” Statement The following describes an usage example of the “nopreempt” statement:

Example of Processing when an Interrupt Signal is Received

l

Even if an interrupt signal is received between the “nopreempt begin” and “nopreempt end” statements, processing for signal receive will not be processed until the “nopreempt end” statement is executed. Also, even if a status change command is received, the status change will not be processed until the “nopreempt end” statement is executed. Pre-status change processing and status change will be executed after the “nopreempt end” statement is executed. If the SFC block performing the process between the “nopreempt begin” and “nopreempt end” statements receives an interrupt signal, interrupt processing will be executed after the “nopreempt end” statement is executed. ...... nopreempt begin ...... signal "SG1" ! The SFC block performing the processing sends an interrupt ! signal to itself opeguide OG, 2 ...... nopreempt end In this example, after [signal “SG1”] is executed, the lines following [opeguide OG ,2] will monopolize CPU time as before and continue to be executed. At the point where the “nopreempt end” statement is completed, the SG1 interrupt signal will be processed.

TIP



When execution of the program resumes after an error occurs, it will not monopolize CPU time until the “nopreempt” statement is executed once again.



Interrupt signals or status change commands from another FCS are received while a “nopreempt” statement is being used. Because that SFC block is monopolizing CPU time, other SFC blocks within the same FCS do not execute “signal” statements, etc.



The action is the same as for a sequence table is having an one-shot execution by a “seqtable” statement from an SFC block when it sends an interrupt signal to that SFC block via a %EV.



The action is the same as for a logic chart is having an one-shot execution by a “logicchart” statement from an SFC block when it sends an interrupt signal to that SFC block via a %EV.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

10-5



Example of Processing when Block Status is Changed to STOP

l

Even if the block status of the SFC block performing the processing is changed to STOP between the “nopreempt begin” and “nopreempt end” statements, that block continues to be executed retaining its monopoly on CPU time until the “nopreempt end” statement. However, the block status will be changed using the timing at which [%.BSTS=”STOP”] is executed. ...... nopreempt begin ...... %.BSTS = "STOP" sing ...... nopreempt end

! % indicates the SFC block performing the proces

In a SEBOL one-shot execution step or between a nopreempt begin and “nopreempt end” statement, even if the block status of the current SFC block is changed to STOP, it will retain its monopoly on CPU time and continue to be executed until the “nopreempt end” statement. However, if there is processing prior to the status change, then that processing is executed using the timing at which [%.BSTS=”STOP”] is executed, and the block status is changed. If there is processing after the status change when the “nopreempt end” statement is reached, that processing is executed and monopolization on CPU time is canceled. When the post-status change processing is complete, execution of that SFC block is complete. If there is no post-status change processing, execution of the SFC block is terminated when the “nopreempt end” statement is reached.

TIP

l



The action is the same for sequence table executed in one-shot with a “seqtable” statement when the block status of that SFC block has been changed.



The action is the same for sequence table executed in one-shot with a “logicchart” statement when the block status of that SFC block has been changed.

Example of Processing when Block Status is Changed to PAUS In a SEBOL one-shot execution step or between the “nopreempt begin” and “nopreempt end” statements, even if the block status of the current SFC block is changed to PAUS, it will retain its monopoly on CPU time and continue to be executed until the “nopreempt end” statement. However, if there is pre-status change processing, then that processing is executed using the same timing as [%.BSTS=“PAUS”], and the block status is changed. If there is post-status change processing when the “nopreempt end” statement is reached, that processing is executed and monopolization on CPU time is canceled. When post-status change processing is complete, the execution of that SFC block is paused. If there is no post-status change processing, the execution of the SFC block pauses when the “nopreempt end” statement is reached. ...... nopreempt begin ...... %.BSTS = "PAUS" ...... nopreempt end

! % indicates the SFC block performing the processing

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

10-6



Counting the Number of Execution Lines in CPU Time Allocation

l

In the “nopreempt” statement, the number of lines that can be executed while retaining a monopoly on CPU time is 20. The following reasoning is used in determining the number of lines: •

The execution lines are not lines from the source file, but lines to be executed.



When lines are continued using // or \, they are counted as one line.



When using “while” to ”wend@,” “repeat” to ”until@” or “for” to ”next@,” the executed lines are added up each time loop processing is repeated. With while, “wend@,” “until@” and “next@” statements, they are counted as one line even when loop processing is repeated. With the “for” statement, only the first of the repetitions are counted; in other words, the initial value, final value and increments of the “for” statement are added only once at the beginning of the repetitions.



“if,” “else if,” “switch” and “goto” statements are counted as one line.



“end if,” “else,” “repeat,” “case” and “otherwise” statements are not counted as execution lines. This is because these statements are only used to determine the branching destination of control statements.



The “nopreempt begin” and “nopreempt end” statements are not counted as execution lines.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

11-1



11.

Managing Shared Resources Using semlock and semunlock Statement

▼ Managing Shared Resources

With the FCS, multiple SFC blocks are executed simultaneously, while shared resources after that use semaphores.

n Shared Resources Based on Semaphores With the FCS, multiple SFC blocks are executed simultaneously. SEBOL uses a control method called logical semaphores (or binary semaphores) to synchronize multiple SFC blocks within the same FCS. When multiple SFC blocks are using a single resource, the use of the same resource by SFC blocks other than the one currently using the resource can be restricted by employing semaphores. •

In a semaphore, the user assigns a name with a character string of 8 bytes or less. This name is called the “semaphore name”.



When multiple SFC blocks within the same FCS perform a semaphore operation with respect to the same semaphore name, they can be synchronized. The number of semaphores that can be used simultaneously within a single FCS is 10. If the number of semaphores that can be used in a FCS is exceeded, a run-time error will occur.



Only SFC blocks within the same FCS can be synchronized with semaphores.



Semaphores cannot be used across different FCS for synchronization.



If semaphores of the same name are used in multiple FCS, they are treated as separate semaphores.

The following example shows how the semaphore [SEM0] is operated in two SEBOL programs, prog1 and prog2: Lock SEM0

Unlock SEM0

prog1

prog 2 Waiting to lock SEM0

Waiting for SEM0 is canceled and execution restarts

Time

Figure 11-1 Program Action Using Semaphore Management

n “semlock” Statement and “semunlock” Statement A semaphore is locked using a “semlock” statement, and the lock is released using a “semunlock” statement. If there is a wait designation in the “semlock” statement and the semaphore is already locked, that SFC block will wait until the semaphore lock is released. If there is no

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

11-2



wait designation in the “semlock” statement and the semaphore is already locked, an error will occur immediately. semlock [wait] [;] [; error errorsub

[, ]]

semunlock [; ] [; error [, ]] errorsub The semaphore name is designated with a character-string variable or character-string constant. If the character-string contains more than 9 bytes, those after the eighth byte are disregarded.

This designates the local variable that sets the error code. This is set to 0 when no error occurs.



Designates the branching destination for an error occurrence.



This designates the constant or local variable to identify the location in which the error occurred in error handling.

Figure 11-2 The format of the “semlock” statement and "semunlock" statement



A run-time error occurs when a single SFC block tries to duplicate a lock to the same semaphore. An error will still occur even if there is a wait designation.



If an attempt is made to unlock a semaphore that is not locked, an error will occur when that SFC block is executed.



When a “semlock wait” statement is executed and the program enters a wait status for semaphore unlock, program execution stops until the semaphore is unlocked. However, if an interrupt signal is received during this condition, processing to receive the interrupt signal is executed. Also, a status change command can be received even when the program is in waiting status for semaphore unlock status.



Pre- and post-status change processing are executed at the time the status change command is received, and if a status change is executable, the block status is changed. A “semlock wait” statement cannot be used in interrupt signal processing, post-status change processing or common error handling. A “semlock” statement without wait designation and a “semunlock” statement can be used. Also, a “semlock” statement, “semlock wait” statement and “semunlock” statement cannot be used in pre-status change processing.



If there is an SFC block waiting for the release of a lock at the time a semaphore is unlocked using a “semunlock” statement, the wait status is canceled and execution resumes. If there are multiple SFC blocks in lock-waiting status, the locks are canceled in the order that they assumed the status of waiting for semaphore unlock.



When the SFC block locking a semaphore is complete (block status of the SFC block changes to STOP or ABRT), the semaphore is unlocked.



Even if an SFC block that is locking a semaphore pauses (block status of the SFC block changes to PAUS), the semaphore lock is not canceled. If the SFC block pauses while keeping locks of semaphores, the SFC block waiting for the release of those semaphore locks will remain in the waiting status for unlock. Release the lock as necessary using the “semunlock” statement in the post-status change processing of the PAUS command. An example of this application is given below:

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



1

Initialization

2

Phase 1

Release the lock with the status change processing, since SEM1 should not remain in a locked condition if there is a pause during this interval.

3

Phase 2

semlock "SEM01"

11-3

semlock wait "SEM1"

Pause

Main program

Processing after the PAUS status change 1

Pause processing

integer err . . . . . semlock "SEM01" ; err The lock on semaphore SEM01 is released unconditionally. Since the error variable "err" is designated, even if semaphore SEM01 is not locked, the SEBOL error message is not output just by setting the error code to "err."

Figure 11-3 Releasing the Semaphore Lock During a Pause



There is a system fixed data item, SEMA, in SFC blocks. The semaphore name that is locked with a semlock or “semlock wait” statement is set in the SEMA. When a single SFC block has locked multiple semaphores, the semaphore name that was locked first is set in SEMA. If, by releasing a semaphore lock with the “semunlock” statement, the status changes to where there are no locked semaphores, the SEMA becomes a character string of length 0.

n Deadlock and How to Prevent It If multiple SFC blocks attempt to lock two or more semaphores simultaneously, it is possible that the semaphores already locked in each of these SFC blocks may enter the wait status for lock release with respect to each other. This condition is referred to as “deadlock”. When a single SFC block locks two or more semaphores at the same time, certain considerations are necessary so that deadlock does not occur.

l

What is Deadlock? As an example, suppose two SEBOL programs, sebol1 and sebol2, lock two semaphores, SEM1 and SEM2. As shown below, if sebol1 executes a “semlock” statement with wait designation for SEM1, then SEM2 and sebol2 executes the same statement for SEM2, then SEM1. Both programs may enter a wait status for semaphore unlock, depending on the timing. This condition is called deadlock.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



11-4

Deadlock sebol1

sebol2

semlock wait SEM1 Locks SEM1

semlock wait SEM2 Locks SEM2

semlock wait SEM2 Waits for SEM2 to unlock

Time

semlock wait SEM1 Waits for SEM1 to unlock

Figure 11-4 Deadlock

Preventing Deadlocks

l

Adopt the following procedures when using semaphores to prevent deadlock:

l



A single SFC block should use only one semaphore.



If a single SFC block uses multiple semaphores simultaneously, avoid using wait designations as much as possible.



If multiple semaphores must be used simultaneously with a wait designation, have all SFC blocks lock semaphores in the same order.

Releasing a Deadlock The only way to release a deadlock is to forcibly terminate one or other of the SEBOL programs. When either of the SEBOL programs is forcibly terminated, the semaphore locked by that program is released and the semaphore wait status of the other program is canceled.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-1



12.

Signal Processing

▼ Signal Processing

Signal processing in SEBOL includes signal transmission processing and signal reception processing. In this chapter, signal processing in SEBOL is explained.

n Signal Processing in SEBOL There are the following two types of signal processing in SEBOL:

Signal Transmission Processing

l

In the SEBOL program, this processing transmits signals using the “signal” statement. The transmitted signals are treated as queue signals or interrupt signals depending on the description in the SFC block on the reception side.

Signal Reception Processing

l

Signal reception processing consists of queue signal processing and interrupt signal processing.

SEE ALSO



Queue signal processing: In the SEBOL program, the processing that retrieves a signal arbitrarily from signal queue and executes the signal is called queue signal processing.



Interrupt signal processing: The processing executed when it interrupts the SEBOL program using the timing at which an interrupt program is received is called interrupt signal processing.

For more information about the queue signal processing, refer to: 1.6.1, “Queue Signal Processing” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E) For more information about the interrupt signal processing, refer to: 1.6.3, “Interrupt Signal Processing” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

n Signals Available in Signal Processing l

Signal Names A signal name received by SEBOL program is a character string of eight bytes or less.

l

Signal Parameter Up to eight signal parameters can be added to a signal. The integer, long, float, double, and character-string types can be used for signal parameters. Up to 16 bytes can be used for a character-string type signal parameter.

l

Queue Signal and Interrupt Signal Whether the signal is treated as a queue signal or an interrupt signal depends on the SEBOL description in the SFC block that will receive the signal. Signal type is not specified when the signal is transmitted. At the initial step in the SFC block at signal reception, if the signal name has been specified in the “queue signal” statement, that signal will become a queue signal. If the signal name is described at the beginning of an interrupt signal processing, that signal will become an interrupt signal.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-2



12.1

Signal Transmission Processing

To send a signal to SFC block, “signal” statement can be used. To send a Queue signal or to send an Interrupt signal depends on the scripts in the SEBOL program.

n The “signal” Statement: Signal Transmission Use the “signal” statement to transmit a queue signal or an interrupt signal to the SFC block. A signal can be transmitted to a unit using the “signal” statement.

SEE ALSO

For more information about the signal transmission to a unit, refer to: “■ Transmitting Signals to Units” in 1.7, “Manipulating Unit Instrument from SFC Block” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

n Signal Transmission to Present SFC Block The “signal” statement in the type of “signal transmission to the present SFC block” will transmit the signal to the SFC block the “signal” statement has been executed. If the SFC block of the signal transmission destination cannot receive the signal, a run-time error occurs. signal [,···] [; ] [; error [, ] ] errorsub

Designate the signal name using a character-string constant or a character-string variable not exceeding 8 bytes.

Designate a signal parameter using a numeric expression or a character string. The integer, long, float, double, and character-string types can be used for a signal parameter. If the character string exceeds16 bytes, only the first 16 bytes are valid. Up to eight signal parameters can be designated.

Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

Figure 12.1-1 The format of the “signal” statement (the type of "signal transmission to the present SFC block")

n Signal Transmission to Other SFC Blocks The “signal” statement in the type of “signal transmission to other SFC blocks” can transmit the signal to the SFC blocks that exist in FCS other than the one to which the SFC block executing the “signal” statement belongs. If the SFC block of the signal transmission destination cannot receive the signal, a run-time error occurs.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-3



signal [,···] to [return ] [; ] [; error [, ] ] errorsub

Designate the signal name using a character-string constant or a character-string variable not exceeding 8 bytes.

Designate a signal parameter using a numeric expression or a character string. The integer, long, float, double, and character-string types can be used for a signal parameter. If the character string exceeds16 bytes, only the first 16 bytes are valid. Up to eight signal parameters can be designated. Designate the tag name of the SFC block at the signal transmission destination. Tag names declared in a "block" statement, local generic name declared in a "genname" statement or dummy argument function blocks declared in a "argblock" statement can be designated. The signal name returned by the SFC block that received the queue signal when the signal processing is started.

Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

Figure 12.1-2 The format of the “signal” statement (the type of "signal transmission to other SFC blocks")

n Tag Name Change at Signal Transmission Destination By using the “signal” statement in the type of “signal transmission to other SFC blocks” and the local generic name simultaneously, the tag name at the signal transmission destination can be changed freely. An example of tag name change for signal transmission destination is shown below: Assume that the return signal name is designated for the first parameter of the received signal, and the tag name string character for the second parameter of the SFC block to which the signal will be returned. In the SFC block that received the signal, the signal name and the recipient tag name are retrieved using the “creadpara” built-in function. Then, the retrieved tag name of the opponent is corresponded to the local generic name “gen001” using an “assign” statement and a signal is returned. ..... genname SFC gen001 char*16 signame,tagname ..... signame = creadpara(1) IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



12-4

tagname = creadpara(2) assign tagname to gen001 signal signame to gen001 .....

SEE ALSO

For more information about “creadpara,”, refer to: “■ Fetching Signal Parameters” in 1.6.1, “Queue Signal Processing” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

n Returning the Signal If the “return” is specified when a queue signal is transmitted to another SFC block, the signal with is returned to the SFC block that executed the “signal” statement when the SFC block that received the queue signal starts the signal processing. The signal processing is started using the timing at which, to be strict, the signal recipient SFC block escapes from the “wait for qsignal” statement to start a signal processing. The first parameter for the return signal will be a long type, as shown below: 0: Signal processing started 1: Canceled. When the signal is canceled by the SFC block that sent the signal, there will be no return message. 2: SFC block aborted before the signal processing start. Or the block is stopped when the message returned. When the SFC block is stopped by a fatal error or by ABRT command, block status may become ABRT and the message can not be returned. 3: Error is detected when retrieving a queue signal. In the following cases, the “signal” statement with the “return” designation will cause an error: •

The SFC block that executed the “signal” statement does not have an interrupt signal processing for the and the has not been declared in the “queue signal” statement.



The corresponding signal name has not been declared in the “queue signal” statement in the signal recipient SFC block.

Since the signal transmitted by a “signal” statement with the “return” designation is a queue signal, an error would result if the signal has been defined as an interrupt signal in the signal recipient SFC block, and the signal will be ignored. If the SFC block that has sent a signal using the “signal” statement with “return” designation cannot receive the return signal, a SEBOL error message of the SFC block that attempted to send the return signal will be output. In this case, the SFC block that attempted to send the return message is not affected in the execution, and no branching will occur even if a common error handling exists.

TIP



The system may not be able to receive the return signal if it has already received maximum number of queue signals.



The system will transmit a return signal when a queue signal is canceled or the SFC block that received the queue signal is stopped. If this transmission results in an error, the line number and step number in the resultant SEBOL error message indicate the position of the “wait for qsignal” statement.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-5



12.2

Processing of Queue Signal

Using the “qsigcancel” statement and “qsigmove” statement, the queue signals of the present SFC block or other SFC blocks can be manipulated. However, interrupt signals cannot be manipulated. The “qsigcancel” statement cancels the signal waiting for processing from the queue. The “qsigmove” statement moves a specified signal to the top of the queue.

n “qsigcancel” Statement: Canceling a Signal from the Queue The “qsigcancel” statement cancels the signal waiting for processing from the queue. Only the signals in the queue can be manipulated by the “qsigcancel” statement. Even when a “qsigcancel” statement is executed to a signal which has been set to a “signal in process” state using a “wait for qsignal,” that signal is not affected. To cancel the signal queue of the present SFC block, execute a “qsigcancel” statement without tag name designation. To cancel the signal queue of other SFC block, execute the “qsigcancel” statement with tag name designation.

l

Canceling All Signals in the Queue Executing a “qsigcancel” statement with no designation will cancel all signals in the queue in the SFC block in which the “qsigcancel” statement was executed. qsigcancel [to ] result [; ] [; error [, ] ] errorsub

Designate the tag name of the subject SFC block when manipulating the signal queue of other SFC block. Tag names declared in the "block" statement, local generic name declared in the "genname" statement or dummy argument function block declared in the "argblock" statement can be designated. This can be omitted if the signal queue of the present SFC block is manipulated.

Designate an integer-type local variable name to return the number of signals canceled from the queue.

Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

Figure 12.2-1 The format of the “qsigcancel” statement (with no designation)

l

Canceling by Specifying a Specific Signal If a is designated in the “qsigcancel” statement, all the signals having the will be canceled.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-6



qsigcancel [,, ] [to ] result [; ] [; error [, ] ] errorsub

Designate the queue signal name using a character-string constant or a character-string variable not exceeding 8 bytes.

Designate a signal parameter number using a numeric expression. Designate a signal parameter using a numeric expression or a character string. The signals whose signal parameter for the is the same as the will be the target of control.

Designate the tag name of the subject SFC block when manipulating the signal queue of other SFC block. Tag names declared in the "block" statement, local generic name declared in the "genname" statement or dummy argument function block declared in the "argblock" statement can be designated. This can be omitted if the signal queue of the present SFC block is manipulated.

Designate an integer-type local variable name to return the number of signals canceled from the queue.

Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

Figure 12.2-2 The format of the “qsigcancel” statement (with designating a signal name)

The number of signals canceled from the queue is returned to the . 0 is returned if none has been canceled, and the “qsigcancel” statement terminates normally. If the specified had not been declared as the “queue signal” in the initial step of the SFC block that is to be manipulated, the “qsigcancel” statement results in a run-time error. The scope of manipulated signals can be further narrowed by specifying and . The following explains the specification method to cancel the signal “SIG 1,” whose first parameter value is “HI,” and return the number of signals canceled to the variable “ncancel”. qsigcancel "SIG1", 1, "HI" result

ncancel

The following explains the specification method to cancel the signal “SIG 2,” whose the second parameter value is 5. qsigcancel "SIG2", 2,5

result

ncancel

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



12-7

If a numeric signal parameter is used to narrow the scope of signals that are manipulated, use the integer type (integer or long). If the signal parameter is a real number (float or double), the data might be evaluated as “disagreed” due to the discrepancy. Because real number data has a finite precision, in most cases, a negligible error occurs during type conversion from double or float, or calculation is performed. If the value containing such error is compared, the result will not match.

l

Execution Example of “qsigcancel” Statement Signal queue SG2

SG1

SG1

SG3

SG1

5

3

7

0

3

Execute qsigcnacel “SG1”, 1, 3 result ncancel Signal queue SG2

SG1

SG3

5

7

0

Figure 12.2-3 Execution Example of “qsigcancel” Statement

n “qsigmove” Statement: Moving the Arbitrary Signal to Top of Queue The “qsigmove” statement moves the specified signal to the top of the queue. By using the “qsigmove” statement, the user can instruct the following signal processing. Only the signals in the queue can be moved by the “qsigmove” statement. Even when a “qsigmove” statement is executed to a signal which has been set to a “signal in process” state using a “wait for qsignal,” that signal is not affected. The “qsigmove” statement moves a signal to the top of the queue. A “qsigmove” statement can manipulate only one signal at a time. Even if multiple signals that are target of manipulation exist, only the signal that comes first in the processing order will be moved. To move the signal queue of the present SFC block, execute a “qsigmove” statement without tag name designation. To move the signal queue of other SFC block, execute the “qsigmove” statement with tag name designation.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-8



qsigmove [, , ] [to ] result [; ] [; error [, ] ] errorsub

Designate the queue signal name using a character-string constant or a character-string variable not exceeding 8 bytes.

Designate a signal parameter number using a numeric expression. Designate a signal parameter using a numeric expression or a character string. The signals whose signal parameter for the is the same as the will be the target of control.

Designate the tag name of the subject SFC block when manipulating the signal queue of other SFC block. Tag names declared in the "block" statement, local generic name declared in the "genname" statement or dummy argument function block declared in the "argblock" statement can be designated. This can be omitted if the signal queue of the present SFC block is manipulated.



Designates the name of an integer-type local variable to return the move result. 1 is returned if the specified signal is placed at the top of the queue, and 0 if the specified signal does not exist in the queue.



Designate the local variable to which the error code is set. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate a local variable or a constant to identify where the error was generated in the error handling section.

Figure 12.2-4 The format of the “qsigmove” statement

If a numeric signal parameter is used to narrow the scope of signals that are manipulated, use the integer type (integer or long). If the signal parameter is a real number (float or double), the data might be evaluated as “disagreed” due to the discrepancy. Because real number data has a finite precision, in most cases, a negligible error occurs during type conversion from double or float, or calculation is performed. If the value containing such error is compared, the result will not match.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



l

12-9

Execution Example of “qsigmove” Statement Signal queue SG2

SG1

SG1

SG3

SG1

5

3

7

0

3

Execute qsigmove "SG1", 1, 3 result nmove Signal queue SG1

SG2

SG1

SG3

SG1

3

5

7

0

3

Figure 12.2-5 Execution Example of “qsigmove” Statement

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

12-10



12.3

Masking the Interrupt Signal

Interrupt signal can be masked using the “isigmask” statement, and be unmasked using the “isigunmask” statement.

n “isigmask” Statement: Masking the Interrupt Signal Interrupt signal processing against SFC blocks can be temporarily avoided (masked). To mask the interrupt signal, the “isigmask” statement is used. To cancel the masking of the interrupt signal, the “isigunmask” statement is used. The “isigmask” statement and “isigunmask” statement are valid for all interrupt signals in the SFC blocks that receive the signal. Interrupt signals cannot be masked individually by names. Interrupt signals are not masked by the default setting. If an interrupt signal is received while interrupt signals are masked, the interrupt signal does not interrupt the execution. Interrupt signals that are received while interrupt signals are masked are queued, and they will be activated when the interrupt signal masking is canceled. Execution of the “isigmask” statement or “isigunmask” statement does not affect the interrupt signal that is activating.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



13.

13-1

Error Handling

▼ Error Handling

This chapter explains the action of a SEBOL program when an error is caused during execution and the description of error handling.

n Error Handling in SEBOL Even when program with no compile errors is executed, run-time errors might occur. For example, if there is an error in the logic of an application program, errors such as calculation overflow, calculation error caused by zero division and array subscript out-of-range error might occur. Also, if the power to FCS is not supplied or CPU is stopped, data access to other FCS result in error.

n Types of Error Handling in SEBOL There are two types of error handling methods: •

Describe error handling for each statement that accompanies input/output or communication, such as “drive” and “dialogue” statements.



Define common error handling and describe processing for error occurrences such as a calculation overflow.

If an error is caused when there is no common error handling or when error handling for each statement is not or cannot be designated, an SEBOL error message is output as a system alarm. In this case, the execution of the SEBOL program is continued or aborted depending on the nature of the error.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-2



13.1

Error Handling for Statements with I/O or Communication

For statements that accompany input/output or communication such as “drive” statement or “dialogue” statement, error handling can be described for each statement.

n Types of Error Handling for Statements with I/O or Communication Description methods for error handling for the statements with I/O and communication include the following two types: •

Check the error variable



Specify a branching destination to jump to at error occurrences

If error handling contents vary for each executed line, describe error handling to check the error variable. When the same error handling is executed for multiple execution lines, it is recommended to specify a branching destination to jump to at error occurrences. Statements for which error handling can be described individually are as follows: [ ]:

Group assignment statement

drive:

Changes the output status of motor blocks and switch instruments.

compare:

Group comparison statement

seqtable:

Operates sequence tables.

logicchart:

Operates logic charts.

wait until:

Holds operation until condition is satisfied.

dialogue:

Exchanges with operator on HMI

signal:

Outputs signals.

qsigcancel:

Cancels queuing signals.

qsigmove:

Shift queuing signals

semlock:

Locks semaphores.

semunlock:

Unlocks semaphores.

wait for qsignal: Waits for reception of a queued signal.

n Error Variable Check When an error variable is described, 0 is set to the error variable if the statement is terminated normally. An error code is set if an error occurs. When the detail error code is 0, an error class code is set in the error variable. If the detail error code is not 0, a detail error code is set in the error variable. If an error variable is described, no error message is output even if an error occurs during execution. (Message is output if the error is fatal.) However, error message is output if an error, such as array-subscript out-of-range error, occurs while setting an error code to the error variable. Error handling syntax in the statements with I/O and communication is shown below. The semicolon (;) is not added at the beginning of an error variable for group substitution and comparison statements.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-3



[; ] [; error [, ] ] errorsub Figure 13.1-1 The format of the error handling in the statements with I/O and communication

SEE ALSO



Only integer-type or long-type local variables can be set as error variables. The function block data cannot be set.



Only constants or local variables can be set to error identifier.

For more information about error class codes, refer to: 13.3, “Error Class Codes” on page 13-8 For more information about detail error codes, refer to: 13.4, “Detail Error Codes” on page 13-18

n Setting Branching Destination for Error Occurrence When a common error-handing instruction is applicable to multiple lines, a branching destination can be specified so that the processing branches out to the same destination when errors occur. [; ] [; error [, ] ] errorsub

Designate an integer-type local variable to which the error code is returned when an error is caused. If no error occurs, this is set to 0.



Designate the branching destination at the time an error occurs.



Designate an integer, real or character-string type constant or local variable to identify where the error was generated in the error handling section. In the case of a character string, the first 16 bytes are valid and the remaining bytes are ignored.

Figure 13.1-2 The format of the “error” or “errorsub” statement

The notices on setting branching destination for error occurrence are as follows: •

Specify the branching destination for an error occurrence using “error” or “errorsub”.



If an error occurs in the line where the branching destination is specified, error message is not output, and the control branches out to the specified destination.



If branching destination is designated for “error,” only a branching-out action is taken when an error occurs.



If branching destination is designated for “errorsub,” a branching-out action is taken when an error occurs, and the program execution can be continued from the line following the line where the error occurred using an “ereturn” statement, after the error handling is completed.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-4



: ereturn Figure 13.1-3 The format of the “ereturn” statement

Even when branching destination is specified, 0 is set to the error variable for normal completion and an error code is set when an error occurs. At the branching destination of “error” and “errorsub,” the value of error identifier specified for the error occurrence line can be obtained by the built-in functions “cerrorid,” “lerrorid” and “derrorid”. cerrorid() lerrorid() derrorid() Figure 13.1-4 The function for obtaining the value of error identifier

Since the “cerrorid,” “lerrorid” and “derrorid” are the character-string type (char*16), long type and double type, respectively, they can be selectively used according to the type of the specified error identifier.

n Description Example of Error Handling Description examples of error handling are shown in this section.

l

Example of Operating a Switch Instrument Using “drive” Statement and Performing Error Handling if an Error Occurs Examples of “error” and “errorsub” designations are shown below: Branching by “error” is used when SFC block is terminated without any action after the error handling is complete. If it is within a function, the program will return using a “return” statement without any action after the error handling. As for the branching by “error” designation of a “drive” statement, the error information is output as a message, and SEBOL is terminated by an “exit” statement. As for branching by “errorsub,” the control returns to the line following the line where the error occurred after the error handling. Hence, this method is used when continuous execution of SFC blocks is required. If an error variable is specified as in the first “drive” statement in the following example, 0 is set to the error variable if the “drive” statement ends normally, and an error code is set to the error variable if an error occurs during execution. Hence, by inspecting whether or not the error variable is 0 in a condition expression using an “if” statement, the error handling which is executed only when an error occurs can be described. #define OPEN 2 block SIO-22 SWITCH01,SWITCH02,SWITCH03 integer errval ...... drive [SWITCH01 = OPEN] errval if (errval 0) then

! error variable example ! - state error handling here --

endif IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-5



...... drive [SWITCH02 = OPEN];error ERR000,2 ...... drive [SWITCH03 = OPEN];errorsub ERR010,3

! example of branching at error ! occurrence ! example of branching at error ! occurrence

...... exit ...... ERR000: ! - branching destination of ! "error" designation -message "drive error:line=%d %d-%x ID=%d\n",\ errl(), errc(), errce(), lerrorid() exit -1 ...... ERR010: ! - branching destination of ! "errorsub" designation -message "drive error:line=%d %d-%x ID=%d\n",\ errl(), errc(), errce(), lerrorid() ereturn

l

Example of Ignoring Errors The error variable can be used to ignore errors. Errors are ignored if the error variable is not checked after the statement that specified the error variable. It is not desirable to ignore errors in normal situations; however, the error-ignoring method may be useful when it is used to unlock a semaphore in the “semunlock” statement. For example, in a program that manipulates a semaphore, this method is effective when the semaphore must be in unlocked status. integer junk ...... ..... semunlock "SEMNAME" junk

* Lock the "SEMNAME" depending * on the condition. * Unlock the "SEMNAME" unconditionally, * and do not check the error variable.

.....

n Error Handling for Group Statements Multiple data can be simultaneously accessed by using a group assignment statement, “drive” statement and “compare” statement. In this case, specify a local variable array as the error variable. Because checking the error variable in an array is a time-consuming process, it is recommended that the error handling is described by specifying the branching destination using “error” or “errorsub” when accessing multiple data by using a group statement. Since the error handling method varies depending on the line, prepare the following user-defined function to perform error handling by checking the error variable.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-6



*** 0 is returned if the array elements *** Otherwise, the first element number integer function errcheck(val,v) integer val[*] integer n integer i for i = 1 to n if (val [i] 0) then return i end if next@ return 0

of the error variable are all 0. in which error was detected is returned. ! error variable array ! number of array elements

Use the user-defined function “errcheck” following a group statement, as shown below: #define NUMBLOCK 3 block SIO-22 SWITCH01,SWITCH02,SWITCH03 integer errval[NUMBLOCK] integer errcheck()

! user-defined function defined ! above.

...... drive [SWITCH01,SWITCH02,SWITCH03 = 2,2,2] errval[*] if (errcheck(errval,NUMBLOCK) 0) then !- Write error handling here-endif ......

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-7



13.2

Comparison of Actions by Error Class Code when an Error Occurs

The run-time error codes in SEBOL program consists of the error class codes and detail error codes.

n Actions when an Error Occurs The error class codes include the following three types, the details for each type and code are shown as follows. Errors that can continue program execution: 1 through 19999 Fatal errors:

20000 through 32767

Insufficient area or internal errors: -100 through -32767 Actions taken when an error occurs vary depending on the classification of error class codes.

l

Errors that can Continue Program Execution When an error that can continue program execution occurs, the control is branched out if common error handling or branching destination designation by “entry” or “errorsub” exists. If an error handling or error variable is not specified, a SEBOL error message is output, and the execution continues starting with the line that is following the erred line. If an error occurs within a common error handling section or between an “errorsub” and “ereturn,” the control does not branch to the error handling even if there is a common error handling, or if there is “error” or “errorsub” designation. In this case, the program outputs a SEBOL error message and resumes execution starting with the line that is following the erred line. This is to avoid entering an infinite loop by repeating branching to error handling. Also, even if an error occurs within the common error handling section or between an “errorsub” and “ereturn,” if an error variable is specified for the statement that allows individual error handling and if “error” and “errorsub” are not specified, error codes are set in the error variable and no error messages are output. SEBOL error message output does not sent an audible alarm.

l

Fatal Errors When a fatal error occurs, a SEBOL error message is unconditionally output and the execution of the SFC block in which the fatal error occurred will be terminated. A fatal error is an unrecoverable error, and occurs when an “ereturn” statement is executed with no return-destination, when function-call nests are specified exceeding three layers, etc.

l

Insufficient Area or Internal Errors When an insufficient area or an internal error occurs, a SEBOL error message is unconditionally output and the execution of the SFC block in which insufficient area or internal error occurred will be terminated. SEBOL error message output does not sent an audible alarm.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-8



13.3

Error Class Codes

The following are the error class codes and their descriptions. Error class codes that have detail error codes are indicated in the note column.

n Calculation Error Codes Table 13.3-1 Calculation Error Code List Decimal

HexaDetail decimal

Description

1

$0001

Overflow by calculation

2

$0002

Type-conversion overflow

3

$0003

Zero division

4

$0004

Underflow (reserved)

5

$0005

Invalid calculation

6

$0006

Overflow by calculation in array-subscript calculation

10

$000A

Out of array subscript range

11

$000B

Assigning to a constant was attempted.

12

$000C

Character-string array is designated where only numeric type is accepted.

13

$000D

Numeric type is designated where only character-string type is accepted.

14

$000E

Numeric and character-string types are mixed.

20020

$4E34

Calculation stuck/overflow.

20021

$4E35

Character-string range used for calculation is exceeded.

30

$001E

Out of array subscript range of error variable.

31

$001F

Type conversion overflow in error variable setting.

32

$0020

Error occurred in error variable setting.

n Function Block-Related Error Codes Table 13.3-2 Function Block Related Error Code List Decimal

Hexadecimal

Detail (*1)

100

$0064

x

101

$0065

Function block data type is abnormal.

102

$0066

"compare" statement produced inconsistent results.

103

$0067

Character string of brand name has length 0.

104

$0068

Number of data on LH and RH sides do not agree.

105

$0069

Number of data on LH side is smaller than RH side data.

106

$006A

Number of data on LH side is greater than RH side data.

107

$006B

Number of elements for error-array is smaller than number of data.

108

$006C

Number of data exceeded 32.

109

$006D

Number of data exceeded 16.

118

$0076

Setting for the function block data is nonstandard floating point.

119

$0077

Setting for the function block data is infinite floating point.

*1:

Description Function block data access error

x: Details of the error code is provided.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-9



SEE ALSO

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Unique to the “drive” Statement Table 13.3-3 Error Codes Unique to the “drive” Statement Decimal

HexaDetail decimal

Description

120

$0078

The function-block with block-type name which cannot be used in “drive” statement was designated.

121

$0079

The block mode in which setting is prohibited in “drive” statement.

122

$007A

Setting value for “drive” statement is other than 0, 1 or 2.

123

$007B

Block mode has been changed during execution of “drive” statement.

124

$007C

MV value has been changed during execution of “drive” statement.

125

$007D

MV value has been changed after answerback check had been completed.

126

$007E

ANS- alarm occurred during execution of “drive” statement.

127

$007F

ANS+ alarm occurred during execution of “drive” statement.

128

$0080

PERR alarm occurred during execution of “drive” statement.

n Error Codes Related to Generic Names Table 13.3-4 Generic Name Related Error Code List Hexadecimal

141

$008D

142

$008E

148

$0094

Character-string tag name is “0.”

149

$0095

Generic name marked with an asterisk (*) was used (No error message appears.)

150

$0096

Actual argument is not generic name (%,%%, or “block” declared tag name, etc.

*1: *2:

SEE ALSO

Detail (*1)

Decimal

Description Unassigned generic name is used.

x

“assign” statement error (*2)

x: Details of the error code is provided. This is an error class code when an error occurs in an operation that is being executed in the same unit instrument as the operation that issued the “assign” statement is being executed.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to “seqtable”, “logicchart” and “oneshot” Statement Table 13.3-5 “seqtable” and “logicchart” Statement with “oneshot” Statement Related Error Code List Decimal

Hexadecimal

Detail(*1)

Description

160

$00A0

x

Execution errors in "seqtable" statement and "oneshot" statement.

161

$00A1

Function block of other control stations has been designated.

162

$00A2

Function block other than a sequence table has been designated. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-10



*1:

SEE

ALSO

Decimal

Hexadecimal

Detail(*1)

Description

163

$06A3

Function block other than a logic chart is designated.

164

$00A4

Function block which allows no periodic executions has been designated.

165

$00A5

Function block which allows no one-shot execution has been designated.

20166

$4EC6

SFC block was aborted due to an error detected in a sequence table step.

167

$00A7

"oneshot" statement cannot start a sequence table.

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to Process Management Table 13.3-6 Process Management Related Error Code List Decimal

Hexadecimal

Detail (*1)

180

$00B4

x

20181

$4ED5

182

$00B6

183

$00B7

184

$00B8

185

$00B9

Recipe group number error

186

$00BA

Null batch ID character-string

*1:

SEE

ALSO

Description Common block data access error Batch ID not specified

x

urload or urassign execution error Invalid unit recipe number

x

rpreserve() execution error

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to “time” Designation Table 13.3-7 “time” Designation Related Error Code List Decimal

HexaDetail decimal

Description

220

$00DC

“time” designation counts up.

221

$00DD

Specified value for “delay” statement and “delaycycle” statement is negative.

n Error Codes Related to “dialogue” Statement Table 13.3-8 “dialogue” Statement Related Error Code List Decimal

Hexadecimal

Detail (*1)

250

$00FA

x

Description Dialogue execution error.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-11

Hexadecimal

251

$00FB

“retry” designation of “dialogue” was executed while “dialogue” statement was not executed.

252

$00FC

High limit of the number of “dialogue” statements that are simultaneously executable at the station is exceeded.

253

$00FD

High limit of statements that the SFC block can simultaneously execute is exceeded.

255

$00FF

Type of input variable in reentry-type “dialogue” statement are not compatible with the input variable type in the data-entry type.

*1:

SEE

ALSO

Detail (*1)

Decimal

Description

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to Messages Table 13.3-9 Message Related Error Code List Decimal

Hexadecimal

Detail (*1)

270

$010E

x

271

$010F

No output value for formatting string-character conversion

272

$0110

Nonstandard floating point data (nan) has been designated.

280

$0118

281

$0119

Message number is out of the range of “1 to 9999.”

282

$011A

Parameter value is out of the range of “0 to 65535.”

291

$0123

NR has been specified in the process alarm character string.

292

$0124

Process alarm character string has not been defined in the builder.

293

$0126

Length of the process alarm character string is “0.”

295

$0127

Outputting more than three messages are attempted while the CPU time was monopolized.

296

$0128

Outputting more than one process alarm was attempted while the CPU time was monopolized

*1:

SEE

ALSO

x

Description “snapshot” execution error

Message output failure

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to Signals Table 13.3-10 Signal Related Error Code List Decimal

Hexadecimal

Detail (*1)

300

$012C

x

Execution error in “signal” statement, “qsigcancel” statement or “qsigmove” statement. (Transferred to another station.)

301

$012D

x

Execution error in “signal” statement, “qsigcancel” statement or “qsigmove” statement. (Transferred within the present station.)

Description

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-12

Hexadecimal

302

$012E

Function block with a code beyond manipulation range is specified.

303

$012F

“signal” statement with “return” designation in SEBOL program is attempted.

304

#0130

Signal reception process with a return signal name does not exist in the SFC block the “signal” statement was executed.

305

$0131

306

$0132

Executions of “qsigcancel”/“qsigmove” statements whose tag name is not specified in SEBOL program are attempted.

307

$0133

Signal parameter number is out of range.

308

$0134

x

Return signal transmission error (transferred to another station.)

309

$0135

x

Return signal transmission error (transferred within the present station.)

310

$0136

x

“wait for qsignal” statement execution error

311

$0137

312

$0138

x

Error was detected while canceling a queued signal in error handling.

313

$0139

x

“signal” statement execution error (signaled to the HIS.)

314

$013A

Character string of the program name has length 0.

315

$013B

Invalid station number

316

$013C

Invalid domain number

317

$013D

Signal reception error from HIS.

*1:

SEE

ALSO

Detail (*1)

Decimal

x

Description

%EV signal transmission error

Execution of “wait for qsignal” statement in SEBOL program was attempted.

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to SFC Block Control Table 13.3-11 SFC Block Control Related Error Code List Detail (*1)

Decimal

Hexadecimal

331

$014B

Block mode cannot be changed to O/S because the block status is RUN.

332

$014C

Block status cannot be changed to STOP because the block status is ABRT.

333

$014D

Block status cannot be changed to RUN because the block status is ABRT.

334

$014E

Status change command RSET cannot be received because the block status is RUN.

335

$014F

Block status cannot be changed to ABRT because the block status is STOP.

336

$0150

Block status cannot be changed because the block mode is O/S.

337

$0151

338

$0152

Status change command RSET cannot be received because the block status is PAUS.

339

$0153

Block status cannot be changed to PAUS because the block status is ABRT.

341

$0155

Block mode cannot be changed to SEMI due to the setting of SEMI mode action.

342

$0156

Block status cannot be changed because the pre-processing of status change is in execution.

x

Description

Error was detected while changing BSTS or STEPNO.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-13

Hexadecimal

343

$0157

Block status cannot be changed because the post-processing of status change is in execution.

344

$0158

Block status cannot be changed because the terminating process of the SFC block is in execution.

345

$0159

SFC block cannot be started up because function type definition is under online maintenance.

346

$015A

SFC block cannot be started up because the main program in SFC sequence or SEBOL is under online maintenance.

20347

$4F7B

Database corresponding to the specified SFC sequence name is not found.

20348

$4F7C

Main program of SFC sequence or SEBOL block does not exist.

20349

$4F7D

Data base common to the SEBOL stations do not exist.

350

$015E

Status change was judged invalid in the pre-status change processing.

351

$015F

Error was detected in the pre-status change processing.

352

$0160

Pre-status change processing exceeded the maximum number of execution lines.

353

$0161

Block mode cannot be changed because the pre-status change processing is in progress.

354

$0162

Block mode cannot be changed because the post-status change processing is in progress.

355

$0163

Block mode cannot be changed because the SFC block termination processing is in progress.

356

$0164

Online maintenance of the SFC sequence or SEBOL block main program is incomplete.

20357

$4F85

SEBOL area database does not exist.

358

$0166

The SFC block cannot be started up because it is under online maintenance.

360

$0168

Step number of interrupt processing was specified.

361

$0169

Non-existing step number was specified.

362

$016A

STEPNO cannot be changed because the block status is PAUS.

363

$016B

STEPNO cannot be changed because pre-status change processing is in progress.

364

$016C

STEPNO cannot be changed because post-status change processing is in progress.

*1:

SEE

ALSO

Detail (*1)

Decimal

Description

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to Operation Table 13.3-12 Operation Related Error Code List Decimal

HexaDetail decimal

Description

380

$017C

Block status of a monitoring operation with “independent” statement cannot be changed.

381

$017D

Operation cannot be started from other than an unit instrument.

382

$017E

“independent” statement is used in an SFC block that is not an operation.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-14



n Error Codes Related to SEBOL Execution Control Table 13.3-13 SEBOL Execution Control Related Error Code List Decimal

HexaDetail decimal

Description

20411

$4FBB

Reached common error handling directly.

20412

$4FBC

Reached interrupt signal handling directly.

20413

$4FBD

Reached pre-processing of status change directly.

20414

$4FBE

Reached post-processing of status change directly.

20420

$4FC4

Execution of statement that main program cannot execute is attempted.

20421

$4FC5

Execution of statement that is non-executable in an interrupt processing was attempted.

20423

$4FC7

Execution of statement that is non-executable in the pre-processing of status change command was attempted.

20425

$4FC9

Execution of statement that is non-executable with function was attempted.

20430

$4FCE

Execution of unsupported statement was attempted.

20431

$4FCF

Execution of unsupported built-in function was attempted.

20432

$4FD0

Access to unsupported variable was attempted.

20433

$4FD1

Use of unsupported operator was attempted.

440

$01B8

Execution of delay statement was attempted using a function called in the condition expression of “wait until” statement.

450

$01C2

Execution of non-executable statement was attempted while the CPU time was monopolized.

451

$01C3

Maximum number of execution lines during the CPU time was monopolized was attempted.

452

$01C4

Delay was attempted while the CPU time was monopolized.

n Error Codes Related to Subsystem Communication Table 13.3-14 Subsystem Communication Related Error Code List Decimal

Hexadecimal

Detail (*1)

500

$01F4

x

501

$01F5

Total data size exceeded 128 words.

502

$01F6

Floating-point data read from the subsystem is out of standards.

503

$01F7

Floating-point data read from the subsystem is overflowed.

504

$01F8

Total data size exceeded 1024 words.

505

$01F9

Total data size exceeded 64 words.

506

$01FA

Exceeded the high limit of “ssdtwrite” statement and “ssdtwritebit” statement that can be executed simultaneously at the station.

507

$01FB

Address characters exceeded 8 bits.

*1:

SEE

ALSO

Description Subsystem communication execution error

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-15



n Error Codes Related to User-Defined Function Table 13.3-15 User-defined Function Related Error Code List Decimal

HexaDetail decimal

Description

20600

$5078

User function calls nested at more than six levels.

20601

$5079

Attempt to execute an “ereturn” statement without a return address.

20602

$507A

Function not existing in the database.

20603

$507B

Function not builder-defined.

604

$025C

Return value not received.

20605

$507D

Accessed function-block data exceeds 32767.

20606

$507E

Forcibly terminating SFC/SEBOL block because online maintenance of function is not terminated.

20607

$507F

Forcibly terminating SFC/SEBOL block because online function loading is not terminated.

608

$0260

Waiting for completion of online maintenance of function (*1).

609

$0261

Waiting for completion of online function loading (*1).

20610

$5082

Overflow or zero-division detected in calculation of actual argument array subscript expression.

20620

$508C

Numbers of formal and actual arguments not in agreement.

20621

$508D

(*2)

Formal argument is a simple local variable, disallowing assignment of entire local variable array to actual argument.

20622

$508E

(*2)

Formal argument is a simple local variable, disallowing assignment of function block to actual argument.

20623

$508F

(*2)

Formal argument is an entire local variable array, disallowing assignment of simple local variable or constant to actual argument.

20624

$5090

(*2)

Formal argument is an entire local variable array, disallowing assignment of local variable array element to actual argument.

20625

$5091

(*2)

Formal argument is an entire local variable array, disallowing assignment of function block to actual argument.

20626

$5092

(*2)

Formal argument is a simple function block, disallowing assignment of entire function-block array to actual argument.

20627

$5093

(*2)

Formal argument is a simple function block, disallowing assignment of local variable or constant to actual argument.

20628

$5094

(*2)

Formal argument is an entire function-block array, disallowing assignment of simple function block to actual argument.

20629

$5095

(*2)

Formal argument is an entire function-block array, disallowing assignment of function-block array element to actual argument.

20630

$5096

(*2)

Formal argument is an entire function-block array, disallowing assignment of local variable or constant to actual argument.

20631

$5097

(*2)

Formal argument is a character-string local variable, disallowing assignment of numeric local variable or constant to actual argument.

20632

$5098

(*2)

Formal argument is a numeric local variable, disallowing assignment of character-string local variable or constant to actual argument.

20633

$5099

(*2)

Formal argument is a character-string local variable array, disallowing numeric local variable array to actual argument.

20634

$509A

(*2)

Formal argument is a local variable array, disallowing assignment of characterstring local variable array to actual argument.

20635

$509B

(*2)

Formal and actual arguments are both numeric local arrays but data types are different. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-16

*1: *2:

If online maintenance is completed before fatal error 20606 or 20607 is caused, the SFC/SEBOL block properly calls functions to continue operation even when error 608 or 609 has been caused. Detailed error codes use the numbers of arguments, counting 1, 2, 3, and so on from the left.

n Error Codes Related to Semaphore Table 13.3-16 Semaphore Related Error Code List Hexadecimal

701

$02BD

Number of semaphores exceeded the number of semaphores defined at builder.

702

$02BE

Semaphore has already been locked by another SFC block.

703

$02BF

The specified semaphore has already been locked by the corresponding SFC block.

704

$02C0

The corresponding SFC block is waiting for unlocking of the specified semaphore.

705

$02C1

The corresponding SFC block has not locked the specified semaphore.

706

$02C2

Character-string length of the semaphore name is 0.

707

$02C3

The number of semaphores of the builder-specified control station is negative or exceeding 64.

708

$02C4

*1:

SEE

ALSO

Detail (*1)

Decimal

x

Description

Semaphore execution error

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

n Error Codes Related to Valve Pattern Monitor Table 13.3-17 Valve Pattern Monitor Related Error Code List Decimal

Hexadecimal

Detail (*1)

730

$02BA

x

731

$02BB

Generic name with * specification specified in vpmstart statement.

732

$02BC

Parameter out of range.

733

$02BD

Time specification value out of range.

734

$02BE

Data is not registered in valve pattern monitor because an error was detected in other data on the same line.

735

$02BF

Data is not deleted from valve pattern monitor because an error was detected in other data on the same line.

736

$02C0

Data is not registered in valve pattern monitor because output value of drive vpmon statement is 1. (The drive statement works.)

20740

$5104

*1:

SEE

ALSO

x

Description Valve pattern monitor execution error.

Signal transmission error (from valve pattern monitor to unit) (This error message is output by valve pattern monitor.)

x: Details of the error code is provided.

For more information about the classified error codes that described in the detail error code list, refer to: 13.4, “Detail Error Codes” on page 13-18

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-17



n Error Codes Related to Built-In Functions Table 13.3-18 Built-In Functions Related Error Code List Decimal

HexaDetail decimal

Description

800

$0320

Calculation overflow was detected within the built-in function.

801

$0321

Zero division was detected in the calculation within the built-in function.

802

$0322

Square-root calculation of negative value was attempted within the built-in function.

803

$0323

Errors in “power()” or “log()” argument.

804

$0324

Absolute value of the argument for trigonometric function is too large to calculate.

805

$0325

Calculation error occurred in the arithmetic built-in function.

806

$0326

Invalid character-string length or character position (left/right/mid built-in function).

807

$0327

Low-limit value is larger than the high-limit value.

810

$032A

Invalid number of arguments in the built-in function.

811

$032B

Invalid argument type in the built-in function.

830

$033E

Unset error identifier is referred.

831

$033F

Error identifier cannot be referred because of an error committed during its setting.

850

$0352

Signal parameter number is out of limits.

851

$0353

Signal parameter type does not match the function type.

852

$0354

“creadpara,” “Ireadpara,” or “dreadpara” was executed in a common error handling.

853

$0355

Signal parameter cannot be obtained because queued signal in process does not exist.

870

$0366

Non-existing data status is specified.

n Error Codes Related to SEBOL and Others Table 13.3-19 SEBOL and Others Related Error Code List Decimal

HexaDetail decimal

Description

20901

$51A5

SFC block cannot be started due to insufficient dynamic reservation area.

20903

$51A7

Function cannot be called due to insufficient dynamic reservation area.

905

$0389

Unsupported foreign language was used.

910

$038E

(*1)

Remaining of the dynamic reservation becomes less than 10 %. (Message appears when SFC/SEBOL is started up.) (*2)

911

$038F

(*1)

Remaining of the dynamic reservation area becomes less than 10 %. (Message appears when the function is called.) (*3)

*1: *2: *3:

Detail error code indicates the control station number. The tag number added to this message indicates that the remaining area available for dynamic allocation has fallen below 10 % upon start up of the block. The function name added to this message indicates that the remaining area available for dynamic allocation has fallen below 10 % upon calling of the function.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00



13.4

13-18

Detail Error Codes

Detail error codes and their descriptions are shown below: Table 13.4-1 Detail Error Code List Decimal

Hexadecimal

16

$0010

FCS or control bus at destination failed.

Description

19

$0013

Time out (no response from FCS at destination)

8194

$2002

Setting the data other than the character string ACK was attempted in the data item named AFLS.

8196

$2004

Equalization of the tag information on the old FCS to be referenced or set up yet to be compeleted.

8226

$2022

Tag name to be referenced or set up not existing in the BCV.

8244

$2034

Invalid connection destination information on an instrument such as a batch data set unit

8245

$2035

Required data items do not exist in the connection destination function block for the instrument such as a batch data set unit.

8246

$2036

More than eight frames specified for transmission to HF.

8247

$2037

Failed station with the tag to be referred or set up.

8249

$2039

Communication between the RCV and old FCS aborted.

8261

$2045

Setup error due to a non-existing status name.

8262

$2046

Setup validity check error due to a non-existing status name.

8273

$2051

Validity check for setting up the data item name without status or batch data.

8704

$2200

Setting was attempted to the data item name which is not allowed for setting.

8705

$2201

Attempt to set up CAL in a function block that does not support the status name CAL in a CENTUM-XL instrument.

8706

$2202

Attempts setting CAL to a function block of CFCD series station, where the CAL status does not exist.

8707

$2203

Attempts setting NCL to a function block of CFCD series station, where the CAL status does not exist.

8708

$2204

Attempts setting a START or STOP command to a TM, CT function block of CFCD series station, where the START and STOP are not supported.

8709

$2205

Attempts setting a non-existing status to a TM function block of CFCD series station.

8710

$2206

Attempt to set up CMP in the loop of a CENTUM-XL instrument without a CMP mark.

8713

$2209

Attempt to set up SPC or DDC in the loop of a CFCD instrument without aCMP mark.

8714

$220A

Status change to a CFCD instrument attempted while status changes were not permitted.

8715

$220B

Status name not existing in the current function block set up in a CENTUM-XL instrument.

8718

$220E

Attempts setting a function block of CFCD series station, whose tag name can not be found.

8720

$2210

Attempts changing a function block of CFCD series station to a status at the time the status change is not allowed.

8725

$2215

Setup validity check was made for a non-status data item.

8770

$2242

Data type of the setup data not supported by BCV.

8771

$2243

Data type of the setup data not supported by BCV.

8772

$2244

Data type of the setup data not supported by BCV. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-19

Decimal

Hexadecimal

Description

8773

$2245

Data type of the setup data not supported by BCV.

8774

$2246

Data type of the setup data not supported by BCV.

8775

$2247

Data type of the setup data not supported by BCV.

8776

$2248

Setup data is out of limits.

8777

$2249

Data type of the setup data not supported by BCV.

8778

$224A

Setup data is out of limits.

8779

$224B

Data type of the setup data not supported by BCV.

8780

$224C

Setup data is out of limits.

8781

$224D

Setup data is out of limits.

8782

$224E

Setup data is out of limits.

8783

$224F

Setup data is out of limits.

8784

$2250

Data type of the setup data not supported by BCV.

8785

$2251

Data type of the setup data not supported by BCV.

8786

$2252

Data type of the setup data not supported by BCV.

8787

$2253

Data type of the setup data not supported by BCV.

8788

$2254

Data type of the setup data not supported by BCV.

8789

$2255

Data type of the setup data not supported by BCV.

8790

$2256

Data type of the setup data not supported by BCV.

8791

$2257

Data type of the setup data not supported by BCV.

9216

$2400

The data item name does not exist in the instrument with the tag name being setup or referred.

9472

$2500

Setup for the data items named ASET, RSV, or RMV was attempted when the status did not allow setting.

9473

$2501

SV (or MV) less than the current SV (or MV) was set up in the data items named ASET, RSV, or RMV when the status was CLP-.

9474

$2502

SV (or MV) greater than the current SV (or MV) was set up in the data items named ASET,RSV, or RMV while the status was CLP+.

9475

$2503

SV (or MV) less than the current SV (or MV) was set up in the data items named ASET, RSV, or RMV while the status was CLP-.

9476

$2504

SV (or MV) greater than the current SV (or MV) was set up in the data items named ASET,RSV, or RMV while the status was CLP+.

9477

$2505

SV (or MV) less than the current SV (or MV) was set up in the data items named ASET, RSV, or RMV while the status was CLP-.

9478

$2506

SV (or MV) greater than the current SV (or MV) was set up in the data items named ASET,RSV, or RMV while the status was CLP+.

9479

$2507

SV (or MV) less than the current SV (or MV) was set up in the data items named ASET, RSV, or RMV while the status was CLP-.

9480

$2508

SV (or MV) greater than the current SV (or MV) was set up in the data items named ASET,RSV, or RMV while the status was CLP+.

9481

$2509

Setup for the data items named ASET, RSV, or RMV was attempted when the status did not allow setting.

9732

$2604

Timeout (no response from the destination station)

9760

$2620

Mail daemon is inactive at the destination station.

9761

$2621

Receive buffer is full at the destination station.

33026

$8102

Access is currently prohibited for the corresponding area.

33039

$810F

System element requested for data access is not supported at present.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-20

Decimal

Hexadecimal

Description

33041

$8111

Non-existing area number is specified.

33044

$8114

Database requested for data access is now under online maintenance.

33124

$8164

Header of the block requested for data access is undefined.

33127

$8167

Block number is higher than the maximum limit upon data access request.

33137

$8171

Invalid station umber upon data access request.

33201

$81B1

Invalid system element name upon data access request.

33207

$81B7

Data type conversion is disabled (exceeding the maximum).

33208

$81B8

Data type conversion is disabled (falling below the minimum).

33209

$81B9

Nonnumeric type is specified for data type conversion.

33211

$81BB

Unconvertible data type is specified.

33215

$81BF

Invalid data type of a setpoint value upon data setting request.

33216

$81C0

A setting was requested for the data that cannot be set up.

33217

$81C1

Setting validity check judged the setting invalid (e.g., Data out of the scale range was specified.)

33295

$820F

System element requested for data access is not supported at present.

33310

$821E

Setpoint value out of scale range was specified.

33311

$821F

Invalid data type upon status change request.

33312

$8220

Invalid data size upon status change request.

33313

$8221

Invalid status change command.

33314

$8222

The corresponding instrument does not accept the status change command.

33380

$8264

Header for the block that was a data setting was requested was undefined.

33390

$826E

Invalid data type upon data setup request.

33461

$82B5

Address for the data item name upon data access request is undefined.

33553

$8311

Non-existing area number was specified.

33556

$8314

The database requested for data access is now under online maintenance.

33646

$836E

Invalid data type upon data setup request.

33648

$8370

The global switch number exceeds the limit for maximum.

33649

$8371

The global switch station number exceeds the limit for maximum.

33712

$83B0

The global switch is not defined.

33714

$83B2

The global switch data of other station is specified.

33726

$83BE

The global switch data of other station cannot be set with the specified access code.

33904

$8470

Invalid common switch number.

34065

$8511

Non-existing area number was specified.

34078

$851E

Setpoint value out of the scale range was specified.

34160

$8570

Invalid annunciator switch number

34321

$8611

Non-existing area number was specified.

34330

$861A

Accessed to a function block in O/S mode.

34331

$861B

Accessed to a function block in complex O/S mode.

34404

$8664

Header for the block requested for data access is undefined.

34577

$8711

Non-existing area number was specified.

34586

$871A

Accessed to a function block in O/S mode.

34587

$871B

Accessed to function block in O/S compound mode. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-21

Decimal

Hexadecimal

Description

34595

$8723

The corresponding block does not accept the requested status change command.

34596

$8724

Change is prohibited to the data status requesting the change.

34670

$876E

Invalid data type upon data setup request.

35352

$8A18

Switch instrument block switch is in OFF state (single-point side).

35438

$8A6E

Invalid data type upon data setup request.

35608

$8B18

Switch instrument block switch is in OFF state.

35694

$8B6E

Invalid data type upon data setup request.

35760

$8BB0

Switch instrument block switch is in OFF state (multi-point side).

36280

$8DB8

Data access request communication exceeded the maximum amount.

36353

$8E01

Access for the FCS database is prohibited.

36354

$8E02

Access for the corresponding area is prohibited at present.

36367

$8E0F

System element requested for data access is not supported at present.

36369

$8E11

The designated area number does not exist.

36370

$8E12

Number of parameters requested for data access is negative or exceeding the maximum number.

36371

$8E13

Invalid data item modifier upon data access request.

36389

$8E25

Array elements specified upon data access request is out of defined limits.

36390

$8E26

When a data access is requested, array elements are specified to a scalar type data.

36536

$8EB8

Access was request to the data having no entity in memory.

36537

$8EB9

Data that does not permit 0 to 100 % conversion on the scale.

36538

$8EBB

Access to other station is prohibited. (Tag number not existing in the present station is specified.)

36540

$8EBC

Destination FCS or control bus is down.

36541

$8EBD

The tag name does not exist in the plant.

36542

$8EBE

Security check by access ID prohibited the access.

36549

$8EC5

Invalid tag name upon data access request.

36550

$8EC6

Invalid data item name upon data access request.

36551

$8EC7

Only single-precision floating point type is acceptable for the data setting in the range of 0 to 100 %.

36599

$8EF7

Data access request communication exceeded the maximum amount. (Highspeed data access function)

37126

$9106

Acceptable request per dialogue control station exceeded the maximum 32.

37130

$910A

Retry was requested while there is no dialog request.

37131

$910B

Dialog’s cancellation request was not transmitted to the HIS.

37132

$910C

Dialog’s retry request was not transmitted to the HIS.

37133

$910D

Dialog’s confirmation request was not transmitted to the HIS.

37134

$910E

Dialog’s entry request was not transmitted to the HIS.

37138

$9112

Dialog’s "time" specification is timeout.

37142

$9116

User C task name cannot be obtained in the dialog transmission process.

38161

$9511

The designated area number does not exist.

38320

$95B0

Switch position in a switch instrument block different from that of the last access.

38929

$9811

The designated area number does not exist.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-22

Decimal

Hexadecimal

Description

40193

$9D01

Access is disabled because I/O change is in progress on the online maintenance.

40194

$9D02

Writing to input (DI) is disabled while I/O is not disconnected.

40209

$9D11

Undefined ACM I/O communication module database

40210

$9D12

Undefined ACM I/O communication module database (No DI definition)

40211

$9D13

Undefined ACM I/O communication module database

40212

$9D14

Undefined ACM I/O communication module database

40213

$9D15

Undefined ACM I/O communication module database (No DI definition)

40214

$9D16

Undefined ACM I/O communication module database (No DI/DO definition)

40215

$9D17

Undefined ACM I/O communication module database (No DI definition)

40220

$9D1C

Node number out of limits.

40221

$9D1D

Out of the range of ACM I/O communication module unit numbers (1 to 8)

40222

$9D1E

Out of the range of ACM I/O communication module slot numbers (1 to 4)

40223

$9D1F

Out of the range of ACM I/O communication module terminal numbers (1 to 64)

40225

$9D21

No communication definition for the specified point.

40226

$9D22

ACM I/O communication module database error

40227

$9D23

ACM I/O communication module database error

40228

$9D24

ACM I/O communication module database error

40229

$9D25

I/O data type does not agree with the specified data type.

40230

$9D26

ACM I/O communication module database error

40231

$9D27

Write width is greater than 16 bit.

40235

$9D2B

Even-numbered terminal access for 32-bit data is not available.

40246

$9D36

Non-existing area number specified.

40247

$9D37

Database error

40248

$9D38

Database error

40249

$9D39

Database error

40250

$9D3A

Database error

40251

$9D3B

Database error

40252

$9D3C

Database error

40253

$9D3D

Database error

40254

$9D3E

Database error

40255

$9D3F

Database error

40256

$9D40

Database error

40257

$9D41

Database error

40272

$9D50

System count is out of defined range

40273

$9D51

The specified system is not defined.

40278

$9D56

No I/O definition

40279

$9D57

Node number out of limits.

40280

$9D58

Unit number is out of range.

40281

$9D59

Slot number is out of range.

40282

$9D5A

Terminal number is out of range.

40283

$9D5B

Node not defined.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-23

Decimal

Hexadecimal

Description

40284

$9D5C

No unit definition

40285

$9D5D

No card definition

40286

$9D5E

Card or action mode of the point that have been specified is not defined.

40287

$9D5F

Database error

40288

$9D60

Database error

40289

$9D61

Database error

40290

$9D62

Database error

40291

$9D63

Database error

40292

$9D64

Database error

40293

$9D65

Specified data item name does not exist.

40294

$9D66

Database error

40295

$9D67

Database error

40296

$9D68

Database error

40297

$9D69

Database error

40298

$9D6A

Specified data type does not agree with the data type of I/O.

40299

$9D6B

Specified data size is different from that of the data type of I/O.

40300

$9D6C

Size of %Zxxxxxx is larger than eight characters.

40301

$9D6D

System other than %Z/%Y.

40302

$9D6E

Nonnumeric character string is specified for the node number of the element number.

40303

$9D6F

Nonnumeric character string is specified for the unit number of the element number.

40304

$9D70

Nonnumeric character string is specified for the slot number of the element number.

40305

$9D71

Nonnumeric character string is specified for the terminal number of the element number.

40306

$9D72

The kind of element is other than %Z.

40307

$9D73

Accesses to analog I/O, pulse width output, and time-proportioning ON/OFF output are invalid.

40308

$9D74

"Terminal number+size" exceeds the limit of card points. (PV16)

40309

$9D75

All the specified 16 points are undefined. (PV16)

40310

$9D76

Cannot read pulse width output from even-numbered terminal.

40311

$9D77

Dual analog destination is specified as single.

40312

$9D78

Database error

40316

$9D7C

Cannot specify the read width

40317

$9D7D

Cannot specify the read width

40318

$9D7E

Cannot specify the read width

40319

$9D7F

Cannot specify the read width

40320

$9D80

Specified read size does not agree with the I/O data type.

40321

$9D81

Specified read data type does not agree with the I/O data type.

40322

$9D82

Database error

40323

$9D83

Card or action mode of the point that have been specified is not defined.

40324

$9D84

Dual-redundant database error

40325

$9D85

Database error

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-24

Decimal

Hexadecimal

Description

40326

$9D86

Database error

40327

$9D87

Database error

40328

$9D88

Terminal number exceeds the number of installation points of the card.

40329

$9D89

Database error

40330

$9D8A

Database error

40331

$9D8B

Cannot specify the reading width for pushbutton counter values.

40332

$9D8C

Excessive data read width

40333

$9D8D

"Terminal number+size" exceeds the limit of card points. (PV16)

40334

$9D8E

All the specified 16 points are undefined. (PV16)

40335

$9D8F

Read error (Internal error)

40336

$9D90

Cannot write because of a data status error

40337

$9D91

Database error

40338

$9D92

Database error

40339

$9D93

Database error

40340

$9D94

Database error

40341

$9D95

Cannot specify the write width

40342

$9D96

Excessive write size

40343

$9D97

Excessive write size

40344

$9D98

Flashing output is disabled.

40345

$9D99

Cannot specify the flashing output width

40346

$9D9A

Write size is specified exceeding the limits of I/O module.

40347

$9D9B

Intermixed operation modes (SO/PO) or no points are defined for writing.

40348

$9D9C

Database error

40349

$9D9D

Database error

40350

$9D9E

Cannot specify the pulse width output width.

40351

$9D9F

Excessive pulse width output time setpoint value

40352

$9DA0

Negative time setting for time-proportioning ON/OFF output.

40369

$9DB1

Internal error

40722

$9F12

Connection destination function block is under online maintenance.

40723

$9F13

Block mode of the connection destination function block is in O/S mode.

40725

$9F15

Connection destination function block is not allowed one-shot execution.

40726

$9F16

Nesting structure when a calling is made within the function blocks exceeds the definition.

40834

$9F82

Parameter error in "oneshot" statement or configuration error

40930

$9FE2

Execution step name specified in the sequence table to be started up does not exist.

41808

$A350

Internal error

41809

$A351

ACM I/O communication module number is out of limits.

41810

$A352

Definition number is out of limits.

41811

$A353

No communication definition for the specified point.

41812

$A354

Relative position (offset) is out of limits.

41813

$A355

Accessed to outside of the range for subsystem definition.

41814

$A356

Cannot write to input IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-25

Decimal

Hexadecimal

Description

41815

$A357

Odd-number is specified for relative position (offset).

41816

$A358

Bit position is out of limits.

41817

$A359

Bit count is out of limits.

41018

$A35A

"Bit position+bit count error" is out of data limits.

41819

$A35B

Cannot write to data status error data.

41825

$A361

The size exceeds the FIFO.

41826

$A362

Power failure or other abnormality occurred during a write request.

41827

$A363

Abnormal card or node, or extended power failure

41828

$A364

Excessive number of write requests

41829

$A365

Internal error

41830

$A366

Setting value size error for monitoring time during a wait for transmission completion.

41831

$A367

Setting value for monitoring time during a wait for transmission completion is out of range.

41832

$A368

Write transmission wait time is over.

41833

$A369

Write transmission completion wait time is over.

41841

$A371

SEBOL specification is not set. (zero UPFIFO size)

41842

$A372

SEBOL specification is not set. (zero DOWNFFO size)

41843

$A373

Subsystem SEBOL type is not supported.

41873

$A391

RS communication error (Communication driver is "busy.")

41874

$A392

RS communication error (Communication line is "busy.")

41875

$A393

RS communication error (Communication line is "not ready.")

41876

$A394

RS communication error (Excessively large transmission size)

41877

$A395

RS communication error (Communication port specification is not declared.)

41879

$A397

RS communication error (Underline error occurred.)

41880

$A398

RS communication error (Reception inter-character time is over.)

41881

$A399

RS communication error (Reception buffer overflow)

41882

$A39A

RS communication error (Reception data parity error)

41883

$A39B

RS communication error (Reception overrun error)

41884

$A39C

RS communication error (Reception framing error)

41885

$A39D

RS communication error (The number of reception characters is out of specification.)

41887

$A39F

RS communication error (Miscellaneous)

41904 to 41983

$A3B0 to $A3FF

42001

$A411

Non-existing area number is specified.

42010

$A41A

Accessed to a function block in O/S mode.

42011

$A41B

Accessed to a function block in complex O/S mode.

42019

$A423

Status change request is unacceptable to the current block.

42020

$A424

Change is prohibited to the data status that a change was requested.

42094

$A46E

Invalid data type upon data setup request

43521

$AA01

Undefined CP213 communication function option

43522

$AA02

Writing to the input data is disabled while I/O is not disconnected.

RS communication error (Refer to the function specification of the subsystem connected.)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-26

Decimal

Hexadecimal

Description

43577

$AA39

Read width is out of limits.

43578

$AA3A

Write width is out of limits.

43579

$AA3B

Write width is out of the write range.

43580

$AA3C

Writing is not permitted to this data.

43581

$AA3D

Error in the kind of element.

43582

$AA3E

Error in the name of element.

43583

$AA3F

Register number is out of limits.

43584

$AA40

Invalid bit position

43585

$AA41

Element number is out of limits.

43586

$AA42

Specified data item name does not exist.

43587

$AA43

Error in the specified data type.

43588

$AA44

Specified register number is not assigned.

43793

$AB11

Non-existing area number is specified.

44211

$ACB3

System element of the present station is specified, even though other plant has been specified.

44305

$AD11

State transition is disabled.

44306

$AD12

Initialization operation is in progress.

44307

$AD13

Invalid data item name

44308

$AD14

Interrupt processing is running.

44309

$AD15

Non-existing generic name is used, or non-existing operation generic name is used.

44310

$AD16

Invalid tag name specified in an operation name.

44311

$AD17

Unmatched left- and right-side data types in a transition condition.

44312

$AD18

Cannot change the block status in O/S block mode.

44313

$AD19

Constant is used on the left side member of a transition condition.

44314

$AD1A

Invalid tag name used as a step transition condition.

44315

$AD1B

Invalid tag name used as a parallel transition condition.

44317

$AD1D

Cannot run a unit instrument because it is under online maintenance.

44338

$AD32

Cannot run an operation.

44339

$AD33

Cannot execute pre-status change processing for an operation.

44340

$AD34

Cannot execute post-status change processing for an operation.

44341

$AD35

Cannot send a signal to an operation.

44343

$AD37

Cannot convert an operation generic name to a tag name.

44344

$AD38

Simultaneous step start ups exceed the limits.

44345

$AD39

Simultaneous parallel execution exceed the limits.

44346

$AD3A

The number of parallel maximum steps is exceeded within the parallel.

44347

$AD3B

Cannot obtain the dynamic management area.

44348

$AD3C

Cannot obtain a state transition matrix, or transition destination is not defined.

44349

$AD3D

Cannot obtain a unit procedure

44354

$AD42

EXECERR action is not defined for a state transition matrix.

44357

$AD45

Unit recipe start up was requested for a fixed procedure unit instrument.

44418

$AD82

State transition matrix does not exist.

44421

$AD85

Unit instrument status name is not defined in the builder. IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-27

Decimal

Hexadecimal

Description

44423

$AD87

Status change command name is not defined in the builder.

44426

$AD8A

Target status name is not defined in the builder.

44427

$AD8B

The corresponding state transition is prohibited in the state transition matrix.

44430

$AD8E

Unit procedure is under online maintenance.

44431

$AD8F

Unit procedure does not exist.

44434

$AD92

Unit procedure is not specified.

44435

$AD93

Unit instrument’s allocation dynamic area is not allocated. (Average number of parallel execution units defined by station or the number of unit instruments is "0.")

44437

$AD95

Available unit instrument’s dynamic work area falls below 5 %.

44438

$AD96

No unit instrument’s dynamic work area is available.

44451

$ADA3

Unit instrument is already active.

44452

$ADA4

Unit instrument is already inactive.

44467

$ADB3

Process alarm character string is not defined by the builder.

44469

$ADB5

Non-existing generic name is used.

44470

$ADB6

Array subscript for the generic name is out of range, or error in the array dimension.

44471

$ADB7

Null character string is assigned to a tag name assigned to the generic name.

44512

$ADE0

The unit instrument does not allocate valve pattern monitor.

44513

$ADE1

Cannot allocate the valve pattern monitor because the block status of the unit instrument is END.

44514

$ADE2

Cannot allocate the valve pattern monitor because the block status of the unit instrument is ABORTED.

44515

$ADE3

The unit instrument has already allocated another valve pattern monitor.

44543

$ADFF

Unsupported function is used.

44547

$AE03

The batch ID recipe does not exist (*1).

44549

$AE05

Cannot receive the specified status modification command with the current unit recipe status.

44552

$AE08

Cannot cancel or load the unit recipe for unit recipe No.1.

44553

$AE09

Incorrect common block name.

44554

$AE0A

Incorrect common data item name.

44557

$AE0D

Incorrect status modification command name.

44566

$AE16

Cannot activate unit recipe because recipe status is not ACTIVE.

44803

$AF03

Remote station common data.

44804

$AF04

Invalid batch ID.

44805

$AF05

Invalid common block name.

44806

$AF06

Invalid common data item name.

44811

$AF0B

Setting to reference-only data was attempted.

44812

$AF0C

Data setting validity check judged the setting invalid.

44813

$AF0D

Array element was specified to a scalar type.

44814

$AF0E

Array element was not specified, even though in the array type.

44815

$AF0F

Two-dimensional element was specified for a one-dimensional array.

44816

$AF10

Requested array element specification exceeded the maximum number of elements for item definition.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-28

Decimal

Hexadecimal

Description

44822

$AF16

The number of parameter requested is negative, or exceeds the maximum number.

45057

$B001

Unassigned generic name was used.

45058

$B002

Generic name marked by an asterisk (*) is used. (No error message is output.)

45072

$B010

The sequence table or the logic chart is being used by "drivewait" sub-statement, cannot be started again.

45073

$B011

Sequence table or a logic chart block mode in the "drivewait" start up condition became O/S.

45074

$B012

% (present block) cannot be used in a group assignment statement with a plant name specified.

45075

$B013

%% (present unit instrument) cannot be used in a group assignment statement with a plant name specified.

45104

$B030

Accessed to another station while CPU allocation was monopolized.

45311

$B0EF

Unsupported function is used.

45314

$B102

Signal destination is other than SFC block, operation, or unit instrument.

45315

$B103

Signaling operation illegal for a unit instrument was sent.

45316

$B104

Destination block is halted due to a database error.

45317

$B105

Destination block is not running.

45318

$B106

Signal processing with the specified signal name is not defined at the signal recipient SFC block.

45319

$B107

Neither signal processing with the specified signal name nor queued signal processing is not defined at the signal recipient SFC block.

45320

$B108

Illegal operation for an interrupt signal was made.

45321

$B109

Signals with a return signal cannot be transferred because interrupt signal reception processing has already been defined to the corresponding signal at the signal recipient SFC block.

45322

$B10A

Signals cannot be received because the number of signal parameters exceeds the maximum number of signal parameters.

45323

$B10B

Signals cannot be received because the maximum receiving number of signals are queued.

45324

$B10C

Signals cannot be received because the maximum receiving number of signals are queued. (including those in return signal processing)

45325

$B10D

"wait for qsignal" was executed in a program other than a main program.

45326

$B10E

Maximum number of queuing signals that can be received is "0."

45360

$B130

Internal error occurred at the signal destination.

45569

$B201

Function permitted only in an operation

45571

$B203

Has not been run from a unit instrument

45572

$B204

SFC blocks do not exist at all.

45573

$B205

Starting up of function blocks other than operation from the unit instrument was attempted.

45574

$B206

Block status cannot be changed because the block mode of an operation is in O/S.

45575

$B207

Being run from another unit instrument

45576

$B208

Block status cannot be changed because the pre-status change processing is in progress.

45577

$B209

Block status cannot be changed because the post-status change processing is in progress.

45578

$B20A

Database associated with the SFC sequence name is not found.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-29

Decimal

Hexadecimal

Description

45579

$B20B

SFC sequence main program is under online maintenance.

45580

$B20C

Pre-status change processing judged the status change invalid.

45581

$B20D

Error was detected during the pre-status change processing.

45582

$B20E

Pre-status change processing exceeded the maximum number of lines that can be run.

45583

$B20F

SFC sequence main program does not exist.

45584

$B210

Online maintenance of the SFC sequence main program is incomplete.

45585

$B211

SEBOL area database does not exist.

45586

$B212

Cannot run an operation because no dynamically reserved area is available.

45587

$B213

Cannot change the block status because the operation termination processing is in progress.

45616

$B230

Internal error occurred in an operation.

46081

$B401

Cannot run an SFC block because no dynamically allocated area is available.

46097

$B411

Cannot change STEPNO because the block status is not PAUS.

46098

$B412

Cannot change a step to an interrupt program step (interrupt program step number cannot be set to STEPNO).

46100

$B414

Cannot change STEPNO while pre-status change processing is in progress.

46101

$B415

Cannot change STPNO while post-status change processing is in progress.

46113

$B421

Cannot change the block mode to O/S because the block status is not STOP or ABRT.

46114

$B422

Cannot change the block status in O/S block mode.

46115

$B423

Cannot receive the status change command RSET in the RUN block status

46116

$B424

Cannot receive the status change command ABRT in the STOP block status

46117

$B425

Cannot receive the status change command RSET in the PAUS block status

46118

$B426

Cannot receive the status change command RUN in the ABRT block status

46119

$B427

Cannot receive the status change command PAUS in the ABRT block status

46120

$B428

Cannot receive the status change command STOP in the ABRT block status

46121

$B429

Cannot change the block status while pre-status change processing is in progress.

46122

$B42A

Cannot change the block status while post-status change processing is in progress.

46124

$B42C

Cannot change the block mode to SEMI due to the specification of the SEMI mode operation

46125

$B42D

Cannot change the block status of a monitoring operation

46126

$B42E

Cannot run an operation other than from a unit instrument

46127

$B42F

SFC block termination processing is in progress.

46128

$B430

Pre-status change processing determined the status change invalid.

46129

$B431

Error was detected in pre-status change processing.

46130

$B432

Pre-status change processing exceeded the maximum number of execution lines.

46131

$B433

Block mode cannot be changed because pre-status change processing is in progress.

46132

$B434

Cannot change the block status while post-status change processing is in progress

46133

$B435

Block mode cannot be changed because SFC block termination processing is in progress.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-30

Decimal

Hexadecimal

Description

46161

$B451

SFC sequence main program does not exist.

46162

$B452

Common area data base for SEBOL stations do not exist.

46163

$B453

Data base for SFC sequence is not found.

46164

$B454

Online maintenance of the SFC sequence main program is incomplete.

46165

$B455

SFC block cannot be changed because the SFC sequence main program is under online maintenance.

46166

$B456

SEBOL area database does not exist.

49936

$C310

No response from the destination station.

49938

$C312

Destination station CPU is not ready.

49939

$C313

"A-time Over" occurred at the destination station.

49940

$C314

No receiving process on the destination station.

49943

$C317

"C-time Over" occurred at the destination station.

50577

$C591

ACM 12 communication module database is not defined.

50578

$C592

ACM 12 communication module database not defined.

50579

$C593

ACM 12 communication module database not defined.

50580

$C594

ACM 12 communication module database not defined.

50581

$C595

ACM 12 communication module database not defined.

50582

$C596

ACM 12 communication module database not defined.

50583

$C597

ACM 12 communication module database not defined.

50593

$C5A1

Database error

50594

$C5A2

Database error

50595

$C5A3

Specified size exceeds the data range.

50596

$C5A4

Database error

50597

$C5A5

Database error

50598

$C5A6

Database error

50599

$C5A7

Database error

50600

$C5A8

Database error

50601

$C5A9

Database error

50602

$C5AA

Zero ACM I/O communication module

50603

$C5AB

Specified point is not defined.

50604

$C5AC

Can not find configuration for this node.

50605

$C5AD

The designated node is not the node for communication I/O.

50606

$C5AE

Abnormal card number

50607

$C5AF

Database error

50608

$C5B0

Data type is not defined.

50641

$C5D1

Abnormal FIFO data size

50676

$C5F4

Internal error

50696

$C608

Tag name is not found in the plant.

53249

$D001

Reference value does not agree the data.

43250

$D002

Alarm status (ALRM) is not NR.

43251

$D003

Abnormal data status

53264

$D010

Cannot collect data item ALRM.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-31

Decimal

Hexadecimal

53280

$D020

Cannot change the block mode to O/S because the block status is RUN.

53281

$D021

Cannot change the block mode to O/S because the block status is PAUS.

53282

$D022

Cannot get the valve pattern monitor because of O/S block mode.

53283

$D023

Cannot change the block status because the block status is O/S.

53284

$D024

Cannot receive the status change command RUN because the block status is STOP.

53285

$D025

Cannot receive the status change command PAUS because the block status is STOP.

53312

$D040

The valve pattern monitor is under online maintenance.

53313

$D041

The valve pattern monitor is allocated in another unit instrument.

53314

$D042

Different control area for the valve pattern monitor and the unit instrument.

53315

$D043

The specified function block is not a valve pattern monitor.

53376

$D080

The number of registered items exceeds the limits.

53377

$D081

Cannot register data item ALRM

53499

$D0FB

Abnormal data item name for the drive vpmon statement.

53500

$D0FC

Will abort because an error was detected in initialization processing of system definitions.

53501

$D0FD

A function not supported was used.

53502

$D0FE

Internal error

53503

$D0FF

The valve pattern monitor is not registered optionally.

53504

$D100

Cannot monitor undefined data type.

53512

$D108

Cannot monitor character-string type.

53532

$D11C

Cannot monitor single precision floating-point data.

53533

$D11D

Cannot monitor single precision floating-point data with data status.

53535

$D11F

Cannot monitor single precision floating-point data with data status or range.

53536

$D120

Cannot monitor double precision floating-point data.

53537

$D121

Cannot monitor double precision floating-point data with data status.

53540

$D124

Cannot monitor alarm type.

53544

$D128

Cannot monitor bit type.

53548

$D12C

Cannot monitor indirect type.

53556

$D134

Cannot monitor data combination information.

53560

$D138

Cannot monitor dynamic data type.

53564

$D13C

Cannot monitor data item names.

53568

$D140

Cannot monitor because data type is undetermined.

53569

$D141

Cannot monitor I/O data not connected.

53631

$D17F

Cannot monitor HIS reservation type.

*1:

SEE ALSO

Description

Even when the recipe with corresponding batch ID is reserved by operation and monitoring function, the detail error code $AE03 may still occur if the recipe is not downloaded to the control station.

For more information about other conditions that may generate the detail error code $AE03, refer to: “n Conditions for Accessing Common Block Data” on page 6-15

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-32



13.5

Values Used when an Error Occurred

When an SFC block continues its execution after an error that can continue the program execution has occurred, the program will use a substitution values for the variable or expression that caused the error. This section explains about the values used instead of the variable or expression that caused the error. Also in this section, actions after an error occurs during assignment processing or calculation processing of expression will be explained.

n Calculation Error Calculation errors include overflow and zero-division. The following shows the values used instead of calculation results in the case of error occurrence. Calculation of expressions will be continued using those values. •

Overflow Maximum absolute value of “double” type with the same sign as the calculation result.



Zero-divide Maximum absolute value of “double” type with the same sign as the dividend.

However, in a division operation using the “/” operator, if 0 is divided by 0 when either or both of the dividend numbers is/are real-number type, the “invalid calculation error” will result. The execution of the statement in which an error occurred is terminated, while execution of SFC block is continued.

n Outside the Array Subscript Range Error If an outside the array subscript range error occurs, execution of the statement is terminated. When this error occurs, assignment is not performed for an assignment statement, and a message will not be output for a “message” statement. When multiple data are processed in one line by the group assignment statement, “drive” statement or “compare” statement, if the statement contains an error variable categorized as out-of-array subscript range, processing for all other variables are terminated. Since the outof-array subscript range error is categorized as an error that can continue program execution, execution of SFC block will be continued.

n Error in Referencing Function Block Data If a communication error, etc. occurs during reference to a function block data, execution of the statement is terminated. When this error occurs, assignment is not performed for an assignment statement, and a message will not be output for a “message” statement. When multiple data are processed in one line by the group assignment statement, “drive” statement or “compare” statement, if the statement contains data which causes a communication error, the processing with regard to the data will be terminated, while processing for other variables (data) are executed. Since the error in referencing function block data is categorized as an error that can continue program execution, execution of SFC block will be continued (error class error code: 100).

n Type Conversion Errors If an overflow occurs during type conversion, the following values are given. Calculation of expression is continued using these values. Table 13.5-1 Positive and Negative Maximum Absolute Values Data Types integer

Positive maximum absolute value 32767

Negative maximum absolute value -32768

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-33

Data Types

Positive maximum absolute value

Negative maximum absolute value

long

2147483647

-2147483648

float

3.402823*10^38

-3.402823*10^38

double

1.79769313486231*10^308

-1.79769313486231*10^308

n Assignment Errors If an error occurs on the right-hand side of an assignment statement (overflow or zero-division), assignment is done if the assigned variable is a local variable. If the assigned variable is a function block data, no assignment is done, retaining the same assigned value. If an overflow occurs during type conversion when assigning the data to a local variable, the maximum absolute value with the same sign is assigned. If an overflow occurs during type conversion when assigning the data to a function block data, no assignment is done, retaining the same data value.

n Errors in Character String and Numeric Type When creating a program using implicit declarations of tag name types, if a tag name which is not defined via the builder or the tag name of the FCS that is different from the one the SFC block belongs is used, the data item type of the function block is not checked during compilation. If this program has an error, a run-time error such as assigning a string data to a numeric variable might occur. If a character-string variable appears in the operand for an operator that handles numeric value such as an arithmetic operator, a run-time error occurs and the execution of the statement is terminated. For example, if it is a “message” statement, the message is not output. Also, when assignment of numeric value to a character-string type variable or assignment of a character string to numeric type variable is attempted, a run-time error occurs and no assignment is done. However, when multiple data are processed in one line by the group assignment statement, “drive” statement or “compare” statement, if the statement contains a variable that will cause character string and numeric type error, processing for all other variables are terminated. These errors are classified as an error that can continue program execution, and the execution of the SFC block in which the error occurred will be continued.

n Conditional Expression Errors in Control Statements Actions taken when an error that can continue program execution occurs during calculation of conditional expressions in a control statement are shown below:

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

13-34



"if" statement

··· The condition is treated as unsatisfied.

"for" statement

··· Program execution is resumed from the statement following the "next" statement.

"while" statement

··· The condition is treated as unsatisfied.

"until" statement

··· The condition is treated as satisfied.

"wait until" statement ··· Branches to the designated destination if "error" or "errorsub" exists. If not, the program is resumed from the next statement. "switch" statement

··· If "otherwise" exists, program execution is resumed from the line following the "otherwise." If not, the program is resumed from the statement following the "end switch" statement.

Figure 13.5-1 conditional expression errors in control statements

n Errors in Sequence Table or Logic Chart The steps in SFC blocks can be described in SEBOL or in sequence tables or logic charts. If an error is detected in the step in a sequence table or a logic chart during the execution, the SFC block is forcibly terminated and the block status becomes ABRT. The actions taken when an error is detected in a transition condition for the step described in a sequence table or a logic chart, are the same as the steps described in SEBOL. The SFC block will not be forcibly terminated and the transition condition is determined unsatisfied. Actions for error occurrence are shown below. Table 13.5-2 Errors in Sequence Table or Logic Chart Step type

Program type Pre-status change Post-status change processing processing

Main program

Interrupt signal processing

ST step

ABRT (*1)

- (*2)

ABRT (*1)

ABRT (*1)

ST oneshot

ABRT (*1)

Determined as unchangeable

ABRT (*1)

ABRT (*1)

LC step

ABRT (*1)

- (*2)

ABRT (*1)

ABRT (*1)

LC oneshot

ABRT (*1)

Determined as unchangeable

ABRT (*1)

ABRT (*1)

*1: *2:

Indicates that the SFC block will be forcibly terminated and the block status becomes ABRT. In the pre-status change processing, it is determined the status is unchangeable but the block status of the SFC block does not change. -: An ST step or a LC step cannot be used in the pre-status change processing.

n Errors in Transition Condition If an error that can continue program execution occurs during calculation of transition condition in an SFC block, the transition condition is treated as “status unsatisfied.”

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

14-1



14.

Referencing the Information of SEBOL Activities Per each basic scan, what the SEBOL programs are doing and how many times the programs are executed can be referenced. The SEBOL activities are measured by the system function block of FCS_SBL. The information of SEBOL activities can be displayed on the HIS as the data items of the system function block of FCS_SBL. The information displayed by the system function block will be initialized when the system function block mode is changed from MAN to AUT.

TIP The system function blocks are available in FFCS-V only. For referencing the system function block data, only the SEBOL programs running in FFCS-V are capable.

n List of SEBOL Related Information Items: FFCS-V The number of execution lines, the number of running function blocks and the number of accesses from other stations that are relevant to all the SEBOL programs of periodic type and timeshare type per each basic scan are measured and displayed by the system function block. The SEBOL related information items are listed as follows: Table 14-1 SEBOL Related Information Items Item

Description

Normal Range

PFEL

The total number of execution lines in all periodic SEBOL programs per 0 to 60000 basic scan.

PXEL

The largest PFEL so far per each basic scan.

0 to 60000

PSDB

The number of function blocks that include periodic SEBOL programs defined in control drawings.

0 to 300

PFMB

The number of function blocks that include running periodic SEBOL programs (BSTS is RUN).

0 to 300

PXMB

The largest PFMB so far per each basic scan.

0 to 300

PFSA

The total number of accesses to other stations from all the periodic SE- 0 to 300 BOL programs per each basic scan.

PXSA

The largest PFSA so far per each basic scan.

PMLB

The tag name of function blocks that include the periodical SEBOL pro- grams that executes most lines per basic scan.

PMLC

The number of execution lines in the periodic SEBOL programs that ex- 0 to 2000 ecutes most lines per basic scan.

TFEL

The total number of execution lines in all the timeshare SEBOL programs per each basic scan.

-

TXEL

The largest TFEL so far per each basic scan.

-

TSDB

The number of function blocks that include timeshare SEBOL programs 0 to 300 defined in control drawings.

TFMB

The number of function blocks that include running timeshare SEBOL programs (BSTS is RUN).

0 to 300

TXMB

The largest TFMB so far per each basic scan.

0 to 300

TFSA

The total number of accesses to other stations from all the timeshare SEBOL programs per each basic scan.

-

TXSA

The largest TFSA so far per each basic scan.

-

0 to 300

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

14-2



SEE ALSO

For more information about the system function block of FCS_SBL, refer to: 5.4.4, “SEBOL Related Information Block (FCS_SBL)” in the Function Blocks Reference Vol.3 (IM 33K03E24-50E)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

15-1



15.

Reserved Words in SEBOL

▼ Reserved Words in SEBOL

Identifiers listed in the following tables are used as reserved words by the compiler. Thus, they cannot be used for other purposes.

n List of Reserved Words in SEBOL Parentheses () in the table indicates the position each reserved word is used in the program. [D] indicates a declaration, [S] a statement, [B] a built-in function, [O] an operator, [CALC] a word reserved for calculation expression, [XL] a word reserved for SEBOL in CENTUM-XL, and [N] indicates others. PV, MV and other data item names used for function block data are not the reserved words for the compiler and can be used as local and other variable names. Even though these data item names can be used as variable names for local variables, etc., it makes the program difficult to read. Therefore, it is recommended not to use the data item names as variable names. Table 15-1 List of Reserved Words Reserved word

Reserved word

Reserved word

ACOS (B)

ACTION (N)

ALIAS (D)

AND (O)

ARGBLOCK (D)

ASIN (B)

ASSIGN (S)

ASTM1 (CALC)

ASTM2 (CALC)

ASTM3 (CALC)

ASTM4 (CALC)

ATAN (B)

BEGIN (S)

BITPSTN (B)

BITSRCH (B)

BLOCK (D)

BOOT (B)

CASE (S)

CAT (B)

CCMREAD (B)

CCMREADBID (B)

CERRORID (B)

CHANGE (N)

CHAR (D)

CHAR16 (N)

CHAR32 (N)

CHAR4 (N)

CHAR8 (N)

CHECK (S)

CHR (B)

CISTEP (N)

CKSTEP (B)

CKSTEPCL (B)

CMWRITE (B)

CMWRITEBID (B)

COMPARE (S)

CONFIRM (N)

COS (B)

CP (N)

CREADPARA (B)

DABS (B)

DCMREAD (B)

DCMREADBID (B)

DELAY (S)

DELAYCYCLE (S)

DERRORID (B)

DIALOGUE (S)

DLIMIT (B)

DMAX (B)

DMIN (B)

DOUBLE (D)

DREADPARA (B)

DRIVE (S)

DRIVEWAIT (S)

DSCHECK (B)

ELSE (S)

END (S)

ENTRY (S)

EOR (O)

ERETURN (S)

ERRC (B)

ERRCE (B)

ERRF (B)

ERRL (B)

ERROR (S)

ERRORSUB (N)

ERRORVAL (B)

ERRP (B)

ERRS (B)

ESTEP (N)

EVENT (N)

EXIT (S)

EXP (B)

FLOAT (D)

FOR (S)

FORMAT (S)

FUNCTION (S)

GENNAME (D)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

15-2

Reserved word

Reserved word

Reserved word

GETDATE (B)

GETNAME (B)

GETTAGNO (B)

GETTIME (B)

GLOBAL (D)

GOTO (S)

HISTORY (S)

ICHR (B)

IF (S)

INDEPENDENT (S)

INDEX (B)

INITIAL (N)

INT (B)

INTEGER (D)

ISIGMASK (S)

ISIGUNMASK (S)

ISTEP (N)

LABS (B)

LCMREAD (B)

LCMREADBID (B)

LEFT (B)

LEN (B)

LERRORID (B)

LEVEL (S)

LLIMIT (B)

LMAX (B)

LMIN (B)

LOCALTIME (B)

LOG (B)

LOGICCHART (S)

LONG (D)

LREADPARA (B)

M3 (N)

MASK (S)

MESSAGE (S)

MID (B)

MOD (O)

MSTEP (N)

NEXT (S)

NOPREEMPT (S)

NOT (O)

NOTCHECKARG (N)

OG (N)

ONESHOT (S)

OPEGUIDE (S)

OR (O)

OTHERWISE (S)

PC (CALC)

PCKP (CALC)

PCMP (CALC)

PCP (CALC)

POWER (B)

PR (N)

PRCSALARM (S)

PROGRAM (CALC)

QSIGCANCEL (S)

QSIGMOVE (S)

QSIGNAL (S)

QUEUE (D)

QUIT (S)

RECOVER (S)

REPEAT (S)

REQUEST (S)

RESULT (N)

RETRY (N)

RETURN (S)

RIGHT (B)

RISTEP (N)

RPRESERVE (B)

RQ (N)

SEBOL (N)

SEBOLBLOCK (N)

SEMLOCK (S)

SEMUNLOCK (S)

SEQTABLE (S)

SFCBLOCK (N)

SIGNAL (S)

SIN (B)

SNAPSHOT (S)

SNUM (B)

SQRT (B)

SSDTWRITE (N)

SSDTWRITEBIT (N)

SSREAD (S)

SSWRITE (S)

SSWRITEBIT (S)

STARTSTEP (N)

STEP (N)

SWITCH (S)

SYSALARM (S)

TAN (B)

TC (CALC)

TCF (CALC)

THEN (S)

TIMEGMT (B)

TIMEMS (B)

TO (N)

TPC (CALC)

TPCF (CALC)

TPCFP (CALC)

TPCKP (CALC)

TPCMP (CALC)

TPCP (CALC)

UINTEGER (N)

ULONG (N)

UNIT (S)

UNTIL (S)

URASSIGN (B)

URASSIGNBID (B)

URLOAD (B)

URLOADBID (B)

VM (N)

VPMOFF (S)

VPMON (S)

VPMRESET (S)

VPMSTART (S)

WAIT (S)

WEND (S)

WHILE (S)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

15-3



n List of Reserved Words in SEBOL Related to Process Management Table 15-2 List of Reserved Words in SEBOL Related to Process Management Reserved word

Reserved word

Reserved word

ccmread (B)

ccmreadbid (B)

cmwrite (B)

cmwritebid (B)

dcmread (B)

dcmreadbid (B)

lcmread (B)

lcmreadbid (B)

rpreserve (B)

urassign (B)

urassignbid (B)

urload (B)

urloadbid (B)

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Blank Page

16-1



16.

Application Size

▼ Application Size

Application sizes for SFC block and SEBOL program are shown below:

n Maximum Number of Variable Declarations The number of variable declarations is limited. If the limit is exceeded, a compile error occurs. The following table shows the maximum number of variable declarations per SEBOL program. The number of variables includes local variables and tag names that are implicitly declared. Table 16-1 Maximum Number of Variable Declarations Variable type

Declaration statement

No. of Names

Remarks

Total Elements(*1)

integer, long, float, double, char*n

Total of all types. Count respectively if the local variables with same name are declared in multiple steps.

1024 in all

(*2)

block

Including implicit declarations (*3). Total tag names of the “global block” declarations and “block” declarations in SFC block. If the same tag name is declared using “block” in multiple steps, it is counted as one. The tag names only declared but not accessed are not included in the count.

256

256

Local genergenname ic name

The total number of local generic names declared by “global genname” or “genname” in SFC block. If the same local generic name is declared using “genname” 128 in multiple steps, it is counted individually. The local generic names only declared but not accessed are not included in the count.

256

Generic name

The total number of local generic names declared by “global unit genname” and “genname” in SFC block. If the same generic name is declared using “unit gen256 name” in multiple steps, it is counted as one. The generic names only declared but not accessed are not included in the count.

512

Local variable/global variable

Tag names

*1: *2:

*3:

unit genname

Total in the entire program unit. The number of array elements is counted, assuming a simple variable as 1. A compile error occurs if the size of local variable area exceeds 2147483646 ($7FFFFFFE) bytes. This area includes the area to keep alignment. See the list below for the alignment of variables. • integer: 2 • long: 4 • float: 4 • double: 8 • char*n: 2 Tag names of the actions that are described in a sequence table or a logic chart in an SFC block are included in the count. The present block (%) and the present unit instrument (%%) are not included.

Since the size of a dummy argument array is determined by the actual argument, there are no limitations in the number of dummy arguments, except that the maximum number of arguments per function is 32.

n Other Maximum Values for SEBOL Maximum Values Other than Maximum Number of Variable Declarations are shown below.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

16-2



l

Maximum Values Other than Maximum Number of Variable Declarations Table 16-2 Maximum Values Other than Maximum Number of Variable Declarations Description

Max. value

Length per line (including continuing line)

511 bytes

Line number

9999

Size per program

65535 bytes

Function block data usable in expressions (total for one line)

32

Number of operators usable in one expression

64

#define

2048 Per one compile unit

#include

16 Per one compile unit

Object size

l

Remarks

100K bytes Per one compile unit

Maximum Values Related to SFC Blocks Table 16-3 Maximum Values Related to SFC Blocks Description Number of steps in one SFC (*1) Total number of steps in one SFC block (*2) Number of interrupt programs Number for one step Size for one SEBOL step Transitions in one step *1: *2:

Max. value

Remarks 99

300 31 2000 65535 bytes 8

Max. 99 SFC steps for each of the main program and interrupt program. Max. 300 SFC steps for the main program and interrupt program in one SFC block as a total.

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Ind-1

SEBOL Reference IM 33K03K10-50E 3rd Edition

INDEX A Allocating CPU Time.........................................10-1 Application Size................................................ 16-1 Arguments for Function Block Data.................... 4-9 Assignment Statement......................................2-14

C Character String Format................................... 9-23 compare Statement...........................................5-16 Conversion of Operands................................... 2-12

D Deadlock and How to Prevent It........................11-3 Declaring and Referencing Array........................3-4 Declaring and Referencing Simple Variables......3-2 delay................................................................. 8-15 delaycycle......................................................... 8-16 Detail Error Codes.......................................... 13-18 dialogue.............................................................. 9-6 drive Statement.................................................5-20

E Error Class Codes.............................................13-8 Error Handling...................................................13-1 Statements with I/O or Communication..... 13-2 Values Used when an Error Occurred..... 13-32 Expressions........................................................ 2-1

F for........................................................................8-4 format................................................................9-24 Function Block Data............................................5-1 Functions............................................................ 4-1

G goto................................................................... 8-13

H history............................................................... 9-14

I if ......................................................................... 8-2 Implicit Declarations.......................................... 1-11 Include File........................................................1-15

L Local Variables....................................................3-1

M Managing Shared Resources............................11-1 message........................................................... 9-12 Message Statements.......................................... 9-1

N nopreempt Statements......................................10-1

O opeguide............................................................. 9-4 Operation Priority.............................................. 2-10 Operators............................................................ 2-1

P prcsalarm.......................................................... 9-18 Process Management......................................... 6-1 Program Control Statements.............................. 8-1

R repeat..................................................................8-8 request.............................................................. 9-16

S SEBOL Basics.......................................................... 1-1 Constants.....................................................1-7 Data Types...................................................1-5 Identifiers..................................................... 1-3 Program Units..............................................1-2 Referencing the Information of Activities... 14-1 Reserved Words........................................ 15-1 IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Ind-2 Rules............................................................1-4 Variables...................................................... 1-9 semlock Statement............................................11-1 semunlock Statement........................................11-1 Signal Processing............................................. 12-1 Substitution of Character String........................ 1-13 Subsystem Communication................................ 7-1 switch................................................................ 8-11 Syntax of Expressions...................................... 1-22

sysalarm............................................................9-17

U unit prcsalarm................................................... 9-22

W wait until.............................................................. 8-9 while....................................................................8-6

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Rev-1

Revision Information Title

: SEBOL Reference

Manual No. : IM 33K03K10-50E Jun.2013/3rd Edition/R5.03 or later* * : Denotes the release number of the software corresponding to the contents of this user’s manual. The revised contents are valid until the next edition is issued. Preface

The preface text is modified.

Jun.2012/2nd Edition/R5.02.00 or later 1.5

"■ Floating-Point Constants" is revised.

5.1

"● Declaring a Generic Name" is revised for the example.

5.15

Add the information about ST16E.

5.16

Add the information about LC64-E.

Sep. 2011/1st Edition/R5.01 or later Newly published

n For Questions and More Information If you have any questions, you can send an E-mail to the following address. E-mail: [email protected] Yokogawa Electric Corporation n Written by n Published by Yokogawa Electric Corporation 2-9-32 Nakacho, Musashino-shi, Tokyo 180-8750, JAPAN KOHOKU PUBLISHING & PRINTING INC. n Printed by

IM 33K03K10-50E

3rd Edition : Jun.28,2013-00

Blank Page

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF