Nv Series v Series Programming Instructions (LD FBD SFC ST)
        
        
        
        
        
        Comments
        
     
 
Description
    6F8C1226Programming Instructions  (LD/FBD/SFC/ST) Unied Controller nv Series Integrated Controller vseries 1226.3.1009   P r o g r a m m i n g   I n s t r u c t i o n s   ( L D / F B D / S F C / S T ) U n i  e d   C o n t r o l l e r   n v   s e r i e s   & I n t e g r a t e d   C o n t r o l l e r   V   s e r i e s Unied Controller nv series & Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST) September 30, 2010 © Toshiba Corporation 2010     All Right Reserved. No part of this document may be reproduced without the prior written consent of Toshiba. Transmission Distribution & Industrial Systems Company Microelectronics & System Components Department - System Components Support Group 1, Toshiba-Cho, Fuchu-Shi, Tokyo, 183-8511, Japan            Tel +81-42-333-2206 Third Edition Notes (1)  The technical information provided herein describes typical operations and applications of the product and does not  guarantee the intellectual property rights or other rights of Toshiba or third parties nor allows license of its use. (2)  No part or the whole of this document may be reproduced without prior consent. (3)  The information herein may be changed in the future without notice. (4)  All  possible  measures  have  been  taken  to  prepare  the  information  herein.  If  you  have  any  question,  comment,  or  nd any error, please contact us. PROSEC, TOSLINE, TOSDIC, CIEMAC are trademarks or registered trademarks of Toshiba Corporation. Microsoft, Windows are registered trademarks of Microsoft Corporation in the U.S. and other countries. DeviceNet is a registered trademark of Open DeviceNet Vender Association Inc.     Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  i      Restrictions on Application    This product is not developed/manufactured for use in systems involving devices that  directly affect human life (Note 1).    Do not use them for such applications.    To use this product for systems that involve devices that significantly affect human safety  or maintenance of public functions (Note 2), special considerations (Note 3) are required  in system operation, maintenance, and management.    In this case, contact one of  Toshiba's sales representatives.  (Note 1) Devices that directly affect human life include the following.  ·  Medical devices such as life supporting devices and devices for surgical units.  (Note 2) Systems that involve devices that significantly affect human safety or  maintenance of public functions include the following.  · Main unit control systems of nuclear power plants, safety protection systems of  nuclear facilities, and other systems that are critical for safety  · Operation control systems of mass transportation systems and air traffic control  systems  (Note 3) Special considerations indicate sufficient discussions with Toshiba's engineers to  construct a safe system (e.g. employing fool-proof design, fail-safe design, or  redundant design).        Disclaimer    Toshiba shall not be responsible for any damage caused by fire or earthquake, acts of a  third party, other accidents, the user's willful acts or negligence, misuse, or use in  abnormal conditions.    Toshiba shall not be responsible for any incidental damage (loss of business profits,  interruption of business, change or loss of stored memory) caused by use of or being  unable to use this product.    Toshiba shall not be responsible for any damage caused by failure to observe the  information described in the operation manual.    Toshiba shall not be responsible for any damage caused by malfunctions due to  combination with any connected device.    Toshiba shall not be responsible for any damage caused by malfunctions due to  combination with any application program created by the customer.    Note  Use your cellular phone or PHS 1 meter or more away from the product main unit in operation,  various transmission cables, and I/O bus cable.    Otherwise, the system may malfunction.      6F8C1226  ii     Creating  control  programs  for  Unified  Controller  nv  series  and  Integrated  Controller  V  series  requires  dedicated engineering tools.    This manual describes instructions for programming languages which include ladder diagram language  (hereinafter  referred  to  as  “LD  language”),  function  block  diagram  (hereinafter  referred  to  as  “FBD  language), sequential function chart (herein after referred to as “SFC”) and structured text (herein after  referred  to  as  “ST”).  They  are  utilized  to  create  control  programs  for  Unified  Controller  nv  series  or  Integrated Controller V series using engineering tools.    The instructions found in this manual can be utilized in the following engineering tools:      Engineering tools  Use  nv-Tool 4 client server version  nv-Tool 4 stand alone version  For Unified Controller nv series  nv-Tool 3 client server version  nv-Tool 3 stand alone version  For Integrated Controller V series    The  L  controller  of  Integrated  Controller  V  series  offers  MCS  connection  version  and  DS  connection  version which are described as follows in this manual:      Type    V series  Model    Notation    MCS  connection  version  Model2000  L2PU11/L2PU12  L2    Model3000  L3PU11  L3  DS connection  version  Model2000  L2PU22  L2DS    Model3000  P3PU21  L3DS    Instruction manuals regarding engineering tools include the following:  ·  Unified Controller nv series Integrated Controller V series Engineering Tool 4 −Setup−  6F8C1291    ·  Unified Controller nv series Integrated Controller V series Engineering Tool 4 −Basic−  6F8C1290    ·  Integrated Controller V series Engineering Tool 3 −Setup−    6F8C1011      ·  Integrated Controller V series Engineering Tool 3 −Basic−    6F8C1006    Introduction      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  iii  CONTENTS          Chapter 1    For  Programming      …1                                    1.1  What are LD, FBD, SFC, and ST Languages?······················ 3  1.2  Data····················································································································· 6  1.2.1  Data Type·························································································· 6  1.2.2  Data Structure·················································································· 8  1.2.3  Real Number Format ···································································· 9  1.2.4  Variables·························································································· 10  1.2.5  Variable Memory Allocation Rules········································· 11  1.2.6  Variable Declaration Examples··············································· 11  1.2.7  Reading and Writing Variable·················································· 15  1.3  Program Structure·················································································· 16  1.3.1  Task ··································································································· 16  1.3.2  POU (Program Organization Unit)········································· 17  1.3.3  Program··························································································· 18  1.3.4  Function ··························································································· 18  1.3.5  Function Block··············································································· 22  1.4  Index Registers ························································································ 25  1.5  System Flags ····························································································· 26  1.6  Handling of REAL Data······································································· 28  1.7  Introduction Behavior when Exceeding Data Boundary······· 30  1.8  Step Counting···························································································· 31  1.9  How to Read Instruction Spec. ····················································· 33  1.10  Instruction List·························································································· 35          Chapter 2    LD/FBD  Instructions      …51                                            2.1  Contacts & Coils······················································································ 52  2.2  Execution Control··················································································· 72  2.3  Counters········································································································ 77  2.4  Timers·············································································································· 85  2.5  Flip-Flops··································································································· 104  2.6  Moving·········································································································· 111  2.7  Comparison······························································································ 124  2.8  Selection····································································································· 145  2.9  Type Conversion·················································································· 167  2.10  Numeric Function················································································ 237  2.11  Logical Operation················································································ 259  2.12  Bit Operation··························································································· 278  2.13  Arithmetic Operation········································································· 291  2.14  Data Processing···················································································· 321      6F8C1226  iv                                                   2.15  I/O···················································································································· 333  2.16  Process Operation·············································································· 371  2.17  Program Control··················································································· 451  2.18  String Processing················································································ 465  2.19  Control Statements············································································· 485  2.20  Communication····················································································· 524  2.21  Duplex Control······················································································· 594  2.22  Process Control ···················································································· 603  2.23  Tag Operation························································································· 638  2.24  RAS················································································································ 686            Chapter 3    SFC Instructions      …699                    Appendix A    Using Any  Function      …731                INDEX          …749            1  Chapter 1  For Programming    This  manual  describes  the  format  and  handling  of  the  instructions.  Read  Chapter 1 thoroughly for it provides knowledge required to understand this  manual.        1.1  What are LD, FBD, SFC, and ST Languages?·························· 3  1.2  Data························································································································· 6  1.2.1  Data Type······························································································ 6  1.2.2  Data Structure ····················································································· 8  1.2.3  Real Number Format········································································ 9  1.2.4  Variables······························································································10  1.2.5  Variable Memory Allocation Rules·············································11  1.2.6  Variable Declaration Examples ··················································11  1.2.7  Reading and Writing Variable······················································15  1.3  Program Structure·····················································································16  1.3.1  Task·······································································································16  1.3.2  POU (Program Organization Unit) ············································17  1.3.3  Program·······························································································18  1.3.4  Function·······························································································18  1.3.5  Function Block···················································································22  1.4  Index Registers····························································································25  1.5  System Flags·································································································26  1.6  Handling of REAL Data···········································································28  1.7  Introduction Behavior when Exceeding Data Boundary······30  Chapter 1    For Programming  6F8C1226  2  1.8  Step Counting·······························································································31  1.9  How to Read Instruction Spec. ·························································33  1.10  Instruction List ·····························································································35  1.1    What are LD, FBD, SFC, and ST Languages?  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  3      1.1  What are LD, FBD, SFC, and ST Languages?    ●  LD Language  Ladder  Diagram  is  a  graphic  language  for  commonly  used  Boolean  operation  and  described using a combination of contacts and coils.    The LD language can be treated in the same manner as electrical relay circuits and must  be connected to the left and right power rails.    Switch_1 Motor_On ADD_INT  EN ENO Done  Offset   LD  Value    LD  Value   SET  Switch_3 Switch_2  Switch_4  Horizontal link  Right power rail  Left power rail  Vertical link  Note: The characters “LD”, “ST” and “SET” are  displayed on the semi-graphic Program Editor,  but not displayed on the full-graphic one.    ●  FBD Language  Function  block  diagram  is  a  graphic  language  that  expresses  the  flow  of  signals  and  data and is described using a combination of function s and function blocks.      ADD_TIME  Timer_1  Switch2    LD  Switch1    LD  DelayTime    LD  AND_BOOL TON preset    LD  IN  PT Q ET T_Value    ST  Start    ST  Note: The characters “LD”, “ST” and “SET” are  displayed on the semi-graphic Program Editor,  but not displayed on the full-graphic one.    Chapter 1    For Programming  6F8C1226  4    ●  SFC Language  Sequential  Function  Chart  is  a  graphic  language  suited  for  sequential  control  and  consists of an SFC structure unit, which shows the control flow, action unit, which shows  the  action  performed  at  each  step,  and  transition  condition  unit,  which  shows  the  conditions for advancing through the steps.        START  T0    S1  S1    S2  Action_1  N    LED   S3      S1_ON  S2_ON  S3_ON  T1  T2      ●  ST language  Structured text (ST) is a text language similar to C and PASCAL. It supports variables,  multipliers,  operators,  assign  statements,  IF  statements,  CASE  statements,  FOR  statements,  WHILE  statements,  REPEAT  statements,  and  call  statements  of  functions  and  function  blocks.  It  efficiently  programs  complicated  control  statements  such  as  arithmetic operations and repeat.      (* Initialize *)  XO[0]:=XOUT;    (* Output value *)  XU[0]:=XIN;    (* Input value *)  XOUT:=B[0]*XIN;     (* Conditional statement *)  IF RUN THEN       FOR XI:=M TO 0 BY -1 DO           XOUT:=XOUT+A[XI]*XO[XI];           REPEAT               A[XJ]:=A[XJ]+XO[XI];           UNTIL A[XJ]<100           END_REPEAT;       END_FOR;  ELSE       WHILE XIN<100 DO           XOUT:=XOUT+A[XI];           IF XOUT>200 THEN               EXIT;           END_IF;       END_WHILE;  END_IF;  CASE XK OF  0..9:            (*Function*)       XOUT:=FUN_XOUT(XIN,XK);  10,20:            (*Function block*)       FBK_XIN_1(XIN,XK);       XOUT:= FBK_XIN_1.OUT;  END_CASE;  Assign statement Free comment  IF statement FOR statement Operator  WHILE statement EXIT statement CASE statement  Function call statement  Function block call statement    1.1    What are LD, FBD, SFC, and ST Languages?  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  5    The following operators can be used for structured text (ST):      Operation  Description    Priority    (···)  Bracket expression  1  **  Power    2  NOT, ~  Bitwise Boolean NOT  3  *  Multiply  4  /  Divide    4  MOD  Remainder    4  +  Add    5  -  Subtract    5  <, >, <=, >=  Comparison    6  =, <>  Equality, inequality  7  AND, &  Bitwise Boolean AND  8  XOR  Bitwise Boolean XOR  9  OR  Bitwise Boolean OR  10      Chapter 1    For Programming  6F8C1226  6      1.2  Data  1.2.1  Data Type  The following table shows the data types supported by the Unified Controller nv series  and Integrated Controller V series and their data range.      Notation  (Data Type)  Data type  Bits  Constant  specification Data range  BOOL  Boolean    1  ○  0(FALSE), 1(TRUE)  INT  Integer  16  ○  -32768 to 32767  DINT  Double integer  32  ○  -2147483648 to 2147483647  UINT  Unsigned integer  16  ○  0 to 65535  REAL  Real numbers  32  ○  -3.40282310 38  to -1.401298-10 -45   0  1.401298-10 -45  to 3.40282310 38   TIME  Duration  32  ○  -2147483648 to 2147483647ms    (-596h31m23s648ms to 596h31m23s647ms)  DATE  D(abbreviation)  Date  32  ○  1998-01-01 to 2097-12-31    *3  TIME_OF_DAY  TOD(abbreviation)  Time of day  32  ○  00:00:00.000 to 23:59:59.999    *3  DATE_AND_TIME  DT(abbreviation)  Date and time of  day  64  —  1998-01-01-00:00:00.000  to 2097-12-31-23:59:59.999 *3  STRING  Fixed-length  character string    —  Maximum number of characters: 256  Character code system: shift JIS  Possibility use only with the retained global variable    *2  WORD  Bit string of length 16  16  ○  0000 to FFFF  DWORD  Bit string of length 32  32  ○  00000000 to FFFFFFFF  PTR    *1  Word pointer  —  —  —  PTRB    *1  Bit pointer  —  —  —    *1  Unified Controller and the Integrated Controller supports this data type to enable flexible address handling and  provide compatibility with programs on conventional machines.    *2    When using string definition instruction DEF_STRING, it may be used in variable scope without retaining  specification. Refer to the Define String instruction page for details.    *3  In the DATE, TIME_OF_DAY(TOD), and DATE_AND_TIME(DT) types, an asterisk (*) is displayed in the V  engineering tool (program monitor, data value monitor) if data exceeding the range above is set. No setting is  allowed from the V engineering tool (e.g. data value monitoring).    1.2    Data  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  7  To program constants in one of the data types, do the following:  ·  Specify the data type in <DataType>#.  <DataType># can be omitted in the types other than Duration, Date and Time of day.    ·  Constants can be specified in binary (2#), decimal (default), octal (8#), or  hexadecimal(16#).    If a number is 16 in decimal, the value 2#10000 in binary specification, 8#20 in octal  specification, and 16#10 in hexadecimal specification are all equal.    ·  Underscores “_” can be inserted between numbers to make constants easy to read.    2#1_0000 in binary specification, 8#2_0 in octal specification, 16#1_0 in hexadecimal  specification are allowed.    The following table shows examples of constant specification:      Notation  (DataType)  Data type  DataType can be  omitted? Example of constant specification  BOOL  Boolean  Yes  BOOL#0, BOOL#FALSE,0, FALSE  BOOL#1, BOOL#TRUE, 1, TRUE  INT  Integer  Yes  INT#15, 15, INT#16#F  DINT  Double integer  Yes  DINT#15, 15, DINT#16#F  UINT  Unsigned integer  Yes  UINT#15, 15, UINT#16#F  REAL  Real numbers  Yes  REAL#15, 15, REAL#16#F, 15.0, 1.5E+1  TIME  Duration  No  d=Day, h=Hour, m=Minute, s=Second, ms=Millisecond  A decimal point can be used in the last field.    Each effective unit can overflow.    <DataType> can be specified in TIME#, T#.  TIME#6d_10m, TIME#16d_5h_4m_3s_21ms  T#6d_10m, T#12.34s  DATE  D (abbreviation)  Date  No  DATE#2007-12-10, D#2007-12-10  TIME_OF_DAY  TOD(abbreviation)  Time of day  No  TIME_OF_DAY#1:2:3.456, TOD#1:2:3  WORD  Bit string of  length 16  Yes  WORD#4660, 4660, WORD#16#1234, 16#12_34  DWORD  Bit string of  length 32  Yes  DWORD#305419896, 305419896  DWORD#16#1234_5678, 16#12345678    Chapter 1    For Programming  6F8C1226  8    1.2.2  Data Structure  1)  Integer (INT)/Unsigned integer (UINT)/Bit string of length 16 (WORD)  data  15    0 0      2)  Double  integer  (DINT)/Real  numbers  (REAL)/Duration  (TIME)/Time  of  day  (TOD)/Bit string of length 32 (DWORD)  data (H)  data (L)  15    0 0  1      3)  Date (DATE)  year (INT)  15    0 month  day  0  1    Example) 1999-10-11<year-month-day>    4)  Date and time of day (DT)  year (INT)  15    0 month  day  0  1  time of day (H)  time of day (L)  2  3      5)  Fixed-length character string (STRING)    VAR length  15 0 1st stri ng  2nd string  0  1  2  3  String l ength (n) 3rd string 4th string  5th string 6th string  4  An example of 6 character data is shown at left.  Variables:  Variable  Data type  Dec.  SAMPLE  STRING[6]  VAR    6)  Derived data type Array data (ARRAY)      data [0] 15  0 data [1] data [2] data [n-1] 2  n-1  0  1  An  example  of 16 bit  data  is shown at  left. A  32  bit  data is  stored every 4 bytes as (2) and (3).    Variables:  Variable Data type  Dec.  data  ARRAY[0..n-1] OF INT  VAR    1.2    Data  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  9    7)  Derived data type structure (STRUCT)      data (INT) 15  0   0  1  data1 (DINT H) data1 (DINT L) 2  3  bit0 bit1 An example of INT+BOOL+DINT.  Variables:  Variable Data type  Dec.  data  typeSAMPLE  VAR  Structures:  Data type  Parent type  typeSAMPLE  STRUCT  Members:  Member  Data type  data  INT  bit0  BOOL  bit1  BOOL  data1  DINT      1.2.3  Real Number Format  An arbitrary size single word real data is expressed as follows:          REAL value SM  2 E   Mantissa  Exponent  Sign      Where S is the sign, M is a decimal less than 1, and E is between -127 and +127. The  data format is as follows:    31 30            23 22     Exponent (8 bits) e  Mantissa (23 bits) m          0 Sign (1 bit) s      From the above formula, a real value is obtained as :  S = s  M = 1+m · 2 -23   E = e -127  REAL value = (s)(1+m · 2 -23 )·2 e-127   The range of real data is shown in [1.2.1 Data Type].  The following notation is used when the above data range is exceeded:  Infinity: Exponent e = 255, Mantissa m=0  NAN: Exponent e = 255, Mantissa m<>0    ●Note  For  addition/subtraction  of  real  data,  if  the  absolute  value  of  two  data  differ  significantly  (difference in exponent ≥24), the result is the value of the data with larger absolute value.      Chapter 1    For Programming  6F8C1226  10    1.2.4  Variables  Variables used in applications are divided into local variables and global variables.      Major  classification  Minor classification  Variable feature  Temporary variable  A variable that can be used only in the POU in which it is included. The  variable  value  cannot  be  retained  because  memory  is  reset  each time the POU is executed.  Initialization is required before using the variable.  Static variable  A variable that can be used only in the POU in which it is included. The  variable  value  is  retained  because  memory  is  reserved  statically.  The  initial  operation  varies  depending  on  the  setting  in  "Module  Parameter"  -  "Controller  Operation  Setting"  -  "Local  Variable  Initialization."      If "Yes" is set, the variable is initialized to zero when the controller  starts up in RUN.  If "No" is set, the variable is not initialized when the controller starts  up in RUN, and starts from the previous operation result. *1  Local variable  Non-tracking type static  variable (Unified Controller  nv series only)  A variable that can be used only in the POU in which it is included. The  variable  value  is  retained  because  memory  is  reserved  statically.  In the initialization operation, the variable is initialized to zero when  the controller starts up in RUN.  In a duplex system, this variable is not tracked.  Network variable  A variable that can be used if the stations are organically linked via  scan transmission, and managed in an integrated fashion.    It is  used for exchanging information and data between different  stations.    The scope of the variable is the system in which the  variable is used.    Only scan memory such as TC-net and FL-net  can be network variables.  Station global variable  A variable that is used globally in the station, and used for referring  to information and data of the transmission modules in the station.  The  scope  of  the  variable  is  the  station  in  which  the  variable  is  used.  For  a  station  variable  declared  as  Boolean,  available  slots  are  restricted.  [Integrated Controller V series]  Can be used only in Slot 0 and Slot 1.  [Unified Controller nv series]  Can be used only in Slot 0.  Global variable  Controller global variable  A  variable  that  is  used  globally  in  the  controller,  and  used  for  exchanging information and data between different programs in the  controller.    The scope of the variable is the controller in which the  variable is used.  Controller variables include controller-specific variables (special  registers, data registers), user-defined user variables, and I/O  variables.  *1  The local variable area (e.g. the area storing the previous value of the rising edge detection instruction and  instance of the timer instruction) that is automatically generated in the standard function block is initialized to  zero.    1.2    Data  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  11    1.2.5  Variable Memory Allocation Rules  Variables  used  within  a  program  are  allocated  in  internal  memory  in  the  order  of  their  definition. For example, consecutively defined BOOL type variables are allocated from  the least significant bit to optimize memory usage.      Variables:  Variable Data type  Dec.  V1  BOOL  VAR  V2  BOOL  VAR  V3  INT  VAR  V4  BOOL  VAR      0 1 15 0  V3  2 V2 V4 V1     1.2.6  Variable Declaration Examples  The following restrictions apply to variable names:  ·  A  variable  name  must  begin  with  an  alphabet  and  consists  of  alphanumeric  characters  or  underscore.  See  the  “software  model”  section  in  Chapter  1  of  V  Engineering Tool Basic Instruction for details.    ·   Upper and lower case are not distinguished.    ·   The length must not exceed 20 characters.    ·  Arrays are allowed with brackets used to denote the elements. Array index starts from  “0”.  ·  Structures are allowed with period used to denote the elements.    ·  Reserved words may not be used as variable name.      Reserved word  Description  N, R, S, L, D, P, P0, P1, SD, DS, SL, NH, SH,  LH, DH  Action qualifier  ACTION ... END_ACTION  Action declaration  ARRAY OF  Derived data type array variable declaration  AT  Variable declaration (memory address specification)  CASE ... OF ... ELSE ... END_CASE  CASE statement  CONFIGURATION ... END_CONFIGURATION  Configuration declaration  CONSTANT  Variable declaration (constant declaration)  BOOL, SINT, INT, DINT, LINT, USINT, UINT,  UDINT, ULINT, REAL, LREAL, TIME, DATE,  TIME_OF_DAY, TOD, DATE_AND_TIME,  DT, STRING, BYTE, WORD,    DWORD, LWORD, PTR, PTRB  Data type  EN, ENO  Function execution control in LD  EXIT  FOR, WHILE, REPEAT statements    FALSE, TRUE  FALSE/TRUE or Boolean constants  F_EDGE  Falling edge detector qualifier  FOR ... TO ... BY ... DO ... END_FOR  FOR statement  FUNCTION ... END_FUNCTION  Function    Chapter 1    For Programming  6F8C1226  12    Reserved word  Description  Function, Function block name  Function or function block names such as SIN, COS,  TAN, TON, CTU.    FUNCTION BLOCK ...    END_FUNCTION BLOCK  Function block declaration  IF ... THEN ... ELSEIF ... ELSE ... END_IF  IF statement  INITIAL_STEP ... END_STEP  Initial step declaration  PROGRAM ... WITH ...  Program allocation  PROGRAM ... END_PROGRAM  Program declaration  R_EDGE  Rising edge detector qualifier  READ_ONLY, READ_WRITE  Access path instruction  REPEAT ... UNTIL ... END_REPEAT  REPEAT statement  RESOURCE ... ON ... END_RESOURCE  Resource declaration  RETAIN  Variable declaration (retained variable specification)  RETURN  Return from function or function block  STEP ... END_STEP  Step declaration  STRUCT ... END_STRUCT  Derived data type structure declaration  TASK  Task declaration  IL language text operator  Operators such as LD, ST, AND  ST language text operator  Operators such as NOT, MOD  TRANSITION ... FROM ... TO ...    END_TRANSITION  Transition declaration  TYPE ... END_TYPE  Derived data declaration  VAR ... END_VAR  VAR_TEMP ... END_VAR  VAR_INPUT ... END_VAR  VAR_OUTPUT ... END_VAR  VAR_IN_OUT ... END_VAR  VAR_GLOBAL ... END_VAR  VAR_EXTERNAL ... END_VAR  VAR_ACCESS ... END_VAR  Variable declaration  WHILE ... DO ... END_WHILE  WHILE statement  WITH  Program or function block task association  XI, XJ, XK, XL, XM, XN, XP, XQ  Index registers    ·  Static variable  Static variables used within POU* are declared using the keyword VAR.    Variables:  Variable  Data type Dec.  LOCAL_VAR_1  INT  VAR  LOCAL_VAR_2  WORD  VAR  *  POU stands for Program Organization Unit. See section [1.3.2  POU (Program Organization Unit)] for details.    1.2    Data  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  13    ·  Non-tracking type static variable (Unified Controller nv series only)    Non-tracking type  static  variables  used within  POU  are  declared  using  the keyword  VAR (Non Tracking).    Variables:  Variable  Date type Dec.  LOCAL_NT_VAR_1  INT  VAR(NonTracking)  LOCAL_NT_VAR_2  WORD  VAR(NonTracking)    ·  Temporary variable  Temporary variables used within POU are declared using the keyword VAR_TEMP.    Variables:  Variable  Date type Dec.  TEMP_VAR_1  INT  VAR_TEMP  TEMP_VAR_2  WORD  VAR_TEMP    ·  Input parameter  Represent  the  input  arguments  for  POU  and  are  declared  using  the  keyword  VAR_INPUT.    Variables:  Variable  Date type Dec.  INPUT_VAR_1  INT  VAR_INPUT  INPUT_VAR_2  WORD  VAR_INPUT    ·  Output parameter  Represent  the  output  arguments  for  POU  and  are  declared  using  the  keyword  VAR_OUTPUT.  Variables:  Variable  Date type Dec.  OUTPUT_VAR_1  INT  VAR_OUTPUT  OUTPUT_VAR_2  WORD  VAR_OUTPUT    ·  Input/Output parameter  Represent the input/output arguments for POU and are declared using the keyword    VAR_IN_OUT.  Variables:  Variable  Date type Dec.  INOUT_VAR_1  INT  VAR_IN_OUT  INOUT_VAR_2  WORD  VAR_IN_OUT  Chapter 1    For Programming  6F8C1226  14    ·  Global variable  When  using  global  variables,  declare  them  as  network,  station,  I/O  and  controller  variables.    Variables:  Variable  Date type GLOBAL_VAR_1  INT  GLOBAL_VAR_2  WORD    ·  Derived data type Array declaration  The ARRAY···OF keyword is used to declare arrays to be used within POU.    For example, an INT array with ten elements is declared as follows:  Variables:  Variable  Date type  Dec.  ARRAY_VAR  ARRAY[0..9] OF INT  VAR    ·  Derived data type structure declaration  The STRUCT keyword is used to declare structures to be used within POU.    Variables:  Variable  Date type  Dec.  data  STRUCT_NAME  VAR    Structures  Data type  Parent type STRUCT_NAME  STRUCT    Members:  Member  Data type  VAL1  INT  VAL_ARY  ARRAY[0..9] OF BOOL  VAL2  DINT    1.2    Data  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  15    1.2.7  Reading and Writing Variable  The  following  instructions  are  used  to  read  from  and  write  to  variables.  See  section  [1.3.4  Function]  for  details.  Furthermore,  they  may  be  used  in  combination  with  Gate  instructions.  Refer  to  the  [Normally  Open  Contact]  and  the  [Normally  Close  Contact]  instruction description page for details.      Function  Instruction    Symbol Description  Read  Load  instruction  LD  LD instruction is used to specify input arguments to  function or function block.    Store  instruction  ST  ST instruction is used to write the result of function or  function block without execution control to a variable.  Write  Set store  instruction  SET  SET instruction is used to write the result of function with  execution control to a variable.          ADD_INT  SAMPLE1    LD  SAMPLE2    LD  SAMPLE3   ST  ADD_INT  EN            ENO  SAMPLE1    LD  SAMPLE2    LD  SAMPLE3   SET SIGNAL1  Use ST instruction Use SET instruction SAMPLE1    LD  SAMPLE2   ST  SIGNAL1  When SIGNAL1=FALSE(OFF)  : SAMPLE2=0  When SIGNAL1=TRUE(ON)  : SAMPLE2=SAMPLE1  When SIGNAL1=FALSE(OFF)  : SAMPLE2=Previous value When SIGNAL1=TRUE(ON)  : SAMPLE2=SAMPLE1    SIGNAL2 SAMPLE1    LD  SAMPLE2   SET  SIGNAL1  ● Combination with function  · Function without execution control  · Function with execution control  ● Combination with gate instruction  · Example of normally open contact gate and store instruction  · Example of normally open contact gate and SET store instruction      Chapter 1    For Programming  6F8C1226  16      1.3  Program Structure  1.3.1  Task  The  integrated  controller  control  application  programs  in  units  called  task.  This  represents a program execution unit. Any program can be executed by including it in a  task.    [Number of programs that can be registered in each task in the Integrated Controller V series]  Controller  Task name  Priority S3 S2 L3  (L3DS) L2  (L2DS) L1  Execution  method  Event task  EV  1  8  8  8  (16)  8  (16)  —  Event    Super high— speed task  SS  2  1  1  1  (—)  1  (—)  —  Scan  Interrupt task  IP  3  8  8  8  (32)  8  (32)  —  Event  High—speed task  HS  4  1  32  32  (128)  8  (128)  —  Scan  Main task  MS  5  256 256 256  (256)  64  (256)  8  Scan  Background task  BG  6  4  4  4  (4)  1  (4)  —  Event or scan  *1  S3PU21/S3PU45 : 32,S3PU55/S3PU65 : 128    [Number of programs that can be registered in each task in the Unified Controller nv series]  Controller  Task name  Priority  type1 type2       Execution method  Event task  EV  8  8        1        Event (select EV or IP)  Interrupt task *1  IP  16  16        Event    Super high— speed task  SS  1  —        2        Scan  (select IP, SS, or  RIO)  RIOt task *2*3  RIO  0  —        High—speed task  HS  3    128  128        Scan (select HS or RIO)  Main task  MS  4  256  512        Scan    *1  An interrupt task can be selected in Priority 1 or Priority 2.    *2  Only type1 can be selected. An RIO task can be selected in Priority 2 or Priority 3.    *3  Selection of RIO task in Priority 2 is supported by type1 controller version: V01.50.  1.3    Program Structure  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  17    1.3.2  POU (Program Organization Unit)  Programs, functions, and function blocks are referred to as Program Organization Unit  (POU). Refer to the subsequent sections for details.      [Number of POUs that can be registered in the Integrated Controller V series]  Controller  POU (Program  Organization  Unit)  Instance  S3  S2 L3  (L3DS) L2  (L2DS) L1 Static  variable Temporary  variable Task  registration  Function  value  Argument Program  Program  instance  ○  ○  ○  ×  ○  Function    —  ×  ○  ×  ○  ○  Function block  Function block  instance  1    437   2048 (2048) 512  (2048) 64   ○  ○  ×  ×  ○  1  S3PU21 : 437,S3PU45 : 821,S3PU55/S3PU65 : 917    [Number of POUs that can be registered in the Unified Controller nv series]  Controller  POU (Program  Organization  Unit)  Instance  type1 type2 Static  variable Temporary variable  Task  registration  Function  value  Argument Program  Program instance        ○   ○   ○   ×   ○   Function    —        ×   ○   ×   ○   ○   Function block  Function block  instance  940  2000       ○   ○   ×   ×   ○       Chapter 1    For Programming  6F8C1226  18    1.3.3  Program  A program is a combination of program body, functions, and function blocks. Functions  and  function  blocks  may  be  used  in  common  among  several  programs  and  function  blocks.      Task  Function block  Program  Function block Program  Program  Program  Function  Function  Function  Function block     1.3.4  Function  ●  What is Function?  A  function  is  executed  with  specific  arguments  and  outputs  a  function  value.  In  other  words  it  always  produces  the  same  operation  result  for  the  same  input  and  does  not  have internal storage. Instructions such as SIN and COS defined by IEC61131—3 are  examples of functions.      ●  Function Execution Control with EN/ENO  Functions can have EN input and ENO output. They control the execution of the function.  ST language does not support EN input and ENO output.      <Example without execution control>                              <Example with execution control>                    ADD_INT  SAMPLE1    LD  SAMPLE2    LD  SAMPLE3   ST  ADD_INT  EN        ENO  SAMPLE1   LD  SAMPLE2   LD  SAMPLE3   SET    SIGNAL1 SIGNAL2     1.3    Program Structure  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  19    Instructions  to  store  the  result  to  be  connected  to  a  function  are  divided  into  Store  instruction (ST) and Set Store instruction (SET).    The following rules apply to these instructions:      EN input  Function processing  ENO output  Set Store (SET) instruction action Store (ST)  Instruction action  Remarks FALSE  (OFF)  Not executed (Output 0)  FALSE(OFF)  No data update  Update with  default value (0)  1  Normal  completion  TRUE(ON)  Yes  TRUE  (ON)  Executed  (Outputs  operation result)    Error  completion  (Error)  Depend on  function *2  Update with  operation result  Update with  operation result    No  —  Executed  —  Not available  Update with  operation result    (*1)  When  EN  input  is  FALSE(OFF),  function  output  is  0  and  if  that  output  is  used  directly  as  input  to  another  instruction, the input to that instruction is 0.    For example, if a coil instruction is connected to a BOOL output  type function, that coil becomes FALSE(OFF).    However, if that instruction is a Set Store instruction, 0 is not  stored and no data update is performed as shown in the above table.  (*2)  In the function description, if there is no description of ENO output, the EN input state is output as the ENO  output.    ·  When the function output is BOOL variable        In case where SAMPLE1>SAMPLE2:      When SIGNAL1=FALSE(OFF)              SIGNAL2  ←  FALSE(OFF)              SIGNAL3 is unchanged        When SIGNAL1=TRUE(ON)              SIGNAL2  ←  TRUE(ON)              SIGNAL3  ←  TRUE(ON)    In case where SAMPLE1>SAMPLE2          When SIGNAL1=FALSE(OFF)              SIGNAL2  ←  FALSE(OFF)              SIGNAL3  ←  FALSE(OFF)        When SIGNAL1=TRUE(ON)              SIGNAL2  ←  TRUE(ON)              SIGNAL3  ←  TRUE(ON)  SAMPLE1    LD  SIGNAL1  SAMPLE2    LD      SIGNAL2 SIGNAL3   SET  SAMPLE1    LD  SIGNAL1  SAMPLE2    LD      SIGNAL2 GT_INT EN            ENO GT_INT EN            ENO   SIGNAL3   ·  When the function output is not BOOL variable      When SIGNAL1=FALSE(OFF)          SIGNAL2  ←  FALSE(OFF)          SAMPLE3 is unchanged  When SIGNAL1=TRUE(ON)          SIGNAL2    ←  TRUE(ON)          SAMPLE3  ←  SAMPLE1+SAMPLE2  SAMPLE1    LD  SIGNAL1  SAMPLE2    LD    SIGNAL2 SAMPLE3   SET  ADD_INT EN            ENO Chapter 1    For Programming  6F8C1226  20    ·  Example of execution control with EN,ENO        When SIGNAL1=FALSE(OFF)            SIGNAL2  ←  FALSE(OFF)            SAMPLE4 is unchanged      When SIGNAL1=TRUE(ON)            SIGNAL2  ←  TRUE(ON)            SAMPLE4  ←  (SAMPLE1+SAMPLE2)SAMPLE3  SAMPLE1    LD  SI GNAL1  SAMPLE2    LD    SIGNAL2  SAMPLE4    SET  ADD_INT   EN            ENO MUL_INT   EN            ENO SAMPLE3   LD  ENO and EN on the same circuit are used connected. When EN is FALSE(OFF), 0 is output.      ●  User Defined Function  The  user  can  define  a  new  function  by  combining  existing  functions.  This  enables  program components to be packaged for reuse.        SAMPLE1 LD  SAMPLE2 LD  SAMPLE3 ST  USR_FUN    DATA1   DATA2 DATA1 LD  DATA1 LD  MUL_REAL  MUL_REAL  DATA2 LD  DATA2 LD  SUB_REAL  USR_FUN  ST  SQRT  User defined function  block:USR_FUN      USR FUN SAMPLE SAMPLE _       2 2 1 2   1.3    Program Structure  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  21    ● Important  · With regard to input arguments, output arguments, I/O arguments, and function return values,  when an argument is specified as indicated in the below table (●) and the argument and return  value is referenced or updated in the user defined function, it would take longer to process the  instruction. For details, refer to the “Run time of Instruction Word” in appendix of each controller  functional manual.      Data type  VAR_IPUT  VAR_OUTPUT VAR_IN_OUT  Return  value  BOOL  ○  ●  ●  ○  INT  ○  ●  ●  ○  DINT  ○  ●  ●  ○  UINT  ○  ●  ●  ○  REAL  ○  ●  ●  ○  TIME  ○  ●  ●  ○  DATE  ○  ●  ●  ○  TOD  ○  ●  ●  ○  DT  ●  ●  ●  ●  WORD  ○  ●  ●  ○  DWORD  ○  ●  ●  ○  STRING  ●  ●  ●  ●  PTR  ●  ●  ●  —  PTRB  ●  ●  ●  —  Derived ARRAY data  ●  ●  ●  ●  Derived structure  ●  ●  ●  ●  ● :Longer instruction process time,  ○ :Normal instruction process time, —:Cannot be specified  Chapter 1    For Programming  6F8C1226  22    ●  Function/Function Block Restrictions  The following restrictions apply when the function value of a function or output argument  of a function block is DT, STRING, PTR or PTRB.    Function value and output argument must be stored in a single variable only.    Always connect function value and output argument with Store or Set Store instruction.          LEFT    IN      L  STRING1  LD  NUMBER  LD  STRING2 ST  LEFT    IN      L  STRING1  LD  NUMBER  LD  STRING2 ST  LEFT    IN      L  STRING1  LD  NUMBER  LD  STRING2 LD  MID    IN      L  STRING3 ST  <Supported case>  <Unsupported case>  ・ Function value is stored in two or more variables ·  Function value is connected to instructions other than ST/SET      1.3.5  Function Block  ●  What is Function Block?  A function block (FB) is a program organization unit that returns one or more value when  executed.    More than one instance (copy) of a named FB can be created.    An instance  requires  an  identifier  (instance  name)  for  identity.    The  output  variables  and  internal  variables  are  retained  from  one  execution  to  the  next.    Therefore,  the  result  of  executing an FB with the same argument is not necessary the same.    Instructions such  as CTU and TON defined by IEC61131-3 are examples of function blocks.  1.3    Program Structure  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  23    When storing data from FB instance output argument to variable, data is read from the  FB instance output variable by the LD instruction and the result is stored in the variable  by the ST instruction.        ●  User Defined Function Block  The user can define a new function block by combining existing functions and function  blocks.    This enables program components to be packaged for reuse.      SAMPLE1 LD  SAMPLE2 LD  SAMPLE3 ST  USR_FB    D    CK  User defined function block:USR_FB              Q       notQ SAMPLE4 ST  SR    CK  P  D  D    S1    R              Q   Q    notQ  SR_1  USR_FB_1   TON_1  PT IN TON  CT Q SIGNAL_2  SIGNAL 1 SAMPLE_2  ST  SAMPLE_1  LD  BOOL type LD instruction  inserted automatically  TIME type LD instruction inserted  automatically  Chapter 1    For Programming  6F8C1226  24    ● Important  · With regard to input arguments, output arguments, and I/O arguments, when an argument is  specified as indicated in the below table ( ● ) and the argument is referenced or updated in the  user defined function block, it would take longer to process the instruction. For details, refer to  the “Run time of Instruction Word” in appendix of each controller functional manual.    Data type  VAR_IPUT  VAR_OUTPUT VAR_IN_OUT  BOOL  ○  ○  ●  INT  ○  ○  ●  DINT  ○  ○  ●  UINT  ○  ○  ●  REAL  ○  ○  ●  TIME  ○  ○  ●  DATE  ○  ○  ●  TOD  ○  ○  ●  DT  ●  ●  ●  WORD  ○  ○  ●  DWORD  ○  ○  ●  STRING  ●  ●  ●  PTR  ●  ●  ●  PTRB  ●  ●  ●  Derived ARRAY data  ●  ●  ●  Derived structure  ●  ●  ●  ● :Longer instruction process time,  ○ :Normal instruction process time      1.4 Index Registers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  25      1.4  Index Registers  The following eight registers are available as index registers:  XI, XJ, XK, XL, XM, XN, XP, XQ  These  index  registers  are  controlled  every  the  task  type.  (These  become  the  global  registers  every  task  type.)  Therefore,  they  do  not  overlap,  even  if  the  same  index  registers  are  used  between  the  different  task  type.  They  can  be  used  to  specify  a  memory  area  that  is  offset  by  the  index  register  from  the  specified  variable.    This  is  referred to as index modification.      An index modification of a variable is coded as follows:      Variables:  Variable  Data type  Dec.  TABLE  ARRAY[0..3] OF DINT  VAR  SAMPLE  DINT  VAR      When index register XI=1 and XJ=3,  SAMPLE=TABLE[XI]+TABLE[XJ]  =TABLE[1]+TABLE[3]  =150+30  is calculated and the result 180 is stored in SAMPLE TABLE[XI]  LD  TABLE[XJ]  LD  SAMPLE ST  ADD_DINT  100  150  70  30  3 2 1 0 Array:TABLE  <Program>      ● Important   ·    Using index modification to access variables other than INT, UINT, and WORD results in longer  instruction process time.    ・  INT, UINT, WORD … unchanged    ・  Other than INT, UINT, WORD … longer process time  For details, refer to the “Run time of Instruction Word” in appendix of each controller functional  manual.      Chapter 1    For Programming  6F8C1226  26      1.5  System Flags  The following list shows the flags that are set when an error occurs within a function or  used in operation with carry.    Flags that are set when errors occur are described in “Function” and “Error information”  of each section.    These  system  flags  are  controller  dependent.  Therefore,  refer  to  sections  describing  variables in controller function manuals.    [Integrated Controller V series]  The flags below are common to all tasks for Integrated Controllers.      Flag  Description  Supported instruction  User carry flag  Carry flag used in operations with carry and in  shift and rotate instructions.  ADC, SBB, SHL, SHR,    ROL, ROR  Error flag  Set to TRUE(ON) when an error occurs during  function execution.    Set together with the  following flags.      Boundary error flag  Set to TRUE(ON) when the address range is  exceeded in an indirect address specification.  LD,ST, and instructions specified  with pointers.    Divide error flag  Set to TRUE(ON) when divisor=0 occurs in a  divide instruction  DIV, MOD  BCD error flag  Set to TRUE(ON) when BCD data is outside the  range from 0 to 9 in BCD related instructions.  UINT_TO_BCD_WORD  WORD_BCD_TO_UINT etc.  Table operation error flag  Set to TRUE(ON) when the operation pointer is  outside the table size in the table operation  instructions.  TSET,TRST  Encode error flag  Set to TRUE(ON) when the encode error occurs  in the encode instructions.  ENC    1.5    System Flags  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  27    [Unified Controller nv series]  In  the  Unified  Controller,  the  flags  include  common  flags  for  all  tasks  for  compatibility  with the Integrated Controller, and common tasks for each task.      System flag  Description  Common for all tasks  For compatibility with the  Integrated Controller  Common for Priority 1  For EV/IP tasks  Common for Priority 2  For SS/IP tasks  Common for Priority 3  For HS tasks  Common for Priority 4  For MS tasks    Flag  Description  Supported instruction  User carry flag  Carry flag used in operations with carry and in  shift and rotate instructions.    ADC, SBB, SHL,  SHR, ROL, ROR  Error flag  Set to TRUE(ON) when an error occurs  during function execution.    Set together with  the following flags.    Divide error flag  Set to TRUE(ON) when divisor=0 occurs in a  divide instruction.  DIV, MOD  BCD error flag  Set to TRUE(ON) when BCD data is outside  the range from 0 to 9 in BCD related  instructions.  UINT_TO_BCD_WORD  WORD_BCD_TO_UINT etc.  Table operation error flag  Set to TRUE(ON) when the operation pointer  is outside the table size in the table operation  instructions, or an unsupported variable is  specified in the table operation instructions or  function instructions.  TSET, TRST, TMOV, PLN etc.  Encode error flag  Set to TRUE(ON) when the encode error  occurs in the encode instructions.  ENC  ASC data conversion error flag  Set to TRUE(ON) when invalid ASCII code is  detected in ASCII data conversion in an  instruction handling ASCII data.  ASCDEC_TO_DINT,  DINT_TO_ASCDEC etc.        Chapter 1    For Programming  6F8C1226  28      1.6  Handling of REAL Data  In calculations using REAL data (four arithmetic operations such as ADD/SUB/MUL/DIV  and  functions  such  as  SIN/COS/PID),  if  "infinity/nonnumeric"  is  specified  in  the  input  data,  the  calculation  result  becomes  "infinity/nonnumeric,"  or  the  result  becomes  "infinity/nonnumeric"  during  the  calculation,  the  Integrated  Controller  and  Unified  Controller perform the following calculations:      Integrated Controller  Unified Controller  “Infinity/Nonnumeric” is  specified in the input data  Calculation is done by using the input  data as it is, so the calculation result  also becomes "infinity/nonnumeric."  For a function with EN, the ENO  output is set to OFF(FALSE).    Calculation is done by limiting the input  data to "± maximum value."  For a function with EN, the ENO output is  set to OFF(FALSE).    Calculation result is  “Infinity/Nonnumeric”  The calculation result is outputted as it  is.  For a function with EN, the ENO  output is set to OFF(FALSE).    The calculation result is limited to "±  maximum value" and outputted.  For a function with EN, the ENO output is  set to OFF(FALSE).    Result is  “Infinity/Nonnumeric” during  the calculation  Calculation is continued by using the  "infinity/nonnumeric" result during the  calculation, so the calculation result  also becomes "infinity/nonnumeric."  For a function with EN, the ENO  output is set to OFF(FALSE).    Calculation is continued by limiting the  result to "± maximum value" during the  calculation.  For a function with EN, the ENO output is  set to OFF(FALSE).      Therefore, the range of real data of the Integrated Controller and Unified Controller is as  follows:    Input/output data  Integrated  Controller  Real data representation  Decimal  representation S2/S3  L2/L3 Unified Controller  +Nonnumeric  +NAN  (not a number)  7FFF.FFFF  :  7F80.0001    +Infinity  +INF(infinity)  7F80.0000    +NF  +3.4028235E+38  (+Maximum value)  Normalized  value  +3.4028235E+38(+Maximum value) :  +1.1754944E-38  7F7F.FFFF  :  0080.0000  Unnormalized  value  +1.1754942E-38  :  +1.4012985E-45  007F.FFFF  :  0000.0001        +0  0000.0000  +0  Zero  -0  8000.0000  +0  -0  +0  Unnormalized  value  -1.4012985E-45  :  -1.1754942E-38  8000.0001  :  807F.FFFF  Normalized  value  -1.1754944E-38  :  -3.4028235E38(-Maximum value)  8080.0000  :  FF7F.FFFF        -Infinity  -INF(infinity)  FF80.0000    -Nonnumeric  -NAN  (not a number)  FF80.0001  :  FFFF.FFFF    -INF  -3.4028235E+38  (-Maximum value)  1.6    Handling of REAL Data  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  29    ● Important  · In  the  Integrated  Controller  and  Unified  Controller,  the  calculation  results  are  different when "infinity" or "nonnumeric" is inputted in a calculation using real data, or  when the calculation result becomes "infinity" or "nonnumeric."  · When real data is used in the user program and the effect of the difference exists,  the  validity  of  calculation  result="maximum  value"  can  be  ensured  by  writing  the  program in the following manner.  · When real calculation is needed, real calculation can be used as a function with EN  so  that  a  factor  resulting  in  a calculation  result of  "infinity"  or  "nonnumeric" can be  detected when ENO=FALSE(OFF).  · The cautions on handling real data are as follows:  ·  Check  if  it  is  within  the  expected  input/output  data  range.    Is  the  limit  processing required before or after the calculation?  ·  In division, is there any division with divisor=0?  ·  In data comparison, is it OK to use "=" (equality)?  ·  When calculation is done as a function with EN and the ENO output is normal  (TRUE(ON)), is the calculation result required to be used?      第1 章    プログラミングのために  6F8C1226  30      1.7  Instruction Behavior when Exceeding Data Boundary  When  the  data  boundary  is  exceeded,  the  message  “User  task  data  boundary  is  exceeded”  appears  in  the  error  log.    In  this  case,  the  data  read  from  the  variable  is  treated as 0 and no write to variable is performed.      The controller operation after the  error  depends  on  information  set  in  the  controller  parameter.    The  behavior  of  each  instruction is as follows:    Instruction  Data read  from  variable  Instruction output  Variable  write  Remarks    0  0  —      0  1  —      0  0  —    1 (when previous data=1 with  input=1)  0  0 (other than above)  —      —  —  ×      —  —  ×      —  —  ×    —  —  ×  Previous value is updated as  pulse function.      —  —  ×      —  —  ×      —  —  ×      —  —  ×      —  —  ×    —  —  ×  Previous value is updated as  pulse function.    —  —  ×      —  —  ×    LD  0  —  —    ST/SET  —  —  ×        1.8    Step Counting  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  31      1.8  Step Counting  When a constant is used to specify an input argument or for index modification, or the  number of words exceeding 64k, there are cases where the step count is changed. This  is described below.      ●  Specification by constant    One step if the data structure is a single word constant specification and two steps if the  data structure is a two word size constant specification.      ●  index modification of BOOL variable  Increases by one step each time the level of index modification increased (increased by  one  step  for  single  index  specification,  by  two  steps  for  double  index  specification).  Examples of index modification using BOOL variable BOOL_VAL are shown below:    BOOL_VAL  1 step  BOOL_VAL[XI]  2 step  BOOL_VAL[XI][XJ] 3 step  · No index modification  · Single index modification · Double index modification    ●  Index modification of WORD variable  For single word data type, double or more index specification results in increase of one  step and for double word data type, single or more index specification results in increase  of  one  step.    Thereafter,  the  step  is  increased  by  one  each  time  the  level  of  index  modification increases as with BOOL variables.    Examples of index modification of INT  variable INT_VAL and DINT variable DINT_VAL are shown below:        INT_VAL  1 step  DINT_VAL  1 step  · No index modification  INT_VAL[XI]  1 step  DINT_VAL[XI]  2 step  · Single index modification INT_VAL[XI][XJ]  2 step  DINT_VAL[XI][XJ]  3 step  · Double index modification <INT variable>  <Dint variable>      ● Note  · Currently, only single index modification is allowed. Double index is not allowed (this is currently  under development).    Chapter 1    For Programming  6F8C1226  32  ●  Variables whose word number exceeds 64k  The  step  increases  by  one  when  a  variable  whose  word  number  exceeds  64k  (word  number≥65536) is used. This variable usually corresponds with a user variable.      User variable    Word no.  +0  +65535  +65536    +81919  <When user variable size is 80kW>  Step  increases  by  one  when  variable  whose  word  number  exceeds  64k  is  specified       1.9    How to Read Instruction Spec.    Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  33      1.9  How to Read Instruction Spec.      [ST language notation]      S AMPLE2 := MOVE_INT(SAMPLE1);  ● Arguments:  ·  The following data  types are supported for  input and output arguments and the instruction symbol depends on the data  type.    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  Input    Output  —  See below  —  Output      Moving  Move Data    LD/FBD  language  notation          EN input  Edge execution*3  Index modification  Modifier  ○  ○  —  ST language notation  Output := MOVE_□□(Input);  Input Output MOVE_□□ Instruction name  Remarks *1  Graphical form  Program example Whether modification is allowed  Description of the operation in  a program sample  Explanation of the instruction  LD, FBD, SFC language notation  ST language notation *2  ST language notation  ● Function  · Input data is output as result.  Input  Output  MOVE_□□   Input  Symbol(_□□)  Output  INT  MOVE_INT  Input  DINT  MOVE_DINT  INT  UNIT  MOVE_UINT  DINT  REAL  MOVE_REAL  UNIT  WORD  MOVE_WORD  REAL  DWORD  MOVE_DWORD WORD  TIME  MOVE_TIME  DWORD  TOD  MOVE_TOD  TIME  DATE  MOVE_DATE  TOD  DT  MOVE_DT  DATE  STRING  MOVE_STRING DT    ● Program example  [LD/FBD language notation]  ・Content of variable SAMPLE1 “1234” is moved to variable sample SAMPLE2 SAMPLE1  1234  LD  SAMPLE2 1234  ST  MOVE_INT  ○ : constant specification allowed,  — : constant specification not allowed  LD, FBD,SFC language notation    *1  The “Remarks” column provides the following information for instructions supported by  programmable controller PROSEC T series or Control Station PCS series, or supported exclusively  for Integrated Controller or Unified Controller.    Instruction unique to T series:  :“T compatible instruction”  Instruction unique to PCS series:  :“PCS compatible instruction”  Instruction unique toTOSDIC series:  :“TOSDIC compatible instruction”  Dedicated instruction for Integrated Controller:  :“V dedicated instruction”  Dedicated instruction for Unified Controller:  : “nv dedicated instruction”  Chapter 1    For Programming  6F8C1226  34    *2  A function block is described as follows:    [Instance name] (Input argument 1, Input argument 2);  [Variable name] : = [Instance name]. Output argument1;  [Variable name] : = [Instance name]. Output argument 2;    Example: On—delay timer (0.1ms/1ms/10ms/100ms/0.1 min)    [Instance name] (IN, PT);  [Variable name] : = [Instance name]. Q;  [Variable name] : = [Instance name]. ET;    ・Refer to “Program example” for the actual program displayed.    ・ With regard to the function block name used for the [Instance name], specify “TON”,  “TON_100MS”, “TONM_P” for the data type during variable declaration.      *3  “Edge execution” is not currently supported.        1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  35      1.10      Instruction List  The V series controller instructions are listed below. The following symbols are used in  the table.    ○   : Supported from the initial version of the respective controller (available)  Number :Supported from the specified version of the respective controller (available)  —  : Not supported by the respective controller (Unavailable)  Carefully check the available instruction when programming.    ● Important  When an unsupported instruction is used during programming, the action depends on the  controller as follows:  [Integrated Controller S Controller and Unified Controller nv series]  POU using unsupported instruction is not downloaded to the controller. If it is downloaded, the  engineering tool displays an error message indicating that it is an unsupported message.  [Integrated Controller L Controller]  POU using unsupported message can be downloaded to the controller, but the program will go  into fallback mode or fail when it detects the unsupported instruction.    Nv series  V series  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Contacts & Coils  P.52 Normally Open Contact      ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.53 Normally Closed Contact    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.54 Positive transition-  sensing Contact    ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.55 Negative transition-  sensing Contact    ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.56 Rising Edge Detector    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.57 Falling Edge Detector    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.58 Inverter    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.59 Coil    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.60 Negated Coil    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.61 SET Coil    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.62 RESET Coil    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.63 Positive Transition-sensing Coil    ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.64 Negative Transition-sensing Coil    ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.65 Forced Coil    ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.66 Forced Negated Coil    ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.67 Forced SET Coil    ○   ○   ○   ○   ○   ○   ○  ○  —  1  P.68 Forced RESET Coil    ○   ○   ○   ○   ○   ○   ○  ○  —  1  P.69 Forced Positive  Transition-sensing Coil    ○   ○   ○   ○   ○   ○   ○  ○  —  2  P.70 Forced Negative  Transition-sensing Coil    ○   ○   ○   ○   ○   ○   ○  ○  —  2  P.71 Chapter 1    For Programming  6F8C1226  36    Instruction  nv series  V series  Contact/Coil  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Execution Control  P.72 Jump Control Set  JCS  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.73 Jump Control Reset  JCR  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.73 Jump    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.74 Label  LABEL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.74 Conditional Execution  Instruction    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.75 End of Conditional  Execution Instruction    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.75 Master Control Set  MCS  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.76 Master Control Reset  MCR  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.76 Counters  P.77 Up Counter  CTU  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.78 Down Counter  CTD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.80 Up Down Counter  CTUD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.82 Timers  P.85 On-Delay Timer (0.1ms)  TON_100us  ○ ○   STC — — — —  —  —  2  P.87 On-Delay Timer (1ms)  TON  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.87 On-Delay Timer (10ms)  TON_10ms  ○ ○   ○ ○ — — —  —  —  2  P.87 On-Delay Timer (100ms)  TON_100ms  ○ ○   ○ ○ ○ ○ ○  ○  —  2  P.87 On-Delay Timer    (0.1 minute)  TONM_P  ○ ○   — —  ○ ○ ○   ○   —  2  P.87 Off-Delay Timer (0.1ms)  TOF_100us  ○ ○   STC — — — —  —  —  2  P.90 Off-Delay Timer (1ms)  TOF  ○ ○   ○ ○ ○ ○ ○   ○   ○   1  P.90 Off-Delay Timer (10ms)  TOF_10ms  ○ ○   ○ ○ — — —  —  —  2  P.90 Off-Delay Timer (100ms)  TOF_100ms  ○ ○   ○ ○ ○ ○ ○   ○   —  2  P.90 Off-Delay Timer (0.1  minute)  TOFM_P  ○ ○   — —  ○ ○ ○   ○   —  2  P.90 Pulse Timer (0.1ms)  TP_100us  ○ ○   STC — — — —  —  —  2  P.93 Pulse Timer (1ms)  TP  ○ ○   ○ ○ ○ ○ ○   ○   ○   1  P.93 Pulse Timer (10ms)  TP_10ms  ○ ○   ○ ○ — — —  —  —  2  P.93 Pulse Timer (100ms)  TP_100ms  ○ ○   ○ ○ ○ ○ ○  ○  —  2  P.93 Single Shot (100ms)  SS_P  ○ ○   ○ ○ ○ ○ ○  ○  —  2  P.96 Single Shot (0.1 minute)  SSM_P  ○ ○   — —  ○ ○ ○  ○  —  2  P.96 Real Time Clock  RTC  — —   ○ ○ — — —  —  —  2  P.98 Real Time Clock  RTC_N  ○ ○   — — — — —  —  —  2  P.100 On/Off-Delay Timer  DEL_L  — —   — — — — —  —  2.30  2  P.102 Flip-Flops  P104 Set Type Flip-Flop  SR  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P105 Reset Type Flip-Flop  RS  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P107 Semaphore  SEMA  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P109 Moving  P.111 Normally Open Contact  Gate    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.112 Normally Closed  Contact Gate    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.114 1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  37    Instruction  nv series  V series  Contact/Coil  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Moving   P111 MOVE_INT  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_DINT  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_UINT  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_REAL  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_WORD  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_DWORD  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_TIME  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_TOD  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_DATE  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 MOVE_DT  ○ ○   ○ ○ 1.30 1.10 2.30  ○  —  1  P.116 Move Data  MOVE_STRING  — —   — — — — —  —  —  1  P.116 Move Table Data  TMOV  ○ ○   ○ ○   ○   ○   ○  ○  2.30  1  P.118 XCHG_INT  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_DINT  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_UINT  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_REAL  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_WORD  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_DWORD  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_TIME  ○ ○   ○ ○ — — —  —  —  2  P.120 XCHG_TOD  ○ ○   ○ ○ — — —  —  —  2  P.120 Data Exchange  XCHG_DATE  ○ ○   ○ ○ — — —  —  —  2  P.120 TINZ_INT  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_DINT  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_UINT  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_REAL  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_WORD  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_DWORD  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_TIME  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_TOD  ○ ○   ○ ○ — — —  —  —  1  P.122 TINZ_DATE  ○ ○   ○ ○ — — —  —  —  1  P.122 Initialize Table Data  TINZ_DT  — —   — — — — —  —  —  1  P.122 Comparison  P.124 GT_INT  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_DINT  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_UINT  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_REAL  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_WORD  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_DWORD  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_TIME  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_TOD  ○ ○   ○ ○   ○   ○   ○  ○  ○  1  P.125 GT_DATE  — —   — — — — —  —  —  1  P.125 Greater Than  GT_DT  — —   — — — — —  —  —  1  P.125 Chapter 1    For Programming  6F8C1226  38    nv series  V series  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Comparison  P.124 GE_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.127 GE_DATE  — —   — — — — —  —  —  1  P.127 Greater Than or Equal  GE_DT  — —   — — — — —  —  —  1  P.127 EQ_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 EQ_DATE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.129 Equal  EQ_DT  — —   — — — — —  —  —  1  P.129 LE_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.131 LE_DATE  — —   — — — — —  —  —  1  P.131 Less Than or Equal  LE_DT  — —   — — — — —  —  —  1  P.131 LT_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.133 LT_DATE  — —   — — — — —  —  —  1  P.133 Less Than  LT_DT  — —   — — — — —  —  —  1  P.133   1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  39    nv series  V series  Instruction    Symbol    t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p     P a g e     Comparison  P.124 NE_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 NE_DATE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.135 Not Equal  NE_DT  — —   — — — — —  —  —  1  P.135 Comparison with Hysteresis    (greater than)  GT_L  — —   — — — — —  —  2.30  2  P.137 Comparison with Hysteresis    (less than)  LT_L  — —   — — — — —  —  2.30  2  P.139 Comparison with Hysteresis  (greater than or equal)  GE_L  — —   — — — — —  —  2.30  2  P.141 Comparison with Hysteresis  (less than or equal)  LE_L  — —   — — — — —  —  2.30  2  P.143 Selection  P.145 MAX_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.146 MAX_DATE  — —   — — — — —  —  —  1  P.146 Maximum  MAX_DT  — —   — — — — —  —  —  1  P.146 MAXL_INT  ○ ○   ○ ○ — — —  —  —  1  P.148 MAXL_DINT  ○ ○   ○ ○ — — —  —  —  1  P.148 MAXL_UINT  ○ ○   ○ ○ — — —  —  —  1  P.148 MAXL_REAL  ○ ○   ○ ○ — — —  —  —  1  P.148 MAXL_TIME  ○ ○   ○ ○ — — —  —  —  1  P.148 MAXL_TOD  ○ ○   ○ ○ — — —  —  —  1  P.148 MAXL_DATE  — —   — — — — —  —  —  1  P.148 Maximum of Table Data  MAXL_DT  — —   — — — — —  —  —  1  P.148 MIN_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.150 MIN_DATE  — —   — — — — —  —  —  1  P.150 Minimum  MIN_DT  — —   — — — — —  —  —  1  P.150 Chapter 1    For Programming  6F8C1226  40    nv series  V series  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Selection  P.145 MINL_INT  ○ ○   ○ ○ — — —  —  —  1  P.152 MINL_DINT  ○ ○   ○ ○ — — —  —  —  1  P.152 MINL_UINT  ○ ○   ○ ○ — — —  —  —  1  P.152 MINL_REAL  ○ ○   ○ ○ — — —  —  —  1  P.152 MINL_TIME  ○ ○   ○ ○ — — —  —  —  1  P.152 MINL_TOD  ○ ○   ○ ○ — — —  —  —  1  P.152 MINL_DATE  — —   — — — — —  —  —  1  P.152 Minimum of Table Data  MINL_DT  — —   — — — — —  —  —  1  P.152 AVE_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.154 AVE_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.154 AVE_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.154 AVE_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.154 Average Value  AVE_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.154 AVEL_INT  ○ ○   ○ ○ — — —  —  —  1  P156 AVEL_DINT  ○ ○   ○ ○ — — —  —  —  1  P.156 AVEL_UINT  ○ ○   ○ ○ — — —  —  —  1  P.156 AVEL_REAL  ○ ○   ○ ○ — — —  —  —  1  P.156 Average of Table Data  AVEL_TIME  ○ ○   ○ ○ — — —  —  —  1  P.156 LIMIT_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.158 LIMIT_DATE  — —   — — — — —  —  —  1  P.158 Limiter  LIMIT_DT  — —   — — — — —  —  —  1  P.158 SEL_BOOL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 SEL_DATE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.161 Selector  SEL_DT  — —   — — — — —  —  —  1  P.161   1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  41    nv series  V series  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Selection  P.145 MUX_BOOL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_TIME  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_TOD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 MUX_DATE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.163 Multiplex  MUX_DT  — —   — — — — —  —  —  1  P.163 MPX_INT  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_DINT  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_UINT  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_WORD  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_DWORD  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_REAL  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_TIME  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_TOD  ○ ○   ○ ○ — — —  —  —  1  P.165 MPX_DATE  ○ ○   ○ ○ — — —  —  —  1  P.165 Multiplex of Table  Data  MPX_DT  — —   — — — — —  —  —  1  P.165 Type Conversion  P.167 INT_TO_DINT  ○ ○   ○ ○ 1.30 1.10 2.30  ○  2.30  1  P.169 INT_TO_UINT  ○ ○   2.50 2.53 — — —  —  —  1  P.169 DINT_TO_INT  ○ ○   ○ ○ 1.30 1.10 2.30  ○   2.30  1  P.169 DINT_TO_UINT  ○ ○   2.50 2.53 — — —  —  —  1  P.169 UINT_TO_INT  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.169 Integer-Integer  Conversion  UINT_TO_DINT  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.169 INT_TO_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.171 DINT_TO_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.171 Integer-Real  Numbers  Conversion  UINT_TO_REAL  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  1.03  1  P.171 INT_TO_WORD  ○ ○   ○ ○ ○ ○ ○  ○  1.03  1  P.172 INT_TO_DWORD  ○ ○   2.50 2.53  ○ ○ ○  ○  1.03  1  P.172 DINT_TO_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.172 DINT_TO_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  1.03  1  P.172 UINT_TO_WORD  ○ ○   ○ ○ ○ ○ ○  ○  1.03  1  P.172 Integer-Bit String  Conversion  UINT_TO_DWORD  ○ ○   2.50 2.53  ○ ○ ○  ○  1.03  1  P.172 INT_TO_BCD_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.174 INT_TO_BCD_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.174 DINT_TO_BCD_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.174 DINT_TO_BCD_DWORD  ○ ○   ○ ○ — — —  —  —  1  P.174 UINT_TO_BCD_WORD  ○ ○   ○ ○ — — —  —  —  1  P.174 Integer-BCD  Conversion  UINT_TO_BCD_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.174 Chapter 1    For Programming  6F8C1226  42    nv series  V series  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Type Conversion  P.167 INT_TO_TIME  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.176 DINT_TO_TIME  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.176 Integer-Duration  Conversion  UINT_TO_TIME  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.176 REAL_TO_INT  ○ ○   ○  ○ ○ ○ ○  ○  ○  1  P.177 REAL_TO_DINT  ○ ○   ○  ○ ○ ○ ○  ○  ○  1  P.177 Real Numbers Integer  Conversion  REAL_TO_UINT  ○ ○   2.50 2.53 — — —  —  —  1  P.177 REAL_TO_BCD_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.179 Real Numbers-BCD  Conversion  REAL_TO_BCD_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.179 Real  Numbers-Duration  Conversion  REAL_TO_TIME  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  1.03  1  P.181 WORD_TO_INT  ○ ○   ○  ○ ○ ○ ○  ○  1.03  1  P.183 WORD_TO_DINT  ○ ○   2.50 2.53  ○ ○ ○  ○  1.03  1  P.183 WORD_TO_UINT  ○ ○   ○  ○ ○ ○ ○  ○  1.03  1  P.183 DWORD_TO_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.183 DWORD_TO_DINT  ○ ○   ○  ○ ○ ○ ○  ○  1.03  1  P.183 Bit String-Integer  Conversion  DWORD_TO_UINT  ○ ○   2.50 2.53 — — —  —  —  1  P.183 WORD_TO_DWORD  ○ ○   ○  ○ 1.30 1.10 2.30  ○  2.30  1  P.185 Bit String-Bit String  Conversion  DWORD_TO_WORD  ○ ○   ○  ○ 1.30 1.10 2.30  ○  2.30  1  P.185 WORD_BCD_TO_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.187 WORD_BCD_TO_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.187 WORD_BCD_TO_UINT  ○ ○   ○   ○ — — —  —  —  1  P.187 DWORD_BCD_TO_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.187 DWORD_BCD_TO_DINT  ○ ○   ○   ○ — — —  —  —  1  P.187 BCD-Integer  Conversion  DWORD_BCD_TO_UINT  ○ ○   2.50 2.53 — — —  —  —  1  P.187 WORD_BCD_TO_REAL  ○ ○   2.50 2.53 — — —  —  —  1  P.189 BCD-Real Numbers  Conversion  DWORD_BCD_TO_REAL  ○ ○   2.50 2.53 — — —  —  —  1  P.189 WORD_BCD_TO_TIME  ○ ○   2.50 2.53 — — —  —  —  1  P.191 BCD-Duration  Conversion  DWORD_BCD_TO_TIME  ○ ○   2.50 2.53 — — —  —  —  1  P.191 TIME_TO_INT  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.193 TIME_TO_DINT  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  2.30  1  P.193 Duration-Integer  Conversion  TIME_TO_UINT  ○ ○   2.50 2.53 — — —  —   —  1  P.193 Duration-Real  Numbers Conversion  TIME_TO_REAL  ○ ○   2.50 2.53 1.30 1.10 2.30  ○  1.03  1  P.195 TIME_TO_BCD_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.196 Duration-BCD  Conversion  TIME_TO_BCD_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.196 TRUNC_INT  ○ ○   ○  ○ — — —  —  —  1  P.198 TRUNC_DINT  ○ ○   ○  ○ — — —  —  —  1  P.198 Truncation  TRUNC_UINT  ○ ○   2.50 2.53 — — —  —  —  1  P.198 NEG_INT  ○ ○   ○  ○ — — —  —  —  1  P.200 NEG_DINT  ○ ○   ○  ○ — — —  —  —  1  P.200 Sign Negative  NEG_REAL  ○ ○   ○  ○ — — —  —  —  1  P.200 DEG-RAD Conversion  DEG_TO_RAD  ○ ○   ○  ○ — — —  —  —  1  P.202 RAD-DEG Conversion  RAD_TO_DEG  ○ ○   ○  ○ — — —  —  —  1  P.203 BIN_INT_P  ○ ○   ○  ○ — — —  —  —  1  P.204 BIN Conversion    BIN_DINT_P  ○ ○   ○  ○ — — —  —  —  1  P.204 1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  43    nv series  V series  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Type Conversion  P.167 DT_TO_TOD  ○ ○   2.50 2.53 — — —  —  —  1  P.206 Time Data Type Conversion  DT_TO_DATE  ○ ○   2.50 2.53 — — —  —  —  1  P.206 Concatenate Time Data  CONCAT_D_TOD  ○ ○   2.50 2.53 — — —  —  —  1  P.208 ASCII-HEX Conversion  ATOH_T  ○ ○   ○ ○ — — —  —  —  1  P.210 HEX-ASCII Conversion  HTOA_T  ○ ○   ○ ○ — — —  —  —  1  P.212 ASCII-Real Numbers Conversion  ASC_TO_REAL  ○ ○   ○ ○ — — —  —  —  1  P.214 Real Numbers-ASCII Conversion  REAL_TO_ASC  ○ ○   ○ ○ — — —  —  —  1  P.216 ASCII (decimal)-Double Integer Conversion  ASCDEC_TO_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.219 ASCII (hexadecimal)-Double  Integer Conversion  ASCHEX_TO_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.222 Double Integer-ASCII (decimal) Conversion  DINT_TO_ASCDEC  ○ ○   2.50 2.53 — — —  —  —  1  P.225 Double Integer-ASCII  (hexadecimal) Conversion  DINT_TO_ASCHEX  ○ ○   2.50 2.53 — — —  —  —  1  P.228 Array-String Conversion  ARRAY_TO_STRING — —   — — — — —  —  —  1  P.231 String-Array Conversion  STRING_TO_ARRAY — —   — — — — —  —  —  1  P.233 Tag Number Conversion  TO_INDEX  —  ○   — — — 1.1A —  1.18  2.23  1  P.235 Numeric Function  P.237 Square Root  SQRT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.238 Exponential  EXP  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.239 Common Logarithms  LOG  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.241 Natural Logarithms  LN  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.243 ABS_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.245 ABS_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.245 Absolute Value  ABS_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.245 Sine  SIN  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.247 Cosine  COS  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.249 Tangent  TAN  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.251 Arcsine  ASIN  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.253 Arccosine  ACOS  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.255 Arctangent  ATAN  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.257 Logical Operation  P.259 AND_BOOL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.260 AND_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.260 Bitwise Boolean AND  AND_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.260 Bitwise Boolean AND of Table Data  TAND  ○ ○   2.50 2.53 — — —  —  —  1  P.262 OR_BOOL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.264 OR_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.264 Bitwise Boolean OR  OR_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.264 Bitwise Boolean OR of Table Data  TOR  ○ ○   2.50 2.53 —  —  —  —  —  1  P.266 NOT_BOOL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.268 NOT_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.268 Bitwise Boolean NOT    NOT_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.268 Bitwise Boolean NOT of Table Data  TNOT  ○ ○   2.50 2.53 — — —  —  —  1  P.269 XOR_BOOL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.271 XOR_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.271 Bitwise Boolean XOR  XOR_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.271 Chapter 1    For Programming  6F8C1226  44    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Logical Operation  P.259 Bitwise Boolean XOR of  Table Data  TXOR  ○ ○   2.50 2.53 — — — —  —  1  P.273 Bitwise Boolean NOT  XOR of Table Data  TXNR  ○ ○   2.50 2.53 — — — —  —  1  P.275 TEST_WORD  ○ ○   ○ ○ — — — —  —  1  P.277 Test  TEST_DWORD  ○ ○   ○ ○ — — — —  —  1  P.277 Bit Opeation  P.278 SHR_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.279 Shift Bits Right  SHR_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.279 SHL_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.281 Shift Bits Left  SHL_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.281 ROR_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.283 Rotate Bits Right  ROR_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.283 ROL_WORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.285 Rotate Bits Left  ROL_DWORD  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.285 SFA_WORD_P  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.287 Arithmetic Shift  SFA_DWORD_P  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.287 SFL_WORD_P  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.289 Logical Shift  SFL_DWORD_P  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.289 Arithmetic Operation  P.291 ADD_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.292 ADD_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.292 ADD_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.292 Add  ADD_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.292 ADC_INT  ○ ○   ○ ○ — — — —  —  1  P.294 Add with Carry  ADC_DINT  ○ ○   ○ ○ — — — —  —  1  P.294 SUB_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.296 SUB_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.296 SUB_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.296 Subtract  SUB_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.296 SBB_INT  ○ ○   ○ ○ — — — —  —  1  P.298 Subtract with Carry  SBB_DINT  ○ ○   ○ ○ — — — —  —  1  P.298 MUL_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.300 MUL_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.300 MUL_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.300 MUL_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.300 Multiply  MUL_INT_DINT  ○ ○   ○ ○ — — — —  —  1  P.302 DIV_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.303 DIV_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.303 DIV_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.303 Divide  DIV_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.303 MOD_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.305 MOD_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.305 Remainder  MOD_UINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.305 1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  45    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Arithmetic Operation  P.291 INC_INT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.307 INC_DINT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.307 INC_UINT  — —   — — — — —  —  —  1  P.307 INC_REAL  — —   — — — — —  —  —  1  P.307 Increment  INC_TIME  — —   — — — — —  —  —  1  P.307 DEC_INT  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.309 DEC_DINT  ○ ○   ○ ○ ○ ○ ○  ○  —  1  P.309 DEC_UINT  — —   — — — — —  —  —  1  P.309 DEC_REAL  — —   — — — — —  —  —  1  P.309 Decrement  DEC_TIME  — —   — — — — —  —  —  1  P.309 EXPT_INT  ○ ○   ○ ○ — — —  —  —  1  P.311 EXPT_DINT  ○ ○   ○ ○ — — —  —  —  1  P.311 EXPT_UINT  ○ ○   ○ ○ — — —  —  —  1  P.311 Power  EXPT_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.311 ADD_T_T  — —   — — — — —  —  —  1  P.313 ADD_TOD_T  — —   — — — — —  —  —  1  P.313 ADD_DT_T  — —   — — — — —  —  —  1  P.313 ADD_D_INT  — —   — — — — —  —  —  1  P.313 ADD_D_DINT  — —   — — — — —  —  —  1  P.313 Add Time Data  ADD_D_UINT  — —   — — — — —  —  —  1  P.313 SUB_T_T  — —   — — — — —  —  —  1  P.315 SUB_D_D  — —   — — — — —  —  —  1  P.315 SUB_TOD_T  — —   — — — — —  —  —  1  P.315 SUB_TOD_TOD  — —   — — — — —  —  —  1  P.315 SUB_DT_T  — —   — — — — —  —  —  1  P.315 SUB_DT_DT  — —   — — — — —  —  —  1  P.315 SUB_D_D_INT  — —   — — — — —  —  —  1  P.315 SUB_D_D_DINT  — —   — — — — —  —  —  1  P.315 SUB_D_D_UINT  — —   — — — — —  —  —  1  P.315 SUB_D_INT  — —   — — — — —  —  —  1  P.315 SUB_D_DINT  — —   — — — — —  —  —  1  P.315 Subtract Time Data  SUB_D_UINT  — —   — — — — —  —  —  1  P.315 MUL_T_INT  — —   — — — — —  —  —  1  P.317 MUL_T_DINT  — —   — — — — —  —  —  1  P.317 Multiply Time Data  MUL_T_UINT  — —   — — — — —  —  —  1  P.317 DIV_T_INT  — —   — — — — —  —  —  1  P.319 DIV_T_DINT  — —   — — — — —  —  —  1  P.319 Divide Time Data  DIV_T_UINT  — —   — — — — —  —  —  1  P.319 Data Processing  P.321 Set Carry  SETC  ○ ○   ○ ○ — — —  —  —  1  P.322 Reset Carry  RSTC  ○ ○   ○ ○ — — —  —  —  1  P.323 Chapter 1    For Programming  6F8C1226  46    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Data Processing  P.321 ENC_WORD_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.324 ENC_WORD_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.324 ENC_DWORD_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.324 Encode  ENC_DWORD_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.324 DEC_INT_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.326 DEC_INT_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.326 DEC_DINT_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.326 Decode  DEC_DINT_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.326 BC_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.328 Bit Counter  BC_DWORD  ○ ○   2.50 2.53 — — —  —  —  1  P.328 TSET_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.329 TSET_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.329 TSET_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.329 Table Bit Set  TSET_DWORD    ○ ○   2.50 2.53 — — —  —  —  1  P.329 TRST_INT  ○ ○   2.50 2.53 — — —  —  —  1  P.331 TRST_DINT  ○ ○   2.50 2.53 — — —  —  —  1  P.331 TRST_WORD  ○ ○   2.50 2.53 — — —  —  —  1  P.331 Table Bit Reset  TRST_DWORD    ○ ○   2.50 2.53 — — —  —  —  1  P.331 I/O  P.333 I/O Memory Read  MREAD  — —   ○ ○ 1.35 1.10 2.10  ○  —  1  P.334 I/O Memory Write  MWRITE  — —   ○ ○ 1.35 1.10 2.10  ○  —  1  P.337 I/O Memory Read (nv)  MREAD_N  1.20 1.70   — — — — —  —  —  2  P.340 I/O Memory Write (nv)  MWRITE_N  1.20 1.70   — — — — —  —  —  2  P.343 ASC Module String Data Input  ASCREAD  — —   — — — — —  —  —  1  P.346 ASC Module String Data Output  ASCWRITE  — —   — — — — —  —  —  1  P.349 State Change Detection Read  GET_IP_INF  ○ ○   2.06 2.52 — — —  —  —  1  P.352 Direct I/O  IO_T  — —   2.50 2.53 — — —  —  —  1  P.355 I/O Node State Read  GET_SIO_STS  ○ ○   — — — — —  —  —  1  P357 I/O Module State Read  GET_IO_STS  ○ ○   — — — — —  —  —  1  P.361 I/O Fallback Request  IOFB_REQ  ○ ○   — — — — —  —  —  1  P.365 I/O Fallback Recovery Request  IORC_REQ  ○ ○   — — — — —  —  —  1  P.367 Drive Device State Read  GET_DRV_STS  1.20 —   — — — — —  —  —  1  P.369 Process Operation  P.371 DB_INT  ○ ○   ○ ○ — — —  —  —  1  P.372 DB_DINT  ○ ○   ○ ○ — — —  —  —  1  P.372 Dead Band  DB_REAL  ○ ○   ○ ○ — — —  —  —  1  P.372 Derivative  DIF2  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.374 Integrator  INTG  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.377 Super Two Degrees of  Freedom PID  PID2  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.380 MV Calculation  MVS  ○ ○   ○ ○ ○ ○ ○  ○  ○  2  P.385 Fix MV  MVF  ○ ○   2.50 2.53  ○ ○ ○  ○  ○  1  P.388 PLN_INT  ○ ○   ○ ○ — — —  —  —  1  P.390 Polygonal Line  Function  PLN_REAL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.390 Polygonal Line Function  (high-speed version)  PLN_REAL2  1.20 —   — — — — —  —  —  1  P.393 1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  47    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Process Operation  P.371 ILNL_INT  ○  ○ 2.50 2.53 — — —  —  —  1  P.395 Inverse Polygonal  Line Function  ILNL_REAL  ○  ○ 2.50 2.53  ○ ○ ○  ○  ○  1  P.395 Inverse Polygonal Line Function  (high—speed version)  ILNL_REAL2  1.20 — — — — — —  —  —  1  P.399 Dead Time  DT  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.402 Moving Average (high—speed version)  MAV  ○  ○ 2.50 2.53  ○ ○ ○  ○  ○  1  P.406 Moving Average  (low-speed version)  MAV_N  ○ 1.32/ 3.10 — — — — —  —  —  1  P.410 DLM_INT  ○  ○   ○ ○ ○ ○ ○  ○  ○  2  P.414 DLM_DINT  ○  ○   ○ ○ ○ ○ ○  ○  ○  2  P.414 Rate Limiter  DLM_REAL  ○  ○   ○ ○ ○ ○ ○  ○  ○  2  P.414 Lag/Lead Filter  LAG2  ○  ○   ○ ○ ○ ○ ○  ○  ○  2  P.416 Engineering Unit Conversion  UNT  ○  ○ 2.50 2.53  ○ ○ ○  ○  ○  1  P.418 Percent Conversion  PCT  ○  ○ 2.50 2.53  ○ ○ ○  ○  ○  1  P.420 Essential Succession PID  PID3  ○  ○ 2.50 2.53 — — —  —  —  2  P.422 Estimate with Reset  RSM_L  — — — — — — —  —  2.30  2  P.430 Parameter Structure    —                      P.433 Program Control  P.451 Return  RETURN  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.452 User Defined Function  —  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.453 User Defined Function Block  —  ○  ○   ○ ○ ○ ○ ○  ○  ○  2/3  P.454 Program Enable  EN_P  ○  ○   ○ ○ ○ ○ ○  ○  —  1  P.456 Program Disable  DIS_P  ○  ○   ○ ○ ○ ○ ○  ○  —  1  P.458 Event Program Startup  START_P  ○  ○ — —  ○ ○ ○  ○  —  1  P.460 Interrupt Enable  EI_T  ○  ○   ○ ○ — — —  —  —  1  P.463 Interrupt Disable  DI_T  ○  ○   ○ ○ — — —  —  —  1  P.464 String Processing  P.465 String Length  LEN  — — — — — — —  —  —  1  P.466 Leftmost extract string  LEFT  — — — — — — —  —  —  1  P.467 Rightmost extract string  RIGHT  — — — — — — —  —  —  1  P.469 Extract String  MID  — — — — — — —  —  —  1  P.471 Concatenate string  CONCAT_STRING  — — — — — — —  —  —  1  P.473 Insert String  INSERT  — — — — — — —  —  —  1  P.475 Delete String  DELETE  — — — — — — —  —  —  1  P.477 Replace String  REPLACE  — — — — — — —  —  —  1  P.479 Find String  FIND  — — — — — — —  —  —  1  P.481 Define String  DEF_STRING  — — — — — — —  —  —  1  P.483 Control Statements  P.485 IF  IF  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.486 THEN  THEN  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.488 ELSE (IFstatement)  ELSE    ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.490 ELSEIF  ELSEIF  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.492 END_IF  END_IF  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.494 CASE  CASE  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.495 :  :  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.497 . .:  . .:  ○  ○   ○ ○ ○ ○ ○  ○  ○  1  P.499 Chapter 1    For Programming  6F8C1226  48    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Control Statements  P.485 ,  ,  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.501 . .    ,  . .    ,  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.503 ELSE (CASE statement)  ELSE    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.505 END_CASE  END_CASE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.507 FOR_DO  FOR_DO  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.509 EXIT (FOR statement)  EXIT    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.511 END_FOR  END_FOR  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.513 WHILE  WHILE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.514 DO  DO  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.515 EXIT (WHILE statement)  EXIT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.516 END_WHILE  END_WHILE  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.518 REPEAT  REPEAT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.519 UNTIL  UNTIL  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.520 EXIT (REPEAT statement)  EXIT    ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.521 END_REPEAT  END_REPEAT  ○ ○   ○ ○ ○ ○ ○  ○  ○  1  P.523 Communication  P.524 Socket Communication Send  USEND_T  — —   ○ ○ ○ ○ ○  ○  1.20  2  P.525 Socket Communication Send  USEND_N  ○ ○   — — — — —  —  —  2  P.542 Socket Communication Receive  URCV_T  — —   ○ ○ ○ ○ ○  ○  1.20  2  P.558 Socket Communication Receive  URCV_N  ○ ○   — — — — —  —  —  2  P.570 Communication FB (XMIT_T)  XMIT_T  — —   2.50 2.50 — — —  —  —  2  P.590 Communication FB (XMIT_N)  XMIT_N  1.20 —   — — — — —  —  —  2  P.592 Duplex Control  P.594 Duplex Online-Standby Change  DUPLEX_CHG  ○ ○   ○ ○ 1.37 1.10 2.35  ○  —  1  P.595 Duplex Self-System Down  DUPLEX_DOWN  ○ ○   ○ ○ 1.37 1.10 2.35  ○  —  1  P.597 Partial Equalizer  (variable specification)  EQUALIZE_VAR  — —   2.50 2.53 — — —  —  —  1  P.599 Partial Equalizer (address  specification)  EQUALIZE_ADDR  — —   2.50 2.53 — — —  —  —  1  P.601 Process Control  P.603 Current Output PID  PID_P  —   ○   — — — 1.10 —  ○  2.00  2  P.605 Current Output Sample PI  SPI_P  —   ○   — — — — —  —  —  2  P.612 Pulse Output PID  PIDP_P  —   ○   — — — 1.10 —  ○  2.00  2  P.618 Pulse Output Sample PI  SPIP_P  —   ○   — — — — —  —  —  2  P.623 Feed Forward  FFD_P  —   ○   — — — — —  —  —  2  P.629 Double Cross Limit  DCL_P  —   ○   — — — 1.10 —  ○  2.00  2  P.633 Tag Operation  P.638 Change Adjuster Mode  CMLP_P  —   ○   — — — 1.10 —  ○  —  1  P.639 Change Push Button Mode  CMPB_P  —   ○   — — — 1.10 —  ○  —  1  P.641 Change Sequence Mode  CMSQ_P  —   ○   — — — 1.10 —  ○  —  1  P.643 Set SV  SSV_P  —   ○   — — — 1.10 —  ○  —  1  P.645 Reset SV  RSV_P  —   ○   — — — 1.10 —  ○  —  1  P.649 Set MV  SMV_P  —   ○   — — — 1.10 —  ○  —  1  P.651 1.10    Instruction List  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  49    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   Tag Operation  P.638 Reset MV  RMV_P  —  ○   — — — 1.10 —  ○  —  1  P.655 Shut CV  SCV_P  —  ○   — — — 1.10 —  ○  —  1  P.657 Push Button ON  PB_P  —  ○   — — — 1.10 —  ○  —  1  P.661 Push Button Lock  LB_P  —  ○   — — — 1.10 —  ○  —  1  P.664 Action Timer  ACT_P  —  ○   — — — 1.10 —  ○  —  1  P.666 Action Counter  ACC_P  —  ○   — — — 1.10 —  ○  —  1  P.670 Self Step Jump  SJ_P  —  ○   — — — 1.10 —  ○  —  1  P.674 Reset Jump  RJ_P  —  ○   — — — 1.10 —  ○  —  1  P.678 Reset Jump2  RJ_P2  — 1.60   — — — — — —  —  1  P.682 SFC Initialize  INI_STEP  — 1.60   — — — — — —  —  1  P.684 RAS  P.686 Cyclic Trace  DATALOGC  ○ ○   2.17 2.52 — — — —  —  2  P.687 Calendar Data Acquisition  GET_CLND  ○ ○   — — — — — —  —  1  P.689 Interlock Diagnosis  DIAG_D  ○ —   2.75 — — — — —  —  2  P.691 Interlock Diagnosis with First Fault  Diagnosis Permission Input  DIAG_D2  1.50 —   2.7J/ 3.7E — — — — —  —  2  P.694 SFC  P.699 Step    ○ ○   ○ ○ ○ ○  ○ ○  ○  1  P.701 Initial Step    ○ ○   ○ ○ ○ ○  ○ ○  ○  2  P.703 Transition    ○ ○   ○ ○ ○ ○  ○ ○  ○  2  P.704 Divergence/Conver—  gence of Sequence    ○ ○   ○ ○ ○ ○  ○ ○  ○  2  P.706 Divergence/Conver—  gence of Simultaneous Sequences    ○ ○   ○ ○ ○ ○  ○ ○  ○  2  P.707 Link    ○ ○   ○ ○ ○ ○  ○ ○  ○  2  P.708 Action (BOOL type)    ○ ○   ○ ○ ○ ○  ○ ○  ○  3  P.710 Action (User defined type)    ○ ○   ○ ○ ○ ○  ○ ○  ○  3/5  P.710 Sequence    —  ○   — — —   ○ —  ○  —  2  P.717 Phase Step    —  ○   — — —   ○ —  ○  —  5  P.720 Chapter 1    For Programming  6F8C1226  50    nv series  V SERIES  Instruction  Symbol  t y p e 1   t y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   S t e p   P a g e   SFC  P.699 Phase End Step    —  ○   — — —   ○ —  ○  —  1  P.723 Answer Step    —  ○   — — —   ○ —  ○  —  3  P.725 Phase Step 2    — 1.60   — — — — — —  —  4  P.727 Answer Step 2    — 1.60   — — — — — —  —  3  P.729   2  Ph2      51  Chapter 2  LD/FBD Instructions    2.1  Contacts & Coils··························································································52  2.2  Execution Control ······················································································72  2.3  Counters ···········································································································77  2.4  Timers·················································································································85  2.5  Flip—Flops······································································································ 104  2.6  Moving··············································································································111  2.7  Comparison································································································· 124  2.8  Selection········································································································ 145  2.9  Type Conversion······················································································ 167  2.10  Numeric Function···················································································· 237  2.11  Logical Operation···················································································· 259  2.12  Bit Operation······························································································· 278  2.13  Arithmetic Operation············································································· 291  2.14  Data Processing······················································································· 321  2.15  I/O························································································································ 333  2.16  Process Operation·················································································· 371  2.17  Program Control······················································································· 451  2.18  String Processing···················································································· 465  2.19  Control Statements················································································· 485  2.20  Communication························································································· 524  2.21  Duplex Control··························································································· 594  2.22  Process Control························································································ 603  2.23  Tag Operation····························································································· 638  2.24  RAS···················································································································· 686    Chapter 2    LD/FBD Instructions  6F8C1226  52    2.1  Contacts & Coils    No.  Instruction  Remarks  1  Normally Open Contact    2  Normally Closed Contact      3  Positive Transition-sensing  Contact    4  Negative Transition-sensing  Contact    5  Rising Edge Detector    6  Falling Edge Detector    7  Inverter    8  Coil    9  Negated Coil    10  SET Coil    11  RESET Coil    12  Positive Transition-sensing  Coil    13  Negative Transition-sensing  Coil    14  Forced Coil    15  Forced Negated Coil    16  Forced SET Coil    17  Forced RESET Coil    18  Forced Positive  Transition-sensing Coil    19  Forced Negative  Transition-sensing Coil    2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  53    Normally Open Contact    Contacts & Coils  Normally Open Contact    LD/FBD language  notation      Variable (BOOL) Input Output   EN input  Edge execution  Index modification  Modifier  —  —  ○    ●  Function  ·  Normally open contact of variable (BOOL).    Input  Condition  Output  FALSE(OFF)  Regardless of variable (BOOL) state  FALSE(OFF)  Variable (BOOL)=FALSE(OFF)  FALSE(OFF)  TRUE(ON)  Variable (BOOL)=TRUE(ON)  TRUE(ON)    ●  Program example      SIGNAL2  SIGNAL3    SIGNAL1      ·  Coil  SIGNAL3  is  TRUE(ON)  only  when  states  of  SIGNAL1  and  SIGNAL2  are  both  TRUE(ON).    SIGNAL1  SIGNAL2  SIGNAL3      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is treated as FALSE(OFF) and the data boundary is exceeded.      Chapter 2    LD/FBD Instructions  6F8C1226  54    Normally Closed Contact    Contacts & Coils  Normally Closed Contact    LD/FBD language  notation        Variable (BOOL) Input Output   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  Relay coil b contact (normally closed contact) corresponding to variable (BOOL).      Input  Condition  Output  FALSE(OFF)  Regardless of variable (BOOL) state  FALSE(OFF)  Variable (BOOL) = FALSE(OFF)  TRUE(ON)  TRUE(ON)  Variable (BOOL) = TRUE(ON)  FALSE(OFF)    ●  Program example      SIGNAL2  SIGNAL3  SIGNAL1        ·  Coil SIGNAL3 is TRUE(ON) only when states of both SIGNAL1, SIGNAL2 are  FALSE(OFF).    SIGNAL1 SIGNAL2 SIGNAL3     ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is treated as FALSE(OFF) and the data boundary is exceeded.        2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  55    Positive Transition—sensing Contact    Contacts & Coils  Positive Transition—sensing Contact    LD/FBD language  notation      Variable (BOOL) P Input Output   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  The  output  is  kept  TRUE(ON)  for  one  scan  time  only  when  the  input  is  TRUE(ON) and the variable (BOOL) changes from FALSE(OFF) to TRUE(ON).      Input  Condition  Output  FALSE (OFF)  Regardless of variable (BOOL) state    FALSE(OFF)  Variable (BOOL) = FALSE(OFF) → FALSE(OFF)  FALSE(OFF)  Variable (BOOL) = TRUE(ON) → FALSE(OFF)  FALSE(OFF)  Variable (BOOL) = FALSE(OFF) → TRUE(ON)  TRUE(ON)  TRUE (ON)  Variable (BOOL) = TRUE(ON) → TRUE(ON)  FALSE(OFF)    ●  Program example      P  SIGNAL2  SIGNAL3    SIGNAL1      ·   When the SIGNAL1 is TRUE(ON) and SIGNAL2 changes from FALSE(OFF)  to TRUE (ON), coil SIGNAL3 keeps TRUE(ON) for one scan time only.        t  t    t  :  1  scan  time SIGNAL2  SIGNAL3  SIGNAL1      ●  Error information  ·  When there is a boundary error due to index modification, the value of variable  (BOOL) is treated as FALSE(OFF) and the data boundary is exceeded.    Chapter 2    LD/FBD Instructions  6F8C1226  56    Negative Transition—sensing Contact    Contacts & Coils  Negative Transition—sensing Contact    LD/FBD language  notation      Variable (BOOL) N Input Output   EN input  Edge execution  Index modification  Modifier  —  —  ○    ●  Function  ·  The  output  is  kept  TRUE(ON)  for  one  scan  time  when  the  input  is  TRUE(ON)  and  variable (BOOL) changes from TRUE(ON) to FALSE(OFF).      Input  Condition  Output  FALSE(OFF)  Regardless of variable (BOOL) state  FALSE(OFF)  Variable (BOOL) = FALSE(OFF) → FALSE(OFF)  FALSE(OFF)  Variable (BOOL) = TRUE(ON) → FALSE(OFF)  TRUE(ON)  Variable (BOOL) = FALSE(OFF) → TRUE(ON)  FALSE(OFF)  TRUE(ON)  Variable (BOOL) = TRUE(ON) → TRUE(ON)  FALSE(OFF)    ●  Program example      N  SIGNAL2  SIGNAL3    SIGNAL1      ·  When the SIGNAL1 is TRUE(ON) and SIGNAL2 changed from TRUE(ON) to FALSE  (OFF), coil SIGNAL3 keeps TRUE(ON) for one scan time only.      t  t    t  :  1  scan  time SIGNAL2  SIGNAL3  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is treated as FALSE(OFF) and the data boundary is exceeded.    2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  57    Rising Edge Detector    Contacts & Coils  Rising Edge Detector    LD/FBD language  notation      Input Output   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  The output is kept TRUE(ON) for one scan time, when the input changes from  FALSE(OFF) to TRUE(ON).      Input  Condition  Output  FALSE(OFF)  Regardless of previous input state  FALSE(OFF)  Previous input = FALSE(OFF)  TRUE(ON)  TRUE(ON)  Previous input = TRUE(ON)  FALSE(OFF)    ●  Program example      ↑  SIGNAL2    SIGNAL1      ·  The  coil  SIGNAL2  keeps  TRUE(ON)  for  one  scan  time  only  when  SIGNAL1  changes from FALSE(OFF) to TRUE(ON).        t  t  t    t:1  scan  time SIGNAL2  SIGNAL1    Chapter 2    LD/FBD Instructions  6F8C1226  58    Falling Edge Detector    Contacts & Coils  Falling Edge Detector    LD/FBD language  notation        Input Output   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  The  output  is  kept  TRUE(ON)  for  one  scan  time,  when  the  input  changes  from  TRUE(ON) to FALSE(OFF).      Input  Condition  Output  Previous input = FALSE(OFF)  FALSE(OFF)  FALSE(OFF)  Previous input = TRUE(ON)  TRUE(ON)  TRUE(ON)  Regardless of previous input state  FALSE(OFF)    ●  Program example        ↓  SIGNAL2    SIGNAL1      ·  The  coil  SIGNAL2  keeps  TRUE(ON)  for  one  scan  time  only  when  the  SIGNAL1  changes from TRUE(ON) to FALSE(OFF).        t  t  t    t  :  1  scan  time SIGNAL2  SIGNAL1      2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  59    Inverter    Contacts & Coils  Inverter    LD/FBD language  notation    I Input Output   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When the input is TRUE(ON), output is FALSE(OFF). When the input is FALSE (OFF),  the output is TRUE(ON).    Input  Condition  Output  FALSE(OFF)  —  TRUE(ON)  TRUE(ON)  —  FALSE(OFF)    ●  Program example      I  SIGNAL2    SIGNAL1      ·  When the SIGNAL1 is TRUE(ON), coil SIGNAL2 is FALSE(OFF).      When the SIGNAL1 is FALSE(OFF), coil SIGNAL2 is TRUE(ON).  SIGNAL2  SIGNAL1      Chapter 2    LD/FBD Instructions  6F8C1226  60    Coil    Contacts & Coils  Coil    LD/FBD language  notation      Variable (BOOL) Input     EN input  Edge execution  Index modification  Modifier  —  —  ○    ●  Function  ·  Relay coil of a variable (BOOL) that stores the input state in the variable (BOOL).    Input  Action  Output  FALSE(OFF)  Variable (BOOL)=FALSE(OFF)  —  TRUE(ON)  Variable (BOOL)=TRUE(ON)  —    ●  Program example        SIGNAL2  SIGNAL3    SIGNAL1      ·  The coil SIGNAL3 is TRUE(ON) only when the state of both SIGNAL1 and    SIGNAL2  are TRUE(ON).      SIGNAL2  SIGNAL3  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.      2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  61    Negated Coil   Contacts & Coils  Negated Coil    LD/FBD language  notation      Variable (BOOL) Input     EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  The  negated  coil  of  a  variable  (BOOL)  that  stores  the  negated  input  state  in  the  variable (BOOL).    Input  Action  Output  FALSE(OFF)  Variable (BOOL)=TRUE(ON)  —  TRUE(ON)  Variable (BOOL)=FALSE(OFF)  —    ●  Program example        SIGNAL2  SIGNAL3    SIGNAL1      ·  The  coil  SIGNAL  3  is  FALSE(OFF)  only  when  the  state  of  both  SIGNAL1  and    SIGNAL2 are TRUE(ON).      SIGNAL2  SIGNAL3  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL)is unchanged and the data boundary is exceeded.  Chapter 2    LD/FBD Instructions  6F8C1226  62    SET Coil    Contacts & Coils  SET Coil    LD/FBD language  notation      Variable (BOOL) S Input     EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  Set coil of a variable (BOOL) that sets variable (BOOL) to TRUE(ON) when the input  state is TRUE(ON).    Input  Action  Output  FALSE(OFF)  Variable (BOOL)=unchanged  —  TRUE(ON)  Variable (BOOL)=TRUE(ON)  —    ●  Program example          SIGNAL2  SIGNAL3    SIGNAL1  S      ·  The  coil  SIGNAL3  is  set  when  the  state  of  both  SIGNAL1  and  SIGNAL2  are  TRUE(ON).  Then,  SIGNAL3  remains  TRUE(ON)  even  when  SET  coil  input  is  FALSE(OFF).        SIGNAL2  SIGNAL3  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.    2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  63    RESET Coil    Contacts & Coils  RESET Coil    LD/FBD language  notation      Variable (BOOL) R Input     EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  Reset coil of a variable (BOOL) that resets variable (BOOL) to FALSE(OFF) when the  input state is TRUE(ON).      Input  Action  Output  FALSE(OFF)  Variable (BOOL)=unchanged  —  TRUE(ON)  Variable (BOOL)=FALSE(OFF)  —    ●  Program example          SIGNAL2  SIGNAL3    SIGNAL1  R      ·  The  coil  SIGNAL3  is  reset  when  the  state  of  both  SIGNAL1  and  SIGNAL2  are  TRUE(ON).  Then,  SIGNAL3  remains  FALSE(OFF)  even  when  RESET  coil  input  is  FALSE(OFF).        SIGNAL2  SIGNAL3  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.    Chapter 2    LD/FBD Instructions  6F8C1226  64    Positive Transition-sensing Coil   Contacts & Coils  Positive Transition-sensing Coil    LD/FBD language  notation      Variable (BOOL) P Input     EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  When the input changes from FALSE(OFF) to TRUE(ON), variable (BOOL) is kept to  TRUE(ON) for one scan time only.      Input  Action  Output  FALSE(OFF)  Variable (BOOL)=FALSE(OFF)  —  When previous input=FALSE(OFF), variable  (BOOL)=TRUE(ON)  —  TRUE(ON)  When previous Input=TRUE(ON), variable  (BOOL)=FALSE(OFF)  —    ●  Program example      SIGNAL2  SIGNAL1    P      ·  The  SIGNAL2  is  kept  to  TRUE(ON)  only  when  the  SIGNAL1  changes  from  FALSE(OFF) to TRUE(ON).        t  t  t    t  :  1  scan  time SIGNAL2  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded. However, the input state for  pulse operation is saved.      2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  65    Negative Transition-sensing Coil   Contacts & Coils  Negative Transition-sensing Coil    LD/FBD language  notation      Variable (BOOL) N Input     EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When the input changed from TRUE(ON) to FALSE(OFF), the variable (BOOL) is kept  to TRUE(ON) for one scan time only.      Input  Action  Output When previous Input=FALSE(OFF),variable (BOOL)=FALSE(OFF)  —  FALSE(OFF)  When previous Input=TRUE(ON), variable (BOOL)=TRUE(ON)  —  TRUE(ON)  Variable (BOOL)=FALSE(OFF)  —    ●  Program example      SIGNAL2  SIGNAL1    N      ·  The  SIGNAL2  is  TRUE(ON)  for  only  one  scan  time,  only  when  SIGNAL1  changes  from TRUE(ON) to FALSE(OFF).        t  t  t    t  :  1  scan  time SIGNAL2  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded. However, the input state for  pulse operation is saved.  Chapter 2    LD/FBD Instructions  6F8C1226  66    Forced Coil    Contacts & Coils  Forced Coil    LD/FBD language  notation      Input   Variable (BOOL)   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  A coil that retains the state of a variable (BOOL) when forced, regardless of the input  state.    ·  The operation as forced coil is not guaranteed when the same variable is used as coil  in more than one place.      Input  Action  Output  FALSE(OFF)  Variable (BOOL)=retains previous state  —  TRUE(ON)  Variable (BOOL)=retains previous state  —    ●  Program example      SIGNAL2  SIGNAL1         ·  The forced set state of SIGNAL2 is retained regardless of the state of SIGNAL1.    ·  If  the  state  of  SIGNAL2  just  before  being  forced  set  is  TRUE(ON),  the  forced  coil  retains the TRUE(ON) state (see Ex. 1).    ·  If  the  state  of  SIGNAL2  just  before  being  forced  set  is  FALSE(OFF),  the  forced  coil  retains the FALSE(OFF) state (see Ex. 2).        SIGNAL1    SIGNAL2    Set forced  Ex.1  Ex.2 Set forced Reset  forced  Reset  f orced      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.    2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  67    Forced Negated Coil    Contacts & Coils  Forced Negated Coil    LD/FBD language  notation      Input   Variable (BOOL)   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  A negated coil that retains the state of a variable (BOOL) when forced, regardless of  the input state.  ·  The  operation  as  forced  negated  coil  is  not  guaranteed  when  the  same  variable  is  used as coil in more than one place.    Input  Action  Output  FALSE(OFF)  Variable (BOOL)=retains previous  state    —  TRUE(ON)  Variable (BOOL)=retains previous  state    —    ●  Program example      SIGNAL2  SIGNAL1         ·  The forced set state of SIGNAL2 is retained regardless of the state of SIGNAL1.  ·  If  the  state  of  SIGNAL2  just  before  being  forced  set  is  FALSE(OFF),  the  forced  negated coil retains the FALSE(OFF) state (see Ex. 1).  ·  If the state of SIGNAL2 just before being forced set is TRUE(ON), the forced negated  coil retains the TRUE(ON) state (see Ex. 2).    Ex.1  Ex.2 Set forced  Set forced Reset  forced  Reset  forced  SIGNAL2  SIGNAL1      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.  Chapter 2    LD/FBD Instructions  6F8C1226  68    Forced SET Coil    Contacts & Coils  Forced SET Coil    LD/FBD language  notation      S Input   Variable (BOOL)   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  A SET coil that retains the state of a variable (BOOL) when forced, regardless of the  input state.  ·  The operation as forced SET coil is not guaranteed when the same variable is used as  coil in more than one place.    Input  Action  Output  FALSE(OFF)  Variable (BOOL) = retains previous state  —  TRUE(ON)  Variable (BOOL) = retains previous state  —    ●  Program example      SIGNAL2  SIGNAL1   S      ·  The forced set state of SIGNAL2 is retained regardless of the state of SIGNAL1.  ·  If the state of SIGNAL2 just before being forced set is FALSE(OFF), the forced SET  coil retains the FALSE(OFF) state (see Ex. 1).  ·    If the state of SIGNAL2 just before being forced set is TRUE(ON), the forced SET coil  retains the TRUE(ON) state (see Ex. 2).      SIGNAL1    SIGNAL2    Ex.1  Ex.2 Set forced  Reset  forced  Set forced Reset  forced      ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.  2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  69    Forced RESET Coil    Contacts & Coils  Forced RESET Coil    LD/FBD  language notation      R Input   Variable (BOOL)   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  A RESET coil that retains the state of a variable (BOOL) when forced, regardless of  the input state.  ·  The operation as forced RESET coil is not guaranteed when the same variable is used  as coil in more than one place.    Input  Action  Output  FALSE(OFF)  Variable (BOOL) = retains previous state  —  TRUE(ON)  Variable (BOOL) = retains previous state  —    ●  Program example      SIGNAL2  SIGNAL1   R      ·  The forced set state of SIGNAL2 is retained regardless of the state of SIGNAL1.  ·  If the state of SIGNAL2 just before being forced set is TRUE(ON), the forced RESET  coil retains the TRUE(ON) state (see Ex. 1).  ·  If the state of SIGNAL2 just before being forced set is FALSE(OFF), the forced RESET  coil retains the FALSE(OFF) state (see Ex. 2).      SIGNAL1    SIGNAL2    Ex.1  Ex.2 Reset  forced  Set forced  Set forced Reset  forced    ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded.  Chapter 2    LD/FBD Instructions  6F8C1226  70    Forced Positive Transition-sensing Coil   Contacts & Coils  Forced Positive Transition-sensing Coil    LD/FBD language  notation    P Input   Variable (BOOL)   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  A  forced  positive  transition—sensing  coil  that  retains  the  state  of  a  variable  (BOOL)  when forced, regardless of the input state.  ·  The  operation  as  forced  positive  transition—sensing  coil  is  not  guaranteed  when  the  same variable is used as coil in more than one place.    Input  Action  Output  FALSE(OFF)  Variable (BOOL) = retains previous state  —  TRUE(ON)  Variable (BOOL) = retains previous state  —    ●  Program example      SIGNAL2  SIGNAL1   P      ·  The forced set state of SIGNAL2 is retained regardless of the state of SIGNAL1.  ·  If the state of SIGNAL2 just before being forced set is FALSE(OFF), the forced positive  transition—sensing coil retains the FALSE(OFF) state (see Ex. 1).  ·  If the state of SIGNAL2 just before being forced set is TRUE(ON), the forced positive  transition—sensing coil retains the TRUE(ON) state (see Ex. 2).      SIGNAL1      SIGNAL2    Ex.1  Ex.2   t  t t : 1 scan time  Set forced  Reset  forced  Set forced Reset  forced    ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded. However, the input state for  pulse operation is saved.  2.1    Contacts & Coils  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  71    Forced Negative Transition-sensing Coil    Contacts & Coils  Forced Negative Transition-sensing Coil    LD/FBD language  notation    N Input   Variable (BOOL)   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Function  ·  A  forced  negative  transition-sensing  coil  that  retains  the  state  of  a  variable  (BOOL)  when forced, regardless of the input state.  ·  The  operation  as  forced  negative  transition-sensing  coil  is  not  guaranteed  when  the  same variable is used as coil in more than one place.    Input  Action  Output  FALSE(OFF)  Variable (BOOL) = retains previous state  —  TRUE(ON)  Variable (BOOL) = retains previous state  —    ●  Program example      SIGNAL2  SIGNAL1   N      ·  The forced set state of SIGNAL2 is retained regardless of the state of SIGNAL1.  ·  If the state of SIGNAL2 just before being forced set is TRUE(ON), the forced negative  transition—sensing coil retains the TRUE(ON) state (see Ex. 1).  ·  If  the  state  of  SIGNAL2  just  before  being  forced  set  is  FALSE(OFF),  the  forced  negative transition—sensing coil retains the FALSE(OFF) state (see Ex. 2).    SIGNAL2  SIGNAL1  Ex.1 Ex.2 t t  t : 1 scan time  t  Set forced  Set forced Reset  forced  Reset  forced    ●  Error information  ·  When  there  is  a  boundary  error  due  to  index  modification,  the  value  of  variable  (BOOL) is unchanged and the data boundary is exceeded. However, the input state for  pulse operation is saved.  Chapter 2    LD/FBD Instructions  6F8C1226  72      2.2  Execution Control    No.  Instruction    Remarks  1  Jump Control Set  JCS    2  Jump Control Reset  JCR    3  Jump      4  Label  LABEL    5  Conditional Execution Instruction     6  End of Conditional Execution  Instruction      7  Master Control Set  MCS    8  Master Control Reset  MCR        2.2  Execution  Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  73    Jump Control Set/Reset   Execution Control  Jump Control Set/Reset    LD/FBD language  notation    Condition input JCS    Circuit P      JCR    EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When the input to JCS is TRUE(ON), instructions between JCS and JCR are skipped  and instructions are executed from JCR.  ·  When  the  input  to  JCS  is  FALSE(OFF),  instructions  between  JCS  and  JCR  are  executed.    ·  JCS and JCR must be used as pair. JCS must always be described before JCR.    ·  The JCS-JCR combination may be nested.      Input  Action  Output  FALSE(OFF)  Jump not performed  —  TRUE(ON)  Jump performed  —    ●  Program example        SIGNAL1  JCS  JCR  Circuit A  Circuit B      ·  When the SIGNAL1 is FALSE(OFF), Circuit A and Circuit B instructions are executed.    ·  When  the  SIGNAL1  is  TRUE(ON),  Circuit  A  is  not  executed  and  instructions  are  executed from Circuit B.      Chapter 2    LD/FBD Instructions  6F8C1226  74    Jump/Label    Execution Control  Jump/Label    LD/FBD language  notation      Condition input Circuit P  Label    Label  LABEL:  EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When  the  input  to  jump  instruction  is  TRUE(ON),  instructions  between  Jump  and  Label are skipped and instructions are executed from Label instruction.    ·  When  the  input  to  jump  instruction  is  FALSE(OFF),  instructions  between  jump  and  label are executed.  ·  Jump and Label instructions must be used as pair. The Jump—Label instructions may  be nested.      Input  Action  Output  FALSE(OFF)  Jump not performed  —  TRUE(ON)  Jump performed  —    ●  Program example        SIGNAL1  Circuit A  Circuit B  JMP_A  LABEL:  JMP_A     ·  When the SIGNAL1 is FALSE(OFF), Circuit A and Circuit B instructions are executed.  ·  When  the  SIGNAL1  is  TRUE(ON),  Circuit  A  is  not  executed  and  instructions  are  executed from Circuit B.    2.2  Execution  Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  75    Conditional Execution Instruction/End of Conditional Execution Instruction   Execution Control  Conditional Execution Instruction/End of Conditional  Execution Instruction    LD/FBD language  notation    Condition  input  Circuit P    EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When  the  input  to  Conditional  execution  instruction  is  FALSE(OFF),  instructions  between Conditional execution instruction and End of conditional execution instruction  are  skipped  and  instructions  are  executed  from  End  of  conditional  execution  instruction.  ·  When  the  input  to  Conditional  execution  instruction  is  TRUE(ON),  instructions  between Conditional execution instruction and End of conditional execution instruction  are executed.  ·  Conditional execution instruction and End of conditional execution instruction must be  used as pair.  ·  The Conditional execution instruction and end of conditional execution instruction may  be nested.    Input  Action  Output  FALSE(OFF)  Jump performed  —  TRUE(ON)  Jump not performed  —    ●  Program example        SIGNAL1  Circuit A  Circuit B      ·  When SIGNAL1 is TRUE(ON), Circuit A and Circuit B instructions are executed.  ·  When  SIGNAL1  is  FALSE(OFF),  Circuit  A  is  not  executed  and  instructions  are  executed from Circuit B.  Chapter 2    LD/FBD Instructions  6F8C1226  76    Master Control Set/Reset   Execution Control  Master Control Set/Reset    LD/FBD  language notation    Condition input MCS    Circuit P      MCR    EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When input to MCS is FALSE(OFF), the power rail input between MCS and MCR is  reset to FALSE(OFF).  ·  When input to MCS is TRUE(ON), normal operation is performed.    ·  MCS  and  MCR  must  be  used  as  pair.  MCS  must  always  come  before  MCR.  MCS— MCR combination cannot be nested.      Input  Action  Output  FALSE(OFF)  Power rail input FALSE(OFF)  —  TRUE(ON)  Normal operation  —    ●  Program example      Circuit A1        Circui t  A2    SIGNAL1  MCS  MCR  Circuit B  MOVE_INT SAMPLE1 ST  1234  LD  MOVE_INT EN      ENO 5678  LD    SIGNAL2   SIGNAL3 SAMPLE2 SET      ·  When SIGNAL1 is FALSE(OFF):  Circuit A1, Circuit B  : Normal operation  Circuit A2  : Operates as SIGNAL2 input=FALSE(OFF) with      SIGNAL3=FALSE(OFF) and SAMPLE2=previous value.    ·  When SIGNAL1 is TRUE(ON), Circuit A1, Circuit A2 and Circuit B operate normally.      2.3    Counters  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  77      2.3  Counters    No.  Instruction  Remarks  1  Up Counter  CTU    2  Down Counter  CTD    3  Up Down Counter  CTUD        Chapter 2    LD/FBD Instructions  6F8C1226  78    Up Counter    Counters  Up Counter    LD/FBD language  notation      Instance name CTU  Count  up  command Reset  command Preset  value Count up status  Current value  CU R  PV Q CV EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( CU, R, PV );  [Variable name]: = [Instance name]. Q;  [Variable name]: = [Instance name]. CV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  CU  BOOL  ○   Count up command  R  BOOL  ○   Reset command  Input  PV  INT  ○   Preset value  Q  BOOL  —  Count up status  Output  CV  INT  —  Current value    ●  Instance structure    Name  Type    Description  Remarks  Q  BOOL  Count up status  CV  INT  Current value  Can be accessed from the user program.   ●  Function  ·  When the Reset command R is TRUE(ON), the current value CV is initialized to “0”.    However, count up at the rising edge of the count up command is not performed while  R=TRUE(ON).  ·  When the Reset command R is FALSE(OFF), count up is performed at the rising edge  of the count up input.  ·  When  the  current  value  CV  reaches  a  preset  value  PV,  count  up  status  Q  is  set  to  TRUE(ON).    Input  Output  CU  R  Action  Q  CV    TRUE(ON)  Not executed  0  FALSE(OFF)  →TRUE(ON)  CV=CV+1 until PV is reached. Otherwise  FALSE(OFF)  —  When CV<PV    FALSE(OFF)  When CV=PV    TRUE(ON)  Current  CV  2.3    Counters  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  79    ●  Program example  [LD/FBD language notation]      Up_Ctr  CTU  SAMPLE1  LD    SIGNAL1    SIGNAL2    SIGNAL3 SAMPLE2 ST SIGNAL1 SAMPLE2 SIGNAL2 SIGNAL3 SAMPLE1 CU  R  PV Q  CV      [ST language notation]  Up_Ctr( SIGNAL1, SIGNAL2, SAMPLE1);  SIGNAL3 := Up_Ctr.Q;  SAMPLE2 := Up_Ctr.CV;    ·  While SIGNAL2 is TRUE(ON), SAMPLE2 becomes “0” because current value CV is  initialized.  ·  When SIGNAL2 is FALSE(OFF), count up is performed when SIGNAL1 changes from  FALSE(OFF) to TRUE(ON).  ·  When the preset value of SAMPLE1 is equal to the current value, SIGNAL3 becomes  TRUE(ON) because count up status Q becomes TRUE(ON).    ○ Remark  ·  Positive transition—sensing contact or rising edge detector need not be programmed prior to  number up input CU because number up input CU detects the rising edge with Up counter  instruction.      ●  Error information  ·  If preset value PV is less than “0”, Up Counter instruction is executed with “0” as the  limit.  Chapter 2    LD/FBD Instructions  6F8C1226  80    Down Counter    Counters  Down Counter    LD/FBD language  notation      Instance name CTD  Count  down  command Load  command Preset  value Count down status  Current value  CD LD PV Q CV EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( CD, LD, PV );  [Variable name] : =[Instance name]. Q;  [Variable name : =[Instance name]. CV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  CD  BOOL  ○   Count down command  LD  BOOL  ○   Reset command  Input  PV  INT  ○   Preset value  Q  BOOL  —  Count down status  Output  CV  INT  —  Current value    ●  Instance structure    Name  Type  Description  Remarks  Q  BOOL  Count down status  CV  INT  Current value  Can be accessed from the user program.   ●  Function  ·  When  the  Load  command  LD  is  TRUE(ON),  the  current  value  CV  is  initialized  with  preset  value PV.    However, while LD = TRUE(ON), count  down  is not performed  at  the rising edge of the Count Down command.  ·  When the Load command LD is FALSE(OFF), count down is performed at the rising  edge of the count down input.  ·  When the current value CV reaches “0”, the count down status Q is set to TRUE(ON).    Input  Output  CD  LD  Action  Q  CV    TRUE(ON)  Not executed  PV  FALSE(OFF)  →TRUE(ON)  CV=CV-1 until 0 is reached  Otherwise  FALSE(OFF)  —  When CV>0    FALSE(OFF)  When CV=0    TRUE(ON)  Current  CV  2.3    Counters  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  81    ●  Program example  [LD/FBD language notation]      Dn_Ctr  CTD  SAMPLE1  LD    SIGNAL1    SIGNAL2    SIGNAL3  SAMPLE2  ST  SIGNAL1 SAMPLE2 SIGNAL2 SIGNAL3 SAMPLE1 CD  LD  PV  Q CV     [ST language notation]  Dn_Ctr (SIGNAL1, SIGNAL2, SAMPLE1);  SIGNAL3 := Dn_Ctr.Q;  SAMPLE2 := Dn_Ctr.CV;    ·  While SIGNAL2 is TRUE(ON), SAMPLE2 becomes preset value PV because current  value CV is initialized.  ·  When  SIGNAL2  is  FALSE(OFF),  count  down  is  performed  when  SIGNAL1  changes  from FALSE(OFF)→TRUE(ON). The current value is stored in SAMPLE2.  ·  When  SAMPLE2  which  is  the  current  value  becomes  “0”,  SIGNAL3  becomes  TRUE(ON) because the count down status Q becomes TRUE(ON).    ○ Remark  ·  Positive transition—sensing contact or rising edge detector need not be programmed prior to  number down input CU because count down input CD detects the rising edge with Down  Counter instruction.    ●  Error information  If preset value PV is less than “0”, Down Counter instruction is executed with “0” as the  limit.  Chapter 2    LD/FBD Instructions  6F8C1226  82    Up Down Counter    Counters  Up Down Counter    LD/FBD language  notation  Instance name CTUD  Reset  command Preset  value CU CD R  LD PV QU QD CV Count  down  command Load  command Count  up  command Count down status  Count up status  Current value  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( CU, CD, R, LD, PV );  [Variable name] : = [Instance name]. QU;  [Variable name] : = [Instance name]. QD;  [Variable name] : = [Instance name]. CV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  CU  BOOL  ○   Count d command  CD  BOOL  ○   Count down command  R  BOOL  ○   Reset command  LD  BOOL  ○   Load command  Input  PV  INT  ○   Preset value  QU  BOOL  —  Count up status  QD  BOOL  —  Count down status  Output  CV  INT  —  Current value    ●  Instance structure    Name  Type  Description  Remarks  QU  BOOL  Count up status  QD  BOOL  Count down status  CV  INT  Current value  Can be accessed from the user program.   ●  Function  ·  When the Reset command R is TRUE(ON), current value CV is initialized to “0”.  ·  When  the  Load  command  LD  is  TRUE(ON)  and  the  Reset  command  R  is  FALSE(OFF), the current value CV is initialized with preset value PV.  ·  While  R=  TRUE(ON)  or  LD=  TRUE(ON),  count  at  the  rising  edge  of  the  count  up  command and count down command are not performed.  2.3    Counters  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  83    ·  When  the Reset command  R  and Load command  LD  are  FALSE(OFF), count up  is  performed at the rising edge of the count up input.  ·  When the Reset command R and Load command LD are FALSE(OFF), count down is  performed at the rising edge of the count down input.  ·  When the current value CV reaches a preset value PV, count up status QU is set to  TRUE(ON).  ·  When the current value CV reaches “0”, count down status QD is set to TRUE(ON).  ·  When  both  the  count  up  input  CU  and  count  down  input  CD  are  TRUE(ON),  count  operation is not performed.    Input  Output  CU  CD  R  LD  Action  QU  QD  CV  TRUE(ON)    0      FALSE(OFF)  TRUE(ON) Not executed  PV  TRUE(ON)  TRUE(ON)  —  When CV<PV   FALSE(OFF) When CV>0    FALSE(OFF)  FALSE(OFF)  →TRUE(ON)  FALSE(OFF) CV=CV+1 until  PV is reached  FALSE(OFF)  FALSE(OFF) →TRUE(ON) FALSE(OFF)  FALSE(OFF) CV=CV -1 until  0 is reached  When  CV=PV    TRUE(ON) When CV=0    TRUE(ON)  Current  CV    ●  Program example  [LD/FBD language notation]      Ud_Ctr  CTUD  SAMPLE1  LD    SIGNAL1    SIGNAL2    SIGNAL5  SAMPLE2  ST  SIGNAL1 SAMPLE2 SIGNAL2 SIGNAL5 SAMPLE1 CU  CD    R    SIGNAL6  LD  PV  QU  QD  CV  SIGNAL3    SIGNAL4  SIGNAL3 SIGNAL4 SIGNAL6     [ST language notation]  Ud_Ctr( SIGNAL1, SIGNAL2, SIGNAL3, SIGNAL4, SAMPLE1);  SIGNAL5 := Ud_Ctr.QU;  SIGNAL6 := Ud_Ctr.QD;  SAMPLE2 := Ud_Ctr.CV;    ·  While SIGNAL3 is TRUE(ON), SAMPLE2 becomes “0” because current value CV is  initialized.  Chapter 2    LD/FBD Instructions  6F8C1226  84    ·  While  SIGNAL3  is  FALSE(OFF)  and  SIGNAL4  is  TRUE(ON),  SAMPLE2  becomes  preset value PV because current value CV is initialized.  ·  Count up is performed when SIGNAL1 changes from FALSE(OFF) to TRUE(ON) and  count down is performed when SIGNAL2 changes from FALSE(OFF) to TRUE(ON).    The  current  value  is  stored  in  SAMPLE2.    However,  count  is  not  performed  when  SIGNAL1 and SIGNAL2 are both TRUE(ON).  ·  When  SAMPLE2  which  is  the  current  value  reaches  the  preset  value  PV,  SIGNAL5  becomes TRUE(ON).  ·  When  SAMPLE2  which  is  the  current  value  reaches  “0”,  SIGNAL6  becomes  TRUE(ON).    ○ Remark  ·  Positive transition-sensing contact or rising edge detector need not be programmed prior to  count up input CU or count down input CD because count up input CU and number down input  CD detect the rising edge with Up Down Counter instruction.    ●  Error information  ·  If preset value PV is less than “0”, Up Down Counter instruction is executed with “0” as  the limit.    2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  85      2.4  Timers    No.  Instruction  Remarks  1  On-Delay Timer    (0.1ms)  TON_100us    2  On-Delay Timer (1ms)  TON    3  On-Delay Timer (10ms)  TON_10ms    4  On-Delay Timer (100ms)  TON_100ms    5  On-Delay Timer (0.1 minute)  TONM_P  PCS compatible  instruction    6  Off-Delay Timer    (0.1ms)  TOF_100us    7  Off-Delay Timer (1ms)  TOF    8  Off-Delay Timer (10ms)  TOF_10ms    9  Off-Delay Timer (100ms)  TOF_100ms    10  Off-Delay Timer (0.1 minute)  TOFM_P  PCS compatible  instruction  11  Pulse Timer (0.1ms)  TP_100us    12  Pulse Timer (1ms)  TP    13  Pulse Timer (10ms)  TP_10ms    14  Pulse Timer (100ms)  TP_100ms    15  Single Shot (100ms)  SS_P  PCS compatible  instruction    16  Single Shot (0.1 minute)  SSM_P  PCS compatible  instruction    17  Real Time Clock  RTC  V dedicated instruction 18  Real Time Clock  RTC_N  nv dedicated instruction 19  On/Off-Delay Timer (REAL)  DEL_L  TOSDIC compatible  instruction    Chapter 2    LD/FBD Instructions  6F8C1226  86    ● Important  ・ For Integrated Controller V series, change the preset time in the timer stop state (*1).  ・ If it is changed in the time up state (Preset time (PT)≤ Duration (CT)), the output may change in  a controller in which "PT change support in time up state" has not been done.    “PT change support in time up state”  Timer setting  value  Not supported  Supported  PT >ET  Restarts clock until ET≤PT; Output (Q)  changes depending on the relation  between PT and ET.  PT<ET  Limits ET to PT.    Holds both Output (Q) and Duration  (ET).  New setting value (PT) becomes  effective upon restart after the timer  stops.    *1 : Timer stop state    Timer  instruction  Timer activation  command IN  TON***  FALSE(OFF)  TOF***  TRUE(ON)  TP***  FALSE(OFF)  SS***  FALSE(OFF)    “OT change support in time up state” version in the [Integrated Controller V series]    Version  Controller  Not  supported  Supported  S2PU22/32/72  Up to V02.03 V02.04 -  S2PU22A/32A/72A/72D N/A  V02.50 -,V03.70 -  S2  S2PU82  N/A  V02.00 -,V03.00 -  S3PU**  Up to V02.05 V02.06 -,V02.10 -  S3  S3PU**A  N/A  V02.50 -,V03.70 -  L1  L1PU1*H,LC5**  Up to V02.49 V02.50 -  L2PU1*  Up to V03.00 V03.10 -  L2  L2PU22  Up to V03.0D V03.10 -  L3PU11  Up to V03.00 V03.10 -  L3  L3PU21  Up to V03.0K V03.10 -  2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  87    On—Delay Timer (0.1ms/1ms/10ms/100ms/0.1min)    Timers  On—Delay Timer    (0.1ms/1ms/10ms/100ms/0.1min)  *1  LD/FBD language  notation      TON  Instance name Timer activation command Preset  time Time up status  Duration  PT IN Q ET     TON_□□  Instance name Timer  activation  command Preset  time Time up status  Duration  PT IN Q ET     TONM_P  Instance name Timer  activation  command Preset  time Tim up status  Duration  PT IN Q ET *1) PCS compatible instruction EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN, PT );  [Variable name] : = [Instance name]. Q;  [Variable name] : = [Instance name]. ET;    ●  Arguments  ・ TON (1ms unit)    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Timer activation command  Input  PT  TIME  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  TIME  —  Duration    ・ TON_□□/TONM_P[□□ indicates 100us (0.1ms unit), 10ms (10ms unit) or 100ms  (100ms unit)].      Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Timer activation command  Input  PT  DINT  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  DINT  —  Duration    Chapter 2    LD/FBD Instructions  6F8C1226  88    ●  Instance structure  ·  TON (1ms unit)    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  TIME  Duration  Can be accessed from the user program.   ·  TON_□□/TONM_P[□□  indicates  100us  (0.1ms  unit),  10ms  (10ms  unit)  or  100ms  (100ms unit)]    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  DINT  Duration  Can be accessed from the user program.   ●  Function  ·  When timer activation command IN is TRUE(ON), time up status Q set to TRUE(ON).  ·  Duration ET is added.    ·  When timer activation command IN is FALSE(OFF)m duration ET is cleared to “0”.    ·  The setting range of preset time PT is as follows:  TON_100us (0.1ms timer)  : 0 to 21474836470.1ms  [59h39m8s364.7ms    (2.48551348day)] TON (1ms timer)  : 0 to 2147483647ms  [596h31m23s647ms      (24.8551348day)] TON_10ms (10ms timer)  : 0 to 214748364710ms  [5965h13m56s470ms      (248.551348day)] TON_100ms (100ms timer)  : 0 to 2147483647100ms  [59652h19m24s700ms      (2485.51348day)] TONM_P (0.1min timer)  : 0 to 21474836470.1 min [3579139h24m42s    (149130.8088day)] ·  The data type of PT/ET is TIME for TON, and DINT for TON_100us/ TON_10ms/    TON_100ms/ TONM_P.      Output  Input  IN  Action  Q  ET  FALSE(OFF)  Not executed  FALSE(OFF)  0  Duration<Preset time  FALSE(OFF)  TRUE(ON)    Executed Duration≥Preset time  TRUE(ON)  Current ET    2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  89    ●  Program example  [LD/FBD language notation]      Ondelay_1  TON    IN        Q      PT      ET  SAMPLE1  LD    SIGNAL1    SIGNAL2 SAMPLE2 ST SIGNAL1 SAMPLE2 SIGNAL2 SAMPLE1     [ST language notation]  Ondelay_1( SIGNAL1, SAMPLE1);  SIGNAL2 := Ondelay_1.Q;  SAMPLE2 := Ondelay_1.ET;    ·  After  SIGNAL1  becomes  TRUE(ON),  SIGNAL2,  which  is  time  up  status,  is  set  to  TRUE(ON) after the preset time specified with SAMPLE1 elapses.    Duration is stored  to SAMPLE2  ·  The  content  of  duration  after  duration  ET  reaches  the  preset  time  specified  with  SAMPLE1 is held as long as SIGNAL1 is TRUE(ON).  ·  When SIGNAL1 is FALSE(OFF), duration ET is cleared, SAMPLE2 becomes “0” , and  SIGNAL2, which is time up status, is set to FALSE(OFF).    ●  Error information  ·  If preset time PT is less than “0”, Off-Delay timer instruction takes an absolute value for  operation.  ·  For  the  Integrated  Controller V series  L controller,  the  internal  timer  minimum  unit  is  100ms,  so  update  is  made  in  units  of  100ms  even  if  TON  instruction  of  1ms  unit  is  used.    Chapter 2    LD/FBD Instructions  6F8C1226  90    Off-Delay Timer (0.1ms/1ms/10ms/100ms/0.1min)    Timers  Off-Delay Timer(0.1ms /1ms/10ms/100ms/0.1min)  *1  LD/FBD language  notation      TOF  Instance name Timer activation command Preset  time Time up status  Duration  PT IN Q ET     TOF_□□  Instance name Timer activation  command Preset  time Time up status  Duration  PT IN Q ET     TOFM_P  Instance name Preset  time Time up status  Duration  PT IN Q ET (1*) CS-compatible instruction  Timer activation  command EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN, PT );  [Variable name] : = [Instance name]. Q;  [Variable name] : = [Instance name]. ET;    ●  Arguments  ・ TOF (1ms unit)    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Timer activation command  Input  PT  TIME  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  TIME  —  Duration    ・ TOF_□□/TOFM_P[□□ indicates 100us(0.1ms unit), 10ms (10ms unit) or 100ms  (100ms unit)]    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Timer activation command  Input  PT  DINT  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  DINT  —  Duration    2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  91    ●  Instance structure  ·  TOF (1ms unit)    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  TIME  Duration  Can be accessed from the user program.   ·  TOF_□□/TOFM_P[□□  indicates  100us  (0.1ms  unit),  10ms  (10ms  unit)  or  100ms  (100ms unit)]    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  DINT  Duration  Can be accessed from the user program.   ●  Function  ·  After timer activation command IN becomes FALSE(OFF), time up status Q is set to  FALSE(OFF) after preset time elapses.  ·  Duration ET is added.    ·  The setting range of preset time PT is as follows:  TOF_100us (0.1ms timer)  : 0 to 21474836470.1ms  [59h39m8s364.7ms    (2.48551348day)] TOF (1ms timer)  : 0 to 2147483647ms  [596h31m23s647ms    (24.8551348day)] TOF_10ms (10ms timer)  : 0 to 214748364710ms  [5965h13m56s470ms    (248.551348day)] TOF_100ms (100ms timer)  : 0 to 2147483647100ms  [59652h19m24s700ms    (2485.51348day)] TOFM_P (0.1 min timer)  : 0 to 21474836470.1 min [3579139h24m42s    (149130.8088day)] ·  The data type of PT/ET is TIME for TOF, and DINT for TOF_100us/TOF_10ms/TOF_  100ms/TOFM_P.      Output  Input  IN  Action  Q  ET  Duration<Preset time  TRUE(ON)  FALSE(OFF)  Executed  DurationPreset time  FALSE(OFF)  Current ET  TRUE(ON)  Not executed  TRUE(ON)  0  Chapter 2    LD/FBD Instructions  6F8C1226  92    ●  Program example  [LD/FBD language notation]      Offdelay_1  TOF    IN        Q      PT      ET  SAMPLE1  LD    SIGNAL1    SIGNAL2 SAMPLE2 ST SIGNAL1 SAMPLE2 SIGNAL2 SAMPLE1     [ST language notation]  Offdelay_1( SIGNAL1, SAMPLE1);  SIGNAL2 := Offdelay_1.Q;  SAMPLE2 := Offdelay_1.ET;    ·  After  SIGNAL1  becomes  FALSE(OFF),  SIGNAL2  is  set  to  FALSE(OFF)  after  the  preset time specified with SAMPLE1 elapses. Duration is stored to SAMPLE2.  ·  The  content  of  duration  ET  after  duration  reaches  the  preset  time  specified  with  SAMPLE1 is held as long as SIGNAL1 is FALSE(OFF).  ·  When  SIGNAL1  is  TRUE(ON),  duration  ET  is  cleared,  SAMPLE2  becomes  “0”,  and  SIGNAL2, which is time up status, is set to TRUE(ON).    ●  Error information  ·  If preset time PT is less than “0”, Pulse Timer instruction takes an absolute value for  operation.  ·  For  the  Integrated  Controller V series  L controller,  the  internal  timer  minimum  unit  is  100ms,  so  update  is  made  in  units  of  100ms  even  if  TOF  instruction  of  1ms  unit  is  used.      2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  93    Pulse Timer (0.1ms/1ms/10ms/100ms)   Timers  Pulse Timer (0.1ms/1ms/10ms/100ms)    LD/FBD language  notation      TP  Instance name Timer activation command  Preset  time Time up status  Duration    PT IN Q ET       TP_□□  Instance name Timer activation command  Preset  time Time up status  Duration    PT IN Q ET EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN, PT );  [Variable name]:=[Instance name]. Q;  [Variable name]:=[Instance name]. ET;    ●  Arguments  ·  TP (1ms unit)    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○  Timer activation command  Input  PT  TIME  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  TIME  —  Duration    ·  TP_□□[□□ indicates 100us(0.1ms unit), 10ms (10ms unit) or 100ms (100ms unit)]    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Timer activation command  Input  PT  DINT  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  DINT  —  Duration      Chapter 2    LD/FBD Instructions  6F8C1226  94    ●  Instance structure  ·   TP (1ms unit)    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  TIME  Duration  Can be accessed from the user program.   ·  TP_□□ [□□ indicates 100us(0.1ms unit), 10ms (10ms unit) or 100ms (100ms unit)]    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  DINT  Duration  Can be accessed from the user program.   ●  Function  ·  After  timer  activation  command  IN  becomes  TRUE(ON),  time  up  status  Q  is  set  to  TRUE(ON) until the preset time elapses.  ·  Duration ET is added.    ·  When timer activation command becomes FALSE(OFF) after the preset time elapses,  duration ET is cleared.    ·  The setting range of preset time PT is as follows:  TP_100us (0.1mstimer)  :0 to 21474836470.1ms  [59h39m8s364.7ms    (2.48551348day)] TP (1mstimer)  :0 to 2147483647ms  [596h31m23s647ms    (24.8551348day)] TP_10ms (10mstimer)  :0 to 214748364710ms  [5965h13m56s470ms    (248.551348day)] TP_100ms (100mstimer)  :0 to 2147483647100ms  [59652h19m24s700ms    (2485.51348day)] ·  The data type of PT/ET is TIME for TP and DINT for TP_100us/TP_10ms/TP_100ms.      Output  Input  IN  Action  Q  ET  FALSE(OFF)  Not executed  FALSE(OFF)  0  Duration<Preset time  TRUE(ON)  TRUE(ON)  Executed Duration≥Preset time  FALSE(OFF)  Current ET  2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  95    ●  Program example  [LD/FBD language notation]      Plstimer_1  TP    IN        Q      PT      ET  SAMPLE1  LD    SIGNAL1    SIGNAL2 SAMPLE2 ST SIGNAL1 SAMPLE2 SIGNAL2 SAMPLE1     [ST language notation]  Plstimer_1( SIGNAL1, SAMPLE1);  SIGNAL2 := Plstimer_1.Q;  SAMPLE2 := Plstimer_1.ET;    ·  After  SIGNAL1  becomes  TRUE(ON),  SIGNAL2  is  set  to  TRUE(ON)  until  the  preset  time  specified  with  SAMPLE1  elapses.    After  duration  reaches  the  preset  time,  SIGNAL2 becomes FALSE(OFF).    Duration is stored to SAMPLE2.  ·  Duration ET is still updated even if SIGNAL1 becomes FALSE(OFF) before duration  ET reaches the preset time specified with SAMPLE1.  ·  The  content  of  duration  after  duration  ET  reaches  the  preset  time  specified  with  SAMPLE1  is  held  as  long  as  SIGNAL1  is  TRUE(ON).    When  SIGNAL1  becomes  FALSE(OFF), duration is cleared to “0” and “0” is stored to SAMPLE2 as the result.    ●  Error information  ·  If preset time PT is less than “0”, Pulse Timer instruction takes an absolute value for  operation.  ·  For  the  Integrated  Controller V series  L controller,  the  internal  timer  minimum  unit  is  100ms, so update is made in units of 100ms even if TP instruction of 1ms unit is used.  Chapter 2    LD/FBD Instructions  6F8C1226  96        Timers  Single Shot (100ms/0.1min)  PCS  compatible  instruction  LD/FBD language  notation  SS_P  Instance name Timer  activation  command Preset  time Time up status  Duration  PT IN Q ET   SSM_P  Instance name Timer  activation  command Preset  time Time up status  Duration  PT IN Q ET   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN, PT );  [Variable name] : = [Instance name]. Q;  [Variable name] : = [Instance name]. ET;    ●  Arguments    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Timer activation command  Input  PT  DINT  ○   Preset time  Q  BOOL  —  Time up status  Output  ET  DINT  —  Duration    ●  Instance structure    Name  Type  Description  Remarks  Q  BOOL  Time up status  ET  DINT  Duration  Can be accessed from the user program.   ●  Function  ·  After  Timer  activation  command  IN  becomes  TRUE(ON),  time  up  status  Q  is  set  to  TRUE(ON) until preset time elapses.  ·  Duration ET is added.    ·  If timer activation command becomes FALSE(OFF) before the timer expires, the time  up status also becomes FALSE(OFF).  ·  After preset time has elapsed, duration ET is cleared when Timer activation command  becomes FALSE(OFF).  Single Shot (100ms/0.1min) 2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  97    ·  The setting range of preset time PT is as follows:  SS_P (100ms timer)  :0 to 2147483647100ms  [59652h19m24s700ms    (2485.51348day)] SSM_P (0.1min timer)  :0 to 21474836470.1 min  [3579139h24m42s    (149130.8088day)]   Output  Input  IN  Action  Q  ET  FALSE(OFF)  Not executed  FALSE(OFF)  0  Duration<Preset time  TRUE(ON)  TRUE(ON)  Executed Duration≥Preset time  FALSE(OFF)  Current ET    ●  Program example  [LD/FBD language notation]      SS_1  SS_P    IN        Q      PT      ET  SAMPLE1  LD    SIGNAL1    SIGNAL2 SAMPLE2 ST SIGNAL1 SAMPLE2 SIGNAL2 SAMPLE1     [ST language notation]  SS_1( SIGNAL1, SAMPLE1);  SIGNAL2 := SS_1.Q;  SAMPLE2 := SS_1.ET;    ·  After  SIGNAL1  becomes  TRUE(ON),  SIGNAL2  is  TRUE(ON)  until  preset  time  specified with SAMPLE1 elapses. After the duration reaches a preset time, SIGNAL2  becomes FALSE(OFF).    Duration is stored in SAMPLE2.  ·  When  SIGNAL1  becomes  FALSE(OFF)  before  duration  ET  reaches  the  preset  time  specified  with  SAMPLE1,  SAMPLE2  which  is  the  duration  becomes  “0”.    SIGNAL2  which is the time up status also becomes FALSE(OFF).  ·  After duration ET has reached the preset time specified with SAMPLE1, its content is  retained  while  SIGNAL1  is  TRUE(ON).    When  SIGNAL1  becomes  FALSE(OFF),  duration is cleared to “0” and “0” is stored in SAMPLE2.    ●  Error information  ·  When  preset  time  PT  is  less  than  “0”,  the  Pulse  timer  instruction  operates  on  the  absolute value. When preset time PT=0, the time up status becomes TRUE(ON) for  just one scan.  Chapter 2    LD/FBD Instructions  6F8C1226  98    Real Time Clock    Timers  Real Time Clock  V dedicated  instruction  LD/FBD language  notation  Instance name RTC    Date and time of day  update command  Preset date and time of day Output  Current date and  time of day  PDT IN Q CDT   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN, PDT, CDT );  [Variable name] : = [Instance name]. Q;    ●  Arguments    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Date and time of day update  command  Input  PDT  DT  —  Preset date and time of day  Q  BOOL  —  Output  Output  CDT  DT  —  Current date and time of day    ●  Instance structure    Name  Type  Description  Remarks  Q  BOOL  Output  Can be accessed from the user program.    ●  Function  ·  When  the  Date  and  time  of  day  update  command  IN  changes  from  FALSE(OFF)  to  TRUE(ON),  the  calendar  is  updated  with  the  specified  preset  date  and  time  of  day  PDT.  (The  millisecond  part  of  PDT  is  ignored,  and  the  calendar  is  updated  with  the  PDT value).    ·  When Date and time of day update command IN is TRUE(ON), the current calendar  content is output to current date and time of day CDT.  ·  The state of Date and time of day update command IN is output to Output Q.      Output  Input  IN  Action  Q  CDT  FALSE(OFF)  Not executed  FALSE(OFF)  Not updated Previous input = FALSE(OFF) :  Update calendar (PDT→CDT)  TRUE(ON)  Executed Previous input=TRUE(ON) :  Current date and time of day→CDT TRUE(ON)  CDT  2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  99    ●  Program example  [LD/FBD language notation]      RTC_1  RTC    IN          Q     PDT CDT SAMPLE1  LD   SIGNAL1    SIGNAL2 SAMPLE2 ST     [ST language notation]  RTC_1( SIGNAL1, SAMPLE1, SAMPLE2);  SIGNAL2 := RTC_1.Q;    ·  When  SIGNAL1  changes  from  FALSE(OFF)  to  TRUE(ON),  the  calendar  is  updated  with the preset date and time of day specified with SAMPLE1.  ·  While SIGNAL1 is TRUE(ON), the current time is output to SAMPLE2.  ·  SIGNAL2 becomes TRUE(ON) when SIGNAL1 is TRUE(ON) and SIGNAL2 becomes  FALSE(OFF) when SIGNAL1 is FALSE(OFF).    ●  Error information  ·  The calendar is not updated when the content of preset date and time of day PDT is  abnormal.  Chapter 2    LD/FBD Instructions  6F8C1226  100    Real Time Clock    Timers  Real Time Clock  nv dedicated  instruction  LD/FBD language  notation    Instance name RTC_N    Date  and  time  of  day   update  command Preset  date/time Output complete  Current date/time  PDT IN Q CDT   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN, PDT, CDT );  [Variable name] : = @[Instance name]. Q;    ●  Argument    Arg.  Operand  Type  Const.  Description  IN  BOOL  ○   Date and time of day update  command  Input  PDT  DT  —  Preset date/time  Q  BOOL  —  Output complete  Output  CDT  DT  —  Current date/time    ●  Instance structure    Name  Type  Description  Remarks  Q  BOOL  Output  complete  Can be accessed from the user program.    ●  Function  · When the date and time of day command IN changes from FALSE(OFF) to TRUE(ON),  the calendar is updated with the specified preset date and time of day PDT.  ·  When  the  date  and  time  of  day  command  IN  is  TRUE(ON),  the  current  calendar  content is output to the current date and time of day CDT.  ·  When date and time of day update is complete, output Q is set to TRUE(ON).    Output  Input  IN  Action  Q  CDT  FALSE(OFF)  Not executed  FALSE(OFF)  revious input=FALSE(OFF) :  Calendar is updated  FALSE(OFF)  Not updated  TRUE(ON)  Executed Previous input=TRUE(ON) :  Current date/timeCDT TRUE(ON)  Current CDT  2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  101    ●  Program example  [LD/FBD language notation]      RTC_1  RTC_N   IN          Q     PDT CDT SAMPLE1  LD   SIGNAL1    SIGNAL2 SAMPLE2 ST     [ST language notation]  RTC_1( SIGNAL1, SAMPLE1, SAMPLE2);  SIGNAL2 :=@RTC_1.Q;    ·  When  SIGNAL1  changes  from  FALSE(OFF)  to  TRUE(ON),  the  calendar  is  updated  with the preset date and time of day specified with SAMPLE1.    After the calendar is  updated, completion output SIGNAL2 becomes TRUE(ON).  ·  Current day/time is output to SAMPLE2, after SIGNAL1 becomes TRUE(ON) and the  calendar is updated.    ●  Error information  ·  The calendar is not updated when the content of preset date and time of day PDT is  abnormal.    Completion  output  outputs  the  state  of  Date  and  time  of  day  update  command IN.  Chapter 2    LD/FBD Instructions  6F8C1226  102    On/Off-Delay Timer    timers  On/Off-Delay Timer  TOSDIC compatible  instruction  LD/FBD language  notation    Instance name DEL_L    Input  flag On-delay  time Result output  On-delay elapsed time H1  U1 Y ON Off-delay  time H2  OFF Off-delay elapsed time   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( U1, H1, H2 );  [Variable name] : = [Instance name]. Y;  [Variable name] : = [Instance name]. ON;  [Variable name] : = [Instance name]. OFF;    ●  Arguments    Arg.  Operand  Type  Const.  Description  U1  BOOL  ○   Input flag  H1  REAL  ○   On-delay time(≥0)[sec]  Input  H2  REAL  ○   Off-delay time(≥0)[sec]  Y  BOOL  —  Result output  ON  REAL  —  On-delay elapsed time[sec]  Output  OFF  REAL  —  Off-delay elapsed time[sec]    ●  Instance structure    Name  Type  Description  Remarks  Y  BOOL  Result output  ON  REAL  On-delay elapsed time[sec] OFF  REAL  Off-delay elapsed time[sec] Can be accessed from the user program.   ●  Function  ·  After  input  flag  U1  becomes  TRUE(ON),  result  output  is  set  to  TRUE(ON)  after  on-delay time H1.    After input flag U1 becomes FALSE(OFF), result output is set to  FALSE(OFF) after off-delay time H2.  ·  After  input  flag  U1  becomes  TRUE(ON),  result  output  Y  is  set  to  TRUE(ON)  after  on-delay time H1.  ·  After input flag U1 becomes FALSE(OFF), result output Y is set to FALSE(OFF) after  off-delay time H2.  2.4    Timers  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  103    ·  When  the  input  becomes  OFF  during  on-delay,  off-delay  time  measurement  starts  while continuing on-delay.  ·  When  the  input  becomes  ON  during  off-delay,  off-delay  is  stopped,  the  output  is  inversed, and then on-delay is started.  ·  When  the  input  becomes  OFF  during  on-delay  and  becomes  ON  again  during  off-delay, off-delay is stopped and on-delay is started again.  ·  If  off-delay  is  shorter  than  on-delay  (off-delay  is  stopped  during  on-delay  operation),  there is no output.      →Time Input U1 OutputY :On-delay time  :Off-delay time  Input becomes OFF  during on-delay  Normal  operation  Input becomes ON  during off-delay  Input  is  changed  during  on/off-delay  Off-delay  is  stopped  during on-delay  On/Off delay time is  measured at the same time  On-delay is  stopped output  is inversed  On-delay is started  again, off-delay is  stopped      ●  Program example  [LD/FBD language notation]        DEL_1  DEL_L    U1        Y      H1      ON     H2    OFF DP11LD    S1    S2  DP12LD  ON_TIME ST OFF_TIME ST     [ST language notation]  DEL_1( S1, DP11, DP12);  S2 := DEL_1.Y;  ON_TIME := DEL_1.ON;  OFF_TIME := DEL_1.OFF;    ·  S2,  where  ON  change  of  S1  is  delayed  for  DP11  [sec]  and  OFF  change  of  S1  is  delayed for DP12 [sec], is output.    ●  Error information  ·  If  on/off-delay  time  is  a  negative  number,  On/Off-Delay  Timer  instruction  takes  an  absolute value for operation.  ·  When on/off—delay time =0, Input U1=Output Y.  ·  If on/off-delay time is nonnumeric, nonnumeric abnormal is set to TRUE(ON), and the  instruction itself is not processed.    Chapter 2    LD/FBD Instructions  6F8C1226  104      2.5  Flip-Flops    No.  Instruction  Remarks  1  Set Type Flip-Flop  SR    2  Reset Type Flip-Flop  RS    3  Semaphore  SEMA      2.5    Flip-Flops  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  105    Set Type Flip-Flop    Flip—Flops  Set Type Flip-Flop    LD/FBD language  notation  Instance name SR  Set  input Reset  input Output  R S1 Q1   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( S1, R );  [Variable name] : = [Instance name]. Q1;    ●  Arguments    Arg.  Operand  Type  Const.  Description  S1  BOOL  ○   Set input  Input  R  BOOL  ○   Reset input  Output  Q1  BOOL  —  Output    ●  Instance structure    Name  Type  Description  Remarks  Q1  BOOL  Output  Can be accessed from the user program.    ●  Function  ・ When  set  input  S1  is  TRUE(ON),  output  Q1  is  set  to  TRUE(ON)  regardless  of  the  input state of reset input R.  ・ When set input S1 is FALSE(OFF) and reset input R is TRUE(ON), output Q1 is reset  to FALSE(OFF).  ・ Output Q1 is unchanged when set input S1 and reset input R are both FALSE(OFF).    Input  Output  S1  R  Action  Q1  FALSE(OFF)  FALSE(OFF)  Not executed  Retain  previous value  FALSE(OFF)  TRUE(ON)  FALSE(OFF)  TRUE(ON)    Executed  TRUE(ON)  Chapter 2    LD/FBD Instructions  6F8C1226  106    ●  Program example  [LD/FBD language notation]        FF_1  SR    S1        Q1      R    SIGNAL1    SIGNAL2    SIGNAL3 SIGNAL1 SIGNAL2 SIGNAL3     [ST language notation]  FF_1 ( SIGNAL1, SIGNAL2);  SIGNAL3 := FF_1.Q1;    ・ When SIGNAL1 is TRUE(ON), SIGNAL3 becomes TRUE(ON).  ・ When  SIGNAL1  is  FALSE(OFF)  and  SIGNAL2  is  TRUE(ON),  SIGNAL3  becomes  FALSE(OFF).  ・ When SIGNAL1 and SIGNAL2 are both FALSE(OFF), SIGNAL3 retains the previous  value.  2.5    Flip-Flops  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  107    Reset Type Flip-Flop    Flip—Flop  Reset Type Flip-Flop    LD/FBD language  notation  Instance name RS  Set  input Reset  input Output  R1 S  Q1   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( S, R1 );  [Variable name] : = [Instance name] . Q1;    ●  Argument    Arg.  Operand  Type  Const.  Description  S  BOOL  ○   Set input  Input  R1  BOOL  ○   Reset input  Output  Q1  BOOL  —  Output    ●  Instance structure    Name  Type  Description  Remarks  Q1  BOOL  Output  Can be accessed from the user program.    ●  Function  ·  When reset input R1 is TRUE(ON), output Q1 is reset to FALSE(OFF) regardless of  the input state of set input S.  ·  When reset input R1 is FALSE(OFF) and set input S is TRUE(ON), output Q1 is set to  TRUE(ON).  ·  Output Q1 is unchanged when set input S and reset input R1 are both FALSE(OFF).    Input  Output  S  R1  Action  Q1  FALSE(OFF)  FALSE(OFF)  Not executed  Retains  previous value  *  TRUE(ON)  FALSE(OFF)  TRUE(ON)  FALSE(OFF)  Executed  TRUE(ON)    Chapter 2    LD/FBD Instructions  6F8C1226  108    ●  Program example  [LD/FBD language notation]        FF_1  RS    S            Q1      R1    SIGNAL1    SIGNAL2    SIGNAL3 SIGNAL1 SIGNAL2 SIGNAL3     [ST language notation]  FF_1( SIGNAL1, SIGNAL2);  SIGNAL3 := FF_1.Q1;    ·  When SIGNAL2 is TRUE(ON), SIGNAL3 is reset to FALSE(OFF).  ·  When  SIGNAL2  is  FALSE(OFF)  and  SIGNAL1  is  TRUE(ON),  SIGNAL3  becomes  TRUE(ON).  ·  When SIGNAL1 and SIGNAL2 are both FALSE(OFF), SIGNAL3 retains the previous  value.    2.5    Flip-Flops  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  109    Semaphore    Flip—Flop  Semaphore    LD/FBD language  notation    Instance name SEMA  Test and set  command  Release  command Semaphore status  output  CLAIM RELEASE BUSY   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( CLAIM, RELEASE );  [Variable name] := [Instance name]. BUSY;    ●  Argument    Arg.  Operand  Type  Const.  Description  CLAIM  BOOL  ○   Test and set command  Input  RELEASE  BOOL  ○   Release command  Output  BUSY  BOOL  —  Semaphore status output    ●  Instance structure      Name  Type  Description  Remarks  BUSY  BOOL  Semaphore status output Can be accessed from the user program. X  BOOL  Internal variable  Cannot be accessed from the user  program.      ●  Function  ·  Initially, resets internal variable X to FALSE(OFF).  ·  State of internal variable X is output to semaphore status output BUSY.  ·  After internal variable X is output to semaphore status output BUSY, internal variable X  is set to TRUE(ON) when test and set command CLAIM is TRUE(ON).  ·  When test and set command CLAIM is FALSE(OFF) and release command RELEASE  is  TRUE(ON)  after  internal  variable  X  is  output  to  semaphore  status  output  BUSY,  semaphore state output BUSY and internal variable X are reset to FALSE(OFF)    Input  Output  CLAIM  RELEASE  Action  BUSY  FALSE(OFF)  FALSE(OFF)  BUSY=Internal variable Xn—1  TRUE(ON)    BUSY=Internal variable Xn—1  Internal variable Xn=TRUE(ON)  Previous Xn—1 FALSE(OFF)  TRUE(ON)  Semaphore state output =  FALSE(OFF)  Internal variable Xn = FALSE(OFF)  FALSE(OFF)  Chapter 2    LD/FBD Instructions  6F8C1226  110    ●  Program example  [LD/FBD language notation]      SEMA_1  SEMA    CLAIM    BUSY      RELEASE    SIGNAL1    SIGNAL2  SIGNAL3 SIGNAL1 SIGNAL2 X  SEMA_1 Execution timing SIGNAL3     [ST language notation]  SEMA_1 ( SIGNAL1, SIGNAL2);  SIGNAL3 := SEMA_1.BUSY;    · The state of internal variable X after executing previous SEMA_1 is output to SIGNAL3.    Except when SIGNAL1= FALSE(OFF) and SIGNAL2 = TRUE(ON).  ·  When SIGNAL1 is TRUE(ON), internal variable X is set to TRUE(ON).  ·  When SIGNAL1 is FALSE(OFF) and SIGNAL2 is TRUE(ON), internal variable X and  SIGNAL3 become FALSE(OFF).      2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  111      2.6  Moving    No.  Instruction  Remarks  1  Normally Open Contact Gate    2  Normally Closed Contact Gate    3  Move Data  MOVE    4  Move Table Data  TMOV    5  Data Exchange  XCHG    6  Initialize Table Data  TINZ        Chapter 2    LD/FBD Instructions  6F8C1226  112    Normally Open Contact Gate    Moving  Normally Open Contact Gate    LD/FBD language  notation    Inaput Variable (BOOL) Output   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Arguments  ·  The following data types are supported for input and output:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output              Input  Output  INT  INT  DINT  DINT  UINT  UINT  REAL  REAL  WORD  WORD  DWORD  DWORD  TIME  TIME  TOD  TOD  DATE  DATE  Input Variable  Output     ●  Function  ♦ Combination of Normally Open Contact Gate instruction and ST instruction or function  and function block input.  ·  When variable (BOOL) is TRUE(ON), input data is output as the result.  ·  When variable (BOOL) is FALSE(OFF), output is set to “0”.    Variable (BOOL)  Action  Output  FALSE(OFF)  0  TRUE(ON)  Executed  Input data  2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  113    ♦ Combination of Normally Open Contact Gate instruction and SET instruction  ·  When variable (BOOL) is TRUE(ON), input data is output as the result.  ·  When variable (BOOL) is FALSE(OFF), previous value is retained.    Variable (BOOL)  Action  Output  FALSE(OFF)  Retain  previous value TRUE(ON)  Executed  Input data    ●  Program example  ♦ Normally Open Contact Gate instruction + ST instruction        SIGNAL1  SAMPLE1  LD  SAMPLE2 ST    ·  When SIGNAL1 is TRUE(ON), content of SAMPLE1 is moved to SAMPLE2.  ·  When SIGNAL1 is FALSE(OFF), “0” is moved to SAMPLE2.    ♦ Normally Open Contact Gate instruction + SET instruction        SIGNAL1  SAMPLE1  LD  SAMPLE2 SET    ·  When SIGNAL1 is TRUE(ON), content of SAMPLE1 is moved to SAMPLE2.  ·  When SIGNAL1 is FALSE(OFF), SAMPLE2 retains the previous value.    ●  Error information  ·  When there is a boundary error due to index modification, Normally Open  Contact Gate instruction is executed with the value of variable (BOOL) reset to  FALSE(OFF) and the data boundary is exceeded.      Chapter 2    LD/FBD Instructions  6F8C1226  114    Normally Closed Contact Gate   Moving  Normally Closed Contact Gate    LD/FBD language  notation    Input Variable (BOOL) Output   EN input  Edge execution  Index modification  Modifier  —  —  ○     ●  Arguments  ·  The following data types are supported for input and output:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output              Input  Output  INT  INT  DINT  DINT  UINT  UINT  REAL  REAL  WORD  WORD  DWORD  DWORD  TIME  TIME  TOD  TOD  DATE  DATE    Variable  Input  Output     ●  Function  ♦  Combination  of  Normally  Closed  Contact  Gate  instruction  and  ST  instruction  or  function and function block input  ·  When variable (BOOL) is FALSE(OFF), input data is output as result.  ·  When variable (BOOL) is TRUE(ON), output is set to “0”.    Variable (BOOL)  Action  Output  FALSE(OFF)  Input data  TRUE(ON)  Executed  0  2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  115    ♦   Combination of Normally Closed Contact Gate instruction and SET instruction  ·  When variable (BOOL) is FALSE(OFF), input data is output as result.  ·  When variable (BOOL) is TRUE(ON), previous value is retained.    Variable (BOOL)  Action  Output  FALSE(OFF)  Input data  TRUE(ON)  Executed  Retain  previous value   ●  Program example  ♦   Normally Closed Contact Gate instruction + ST instruction        SIGNAL1  SAMPLE1  LD  SAMPLE2 ST    ·  When SIGNAL1 is FALSE(OFF), content of SAMPLE1 is moved to SAMPLE2.  ·  When SIGNAL1 is TRUE(ON), “0” is moved to SAMPLE2.  ♦   Normally Closed Contact Gate instruction + SET instruction        SIGNAL1  SAMPLE1  LD  SAMPLE2 SET    ·  When SIGNAL1 is FALSE(OFF), content of SAMPLE1 is moved to SAMPLE2.  ·  When SIGNAL1 is TRUE(ON), SAMPLE2 retains the previous value.  ●  Error information  ·  When there is a boundary error due to index modification, Normally Closed Contact  Gate instruction is executed with the value of variable (BOOL) reset to FALSE(OFF)  and the data boundary is exceeded.  Chapter 2    LD/FBD Instructions  6F8C1226  116    Move Data    Moving  Move Data    LD/FBD language  notation  Input Output MOVE_□□   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MOVE_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output        Input Output  MOVE_ □□   Input  Symbol(_ □□ )  Output  INT  MOVE_INT  INT  DINT  MOVE_DINT  DINT  UINT  MOVE_UINT  UINT  REAL  MOVE_REAL  REAL  WORD  MOVE_WORD  WORD  DWORD  MOVE_DWORD DWORD  TIME  MOVE_TIME  TIME  TOD  MOVE_TOD  TOD  DATE  MOVE_DATE  DATE  DT  MOVE_DT  DT  STRING  MOVE_STRING  STRING      ●  Function  ·  Input data is output as result.  ·  The following variables can be specified for input and output for MOVE_DT and    MOVE_STRING instructions:      Controller  Instruction  Variable  Integrated Controller V series  MOVE_STRING  Unified Controller nv series  MOVE_DT  MOVE_STRING  Variables other than direct I/O  variables  2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  117    ●  Program example  [LD/FBD language notation]        SAMPLE1  1234  LD  SAMPLE2 1234  ST  MOVE_INT     [ST language notation]  SAMPLE2 := MOVE_INT( SAMPLE1 );    ·  Content of SAMPLE1 1234 is moved to SAMPLE2.    ●  Error information  ·  During MOVE_DT, MOVE_STRING instructions, if the input table or output table  exceeds the specified range, table transfer is not performed and the data boundary is  exceeded.    ·  During MOVE_DT, MOVE_STRING instructions, table transfer is not performed if  direct I/O variable is specified for input table or output table.        Controller  Instruction    Variable  Integrated Controller V series  MOVE_STRING  Transfer is not executed.    Error flag is set to TRUE(ON). Unified Controller nv series  MOVE_DT  MOVE_STRING  Transfer is not executed.    Error flag and table operation  error flag are set to TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  Chapter 2    LD/FBD Instructions  6F8C1226  118    Move Table Data    Moving  Move Table Data    LD/FBD language  notation    Input  table Output table  TMOV  Transfer word  number TBL  N   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TMOV( TBL, N, output table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Input table    Input  N  UINT  ○   Transfer word  number  1≤N≤1024  Output  —  PTR  —  Output table      ●  Function  ·  N data words starting at input table are transferred as block to output table.    ·  One to 1024 words may be transferred. If N=0, no table transfer is performed.    ·  When transferring 2W length data such as DINT, REAL, TIME, TOD, DATE or  DWORD, up to 512 data can be transferred by specifying transfer words  2.    ·  Following operation is performed if input table and output table overlap.      Controller      Action  S controller  The content of input table is transferred to output  table.    Integrated Controller  L controller  Overlapped data of input and output tables cannot be  transferred.    Unified Controller nv series  The content of input table is transferred to output  table.    ·  Direct I/O variable cannot be specified for input table or output table.        Batch  transfer Output table         Input table             N word N word   2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  119    ● Important  · Move Table Data instruction (TMOV) is to transfer memory images as block at high speed. It is  recommended to convert input table and output table to variables declared by array and  structure.        ●  Program example  [LD/FBD language notation]    ARRAY1 LD  ARRAY2 ST TMOV    TBL      N  8  LD  1234  2345  3456  4567  5678  6789  7890  8901  ARRAY1 ARRAY2  1234  2345  3456  4567  5678  6789  7890  8901  8 words     [ST language notation]  TMOV( ARRAY1, 8, ARRAY2);    ·  The eight words source data starting from ARRAY1 are transferred as block to  destination starting at ARRAY2.    ●  Error information  ·  If the number of transfer words exceed 1024, operation is performed with 1024 as the  limit.  ·  If the input table or output table exceeds the specified range, table transfer is not  performed and the data boundary is exceeded.  ·  The following operation is performed if direct I/O variable is specified for input and  output tables.      Controller  Action  S controller  Table transfer is not executed.    Error flag is set to TRUE(ON)  Integrated Controller  V series  L controller  Table transfer is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    Unified Controller nv series  Table transfer is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  Chapter 2    LD/FBD Instructions  6F8C1226  120    Data Exchange    Moving  Data Exchange    LD/FBD language  notation  Input 1 Output 1 XCHG_□□ Input 2 Output 2 Instance name IN1  IN2  OUT1 OUT2   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( IN1, IN2 );  [Variable name] : = [Instance name]. OUT1;  [Variable name] : = [Instance name]. OUT2;    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  IN1  ○   Input1  Input  IN2  ○   Input2  OUT1  —  Output1  Output  OUT2  See below  —  Output2            Input 1,2  Symbol (_ □□ ) Output 1,2  INT  XCHG_INT  INT  DINT  XCHG_DINT  DINT  UINT  XCHG_UINT  UINT  REAL  XCHG_REAL  REAL  WORD  XCHG_WORD  WORD  DWORD  XCHG_DWORD  DWORD  TIME  XCHG_TIME  TIME  TOD  XCHG_TOD  TOD  DATE  XCHG_DATE  DATE    ●  Instance structure    Name  Type  Description Remarks  OUT1  See above  Output1  OUT2  See above    Output2  Can be accessed from the user program.    Input 1 Output 1  Input 2 Output 2  XCHG_□□  IN1  IN2  OUT1 OUT2 2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  121    ●  Function  ·  Input data IN1 is output to OUT2 and IN2 is output to OUT1.      Input data IN1  Input data IN2  Output data OUT1 Output data OUT2     ●  Program example  [LD/FBD language notation]        SAMPLE1 1234  LD  SAMPLE1 5678  ST  XCHG_INT    IN1    OUT1    IN2    OUT2  SAMPLE2 5678  LD  Xchg_1  SAMPLE2 1234  ST      [ST language notation]  Xchg_1( SAMPLE1, SAMPLE2);  SAMPLE1 := Xchg_1.OUT1;  SAMPLE2 := Xchg_1.OUT2;    ·  Contents of SAMPLE1 and SAMPLE2 are exchanged.  Chapter 2    LD/FBD Instructions  6F8C1226  122    Initialize Table Data    Moving  Initialize Table Data    LD/FBD language  notation    Initialization data Output table  TINZ_□□ Count IN  N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TINZ_ □□ ( IN, N, Output table );    ●  Argument  ·  The following data types are supported for input arguments and the instruction symbol  depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Initialization  data    Input  N  UINT  ○   Count  1≤N≤1024  Output  —  PTR  —  Output table        Initialization data  Symbol(_ □□ ) INT  TINZ_INT  DINT  TINZ_DINT  UINT  TINZ_UINT  REAL  TINZ_REAL  WORD  TINZ_WORD  DWORD  TINZ_DWORD  TIME  TINZ_TIME  TOD  TINZ_TOD  DATE  TINZ_DATE  DT  TINZ_DT  Initialization  data  Output table  TINZ_ □□ IN      N  Count      ●  Function  ·  An N word block starting at output table is initialized with initialization data IN.  ·  One to 1024 words may be transferred.    If N=0, no table initialization is performed.  ·  Direct I/O variable cannot be specified for output table.  2.6    Moving  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  123      Initi al izati on data  IN  Output table   N words      ●  Program example  [LD/FBD language notation]      SAMPLE1 LD  ARRAY1 ST TINZ_INT    IN      N  8  LD  1234 SAMPLE1 ARRAY1  1234  1234  1234  1234  1234  1234  1234  1234  8 words     [ST language notation]  TINZ_INT( SAMPLE1, 8, ARRAY1);    ·  Eight words block starting at variable ARRAY1 is initialized with content of  SAMPLE1 1234.    ●  Error information  ·  If the number of transfer words exceed 1024, operation is performed with 1024 as the  limit.  ·  If the input table or output table exceeds the specified range, table transfer is not  performed and the data boundary is exceeded.  ·  The following operation is performed if direct I/O variable is specified for input and  output tables:      Controller  Action  S controller  Table transfer is not executed.    Error flag is set to TRUE(ON).  Integrated Controller  V series  L controller  Table transfer is not executed.    Error flag and table operation error flag are set to  TRUE(ON).  Unified Controller nv series  Table transfer is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  Chapter 2    LD/FBD Instructions  6F8C1226  124      2.7  Comparison    No.  Instruction  Remarks  1  Greater Than  GT    2  Greater Than or Equal  GE    3  Equal  EQ    4  Less Than or Equal  LE    5  Less Than  LT    6  Not Equal  NE    7  Comparison with Hysteresis (greater than)  GT_L  TOSDIC compatible  instruction  8  Comparison with Hysteresis (less than)  LT_L  TOSDIC compatible  instruction  9  Comparison with Hysteresis    (greater than or equal)  GE_L  TOSDIC compatible  instruction  10  Comparison with Hysteresis    (less than or equal)  LE_L  TOSDIC compatible  instruction    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  125    Greater Than   Comparison  Greater Than    LD/FBD language  notation    Input 1 Output  GT_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := GT_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1・・・n  2n15  Output  —  BOOL  —  Output      Input 1…n  Symbol (_ □□ )  INT  GT_INT  DINT  GT_DINT  UINT  GT_UINT  REAL  GT_REAL  WORD  GT_WORD  DWORD  GT_DWORD  TIME  GT_TIME  TOD  GT_TOD  DATE  GT_DATE  DT  GT_DT  Input  1 Output GT_□□ Input  2 Input n     ●  Function  ·  Compares the value of input data and outputs the comparison result.      Input  Condition  Output  Input1>Input2>···>Input n is satisfied  TRUE(ON)  Input data  Input 1···Input n  Input1>Input2>···>Input n is not satisfied  FALSE(OFF)  Chapter 2    LD/FBD Instructions  6F8C1226  126    ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation.    NAN input data do not compare the magnitude relation.    Unified Controller nv series  INF and NAN input data is limited by the maximum value to  compare the magnitude relation.      ●  Program example  [LD/FBD language notation]        SAMPLE1 7777  LD  GT_INT  SAMPLE2 6666  LD  SAMPLE3 5555  LD  SAMPLE4 4444  LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := GT_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Compares the data in SAMPLE1 to 4 and outputs TRUE(ON) to SIGNAL1 because  the condition SAMPLE1 ≥ SAMPLE2 ≥ SAMPLE3 ≥ SAMPLE4 is satisfied.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  FALSE(OFF) is output as the result if NAN is input.    Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  127    Greater Than or Equal   Comparison  Greater Than or Equal    LD/FBD language  notation    Input 1 Output GE_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := GE_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments.  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1···n  2n15  Output  —  BOOL  —  Output        Input 1…n  Symbol(_ □□ )  INT  GE_INT  DINT  GE_DINT  UINT  GE_UINT  REAL  GE_REAL  WORD  GE_WORD  DWORD  GE_DWORD  TIME  GE_TIME  TOD  GE_TOD  DATE  GE_DATE  DT  GE_DT  Input  1 Output GE_□□ Input  2 Input n Chapter 2    LD/FBD Instructions  6F8C1226  128    ●  Function  ·  Compares the value of input data and outputs the comparison result.      Input  Condition  Output  Input1≥Input2≥···≥Input    is satisfied  TRUE(ON)  Input data  Input 1···Input n  Input1≥Input2≥···≥Input n is not  satisfied  FALSE(OFF)    ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation. NAN input data do not compare the magnitude  relation.  Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]        SAMPLE1 7777  LD  GE_INT  SAMPLE2 6666  LD  SAMPLE3 6666  LD  SAMPLE4 5555  LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := GE_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Compares the data in SAMPLE1 to 4 and outputs TRUE(ON) to SIGNAL1 because  the condition SAMPLE1 ≥ SAMPLE2 ≥ SAMPLE3 ≥ SAMPLE4 is satisfied.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  FALSE(OFF) is output as the result if NAN is input.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  129    Equal    Comparison  Equal    LD/FBD language  notation    Input 1 Output EQ_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := EQ_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1···n  2≤n≤15  Output  —  BOOL  —  Output            Input 1…n  Symbol (_□□)  INT  EQ_INT  DINT  EQ_DINT  UINT  EQ_UINT  REAL  EQ_REAL  WORD  EQ_WORD  DWORD  EQ_DWORD  TIME  EQ_TIME  TOD  EQ_TOD  DATE  EQ_DATE  DT  EQ_DT  Input  1  Output EQ_□□ Input  2  Input  n    Chapter 2    LD/FBD Instructions  6F8C1226  130    ●  Function  ·  Compares the value of input data and outputs the comparison result.    Input  Condition  Output  Input1 = Input2 =···= Input n is satisfied TRUE(ON)  Input data  Input 1···Input n  Input1 = Input2 =···= Input n is not satisfied FALSE(OFF)    ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation. NAN input data do not compare the magnitude  relation.  Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]     SAMPLE1 1234  LD  EQ_INT  SAMPLE2 1234  LD  SAMPLE3 1234  LD  SAMPLE4 1234  LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := EQ_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Compares the data in SAMPLE1 to 4 and outputs TRUE(ON) to SIGNAL1  because the condition SAMPLE1=SAMPLE2=SAMPLE3=SAMPLE4 is  satisfied.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  FALSE(OFF) is output as the result if NAN is input.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  131    Less Than or Equal    Comparison  Less Than or Equal    LD/FBD language  notation    Input 1 Output LE_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LE_ □□ ( Input1, Input2,  ———, Inputn );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1···n  2≤n≤15  Output  —  BOOL  —  Output          Input 1…n  Symbol (_ □□ ) INT  LE_INT  DINT  LE_DINT  UINT  LE_UINT  REAL  LE_REAL  WORD  LE_WORD  DWORD  LE_DWORD  TIME  LE_TIME  TOD  LE_TOD  DATE  LE_DATE  DT  LE_DT  Input 1  Output LE_□□ Input 2  Input n    Chapter 2    LD/FBD Instructions  6F8C1226  132    ●  Function  ·  Compares the value of input data and outputs the comparison result.      Input  Condition  Output  Input1≤Input2≤···≤Input n is satisfied  TRUE(ON)  Input data  Input 1···Input n  Input1≤Input2≤···≤Input n is not  satisfied  FALSE(OFF)    ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation. NAN input data do not compare the magnitude  relation.  Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]        SAMPLE1 1111  LD  LE_INT  SAMPLE2 2222  LD  SAMPLE3 2222  LD  SAMPLE4 3333  LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := LE_INT (SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Compares the data in SAMPLE1 to 4 and outputs TRUE(ON) to SIGNAL1 because  the condition SAMPLE1 ≤ SAMPLE2 ≤ SAMPLE3 ≤ SAMPLE4 is satisfied.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  133    Less Than    Comparison  Less Than    LD/FBD language  notation    Input 1 Output LT_□□  Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LT_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1···n  2≤n≤15  Output  —  BOOL  —  Output          Input 1…n  Symbol(_ □□ ) INT  LT_INT  DINT  LT_DINT  UINT  LT_UINT  REAL  LT_REAL  WORD  LT_WORD  DWORD  LT_DWORD  TIME  LT_TIME  TOD  LT_TOD  DATE  LT_DATE  DT  LT_DT  Input 1  Output LT_□□  Input 2  Input n      Chapter 2    LD/FBD Instructions  6F8C1226  134    ●  Function  ·  Compares the value of input data and outputs the comparison result.      Input  Condition  Output  Input1<Input2<…<Input n is satisfied  TRUE(ON)  Input data  Input1···Inputn  Input1<Input2<…<Input n is not  satisfied  FALSE(OFF)    ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation. NAN input data do not compare the magnitude  relation.  Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]     SAMPLE1 1111  LD  LT_INT  SAMPLE2 2222  LD  SAMPLE3 3333  LD  SAMPLE4 4444  LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := LT_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Compares the data in SAMPLE1 to 4 and outputs TRUE(ON) to SIGNAL1 because  the condition SAMPLE1 < SAMPLE2 < SAMPLE3 < SAMPLE4 is satisfied.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  135    Not Equal    Comparison  Not Equal    LD/FBD language  notation    Input 1 Output NE_□□ Input 2    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := NE_ □□ ( Input1, Input2 );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1, Input2  Input number =2  Output  —  BOOL  —  Output        Input 1, 2  Symbol(_ □□ ) INT  NE_INT  DINT  NE_DINT  UINT  NE_UINT  REAL  NE_REAL  WORD  NE_WORD  DWORD  NE_DWORD  TIME  NE_TIME  TOD  NE_TOD  DATE  NE_DATE  DT  NE_DT  Input  1  Output NE_□□ Input  2      ●  Function  ·  Compares the value of input data and outputs the comparison result.      Input  Condition  Output  Input1≠Input2 is satisfied  TRUE(ON)  Input data  Input1, Input2  Input1≠Input2 is not satisfied  FALSE(OFF)    ·  Number of input data must be 2.    ·  Input 1 and Input 2 must have the same data type.  Chapter 2    LD/FBD Instructions  6F8C1226  136    ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation.  NAN input data do not compare the magnitude relation. Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]     SAMPLE1 1111  LD  NE_INT  SAMPLE2 2222  LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := NE_INT( SAMPLE1, SAMPLE2);    ·  Compares the data in SAMPLE1 and SAMPLE2 and outputs TRUE(ON) to SIGNAL1  because the condition SAMPLE1≠SAMPLE2 is satisfied.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  137    Comparison with Hysteresis (greater than)   Comparison  Comparison with Hysteresis (greater than)  TOSDIC compatible  instruction  LD/FBD language  notation  Input  data Output  GT_L  U1  Y   U2    H1    H2    H3  Comparison  data Coefficient  Bias    Hysteresis  width Instance name   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( U1, U2, H1, H2, H3 );  [Variable name] : = [Instance name]. Y;    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  U1  REAL  ○   Input data    U2  REAL  ○   Comparison data    H1  REAL  ○   Coefficient      H2  REAL  ○   Bias      Input  H3  REAL  ○   Hysteresis width  (≥0)  Output  —  BOOL  —  Output      ●  Instance structure    Name  Type  Description  Remarks  Y  BOOL  Result output  Can be accessed from the user program.   ●  Function  ·  Compares the size with hysteresis and outputs the result.    When  U1  is  greater  than  U2  and  the  value  determined  by  H1  to  H3,  the  output  is  TRUE(ON).    When U1>H1U2+H2: TRUE(ON)  When U1≤H1U2+H2-H3: FALSE(OFF)  The previous value is retained for the cases other than above (within the hysteresis  width).      Chapter 2    LD/FBD Instructions  6F8C1226  138      →U1 Y  H3 H1U2+H2-H3  H1U2H2  Included Not included TRUE(ON)  FALSE(OFF)      ●  Program example  [LD/FBD language notation]    IND01.PV 80  LD  DP0  0  LD  DP0  0  LD  DP11  75  LD  S1  1  ST DP12  15  LD  GT_L  U1              Y      U2      H1      H2      H3  GT_L_1  DP0=0  DP11=75  DP12=15        [ST language notation]  GT_L_1( IND01.PV, DP0, DP0, DP11, DP12);  S1 := GT_L_1.Y;    ·  Output S1 is obtained as below by the value of IND01.PV:      →IND01.PV S1  60 75 Included  Not included TRUE(ON)  FALSE(OFF)      ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).    ·  When the hysteresis width (H3) is negative, absolute value is taken for operation.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  139    Comparison with Hysteresis (less than)   Comparison  Comparison with Hysteresis (less than)  TOSDIC compatible  instruction  LD/FBD language  notation    Output  LT_L  Input  data Comparison  data Coefficient Bias  Hysteresis  width Instance name U1  Y U2  H1  H2  H3    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( U1, U2, H1, H2, H3 );  [Variable name] : = [Instance name]. Y;    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  U1  REAL  ○   Input data      U2  REAL  ○   Comparison data    H1  REAL  ○   Coefficient      H2  REAL  ○   Bias      Input  H3  REAL  ○   Hysteresis width  (≥0)  Output  —  BOOL  —  Output      ●  Instance structure    Name  Type  Description  Remarks  Y  BOOL  Result output  Can be accessed from the user program.   ●  Function  ·  Compares the size with hysteresis and outputs the result.    When  U1  is  less  than  U2  and  the  value  determined  by  H1  to  H3,  the  output  is  TRUE(ON).  When U1<H1U2+H2:TRUE(ON)  When U1≥H1U2+H2+H3:FALSE(OFF)  The previous value is retained for the cases other than above (within the hysteresis  width).    Chapter 2    LD/FBD Instructions  6F8C1226  140      →U1 Y  H3 H1U2+H2  H1U2+H2+H3 Included    Not included TRUE(ON)  FALSE(OFF)      ●  Program example  [LD/FBD language notation]      IND01.PV 80  LD  DP0  0  LD  DP0  0  LD  DP11  75  LD  S1  1  ST  DP12  15  LD  LT_L  U1              Y      U2      H1      H2      H3  LT_L_1  DP0=0  DP11=75 DP12=15     [ST language notation]  LT_L_1( IND01.PV, DP0, DP0, DP11, DP12);  S1 := LT_L_1.Y;    ·  Output S1 is obtained as below by the value of IND01.PV:      60 75 Included  Not included TRUE(ON)  FALSE(OFF)  →IND01.PV S1      ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).    ·  When the hysteresis width (H3) is negative, absolute value is taken for operation.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  141    Comparison with Hysteresis (greater than or equal)    Comparison  Comparison with Hysteresis (greater than or  equal)  TOSDIC compatible  instruction  LD/FBD language  notation    Output  GE_L  Input  data Comparison  data Coefficient  Bias  Hysteresis  width Instance name U1  Y U2  H1  H2  H3    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( U1, U2, H1, H2, H3 );  [Variable name] : = [Instance name]. Y;    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  U1  REAL  ○   Input data      U2  REAL  ○   Comparison data    H1  REAL  ○   Coefficient      H2  REAL  ○   Bias      Input  H3  REAL  ○   Hysteresis width  (≥0)  Output  —  BOOL  —  Output      ●  Instance structure    Name  Type  Description  Remarks  Y  BOOL  Result output  Can be accessed from the user program.   ●  Function  ·  Compares the size with hysteresis and outputs the result.    When U1 is greater than or equal to U2 and the value determined by H1 to H3, the  output is TRUE(ON).  When U1≥H1U2+H2:TRUE(ON)  When U1<H1U2+H2-H3:FALSE(OFF)  The previous value is retained for the cases other than above (within the hysteresis  width).    Chapter 2    LD/FBD Instructions  6F8C1226  142      →U1 H3 H1*U2+H2-H3 H1*U2+H2 Included  Not included TRUE(ON)  FALSE(OFF)  S1      ●  Program example  [LD/FBD language notation]      IND01.PV 80  LD  DP0  0  LD  DP0  0  LD  DP11  75  LD  S1 1  ST  DP12  15  LD  GE_L  U1              Y      U2      H1      H2      H3  GE_L_1  DP0=0  DP11=75 DP12=15     [ST language notation]  GE_L_1( IND01.PV, DP0, DP0, DP11, DP12);  S1 := GE_L_1.Y;    ·  Output S1 is obtained as below by the value of IND01.PV:      →IND01.PV S1  60 75 TRUE(ON) FALSE(OFF) Included  Not included     ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).    ·  When the hysteresis width (H3) is negative absolute value is taken for operation.    2.7    Comparison  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  143    Comparison with Hysteresis (less than or equal)    Comparison  Comparison with Hysteresis (less than or equal)  TOSDIC compatible  instruction  LD/FBD language  notation    Output  LE_L  Input  data Comparison  data Coefficient  Bias  Hysteresis  width Instance name U1  Y U2  H1  H2  H3    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( U1, U2, H1, H2, H3 );  [Variable name] : = [Instance name]. Y;    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  U1  REAL  ○   Input data      U2  REAL  ○   Comparison data    H1  REAL  ○   Coefficient      H2  REAL  ○   Bias      Input  H3  REAL  ○   Hysteresis width  (≥0)  Output  —  BOOL  —  Output      ●  Instance structure    Name  Type  Description  Remarks  Y  BOOL  Result output  Can be accessed from the user program.   ●  Function  ·  Compares the size with hysteresis and outputs the result.    When U1is less than or equal to U2 or the value determined by H1 to H3, the output is  TRUE(ON).  When U1≤H1U2+H2: TRUE(ON)  When U1>H1U2+H2+H3: FALSE(OFF)  The previous value is retained for the cases other than above (within the hysteresis  width).    Chapter 2    LD/FBD Instructions  6F8C1226  144      →U1 Y  H3 H1U2+H2 H1U2+H2+H3 Not included  Included  TRUE(ON)  FALSE(OFF)      ●  Program example  [LD/FBD language notation]      IND01.PV 80  LD  DP0  0  LD  DP0  0  LD  DP11  75  LD  S1  1  ST  DP12  15  LD  LE_L  U1              Y      U2      H1      H2      H3  LE_L_1  DP0=0  DP11=75 DP12=15     [ST language notation]  LE_L_1( IND01.PV, DP0, DP0, DP11, DP12);  S1 := LE_L_1.Y;    ·  Output S1 is obtained as below by the value of IND01.PV:      S1  60 75 TRUE(ON) FALSE(OFF) →IND01.PV Not included  Included      ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is FALSE(OFF).    ·  When the hysteresis width (H3) is negative, absolute value is taken for operation.      2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  145      2.8  Selection    No.  Instruction  Remarks  1  Maximum  MAX    2  Maximum of Table Data  MAXL    3  Minimum  MIN    4  Minimum of Table Data  MINL    5  Average Value  AVE    6  Average of Table Data  AVEL    7  Limiter  LIMIT    8  Selector  SEL    9  Multiplex  MUX    10  Multiplex of Table Data  MPX      Chapter 2    LD/FBD Instructions  6F8C1226  146    Maximum    Selection  Maximum    LD/FBD language  notation    Input 1 Output  MAX_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MAX_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments  ・ The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1・・・n  2≤n≤15  Output  —  See below  —  Output          Input 1···n  Symbol(_□□) Output  INT  MAX_INT  INT  DINT  MAX_DINT  DINT  UINT  MAX_UINT  UINT  REAL  MAX_REAL  REAL  WORD  MAX_WORD  WORD  DWORD  MAX_DWORD  DWORD  TIME  MAX_TIME  TIME  TOD  MAX_TOD  TOD  DATE  MAX_DATE  DATE  DT  MAX_DT  DT  Input 1 Output  MAX_□□ Input 2 Input n   2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  147    ●  Function  ·  The maximum value of input data Input 1 to Input n is obtained and output as result.  ·  Up to 15 input data are allowed.    ·  Input1 to n must have the same data type.    ·  The following operation is performed when the input data is REAL:    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation. NAN input data do not compare the magnitude  relation.  Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]      SAMPLE1 -1111  LD  MAX_INT  SAMPLE2 6666  LD  SAMPLE3 -5555  LD  SAMPLE4 4444  LD  SAMPLE5 6666  ST      [ST language notation]  SAMPLE5 := MAX_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  The maximum value of input data SAMPLE1 to SAMPLE4 is obtained and the  maximum value 6666 is stored in SAMPLE5    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  148    Maximum of Table Data   Selection  Maximum of Table Data    LD/FBD language  notation  Input  table Output MAXL_□□ Number TBL N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output : = MAXL_ □□ ( TBL, N );    ●  Arguments  ·  The following data types are supported for output arguments and the instruction  symbol depends on the data type.    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Input table    Input  N  UINT  ○   Number  1≤N≤256  Output  —  See below  —  Output          Symbol(_ □□ )  Output  MAXL_INT  INT  MAXL_DINT  DINT  MAXL_UINT  UINT  MAXL_REAL  REAL  MAXL_TIME  TIME  MAXL_TOD  TOD  MAXL_DATE  DATE  MAXL_DT  DT  Input  table  Output  MAXL_□□   TBL      N  Number    ●  Function  ·  The maximum value is obtained out of N data starting from the variable specified with  input table TBL and the result is output. Also, the table pointer of the maximum value is  output to index register XL.  ·  The allowed range of number N is 1 ≤ N ≤ 256.  ·  If number N=0, the top data of the input table is output as result and index register XL  is set to 0.  ·  If there is more than one maximum, the one with the smallest table pointer No. is  output to index register XL. 2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  149    ·  Direct I/O variable cannot be specified for the input table.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation.  NAN input data do not compare the magnitude relation. Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation[    2  ARRAY1    LD  MAXL_INT    TBL        N  6    LD  SAMPLE1 100  ST  ARRAY1 -98  65  23  -51  100  -125 199  100  SAMPLE1  2  Index register XL  Pointer 1  3  4 5  6  7  8  100    [ST language notation]  SAMPLE1 := MAXL_INT( ARRAY1, 6);    ·  The maximum value is obtained from six data in input table ARRAY1 and the  maximum value “100” is stored in SAMPLE1.    Also, the table pointer “2” of the  maximum value is output to index register XL.    ●  Error information  ·  When the input table exceeds the variable area, the maximum of table data is not  processed and the data boundary is exceeded.    ·  If N exceeds 256, N is limited to 256.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.  ·  The following operation is performed when direct I/O variable is specified for the input  table:      Controller  Action  Integrated  Controller V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  150    Minimum    Selection  Minimum    LD/FBD language  notation      Input 1 Output MIN_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MIN_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  Input1…n  2≤n≤15  Output  —  See below  —  Output      Input 1···n  Symbol(_ □□ ) Output  INT  MIN_INT  INT  DINT  MIN_DINT  DINT  UINT  MIN_UINT  UINT  REAL  MIN_REAL  REAL  WORD  MIN_WORD  WORD  DWORD  MIN_DWORD  DWORD  TIME  MIN_TIME  TIME  TOD  MIN_TOD  TOD  DATE  MIN_DATE  DATE  DT  MIN_DT  DT  Input 1 Output  MIN_□□ Input 2 Input n     ●  Function  ·  The minimum value of input data Input 1 to Input n is obtained and output as result.  ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.  ·  The following operation is performed when the input data type is REAL:    2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  151    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation.  NAN input data do not compare the magnitude relation. Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]    SAMPLE1 -1111  LD  MIN_INT  SAMPLE2 6666  LD  SAMPLE3 -5555  LD  SAMPLE4 4444  LD  SAMPLE5 -5555  ST      [ST language notation]  SAMPLE5 := MIN_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  The minimum value of input data SAMPLE1 to SAMPLE4 is obtained and the  minimum value -5555 is stored in SAMPLE5.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  152    Minimum of Table Data   Selection  Minimum of Table Data    LD/FBD language  notation  Input  table Output MINL_□□ Number TBL N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MINL_ □□ ( TBL, N );    ●  Arguments  ·  The following data types are supported for output arguments and the instruction  symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Input table    Input  N  UINT  ○   Number  1≤N≤256  Output  —  See below  —  Output            Symbol(_ □□ )  Output  MINL_INT  INT  MINL_DINT  DINT  MINL_UINT  UINT  MINL_REAL  REAL  MINL_TIME  TIME  MINL_TOD  TOD  MINL_DATE  DATE  MINL_DT  DT  Input  table Output  MINL_□□   TBL      N  Number     ●  Function  ·  The minimum value is obtained out of N data starting from the variable specified with  input table TBL and the minimum value is output as result. Also, the table pointer of the  minimum value is output to index register XL.  ·  The allowed range of number N is 1 ≤ N ≤ 256.  ·  If number N=0, the top data of the input table is output as result and index register XL  is set to 0.  ·  If there is more than one minimum, the one with the smallest table pointer No. is output  to index register XL.  2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  153    ·  Direct I/O variables cannot be specified for the input table.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation. NAN input data do not compare the magnitude  relation.  Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    ●  Program example  [LD/FBD language notation]    2  ARRAY1    LD  MINL_INT    TBL        N  6    LD  SAMPLE1 -100  ST  ARRAY1 98  65  23  -51  -100  -125 199  -100  SAMPLE1  2  Index registerXL  pointer 1  3  4 5  6  7  8  -100    [ST language notation]  SAMPLE1 := MINL_INT( ARRAY1, 6);    ·  The minimum value is obtained from six data in input table ARRAY1 and the minimum  value “-100” is stored in SAMPLE1.    Also, the table pointer “2” of the minimum value  is output to index register XL.    ●  Error information  ·  When the input table exceeds the variable area, the minimum of table data is not  processed and the data boundary is exceeded.  ·  If N exceeds 256, N is limited to 256.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller  If NAN data is entered as input, the result is NAN.  Unified Controller nv series  NAN and INF data are limited by the maximum value.  ·  The following operation is performed when direct I/O variable is specified for the input  table:      Controller  Action  Integrated Controller  V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  154    Average Value    Selection  Average Value    LD/FBD language  notation    Input 1 Output  AVE_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := AVE_ □□ ( Input1, Input2, ———, Inputn );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1···n  2≤n≤15  Output  —  See below  —  Output          Input 1···n  Symbol(_ □□ ) Output  INT  AVE_INT  INT  DINT  AVE_DINT  DINT  UINT  AVE_UINT  UINT  REAL  AVE_REAL  REAL  TIME  AVE_TIME  TIME  Input 1  Output  AVE_□□ Input  2  Input n      ●  Function  ·  The minimum value of input data Input 1 to Input n is obtained and output as result.  ·  Up to 15 input data are allowed.  ·  Input1 to n must have the same data type.    Input1 + Input2 + ··· + Inputn Output  =  n  2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  155    ●  Program example  [LD/FBD language notation]      SAMPLE1  -1111  LD  AVE_INT  SAMPLE2  6666  LD  SAMPLE3  -5555  LD  SAMPLE4  4444  LD  SAMPLE5 1111  ST      [ST language notation]  SAMPLE5 := AVE_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  The average value of input data SAMPLE1 to SAMPLE4 is obtained and the average  value “1111” is stored in SAMPLE5.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF is input or when it is INF during summation  operation, the result is INF.    Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  156    Average of Table Data    Selection  Average of Table Data    LD/FBD language  notation    Input  table Output AVEL_□□ Number TBL N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := AVEL_ □□ ( TBL, N );    ●  Arguments  ·  The following data types are supported for output arguments and the instruction  symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Input table    Input  N  UINT  ○   Number  1N256  Output  —  See below  —  Output        Symbol(_□□)  Output  AVEL_INT  INT  AVEL_DINT  DINT  AVEL_UINT  UINT  AVEL_REAL  REAL  AVEL_TIME  TIME  Input  table Output  AVEL_□□   TBL      N  Number     ●  Function  ·  The average value is obtained from N data starting from the variable specified with  input table TBL and the result is output.  ·  The allowed range of number N is 1 ≤ N ≤ 256.  ·  If number N=0, the top data of the input table is output as result.  ·  Direct I/O variable cannot be specified for the input table.    TBL[0]+TBL[1] + ··· + TBL[N-1]  Output  =  n  2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  157    ●  Program example  [LD/FBD language notation]      2 ARRAY1    LD  AVEL_INT    TBL        N  6    LD  SAMPLE1 -10  ST  ARRAY1 98  65  23  -51 -100  -125 199  -10  SAMPLE1 pointer 1  3  4 5  6  7  8  -100      [ST language notation]  SAMPLE1 := AVEL_INT( ARRAY1, 6);    ·  The average value is obtained from six data in input table ARRAY1 and the average  value “-10” is stored in SAMPLE1.    ●  Error information  ·  When the input table exceeds the variable area, the average of table data is not  processed and the data boundary is exceeded.  ·  If N exceeds 256, N is limited to 256.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller  If NAN data is entered as input, the result is NAN.  If INF is input or when it is INF during summation  operation, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The following operation is performed when direct I/O variable is specified for the input  table:      Controller  Action  Integrated Controller  V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  158    Limiter    Selection  Limiter    LD/FBD language  notation    Minimum Output LIMIT_□□ Input value Maximum MN IN  MX   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LIMIT_ □□ ( MN, IN, MX );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  MN  ○   Minimum    IN  ○   Input value    Input  MX  ○   Maximum    Output  —  See below  —  Output        Minimum, Input value,  Maximum  Symbol(_□□)  Output  INT  LIMIT_INT  INT  DINT  LIMIT_DINT  DINT  UINT  LIMIT_UINT  UINT  REAL  LIMIT_REAL  REAL  WORD  LIMIT_WORD  WORD  DWORD  LIMIT_DWORD  DWORD  TIME  LIMIT_TIME  TIME  TOD  LIMIT_TOD  TOD  DATE  LIMIT_DATE  DATE  DT  LIMIT_DT  DT  Minimum  Output  LIMIT_□□   MN      IN      MX  Input value  Maximum      2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  159    ●  Function  ·  If input value IN is within maximum MX and minimum MN (minimum MN ≤ input value  IN ≤ maximum MX) the input value is output as result.  ·  If IN is greater than maximum MX, maximum MX is output as result.  ·  If IN is less than minimum MN, minimum MN is output as result.  ·  When minimum MN≥ maximum MX, maximum MX is output as result.    ·  Input data cannot have mixed data types.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  Input data up to INF compare the magnitude relation.  NAN input data do not compare the magnitude relation. Unified Controller nv series  INF and NAN input data are limited by the maximum  value to compare the magnitude relation.    OUT = MIN{MAX(IN, MN), MX}    ●  Program example  [LD/FBD language notation]      SAMPLE1 1000  LD  LIMIT_INT    MN        IN          MX  SAMPLE2 2500  LD  SAMPLE3 4000  LD  SAMPLE4 2500  ST      [ST language notation]  SAMPLE4 := LIMIT_INT (SAMPLE1, SAMPLE2, SAMPLE3);    ·  Checks whether the input value “2500” in SAMPLE2 is between minimum “1000” in  SAMPLE1 and maximum “4000” in SAMPLE3.    Because SAMPLE2 is between the  maximum and minimum, “2500” is stored in SAMPLE4 as result.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN (see  “Important”).  Unified Controller nv series  NAN and INF data are limited by the maximum value.  Chapter 2    LD/FBD Instructions  6F8C1226  160    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    ● Important  · Error processing is updated from the following controller versions.    Controller  S3  S2  S2PU82 L3  L3DS L2  L2DS  L1  Version  V02.75  V02.68 V02.01 —  —  —  —  V02.40   The input data IN is limited to + Infinity or - Infinity INF before LIMIT processing.  The condition is as follows:  ·  The Input value IN is REAL type.  ·  The value NAN or INF is set as the data MN, IN and MX.      Input data  MN, IN, MX  Hex.  Limited data  MN, IN, MX  +NAN  16#7F80_0001 to 16#7FFF_FFFF +INF  16#7F80_0000  + Maximum  +MAX  16#7F7F_FFFF    :    +MIN  16#0000_0001  16#0000_0000  0  16#8000_0000  -MIN  16#8000_0001    :    -MAX  16#FF7F_FFFF  Input data  -INF  16#FF80_0000  -NAN  16#FF80_0001 to 16#FFFF_FFFF -MAX      2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  161    Selector    Selection  Selector    LD/FBD language  notation      Select  input Output SEL_□□ G    IN0    IN1  Input 0 Input 1   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SEL_ □□ (G, IN0, IN1 );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  G  BOOL  ○   Select input    IN0  ○   Input0    Input  IN1  ○   Input1    Output  —  See below  —  Output          Input 0, Input 1  Symbol(_□□)  Output  BOOL  SEL_BOOL  BOOL  INT  SEL_INT  INT  DINT  SEL_DINT  DINT  UINT  SEL_UINT  UINT  REAL  SEL_REAL  REAL  WORD  SEL_WORD  WORD  DWORD  SEL_DWORD  DWORD  TIME  SEL_TIME  TIME  TOD  SEL_TOD  TOD  DATE  SEL_DATE  DATE  DT  SEL_DT  DT  Select  input Output  SEL_□□   G      IN0      IN1  Input 0 Input 1   Chapter 2    LD/FBD Instructions  6F8C1226  162    ●  Function  ·  Input 0 or Input 1 is selected depending on the status of select input G.  When select input G = FALSE(OFF), Input 0 is selected and output as result.  When select input G = TRUE(ON), Input 1 is selected and output as result.  ·  Input 0 and Input 1 must have the same data type.    ●  Program example  [LD/FBD language notation]      SIGNAL1 1  LD  SEL_INT  SAMPLE1 1000  LD  SAMPLE2 2000  LD  SAMPLE3 2000  ST  G  IN0  IN1      [ST language notation]  SAMPLE3 := SEL_INT (SIGNAL1, SAMPLE1, SAMPLE2);    ·  Because select input SIGNAL1 is TRUE(ON), “2000” is stored in SAMPLE3 as result.  2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  163    Multiplex    Selection  Multiplex    LD/FBD language  notation  Input point  Output MUX_□□ K          Input 0 Input (n-1)   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MUX_ □□ ( K, Input0, ———, Input(n—1) );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  K  UINT  ○   Input point No.  0K(n-1)  Input  —  ○   Input0…(n-1)  1n14  Output  —  See below  —  Output      Input 0 ··· (n-1)  Symbol(_ □□ ) Output  BOOL  MUX_BOOL  BOOL  INT  MUX_INT  INT  DINT  MUX_DINT  DINT  UINT  MUX_UINT  UINT  WORD  MUX_WORD  WORD  DWORD  MUX_DWORD  DWORD  REAL  MUX_REAL  REAL  TIME  MUX_TIME  TIME  TOD  MUX_TOD  TOD  DATE  MUX_DATE  DATE  DT  MUX_DT  DT  Input point No.  Output  MUX_□□   K  Input 0  Input (n-1)      Chapter 2    LD/FBD Instructions  6F8C1226  164    ●  Function  ·  Selects input data specified with input point No. K. Input 0 is selected if input point No.  K=0 and Input (n-1) is selected if input point No. K =(n-1).  ·  Up to 14 input data are allowed.  ·  Input 0 to (n-1) must have the same data type.    ●  Program example  [LD/FBD language notation]      SAMPLE1  2  LD  MUX_INT    K  SAMPLE2  1234  LD  SAMPLE3  5678  LD  SAMPLE4  -9876  LD  SAMPLE5 -9876  ST  Input point No. 0  1  2  1234  5678  -9876  -9876  Result  K=2      [ST language notation]  SAMPLE5 := MUX_INT (SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Because the input point No. specified by SAMPLE1 is “2”, -9876 which is the content  of SAMPLE4 is stored in SAMPLE5.    ●  Error information  ·  When input point No. K. Input number, operation is performed with K limited to (Input  number-1).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.8    Selection  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  165    Multiplex of Table Data   Selection  Multiplex of Table Data    LD/FBD language  notation      Input  table Output  MPX_□□ TBL    K    N  Selection  Table word number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MPX_ □□ ( TBL, K, N );    ●  Arguments  ·  The following data types are supported for output arguments and the instruction  symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Input table    K  UINT  ○   Selection point No.  0≤K≤(N-1)  Input  N  UINT  ○   Table word number  1≤N≤256  Output  —  See below  —  Output          Symbol(_□□)  Output  MPX_INT  INT  MPX_DINT  DINT  MPX_UINT  UINT  MPX_WORD  WORD  MPX_DWORD  DWORD  MPX_REAL  REAL  MPX_TIME  TIME  MPX_TOD  TOD  MPX_DATE  DATE  MPX_DT  DT  Input  table  Output  MPX_□□   TBL      K      N  Selection  point  N Table  word  number    Chapter 2    LD/FBD Instructions  6F8C1226  166    ●  Function  ·  The K (selection pointer No.) data is selected from N word data specified with input  table TBL and result is output.  ·  Table word number may be from one to 256. When the table word number is 0, the  result is the top data of the input table.    ·  Direct I/O variable cannot be specified for the input table.    Pointer 0 1  2 3 4 1234 2345  3456  4567 5678  Input table  N word N=5  Selection point  K=3  Output  4567    ●  Program example  [LD/FBD language notation]      ARRAY1   LD  MPX_INT    TBL        K        N  SAMPLE1  2  LD  SAMPLE2  6  LD  SAMPLE3 -200  ST  Selection point No. 0  1 2 -100  100  -200 -200  Result K=2 3 200  4  -300 5  300      [ST language notation]  SAMPLE3 := MPX_INT( ARRAY1, SAMPLE1, SAMPLE2);    ·  From the six input table specified with variable ARRAY1, “-200” which is the K data  (specified by selection pointer No. K=2 in SAMPLE1) is stored in SAMPLE3.      ●  Error information  ·  When the input table exceeds the variable area, the multiplex of table data is not  processed and the data boundary is exceeded.  ·  If table word number N exceeds 256, N is limited to 256.  ·  When selection point No. K ≥ Table word number, operation is performed with K limited  to (Table word number-1).    Also, the specific register table operation error flag is set  TRUE(ON).  ·  The following operation is performed when direct I/O variable is specified for the input  table:      Controller  Action  Integrated  Controller V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  167      2.9  Type Conversion    No.  Instruction    Remarks  INT_TO_DINT    INT_TO_UINT    DINT_TO_INT    DINT_TO_UINT    UINT_TO_INT    1  Integer-Integer Conversion  UINT_TO_DINT    INT_TO_REAL    DINT_TO_REAL    2  Integer-Real Numbers Conversion UINT_TO_REAL    INT_TO_WORD    INT_TO_DWORD    DINT_TO_WORD    DINT_TO_DWORD    UINT_TO_WORD    3  Integer-Bit String Conversion  UINT_TO_DWORD    INT_TO_BCD_WORD    INT_TO_BCD_DWORD    DINT_TO_BCD_WORD    DINT_TO_BCD_DWORD    UINT_TO_BCD_WORD    4  Integer-BCD Conversion  UINT_TO_BCD_DWORD    INT_TO_TIME    DINT_TO_TIME    5  Integer-Duration Conversion  UINT_TO_TIME    REAL_TO_INT    REAL_TO_DINT    6  Real Numbers-Integer Conversion REAL_TO_UINT    REAL_TO_BCD_WORD    7  Real Numbers-BCD Conversion  REAL_TO_BCD_DWORD    8  Real Numbers-Duration  Conversion  REAL_TO_TIME    WORD_TO_INT    WORD_TO_DINT    WORD_TO_UINT    DWORD_TO_INT    DWORD_TO_DINT    9  Bit String-Integer Conversion  DWORD_TO_UINT    WORD_TO_DWORD    10  Bit String-Bit String Conversion  DWORD_TO_WORD    WORD_BCD_TO_INT    WORD_BCD_TO_DINT    WORD_BCD_TO_UINT    DWORD_BCD_TO_INT    DWORD_BCD_TO_DINT    11  BCD-Integer Conversion  DWORD_BCD_TO_UINT    Chapter 2    LD/FBD Instructions  6F8C1226  168    No.  Instruction    Remarks  WORD_BCD_TO_REAL    12  BCD-Real Numbers Conversion  DWORD_BCD_TO_REAL    WORD_BCD_TO_TIME    13  BCD-Duration Conversion  DWORD_BCD_TO_TIME    TIME_TO_INT    TIME_TO_DINT    14  Duration-Integer Conversion  TIME_TO_UINT    15  Duration-Real Numbers  Conversion  TIME_TO_REAL    TIME_TO_BCD_WORD    16  Duration-BCD Conversion  TIME_TO_BCD_DWORD    17  Truncation  TRUNC    18  Sign Negative  NEG    19  DEG-RAD Conversion  DEG_TO_RAD    20  RAD-DEG Conversion  RAD_TO_DEG    BIN_INT_P  PCS compatible  instruction  21  BIN Conversion  BIN_DINT_P  PCS compatible  instruction  DT_TO_TOD    22  Time Data Type Conversion  DT_TO_DATE    23  Concatenate Time Data  CONCAT_D_TOD    24  ASCII-HEX Conversion  ATOH_T  T compatible  instruction  25  HEX-ASCII Conversion  HTOA_T  T compatible  instruction  26  ASCII-Real Numbers Conversion  ASC_TO_REAL    27  Real Numbers-ASCII Conversion  REAL_TO_ASC    28  ASCII (decimal)-Double Integer  Conversion  ASCDEC_TO_DINT    29  ASCII (hexadecimal)-Double  Integer Conversion  ASCHEX_TO_DINT    30  Double Integer-ASCII (decimal)  Conversion  DINT_TO_ASCDEC    31  Double Integer-ASCII  (hexadecimal) Conversion  DINT_TO_ASCHEX    32  Array-String Conversion  ARRAY_TO_STRING    33  String-Array Conversion  STRING_TO_ARRAY    34  Tag Number Conversion  TO_INDEX    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  169    Integer-Integer Conversion   Type Conversion  Integer—Integer Conversion    LD/FBD language  notation    EN input  Edge execution  Index modification  Modifier  ○  ○   —  ST language notation  Output :=  □□ _TO_ □□ (Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output        Input  Output  □□_TO_□□    Input  Symbol( □□ )  Output  INT  INT_TO_DINT  INT  INT  INT_TO_UINT  INT  DINT  DINT_TO_INT  DINT  DINT  DINT_TO_UINT  DINT  UNIT  UINT_TO_INT  UNIT  UNIT  UINT_TO_DINT  UNIT  Input Output  □□_TO_□□  Chapter 2    LD/FBD Instructions  6F8C1226  170    ●  Function  ·  The entered integer data is converted to specified integer data.    ·  The conversion range and limits are shown below:      Instruction  Input  Output  Limit  INT_TO_DINT  -32768 to 32767  -32768 to 32767  —  0 to 32767  0 to 32767  —  INT_TO_UINT  Input<0  0  ○   -32768 to 32767  -32768 to 32767  —  Input<-32768  -32768  ○   DINT_TO_INT  Input>32767  32767  ○   0 to 65535  0 to 65535  —  Input<0  0  ○   DINT_TO_UINT  Input>65535  65535  ○   0 to 32767  0 to 32767  —  UINT_TO_INT  Input>32767  32767  ○   UINT_TO_DINT  0 to 65535  0 to 65535  —    ●  Program example  [LD/FBD language notation]  ♦  Normal execution        SAMPLE1  1234  LD  DINT_TO_INT SAMPLE2 1234 ST      ·  Input data “-1234” in SAMPLE1 is converted to INT and the result “-1234” is stored in  SAMPLE2.    ♦  Limit execution          SAMPLE1  40000  LD  DINT_TO_INT SAMPLE2 32768 ST      ·  Because input data “-40000” in SAMPLE1 exceeds the valid data range for INT, the  result “-32768” is stored in SAMPLE2.    [ST language notation]  SAMPLE2 := DINT_TO_INT(SAMPLE1);    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  171    Integer-Real Numbers Conversion   Type Conversion  Integer-Real Numbers Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=   □□ _TO_REAL( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input    Output  —  REAL  —  Output        Input Output □□_TO_REAL    Input  Symbol( □□ _)  INT  INT_TO_REAL  DINT  DINT_TO_REAL  UINT  UINT_TO_REAL    ●  Function  ·  The entered integer data is converted to REAL data.  ·  If input is DINT, integer data between 16777215 and 16777215 is converted precisely  to REAL.    ●  Program example  [LD/FBD language notation]    SAMPLE1 1234  LD  INT_TO_REAL SAMPLE2 1234.0 ST      [ST language notation]  SAMPLE2 := INT_TO_REAL( SAMPLE1);    ·  Input data “1234” in SAMPLE1 is converted to REAL and the result “1234.0” is stored  in SAMPLE2.    Input Output  □□_TO_ REAL  Chapter 2    LD/FBD Instructions  6F8C1226  172    Integer-Bit String Conversion   Type Conversion  Integer-Bit String Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _TO_   □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  Input    Output  —  See below  —  Output        Input Output  □□_TO_ □□    Input  Symbol( □□ )  Output  INT  INT_TO_WORD  WORD  INT  INT_TO_DWORD  DWORD  DINT  DINT_TO_WORD  WORD  DINT  DINT_TO_DWORD  DWORD  UNIT  UINT_TO_WORD  WORD  UNIT  UINT_TO_DWORD  DWORD    ●  Function  ·  The entered integer data is converted to specified bit string data.    ·  The conversion range and limits are shown below:    Instruction  Input  Output  Limit  INT_TO_WORD  -32768 to 32767  16#8000 to16#7FFF  —  INT_TO_DWORD  -32768 to 32767  16#FFFF8000 to16#00007FFF  —  -32768 to 32767  16#8000 to16#7FFF  —  Input<-32768  16#8000  ○   DINT_TO_WORD  Input>32767  16#7FFF  ○   DINT_TO_DWORD  -2147483648 to 2147483647 16#80000000 to16#7FFFFFFF  —  UINT_TO_WORD  0 to 65535  16#0 to16#FFFF  —  UINT_TO_DWORD  0 to 65535  16#0 to16#0000FFFF  —  Input Output  □□_TO_□□  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  173    ●  Program example  [LD/FBD language notation]    SAMPLE1 -1234 LD  INT_TO_WORD SAMPLE2 16#FB2E ST      [ST language notation]  SAMPLE2 := INT_TO_WORD( SAMPLE1);    ·  Input data “-1234” in SAMPLE1 is converted to WORD and the result 16#FB2E is  stored in SAMPLE2.    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  174    Integer-BCD Conversion   Type Conversion  Integer-BCD Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _TO_BCD_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output                Input  Symbol( □□ )  Output  INT  INT_TO_BCD_WORD  WORD  INT  INT_TO_BCD_DWORD  DWORD  DINT  DINT_TO_BCD_WORD  WORD  DINT  DINT_TO_BCD_DWORD DWORD  UNIT  UINT_TO_BCD_WORD  WORD  UNIT  UINT_TO_BCD_DWORD DWORD    ●  Function  ·  The entered integer data is converted to BCD data.    ·  The conversion range and limits are shown below:    Instruction  Input  Output  Limit  BCD error  0 to 9999  16#0 to16#9999  —  —  Input<0  16#0  ○   TRUE(ON)  INT_TO_BCD_WORD  Input>9999  16#9999  ○   TRUE(ON)  0 to 32767  16#0 to16#32767  —  —  INT_TO_BCD_DWORD  Input<0  16#0  ○   TRUE(ON)  0 to 9999  16#0 to16#9999  —  —  Input<0  16#0  ○   TRUE(ON)  DINT_TO_BCD_WORD  Input>9999  16#9999  ○   TRUE(ON)  Input Output  □□_TO_BCD_□□ Input Output  □□_TO_BCD_□□ 2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  175    Instruction  Input  Output  Limit  BCD error  0 to 99999999  16#0 to16#99999999 —  —  Input<0  16#0  ○   TRUE(ON)  DINT_TO_BCD_DWORD  Input>99999999  16#99999999  ○   TRUE(ON)  0 to 9999  16#0 to16#9999  —  —  UINT_TO_BCD_WORD  Input>9999  16#9999  ○   TRUE(ON)  UINT_TO_BCD_DWORD  0 to 65535  16#0 to16#65535  —  —    ●  Program example  [LD/FBD language notation]   Normal execution  SAMPLE1  1234  LD  UINT_TO_BCD_WORD SAMPLE2 16#1234 ST      ·  The input data “1234” in SAMPLE1 is converted to BCD and the result 16#1234 is  stored in SAMPLE2.     Limit execution        SAMPLE1  12345  LD  UINT_TO_BCD_WORD SAMPLE2 16#9999 ST      ·  Because input data “12345” in SAMPLE1 exceeds the valid range, the result 16#9999  is stored in SAMPLE2.    [ST language notation]  SAMPLE2 := UINT_TO_BCD_WORD( SAMPLE1);    ●  Error information  ·  If the BCD data after conversion exceeds the valid range of the output data, the  conversion result is limited by:  WORD: 16#0 or 16#9999  DWORD: 16#0 or 16#99999999  Also the specific register BCD error flag and error flags are set to TRUE(ON).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  176    Integer-Duration Conversion   Type Conversion  Integer-Duration Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _TO_TIME( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input    Output  —  TIME  —  Output          Input  Output  □□_TO_TIME    Input  Symbol( □□ _)  INT  INT_TO_TIME  DINT  DINT_TO_TIME  UINT  UINT_TO_TIME    ●  Function  ·  The entered integer data is converted to TIME data.    ·  Input data is converted as ms unit.      ●  Program example  [LD/FBD language notation]  SAMPLE1  1234  LD  INT_TO_TIME SAMPLE2 T#1234ms ST      [ST language notation]  SAMPLE2 := INT_TO_TIME( SAMPLE1);    ·  Input data “1234” in SAMPLE1 is converted to TIME and the result T#1234ms is  stored in SAMPLE2.  Input Output  □□_TO_TIME  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  177    Real Numbers-Integer Conversion   Type Conversion  Real Numbers-Integer Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := REAL_TO_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  REAL  ○   Input    Output  —  See below  —  Output                Symbol(_ □□ )  Output  REAL_TO_INT  INT  REAL_TO_DINT  DINT  REAL_TO_UINT  UINT    ●  Function  ·  The entered REAL data is converted to fixed point integer data.  ·  Fractions are rounded according to IEC60559.  2.6  →  3  3.4  →  3  -2.4  →  -2  ·  The  range  of  integer  data  after  conversion  is  as  follows.    If  the  conversion  result  exceeds this range, the limit of the output data type is output.  INT conversion  : -32768 to 32767  DINT conversion:  : -2147483648 to 2147483647  UNIT conversion  : 0 to 65535      Input Output  REAL_TO_□□  Input Output  REAL_TO_□□  Chapter 2    LD/FBD Instructions  6F8C1226  178    ●  Program example  [LD/FBD language notation]  ♦  Normal execution        SAMPLE1  4.567  LD  REAL_TO_INT SAMPLE2 5  ST      ·  Input data “4.567” in SAMPLE1 is converted to INT and the result “5” is stored in  SAMPLE2.    ♦  Limit execution        SAMPLE1  54321.0  LD  REAL_TO_INT SAMPLE2 32767 ST      ·  Input data “54321.0” in SAMPLE1 is converted to INT, but the result “32767” is stored  in SAMPLE2 because the valid data range of SAMPLE2 is exceeded.    [ST language notation]  SAMPLE2 := REAL_TO_INT( SAMPLE1);    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is 0.  When INF is input, the result is the maximum value.    Unified Controller nv series  NAN and INF data are limited by the maximum value.    ・ When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  179    Real Numbers-BCD Conversion   Type Conversion  Real Numbers-BCD Conversion    LD/FBD language  notation  Input Output  REAL_TO_BCD_□□   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := REAL_TO_BCD_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  REAL  ○   Input    Output  —  See below  —  Output      Input Output  REAL_TO_BCD_□□   Symbol(_ □□ )  Output  REAL_TO_BCD_WORD  WORD  REAL_TO_BCD_DWORD  DWORD    ●  Function  ·  The entered REAL data is rounded at the first decimal place and the result is  converted to BCD data.  ·  The conversion range and limits are shown below:    Instruction  Input  Output  Limit  BCD error  0.0 to 9999.0  16#0 to16#9999  —  —  Input<0.0  16#0  ○   TRUE(ON)  REAL_TO_BCD_WORD  Input>9999.0  16#9999  ○   TRUE(ON)  0.0 to 99999995.0 16#0 to16#99999992 —  —  Input<0.0  16#0  ○   TRUE(ON)  REAL_TO_BCD_DWORD  Input>99999995.0 16#99999999  ○   TRUE(ON)  Chapter 2    LD/FBD Instructions  6F8C1226  180    ●  Program example  [LD/FBD language notation]  ♦  Normal execution  SAMPLE1  1234.0  LD  REAL_TO_BCD_WORD SAMPLE2 16#1234 ST      ·  Converts input data “1234.0” in SAMPLE1 to BCD and stores the result 16#1234 in  SAMPLE2.    ♦  Limit execution        SAMPLE1  12345.0  LD  REAL_TO_BCD_WORD SAMPLE2 16#9999 ST      ·  Stores the result 16#9999 in SAMPLE2 because input data “12345.0” in SAMPLE1  exceeds the valid range.    [ST language notation]  SAMPLE2 := REAL_TO_BCD_WORD(SAMPLE1);    ●  Error information  ·  If the BCD data after conversion exceeds the valid range of the output data, the  conversion result is limited by:    WORD:16#0 or 16#9999  DWORD:16#0 or 16#99999999  Also, the special register BCD error flag and error flag are set to TRUE(ON).  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  When NAN is input, the result is 0.  When + INF is input the result is maximum value and  when - INF is input, the result is 0.    BCD error flag and error flag are set to TRUE(ON).  Unified Controller nv series  NAN and INF data is limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  181    Real Numbers-Duration Conversion   Type Conversion  Real Numbers-Duration Conversion    LD/FBD language  notation    Input Output  REAL_TO_TIME   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := REAL_TO_TIME(Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  REAL  ○   Input    Output  —  TIME  —  Output      ●  Function  ·  The entered REAL data is rounded at the first decimal place and the result is  converted to TIME data.  ·  Input data is converted as ms unit.    ·  After conversion, the range of duration data is from T# -2147483648ms to  T#2147483647ms. If the conversion result exceeds this range, the limit of the output  data type is output.      ●  Program example  [LD/FBD language notation]  ♦  Normal execution        SAMPLE1  4.567  LD  REAL_TO_TIME SAMPLE2 T#5ms ST    ·  Input data “4.567” in SAMPLE1 is converted to elapsed time and the result T#5ms is  stored in SAMPLE2.    ♦  Limit execution        SAMPLE1  3.4E+20  LD  REAL_TO_TIME SAMPLE2  T#2147483647ms ST    ·  Converts input data 3.4E+20 in SAMPLE1 to elapsed time, but stores the result  T#2147483647ms in SAMPLE2 because valid data range of SAMPLE2 is exceeded.    [ST language notation]  SAMPLE2 := REAL_TO_TIME( SAMPLE1); Chapter 2    LD/FBD Instructions  6F8C1226  182    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is 0.    When INF is input, the result is the maximum value.  Unified Controller nv series  NAN and INF data is limited by the maximum value.   ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  183    Bit String-Integer Conversion   Type Conversion  Bit String-Integer Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _TO_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output          Input Output □□_TO_□□    Input  Symbol( □□ )  Output  WORD  WORD_TO_INT  INT  WORD  WORD_TO_DINT  DINT  WORD  WORD_TO_UINT  UINT  DWORD  DWORD_TO_INT  INT  DWORD  DWORD_TO_DINT  DINT  DWORD  DWORD_TO_UINT  UINT  Input Output  □□_TO_□□  Chapter 2    LD/FBD Instructions  6F8C1226  184    ●  Function  ·  The entered bit string data is converted to integer data.    ·  The conversion range and limits are shown below:      Instruction  Input  Output  Limit  16#0 to16#7FFF  0 to 32767  —  WORD_TO_INT  16#8000 to16#FFFF  -32768 to -1  —  16#0 to16#7FFF  0 to 32767  —  WORD_TO_DINT  16#8000 to16#FFFF  -32768 to -1  —  WORD_TO_UINT  16#0 to16#FFFF  0 to 65535  —  16#0 to16#7FFF  0 to 32767  —  16#7FFF<Input≤16#7FFFFFFF  32767  ○   16#7FFFFFFF<Input<16#FFFF8000  -32768  ○   DWORD_TO_INT  16#FFFF8000≤Input≤16#FFFFFFFF  -32768 to -1  —  16#0 to16#7FFFFFFF  0 to 2147483647  —  DWORD_TO_DINT  16#80000000 to16#FFFFFFFF  -2147483648 to -1  —  16#0 to16#FFFF  0 to 65535  —  DWORD_TO_UINT  Input>16#FFFF  0 to 65535  (low order word is treated as UINT  data)  ○     ●  Program example  [LD/FBD language notation]      SAMPLE2 1234 ST  WORD_TO_INT SAMPLE1 16#FB2E LD      [ST language notation]  SAMPLE2 := WORD_TO_INT(SAMPLE1);    ·  The input data 16#FB2E in SAMPLE1 is converted to INT and the result “-1234” is  stored in SAMPLE2.    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  185    Bit String-Bit-String Conversion   Type Conversion  Bit String-Bit String Conversion    LD/FBD language  notation      EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _TO_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  Input    Output  —  See below  —  Output              Input Output    Input  Symbol( □□ )  Output  WORD  WORD_TO_DWORD  DWORD  DWORD  DWORD_TO_WORD  WORD    ●  Function  ·  The entered bit string data is converted to specified bit string data.    ·  The conversion range and limits are shown below:      Instruction  Input  Output  Limit  WORD_TO_DWORD  16#0 to16#FFFF 16#0 to16#FFFF  —  16#0 to16#FFFF 16#0 to16#FFFF  —  DWORD_TO_WORD  Input>16#FFFF  Low order 16 bits are  output  ○   Input Output  □□_TO_□□  □□_TO_□□  Chapter 2    LD/FBD Instructions  6F8C1226  186    ●  Program example  [LD/FBD language notation]   Normal execution  SAMPLE1  16#00001234  LD  DWORD_TO_WORD SAMPLE2 16#1234 ST      ·  The input data 16#00001234 in SAMPLE1 is converted to WORD and the result  “1234” is stored in SAMPLE2.     Limit execution        SAMPLE1  16#00012345  LD  DWORD_TO_WORD SAMPLE2 16#2345 ST      ·  Because the input data 16#00012345 in SAMPLE1 exceeds the valid data range for  WORD variable, the result 16#2345 is stored in SAMPLE2.    If EN is used, ENO is  reset to FALSE(OFF).    [ST language notation]  SAMPLE2 := DWORD_TO_WORD( SAMPLE1);    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the low order 16 bits of the input data is output.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  187    BCD-Integer Conversion   Type Conversion  BCD-Integer Conversion    LD/FBD language  notation    Input Output    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _BCD_TO_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output            Input Output    Input  Symbol( □□ )  Output  WORD  WORD_BCD_TO_INT  INT  WORD  WORD_BCD_TO_DINT  DINT  WORD  WORD_BCD_TO_UINT  UNIT  DWORD  DWORD_BCD_TO_INT  INT  DWORD  DWORD_BCD_TO_DINT DINT  DWORD  DWORD_BCD_TO_UINT UNIT    ●  Function  ·  The entered BCD data is converted to integer data.    ·  Data between 16#A and 16#F is invalid in each digit of input data.    ·  The conversion range and limits are shown below. The result is 0 if 16#A to16#F is  present in each digit.      Instruction  Input  Output  Limit  BCD error 16#0 to16#9999  0 to 9999  —  —  WORD_BCD_TO_INT  Each digit input>16#9 0  —  TRUE(ON) 16#0 to16#9999  0 to 9999  —  —  WORD_BCD_TO_DINT  Each digit input>16#9 0  —  TRUE(ON) 16#0 to16#9999  0 to 9999  —  —  WORD_BCD_TO_UINT  Each digit input>16#9 0  —  TRUE(ON) □□_BCD_TO_□□ □□_BCD_TO_□□ Chapter 2    LD/FBD Instructions  6F8C1226  188    Instruction  Input  Output  Limit  BCD error 16#0 to16#32767  0 to 32767  —  —  Input>16#32767  32767  ○   TRUE(ON) DWORD_BCD_TO_INT  Each digit input>16#9 0  —  TRUE(ON) 16#0 to16#99999999 0 to 99999999 —  —  DWORD_BCD_TO_DINT  Each digit input>16#9 0  —  TRUE(ON) 16#0 to16#65535  0 to 65535  —  —  Input>16#65535  65535  ○   TRUE(ON) DWORD_BCD_TO_UINT  Each digit input>16#9 0  —  TRUE(ON)   ●  Program example  [LD/FBD language notation]  ♦  Normal execution  SAMPLE1  16#1234  LD  WORD_BCD_TO_UINT SAMPLE2 1234  ST      ·  The  input  data  16#00001234  in  SAMPLE1  is  converted  to  WORD  and  the  result”1234” is stored in SAMPLE2.    ♦  Invalid data input        SAMPLE1  16#1A39  LD  WORD_BCD_TO_UINT SAMPLE2 0  ST      ·  Stores the result “0” in SAMPLE2 because the input data 16#1A39 in SAMPLE1  contains invalid data A.    [ST language notation]  SAMPLE2 := WORD_BCD_TO_UINT( SAMPLE1);    ●  Error information  ·  If the input BCD data contains invalid data between 16#A and 16#F, the conversion  result is “0”. Also the specific register BCD error flag and error flag are set to  TRUE(ON).    ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  189    BCD-Real Numbers Conversion   Type Conversion  BCD-Real Numbers Conversion    LD/FBD language  notation    Input Output    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _BCD_TO_REAL( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input    Output  —  REAL  —  Output          Input Output    Input  Symbol( □□ _)  WORD  WORD_BCD_TO_REAL  DWORD  DWORD_BCD_TO_REAL    ●  Function  ·  The entered BCD data is converted to REAL data.    ·  Data between 16#A and 16#F is invalid in each digit of input data.    ·  The conversion range is shown below. The result is 0 if 16#A to16#F is present in each  digit.      Instruction  Input  Output  BCD error  16#0 to16#9999  0.0 to 9999.0  —  WORD_BCD_TO_REAL  Each digit input>16#9 0.0  TRUE(ON)  16#0 to16#99999999 0.0 to 100000000.0  —  DWORD_BCD_TO_REAL  Each digit input>16#9 0.0  TRUE(ON)    □□_BCD_TO_REAL □□_BCD_TO_REAL Chapter 2    LD/FBD Instructions  6F8C1226  190    ●  Program example  [LD/FBD language notation]  ♦  Normal execution    SAMPLE1  16#1234  LD  WORD_BCD_TO_REAL SAMPLE2 1234.0 ST      ·  Input data 16#1234 in SAMPLE1 is converted to REAL and the result “1234.0” is  stored in SAMPLE2.    ♦  Invalid data input        SAMPLE1  16#1A39  LD  WORD_BCD_TO_REAL SAMPLE2 0.0  ST      ·  Stores the result 0.0 in SAMPLE2 because the input data 16#1A39 in SAMPLE1  contains invalid data A.    [ST language notation]  SAMPLE2 := WORD_BCD_TO_REAL( SAMPLE1);    ●  Error information  ·  If the input BCD data contains invalid data between 16#A and 16#F, the conversion  result is “0”. Also, the special register BCD error flag and error flag are set to  TRUE(ON).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  191    BCD-Duration Conversion   Type Conversion  BCD-Duration Conversion    LD/FBD language  notation    Input Output    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output :=  □□ _BCD_TO_TIME( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input    Output  —  TIME  —  Output          Input Output    Input  Symbol( □□ _)  WORD  WORD_BCD_TO_TIME  DWORD  DWORD_BCD_TO_TIME   ●  Function  ·  The entered BCD data is converted to TIME data.    ·  Input data is converted as ms unit.    ·  Data between 16#A and 16#F is invalid in each digit of input data.    ·  The conversion range is shown below. The result is 0 if 16#A to 16#F is present in  each digit.      Instruction  Input  Output  BCD error  16#0 to16#9999  T#0ms to T#9999ms  —  WORD_BCD_TO_TIME  Each digit input>16#9 T#0ms  TRUE(ON)  16#0 to16#99999999 T#0ms to  T#99999999ms  —  DOWRD_BCD_TO_TIME  Each digit input>16#9 T#0ms  TRUE(ON)  □□_BCD_TO_TIME □□_BCD_TO_TIME Chapter 2    LD/FBD Instructions  6F8C1226  192    ●  Program example  [LD/FBD language notation]  ♦  Normal execution  SAMPLE1  16#1234  LD  WORD_BCD_TO_TIME SAMPLE2 T#1234ms ST      ·  Input data 16#1234 in SAMPLE1 is converted to elapsed time and the result  T#1234ms is stored in SAMPLE2.    ♦  Invalid data input        SAMPLE1  16#1A39  LD  WORD_BCD_TO_TIME SAMPLE2 T#0ms ST      ·  Stores the result T#0ms in SAMPLE2 because the input data 16#1A39 in SAMPLE1  contains invalid data A.    [ST language notation]  SAMPLE2 := WORD_BCD_TO_TIME( SAMPLE1);    ●  Error information  ·  If the input BCD data contains invalid data between 16#A and 16#F, the conversion  result is “0”. Also the special register BCD error flag and error flag is set to TRUE(ON).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  193    Duration-Integer Conversion   Type Conversion  Duration-Integer Conversion    LD/FBD language  notation    Input Output    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := TIME_TO_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  TIME  ○   Input    Output  —  See below  —  Output            Input Output    Symbol(_ □□ )  Output  TIME_TO_INT  INT  TIME_TO_DINT  DINT  TIME_TO_UINT  UINT    ●  Function  ·  The entered TIME data is converted to specified integer data.    ·  Converts with output in ms unit.  ·  The conversion range and limits are shown below:      Instruction  Input  Output  Limit  -T#32768ms to                T#32767ms  -32768 to 32767  —  Input<-T#32768ms  -32768  ○   TIME_TO_INT  Input>T#32767ms  32767  ○   TIME_TO_DINT  -T#2147483648ms to              T#2147483647ms -2147483648 to              2147483647 —  T#0ms to T#65535ms  0 to 65535  —  Input<T#0ms  0  ○   TIME_TO_UINT  Input>T#65535ms  65535  ○     TIME _TO_□□  TIME _TO_□□  Chapter 2    LD/FBD Instructions  6F8C1226  194    ●  Program example  [LD/FBD language notation]  ♦  Normal execution        SAMPLE1  T#1234ms  LD  TIME_TO_INT SAMPLE2 1234 ST      ·  Converts input data -T#1234ms in SAMPLE1 to INT and stores the result “-1234” in  SAMPLE2.    ♦  Limit execution        SAMPLE1  T#40000ms  LD  TIME_TO_INT SAMPLE2 32768 ST      ·  Stores the result “-32768” in SAMPLE2 because input data -T#40000ms in SAMPLE1  exceeds the valid data range for INT.    [ST language notation]  SAMPLE2 := TIME_TO_INT( SAMPLE1);    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  195    Duration-Real Numbers Conversion   Type Conversion  Duration-Real Numbers Conversion    LD/FBD language  notation      Input Output TIME_TO_REAL   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := TIME_TO_REAL( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  TIME  ○   Input    Output  —  REAL  —  Output      ●  Function  ·  The entered TIME data is converted to REAL data.    ·  Converts with output in ms unit.  ·  TIME data between -T#16777215ms and T#16777215ms will be accurate when  converted to REAL.      ●  Program example  [LD/FBD language notation]      SAMPLE1 T#1234ms LD  TIME_TO_REAL SAMPLE2 1234.0 ST      [ST language notation]  SAMPLE2 := TIME_TO_REAL( SAMPLE1);    ·  Input data T#1234ms in SAMPLE1 is converted to REAL and the result “1234.0” is  stored in SAMPLE2.  Chapter 2    LD/FBD Instructions  6F8C1226  196    Duration-BCD Conversion   Type Conversion  Duration-BCD Conversion    LD/FBD language  notation    Input Output    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := TIME_TO_BCD_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  TIME  ○   Input    Output  —  See below  —  Output              Input Output    Symbol(_ □□ )  Output  TIME_TO_BCD_WORD  WORD  TIME_TO_BCD_DWORD  DWORD    ●  Function  ·  The entered TIME data is converted to BCD data.    ·  The conversion range and limits are shown below:    Instruction  Input  Output  Limit  BCD error T#0ms toT#9999ms  16#0 to16#9999  —  —  Input<T#0ms  16#0  ○   TRUE(ON)  TIME_TO_BCD_WORD  Input>T#9999ms  16#9999  ○   TRUE(ON)  T#0ms to            T#99999999ms 16#0 to            16#99999999 —  —  Input<T#0ms  16#0  ○   TRUE(ON)  TIME_TO_BCD_DWORD  Input>T#99999999ms 16#99999999  ○   TRUE(ON)    TIME _TO_BCD_□□ TIME _TO_BCD_□□ 2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  197    ●  Program example  [LD/FBD language notation]  ♦  Normal execution  SAMPLE1  T#1234ms  LD  TIME_TO_BCD_WORD SAMPLE2 16#1234 ST      ·  Converts input data T#1234ms in SAMPLE1 to BCD and stores the result 16#1234 in  SAMPLE2.    ♦  Limit execution        SAMPLE1  T#12345ms  LD  TIME_TO_BCD_WORD SAMPLE2 16#9999 ST      ·  Stores the result 16#9999 in SAMPLE2 because input data T#12345ms in SAMPLE1  exceeds the valid range.    [ST language notation]  SAMPLE2 := TIME_TO_BCD_WORD( SAMPLE1);    ●  Error information  ·  If the BCD data after conversion exceeds the valid range of the output data, the  conversion result is limited by:    WORD:  16#0 or 16#9999  DWORD:  16#0 or 16#99999999  Also the special register BCD error flag and error flag are set to TRUE(ON).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  198    Truncation    Type Conversion  Truncation    LD/FBD language  notation      Input Output TRUNC_□□    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := TRUNC_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  REAL  ○   Input    Output  —  See below  —  Output              Symbol(_□□)  Output  TRUNC_INT  INT  TRUNC_DINT  DINT  TRUNC_UINT  UINT  Input Output  Input Output      ●  Function  ·  The entered REAL data is converted for fixed point integer data. Fractions are  truncated.    2.6  →  2  -1.5  →  -1  -2.4  →  -2  ·  The range of integer data after conversion is as follows. If the conversion result  exceeds this range, the limit of the output data type is output.    INT conversion  : -32768 to 32767  DINT conversion  : -2147483648 to 2147483647  UINT conversion  : 0 to 65535    TRUNC_□□  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  199    ●  Program example  [LD/FBD language notation]  ♦  Normal execution        SAMPLE1  4.567  LD  TRUNC_INT SAMPLE2 4  ST      ·  Input data 4.567 in SAMPLE1 is converted to INT and the result “4” is stored in  SAMPLE2.    ♦  Limit execution        SAMPLE1  54321.0  LD  TRUNC_INT SAMPLE2 32767 ST      ·  Input data 54321.0 in SAMPLE1 is converted to INT, but the result “32767” is stored in  SAMPLE2 because the valid data range of SAMPLE2 is exceeded.    [ST language notation]  SAMPLE2 := TRUNC_INT( SAMPLE1);    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input, the result is 0.  When INF is input, the result is the maximum value.  Unified Controller nv series  NAN and INF data is limited by the maximum value.   ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  200    Sign Negative    Type Conversion  Sign Negative    LD/FBD language  notation      Input Output NEG_□□     EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := NEG_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output              Input  Symbol    Output  INT  NEG_INT  INT  DINT  NEG_DINT  DINT  REAL  NEG_REAL  REAL  Input  Output      ●  Function  ·  The sign of the input data is negated and the result is output.      ●  Program example  [LD/FBD language notation]  ♦  Normal execution                                                              SAMPLE1  1234  LD  NEG_INT  SAMPLE2 1234 ST      ·  The sign of the input data 1234 in SAMPLE1 is inverted and the result “-1234” is  stored in SAMPLE2.    NEG_□□   2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  201    ♦  Limit execution        SAMPLE1  32768  LD  NEG_INT  SAMPLE2 32767 ST      ·  The sign of the input data -32768 in SAMPLE1 is inverted, but the result “32767” is  stored in SAMPLE2 because the valid data range of SAMPLE2 is exceeded.    [ST language notation]  SAMPLE2 := NEG_INT( SAMPLE1);    ●  Error information  ·  If the conversion result of the input data exceeds the valid range of the output data  type, the limit of the output data type is output.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    Unified Controller nv series  NAN and INF data is limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  202    DEG-RAD Conversion    Type Conversion  DEG-RAD Conversion    LD/FBD language  notation      Input Output DEG_TO_RAD    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DEG_TO_RAD( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  REAL  ○   Input    Output  —  REAL  —  Output      ●  Function  ·  The entered angle data is converted to radian data.    Output = Angle ·  / 180    ●  Program example  [LD/FBD language notation]    SAMPLE1 90.0  LD  DEG_TO_RAD SAMPLE2 1.57079 ST      [ST language notation]  SAMPLE2 := DEG_TO_RAD( SAMPLE1);    ·  The input data 90 in SAMPLE1 is converted to radian and the result “1.57079” is  stored in SAMPLE2.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.    Unified Controller nv series  NAN and INF data is limited by the maximum value.   ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  203    RAD-DEG Conversion    Type Conversion  RAD-DEG Conversion      LD/FBD language  notation      Input Output RAD_TO_DEG    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := RAD_TO_DEG( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  REAL  ○   Input    Output  —  REAL  —  Output      ●  Function  ·  The entered radian data is converted to angle data.    Output = Radian data  180 /     ●  Program example  [LD/FBD language notation]    SAMPLE1 1.57079 LD  RAD_TO_DEG SAMPLE2 90.0  ST      [ST language notation]  SAMPLE2 := RAD_TO_DEG( SAMPLE1);    ·  The input data “1.57079” in SAMPLE1 is converted to angle and the result “90” is  stored in SAMPLE2.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data is limited by the maximum value.   ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  204    BIN Conversion    Type Conversion  BIN Conversion  PCS  compatible  instruction  LD/FBD language  notation      Input Output BIN_□□_P    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := BIN_ □□ _P( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output              Input Output    Input  Symbol(_ □□ )  Output  WORD  BIN_INT_P  INT  DWORD  BIN_DINT_P  DINT    ●  Function  ·  The entered BCD data is converted to INT data.    ·  The valid range of input data and the limit of output data are as follows. Input data  between 16#A and 16#F are invalid.  BIN_INT_P  :  16#0 to 16#9999  [When each digit>9; limit each digit to 9]  BIN_DINT_P  :  16#0 to16#99999999  [When each digit>9; limit each digit to 9]  BIN_□□_P  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  205    Instruction  Input  Output  Limit  Valid input    : Each digit 16#0 to 16#9 0 to 9999  —  BIN_INT_P  Invalid input    : Each digit > 16#9  Limit each digit: 9  ○   Valid input    : Each digit 16#0 to 16#9 0 to 99999999  —  BIN_DINT_P  Invalid input    : Each digit > 16#9  Limit each digit: 9  ○     ●  Program example  [LD/FBD language notation]  ♦  Normal execution  SAMPLE1  16#1234  LD  BIN_INT_P  SAMPLE2 1234  ST      ·  The input data 16#1234 in SAMPLE1 is converted to BIN and the result “1234” is  stored in SAMPLE2.    ♦  Limit execution        SAMPLE1  16#1A39  LD  BIN_INT_P  SAMPLE2 1939  ST      ·  Stores the result “1939” in SAMPLE2 because the input data 16#1A39 in SAMPLE1  contains invalid data A.    [ST language notation]  SAMPLE2 := BIN_INT_P( SAMPLE1);    ●  Error information  ·  If the input BCD data contains invalid data between 16#A and 16#F, the abnormal digit  is limited to “9”.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        Chapter 2    LD/FBD Instructions  6F8C1226  206    Time Data Type Conversion   Type Conversion  Time Data Type Conversion    LD/FBD language  notation      Input Output DT_TO_□□    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DT_TO_ □□ ( Input );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  T  ○   Input    Output  —  See below  —  Output          Input Output   Symbol(_ □□ )  Output  DT_TO_TOD  TOD  DT_TO_DATE  DATE    ●  Function  ·  The entered DT data is converted to specified TOD data or DATE data.    ·  Direct I/O variable cannot be specified for the input (Unified Controller nv series).    ●  Program example  ♦  DT_TO_TOD  [LD/FBD language notation]        SAMPLE1  DT#1999-8-24-17:34:56  LD  DT_TO_TOD SAMPLE2  TOD#17:34:56 ST    [ST language notation]  SAMPLE2 := DT_TO_TOD( SAMPLE1);    ·  The time of day data is extracted from input data DT#1999-8-24-17:34:56 in  SAMPLE1 and the result TOD#17:34:56 is stored in SAMPLE2.  DT_TO_□□  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  207    ♦  DT_TO_DATE  [LD/FBD language notation]        SAMPLE1  DT#1999-8-24-17:34:56  LD  DT_TO_DATE SAMPLE2  DATE#1999-8-24 ST      [ST language notation]  SAMPLE2 := DT_TO_DATE( SAMPLE1);    ·  The date data is extracted from input data DT#1999-8-24-17:34:56 in SAMPLE1 and  the result DATE#1999-8-24 is stored in SAMPLE2.    ●  Error information  ·  When the input exceeds the variable area, the time data type conversion is not  processed and the data boundary is exceeded.    ·  The following operation is performed if direct I/O variable is specified for the input  (Unified Controller nv series):    Controller  Action  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  Chapter 2    LD/FBD Instructions  6F8C1226  208    Concatenate Time Data   Type Conversion  Concatenate Time Data    LD/FBD language  notation     Input 1 Output CONCAT_D_TOD Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  CONCAT_D_TOD ( Input1, Input2, Output );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  —  DATE  ○   Input1 (Date data)    Input  —  TOD  ○   Input2 (Time of day  data)    Output  —  DT  —  Output      ●  Function  ·  The date data Input 1 is concatenated with time of day data Input 2 and the result is  output.    ·  Direct I/O variable cannot be specified for the output (Unified Controller nv series).  ●  Program example  [LD/FBD language notation]      SAMPLE3  DT#1999-8-24-17:34:56 ST  CONCAT_D_TOD SAMPLE2  TOD#17:34:56  LD  SAMPLE1  DATE#1999-8-24  LD      [ST language notation]  CONCAT_D_TOD ( SAMPLE1, SAMPLE2, SAMPLE3);    ·  The date data DATE#1999-8-24 in SAMPLE1 is concatenated with time data  TOD#17:34:56 in SAMPLE2 and the result DT#1999-8-24-17:34:56 is stored in  SAMPLE3.  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  209    ●  Error information  ·  When the output exceeds the variable area, concatenate time data is not processed  and the data boundary is exceeded.  ·  The following operation is performed if direct I/O variable is specified for the output-  (Unified Controller nv series):    Controller  Action  Unified Controller nv series  Concatenation of time data is not executed.    Error flag and table operation error flag are set to TRUE (ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  210    ASCII-HEX Conversion   Type Conversion  ASCII-HEX Conversion  T compatible  instruction  LD/FBD language  notation      Source  table Destination table ATOH_T  Table  size TBL N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  ATOH_T ( TBL, N, destination table);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Source table    Input  N  UINT  ○   Table size  1≤N≤64  Output  —  PTR  —  Destination table      ●  Function  ·  The N word ASCII data starting at variable specified with source table TBL is  converted to WORD and the result is stored in destination table.  ·  Conversion is performed from low order byte of the source table and stored from the  highest digit of the destination table.  ·  Valid ASCII data is “0”(16#30) to “9”(16#39) and “A”(16#41) to “F”(16#46).  ·  If the table size is odd, only the high order byte is updated in the final data of the  destination table.  ·  Table size N is the size of the source table and may be between 1 and 64.  ·  If N=0, no conversion is performed.    ·  Direct I/O variable cannot be specified for source table or destination table (Integrated  Controller, S Controller and Unified Controller).      2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  211    ●  Program example  [LD/FBD language notation]        F 8 7 0 “B” (16#42) “A” (16#41) “1” (16#31) “0” (16#30) “3” (16#33) “2” (16#32) “5” (16#35) “4” (16#34) “7” (16#37) “6” (16#36) “9” (16#39) “8” (16#38) “F” (16#46) “E” (16#45) “D” (16#44) “C” (16#43) “1” (16#31) “0” (16#30) F 0 16#0123  16#4567  16#89AB  16#CDEF  16#01  Conversion 9 words ARRAY1  LD  SAMPLE2  9  LD  ATOH_T TBL      N  ARRAY2  ST  Source table (ASCII data)  ARRAY1  Destination table (WORD)  ARRAY2  Because N=9, only the high order byte is  updated for the final word of the  destination table. Low order byte is  previous value.      [ST language notation]  ATOH_T ( ARRAY1, SAMPLE2, ARRAY2);    ·  The nine words ASCII data starting at source table ARRAY1 is converted to WORD  and the result is stored in ARRAY2.  ·  Because the table size is odd, only the top byte of the destination table ARRAY2[4] is  updated and the low order byte retains the previous value.    ●  Error information  ·  When the source table and destination table exceed the variable area, the ASCII—HEX  conversion is not processed and the data boundary is exceeded.  ·  The following operation is performed when there are invalid data (ASCII codes other  than  “0”to“9”and  “A”to“F”):      Controller  Action  Integrated Controller  V series  S Controller  ASCII—HEX conversion is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  ASCII—HEX conversion is not executed.    Error flag and ASCII data conversion error flag are  set to TRUE(ON).    ·  If table size N exceeds 64, it is limited to N=64.    ·  The following operation is performed when direct I/O variable is specified for the  source table or destination table:      Controller  Action  Integrated Controller  V series  S Controller  ASCII—HEX conversion is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  ASCII—HEX conversion is not executed.    Error flag and ASCII data conversion error flag are  set to TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  Chapter 2    LD/FBD Instructions  6F8C1226  212    HEX-ASCII Conversion   Type Conversion  HEX-ASCII Conversion  T compatible  instruction  LD/FBD language  notation      Source  table Destination table HTOA_T  Table  size TBL N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  HTOA_T ( TBL, N, destination table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Source table    Input  N  UINT  ○   Table size  1≤N≤32  Output  —  PTR  —  Destination table      ●  Function  ·  The N word WORD data starting at variable specified with source table TBL is  converted to ASCII data and the result is stored in destination table.  ·  Conversion is performed from top of the source table and stored from the low order  byte of the destination table.  ·  Table size N is the size of the source table and may be between 1 and 32.  ·  If N=0, no conversion is performed.  ·  Direct I/O variable cannot be specified for the source table or destination table  (Integrated Controller, S Controller, Unified Controller).    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  213    ●  Program example  [LD/FBD language notation]                                    Source table (WORD)                                          Destination table (ASCII data)                                      ARRAY1                                                        ARRAY2                        F  0 16#0123 16#4567  16#89AB 16#CDEF  Conversion F 8 7 0  “B”(16#42) “A”(16#41)  “1”(16#31) “0”(16#30)  “3”(16#33) “2”(16#32)  “5”(16#35) “4”(16#34)  “7”(16#37) “6”(16#36)  “9”(16#39) “8”(16#38)  “F”(16#46) “E”(16#45)  “D”(16#44) “C”(16#43)  8 words ARRAY1    LD  SAMPLE2  4  LD  HTOA_T   TBL        N  ARRAY2   ST      [ST language notation]  HTOA_T ( ARRAY1, SAMPLE2, ARRAY2);    ·  The four words WORD data starting at source table ARRAY1 is converted to ASCII  and the result is stored in variable ARRAY2.    ●  Error information  ·  When the source table and destination table exceed the variable area, HEX-ASCII  conversion is not processed and the data boundary is exceeded.  ·  If table size N exceeds 32, it is limited to N=32.  ·  The following operation is performed if direct I/O variable is specified for the source  table or destination table:      Controller  Action  Integrated Controller  V series  S Controller  HEX-ASCII conversion is not executed.    Error flag is set to TRUE(ON).    Unified Controller nv series  HEX-ASCII conversion is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  214    ASCII-Real Numbers Conversion   Type Conversion  ASCII-Real Numbers Conversion    LD/FBD language  notation     Input  string Output  ASC_TO_REAL Converted  N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ASC_TO_REAL ( Input string, N );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  —  STRING  —  Input string    Input  N  UINT  ○   Converted  characters  1≤N≤64  Output  —  REAL  —  Output      ●  Function  ·  N characters from the beginning of the entered input string are converted to REAL.  ·  The input string may be expressed in numerical or exponential format.  Numerical format:123.456  Exponential format:-123.456E+2  ·  The valid range of converted characters is 1 ≤ N ≤ 64. If N=0, no conversion is  performed.  ·  The following characters may be converted.    However, spaces are valid only when  they are at the beginning of the string.    A space character is also counted as one  character.  +, -, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, E, e, .(period),    (space)  ·  The entered character string is analyzed as follows:                  ·  Direct I/O variable cannot be specified for the input string (Integrated Controller, S  Controller, Unified Controller).    SP  e +  Number . Number  .  E +  Number 2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  215    ●  Program example  [LD/FBD language notation]  ♦  When the input string is specified in numerical format:    SAMPLE3 162.25  ST  ASC_TO_REAL SAMPLE2  6  LD  SAMPLE1  162.25  LD  N    ·  Six characters (specified by SAMPLE2) starting from the beginning of string “162.25”  in SAMPLE1 are converted to REAL and the result “162.25” is stored in SAMPLE3.    ♦  When the input string is specified in exponential format:    SAMPLE3 0.125  ST  ASC_TO_REAL SAMPLE2  7  LD  SAMPLE1  12.5E-23  LD  N    ·  Seven characters (specified by SAMPLE2) starting from the beginning of string  “12.5E-23” in SAMPLE1 are converted to REAL and the result “0.125” is stored in  SAMPLE3.    [ST language notation]  SAMPLE3 := ASC_TO_REAL (SAMPLE1, SAMPLE2);    ●  Error information  ·  When the input string exceeds the variable area, ASCII-real numbers conversion is not  processed and the data boundary is exceeded.  ·  If there is a character code that cannot be converted within N characters from the  beginning of the input string, “0” is output as the result.  ·  When the number of input characters is greater than the converted characters N, N is  limited to the number of entered characters.  ·  If the converted data exceeds the range of REAL data, “0” is output as the result.  ·  If converted characters N exceeds 64, it is limited to N=64.  ·  The following operation is performed if direct I/O variable is specified for the input  string:    Controller  Action  Integrated Controller  V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  Chapter 2    LD/FBD Instructions  6F8C1226  216    Real Numbers-ASCII Conversion   Type Conversion  Real Numbers-ASCII Conversion    LD/FBD language  notation      Input  data Output  REAL_TO_ASC Output  char SIZE  Decimal  characte N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  REAL_TO_ASC (Input data, SIZE, N, Output );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  —  REAL  ○   Input data    SIZE  UINT  ○   Output characters Input≥0 : 0≤SIZE≤9  Input<0 : 0≤SIZE≤10  Input  N  UINT  ○   Decimal  characters  0≤N≤7  Output  —  REAL  —  Output      ●  Function  ·  The entered REAL data is converted to fixed point decimal string format specified by  SIZE and N and the result is output.  ·  SIZE specifies the number of output characters including the decimal characters N  and the valid range depends on whether the input data is positive or negative.  Input data ≥ 0    :0 ≤ SIZE ≤ 9  Input data < 0    :0 ≤ SIZE ≤ 10  ·  N specifies the number of decimal characters in the output string and the valid range is  0 ≤ N ≤ 7.  Largest value that can be converted: ±9999999.0 (Positive: SIZE=9, N=1 specified,  Negative: SIZE=10, N=1 specified)  Smallest value that can be converted: ±0.0000001 (Positive: SIZE=9, N=7 specified,  Negative: SIZE=10, N=7 specified)  ·  If the converted result cannot be stored in the output string format specified by SIZE  and N, an error flag in the specific register is set to TRUE(ON) to indicate that  characters are truncated.  ·  When SIZE=0, the result is NULL.          .    N SIZE    ·  Direct I/O variable cannot be specified for the output string (Integrated Controller, S  Controller, Unified Controller).    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  217    ●  Program example  [LD/FBD language notation]  ♦  Normal execution    SAMPLE4 162.2  ST  REAL_TO_ASC           SAMPLE2  5  LD  SAMPLE1  162.25  LD  SAMPLE3  1  LD  SIZE  N      ·  REAL data 162.25 in SAMPLE1 is converted to string using output characters “5” in  SAMPLE2 and decimal characters 1 in SAMPLE3 and the result “162.2” is stored in  SAMPLE4.    ♦  Abnormal execution    SAMPLE4 -12.3  ST  REAL_TO_ASC SAMPLE2  5  LD  SAMPLE1  -12.345  LD  SAMPLE3  2  LD  SIZE  N      ·  REAL data -12.345 in SAMPLE1 is converted to string using output characters “5” in  SAMPLE2 and decimal characters 2 in SAMPLE3 and the result “-12.3” is stored in  SAMPLE4.    The error flag in specific register is set to TRUE(ON) to indicate that  characters are truncated.    [ST language notation]  REAL_TO_ASC ( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    Chapter 2    LD/FBD Instructions  6F8C1226  218    ●  Error information  ·  When the output exceeds the variable area, real numbers-ASCII conversion is not  processed and the data boundary is exceeded.  ·  If the converted result cannot be stored within SIZE, an error flag in the specific  register is set to TRUE(ON) to indicate that characters are truncated.  ·  No conversion is performed when SIZE is greater than the defined string size.  ·  The following operation is performed when the input data is NAN:      Controller  Action  Integrated Controller V series  Not converted when NAN is input.    Unified Controller nv series  NAN and INF data is limited by the maximum value. ·  If SIZE and N specifying the output string format exceed the valid range, they are  limited by the maximum valid value.  ·  When |input data| > 9999999, input data is limited to ±9999999.  ·  The following operation is performed when direct I/O variable is specified for the output  string:        Controller  Action  Integrated Controller  V series  S Controller  Real Numbers-ASCII conversion is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Real Numbers-ASCII conversion is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  219    ASCII (decimal)-Double Integer Conversion   Type Conversion  ASCII(decimal)-Double Integer Conversion    LD/FBD language  notation      Conversion  table Output  ASCDEC_TO_DINT  Table  size TBL  N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ASCDEC_TO_DINT ( TBL, N );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Conversion table    Input  N  UINT  ○   Table size  1≤N≤64  Output  —  DINT  —  Output      ●  Function  ·  From conversion table TBL consisting of decimal ASCII data (including end code CR),  the number of words specified by table size N are converted to DINT and the result is  output.  ·  Valid ASCII data are “0”(16#30) to “9”(16#39), “-”(16#2D), “+”(16#2B) and CR(16#0D).  ·  The content of the conversion table that is subject to conversion starts with a number,  “+” or “—” and ends with end code CR.  ·  Table size N is from 1 to 64. When N=0, the result is output as 0.  ·  The range of data to be converted is from -2147483648 to 2147483647.  ·  The data format of the conversion table is as follows:    1) 12345678    0  “2” (16#32)  “1” (16#31) 1  “4” (16#34)  “3” (16#33) 2  “6” (16#36)  “5” (16#35) 3  “8” (16#38)  “7” (16#37) 4   CR (16#0D) 5       2) -876543210  0 “8” (16#38) “-” (16#2D) 1 “6” (16#36) “7” (16#37) 2 “4” (16#34) “5” (16#35) 3 “2” (16#32) “3” (16#33) 4 “0” (16#30) “1” (16#31) 5    CR(16#0D) 3) +135792468  0 “1” (16#31)  “+” (16#2B) 1 “5” (16#35)  “3” (16#33) 2 “9” (16#39)  “7” (16#37) 3 “4” (16#34)  “2” (16#32) 4 “8” (16#38)  “6” (16#36) 5     CR (16#0D)     ·  Direct I/O variable cannot be specified for the conversion table (Integrated Controller,  S Controller, Unified Controller).  Chapter 2    LD/FBD Instructions  6F8C1226  220    ●  Program example  [LD/FBD language notation]  ♦  Normal execution    SAMPLE2 -1234  ST  ASCDEC_TO_DINT           SAMPLE1  3  LD  TBL1    LD  TBL  N  TBL1 structure  0 "1"(16#31)  "- " (16#2D)  1 "3" (16#33)  "2" (16#32)  2 CR(16#0D)  "4" (16#34)      ·  Starting with conversion table TBL1, the 3 words ASCII data specified by SAMPLE1 is  converted to DINT and the result “-1234” is stored in SAMPLE2.    ♦  Abnormal execution    SAMPLE2 0  ST  ASCDEC_TO_DINT           SAMPLE1  3  LD  TBL1    LD  TBL  N  TBL1 structure  0 "1" (16#31)  "-" (16#2D)  1 "3" (16#33)  "2" (16#32)  2 "5" (16#35)  "4" (16#34)      ·  Because no CR code is detected when converting the 3 words ASCII data specified by  SAMPLE1 starting with conversion TBL1 to DINT, the result “0” is stored in SAMPLE2  and the special register error flag is set to TRUE(ON).    [ST language notation]  SAMPLE2 := ASCDEC_TO_DINT (TBL1, SAMPLE1);    ●  Error information  ·  When the conversion table exceeds the variable area, ASCII (decimal) -double integer  conversion is not processed and the data boundary is exceeded.  ·  The following operation is performed if an ASCII code other than the specified  character is present before the CR code, if “+” or    “-” is present anywhere other than  the beginning of data, or if the CR code is not present.    Controller  Action  Integrated Controller  V series  S Controller  Result is 0.    Error flag is set to TRUE(ON).  Unified Controller nv series  Result is 0.    Error flag and ASCII data conversion error flag are  set to TRUE(ON).  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  221    ·  The following operation is performed if the conversion result exceeds the maximum  value of DINT type.      Controller  Action  Integrated Controller  V series  S Controller  Result is the limit value.    Error flag is set to TRUE(ON).  Unified Controller nv series  Result is the limit value.    Error flag and ASCII data conversion error flag are  set to TRUE(ON).    ·  If table size exceeds 64, it is limited to N=64.  ·  The following operation is performed when direct I/O variable is specified for the  conversion table:      Controller  Action  Integrated Controller  V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.    Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  222    ASCII(Hexadecimal) -Double Integer Conversion    Type Conversion  ASCII (Hexadecimal) -Double Integer Conversion    LD/FBD language  notation      Conversion  table Output ASCHEX_TO_DINT  Table  size TBL  N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ASCHEX_TO_DINT ( TBL, N );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL  PTR  —  Conversion table    Input  N  UINT  ○   Table size  1N≤64  Output  —  DINT  —  Output      ●  Function  ·  From conversion table TBL consisting of hexadecimal ASCII data (including end code  CR), the numbers of words specified by table size N are converted to DINT and the  result is output.  ·  Valid ASCII data are as follows:  “0” (16#30) to “9” (16#39), “A”(16#41) to “F”(16#46), “a”(16#61) to “f”(16#66) and  CR(16#0D)  ·  The content of the conversion table that is subject to conversion starts with a number,  “A” to “F”, or “a” to “f” and ends with end code CR.  ·  Table size N is from 1 to 64. When N=0, the result is output as 0.  ·  The data to be converted is from 0 to FFFFFFFF.  ·  The data format of the conversion table is as follows:    1) 12345678  0  “2” (16#32)  “1” (16#31) 1  “4” (16#34)  “3” (16#33) 2  “6” (16#36)  “5” (16#35) 3  “8” (16#38)  “7” (16#37) 4   CR (16#0D) 5       2) ABCDef01  0 “B” (16#42) “A” (16#41) 1 “D” (16#44) “C” (16#43) 2 “f” (16#66) “e” (16#65) 3 “1” (16#31) “0” (16#30) 4    CR (16#0D) 5           ·  Direct I/O variable cannot be specified for the conversion table (Integrated Controller,  S Controller, Unified Controller).  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  223    ●  Program example  [LD/FBD language notation]  ♦  Normal execution    SAMPLE2 109364  ST  ASCHEX_TO_DINT           SAMPLE1  3  LD  TBL1    LD  TBL  N  TBL1  structure  0 "A" (16#41)  "1" (16#31)  1 "3" (16#33)  "B" (16#42)  2 CR(16#0D)  "4" (16#34)      ·  Starting with conversion table TBL1, the 3 words ASCII data specified by SAMPLE1 is  converted to DINT and the result “109364” is stored in SAMPLE2.    ♦  Abnormal execution    SAMPLE2 0  ST  ASCHEX_TO_DINT           SAMPLE1  3  LD  TBL1    LD  TBL  N  TBL1 structure  0 "1" (16#31)  "0" (16#30)  1 "3" (16#33)  "2" (16#32)  2 "5" (16#35)  "4" (16#34)      ·  Because no CR code is detected when converting the 3 words ASCII data specified by  SAMPLE1 starting with conversion TBL1 to DINT, the result “0” is stored in SAMPLE2  and the special register error flag is set to TRUE(ON).    [ST language notation]  SAMPLE2 := ASCHEX_TO_DINT( TBL1, SAMPLE1);    ●  Error information  ·  When the conversion table exceeds the variable area, ASCII(hexadecimal)-double  integer conversion is not processed and the data boundary is exceeded.  ·  The following operation is performed if an ASCII code other than the specified  character is present before the CR code or if the CR code is not present:    Controller  Action  Integrated Controller  V series  S Controller  Result is 0.  Error flag is set to TRUE(ON).  Unified Controller nv series  Result is 0.  Error flag and ASCII data conversion error flag are  set to TRUE(ON).    Chapter 2    LD/FBD Instructions  6F8C1226  224    ·  The following operation is performed if the conversion result exceeds the maximum  value of DINT type:      Controller  Action  Integrated Controller  V series  S Controller  Result is the limit value.    Error flag is set to TRUE(ON).  Unified Controller nv series  Result is the limit value.    Error flag and ASCII data conversion error flag are  set to TRUE(ON).    ·  If the table size exceeds 64, it is limited to N=64.    ·  The following operation is performed if direct I/O variable is specified for the  conversion table:      Controller  Action  Integrated Controller  V series  S Controller  Error flag is set to TRUE(ON) and the result is 0.    Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  225    Double Integer-ASCII (decimal) Conversion   Type Conversion  Double Integer-ASCII (decimal) Conversion    LD/FBD language  notation  Conversion  Destination  DINT_TO_ASCDEC Table  size IN  N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  DINT_TO_ASCDEC ( IN, N, Destination table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  DINT  —  Conversion data    Input  N  UINT  ○   Table size  1≤N≤64  Output  —  PTR  —  Destination table      ●  Function  ·  Conversion data IN is converted to decimal ASCII data and the result is output with  end code CR appended at the end of converted ASCII data. Also, the number of  converted character codes is output to index register XL. (XL contains the number of  character codes including the end code CR.  ·  Table size N is from 1 to 64. No operation is performed when N=0.  ·  The range of data to be converted is from -2147483648 to 2147483647.  ·  The data format of the destination table is as follows:    1) 1234567890  0  "2" (16#32)  "1" (16#31) 1  "4" (16#34)  "3" (16#33) 2  "6" (16#36)  "5" (16#35) 3  "8" (16#38)  "7" (16#37) 4  "0" (16#30)  "9" (16#39) 5   CR(16#0D) 2) -876543210  0 "8" (16#38) "-" (16#2D) 1 "6" (16#36) "7" (16#37) 2 "4" (16#34) "5" (16#35) 3 "2" (16#32) "3" (16#33) 4 "0" (16#30) "1" (16#31) 5    CR(16#0D)     ·  Direct I/O variable cannot be specified for the destination table (Integrated Controller,  S Controller, Unified Controller).  Chapter 2    LD/FBD Instructions  6F8C1226  226    ●  Program example  [LD/FBD language notation]  ♦  Normal execution    TBL1   ST  DINT_TO_ASCDEC           SAMPLE2  3  LD  SAMPLE1  -1234  LD  IN  N  TBL1 structure  0 "1" (16#31)  "-" (16#2D)  1 "3" (16#33)  "2" (16#32)  2 CR(16#0D)  "4" (16#34)      ·  Content -1234 of conversion table SAMPLE1 is converted to ASCII (decimal) and the  result is stored in a 3 words area specified by SAMPLE2 starting from destination table  TBL1. The number of characters “6” is stored in index register XL.    ♦  Abnormal execution    TBL1   ST  DINT_TO_ASCDEC           SAMPLE2  3  LD  SAMPLE1  -12345  LD  IN  N  TBL1 structure  0 "1" (16#31)  "4" (16#34)  1     CR(16#0D)  2        Content of TBL1 is unchanged.      ·  Because the content of conversion data SAMPLE1 cannot be converted to ASCII  (decimal) and stored in 3 words area specified by SAMPLE2 and starting with  destination table TBL1    (four words are required), the contents of storage destination  table TBL1 and index register XL are unchanged. Also, the special register error flag is  set to TRUE(ON).    [ST language notation]  DINT_TO_ASCDEC ( SAMPLE1, SAMPLE2, TBL1);    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  227    ●  Error information  ·  When the destination table exceeds the variable area, the double integer-ASCII  (decimal) conversion is not processed and the data boundary is exceeded.  ·  The following operation is performed if the conversion result cannot be stored in area  with number of words specified by “N”:      Controller  Action  Integrated Controller  V series  S Controller  Destination table and index register XL are not  updated.  Error flag is set to TRUE(ON).  Unified Controller nv series  Destination table and index register XL are not  updated.  Error flag and ASCII data conversion error flag are  set to TRUE(ON).      ·  If table size exceeds 64, it is limited to N=64.  ·  The following operation is performed if direct I/O is specified for the destination table:      Controller  Action  Integrated Controller  V series  S Controller  Double integer-ASCII (decimal) conversion is not  executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Double integer-ASCII (decimal) conversion is not  executed.    Error flag and table operation error flag are set to  TRUE(ON).      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  228    Double Integer-ASCII (hexadecimal) Conversion    Type Conversion  Double Integer-ASCII (hexadecimal) Conversion      LD/FBD language  notation  Conversion  Destination  table  DINT_TO_ASCHEX Table  size IN  N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  DINT_TO_ASCHEX ( IN, N, Destination table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  DINT  —  Conversion data    Input  N  UINT  ○   Table size  1≤N≤64  Output  —  PTR  —  Destination table      ●  Function  ·  Conversion data IN is converted to hexadecimal ASCII data and the result is output  with end code CR appended at the end of converted ASCII data. Also, the number of  converted character codes is output to index register XL (XL contains the number of  character codes including the end code CR).  ·  Table size N is from 1 to 64. No operation is performed when N=0.  ·  The range of data to be converted is from -2147483648 to 2147483647.  ·  The data format of the storage destination table is as follows:      1) 305419896  0  "2" (16#32)  "1" (16#31) 1  "4" (16#34)  "3" (16#33) 2  "6" (16#36)  "5" (16#35) 3  "8" (16#38)  "7" (16#37) 4  0  CR(16#0D) 5       2) -87654321  0 "A" (16#41) "F" (16#46) 1 "6" (16#36) "C" (16#43) 2 "0" (16#30) "8" (16#38) 3 "F" (16#46) "4" (16#34) 4 0  CR(16#0D) 5           ·  Direct I/O variable cannot be specified for the destination table (Integrated Controller,  S Controller, Unified Controller).  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  229    ●  Program example  [LD/FBD language notation]  ♦  Normal execution    TBL1   ST  DINT_TO_ASCHEX           SAMPLE2  3  LD  SAMPLE1  332340  LD  IN  N  TBL1 structure  0 "1" (16#31)  "5" (16#35)  1 "3" (16#33)  "2" (16#32)  2 CR(16#0D)  "4" (16#34)      ·  Content 332340 of conversion table SAMPLE1 is converted to ASCII (hexadecimal)  and the result is stored in a 3 words area specified by SAMPLE2 starting from  destination table TBL1. The number of characters “6” is stored in index register XL.    ♦  Abnormal execution    TBL1   ST  DINT_TO_ASCHEX           SAMPLE2  2  LD  SAMPLE1  4660  LD  IN  N  TBL1 structure  0 "1" (16#31)  "4" (16#34)  1     CR(16#0D)  2        Content of TBL1 is unchanged.      ·  Because the content of conversion data SAMPLE1 cannot be converted to ASCII  (hexadecimal) and stored in 2 words area specified by SAMPLE2 and starting with  destination table TBL1 (three words are required), the contents of destination table  TBL1 and index register XL are unchanged. Also, the special register error flag is set  to TRUE(ON).    [ST language notation]  DINT_TO_ASCHEX ( SAMPLE1, SAMPLE2, TBL1);    ●  Error information  ·  When the destination table exceeds the variable area, the double integer-ASCII  (hexadecimal) conversion is not processed and the data boundary is exceeded.  ·  The following operation is performed if the conversion result cannot be stored in area  with number of words specified by “N”:      Controller  Action  Integrated Controller  V series  S Controller  Destination table and index register XL are not  updated.    Error flag is set to TRUE(ON).  Unified Controller nv series  Destination table and index register XL are not  updated.    Error flag and ASCII data conversion error flag are  set to TRUE(ON).    Chapter 2    LD/FBD Instructions  6F8C1226  230    ·  if the table size exceeds 64, it is limited to N=64.    ·  The following operation is performed when direct I/O is specified for the destination  table:      Controller  Action  Integrated Controller  V series  S Controller  Double integer-ASCII (hexadecimal) conversion is  not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Double integer-ASCII (hexadecimal) conversion is  not executed.    Error flag and table operation error flag are set to    TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  231    Array-String Conversion   Type Conversion  Array-String Conversion    LD/FBD language  notation      Array  data Destination string  variable  ARRAY_TO_STRING Table  size IN  N  EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  ARRAY_TO_STRING ( IN, N, Destination string variable );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  PTR  —  Array data    Input  N  UINT  ○   Table size  1≤N≤129  Output  —  STRING  —  Destination string  variable      ●  Function  ·  An N word shift JIS character code starting from input array data IN is output as  STRING.  ·  The data to be converted is N words starting from IN and ends with CR code (16#0D).  ·  The table size N indicates the conversion size of the array data. No operation is  performed when N=0.  ·  The range of table size N is from 1 to 129 (up to 256 bytes + CR code).  ·  The data formats of the source and destination table are as follows:    0  1 2  3  4  5  “2” (16#32) “1” (16#31)  “4” (16#34) “3” (16#33)  “6” (16#36) “5” (16#35)  “8” (16#38) “7” (16#37)  CR (16#0D)      0 1 2 3 4 5 “8” (16#38) “-” (16#2D) “6” (16#36) “7” (16#37) “4” (16#34) “5” (16#35) “2” (16#32) “3” (16#33) “CR” (16#0D) “1” (16#31)     0  1 2  3  4  5  “2” (16#32) “1” (16#31)  “4” (16#34) “3” (16#33)  “6” (16#36) “5” (16#35)  “8” (16#38) “7” (16#37)  41        STRING length=8  VAR length=6  7  6  0 1 STRING length=9 VAR length=6 2 3 4 5 6 7 “8” (16#38) “-” (16#2D) “6” (16#36) “7” (16#37) “4” (16#34) “5” (16#35) “2” (16#32) “3” (16#33)  “1” (16#31)     Ex. when character string is declared as  follows:    Var. Data type  Dec.  A  STRING [12]  VAR  <Source>  <Destination>  Character code storage area word  count as STRING [12]  Number of Stored character  Stored character codes  1) 12345678  2) -87654321  N=5  N=5    ·  Direct I/O variable cannot be specified for the input string and destination string  (Integrated Controller, S Controller, Unified Controller).  Chapter 2    LD/FBD Instructions  6F8C1226  232    ●  Program example  [LD/FBD language notation]    SAMPLE2   ST  ARRAY_TO_STRING           SAMPLE1  3  LD  TBL1   LD  IN  N  TBL1 structure  0 "1" (16#31)  "5" (16#35)  1 "3" (16#33)  "2" (16#32)  2 CR(16#0D)  "4" (16#34)  <Variable declaration>  Variable  Data type  Dec.  SAMPLE2  STRING [12]  VAR    SAMPLE2 result  0 "1" (16#31)  "5" (16#35)  1 "3" (16#33)  "2" (16#32)  2   "4" (16#34)  String length=5  VAR length=6  3 4     5     6     7 3 "7" (16#37)  "6" (16#36)    [ST language notation]  ARRAY_TO_STRING( TBL1, SAMPLE1, SAMPLE2);    ·  Starting with source array data TBL1, 3 words array data specified by SAMPLE1 is  stored in STRING SAMPLE2. The data up to the end code CR in the source are  converted.    ●  Error information  ·  When the array data and destination string exceed the variable area, the array—string  conversion is not processed and the data boundary is exceeded.  ·  If the source data cannot be stored in the destination STRING variable (INT((number  of character codes up to CR+1)/2) > VAR length), the result is unchanged.  ·  If there is no CR code in the N word array starting with the source data, the result is  unchanged (data format error).  ·  If the array data contains invalid 2 byte character code, it is replaced with “??” in the  result.  ·  If N>129, the operation is limited to N=129.    ·  The following operation is performed when direct I/O variable is specified for the  source array and output string.    Controller  Action  Integrated  Controller  V series  S Controller  Array—string conversion is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Array—string conversion is not executed.    Error flag and table operation error flag are set to  TRUE(ON).      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  233    String-Array Conversion   Type Conversion  String-Array Conversion    LD/FBD language  notation    Input  string Destination  array  STRING_TO_ARRAY  Converted  characters IN  L  P  Start  of  converted characters   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  STRING_TO_ARRAY ( IN, L, P, Destination array );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  STRING  —  Input string    L  UINT  ○   Converted  characters    Input  P  UINT  ○   Start of converted  characters    Output  —  PTR  —  Destination array      ●  Function  ·  L character codes from the P character of the input string IN are stored in the specified  array.  ·  CR code (16#0D) is appended at the end of the converted character code.  ·  No operation is performed when L=0.  ·  The data formats of the input string and destination are as follows:    0  1 2  3  4  5  “3” (16#33)  “2” (16#32)  “5” (16#35)  “4” (16#34)    CR (16#0D)              0 1 2 3 4 5 “6” (16#36) “7” (16#37) “4” (16#34) “5” (16#35) CR (16#0D) “3” (16#33)             0  1 2  3  4  5  “2” (16#32)  “1” (16#31)  “4” (16#34)  “3” (16#33)  “6” (16#36)  “5” (16#35)  “8” (16#38)  “7” (16#37)          STRING length=8  VAR length=6  7  6  0 1 STRING length=9 VAR length=6 2 3 4 5 6 7 “8” (16#38) “-” (16#2D) “6” (16#36) “7” (16#37) “4” (16#34) “5” (16#35) “2” (16#32) “3” (16#33)  “1” (16#31)     Ex. when string variable is declared as  follows:  Var.  Data type  Dec.  A  STRING[12]  VAR  <Input string>  <Destination array>  Character code storage area words as STRING[12] Number of Stored character  Stored character code  1) “12345678”  2) “-87654321”  When L=4, P=2  When L=5, P=3     ·  Direct I/O variable cannot be specified for the input string and destination array  (Integrated Controller, S Controller, Unified Controller).    Chapter 2    LD/FBD Instructions  6F8C1226  234    ●  Program example  [LD/FBD language notation]      TBL1   ST  STRING_TO_ARRAY   SAMPLE2 3  LD  SAMPLE1   LD  IN  L  TBL1 result 0 "1" (16#31)    1 "3" (16#33)  "2" (16#32)  2 CR(16#0D)    SAMPLE1 structure  0 "1" (16#31)  "5" (16#35)  1 "3" (16#33)  "2" (16#32)  2   "4" (16#34)  String length=5  VAR length=6  3 4     5     6     7 3       SAMPLE3 2  LD  P  <Variable declaration>  Variable  Data type  Dec.  SAMPLE1  STRING [12]  VAR      [ST language notation]  STRING_TO_ARRAY ( SAMPLE1, SAMPLE2, SAMPLE3, TBL1);    ·  In the source input string SAMPLE1, 3 characters specified by SAMPLE2 from  character start position 2 specified by SAMPLE3 are output to destination array TBL1  with end code CR appended.    ●  Error information  ·  When the input string and destination array exceed the variable area, the string—array  conversion is not processed and the data boundary is exceeded.  ·  When the conversion character position P=0, L characters from the beginning are  stored in the array.  ·  When conversion character position P > storage character count, only CR code is  stored in the array.  ·  The following operation is performed when direct I/O variable is specified for the input  string and destination array:      Controller  Action  Integrated Controller  V series  S Controller  String—array conversion is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  String—array conversion is not executed.    Error flag and table operation error flag are set to  TRUE(ON).      ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.  2.9    Type Conversion  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  235    Tag Number Conversion   Type Conversion  Tag Number Conversion    LD/FBD language  notation    Tag  variable Tag  TO_INDEX  Tag  type TAG  TYPE   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Tag number := TO_INDEX ( TAG, TYPE );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TAG  PTR  —  Tag variable  (parameter)    Input  TYPE  UINT  ○   Tag type  0 : PV、  1 : LP、    2 : PB、  3 : SQ  Output  —  DINT  —  Tag number      ●  Function  ·  The variable specified with tag variable TAG is converted to an array number within  the type specified with tag type TYPE, and the result is output.  ·  The range of the tag type is from 0 to 3 (from 0 to 2 for the MCS type tag controller  (model1000) because SQ is not included.  ·  Direct I/O variable cannot be specified for the tag variable.  ·  Array type notation (e.g. PV_PARA[0]) and Tag No. notation (e.g. FIC101) can be  specified for tag variable.  ·  This instruction is useful when processes using tags are standardized (user FB) and  tag variables are switched.    For details, refer to "Program example”.    ●  Note  ·  For the DS type tag controller, tag numbers of PV and LP are different, so no extension  is required (e.g. FIC101. TAG).    For the MCS type tag controller (model 1000), tag  numbers of PV and LP are common, so Tag No. notation without extension (e.g.  FIC101) is not interpreted correctly.    Therefore, specify tag numbers with extension  (e.g. FIC101.PVP and FIC101.ALP for LP, FIC101.TAG for PV).  Chapter 2    LD/FBD Instructions  6F8C1226  236    ●  Program example  [LD/FBD language notation]      User FB(TAG_FB) caller  Variable  Data type  Val  Dec.  PV1  REAL  0  VAR  PV2  REAL  0  VAR  TAG_FB_1  TAG_FB    VAR  TAG_FB_2  TAG_FB    VAR  IND01.TAG: PV_PARA[0]  IND02.TAG: PV_PARA[1]  User FB(TAG_FB)  Variable Data type Val Dec.  TAG  PTR    VAR_INPUT  OUT  REAL    VAR_OUTPUT  IND01.RH=200.0    IND01.RL=0.0          IND01.PV=24.0  IND02.RH=100.0    IND02.RL=-100.0    IND02.PV=24.0  IND01.TAG    LD  TAG_FB  TAG    OUT  PV1  12  ST  TAG_FB_1  IND02.TAG    LD  TAG_FB  TAG    OUT  PV2  62  ST  TAG_FB_2  TAG{INT}[0]   LD  0    LD  TO_INDEX   TAG        TYPE  XI    ST  PV_DATA[XI]. PV  LD  PV_PARA[XI]. RH  LD  PCT    IN        PV_RH  OUT    ST  IND01: 0  IND02: 1  IND01: 24.0  IND02: 24.0  IND01:12.0  IND02:62.0      [ST language notation]  TAG_FB_1 ( IND01.TAG);  XI := TO_INDEX ( TAG{INT}[0], 0);  PV1 := TAG_FB_1.OUT;  OUT := PCT ( PV_DATA[XI].PV, PV_PARA[XI].RH);    TAG_FB_2 (IND02.TAG);  PV2 := TAG_FB_2.OUT;    ·  The user function block (TAG_FB) that has tag No. (TAG) as an input argument is  executed twice.  ·  If IND01.TAG is specified, XI=0 in TAG_FB.    If IND02.TAG is specified, XI=1.    The  specified tag variable is accessed in each case.    ●  Error information  ·  If anything other than 0 to 3 (0 to 2 for the MCS type tag controller (model1000)) is  specified for tag type TYPE, or if tag variable TAG is out of range, a table operation  error occurs and the result output is "-1".  ·  The following operation is performed if direct I/O is specified for the tag variable:      Controller  Action  Integrated Controller  V series  S Controller  Table operation error flag is set to TRUE(ON) and the  result is -1.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is -1.      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    237      2.10  Numeric Function    No.  Instruction  Remarks  1  Square Root  SQRT    2  Exponential  EXP    3  Common Logarithms  LOG    4  Natural Logarithms  LN    5  Absolute Value  ABS    6  Sine  SIN    7  Cosine  COS    8  Tangent  TAN    9  Arcsine  ASIN    10  Arccosine  ACOS    11  Arctangent  ATAN        Chapter 2    LD/FBD Instruction  6F8C1226  238    Square Root    Numeric Function  Square Root    LD/FBD  language  notation    Input Output SQRT    EN input  Edge execution  Index modification  Modifier  ○  ○   —  ST language notation  Output := SQRT( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The square root of the input REAL data is obtained and the result is output.        input input of sign Output         ●  Program example  [LD/FBD language notation]     SAMPLE1 3.0  LD  SQRT  SAMPLE2 1.732051 ST      [ST language notation]  SAMPLE2 := SQRT (SAMPLE1);    ·  The  square  root  of  the  input  data  “3”  in  SAMPLE1  is  obtained  and  the  result  “1.732051” is stored in SAMPLE2.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.    Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    239    Exponential    Numeric Function  Exponential    LD/FBD  language  notation    Input Output EXP    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := EXP( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The exponential of the input REAL data is obtained and the result is output.          input exp Output        88.7228 0 1  3.40282E+38  Input data Result output     ●  Program example  [LD/FBD language notation]     SAMPLE1 3.0  LD  EXP  SAMPLE2 20.08553 ST      [ST language notation]  SAMPLE2 := EXP (SAMPLE1);    ·  The  exponential  of  the  input  data  “3”  in  SAMPLE1  is  obtained  and  the  result  “20.08553” is stored in SAMPLE2.  Chapter 2    LD/FBD Instruction  6F8C1226  240    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    241    Common Logarithms    Numeric Function  Common Logarithms    LD/FBD  language  notation    Input Output LOG    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LOG( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The common logarithm of the input REAL data is obtained and the result is output.  ·   If the input data is “0”, the result is “0”.    Output=log( | input | )    0 -3.40282E+38  38.53184  Input data Result output 3.40282E+38     ●  Program example  [LD/FBD language notation]     SAMPLE1 3.0  LD  LOG  SAMPLE2 0.4771213 ST      [ST language notation]  SAMPLE2 := LOG( SAMPLE1);    ·  The common logarithm of the input data “3” in SAMPLE1 is obtained and the result  “0.4771213” is stored in SAMPLE2.  Chapter 2    LD/FBD Instruction  6F8C1226  242    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    243    Natural Logarithms    Numeric Function  Natural Logarithms    LD/FBD  language  notation    Input Output LN    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LN( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The natural logarithm of the input REAL data is obtained and the result is output.    ·  If the input data is “0”, the result is “0”.      Output=ln ( | input | )    0 -3.40282E+38  88.7228  Input data Result output 3.40282E+38     ●  Program example  [LD/FBD language notation]     SAMPLE1 3.0  LD  LN  SAMPLE2 1.098612 ST      [ST language notation]  SAMPLE2 := LN( SAMPLE1);    ·  The  natural  logarithm  of  the  input  data  “3”  in  SAMPLE1  is  obtained  and  the  result  “1.098612” is stored in SAMPLE2.  Chapter 2    LD/FBD Instruction  6F8C1226  244    ●  Error information  ·  The following operation is performed if the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    245    Absolute Value    Numeric Function  Absolute Value    LD/FBD  language  notation  Input Output ABS_□□   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ABS_ □□ ( Input );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Input  —  ○   Input  Output  —  See below  —  Output            Input  Symbol(_      )  Output  INT  ABS_INT  INT  DINT  ABS_DINT  DINT  REAL  ABS_REAL  REAL      ●  Function  ·  The absolute value of the input data is obtained and the result is output.    ·  For  INT  data,  the  absolute  value  of  the  maximum  negative  value  is  the  maximum  positive value.        Input data  Result output ABS_INT  —32768  32767  ABS_DINT  —2147483648  2147483647    Input Output  ABS_□□ □□  Chapter 2    LD/FBD Instruction  6F8C1226  246    ●  Program example  [LD/FBD language notation]     SAMPLE1 -1234  LD  ABS_INT  SAMPLE2 1234  ST      [ST language notation]  SAMPLE2 := ABS_INT (SAMPLE1);    ·   The absolute value of the input data “-1234” in SAMPLE1 is obtained and the result  “1234” is stored in SAMPLE2.    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    247    Sine    Numeric Function  Sine    LD/FBD  language  notation  Input Output SIN    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SIN( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The sine of the input REAL data is obtained and the result is output.    ·  The input data must be in radians.      Output = Sin (input)    -4  0 Input data Resul t output -2  - -3   2 3 4  1.0 -1.0     ●  Program example  [LD/FBD language notation]     SAMPLE1 1.047198 LD  SIN  SAMPLE2 0.8660254 ST      [ST language notation]  SAMPLE2 := SIN (SAMPLE1);    ·  The  sine  of  the  input  data  “1.047198”  in  SAMPLE1  is  obtained  and  the  result  “0.8660254” is stored in SAMPLE2.  Chapter 2    LD/FBD Instruction  6F8C1226  248    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.          2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    249    Cosine    Numeric Function  Cosine    LD/FBD  language  notation  Input Output COS    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := COS( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The cosine of the input REAL data is obtained and the result is output.    ·  The input data must be in radians.      Output = Cos (input)    0 Input data  Result output -2  -  -3   2 3 1.0 -1.0     ●  Program example  [LD/FBD language notation]      SAMPLE1 1.047198 LD  COS  SAMPLE2 0.5  ST      [ST language notation]  SAMPLE2 := COS( SAMPLE1);    ·  The cosine of the input data “1.047198” in SAMPLE1 is obtained and the result “0.5”  is stored in SAMPLE2.  Chapter 2    LD/FBD Instruction  6F8C1226  250    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    251    Tangent    Numeric Function  Tangent    LD/FBD  language  notation  Input Output TAN    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := TAN( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The tangent of the input REAL data is obtained and the result is output.    ·  The input data must be radians.      Output=Tan (input)    0 Result output -2  - -3   2 3 4  -Infinity    +Infinity  Input data -4      ●  Program example  [LD/FBD language notation]     SAMPLE1 1.047198 LD  TAN  SAMPLE2 1.732051 ST      [ST language notation]  SAMPLE2 := TAN( SAMPLE1);    ·  The  tangent  of  the  input  data  “1.047198”  in  SAMPLE1  is  obtained  and  the  result  “1.732051” is stored in SAMPLE2.    Chapter 2    LD/FBD Instruction  6F8C1226  252    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    253    Arcsine    Numeric Function  Arcsine    LD/FBD  language  notation  Input Output ASIN    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ASIN( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·  The arcsine of the input REAL data is obtained and the result is output.    ·  The output data is in radians.    ·  Input data must be between -1.000000 and +1.000000.  ·  If Input data > 1.000000, Input data is assumed to be 1.000000.  ·   If Input data < -1.000000, Input data is assumed to be -1.000000    Output = Asin (input)    -2.0  0 Input data Result output -1.0  -0.5 -1.5  0.5 1.0 1.5 2.0  1.0 2.0 -1.0 -2.0     Chapter 2    LD/FBD Instruction  6F8C1226  254    ●  Program example  [LD/FBD language notation]      SAMPLE1 0.5  LD  ASIN  SAMPLE2 0.5235988 ST      [ST language notation]  SAMPLE2 := ASIN( SAMPLE1);    ·  The arcsine of the input data “0.5“ in SAMPLE1 is obtained and the result “0.5235988”  is stored in SAMPLE2.    ●  Error information  ·   The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    255    Arccosine    Numeric Function  Arccosine    LD/FBD  language  notation  Input Output ACOS    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ACOS( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·   The arccosine of the input REAL data is obtained and the result is output.    ·  The output data is in radians.  ·   Input data must be between -1.000000 and +1.000000.  ·  If Input data > 1.000000, Input data is assumed to be 1.000000.  ·  If Input data < -1.000000, Input data is assumed to be -1.000000.    Output = Acos (input)    -2.0  0 Input data Result ouput -1.0  -0.5 -1.5  0.5 1.0 1.5 2.0  3.0 4.0 2.0 1.0   Chapter 2    LD/FBD Instruction  6F8C1226  256    ●  Program example  [LD/FBD language notation]      SAMPLE1 0.5  LD  ACOS  SAMPLE2 1.047198 ST      [ST language notation]  SAMPLE2 := ACOS( SAMPLE1);    ·   The  arccosine  of  the  input  data  “0.5”  in  SAMPLE1  is  obtained  and  the  result  “1.047198” is stored in SAMPLE2.    ●  Error information  ・ The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.10    Numeric Function  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    257    Arctangent    Numeric Function  Arctangent    LD/FBD  language  notation  Input Output ATAN    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ATAN( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Input  —  REAL  ○   Input  Output  —  REAL  —  Output    ●  Function  ·   The arctangent of the input REAL data is obtained and the result is output.    ·   The output data is in radians.      Output = Atan (input data)    0 Input data Result output 1.0 2.0 -1.0 -2.0     ●  Program example  [LD/FBD language notation]      SAMPLE1 0.5  LD  ATAN  SAMPLE2 0.4636476 ST      [ST language notation]  SAMPLE2 := ATAN( SAMPLE1);    ·   The  arctangent  of  the  input  data  “0.5”  in  SAMPLE1  is  obtained  and  the  result  “0.4636476” is stored in SAMPLE2.    Chapter 2    LD/FBD Instruction  6F8C1226  258    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    259      2.11  Logical Operation    No.  Instruction  Remarks  1  Bitwise Boolean AND  AND    2  Bitwise Boolean AND of Table Data  TAND   3  Bitwise Boolean OR  OR    4  Bitwise Boolean OR of Table Data  TOR    5  Bitwise Boolean NOT  NOT    6  Bitwise Boolean NOT of Table Data  TNOT   7  Bitwise Boolean XOR  XOR    8  Bitwise Boolean XOR of Table Data  TXOR   9  Bitwise Boolean NOT XOR of Table Data  TXNR   10  Test  TEST          Chapter 2    LD/FBD Instructions  6F8C1226  260    Bitwise Boolean AND    Logical Operation  Bitwise Boolean AND    LD/FBD language  notation  Input  1 Output AND_□□ Input  2 Input  n   EN input  Edge execution  Index modification  Modifier  ○  ○   —  ST language notation  Output := AND_ □□ ( Input1, Input2 , … , Inputn );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1…n  2≤n≤15  Output  —  See below  —  Output                      Input 1…n  Symbol(_        )  Output  BOOL  AND_BOOL  BOOL  WORD  AND_WORD  WORD  DWORD  AND_DWORD  DWORD      ●  Function  ·  The Bitwise Boolean AND of input data Input 1 to Input n is obtained and the result is  output.  ·  Up to 15 input data are allowed.  ·  Input 1 to n must have the same data type.  Input  1 Output AND_□□ Input  2 Input  n □□ 2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    261    ●  Program example  [LD/FBD language notation]     SAMPLE1  16#79AF  LD  AND_WORD  SAMPLE2  16#9584  LD  SAMPLE3  16#13E6  LD  SAMPLE4  16#F2E7  LD  SAMPLE5 16#1084 ST  15 0 0 1 1 1 1 0 0 1 1  0  1  0  1  1  1 1 SAMPLE1 1 0 0 1 0 1 0 1 1  0  0  0  0  1  0 0 SAMPLE2 0 0 0 1 0 0 1 1 1  1  1  0  0  1  1 0 SAMPLE3 0 0 0 1 0 0 0 0 1  0  0  0  0  1  0 0 SAMPLE5 1 1 1 1 0 0 1 0 1  1  1  0  0  1  1 1 SAMPLE4     [ST language notation]  SAMPLE5 := AND_WORD( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  The Bitwise Boolean AND of input data in SAMPLE1 to SAMPLE4 is obtained and the  result “16#1084” is stored in SAMPLE5.    Chapter 2    LD/FBD Instructions  6F8C1226  262    Bitwise Boolean AND of Table Data   Logical Operation  Bitwise Boolean AND of Table Data    LD/FBD  language  notation    Input table 1 Output table  TAND    TBL1      TBL2    N Table  word  number Input table 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TAND( TBL1, TBL2 , N, Output table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL1  PTR  —  Input table 1    TBL2  PTR  —  Input table 2    Input  N  UINT  ○   Table word number  1≤N≤64  Output  —  PTR  —  Output table      ●  Function  ·  The Bitwise Boolean AND of N word data starting from Input table 1 and Input table 2  is obtained and the result is stored in the specified output table.  ·   Table word number N must be between 1 and 64.  ·   If table word number N is 0, no operation is performed.  ·   Direct I/O variable cannot be specified for the input table or output table.    ●  Program example  [LD/FBD language notation]      TABLE1    LD  TAND    TABLE2    LD  TABLE3    ST  3    LD  TBL1  TBL2  N  TABLE1  16#F035  16#5555  16#00FF  0  1  2  16#236B  16#AAAA  16#0F0F  0 1 2 TABLE2  16#2021  16#00AA  16#0505  0  1  2  TABLE3      [ST language notation]  TAND (TABLE1, TABLE2, 3, TABLE3);    ·  The  Bitwise  Boolean  AND  of  3  words  data  starting  from  input  tables  TABLE1  and  TABLE2 is obtained and the result is stored in output table TABLE3.  2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    263    ●  Error information  ·   When the input table and output table exceed the variable area the bitwise Boolean  AND of table data is not processed and the data boundary is exceeded.  ·   If N exceeds 64, it is limited to N=64.  ·  The following operation is performed when direct I/O variable is specified for the input  table and output table:      Controller  Action  Integrated  Controller  V series  S Controller  Bitwise Boolean AND of table data is not executed.  Error flag is set to TRUE(ON).    Unified Controller nv series  Bitwise Boolean AND of table data is not executed.  Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).      ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  264    Bitwise Boolean OR    Logical Operation  Bitwise Boolean OR    LD/FBD  language  notation    Input 1 Output OR_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := OR_ □□ ( Input1, Input2 , … , Inputn );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1 ··· n  2≤n≤15  Output  —  See below  —  Output                    Input 1…n  Symbol(_        )  Output  BOOL  OR_BOOL  BOOL  WORD  OR_WORD  WORD  DWORD  OR_DWORD  DWORD  Input 1 Output OR_        Input 2 Input n     ●  Function  ·  The Bitwise Boolean OR of input data Input 1 to Input n is obtained and the result is  output.  ·  Up to 15 input data are allowed.  ·   Input 1 to n must have the same data type.    □□ □□ 2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    265    ●  Program example  [LD/FBD language notation]     SAMPLE1  16#1234  LD  OR_WORD  SAMPLE2  16#9876  LD  SAMPLE3  16#2345  LD  SAMPLE4  16#8765  LD  SAMPLE5 16#BF77 ST  15 0 0 0 0 1 0 0 1 0 0  0  1  1  0  1  0 0 SAMPLE1 1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 0 SAMPLE2 0 0 1 0 0 0 1 1 0  1  0  0  0  1  0 1 SAMPLE3 1 0 1 1 1 1 1 1 0  1  1  1  0  1  1 1 SAMPLE5 1 0 0 0 0 1 1 1 0  1  1  0  0  1  0 1 SAMPLE4     [ST language notation]  SAMPLE5 := OR_WORD( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·   The Bitwise Boolean OR of input data in SAMPLE1 to SAMPLE4 is obtained and the  result “16#BF77” is stored in SAMPLE5.    Chapter 2    LD/FBD Instructions  6F8C1226  266    Bitwise Boolean OR of Table Data   Logical Operation  Bitwise Boolean OR of Table Data    LD/FBD  language  notation    Input table 1 Output table  TOR    TBL1      TBL2    N Table  word  number Input table 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TOR( TBL1, TBL2 , N, Output table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL1  PTR  —  Input table 1    TBL2  PTR  —  Input table 2    Input  N  UINT  ○   Table word number  1≤N≤64  Output  —  PTR  —  Output table      ●  Function  ·   The Bitwise Boolean OR of N word data starting from Input table 1 and Input table 2 is  obtained and the result is stored in the specified output table.  ·   Table word number N must be between 1 and 64.  ·   If table word number N is 0, no operation is performed.  ·   Direct I/O variable cannot be specified for the input table or output table.        2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    267    ●  Program example  [LD/FBD language notation]      TABLE1    LD  TOR    TABLE2    LD  TABLE3   ST  3    LD  TBL1  TBL2  N  TABLE1  16#F035  16#5555  16#00FF  0 1 2 16#236B  16#AAAA  16#0F0F  0 1 2 TABLE2  16#F37F  16#AAFF  16#5F5F  0  1  2  TABLE3  + + +     [ST language notation]  TOR (TABLE1, TABLE2, 3, TABLE3);    ·  The  Bitwise  Boolean  OR  of  3  words  data  starting  from  input  tables  TABLE1  and  TABLE2 is obtained and the result is stored in output table TABLE3.    ●  Error information  ·   When the input table and out table exceed the variable area, bitwise Boolean OR of  table data is not processed and the data boundary is exceeded.  ·  If N exceeds 64, it is limited to N=64  ·   The following operation is performed when direct I/O variable is specified for the input  table and output table:      Controller  Action  Integrated  Controller  V series  S Controller  Bitwise Boolean OR of table data is not executed.    Error flag is set to TRUE(ON).    Unified Controller nv series  Bitwise Boolean OR of table data is not executed.  Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).      ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  268    Bitwise Boolean NOT    Logical Operation  Bitwise Boolean NOT    LD/FBD  language  notation    Input Output  NOT_□□   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := NOT_ □□ ( Input );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input    Output  —  See below  —  Output              Input  Symbol(_        )  Output  BOOL  NOT_BOOL  BOOL  WORD  NOT_WORD  WORD  DWORD  NOT_DWORD  DWORD  Input  Output    NOT_     ●  Function  ·  The Bitwise Boolean NOT of input data is obtained and the result is output.    ●  Program example  [LD/FBD language notation]      SAMPLE1 16#1234  LD  NOT_WORD SAMPLE2 16#EDCB ST      [ST language notation]  SAMPLE2 := NOT_WORD(SAMPLE1);    ·   The Bitwise Boolean NOT of input data “16#1234” in SAMPLE1 is obtained and the  result “16#EDCB” is stored in SAMPLE2.  □□ □□ 2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    269    Bitwise Boolean NOT of Table Data   Logical Operation  Bitwise Boolean NOT of Table Data    LD/FBD  language  notation    Input  table Output table  TNOT    TBL      N  Table  word  number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TNOT( TBL , N, Output table );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  TBL  PTR  —  Input table    Input  N  UINT  ○   Table word number  1≤N≤1024  Output  —  PTR  —  Output table      ●  Function  ·   The Bitwise Boolean NOT of N word data starting from the input table is obtained and  the result is stored in the specified output table.  ·   Table word number N must be between 1 and 1024.  ·   If table word number N is 0, no operation is performed.  ·   Direct I/O variable cannot be specified for input table or output table.    ●  Program example  [LD/FBD language notation]      TABLE1   LD  TNOT    TABLE2   ST  3    LD  TBL  N  TABLE1  16#F035  16#5555  16#00FF  0 1 2 16#0FCA  16#FF00  16#AAAA  0 1 2 TABLE2      [ST language notation]  TNOT( TABLE1, 3, TABLE2);    ·   The  Bitwise  Boolean  NOT  of  3  words  data  starting  from  input  table  TABLE1  is  obtained and the result is stored in output table TABLE2.    Chapter 2    LD/FBD Instructions  6F8C1226  270    ●  Error information  ·   When the input table and output table exceed the variable area, the bitwise Boolean  NOT of table data is not processed and the data boundary is exceeded.  ·   If N exceeds 1024, it is limited to N=1024.  ·   The following operation is performed when direct I/O variable is specified for the input  table and output table:      Controller  Action  Integrated  Controller  V series  S Controller  Bitwise Boolean NOT of table data is not executed.  Error flag is set to TRUE(ON).    Unified Controller nv series  Bitwise Boolean NOT of table data is not executed.  Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    271    Bitwise Boolean XOR    Logical Operation  Bitwise Boolean XOR    LD/FBD  language  notation  Input 1 Output XOR_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := XOR_ □□ ( Input1, Input2 , … putn );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1 … n  2≤n≤15  Output  —  See below  —  Output                    Input 1 … n  Symbol(_        )  Output    BOOL  XOR_BOOL  BOOL  WORD  XOR_WORD  WORD  DWORD  XOR_DWORD  DWORD  Input 1 Output  XOR_    Input 2 Input n     ●  Function  ·  The Bitwise Boolean XOR of input data Input 1 to Input n is obtained and the result is  output.  ·   Up to 15 input data are allowed.  ·   Input 1 to n must have the same data type.      □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  272    ●  Program example  [LD/FBD language notation]      SAMPLE1  16#1234  LD  XOR_WORD  SAMPLE2  16#9876  LD  SAMPLE3  16#2345  LD  SAMPLE4  16#8765  LD  SAMPLE5 16#2E62 ST  15 0 0 0 0 1 0 0 1 0 0  0  1  1  0  1  0 0 SAMPLE1 1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 0 SAMPLE2 0 0 1 0 0 0 1 1 0  1  0  0  0  1  0 1 SAMPLE3 0 0 1 0 1 1 1 0 0  1  1  0  0  0  1 0 SAMPLE5 1 0 0 0 0 1 1 1 0  1  1  0  0  1  0 1 SAMPLE4     [ST language notation]  SAMPLE5 := XOR_WORD( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·   The Bitwise Boolean XOR of input data in SAMPLE1 to SAMPLE4 is obtained and the  result “16#2E62” is stored in SAMPLE5.    2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    273    Bitwise Boolean XOR of Table Data   Logical Operation  Bitwise Boolean XOR of Table Data    LD/FBD  language  notation    Input table 1 Output table  TXOR    TBL1      TBL2    N Table  word  number Input table 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TXOR( TBL1, TBL2, N, Output table );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  TBL1  PTR  —  Input table1    TBL2  PTR  —  Input table2    Input  N  UINT  ○   Table word number  1≤N≤64  Output  —  PTR  —  Output table      ●  Function  ·   The Bitwise Boolean XOR of N word data starting from Input table 1 and Input table 2  is obtained and the result is stored in the specified output table.  ·   Table word number N must be between 1 and 64.  ·   If table word number N is 0, no operation is performed.    ·   Direct I/O variable cannot be specified for input table or output table.      Chapter 2    LD/FBD Instructions  6F8C1226  274    ●  Program example  [LD/FBD language notation]      TABLE1    LD  TXOR    TABLE2    LD  TABLE3   ST  3    LD  TBL1 TBL2 N  TABLE1  16#F035  16#5555  16#00FF  0 1 2 16#236B  16#AAAA  16#0F0F  0 1 2 TABLE2  16#D35E  16#AA55  16#5A5A  0  1  2  TABLE3         [ST language notation]  TXOR (TABLE1, TABLE2, 3, TABLE3);    ·  The  Bitwise  Boolean  XOR  of  3  words  data  starting  from  Input  table  TABLE1  and  TABLE2 is obtained and the result is stored in output table TABLE3.    ●  Error information  ·   When the input table and output table exceed the variable area, the bitwise Boolean  XOR of table data is not processed and the data boundary is exceeded.  ·   If N exceeds 64, it is limited to N=64.  ·   The following operation is performed when direct I/O variable is specified for the input  table and output table:    Controller  Action  Integrated  Controller  V series  S Controller  Bitwise Boolean XOR of table data is not executed.  Error flag is set to TRUE(ON).    Unified Controller nv series  Bitwise Boolean XOR of table data is not executed.  Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).    ・ When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    275    Bitwise Boolean NOT XOR of Table Data   Logical Operation  Bitwise Boolean NOT XOR of Table Data    LD/FBD  language  notation    Input table 1 Output table  TXNR    TBL1      TBL2    N Table  word  number Input table 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TXNR( TBL1, TBL2 , N, Output table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  TBL1  PTR  —  Input table1    TBL2  PTR  —  Input table2    Input  N  UINT  ○   Table word number  1≤N≤64  Output  —  PTR  —  Output table      ●  Function  ·   The Bitwise Boolean NOT XOR of N word data starting from Input table 1 and Input  table 2 is obtained and the result is stored in the specified output table.  ·   Table word number N must be between 1 and 64.  ·   If table word number N is 0, no operation is performed.    ·   Direct I/O variable cannot be specified for input table or output table.      Chapter 2    LD/FBD Instructions  6F8C1226  276    ●  Program example  [LD/FBD language notation]      TABLE1    LD  TXNR    TABLE2    LD  TABLE3   ST  3    LD  TBL1 TBL2 N  TABLE1  16#F035  16#5555  16#00FF  0 1 2 16#236B  16#AAAA  16#0F0F  0 1 2 TABLE2  16#2CA1  16#55AA  16#A5A5  0  1  2  TABLE3         [ST language notation]  TXNR( TABLE1, TABLE2, 3, TABLE3);    ·  The Bitwise Boolean NOT XOR of 3 words data starting from Input table TABLE1 and  TABLE2 is obtained and the result is stored in output table TABLE3.    ●  Error information  ·   When the input table and output table exceed the variable area, the bitwise Boolean  NOT XOR of table data is not processed and the data boundary is exceeded.  ·   If N exceeds 64, it is limited to N=64.  ·   The following operation is performed when direct I/O variable is specified for the input  table and output table.      Controller  Action  Integrated  Controller  V series  S Controller  Bitwise  Boolean  NOT  XOR  of  table  data  is  not  executed.    Error flag is set to TRUE(ON).    Unified Controller nv series  Bitwise  Boolean  NOT  XOR  of  table  data  is  not  executed.  Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.11    Logical Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    277    Test    Logical Operation  Test    LD/FBD  language  notation    Input 1 Output  TEST_□□ Input  2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := TEST_ □□ ( Input1, Input2 );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1, 2  Input number=2  Output  —  See below  —  Output                Input 1,2  Symbol(_        )  output  WORD  TEST_WORD  DWORD  TEST_DWORD  BOOL  Input  1 Output TEST_  Input  2     ●  Function  ·  The  Bitwise  Boolean  AND  of  input  data  Input  1  and  Input  2  is  obtained  and  FALSE(OFF) is output if the result is 0 and TRUE(ON) is output otherwise.  ·  Input 1 and Input 2 must have the same data type.    ●  Program example  [LD/FBD language notation]     SAMPLE1 16#1234 LD  TEST_WORD SAMPLE2 16#98C3 LD  SIGNAL1 1  ST      [ST language notation]  SIGNAL1 := TEST_WORD( SAMPLE1, SAMPLE2);    ·   Input data SAMPLE1 and SAMPLE2 are tested and the result TRUE(ON) is output to  SIGNAL1.    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  278      2.12  Bit Operation    No.  Instruction  Remarks  1  Shift Bits Right  SHR    2  Shift Bits Left  SHL    3  Rotate Bits Right  ROR    4  Rotate Bits Left  ROL    5  Arithmetic Shift  SFA_WORD_P  SFA_DWORD_P  PCS compatible instruction 6  Logical Shift  SFL_WORD_P  SFL_DWORD_P  PCS compatible instruction     2.12    Bit Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    279    Shift Bits Right    Bit Operation  Shift Bits Right    LD/FBD  language  notation      Input  Output  SHR_□□ Shift number IN N    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SHR_   □□  ( IN, N );    ●  Arguments  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Input    Input  N  UINT  ○   Shift number    Output  —  See below  —  Output                  Input  Symbol (_        ) Output    WORD  SHR_WORD  WORD  DWORD  SHR_DWORD  DWORD  Input Output  Shift  number SHR_       ●  Function  ·  Right shifts the input data by shift number N and outputs the result.  ·   Empty bits after shifting are padded with “0”.  ·   The bit that is shifted out last is input to the specific register carry flag.  ·  The shift number N is as follows.    The data is not shifted when shift number N=0.    Symbol  Shift number SHR_WORD  MOD(N/16)  SHR_DWORD  MOD(N/32)    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  280    ●  Program example  [LD/FBD language notation]     SAMPLE1  16#9876  LD  SHR_WORD    IN        N  SAMPLE2  18  LD  SAMPLE3 16#261D ST  0 is entered  SAMPLE1 SAMPLE3 CF 1 F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 0 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0  1  1  1  0  1  0 0     [ST language notation]  SAMPLE3 := SHR_WORD( SAMPLE1, SAMPLE2);    ·   Right  shifts  the  input  data  “16#9876”  in  SAMPLE1  by  shift  number  (=MOD(18/16))  specified  by  SAMPLE2  and  stores  the  result  “16#261D”  in  SAMPLE3.  The  bit  data  TRUE(ON) shifted out last is stored in specific register carry flag.    2.12    Bit Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    281    Shift Bits Left   Bit Operation  Shift Bits Left    LD/FBD  language  notation  Input  Output  SHL_□□   IN      N  Shift number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SHL_ □□ ( IN, N );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Input    Input  N  UINT  ○   Shift number    Output  —  See below  —  Output                  Input  Symbol (_        ) Output  WORD  SHL_WORD  WORD  DWORD  SHL_DWORD  DWORD  Input  Output  SHL_     IN      N  Shift  number     ●  Function  ·   Left shifts the input data by shift number N and outputs the result.  ·   Empty bits after shifting are padded with “0”.  ·   The bit that is shifted out last is input to the specific register carry flag.  ·   The shift number N is as follows. The data is not shifted when shift number N=0.    Symbol  Shift number SHL_WORD  MOD(N/16)  SHL_DWORD  MOD(N/32)    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  282    ●  Program example  [LD/FBD language notation]     SAMPLE1  16#9876  LD  SHL_WORD    IN        N  SAMPLE2  18  LD  SAMPLE3 16#61D8 ST  0 is entered SAMPLE1 SAMPLE3 CF 0 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0 1 1  1  0  1  1  0  F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 0 0 1 1  1  0  1  1  0  0 0 1 0     [ST language notation]  SAMPLE3 := SHL_WORD( SAMPLE1, SAMPLE2);    ·   Left  shifts  the  input  data  “16#9876”  in  SAMPLE1  by  shift  number  (=MOD(18/16))  specified by SAMPLE2 and stores the shift result “16#61D8” in SAMPLE3. The last  shifted bit FALSE(OFF) is stored in specific register carry flag.    2.12    Bit Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    283    Rotate Bits Right    Bit Operation  Rotate Bits Right    LD/FBD language  notation    Input  Output  ROR_□□   IN      N  Rotate  number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ROR_ □□ ( IN, N );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Input    Input  N  UINT  ○   Rotate number    Output  —  See below  —  Output                  Input  Symbol(_        )  Output  WORD  ROR_WORD  WORD  DWORD  ROR_DWORD  DWORD  Input  Output  ROR_      IN      N  Rotate  number     ●  Function  ·  Right rotates the input data by rotate number N and outputs the result.  ·  The  last  bit  data rotated  from  the  least significant  bit is  input  to  the  specific  register  carry flag.  ·   Rotate number N is as follows. No bit is rotated if rotate number N=0.    Symbol  Rotate  number  ROR_WORD  MOD(N/16)  ROR_DWORD  MOD(N/32)    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  284    ●  Program example  [LD/FBD language notation]    SAMPLE1  16#9876  LD  ROR_WORD    IN        N  SAMPLE2  18  LD  SAMPLE3  16#A61D  ST  SAMPLE1 SAMPLE3 CF 1 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0 1 1  1  0  1  1  0  F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0  1  1  1  0  1  0 1 CF 1     [ST language notation]  SAMPLE3 := ROR_WORD( SAMPLE1, SAMPLE2);    ·   Right rotates the input data “16#9876” in SAMPLE1 by rotate number (=MOD(18/16))  specified  by  SAMPLE2  and  stores  the  rotated  result  “16#A61D”  in  SAMPLE3.  The  last  bit  data  TRUE(ON)  rotated  from  the  least  significant  bit  is  stored  in  specific  register carry flag.    2.12    Bit Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    285    Rotate Bits Left    Bit Operation  Rotate Bits Left    LD/FBD language  notation    Input  Output    ROL_□□   IN      N  Rotate  number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ROL_ □□ ( IN, N );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Input    Input  N  UINT  ○   Rotate number    Output  —  See below  —  Output                  Input  Symbol(_        )  Output    WORD  ROL_WORD  WORD  DWORD  ROL_DWORD  DWORD  Input  Output  ROL_    IN      N  Rotate  number     ●  Function  ·   Rotates input data left by N bits and outputs the result.  ·   The last bit data rotated from the most significant bit is input to specific register carry  flag.  ·   Rotate number N is as follows. No bit is rotated if rotate number N=0.    Symbol  Rotate  number  ROL_WORD  MOD(N/16)  ROL_DWORD  MOD(N/32)    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  286    ●  Program example  [LD/FBD language notation]    SAMPLE1  16#9876  LD  ROL_WORD   IN        N  SAMPLE2  18  LD  SAMPLE3  16#61DA  ST  SAMPLE1 SAMPLE3 CF 0 F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 0 F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 0 0 1 1  1  0  1  1  0  1 0 1 0 CF 0     [ST language notation]  SAMPLE3 := ROL_WORD( SAMPLE1, SAMPLE2);    ·  Left rotates the input data “16#9876” in SAMPLE1 by rotate number (=MOD(18/16))  specified  by  SAMPLE2  and  stores  the  rotated  result  “16#61DA”  in  SAMPLE3.  The  last  bit  data  FALSE(OFF)  rotated  from  the  most  significant  bit  is  stored  in  specific  register carry flag.    2.12    Bit Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    287    Arithmetic Shift    Bit Operation  Arithmetic Shift  PCS  compatible  instruction  LD/FBD language  notation  Input  Output    SFA_□□_P   IN      N  Shift  number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SFA_ □□ _P( IN, N );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Input    Input  N  INT  ○   Shift number    Output  —  See below  —  Output                  Input    Symbol(_        )  Output    WORD  SFA_WORD_P  WORD  DWORD  SFA_DWORD_P  DWORD  Input  Output  SFA_        _P   IN      N  Shift  number     ●  Function  ·  Arithmetic shifts the input data by shift number N and outputs the result.  ·  If shift right is specified, the most significant bit is fixed as sign and the state of the  most significant bit is inserted in most significant bit-1.  ·   If shift left is specified, the most significant bit is fixed as sign and the bits starting from  the most significant bit-1 are shifted left.  ·   If shift left is specified, the most significant bit is fixed as sign and the bits starting from  the most significant bit-1 are shifted left.    Symbol  Shift  number  Shift direction  SFA_WORD_P  MOD(N/16)  SFA_DWORD_P  MOD(N/32)  N<0: Left  N>0: Right  □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  288    ●  Program example    [LD/FBD language notation]  ♦ Shift right    SAMPLE1  16#9876  LD  SFA_WORD_P    IN        N  SAMPLE2  18  LD  SAMPLE3 16#E61D ST  State of most significant bit is entered  SAMPLE1 SAMPLE3 F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 0 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 1 Fixed     ·   Arithmetic  shifts  right  input  data  “16#9876”  in  SAMPLE1  by  shift  number  (=MOD(18/16))  specified  by  SAMPLE2  and  stores  the  shift  result  16#E61D  in  SAMPLE3.    ♦ Shit left    SAMPLE1  16#9876  LD  SFA_WORD_P    IN        N  SAMPLE2  -18  LD  SAMPLE3 16#E1D8  ST  0 is entered  SAMPLE1 SAMPLE3 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0 1 1  1  0  1  1  0  F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 0 0 1 1  1  0  1  1  0  0 0 1 1 Fixed     ·   Arithmetic  left  shifts  input  data  “16#9876”  in  SAMPLE1  by  shift  number  (=MOD(18/16))  specified  by  SAMPLE2  and  stores  the  shift  result  “16#E1D8”  in  SAMPLE3.    [ST language notation]  SAMPLE3 := SFA_WORD_P( SAMPLE1, SAMPLE2);      2.12    Bit Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    289    Logical Shift    Bit Operation  Logical Shift    LD/FBD language  notation  Input  Output    SFL_□□_P   IN      N  Shift  number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SFL_ □□ _P( IN, N );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  IN  See below  ○   Input    Input  N  INT  ○   Shift number    Output  —  See below  —  Output                  Input    Symbol(_        )  Output  WORD  SFL_WORD_P  WORD  DWORD  SFL_DWORD_P  DWORD  Input  Output  SFL_        _P   IN      N  Shift  number     ●  Function  ·   Logical shifts the input data by shift number N and outputs the result.  ·  Shift  number  N  specifies  the  shift  number  and  shift  direction.  No  shift  is  performed  if  shift  number=0.    Symbol  Shift  number  Shift direction  SFL_WORD_P  MOD(N/16)  SHL_DWORD_P  MOD(N/32)  N<0: Left  N>0: Right  □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  290    ●  Program example  [LD/FBD language notation]  ♦ Shift right  SAMPLE1  16#9876  LD  SFL_WORD_P    IN        N  SAMPLE2  18  LD  SAMPLE3 16#261D ST  SAMPLE1 SAMPLE3 F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 1 1 0 0 0 0  1  1  1  0  1  1 0 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0  1  1  1  0  1  0 0 0 is entered     ·  Logical shifts right input data “16#9876” in SAMPLE1 by shift number (=MOD(18/16))  specified by SAMPLE2 and stores the shift result “16#261D” in SAMPLE3.    ♦ Shift left    SAMPLE1  16#9876  LD  SFL_WORD_P    IN        N  SAMPLE2  -18  LD  SAMPLE3 16#61D8 ST  0 is entered SAMPLE1 SAMPLE3 F E D C B A 9 8 7 6 5  4  3  2  1  0  1 0 0 1 1 0 0 0 0 1 1  1  0  1  1  0  F E D C B A 9 8 7  6  5  4  3  2  1 0 1 0 0 0 0 1 1  1  0  1  1  0  0 0 1 0   ·   Logical shifts left input data “16#9876” in SAMPLE1 by shift number (=MOD(18/16))  specified by SAMPLE2 and stores the shift result “16#61D8” in SAMPLE3.    [ST language notation]  SAMPLE3 := SFL_WORD_P( SAMPLE1, SAMPLE2);      2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    291      2.13  Arithmetic Operation    No.  Instruction  Remarks  1  Add  ADD    2  Add with Carry  ADC    3  Subtract  SUB    4  Subtract with Carry  SBB    5  Multiply  MUL    6  Divide  DIV    7  Remainder  MOD    8  Increment  INC    9  Decrement  DEC    10  Power  EXPT    11  Add Time Data  ADD    12  Subtract Time Data  SUB    13  Multiply Time Data  MUL    14  Divide Time Data  DIV        Chapter 2    LD/FBD Instructions  6F8C1226  292    Add    Arithmetic Operation  Add    LD/FBD  language  notation  Input 1 Output  ADD_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ADD_ □□ ( Input1, Input2, …, Inputn );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1…n  2≤n≤15  Output  —  See below  —  Output                    Input 1 … n  Symbol(_      ) Output    INT  ADD_INT  INT  DINT  ADD_DINT  DINT  UINT  ADD_UINT  UINT  REAL  ADD_REAL  REAL  Input 1 Output  ADD_        Input 2 Input n     ●  Function  ·   Input data Input 1 to Input n are added and the result is output.  ·  Up to 15 input data are allowed.  ·   Input 1 to n must have the same data type.  ·   Output = Input 1 + Input 2 +...+ Input n    ● Important  With  ADD_REAL,  if  the  absolute  value  of  addend  and  augend  differ  significantly  (difference  in  exponent  24), the result is the value of the data with larger absolute value.  □□ □□ 2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    293    ●  Program example  [LD/FBD language notation]     SAMPLE1 12765  LD  ADD_INT  SAMPLE2 -32653  LD  SAMPLE3 7654  LD  SAMPLE4 11234  LD  SAMPLE5 -1000  ST      [ST language notation]  SAMPLE5 := ADD_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  The input data in SAMPLE1 to SAMPLE4 are added and the result -1000 is stored in  SAMPLE5.    ●  Error information  ·   If an overflow occurs, the limit value is output as result.  ·   The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  In  case  of  INF  input  or  if  an  overflow  occurs,  the  result is INF.    Unified Controller nv series  NAN  and  INF  data  are  limited  by  the  maximum  value.    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  294    Add with Carry    Arithmetic Operation  Add with Carry    LD/FBD  language  notation    Input 1 Output  ADC_□□ Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ADC_□□( Input1, Input2 );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1,2    Output  —  See below  —  Output                Input I, 2  Symbol(_        )  Output    INT  ADC_INT  INT  DINT  ADC_DINT  DINT  Input  1 Output  ADC_        Input  2     ●  Function  ·   Input data Input 1 and Input 2 are added with carry including the specific register S  register carry flag and the result is output.  ·   The carry flag is processed as follows:  When there is carry from most significant bit (carry out): carry flag is set to TRUE  (ON)  When there is no carry from most significant bit (no carry out): carry flag is reset to FALSE    (OFF)  ·   When EN is used, ENO output is set as follows:  Carry  from  most  significant  bit  (carry  out)  or  carry  from  most  significant  bit—1  to  most significant bit: ENO output is reset to FALSE(OFF).  ·   Input 1 and input 2 must have the same data type.  Output=Input 1+Input 2+carry flag  □□ □□ 2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    295    ●  Program example  [LD/FBD language notation]  ♦  When  there  is  no  carry  out  (CF),  or  overflow  (OV)  and  input  carry  flag  (input  CF)=  FALSE(OFF)     SAMPLE1  7856  LD  ADC_INT  SAMPLE2  2717  LD  SAMPLE3  10573  ST  SAMPLE1 SAMPLE2 +)Input CF  0  0 0 0 1 1 1 1 0 1 0 1  1  0  0  0  0  7856 0 0 0 0 1 0 1 0 1 0 0  1  1  1  0  1  2717 0 0 1 0 1 0 0 1 0 1 0  0  1  1  0  1  10573 SAMPLE3 0 0 CF OV     ·   The input data “7856” in SAMPLE1 and “2717” in SAMPLE2 are added with carry and  the result “10573” is stored in SAMPLE3. Also, the specific register carry flag is reset  to FALSE(OFF).    ♦  When  there  is  carry  out  (CF)  and  overflow  (OV),  and  input  carry  flag  (input  CF)=  FALSE(OFF)        SAMPLE1  -32768  LD  ADC_INT SAMPLE2  -10000  LD  SAMPLE3  22768  ST  1 0 0 0 0 0 0 0 0 0 0  0  0  0  0  0  -32768 1 1 0 1 1 0 0 0 1 1 1  1  0  0  0  0  -10000 SAMPLE1 SAMPLE2 +) Input CF 0  0 1 0 1 1 0 0 0 1 1 1  1  0  0  0  0  22768 SAMPLE3 1 0 CF OV     ·  The input data “-32768” in SAMPLE1 and “-10000” in SAMPLE2 are added with carry  and the result “22768” is stored in SAMPLE3. Also, the specific register carry flag is  set to TRUE(ON).    [ST language notation]  SAMPLE3 := ADC_INT( SAMPLE1, SAMPLE2);    ●  Error information  ·   When EN is used, ENO output is reset to FALSE(OFF) if overflow or carry occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  296    Subtract    Arithmetic Operation  Subtract    LD/FBD  language  notation    Input 1 Output  SUB_□□ Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SUB_□□( Input1, Input2 );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  Input1, 2    Output  —  See below  —  Output                Input 1,2  Symbol(_        ) Output    INT  SUB_INT  INT  DINT  SUB_DINT  DINT  UINT  SUB_UINT  UINT  REAL  SUB_REAL  REAL  Input 1 Output  SUB_        Input 2     ●  Function  ·   Input data of Input1 and Input2 are subtracted and the result is output.    ·   Input1 and Input2 must have the same data type.    Output=Input1-Input2    ● Important  With SUB_REAL, if the absolute value of subtrahend and minuend differs significantly (difference  in exponent  24), the result is the value of the data with larger absolute value.      □□ □□ 2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    297    ●  Program example  [LD/FBD language notation]        SAMPLE1 4378  LD  SUB_INT  SAMPLE2 2345  LD  SAMPLE3 2033  ST      [ST language notation]  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);    ·   Input data in SAMPLE1 and SAMPLE2 are subtracted and the result “2033” is stored  in SAMPLE3.      ●  Error information  ·   If an overflow occurs, the limit value is output as result.  ·   The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    In  case  of  INF  input  or  if  an  overflow  occurs,  the  result is INF.  Unified Controller nv series  NAN  and  INF  data  are  limited  by  the  maximum  value.    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  298    Subtract with Carry    Arithmetic Operation  Subtract with Carry    LD/FBD  language  notation    Input 1 Output  SBB_□□ Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SBB_□□( Input1, Input2 );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1, 2    Output  —  See below  —  Output                Input 1,2  Symbol(_        )  Output    INT  SBB_INT  INT  DINT  SBB_DINT  DINT  Input 1 Output  SBB_        Input 2     ●  Function  ·  Input data Input 2 is subtracted from Input 1 with carry including the specific register  carry flag and the result is output.  ·  Carry flag is processed as follows:  When  there  is  borrow  to  the  most  significant  bit  (borrow  in):  carry  flag  is  set  to  TRUE(ON).  When there is no borrow to the most significant bit (no borrow in): carry flag is reset to  FALSE(OFF).  ·  When EN is used, ENO output is set as follows:  ·  When there is borrow to the most significant bit (borrow in) or when there is borrow  from the most significant bit to most significant bit-1: ENO output=FALSE(OFF).  ·  Input 1 and input 2 must have the same data type.  Output=Input 1-Input 2-carry flag    □□ □□ 2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    299    ●  Program example  [LD/FBD language notation]  ♦  When  there  is  no  borrow  in  (CF)  or  overflow  (OV),  and  input  carry  flag  (input  CF)=  FALSE(OFF).        SAMPLE1  23648  LD  SBB_INT SAMPLE2  10335  LD  SAMPLE3  13313  ST  0 1 0 1 1 1 0 0 0 1 1  0  0  0  0  0  23648 0 0 1 0 1 0 0 0 0 1 0  1  1  1  1  1  10335 SAMPLE1 SAMPLE2 -) Input CF 0  0 0 1 1 0 1 0 0 0 0 0  0  0  0  0  1  13313 SAMPLE3 0 0 CF OV     ·  Input  data “10335”  in  SAMPLE2  is subtracted  from  “23648” in  SAMPLE1  with  carry  and the result “13313” is stored in SAMPLE3. Also, the specific register carry flag is  reset to FALSE(OFF).    ♦  When  there  is  borrow  in  (CF),  overflow  (OV),  and  input  carry  flag  (input  CF)=  FALSE(OFF)    SAMPLE1  10000  LD  SBB_INT  SAMPLE2  -28000  LD  SAMPLE3 -27536  ST  0 0 1 0 0 1 1 1 0 0 0  1  0  0  0  0  10000 1 0 0 1 0 0 1 0 1 0 1  0  0  0  0  0  -28000 SAMPLE1 SAMPLE2 -)  Input CF 0  1 0 0 1 0 1 0 0 0 1 1  1  0  0  0  0  -27536 SAMPLE3 1 0 CF OV     ·  Input data “-28000” in SAMPLE2 is subtracted from “10000” in SAMPLE1 with carry  and the result “-27536” is stored in SAMPLE3. Also, the specific register carry flag is  set to TRUE(ON).    [ST language notation]  SAMPLE3 := SBB_INT( SAMPLE1, SAMPLE2);    ●  Error information  ·   When  EN  is  used,  when  borrow  in  or  underflow  occurs,  ENO  output  is  reset  to  FALSE(OFF).  Chapter 2    LD/FBD Instructions  6F8C1226  300    Multiply    Arithmetic Operation  Multiply    LD/FBD  language  notation    Input 1 Output  MUL_□□ Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MUL_□□( Input1, Input2, ——, Inputn );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type.      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1 ··· n  2≤n≤15  Output  —  See below  —  Output                    Input 1 ··· n  Symbol(_        )  Output    INT  MUL_INT  INT  DINT  MUL_DINT  DINT  UINT  MUL_UINT  UINT  REAL  MUL_REAL  REAL  Input  1 Output  MUL_        Input  2 Input n     ●  Function  ·  Input data Input 1 to Input n are multiplied and the result is output.  ·  Up to 15 input data are allowed.  ·  Input 1 to n must have the same data type.  Output=Input 1 * Input 2 * ··· * Input n    □□ □□ 2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    301    ●  Program example  [LD/FBD language notation]      SAMPLE1  12  LD  MUL_INT  SAMPLE2  -32  LD  SAMPLE3  21  LD  SAMPLE4  3  LD  SAMPLE5 -24192 ST      [ST language notation]  SAMPLE5 := MUL_INT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Input data in SAMPLE1 to SAMPLE4 are multiplied and the result “-24192” is stored  in SAMPLE5.    ●  Error information  ·  If an overflow occurs, the limit value is output as result.  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    In case of INF input or if an overflow occurs, the result is INF. Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  302    Multiply    Arithmetic Operation  Multiply      LD/FBD  language  notation   Input 1 Output  MUL_INT_DINT Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MUL_INT_DINT( Input1, Input2 );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  INT  ○   Input1, 2    Output  —  DINT  —  Output      ●  Function  ·  INT input data Input 1 and Input 2 are multiplied and the result is output as DINT.  ·  The number of input data is fixed at 2.  ·  Input 1 and input 2 must have the same data type.  Output=Input 1 * Input 2    ●  Program example  [LD/FBD language notation]      SAMPLE1  129  LD  MUL_INT_DINT SAMPLE2  -3265  LD  SAMPLE5 -421185 ST      [ST language notation]  SAMPLE5 := MUL_INT_DINT( SAMPLE1, SAMPLE2);    ·  The input data “129” in SAMPLE1 is multiplied with “3265” in SAMPLE2 and the result  “-421185” is stored in SAMPLE5.  2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    303    Divide    Arithmetic Operation  Divide      LD/FBD  language  notation    Input 1 Output  DIV_□□ Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DIV_□□( Input1, Input2 );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type.    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1, 2    Output  —  See below  —  Output                Input 1, 2  Symbol(_        )  Output    INT  DIV_INT  INT  DINT  DIV_DINT  DINT  UINT  DIV_UINT  UINT  REAL  DIV_REAL  REAL  Input  1 Output  DIV_          Input  2     ●  Function  ·  Input data Input 1 is divided with Input 2 and the result is output.  ·   Input 1 and Input 2 must have the same data type.  Output=Input 1/ Input 2  □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  304    ●  Program example  [LD/FBD language notation]        SAMPLE1 24378  LD  DIV_INT  SAMPLE2 2345  LD  SAMPLE3 10  ST      [ST language notation]  SAMPLE3 := DIV_INT( SAMPLE1, SAMPLE2);    ·  The input data “24378” in SAMPLE1 is divided by “2345” in SAMPLE2 and the result  “10” is stored in SAMPLE3.    ●  Error information  ·  If divided by 0 error occurs, the limit is output as operation result. Also error flag and  divide error flag are set to TRUE(ON).    ·  If the operation result exceeds the valid data range, the limit value is output.    ·  The following operation is performed when the input data type is REAL.      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    In case of INF input or if an overflow occurs, the result is INF. Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    305    Remainder    Arithmetic Operation  Remainder      LD/FBD language  notation  Input1  Output  MOD_□□ Input2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MOD_□□( Input1, Input2 );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input1, 2    Output  —  See below  —  Output                Input 1,2  Symbol(_        )  Output    INT  MOD_INT  INT  DINT  MOD_DINT  DINT  UINT  MOD_UINT  UINT  Input  1 Output  MOD_        Input  2     ●  Function  ·  Input data Input 1 is divided by Input 2 and the remainder is output.  ·  Input 1 and Input 2 must have the same data type.  Output=MOD (Input 1/ Input 2)    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  306    ●  Program example  [LD/FBD language notation]    SAMPLE1 24378  LD  MOD_INT  SAMPLE2 2345  LD  SAMPLE3 928  ST      [ST language notation]  SAMPLE3 := MOD_INT( SAMPLE1, SAMPLE2);    ·  The  input  data  “24378”  in  SAMPLE1  is  divided  by  “2345”  in  SAMPLE2  and  the  remainder “928” is stored in SAMPLE3.    ●  Error information  ·  If divided by 0 error occurs, the remainder “0” is output as operation result. Also, error  flag and divide error flag are set to TRUE(ON).    ·   When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    307    Increment    Arithmetic Operation  Increment      LD/FBD  language  notation      Output  INC_□□ Input_Output 1 V V Input_Output 1    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := INC_□□( V );    ●  Arguments  ·  The following data types are supported for input/output and output arguments and the  instruction symbol depends on the data type.      Arg.  Operand  Type  Const.  Description  Remarks  I/O  —  —  Input/Output1    Output  —  See below  —  Output                Input_Output 1    Symbol(_        )  Output    INT  INC_INT  INT  DINT  INC_DINT  DINT  UINT  INC_UINT  UINT  REAL  INC_REAL  REAL  Input_  Output 1 Output  INC_              V              V Input_Output 1     ●  Function  ·  The input/output data Input_Output 1 is incremented and the result is output.  ·  The result is not limited even if the result exceeds the data range.  ·  Direct I/O variable cannot be specified for Input/Output 1 (Unified Controller).    Output=Input_Output 1+1    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  308    ●  Program example  [LD/FBD language notation]                SAMPLE1  999  LD  INC_INT        V                V SAMPLE1   ST  SAMPLE2 1000  ST      ·  The  input  data  “999”  in  SAMPLE1  is  incremented  and  the  result  “1000”  is stored  in  SAMPLE1 and SAMPLE2.                SAMPLE1  32767  LD  INC_INT        V                V SAMPLE1   ST  SAMPLE2 -32768 ST      ·  The input data “32767” in SAMPLE1 is incremented and the result “-32768” is stored  in SAMPLE1 and SAMPLE2.    [ST language notation]  SAMPLE2 := INC_INT( SAMPLE1 );    ●  Error information  ・ The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The  following  operation  is  performed  when  direct  I/O  variable  is  specified  for  the  Input/Output1:    Controller  Action  Unified Controller nv series  Increment is not executed and the result is 0.    Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    309    Decrement    Arithmetic Operation  Decrement      LD/FBD  language  notation      Output  DEC_□□ V V Input_Output 1 Input_Output 1    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DEC_□□( V );    ●  Arguments  ·   The following data types are supported for input/output and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input/  Output  —  —  Input/Output1    Output  —  See below  —  Output                Input_Output 1    Symbol(_        )  Output    INT  DEC_INT  INT  DINT  DEC_DINT  DINT  UINT  DEC_UINT  UINT  REAL  DEC_REAL  REAL  Input_Output 1 Output  DEC_            V              V Input_Output 1     ●  Function  ·  The input/output data Input_Output 1 is decremented and the result is output.  ·  The result is not limited even if the result exceeds the data range.  ·  Direct I/O variable cannot be specified for the Input/Output1 (Unified Controller).    Output=Input_Output 1 - 1    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  310    ●  Program example  [LD/FBD language notation]              SAMPLE1  999  LD  DEC_INT       V                V SAMPLE1   ST  SAMPLE2 998  ST      ·  The  input  data  “999”  in  SAMPLE1  is  decremented  and  the  result  “998”  is  stored  in  SAMPLE1 and SAMPLE2.              SAMPLE1  -32768  LD  DEC_INT       V                V SAMPLE1   ST  SAMPLE2 32767  ST      ·  The input data “-32768” in SAMPLE1 is decremented and the result “32767” is stored  in SAMPLE1 and SAMPLE2.    [ST language notation]  SAMPLE2 := DEC_INT( SAMPLE1 );    ●  Error information  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The  following  operation  is  performed  when  direct  I/O  variable  is  specified  for  the    Input/Output1:    Controller  Action  Unified Controller nv series  Decrement is not executed and the result is 0.    Error flag and table operation error flag are set to TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    311    Power    Arithmetic Operation  Power      LD/FBD  language  notation    Input 1 Output  EXPT_□□ Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := EXPT_□□( Input1, Input2 );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input1  REAL  ○   Input1    Input  Input2  See below  ○   Input2    Output  —  REAL  —  Output                Input 2  Symbol(_        )  INT  EXPT_INT  DINT  EXPT_DINT  UINT  EXPT_UINT  REAL  EXPT_REAL  Input  1 Output  EXPT_        Input  2     ●  Function  ·  Input data Input 1 is raised to the Input 2 power and the result is output.  Output=(Input 1) Input 2     □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  312    ●  Program example  [LD/FBD language notation]        SAMPLE1 12.45  LD  EXPT_INT  SAMPLE2 2.5  LD  SAMPLE3 546.91946 ST      [ST language notation]  SAMPLE3 := EXPT_INT( SAMPLE1, SAMPLE2);    ·  SAMPLE1  is raised  to  the SAMPLE2  power  and  the result  “546.91946”  is  stored  in  SAMPLE3.    ●  Error information  ·  If the operation result exceeds the valid data range, the limit value is output.  ·  If  Input  1=Input  2=0,  or  Input1=0  and  Input2<0,  “0”  is  output  as  the  result  and  the  specific register error flag is set to TRUE(ON).  ·  If Input 1 < 0 and Input 2 has decimal fractions (example: Input 1=—2, Input 2=—2.5),  the result is “0” and the specific register error flag is set to TRUE(ON).  ·  The following operation is performed when the input data type is REAL:      Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    In case of INF input or if an overflow occurs, the result is INF. Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    313    Add Time Data    Arithmetic Operation  Add Time Data    LD/FBD  language  notation    Input  Output ADD_□□ Input  2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ADD_□□( Input1, Input2 );    ●  Arguments  ·   The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  *1 Input1, 2    Output  —  See below  —  Output    Note: For constant specification of input 1, constant specification is not allowed for DT type.        Input 1  Output 2  Symbol(_        )  Output    TIME    TIME  ADD_T_T  TIME  TOD    TIME  ADD_TOD_T  TOD  DT    TIME  ADD_DT_T  DT  DATE  INT  ADD_D_INT  DATE  DATE  DINT  ADD_D_DINT  DATE  DATE  UINT  ADD_D_UINT  DATE  Input 1 Output    ADD_        Input 2     ●  Function  ·  Input data Input 1 is added and Input 2 and the result is output.  ·  The number of input data is fixed at two.  ·  In case of addition of DT type and integer data, integer data is assumed to be number  of days.  Output=Input1+Input2  □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  314    ●  Program example   When TIME+TIMETIME  [LD/FBD language notation]        SAMPLE1  T#12345ms  LD  ADD_T_T  SAMPLE2  T#3456ms  LD  SAMPLE3 T#15801ms ST      [ST language notation]  SAMPLE3 := ADD_T_T( SAMPLE1, SAMPLE2);    ·  The input data “T#12345ms” in SAMPLE1 is added with “T#3456ms” in SAMPLE2 as  time data and the result “T#15801ms” is stored in SAMPLE3.     When DATE+INTDATE  [LD/FBD language notation]    SAMPLE1  D#1999-6-29  LD  ADD_D_INT SAMPLE2  5  LD  SAMPLE3 D#1999-7-4 ST      [ST language notation]  SAMPLE3 := ADD_D_INT( SAMPLE1, SAMPLE2);    ·  The input data “D#1999-6-29” in SAMPLE1 is added to input data “5” in SAMPLE2 as  time data and the result “D#1999-7-4” is stored in SAMPLE3.    ●  Error information  ·  If an overflow occurs, the limit value is output as result.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    315    Subtract Time Data    Arithmetic Operation  Subtract Time Data    LD/FBD  language  notation    Input 1 Output  SUB_□□ Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SUB_□□( Input1, Input2 );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type.      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○  *1 Input1, 2    Output  —  See below  —  Output    * For constant specification of input 1, constant specification is not allowed for DT type.      Input 1  Input 2  Symbol(_        )  Output    TIME    TIME  SUB_T_T  TIME  DATE    DATE  SUB_D_D  TIME  TOD    TIME  SUB_TOD_T  TOD  TOD  TOD  SUB_TOD_TOD  TIME  DT  TIME  SUB_DT_T  DATE  DT  DT  SUB_DT_DT  TIME  DATE  DATE  SUB_D_D_INT  INT  DATE  DATE  SUB_D_D_DINT  DINT  DATE  DATE  SUB_D_D_UINT  UINT  DATE  INT  SUB_D_INT  DATE  DATE  DINT  SUB_D_DINT  DATE  DATE  UINT  SUB_D_UINT  DATE  Input 1 Output    SUB_        Input 2     ●  Function  ·  Input data Input 2 is subtracted from Input 1 and the result is output.  ·  The number of input data is fixed at two.  ·   For subtraction of integer type data, integer data is assumed to be number of days.  Output=Input1-Input2  □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  316    ●  Program example   When TIME-TIMETIME  [LD/FBD language notation]                SAMPLE1  T#12345ms  LD  SUB_T_T SAMPLE2  T#3456ms  LD  SAMPLE3 T#8889ms ST      [ST language notation]  SAMPLE3 := SUB_T_T( SAMPLE1, SAMPLE2);    ·  The  input  data  “T#3456ms”  in  SAMPLE2  is  subtracted  from  “T#12345ms”  in  SAMPLE1 as time data and the result T#8889ms is stored in SAMPLE3.     When DATE—INTDATE  [LD/FBD language notation]        SAMPLE1  D#1999-7-4  LD  SUB_D_INT SAMPLE2  5  LD  SAMPLE3 D#1999-6-29 ST      [ST language notation]  SAMPLE3 := SUB_D_INT( SAMPLE1, SAMPLE2);    ·  The  input  data  “5”  in  SAMPLE2  is  subtracted  from  input  data  “D#1999-7-4”  in  SAMPLE1 as time data and the result “D#1999-6-29” is stored in SAMPLE3.    ●  Error information  ·  If an overflow occurs, the limit value is output as result.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    317    Multiply Time Data    Arithmetic Operation  Multiply Time Data    LD/FBD  language  notation    Input1 Output  MUL_□□ Input2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MUL_□□( Input1, Input2 );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input1  TIME  ○   Input1    Input  Input2  See below  ○   Input2    Output  —  TIME  —  Output        Input 2  Symbol(_        )  INT  MUL_T_INT  DINT  MUL_T_DINT  UINT  MUL_T_UINT  Input  1  Output  MUL_        Input  2      ●  Function  ·  Input data Input 1 is multiplied with Input 2 as time data and the result is output.  Output=Input1Input2    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  318    ●  Program example  [LD/FBD language notation]      SAMPLE1  T#12345ms  LD  MUL_T_INT SAMPLE2  3  LD  SAMPLE3 T#37035ms ST      [ST language notation]  SAMPLE3 := MUL_T_INT( SAMPLE1, SAMPLE2);    ·  The input data “T#12345” in SAMPLE1 is multiplied with 3 in SAMPLE2 as time data  and the result “T#37035ms” is stored in SAMPLE3.    ●  Error information  ·  If the operation result exceeds the valid data range, the limit value is output.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.13    Arithmetic Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    319    Divide Time Data    Arithmetic Operation  Divide Time Data    LD/FBD  language  notation    Input1 Output  DIV_□□ Input2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DIV_□□( Input1, Input2 );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input1  TIME  ○   Input1    Input  Input2  See below  ○   Input2    Output  —  TIME  —  Output                Input 2  Symbol(_        )  INT  DIV_T_INT  DINT  DIV_T_DINT  UINT  DIV_T_UINT  Input  1 Output  DIV_          Input  2     ●  Function  ·  Input data Input 1 is divided by Input 2 as time data and the result is output.  Output=Input1/Input2    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  320    ●  Program example  [LD/FBD language notation]      SAMPLE1  T#12345ms  LD  DIV_T_INT SAMPLE2  3  LD  SAMPLE3 T#4115ms ST      [ST language notation]  SAMPLE3 := DIV_T_INT( SAMPLE1, SAMPLE2);    ·  The input data “T#12345” in SAMPLE1 is divided by Input data 3 in SAMPLE2 as time  data and the result “T#4115ms” is stored in SAMPLE3.    ●  Error information  ·  If the operation result exceeds the valid data range, the limit value is output.    ·  If divided by 0 error occurs, the limit is out put as operation result. Also the error flag  and divide error flag are set to TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.14    Data Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  321      2.14  Data Processing    No.  Instruction  Remarks  1  Set Carry  SETC    2  Reset Carry  RSTC    3  Encode  ENC    4  Decode  DEC    5  Bit Counter  BC    6  Table Bit Set  TSET    7  Table Bit Reset  TRST        Chapter 2    LD/FBD Instructions  6F8C1226  322    Set Carry    Data Processing  Set Carry    LD/FBD language  notation    Input  Output  SETC    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Output := SETC( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  BOOL  ○  Input    Output  —  BOOL  —  Output      ●  Function  ·  When the input is TRUE(ON), the specific register carry flag is set to TRUE(ON).  ·  When the input is FALSE(OFF), the specific register carry flag is unchanged.  ·  The state of the input is output as the result.    Input  Action  Output  FALSE(OFF)  Not executed (carry flag retains previous  value).  FALSE(OFF)  TRUE(ON)  Executed (carry flag =TRUE(ON))  TRUE(ON)    ●  Program example  [LD/FBD language notation]      SIGNAL1 1  LD  SETC    SIGNAL2 1  ST      [ST language notation]  SIGNAL2 := SETC( SIGNAL1);    ·  When SIGNAL1 is TRUE(ON), the carry flag is set to TRUE(ON) and TRUE(ON) is  output to SIGNAL2.    2.14    Data Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  323    Reset Carry    Data Processing  Reset Carry    LD/FBD language  notation    Input Output  RSTC    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Output := RSTC( Input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  BOOL  ○   Input    Output  —  BOOL  —  Output      ●  Function  ·  When the input is TRUE(ON), the specific register carry flag is reset to FALSE(OFF).  ·  When the input is FALSE(OFF), the specific register carry flag is unchanged.  ·  The state of the input is output as the result.    Input  Action  Output  FALSE(OFF)  Not executed (carry flag retains previous  value).  FALSE(OFF)  TRUE(ON)  Executed (carry flag=FALSE(OFF))  TRUE(ON)    ●  Program example  [LD/FBD language notation]    SIGNAL1 1  LD  RSTC    SIGNAL2 1  ST      [ST language notation]  SIGNAL2 := RSTC( SIGNAL1);    ·  When SIGNAL1 is TRUE(ON), the carry flag is reset to FALSE(OFF) and TRUE(ON)  is output to SIGNAL2.      Chapter 2    LD/FBD Instructions  6F8C1226  324    Encode      Data Processing  Encode      LD/FBD language  notation    Input  data Bit No. output  ENC_        EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Bit No. output := ENC_ □□ ( Input data );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Input data    Output  —  See below  —  Bit No. output            Input data  Symbol(_        )  Bit No. output  WORD  ENC_WORD_INT  INT  WORD  ENC_WORD_DINT  DINT  DWORD  ENC_DWORD_INT  INT  DWORD  ENC_DWORD_DINT  DINT  Input  data Bit No. output ENC_            ●  Function  ·  Searches the input data from the most significant bit and outputs the number of the  first bit that is TRUE(ON).    ·  he output bit number depends on the data type of the input data as follows:    WORD  :0 to 15  DWORD  :0 to 31  ·  If the input data has no TRUE(ON) bit, “-1” is output. The error flag and encode error  flag are set to TRUE(ON).    □□ □□ □□ 2.14    Data Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  325    ●  Program example  [LD/FBD language notation]     SAMPLE1  16#1234  LD  SAMPLE2 12  ST  ENC_WORD_INT  Bit  no.  15     12       8        4        0 0 0 0 1 0 0 1 0  0  0  1  1  0  1 0 0 WORD Bit search direction      [ST language notation]  SAMPLE2 := ENC_WORD_INT( SAMPLE1);    ·  Encodes the input data SAMPLE1 and stores “12” as the result in SAMPLE2.    ●  Error information  ·  If input data=0, an encode error occurs with -1 output as the result and the specific  register encode error flag is set to TRUE(ON).  ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  326    Decode      Data Processing  Decode      LD/FBD language  notation    Bit  No.  input Result output  DEC_□□  M M Target  data Target data    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Result output := DEC_ □□ ( Bit No. input, M );    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  ○   Bit No. input    Output  —  —  Result output    I/O  M  See below  —  Target data                Bit no. input  Target data  Symbol(_        )  Result output  INT  WORD  DEC_INT_WORD  INT  INT  DWORD  DEC_INT_DWORD  INT  DINT  WORD  DEC_DINT_WORD  DINT  DINT  DWORD  DEC_DINT_DWORD  DINT  Bit No. input Result output  DEC_        M M Target  data Target data      ●  Function  ·  Of the target data, the bit specified with bit No. input is set to TRUE(ON). The  operation result is output.    ·  The input bit number depends on the data type of the target data as follows:    WORD: 0 to 15 …    Bit No. position=MOD (Bit No. input/16)  DWORD: 0 to 31 … Bit No. position=MOD (Bit No. input/32))  ·  Direct I/O variable cannot be specified for the target data (Unified Controller).      □□ □□ 2.14    Data Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  327    ●  Program example  [LD/FBD language notation]     SAMPLE1  12  LD  SAMPLE3 16#1234 ST  DEC_INT_WORD  SAMPLE2  16#0234  LD  SAMPLE2   ST  M  M  Bit No.  15     12       8        4        0 0 0 0 1 0 0 1 0  0  0  1  1  0  1 0 0 WORD  Bit No. input      [ST language notation]  SAMPLE3 := DEC_INT_WORD( SAMPLE1, SAMPLE2);    ·  Of the content “16#0234” in target data SAMPLE2, the 12th bit specified with bit No.  input SAMPLE1 is set to TRUE(ON). As the result of this decode operation, the  content of target data SAMPLE2 is “16#1234” and the result “16#1234” is stored in  SAMPLE3.    ●  Error information  ·  When bit No. input < 0, no decode operation is performed.  Controller  Action  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  328    Bit Counter    Data Processing  Bit Counter    LD/FBD language  notation    Input  data Bit count output  BC_        EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Bit count output := BC_ □□ ( Input data );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input data    Output  —  INT  —  Bit count  output            Input data  Symbol(_        )  WORD  BC_WORD  DWORD  BC_DWORD  Input  data Bit count output BC_      ●  Function  ·  Counts the number of bits in the input data that are TRUE(ON) and output the result.    ●  Program example  [LD/FBD language notation]        Bit No.  15     12       8        4        0 0 0 0 1 0 0 1 0  0  0  1  1  0  1 0 0 WORD  SAMPLE1  16#1234  LD  SAMPLE2 5  ST  BC_WORD      [ST language notation]  SAMPLE2 := BC_WORD( SAMPLE1);    ·  Counts  the  number  of  bits  in  input  data  SAMPLE1  and  stores  “5”  as  the  result  in  SAMPLE2.  □□ □□ □□ 2.14    Data Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  329    Table Bit Set    Data Processing  Table Bit Set    LD/FBD language  notation      Bit  pointer Target table  TSET_□□  N Table  size   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TSET_ □□ ( Bit pointer, N, Target Table );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  —  See below  ○   Bit pointer    Input  N  UINT  ○   Table size  1≤N≤64  Output  —  PTR  —  Target table              Bit pointer  Symbol(_        )  INT  TSET_INT  DINT  TSET_DINT  WORD  TSET_WORD  DWOD  TSET_DWORD  Bit  pointer Target table  TSET_        N Table  size     ●  Function  ·  The bit position specified with bit pointer in the N word table starting with the target  table is set to TRUE(ON).    ·  The table size must be between 1 and 64 words (1024 bits).    ·  If table size N=0, no table set is performed.  ·  If the bit pointer points outside the target table, no table bit set is performed and the  error flag and table operation error flag are set to TRUE(ON).  ·  Direct I/O variable cannot be specified for the target table.    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  330    ●  Program example  [LD/FBD language notation]        SAMPLE1 88  LD  TBL1   ST  TSET_INT  SAMPLE2 6  LD  N  0 15 14 13 12 11 10 9 8 7  6  5  4  3  2  1 0 31 30 29 28 27 26 25 24 23  22  21  20  19  18 17 16 95 94 93 92 91 90 89 88 87  86  85  84  83  82  81 80 1 5 Bit pointer=88      Set to TRUE (ON)  Target table TBL1      [ST language notation]  TSET_INT( SAMPLE1, SAMPLE2, TBL1);    ·  In the “6” word (which is specified with table size SAMPLE2) table data starting with  target table TBL1, the bit position specified with bit pointer in input data SAMPLE1 is  set to TRUE(ON).    ●  Error information  ·  When the target table exceeds the variable area, the table bit set is not processed and  the data boundary is exceeded.  ·  If the bit pointer points outside the target table, the error flag and table operation error  flag are set to TRUE(ON).  ·  If table size N > 64, operation is performed with N=64.  ·  The following operation is performed when direct I/O variable is specified for the target  table:      Controller  Action  Integrated Controller  V series  S Controller  Table bit set is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Table bit set is not executed.    Error flag and table operation error flag are set to    TRUE(ON).    ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.      2.14    Data Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  331    Table Bit Reset    Data Processing  Table Bit Reset    LD/FBD language  notation      Bit  pointer Target table  TRST_□□  N Table  size   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  TRST_ □□ ( Bit pointer, N, Target table );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  Remarks  —  See below  ○   Bit pointer    Input  N  UINT  ○   Table size  1≤N≤64  Output  —  PTR  —  Target table              Bit pointer  Symbol(_          )  INT  TRST_INT  DINT  TRST_DINT  WORD  TRST_WORD  DWORD  TRST_DWORD  Bit  pointer Target table  TRST_        N Table  size     ●  Function  ·  The bit position specified with bit pointer in the N word table starting with the target  table is reset to FALSE(OFF).    ·  The table size must be between 1 and 64 words (1024 bits).    ·  If table size N=0, no table reset is performed.    ·  If the bit pointer points outside the target table, no table bit reset is performed and error  flag and table operation error flag are set to TRUE(ON).  ·  Direct I/O variable cannot be specified for the target table.    □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  332    ●  Program example  [LD/FBD language notation]        SAMPLE1 88  LD  TBL1   ST  TRST_INT  SAMPLE2 6  LD  N  0 15 14 13 12 11 10 9 8 7  6  5  4  3  2  1 0 31 30 29 28 27 26 25 24 23  22  21  20  19  18 17 16 95 94 93 92 91 90 89 88 87  86  85  84  83  82 81 80 1 5 Bit pointer=88 Reset to FALSE(OFF)  Target table TBL1      [ST language notation]  TRST_INT( SAMPLE1, SAMPLE2, TBL1);    ·  In the 6 word (which is specified with table size SAMPLE2) table data starting with  target table TBL1, the bit position specified with bit pointer in input data SAMPLE1 is  reset to FALSE(OFF).    ●  Error information  ·  When the target table exceeds the variable area, the table bit reset is not processed  and the data boundary is exceeded.  ·  If the bit pointer points outside the target table, the error flag and table operation error  flag are set to TRUE(ON).  ·  If table size N > 64, operation is performed with N=64.  ·  The following operation is performed when direct I/O variable is specified for the target  table.      Controller  Action  Integrated Controller  V series  S Controller  Table bit reset is not executed.    Error flag is set to TRUE(ON).    Unified Controller nv series  Table bit reset is not executed.    Error flag and table operation error flag are set to  TRUE(ON).      ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.          2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  333      2.15  I/O    No.  Instruction  Remarks  1  I/O Memory Read  MREAD  V dedicated  instruction  2  I/O Memory Write  MWRITE  V dedicated  instruction  3  Special Module Data Input    (nv)  MREAD_N  nv dedicated  instruction  4  Special Module Data Output (nv)  MWRITE_N  nv dedicated  instruction  5  ASC Module String Data Input  ASCREAD  V dedicated  instruction  6  ASC Module String Data Output  ASCWRITE  V dedicated  instruction  7  Read State Change  GET_IP_INF    8  Direct I/O  IO_T  T compatible  instruction  9  I/O Node State Read  GET_SIO_STS  nV dedicated  instruction  10  I/O Module State Read  GET_IO_STS  nv dedicated  instruction  11  I/O Fallback Request  IOFB_REQ  nv dedicated  instruction  12  I/O Fallback Recovery Request  IORC_REQ  nv dedicated  instruction  13  Drive Device State Read  GET_DRV_STS nv dedicated  instruction      Chapter 2    LD/FBD Instructions  6F8C1226  334    I/O Memory Read    I/O  I/O Memory Read  V dedicated  instruction  LD/FBD language  notation  Completion  output  Bus/Unit/Slot Transfer  word  number Transfer  destination  variable Extended  memory  top  addres Execution  enabled  input MREAD  T  N  P  TADDR E    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Completion output:= MREAD( E, T, TADDR, P, N );    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid  range  E  BOOL  ○   Execution enabled input    T  WORD  ○   Bus/Unit/Slot    TADDR  WORD  ○   Extended memory top  address  0 to 7FFFH P  PTR  —  Transfer destination  variable    Input  N  UINT  ○   Transfer word number  1 to 256  Output  —  BOOL  —  Completion output      [I/O argument supplementary description]  ·  Bus/Unit/Slot data structure    15  11  12  8 Bus  Unit    Slot    7 0 Range 16#00 to 16#0A  Range 16#0 to 16#7(0 in case of base unit)  Range 16#0 to 16#3(0 in case of base unit)      ·  Extended memory top address    15  Extended memory top address(16#0000 to 16#7FFF) 0   ·  Transfer word number    15  Transfer word number (1 to 256)  0 2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  335    ●  Function  ·  If execution enabled input E is FALSE(OFF), no data is input from the special module.  ·  If execution enabled input E is TRUE(ON), data is transferred from special module  internal extended memory specified by the input argument to the CPU module.  ·  Input arguments specify the transfer source (special module slot location and special  module internal extended memory top address), transfer destination (CPU module  internal variable), and transfer word number.  ·  If an execution error is detected, the specific register error flag is set.  ·  1 to 256 words may be transferred.      ·  Direct I/O variable cannot be specified for the transfer destination variable.    ●  Program example  [LD/FBD language notation[    15 0 Special module internal extended address N=200W  16#0000 TADDR=16#0100 16#01C8 16#7FFF   N=200W  15  0 TransferdestinationvariableSAMPLE3 Transfer IO specification  : SAMPLE1  Bus  : Channel 1  Unit  : 1  Slot  : 6  SIGNAL1  1  LD  MREAD  SIGNAL2  1  ST  E  SAMPLE1  16#1_1_06  LD  SAMPLE2  16#0100  LD  SAMPLE3  1234  LD  SAMPLE4  200  LD  T  TADDR  P  N      [ST language notation]  SIGNAL2 := MREAD( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  SAMPLE1 specifies the special module slot location (Bus: Channel 1, Unit: 1, Slot: 6).  ·  SAMPLE2 specifies the read top address of the extended memory in special module  (16#0100).  ·  SAMPLE3 specifies the transfer destination variable.  ·  SAMPLE4 specifies the transfer word number (specify 200).  ·  When SIGNAL1 is TRUE(ON), the data specified with the above input argument is  transferred.    Upon normal completion, SIGNAL2 is set to TRUE(ON).    Chapter 2    LD/FBD Instructions  6F8C1226  336    ●  Error information  ·  When the module cannot be accessed because the specified special module is not  installed or is abnormal.  ·  When the specified module is not a special module.  ·  When the transfer word number exceeds 256.  ·  When the transfer source special module extended address is outside 0 to 7FFF.  ·  When the range specified by the transfer destination variable exceeds the allowed  area.  ·  When direct I/O variable is specified for transfer destination variable.  ·  If the above error occurs, specific register error flag is set to TRUE(ON) without  performing any operation.    2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  337    I/O Memory Write    I/O  I/O Memory Write  V dedicated  instruction  LD/FBD language  notation  Completion  output  Bus/Unit/Slot Transferred  words Transfer  destination  variable Extended  memory  top  address Execution  enabled  input MWRITE  T  N  P  TADDR E    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Completion output := MWRITE( E, T, TADDR, P, N );    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid  range  E  BOOL  ○   Execution enabled input    T  WORD  ○   Bus/Unit/Slot    TADDR  WORD  ○   Extended memory top  address  0 to 7FFFH P  PTR  —  Transfer destination  variable    Input  N  UINT  ○   Transfer words  1 to 256  Output  —  BOOL  —  Completion output      [I/O argument supplementary description]  ·  Bus/Unit/Slot data structure      15  11  12  8 Bus    Unit    Slot    7 0 Range 16#00 to 16#0A  Range 16#0 to 16#7 (0 in case of base unit)  Range 16#0 to 16#3 (0 in case of base unit)      ·  Extended memory top address      15  Extended memory top address (16#0000 to 16#7FFF) 0     ·  Transfer word number      15  Transfer word number (1 to 256)  0   Chapter 2    LD/FBD Instructions  6F8C1226  338    ●  Function  ·  If execution enabled input E is FALSE(OFF), no data is output to special module.  ·  If execution enabled input E is TRUE(ON), data is transferred from transfer source  variable in the CPU module specified by input argument to the special module internal  extended memory.  ·  Input arguments specify the transfer source (CPU module internal variable), transfer  destination (special module slot location and special module internal extended  memory top address), and transfer word number.  ·  If an execution error is detected, the specific register error flag is set.  ·  1 to 256 words may be transferred.      ·  Direct I/O variable cannot be specified for transfer source variable.    ●  Program example  [LD/FBD language notation]    15  0 Special module internal extended address   N=200W    16#0000  TADDR=16#0100 16#01C8  16#7FFF    N=200W  15 0 Transfer source variable SAMPLE3 Transfer IO specification  : SAMPLE1  Bus  : Channel 1  Unit  : 1  Slot  : 6  SIGNAL1  1  LD  MWRITE  SIGNAL2  1  ST  E  SAMPLE1  16#1_1_06  LD  SAMPLE2  16#0100  LD  SAMPLE3  1234  LD  SAMPLE4  200  LD  T  TADDR  P  N      [ST language notation]  SIGNAL2 := MWRITE( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  SAMPLE1 specifies the special module slot location (Bus: Channel 1, Unit: 1, Slot: 6).  ·  SAMPLE2 specifies the special module internal extended memory write top address  (16#0100).  ·  SAMPLE3 specifies the transfer source variable.  ·  SAMPLE4 specifies the transfer word number (specify 200).  ·  When SIGNAL1 is TRUE(ON), the data specified with the above input argument is  transferred.    Upon normal completion, SIGNAL2 is set to TRUE(ON).  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  339    ●  Error information  ·  When the module cannot be accessed because the specified special module is not  installed or is abnormal.  ·  When the specified module is not a special module.  ·  When the transfer word number exceeds 256.  ·  When the range specified by the transfer source variable exceeds the allowed area.  ·  When the transfer destination special module extended address is outside 0 to 7FFF.  ·  When direct I/O variable is specified for the transfer source variable.  ·  If the above error occurs, specific register error flag is set to TRUE(ON) without  performing any operation.    Chapter 2    LD/FBD Instructions  6F8C1226  340    I/O Memory Read(nv)   I/O  I/O Memory Read (nv)  nv dedicated  instruction  LD/FBD language  notation  Completion output  Basic unit slot/ node/unit/slot Transfer  word  number Transfer destination variable Extended  memory  address Execution  request MREAD_N  Error    Status    REQ  DONE  T  ERROR  TADDR STATUS  P  N  Instance name  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( REQ, T, TADDR, P, N);  [Variable name]:= @[Instance name].DONE;  [Variable name]:= @[Instance name].ERROR;  [Variable name]:= @[Instance name].STATUS;    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid range  REQ  BOOL  ○   Execution request    T  DWORD  ○  Basic unit slot / node /  unit / slot    TADDR  WORD  ○   Extended memory address  0 to 32KW  P  PTR  —  Transfer destination variable    Input  N  UINT  ○   Transfer word number  1 to 256  DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error    Output  STATUS  INT  —  Status      [Input argument supplementary description]  ·  Basic unit slot / node / unit / slot data structure    31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8  7  6  5  4  3  2 1 0 Slot  Unit Node Basic unit slot      Setting value  Allowable  range  Valid range  Remarks  Basic unit slot  0 to 255  0  0: I/O directly under the controller  Node    0 to 255  3 to 34    NX-I/O  1    Unit    0 to 255  G3-I/O  1 to 7    NX-I/O  0 to 15   Slot    0 to 255  G3-I/O  0 to 11     2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  341  ·  Extended memory address      15  Extended memory address (16#0000 to 16#7FFF) 0   ·  Transfer word number        15  Transfer word number    (1 to 256)  0   ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion output  ERROR  BOOL  Error  STATUS  INT  Status  Can be accessed from the user  program.  TIMECNT  DINT  Time count  RESERVE  DWORD  Reserved  Cannot be accessed from the user  program.      ●  Function  ·  This function block reads data from an arbitrary memory address for the I/O module  with memory of NX-I/O and G3-I/O.  ·  When execution request REQ changes from FALSE(OFF) to TRUE(ON), data for  transfer word number is read from extended memory address TADDR of the specified  basic unit slot / node / unit / slot to transfer destination variable P.  ·  For transfer word number, 1 to 256 words can be specified.  ·  When it is completed normally, completion output DONE becomes TRUE(ON) for one  scanning time.  ·  When it is completed with an error, error ERROR becomes TRUE(ON) for one  scanning time.  ·  When transfer is completed with or without an error, the details are output to status  STATUS.  ·  Direct I/O variable cannot be specified for the transfer destination variable.  ·  For MREAD_N, MWRITE_N and XMIT_N instructions, up to the maximum requests  can be made simultaneously per controller. (Maximum request number:type1=48,  type2=24)  ·  The status values are as follows:    Completion  status  Status  STATUS  DONE  ERROR Content  Description  -5000  FALSE  TRUE Extended instruction  request number exceeded More than 48 or 24 extended instructions are requested  simultaneously.    -5001  FALSE  TRUE Instruction specification  abnormal  The number of transfer word is more than 256, or direct  I/O is specified for the transfer destination variable.    -5002  FALSE  TRUE Extended memory  specification address  abnormal  When 0≤Extended memory address  specification≤16#7FFF: (TADDR+N-1)≥16#8000  -5003  FALSE  TRUE Boundary abnormal  The specification range of transfer destination variable  exceeds the area.    -5005  FALSE  TRUE Module abnormal  I/O is installed in the specified basic unit slot/node/unit/  slot but it is in degeneration or specified as hot-swap.    -5104  FALSE  TRUE I/O access abnormal  Access error in the specified I/O module.    -5119  FALSE  TRUE I/O uninstalled  I/O is not installed in the specified basic unit  slot/node/unit/slot.    Chapter 2    LD/FBD Instructions  6F8C1226  342  ●  Program example  [LD/FBD language notation]      15 0 Extended address in special module   N=200W  16#0000 TADDR=16#0100 16#01C8 16#7FFF   N=200W  15  0 Transfer destination    variable SAMPLE3  Transfer  IO specification:SAMPLE1  Basic unit slot:0  Node:3  Unit:2  Slot:3  SIGNAL1  1  LD  MREAD_N  SIGNAL2 1  ST  REQ  SAMPLE1  16#00030203 LD  SAMPLE2  16#0100  LD  SAMPLE3  1234  LD  SAMPLE4  200  LD  T  TADDR  P  N  DONE ERROR STATUS SIGNAL3 0  ST  SIGNAL5 8  ST  MREAD_N_1     [ST language notation]  MREAD_N_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);  SIGNAL2 := @MREAD_N_1.DONE;  SIGNAL3 := @MREAD_N_1.ERROR;  SIGNAL5 := @MREAD_N_1.STATUS;    ·  The installation slot location of the special module is specified with SAMPLE1 (Basic  unit slot :0, Node :3, Unit  :2, Slot :3).  ·  The read top address of the extended memory in special module is specified with  SAMPLE2 (16#0100).  ·  The destination variable is specified with SAMPLE3.  ·  Transfer word number is specified with SAMPLE4 (200 specified).  ·  When SIGNAL1 is TRUE(ON), transfer operation is performed with the data specified  in the input arguments above.    When it is completed normally, SIGNAL2 becomes  TRUE(ON).    ●  Error information  The  following  operation  is  performed  when  direct  I/O  variable  is  specified  for  the  destination:      Controller  Action  Unified Controller nv series  Special module data input is not executed.    Error flag and table operation error flag are set to TRUE(ON).  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  343    I/O Memory Write(nv)   I/O  I/O Memory Write (nv)  nv dedicated  instruction  LD/FBD language  notation  Completion output Basic unit slot/node/unit/slot Transfer  word  number Transfer  source  variable Extended  memory  address Execution  permission  input MWRITE_N  Error    Status    T  REQ DONE ERROR  TADDR  STATUS  P N Instance name  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name] ( REQ, T, TADDR, P, N);  [Variable name]:= @[Instance name].DONE;  [Variable name]:= @[Instance name].ERROR;  [Variable name]:= @[Instance name].STATUS;  ●  Arguments    Arg.  Operand Type  Const. Description  Valid  range  REQ  BOOL  ○   Execution permission input    T  DWORD  ○   Basic unit slot / node / unit / slot    TADDR  WORD  ○   Memory top address  0 to 32KW P  PTR  —  Transfer source variable    Input  N  UINT  ○   Transfer word number  1 to 256  DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error    Output  STATUS  INT  —  Status      [Input argument supplementary description]  ·  Basic unit slot / node / unit / slot data structure    31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8  7  6  5  4  3  2  1 0 Slot    Unit    Node  Basic unit slot    Setting value  Allowable  range  Valid range  Remarks  Basic unit slot  0 to 255  0  0 : I/O directly under the controller  Node    0 to 255  3 to 34    NX-I/O  1    Unit    0 to 255  G3-I/O  1 to 7    NX-I/O  0 to 15    Slot    0 to 255  G3-I/O  0 to 11    ·  Extended memory address      15  Extended memory address    (0 to 16#7FFF))  0   Chapter 2    LD/FBD Instructions  6F8C1226  344  ·  Transfer word number      15  Transfer word number (1 to 256)  0   ●  Function  ·  This function block writes data to an arbitrary memory address for the I/O module with  memory of NX-I/O and G3-I/O.  ·  When execution request REQ changes from FALSE(OFF) to TRUE(ON), data for  transfer word number is written to extended memory address TADDR of the specified  basic unit slot / node / unit / slot from transfer destination variable P.  ·  For transfer word number, 1 to 256 words can be specified.  ·  When it is completed normally, completion output DONE becomes TRUE(ON) for one  scanning time.  ·  When it is completed with an error, error ERROR becomes TRUE(ON) for one  scanning time.  ·  When transfer is completed with or without an error, the details are output to status  STATUS.  ·  Direct I/O variable cannot be specified for transfer source variable.  ·  For MREAD_N, MWRITE_N and XMIT_N instructions, up to the maximum requests  can be made simultaneously per controller. (Maximum request number : type1=48,  type2=24)  The status values are as follows.    Completion  status  Status  STATUS  DONE  ERROR Content    Description  -5000  FALSE  TRUE Extended instruction  request number exceeded More than 48 or 24 extended instructions are requested  simultaneously.    -5001  FALSE  TRUE Instruction specification  abnormal  The number of transfer word is more than 256, or direct I/O  is specified for the transfer destination variable.    -5002  FALSE  TRUE Extended memory  specification address  abnormal  When 0≤Extended memory address specification≤ 16#7FFF:  (TADDR+N-1)≥16#8000  -5003  FALSE  TRUE Boundary abnormal  The specification range of transfer destination variable  exceeds the area.    -5005  FALSE  TRUE Module abnormal  I/O is installed in the specified basic unit slot/node/unit/slot  but it is in degeneration or specified as hot-swap.    -5104  FALSE  TRUE I/O access abnormal  Access error in the specified I/O module.    -5119  FALSE  TRUE I/O uninstalled  I/O is not installed in the specified basic unit  slot/node/unit/slot.      ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion  output  ERROR  BOOL  Error  STATUS  INT  Status  Can be accessed from the user  program.  TIMECNT  DINT  Time count  Cannot be accessed from the user  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  345  RESERVE  DWORD  Reserved  program.    ●  Program example  [LD/FBD language notation]        15  0 Extended address in special module      N=200W    16#0000  TADR=16#0100 16#01C8  16#7FFF    N=200W  15 0 Transfer destination variable  Transfer IO specification : SAMPLE1  Channel  : 0  Node  : 3  Unit    : 2  Slot    : 3  SIGNAL1  1  LD  MWRITE_N  SIGNAL2 1  ST  REQ  SAMPLE1  16#00030203  LD  SAMPLE2  16#0100  LD  SAMPLE3  1234  LD  SAMPLE4  200  LD  T  TADDR  P  N  DONE  STATUSR  ERROR  SIGNAL3 0  ST  SIGNAL5 8  ST  MWRITE_N_1    [ST language notation]  MWRITE_N_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);  SIGNAL2 := @MWRITE_N_1.DONE;  SIGNAL3 := @MWRITE_N_1.ERROR;  SIGNAL5 := @MWRITE_N_1.STATUS;    ·  The installation slot location of the special module is specified with SAMPLE1 (Basic  unit slot :0, Node :3, Unit  :2, Slot :3).  ·  The write top address of the extended memory in special module is specified with  SAMPLE2 (16#0100).  ·  The transfer source variable is specified with SAMPLE3.  ·  Transfer word number is specified with SAMPLE4 (200 specified).  ·  When SIGNAL1 changes FALSE(OFF) to TRUE(ON), transfer operation is performed  with the data specified in the input arguments above.    When it is completed normally,  SIGNAL2 becomes TRUE(ON).    ●  Error information  ·  The  following  operation  is  performed  when  direct  I/O  variable  is  specified  for  the  transfer source:      Controller  Action  Unified Controller nv series  Special module data output is not executed.    Error flag and table operation error flag are set to  TRUE(ON).  Chapter 2    LD/FBD Instructions  6F8C1226  346    ASC Module String Data Input   I/O  ASC Module String Data Input  V dedicated  instruction  LD/FBD language  notation  Completion  output  Bus/Unit/Slot Transfer word number Transfer destination variable Extended memory top address Execution enabled input ASCREAD    E      T      TADDR      P      N      CODE  End code specification EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Completion output := ASCREAD( E, T, TADDR, P, N, CODE );    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid range E  BOOL  ○   Execution enabled input    T  WORD  ○   Bus/Unit/Slot    TADDR  WORD  ○   Extended memory top  address  0 to 7FFFH P  STRING  —  Transfer destination  variable    N  UINT  ○   Transfer word number  1 to 129  Input  CODE  WORD  ○   End code specification    Output  —  BOOL  —  Completion output      [Input argument supplementary description]  ·  Bus/Unit/Slot data structure      15  11  12  8 Bus  Unit    Slot    7 0 Range 16#00 to16#0A  Range 16#0 to 16#7 (0 in case of basic unit)  Range 16#0 to 16#3 (0 in case of basic unit)    ·  Extended memory top address      15  Extended memory top address (16#0000 to 16#7FFF) 0   ·  Transfer word number      15  Transfer word number (1 to 129)  0   2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  347    ●  Function  ·  If execution enabled input E is FALSE(OFF), no string data is input from the ASC  module.    ·  If execution enabled input E is TRUE(ON), data is transferred from ASC module  internal extended memory specified by the input argument to the STRING variable in  the CPU module.  ·  The store target data is N words starting from TADDR and the data from the beginning  up to the specified end code is stored.    ·  The low order byte (16#00 to 16#FF) of the CODE input data is used as the end code.    ·  For input arguments, specify the transfer source (ASC module slot location and ASC  module internal extended memory top address), transfer destination (CPU module  internal variable), transfer word number, and end code.  ·  If a double-byte code in the data read from ASC module is invalid, the invalid  double-byte code is stored in STRING variable replaced by “??”.    ·  If an execution error is detected, the specific register error flag is set.  ·  One to 129 words may be specified for transfer word number.    ·  Direct I/O variable cannot be specified for transfer destination variable.    ● Important  · Specify the same code for the end code in the ASC module and the end code specification  CODE in this instruction.    ●  Program example  [LD/FBD language notation]      SIGNAL1  1  LD  ASCREAD  SIGNAL2 1  ST  E  SAMPLE1  16#1_1_06  LD  SAMPLE2  16#0080  LD  SAMPLE3    LD  SAMPLE4  5  LD  T  TADDR P  N  15 0 Extended address in  ASC modul e    “2“    16#0000 TADDR=16#0080 16#0085 16#7FFF VAR length=6  15  0 Transfer destination  variable SAMPLE3  Transfer  Variables:  Variable  Data type  Dec.  SAMPLE3  STRING[12]  VAR    SAMPLE5  16#000D  LD  CODE  “1“  “4“  “3“  “6“  “5“  “8“  “7“  “CR“  ““  “2“  “1“  “4“  “3“  “6“  “5“  “8“  “7“  Stri ng length=8 *  *  *  *  IO specification: SAMPLE1  Bus: Channel 1  Unit: 1  Sl ot: 6      Chapter 2    LD/FBD Instructions  6F8C1226  348    [ST language notation]  SIGNAL2  :=  ASCREAD(  SIGNAL1,  SAMPLE1,  SAMPLE2,  SAMPLE3,  SAMPLE4,  SAMPLE5);    ·  SAMPLE1 specifies the ASC module slot location.      (Bus: Channel 1, Unit: 1, Slot: 6)  ·  SAMPLE2 specifies the read top address of the extended memory in ASC module.  (16#0080)  ·  SAMPLE3 specifies the transfer destination STRING variable.  ·  SAMPLE4 specifies the transfer word number. (5 specified)  ·  SAMPLE5 specifies the end code. ("CR" specified)  ·  When variable SIGNAL1 is TRUE(ON), the content specified with the above input  argument is transferred and the character data up to the specified end code is stored  in the STRING variable. Upon normal completion, SIGNAL2 is set to TRUE(ON).    ●  Error information  ·  When the ASC module cannot be accessed because the specified ASC module is not  installed or is abnormal.  ·  When the specified module is not a special module.  ·  When the transfer word number exceeds 129.  ·  When the transfer source ASC module extended address is not between 0 and 7FFF.  ·  When the range specified by the transfer destination variable exceeds the allowed  area.  ·  When direct I/O variable is specified for transfer destination variable.  ·  If the above error occurs, the specific register error flag is set to TRUE(ON) without  performing any operation.    2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  349    ASC Module String Data Output   I/O  ASC Module String Data Output  V dedicated  instruction  LD/FBD language  notation    Completion  output  Bus/Unit/Slot Transfer source variable Extended memory top address Execution enabled input ASCWRITE    E      T      TADDR      P      N      CODE  Transfer word number End code specification   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Completion output := ASCWRITE( E, T, TADDR, P, N, CODE );    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid  range  E  BOOL  ○   Execution enabled input    T  WORD  ○   Bus/Unit/Slot    TADDR  WORD  ○   Extended memory top  address  0 to 7FFFH P  STRING  —  Transfer source variable    N  UINT  ○   Transfer word number  1 to 129  Input  CODE  WORD  ○   End code specification    Output  —  BOOL  —  Completion output      [Input argument supplementary description]  ·  Bus/Unit/Slot data structure    15  11  12  8 Bus    Unit    Slot    7 0 Range 16#00 to 16#0A  Range 16#0 to 16#7 (0 in case of basic unit)  Range 16#0 to 16#3 (0 in case of basic unit)    ·  Extended memory top address    15  Extended memory address (16#0000~16#7FFF) 0   ·  Transfer word number    15  Transfer word number (1 to129)  0   Chapter 2    LD/FBD Instructions  6F8C1226  350    ●  Function  ·  If execution enabled input E is FALSE(OFF), no data is output to ASC module.  ·  If execution enabled input E is TRUE(ON), data is transferred from transfer source  variable in the CPU module specified by input argument to the ASC module internal  extended memory.  ·  The storage target data is output with the valid character code stored in STRING  variable appended with the end code specified with end code specification CODE.  ·  The low order byte (16#00 to 16#FF) of the CODE input data is used as the end code.  ·  For input arguments, specify the transfer source (CPU module internal variable),  transfer destination (special module slot location and ASC module internal extended  memory top address), transfer word number, and end code.  ·  If an execution error is detected, the specific register Error Flag is set.  ·  One to 129 words (up to 256 bytes + end code) can be specified as transfer word  number.  Normally, the transfer word number N is specified as INT ((string declaration byte  size+2)/2). By specifying this way, the application program need not be aware of the  actual number of character code bytes stored in the STRING variable.  ·  Direct I/O variable cannot be specified for transfer source variable.    ● Important    · Specify the same code for the end code in the ASC module and the end code specification  CODE in this instruction.    ●  Program example  [LD/FBD language notation]        15 0 Transfer source variable SAMPLE3 Transfer  IO specification : SAMPLE1  Bus    : Channel 1  Unit    : 1  Slot    : 6  SIGNAL1  1  LD  SIGNAL2  1  ST  SAMPLE1  16#1_1_06  LD  SAMPLE3    LD  SAMPLE4  5  LD  SAMPLE2  16#0240  LD  SAMPLE5  16#000D  LD  ASCWRITE E  T  P  N  TADDR  CODE  “2” “1” “4” “3” “6” “5” “8” “7” “”  “”  VAR length=6  String length=8  15  0 Extended address in ASC module  16#0000  TADDR=16#0240 16#0245  16#7FFF  “2” “1”  “4” “3”  “6” “5”  “8” “7”  “CR”  “”  Variable :  Variable    Data type Dec.  SAMPLE3  STRING[12] VAR      2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  351    [ST language notation]  SIGNAL2  :=  ASCWRITE  (SIGNAL1,  SAMPLE1,  SAMPLE2,  SAMPLE3,  SAMPLE4,  SAMPLE5);    ·  SAMPLE1 specifies the ASC module slot location (Bus: Channel 1, Unit: 1, Slot: 6).  ·  SAMPLE2 specifies the ASC module internal extended memory write top address  (16#0240).  ·  SAMPLE3 specifies the transfer source STRING variable.  ·  SAMPLE4 specifies the transfer word number (5 specified).  ·  SAMPLE5 specifies the end code ("CR" specified).  ·  When SIGNAL1 is TRUE(ON), transfer is performed with the end code specified with  the above input argument appended.    Upon normal completion, SIGNAL2 is set to  TRUE(ON).    ●  Error information  ·  When the ASC module cannot be accessed because the specified ASC module is not  installed or is abnormal.  ·  When the specified module is not a special module.  ·  When the transfer word number exceeds 129.  ·  When the range specified by the transfer source variable exceeds the allowed area.  ·  When the transfer destination special module extended address is not between 0 and  7FFF.  ·  When INT (string declaration byte size+2)/2)>N.    ·  When direct I/O variable is specified for transfer source variable.  ·  If the above error occurs, the specific register error flag is set to TRUE(ON) without  performing any operation.    Chapter 2    LD/FBD Instructions  6F8C1226  352    State Change Detection Read   I/O  State Change Detection Read    LD/FBD language  notation  Destination table GET_IP_INF   EN input  Edge execution  Index modification  Modifier  ○  ○  —  ST language notation  GET_IP_INF( Destination table );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range  Output  —  PTR  —  Destination table      ●  Function  ·  This is a dedicated instruction for I/O interruption task.  ·  When GET_IP_INF instruction is used in the I/O interruption task, the activation factor  (I/O module (I/O), TC-net transmission module (TC-net) and START_P) of the I/O  interruption task can be obtained.  ·  The obtained result is transferred to the specified destination table.  ·  For destination table specification, static variable, non—tracking type / static variable  (Unified Controller), temporary variable, user variable, special register (SW) or system  variable (ZW), and data register (D) are valid.    If other variable is specified, state  change detection information is not read.  ·  The structure of state change detection information varies depending on the activation  factor as shown below.    [Integrated Controller - S Controller]    State change detection information  [W]  I/O  TC-net  Remarks  +0  Activation factor=0  Activation factor =1 Indicates whether IP task activation is via I/O or TN.    +1  —  State change  occurrence slot  TN slot to detect the state change.    +2  +3  —  Point No.  The number in the “No.” column of the V tool state change  notification tab in the TN module that detects the state  change.    +4  +5  —  State change bit  history  Changed bit information of the state change point of the TN  module that detects the state change.    +6  +7  —  State change data  TN scan memory data of the state change point of the TN  module that detects the state change.  +8  +9  —  IP task No.  The number of IP task activated.    2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  353    [Unified Controller nv series]    State change detection information  [W]  I/O  TC—net  START_P  Remarks  +0  Activation factor =0  Activation factor =1 Activation factor =2 Indicates whether IP task activation is via  I/O, TN, START_P.    +1  —  State change  occurrence slot  —  TN slot to detect the state change.    +2  +3  Point No.  Point No.  —  The number in the “No.” column of the V  tool state change notification tab in the  TN module or controller that detects the  state change.    +4  +5  —  State change bit  history  —  Changed bit information of the state  change point of the TN module that  detects the state change.  +6  ON interruption  status  +7  OFF interruption  status  State change data  —  I/O: Change bit information of the state  change point of the I/O module that  detects the state change.  TC-net: TN scan memory data of the  state change point of the TN module  that detects the state change.  +8  +9  IP task No.  IP task No.  IP task No.  The number of IP task activated.      ●  Program example  [LD/FBD language notation]    I/O state  change  notification  Point No. 0  I/O-1  Word No.0  Point   No.1  I/O-1  Word No.1  TC-net100 state change    notification  Point  No.0  Block No.1  Word No.0  Point    No.1  Block No.2  Word    No.6  Point    No.2  Block    No.2  Word    No.8  I/O interruption  event processing  program (IP6)  Controller I/O interruption    registration  information  I/O interruption  event processing  program (IP3)    IP0  IP1  IP2  IP3  IP4  IP5  IP6  IP15  Info ST /* IP6 Program */ /* When Info point No.=1*/ /* When Info point No.=2*/ Interruption processing for point No.=2  Interruption processing for point No.=1  GET_IP_INF  /* State change detection  information  →Info*/  Info ST /* IP3 Program */  /* When Info activation factor=I/O*/  /* When Info activation factor=TC-net*/  /* State change detection  information  →Info*/  Interruption processing from TC-net 100 module  Interruption processing from I/O-1 module word No.= 1  GET IP INF Chapter 2    LD/FBD Instructions  6F8C1226  354    [ST language notation]  GET_IP_INF(Info);    ♦ When the same I/O interruption task (IP3) is set from the setting screen of I/O state  change notification or TC-net100 state change notification:  ·  Using the I/O interruption program, state change detection information is read to  variable Info with GET_IP_INF instruction.    Interruption processing from the I/O  module and interruption processing from TC-net100 can be programmed and  executed as different cases depending on the activation factor read.  ♦ When the same I/O interruption task (IP6) is set with multiple point number settings  from the setting screen of TC—net100 state change notification:  ·  Using the I/O interruption program, state change detection information is read to  variable Info with GET_IP_INF instruction.    Interruption processing by TC-net100  point number can be programmed and executed as different cases depending on  the point number read.    ●  Error information  ·  If any variable other than static variable, non—tracking type / static variable (unified  controller), temporary variable, user variable, special register (SW) or system variable  (ZW), or data register (D) is specified, state change detection information is not read,  and table operation error and error flag are set to TRUE(ON).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs. 2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  355    Direct I/O    I/O  Direct I/O  T compatible  instruction  LD/FBD language  notation    Execution  output  IO_T      N  Batch I/O specification  Word number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Execution output:= IO_T( Batch I/O specification, N );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range  —  PTR  —  Batch I/O  specification    Input  N  UINT  ○   Word number  1≤N≤64  Output  —  BOOL  —  Execution output      ●  Function  ·  Performs data I/O of N words, which is specified by a batch I/O variable or by direct  notation (%IQ), with the corresponding I/O module as follows and sets the execution  output to TRUE(ON).    (1) When the corresponding I/O module is an input module:  Stores the content input from the input module in batch output variable (Data  input).  (2) When the corresponding I/O module is an output module:  Outputs the content of the batch I/O variable to the I/O module (Data output).  ·  Performs direct I/O with the I/O module (such as digital I/O, TL-S20, TL-F10, TC-net)  assigned to the batch I/O variable. However, model 2000 TL-F10 module supports  only synchronous mode. Only I/O synchronized with scan is performed even with this  instruction.    ·  One to 64 words may be specified for word number N.    If N > 64: N=64 is assumed.    If N=0: Not executed  ·  Direct I/O instruction must be specified in I/O module units. Therefore, I/O of multiple  I/O modules cannot be processed with a single direct I/O instruction. In such case, I/O  is performed only for the first module and the execution output is reset to  FALSE(OFF).    ·  No I/O is performed if the I/O module corresponding to the specified batch I/O variable  is not installed or if there is an I/O fallback.    Chapter 2    LD/FBD Instructions  6F8C1226  356      Batch I/O variable   I/O  (1)    4W    I/O  (2)    4W    I/O  (3)    4W  I/O (1) 0W  I/O (1) 1W  I/O (1) 2W  I/O (1) 3W  I/O (2) 0W  I/O (2) 1W  I/O (2) 2W  I/O (2) 3W  I/O (3) 0W  I/O (3) 1W  I/O (3) 2W  I/O (3) 3W  Case 1  Case 2  Case 3  [Specification example]  Case 1: Specify 4W from beginning of I/O(1)            Normal I/O possible  Case 2: Specify 2W from I/O(1)2W            Normal I/O possible  Case 3: Specify 5W from I/O(2)2W to I/O(3)2W        I/O(2) 2-3Wnormal I/O possible        I/O(3) 0-2Wno I/O performed      ●  Program example  [LD/FBD language notation]      IO_T  SIGNAL1 1  ST  SAMPLE1  1234  LD  SAMPLE2  4  LD  N  SAMPLE1:4W  output  module      [ST language notation]  SIGNAL1 := IO_T( SAMPLE1, SAMPLE2);    ·  Outputs 4W from a batch I/O SAMPLE1 to a 4W output module.    ●  Error information  ·  No I/O is performed when anything other than batch I/O variable or direct notation  (%IQ) is used for batch I/O specification input.    ·  When I/O of multiple I/O modules is specified with a single direction I/O instruction, I/O  is performed only for the first module.    ·  If word number N exceeds 64, it is limited to N=64.    ·  When I/O is specified only for the even number words of an I/O module set up scan  access 2W, I/O is performed only for the specified even number words.    ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.      2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  357    I/O Node State Read    I/O  I/O Node State Read  nv dedicated  instruction  LD/FBD language  notation    BASESLOT NODE  I/O node state GET_SIO_STS  Basic  unit  slot I/O node number   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  I/O node state := GET_SIO_STS( BASESLOT, NODE );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range BASESLOT  UINT  ○   Basic unit slot  0  Input  NODE  UINT  ○   I/O node number  3 to 34  Output  —  BOOL  —  I/O node state      ●  Function  ·  I/O  node  state  specified  with  basic  unit  slot  (BASESLOT)  and  I/O  node  number  (NODE) is read.    The output (I/O node state) varies depending on the task using this  instruction.    I/O node state output value  Task    TRUE(ON)  FALSE(OFF)  Event task  - I/O fallback task (EV4)  I/O node abnormal is not detected upon  EV4 startup, so it is not the target of I/O  node fallback.  (Normal, or abnormal detection has  been done)  I/O node abnormal is detected upon EV4  startup, so it is the target of I/O node fallback. Event task  - I/O fallback recovery    task (EV6)  I/O node abnormal recovery is detected  upon EV6 startup, so it is the target of  I/O node fallback recovery.  I/O node abnormal recovery is not detected  upon EV6 startup, so it is not the target of I/O  node fallback recovery.  (Normal, or abnormal detection has been  done)  Other than above  Specified I/O node state is normal.  Specified I/O node state is abnormal.    ·  Therefore, in event task - I/O fallback task (EV4), the abnormal I/O node can be  identified with this instruction and special register (SW), or system variable (ZW) I/O  fallback information.    In event task - I/O fallback recovery task (EV6), the I/O node that recovered can be  identified with this instruction and special register (SW), or system variable (ZW) I/O  fallback recovery information.    Chapter 2    LD/FBD Instructions  6F8C1226  358    ·  I/O fallback information and I/O fallback recovery information is referenced by the  following special register (SW) or system variable (ZW). See the function manuals of  controllers for data structure details.      Controller  I/O fallback information  type1  type2  TC—net I/O  SW[340..346]  ZW[300..306]  I/O fallback information  G3—I/O  SW[680..691]  ZW[320..331]  TC—net I/O  SW[350..356]  ZW[310..316]  I/O fallback recovery  information  G3—I/O  SW[700..711]  ZW[340..351]    ·  For basic unit slot (BASESLOT), "0" (I/O directly under the controller) is specified.  ·  For I/O node number (NODE), I/O node number (3 to 34) is specified.  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  359    ●  Program example  [LD/FBD language notation]                                                                [ST language notation]  (* Event task - I/O fallback task (EV4):[Example for type1] *)  IF S[340].B[1] AND NOT(S[340].B[3]) THEN  (* I/O node abnormal of one unit *)  ELSEIF S[340].B[1] AND S[340].B[3] THEN  (* I/O node abnormal of multiple units *)  FOR XI := 3 TO 34 BY 1 DO  Z1 := DINT_TO_UINT( XI);  Indicates the I/O node where the following information is abnormal.    Describes the processing related to the node.  1) SW[345]:I/O node fallback information(Main slot No.),    2) SW[346]:I/O node fallback information (Node No.).    IF    S[340].B[1]    S[340].B[3]    VAL1 THEN    ELSEIF    S[340].B[1]    S[340].B[3]    VAL1 THEN    FOR_DO    INDEX  : XI  MIN:3    MAX:34 STEP :1 GET_SIO_STS  BASESLOT  NODE  DINT_TO_UINT XI    0   /* I/O node abnormal of one unit*/  /*I/O node abnormal of multiple units*/ NODE_OK END_FOR    ENDIF    NODE_OK    Describes the processing related to the I/O node No. /*Searches for I/O node abnormal detection in nodes 3 to 34*/ Indicates the I/O node where the following information is abnormal.    Describes the processing related to the node.  1) SW[355] :I/O node fallback recovery information(Main slot No.),    2) SW[356] :I/O node fallback recovery information (Node No.).  IF    S[350].B[1]    S[350].B[3]    VAL1 THEN    ELSEIF    S[350].B[1]    S[350].B[3]    VAL1  THEN    FOR_DO    INDEX :XI  MIN : 3   MAX :34 STEP :1 GET_SIO_STS  BASESLOT  NODE  DINT_TO_UINT  XI    0     /* I/O node abnormal recovery of one unit*/  /*I/O node abnormal recovery of multiple units*/ NODE_OK  END_FOR    ENDIF    NODE_OK    Describes the processing related to the I/O node No.  /*Searches for I/O node abnormal recovery      Event task - I/O fallback task (EV4) : [Example for type1]  Event task - I/O fallback recovery task (EV6): [Example for type 1]  detection in nodes 3 to 34*/  Chapter 2    LD/FBD Instructions  6F8C1226  360    NODE_OK := GET_SIO_STS( 0, Z1)  IF NODE_OK = FALSE THEN  (* processing related to the I/O node No. *)  END_IF  END_FOR;  END_IF;    (* Event task - I/O fallback recovery task (EV6):[Example for type1] *)  IF S[350].B[1] AND NOT(S[350].B[3]) THEN  (* I/O node abnormal recovery of one unit *)  ELSEIF S[350].B[1] AND S[350].B[3] THEN  (* I/O node abnormal recovery of multiple units *)  FOR XI := 3 TO 34 BY 1 DO  Z1 := DINT_TO_UINT( XI);    NODE_OK := GET_SIO_STS( 0, Z1)  IF NODE_OK THEN  (* processing related to the I/O node No. *)  END_IF  END_FOR;  END_IF;    ♦ Description of operation for I/O fallback task (EV4)  When I/O node fallback of multiple units is detected in I/O fallback task (EV4), it can be  determined if the specified I/O node is a target of fallback by using GET_SIO_STS  instruction in EV4 task.  GET_SIO_STS instruction output becomes FALSE(OFF) if the specified I/O node is a  target of fallback, or TRUE(ON) otherwise.  ♦ Description of operation for I/O fallback recovery task (EV6)  When I/O node fallback recovery of multiple units is detected in I/O fallback recovery  task (EV6), It can be determined if the specified I/O node is a target of fallback  recovery by using GET_SIO_STS instruction in EV6 task.  GET_SIO_STS instruction output becomes TRUE(ON) if the specified I/O node is a  target of fallback recovery, or FALSE(OFF) otherwise.  ♦ Description of operation for tasks other than I/O fallback task (EV4) / I/O fallback  recovery task (EV6)  When GET_SIO_STS instruction is used in a task other than I/O fallback task (EV4) /  I/O fallback recovery task (EV6), the specified I/O node state can be determined.  GET_SIO_STS instruction output becomes TRUE(ON) if the specified I/O node is  normal, or FALSE(OFF) otherwise.    ●  Error information  If the specified I/O node is not registered, or if basic unit slot number or I/O node number  exceeds the specification range, the result is set to FALSE(OFF).  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  361    I/O Module State Read   I/O  I/O Module State Read  nv dedicated  instruction  LD/FBD language  notation    I/O module state  GET_IO_STS  Basic  unit  slot I/O node number Unit  number Slot  number BASESLOT NODE  UNIT  SLOT  EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  I/O module state := GET_IO_STS( BASESLOT, NODE, UNIT,  SLOT );    ●  Arguments    Arg.  Operan d  Type  Const .  Description  Valid  range  BASESL OT  UINT  ○   Basic unit slot  0  NODE  UINT  ○   I/O node number  3 to 34  UNIT  UINT  ○   Unit number  1 to 7  Input  SLOT  UINT  ○   Slot number  0 to 15  Output  —  BOOL  —  I/O module state (1:Normal, 0:Abnormal)      ●  Function  · I/O module state specified with basic unit slot (BASESLOT), I/O node number (NODE),  unit number (UNIT), and slot number (SLOT) is read.    The output (I/O module state)  varies depending on the task using this instruction.    I/O module state output value  Task  TRUE(ON)  FALSE(OFF)  Event task    - I/O fallback task (EV4)  I/O abnormal is not detected upon EV4  startup, so it is not the target of I/O node  fallback.  (Normal, or abnormal detection has  been done)  I/O abnormal is detected upon EV4  startup, so it is the target of I/O fallback.  Event task    - I/O fallback recovery task  (EV6)  I/O abnormal recovery is detected upon  EV6 startup, so it is the target of I/O  fallback recovery.  I/O abnormal recovery is not detected  upon EV6 startup, so it is not the target of  I/O fallback recovery.  (Normal, or abnormal detection has been  done)  Other than above  Specified I/O module state is normal.  I/O module serious failure occurred, or I/O  fallback occurred due to an I/O fallback  request.  Chapter 2    LD/FBD Instructions  6F8C1226  362  ·  Therefore, in event task - I/O fallback task (EV4), the I/O module that was abnormal  this time can be identified with this instruction and special register (SW), or system  variable (ZW) I/O fallback information.  ·  In event task - I/O fallback recovery task (EV6), the I/O node that recovered can be  identified with this instruction and special register (SW), or system variable (ZW) I/O  fallback recovery information.  I/O fallback information and I/O fallback recovery information is referenced by the  following special register (SW) or system variable (ZW). See the function manuals of  controllers for data structure details.    Controller    I/O fallback information  type1  type2  TC—net I/O  SW[340..346]  ZW[300..306]  I/O fallback  information  G3—I/O  SW[680..691]  ZW[320..331]  TC—net I/O  SW[350..356]  ZW[310..316]  I/O fallback  recovery  information    G3—I/O  SW[700..711]  ZW[340..351]  ·  For basic unit slot (BASESLOT), "0" (I/O directly under the controller) is specified.  ·  For I/O node number (NODE), I/O node number (3 to 34) is specified.  ·  For unit number (UNIT), unit number (1 to 7) is specified.  ·  For slot number (SLOT), slot number (0 to 15) is specified.    ●  Program example  [LD/FBD language notation]                                        S[340].B[0]  S[340].B[2] VAL1 /* Searches for I/O module abnormal detection in nodes 3 to 34    of slot 0 to 15 */  /* I/O module abnormal of one unit*/  Describes the processing related to the I/O module. IF  THEN  ELSEIF S[340].B[0]  S[340].B[2] VAL1 THEN  FOR_DO GET_IO_STS  BASESLOT  NODE  UNIT  SLOT DINT_TO_UINT END_FOR  ENDIF  IO_OK  FOR_DO DINT_TO_UINT END_FOR  Indicates the I/O module where the following information is abnormal.    Describes the processing related to the I/O module.  1) SW[341] to SW[344]: I/O fallback information (Main slot No./node No./unit No./slot No.)  /* I/O module abnormal of multiple units */    INDEX : XI  MIN : 3  MAX :34 STEP :1 INDEX : XJ  MIN : 0 MAX:15  STEP :1 XI 0 XJ  0 IO_OK Event task - I/O fallback task (EV4) :[Example for type1]  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  363  [ST language notation]  (*    Event task — I/O fallback task (EV4):[Example for type1] *)  IF S[340].B[0] AND NOT(S[340].B[2]) THEN  (* I/O module abnormal of one unit *)  ELSEIF S[340].B[0] AND S[340].B[2] THEN  (* I/O module abnormal of multiple units *)  FOR XI := 3 TO 34 BY 1 DO  FOR XJ := 0 TO 15 BY 1 DO  Z1 := DINT_TO_UINT( XI);  Z2 := DINT_TO_UINT( XJ);  IO_OK := GET_IO_STS( 0, Z1, 1, Z2)  IF IO_OK = FALSE THEN  (* processing related to the I/O module    *)  END_IF  END_FOR;  END_FOR;  END_IF;    [LD/FBD language notation]                                                                                  /*Searches for I/O module abnormal recovery  detection in nodes 3 to 34 of slot 0 to 15*/  /* I/O module abnormal recovery of one unit*/  Describes the processing related to the I/O module. IF  THEN  ELSEIF  S[350].B[0]  S[350].B[2] VAL1 THEN  FOR_DO  GET_IO_STS  BASESLOT  NODE  UNIT  SLOT  DINT_TO_UINT  IO_OK  END_FOR  ENDIF  IO_OK  FOR_DO DINT_TO_UINT  END_FOR  Indicates the I/O module where the following information is abnormal recovery.    Describes the processing related to the I/O module.  1)SW[351] to SW[354]: I/O fallback recovery information (Main slot No./node No./unit No./slot No.)  /* I/O module abnormal recovery of multiple units*/ S[350].B[0]  S[350].B[2] VAL1 INDEX :  XI  MIN : 3  MAX:34  STEP:1 INDEX: XJ  MIN : 0 MAX:15  STEP:1 X 0 XJ 0 Event task  -  I/O fallback recovery task  (EV6):[Example for type1] Chapter 2    LD/FBD Instructions  6F8C1226  364  [ST language notation]  (* Event task - I/O fallback recovery task (EV6):[Example for type1] *)  IF S[350].B[0] AND NOT(S[350].B[2]) THEN  (* I/O module abnormal recovery of one unit *)  ELSEIF S[350].B[0] AND S[350].B[2] THEN  (* I/O module abnormal recovery of multiple units *)  FOR XI := 3 TO 34 BY 1 DO  FOR XJ := 0 TO 15 BY 1 DO  Z1 := DINT_TO_UINT( XI);  Z2 := DINT_TO_UINT( XJ);  IO_OK := GET_IO_STS( 0, Z1, 1, Z2)  IF IO_OK THEN  (* processing related to the I/O module *)  END_IF  END_FOR;  END_FOR;  END_IF;    ♦ Description of operation for I/O fallback task (EV4)  When I/O fallback of multiple units is detected in I/O fallback task (EV4), it can be  determined if the specified I/O module is a target of fallback by using GET_SIO_STS  instruction in EV4 task.  GET_SIO_STS instruction output becomes FALSE(OFF) if the specified I/O module is  a target of fallback  ♦ Description of operation for I/O fallback recovery task (EV6)  When I/O module fallback recovery of multiple units is detected in I/O fallback recovery  task (EV6), it can be determined if the specified I/O module is a target of fallback  recovery by using GET_SIO_STS instruction in EV6 task.  GET_SIO_STS instruction output becomes TRUE(ON) if the specified I/O module is a  target of fallback recovery, or FALSE(OFF) otherwise.  ♦ Description of operation for tasks other than I/O fallback task (EV4) / I/O fallback  recovery task (EV6)  When GET_SIO_STS instruction is used in a task other than I/O fallback task (EV4) /  I/O fallback recovery task (EV6), the specified I/O module state can be determined.  GET_SIO_STS instruction output becomes TRUE(ON) if the specified I/O module is  normal, or FALSE(OFF) otherwise.    ●  Error information  ·  If the specified I/O module is not registered, or if basic unit slot number or I/O node  number exceeds the specification range, or if unit number or slot number exceeds the  specification range, the result is set to FALSE(OFF).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  365    I/O Fallback Request    I/O  I/O Fallback Request  nv dedicated  instruction  LD/FBD language  notation    Execution  output  IOFB_REQ  Basic  unit  slot I/O node number Unit  number Slot  number  BASESLOT NODE  UNIT  SLOT    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Execution output := IOFB_REQ( BASESLOT, NODE, UNIT, SLOT );   ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range BASESLOT  UINT  ○   Basic unit slot  0  NODE  UINT  ○   I/O node number  3 to 34  UNIT  UINT  ○   Unit number  1 to 7  Input  SLOT  UINT  ○   Slot number  0 to 15  Output  —  BOOL  —  Execution output      ●  Function  ·  A fallback request is made to the I/O module specified with basic unit slot  (BASESLOT), I/O node number (NODE), unit number (UNIT), and slot number  (SLOT).  ·  For basic unit slot (BASESLOT),  “0”(I/O directly under the controller) is specified.  ·  For I/O node number (NODE), I/O node number (3 to 34) is specified.  ·  For unit number (UNIT), unit number (1 to 7) is specified.  ·  For slot number (SLOT), slot number (0 to 15) is specified.    Chapter 2    LD/FBD Instructions  6F8C1226  366    ●  Program example  [LD/FBD language notation]    IOFB_REQ  NODE  BASESLOT  SAMPLE1 0  LD  SAMPLE2 3  LD  SIGNAL1  UNIT  SAMPLE3 1  LD  SLOT  SAMPLE4 5  LD      [ST language notation]  SIGNAL1 := IOFB_REQ( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ・  The basic unit slot CPU is specified with SAMPLE1, I/O node number =3 is specified with  SAMPLE2, unit number =1 is specified with SAMPLE3, and slot number =5 is specified with  SAMPLE4.  ・A fallback request of the I/O module specified with BASESLOT, NODE, UNIT, and SLOT is made.    ●  Error information  ・ If the specified I/O module is not registered, or if basic unit slot number or I/O node number  exceeds the specification range, or if unit number or slot number exceeds the specification  range, the result is set to FALSE(OFF).  ・When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  367    I/O Fallback Recovery Request   I/O  I/O Fallback Recovery Request  nv dedicated  instruction  LD/FBD language  notation    Execution  output  IORC_REQ  Basic  unit  slot I/O node number Unit  number Slot  number BASESLOT NODE  UNIT  SLOT    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Execution output := IORC_REQ( BASESLOT, NODE, UNIT, SLOT );   ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range BASESLO T  UINT  ○   Basic unit slot  0  NODE  UINT  ○   I/O node number  3 to 34  UNIT  UINT  ○   Unit number  1 to 7  Input  SLOT  UINT  ○   Slot number  0 to 15  Output  —  BOOL  —  Execution output      ●  Function  ·  A fallback recovery request is made to the I/O module specified with basic unit slot  (BASESLOT), I/O node number (NODE), unit number (UNIT), and slot number  (SLOT).  ·  For basic unit slot (BASESLOT),  “0”(I/O directly under the controller) is specified.  ·  For I/O node number (NODE), I/O node number (3 to 34) is specified.  ·  For unit number (UNIT), unit number (1 to 7) is specified.  ·  For slot number (SLOT), slot number (0 to 15) is specified.    Chapter 2    LD/FBD Instructions  6F8C1226  368    ●  Program example  [LD/FBD language notation]        IORC_REQ  NODE  BASESLOT  SAMPLE1 0  LD  SAMPLE2 3  LD  SIGNAL1  UNIT  SAMPLE3 1  LD  SLOT  SAMPLE4 5  LD      [ST language notation]  SIGNAL1 := IORC_REQ( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  The basic unit slot CPU is specified with SAMPLE1, I/O node number  =3 is specified  with SAMPLE2, unit number  =1 is specified with SAMPLE3, and slot number  =5 is  specified with SAMPLE4.  ·  A fallback recovery request of the I/O module specified with BASESLOT, NODE, UNIT,  and SLOT is made.    ●  Error information  ·  If the specified I/O module is not registered, or if basic unit slot number or I/O node  number exceeds the specification range, or if unit number or slot number exceeds the  specification range, the result is set to FALSE(OFF).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.15    I/O  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  369    Drive Device State Read    I/O  Drive Device State Read  nv dedicated  instruction  LD/FBD language  notation    Drive device state  GET_DRV_STS Drive network ID DRV    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Execution output := GET_DRV_STS(DRV);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range Input  DRV  UINT  ○   Drive network ID  35 to 254  Output  —  WORD  —  Drive device state      ●  Function  ·  Reads the state of drive device specified by the drive network ID (DRV).    ·  Numbers 35 to 254 are specified for the drive network ID (DRV).    ·  The drive device state is as follows:  Drive device  state  Description  =16#0000  Normal  ≠16#0000  Abnormal      0   0 0 0  0  15  5  4  Node state  0: Normal (healthy)    1: Down    (unhealthy)  ALARM (minor failure) state 0:No / 1: Yes  FAULT (major failure)    state 0:No / 1: Yes    14  Drive network ID specification    0:Normal / 1: Abnormal  Chapter 2    LD/FBD Instructions  6F8C1226  370    ●  Program example  [LD/FBD language notation]        GET_DRV_STS  DRV  SAMPLE1 35  LD  SAMPLE2 16#0000 ST      [ST language notation]  SAMPLE2 := GET_DRV_STS( SAMPLE1 );    Reads  the  drive  device  state  of  the  drive  network  ID  35  specified  by  SAMPLE1  and  stores in SAMPLE2.      ●  Error information  ·  When the drive network ID is out of range (DRV<35 or DRV>254) , the result is  16#8000.  ·  When the drive device of the specified drive network ID is other than drive (loop) and  drive (bus), the result is 16#8000.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  371      2.16  Process Operation    No.  Instruction  Remarks  1  Dead Band  DB    2  Derivative  DIF2    3  Integrator  INTG    4  Super Two Degrees of Freedom  PID  PID2    5  MV Calculation  MVS    6  Fix MV  MVF    7  Polygonal Line Function  PLN    8  Polygonal Line Function  (high-speed version)  PLN_REAL2  nv dedicated instruction  9  Inverse Polygonal Line Function  ILNL    10  Inverse Polygonal Line Function  (high-speed version)  ILNL_REAL2  nv dedicated instruction  11  Dead Time  DT    12  Moving Average (high-speed  version)  MAV    13  Moving Average (low speed  version)  MAV_N    14  Rate Limiter  DLM    15  Lag/Lead Filter  LAG2    16  Engineering Unit Conversion  UNT    17  Percent Conversion  PCT    18  Essential Succession PID  PID3    19  Estimate with Reset  RSM_L  TOSDIC compatible  instruction  Parameter structure (the parameter structures allowed for function are described).    Chapter 2    LD/FBD Instructions  6F8C1226  372    Dead Band    Process Operation  Dead Band    LD/FBD language  notation  Data  input Output    DB_□□ Dead  band  width IN  H    EN input  Edge execution  Index modification  Modifier  ○  ○   —  ST language notation  Output := DB_ □□ ( IN, H);    ● Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:    Arg.  Operand  Type  Const.  Description  IN  See below  ○   Data input  Input  H  See below  ○   Dead band width  Output  —  See below  —  Output              Data input, dead band width Symbol(_        ) Output  INT  DB_INT  INT  DINT  DB_DINT  DINT  REAL  DB_REAL  REAL  Data  input Output  DB_        Dead  band  width     ●  Function  ·  For data specified with data input IN and dead band width H, if data input IN is outside  the dead band width H, the result of subtracting dead band width H from data input IN  is output.  ·  For data specified with data input IN and dead band width H, if data input IN is inside  the dead band width H, “0” is output.    Condition  Action  When data IN ≥ 0          Result=IN-|H|  |IN| > |H|  When data IN < 0          Result=IN+|H|  |IN| ≤ |H|  Result=0    □□ □□ 2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  373    ●  Program example  [LD/FBD language notation]      SAMPLE1  140  LD  DB_INT    IN        H  SAMPLE3 40  ST  SAMPLE2  -100  LD  Dead band width  H H H Data input IN  Resul t output      [ST language notation]  SAMPLE3 := DB_INT( SAMPLE1, SAMPLE2);    ·  Performs dead band operation of the input data 140 in SAMPLE1 and dead band  width 100 in SAMPLE2 and stores the difference 40 between the input data and dead  band width in SAMPLE3 because the data input exceeds the dead band width.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.    If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.      ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.          Chapter 2    LD/FBD Instructions  6F8C1226  374    Derivative    Process Operation  Derivative      LD/FBD language  notation      Execution  flag Output  DIF2  Data  input Rate  time  (S) Instance name E IN T OUT   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, IN, T );  [Variable name]:= [Instance name]. OUT;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   Data input  Input  T  REAL  ○   Rate time (sec)  Output  OUT  REAL  —  Output      ●  Instance structure    Name  Type  Description  Remarks  OUT  REAL  Derivative result  output  Can be accessed from the user program.  B4X  REAL  Previous input(Xn-1) B4Y  REAL  Previous output  (Yn-1)  Cannot be accessed from the user  program.    ●  Function  ·  When execution flag E is FALSE(OFF), Output OUT becomes “0”.  ·  When execution flag E is TRUE(ON), Output OUT becomes  T1 · S  1+T1 · S  .  ·   The unit of rate time T is seconds.    The absolute value of the input data is used as  rate time T.  ·  Differentiation is performed by backward difference method.      2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  375    Execution  flag E  DIF2 instance  preprocessing  Action  FALSE(OFF)  X n-1  = Data input IN  Yn-1 = 0  TRUE(ON)  —  Yn-1=T/(CT+T)-( IN-Xn-1+Yn-1)  Xn-1=IN  Result = Yn-1  CT  : Control cycle  Xn-1  : Previous input  Yn-1  : Previous output    ● Important  ·  The scan cycle of the task using this instruction must be in constant scan mode (Integrated  Controller and S Controller only).        ●  Program example  [LD/FBD language notation]      DIF2  SAMPLE3 150.0  ST  SAMPLE1  1000.0  LD  SAMPLE2  0.1  LD  E  IN  T  SIGNAL1  DIF2_01  OUT     [ST language notation]  DIF2_01( SIGNAL1, SAMPLE1, SAMPLE2);  SAMPLE3 := DIF2_01.OUT;    Control cycle CT = 0.5 sec.  Instance content (DIF2_01) (before → after operation)  B4X(X n-1 ):100.0 → 1000.0  B4Y(Y n-1 ):0.0 → 150.0  ·  When the SIGNAL1 is TRUE(ON), performs differential operation using input data  1000.0 in SAMPLE1, rate time 0.1 in SAMPLE2, and instance variable DIF2_01, and  stores the differential result 150.0 in SAMPLE3.    Chapter 2    LD/FBD Instructions  6F8C1226  376    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller  Up to V02.5* L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is  INF.  Integrated Controller  V series  S Controller  After V02.60 Unified Controller nv series  NAN and INF data are limited by the  maximum value.    ·  If the scan cycle of the task using this instruction is in floating scan mode, no operation  is performed and the error flag is set to TRUE(ON) (Integrated Controller and S  Controller only).        2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  377    Integrator    Process Operation  Integrator      LD/FBD language  notation    Execution  flag Output  INTG  Data  input Integral  time  (S) Initial  value Instance name E  OUT IN  T  INI    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, IN, T, INI );  [Variable name]:= [Instance name]. OUT;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   Data input  T  REAL  ○   Integral time (sec)  Input  INI  REAL  ○   Initial value  Output  OUT  REAL  —  Output      ●  Instance structure    Name  Type  Description  Remarks  OUT  REAL  Integral result output  Can be accessed from the user program.  B4Y  REAL  Previous output (Yn-1) Cannot be accessed from the user  program.    ●  Function  When execution flag E is FALSE(OFF), initial value INI is output.  When execution flag E is TRUE(ON), integration is performed.  The unit of integral time T is seconds. The absolute value of the input data is used as  integral time T.  Chapter 2    LD/FBD Instructions  6F8C1226  378    Execution flag E  INTG instance  preprocessing  Action  FALSE(OFF)  —  Result = INI  Yn-1 = INI  TRUE(ON)  —  In case T=0              : Yn-1  In case T ≠ 0    : IN* CT / T + Yn-1  Result = Yn-1    CT      :Control cycle  Yn-1    :Previous output      ● Important  ·  The scan cycle of the task using this instruction must be in constant scan mode(Integrated  Controller and S Controller only).        ●  Program example  [LD/FBD language notation]      INTG  SAMPLE4 50.0  ST  SAMPLE1  100.0  LD  SAMPLE2  1.0  LD  SAMPLE3  0.0  LD  E  IN  T  SIGNAL1  INI  INTG_01  OUT     [ST language notation]  INTG_01( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SAMPLE4 := INTG_01.OUT;    Control cycle CT = 0.5 sec.  Instance content(INTG_01) (before→after operation)  B4Y(Y n-1 ):0.0 → 50.0  ·  When SIGNAL1 is TRUE(ON), performs integration operation using input data 1000.0  in SAMPLE1, integral time 1.0 in SAMPLE2, initial value 0.0 in SAMPLE3, and  instance variable INTG_01, and stores the integration result 50.0 in SAMPLE4.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  379    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller Up to V02.5* L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is  INF.  Integrated Controller  V series  S Controller After V02.60 Unified Controller nv series  NAN and INF data are limited by the  maximum value.    ·  If the scan cycle of the task using this instruction is in floating scan mode, no operation  is performed and the error flag is set to TRUE(ON). (Integrated Controller and S  Controller only).      Chapter 2    LD/FBD Instructions  6F8C1226  380    Super Two Degrees of Freedom PID   Process Operation  Super Two Degrees of Freedom PID    LD/FBD language  notation    Execution  flag   △MV output  PID2  SV input  PV input PV parameter  variable Instance name LP parameter  variable E D_MV SV PV PV_P LP_P   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, SV, PV, PV_P, LP_P );  [Variable name]:= [Instance name] . D_MV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag    SV  REAL  ○   SV input[Engineering value]  PV  REAL  ○   PV input[Engineering value]  PV_P  PTR  —  PV parameter variable  Input  LP_P  PTR  —  LP parameter variable  Output  D_MV  REAL  —  PID2 result output (△MV)[%]    ·  Pointers to tag table are placed in PV parameter variable and LP parameter table.  ·  The following symbols are referenced by PV_P and LP_P.    The structures of the  PV/LP parameters are described at the end of this section.    Operand  Symbol  Type  R/W  Description  RH  REAL  R  PV range high [Engineering unit]  PV_P  (PV_PARA)  RL  REAL  R  PV range low [Engineering unit]  KP  REAL  R  Proportional gain  TI  REAL  R  Integral time [minute]  TD  REAL  R  Rate time [minute]  ALP  REAL  R  2DOF proportionality coefficient  LP_P  (LP_PARA)  CDR  BOOL  R  Control direction (reverse=0/direct=1)  R=Read only, W=Write only, RW=Read/Write  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  381    ●  Instance structure    Name  Type  Description  Remarks  D_MV  REAL  MV difference output (AMV)[%]  Can be accessed from the user  program.  B4SV  REAL  SV previous value (SV n-1 ) [%]  SVF  REAL  SV calculation intermediate value [%] B4E  REAL  Deviation previous value (E n-1 ) [%]  B4D  REAL  Differential previous value (D n-1 ) [%]  B4PV  REAL  PV previous value (PV n-1 ) [%]  Cannot be accessed from the user  program.    ●  Function  ·  When the execution flag E is FALSE(OFF), initializes the PID2 instance area.  ·  When execution flag E is TRUE(ON), performs two degrees of freedom PID operation.  ·  Super two degrees of freedom PID (where |=1.0 and ¸=0) is used for PID operation.  ·  Backward difference method is used for operation of the derivative term. (q=0.1).  ·  The following variable can be specified for PV parameter and LP parameter:      Controller  Variable  SController  Variable other than direct I/O variable  Integrated Controller  V series  LController  Tag parameter variable of PV/LP    type1  Variable other than direct I/O variable  Unified Controller  nv series  type2  Tag parameter variable of PV/LP      Chapter 2    LD/FBD Instructions  6F8C1226  382    Execution  flag E  PID2 instance  preprocessing  Action  FALSE(OFF)  Initialization  SVn-1 = SVn  SVF = SVn  en-1 = SVF-PVn  Dn-1 = 0  PVn-1 = PVn  TRUE(ON)  No initialization  SVF = SVn · CT/(CT+TI)+α(SVn÷SVn-1) · TI/(CT+TI)+SVFTI/(CT+TI)  ∆MV = (SVF÷PVn) ÷en-1  en = SVF÷PVn    When TI<>0:  ∆MV =    ∆MV+CT· en / TI    When TD<>0:  ∆D = (÷PVn+PVn-1) TD/(CT+0.1·TD) ÷Dn-1·CT/(CT+0.1·TD)  ∆MV = ∆MV+∆D  Dn = Dn+∆D      When TD = 0:  Dn = 0  ∆MV = ∆MV·Kp    When CDR = 1:  ∆MV    =    ÷ ∆MV    Kp  : Proportional gain  TI  : Integral time  TD  : Rate time    CT  : Control cycle  α    : Two degrees of freedom α coefficient  SVn  : Current setting value (%)  SVn-1  : Previous setting value (%)  en  : Current deviation  en-1  : Previous deviation  PVn  : Current process value(%)  PVn-1  : Previous process value(%)  AMV  : Output  AD  : Differential term  Dn  : Current differential term  Dn-1  : Previous differential term  The input setting values and process values are in engineering unit and are  converted to percent before calculation.        ● Important  ·  The  scan  cycle  of  the  task  using  this  instruction  must  be  in  constant  scan  mode  (Integrated  Controller and S Controller only).        2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  383    ●  Program example  [LD/FBD language notation]      PI D2  SAMPLE4 -73.61369 ST  SAMPLE1  500. 0  LD  SAMPLE2  0.0  LD  PV_PARA  [n].TAG LD  E  SV  PV  PV_P  SIGNAL1  Control cycle CT=0.5 sec. PID2_01  LP_PARA [m] .TAG LD  LP_P  D_MV     [ST language notation]  PID2_01( SIGNAL1, SAMPLE1, SAMPLE2, PV_PARA[n].TAG, LP_PARA[m].TAG);  SAMPLE4 := PID2_01.D_MV    ·  When SIGNAL1 is TRUE(ON), performs two degrees of freedom PID operation using  SV input data 500.0 in SAMPLE1, PV input data 0.0 in SAMPLE2, PV parameter  variable PV_P, and LP parameter variable LP_P and stores the result in SAMPLE4.    ●  Error information  ·  When the PV parameter and LP parameter exceed the variable area, the super two  degrees of freedom PID is not processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller Up to V02.5* L Controller  If NAN data is entered as input, the result is NAN. If INF data is entered as input, the result is INF. Integrated  Controller V series  S Controller After V02.60 Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  If RH=RL, the divide error flag is set to TRUE(ON) and 0 is output.  ·  The following operation is performed if the PV parameter or LP parameter specification  is invalid:      Chapter 2    LD/FBD Instructions  6F8C1226  384    Controller  Action  S Controller  Super two degrees of freedom PID is not executed when  direct I/O variable is specified.    Error flag is set to TRUE(ON).  Integrated Controller  V series  L Controller  When variables other than PV/LP tag parameters are  specified, the table operation error flag is set to  TRUE(ON) and the result is 0.    type1  Super two degrees of freedom PID is not executed when  direct I/O variable is specified.  Error flag and table operation error flag are set to    TRUE(ON).  Unified Controller  nv series  type2  When variables other than PV/LP tag parameters are  specified, error flag and table operation error flag are set  to TRUE(ON) and the result is 0.    ·  If the scan cycle of the task using this instruction is in floating scan mode, no operation  is performed and the error flag is set to TRUE(ON) (Integrated Controller and S  Controller only).        2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  385    MV Calculation    Process Operation  MV Calculation    LD/FBD language  notation  Execution  flag Output  MVS  MV difference input MV initial value MV input Instance name LP parameter variable E OUT IN  MV0  MV  LP_P   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, IN, MV0, MV, LP_P );  [Variable name]:= [Instance name]. OUT;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   MV difference input (ΔMV) [%]  MV0  REAL  ○   MV initial value[%]  MV  REAL  ○   MV input[%]  Input  LP_P  PTR  —  LP parameter variable  Output  OUT  REAL  —  Output (MV) [%]    ·  A pointer to tag table is placed in LP parameter variable.  ·  The following symbols are referenced by LP_P.    The structures of the LP parameters  are described at the end of this section.    Operand  Symbol  Type  R/W  Description  DMV  REAL  R  MV rate limit [%]  MH  REAL  R  MV high limit [%]  LP_P  (LP_PARA)  ML  REAL  R  MV low limit [%]  R=Read only, W=Write only, RW=Read/Write    ●  Instance structure    Name  Type  Description  Remarks  OUT  REAL  Output (MV) [%]  Can be accessed from the user program.  MVW  REAL  MV work [%]  Cannot be accessed from the user program.   Chapter 2    LD/FBD Instructions  6F8C1226  386    ●  Function  ·  When the execution flag is FALSE(OFF), performs MV operation and outputs the result.  ·  When the execution flag is TRUE(ON), performs tracking operation and outputs the result.  ·  The MVS instruction does not set output in MV of LP tag data.    Store instruction must be  used to set the output of the MVS instruction to MV of the LP tag data.  ·  The following variables can be specified for the LP parameter:      Controller  Variable  S Controller  Variable other than direct I/O variable  Integrated Controller  V series  L Controller  LP tag parameter variable    type1  Variable other than direct I/O variable  Unified Controller  nv series  type2  LP tag parameter variable    Execution  flag E  MVS instance  preprocessing    Action  FALSE(OFF)  MVW=MVW+IN  MV rate limit  When |MVW-MV|>DMV  When in increase direction Work=MV+DMV  when in decrease direction work=MV-DMV  When |MVW-MV|≤ DMV  work=MVW  TRUE(ON)  MVW=MV0  work=MVW  MV high limit  When work<MH  work=MH  MV low limit  When work<ML  work=ML    Result output=work    ML  :MV low limit  MH  :MV high limit  DMV  :MV rate limit  MVW :MV work  work  :MV calculation work    ●  Program example  [LD/FBD language notation]  <Before operation  >  Instance (MVS_01)  50.0  MVW <After operation>  Instance (MVS_01)  60.0  MVW  LP_DATA[m].MV  50.0  LD  MVS  LP_DATA[m].MV 60.0  ST  SIGNAL1  0  LD  SAMPLE1  10.0  LD  E  MV  IN  MV0  SAMPLE2  50.0  LD  LP_P  LP_PARA  [m].TAG  LD  MVS_01  OUT LP parameter(LP_P) 125.0  MH  -25.0  ML  100.0  DMV    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  387    [ST language notation]  MVS_01( SIGNAL1, SAMPLE1, SAMPLE2, LP_DATA[m].MV, LP_PARA[m].TAG);  LP_DATA[m].MV := MVS_01.OUT    ·  When the SIGNAL1 is FALSE(OFF), MV operation is performed against the MV  difference input 10.0 in SAMPLE1 using the MV input and LP parameter LP_P, and the  result 60.0 is stored in LP_DATA[m].MV.    ●  Error information  ·  When the LP parameter exceeds the variable area, the MV calculation is not  processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller Up to V02.5* L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is  INF.  Integrated Controller  V series  S Controller After V02.60 Unified Controller nv series  NAN and INF data are limited by the  maximum value.    ·  The following operation is performed if the LP parameter specification is invalid:       Controller  Action  S Controller  MV calculation is not executed when direct I/O  variable is specified.    Error flag is set to TRUE(ON).  Integrated Control  V series  L Controller  When  variables  other  than  LP  tag  parameters  are  specified,  the  table  operation  error  flag  is  set  to  TRUE(ON) and the result is 0.  type1  MV calculation is not executed when direct I/O  variable is specified.  Error  flag  and  table  operation  error  flag  are  set  to  TRUE(ON).  Unified  Controller  nv  series  type2  When  variables  other  than  LP  tag  parameters  are  specified、error flag and table operation error flag are  set to TRUE(ON) and the result is 0.  Chapter 2    LD/FBD Instructions  6F8C1226  388    Fix MV    Process Operation  Fix MV    LD/FBD language  notation    Execution  flag Output  MVF  MV  fixed  value LP  data  variable LP data variable    E  IN  LP_D LP_D   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MVF( E, IN, LP_D );    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  Input  IN  REAL  ○   MV fixed value[%]  Input/O utput  LP_D  PTR  —  LP data variable  Output  —  REAL  —  Output  ·  A pointer to tag table is placed in LP data variable.  ·  The following symbols are referenced by LP_D.    The structure of the LP data is  described at the end of this section.    Operand  Symbol  Type  R/W  Description  MV  REAL  W  MV value[%]  LP_D  (LP_DATA)  SMV  BOOL  W  SEQ-MV operation  R : Read only, W: Write only, RW=Read/Write    ●  Function  ·  When execution flag E is TRUE(ON), registers the MV fixed value (set SMV flag).  ·  When execution flag E is FALSE(OFF), unregisters the MV fixed value (reset SMV  flag).  ·  The following variables can be specified for the LP data:    Controller  Variable    S Controller  Variable other than direct I/O variable  Integrated Controller V  series  L Controller  LP tag data variable  type1  Variable other than direct I/O variable  Unified Controller nv  series  type2  LP tag data variable    ● Important    ·  When the MVF instruction is used, the LP data variable SMV flag is used exclusively (ON when E  input is TRUE and OFF when FALSE).    To use the SMV flag in other applications, the MVF  instruction must be removed or processing must be stopped by resetting EN to OFF.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  389    ●  Program example  [LD/FBD language notation]      MVF  SAMPLE3 80.0  ST  SIGNAL1 0  LD  SAMPLE1  80.0  LD  E  IN  LP_DATA [m].SV  LD  LP_DATA [m].SV  ST  LP_D  LP_D     [ST language notation]  SAMPLE3 := MVF( SIGNAL1, SAMPLE1, LP_DATA[m].SV);    ·  When SIGNAL1 is TRUE(ON), stores the MV input 80.0 specified with SAMPLE1 in  LP data MV and sets the SMV flag.    When SIGNAL1 is FALSE(OFF), the SMV flag is  reset.  ·  Input value SAMPLE1 is output to SAMPLE3 unchanged.    ●  Error information  ·  When the LP data exceeds the variable area, the fix MV is not processed and the data  boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  The following operation is performed if the LP data specification is invalid:    Controller  Action  S Controller  When direct I/O variable is specified, the result is 0.    Error flag is set to TRUE(ON).  Integrated Controller  V series  L Controller  When variables other than LP tag parameters are  specified, the table operation error flag is set to  TRUE(ON) and the result is 0.  type1  When direct I/O variable is specified, the error flag and  table operation error flag are set to TRUE(ON) and the  result is 0.  Unified Controller nv  series  type2  When variables other than LP tag parameters are  specified, the error flag and table operation error flag are  set to TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  390    Polygonal Line Function   Process Operation  Polygonal Line Function    LD/FBD language  notation  IN  TBL Data  input Output    PLN_□□ Polygonal  line  table   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := PLN_ □□ ( IN, TBL );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  IN  See below  ○   Data input  Input  TBL  PTR  —  Polygonal line table  Output  —  See below  —  Output                Input    Symbol(_          ) Output    INT  PLN_INT  INT  REAL  PLN_REAL  REAL  Data  input Output    PLN_    IN        TBL  Polygonal line table       □□ □□ 2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  391    ●  Function  ·  With the input data IN as X axis input, outputs the Y axis approximation result using  the function table specified with the polygonal line table TBL.  ·  The size and structure of the polygonal line table are as follows. Different table formats  are used for INT data and REAL data.      0  15  Number of points  n   X n   Y 0   X 1   Y 1   X n-1 Y n-1 [PLN_INT]  Maximum points:40  Table top address:Point n  [PLN_REAL]  Maximum points:11  When less than 11 points: Add 2 end codes (H80000000) 0  31 X 0 Y 0 X 1 Y 1 When less than 11 points, end code(H80000000)  When less than 11 points, end code(H80000000)  11 points  maximum 40 points  maximum <Polygonal line table : polygonal line parameter typeP_PARA>  Integrated Controller : S2/S3/L1/L2/L3  Unified Controller : type1  <Polygonal line table : polygonal line parameter typeP_PARA_DS> Integrated Controller : L2DS/L3DS  Unified Controller : type2  0  31 Y 0 Y 1 When less than 11 points, end code(H80000000)  11 points  maximum X 0 X 1 When less than 11 points, end code(H80000000)  11 points  maximum     ·  Data must be stored in the polygonal table such that X 0  < X 1  <…X n-1.   ·  When data input IN ≤ X0, the corresponding Y value is Y 0  and when data input IN ≥  Y n-1 , the Y value is Y n-1.   ·  Direct I/O variable cannot be specified for polygonal line table.  Output= (IN - X n-1 ) - (Y n -Y n-1 ) / (X n -X n-1 ) + Y n-1   Where X  n-1  and X n  are values enclosing input data IN (X  n-1  ≤ IN < X n ) and Y  n-1  and Y n   correspond to X  n-1  and X n.   Chapter 2    LD/FBD Instructions  6F8C1226  392    ●  Program example  [LD/FBD language notation]      SAMPLE2 : Polygonal line table  X0  Y0  X1  Y1  X2  Y2  X3  Y3  X4  Y4  PLN_REAL  SAMPLE3 80  ST  SAMPLE1 40  LD  SAMPLE2 -100  LD  IN  TBL  -100  50  -50  -100  0  0  50  100  100  -100  IN SAMPLE3:80 100  100 -100 -100 X  Y Variable declaration  Variable  Data type  Dec.  SAMPLE1 REAL  VAR  SAMPLE2 typeP_PARA  VAR      [ST language notation]  SAMPLE3 := PLN_REAL( SAMPLE1, SAMPLE2);    ·  For input data in SAMPLE1, calculates the Y corresponding to input data 40 based on  polygonal line table specified with SAMPLE2 and stores the result “80” in SAMPLE3.    ●  Error information  ·  When the polygonal line table exceeds the variable area, the polygonal line function is  not processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The following operation is performed when direct I/O variable is specified for the  polygonal line table.      Controller  Action  Integrated Controller V series  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  393    Polygonal Line Function (high-speed version)    Process Operation  Polygonal Line Function (high speed-version)  nv dedicated  instruction  LD/FBD language  notation  Data  input Output  PLN_REAL2 Polygonal line table IN  TBL   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := PLN_REAL2 ( IN, TBL );    ●  Arguments    Arg.  Operand  Type  Const.  Description  IN  See below  ○   Data input  Input  TBL  PTR  —  Polygonal line table  Output  —  See below  —  Output    ●  Function  ·  With the input data IN as X axis input, the Y axis approximation result is output using  the function table specified with the polygonal line table TBL.  ·  The size and structure of the polygonal line table are as follows:    Polygonal line table data type  Item    Data type    Point count  DINT  Point data  REAL        0  31  Number of pointsn  X0  Y0  X1  Y1  Xn-1  Yn-1  Maximum points:11, Table top address: Point n  11 points maximum   ·  Data must be stored in the polygonal line table such that X 0  < X 1  <…X n-1.   ·  When  data  input  IN  ≤  X0,  the  corresponding  Y  value  is  Y 0   and  when  data  input  IN  ≥X n-1 , the Y value is Y n-1.   ·  Direct I/O variable cannot be specified for the polygonal line table.    Output = (IN-X n-1 ) - (Y n -Y n-1 )/(X n -X n-1 )+Y n-1   Where  X n-1  and  X n  are  values  enclosing input  data  IN (X n-1 ≤  IN<X n ) and  Y n-1  and Y n   correspond to X n-1  and X n.   Chapter 2    LD/FBD Instructions  6F8C1226  394    ·  When point count  =0 is specified, Result  =  Input data.    ●  Program example  [LD/FBD language notation]      SAMPLE2 : Polygonal line table  PLN_REAL2  SAMPLE3 80  ST  SAMPLE1 40  LD  SAMPLE2 5  LD  IN  TBL  IN  SAMPLE3:80 100  100 -100 -100 X  Y Structure declaration:type PLN_REAL2  Member  Data type    NUM  DINT  POINT  typeP_PARA    Variable declaration  Variable  Data type  Dec.  SAMPLE1 REAL  VAR  SAMPLE2 type PLN_REAL2  VAR    -100  50  -50  -100  0  0  50  100  100  -100  X0  Y0  X1  Y1  X2  Y2  X3  Y3  X4  Y4  NUM 5    [ST language notation]  SAMPLE3 := PLN_REAL2 ( SAMPLE1, SAMPLE2);  ・ For input data in SAMPLE1, the Y corresponding to input data 40 is calculated based  on  polygonal  line  table  specified  with  SAMPLE2.    The  result  "80"  is  stored  to  SAMPLE3.    ●  Error information  ·  When the polygonal line table exceeds the variable area, polygonal line function is not  processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The  following  operation  is  performed  when  direct  I/O  variable  is  specified  for  the  polygonal line table:      Controller  Action  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When the specified number of points exceeds 11, the point number is limited to 11.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  395    Inverse Polygonal Line Function   Process Operation  Inverse Polygonal Line Function    LD/FBD language  notation  IN  TBL Data  input Output    ILNL_□□ Polygonal line table   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ILNL_ □□ ( IN, TBL );    ●  Arguments  ·  The following data types are supported for input and output arguments and the  instruction symbol depends on the data type:      Argu.  Operand  Type  Const.  Description  IN  See below  ○   Data input  Input  TBL  PTR  —  Polygonal line table  Output  —  See below  —  Output                Input    Symbol(_          ) Output    INT  ILNL_INT  INT  REAL  ILNL_REAL  REAL  Data  input Output    ILNL_    IN        TBL  Polygonal line table     ●  Function  ·  With the input data IN as Y axis input, outputs the X axis approximation result using  the function table specified with the polygonal line table TBL.  □□ □□ Chapter 2    LD/FBD Instructions  6F8C1226  396    ·  The size and structure of the polygonal line table are as follows.        0  15  Number of points n  Xn  Y0  X1  Y1  Xn-1 Yn-1 [ILNL_INT]  Maximum points: 40  Table top address: Point n  [ILNL_REAL]  Maximum points: 11  When less than 11 points: Add 2 end codes (H80000000)  0  31 X0 Y0 X1 Y1 When less than 11 points: End code (H80000000)  When less than 11 points: End code (H80000000)  11 points  maximum 40 points  maximum <Polygonal line table: polygonal line parameter typeP_PARA>  Integrated Controller : S2/S3/L1/L2/L3  Unified Controller : type1  <Polygonal line table: polygonal line parameter typeP_PARA_DS> Integrated Controller : L2DS/L3DS  Unified Controller : type2  0  31 Y0 Y1 When less than 11 points: End code (H80000000)  11 points  maximum X0 X1 When less than 11 points: End code (H80000000)  11 points  maximum     2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  397    ·  Data must be stored in the polygonal table such that X 0  < X 1  <… X n-1.   ·  If data input IN intersects the polygonal line at two or more places, the one with the  smallest X value has priority.      X Y a  Output        ·  If data input IN is outside the range of Y axis on the polygonal line table, the X value for  the maximum (or minimum) Y value on the polygonal line table is output.      X Y (X0,Y0)  (X1,Y1)  (X2, Y2) (X3,Y3) (X4,Y4) (X5,Y5) a  b  Output X5 when input val ue is a  Output X2 when input val ue is b  X5 X2     ·   Direct I/O variable cannot be specified for the polygonal line table.    X n -X n-1   f(x)=(IN-Y n-1 )-  Y n -Y n-1   +X n-1   ·  Where Y  n-1  and Y n  are values enclosing input data IN (Y  n-1  ≤ IN < Y n ) and X  n-1  and X n   correspond to Y  n-1  and Y n.     Chapter 2    LD/FBD Instructions  6F8C1226  398    ●  Program example  [LD/FBD language notation]      X0  Y0  X1  Y1  X2  Y2  X3  Y3  X4  Y4  ILNL_REAL  SAMPLE3 40  ST  SAMPLE1  80  LD  SAMPLE2  -100  LD  IN  TBL SAMPLE2:Polygonal line table    IN SAMPLE3:40 100 100 -100 -100 X Y -100  50  -50  -100  0  0  50  100  100  -100  Variable declaration  Variable    Data type  Dec.    SAMPLE1  REAL  VAR  SAMPLE2  typeP_PARA  VAR    [ST language notation]  SAMPLE3 := ILNL_REAL( SAMPLE1, SAMPLE2);    ·  For input data in SAMPLE1, calculates the X corresponding to input data “80” based  on polygonal line table specified with SAMPLE2 and stores the result “40” in  SAMPLE3.    ●  Error information  ·  When the polygonal line table exceeds the variable area, inverse polygonal line  function is not processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The following operation is performed when direct I/O is specified for the polygonal line  table:      Controller  Action  Integrated Controller V series  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  399    Inverse Polygonal Line Function (high-speed version)    Process Operation  Inverse Polygonal Line Function (high-speed  version)  nv dedicated  instruction  LD/FBD language  notation      Data  input Output  ILNL_REAL2 Polygonal line table IN  TBL   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ILNL_REAL2 ( IN, TBL );    ●  Arguments    Arg.  Operand  Type  Const.  Description  IN  See below  ○   Data input  Input  TBL  PTR  —  Polygonal line table  Output  —  See below  —  Output    ●  Function  ·  With the input data IN as Y axis input, the X axis approximation result is output using  the function table specified with the polygonal line table TBL.  ·  The size and structure of the polygonal line table are as follows:    Polygonal line table data type    Item    Data type  Point count  DINT  Point data  REAL        0  31  Number of points n  X0  Y0  X1  Y1  Xn-1  Yn-1  Maximum points: 11, Table top address: Points n  11 points maximum     ·  Data must be stored in the polygonal line table such that X0 < X1 <・・・  X n-1.   ·  If data input IN intersects the polygonal line at two or more places, the one with the smallest X  value has priority.  Chapter 2    LD/FBD Instructions  6F8C1226  400      X Y  a  Output        ·  If data input IN is outside the range of Y axis on the polygonal line table, the X value for  the maximum (or minimum) Y value on the polygonal line table is output.      X Y (X0,Y0)  (X1,Y1)  (X2,Y2) (X3,Y3) (X4,Y4) (X5,Y5) a  b  Output X5 when input value is a  Output X2 when input value is b  X5 X2     ·  Direct I/O variable cannot be specified for the polygonal line table.    X n -X n-1   f(x)=(IN-Y n-1 ) -  Y n -Y n-1   +X n-1   Where Y n-1  and Y n  are values enclosing input data IN (Y n-1 ≤ IN<Y n ) and X n-1  and X n  correspond to Y n-1  and Y n.   ·  When point count =0 is specified, result = Input data.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  401    ●  Program example  [LD/FBD language notation]        SAMPLE2: Polygonal line table  ILNL_REAL2  SAMPLE3 80  ST  SAMPLE1 80  LD  SAMPLE2 5  LD  IN  TBL  Structure declaration:type ILNL_REAL2  Member  Data type  NUM  DINT  POINT  typeP_PARA    Variable declaration  Variable  Data type  Dec.  SAMPLE1 REAL  VAR  SAMPLE2 type ILNL_REAL2  VAR    -100  50  -50  -100  0  0  50  100  100  -100  X0  Y0  X1  Y1  X2  Y2  X3  Y3  X4  Y4  NUM 5  IN SAMPLE3:40  100  100 -100 -100 X  Y   [ST language notation]  SAMPLE3 := ILNL_REAL2 ( SAMPLE1, SAMPLE2);    ·  For input data in SAMPLE1, the X corresponding to input data “80” is calculated based  on polygonal line table specified with SAMPLE2.    The result “40” is stored to  SAMPLE3.    ●  Error information  ·  When the polygonal line table exceeds the variable area, inverse polygonal line  function is not processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The following operation is performed when direct I/O variable is specified for the  polygonal line table.      Controller  Action  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When the specified number of points exceeds 11, the point number is limited to 11.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  402    Dead Time    Process Operation  Dead Time    LD/FBD language  notation  Execution  flag Output  DT  Data  input Sample  number Sampling  time Work  Work    E  IN  I  T  M M   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DT( E, IN, I, T, M ) ;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   Data input  I  INT  ○   Sample number  Input  T  INT  ○   Sampling cycle (0.1 sec. unit)  Input/  Output  M  PTR  —  Work (6+I-2 words)  Output  —  REAL  —  Output    ●  Function  ·  When execution fag E is FALSE(OFF), data input IN is output as the result.  ·  When the execution flag is TRUE(ON)ON, dead time operation is performed for data  input IN and the result is output.  ·  Sampling cycle is set in 0.1 second units.  ·  Sampling number must be between 1 and 256.  ·  If sampling cycle T > scan time, linear interpolation is performed between samples.  ·  If sample number I ≤ 0, no dead time operation is performed.  ·  If the sample number is changed during dead time operation, the result is  unpredictable.  ·  Specify the data save area used by the DT instruction for work.    The size of the work  depends on  the sample number I (6+I-2 words).  ·  Direct I/O variable cannot be specified for work.    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  403        0 15  Timer counter  Sample data counter  Current output  [2 words] Previous difference  [2 words]       Sample value  (I-2    words)  Maximum number of words:    518 words (6+256-2 words)        Execution flag E  Action  FALSE(OFF)  Result output =Data input IN  TRUE(ON)  Result output=Dead time operation result    ● Important  · If the sample number is changed during dead time operation, the result is unpredictable.      Do not write to work, the result is unpredictable.      ●  Program example  [LD/FBD language notation]    DT  SAMPLE4 20  ST  SIGNAL1  1  LD  SAMPLE1  160  LD  E  M  IN  I  3  LD  SAMPLE2  10  LD  SAMPLE3  5  LD  T  M  SAMPLE3   ST  Arg. declaration  Variable  Data type  Comment  Dec.  SIGNAL1  BOOL  Execution flag  VAR  SAMPLE1  REAL  Data input  VAR  SAMPLE2  INT  Sampling cycle  VAR  SAMPLE3  ARRAY[0..11] OF INT  Work  VAR  SAMPLE4  REAL  Result output  VAR      Chapter 2    LD/FBD Instructions  6F8C1226  404    5  1  15  5  Timer counter  Sample data counter  Current output    Previous difference  <Before execution> SAMPLE3 : Work area  80  20  40  Sample value  0  2  20  10  <After execution> SAMPLE3 : Work area  80  160  40  Scan cycle  (0.5[s]) Sampling cycle  (10[0.1s]) Input X  Output Y  Dead time (number of samples =3)  Timer counter  Sample data counter  Current output  Previous difference  Sample value      [ST language notation]  SAMPLE4 := DT( SIGNAL1, SAMPLE1, 3, SAMPLE2, SAMPLE3);    ·  When the execution flag in SIGNAL1 is TRUE(ON), dead time operation is performed  using data input in SAMPLE1, sample number 3, sampling cycle in SAMPLE2, and  work specification in SAMPLE3.    The result is stored in SAMPLE4.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  405    ●  Error information  ·  When the work exceeds the variable area, the dead time is not processed and the  data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller  Up to    V02.5*  L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is  INF.  Integrated  Controller V series  S Controller  After  V02.60  Unified Controller nv series  NAN and INF data are limited by the  maximum value.  ·  When the specified number of sample exceeds 256, it is limited to 256.    ·  The following operation is performed when direct I/O variable is specified for the work:      Controller  Action  Integrated Controller V series  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  406    Moving Average (high-speed version)   Process Operation  Moving Average (high-speed version)    LD/FBD language  notation  Execution  flag Output  MAV  Data  input Sample  number Sampling  cycle Work  Work    E  IN  I  T  M M   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MAV( E, IN, I, T, M );    ● Important  ·  Read “Notes on Moving Average Instruction(MAV/MAV_N)” provided after the Moving  Average (low-speed version) section before using this instruction.    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   Data input  I  INT  ○   Sample number  Input  T  INT  ○   Sampling cycle (0.1 sec. unit)  Input/  Output  M  PTR  —  Work (6+I-2 words)  Output  —  REAL  —  Output    ●  Function  ·  When execution flag E is FALSE(OFF), data input IN is output as the result.  ·  When the execution flag is TRUE(ON), moving average operation is performed for  data input IN and the result is output.  ·  Sampling cycle is set in 0.1 second units.  ·  Sample number must be between 1 and 256.  ·  When sampling cycle T > scan time, the output at sampling cycle is output once more  (retained).  ·  When sample number I ≤ 0, no moving average operation is performed.  ·  If the sample number is changed during moving average operation, the result is  unpredictable.  ·  Specify the data save area used by the MAV instruction for work.    The size of the  work depends on the sample number I (6+I-2 words).  ·  Direct I/O variable cannot be specified for work variable.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  407      0 15  Timer counter  Sample data counter  Current output    [2 words] Total sample value  [2 words]       Sample value  (I-2 words)  Maximum number of words :  518 words (6+256-2 words)     Execution flag E  Action  FALSE(OFF)  Result output =Data input IN  TRUE(ON)  Result  output=Moving  average  operation result    ● Important  · If the sample number is changed during moving average operation, the result is unpredictable.   Do not write to work. The result is unpredictable.    ●  Program example  [LD/FBD language notation]        MAV  SAMPLE4 93.333  ST  SIGNAL1  1  LD  SAMPLE1  160  LD  E M IN I  3  LD  SAMPLE2  10  LD  SAMPLE3  5  LD  T M  SAMPLE3 0  ST  Arg. declaration  Variable  Data type  Comment    Dec.  SIGNAL1  BOOL  Execution flag  VAR  SAMPLE1  REAL  Data input  VAR  SAMPLE2  INT  Sampling cycle  VAR  SAMPLE3  ARRAY[0..11] OF INT  Work  VAR  SAMPLE4  REAL  Result output  VAR      Chapter 2    LD/FBD Instructions  6F8C1226  408      5  1  46.667  140    Timer counter    Sample data counter    Current output    Total sample value  <Before execution> SAMPLE4:Work area  80  20  40    Sample value  0  2  93.333  280  <After execution> SAMPLE4 Work area  80  160  40  Output Y  ((8)+(9)+(10))/3  ((7)+(8)+(9))/3 ((6)+(7)+(8))/3  ((5)+(6)+(7))/3 ((4)+(5)+(6))/3 ((3)+(4)+(5))/3 ((2)+(3)+(4))/3 Scan cycle  (0.5[s])  Sampling cycle  (10[0.1s]) Input X  (2) (10)  (9) (8) (7) (6) (5) (4) (3) (1)    Timer counter    Sample data counter    Current output    Total sample value    Sample value      [ST language notation]  SAMPLE4 := MAV( SIGNAL1, SAMPLE1, 3, SAMPLE2, SAMPLE3);    ·  When the execution flag in SIGNAL1 is TRUE(ON), moving average operation is  performed using data input in SAMPLE1, sample number 3, sampling cycle in  SAMPLE2, and work specification in SAMPLE3.    The result is stored in SAMPLE4.    ●  Error information  ·  When the work exceeds the variable area, the moving average is not processed and  the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller Up to    V02.5*  L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is INF. Integrated  Controller v series  S Controller After V02.60 Unified Controller nv series  NAN and INF data are limited by the maximum  value.    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  409    ·  When the specified number of sample exceeds 256, it is limited to 256.    ·  The following operation is performed when direct I/O variable is specified for the work.      Controller  Action  Integrated Controller V series  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        Chapter 2    LD/FBD Instructions  6F8C1226  410    Moving Average (low-speed version)   Process Operation  Moving Average (low-speed version)    LD/FBD language  notation  Execution  flag Output    MAV_N  Data  input Sample  number Sampling  cycle Work  Work    E  IN  I  T  M M   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := MAV_N( E, IN, I, T, M );    ● Important  ·  Read “Notes on Moving Average Instruction(MAV/MAV_N)” provided after the Moving  Average (low-speed version) section before using this instruction.    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   Data input  I  INT  ○   Sample number  Input  T  INT  ○   Sampling cycle (0.1s unit)  Input/  Output  M  PTR  —  Work (6+I-2 words)  Output  —  REAL  —  Output    ●  Function  ·  When execution flag E is OFF, data input IN is output as the result.  ·  When execution flag E is ON, moving average operation is performed for data input IN  and the result is output.  ·  Sampling cycle is set in 0.1 second units.  ·  Sample number must be between 1 and 256.  ·  When sampling cycle T > scan time, the output at sampling cycle is output once more  (retained).  ·  When sample number I ≤ 0, no moving average operation is performed.  ·  If the sample number is changed during moving average operation, the result  becomes undefined.  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  411  ·  Specify the data save area used by the MAV instruction for work.    The size of the  work depends on the sample number (6+I-2 words).  ·  Direct I/O variable cannot be specified for work.    0 15  Timer counter  Sample data counter  Current output  [2 words] Total sample value  [2 words]       Sample value  (I-2 words)  Maximum number of words:    518 words (6+256-2 words)     Execution flag E  Action  FALSE(OFF)  Result output = Data input IN  TRUE(ON)  Result output = Moving average operation result      ●  Program example  [LD/FBD language notation]    MAV_N  SAMPLE4 93.333 ST  SIGNAL1  1  LD  SAMPLE1  160  LD  E M IN I  3  LD  SAMPLE2  10  LD  SAMPLE3  5  LD  T  M  SAMPLE3 0  ST  Arg. declaration  Variable  Data type  Comment  Dec.  SIGNAL1  BOOL  Execution flag  VAR  SAMPLE1  REAL  Data input  VAR  SAMPLE2  INT  Sampling cycle    VAR  SAMPLE3  ARRAY[0..11] OF INT  Work    VAR  SAMPLE4  REAL  Result output  VAR      [ST language notation]  SAMPLE4 := MAV_N( SIGNAL1, SAMPLE1, 3, SAMPLE2, SAMPLE3);    ·  When the execution flag in SIGNAL1 is TRUE(ON), moving average operation is  performed using data input in SAMPLE1, sample number 3, sampling cycle in  SAMPLE2, and work specification in SAMPLE3.    The result is stored in SAMPLE4.    Chapter 2    LD/FBD Instructions  6F8C1226  412    ●  Error information  ·  When the work exceeds the variable area, the moving average is not processed and  the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  When the specified number of sample exceeds 256, it is limited to 256.    ·  The following operation is performed when direct I/O variable is specified for the work:      Controller  Action  Integrated Controller V series  Error flag is set to TRUE(ON) and the result is 0.  Unified Controller nv series  Error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  413    Notes on Moving Average Instruction(MAV/MAV_N)    The  moving  average  instructions  are  available  in  two  types  –  “moving  average  (high-speed  version):MAV”  and  “moving  average  (low-speed  version):  MAV_N”.  Notes  on using the moving average instructions are provided below. Read thoroughly before  using the moving average instructions.      ● Important  ·  The moving average (low-speed version) and moving average (high-speed version) instructions differ in the  summation operation to calculate the moving average. The following table provides summation operation  algorithm, advantages and disadvantages. Take these items in consideration to use the instructions.        Moving average    (high-speed version): MAV  Moving average    (low-speed version):MAV_N  Remarks Algorithm    <Summation formula>  Total sample value+latest sample value  (input value)-oldest sample value  <Summation formula>  Σ(Sample value)      Advantage    Short execution time since summation  is not performed for all the samples.    Operation error is not accumulated  since all the samples are summated  every time.      Disadvantage    Operation error may be accumulated in  the total value depending on the input  value. The result may differ from the  expectation value.    Long execution time since  summation is performed for all the  samples.    Support  controller  Unified Controller nv series  Integrated Controller V series  Unified Controller nv series  See  below    nv series  V series  Instruction  Symbol  T y p e 1   T y p e 2     S 3   S 2   L 3   L 3 D S   L 2   L 2 D S   L 1   Moving average  (high-speed version)  MAV  ○   ○   2.50 2.53   ○   ○   ○   ○   ○ Moving average  (low-speed version)  MAV_N  ○ 1.32/ 3.10   Not supported (*1)    (*1)  ・ Integrated  Controller  V  series  does  not  support  “moving  average  (low-speed  version):MAV_N”.  If  accuracy is required for the moving average result, implement the function equivalent to the moving  average  (low-speed  version)  with  the  user  defined  function  block.  The  sample  program  of  the  user  defined  function  block  [ufb_mav.fbk]  equivalent  to  the  moving  average  (low-speed  version)  can  be  downloaded from Toshiba website Integrated Controller V series - FAQ.    ・ To use the downloaded user function block [ufb_mav.fbk], read “Execute import/export of library” found  in the instruction manual below:    Unified Controller nv series Integrated Controller V series Engineering Tool 4 −Basic−(6F8C129)  ・ User  defined  function  block  [ufb_mav.fbk]  is  a  sample  program  and  proper  operation  is  not  guaranteed. Check the operation thoroughly before incorporating and using the sample program.    Chapter 2    LD/FBD Instructions  6F8C1226  414    Rate Limiter    Process Operation  Rate Limiter    LD/FBD language  notation  Execution  flag Outpu DLM_□□ Data  input Rate  limit Instance name E OUT IN  D    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, IN, D );  [Variable name]:= [Instance name] . OUT;    ●  Arguments  ·  The  following  data  types  are  supported  for  input  and  output  arguments  and  the  instruction symbol depends on the data type:      Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  See below  ○   Data input  Input  D  See below  ○   Rate limit  Output  OUT  See below  —  Output                        Data input  Rate limit  Symbol(_          ) Output    Instance  (OUT/B4Y)  INT  DLM_INT  INT  INT  DINT  DLM_DINT  DINT  DINT  REAL  DLM_REAL  REAL  REAL  Execution  flag Output  DLM_  Data  input E  IN Rate  limit D  Instance name OUT   ●  Instance structure    Name  Type  Description  Remarks  OUT  See above  Output  Can be accessed from the user program.  B4Y  See above  Previous output  (Yn-1)  Cannot be accessed from the user  program.  □□ □□ 2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  415    ●  Function  ·  When execution flag E is FALSE(OFF), data input IN is output as the result.  ·  When the execution flag E is TRUE(ON), the rate limit is calculated for data input IN  and the result is output.    Execution  flag E  Action  FALSE(OFF)  Result output = IN  TRUE(ON)  Difference = IN - Y n-1   When    +|D| ≥ Difference ≥ –|D|:      Y n =IN  When    +|D| < Difference:                  Y n  = Y n-1  + |D|  When –|D| > Difference:                      Y n  = Y n-1  - |D|      IN      :Data input  Y n-1    : Previous output  Y n          :Current output  D        :Rate limit    ●  Program example  [LD/FBD language notation]      <Before operation>  Instance(DLM_01)  50.0  B4Y  <After operation>  Instance(DLM_01)  100.0  B4Y DLM_REAL SAMPLE3 100  ST  SIGNAL1 1  LD  SAMPLE1 120  LD  E  IN  D  SAMPLE2 50  LD  DLM_01  OUT   [ST language notation]  DLM_01( SIGNAL1, SAMPLE1, SAMPLE2);  SAMPLE3 := DLM_01.OUT;    ·  When SIGNAL1 is TRUE(ON), rate limit is calculated for data input “120” in SAMPLE1  using the rate limit 50 in SAMPLE2 and previous output 50 stored in instance variable  DLM_01, and the result “100” is stored in SAMPLE3.    ●  Error information  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller Up to V02.5* L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is INF. Integrated  Controller V series  S Controller After V02.60 Unified Controller nv series  NAN and INF data are limited by the maximum  value.  Chapter 2    LD/FBD Instructions  6F8C1226  416    Lag/Lead Filter    Process Operation  Lag/Lead Filter    LD/FBD language  notation  Execution  flag Output  LAG2  Data  input Lead  time  (s) Lag  time  (s) Instance name E  OUT IN  T1 T2   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, IN, T1, T2 );  [Variable name]:=[Instance name]. OUT;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution flag  IN  REAL  ○   Data input  T1  REAL  ○   Lead time (second)  Input  T2  REAL  ○   Lag time (second)  Output  OUT  REAL  —  Output    ●  Instance structure    Name  Type  Description  Remarks  OUT  REAL  Output  Can be accessed from the user program.  B4X  REAL  Previous input(Xn-1) B4Y  REAL  Previous output  (Yn-1)  Cannot be accessed from the user  program.    ●  Function  ·  When execution flag E is FALSE(OFF), data input IN is output as the result.  ·  When the execution flag E is TRUE(ON), (1+T1-s) -X/(1+T2-s) is calculated for data  input IN and the result is output.  ·  The absolute values of lead time T1 and lag time T2 are used for the operation.    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  417    Execution  flag E  LAG2 instance  preprocessing  Action  FALSE(OFF)  Xn-1=Xn  Yn-1=Xn  TRUE(ON)  —  Yn=  CT-Xn/(CT+T2)+T1- (Xn-Xn-1)/(CT+T2)  +T2-Yn-1/(CT+T2)    CT  :Control cycle  X n-1  :Previous input  X n  :Current input  Y n-1  :Previous output  Y n  :Current output    ● Important  ·  The scan cycle of the task using this instruction must be in constant scan mode(Integrated  Controller and S Controller only).    ●  Program example  [LD/FBD language notation]      LAG2  SAMPLE4 712.0  ST  SIGNAL1 1  LD  SAMPLE1 1000.0  LD  E  IN  T1  SAMPLE2 1.0  LD  SAMPLE3 2.0  LD  T2  <Before operation>Instance (LAG2_01)  1000.0  640.0  B4X  B4Y  1000.0  712.0  B4X  B4Y  LAG2_01  <After operation>Instance (LAG2_01)  OUT      [ST language notation]  LAG2_01( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SAMPLE4 := LAG2_01.OUT;    ·  When SIGNAL1 is TRUE(ON), lag/lead filter operation is performed for data input 1000.0 in  SAMPLE1 using the lead time 1.0 in SAMPLE2, lag time 2.0 in variable SAMPLE3, and  instance variable LAG2_01, and the result “712.0” is stored in SAMPLE4.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  S Controller  Up to V02.5* L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is INF. Integrated  Controller V series  S Controller  After V02.60 Unified Controller nv series  NAN and INF data are limited by the maximum  value.  ·  If the scan cycle of the task using this instruction is in floating scan mode, no operation  is performed and the error flag is set to TRUE(ON) (Integrated Controller and S  Controller only).  Chapter 2    LD/FBD Instructions  6F8C1226  418    Engineering Unit Conversion   Process Operation  Engineering Unit Conversion    LD/FBD language  notation  IN PV_RH  Data  input Output  UNT  PV parameter   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := UNT( IN, PV_RH );    ●  Arguments    Arg.  Operand  Type  Const.  Description  IN  REAL  ○   Data input [%]  Input  PV_RH  PTR  —  PV parameter (RH)  Output  —  REAL  —  Output [Engineering unit]    ●  Function  ·  Converts data input IN to engineering units from range high limit (RH) and range low  limit (RL) of PV parameter table and outputs the result.  ·  The structure of the PV parameters is described at the end of this section.    ·  The following variables can be specified for the PV parameter:    Controller  Variable  S Controller  Variable other than direct I/O variable  Integrated Controller  V series  L Controller  PV tag parameter variable    type1  Variable other than direct I/O variable  Unified Controller  nv series  type2  PV tag parameter variable    Output = (RH - RL)/100-Input + RL      2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  419    ●  Program example  [LD/FBD language notation]      UNT  SAMPLE2 60.0  ST  SAMPLE1  80.0  LD  PV_PARA[n] .RH        100.0          LD  IN  PV parameter  PV_PARA[n].RH = 100.0  PV_PARA[n].RL = -100.0  PV_RH      [ST language notation]  SAMPLE2 := UNT( SAMPLE1, PV_PARA[n].RH);    ·  Performs engineering unit conversion of the data input “80.0” in SAMPLE1 using  RH100.0 and RL-100.0 in the PV parameter variable and stores the result “60.0” in  SAMPLE2.    ●  Error information  ·  When the PV parameter exceeds the variable area, the engineering unit conversion is  not processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  The following operation is performed if the PV parameter specification is invalid:    Controller  Action  S Controller  When direct I/O variable is specified, error flag is set to  TRUE(ON) and the result is 0.    Integrated Controller  V series  L Controller  When variable other than PV tag parameter is specified,  error flag and table operation error flag are set to  TRUE(ON) and the result is 0.  type1  When direct I/O variable is specified, error flag and table  operation error flag are set to TRUE(ON) and the result  is 0.  Unified Controller  nv series  type2  When variable other than PV tag parameter is specified,  error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  420    Percent Conversion    Process Operation  Percent Conversion    LD/FBD language  notation  IN  PV_RH  Data  input Output  PCT  PV parameter   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := PCT( IN, PV_RH );    ●  Arguments    Arg.  Operand  Type  Const.  Description  IN  REAL  ○   Data input [Engineering unit]  Input  PV_RH  PTR  —  PV parameter (RH)  Output  —  REAL  —  Output [%]    ●  Function  ·  Converts data input IN to % from range high limit (RH) and range low limit (RL) of PV  parameter table and outputs the result.  ·  The structure of the PV parameters is described at the end of this section.    ·  The following variables can be specified for the PV parameter:      Controller  Variable  S Controller  Variable other than direct I/O variable  Integrated Controller  V series  L Controller  PV tag parameter variable    type1  Variable other than direct I/O variable  Unified Controller nv  series  type2  PV tag parameter variable    Output = 100/(RH-RL) - (Input-RL)    ●  Program example  [LD/FBD language notation]      PCT  SAMPLE2 90.0  ST  SAMPLE1  80.0  LD  PV_PARA[n].RH 100.0  LD  IN  PV parameter  PV_PARA[n].RH = 100.0  PV_PARA[n].RL = -100.0  PV_RH      [ST language notation]  SAMPLE2 := PCT( SAMPLE1, PV_PARA[n].RH);  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  421    ·  Performs reverse engineering unit conversion of the data input “90.0” in SAMPLE1  using RH100.0 and RL-100.0 in the PV parameter variable and stores the result “80.0”  in SAMPLE2.    ●  Error information  ·  When the PV parameter exceeds the variable area the percent conversion is not  processed and the data boundary is exceeded.  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  If RH=RL, the divide error flag is set to TRUE(ON) due to zero divide and the output is  as follows:    Controller  Action  Integrated Controller V series  Output = (+Infinity when Input ≥ RL, -Infinity when Input  < RL)  Unified Controller nv series  Output = (+Maximum when Input ≥ RL, -Minimum  when Input < RL)    ·  The following operation is performed if the PV parameter specification is invalid:    Controller  Action  S Controller  When direct I/O variable is specified, error flag is set to  TRUE(ON) and the result is 0.  Integrated Controller  V series  L Controller  When variable other than PV tag parameter is specified,  error flag and table operation error flag are set to  TRUE(ON) and the result is 0.  type1  When direct I/O variable is specified, error flag and table  operation error flag are set to TRUE(ON) and the result  is 0.  Unified Controller  nv series  type2  When variable other than PV tag parameter is specified,  error flag and table operation error flag are set to  TRUE(ON) and the result is 0.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  422    Essential Succession PID   Process Operation  Essential Succession PID    LD/FBD language  notation  Execution control input Execution output  PID3  LP  parameter PV data/setting Manipulated value  Instance name  PV data/setting  E  Q LP_P  PV_D MV PV_D   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( E, LP_P, PV_D );  [Variable name]:=[Instance name]. Q;  [Variable name]:=[Instance name]. MV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  E  BOOL  ○   Execution control input  Input  LP_P  PTR  —  LP parameter  Q  BOOL  —  Execution output  Output  MV  REAL  —  Manipulated value  Input/  Output  PV_D  PTR  —  PV data/setting    ·  The structures of the PV_D and LP_P parameters are described at the end of this  section.      ●  Parameter Structure  ♦  PV data/setting    Name  Type  Description  Unit PVC  REAL  Process measurement input (Range: 0.0 to 100.0)  %  ASV  REAL  Auto mode setting (Range: 0.0 to 100.0)  %  CSV  REAL  Cascade mode setting (Range: 0.0 to 100.0)  %  MMV  REAL  Manual mode manipulated value input (Range: -25.0 to  125.0)  %  TMV  REAL  MV tracking input (Range: -25.0 to 125.0)  %  MODE  DWORD  Mode setting      TR  31 MODE  2  1  0    Operation mode specification MODE: bits <1-0>  00: Manual mode  01: Auto mode  10: Cascade mode  11: (Auto mode)  Tracking specification TR: Bit <2>  0 : No  1 : Yes    2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  423    ♦  LP parameter    Name  Type  Description  Unit  Kp  REAL  Proportional gain    TI  REAL  Integral time  min.  TD  REAL  Rate time  min.  GP  REAL  Gap (Range: 0.0 to 10.0)  %  ISV  REAL  Auto mode setting initial value (Range: 0.0 to 100.0)  %  FT  REAL  Process input filter coefficient (Range: 0.1 to < 1)    DSV  REAL  Setting ASV rate-of-change limit  % /At  DMMV  REAL  Manual mode manipulated value MMV rate-of-change limit  % /At  STS  DWORD  Status        DR  31 IMODE  2  1  0    Initial mode specification IMODE: bits <1 to 0>  00: Manual mode  01: Auto mode  10: Cascade mode  11: (Auto mode)  Polarity D/R specification DR: bit <2>  0: Direct  1: Reverse    MH  REAL  Manipulated value high limit (Range: -25.0 to 125.0)  When MH < ML, MH=ML is assumed.    %  ML  REAL  Manipulated value low limit (Range: -25.0 to 125.0)  %  DMV  REAL  Manipulated value rate-of-change limit  %/Δt  N  REAL  Control cycle setting (Range: N ≥ 1)  PID operation is performed every N scan.    When N ≤ 0, N=1 is assumed.        ●  Instance structure    Name  Type  Description  Unit  Remarks  Q  BOOL  Execution output    Can be accessed from  the user program.  MV  REAL  Manipulated value (Range: -25.0 to 125.0)  %  B4E  REAL  Previous error (e n-1 )    B4D  REAL  Previous derivative term (D n-1 )    B4PV  REAL  Previous PV (PV n-1 )    B4SV  REAL  Previous SV (SV n-1 )    MVN  REAL  Current manipulated value    C  REAL  Internal counter  Counts the number of scans.    Decrements internal counter each scan  starting from C=N. When C ≤ 0, PID operation  is performed and C is set equal to N once more.    DT0  REAL  Control cycle (Δt)  Sec.  Cannot be accessed from  the user program.  * In Function - [Algorithm], this is denoted with the symbol in parentheses in the Description column.  Chapter 2    LD/FBD Instructions  6F8C1226  424    ●  Function  ·  Performs essential succession (pre-derivative real PID algorithm) PID operation as  follows for PV data/setting stored in PV_D based on the parameter specified with  LP_P and outputs the manipulated value MV as the result.  ·  The execution control input E and execution output Q are set as follows:      Execution  control input E  Action    Execution  output Q  FALSE(OFF)  Initialized    FALSE(OFF) C≤ 0  Executed    TRUE(ON)  TRUE(ON)  C>0  Not executed FALSE(OFF)   ・ Direct I/O variables cannot be specified for PV_D data/setting and LP parameter variables.    [Operation expression]  · Digital filter  1.0) FT (0.0       PV FT PVC FT) (1 PVn   1 n   < s - + ÷ =   ÷   · PID    ΔMVn = Kp • (ΔPn+ Δln +ΔDn)            (See Gap operation and integration control)        MVn = MVn-1 ± ΔMVn                        (Direct specification: Subtraction, Reverse specification: Addition)    where   (   ) MV MV L (fixed)                                            0.1 η ΔD D D TD η Δt D Δt PV PV TD ΔD N setting scan scheduled Δt 0) Δ 0, TI (When                                   TI Δt e ΔI operation) Gap (See                               PV SV e e e ΔP 1 n 1 n n 1 n n 1 n n 1 n n n n n n 1 n n n n ÷ = = + =   - +   - ÷ ÷ - = - = = = - = ÷ = ÷ = ÷ ÷ ÷ ÷ ÷ ÷   (When Tl=0, ∆l=0)  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  425  [Function block]    + Gap  ope.  1  + ΔPn  - + + Kp - +SVn  en  1  TI・s  I ntegration  enable  control (Speed type)  TD・s  1+η・TD・s 1  1+T・s  PID operation  MVn=MVn-1 ±  ΔMVn  ΔDn (η=0.1) (Speed type)  PV n   ΔIn DSV  H / L DMV  MVS DMMV  Speed  position  convert  ΔMVn High  low  limit er Rate  limiter  MVCn  Manipulated value  MV *2 Manual  mode  manipulated  input   MMV Cont rol polarity D/R  *1 Output tracking input TMV Output  tracking command TR Process  measurement PVC  Filter  coefficient  FT    Cascade  mode  CSV  Auto mode  ASV  MVC n Rate limiter  (Speed type)  Manual  mode   *1 The control polarity D/R specification in the speed to positional format conversion specification  is performed as follows:    · Direct specification: subtraction  · Reverse specification: addition    *2  The switching of output polarity of manipulated valued output MV is performed with external  logic (ladder circuit).      [Gap operation and integration control]    (Gap ope)  Error e  GP(%)  GP(%) (SV-PV) Gradient=1 (Differentiation control)  When |SVn - PVn| < |GP|  ΔMVn=0    (Integration control)  Ln=MVn - MV  when reverse is specified        Ln-1-ΔIn > 0 Integration disabled        L n-1-ΔIn s 0 Integration enabled  when direct is specified        Ln-1-ΔIn < 0 Integration disabled      L n-1-ΔIn > 0 Integration enabled      [Supplementary description]  ·  For the initial value of the manipulated value, the final value MV up to the previous  time is output.    ·  MV tracking  This function is valid only in auto mode and cascade mode (This specification is invalid  in manual mode).  Chapter 2    LD/FBD Instructions  6F8C1226  426  ·  When tracking directive TR is 1, the high and low limits of manipulated value MV are  valid, but the differential limit of MV is invalid. In this case, the internal MV n  is set as  MV n =MV.    When the tracking directive changes to 0, addition/subtraction of ΔMV is started from  the MV n  at that point.    · Auto mode  Changing of ASV is valid in auto mode and manual mode.    When auto mode is entered, SV n  is approached to ASV while limiting the rate-of-change.    SV n =SV n-1 ±|DSV|  Also,  MMV  is  equal  to  MV  so  that  switching  from  auto  mode  to  manual  mode  is  bumpless.    Therefore, MMV cannot be changed during auto mode.    Both the high/low limit and rate limiter of manipulated value MV are valid.  · Cascade mode  Changing of CSV is valid in all modes.    SV n   becomes  equal  to  CSV  when  cascade  mode  is  entered.  In  this  case,  both  the  high/low limit and rate limiter of manipulated value MV are valid.    Also, ASV is equal to SV n  and MMV is equal to MV so that switching from cascade mode  to auto mode and to manual mode is bumpless.    Therefore, ASV and MMV cannot be changed during cascade mode.  ●  Manual mode  Changing of MMV is valid only in manual mode.    When  manual  mode  is  entered,  MV  is  approached  to  MMV  while  limiting  the  rate-of-change.    MV=MV±|DMMV|  Both the high / low limit and rate limiter of manipulated value MV are invalid.      Also, MV n  is equal to MV so that switching from manual mode to auto mode or cascade  mode is bumpless.    When switching to auto mode or cascade mode, addition/subtraction of ΔMV is started  from the MV n  at that point.  · Direct polarity DR specification  Direct specification: MV is decreased when error (en) is increased.            MVn=MV n-1 -ΔMV  Reverse specification: MV is increased when error (en) is decreased.            MVn = MV n-1 +ΔMV  · Rate limiter of manual mode manipulated value setting MMV input DMMV  MV is approached to MMV with rate-of-change DMMV.    1.    When +|DMMV| ≥ (MMV-MV) ≥ -|DMMV|    :MV=MMV  2.    When (MMV-MV) > +|DMMV|        :MV=MV+|DMMV|  2.16    Process Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  427  3.    When (MMV-MV) < -|DMMV|      :MV=MV-|DMMV|    · Rate limiter of auto mode setting ASV input      DSV  SV n  is approached to ASV with rate-of-change DSV.    1.    When +|DSV| ≥ (ASV-SV n-1 ) ≥ -|DSV|     :SV n =ASV  2.    When (ASV-SV n-1 ) > +|DSV|      :SV n =SV n-1 +|DSV|  3.    When (ASV-SV n-1 ) < -|DSV|        :SV n =SV n-1 -|DSV|    · High / low limit of manipulated output    MH, ML  1.  When MH < ML          :MH=ML  If high / low limit output is MVX n   2.  When MV n  > MH          :MVX n =MH  3.  When MV n  < ML                  :MVX n =ML  · Rate limiter of manipulated output DMV  1. When +|DMMV|≥ (MVX n  -MV) ≥ −|DMV|    :MV = MVX n   2.  When (MVX n -MV)< + |DMV|        :MV = MV + |DMV|  3.  When (MVX n -MV)< - |DMV|       :MV = MV - |DMV|  · When instruction input is OFF  PID initialization is performed. The content is as follows:    1.  Sets the operation mode MODE to mode specified by initial mode IMODE.    MODE=IMODE  2. For the initial value of the manipulated value, the final value MV up to the previous  time is output.    3.  Auto mode setting is set to the value set to auto mode initial value ISV.    ASV=ISV  4.  Internal data is initialized as follows:  MV 0 =MV  MMV=MV  PV 0 =PVC  SV 0 =ASV or CSV (Depends on initial mode. However, it is set to ASV in manual mode.)  D 0 =0  C=N  e 0-1 =e 0   When instruction input is ON  Performs PID operation.    Performs PID operation every N scans which is the set control cycle.    (Executes if the internal counter C is 0 or less, resets the internal counter C to N and  sets  instruction  output  to  TRUE(ON).  If  the  internal  counter  is  greater  than  0,  decrements C and resets the instruction output to FALSE(OFF)).      第2 章    LD/FBD 命令語  6E8C4826  428   [ M o d e   d a t a   r e l a t i o n s h i p   t a b l e ]     S e t t i n g   M a n i p u l a t e d   v a l u e   M a n i p u l a t e d   v a l u e   o u t p u t   l i m i t       A u t o   m o d e   s e t t i n g   A S V   C a s c a d e   m o d e   s e t t i n g   C S V   S e t t i n g   S V n   M a n u a l   m o d e   s e t t i n g   m a n i p u l a t e d   v a l u e   M M V   T r a c k i n g   s e t t i n g   m a n i p u l a t e d   v a l u e   T M V   I n t e r n a l   m a n i p u l a t e d   v a l u e   M V n   H i g h / l o w   L i m i t C h a n g e   o f   r a t e   l i m i t   L i m i t   o u t p u t   M V C n   O u t p u t   m a n i p u l a t e d   v a l u e   M V   M a n u a l   m o d e     ―   ( C h a n g e a b l e )   ―   ( C h a n g e a b l e ) S V n - 1   ( P r e v i o u s   v a l u e )     S e t   M M V   ―   ( C h a n g e a b l e ) M V   N o   N o   M V     M M V  M V n   T r a c k i n g = F A L S E   ( O F F ) ―   ( C h a n g e a b l e ) P I D   O p e r a t i o n   r e s u l t   Y e s   Y e s   A u t o   m o d e   T r a c k i n g = T R U E   ( O N )   S e t   A S V   ―   ( C h a n g e a b l e ) A S V  S V n   S e t   T M V   M V   Y e s   N o   T r a c k i n g = F A L S E   ( O F F ) ―   ( C h a n g e a b l e ) P I D   O p e r a t i o n   r e s u l t   Y e s   Y e s   C a s c a d e   m o d e   T r a c k i n g = T R U E   ( O N )   S V n   ( N o t   C h a n g e a b l e )   S e t   C S V     x x   C S V   M V   ( N o t   C h a n g e a b l e ) S e t   T M V   M V   Y e s   N o   I n t e r n a l   m a n i p u l a t e d   v a l u e   M V n   O u t p u t   l i m i t M V C n       2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  429    ● Important  ・ The scan cycle of the task using this instruction must be in constant scan mode(Integrated  Controller and S Controller only).  ・ When specifying floating scan, no operation is performed and the error flag is set to TRUE(ON).   ●  Program example  [LD/FBD language notation]    PID3  SIGNAL2   ST  TBL2    LD  TBL1    LD  E  LP_P  PV_D  SIGNAL1 PID3_1  Q MV PV_D SAMPLE1   ST  TBL1    ST      [ST language notation]  PID3_1( SIGNAL1, TBL2, TBL1);  SIGNAL2 := PID3_1.Q;  SAMPLE1 := PID3_1.MV;  ·  When SIGNAL1 is TRUE(ON), performs essential succession PID operation with the  content of parameters specified by variables TBL1 and TBL2 and stores the result in  SAMPLE1.      ●  Error information  ·  When the PV data and LP parameter exceed the variable area, the essential  succession PID is not processed and the data boundary is exceeded.  ·  The following operation is performed when PV data and LP parameters are REAL:      Controller  Action  S Controller Up to V02.5* L Controller  If NAN data is entered as input, the result is  NAN.  If INF data is entered as input, the result is INF. Integrated  Controller V series  S Controller After V02.60 Unified Controller nv series  NAN and INF data are limited by the maximum  value.  ·  The following operation is performed when direct I/O variable is specified for the PV  data or LP parameter:      Controller  Action  Integrated Controller  V series  S Controller Essential succession PID is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Essential succession PID is not executed.  Error flag and table operation error flag are set to TRUE(ON). ·   If  the  scan  cycle  of  the  task  using  this  instruction  is  in  floating  scan  mode,  no  operation  is  performed  and  the  error  flag  is  set  to  TRUE(ON)  (Integrated  Controller  and S Controller only).    Chapter 2 LD/FBD Instructions  6F8C1226  430    Estimate with Reset    Process Operation  Estimate with Reset    LD/FBD language  notation      Input  data Estimate  value  RSM_L  Reset  flag Initial  value Unit  time  conversion  code Maximum  estimate  value Output  resolution Instance name U1  Y U2  H1  H2  H3  H4    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  [Instance name](U1, U2, H1, H2, H3, H4 );  [Variable name]:=[Instance name]. Y;    ●  Arguments    Arg.  Operand  Type  Const. Description  U1  REAL  ○   Input data    U2  BOOL  ○   Reset flag  H1  REAL  ○   Initial value  H2  INT  ○   Unit time conversion code  (0: Sec.(K = 1)/1: Min.(K = 60) / 2: Hour(K = 3600))  H3  REAL  ○   Maximum estimate value(≥0)  Input  H4  INT  ○   Output resolution  (0:1/1:0.1/2:0.01/3:0.001/4:0.0001)  Output  Y  REAL  —  Estimate value    ●  Function  ·  When the reset flag U2 is TRUE(ON), the reset value (initial value + 1 process cycle  value) is output.    ·  When the reset flag is FALSE(OFF), input data U1 is estimated in consideration of the  unit time conversion code H2.    The estimate value is reset when it reaches the maximum estimate value H3. The  exceeded portion (|U1 + Yn-1|—|H3|) s not considered as an error since it is added to  the next count value.    ·  Estimation can be performed without error even if the estimate value is much larger  (up to 106 times) than the input value.      2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  431    [Formula]  When U2 = TRUE:  ZSUM = U1* (CT/K)  Y = ZSUM + H1  When U2 = FALSE:  ZSUM = ZSUM + U1* (CT/K)  if |ZSUM|> = MAX then  ZSUM = ZSUM - (ZSUM/ |ZSUM|)* MAX  if |Y|> = H3 then  Y = Y n-1  + (ZSUM/ |ZSUM|)* MAX - (Y n-1 / |Y n-1 |)* H3  else  Y = Y n-1  + (ZSUM/ |ZSUM|)* MAX  endif  endif  (CT:Main  scan  cycle  [sec],  K:Unit  time  conversion  value  (1/60/3600),  MAX:Output  resolution (1/0.1/0.01/0.001/0.0001)    ●  Instance structure    Name  Type  Description  Remarks  Y  REAL  Estimate value  Can be accessed from the user  program.  ZSUM  REAL  Internal estimate value  (estimated to the value corresponding  to the output resolution)  Cannot be accessed from the user  program.    Chapter 2 LD/FBD Instructions  6F8C1226  432    ●  Program example  [LD/FBD language notation]    RSM_L output GE output 50m 3 RSM_L    U1        U2        H1        H2          H3        H4  S1  0  ST    0  LD    0.0  LD    2  LD  DP20  50.0  LD    2  LD  PV1.PV 200.0  LD  GE    50.0  LD  RSM_L_1     [ST language notation]  RSM_L_1( PV1.PV, 0, 0.0, 2, DP20, 2);  S1 := GE( RSM_L_1.Y, 50.0);    ·  When the PV1 measurement range is 0 to 250m³/h, flag which is set to TRUE(ON)  every 50m 3 .    ●  Error information  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller V series  When NAN is input NAN abnormal is set to  TRUE(ON) and output is retained.      ·  When the maximum estimate value H3 is negative, it is handled as “0”.    ·  Estimate value Y is not reset when U1>H3>0 or U1<H3<0.    ·  When the reset flag U2 is TRUE(ON), it is output without change even if initial value  H1>maximum estimate value H3.  ·  When the maximum estimate value H3>(Output resolution H4(1 to 0.0001)-106), the  estimate accuracy is deteriorated when the estimate value Y nears the maximum  estimate value H3.    ·  Estimate value Y is reset when it is +H3 or -H3.  ·  Reset flag U2 operation differs when it is changed from TRUE(ON) to FALSE(OFF)  depending on the initial value H1, input data U1 sign, and magnitude relation with the  maximum estimate value H3.    2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  433    Parameter Structure    The  following  list  provides  the  structure  of  parameters  used  in  process  operation.  For  functions  requiring  parameter  specification,  use  structures  defined  by  @  standard  structure (L controller).typ, @ standard structure (DS).typ, and @ standard structure (S  controller).typ of Engineering tool.    The parameter structure used in process operation differs by the controller type for the  PV parameter, PV data, LP parameter and LP data.    Structures  of  @  standard  structure  (L  controller)  are  used  in  process  operation  of  Integrated Controller S2/S3/L1/L2/L3 and Unified Controller type1.  Structures  of  @  standard  structure  (DS)  are  used  in  process  operation  of  Integrated  Controller L2DS/L3DS and Unified Controller type2.    The parameters provided here describe the following:    Type  Structure name MCS/DCS  typePV_PARA  @ standard data type (MCS type L Controller) PV parameter  typePV_PARA_DS @ standard data type (DS type L Controller)  typePV_DATA  @ standard data type (MCS type L Controller) PV data  typePV_DATA_DS @ standard data type (DS type L Controller)  typeLP_PARA  @ standard data type (MCS type L Controller) LP parameter  typeLP_PARA_DS @ standard data type (DS type L Controller)  typeLP_DATA  @ standard data type (MCS type L Controller) LP data  typeLP_DATA_DS @ standard data type (DS type L Controller)  typeP_PARA  @ standard data type (MCS type L Controller) Polygonal line parameter  typeP_PARA_DS  @ standard data type (DS type L Controller)  PID3  instruction  PV  data/setting  value  typePID3_PV_D  @ standard data type (S Controller type)  PID3 instruction LP parameter  typePID3_LP_P  @ standard data type (S Controller type)    Chapter 2 LD/FBD Instructions  6F8C1226  434    ●  PV parameter structure(S2/S3/L1/L2/L3, type1)    Data type  Parent type  typePV_PARA  STRUCT    Member  Data type  Initial value Comment    TAG  ARRAY[0..3] OF DWORD Tag No.  IP  DWORD  Input hardware address  RH  REAL  100.0 Indicator range high limit [EU]  RL  REAL  Indicator range low limit [EU]  CH  INT  32000 Input count high limit  CL  INT  6400 Input count low limit  SIG  UINT  Input signal type  LNR  WORD  Compensation operation type  LC  INT  -100 Low cut value [0.01%]  FT  UINT  25 Filter constant [%]  TM  UINT  Temperature compensation PV No.  PM  UINT  Pressure compensation PV No.  TDG  REAL  Temperature compensation  designed temperature [°C]  PDG  REAL  Pressure compensation designed  pressure [kPa]  PU  REAL  1.0 Pulse weight coefficient [EU/pulse]  T  REAL  1.0 Time conversion coefficient  K  REAL  1.0 Engineering unit conversion  coefficient  D  REAL  1.0 Compensation coefficient  PH  REAL  90.0 PV alarm high [EU]  PL  REAL  10.0 PV alarm low [EU]  PVB  REAL  1.0 PV alarm high/low [EU]  DPL  REAL  10.0 PV rate-of-change alarm [EU/s]  DPB  REAL  1.0 PV rate-of-change alarm dead band  [EU/s]  PRD  UINT  PV error processing definition  SPV  UINT  Integral input PV No.  MAX  REAL  100.0 Totalization max [EU]  SIMM  UINT  Simulation setting  UIL  BOOL  Sensor low alarm suppress  UIH  BOOL  Sensor high alarm suppress  DIC  BOOL  PV/PVC direct connection  PVC  REAL  PV before application compensation Spare  ARRAY[0..3] OF WORD      2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  435    ●  PV parameter structure(L2DS/L3DS, type2)    Data type  Parent type  typePV_PARA_DS  STRUCT    Member  Data type  Initial value Comment    TAG  ARRAY[0..3] OF DWORD Tag No.  NAME  ARRAY[0..7] OF DWORD Tag name  TYP  UINT  Tag type  MDL  WORD  Display pattern model No.  SCNO  UINT  Auto screen display No.  LOCK  WORD  Operation lock setting  SIGN  ARRAY[0..3] OF DWORD Tagging character  ATYP  WORD  1 Alarm confirm method  PRS  UINT  Control scan setting  SCH  WORD  1 Sub schedule No.  DVRM  UINT  Scale divisions (for reprocessing)  MON  ARRAY[0..31] OF BOOL  Alarm monitor individual setting  AGRD  ARRAY[0..15] OF WORD Alarm grade type  AMMT  UINT  Monitoring timer setting value  DCML  UINT  2 Decimal point position  EU  ARRAY[0..3] OF DWORD Engineering unit character  BNO  WORD  Input point bus No./node No.  SNO  WORD  Input point slot No./module No.  CNO  WORD  Main slot No.  IOM  WORD  I/O module type  ZPT  UINT  Cold compensation point PV No.  IPL  UINT  Inverse polygonal line No.  SIG  UINT  Input type signal  LNR  UINT  Input compensation operation type  PVA  DWORD  Input point variable name  CH  INT  4000 Input count high limit  CL  INT  800 Input count low limit  LC  REAL  -1.0 Low cut value [0.01%]  FT  REAL  0.25 Filter coefficient [%]  RH  REAL  100.0 Indicator range high limit [EU]  RL  REAL  Indicator range low limit [EU]  PHH  REAL  100.0 PV alarm high high [EU]  PH  REAL  90.0 PV alarm high [EU]  PL  REAL  10.0 PV alarm low [EU]  PLL  REAL  PV alarm low low [EU]  PVB  REAL  1.0 PV alarm high low dead band [EU]  DPL  REAL  10.0 PV rate-of-change alarm [EU/s]  DPB  REAL  1.0 PV rate-of-change alarm dead band  [EU/s]  Chapter 2 LD/FBD Instructions  6F8C1226  436    Member  Data type  Initial value Comment  TM  UINT  Temperature compensation PV No.  PM  UINT  Pressure compensation PV No.  TDG  REAL  Temperature compensation design  temperature [°C]  PDG  REAL  Pressure compensation design  pressure[kPa]  PRD  UINT  PV error process definition  SPV  UINT  Integration input PV No.  PU  REAL  1.0 Pulse weight coefficient [EU/pulse]  T  REAL  1.0 Time conversion coefficient  K  REAL  1.0 Unit conversion coefficient  D  REAL  1.0 Compensation coefficient  MAX  REAL  100.0 Integration high limit value [EU]  PSET  REAL  Integration setting value [EU]  FONO  UINT  Startup button No.  PBNO  UINT  Startup button PB No.  SPLT  REAL  50.0 PV split range position [EU]  PVPT  REAL  50.0 PV friction pointer position [EU]  DMAX  REAL  Integration rate-of-change setting  value [EU/h]  PLN  UINT  Polygonal line No.  SGDR  WORD  Power factor signal direction setting  SENS  ARRAY[0..3] OF DWORD Input device name  V0  REAL  Draught free judgment value  PVP  UINT  Wind direction PV No.  UIL  BOOL  PV low sensor error suppress setting UIH  BOOL  PV high sensor error suppress  setting  DIC  BOOL  PV/PVC direct connection  PVIR  BOOL  PV update setting for sensor error  UBS  BOOL  Unipolar/bipolar setting (for nv)  DCH  DINT  64000 Input count high limit (for nv)  DCL  DINT  12800 Input count low limit (for nv)  SPARE  ARRAY[0..11] OF WORD   2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  437    ●  PV data structure(S2/S3/L1/L2/L3, type1)    Data type  Parent type  typePV_DATA  STRUCT    Member    Data type  Comment    PV  REAL  PV value [EU]  SCN  BOOL  Scan off  SIM  BOOL  Simulation  SPR  BOOL  Alarm suppress  RST  BOOL  Totalizor reset  DEU  BOOL  Device error unconfirmed  VIU  BOOL  Sensor error unconfirmed  PRU  BOOL  PV processing error unconfirmed  VHU  BOOL  PV alarm high unconfirmed  VLU  BOOL  PV alarm low unconfirmed  VDU  BOOL  PV rate-of-change alarm  unconfirmed  PDE  BOOL  Device error  PVI  BOOL  Sensor error  PRE  BOOL  PV processing error  PVH  BOOL  PV upper limit alarm  PVL  BOOL  PV lower limit alarm  PVD  BOOL  PV change rate alarm    Chapter 2 LD/FBD Instructions  6F8C1226  438    ●  PV data structure(L2DS/L3DS, type2)    Data type  Parent type  typePV_DATA_DS  STRUCT    Member  Data type  Comment  B0_0  BOOL    B0_1  BOOL    B0_2  BOOL    B0_3  BOOL    B0_4  BOOL    B0_5  BOOL    B0_6  BOOL    B0_7  BOOL    B0_8  BOOL    B0_9  BOOL    B0_10  BOOL    INOP  BOOL  Sensor error    DU  BOOL  SDIN card error  B0_13  BOOL    B0_14  BOOL    B0_15  BOOL    PVIH  BOOL  PV sensor upper limit alarm  PVIL  BOOL  PV sensor lower limit alarm  PVHH  BOOL  Upper limit alarm above PV  PVH  BOOL  PV upper limit alarm  PVL  BOOL  PV lower limit alarm  PVLL  BOOL  Lower limit alarm below PV  PVD  BOOL  PV change rate alarm  PDE  BOOL  Device error  PRE  BOOL  PV processing error  UP  BOOL  State of integration setting value  reached  TTE  BOOL  Integration rate-of-change alarm  B1_11  BOOL    B1_12  BOOL    B1_13  BOOL    B1_14  BOOL    B1_15  BOOL    STIT  ARRAY[0..31] OF BOOL  Alarm display condition  FLIT  ARRAY[0..31] OF BOOL  Alarm conf condition  B6_0  BOOL    B6_1  BOOL    B6_2  BOOL    B6_3  BOOL    2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  439    Member  Data type  Comment  MSR  BOOL  Measuring mode (for  reprocessing)  WAT  BOOL  Wait mode (for reprocessing)  TST  BOOL  Test mode (for reprocessing)  PRF  BOOL  Proofread mode(for reprocessing)  TRC  BOOL  Tracking    ZER  BOOL  Zero adjustment mode (for  reprocessing)  B6_10  BOOL    B6_11  BOOL    B6_12  BOOL    B6_13  BOOL    B6_14  BOOL    MHLD  BOOL  MELSECNET input stop  SCN  BOOL  Scan setting  SIM  BOOL  Simulation setting  SPR  BOOL  Alarm suppress setting  BSIM  BOOL  Batch simulation setting  RCNF  BOOL  Alarm confirm request  RLO  BOOL  LO request  B7_6  BOOL    B7_7  BOOL    RST  BOOL  Integration reset setting  B7_9  BOOL    B7_10  BOOL    B7_11  BOOL    B7_12  BOOL    SPR1  BOOL  Alarm suppress limit setting  HLD  BOOL  Input stop (for nv)  B7_15  BOOL      PV  REAL  PV value [EU]  SINW  INT  Simulation input value  DRC  UINT  Wind direction  PVC  REAL  PV before application  compensation  W14  WORD    W15  WORD    W16  WORD    W17  WORD    RAW  INT  Raw count value  W19  WORD    BSPR  ARRAY[0..31] OF BOOL  Alarm suppress flag  PVPC  REAL  PV [% unit]  PVCPC  REAL  PVC [% unit]  Chapter 2 LD/FBD Instructions  6F8C1226  440    Member  Data type  Comment  PVI  BOOL  Sensor alarm  B26_1  BOOL    B26_2  BOOL    B26_3  BOOL    B26_4  BOOL    B26_5  BOOL    B26_6  BOOL    B26_7  BOOL    B26_8  BOOL    B26_9  BOOL    B26_10  BOOL    B26_11  BOOL    B26_12  BOOL    B26_13  BOOL    B26_14  BOOL    B26_15  BOOL    W27  WORD    DRAW  DINT  Raw count value (for nv)  SPARE  ARRAY[0..1] OF WORD      2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  441    ●  LP parameter structure(S2/S3/L1/L2/L3, type1)    Data type  Parent type  typeLP_PARA  STRUCT    Member  Data type  Initial  value  Comment  OA  DWORD  Output hardware address  PVP  UINT  Controlled PV No  MSIG  UINT  Output signal type  CTL  WORD  16#0001 Control operation type  CDR  BOOL  Control operation direction  dum1  BOOL    dum2  BOOL    dum3  BOOL    dum4  BOOL    dum5  BOOL    dum6  BOOL    dum7  BOOL    MDR  BOOL  MV output direction  dum9  BOOL    dum10  BOOL    dum11  BOOL    dum12  BOOL    dum13  BOOL      dum14  BOOL      dum15  BOOL      KP  REAL  0.8  Proportional gain  TI  REAL  0.1  Integral time [min]  TD  REAL  0.0  Differential time [min]  ETA  REAL  0.1  Rate gain  ALP  REAL  0.4  2 DOF proportionality  coefficient/SV high value  BET  REAL  1.35  2 DOF integration coefficient/SV  low value  GAM  REAL  1.25  2 DOF differential coefficient  GP  REAL  0.0  Gap [%]  GG  REAL  1.0  Gap gain  DMV  REAL  100.0  MV rate limiter    [%/scan]  MH  REAL  100.0  MV high limit value [%]  ML  REAL  -5.0  MV low limit value [%]  FP  REAL    Full stroke pulse count/time [s]  BL  REAL    Backlash  HT  REAL    Hold time  PLB  REAL    Pulse dead band [s]  DL  REAL  10.0  Deviation alarm value [EU]  DVB  REAL  1.0  Deviation alarm dead band [EU]    Chapter 2 LD/FBD Instructions  6F8C1226  442    Member  Data type  Initial  value  Comment  MHA  REAL  90.0 MV alarm high [%]  MLA  REAL  10.0 MV alarm low [%]  MVB  REAL  1.0 MV alarm high/low limit dead band  [%]  VP  UINT  Valve position PV No.  DT0  UINT  1 Control cycle [scan]  T0  UINT  5 Sample time [0.1s]  T1  UINT  5 Control time [0.1s]  CLD  UINT  Control stop definition  LDU  WORD  16#0001 LDU Setting  MDT  REAL  0.0 Dead time [min] (for model driven  PID)  MKF  REAL  0.0 PD comp. Gain (for model driven  PID)  MTF  REAL  0.0 PD comp. Differential time [min] (for  model driven PID)  CMD  UINT  0 Control Mode Setting  POR  BOOL  0 Pulse Output Request  SVS  BOOL  0 SV Setting at A Mode  FS0  BOOL  0 SV major tracking  FS1  BOOL  0 Cascade value kind  B61_4  BOOL    B61_5  BOOL    B61_6  BOOL    B61_7  BOOL    B61_8  BOOL    B61_9  BOOL    B61_10  BOOL    B61_11  BOOL    B61_12  BOOL    B61_13  BOOL    B61_14  BOOL    B61_15  BOOL    PMV  REAL  Pulse Output  2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  443    ●  LP parameter structure(L2DS/L3DS, type2)    Data type  Parent type  typeLP_PARA_DS  STRUCT    Member  Data type  Initial  value Comment  TAG  ARRAY[0..3] OF DWORD    Tag No.  NAME  ARRAY[0..7] OF DWORD    Tag name  TYP  UINT    Tag type  MDL  WORD    Display pattern model No.  SCNO  UINT    Auto screen display No..  LOCK  WORD    Operation lock setting  SIGN  ARRAY[0..3] OF DWORD    Tagging character  ATYP  WORD  1  Alarm confirm method  PRS  UINT    Control scan setting  SCH  WORD  1  Sub schedule No.  W39  WORD      MON  ARRAY[0..31] OF BOOL    Alarm monitor individual setting  AGRD  ARRAY[0..15] OF WORD    Alarm grade type  PVP  UINT    Indicator PV No.  VP  UINT    Valve position PV No.  MDR  BOOL    MV Output direction setting  B60_1  BOOL      B60_2  BOOL      B60_3  BOOL      B60_4  BOOL      B60_5  BOOL      B60_6  BOOL      B60_7  BOOL      CDR  BOOL    Control operation direction  B60_9  BOOL      B60_10  BOOL      B60_11  BOOL      B60_12  BOOL      B60_13  BOOL      B60_14  BOOL      B60_15  BOOL      MDSP  WORD    MV display direction setting  MSPL  REAL  50.0  MV split range position  MVPT  REAL  50.0  MV friction pointer position    MSIG  WORD    Output signal type  SIMM  WORD    Simulation method  MUNO  WORD    Output point unit No.  MPNO  WORD    Output point No.  MVA  DWORD    Output point variable name  DMV  REAL  100.0  MV rate-of-change limit [%/scan]  MH  REAL  100.0  MV high limit value [%]  Chapter 2 LD/FBD Instructions  6F8C1226  444    Member  Data type  Initial  value Comment  ML  REAL    MV low limit value [%]  MHA  REAL  90.0  MV alarm high [%]  MLA  REAL  10.0  MV alarm low [%]  MVB  REAL  1.0  MV alarm dead band [%]  CLD  UINT    Control stop type  CMD  UINT    Control mode setting  SVS  UINT    A mode SV setting  DT0  UINT  1  Control cycle  T0  UINT  5  Sample time [scan]  T1  UINT  5  Control time [scan]  KP  REAL  0.8  Proportional gain    TI  REAL  0.1  Integral time [min]  TD  REAL      Differential time [min]  ETA  REAL  0.1  Rate gain  ALP  REAL  0.4  2 DOF proportionality  coefficient/SV high value  BET  REAL  1.35  2 DOF integration coefficient/SV  low value  GAM  REAL  1.25  2 DOF differential coefficient  GP  REAL    Gap [%]  GG  REAL  1.0  Gap gain  GAIN  REAL    Proportional gain  BIAS  REAL    Proportional bias  FP  REAL    Full stroke time/pulse count  BL  REAL    Backlash    HT  REAL    Hold time  PLB  REAL    Pulse dead band [s]  PDL  REAL  10.0  Positive deviation alarm value  NDL  REAL  10.0  Negative deviation alarm value  DVB  REAL  1.0  Deviation alarm dead band [EU]  SH  REAL  100.0  Proportional range high limit value  SL  REAL    Proportional range low limit value  SVEU  ARRAY[0..3] OF DWORD    Proportional engineering unit  character  MVEU  ARRAY[0..3] OF DWORD    Proportional operation value  engineering unit character  SVDM  UINT  2  Proportional decimal point position MVDM  UINT  2  Proportional operation value  decimal point position  KF  REAL  1.0  ΔMV gain  DFF  REAL    ΔMV bias  MVP  REAL    MV ramp target value  MVK  REAL    MV ramp incremental value  MVT  REAL    MV ramp time coefficient  SVP  REAL    SV ramp target value  SVK  REAL    SV ramp incremental value  SVT  REAL    SV ramp time coefficient  TR  REAL    MV tracking value  2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  445    Member  Data type  Initial  value Comment  ACTS  ARRAY[0..3] OF DWORD    Output device name  W174  WORD      POIP  UINT  1  Inching pulse width  FS0  BOOL  0  SV measure tracking designation  FS1  BOOL  0  Cascade value type  B176_2  BOOL      B176_3  BOOL      B176_4  BOOL      B176_5  BOOL      B176_6  BOOL      B176_7  BOOL      B176_8  BOOL      B176_9  BOOL      B176_10  BOOL      B176_11  BOOL      B176_12  BOOL      B176_13  BOOL      B176_14  BOOL      B176_15  BOOL      W177  WORD      MDT  REAL  0.0  Dead time [min] (for model driving  PID)    MKF  REAL  0.0  PD compensator gain(for model driving  PID)  MTF  REAL  0.0  PD compensator differential time [min] (for  model driving PID)  VMHC  UINT    MV direction character display (for  reprocessing)  SPARE  ARRAY[0..6] OF WORD        Chapter 2 LD/FBD Instructions  6F8C1226  446    ●  LP data structure(S2/S3/L1/L2/L3, type1)    Data type  Parent type  typeLP_DATA  STRUCT    Member  Data type  Comment  SV  REAL  SV value [EU]  MV  REAL  MV value [%]  MODE  UINT  Control mode  MVT  BOOL  MV tracking  SIM  BOOL  Simulation  LSP  BOOL  Alarm suppress  M  BOOL  Mode M  A  BOOL  Mode A  C  BOOL  Mode C  RM  BOOL  Mode RM  LS_7  BOOL    LS_8  BOOL    LS_9  BOOL    MVE  BOOL  MV error  CLI  BOOL  Control stop  MVH  BOOL  MV alarm high  MVL  BOOL  MV alarm low  DVE  BOOL  Deviation alarm value  VPI  BOOL  Valve position error  SSV  BOOL  SEQ-SV ope.  CSV  BOOL  CMP-SV involvement condition  SMV  BOOL  SEQ-MV involvement condition  CMV  BOOL  CMP-MV ope.  CMP  BOOL  CMP operation  SEQ  BOOL  SEQ operation  CC  BOOL  Cascade  dum7  BOOL    dum8  BOOL    dum9  BOOL    MEU  BOOL  MV error unconfirmed  CLU  BOOL  Control stop unconfirmed  MHU  BOOL  MV alarm high unconfirmed  MLU  BOOL  MV alarm low unconfirmed  DVU  BOOL  Deviation alarm unconfirmed  VPU  BOOL  Valve position error unconfirmed    2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  447    ●  LP data structure(L2DS/L3DS, type2)    Data type  Parent type  typeLP_DATA_DS  STRUCT    Member  Data type  Comment  CLI  BOOL  Control inactive  MVE  BOOL  MV error    MVH  BOOL  MV alarm high  MVL  BOOL  MV alarm low  PDV  BOOL  Positive deviation alarm  NDV  BOOL  Negative deviation alarm  VPI  BOOL  Valve position error  B0_7  BOOL    B0_8  BOOL    B0_9  BOOL    B0_10  BOOL    B0_11  BOOL    B0_12  BOOL    B0_13  BOOL    B0_14  BOOL    B0_15  BOOL    PVIH  BOOL  PV sensor upper limit alarm  PVIL  BOOL  PV sensor lower limit alarm  PVHH  BOOL  Upper limit alarm above PV  PVH  BOOL  PV upper limit alarm  PVL  BOOL  PV lower limit alarm  PVLL  BOOL  Lower limit alarm below PV  PVD  BOOL  PV change rate alarm  PDE  BOOL  Device error  PRE  BOOL  PV processing error  B1_9  BOOL    B1_10  BOOL    B1_11  BOOL    B1_12  BOOL    B1_13  BOOL    B1_14  BOOL    B1_15  BOOL    STIT  ARRAY[0..31] OF BOOL  Alarm display condition  FLIT  ARRAY[0..31] OF BOOL  Alarm conf condition  SSV  BOOL  SEQ-SV ope.  CSV  BOOL  CMP-SV involvement condition  SMV  BOOL  SEQ-MV involvement condition  CMV  BOOL  CMP-MV ope.  Chapter 2 LD/FBD Instructions  6F8C1226  448    Member  Data type  Comment  M  BOOL  Mode M  A  BOOL  Mode A  C  BOOL  Mode C  RM  BOOL  Mode RM  TRC  BOOL  MV tracking state  B6_9  BOOL    POR  BOOL  Pulse output request  IOPN  BOOL  Pulse inching request (OPEN)  ICLS  BOOL  Pulse inching request (CLOSE)  B6_13  BOOL    B6_14  BOOL    B6_15  BOOL    SCN  BOOL  Scan setting  SIM  BOOL  Simulation setting  SPR  BOOL  Alarm suppress setting  BSIM  BOOL  Batch simulation setting  RCNF  BOOL  Alarm confirm request  RLO  BOOL  LO request  B7_6  BOOL    B7_7  BOOL    RST  BOOL  Integration reset setting  B7_9  BOOL    B7_10  BOOL    B7_11  BOOL    B7_12  BOOL    SPR1  BOOL  Alarm suppress limit setting  HLD  BOOL  Input stop (for nv)  B7_15  BOOL    PV  REAL  PV value [EU]  SV  REAL  SV value [EU]  MV  REAL  MV value [%]  MODE  UINT  Control mode  W15  WORD    PMV  REAL  Pulse output ΔMV  RAW  INT  Raw count value  W19  WORD    TR  REAL  MV tracking value  RPLS  REAL  PO user area1    POWK  DWORD  PO user area 2  BSPR  ARRAY[0..31] OF BOOL  Alarm suppress flag  PVPC  REAL  PV [% unit]  PVCPC  REAL  PVC [% unit]  SVPC  REAL  SV [% unit]  2.16 Process Operation    Integrated Controller V series/Unified Controller nv series Programming Instructions (LD/FBD/SFC/ST)  449    Member  Data type  Comment  PVI  BOOL  Sensor alarm  CMP  BOOL  Computer flag  MCH  BOOL  M mode set  ACH  BOOL  A mode set  CCH  BOOL  C mode set  MDCH  BOOL  Mode change  MRM  BOOL  M/RM mode  DVE  BOOL  Deviation alarm  B34_8  BOOL  MRM previous memory  B34_9  BOOL  A mode previous memory  B34_10  BOOL  C mode previous memory  B34_11  BOOL  M mode request  B34_12  BOOL  A mode request  B34_13  BOOL  C mode request  B34_14  BOOL    B34_15  BOOL    W35  WORD    MVOVER  REAL    DRAW  DINT  Raw count (for nv)  SPARE  ARRAY[0..23] OF WORD      ●  Polygonal line parameter structure(S2/S3/L1/L2/L3, type1)    Data type  Parent type  typeP_PARA  STRUCT    Member  Data type  Comment  VAL  ARRAY[0..11] OF typeXY      Data type  Parent type  typeXY  STRUCT    Member  Data type  Comment  X  REAL  X value  Y  REAL  Y value    ●  Polygonal line parameter structure(L2DS/L3DS, type2)    Data type  Parent type  typeP_PARA_DS  STRUCT    Member  Data type  Comment  X  ARRAY[0..11] OF REAL  X value  Y  ARRAY[0..11] OF REAL  Y value    Chapter 2 LD/FBD Instructions  6F8C1226  450    ●  For PID3 instruction (PV data/setting structure):    Data type  Parent type  typePID3_PV_D  STRUCT    Member  Data type  Comment  PVC  REAL  Process measurement input [%]  ASV  REAL  Auto mode setting value[%]  CSV  REAL  Cascade mode setting value[%]  MMV  REAL  Manual mode manipulated value input [%]  TMV  REAL  Manipulated value tracking input [%]  MODE  DWORD  Mode setting    ●  For PID 3 instruction (LP parameter)    Data type  Parent type  typePID3_LP_P  STRUCT    Member  Data type  Comment  KP  REAL  Proportional gain  TI  REAL  Integral time [min]  TD  REAL  Rate time [min]  GP  REAL  Control dead band [%]  ISV  REAL  Auto mode setting initial value [%]  FT  REAL  Process input filter  DSV  REAL  Setting ASV rate limiter [%/At]  DMMV  REAL  Manual mode manipulated value MMV differential  limit [%/At]  STS  DWORD  Status  MH  REAL  Manipulated value high limit [%]  ML  REAL  Manipulated value low limit [%]  DMV  REAL  Manipulated value differential limit [%/At]  N  REAL  Control cycle setting value      2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  451      2.17  Program Control    No.  Instruction  Remarks  1  Return  RETURN    2  User Defined Function  —    3  User Defined Function Block  —    4  Program Enable  EN_P    5  Program Disable  DIS_P    6  Event Program Startup  START_P    7  Interrupt Enable  EI_T  T compatible instruction  8  Interrupt Disable  DI_T  T compatible instruction    Chapter 2    LD/FBD Instructions  6F8C1226  452    Return      Program Control  Return      LD/FBD language  notation    RETURN Input    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  RETURN    ●  Function  ·  When the input state is TRUE(ON), program, user defined function, and user defined  function block are terminated and control returns to the instruction following the  corresponding CALL instruction.  ·  If connected directly to left power rail, program, user defined function, and user defined  function block are terminated unconditionally and control returns to the instruction  following the corresponding CALL instruction.    Input  Action  Output FALSE(OFF)  Return not executed —  TRUE(ON)  Return executed  —    ·  This instruction is not necessary in order to return to the instruction following the  corresponding CALL instruction at the end of program, user defined function, or user  defined function block.    Use the Return instruction when it is necessary to return to  the instruction following the corresponding CALL instruction in the middle of a  program.    ●  Program example  [LD/FBD language notation]          SIGNAL2  RETURN SIGNAL1      [ST language notation]  IF SIGNAL1 AND SIGNAL2 THEN  RETURN;  END_IF;    ·   Returns only when the state of SIGNAL1 and SIGNAL2 is TRUE(ON).  2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  453    User Defined Function   Program Control  User Defined Function    LD/FBD language  notation    Function name Input argument 1 Input argument 2 Input argument 3 Input argument n Output    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  Output := Function name( Input argument 1, Input argument 2, Input  argument 3, …, Input argument n );    ●  Function  ·  Executes the user defined function.  ·  Up to 15 Input argument including function value may be defined.  ·  User defined function and user defined function block may be nested up to 6 levels.    ●  Program example  [LD/FBD language notation]        USERFUN    IN0      IN1      IN2      IN3  SAMPLE1  SAMPLE2  SAMPLE3  SAMPLE4  SAMPLE5  ADD_INT IN0 IN1 IN2 SUB_INT IN3 MUL_INT  USERFUN User defined function content      [ST language notation]  SAMPLE5 := USERFUN( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);      (User defined function content)  USERFUN := ( IN0 + IN1 – IN2 ) * IN3    ·  Executes the content of user defined function using SAMPLE1 to 4 as input argument  and stores the result in SAMPLE5.  Chapter 2    LD/FBD Instructions  6F8C1226  454    User Defined Function Block   Program Control  User Defined Function Block    LD/FBD language  notation  Function name Input argument 1 Input argument 2 Input argument 3 Input argument n Output 1  Output 2  Output 3  Output n  Instance name   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language  notation  [Instance name](Input argument1, Input argument2, Input argument3,  ———,  Input argument n );  [Variable name]:=[Instance name]. Output argument1;  [Variable name]:=[Instance name]. Output argument2;  [Variable name]:=[Instance name]. Output argument3;  :  [Variable name]:=[Instance name]. Output argument n;    ●  Function  ·  Executes the user defined function block.  ·  Up to 15 input and output arguments may be defined.  ·  User defined function and user defined function block may be nested up to 6 levels.    ●  Program example  [LD/FBD language notation]      ADD_INT IN0 IN1 IN2 SUB_INT IN3 MUL_INT  OUT1 User defined function block content  ADD_INT IN0 IN1 IN2 SUB_INT IN3 DIV_INT  OUT2 USERFB    IN0    OUT1      IN1    OUT2      IN2      IN3  SAMPLE1  SAMPLE2  SAMPLE3  SAMPLE4  SAMPLE5 SAMPLE6 USERFB_1    2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  455    [ST language notation]  USERFB_1( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);  SAMPLE5 := USERFB_1.OUT1;  SAMPLE6 := USERFB_1.OUT2;    (User defined function block content)  OUT1 := ( IN0 + IN1 – IN2 ) * IN3  OUT2 := ( IN0 + IN1 – IN2 ) / IN3    ·  Executes the content of user defined function block using SAMPLE1 to 4 as input  arguments and stores the result in SAMPLE5 and SAMPLE6.    Chapter 2    LD/FBD Instructions  6F8C1226  456    Program Enable    Program Control  Program Enable    LD/FBD language  notation    Execution control input Output  EN_P  E  TASK  NO  Task entry No. Task type   EN input  Edge execution  Index modification  Modifier  ○  ○   —  ST language notation  Output := EN_P( E, TASK, NO);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  E  BOOL  ○   Execution control  input    TASK  UINT  ○   Task type    Input  NO  UINT  ○   Task entry No.    Output  —  BOOL  —  Output      ●  Function  ·  When the execution control input E is FALSE (OFF), FALSE (OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), execution of the program specified  by task type and task entry No. is enabled and TRUE(ON) is output as the result.  ·  The range of task type TASK is as follows.  ·  The range of task entry No. depends on the controller model.    Refer to the instruction  manual for details.    Unified Controller  Integrated Controller  Task type  TASK  Task name  type1 type2   S3 S2 L3 L3DS  L2  L2DS L1 0  Event task  EV  ○   ○     ○   ○   ○   ○   ○   ○   —  1  Super  high—speed task  SS  ○   —    ○   ○   ○ —  ○   —  —  2  Interrupt task  IP  ○   ○     ○   ○   ○   ○   ○   ○   —  3  High—speed task  HS  ○   ○     ○   ○   ○   ○   ○   ○   —  4  Main task  MS  ○   ○     ○   ○   ○   ○   ○   ○   —  5  Background task  BG  —  —    ○   ○   ○   ○   ○   ○   —    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF)  TRUE(ON)  Enables execution of the specified program.    TRUE(ON)  2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  457    ●  Program example  [LD/FBD language notation]        SIGNAL1 1  LD  EN_P      4  LD  SIGNAL2 1  ST    10  LD  E  TASK  NO  Main task  000  001  010  009  P_2059  P_2051  P_2050  P_2060  Disabled→enabled      [ST language notation]  SIGNAL2 := EN_P( SIGNAL1, 4, 10);    ·  When execution control input SIGNAL1 is TRUE(ON), execution of program P_2060  registered in entry No. 010 of main task specified by task type TASK and task entry No.  NO is enabled.    ●  Error information  ·  No operation is performed if an unregistered program, invalid task type, or invalid task  entry No. is specified.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  458    Program Disable    Program Control  Program Disable    LD/FBD language  notation    Execution control input Output  DIS_P  E  TASK  NO  Task entry No. Task type   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DIS_P( E, TASK, NO);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  E  BOOL  ○   Execution control  input    TASK  UINT  ○   Task type    Input  NO  UINT  ○   Task entry No.    Output  —  BOOL  —  Output      ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), execution of the program specified  by task type and task entry No. is disabled and TRUE(ON) is output as the result.  ·  The range of task type TASK is as follows. The range of task entry No. depends on the  controller model. Refer to the instruction manual for details.    Unified Controller  Integrated Controller  Task type  TASK  Task name  type1 type2   S3 S2 L3 L3DS  L2  L2DS L1 0  Event task  EV  ○   ○     ○   ○   ○   ○   ○   ○   —  1  Super high—  speed task  SS  ○   —    ○   ○   ○ —  ○   —  —  2  Interrupt task  IP  ○   ○     ○   ○   ○   ○   ○   ○   —  3  High—speed  task  HS  ○   ○     ○   ○   ○   ○   ○   ○   —  4  Main task  MS  ○   ○     ○   ○   ○   ○   ○   ○   —  5  Background  task  BG  —  —    ○   ○   ○   ○   ○   ○   —    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF)  TRUE(ON)  Disables execution of the specified program.    TRUE(ON)  2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  459    ●  Program example  [LD/FBD language notation]      SIGNAL1  1  LD  DIS_P      4  LD  SIGNAL2 1  ST    10  LD  E TASK  NO  Main task 000 001  010 009  P_2059  P_2051  P_2050  P_2060  EnabledDisabled     [ST language notation]  SIGNAL2 := DIS_P( SIGNAL1, 4, 10);    ·  When execution control input SIGNAL1 is TRUE(ON), execution of program P_2060  registered in entry No. 10 of main task specified by task type TASK and task entry No.  NO is disabled.    ●  Error information  ·  No operation is performed if an unregistered program, invalid task type, or invalid task  entry No. is specified.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  460    Event Program Startup   Program Control  Event Program Startup    LD/FBD language  notation    Execution control input Output  START_P E  TASK  NO  Task entry No. Task type   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := START_P( E, TASK, NO );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  E  BOOL  ○   Execution control  input    TASK  UINT  ○   Task type    Input  NO  UINT  ○   Task entry No.    Output  —  BOOL  —  Output      ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the program specified by task type  and task entry No. is executed and TRUE(ON) is output as the result.  ·  In Unified Controllers, a specified program may not be registered for startup. If the  program cannot be registered, start the next scan again to set output to FALSE (OFF).  ·  The range of task type TASK is as follows.    However, super high speed task (SS),  high speed task (HS), and main task (MS) which performs scan cannot be set.    Unified Controller  Integrated Controller  Task type  TASK  Task name  type1 type2   S3 S2 L3 L3DS  L2  L2DS L1 0  Event task  EV  ○   ○     —  —  ○   ○   ○   ○   —  1  Super  high-speed task  SS  —  —    —  —  —  —  —  —  —  2  Interrupt task  IP  ○   ○     —  —  ○   ○   ○   ○   —  3  High-speed task  HS  —  —    —  —  —  —  —  —  —  4  Main task  MS  —  —    —  —  —  —  —  —  —  5  Background task  BG  —  —    —  —  ○   ○   ○   ○   —  2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  461    [Integrated Controller V series]    Execution  control input E  Action  Output  FALSE(OFF)  —  FALSE(OFF)  TRUE(ON)  Starts the specified event program.    TRUE(ON)    [Unified Controller nv series]    Execution  control input E  Action  Output  FALSE(OFF)  —  FALSE(OFF)  Executed    TRUE(ON)  TRUE(ON)  Starts the specified event program.  Not executed  FALSE(OFF)   ●  Program example  [Integrated Controller V series]    [LD/FBD language notation]        START_P  TASK  E  IP1_REQ 2 NO  1 IP1_DONE START_P TASK  E  IP2_REQ 2 NO 2 IP2_DONE  Indicates IP1 is  enabled and output  is set to TRUE(ON) Interrupt task  0  1  2  15  P_2050  P_2051  P_2052  P_2065  Startup    Startup    Main task(MS)  Interrupt task(IP)  MS_001 MS_001  IP_001   Indicates IP2 is  enabled and output  is set to TRUE (ON) IP_002     [ST language notation]  IP1_DONE := START_P( IP1_REQ, 2, 1);  IP2_DONE := START_P( IP2_REQ, 2, 2);    ·  When execution control input IP1_REQ is TRUE(ON), the event program IP1 specified  by the task type TASK and task entry No. NO is started up to start up program P_2051.      ·  When execution control input IP2_REQ is TRUE(ON), the event program IP2 specified  by the task type TASK and task entry No. NO is started up to start up program P_2052,  as with the same scan of IP1 startup.  Chapter 2    LD/FBD Instructions  6F8C1226  462    [Unified Controller nv series]    [LD/FBD language notation]        START_P  TASK  E  IP1_REQ 2  NO  1  R IP1_REQ START_P TASK  E  IP2_REQ 2 NO 2 R  IP2_REQ  Indicates IP1 is  executed and startup  request is reset with  reset coil instruction. Interrupt task  0  1  2  15  P_2050  P_2051  P_2052  P_2065  Startup    Startup  Main task(MS)  Interrupt task (IP)  MS_001  MS_001 IP_001   Indicates IP2 is not  executed and startup  request is made again  by the next scan.  MS_001  IP_002      [ST language notation]  Since ST language does not support the notation equivalent to LD language, it cannot  describe data hold types such as -(R) - and - (S) - or change detection types such as  -|P|- and -|N|-. Therefore the program example is omitted.      ·  When execution control input IP1_REQ is TRUE(ON), event program IP1 specified by  the task type TASK and task entry No. starts up to activate program P_2051.  ·  Startup request for event program IP2 by the same scan as IP1 is made but denied  when execution control input IP2_REQ is TRUE(ON). Therefore, IP2 startup request  should be made again in the next scan.      ●  Error information  ·  No operation is performed if an unregistered program, invalid task type, or invalid task  entry No. is specified.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.17    Program Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  463    Interrupt Enable    Program Control  Interrupt Enable    LD/FBD language  notation    Execution control input Result  EI_T    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Result := EI_T(Execution control input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  BOOL  ○   Execution  control input    Output  —  BOOL  —  Result        ●  Function  ·  When the input is FALSE(OFF), outputs FALSE(OFF) without performing operation.  ·  When the input is TRUE(ON), execution of task with higher priority than the executing  task is enabled and TRUE(ON) is output as the result.  ·  Interrupt events that occur while execution is disabled are held until interrupt enable  instruction is executed and the held task is executed after execution is enabled.    ● Important  ·  If interrupt is disabled, it must be enabled within the same POU.    ●  Program example  [LD/FBD language notation]    DI_T Circuit    A  Circuit    B EI_T I/O  Interrupt  factor  IP task  Execution  disabled  IP task  Execute  Interrupt factor    held  SIGNAL2 SIGNAL1   [ST language notation]  SIGNAL3 := DI_T( SIGNAL1);  SIGNAL4 := EI_T( SIGNAL2);    ·  Disables interrupt when the SIGNAL1 is TRUE(ON).    This interrupt is disabled while  circuit A is executing.    Enables interrupt when the SIGNAL2 is TRUE(ON).    Then the  interrupt task (IP) is started up by the suspended I/O interrupt.  Chapter 2    LD/FBD Instructions  6F8C1226  464    Interrupt Disable    Program Control  Interrupt Disable    LD/FBD language  notation    Execution control input Result  DI_T    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Result := DI_T( Execution control input );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  BOOL  ○   Execution control  input    Output  —  BOOL  —  Result      ●  Function  ·  When the input is FALSE(OFF), outputs FALSE(OFF) without performing operation.  ·  When the input is TRUE(ON), execution of task with higher priority than the executing  task is disabled and TRUE(ON) is output as the result.  ·  Interrupt events that occur while execution is disabled are held until interrupt enable  instruction is executed and the held task is executed after execution is enabled.    ● Important  ·  If interrupt is disabled, it must be enabled within the same POU.      ●  Program example  [LD/FBD language notation]    DI_T Circuit    A  Circuit    B  EI_T I/O  Interrupt  factor  IP task  Execution  disabled  IP task  Execute  Interrupt factor  held  SIGNAL2 SIGNAL1 [ST language notation]  SIGNAL3 := DI_T( SIGNAL1);  SIGNAL4 := EI_T( SIGNAL2);    ·  Disables interrupt when the SIGNAL1 is TRUE(ON).    This interrupt is disabled while  circuit A is executing.    Enables interrupt when the SIGNAL2 is TRUE(ON).    Then the  interrupt task (IP) is invoked by the suspended I/O interrupt.    2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  465      2.18  String Processing    No.  Instruction  Remarks  1  String Length  LEN    2  Leftmost Extract String  LEFT    3  Rightmost Extract String  RIGHT    4  Extract String  MID    5  Concatenate String  CONCAT_STRING   6  Insert String  INSERT    7  Delete String  DELETE    8  Replace String  REPLACE    9  Find String  FIND    10  Define String  DEF_STRING      Chapter 2    LD/FBD Instructions  6F8C1226  466    String Length   String Processing  String Length    LD/FBD language  notation    Input string Output  LEN    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LEN(Input string );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  STRING  —  Input string    Output  —  UINT  —  Output      ●  Function  ·  Calculates the length of the input string and outputs the result.  ·  Direct I/O variable cannot be specified for the input variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  LEN  SAMPLE2 7  ST  Input string String length 7  B C D E F G  A   [ST language notation]  SAMPLE2 := LEN( SAMPLE1);    ·  Calculates the length of string "ABCDEFG" in input data SAMPLE1 and stores the  result "7" in SAMPLE2.    ●  Error information  ·  When the input variable exceeds the variable area, the string length is not processed  and the data boundary is exceeded.  ·  The following operation is performed when direct I/O variable is specified for the input  variable:    Controller    Action  Integrated Controller V series  Result=0.    Error flag is set to TRUE(ON).  Unified Controller nv series  Result=0.    Error flag and table operation error flag are set to TRUE(ON).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  467    Leftmost Extract String   String Processing  Leftmost Extract String    LD/FBD language  notation    Input string Output  LEFT    IN      L  Extraction character length   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  LEFT( IN, L, Output);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  STRING  —  Input string    Input  L  UINT  ○   Extraction  character  length    Output  —  STRING  —  Output      ●  Function  ·  Extracts the string specified by extraction character length L from the left end of the  input string IN and outputs the result.  ·  Direct I/O variable cannot be specified for the input string variable and output variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  LEFT    IN        L  SAMPLE3   ST  Input string Extracted string ABC  SAMPLE2  3  LD  Extraction character count  3  B C D E F G  A     [ST language notation]  LEFT( SAMPLE1, SAMPLE2, SAMPLE3);    ·  Extracts the number of characters specified by extraction character length "3" in  SAMPLE2 from the left end of the string "ABCDEFG" in SAMPLE1and stores the  result "ABC" in SAMPLE3.    Chapter 2    LD/FBD Instructions  6F8C1226  468    ●  Error information  ·  When the input string variable and output variable exceed the variable area, the  leftmost extract string is not processed and the data boundary is exceeded.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:      Controller    Action  Integrated Controller V series  Leftmost extract string is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Leftmost extract string is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used ENO output is reset to FALSE(OFF) when the above error occurs.  2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  469    Rightmost Extract String   String Processing  Rightmost Extract String    LD/FBD language  notation    Input string Output  RIGHT    IN      L  Extraction character length   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  RIGHT( IN, L, Output );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  STRING  —  Input string    Input  L  UINT  ○   Extraction  character  length    Output  —  STRING  —  Output      ●  Function  ·  Extracts the number of characters specified by extraction character length L from the  right end of the input string IN and outputs the result.  ·  Direct I/O variable cannot be specified for input string variable and output variable.      ●  Program example  [LD/FBD language notation]    SAMPLE1 LD RIGHT   IN   L SAMPLE3 ST Input string Extracted string EFG SAMPLE2 3 LD Extraction character length 3 B C D E F G A     [ST language notation]  RIGHT( SAMPLE1, SAMPLE2, SAMPLE3);    ·  Extracts the number of characters specified by extraction character length "3" in  SAMPLE2 from the right end of the string "ABCDEFG" in SAMPLE1and stores the  result "EFG" in SAMPLE3.    Chapter 2    LD/FBD Instructions  6F8C1226  470    ●  Error information  ·  When the input string variable and output variable exceed the variable area, rightmost  extract string is not processed and the data boundary is exceeded.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:    Controller  Action  Integrated Controller V series  Rightmost extract string is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Rightmost extract string is not executed.    Error flag and table operation error flag are set to TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  471    Extract String   String Processing  Extract String    LD/FBD language  notation    Input string Output  MID    IN      L      P  Extraction character length Extracted string top position   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  MID( IN, L, P, Output );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  IN  STRING  —  Input string    L  UINT  ○   Extraction character length    Input  P  UINT  ○   Extraction character top position    Output  —  STRING  —  Output      ●  Function  ·  Extracts the number of characters specified by extraction character length L starting  from the Extraction character top position P of the input string IN and outputs the  result.  ·  Direct I/O variable cannot be specified for the input string variable and output variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  MID    IN        L        P  SAMPLE4   ST  Input string Extracted string BCD  SAMPLE2  3  LD  Extraction character length  3  SAMPLE3  2  LD  B C D E F G A Extracted string position  2      [ST language notation]  MID( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Extracts the number of characters specified by extraction character length "3" in  SAMPLE2, starting from extraction character top position "2" in SAMPLE3 of the string  "ABCDEFG" in SAMPLE1 and stores the result "BCD" in SAMPLE3.  Chapter 2    LD/FBD Instructions  6F8C1226  472    ●  Error information  ·  When input string variable and output variable exceed the variable area, the extract  string is not processed and the data boundary is exceeded.  ·  If number of characters from Extraction character top position P is less than the  Extraction character length, the entire string starting at position P is output.  ·  If Extraction character top position P is greater than the Input string length, the result is  a null string.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:      Controller  Action  Integrated Controller V series  Extract string is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Extract string is not executed.    Error flag and table operation error flag are set to  TRUE(ON).      ·  When EN is used, ENO output is reset to FALSE(OFF).    2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  473    Concatenate String    String Processing  Concatenate String    LD/FBD language  notation    Input string 1 Output  CONCAT_STRING   IN1      IN2  Input string 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  CONCAT_STRING( IN1, IN2, Output );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN1  STRING  —  Input string 1    Input  IN2  STRING  —  Input string 2    Output  —  STRING  —  Output      ●  Function  ·  Concatenates input string 1 with input string 2 and outputs the result.  ·  Direct I/O variable cannot be specified for the input string variable and output variable.    ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  CONCAT_STRING   IN1        IN2  SAMPLE3   ST  Input string 1 Output string SAMPLE2    LD  Input string 2 + E F G B C D A B C D E F G A      [ST language notation]  CONCAT_STRING( SAMPLE1, SAMPLE2, SAMPLE3);    ·  Concatenates the string "ABCD" in SAMPLE1 with extraction string "EFG" in  SAMPLE2 and stores the result "ABCDEFG" in SAMPLE3.    Chapter 2    LD/FBD Instructions  6F8C1226  474    ●  Error information  ·  When the input string variable and output variable exceed the variable area, the  concatenate string is not processed and the data boundary is exceeded.  ·  If the string length after concatenation exceeds the output string variable size, the result is  unchanged.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:      Controller  Action  Integrated Controller V series  Concatenate string is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Concatenate string is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used ENO output is reset to FALSE(OFF) when the above error occurs.        2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  475    Insert String    String Processing  Insert String    LD/FBD language  notation    Input string Output  INSERT    IN1      IN2      P  Insertion character string Insert position EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  INSERT( IN1, IN2, P, Output );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN1  STRING  —  Input string    IN2  STRING  —  Insertion  character  string    Input  P  UINT  ○   Insertion  position    Output  —  STRING  —  Output      ●  Function  ·  Inserts the insertion string IN2 at insertion position P of the input string IN1 and outputs  the result.  ·  Direct I/O variable cannot be specified for the input string variable and output variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  INSERT    IN        L        P  SAMPLE4   ST  Input string  Inserted string SAMPLE2  3  LD  Insert string  SAMPLE3  1  LD  D E F G  B C  A 1  Insert position B C A D E F G     [ST language notation]  INSERT( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    Chapter 2    LD/FBD Instructions  6F8C1226  476  ·  Inserts the insertion character string "DEFG" in SAMPLE2 into string "ABC" in  SAMPLE1 at insertion position "1" specified by SAMPLE3 and stores the result  "ADEFGBC" in SAMPLE4.    ●  Error information  ·  When the input string variable and output variable exceed the variable area, the insert  string is not processed and the data boundary is exceeded.  ·  If number of characters in insertion string IN1 is less than Insertion position P, insertion string is  inserted at the end of the input string IN1.  ·  If the insertion position P is "0", IN2 is inserted at the start of the input string IN1.  ·  If the string length after insertion exceeds the output string variable size, the result is  unchanged.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:      Controller  Action  Integrated Controller V series  Insert string is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Insert string is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) only when the string size is  exceeded or when the string variable is specified as direct I/O.      2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  477    Delete String   String Processing  Delete String    LD/FBD language  notation    Input string Output  DELETE    IN      L      P  Deletion character length Delete position EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  DELETE( IN, L, P, Output );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN  STRING  —  Input string    L  UINT  ○   Deletion  character  length    Input  P  UINT  ○   Delete position    Output  —  STRING  —  Output      ●  Function  ·  Deletes a string of length L from the deletion position P of the input string IN and  outputs the result.  ·  Direct I/O variable cannot be specified for the input string variable and output variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  DELETE    IN        L        P  SAMPLE4   ST  Input string  Deleted string SAMPLE2  4  LD  SAMPLE3  3  LD  B G A 3  Delete position F G  A B C D E  4  Deletion character length     [ST language notation]  DELETE( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4);    ·  Deletes the number of characters specified by deletion character length "4" in  SAMPLE2 from string "ABCDEFG" in SAMPLE1 starting from delete position "3"  specified by SAMPLE3 and stores the result "ABG" in SAMPLE4.  Chapter 2    LD/FBD Instructions  6F8C1226  478    ●  Error information  ·  When the input string variable and output variable exceed the variable area, the delete  string is not processed and the data boundary is exceeded.  ·  If number of characters from delete position P is less than deletion character length, the entire  string starting at position P is deleted.  ·  If Input string length is less than delete position P, the input string is output unchanged.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:      Controller  Action  Integrated Controller V series  Delete string is not executed.  Error flag is set to TRUE(ON).  When EN is used, ENO output is reset to  FALSE(OFF).  Unified Controller nv series  Delete string is not executed.  Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF). 2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  479    Replace String    String Processing  Replace String    LD/FBD language  notation    Input string Output  REPLACE    IN1      IN2      L      P  Replacement character string Replacement character length Replacement position   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  REPLACE( IN1, IN2, L, P, Output );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN1  STRING  —  Input string    IN2  STRING  —  Replacement  character  string    L  UINT  ○   Replacement  character  length    Input  P  UINT  ○   Replacement  position    Output  —  STRING  —  Output      ●  Function  ·  Replaces a string of length L starting at replacement position P of the input string IN1  with replacement character string IN2 and outputs the result.  ·  Direct I/O variable cannot be specified for the input string variable and output variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  REPLACE  SAMPLE5   ST  Input string  Replaced string SAMPLE2    LD  SAMPLE3  4  LD  Y Z  X 3  Replace position F G  A B C D E  4  Replacement character length  IN1  IN2  L  SAMPLE4  3  LD  P  Replace character string  G A B X Y Z   Chapter 2    LD/FBD Instructions  6F8C1226  480    [ST language notation]  REPLACE( SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4, SAMPLE5);    ·  For string "ABCDEFG" specified by SAMPLE1, replaces the number of characters  specified by replacement character length in SAMPLE3 starting at Replacement  position 3 specified by SAMPLE4 with the replacement string "XYZ" specified by  SAMPLE2 and stores the result "ABXYZG" in SAMPLE5.    ●  Error information  ·  When the input string variable and output variable exceed the variable area, the  replace string is not processed and the data boundary is exceeded.  ·  If Input string length is less than replacement position P, the replacement string is output  following the Input string.  ·  If the string length after replacement exceeds the output string variable size, the result is  unchanged.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable and output variable:      Controller  Action  Integrated Controller  V series  Replace string is not executed.    Error flag is set to TRUE(ON).  Unified Controller nv series  Replace string is not executed.    Error flag and table operation error are set to TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) only when the string size is  exceeded or when the string variable is specified as direct I/O.    2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  481    Find String    String Processing  Find String    LD/FBD language  notation    Input string Output  FIND    IN1      IN2  Search character string EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := FIND( IN1, IN2 );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  IN1  STRING  —  Input string    Input  IN2  STRING  —  Search  character  string    Output  —  UINT  —  Output      ●  Function  ·  Searches the search character string IN2 from the input string IN1 and outputs the first  found string position.  ·  If a matching string cannot be found, “0” is output.  ·  Direct I/O variable cannot be specified for the input string variable.      ●  Program example  [LD/FBD language notation]      SAMPLE1    LD  FIND    IN1        IN2  SAMPLE3 3  ST  Input string Search result SAMPLE2    LD  Search string 3  B C D E F G  A C D     [ST language notation]  SAMPLE3 := FIND( SAMPLE1, SAMPLE2);    ·  Searches the string "CD" specified by SAMPLE2 from the string "ABCDEFG" in  SAMPLE1 and stores the result 3 in SAMPLE3.    Chapter 2    LD/FBD Instructions  6F8C1226  482    ●  Error information  ·  When the input string variable exceeds the variable area, the find string is not  processed and the data boundary is exceeded.  ·  The following operation is performed when direct I/O variable is specified for the input  string variable:      Controller  Action  Integrated Controller V series  Result=0.    Error flag is set to TRUE(ON).    Unified Controller nv series  Result=0.  Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      2.18    String Processing  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  483    Define String   String Processing  Define String    LD/FBD language  notation  String byte count input Output DEF_STRING EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  DEF_STRING( String byte count input, Output );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  UINT  ○   String byte count input    Output  —  STRING  —  Output      ●  Function  ・ Reserves a STRING data variable area of string byte count specified with input.    <Variable declaration>  Variable name  Data type Dec.  VAR_STRING  STRING[8] VAR    In this case, a value from 1 to 8 is set as the string byte count input.    The STRING variable contains the number of string bytes (word size) that can be used  in the variable. However, if STRING is used for a static variable, the above string byte  count information is cleared at run time. Therefore, the STRING type can only be used in  a global variable with retain specification.    Therefore, in order to use STRING variable in a variable scope outside this restriction,  this instruction must be used under the following condition:    ·  To use the string variable in a variable scope that will be initialized, this Define String  instruction must be executed.    Local variable, global variable, SW/D register, IQ register: Must be executed during  run time.    Temporary variable: Must be executed each time POU execution is performed.    ·  Set the string byte count within the string size specified in the variable declaration.    (String size when declaring 1 ≤ input ≤ STRING)  ·  Updates the word size of the STRING body of the STRING data.    VAR length INT((input+1) / 2)  ·  The  string  variable  can  be  initialized  by  using  it  in  combination  with  Array-String  Conversion (ARRAY_TO_STRING) instruction.  ·  Direct I/O variable cannot be specified for the output variable.    Chapter 2    LD/FBD Instructions  6F8C1226  484    <String data structure>      VAR LENGTH  STRING LENGTH    STRING BODY    1W  1W  Up to 128W  VAR LENGTH:  Word size of STRIN body STRING LENGTH: Stored byte count  STRING BODY:  Character code      ● Important  · Specify input within string size of STRING [A] declared in the variable declaration.    If a value greater than this is specified, a boundary error occurs or the content of variable  allocated after STRING [A] will be destroyed. Be very careful when setting the string byte count  input value to be input.    ●  Program example  [LD/FBD language notation]        SAMPLE1  12  LD  DEF_STRING SAMPLE2   ST  <Variable declaration>  Variable    Data type  Dec.  SAMPLE2  STRING[12] VAR  SAMPLE2 data structure  STRING LENGTH STRING BODY  VAR LENGTH=6   [ST language notation]  DEF_STRING( SAMPLE1, SAMPLE2);    ·  Executes define string instruction with declaration character count "12" in SAMPLE1 in  order to use STRING SAMPLE2 with variable scope=static variable, This declares the  use of a 6 word area in VAR length of STRING SAMPLE2.    ●  Error information  ·  f string byte count input > 256, an abnormal input is assumed and the VAR LENGTH of  the specified STRING is set to “0”.  ·  The following operation is performed when direct I/O variable is specified for the output  variable:        Controller  Action  Integrated Controller V series  Define string is not executed.    Error flag is set to TRUE(ON).    Unified Controller nv series  Define string is not executed.  Error flag and table operation error flag are set to  TRUE(ON).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  485      2.19  Control Statements    No.  Instruction  Remarks  1  IF  IF    2  THEN  THEN    3  ELSE (IF statement)  ELSE    4  ELSEIF  ELSEIF    5  END_IF  END_IF    6  CASE  CASE    7  :  :    8  . .    :  . .    9  :        ,  :    ,    10  . .    ,  . .    ,    11  ELSE (CASE statement)  ELSE    12  END_CASE  END_CASE    13  FOR_DO  FOR_DO    14  EXIT (FOR statement)  EXIT    15  END_FOR  END_FOR    16  WHILE  WHILE    17  DO  DO    18  EXIT (WHILE statement)  EXIT    19  END_WHILE  END_WHILE    20  REPEAT  REPEAT    21  UNTIL  UNTIL    22  EXIT (REPEAT statement)  EXIT    23  END_REPEAT  END_REPEAT       Chapter 2    LD/FBD Instructions  6F8C1226  486    IF    Control Statements  IF    LD/FBD language  notation    IF    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  IF    ●  Function  ·  Indicates the start of IF statement.  ·  A condition expression is described between IF and THEN.    If the condition  expression is TRUE(ON), the code following THEN is executed.    If the condition  expression is FALSE(OFF), the code following THEN is skipped and the code  following ELSE is executed.      ·  The condition expression following IF must be instructions that outputs BOOL type  result (such as bit sequence instructions, compare instructions, or logical operation  instructions).    ●  Program example  [LD/FBD language notation]        IF  THEN  ELSE  END_IF    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 SUB_INT  SAMPLE1  SAMPLE2  SAMPLE3     Condition expression  Process 1  Process 2    [ST language notation]  IF SIGNAL1 AND SIGNAL2 THEN  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  ELSE  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  END_IF;  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  487      Process 1  Process 2  Condition  expression  TRUE  FALSE     ·  If the states of condition expression SIGNAL1 and SIGNAL2 are both TRUE(ON),  Process 1 (addition) is performed.    Otherwise, Process 2 (subtraction) is performed.  Chapter 2    LD/FBD Instructions  6F8C1226  488    THEN    Control Statements  THEN    LD/FBD language  notation    THEN    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  THEN    ●  Function  ·  The following table shows the processing when the condition expression in an IF  statement is satisfied:    Condition    Action  Condition expression is  satisfied(TRUE(ON))  Executes the process following  THEN.  Condition expression is not  satisfied (FALSE(OFF))  Does not execute the process  following THEN.    ●  Program example  [LD/FBD language notation]        IF  THEN  ELSE  END_IF    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 SUB_INT  SAMPLE1  SAMPLE2  SAMPLE3     Condition expression  Process 1  Process 2      [ST language notation]  IF SIGNAL1 AND SIGNAL2 THEN  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  ELSE  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  END_IF;    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  489      Process 1  Process 2  Condition  expression  TRUE  FALSE     ·  If the states of condition expression SIGNAL1 and SIGNAL2 are both TRUE(ON),  Process 1 (addition) following THEN is performed.    Otherwise, Process 2  (subtraction) following ELSE is performed.  Chapter 2    LD/FBD Instructions  6F8C1226  490    ELSE (IF statement)    Control Statements  ELSE (IF statement)    LD/FBD language  notation    ELSE    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  ELSE    ●  Function  ·  The following table shows the processing when the condition expression in an IF statement is  not satisfied:    Condition    Action  Condition expression is satisfied  (TRUE(ON))  Does not execute the process  following ELSE.  Condition expression is not  satisfied (FALSE(OFF))  Executes the process following  ELSE.    ●  Program example  [LD/FBD language notation]        IF  THEN  ELSE  END_IF    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 SUB_INT  SAMPLE1  SAMPLE2  SAMPLE3     Condition expression  Process 1  Process 2      [ST language notation]  IF SIGNAL1 AND SIGNAL2 THEN  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  ELSE  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  END_IF;  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  491      Process 1  Process 2  Condition  expression  TRUE  FALSE     ·  If the states of condition expression SIGNAL1 and SIGNAL2 are both TRUE(ON),  Process 1 (addition) following THEN is performed.    Otherwise, Process 2  (subtraction) following ELSE is performed.  Chapter 2    LD/FBD Instructions  6F8C1226  492    ELSEIF    Control Statements  ELSEIF    LD/FBD language  notation    ELSEIF    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  ELSEIF    ●  Function  ·  Indicates the start of ELSEIF statement.  ·  A condition expression is described between ELSEIF and THEN.    If the condition  expression is TRUE(ON), the code following THEN is executed.    If the condition  expression is FALSE(OFF), the code following THEN is skipped and the code  following ELSE is executed.      ·  The condition expression following ELSEIF must be instructions that outputs BOOL  type result (such as syntax instructions, compare instructions, or logical operation  instructions).    ●  Program example  [LD/FBD language notation]        ELSE  END_IF  MUL_INT  SAMPLE1  SAMPLE2  SAMPLE3 Process 3      IF    SIGNAL2 SIGNAL1  SIGNAL3 Condition expression 1  THEN  ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 Process 1    ELSEIF    SIGNAL4 SIGNAL3  SIGNAL3 Condition expression 2  THEN  SUB_INT  SAMPLE1  SAMPLE2  SAMPLE3 Process 2    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  493    [ST language notation]  IF SIGNAL1 AND SIGNAL2 THEN  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  ELSEIF SIGNAL3 AND SIGNAL4 THEN  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  ELSE  SAMPLE3 := MUL_INT( SAMPLE1, SAMPLE2);  END_IF;      Process 1  Process 2  Condition  expression 1  TRUE  FALSE Condition  expression 2  TRUE FALSE Process 3        ·  If the states of conditional expression 1 SIGNAL1 and SIGNAL2 are both TRUE(ON),  Process 1 (addition) is performed and if the states of condition expression 2 SIGNAL3  and SIGNAL4 are both TRUE(ON),    Process 2 (subtraction) is performed.    Otherwise, Process 3 (multiply) following ELSE is performed.      Chapter 2    LD/FBD Instructions  6F8C1226  494    END_IF    Control Statements  END_IF    LD/FBD language  notation  END_IF   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  END_IF    ●  Function  ·  Indicates the end of IF statement.    ●  Program example  [LD/FBD language notation]        IF  THEN  ELSE  END_IF    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 SUB_INT  SAMPLE1  SAMPLE2  SAMPLE3     Condition expression  Process 1  Process 2    [ST language notation]  IF SIGNAL1 AND SIGNAL2 THEN  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  ELSE  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  END_IF;    ·  If the states of condition expression  SIGNAL1 and SIGNAL2 are both  TRUE(ON), Process 1 (addition)  following THEN is performed.    Otherwise, Process 2 (subtraction)  following ELSE is performed.    Process 1  Process 2  Condition  expression  TRUE  FALSE  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  495    CASE    Control Statements  CASE    LD/FBD language  notation      CASE  INDEX    □   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  CASE ( INDEX ) OF      ●  Arguments    Arg.  Operand  Type  Const. Description  Remar ks  Input  INDEX  DINT  —  Index register specification  (condition value)      ●  Function  ·  Specifies the index register used as the start of CASE statement and condition value.  ·  Index registers XI,XJ,XK,XL,XM,XN,XP,and XQ may be used.    ●  Program example  [LD/FBD language notation]      CASE  END_CASE  ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 Process 1  SUB_INT  SAMPLE1  SAMPLE2  SAMPLE3 Process 2  INDEX    XI  .. :  20  30  :  10      [ST language notation]  CASE XI OF  10:  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  20..30:  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  END_CASE;  Chapter 2    LD/FBD Instructions  6F8C1226  496      Process 1  Process 2  XI=10?  FALSE  TRUE 20≦XI≦30?  FALSE  TRUE     ·  If the content of index register XI, which is the condition value is "10" Process 1  (addition) is performed and    if the content of index register XI is greater than or equal  to "20" and less than or equal to "30" Process 2 (subtraction) is performed.    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  497      :      :    LD/FBD language  notation    :  Comparison dat   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  (Comparison data ) :    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  DINT  ○   Comparison data      ●  Function  ·  If the content of index register specified with the CASE statement and the content of  comparison data are equal, the code following the[ : ]instruction is executed.  ·  The CASE condition is not evaluated after executing the code following  the[ : ]instruction.    (This is equivalent to the C language break statement.)    ·  The comparison data may be specified using variables or constants.    Condition  Action  Index register=Comparison data  Executes the code following:  Index register≠Comparison data  Does not execute the code following:    ●  Program example  [LD/FBD language notation]          CASE  END_CASE  ADD_INT  SAMPLE2  SAMPLE3  SAMPLE4 Process 1  SUB_INT  SAMPLE2  SAMPLE3  SAMPLE4 Process 2  INDEX    XI  .. :  20  30  :  SAMPLE1    Chapter 2    LD/FBD Instructions  6F8C1226  498    [ST language notation]  CASE XI OF  SAMPLE1:  SAMPLE4 := ADD_INT( SAMPLE2, SAMPLE3);  20..30:  SAMPLE4 := SUB_INT( SAMPLE2, SAMPLE3);  END_CASE;      Process 1  Process 2  XI=SAMPLE1?  FALSE  TRUE 20XI30?  FALSE  TRUE     ·  If the content of index register XI, which is the condition value, is equal to the content  of SAMPLE1, Process 1 (addition) is performed and if the content of index register XI  is between "20" and "30" Process 2 (subtraction) is performed.      2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  499    .. :    Control Statements  .. :    LD/FBD language  notation    ..    :  Comparison data 1 Comparison data 2    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  (Comparison data 1 ) .. (Comparison data 2 ) :    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  —  DINT  ○   Comparison data 1    Input  —  DINT  ○   Comparison data 2      ●  Function  ·  When the content of index register specified with the CASE statement is between  Comparison Data 1 and Comparison Data 2, the code following the[ .. : ]instruction is  executed.    The CASE condition is not evaluated after executing the code following  the[ .. : ]instruction.    (This is equivalent to the C language break statement.)  ·  Comparison Data 1 and Comparison Data 2 may be specified using variables or  constants.    Condition  Action  Index register is between Comparison Data 1 and Comparison  Data 2  Executes the code  following .. :  Index register is outside Comparison Data 1 and Comparison  Data 2  Does not execute the  code following .. :    Chapter 2    LD/FBD Instructions  6F8C1226  500    ●  Program example  [LD/FBD language notation]          CASE  END_CASE  ADD_INT  SAMPLE2  SAMPLE3  SAMPLE4 Process 1  SUB_INT  SAMPLE2  SAMPLE3  SAMPLE4 Process 2  INDEX    XI  .. :  20  30  :  SAMPLE1    [ST language notation]  CASE XI OF  SAMPLE1:  SAMPLE4 := ADD_INT( SAMPLE2, SAMPLE3);  20..30:  SAMPLE4 := SUB_INT( SAMPLE2, SAMPLE3);  END_CASE;      Process 1 Process 2  XI=SAMPLE1?  FALSE  TRUE 20XI30?  FALSE  TRUE     ·  If the content of index register XI, which is the condition value, is equal to the content  of SAMPLE1, Process 1 (addition) is performed and if the content of index register XI  is greater than or equal to "20" and less than or equal to "30," Process 2 (subtraction)  is performed.    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  501      ,    Control Statements  ,    LD/FBD language  notation    ,  Comparison data    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  ( Comparison data ) , (Comparison data ) :    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  DINT  ○   Comparison data      ●  Function  ·  Used to enumerate comparison data in CASE statement.  If the content of index register specified in the CASE statement is equal to the  comparison data or if the subsequent condition is satisfied, the code following the [ ,]  instruction is executed.  ·  The CASE condition is not evaluated after executing the code following the [ ,]  instruction (This is equivalent to the C language break statement).  ·  The comparison data may be specified using variables or constants.    Condition  Action  Index register=Comparison data  Executes the code following ,    Index register≠Comparison data  Compare the following comparison data    ●  Program example  [LD/FBD language notation]          CASE  END_CASE  ADD_INT  SAMPLE3  SAMPLE4  SAMPLE5 Process 1  SUB_INT  SAMPLE3  SAMPLE4  SAMPLE5 Process 2  INDEX    XI  .. :  20  30  ,  SAMPLE1  :  SAMPLE2    Chapter 2    LD/FBD Instructions  6F8C1226  502    [ST language notation]  CASE XI OF  SAMPLE1, SAMPLE2:  SAMPLE5 := ADD_INT( SAMPLE3 , SAMPLE4);  20..30:  SAMPLE5 := SUB_INT( SAMPLE3 , SAMPLE4);  END_CASE;      Process 1  Process 2  XI=SAMPLE1?  FALSE  TRUE 20XI30?  FALSE  TRUE XI=SAMPLE2?  FALSE  TRUE     ·  If the content of index register XI, which is the condition value, is equal to the content  of SAMPLE1 or equal to SAMPLE2, Process 1 (addition) is performed and if the  content of index register XI is greater than or equal to "20" and less than or equal to  "30," Process 2 (subtraction) is performed.    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  503    .. ,    Control Statements  .. ,    LD/FBD language  notation    .. ,  Comparison data 1 Comparison data 2    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  (Comparison data 1 ) .. (Comparison data 2 ) , (Comparison data) :   ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  —  DINT  ○   Comparison data 1    Input  —  DINT  ○   Comparison data 2      ●  Function  ·  Used to enumerate comparison data in CASE statement.  If the content of index register specified in the CASE statement is between  Comparison Data 1 and Comparison Data 2 or if the subsequent condition is satisfied,  the code following the[ .., ]instruction is executed.  ·  The CASE condition is not evaluated after executing the code following the[ .. ,]  instruction (This is equivalent to the C language break statement).  ·  Comparison Data 1 and Comparison Data 2 may be specified using variables or  constants.    Condition  Action  Index register is between Comparison Data 1 and Comparison Data 2 Executes the code  following .. ,  Index register is outside Comparison Data 1 and Comparison Data 2 Compare the following  comparison data    Chapter 2    LD/FBD Instructions  6F8C1226  504    ●  Program example  [LD/FBD language notation]          CASE  END_CASE  ADD_INT  SAMPLE3  SAMPLE4  SAMPLE5 Process 1  SUB_INT SAMPLE3  SAMPLE4  SAMPLE5 Process 2  INDEX    XI  .. ,  20  30  :  SAMPLE2  :  SAMPLE1      [ST language notation]  CASE XI OF  SAMPLE1:  SAMPLE5 := ADD_INT( SAMPLE3, SAMPLE4);  20..30, SAMPLE2:  SAMPLE5 := SUB_INT( SAMPLE3, SAMPLE4);  END_CASE;      Process1 Process 2  XI=SAMPLE1?  FALSE  TRUE 20XI30?  FALSE  TRUE XI=SAMPLE2?  FALSE  TRUE     ·  If the content of index register XI, which is the condition value, is equal to the content  of SAMPLE1, Process 1 (addition) is performed and if the content of index register XI  is  greater  than  or  equal  to  "20"  and  less  than  or  equal  to  "30"  or  equal  to  variable  SAMPLE2, Process 2 (subtraction) is performed.  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  505    ELSE (CASE statement)   Control Statements  ELSE (CASE statement)    LD/FBD language  notation    ELSE    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  ELSE    ●  Function  ·  If the content of the index register in the CASE statement does not satisfy any of the  specified conditions, the code following the ELSE statement is executed (This is  equivalent to the C language default statement).    Condition  Action  Index register satisfies the condition with the previous  comparison data  Does not execute the code  following ELSE.  Index register does not satisfy the condition with the previous  comparison data  Executes the code following  ELSE.    ●  Program example  [LD/FBD language notation]        CASE  ELSE  ADD_INT  SAMPLE3  SAMPLE4  SAMPLE5 Process 1    SUB_INT  SAMPLE3  SAMPLE4  SAMPLE5 Process 2  INDEX    XI  .. ,  20  30  :  SAMPLE2  :  SAMPLE1  END_CASE    MUL_INT  SAMPLE3  SAMPLE4  SAMPLE5 Process 3      Chapter 2    LD/FBD Instructions  6F8C1226  506    [ST language notation]  CASE XI OF  SAMPLE1:  SAMPLE5 := ADD_INT( SAMPLE3, SAMPLE4);  20..30, SAMPLE2:  SAMPLE5 := SUB_INT( SAMPLE3, SAMPLE4);  ELSE  SAMPLE5 := MUL_INT( SAMPLE3, SAMPLE4);  END_CASE;      Process 1 Process 2  XI=SAMPLE1?  FALSE  TRUE 20XI30?  FALSE  TRUE XI=SAMPLE2?  FALSE  TRUE Process 3      ·  If the content of index register XI, which is the condition value, is equal to the content  of SAMPLE1, Process 1 (addition) is performed and if the content of Index Register XI  is greater than or equal to "20" and less than or equal to "30" or equal to SAMPLE2,  Process 2 (subtraction) is performed.    Otherwise, Process 3 (multiplication) is  performed.      2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  507    END_CASE    Control Statements  END_CASE    LD/FBD language  notation    END_CASE   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  END_CASE      ●  Function  ·  Indicates the end of CASE statement.      ●  Program example  [LD/FBD language notation]      CASE  END_CASE  ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 Process 1  SUB_INT SAMPLE1  SAMPLE2  SAMPLE3 Process 2  INDEX    XI  .. :  20  30  :  10      [ST language notation]  CASE XI OF  10:  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  20..30:  SAMPLE3 := SUB_INT( SAMPLE1, SAMPLE2);  END_CASE;    Chapter 2    LD/FBD Instructions  6F8C1226  508      Process 1 Process 2  XI=10?  FALSE  TRUE 20XI30?  FALSE  TRUE     ·  If the content of index register XI, which is the condition value, is "10," Process 1  (addition) is performed and    if the content of index register XI is greater than or equal  to "20" and less than or equal to "30," Process 2 (subtraction) is performed.  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  509    FOR_DO  □  Control Statements  FOR_DO    LD/FBD language  notation    FOR_DO  INDEX    MIN    MAX      STEP        EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  FOR ( INDEX ) := ( MIN ) TO ( MAX ) BY ( STEP ) DO      ●  Arguments    Arg.  Operand  Type  Const. Description  Rem arks INDEX  DINT  —  Index register specification (repeat count)    MIN  DINT  ○   Initial value input    MAX  DINT  ○   Final value input    Input  STEP  DINT  ○   Increment input      ●  Function  ·  Indicates the start of FOR statement and sets the loop condition.  ·  The instructions between FOR_DO and END_FOR are repeated until the loop count in  index register reaches the final value.  ·  The loop condition is specified using the index register, which specifies the loop count  INDEX, and variables or constants specifying the initial value MIN, final value MAX,  and increment STEP.    Condition  Action  Index register content > Final value  End repetition  Index register content ≤ Final value  Repeats instruction between FOR_DO and  END_FOR    ●  Program example  [LD/FBD language notation]    FOR_DO  END_FOR  ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Process 1  INDEX    XI  MIN    0  MAX    9  STEP    1    [ST language notation]  FOR XI := 0 TO 9 BY 1 DO  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  END_FOR;  Chapter 2    LD/FBD Instructions  6F8C1226  510      XI=XI+1  Process 1  XI>9?  FALSE TRUE XI =0      ·  Process 1 (addition) is repeated until the loop count in index register XI exceeds "9".    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  511    EXIT (FOR statement)    Control Statements  EXIT (FOR statement)    LD/FBD language  notation    EXIT    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  EXIT    ●  Function  ・ Forces end of FOR statement.      ●  Program example  [LD/FBD language notation]      SIGNAL2   FOR_DO  ADD_INT  EN            ENO SAMPLE1  SAMPLE2  SAMPLE3 Process 1  INDEX    XI  MIN    0  MAX    9  STEP    1  SIGNAL1    END_FOR  IF  SIGNAL3   THEN  EXIT  END_IF  Process 2  SIGNAL2      [ST language notation]  FOR XI := 0 TO 9 BY 1 DO  IF SIGNAL2 THEN  EXIT;  END_IF;  END_FOR;    Chapter 2    LD/FBD Instructions  6F8C1226  512      XI=XI+1  Process 1  XI>9?  FALSE TRUE SIGNAL2?  FALSE TRUE XI =0      ·  Process 1 (addition) is repeated until the loop count in index register XI exceeds"9",  but the FOR statement is terminated if the SIGNAL2 in the IF statement is TRUE(ON).  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  513    END_FOR    Control Statements  END_FOR    LD/FBD language  notation    END_FOR   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  END_FOR    ●  Function  ·  Indicates the end of FOR statement.      ●  Program example  [LD/FBD language notation]      FOR_DO  END_FOR  ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Process 1  INDEX    XI  MIN    0  MAX    9  STEP    1      [ST language notation]  FOR XI := 0 TO 9 BY 1 DO  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  END_FOR;      XI=XI+1  Process 1  XI>9?  FALSE TRUE XI =0      ·  Process 1 (addition) is repeated until the loop count in index register XI exceeds "9".    Chapter 2    LD/FBD Instructions  6F8C1226  514    WHILE    Control Statements  WHILE    LD/FBD language  notation    WHILE    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  WHILE    ●  Function  ·  Indicates the start of WHILE statement.  ·  A condition expression is described between WHILE and DO.    The code between DO  and END_WHILE is executed while the condition expression is TRUE(ON) and jumps  to code following END_WHILE when the condition expression becomes FALSE(OFF).  ·  The condition expression following WHILE must contain instruction that outputs BOOL  type result such as bit sequence instructions, compare instructions, or logical  operation instructions).    ●  Program example  [LD/FBD language notation]        WHILE  DO  END_WHILE    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Condition expression  Process 1    [ST language notation]  WHILE SIGNAL1 AND SIGNAL2 DO  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  END_WHILE;      ·  Process 1 (addition) is repeated if the states of  SIGNAL1 and SIGNAL2, which are the  condition expression, are both TRUE(ON).    Otherwise, jumps to the code following the  END_WHILE statement.    Process 1  Condition  expression  TRUE FALSE 2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  515    DO    Control Statements  DO    LD/FBD language  notation    DO    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  DO    ●  Function  ·  The following table shows the processing when the condition expression in a WHILE  statement is satisfied:    Condition  Action  Condition expression is satisfied  (TRUE(ON))  Executes the code between DO and  END_WHILE  Condition expression is not  satisfied (FALSE(OFF))  Does not execute the code between DO  and END_WHILE    ●  Program example  [LD/FBD language notation]        WHILE  DO  END_WHILE    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Condition expression  Process 1      [ST language notation]  WHILE SIGNAL1 AND SIGNAL2 DO  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  END_WHILE;    ·  Process 1 (addition) is repeated if the states of  SIGNAL1 and SIGNAL2, which are the  condition expression, are both TRUE(ON).    Otherwise, jumps to the code following the  END_WHILE statement.    Process 1  Condition  expression  TRUE FALSE Chapter 2    LD/FBD Instructions  6F8C1226  516    EXIT (WHILE statement)   Control Statements  EXIT (WHILE statement)    LD/FBD language  notation    EXIT    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  EXIT    ●  Function  ·  Forces end of WHILE statement.    ●  Program example  [LD/FBD language notation]        WHILE  SIGNAL4   ADD_INT EN            ENO SAMPLE1  SAMPLE2  SAMPLE3 Process 1  SIGNAL3  END_WHILE    IF  THEN  EXIT END_IF  Process 2  SIGNAL5   SIGNAL4  DO SIGNAL2   SIGNAL1      [ST language notation]  WHILE SIGNAL1 DO  IF SIGNAL4 THEN  EXIT;  END_IF;  END_WHILE;    2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  517      Process 1  SIGNAL1?  TRUE FALSE SIGNAL4?  FALSE TRUE     ·  Process 1 (addition) is repeated while SIGNAL1, which is the condition expression, is  TRUE(ON), but if the SIGNAL4 in the IF statement is TRUE(ON), termination of the  WHILE statement is forced and jumps to the code following the END_WHILE  statement.  Chapter 2    LD/FBD Instructions  6F8C1226  518    END_WHILE    Control Statements  END_WHILE    LD/FBD language  notation    END_WHILE   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  END_WHILE    ●  Function  ·  Indicates the end of WHILE statement.      ●  Program example  [LD/FBD language notation]        WHILE  DO  END_WHILE    SIGNAL2 SIGNAL1  SIGNAL3 ADD_INT  SAMPLE1  SAMPLE2  SAMPLE3 Condition expression  Process 1      [ST language notation]  WHILE SIGNAL1 AND SIGNAL2 DO  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  END_WHILE;      Process 1  Condition  expression  TRUE FALSE     ·  Process 1 (addition) is repeated if the states of SIGNAL1 and SIGNAL2, which are the  condition expression, are both TRUE(ON).    Otherwise, jumps to the code following  the END_WHILE statement.  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  519    REPEAT    Control Statements  REPEAT    LD/FBD language  notation    REPEAT    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  REPEAT    ●  Function  ·  Indicates the start of REPEAT statement.  Processing is described between REPEAT and UNTIL. The code between REPEAT  and UNTIL is executed while the condition expression following UNTIL is FALSE(OFF)  and jumps to code following END_REPEAT when it becomes TRUE(ON).  ·  The condition expression following UNTIL must contain instruction that outputs BOOL  type result (such as bit sequence instructions, compare instructions, or logical  operation instructions).    ●  Program example  [LD/FBD language notation]    REPEAT  UNTIL  END_REPEAT      SIGNAL2 SIGNAL1  SIGNAL3 Condition expression  ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Process 1      [ST language notation]  REPEAT  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  UNTIL SIGNAL1 AND SIGNAL2  END_REPEAT;    Process 1  Condition  expression  TRUE  FALSE  · Process 1 (addition) is repeated if the states of  SIGNAL1 and SIGNAL2, which are the condition  expression, are not both TRUE(ON).    If the states  of SIGNAL1 and SIGNAL2 are both TRUE(ON),  jumps to the code following the END_REPEAT  statement without looping.  Chapter 2    LD/FBD Instructions  6F8C1226  520    UNTIL    Control Statements  UNTIL    LD/FBD language  notation    UNTIL    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  UNTIL    ●  Function  ·  Indicates the start of the condition expression of REPEAT statement.      Condition  Action  Condition expression is satisfied  TRUE(ON)  Ends REPEAT - UNTIL loop  Condition expression is not  satisfied FALSE(OFF)  Executes the code between  REPEAT and UNTIL    ●  Program example  [LD/FBD language notation]    REPEAT  UNTIL  END_REPEAT      SIGNAL2 SIGNAL1  SIGNAL3 Condition  expression  ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Process 1      [ST language notation]  REPEAT  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  UNTIL SIGNAL1 AND SIGNAL2  END_REPEAT;    ·  Process  1  (addition)  is  repeated  if  the  states  of  SIGNAL1 and  SIGNAL2, which  are  the  condition  expression,  are  not  both  TRUE(ON).    If  the  states  of  SIGNAL1  and  SIGNAL2  are  both  TRUE(ON),  jumps  to  the  code  following  the  END_REPEAT statement without looping.    Process 1  Condition  expression  TRUE FALSE  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  521    EXIT (REPEAT statement)   Control Statements  EXIT (REPEAT statement)    LD/FBD language  notation    EXIT    EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  EXIT    ●  Function  ·  Forces end of REPEAT statement.      ●  Program example  [LD/FBD language notation]      REPEAT  END_REPEAT    SIGNAL4   ADD_INT  EN            ENO SAMPLE1  SAMPLE2  SAMPLE3 Process 1  SIGNAL3    IF  THEN  EXIT  END_IF  Process 2  SIGNAL5   SIGNAL4  UNTIL  SIGNAL2   SIGNAL1      [ST language notation]  REPEAT  IF SIGNAL4 THEN  EXIT;  END_IF;  UNTIL SIGNAL1  END_REPEAT;    Chapter 2    LD/FBD Instructions  6F8C1226  522      Process 1  SIGNAL1?  FALSE  TRUE SIGNAL4?  FALSE TRUE     ·  Process 1 (addition) is repeated while SIGNAL1, which is the condition expression, is  FALSE(OFF), but if the SIGNAL4 in the IF statement is TRUE(ON), termination of the  REPEAT statement is forced and jumps to the code following the END_REPEAT  statement.  2.19    Control Statements  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  523    END_REPEAT    Control Statements  END_REPEAT    LD/FBD language  notation    END_REPEAT   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  END_REPEAT    ●  Function  ·  Indicates the end of REPEAT statement.      ●  Program example  [LD/FBD language notation]      REPEAT  UNTIL  END_REPEAT      SIGNAL2 SIGNAL1  SIGNAL3 Condition  expression  ADD_INT SAMPLE1  SAMPLE2  SAMPLE3 Process 1      [ST language notation]  REPEAT  SAMPLE3 := ADD_INT( SAMPLE1, SAMPLE2);  UNTIL SIGNAL1 AND SIGNAL2  END_REPEAT;      Process 1  Condition  expression  TRUE FALSE     ·  Process 1 (addition) is repeated if the states of SIGNAL1 and SIGNAL2, which are the  condition expression, are not both TRUE(ON).    If the states of SIGNAL1 and  SIGNAL2 are both TRUE(ON), jumps to the code following the END_REPEAT  statement without looping.  Chapter 2    LD/FBD Instructions    6F8C1226  524      2.20  Communication    No.  Instruction  Remarks  1  Socket Communication Send  USEND_T  V dedicated instruction 2  Socket Communication Send  USEND_N  nv dedicated instruction 3  Socket Communication Receive  URCV_T  V dedicated instruction 4  Socket Communication Receive  URCV_N  nv dedicated instruction 5  Communication FB (XMIT_T)  XMIT_T  V dedicated instruction 6  Communication FB (XMIT_N)  XMIT_N  nv dedicated instruction   ● Note  Socket  communication  instruction  for  Integrated  Controller  is  “USEND_T/URCV_T”  and  socket  communication instruction for Unified Controller is “USEND_N/URCV_N”.  When  using  an  Integrated  Controller  user  application  for  Unified  Controller,  the  socket  communication instructions and commands must be changed.  The  following  items  must  be  remembered  to  change  “USEND_T/URCV_T”  into  “USEND_N/URCV_N”.    ·  Change in socket communication instruction  Socket communication send: USEND_TUSEND_N  Socket communication receive: URCV_TURCV_N  ·  Instruction instances are stored in different areas:   USEND_T/URCV_T instance: static variable area   USEND_N/URCV_N instance: non—tracking type, static variable area   Since  the  referential  description  of  the  output  argument  differs,  refer  to  the  [ST  language  notation]of the instruction manual.     When using socket communication with duplex system, see “Notes for duplex system” in this  section.    ·  Integrated Controller: application of EN7** to Unified Controller EN8**    For  EN7**  and  EN8**,  the  instructions  and  referential  description  of  the  output  arguments  must be changed.  ·  Integrated Controller: application of EN311 to Unified Controller EN911  For EN311 and EN911, the socket communication instructions, command contents (command  structure,  command  number)  and  referential  description  of  the  output  arguments  must  be  changed.      2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  525    Socket Communication Send   Communication  Socket Communication Send  V dedicated  instruction  LD/FBD language  notation    Completion output  Send command Send data word number Send data Execution request USEND_T    REQ      CMD      P      N  Error  Socket no. or error status  Instance name  DONE ERROR STATUS EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( REQ, CMD, P, N );  [Variable name]:=[Instance name]. DONE;  [Variable name]:=[Instance name]. ERROR;  [Variable name]:=[Instance name]. STATUS;    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid range  REQ  BOOL  ○  Execution request    CMD  PTR  —  Send command    P  PTR  —  Send data    Send data word number  (Send word command)  1 to 1000 words Input  N  UINT  ○   Send data bytes number  (Send bytes command)  1 to 2000 bytes  DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error      Output  STATUS  INT  —  Socket No. or error status      ·  Send command data structure    15  0 Requested Ethernet module slot no.  Socket service command  Requested parameter    (See below for details)  Chapter 2    LD/FBD Instructions    6F8C1226  526    ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion output    ERROR  BOOL  Error    STATUS  INT  Socket No. or error status Can be accessed from the user  program.  TIMECNT DINT  Time count  RESERVE DWORD  Reserved    Cannot be accessed from the  user program.    ●  Restrictions    Integrated Controller V series  Item  S3  S2  L3  L2  L1  # of Ethernet modules/stations  4        1  # of sockets/Ethernet modules  12          Single bus  Yes  Yes  Yes  Yes  Yes  TCP/IP  Duplex bus  No  No  Yes  Yes  No  Single bus  Yes  Yes  Yes  Yes  Yes  Protocol    UDP/IP  Duplex bus  Yes  Yes  Yes  Yes  No  Transferred text size/socket  Send word command: 1000 words  Send bytes command: 2000 bytes    ●  Function  ·  This is a function block that communicates with TCP/IP or UDP/IP protocol using the  Ethernet module.    ·  When the execution request REQ changes from FALSE(OFF) to TRUE(ON), N words  starting from send data P are sent with the content of the specified send command  CMD.  ·  Word send command: send data word number is 1 to 1000, byte send command: can  be specified from 1 to 2000 bytes.    ·  When data transfer completes, completion output DONE is kept TRUE(ON) for one  scan time.  ·  If an error occurs, ERROR is kept TRUE(ON) for one scan time.  ·  When transfer completes successfully or unsuccessfully, Socket No. or error status  STATUS contains the detailed completion information.  ·  The instruction completes successfully (DONE=ON) starting from the second scan  after execution request (REQ=ON). Therefore, depending on how the control cycle is  set and application program is created, it may take several seconds before normal  completion.  ·  The request command differs according to Ethernet module. Following sections  describe request commands. Also, a list of error status codes is included after the  URCV_T instruction (Error Status Code List).  ·  Notes on using this communication function block instruction in a duplex system are  included after the Error Status Code List (Notes for duplex system).  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  527  ●  Ethernet module type and request command type    Model  Module execution  location    Bus type Module name  Request command type*  Single  EN711, EN731, EN751*  Single bus request command  Main unit  Duplex  EN721, EN741, EN761  FN711*  Single bus request command and  duplex bus request command  3000  Parallel I/O unit  Single  EN311  EN311 request command  Single  EN611, EN631, EN651*  Single bus request command  2000  Main unit  Duplex  EN621/EB621,  EN641/EB641, EN661  FN611  Single bus request command and  duplex bus request command  1000  Main unit  Single  EN531*  Single bus request command    Notes on request command type  ·  Both the “single bus request command” and “duplex bus request command” may be used for duplex bus  (EN721, EN741, EN761, FN711*, EN621/EB621, EN641/EB641, EN661, FN611), but the duplex bus  request command cannot be used for single bus (EN711, EN731, EN751, EN611, EN631, EN651*, EN531*).  Be sure to use a “single bus request command”.  ·  When the destination is single bus, use a “single bus request command” even if the source Ethernet module  is duplex bus.    ●  Single bus request command    ○ : Available /—: Unavailable    Command description  Command S3 S2 L3  L2  L1  Reset request  16#0011   ○   ○   ○   ○   ○ Other station confirmed request  16#0014   ○   ○   ○   ○   ○ Socket batch close request  16#001B   ○ —  —  —  —  UDP open request  16#0031   ○   ○   ○   ○   ○ UDP send request / broadcast  16#0032   ○   ○   ○   ○   ○ UDP close request  16#0034   ○   ○   ○   ○   ○ TCP open request  16#0035   ○   ○   ○   ○   ○ TCP send request  16#0037   ○   ○   ○   ○   ○ TCP close request  16#0039   ○   ○   ○   ○   ○ UDP bytes send request  16#0042   ○   ○ —  —  —  TCP bytes send request  16#0047   ○   ○ —  —  —    Chapter 2    LD/FBD Instructions    6F8C1226  528    ●  Duplex bus request command    ○ : Available/—: Unavailable  Command description  Command  S3 S2 L3  L2  L1  UDP open request  16#0231   ○   ○   ○   ○   —  UDP send request / broadcast  16#0232   ○   ○   ○   ○   —  UDP close request  16#0234   ○   ○   ○   ○   —  TCP open request  16#0235 —  —  ○   ○   —  TCP send request  16#0237 —  —  ○   ○   —  TCP close request  16#0239 —  —  ○   ○   —    ●  EN311 request command    ○ : Available /—: Unavailable  Command description  Command  S3 S2 L3  L2  L1  Reset request  16#0311   ○ —  —  —  —  Parameter setting request  16#0312   ○ —  —  —  —  Operation mode control request  16#0313   ○ —  —  —  —  Other station confirmed request  16#0314   ○ —  —  —  —  Time setting request  16#0318   ○ —  —  —  —  Router IP address setting request  16#0319   ○ —  —  —  —  PC link (register write request)  16#0321   ○ —  —  —  —  UDP open request  16#0331   ○ —  —  —  —  UDP send request / broadcast  16#0332   ○ —  —  —  —  UDP close request  16#0334   ○ —  —  —  —  TCP open request  16#0335   ○ —  —  —  —  TCP send request  16#0337   ○ —  —  —  —  TCP close request  16#0339   ○ —  —  —  —    ●  Single bus/duplex bus request command  The  single  bus  request  command  and  duplex  bus  request  command  have  different  command  numbers, but their structure is the same.    They will be described together.  ♦  Reset request  ·  Resets the Ethernet module from the user program.  ·  The request command and error status are as follows:    15  0 Requested Ethernet module slot No.  Command (16#0011)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  529    ♦  Remote station verification request  ·  Verifies the existence of the specified station (Equivalent to Ping).  ·  The structure of the request command and the socket No. or error status are as  follows:    ·  Notes on duplex bus Ethernet module: The "Other station confirmed request" is not a  duplex bus request command.    Make the request by specifying the IP address for  both Ethernet A and B systems. Program according to the system request  specification (such as the command is successful if either A or B is successful/the  command is successful if both A and B are successful).    ♦  Socket batch close request  ·  The source controller closes all the opening sockets for the Ethernet module specified  by the requested Ethernet module slot No.    ·  This command is supported by the following versions of S3 Controller.      S3 Controller  Support version  S3PU55/S3PU55/S3PU65 (Single/Duplex)  V02.7J and following versions  S3PU65 (Duplex reliability improvement version)  V03.7E and following versions    ·  The request command structure and error status are as follows:      15  0 Requested Ethernet module slot No.  Command (16#001B)  <Request command>  <Error status>  15  0 =0: Normal completer, ≠0: Error status  15  0 Requested Ethernet module slot No. Command    (16#0014)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  D-IP address  D-IP address  : Destination IP address to be verified Chapter 2    LD/FBD Instructions    6F8C1226  530    ♦  UDP open request  ·  Opens the requested socket.  ·  Communication protocol: UDP/IP      ·  Socket No. is set in STATUS when UDP completes successfully (DONE=ON). This  socket No. is used to obtain the send, receive, close, and EN board control socket  identifier.    15  0 Requested Ethernet module slot No.  Command    (16#0031)/Duplex (16#0231)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 11), error status UDPPort No.  : UDP port No. of the specified source socket (1024 to 65535)  UDPPort No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  531    ♦  UDP send request/broadcast send request  ·  Sends source data using the opened UDP socket.  ·  Number of transferred data words: 1 to 1000      ♦  UDP close request  ·  Ends the opened UDP sockets.    Also cancels receive requests (unlimited wait state).      15  0 Requested Ethernet module slot No.  Command    (16#0034)/Duplex (16#0234)  <Request command>  <Error status>  15  0 0: Normal complete,  ≠0: Error status  Socket No.  :Socket ID (0 to 11) (identifier obtained with UDP open)  Socket No.  15  0 Requested Ethernet module slot No.  Command (16#0032)/Duplex (16#0232)  <Request command>  <Error status>  15  0 =0: Normal complete,  ≠0: Error status  Socket No.  :Socket ID (0 to 11) (identifier obtained with UDP open)  D-IP address  :Destination IP address  Specifying 255.255.255.255 as the destination IP address results in  broadcast send.  D-UDPPort No.  :Destination socket UDP port No.  Socket No.  D-IP address  D-UDPPort No.  Chapter 2    LD/FBD Instructions    6F8C1226  532    ♦  TCP open request  ・ Opens (active/passive) the requested port.  ・ Communication protocol: TCP/IP    ·  Socket  No.  is  set  in  STATUS  when  TCP  completes  successfully  (DONE=ON).  This  socket No. is used to obtain the send, receive, close, and EN board control socket identifier.    ♦  TCP send request  ·  Sends the source data using the opened TCP connection.  ·  Send data word number: 1 to 1000 words    15  0 Requested Ethernet module slot No.  Command (16#0035)/Duplex (16#0235)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 11), error status Type  D-IP address  D-TCPPor tNo.  S-TCPPort No.  TimeCnt  Type    :Open type (1/2)                1=Active open - client                  2=Passive open - server  D-IP address  :Destination IP address (valid only for active open)  D-UDPPort No.  :Destination socket TCP port No. (valid only for active open) S-TCPPort No.  :Source specified socket TCP port No.  TimeCnt  :Receive wait timeout interval (1 to 65535: 0.1 second unit, 0: unlimited)  (valid only for passive open)  15  0 Requested Ethernet module slot No.  Command    (16#0037)/Duplex (16#0237)  <Request command>  <Error status>  15  0 0: Normal complete, ≠0: Error status Socket No.  :Socket ID (0 to 11) (identifier obtained by TCP open)  Socket No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  533    ♦  TCP close request  ·  Ends an opened TCP connection and closes the socket.  ·  Also cancels open/receive requests (unlimited wait state).      ♦  UDP byte send request  ·  Sends source data using the opened UDP socket.  ·  Number of transferred data bytes: 1 to 2000 bytes    15  0 Requested Ethernet module slot No.  Command    (16#0042)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  :Socket ID (0 to 11) (identifier obtained by UDP open)  D-IP address  : Destination IP address      Specifying 255.255.255.255 as the destination IP address results  in broadcast send.  D-UDPPort No.  : Destination socket UDP port No.  Socket No.  D-IP address  D-UDPPort No.  15  0 Requested Ethernet module slot No. Command    (16#0039)/Duplex (16#0239)  <Request command>  <Error status>  15  0 0: Normal complete, ≠0: Error status Socket No.  :Socket ID (0 to 11) (identifier obtained by TCP open)  Socket No.  Chapter 2    LD/FBD Instructions    6F8C1226  534    ♦  TCP byte send request  ·  Sends the source data using the opened TCP connection.  ·  Send data word number: 1 to 2000 bytes    15  0 Requested Ethernet module slot No.    Command    (16#0047)  <Request command>  <Error status>  15  0 0: Normal complete, ≠0: Error status Socket No.  :Socket ID (0 to 11) (identifier obtained by TCP open)  Socket No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  535    ●  EN311 request commands  ♦  Reset request  ·  Resets EN311 from the user program.  ·  The request command structure and error status are as follows:    <Request command>        Error status:        Command (16#0311)  15 0   =0: Normal complete, 0: Error status  15 0 Bus    Requested Ethernet module sl ot No. Unit  Slot  12  8   ·  Error status 16#EC** (-50**) indicates that the error was detected by the CPU module  and 16#B** indicates that it was detected by the EN311 (* is any number).    ♦  Parameter setting request  ·  Sets EN311 parameters for a standy mode EN311 from a user program.  ·  The request command structure and error status are as follows:  <Request command>              S-IP address  :Source IP address  UDPPort No.  :UDP port No. (1024 to 65535)    <Error status>      Command (16#0312)    S-IP address  15 0   =0: Normal complete 0: Error status    UDPPort No.  15 0 Bus  Requested Ethernet module slot No.  Unit  Slot  12  8 Chapter 2    LD/FBD Instructions    6F8C1226  536    ♦  Operation mode control request  ·  Controls the operation of EN311 from the user program.  ·  The request command structure and error status are as follows:  <Request command>          Specified information    Bit13:Changes EN311 from run mode to standby mode.  Bit12:Changes EN311 from standby mode to run mode.  Bit5 :Message transmission 1:Enabled, 0:Disabled  Bit4 :Socket transmission 1:Enabled, 0:Disabled  <Error status>      Command (16#0313)    Specified information 15 0   =0: Normal complete 0: Error status  15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8     ♦  Remote station verification request  ·  Verifies the existence of the specified station (Equivalent to Ping).  ·  The request command structure and error status are as follows:  <Request command>          D-IP address  :Destination IP address to be verified      Error status:      Command (16#0314)    D-IP address  15 0   =0: Normal completion 0: Error status  15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8     ♦  Time setting request  ·  Sets the EN311 internal clock from the user program.  ·  The request command structure and error status are as follows:  <Request command>                <Error status>      Command (16#0318)  Month  15 0   =0: Normal completion 0: Error status  15 0 Bus  Requested Ethernet module slot No.  Unit  Slot  12  8 Year  Hour  Date  Second  Minute    2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  537    ♦  Router IP address setting request  ·  Sets the router IP address of a standby mode EN311 from the user program.  ·  The request command structure and Error status are as follows:  <Request command>            <Error status>      Command (16#0319)    Router IP address  15 0   =0: Normal complete 0: Error status  15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8     ♦  PC link register write request  ·  Writes the data in specified source register into the specified destination register.    15  0 Requested  Ethernet  module  slot  No.  Command (16#0321)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Bus    Slot    Unit    12  8 DRID  Dreg No.  TimeCnt  D-IP address  D-UDPPort No.  DRID    :Destination register type code        (Only register D can be specified when the destination is S3).          0=XW/YW          1=W          2=LW          3=RW          4=D          5=F (0 to 32767)          6=F (0 to 65535)          7=T          8=C          9=SW  DRegNo.  :Destination register No.  TimeCnt  :Timeout interval 1 to 32767 (0.1 second unit) when bit 15=0        Defaults to 30 seconds when bit15=1  D-IP address  : Destination IP address  D-UDPPort No.  : Destination UDP port No.  Chapter 2    LD/FBD Instructions    6F8C1226  538    ♦  UDP open request  ·  Opens the requested socket.  ·  Communication protocol: UDP/IP  <Request command>            Socket No.  :Socket ID (1 to 8)  UDPPort No.  :UDP port No. of the specified source socket (1024 to 65535)    <Socket No. or error status>      Command (16#0331)    Socket no.  15 0   Socket No. , error status  15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8   UDPPort No.      ♦  UDP send request / broadcast send request  ·  Sends source data using the opened UDP socket.  ·  Number of transferred data words:    1 to 1000 words    15  0 Requested Ethernet module slot No.  Command (16#0332)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Bus    Slot    Unit    12  8 Socket No.  D-UDPPort No.  Socket No.  : Socket ID (1 to 8)  D-IP address  :Destination IP address  Specifying 255.255.255.255 as the destination IP address results in  broadcast send.  D-UDPPort No.  : Destination socket UDP port No.  D-IP address  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  539    ♦  UDP close request  ·  Ends the opened UDP sockets.    Also cancels receive requests (unlimited wait state).      ♦  TCP open request  ·  Opens (active/passive) the requested port.  ·  Communication protocol: TCP/IP  <Request command>                      Socket No.  :Socket ID (1 to 8)  Type    :Open type (1/2)            1=Active open - client            2=Passive open - server  D-IP address  :Destination IP address  D-TCPPortNo.  :Destination socket TCP port No.  S-TCPPortNo.  :Source specified socket TCP port No.  TimeCnt  :Receive wait timeout interval (1 to 65535: 0.1 second unit, 0: unlimited) Socket No. or error status:    Command (16#0335)    Socket No.  15 0 Socket No. ( 1 to 8), error status  15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8   Type    S-TCPPortNo.  D-TCPPortNo.    D-IP address    TimeCnt      15  0 Requested  Ethernet  module  slot  No. Command    (16#0334)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Bus    Slot    Unit    12  8 Socket No. (1 to 8)  Socket No.  : Socket ID (1 to 8)  Chapter 2    LD/FBD Instructions    6F8C1226  540    ♦  TCP send request  ·  Sends the source data using the opened TCP connection.  ·  Send data word number: 1 to 1000 words  <Request command>          Socket No.  :Socket ID (1 to 8)    <Error status>      Command (16#0337)    Socket No.  15 0 15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8     ♦  TCP close request  ·  Ends an opened TCP connection and closes the socket.  ·  Also cancels open/receive requests (unlimited wait state).  <Request command>          Socket No.  :Socket ID (1 to 8)    < Error status>      Command (16#0339)    Socket No.  15 0 15 0 Bus  Requested Ethernet module slot No. Unit Slot 12  8     =0 : Normal complete, ≠0 : Error status   =0 : Normal complete, ≠0 : Error status 2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  541    ●  Program example  [LD/FBD language notation]  SIGNAL1 1  LD  USEND_T  SIGNAL2   ST  REQ  SAMPLE1   LD  SAMPLE2   LD  SAMPLE3 50  LD  CMD  P  N  Request command SAMPLE1  2  16#0031  8080  Slot No.  UDP open request  Source station UDP port No. DONE  ERROR  STATUS SIGNAL3   ST  SAMPLE5   ST  USEND_T_1      [ST language notation]  USEND_T_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SIGNAL2 := USEND_T_1.DONE;  SIGNAL3 := USEND_T_1.ERROR;  SAMPLE5 := USEND_T_1.STATUS;    ·  The request command (slot No.=2, Command=16#0031, Source UDP port No.=8080)  is specified with SAMPLE1.  ·  UDP open request specified with the request command is made at the rise of  SIGNAL1 from FALSE(OFF) to TRUE(ON).  ·  When UDP open completes normally, the completion output SIGNAL2 is kept  TRUE(ON) for one scan time.    The socket ID is stored in status output SAMPLE5.  ·  When UDP open is unsuccessful, the error output SIGNAL3 is kept TRUE(ON) for one  scan time.    The error status is stored in status output SAMPLE5.    Chapter 2    LD/FBD Instructions    6F8C1226  542    Socket Communication Send   Communication  Socket Communication Send  nv dedicated  instruction  LD/FBD language  notation      Completion output Request  command Send  data  word  no. Send  data Execution  request USEND_N  Error    Socket no. or error  status  Instance name ERROR  STATUS  DONE  CMD N  P  REQ  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( REQ, CMD, P, N );  [Variable name]:= @[Instance name]. DONE;  [Variable name]:= @[Instance name]. ERROR;  [Variable name]:= @[Instance name]. STATUS;    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid range  REQ  BOOL  ○   Execution request    CMD  PTR  —  Request command    P  PTR  —  Send data    EN8**send data word No.    (for word send command)  1 to1000 words  EN8**send data bytes No.    (for bytes send command)  1 to 2000 bytes  EN9**send data word No.    (for word send command)  1 to 700 words  Input  N  UINT  ○   EN9**send data bytes No.  (for bytes send command)  1 to 1400 bytes  DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error      Output  STATUS  INT  —  Socket No. or error status      2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  543    ·  Request command data structure      ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion output    ERROR  BOOL  Error    STATUS  INT  Socket No. or error status Can be accessed from the user  program.  TIMECNT DINT  Time count  RESERVE DWORD  Reserved    Cannot be accessed from the  user program.    ●  Restrictions    Unified Controller nv series  Item    type1  type2    Ethernet modules/stations  4  EN8**  48 (Max.48/controller)  Sockets /Ethernet  modules (Note)  EN9**  12 (Max.48/controller)  Single bus  Yes  Yes    TCP/IP  Duplex bus  No  Yes    Single bus  Yes  Yes    Protocol    UDP/IP  Duplex bus  No  Yes    EN8**  For word send command: 1000 words  For byte send command: 2000 bytes  Transmission text  size/socket  EN9**  For word send command: 700 words  For byte send command:1400 bytes  EN9** support  Yes  No      (Note)  The total number of sockets using multiple Ethernets modules (e.g. EN8 and EN9) are  max.48/Controller.    <EN8**>  <EN9**>  15  0 Requested Ethernet module slot No.  Socket service command  Request parameter  15 0 ID code (16#F001)  Socket service command  Requested Ethernet module  Basic unit slot/node/unit/slot  Request parameter  <Requested Ethernet module  Basic unit slot/node/unit/slot>  15  0 Unit    8  7  Slot    Basic unit slot  Node    Chapter 2    LD/FBD Instructions    6F8C1226  544    ●  Function  ·  This is a function block for the Unified Controller nv series that communicates with  TCP/IP or UDP/IP protocol using the Ethernet module.  ·  When execution request REQ changes from FALSE(OFF) to TRUE(ON), N words  starting from send data P are sent with the content of the specified request command  CMD.  The send data word number varies depending on the Ethernet module.  For EN8**word send command, send data word number is 1 to 1000 words.    For byte  send command, it is one to 2000 bytes.  ·  For EN9**word send command, send data word number is 1 to 700 words.    For byte  send command, it is 1 to 1400 bytes.  ·  When transfer is completed normally, completion output DONE becomes TRUE(ON)  for one scanning time.  ·  When it is completed with an error, error ERROR becomes TRUE(ON) for one  scanning time.  · When transfer is completed with or without an error, the details are output to socket No.  or error status STATUS.  ·  The instruction completes normally (DONE=ON) starting from the second scan after  execution request (REQ=ON). Therefore, depending on how the control cycle is set  and application program is created, it may take several seconds before normal  completion.  ·  Direct I/O variable cannot be specified for send data.  ·  The request commands vary depending on the Ethernet module.    The request  commands are described below.    Also, a list of error status codes is included after the  URCV_N instruction    (Error Status Code List).  ·  Notes on using this communication function block instruction in a duplex system are  included after the Error Status Code List (Notes for duplex system).  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  545    ●  Ethernet module type and request command type:    Type  Module installation  location  Bus type Module name  Request command type*  Single    EN811  Single bus request command  Main unit  Duplex    —  Single bus request command and  duplex bus request command  type1  TC-net I/O unit  Single    EN911  EN911 request command  Single  EN811  Single bus request command  type2  Main unit  Duplex    FN812  Single bus request command and  duplex bus request command   Notes on request command type  ·  Both the single bus request command and duplex bus request command may be used  for duplex bus (FN812), but the duplex bus request command cannot be used for  single bus (EN811). Be sure to use a single bus request command.  ·  When the destination is single bus, use a single bus request command even if the  source Ethernet module is duplex bus.    ●  Single bus request command  ○ : Available —: Unavailable  Command description  Command  type1 type2    Reset request  16#0011  ○   ○     Other station confirmed request  16#0014  ○   ○     UDP open request  16#0031  ○   ○     UDP send request/broadcast  16#0032  ○   ○     UDP close request  16#0034  ○   ○     TCP open request  16#0035  ○   ○     TCP send request  16#0037  ○   ○     TCP close request  16#0039  ○   ○     UDP byte send request  16#0042  ○   ○     TCP byte send request  16#0047  ○   ○       ●  Duplex bus request command (In development)  ○ : Available /—: Unavailable  Command description  Command  type1 type2    UDP open request  16#0231  —  ○     UDP send request/broadcast  16#0232  —  ○     UDP close request  16#0234  —  ○     TCP open request  16#0235  —  ○     TCP send request  16#0237  —  ○     TCP close request  16#0239  —  ○     Chapter 2    LD/FBD Instructions    6F8C1226  546    ●  EN911 request command  ○ : Available / — : Unavailable  Command description  Command  type1 type2    Reset request  16#0911  ○   —    Other station confirmed request  16#0914  ○   —    UDP open request  16#0931  ○   —    UDP send request/broadcast  16#0932  ○   —    UDP close request  16#0934  ○   —    TCP open request  16#0935  ○   —    TCP send request  16#0937  ○   —    TCP close request  16#0939  ○   —    UDP byte send request  16#0942  ○   —    TCP byte send request  16#0947  ○   —      ●  Single bus/duplex bus request command  The  single  bus  request  command  and  duplex  bus  request  command  have  different  command numbers, but their structure is the same.    They will be described together.    ♦  Reset request  ·  Resets the Ethernet module from the user program.  ·  The request command and Error status are as follows:      15  0 Requested Ethernet module slot No.  Command    (16#0011)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  547    ♦  Other station confirmed request  ·  Verifies the existence of the specified other station (Equivalent to Ping).  ·  The request command and Error status are as follows.    ·  Notes on duplex bus Ethernet module: The "Other station confirmed request" is not a  duplex bus request command.    Make the request by specifying the IP address for  both Ethernet A and B systems. Program according to the system request  specification (such as the command is successful if either A or B is successful/the  command is successful if both A and B are successful).    ♦  UDP open request  ·  Opens the requested socket.  ·  Communication protocol: UDP/IP      ·  Socket  No.  is  set  in  STATUS  when  UDP  completes  successfully  (DONE=ON).  This  socket  No.  is  used  to  obtain  the  send,  receive,  close,  and  EN  board  control  socket  identifier.  15  0 Requested Ethernet module slot No.  Command    (16#0031)/Duplex (16#0231)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to47), error status UDPPort No.  : UDP port No of the specified source socket    (1024 to 65535)  UDPPort No.  15  0 Requested Ethernet module slot No. Command    (16#0014)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  D-IP address  D-IP address  : Destination IP address to be verified. Chapter 2    LD/FBD Instructions    6F8C1226  548    ♦  UDP send request/broadcast send request  ·  Sends source data using the opened UDP socket.  ·  Number of transferred data words: 1 to 1000 words.      ♦  UDP close request  ·  Ends the opened UDP sockets.    Also cancels receive requests (unlimited wait state).    15  0 Requested Ethernet module slot No. Command    (16#0034)/Duplex (16#0234)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID(0 to 47)          (identifier obtained by UDP open)  Socket No.  15  0 Requested Ethernet module slot No.  Command    (16#0032)/Duplex (16#0232)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47) (identifier obtained with UDP open)  Destination IP address: Destination IP address  Specifying 255.255.255.255 as the destination IP address results  in broadcast send.  D-UDPPort No.  : Destination socket UDP port No.    Socket No.  D-IP address  D-UDPPort No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  549    ♦  TCP open request  ·  Opens (active/passive) the requested port.  ·  Communication protocol: TCP/IP    ·  Socket No. is set in STATUS when TCP completes successfully (DONE=ON). This  Socket No. is used to obtain the send, receive, close, and EN board control socket  identifier.    ♦  TCP send request  ·  Sends the source data using the opened TCP connection.  ·  Send data word number: 1 to 1000 words    15  0 Requested Ethernet module slot No.  Command    (16#0037)/Duplex (16#0237)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47)          (identifier obtained by TCP open)  Socket No.  15  0 Requested Ethernet module slot No.  Command    (16#0035)/Duplex (16#0235)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 47), error status Type  D-IP address  D-TCPPort No.  S-TCPPort No.  TimeCnt  Type  : Open type (1/2)  1= Active open - client  2= Passive open - server  D-IP address  : Destination IP address (valid only for active open)  D-TCPPort No.  : Destination socket TCP port no. (valid only for active open)  S-TCPPort No.  : Source specified socket TCP port No.  TimeCnt  : Receive wait timeout interval (1 to 65535: 0.1 second unit, 0:  unlimited)    (valid only for passive open)  Chapter 2    LD/FBD Instructions    6F8C1226  550    ♦  TCP close request  ·  Ends an opened TCP connection and closes the socket.  ·  Also cancels open/receive requests (unlimited wait state).      ♦  UDP byte send request  ·  Sends source data using the opened UDP socket.  ·  Number of transferred data bytes: 1 to 2000 bytes    15  0 Requested Ethernet module slot No.  Command    (16#0042)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47)        (identifier obtained by UDP open)  D-IP address  : Destination IP address    Specifying  255.255.255.255  as  the  destination  IP  address  results  in broadcast send.  D-UDPPort No.  : Destination socket UDP port No.    Socket No.  D-IP address  D-UDPPort No.  15  0 Requested Ethernet module slot No.  Command    (16#0039)/Duplex (16#0239)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47)          (identifier obtained by TCP open)  Socket No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  551    ♦  TCP byte send request  ·  Sends the source data using the opened TCP connection.  ·  Send data word number: 1 to 2000 bytes    15  0 Requested Ethernet module slot No.  Command    (16#0047)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47)        (identifier obtained by TCP open)  Socket No.  Chapter 2    LD/FBD Instructions    6F8C1226  552    ●  EN911 request command  EN911 request command differs from the EN8** in the request command format. There  is  an  identification  code  (16#F001)  at  the  top  of  the  request  command.  The  specified  format  (2  words)  of  the  requested  Ethernet  module  is  also  different.  The  contents  following the command are the same although the numbers are different.      ♦  Reset request  ·  Resets the Ethernet module from the user program. The reset request is valid then  EN9**, which issues the reset request, is specified for I/O fallback.    ·  The request command structure and error status are as follows:      ♦  Other station confirmed request  ·  Verifies the existence of the specified other station. (Equivalent to Ping)  ·  The request command and error status are as follows:    15  0 ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status D-IP address  : Destination IP address to be verified  Command    (16#0914)  D-IP address  15  0 ID code (16#F001)  Command    (16#0911)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status 2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  553    ♦  UDP open request  ·  Opens requested sockets.  ·  Communication protocol: UDP/IP    ·  Socket No. is set in STATUS when UDP completes successfully (DONE=ON). This  socket No. is used to obtain the send, receive, close and EN board control socket  identifier.      ♦  UDP send request/broadcast send request  ·  Sends source data using the opened UDP socket.    ·  Number of transferred data words: 1 to 700 words    15  0 ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47) (identifier obtained by UDP open)  D-IP address  : Destination IP address  Specifying 255.255.255.255 as the destination IP address results  in broadcast send.  D-UDPPort No.  : Destination socket UDP port No.    Socket No.  Command    (16#0932)  D-IP address  D-UDPPort No.  15  0 ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 47), error status UDPPort No.  : UDP port No. of the specified source socket (1024 to 65535)  Command    (16#0931)  UDPPort No.  Chapter 2    LD/FBD Instructions    6F8C1226  554    ♦  UDP close request  ·  Ends the opened UDP sockets. Also cancels receive request (unlimited wait state).        ♦  TCP open request  ·  Opens (active/passive) the requested port. ,  ·  Communication protocol: TCP/IP    ·  Socket No. is set in STATUS when TCP completes successfully (DONE=ON). This  socket No. is used to obtain the send, receive, close and En board control socket  identifier.    15  0 ID code (16#F001)  Command    (16#0935)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 47), error status Type  D-IP address  D-TCPPort No.  S-TCPPort No.  TimeCnt  Type  :    Open type (1/2)  1= Active open - client  2= Passive open - server  D-IP address  :    Destination IP address (valid only for active open)  D-TCPPort No. :    Destination socket TCP port no. (valid only for active open)  S-TCPPort No. :    Source specified socket TCP port No.  TimeCnt  :    Receive  wait  timeout  interval  (1  to  65535:  0.1  second  unit,  0:  unlimited)  (valid only for passive open)  15  0 ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47) (identifier obtained by UDP open)  Command    (16#0934)  Socket No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  555    ♦  TCP send request  ·  Sends the source data using the opened TCP connection.    ·  Send data word number: 1 to 700 words      ♦  TCP close request  ·  Ends an opened TCP connection and closes the socket.    ·  Also cancels open/receive requests (unlimited wait state).    15  0 ID code (16#F001)  Command    (16#0939)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47) (identifier obtained by TCP open)  Socket No.  15  0 ID code (16#F001)  Command    (16#0937)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47) (identifier obtained by TCP open)  Socket No.  Chapter 2    LD/FBD Instructions    6F8C1226  556    ♦  UDP byte send request  ·  Sends source data using the opened UDP socket.    ·  Number of transferred data bytes: 1 to 1400 bytes      ♦  TCP byte send request  ·  Sends the source data using the opened TCP connection.  ·  Send data word number: 1 to 1400 bytes      15  0 ID code (16#F001)  Command    (16#0947)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 47) (identifier obtained by TCP open)  Socket No.  15  0 ID code (16#F001)  Command    (16#0942)  Requested Ethernet module  Basic unit slot/node/unit/slot  <Request command>  <Error status>  15  0 =0: Normal complete,  ≠0: Error status  Socket no.  : Socket ID (0 to 47)  (identifier obtained by UDP open)  D-IP address  : Destination IP address    Specifying  255.255.255.255  as  the  destination  IP  address  results  in broadcast send.  D-UDPPort No.  : Destination socket UDP port No.  Socket No.  D-IP address  D-UDPPortn No.  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  557    ●  Program example  [LD/FBD language notation]        [ST language notation]  USEND_N_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SIGNAL2 := @USEND_N_1.DONE;  SIGNAL3 := @USEND_N_1.ERROR;  SAMPLE4 := @USEND_N_1.STATUS;    ·  The request command (slot No.=2, Command=16#0031, Source UDP port No.=5000)  is specified with SAMPLE1.  ·  UDP open request specified with the request command is made at the rise of  SIGNAL1 from FALSE(OFF) to TRUE(ON).  ·  When UDP open completes normally, the completion output SIGNAL2 is kept  TRUE(ON) for one scan time.    The socket ID is stored in status output SAMPLE4.  ·  When UDP open is unsuccessful, the error output SIGNAL3 is kept TRUE(ON) for one  scan time.    The error status is stored in status output SAMPLE4.    ●  Error information  ·  When the specified range of the send data exceeds the area, the socket  communication send is not processed and the data boundary is exceeded.    ·  The following operation is performed when direct I/O variable is specified for the send  data:      Controller  Action  Unified Controller nv series  Socket communication send is not executed.    Error flag and table operation error flag are set to  TRUE(ON).    USEND_N REQ CMD P N DONE ERROR STATUS SAMPLE1  LD SIGNAL1 SAMPLE2  LD SAMPLE3  0 LD SIGNAL2 SIGNAL3 SAMPLE4 ST Request command  SAMPLE1 16#0031 5000 Slot No.  UDP open request Source station UDP port No. 2 USEND_N_1 Chapter 2    LD/FBD Instructions    6F8C1226  558    Socket Communication Receive   Communication  Socket Communication Receive  V dedicated  instruction  LD/FBD language  notation  Completion output  Request command Receive data word count Receive data Execution request URCV_T    REQ        DONE     CMD    ERROR     P          STATUS     N  Error  Status  Instance name  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( REQ, CMD, P, N );  [Variable name]:=[Instance name]. DONE;  [Variable name]:=[Instance name]. ERROR;  [Variable name]:=[Instance name]. STATUS;    ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range  REQ  BOOL  ○   Execution request    CMD  PTR  —  Request command    P  PTR  —  Receive data    Receive data word No.  (for word receive command)  1 to 1001 words Input  N  UINT  ○   Receive data byte No.  (for byte receive command)  2 to 2002 bytes DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error      Output  STATUS  INT  —  Status    ·  Request command data structure      ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion output ERROR  BOOL  Error    STATUS  INT  Status    Can be accessed from the user program.    TIMECNT DINT  Time count  RESERVE DWORD  Reserved    Cannot be accessed from the user program. 15  0 Requested Ethernet module slot No.  Socket service command  Request parameter    (See below for details)  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  559    ●  Restrictions    Item    S3  S2  L3  L2  L1  Ethernet modules/stations  4  1  Sockets/Ethernet modules  12  Single bus  Yes  Yes  Yes  Yes  Yes  TCP/IP  Duplex bus  No  No  Yes  Yes  No  Single bus  Yes  Yes  Yes  Yes  Yes  Protocol  UDP/IP  Duplex bus  Yes  Yes  Yes  Yes  No  Transferred text size/sockets  For word receive command: 1001 words  For byte receive command: 2002 bytes    ●  Function  ·  This is a function block for Integrated Controller V series that communicates with  TCP/IP or UDP/IP procedure using the Ethernet module.  ·  When the Execution request REQ changes from FALSE(OFF) to TRUE(ON), N words  starting from Receive data P are received with the content of the specified Receive  command CMD.  ·  Word receive command: receive data word number may be from 1 to 1001 words,  byte receive command: receive data byte number may be from 2 to 2002.    ·  When data receive completes, Completion output DONE is kept to TRUE(ON) for one  scan time.  ·  If an error occurs, ERROR is kept to TRUE(ON) for one scan time.  ·  The detail status is output to STATUS when receive completes normally or abnormally.  ·  The instruction completes successfully (DONE=ON) starting from the second scan  after execution request (REQ=ON). Therefore, depending on how the control cycle is  set and application program is created, it may take several seconds before normal  completion.    ·  Request commands differ by the Ethernet module. Each request command is  described from the following pages. Also, a list of error status codes is included after  the URCV_T instruction (Error Status Code List).  ·  Notes on using this communication function block instruction in a duplex system are  included after the Error Status Code List (Notes for duplex system).    Chapter 2    LD/FBD Instructions    6F8C1226  560    ●  Ethernet module type and request command type    Model  Module installation  location  Bus type Module name  Request command type*  Single    EN711,EN731,EN751*  Single bus request command  Main unit  Duplex    EN721,EN741,EN761  FN711*  Single bus request command and  duplex bus request command  3000  Parallel I/O unit  Single    EN311  EN311 request command  Single    EN611, EN631, EN651* Single bus request command  2000  Main unit  Duplex    EN621/EB621,    EN641/EB641, EN661  FN611  Single bus request command and  duplex bus request command  1000  Main unit  Single    EN531*  Single bus request command  ·  Notes on request command type  ·  Both the “single bus request command” and “duplex bus request command” may be  used for duplex bus (EN721, EN741, EN761, FN711*, EN621/EB621, EN641/EB641,  EN661, FN611), but the “duplex bus request command” cannot be used for single bus  (EN711, EN731, EN751, EN611, EN631, EN651*, EN531*). Be sure to use a “single  bus request command”.  ·  When the destination is single bus, use a “single bus request command” even if the  source Ethernet module is duplex bus.    ●  Single bus request command  ○ : Available/—: Unavailable  Command description  Command  S3 S2 L3  L2  L1 Get EN board management socket  identifier  16#0016  ○   ○   ○   ○   ○ En board management socket number  acquisition request    16#001A  ○ —  —  —  —  UDP receive request/broadcast  16#0033  ○   ○   ○   ○   ○ TCP receive request  16#0038  ○   ○   ○   ○   ○ UDP byte receive request  16#0043  ○   ○ —  —  —  TCP byte receive request  16#0048  ○   ○ —  —  —    ●  Duplex bus request command  ○ : Available/—: Unavailable  Command description  Command  S3 S2 L3  L2  L1 UDP receive request/broadcast  16#0233  ○   ○   ○   ○   —  TCP receive request  16#0238  —  —  ○   ○   —    ●  EN311 request command  Command description  Command  S3 S2 L3  L2  L1 RAS information read  16#0315  ○ —  —  —  —  PC link (register read request)  16#0321  ○ —  —  —  —  UDP receive request/broadcast  16#0333  ○ —  —  —  —  TCP receive request  16#0338  ○ —  —  —  —  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  561    ●  Single bus/duplex bus request command  The  single  bus  request  command  and  duplex  bus  request  command  have  different  command numbers, but their structure is the same.    They will be described together.    ♦  EN board management socket identifier acquisition  ·  This command is used to refer detailed information of Ethernet module sockets.    ·  En board management socket identifier is obtained from opened socket identifier.    ·  The request command structure and error status are as follows:    ·  The socket No. obtained by UDP/TCP open command is a number controlled by the  communication function block instruction and is different from the real socket No.  obtained by the Ethernet module. Send, receive, or close can be performed using the  socket No. obtained with an open command. However, the detailed information for  each socket controlled by Ethernet module cannot be accessed. Therefore, use this  command to obtain the socket No. controlled by the Ethernet module and access the  socket information using that value as offset.  The information for each socket controlled by the Ethernet module is available as  station global. Register a station global variable or use direct instruction word notation  (%MW13.offset address) to access it from the user application program.  The information for each socket is organized as follows:    15  0 Requested Ethernet module slot No.  Command    (16#0016)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 63), error status Socket No.  : Socket ID (0 to11) (identifier obtained by UDP open)  Socket No.  Chapter 2    LD/FBD Instructions    6F8C1226  562    ·  Ethernet module detailed information for each socket    Overall structure:    Socket 0  Socket 1  :  Socket 63  Socket information  for single bus request  command  (1 word x 64 sockets)  TCP F UDP E AOP D POP C CON B RCV A RCL  9 Reserved  8  0 The structure of each slot is the same.  Socket 0  Socket 1  :  Socket 63  Socket information  for single bus request  command  (1 word x 64 sockets)    Top offset  address +64    Bit description:    Name Description  Set condition  Reset condition  TCP  Using TCP  During TCP open  During socket close request UDP  Using UDP  During UDP open  During socket close request AOP  Active open  During TCP active open  During socket close request POP  Passive open  During TCP passive open During socket close request CON  Connecting  During TCP connection  During socket close request  or when RCL is ON  RCV  Receive data  When there is receive data No receive data  RCL  Disconnected  When closed by opposite  party when connecting  During socket close request   2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  563    Top offset address:    Model  Slot    Top offset address  0  130944  1  655232  2  1179520  3  1703808  4  2228096  5  2752384  6  3276672  2000/3000  7  3800960  1000  1  65280    (Ex.) Socket 4 information of single bus request command installed in slot 3 for model 3000    Direct notation  %MW13.1703811  LD  ――  ST  Variable declaration  SOCKET_INF3 [4]  LD  ――  ST    Station variables (Slot3)    Variable    Data type  Word No. Bit No.  SOCKET_INF3  Array[0..63] OF WORD  1703808  0    ♦  EN board management socket number acquisition request  ·  The number of socket information for the source Controller, which is managed by  Ethernet module specified by the requested Ethernet module slot No. is obtained.    ·  This command is supported by the versions after S3 Controller.  S3Controller  Support version  S3PU55/S3PU55/S3PU65 (Single/Duplex)  V02.7J and following versions  S3PU65 (Duplex reliability improvement version)  V03.7E and following versions  ·  The request command structure and error status are as follows:    15  0 Requested Ethernet module slot No.  Command    (16#001A)  <Request command>  <Status>  15  0 Management socket No.    Chapter 2    LD/FBD Instructions    6F8C1226  564    ♦  UDP receive request/broadcast receive request  ·  Receives data from opened UDP socket.  ·  Receive data word number: 1 to 1001 (number of words including the received bytes  (1W))      ♦  TCP receive request  ·  Receives data from opened TCP socket.  ·  Receive data word number: 1 to 1001 words (number of words including the received  bytes (1W))      15  0 Requested Ethernet module slot No.  Command    (16#0038)/Duplex (16#0238)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  :Socket ID (0 to 11) (identifier obtained by TCP open)  TimeCnt  :Receive  wait  timeout  interval  (1  to  65535:  0.1  second  unit,  0: unlimited)  Socket No.  TimeCnt  15  0 Requested Ethernet module slot No.  Command    (16#0033)/Duplex (16#0233)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  :  Socket ID (0 to 11) (identifier obtained by UDP open)  D-IP address  :  Source IP address      Specifying 0.0.0.0 as the source IP address results in broadcast  receive.  D-UDPPort No.  : Source socket UDP port No.      Do not check the source port when the command is duplex  (16#0233) or UDP port No. is "0".  TimeCnt  : Receive wait timeout interval (1 to 65535: 0.1 second unit, 0:  unlimited)  Socket No.  D-IP address  D-UDPPort No.  TimeCnt  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  565    ♦  UDP byte receive request  · Receives data from opened UDP socket.    · Receive data word number:  2 to 2002 bytes (including the storage area for receive  byte count (2 bytes))      ♦  TCP byte receive request  ·  Receives data from opened TCP socket.    ·  Receive data word number: 2 to 2002 bytes (including the storage area for receive  byte count (2 bytes))      15  0 Requested Ethernet module slot No.  Command (16#0048)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to 11) (identifier obtained by TCP open)  TimeCnt  : Receive wait time out interval (1 to 65535: 0.1 sec. unit, 0: unlimited) Socket No.  TimeCnt  15  0 Requested Ethernet module slot No.  Command    (16#0043)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  : Socket ID (0 to11) (identifier obtained by UDP open)  D-IP address  : Source IP address      Specifying  0.0.0.0  as  the  source  IP  address  results  in  broadcast  receive.  D-UDPPort No.  : Source socket UDP port No.    TimeCnt  : Receive wait time out interval (1 to 65535: 0.1 sec. unit, 0: unlimited) Socket No.  D-IP address  D-UDPPort No.  TimeCnt  Chapter 2    LD/FBD Instructions    6F8C1226  566    ●  EN311 request command  ♦  Read RAS information request  ·  Reads EN311 RAS information (internal error information and event log) from the user  program.  ·  The request command structure and Error status are as follows:    ·  Error status 16#EC** (-50**) indicates that the error was detected by the CPU module  and 16#B** indicates that it was detected by the EN311 (* is any number).    15  0 Command    (16#0315)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  RAS request type  :Specify the type of RAS information to be read.  1=RAS counter  2=MIB information  3=Maintenance data (this data cannot be used)  4=Event trace information  5=RAS information area  Start position  : Valid only when the read request type is 2 (MIB  information) or 4 (trace information).        MIB information        0=MIB_IF        1=MIB_IP        2=MIB_TCP        3=MIB_UDP        4=MIB_ICMP  Trace information  :  Read position (0 to 160), 0 is the latest information  Read number  :  Valid only when the read request type is 4 (event trace  information).             1 to 30.  RAS request type  Start position    Read number  Requested Ethernet module slot No. Bus  Slot    Unit    2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  567    ♦  PC link register read request  ·  Reads the data in the specified destination register to the specified source register.      15  0 Requested Ethernet module slot No. Command    (16#0321)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Bus    Slot    Unit    12  8 DRID  Dreg No.  TimeCnt  D-IP address  D-UDPPort No.  DRID  : Destination register type code    (Only register D/SW can be specified when the destination is S3.) 0=XW/YW  1=W  2=LW  3=RW  4=D  5=F (0 to 32767)  6=F (0 to 65535)  7=T  8=C  9=SW  Dreg No  : Destination register No.  TimeCnt  : Time out interval 1 to 32767 (0.1 second unit) when bit 15=0      Defaults to 30 seconds when bit15=1  D-IP address  : Destination IP address  D-UDPPort No.  : Destination UDP port No.  Chapter 2    LD/FBD Instructions    6F8C1226  568    ♦  UDP receive request/broadcast receive request  ·  Receives data from opened UDP socket.  ·  Receive data word number: 1 to 1001 words (number of words including the received  bytes (1W))      ♦  TCP receive request  ·  Receives data from opened TCP socket.  ·  Receive data word number: 1 to 1001 words (number of words including the received  bytes (1W))      15  0 Requested Ethernet module slot No Command    (16#0338)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Bus    Slot    Unit    12  8 Socket No.  Socket No.  :  Socket ID (1 to 8)  TimeCnt  :  Receive timeout interval (1 to 65535: 0.1 second unit, 0: unlimited)  TimeCnt  15  0 Requested Ethernet module slot No. Command    (16#0333)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Bus    Slot    Unit    12  8 Socket No.  D-UDPPort No.  Socket No.  : Socket ID (1 to 8)  D-IP address  : Source IP address      Specifying 0.0.0.0 as the source IP address results in broadcast receive. D-UDPPort No.  : Source socket UDP port no.  TimeCnt  : Receive wait timeout interval (1 to 65535: 0.1 second unit, 0: unlimited) D-IP address  TimeCnt  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  569    ●  Program example  [LD/FBD language notation]      SIGNAL1  1  LD  URCV_T  SIGNAL2   ST  REQ  SAMPLE1    LD  SAMPLE2    LD  SAMPLE3  50  LD  CMD  P  N  Request command SAMPLE1  2  16#0033  11 Slot No.  UDP receive request UDP socket No.  DONE ERROR STATUS SIGNAL3   ST  SAMPLE5   ST  16#12_34_56_78  8080 300  Send source IP address Send source target socket UDP No.  Receive wait timeout  URCV_T_1      [ST language notation]  URCV_T_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SIGNAL2 := URCV_T_1.DONE;  SIGNAL3 := URCV_T_1.ERROR;  SAMPLE5 := URCV_T_1.STATUS;    ·  The request command (Slot No.=2, Command=16#0033, UDP socket No.=11, Source  IP address=16#12_34_56_78, Source socket UDP No.=8080, Receive timeout  inteval=30 seconds) is specified with SAMPLE1.  ·  UDP receive request specified with the request command is made at the rise of  SIGNAL1 from FALSE(OFF) to TRUE(ON).  ·  When UDP receive completes normally, the completion output SIGNAL2 is kept  TRUE(ON) for one scan time. "0" is stored in status output SAMPLE5.  ·  When UDP receive request is unsuccessful, the error output SIGNAL3 is kept  TRUE(ON) for one scan time.    The error status is stored in status output SAMPLE5.  Chapter 2    LD/FBD Instructions    6F8C1226  570    Socket Communication Receive   Communication  Socket Communication Receive  nv dedicated  instruction  LD/FBD language  notation      Completion  output  URCV_N  Error  Status  Instance name  CMD N  P  REQ  ERROR STATUS DONE Execution request Request command Receive data Receive data word  count   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( REQ, CMD, P, N );  [Variable name]:= @[Instance name]. DONE;  [Variable name]:= @[Instance name]. ERROR;  [Variable name]:= @[Instance name]. STATUS;    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid range  REQ  BOOL  ○   Execution request    CMD  PTR  —  Request command    P  PTR  —  Receive data    EN8**receive data word No.  (For word receive command)  1 to 1001 words EN8** receive data word No.  (For word receive command)  2 to 2002 bytes EN9** receive data word No.  (For word receive command)  1 to 701  Input  N  UINT  ○   EN9** receive data word No.  (For word receive command)  2 to 1402 bytes DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error      Output  STATUS  INT  —  Status        2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  571    ・ Request command data structure      ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion  output  ERROR  BOOL  Error  STATUS  INT  Status  Can be accessed from the user program. TIMECNT DINT  Time count  RESERVE DWORD  Reserved  Cannot be accessed from the user  program.    ●  Restrictions    Item    type1  type2    Ethernet modules/stations  4  EN8**  48 (Max.48/Controller)  Sockets /Ethernet  modules (Note)  EN9**  12 (Max.48/Controller)  Single bus  Yes  Yes    TCP/IP  Duplex bus  No  No    Single bus  Yes  Yes    Protocol    UDP/IP  Duplex bus  No  Yes    EN8**  For word receive command:1001 words  For byte receive command:2002 bytes  Transferred text  size/sockets  EN9**  For word receive command:701 words  For byte receive command:1402 bytes  EN9** support  Yes  No    (Note)  The  total  number  of  sockets  using  multiple  Ethernets  modules  (e.g.  EN8**  and  EN9**) are max.48/Controller.    <EN8**>  <EN9**>  15  0 Requested Ethernet module slot No.  Socket service command  Request parameter  15 0 ID code (16#F001)  Socket service command  Requested Ethernet module  Basic unit slot/node/unit/slot  Request parameter  <Requested Ethernet module    Basic unit slot/node/unit/slot>  15  0 Unit    8  7  Slot    Basic unit slot  Node    Chapter 2    LD/FBD Instructions    6F8C1226  572    ●  Function  ·  This is a function block that communicates with TCP/IP or UDP/IP procedure using the  Ethernet module.  ·  When execution request REQ changes from FALSE(OFF) to TRUR(ON), N words  starting from receive data P are received with the content of the specified request  command CMD.  ·  Receive data word numbers differ by the Ethernet modules. For EN8** word receive  command, receive data number is 1 to 1001 words and for byte receive command,  receive data byte number is 2 to 2002 bytes.    ·  For EN9** word receive command, receive data word number is 1 to 701 words and  for byte receive command, receive byte number is 2 to 1402.    ·  When receive is completed normally, completion output DONE becomes TRUE(ON)  for one scanning time.  ·  When it is completed with an error, error ERROR becomes TRUE(ON) for one  scanning time.  ·  When receive is completed with or without an error, the details are output to status  STATUS.  ·  The instruction completes successfully (DONE=ON) starting from the second scan  after execution request (REQ=ON). Therefore, depending on how the control cycle is  set and application program is created, it may take several seconds before normal  completion.  ·  Direct I/O variable cannot be specified for receive data.  ·  The request commands and error codes vary depending on the Ethernet module.      2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  573    ●  Ethernet module type and request command type    Type  Module installation  location  Bus type Module name Request command type *  Single  EN811  Single bus request command  Main unit  Duplex  —  Single bus request command and  duplex bus request command  type1  TC-net I/O unit  Single    EN911  EN911 request command  Single  EN811  Single bus request command  type2  Main unit  Duplex  FN812  Single bus request command and  duplex bus request command   Notes on request command type  ·  Both the single bus request command and duplex bus request command may be used for  duplex bus (FN812), but the duplex bus request command cannot be used for single bus  (EN811). Be sure to use a single bus request command.  ·  When the destination is single bus, use a single bus request command even if the source  Ethernet module is duplex bus.    ●  Single bus request command (In development)    ○ : Available / — : Unavailable  Command description    Command  type1 type2    EN board management socket identifier  acquisition  16#0016  ○   ○     UDP receive request/broadcast  16#0033  ○   ○     TCP receive request  16#0038  ○   ○     UDP byte receive request  16#0043  ○   ○     TCP byte receive request  16#0048  ○   ○         ●  Duplex bus request command (In development)    ○: Available/—: Unavailable  Command description  Command  type1 type2    UDP receive request/broadcast  16#0233  —  ○     TCP receive request  16#0238  —  ○       ●  EN911 request command    ○ : Available / — : Unavailable  Command description  Command  type1 type2    EN board management socket identifier  acquisition  16#0916  ○   —    UDP receive request/broadcast  16#0933  ○   —    TCP receive request  16#0938  ○   —    UDP byte receive request  16#0943  ○   —    TCP byte receive request  16#0948  ○   —    Chapter 2    LD/FBD Instructions    6F8C1226  574    ●  Single bus/duplex bus request command  The  single  bus  request  command  and  duplex  bus  request  command  have  different  command numbers, but their structure is the same.    They will be described together.    ♦  EN board management socket identifier acquisition  ·  Used to refer to the detailed information of each socket of the Ethernet module.  ·  Obtains the EN board management socket identifier from the opened socket identifier.  ·  The request command and Error status are as follows:      ·  Relation between socket No. obtained with the open command and socket No.  obtained with this command.  The socket No. obtained by UDP/TCP open command is a number controlled by the  communication function block instruction and is different from the real socket No.  obtained by the Ethernet module.    Send, receive, or close can be performed using  the socket No. obtained with an open command.    However, the detailed information  for each socket controlled by Ethernet module cannot be accessed.    Therefore, use  this command to obtain the Socket No. controlled by the Ethernet module and access  the socket information using that value as offset.  The information for each socket controlled by the Ethernet module is available as  station global.    Register a station global variable or use direct instruction word  notation (%MW13.offset address) to access it from the user application program.  The information for each socket is organized as follows:    15  0 Requested Ethernet module slot No.  Command    (16#0016)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 63), error status  Socket No.  Socket No.  : Socket ID (0 to 47)            (identifier obtained by UDP/TCP open)  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  575    ·  Ethernet module detailed information for each socket  Overall structure:      Bit description:    Name description  Set condition  Reset condition  TCP  Using TCP  During TCP open  During socket close  request  UDP  Using UDP  During UDP open  During socket close  request  AOP  Active open  During TCP active open  During socket close  request  POP  Passive open  During TCP passive open  During socket close  request  CON  Connecting  During TCP connection  During socket close  request or when RCL is ON RCV  Receive data  When there is receive data  No receive data  RCL  Disconnected  When closed by opposite  party when connecting  During socket close  request  NOA  TCP timeout  Response from opposite  party is interrupted during  connection  During socket close  request    Socket information  for single bus  request command  (1 word×64  sockets)  Tope offset  address  Socket information  for single bus  request command  (1 word×64  sockets)  +64  Socket 0  Socket 1  Socket 63  UDP TCP AOP POP CON RCV  RCL  Reserve E  F  D  C  B  A  9  8  0   :    Socket0  Socket 1  Socket 63    :    The structure of each slot is the same.  NOA  7  Chapter 2    LD/FBD Instructions    6F8C1226  576    Top offset address:    Type  Slot    Top offset address  0  130944  2  2228096  3  3276672  4  4325248  5  5373824  6  6422400  type1/2  7  7470976    (Ex.) Socket 4 information of single bus request command installed in slot 3 for type 1.    Direct notation  %MW13.3276672  LD  ――  ST  Variable declaration  SOCKET_INF3 [4]  LD  ――  ST    Station global variable (Slot3)    Variable    Data type  Word No. Bit No.  SOCKET_INF3  Array[0..63] OF WORD  3276672  0      2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  577    ♦  UDP receive request/broadcast receive request  ·  Receives data from opened UDP socket.  ·  Receive data word number:    1 to 1001 words (including the storage area for receive  byte count (1W))      ♦  TCP receive request  ·  Receives data from opened TCP socket.  ·  Receive data word number: 1 to 1001 words (including the storage area for receive  byte count (1W)).      15  0 Requested Ethernet module slot No.  Command    (16#0038)/Duplex (16#0238)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47)            (identifier obtained by TCP open)  TimeCnt  :  Receive  wait  timeout  interval  (1  to  65535:  0.1  second  unit,  0:  unlimited)  Socket No.  TimeCnt  15  0 Requested Ethernet module slot No.  Command    (16#0033)/Duplex (16#0233)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status  Socket No.  :    Socket ID (0 to 47) (identifier obtained by UDP open)  D-IP address  :    Source IP address  Specifying  0.0.0.0  as  the  source  IP  address  results  in  broadcast  receive.  D-UDPPort No. :    Source socket UDP port No.  Do not check the source port when the command is duplex (16#0233)  or UDP port No. is “0”.  TimeCnt  :    Receive wait timeout interval (1 to 65535: 0.1 second unit, 0: unlimited)   Socket No.  D-IP address  D-UDPPort No.  TimeCnt  Chapter 2    LD/FBD Instructions    6F8C1226  578    ♦  UDP byte receive request  ·  Receives data from opened UDP socket.  ·  Receive data word number: 2 to 2002 bytes (including the storage area for receive  byte count (2 bytes))      ♦  TCP byte receive request  ·  Receives data from opened TCP socket.  ·  Receive data word number: 2 to 2002 bytes (including the storage area for receive  byte count (2 bytes))      15  0 Requested Ethernet module slot No.  Command    (16#0048)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47)            (identifier obtained by TCP open)  TimeCnt    : Receive timeout interval (1 to 65535: 0.1 second unit, 0: unlimited) Socket No.  TimeCnt  15  0 Requested Ethernet module slot No.  Command    (16#0043)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47)            (identifier obtained by UDP open)  D-IP address  : Source IP address  Specifying  0.0.0.0  as  the  source  IP  address  results  in  broadcast  receive.    D-UDPPort No.  : Source socket UDP port no.  TimeCnt  :  Receive  wait  timeout  interval  (1  to  65535:  0.1  second  unit,  0:  unlimited)  Socket No.  D-IP address  D-UDPPort No.  TimeCnt  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  579    ●  EN911 request command  EN911 request command differs from the EN8** in the request command format. There  is  an  identification  code  (16#F001)  at  the  top  of  the  request  command.  The  specified  format  (2  words)  of  the  requested  Ethernet  module  is  also  different.  The  contents  following the command are the same although the numbers are different.    ♦  EN board management socket identifier acquisition  ·  Used to refer to the detailed information of each socket of the Ethernet module.  ·  Obtains the EN board management socket identifier from the opened socket identifier.  ·  The request command structure and error status are as follows:      ·  Relationship between the socket No. obtained by open command and socket No.  obtained by this command    The socket No. obtained by UDP/TCP open command is a number controlled by the  communication function block instruction and is different from the real socket No.  obtained by the Ethernet module. Send, receive, or close can be performed using the  socket No. obtained with an open command. However, the detailed information for  each socket controlled by Ethernet module cannot be accessed. Therefore, use this  command to obtain the socket No. controlled by the Ethernet module and access the  socket information using that value as offset.  The information for each socket controlled by the Ethernet module is available as  station global. Register a station global variable or use direct instruction word notation  (%MW13.offset address) to access it from the user application program.  The information for each socket is organized as follows:    15  0 Command    (16#0916)  <Request command>  <Socket No. or error status>  15  0 Socket No. (0 to 11), error status  Socket No.  Socket No.  : Socket ID (0 to 47)            (identifier obtained by UDP/TCP open)  ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  Chapter 2    LD/FBD Instructions    6F8C1226  580    ·  Detailed information for each socket of Ethernet module  Overall structure:      Bit description:      Name Description  Set condition  Reset condition  TCP  Using TCP  During TCP open  During socket close request  UDP  Using UDP  During UDP open  During socket close request  AOP  Active open  During TCP active open  During socket close request  POP  Passive open  During TCP passive open  During socket close request  CON  Connecting  During TCP connection  During socket close request or  when RCL is ON  RCV  Receive data  When there is receive data  No receive data  RCL  Disconnected  When closed by opposite party  when connecting  During socket close request  NOA  TCP timeout  Response from opposite party is  interrupted during connection  During socket close request    I/O variable (standard variable)    Variable    Data type  Word No.  Bit No.  EN9_SOCK_M_NN_SS (Note)  ARRAY [0..11] OF WORD  33  0    (Note)  Where variable name: EN9_SOCK_M_NN_SS:    M  : Main slot No.    NN  : TC—net I/O loop node No.    SS  : TC—net I/O slot No.    A unique variable name is registered for each EN911 module.        (Ex.)  Information of TC-net I/O loop node No.=3 connected to the Controller and EN9119 socket 4  installed in TC-net I/O slot No.=5:      TC-net I/O loop block    (Node no.3)*16+96  Word no.=33  Socket 0  Socket 1  Socket 11  UDP TCP AOP POP CON RCV  RCL  Reserve E  F  D  C  B  A  9  8  0   :    The structure of each slot is the same.  Socket  information for    EN911 request  command  (1 word*12  sockets)  NOA  7  EN9_SOCK_0_03_05[4]   LD  TEMP    ST  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  581    ♦  UDP receive request/broadcast receive request  ·  Receives data from opened UDP socket.    ·  Receive data word number: 1 to 701 words (number of words including the received  bytes (1W).        ♦  TCP receive request  · Receives data from opened TCP socket.    · Received data word number:  1 to 701 words (number of words including the received  bytes (1W)).      15  0 Command    (16#0938)  <Request  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47) (identifier obtained by TCP open)  TimeCnt    : Receive wait timeout interval (1 to 65535: 0.1 sec unit, 0: unlimited) Socket No.  TimeCnt  ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  15  0 Command    (16#0933)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47) (identifier obtained by UDP open)  D-IP address  : Source IP address      Specifying 0.0.0.0 as the source IP address results in                      broadcast receive.  D-UDPPort No.  : Source socket UDP port No.  TimeCnt  : Receive wait timeout interval (1 to 65535: 0.1 second unit, 0: unlimited) Socket No.  D-IP address  D-UDPPort No.  TimeCnt  ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  Chapter 2    LD/FBD Instructions    6F8C1226  582    ♦  UDP byte receive request  ·  Receives data from opened UDP socket.    ·  Receive data word number:  2 to 1402 bytes    (including the storage area for receive  byte count (2 bytes))      ♦  TCP byte receive request  ·  Receives data from opened TCP socket.  ·  Receive data word number :  2 to 1402 bytes (including the storage area for receive  byte count (2 bytes))    15  0 Command    (16#0948)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  : Socket ID (0 to 47) (identifier obtained by TCP open)  TimeCnt    : Receive wait timeout interval(1 to 65535: 0.1 sec unit, 0: unlimited) Socket No.  TimeCnt  ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  15  0 Command    (16#0943)  <Request command>  <Error status>  15  0 =0: Normal complete, ≠0: Error status Socket No.  :  Socket ID (0 to 47) (identifier obtained by UDP open)  D-IP address  : Source IP address      Specifying 0.0.0.0 as the source IP address results in                      broadcast receive.  D-UDPPort No.  : Source socket UDP port No.  TimeCnt  :  Receive wait timeout interval (1 to 65535: 0.1 second unit, 0: unlimited) Socket No.  D-IP address  D-UDPPort No.  TimeCnt  ID code (16#F001)  Requested Ethernet module  Basic unit slot/node/unit/slot  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  583    ●  Program example  [LD/FBD language notation]                                                [ST language notation]  URCV_N_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SIGNAL2 := @URCV_N_1.DONE;  SIGNAL3 := @URCV_N_1.ERROR;  SAMPLE4 := @URCV_N_1.STATUS;    ·  The request command (Slot No.=2, Command=16#0033, UDP socket No.=11, Source  IP address=172.16.64.5, Source socket UDP No.=5000, Receive timeout interval=30  seconds) is specified with SAMPLE1.  ·  UDP receive request specified with the request command is made at the rise of  SIGNAL1 from FALSE(OFF) to TRUE(ON).  ·  When UDP receive completes normally, the completion output SIGNAL2 is kept  TRUE(ON) for one scanning time. "0" is stored in status output SAMPLE4.  ·  When UDP open is unsuccessful, the error output SIGNAL3 is kept TRUE(ON) for one  scanning time.    The error status is stored in status output SAMPLE4.  ●  Error information  ·  When the specified range of receive data exceeds the area, the socket communication  receive is not processed and the data boundary is exceeded.  ·  The following operation is performed when direct I/O variable is specified for the  receive data.      Controller  Action  Unified Controller nv series  Socket communication receive is not executed.    Error flag and table operation error flag are set to TRUE(ON). URCV_N_1  URCV_N  REQ  CMD  P  N  DONE ERROR STATUS SAMPLE1  LD  SIGNAL1  SAMPLE2  LD  SAMPLE3  50  LD  SIGNAL2 SIGNAL3 SAMPLE4 ST Request command SAMPLE1  16#0033 11 Slot No.  UDP receive request 2 UDP socket No.  Source IP address  172.16.64.5  5000 Source target socket UDP No. 300 Receive timeout  16#AC_10_ 40_5 Chapter 2    LD/FBD Instructions    6F8C1226  584    Error Status Code List   EN7: When using EN7**/EN6**/EN8**/EN9**module  EN3: When using EN3** module    EN9: When using EN9** module    (Error status unique to EN9**)  Error  code  Error description  Request type  2819  Source standby  EN3: UDP/TCP send / receive  2848  Timeout occurred  EN3: Other station verification, PC link register R/W  TCP open, UDP receive  2864  Length abnormal  EN3: UDP/TCP send  2880  Station mode abnormal  EN3: Router IP address setting  2896  MAC/IP not set  EN3:  Operation  mode  control,  router  IP  address  setting  2912  Transmission prohibited state  EN3: UDP/TCP open/close, UDP/TCP send  Port No. abnormal  EN3: Parameter setting  2929  IP address abnormal  Router IP address setting  2931  Time setting error (year)  EN3: Time setting request  2932  Time setting error (month)  EN3: Time setting request  2933  Time setting error (day)  EN3: Time setting request  2934  Time setting error (hour)  EN3: Time setting request  2935  Time setting error (minute)  EN3: Time setting request  2936  Time setting error (second)  EN3: Time setting request  2944  Already opened  EN3: UDP/TCP open  2945  Socket not open  EN3: UDP/TCP send / receive, UDP/TCP close  2947  Invalid control request specification    EN3: Operation mode control  3008  Resource shortage error  EN3: UDP send  3009  Receive  request  from  CPU  (word  count)  abnormal  EN3: UDP/TCP receive  3011  Send buffer full  EN3: TCP send  3012  Destination window size small  EN3: TCP send  Invalid connection destination IP address    EN7: TCP open  -11  Unable to send to specified destination  EN7: UDP/TCP send  Timeout. Connection does not complete within  prescribed time  EN7: TCP open  -12  Timeout  UDP/TCP receive  -14  Connection broken on the local system  EN7: UDP/TCP send / receive  Resource shortage  EN7: TCP open  Resource reservation failure  EN7: UDP/TCP send, TCP close  -15  Unable  to  create  socket  because  there  is  no  buffer area  EN7: UDP/TCP open  Not a valid socket identifier  EN7: UDP/TCP open/close, UDP/TCP send/receive  -16  One  of  the  socket  identifier  specified  with  bit  mask is invalid  EN7: TCP open  Argument  (addr  or  addr  length)  not  in  valid  area within user address space  EN7: UDP/TCP open  -17  Invalid argument (buffer pointer) pointer    UDP/TCP send/receive  2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  585    Error  code  Error description  Request type  Socket is set to asynchronous I/O mode and  there is none waiting connection  EN7: TCP open  No receive data  EN7: UDP/TCP receive  -8  Send request not accepted  EN7: UDP/TCP send  -19  Invalid message size    EN7: UDP/TCP send  Bind already complete  EN7: TCP open  -22  Invalid parameter    EN7: TCP open  Connection is broken  EN7: UDP/TCP receive  -32  Attempt was made to send to disconnected  socket  EN7: UDP/TCP send, TCP close  Invalid argument (name, name length)  EN7: TCP open  -50  Invalid destination address specification  EN7: UDP/TCP send  -54  Specified protocol not supported  EN7: UDP/TCP open  -55  Specified socket type not supported in address  family  EN7: UDP/TCP open  Specified socket is not SOCK_STREAM type  EN7: TCP open  Socket is not a type supporting listen  EN7: TCP open  -56  Specified operation not supported with that  socket  EN7: UDP/TCP receive  Specified address family is currently  unsupported  EN7: UDP/TCP open  -58  Specified address family cannot be used with  that socket  EN7: UDP/TCP send  -59  Given address is already used  EN7: UDP/TCP open  -60  Given address cannot be used in this system  EN7: UDP/TCP open  -67  The socket is already connected  EN7: TCP open  -69  Shutdown is issued  EN7: UDP/TCP send  -71  Protocol error  EN7: TCP open  -1001  Corresponding socket is busy  EN7: All requests  -1002  Corresponding socket not generated  EN7: All requests  -1005  PING timeout  EN7: Other station verification  -1006  PING busy  EN7: Other station verification  -1010  Socket type abnormal  EN7: All requests  -1101  Receive memory block shortage  EN7: Receive related requests  -2001  Communication request count exceeded  EN7: All requests  -2002  Request buffer count exceeded  EN7: All requests  -2005  Corresponding socket not open  EN7: All requests  -2006  Used port count exceeded  EN7: All requests  -2007  Reply timeout  EN7: All requests  -2008  Buffer resource reservation failure  EN7: All requests  -2009  EN board reset in progress  EN7: All requests  -2201  Interrupt accept wait timeout  EN7: All requests  -2202  Verification/specification response wait timeout EN7: All requests  Chapter 2    LD/FBD Instructions    6F8C1226  586    Error  code  Error description  Request type  -5000  Communication  instruction  request  count  exceeded  EN7: Reset, other station verification, UDP/TCP open -5001  Command type abnormal  EN7/EN3: All requests  -5002  Receive timeout  EN7: All requests  -5003  Socket in use or not open  EN7: UDP/TCP send/receive  -5004  Outside slot socket No. range  EN7/EN3: All requests  -5005  Socket not open  EN7: UDP/TCP send/receive, close  EN3: Socket No. retrieval  -5006  Duplicate port No.  EN7: UDP/TCP open  -5007  Destination busy or disconnected  EN7: TCP open send/receive  -5030  Invalid reset request  EN9: Reset request  -5050  Reset in progress  EN3: All except reset request  -5051  Register error (source)  EN3: PC link register R/W  -5052  Response timeout (source)  EN3: PC link register R/W  -5054  Memory write protect (source)  EN3: PC link register R/W  -5056  Request count exceeded  EN3: All requests  -5060  Boundary error (source)  EN3: PC link register R/W  -5071  Register error (destination)  EN3: PC link register R/W  -5072  Response timeout (destination)  EN3: PC link register R/W  -5074  Memory write protect (destination)  EN3: PC link register R/W  -5076  Send completion timeout (destination)  EN3: PC link register R/W  -5080  Boundary error (destination)  EN3: PC link register R/W  -5099  Other errors  EN7: UDP/TCP send / receive    2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  587     Notes for Duplex System    In a duplex system, the station bus transmission modules are separate modules in the  primary side and secondary side.    Therefore, management information for transmission  modules is different (different resources).  For the control of the station bus transmission modules (e.g. socket generation), there is  a difference of whether to perform tracking of instance data of communication instruction  between the communication instruction for the integrated controller (USEND_T/URCV_T)  and communication    instruction for the unified controller (USEND_N/URCV_N).  Therefore, in a user application program using communication instructions, information  must be initialized at duplex switching so that the operation starts from the initialization  state (socket open processing) again.  Refer to the overview of processing at duplex switching and user application examples  below,  and  make  sure  that  the  operation  starts  from  the  initialization  state.    USEND_T/URCV_T/USEND_N/  URCV_N  instruction  does  not  operate  unless  this  operation is done.    Chapter 2    LD/FBD Instructions    6F8C1226  588    ●  Overview of processing  1)  Detect online upgrade with duplex switching event task (EV3).  Set the flag indicating that duplex switching occurs to TRUE(ON) ([Example (1)]).  (Example: DUPLEX_CHG_REQ=TRUE(ON))  2)  In each of the programs using communication, initialize the instance data of  USEND_T/URCV_T instruction at duplex switching.    Also, initialize information so  that the operation starts from the initialization state (socket open processing) again.  ·  Initialization program ([Example (2)])    ● Important  · Reset the flag that indicates that duplex switching set to TRUE(ON) in 1) occurs to FALSE(OFF)  when the initialization of all the related USEND_T/URCV_T instructions for all programs are  completed (initialization is performed only for the first scan after duplex switching).    ·  Change the description to ┤P├ equivalent circuit ([Example (3)]) if the REQ command  is input to USEND_T/URCV_T/USEND_N/URCV_N instruction using the  differentiation instruction (e.g. ┤P├).  ·  Perform normal programming of USEND_T/URCV_T/USEND_N/URCV_N instruction  after implementing 2).    Controller  Communication  instruction  Tracking of  instruction  instance data Instruction  instance data  initialize  Equivalent circuit of REQ  command to  communication instruction  Send    USEND_T Integrated Controller V series  Receive   URCV_T  Yes  Required  Send    USEND_N Unified Controller  nv series  Receive  URCV_N  No  Not required  Required      2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  589    ●  Program example  [[Example (1)]: Program that detects online upgrade in EV3      [Example (2)]: Initialization program  [LD/FBD language notation]      DUPLEX_  CHG_REQ  TINZ_WORD  4    LD  16#0000   LD  N  USEND_T_1   ST  (** Initialize USEND_T_1 instance **)  B4_REQ_CMD B4_REQ_CMD  REQ_CMD  REQ_CMD  (** Initialization of derivative contact  equivalent circuit variable of  USEND_T REQ command **)  DUPLEX_  CHG_REQ  DUPLEX_  CHG_REQ  (**  Duplex  switch  flag  is  reset.  However,  execute  flag when initialization of all USEND_T/URCV_T is  completed. **)  (R)  (R) (R)      [Example (3)]: ┤P├    equivalent circuit and USEND_T instruction program  [LD/FBD language notation]      [ST language notation]  The ST language does not support the equivalent notations as the LD language, so data  hold  types  such  as  -(R)-  and  -(S)-  or  change  detection  types  such  as  -|P|-  and  -|N|-  cannot be described.    Therefore, program examples are omitted here.  REQ_CMD  REQUEST  B4_REQ_CMD REQ_CMD  B4_REQ_CMD  (** USEND_T program **)  REQUEST  USEND_T  REQ  USEND_T_1  CMD  P  N  P  LD  CMD  LD  N  LD DONE ERROR STATUS DONE  ST  ERROR  ST  STATUS  ST  REQ_CMD  REQUEST  Circuit when ―|P|― is used  REQUEST  P (** P ┤ ├input equivalent circuit to REQ command of USEND_T**) DUPLEX_  CHG_REQ  DUPLEX_  CHG_REQ  Chapter 2    LD/FBD Instructions    6F8C1226  590    Communication FB (XMIT_T)   Communication  Communication FB(XMIT_T)  V dedicated  instruction  LD/FBD language  notation    Completion  output  Bus / Unit / Slot / Node no. Send/receive data Request command Execution request XMIT_T    REQ        DONE     PRM      ERROR     CMD    STATUS     DATA  Error  Status  Instance  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( REQ, PRM, CMD, DATA );  [Variable name]:=[Instance name]. DONE;  [Variable name]:=[Instance name]. ERROR;  [Variable name]:=[Instance name]. STATUS;    ●  Arguments    Arg.  Operand  Type  Const.  Description  Valid range REQ  BOOL  ○   Execution request    PRM  PTR  ○   Bus / Unit / Slot / Node No.    CMD  PTR  —  Request command    Input  DATA  PTR  —  Send/receive data    DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error    Output  STATUS  INT  —  Status      ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion output ERROR  BOOL  Error    STATUS  INT  Status    Can be accessed from the user program.  RESERVE  ARRAY 3W  reserved  Cannot be accessed from the user program.    ●  Function  ·  Function block that communicates with FL-net custom procedure using FL-net  module.    ·  Send / receive is performed with the content of the specified request command CMD  at the rise of execution request REQ.    ·  The format of the bus / unit / slot / node No. PRM is as follows:        15  Unit    Bus  Slot  8  12  0 Node No.   2.20    Communication  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  591    ·  Refer to the FL-net User's Guide for the detail of the request command CMD.    ·  The table data specified with DATA is sent during send and the received data is stored  in table specified with DATA during receive.    ·  Completion output Q and ERROR are set to TRUE(ON) for one scan only.    ·  The STATUS contains the completion code if normal completion and error status if  abnormal completion.    ·  Refer to the FL-net User's Guide for the detail of the code No.    ●  Program example  [LD/FBD language notation]      SIGNAL1 1  LD  XMIT_T  SIGNAL2    ST  REQ  SAMPLE1   LD  SAMPLE2   LD  SAMPLE3   LD  PRM  CMD  DATA  Bus / Unit  / Slot / Node No.: SAMPLE1  16#000A  1  1  Bus/Unit/Slot   Node No.   Command  No.  DONE ERROR STATUS SAMPLE3   ST  SAMPLE5   ST  0  0  10  Area specification  Offset  H  XMIT_T_1  Request command:  SAMPLE2  4  Offset  L  Read word size      [ST language notation]  XMIT_T_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SIGNAL2 := XMIT_T_1.DONE;  SIGNAL3 := XMIT_T_1.ERROR;  SAMPLE5 := XMIT_T_1.STATUS;    ·  Bus / Unit / Slot / Node No. (basic unit/slot 10, node No. 1) is specified with SAMPLE1.    ·  Request command (Command=cyclic data read, Area=area1, Offset address=4, Read  word count=10 words) is specified with SAMPLE2.    ·  The cyclic data read request specified with request command is made at the rise of  SIGNAL1 from FALSE(OFF) to TRUE(ON).    ·  When cyclic data read request completes normally, the completion output SIGNAL2 is  set to TRUE(ON) for one scanning time.    Also, the normal completion code is stored  in SAMPLE5, which is the status output.    ·  When cyclic data read request is unsuccessful, the error output SIGNAL3 is set to  TRUE(ON) for one scanning time.    Also, the error status is stored in SAMPLE5,  which is the status output.    Chapter 2    LD/FBD Instructions  6F8C1226  592    Communication FB (XMIT_N)   Communication  Communication FB(XMIT_N)  nv dedicated  instruction  LD/FBD language  notation  Completion  output  Basic unit slot/node/unit/ slot/node No.  Send/receive data Request command Execution request XMIT_N  Error  Status  Instance name  REQ DONE  PRM ERROR  CMD STATUS  DATA   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( REQ, PRM, CMD, DATA );  [Variable name]:= @[Instance name]. DONE;  [Variable name]:= @[Instance name]. ERROR;  [Variable name]:= @[Instance name]. STATUS;    ●  Arguments    Arg.  Operand  Type  Const. Description  Valid  range REQ  BOOL  ○  Execution request    PRM  PTR  —  Basic unit slot / node / unit / slot / node No.    CMD  PTR  —  Request command    Input  DATA  PTR  —  Send/receive data    DONE  BOOL  —  Completion output    ERROR  BOOL  —  Error    Output  STATUS  INT  —  Status      ●  Instance structure    Name  Type  Description  Remarks  DONE  BOOL  Completion output ERROR  BOOL  Error  STATUS  INT  Status  Can be accessed from the user program.  RESERVE  ARRAY 3W  Reserved  Cannot be accessed from the user program.   ●  Function  ·  This function block communicates with FL-net custom procedure using FL-net module.  ·  Send/receive is performed with the content of the specified request command CMD at  the rise of execution request REQ.  ·  The format of basic unit slot / node / unit / slot / node No. RM is as follows:      15  8 7 0 Node No.  Slot    Unit    Node  Basic unit slot    2.21    Duplex Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  593  ·  For details on request command CMD, refer to "FL-net Operation Manual."  ·  The table data specified with DATA is sent during send and the received data is stored  in table specified with DATA during receive.  ·  Completion output Q and ERROR are set to TRUE(ON) for one scan only.  ·  The STATUS contains the completion code if normal completion and error status if  abnormal completion.  ·  For details on code number, refer to "FL-net Operation Manual."    ·  For MREAD_N, MWRITE_N, XMIT_N instructions, up to the maximum requests can  be made simultaneously per controller. (Maximum request number : type1=48,  type2=24)    ●  Program example  [LD/FBD language notation]        Basic unit slot/node/unit/slot/node No.:  SAMPLE1  65005  16#010A  Unit/Slot  16#0003  Basic unit slot/node  Command No.  16#8000  10  Virtual address (L)  Read word size  SIGNAL1  1  LD  XMIT_N  SIGNAL2   ST  REQ  SAMPLE1    LD  SAMPLE2    LD  SAMPLE3    LD  PRM  CMD  DATA  DONE ERROR STATUS SIGNAL3   ST  SAMPLE5   ST  XMIT_N_1  Request command: SAMPLE2  16#0001  Virtual address (H)  1  Node No.        [ST language notation]  XMIT_T_1( SIGNAL1, SAMPLE1, SAMPLE2, SAMPLE3);  SIGNAL2 := @XMIT_T_1.DONE;  SIGNAL3 := @XMIT_T_1.ERROR;  SAMPLE5 := @XMIT_T_1.STATUS;  ·  Basic unit slot / node / unit / slot / node No. (built—in, node 3, unit 1, slot 10, node No.  1) is specified with SAMPLE1.  ·  Request command (command  =  word block read, virtual address =16#0001_8000,  read word count =10 words) is specified with SAMPLE2.  ·  The word block read request specified with request command is made at the rise of  SIGNAL1 from FALSE(OFF) to TRUE(ON).  ·  When the word block read request is completed normally, the completion output  SIGNAL2 becomes TRUE(ON) for one scanning time.    Also, the normal completion  code is stored in SAMPLE5, which is the status output.  ·  When the word block read request is not completed normally, the error output  SIGNAL3 becomes TRUE(ON) for one scanning time.    Also, the error status is stored  in SAMPLE5, which is the status output.    Chapter 2    LD/FBD Instructions  6F8C1226  594      2.21  Duplex Control    No.  Instruction  Remarks  1  Duplex Online—Standby Change  DUPLEX_CHG    2  Duplex Self—System Down  DUPLEX_DOWN    3  Partial Equalizer (variable specification) EQUALIZE_VAR  V dedicated  instruction  4  Partial Equalizer (address specification) EQUALIZE_ADDR  V dedicated  instruction        2.21    Duplex Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  595    Duplex Online—Standby Change   Duplex Control  Duplex Online—Standby Change    LD/FBD language  notation    Execution control input Output  DUPLEX_CHG   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := DUPLEX_CHG(Execution control input);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  BOOL  ○   Execution  control input    Output  —  BOOL  —  Output      ●  Function  ·  If the execution control input is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  If the execution control input is TRUE(ON), online and standby are changed and  TRUE(ON) is output.    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF) TRUE(ON)  Executed  TRUE(ON)    ●  Program example  [LD/FBD language notation]        [ST language notation]  SIGNAL2 := DUPLEX_CHG( SIGNAL1);    ·  Online and standby are changed when the execution control input SIGNAL1 is  TRUE(ON).  SIGNAL2 1  ST  DUPLEX_CHG SIGNAL1 1  ST  Chapter 2    LD/FBD Instructions  6F8C1226  596      PS IF PU   PS IF PU   DUPLEX_CHG Online Standby  Before instruction execution: PS IF PU   PS IF PU   Online  Standby After instruction execution:    ●  Error information  ·  This instruction has no affect on non-duplex system.  ·  If the target system is not in standby state, no switching is performed.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.21    Duplex Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  597    Duplex Self—System Down   Duplex Control  Duplex Self—System Down    LD/FBD language  notation    Execution control input Output  DUPLEX_DOWN   EN input  Edge execution  Index modification  Modifier  ○   ○   —  S T language notation  Output := DUPLEX_DOWN(Execution control input);    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  BOOL  ○   Execution  control input    Output  —  BOOL  —  Output      ●  Function  ·  If the execution control input is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  If the execution control input is TRUE(ON), shutdown of self system is forced and  TRUE(ON) is output.    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF) TRUE(ON)  Executed  TRUE(ON)    ●  Program example  [LD/FBD language notation]    SIGNAL1 1  LD  DUPLEX_DOWN   SIGNAL2 1  ST    [ST language notation]  SIGNAL2 := DUPLEX_DOWN( SIGNAL1);    ·  When the execution control input SIGNAL1 is TRUE(ON), shutdown of the self system  is forced.  Chapter 2    LD/FBD Instructions  6F8C1226  598      PS IF PU   PS IF PU   DUPLEX_DOWN Online  Standby  Before instruction execution:  PS IF PU   PS IF PU   Online  Down  After instruction execution:      ●  Error information  ·  This instruction has no affect on non-duplex system.  ·  When the target system is not in standby state, the self system is not shutdown.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.21    Duplex Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  599    Partial Equalizer (variable specification)   Duplex Control  Partial Equalizer (variable specification)  V dedicated  instruction  LD/FBD language  notation    Variable  specification Parameter  normal/abnormal  output  EQUALIZE_VAR Equalizer size N EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Parameter normal/abnormal output := EQUALIZE_VAR(variable  specification, N );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  —  PTR  —  Variable specification    Input  N  UINT  ○   Equalizer size  1 ≤ N ≤ 1024  Output  —  BOOL  —  Parameter  normal/abnormal output  Normal: TRUE(ON) Abnormal:  FALSE(OFF)    ●  Function  ·  Equalizes an N word area starting from the variable specified with the variable  specification.    ·  Variables for which partial equalization can be specified are DW register and user  variables.    ·  One to 1024 words may be specified for equalizer size N.  If N>1024, operation is performed assuming N=1024 and output is reset to  FALSE(OFF) to indicate a parameter error.    If N=0, no operation is performed.  ·  If the specified variable is not a DW register or user variable, or if variable  specification+size exceeds the area of the variable, output is reset to FALSE(OFF) to  indicate a parameter error.    ·  Up to eight partial equalize (variable specification, address specification) requests are  possible within the same single scan.    ·  Subsequent equalize requests are not executed and output is reset to FALSE(OFF) to  indicate a parameter error.    Chapter 2    LD/FBD Instructions  6F8C1226  600    ●  Program example  [LD/FBD language notation]      [ST language notation]  SIGNAL1 := EQUALIZE_VAR( SAMPLE1, SAMPLE2);    ·  Partially equalizes a 100 words area starting from user SAMPLE1.    ●  Error information  ·  When this instruction is used on non—duplex system, no operation is performed and  parameter error occurs.    ·  If the destination system is in standby, partial equalize is not performed.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      SIGNAL1 1  ST  EQUALIZE_VAR SAMPLE1    LD  SAMPLE2  100  LD  N  User variable      100W  SAMPLE1  Equalize  100W  starting  from  SAMPLE 1  2.21    Duplex Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  601    Partial Equalizer (address specification)   Duplex Control  Partial Equalizer (address specification)  V dedicated  instruction  LD/FBD language  notation    Variable type specification Parameter  normal/abnormal output EQUALIZE_ADDR Top address specification ADDR SCOPE N Equalize size EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Parameter normal/abnormal output := EQUALIZE_ADDR( SCOPE,  ADDR, N );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  SCOPE  UINT  ○   Variable type specification  3: DW register  4: User variable  ADDR  DINT  ○   Top address specification  ADDR ≥ 0  Input  N  UINT  ○   Equalize size  1 ≤ N ≤ 1024  Output  —  BOOL  —  Parameter  normal/abnormal output  Normal: TRUE(ON) Abnormal:  FALSE(OFF)    ●  Function  ·  In the variable SCOPE specified with variable type, equalizes an N word area starting  from the top address ADDR.    ·  Variables for which partial equalization can be specified are DW register (=3) and user  variables (=4).    ·  One to 1024 words may be specified for equalizer size N.    If N > 1024, operation is performed assuming N=1024 and output is reset to  FALSE(OFF) to indicate a parameter error.  If N=0, no operation is performed.  ·  If the specified variable is not a DW register (=3) or user variable (=4), or if top  address+size exceeds the area of the variable, output is reset to FALSE(OFF) to  indicate a parameter error.    ·  Up to eight partial equalize (variable specification, address specification) requests are  possible within the same single scan.    ·  Subsequent equalize requests are not executed and output is reset to FALSE(OFF) to  indicate a parameter error.  Chapter 2    LD/FBD Instructions  6F8C1226  602    ●  Program example  [LD/FBD language notation]        [ST language notation]  SIGNAL1 := EQUALIZE_ADDR( SAMPLE1, SAMPLE2, SAMPLE3);    ·  Partially equalizes a 100 word area starting from user variable address 200.    ●  Error information  ·  When this instruction is used on non—duplex system, no operation is performed and  parameter error occurs.    ·  If the destination system is in standby, partial equalize is not performed.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.        SIGNAL1 1  ST  EQUALIZE_ADDR SAMPLE1  4  LD  SAMPLE2  200  LD  ADDR  User variable      100W  200  Equalizes 100W starting from user  variable address 200.  SCOPE  N  SAMPLE3  100  LD  2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  603      2.22  Process Control    No.  Instruction  Remarks  1  Current Output PID  PID_P    2  Current Output Sample PI  SPI_P    3  Pulse Output PID  PIDP_P    4  Pulse Output Sample PI  SPIP_P    5  Feed Forward  FFD_P    6  Double Cross Limit  DCL_P    Chapter 2    LD/FBD Instructions  6F8C1226  604    ●  PID algorithm  The  PID  algorithm  for  current  output  PID,  current  output  sample  PI,  pulse  output  PID,  and  pulse  output  sample  PI  is  as  described  in  the  figure  below  (pulse  output  is  ΔMV  output, but the algorithm is as shown below for all).      1-α  α   αγ  1  1+βTis Tds  1+ηTds  1  Tis 1   Kp  +  -  +  -  + + + + - +  +  PV  SV  MV   ●  Features  ·  This is equivalent to hyper PID implemented in the small-scale system (MCS) and  CIEMAC-DS (PCS-DS).    ·  An improved bilinear transformation is used for derivative calculation.    ·  A hyper PID unique method is used for anti-reset-windup (AR/W) function. As AR/W  function, the integrating term is restricted (only in the decreasing direction of output  restriction) when restricting the MV output (when the internal totalized value does not  match the actual output).    ·  The 2 degrees of freedom operation is filter format and can use three parameters: α, β,  and γ.    Coefficient    PID algorithm  α  β  γ    1  1  1  General PID (deviation PID)  1  1  0  PI-D (PV derivative type PID)  0  1  0  I-PD  α  1  0  2 degrees of freedom for P term only  α  1  γ  2 degrees of freedom for PD term only  α  β  0  2 degrees of freedom for PI term only  α  β  γ  2 degrees of freedom for all    ·  A gap function is used as a non-linear function. Depending on the amount of deviation,  the non-linear element defined by gap width and gap gain is reflected to the size of the  rate limiter.    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  605    Current Output PID    Process Control  Current Output PID    LD/FBD language  notation    Result output (MV)  PID_P    SV    MV     PV      GAN      FFS      FFD      TR      MVT      LP_D      LP_P  Instance name SV input PV input Feed forward gain Feed forward static characteristic Feed forward dynamic characteristic Tracking MV input Tracking request flag LP data variable LP parameter variable EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( SV, PV, GAN, FFS, FFD, TR, MVT, LP_D, LP_P );  [Variable name]:=[Instance name]. MV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  SV  REAL  ○  SV input [Engineering value]  PV  REAL  ○   PV input [Engineering value]  GAN  REAL  ○   Feed forward gain  PID proportional gain compensation    Specify 1.0 when feed forward is not used  FFS  REAL  ○   Feed forward static characteristic [%]  Specify 0.0 when feed forward is not used  FFD  REAL  ○   Feed forward dynamic characteristic [%]  Specify 0.0 when feed forward is not used  TR  REAL  ○   Tracking MV input [%]  When  tracking,  %  value  used  as  MV  initial  value during initialization  MVT  BOOL  ○   Tracking request flag  LP_D  PTR  —  LP data variable  Input  LP_P  PTR  —  LP parameter variable  Output  MV  REAL  —  Result output (MV) [%] (positional type)    Chapter 2    LD/FBD Instructions  6F8C1226  606    ·  Pointers to tag table are placed in LP data variable and LP parameter variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Tag symbol  Notation    Operand  Array  MCS  connection  version  (L1, L2, L3)  DS connection version  (L2DS, L3DS) (Type2)  LP_D  LP_DATA[0]  FIC100.SV  FIC100.CLI  LP_P  LP_PARA[0]  FIC100.OA  FIC100.TAG[0]    The following tag symbols are referenced by this instruction.    Operand  Symbol  Type  R/W Description  RH  REAL  R  PV range high [Engineering unit]  Used for percent conversion of SV/PV  Referenced  by LP_P.PVP  RL  REAL  R  PV range low [Engineering unit]  Used for percent conversion of SV/PV  MODE  UINT  R  Control mode: Used for control operation execution,  reset condition  CLI  BOOL  R  Control stop alarm    Used for control operation reset  condition  MVE  BOOL  R  MV error  SMV  BOOL  R  Sequence MV  LP_D  (LP_DATA)  CMV  BOOL  R  Computer MV  PVP  UINT  R  Indicator PV No.  DT0  UINT  R  Scan time (number indicating multiple of scan time)  KP  REAL  R  Proportional gain    Used as PID gain  TI  REAL  R  Integral time [min]    Used as PID integral time  TD  REAL  R  Rate time [min]    Used as PID rate time  ETA  REAL  R  Rate gain      Used as PID rate gain parameter  ALP  REAL  R  2 degrees of freedom parameter α SV filter  parameter  BET  REAL  R  2 degrees of freedom parameter β    SV filter  parameter  GAM  REAL  R  2 degrees of freedom parameter γ    SV filter  parameter  GAP  REAL  R  Gap: Used as rate limiter condition in non-linear  operation  GG  REAL  R  Gap gain: Used as rate limiter coefficient in  non-linear operation  MH  REAL  R  MV high limit value[%]  ML  REAL  R  MV low limit value[%]  DMV  REAL  R  MV rate limiter[%/scan time]  LP_P  (LP_PARA)  CDR  BOOL  R  Control direction    Used as sign of PID operation  R/W: R=Read only, W=Write only, R/W=Read/Write    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  607    ●  Instance structure    Name    Type  Description  Remarks  MV  REAL  Result output (MV) [%] (positional type)  Can be accessed from  the user program.  B4MODE  UINT  Control mode previous value (initial value:  M)    Used to detect change in control  mode  CT  REAL  Actual time totalization (initial value: Main  scan cycle)    Used for scan time  measurement  B4E  REAL  P term previous value (initial value:  SV-PV)  During speed type operation, this is used  to calculate the speed component from  difference with previous value  B4D  REAL  SV filter differential term input previous  value (initial value: αγSV-PV)  Used to calculate change in input in  differential approximation operation  B5D  REAL  SV filter differential term input next to  previous value (initial value: αγSV-PV)  Used for exact differential term in  improved bilinear transformation  B4D1  REAL  SV filter differential term (initial value: 0)    SV filter αγ term  B4D2  REAL  SV filter proportional/integral term (initial  value: (1-α)SV)    αβ term of SV filter  B4MV  REAL  MV totalization limit previous value (initial  value: TR)  High/low rate limiter previous MV  totalization value (proportional/differential  term assurance)  B4FFD  REAL  Feed forward dynamic characteristic  difference calculation previous value  (initial value: FFD)  Previous value for adding dynamic  characteristic by difference  Cannot be accessed  from the user program. ●  Function  ·  here is no execution flag. This instruction is always executed. If the operation must be  reset, set MVT as initialization request. In this case, TR is also necessary in order to  initialize MV.    ·  The result of executing the feed forward instruction (FFD_P) can be used as input  (GAN, FFS, FFD) to feed forward. If feed forward is not used, use fixed values  (GAN=1, FFS=0, FFD=0).    ·  The PV parameter variable is referenced with the indicator PV No. (PVP) of the LP  parameter variable.  ·  The following variables can be specified for the LP data variables and LP data  parameters:    Controller    Variable    Integrated Controller V series  L controller  LP tag data/parameter variable  Unified Controller nv series  type2  LP tag data/parameter variable  Chapter 2    LD/FBD Instructions  6F8C1226  608    ·  Control operation function    Hyper PID is used for control operation. Output is the high/low rate limited positional  type MV value.    SV filter:  An SV filter with super 2 degrees of freedom PID is implemented. Hyper PID adds a  delay filter to SV in order to reduce the change in MV even when SV changes  suddenly. This SV filter is not related to change in PV and PV change (disturbance)  characteristic is unchanged. When tuning PID, set the parameters to be appropriate  for the disturbance. Under this condition, the filter status can be optimized for the  step change of SV.    The 2 degrees of freedom parameters (α, β, γ) of hyper PID are semi-fixed values.  Under normal condition, the initial values can be used without change.    The SV filter includes differential operation. This differential operation uses an  improved bilinear transformation that is an improved version of the bilinear  transformation which is a popular digital operation. Under normal condition, bilinear  transformation is used and a switch is made to exact differential when the rate time  setting is relatively shorter than the scan time. The rate time can be changed during  control operation without problem.    The SV filter operation is performed during each scan cycle. Control operation is  performed based on the specified control cycle (DT0).  Anti-reset windup:  An anti-reset windup (AR/W) function is added to cancel the excessive saturation of  the integrating term. The method used here suppresses the change in the saturating  direction of the integrating term when MV is saturated at high/low limit. Also, the  internal MV totalization is high/low limited by high limit (MH+MV rate limiter) and low  limit (ML-MV rate limiter).    Although the AR/W function is provided, a slight reset windup condition occurs. This  is designed to prevent MV from changing when there is a minute change in  disturbance (change in PV) and SV when MV is saturated. Therefore, if SV is  reversed when MV is saturated, tracking by MV may be delayed. In such case,  handle this from the application program by changing the control mode to M mode  and tracking manually, or temporarily switching to non-PID control operation and  using batch processing control for example.  Non-linear processing:  A gap function is incorporated as non-linear PID. When the deviation is within the  gap width, the change in MV output is suppressed by multiplying the rate limiter by  gap gain.  2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  609    ●  Program example  [LD/FBD language notation]      PID_P FIC100.MV   ST  FIC100.PV    LD  1    LD  PV  GAN  FFS  PID_01  0    LD  FFD  MV 0    LD  FIC100.MV    LD  TR  0    LD  MVT  FIC100.SV    LD  LP_D  FIC100.SV    LD  SV  FIC100.OA    LD  LP_P  Variable :  Variable  Data type    Dec.  PID_01  PID_P  VAR  Controller variable:  Variable  Data type  !FIC100  typeLP_PARA  !FIC100  typeLP_DATA  !FIC100  typePV_DATA    In case of L1      [ST language notation]  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.MV, 0, FIC100.SV, FIC100.OA);  FIC100.MV := PID_01.MV;    ·  Performs PID operation of adjuster tag (FIC100).    ·  This example uses basic PID (feed forward not used). For advanced PID, see the  program example for the feed forward instruction (feed forward used).    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller  V series  L controller  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    Chapter 2    LD/FBD Instructions  6F8C1226  610    ·  If RH=RL, the error flag and divide error flag are set to TRUE(ON) and the previous value is held  in output.    ·  The following operation is performed if the LP data or LP parameter specification is invalid:      Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data/parameter is  specified, table operation error is set to TRUE(ON)  and output is the previous value.      Unified Controller nv series  When variable other than LP tag data/parameter is  specified, error flag and table operation error are set  to TRUE(ON) and output is the previous value.      ●  Notes  ·  When MV output when control is stopped  When PID operation is stopped because of tracking request or control stop warning,  the output is as follows depending on the condition for stopping:    Stop condition  MV output  Tracking request flag (TR)=ON  Tracking MV input (TR)  Mode=M or RM  Tracking MV input (TR)  When mode changes  Previous MV (held)  Control stop warning (CLI)=ON or MV error (MVE)=ON Previous MV (held)  Setting MV (SMV=ON or CMV=ON)  Tracking MV input (held)    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  611    ●  Operation during sensor error  ·  The command executes the basic functions of PID and does not issue the control halt  instruction (CLI) to the PID command or carry out mode demotion. Handle the errors  as below according to the system status. Refer also to the add-in software “New  instrumentation FB library” of the engineering tool.      Example of sensor error judgment program  FIC100.MODE > SET  In case of L1    FIC100.A  FIC100.CLD  LD  EQ_UINT             Reflect  judgment result  in CLI    0  LD    tmpQ1    FIC100.C    FIC100.PRE FIC100.MVE FIC100.VPI FIC100.CL I      tmpQ1  ↑     tmpQ2    0  LD    tmpQ2  Demote to M mode on  detecting the first error    Reflect in  BOOL mode  FIC100.M  S     tmpQ2  FIC100.A  R FIC100.RM  R FIC100.C  R CLD=0  (Execute only to  detect errors) Set error judgment  condition required by  the system  PV process error (Sensor error)  MV error  Valve position error    Chapter 2    LD/FBD Instructions  6F8C1226  612    Current Output Sample PI   Process Control  Current Output Sample PI    LD/FBD language  notation    Result output (MV) SPI_P    SV        MV      PV      GAN      FFS      FFD      TR      MVT      LP_D      LP_P  Instance name  SV input PV input Feed forward gain Feed forward static characteristic Feed forward dynamic characteristic Tracking MV input Tracking request flag LP data variable LP parameter variable  EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( SV, PV, GAN, FFS, FFD, TR, MVT, LP_D, LP_P );  [Variable name]:=[Instance name]. MV;    ●  Arguments    Arg.  Operand  Type  Const. Description  SV  REAL  ○   SV input [Engineering value]  PV  REAL  ○   PV input [Engineering value]  GAN  REAL  ○   Feed forward gain  PID proportional gain compensation    Specify 1.0 when feed forward is not used  FFS  REAL  ○   Feed forward static characteristic [%]  Specify 0.0 when feed forward is not used  FFD  REAL  ○   Feed forward dynamic characteristic [%]  Specify 0.0 when feed forward is not used  TR  REAL  ○   Tracking MV input [%]  When tracking, % value used as MV initial value  during initialization  MVT  BOOL  ○   Tracking request flag  LP_D  PTR  —  LP data variable  Input  LP_P  PTR  —  LP parameter variable  Output  MV  REAL  —  Result output (MV) [%] (positional type)    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  613    Pointers to tag table are placed in LP data variable and LP parameter variable.  A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Tag symbol  Notation    Operand  Array  MCS  connection  version  (L1, L2, L3)  DS connection version  (L2DS, L3DS) (Type2)  LP_D  LP_DATA[0]  FIC100.SV  FIC100.CLI  LP_P  LP_PARA[0]  FIC100.OA  FIC100.TAG[0]  The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  RH  REAL  R  PV range high [Engineering unit]  Used for percent conversion of SV/PV  Referenced  by LP_P.PVP  RL  REAL  R  PV range low [Engineering unit]  Used for percent conversion of SV/PV  MODE  UINT  R  control mode:Used for control operation execution,  reset condition  CLI  BOOL  R  Control stop alarm    Used for control operation reset  condition  MVE  BOOL  R  MV error    Used for control operation reset condition SMV  BOOL  R  Sequence MV    Used for control operation reset  condition  LP_D  (LP_DATA)  CMV  BOOL  R  Computer MV    Used for control operation reset  condition  PVP  UINT  R  Indicator PV No.  KP  REAL  R  Proportional gain    Used as PID gain  TI  REAL  R  Integral time [min]    Used as PID integral time  TD  REAL  R  Rate time [min]    Used as PID rate time  ETA  REAL  R  Rate gain      Used as PID rate gain parameter  ALP  REAL  R  2 degrees of freedom parameter α SV filter  parameter  BET  REAL  R  2 degrees of freedom parameter β SV filter  parameter  GAM  REAL  R  2 degrees of freedom parameter γ SV filter  parameter  GAP  REAL  R  Gap:Used as rate limiter condition in non-linear  operation  GG  REAL  R  Gap gain:Used as rate limiter coefficient in non-linear  operation  MH  REAL  R  MV high limit value[%]  ML  REAL  R  MV low limit value[%]  DMV  REAL  R  MV rate limiter[%/scan time]  CDR  BOOL  R  Control direction    Used as sign of PID operation  T0  UINT  R  Sample PI sample cycle  (A number indicating integral multiple of scan time)  LP_P  (LP_PARA)  T1  UINT  R  Sample PI control time  (A number indicating integral multiple of scan time)  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  614    ●  Instance structure    Name  Type  Description  Remarks  MV  REAL  Result output (MV) [%] (positional type)  Can be accessed from  the user program    B4MODE  UINT  Control mode previous value (initial value: M)    Used to detect change in control mode  CT  REAL  Actual time totalization (initial value: Main scan  cycle)    Used for scan time measurement  B4E  REAL  P term previous value (initial value: SV-PV)  During speed type operation, this is used to  calculate the speed component from difference  with previous value  B4D  REAL  SV filter differential term input previous value  (initial value:αγSV-PV)  Used to calculate change in input in differential  approximation operation  B5D  REAL  SV filter differential term input next to previous  value (initial value: αγ SV-PV)  Used for exact differential term in improved  bilinear primary transformation  B4D1  REAL  SV filter differential term (initial value: 0)    SV filter  αγ term  B4D2  REAL  SV filter proportional/integral term (initial value:  (1-α)SV) αβ term of SV filter  B4MV  REAL  MV totalization limit previous value (initial value:  TR)  High/low rate limiter previous MV totalization value  (proportional/differential term assurance)  B4FFD  REAL  Feed forward dynamic characteristic difference  calculation previous value (initial value: FFD)  Previous value for adding dynamic characteristic  by difference  Cannot be accessed  from the user program    ●  Function  ·  There is no execution flag.    This instruction is always executed.    If the operation  must be reset, set MVT as initialization request.    In this case, TR is also necessary in  order to initialize MV.    ·  The result of executing the feed forward instruction (FFD_P) can be used as input  (GAN, FFS, FFD) to feed forward.    If feed forward is not used, use fixed values  (GAN=1, FFS=0, FFD=0).    ·  The PV parameter variable is referenced with the indicator PV No. (PVP) of the LP  parameter variable.  ·  The following variables can be specified for the LP data variables and LP parameter  variables:    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  615    Controller    Variable    Integrated Controller V series  L controller  LP tag data / parameter variable  Unified Controller nv series  type2  LP tag data / parameter variable    ·  Control operation function  Hyper PID is used for control operation. Output is the high/low rate limited positional  type MV value.    SV filter:  An SV filter with super 2 degrees of freedom PID is implemented.    Hyper PID adds  a delay filter to SV in order to reduce the change in MV even when SV changes  suddenly.    This SV filter is not related to change in PV and PV change  (disturbance) characteristic is unchanged.    When tuning PID, set the parameters to  be appropriate for the disturbance.    Under this condition, the filter status can be  optimized for the step change of SV.    The 2 degrees of freedom parameters (α, β, γ) of hyper PID are semi-fixed values.    Under normal condition, the initial values can be used without change.    The SV filter includes differential operation.    This differential operation uses an  improved bilinear transformation that is an improved version of the bilinear  transformation which is a popular digital operation.    Under normal condition,  bilinear transformation is used and a switch is made to exact differential when the  rate time setting is relatively shorter than the scan time.    The rate time can be  changed during control operation without problem.    The SV filter operation is performed during each scan cycle. Control operation is  performed based on the specified control cycle (T0, T1).  Anti-reset windup:  An anti-reset windup (AR/W) function is added to cancel the excessive saturation of  the integrating term. The method used here suppresses the change in the saturating  direction of the integrating term when MV is saturated at high/low limit. Also, the  internal MV totalization is high/low limited by high limit (MH+MV rate limiter) and low  limit (ML-MV rate limiter).    Although the AR/W function is provided, a slight reset windup condition occurs. This  is designed to prevent MV from changing when there is a minute change in  disturbance (change in PV) and SV when MV is saturated. Therefore, if SV is  reversed when MV is saturated, tracking by MV may be delayed. In such case,  handle this from the application program by changing the control mode to M mode  and tracking manually, or temporarily switching to non-PID control operation and  using batch processing control for example.    Non-linear processing:  A gap function is incorporated as non-linear PID. When the deviation is within the  gap width, the change in MV output is suppressed by multiplying the rate limiter by  gap gain.  Chapter 2    LD/FBD Instructions  6F8C1226  616    Sampling and control:  The sample PI adjusts the time where control is intermittent in the control cycle of the  PID operation.    Output is updated during the control time (T1) at the front half of the sample time (T0).    CL  MV  Control time T1  Sample time  T0      In sample PI, control operation is executed continuously during T1. Unlike intermittent  control withΔT of PID, the operation cycle is always the scan cycle. Therefore, the  continuity of the proportional term and differential term is broken. This discontinuity is  handled by initializing the proportional term and differential term each time control  execution is started (beginning of T1).    The SV filter section is calculated during each cycle irrelevant of T0 and T1.    ●  Program example  [LD/FBD language notation]      SPI_P  FIC100.MV   ST  FIC100.PV   LD  1    LD  PV  GAN  FFS  PID_01  0    LD  FFD  MV  0    LD  FIC100.MV   LD  TR  0    LD  MVT  FIC100.SV   LD  LP_D  FIC100.SV   LD  SV  FIC100.OA   LD  LP_P  Variables:  Variable  Data type  Dec.  PID_01  SPI_P  VAR  Controller Variables:  Variable  Data type  !FIC100  typeLP_PARA !FIC100  typeLP_DATA  !FIC100  typePV_DATA In case of L1  Scan cycle: 0.5s  Sample time (T0): 20  Control time (T1): 5    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  617      [ST language notation]  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.MV, 0, FIC100.SV, FIC100.OA);  FIC100.MV := PID_01.MV;    ·  Performs sample PI operation of adjuster tag (FIC100) (Sample time: 10s, control  time: 2.5s).  ·  This example uses basic PID (feed forward not used). For advanced PID, see the  program example (assuming PID_P as SPI_P) for the feed forward instruction (feed  forward used).    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller    Action    Integrated Controller  V series  L controller  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value.    ·  If RH=RL, the divide error flag is set to TRUE(ON) and the previous value is held in  output.  ·  The following operation is performed if the LP data or LP parameter specification is  invalid:    Controller    Action  Integrated Controller  V series  L controller  When variable other than LP tag data/parameter is  specified, table operation error is set to TRUE(ON) and  output is previous value.  Unified Controller nv series  When variable other than LP tag data/parameter is  specified, error flag and table operation error are set to  TRUE(ON) and output is previous value.    ●  Notes  ·  MV output when control is stopped  When PID operation is stopped because of tracking request or control stop warning,  the output is as follows depending on the condition for stopping.    Stop condition  MV output    Tracking request flag (TR)=ON  Tracking MV input (TR)  Mode=M or RM  Tracking MV input (TR)  When mode changes  Previous MV (held)  Control stop warning (CLI)=ON or MV error (MVE)=ON  Previous MV (held)  Setting MV (SMV=ON or CMV=ON)  Tracking MV input (held)  Chapter 2    LD/FBD Instructions  6F8C1226  618    Pulse Output PID    Process Control  Pulse Output PID    LD/FBD language  notation    Result output (ΔMV)  PIDP_P    SV      DMV     PV    CL     GAN      FFS      MVT      LP_D      LP_P  Instance name SV input PV input Feed forward gain Feed forward static characteristi c Tracking request flag LP data variable LP parameter variable Output request      EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( SV, PV, GAN, FFS, MVT, LP_D, LP_P );  [Variable name]:=[Instance name]. DMV;  [Variable name]:=[Instance name]. CL;    ●  Arguments    Arg.  Operand  Type  Const.  Description  SV  REAL  ○   SV input [Engineering value]  PV  REAL  ○   PV input [Engineering value]  GAN  REAL  ○   Feed forward gain  PID proportional gain compensation    Specify 1.0 when feed forward is not used  FFS  REAL  ○   Feed forward static characteristic [%]  Specify 0.0 when feed forward is not used  MVT  BOOL  ○   Tracking request flag  LP_D  PTR  —  LP data variable  Input  LP_P  PTR  —  LP parameter variable  DMV  REAL  —  Result output (ΔMV) [%] (speed type)  Output  CL  BOOL  —  Output request    Pulse output update request   Pointers to tag table are placed in LP data variable and LP parameter variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Tag symbol  Notation  Operand  Array  MCS connection  version (L1, L2, L3) DS connection version  (L2DS, L3DS) (Type2)  LP_D  LP_DATA[0]  FIC100.SV  FIC100.CLI  LP_P  LP_PARA[0]  FIC100.OA  FIC100.TAG[0]  2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  619    The following tag symbols are referenced by this instruction:      Operand  Symbol  Type  R/W Description  RH  REAL  R  PV range high [Engineering unit]  Used for percent conversion of SV/PV  Referenced  by LP_P.PVP  RL  REAL  R  PV range low [Engineering unit]  Used for percent conversion of SV/PV  MODE  UINT  R  control mode:Used for control operation execution, reset  condition  CLI  BOOL  R  Control stop alarm    Used for control operation reset  condition  MVE  BOOL  R  MV error    Used for control operation reset condition  SMV  BOOL  R  Sequence MV    Used for control operation reset condition  CMV  BOOL  R  Computer MV    Used for control operation reset condition  LP_D  (LP_DATA)  VPI  BOOL  R  Valve position input error    Used as MV high/low limit  condition  PVP  UINT  R  Indicator PV No.  DT0  UINT  R  Scan time (number indicating multiple of scan time)  KP  REAL  R  Proportional gain    Used as PID gain  TI  REAL  R  Integral time [min]    Used as PID integral time  TD  REAL  R  Rate time [min]    Used as PID rate time  ETA  REAL  R  Rate gain      Used as PID rate gain parameter  ALP  REAL  R  2 degrees of freedom parameter α    SV filter parameter  BET  REAL  R  2 degrees of freedom parameter β    SV filter parameter  GAM  REAL  R  2 degrees of freedom parameter γ    SV filter parameter  GAP  REAL  R  Gap:Used as rate limiter condition in non-linear operation  GG  REAL  R  Gap gain:Used as rate limiter coefficient in non-linear  operation  MH  REAL  R  MV high limit value[%]  ML  REAL  R  MV low limit value[%]  DMV  REAL  R  MV rate limiter[%/scan time]  CDR  BOOL  R  Control direction    Used as sign of PID operation  LP_P  (LP_PARA)  VP  UINT  R  Valve position input PV No.    Used as the presence of valve position input which is the  basis of pulse output high/low limit  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  620    ●  Instance structure    Name  Type  Description  Remarks  DMV  REAL  Result output (ΔMV) [%] (speed type)  Can be accessed  from the user  program.  CL  BOOL  Output request    Pulse output update request  B4MODE  UINT  Control mode previous value (initial value: M)    Used to  detect change in control mode  CT  REAL  Actual time totalization (initial value: Main scan cycle)    Used for scan time measurement  B4E  REAL  P term previous value (initial value: SV-PV)  During speed type operation, this is used to calculate the  speed component from difference with previous value  B4D  REAL  SV filter differential term input previous value (initial value:  αγSV-PV)  Used to calculate change in input in differential  approximation operation  B5D  REAL  SV filter differential term input next to previous value  (initial value: αγSV-PV)  Used for exact differential term in improved bilinear  primary transformation  B4D1  REAL  SV filter differential term (initial value: 0)    SV filter αγ  term  B4D2  REAL  SV filter proportional/integral term (initial value: (1-α)SV)    αβ term of SV filter  Cannot be accessed  from the user  program.    ●  Function  ·  There is no execution flag.    This instruction is always executed.    If the operation  must be reset, set MVT as initialization request.    ·  The result of executing the feed forward instruction (FFD_P) can be used as input  (GAN, FFS) to feed forward. If feed forward is not used, use fixed values (GAN=1,  FFS=0).    ·  The PV parameter variable is referenced with the indicator PV No. (PVP) of the LP  parameter variable.  ·  The following variables can be specified for the LP data variables and LP parameter  variables.      Controller    Variable    Integrated Controller V series  L controller    LP tag data/parameter variable  Unified Controller nv series  type2  LP tag data/parameter variable    ·  Control operation function  Hyper PID is used for control operation.    Output is the high/low rate limited positional type MV value.    SV filter:  An SV filter with super 2 degrees of freedom PID is implemented.    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  621  Hyper PID adds a delay filter to SV in order to reduce the change in MV even when SV  changes suddenly.    This SV filter is not related to change in PV and PV change  (disturbance) characteristic is unchanged.    When tuning PID, set the parameters to  be appropriate for the disturbance.    Under this condition, the filter status can be  optimized for the step change of SV.    The 2 degrees of freedom parameters (α,  β, γ) of hyper PID are semi-fixed values.    Under normal condition, the initial values can be used without change.    The SV filter includes differential operation.    This differential operation uses an  improved bilinear transformation that is an improved version of the bilinear  transformation which is a popular digital operation.    Under normal condition, bilinear  transformation is used and a switch is made to exact differential when the rate time  setting is relatively shorter than the scan time.    The rate time can be changed during  control operation without problem.    The SV filter operation is performed during each scan cycle.    Control operation is  performed based on the specified control cycle (DT0).  Non-linear processing:  A gap function is incorporated as non-linear PID.    When the deviation is within the gap width, the change in MV output is suppressed by  multiplying the rate limiter by gap gain.    ●  Program example  [LD/FBD language notation]      PIDP_P  FIC100.PV    LD  1    LD  PV  GAN  FFS  PID_01  FIC100.PMV   ST  DMV 0    LD  0    LD  MVT  FIC100.SV    LD  LP_D  FIC100.SV    LD  SV  FIC100.OA    LD  LP_P  Variables:  Variable  Data type  Dec.  PID_01  PIDP_P  VAR  Controller Variables:  Variable  Data type  !FIC100  typeLP_PARA !FIC100  typeLP_DATA  !FIC100  typePV_DATA In case of L1  FIC100.POR   ST  CL     [ST language notation]  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.SV, FIC100.OA);  FIC100.PMV := PID_01.DMV;  FIC100.POR := PID_01.CL;    Chapter 2    LD/FBD Instructions  6F8C1226  622  ·  Performs PID operation of adjuster tag (FIC100).    ·  This example directly outputs to pulse output ΔMV (PMV) and pulse output request  (POR) of the adjuster tag.    ·  This example uses basic PID (feed forward not used).    For advanced PID, see the  program example for the feed forward instruction (feed forward used).    ●  Error information  The following operation is performed when the input data type is REAL:    Controller    Action  Integrated Controller  V series  L controller    If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  If RH=RL, the divide error flag is set to TRUE(ON) and the previous value is held in  output.  ·  The following operation is performed if the LP data or LP parameter specification is  invalid:      Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data/parameter is    specified, table operation error is set to TRUE(ON)  and output is previous value.  Unified Controller nv series  When variable other than LP tag data/parameter is    specified, error flag and table operation error are set  to TRUE(ON) and output is previous value.      2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  623    Pulse Output Sample PI   Process Control  Pulse Output Sample PI    LD/FBD language  notation    Result output (ΔMV)  SPIP_P    SV    DMV     PV    CL     GAN      FFS      MVT      LP_D      LP_P  Instance name SV input PV input Feed forward gain Feed forward stati c characteri stic Tracking request fl ag LP data vari able LP parameter vari able Output request      EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( SV, PV, GAN, FFS, MVT, LP_D, LP_P );  [Variable name]:=[Instance name]. DMV;  [Variable name]:=[Instance name]. CL;    ●  Arguments    Arg.  Operand  Type  Const.  Description  SV  REAL  ○   SV input [Engineering value]  PV  REAL  ○   PV input [Engineering value]  GAN  REAL  ○   Feed forward gain  PID proportional gain compensation    Specify 1.0 when feed forward is not used  FFS  REAL  ○   Feed forward static characteristic [%]  Specify 0.0 when feed forward is not used  MVT  BOOL  ○   Tracking request flag  LP_D  PTR  —  LP data variable  Input  LP_P  PTR  —  LP parameter variable  DMV  REAL  —  Result output (ΔMV) [%] (speed type)  Output  CL  BOOL  —  Output request    Pulse output update request   Pointers to tag table are placed in LP data variable and LP parameter variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.      Tag symbol  Notation  Operand  Array  MCS  connection version  (L1, L2, L3)  DS  connection version  (L2DS, L3DS) (Type2)  LP_D  LP_DATA[0]  FIC100.SV  FIC100.CLI  LP_P  LP_PARA[0]  FIC100.OA  FIC100.TAG[0]  Chapter 2    LD/FBD Instructions  6F8C1226  624    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  RH  REAL  R  PV range high [Engineering unit]  Used for percent conversion of SV/PV  Referenced  by LP_P.PVP    RL  REAL  R  PV range low [Engineering unit]  Used for percent conversion of SV/PV  MODE  UINT  R  control mode:Used for control operation execution, reset  condition  CLI  BOOL  R  Control stop alarm    Used for control operation reset  condition  MVE  BOOL  R  MV error    Used for control operation reset condition  SMV  BOOL  R  Sequence MV    Used for control operation reset  condition  CMV  BOOL  R  Computer MV    Used for control operation reset  condition  LP_D  (LP_DATA)  VPI  BOOL  R  Valve position input error    Used as MV high/low limit  condition  PVP  UINT  R  Indicator PV No.  KP  REAL  R  Proportional gain    Used as PID gain  TI  REAL  R  Integral time [min]    Used as PID integral time  TD  REAL  R  Rate time [min]    Used as PID rate time  ETA  REAL  R  Rate gain      Used as PID rate gain parameter  ALP  REAL  R  2 degrees of freedom parameter α    SV filter parameter BET  REAL  R  2 degrees of freedom parameter β    SV filter parameter GAM  REAL  R  2 degrees of freedom parameter γ    SV filter parameter GAP  REAL  R  Gap:Used as rate limiter condition in non-linear  operation  GG  REAL  R  Gap gain:Used as rate limiter coefficient in non-linear  operation  MH  REAL  R  MV high limit value[%]  ML  REAL  R  MV low limit value[%]  DMV  REAL  R  MV rate limiter[%/scan time]  CDR  BOOL  R  Control direction    Used as sign of PID operation  T0  UINT  R  Sample PI sample cycle  (A number indicating integral multiple of scan time)  T1  UINT  R  Sample PI control time  (A number indicating integral multiple of scan time)  LP_P  (LP_PARA)  VP  UINT  R  Valve position input PV No.    Used as the presence of  valve position input which is the basis of pulse output  high/low limit  R/W: R=Read only, W=Write only, R/W=Read/Write    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  625    ●  Instance structure    Name  Type  Description  Remarks  DMV  REAL  Result output (ΔMV) [%] (speed type)  CL  BOOL  Output request    Pulse output update request  Can be accessed  from the user  program.  B4MODE  UINT  Control mode previous value (initial value: M)    Used  to detect change in control mode  CT  REAL  Actual time totalization (initial value: Main scan cycle)  Used for scan time measurement  B4E  REAL  P term previous value (initial value: SV-PV)  During speed type operation, this is used to calculate  the speed component from difference with previous  value  B4D  REAL  SV filter differential term input previous value (initial  value: αγ SV-PV)  Used to calculate change in input in differential  approximation operation  B5D  REAL  SV filter differential term input next to previous value  (initial value: αγ SV-PV)  Used for exact differential term in improved bilinear  primary transformation  B4D1  REAL  SV filter differential term (initial value: 0)    SV filter αγ  term  B4D2  REAL  SV filter proportional/integral term (initial value:  (1-α)SV)    αβ term of SV filter  Cannot be  accessed from  the user program.   ●  Function  ·  There is no execution flag.    This instruction is always executed.    If the operation  must be reset, set MVT as initialization request.    ·  The result of executing the feed forward instruction (FFD_P) can be used as input  (GAN, FFS) to feed forward. If feed forward is not used, use fixed values (GAN=1,  FFS=0).    ·  The PV parameter variable is referenced with the indicator PV No. (PVP) of the LP  parameter variable.  ·  The following variables can be specified for the LP data variables and LP parameter  variables:      Controller    Variable    Integrated Controller V series L controller  LP tag data/parameter variable  Unified Controller nv series  type2  LP tag data/parameter variable    ·  Control operation function  Hyper PID is used for control operation.    The high/low rate limited speed type ΔMV value and output request flag indicating the  pulse update timing are output.  SV filter:  An SV filter with super 2 degrees of freedom PID is implemented.    Chapter 2    LD/FBD Instructions  6F8C1226  626  Hyper PID adds a delay filter to SV in order to reduce the change in MV even when SV  changes suddenly.    This SV filter is not related to change in PV and PV change  (disturbance) characteristic is unchanged.    When tuning PID, set the parameters to  be appropriate for the disturbance.    Under this condition, the filter status can be  optimized for the step change of SV.    The 2 degrees of freedom parameters (α, β, γ) of hyper PID are semi-fixed values.    Under normal condition, the initial values can be used without change.    The SV filter includes differential operation.    This differential operation uses an  improved bilinear transformation that is an improved version of the bilinear  transformation which is a popular digital operation.    Under normal condition, bilinear  transformation is used and a switch is made to exact differential when the rate time  setting is relatively shorter than the scan time.    The rate time can be changed during  control operation without problem.    The SV filter operation is performed during each scan cycle.    Control operation is  performed based on the specified control cycle (T0, T1).    Non-linear processing:  A gap function is incorporated as non-linear PID.    When the deviation is within the gap width, the change in MV output is suppressed by  multiplying the rate limiter by gap gain.  Sampling and control:  The sample PI adjusts the time where control is intermittent in the control cycle of the  PID operation.    Output is updated during the control time (T1) at the front half of the sample time (T0).          CL  MV  Control time  T1  Sample time  T0      In sample PI, control operation is executed continuously during T1.    Unlike  intermittent control with ΔT of PID, the operation cycle is always the scan cycle.    Therefore, the continuity of the proportional term and differential term is broken.    This  discontinuity is handled by initializing the proportional term and differential term each  time control execution is started (beginning of T1).    The SV filter section is calculated during each cycle irrelevant of T0 and T1.  2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  627    ●  Program example  [LD/FBD language notation]      SPIP_P  FIC100.PV   LD  1    LD  PV  GAN  FFS  PID_01  FIC100.PMV   ST  DMV  0    LD  0    LD  MVT  FIC100.SV   LD  LP_D  FIC100.SV   LD  SV  FIC100.OA   LD  LP_P  Variables:  Variable  Data type  Dec.  PID_01  SPIP_P  VAR  Controller Variables:  Variable  Data type  !FIC100  typeLP_PARA  !FIC100  typeLP_DATA  !FIC100  typePV_DATA  In case of L1  FIC100.POR   ST  CL  Scan cycle: 0.5s  Sample time (T0): 20  Control time (T1): 5      [ST language notation]  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.SV, FIC100.OA);  FIC100.PMV := PID_01.DMV;  FIC100.POR := PID_01.CL;    ·  Performs sample PI operation of adjuster tag (FIC100) (Sample time: 10s, control  time: 2.5s).  ·  This example outputs directly to adjuster tag pulse output ΔMV (PVM) and pulse  output request (POR).    ·  This example uses basic PID (feed forward not used). For advanced PID, see the  program example (assuming PIDP_P as SPIP_P) for the feed forward instruction  (feed forward used).    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller  Action  Integrated Controller  V series  L controller  If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum value. Chapter 2    LD/FBD Instructions  6F8C1226  628    ·  If RH=RL, the error flag and divide error flag are set to TRUE(ON) and the previous  value is held in output.  ·  The following operation is performed if the LP data or LP parameter specification is  invalid:      Controller    Action  Integrated Controller  V series  L controller  When variable other than LP tag data/parameter is    specified, table operation error is set to TRUE(ON)  and output is previous value.  Unified Controller nv series  When variable other than LP tag data/parameter is    specified, error flag and table operation error are set  to TRUE(ON) and output is previous value.      2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  629    Feed Forward   Process Control  Feed Forward    LD/FBD language  notation    Feed forward static characteristi c  Feed forward dynamic characteristi c  MV gain  FFD_P      Instance name Input vari able Feed forward parameter LP data vari able X    FF_P   LP_D GAN FFS FFD EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( X, FF_P, LP_D );  [Variable name]:=[Instance name]. GAN;  [Variable name]:=[Instance name]. FFS;  [Variable name]:=[Instance name]. FFD;    ●  Arguments    Arg.  Operand  Type  Const.  Description  X  REAL  ○   Input variable [Engineering value]  FF_P  PTR  —  Feed forward parameter variable  Input  LP_D  PTR  —  LP data variable  GAN  REAL  —  Feed forward gain  FFS  REAL  —  Feed forward static characteristic [%]  Output  FFD  REAL  —  Feed forward dynamic characteristic [%]  A pointer to tag table is placed in LP data variable.  A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Tag symbol  Notation  Operand  Array  MCS  connection version (L1, L2, L3)  DS  connection version  (L2DS, L3DS) (Type2)  LP_D  LP_DATA[0]  FIC100.SV  FIC100.CLI  The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  MODE  UINT  R  Control mode  Used for control operation execution, reset condition  CLI  BOOL  R  Control stop alarm    Used for control operation reset condition  MVE  BOOL  R  MV error  Used for control operation execution, reset condition  SMV  BOOL  R  Sequence MV  Used for control operation execution, reset condition  LP_D  (LP_DATA)  CMV  BOOL  R  Computer MV  Used for control operation execution, reset condition  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  630    ●  Feed forward parameter structure    Name  Type  Description  K  REAL  Gain  K0  REAL  Supplementary gain  H  REAL  Gain high limit  L  REAL  Gain low limit  X0  REAL  MV standard value  C  REAL  MV coefficient  TP  REAL  Process time constant  TD  REAL  Disturbance time constant  DB  REAL  Output dead band    The feed forward parameters are created from a combination of user defined structures  and user variables.    ●  Instance structure    Name  Type  Description  Remarks  GAN  REAL  Feed forward gain  FFS  REAL  Feed forward static characteristic [%]  FFD  REAL  Feed forward dynamic characteristic [%] Can be accessed from  the user program  B4MODE UINT  Control mode previous value (initial  value: M)    Used to detect change in  control mode  B4D  REAL  Feed forward dynamic characteristic  input value  B4Y  REAL  Feed forward dynamic characteristic  temporary delay  Cannot be accessed  from the user program   ●  Function  ·  There is no execution flag. This instruction is always executed.    ·  The following variables can be specified for the LP data variables and FF parameter  variables:      Controller    Variable    Integrated Controller  V series  L controller  LP tag data/FF parameter variable  Unified Controller nv series  type2  LP tag data/FF parameter variable    ·  Control operation function  Three types of output, gain compensation (GAN), static characteristic compensation  (FFS),  and  dynamic  characteristic  compensation  (FFD)  are  calculated  as  gain  scheduling type feed forward.  2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  631          K    K0    HL  limit    Non-linearize  X  +  -  Difference  FFD  FFS GAN   1 + (Dn - X0) C / X0 1 + TPS  1 + TDS      ●  Program example  [LD/FBD language notation]        Variables:  Variable  Data type  Dec.  PID_01  PID_P  VAR  FFD_1  FFD_P  VAR  Controller Variables:  Variable  Data type  !FIC100  typeLP_PARA  !FIC100  typeLP_DATA  !FIC100  typePV_DATA  !IND100  typePV_DATA  FF_P  typeFFD_PARA  In case of L1  PID_P  FIC100.PV   LD  PV FFS PID_01  GAN FFD  FIC100.MV   ST  MV FIC100.MV   LD  TR  0    LD  MVT  FIC100.SV   LD  LP_D  FIC100.SV   LD  SV  FIC100.OA   LD  LP_P FFD_P  FF_P   LD  FF_P  FFD_1  FIC100.SV   LD  LP_D  IND100.PV   LD  X  GAN  FFS  FFD  User defined structure  typeFFD_PARA:  Member  Data type  K  Real  K0  Real  H  Real  L  Real  X0  Real  C  Real  TP  Real  TD  Real  DB  Real  [ST language notation]  FFD_1(IND100.PV, FF_P, FIC100.SV);  PID_01( FIC100.SV, FIC100.PV, FFD_1.GAN, FFD_1.FFS, FFD_1.FFD, FIC100.MV,  0, FIC100.SV, FIC100.OA);  FIC100.MV := PID_01.MV;    ·  Performs PID operation of adjuster tag (FIC100) with feed forward of disturbance  element (IND100.PV) added.  Chapter 2    LD/FBD Instructions  6F8C1226  632    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller    Action  Integrated Controller  V series  L controller    If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  The following operation is performed if the LP or FF parameter specification is invalid:    Controller    Action  Integrated Controller  V series  L controller  When variable other than LP tag data /FF parameter  is specified, table operation error is set to TRUE(ON)  and output is previous value.  Unified Controller nv series  When variable other than LP tag data /FF parameter  is specified, error flag and table operation error are  set to TRUE(ON) and output is previous value.    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  633    Double Cross Limit    Process Control  Double Cross Limit    LD/FBD language  notation    Fuel adjuster SV  DCL_P  PV      FSV AIR    ASV FUEL  FTR  ATR  DCL_P  LP_FD  LP_FP  LP_AD  LP_AP  Instance name Master input variable Air flow Fuel flow Fuel MV tracking value Air MV tracking value Fuel LP data variable Fuel LP parameter variable Air adjuster SV  Air LP data variable Air LP parameter variable Double cross limit parameter EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( PV, AIR, FUEL, FTR, ATR, DCL_P, LP_FD, LP_FP,  LP_AD, LP_AP );  [Variable name]:=[Instance name]. FSV;  [Variable name]:=[Instance name]. ASV;    ●  Arguments    Arg.  Operand  Type  Const.  Description  PV  REAL  ○   Master input variable [%]  AIR  REAL  ○   Air flow [Engineering value]  FUEL  REAL  ○   Fuel flow [Engineering value]  FTR  REAL  ○   Fuel MV tracking value [Engineering value]  ATR  REAL  ○   Air MV tracking value [Engineering value]  DCL_P  PTR  —  Double cross limit parameter table  LP_FD  PTR  —  Fuel LP data variable  LP_FP  PTR  —  Fuel LP parameter variable  LP_AD  PTR  —  Air LP data variable  Input  LP_AP  PTR  —  Air LP parameter variable  FSV  REAL  —  Fuel adjuster SV [Engineering value]  Output  ASV  REAL  —  Air adjuster SV [Engineering value]    Chapter 2    LD/FBD Instructions  6F8C1226  634    Pointers to tag table are placed in LP data variable and LP parameter variable.    A setup example is shown below.    Array No.=0, tag No.=FIC100 are assumed for the  used adjuster tag.    Tag symbol  Notation  Operand  Array  MCS  connection  version  (L1, L2, L3)  DS  connection version  (L2DS, L3DS) (Type2)  LP_FD, LP_AD  LP_DATA[0]  FIC100.SV  FIC100.CLI  LP_FP, LP_AP  LP_PARA[0]  FIC100.OA  FIC100.TAG[0]  The following tag symbols are referenced by this instruction.    Operand  Symbol  Type  R/W Description  RH  REAL  R  PV range high [Engineering unit]  Used for percent conversion of AIR/FUEL  Referenced by  LP_FP/AP.PV  (PV_PARA)  RL  REAL  R  PV range low [Engineering unit]  Used for percent conversion of AIR/FUEL  LP_FP/AP  (LP_PARA)  PVP  UINT  R  Indicator PV No.  R/W: R=Read only, W=Write only, R/W=Read/Write    ●  Double cross limit parameter structure    Name  Type  Description  K1  REAL  Smoke emitting limit when load is increasing [%]  K2  REAL  Smoke emitting limit when load is decreasing [%]  K3  REAL  Air excess limit when load is decreasing [%]  K4  REAL  Air excess limit when load is increasing [%]  BETA  REAL  Transform coefficient (β > 0)  MU  REAL  Air excess rate (μ > 0)  L  REAL  Air low limit [%]  ADV  REAL  (Not used)  FDV  REAL  (Not used)  The  double  cross  limit  parameters  are  created  from  a  combination  of  user  defined  structures and user variables.    ●  Instance structure    Name  Type  Description  Remarks  FSV  REAL  Air flow SV [Engineering value]  ASV  REAL  Fuel flow SV [Engineering value] Can be accessed from the  user program  B4FMODE  UINT  (Not used)  B4AMODE  UINT  (Not used)  PD1  REAL  (Not used)  PD2  REAL  (Not used)  DLM1  REAL  (Not used)  DLM2  REAL  (Not used)  Cannot be accessed from  the user program  2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  635    ●  Function  ·  There is no execution flag. This instruction is always executed.    ·  The following variables can be specified for the LP data variables, LP parameter  variables and DCL parameter variables:      Controller    Variable    Integrated Controller  V series  L controller  LP tag data /parameter variable    DCL parameter variable  Unified Controller nv  series  type2  LP tag data /parameter variable    DCL parameter variable    ·  Control operation function  The fuel and air settings are calculated using combustion control as a model.        UNIT  MED 1 βμ   %  100-K3  100  100+K1  100    UNIT  βμ L low  limit MED Master  input  AIR.PV  F   %    A FUEL.PV  100+K4  100  100-K2  100    Chapter 2    LD/FBD Instructions  6F8C1226  636    ●  Program example  [LD/FBD language notation]        Variables:  Variable  Data type  Dec.  PID_01  PID_P  VAR  PID_02  PID_P  VAR  PID_03  PID_P  VAR  DCL_01 typeDCL_PARA  VAR                        Controller variable:  Variable  Data type  !DIC100  typeLP_PARA  !DIC100  typeLP_DATA  !DIC100  typePV_DATA  !FIC100  typeLP_PARA  !FIC100  typeLP_DATA  !FIC100  typePV_DATA  !AIC100  typeLP_PARA  !AIC100  typeLP_DATA  !AIC100  typePV_DATA    In case of L1  User defined structure  typeDCL_PARA:  Member    Data type K1  Real  K2  Real  K3  Real  K4  Real  BETA  Real  MU  Real  L  Real  ADV  Real  FDV  Real    PID_P    DIC100.PV  LD  PV  FFS  PID_01  GAN  FFD    DIC100.MV  ST  MV   DIC100.MV  LD  TR    0  LD  MVT    DIC100.SV  LD  LP_D    DIC100.SV  LD  SV    DIC100.OA  LD  LP_P      LD    0  LD    0  LD  PID_P    FIC100.PV  LD  PV  FFS  PID_02  GAN  FFD    FIC100.MV  ST  MV   FIC100.MV  LD  TR    0  LD  MVT    FIC100.SV  LD  LP_D    FIC100.SV  LD  SV    FIC100.OA  LD  LP_P      LD    0  LD    0  LD  PID_P    AIC100.PV LD  PV FFS  PID_03  GAN FFD    AIC100.MV ST  MV   AIC100.MV LD  TR    0  LD  MVT    AIC100.SV LD  LP_D    AIC100.SV LD  SV    AIC100.OA LD  LP_P      LD    0  LD    0  LD  DCL_P    AIC100.PV LD  AIR FTR  DCL_01  FUEL  ATR    DCL_P LD  DCL_P    DIC100.MV LD  PV    FIC100.SV LD  LP_FD   FIC100.OA LD  LP_FP   FIC100.PV LD    FIC100.MV LD    AIC100.MV LD    AIC100.SV LD  LP_AD   AIC100.OA LD  LP_AP   FIC100.SV ST  FSV   AIC100.SV ST  ASV DCL control  Master PID  Fuel flow PID  Air flow PID    2.22    Process Control  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  637    [ST language notation]  (* Master PID *)  PID_01( DIC100.SV, DIC100.PV, 1, 0, 0, DIC100.MV, 0, DIC100.SV, DIC100.OA);  DIC100.MV := PID_01.MV;    (* DCL control *)  DCL_01( DIC100.MV, AIC100.PV, FIC100.PV, FIC100.MV, AIC100.MV, DCL_P,    FIC100.SV, FIC100.OA, AIC100.SV, AIC100.OA);  FIC100.SV := DCL_01.FSV;  AIC100.SV := DCL_01.ASV;    (* Fuel flow PID *)  PID_02( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.MV, 0, FIC100.SV, FIC100.OA);  FIC100.MV := PID_02.MV;    (* Air flow PID *)  PID_03( AIC100.SV, AIC100.PV, 1, 0, 0, AIC100.MV, 0, AIC100.SV, AIC100.OA);  AIC100.MV := PID_03.MV;    ·  Performs double cross limit control with master PID (DIC100) result output (MV) as  master input, gives that result to fuel flow PID(FIC100) and air flow PID(AIC100), and  optimizes the fuel flow and air flow.    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller    Action  Integrated Controller  V series  L controller    If NAN data is entered as input, the result is NAN.  If INF data is entered as input, the result is INF.  Unified Controller nv series  NAN and INF data are limited by the maximum  value.    ·  The fuel flow and air flow are calculated with % value as input when the respective  indicator is RH=RL.  ·  The following operation is performed when the LP data, LP parameter or DCL  parameter specification is invalid:      Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data/parameter,  DCL parameter is specified, table operation error is  set to TRUE(ON) and output is previous value.  Unified Controller nv series  When variable other than LP tag data/parameter,  DCL parameter is specified, error flag and table  operation error are set to TRUE(ON) and output is  previous value.    Chapter 2    LD/FBD Instructions  6F8C1226  638      2.23  Tag Operation    No.  Instruction  Remarks  1  Change Adjuster Mode CMLP_P  Changes the adjuster tag mode.    2  Change Push Button  Mode  CMPB_P  Changes the push button mode.    3  Change Sequence  Mode  CMSQ_P  Changes the sequence tag mode.    4  Set SV  SSV_P  Changes the SV value of the adjuster tag at  constant rate.    Used together with Reset SV.    5  Reset SV  RSV_P  Resets the change in SV value (Set SV) of the  adjuster tag. Used together with Set SV.    6  Set MV  SMV_P  Changes the MV value of the adjuster tag at  constant rate.    Used together with Reset MV.    7  Reset MV  RMV_P  Resets the change in MV value (Set MV) of the  adjuster tag. Used together with Set MV.    8  Shut CV  SCV_P  Sets the MV value of the adjuster tag to constant  value and changes the mode. Used together with  Reset MV.    9  Push Button ON  PB_P  Sets the push button tag button in pushed state  for 1 processing cycle.    10  Push Button Lock  LB_P  Sets the push button tag button in pushed state.  11  Action Timer  ACT_P  Performs timer action using the timer tag. The  timer execution status can be  monitored/manipulated easily from OIS.    12  Action Counter  ACC_P  Counts the program event every process cycle.  The counter execution status can be  monitored/manipulated easily from OIS.    13  Self Step Jump  SJ_P  Jumps the current active location of the SFC  allocated to the sequence tag.    14  Reset Jump  RJ_P  Resets all active locations of SFC allocated to the  sequence tag and jumps to a certain location.    15  Reset jump 2  RJ_P2  Resets all active locations of SFC allocated to the  sequence tag and jumps to a certain location  (corresponds with phase step 2).    16  SFC initialize  INI_STEP Clears all SFC steps including the specified initial  steps and activates the initial step.      The instructions of the Tag Operation are directives for the tags. Therefore it is important  to  understand  the  tag  structure  and  operation  to  use  the  instructions.  Refer  to  the  following materials for description of the tags:  ・ Integrated Controller V series model 3000/2000 Loop Controller L2/L3 User’s Manual-  Functions  6F8C0885  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  639    Change Adjuster Mode   Tag Operation  Change Adjuster Mode    LD/FBD language  notation    Execution control input Output  CMLP_P   E      MODE      LP_D  LP data variable Mode   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := CMLP_P( E, MODE, LP_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    MODE  UINT  ○   Mode (0:M, 1:A, 2:C, 3:RM)    Input  LP_D  PTR  —  LP data variable    Output  —  BOOL  —  Output      A pointer to tag table is placed in LP data variable.  A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Notation  Operand  Array  Tag symbol  LP_D  LP_DATA[0]  FIC100.CLI    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  LP_D  (LP_DATA)  MODE  UINT  W  Control mode  R/W: R=Read only, W=Write only, R/W=Read/Write    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the mode of the LP data variable  specified with LP_D is set to the value specified with MODE and TRUE(ON) is output  as the result.    Chapter 2    LD/FBD Instructions  6F8C1226  640    ·  The following variables can be specified for the LP data:    Controller    Variable    Integrated Controller  V series  L controller    LP tag data variable  Unified Controller  nv series  type2  LP tag data variable    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF)  TRUE(ON)  Sets the mode of the specified LP data variable.  TRUE(ON)    ●  Program example  [LD/FBD language notation]      SIGNAL1 1  LD  CMLP_P      1  LD  SIGNAL2 1  ST    FIC100.SV  LD  E  MODE  LP_D    [ST language notation]  SIGNAL2 := CMLP_P( SIGNAL1, 1, FIC100.SV);    ·  When the execution control input SIGNAL1 is TRUE(ON,) sets the adjuster tag  (FIC100) mode to A.    ●  Error information  ·  The following operation is performed when the LP parameter specification is invalid:        Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag parameter is  specified, table operation error is set to TRUE(ON)  and the result is FALSE(OFF).  Unified Controller nv series  When variable other than LP tag parameter is    specified, error flag and table operation error are set  to TRUE(ON) and the result is FALSE(OFF).    ·  If the mode is out of range (four or greater) the instruction is treated as no process.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  641    Change Push Button Mode   Tag Operation  Change Push Button Mode    LD/FBD language  notation    Execution control input Output  CMPB_P   E      MODE      PB_D  PB data variable Mode   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := CMPB_P( E, MODE, PB_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    MODE  UINT  ○   Mode (0:M, 1:A, 2:C, 3:RM)    Input  PB_D  PTR  —  PB data variable    Output  —  BOOL  —  Output      The C mode is valid only when tag type is 2PC in DC connection version. Otherwise, the  mode is M/A/RM.    A pointer to tag table is placed in PB data variable.  A setup example is shown below.  Array No.=0, tag No.=XV100 are assumed for the used push button tag.    Notation  Operand  Array  Tag symbol  PB_D  PB_DATA[0]  XV100.ASA    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  PB_D  (PB_DATA)  MODE  UINT  W  Control mode  Referenced by  PB_D  (PB_PARA)  TYPE  UINT  R  Tag type (used only in DS connection  version only)  (SOV/MOT/MOV/PB4/PB8/PB2/2PC)  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  642    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the mode of the PB data variable  specified with PB_D is set to the value specified with MODE and TRUE(ON) is output  as the result.  ·  The following variables can be specified for the PB data:      Controller    Variable  Integrated Controller V series  L controller    PB tag data variable  Unified Controller nv series  type2  PB tag data variable    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF)  TRUE(ON)  Sets the mode of the specified PB data variable  TRUE(ON)    ●  Program example  [LD/FBD language notation]      SIGNAL1 1  LD  CMPB_P      1  LD  SIGNAL2 1  ST    XV100.SCN  LD  E  MODE  LP_D    [ST language notation]  SIGNAL2 := CMPB_P( SIGNAL1, 1, XV100.SCN);    ·  When the execution control input SIGNAL1 is TRUE(ON), sets the push button tag  (XV100) mode to A.    ●  Error information  ·  The following operation is performed when invalid variable is specified for the PB  parameter:    Controller    Action  Integrated Controller  V series  L controller    When variable other than PB tag parameter is    specified, table operation error is set to TRUE(ON)  and the result is FALSE(OFF).  Unified Controller nv series  When variable other than PB tag parameter is  specified, error flag and table operation error are set  to TRUE(ON) and the result is FALSE(OFF).  ·  If the mode is out of range (four or greater) the instruction is treated as no process.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  643    Change Sequence Mode   Tag Operation  Change Sequence Mode    LD/FBD language  notation    Execution control input Output  CMSQ_P   E      MODE      SQ_D  SQ data variable Mode   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := CMSQ_P( E, MODE, SQ_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    MODE  UINT  ○   Mode (0:M,1:A, 2:C, 3:RM)    Input  SQ_D  PTR  —  SQ data variable    Output  —  BOOL  —  Output      A pointer to tag table is placed in SQ data variable.  A setup example is shown below.  Array No.=0, tag No.=SEQ100 are assumed for the used sequence tag.    Notation  Operand  Array  Tag symbol  SQ_D  SQ_DATA[0]  SEQ100.STA    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  SQ_D  (SQ_DATA)  MODE  UINT  W  Control mode  R/W: R=Read only, W=Write only, R/W=Read/Write    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the mode of the SQ data variable  specified with SQ_D is set to the value specified with MODE and TRUE(ON) is output  as the result.    Chapter 2    LD/FBD Instructions  6F8C1226  644  ·  The following variables can be specified for the SQ data:    Controller    Variable  Integrated Controller  V series  L controller    SQ tag data variable  Unified Controller  nv series  type2  SQ tag data variable    Execution  control input  Action  Output  FALSE(OFF)  —  FALSE(OFF)  TRUE(ON)  Sets the mode of the specified SQ data variable    TRUE(ON)    ●  Program example  [LD/FBD language notation]      SIGNAL1 1  LD  CMSQ_P      1  LD  SIGNAL2 1  ST    SEQ100.STA  LD  E  MODE  SQ_D      [ST language notation]  SIGNAL2 := CMSQ_P( SIGNAL1, 1, SEQ100.STA);    ·  When the execution control input SIGNAL1 is TRUE(ON), sets the sequence tag  (SEQ100) mode to A.    ●  Error information  ·  The following operation is performed when invalid variable is specified for the SQ  parameter:      Controller    Action  Integrated Controller  V series  L controller    When variable other than SQ tag parameter is  specified, table operation error is set to TRUE(ON)  and the result is FALSE(OFF).  Unified Controller nv series  When variable other than SQ tag parameter is  specified, error flag and table operation error are set  to TRUE(ON) and the result is FALSE(OFF).    ·  If the mode is out of range (four or greater) the instruction is treated as no process.    ·  When EN is used, ENO output is reset to OFF when the above error occurs.  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  645    Set SV    Tag Operation  Set SV    LD/FBD language  notation    Execution control input Output  SSV_P    E      SVP      SVK      SVT      LP_P      LP_D  Tilt Target value Tilt unit LP parameter variable LP data variable   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SSV_P( E, SVP, SVK, SVT, LP_P, LP_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    SVP  REAL  ○   Target value    SVK  REAL  ○   Tilt    SVT  REAL  ○   Tilt unit (1: sec./60:min./3600: hr)    LP_P  PTR  —  LP parameter variable    Input  LP_D  PTR  —  LP data variable    Output  —  BOOL  —  Output      Pointers to tag table are placed in LP parameter variable and LP data variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Notation  Operand  Array  Tag symbol  LP_P  LP_PARA[0]  FIC100.TAG[0]  LP_D  LP_DATA[0]  FIC100.CLI    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  SVP  REAL  R/W SV ramp target value  SVK  REAL  R/W SV ramp increment  LP_P  (LP_PARA)  SVT  REAL  R/W SV ramp time coefficient  LP_D  (LP_DATA)  SSV  BOOL  W  SEQ-SV intervention status  R/W: R=Read only, W=Write only, RW=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  646    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), sets the setup information (SVP,  SVK, SVT) of the LP parameter variable specified by LP_P to the value specified with  input argument, sets the SSV of LP data variable specified by LP_D to TRUE(ON),  and output TRUE(ON) as the result. (Start of Set SV directive)  ·  This instruction provides the setup information (SVP, SVK, SVT) and directive (SSV) to  perform ramp SV action, but does not perform the actual ramp SV action. A separate  program must be created to perform the ramp SV action. (See program example).  ·  This instruction is used together with the Reset SV (RSV_P) instruction.  ·  The following variables can be specified for the LP data/parameter:      Controller    Variable  Integrated Controller  V series  L controller    LP tag data/parameter variable  Unified Controller  nv series  type2  LP tag data/parameter variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Starts the Set SV directive of the specified LP  variable    TRUE(ON)    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller    Action  Integrated Controller  V series  L controller    When NAN is input, the result is FALSE(OFF) and  NAN input error flag is set to TRUE(ON).  When INF is input the result is FALSE(OFF).  Unified Controller nv series  NAN and INF data are limited by the maximum  value.  ·  The following operation is performed when the LP data or LP parameter specification  is invalid:      Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data/parameter is    specified, table operation error is set to TRUE(ON)  and the result is FALSE(OFF).  Unified Controller nv series  When variable other than LP tag data/parameter is    specified, error flag and table operation error are    set to TRUE(ON) and the result is FALSE(OFF).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  647    ●  Program example  [LD/FBD language notation]      SSV_P    SIGNAL1    ST  E    5  LD  SVK    80  LD  SVP  FIC100.  TAG[0]  LD  LP_P    1  LD  SVT  FIC100.CLI    LD  LP_D  SSV_REQ P  RSV_P   SIGNAL2   ST  E FIC100.CLI   LD  LP_D SSV_REQ N SSV  control  section  Instrumentati on FB section  FIC100.MV    ST  FIC100.PV    LD    1  LD    0  LD    0  LD  FIC100.MV    LD    0  LD  FIC100.CLI    LD  FIC100.SV    LD  FIC100.  TAG[0]  LD  PID_P  PV  GAN  FFS  PID_01  SV  FFD  TR  MVT  LP_D  LP_P  MV  SSV  executi on section  FIC100.MVE /  FIC100.CLI / FIC100.SSV   SSV_EXEC (  ) FIC100.SV    LD  SSV_EXEC    FIC100.SVP    LD  SEL_REAL  G IN0 IN1 DIV_REAL     1000  LD    ZF[23]    LD    FIC100.SVK    LD    DIV_REAL   FIC100.SVT    LD    MUL_REAL   FIC100.SV   SET  SSV_EXEC    DLM_REAL   E IN D SSV_EXEC   LD  In case of L3DS  DLM_01 OUT    Variables:  Variable  Data type  Dec.  SSV_REQ  BOOL  VAR  SSV_EXEC  BOOL  VAR  SIGNAL1  BOOL  VAR  SIGNAL2  BOOL  VAR  PID_01  PID_P  VAR  DLM_01  DLM_REAL  VAR  Chapter 2    LD/FBD Instructions  6F8C1226  648    Controller variables:    Variable  Data type  !FIC100  typeLP_PARA_DS  !FIC100  typeLP_DATA_DS  ZF  ARRAY[0..4095] OF REAL    [ST language notation]  (* SSV control section *)  SIGNAL1 := SSV_P( SSV_REQ, 80, 5, 1, FIC100.TAG[0], FIL100.CLI);  SIGNAL2 := RSV_P( SSV_REQ, FIL100.CLI);    *Positive  transition—sensing  contact  (SSV_REQ)  and  negative  transition—sensing  contact (SSV_REQ) do not perform the same operation as LD/FBD because they are  not supported by the ST language.      (* Instrumentation FB section *)  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.MV, 0, FIC100.CLI, FIC100.TAG[0]);  FIC100.MV := PID_01.MV;    (* SSV execution section *)  SSV_EXEC := NOT(FIC100.MVE) AND NOT(FIC100.CLI) AND FIC100.SSV;  Z2 := SEL_REAL(SSV_EXEC, FIC100.SV, FIC100.SVP);  Z3 := ZF[23] / 1000 * FIC100.SVK / FIC100.SVT;  DLM_01(SSV_EXEC, Z2, Z3);  FIC100.SV := DLM_01.OUT;    ·  SSV control section  At the rise of SSV request (SSV_REQ), requests Set SV directive (target value: 80, tilt:  5/s) to the adjuster tag (FIC100). At the fall of SSV, resets the Set SV directive.  ·  Instrumentation FB section  Executes current output PID against the adjuster tag (FIC100).  ·  SSV execution section  When the adjuster tag (FIC100) Set SV condition is satisfied (MVE=FALSE and  CLI=FALSE and SSV=TRUE), changes SV according to the requested content (SVP,  SVK, SVT). When the Set SV condition is not satisfied, SV holds the previous value.  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  649    Reset SV    Tag Operation  Reset SV    LD/FBD language  notation     Execution  control  inp t Output RSV_P  LP data variable E  LP_D    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := RSV_P( E, LP_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  E  BOOL  ○   Execution control input    Input  LP_D  PTR  —  LP data variable    Output  —  BOOL  —  Output      A pointer to tag table is placed in LP data variable.  A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Notation  Operand  Array  Tag symbol  LP_D  LP_DATA[0]  FIC100.CLI    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  LP_D  (LP_DATA)  SSV  BOOL  W  SEQ—SV intervention status  R/W: R=Read only, W=Write only, R/W=Read/Write    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the SSV of the LP data variable  specified with LP_D is reset to FALSE(OFF) and TRUE(ON) is output as the result.  (Resetting Set SV directive).  ·  This instruction is used together with the Set SV (SSV_P) instruction.  Chapter 2    LD/FBD Instructions  6F8C1226  650    ·  The following variables can be specified for the LP data:      Controller    Variable  Integrated Controller  V series  L controller    LP tag data variable  Unified Controller  nv series  type2  LP tag data variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Resets the Set SV directive of the specified LP  variable  TRUE(ON)    ●  Program example  ·  Refer to the program example of the Set SV (SSV_P) instruction.    ●  Error information  ·  The following operation is performed when invalid variable is specified for the LP data:    Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data is specified,  table operation error is set to TRUE(ON) and the  result is FALSE(OFF).  Unified Controller nv series  When variable other than LP tag data is specified,  error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).    ·  When EN IS used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  651    Set MV    Tag Operation  Set MV    LD/FBD language  notation    Execution control input Output  SMV_P    E      MVP      MVK      MVT      LP_P      LP_D  Tilt Target value Tilt unit LP parameter variable LP data variable   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SMV_P( E, MVP, MVK, MVT, LP_P, LP_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    MVP  REAL  ○   Target value    MVK  REAL  ○   Tilt    MVT  REAL  ○   Tilt unit (1: sec./60:min./3600: hr)    LP_P  PTR  —  LP parameter variable    Input  LP_D  PTR  —  LP data variable    Output  —  BOOL  —  Output      Pointers to tag table are placed in LP parameter variable and LP data variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Notation  Operand  Array  Tag symbol  LP_P  LP_PARA[0]  FIC100.TAG[0]  LP_D  LP_DATA[0]  FIC100.CLI    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  MVP  REAL  R/W MV ramp target value  MVK  REAL  R/W MV ramp increment  LP_P  (LP_PARA)  MVT  REAL  R/W MV ramp time coefficient  LP_D  (LP_DATA)  SMV  BOOL  W  SEQ-MV intervention status  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  652    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), sets the setup information (MVP,  MVK, MVT) of the LP parameter variable specified by LP_P to the value specified with  input argument, sets the SMV of LP data variable specified by LP_D to TRUE(ON),  and output TRUE(ON) as the result. (Start of Set MV directive)  ·  This instruction provides the setup information (MVP, MVK, MVT) and directive (SMV)  to perform ramp MV action, but does not perform the actual ramp MV action. A  separate program must be created to perform the ramp MV action. (See program  example)  ·  This instruction is used together with the Reset MV (RMV_P) instruction.  ·  The following variables can be specified for the LP data/parameter:    Controller    Variable  Integrated Controller  V series  L controller    LP tag data/parameter variable  Unified Controller  nv series  type2  LP tag data/parameter variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Starts the Set MV directive of the specified LP  variable  TRUE(ON)    ●  Error information  ·  The following operation is performed when the input data type is REAL:  Controller    Action  Integrated Controller  V series  L controller  When NAN is input, the result is FALSE(OFF) and  NAN input error flag is set to TRUE(ON).  When INF is input the result is FALSE(OFF)  Unified Controller nv series  NAN and INF data are limited by the maximum  value.  ·  The following operation is performed when the LP data or LP parameter specification  is invalid:      Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data/parameter is    specified, table operation error is set to TRUE(ON)  and the result is FALSE(OFF).  Unified Controller nv series  When variable other than LP tag data/parameter is    specified, error flag and table operation error are set  to TRUE(ON) and the result is FALSE(OFF).  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  653    ●  Program example  [LD/FBD language notation]      FIC100.MV   SET  SMV_EXEC    SMV_P    SIGNAL1    ST  E    5  LD  SVK    80  LD  SVP  FIC100.  TAG[0]  LD  LP_P    1  LD  SVT  FIC100.CLI    LD  LP_D  SMV_REQ P  RMV_P   SIGNAL2   ST  E FIC100.CLI   LD  LP_D SMV_REQ N SMV  control  section  Instrumentati on FB section  FIC100.MV    ST  FIC100.PV    LD    1  LD    0  LD    0  LD  FIC100.MV    LD    0  LD  FIC100.CLI    LD  FIC100.SV    LD  FIC100.  TAG[0]  LD  PID_P  PV  GAN  FFS  PID_01  SV  FFD  TR  MVT  LP_D  LP_P  MV  SMV  execution section  FIC100.MVE /  FIC100.CLI / FIC100.SMV SMV_EXEC (  ) FIC100.MV    LD  SMV_EXEC   FIC100.MVP    LD  SEL_REAL  G IN0 IN1  DIV_REAL     1000  LD    ZF[23]    LD    FIC100.MVK    LD    DIV_REAL   FIC100.MVT    LD    MUL_REAL   DLM_REAL      E IN D SMV_EXEC   LD  Variables:  Vari able    Data type  Dec.  SMV_REQ  BOOL  VAR  SMV_EXEC BOOL  VAR  SIGNAL1  BOOL  VAR  SIGNAL2  BOOL  VAR  PID_01  PID_P  VAR  DLM_01  DLM_REAL  VAR  Controller vari ables:  Vari able    Data type  !FIC100  typeLP_PARA_DS  !FIC100  typeLP_DATA_DS  ZF  ARRAY[0..4095] OF REAL  In case of L3DS  DLM_01  OUT    Chapter 2    LD/FBD Instructions  6F8C1226  654    [ST language notation]  (* SMV control section    *)  SIGNAL1 := SMV_P( SMV_REQ, 80, 5, 1, FIC100.TAG[0], FIL100.CLI);  SIGNAL2 := RMV_P( SMV_REQ, FIL100.CLI);    *Positive  transition-sensing  contact  (SMV_REQ)  and  negative  transition-sensing  contact (SMV_REQ) do not perform the same operation as LD/FBD because they are  not supported by the ST language.      (* Instrumentation FB section *)  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.MV, 0, FIC100.CLI, FIC100.TAG[0]);  FIC100.MV := PID_01.MV;    (* SMV execution section *)  SMV_EXEC := NOT(FIC100.MVE) AND NOT(FIC100.CLI) AND FIC100.SMV;  Z2 := SEL_REAL(SMV_EXEC, FIC100.MV, FIC100.MVP);  Z3 := ZF[23] / 1000 * FIC100.MVK / FIC100.MVT;  DLM_01(SMV_EXEC, Z2, Z3);  FIC100.MV := DLM_01.OUT;    ·  SMV control section  At the rise of SMV request (SMV_REQ), requests Set MV directive (target value: 80,  tilt: 5/s) to the adjuster tag (FIC100). At the fall of SMV, resets the Set MV directive.  ·  Instrumentation FB section  Executes current output PID against the adjuster tag (FIC100).  ·  SMV execution section  When the adjuster tag (FIC100) Set MV condition is satisfied (MVE=FALSE and  CLI=FALSE and SMV=TRUE), changes MV according to the requested content (MVP,  MVK, MVT). When the Set MV condition is not satisfied, MV holds the previous value.  2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  655    Reset MV    Tag Operation  Reset MV    LD/FBD language  notation    Execution control input Output  RMV_P    E    LP_D  LP data variable   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := RMV_P( E, LP_D );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks  E  BOOL  ○   Execution  control  input    Input  LP_D  PTR  —  LP data variable    Output  —  BOOL  —  Output      A pointer to tag table is placed in LP data variable.  A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Notation  Operand  Array  Tag symbol  LP_D  LP_DATA[0]  FIC100.CLI    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  LP_D  (LP_DATA)  SMV  BOOL  W  SEQ-MV intervention status    R/W: R=Read only, W=Write only, R/W=Read/Write      ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the SMV of the LP data variable  specified with LP_D is reset to FALSE(OFF) and TRUE(ON) is output as the result.  (Resetting Set MV directive).  ·  This instruction is used together with the Set MV (SMV_P) instruction.  Chapter 2    LD/FBD Instructions  6F8C1226  656    ·  The following variables can be specified for the LP data:      Controller    Variable  Integrated Controller  V series  L controller    LP tag data variable  Unified Controller  nv series  type2  LP tag data variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Resets the Set MV directive of the specified LP  variable    TRUE(ON)    ●  Program example  Refer to the program example of the Set MV (SMV_P) instruction.    ●  Error information  ·  The following operation is performed when invalid variable is specified for the LP data:      Controller    Action  Integrated Controller  V series  L controller    When variable other than LP tag data is specified  table operation error is set to TRUE(ON) and the  result is FALSE(OFF).  Unified Controller nv series  When variable other than LP tag data is specified  error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).      ·  When EN is used, ENO output is reset to FALSE(OFF)    when the above error occurs.      2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  657    Shut CV    Tag Operation  Shut CV    LD/FBD language  notation    Execution control input Output  SCV_P    E      MOD      MV      LP_P      LP_D  MV value Mode LP parameter variable LP data variable   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SCV_P( E, MOD, MV, LP_P, LP_D );    ●  Arguments    Arg.  Operand  Type  Const.  Description  Remarks E  BOOL  ○   Execution control input    MOD  UINT  ○   Mode (0:M,1:A,2:C,3:RM)    MV  REAL  ○   MV value[%]    LP_P  PTR  —  LP parameter variable    Input  LP_D  PTR  —  LP data variable    Output  —  BOOL  —  Output      Pointers to tag table are placed in LP parameter variable and LP data variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used adjuster tag.    Notation  Operand  Array  Tag symbol  LP_P  LP_PARA[0]  FIC100.TAG[0]  LP_D  LP_DATA[0]  FIC100.CLI    The following tag symbols are referenced by this instruction:    Operand  Symbol  Type  R/W Description  MVP  REAL  R/W MV ramp target value  MVK  REAL  R/W MV ramp increment  LP_P  (LP_PARA)  MVT  REAL  R/W MV ramp time coefficient  LP_D  (LP_DATA)  SMV  BOOL  W  SEQ-MV intervention status  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  658    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the MV value is set immediately to  the specified value and the mode is set to the specified mode.    Sets setup information of the LP parameter variable specified with LP_P to the value  specified with the input argument (MVP=input argument MV, MVK=2000, MVT=1),  sets the SMV of LP data variable specified by LP_D to TRUE(ON), sets the mode to  the mode specified with the input argument, and outputs TRUE(ON) as the result.  (Start of Set MV directive, the actual action is step action (change immediately to  specified MV value) because the tilt is set large).  ·  This instruction provides the setup information (MVP, MVK, MVT) and directive (SMV)  to perform ramp MV action, but does not perform the actual ramp MV action. A  separate program must be created to perform the ramp MV action (See program  example).  ·  This instruction is used together with the Reset MV (RMV_P) instruction.  ·  The following variables can be specified for the LP data/parameter.      Controller    Variable  Integrated Controller V series  L controller  LP tag data/parameter variable  Unified Controller nv series  type2  LP tag data/parameter variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Starts the Set MV directive of the specified LP variable  TRUE(ON)    ●  Error information  ·  The following operation is performed when the input data type is REAL:    Controller    Action  Integrated Controller  V series  L controller  When NAN is input, the result is FALSE(OFF) and NAN  input error flag is set to TRUE(ON).  When INF is input the result is FALSE(OFF).  Unified Controller nv series  NAN and INF data are limited by the maximum value.  ·  The following operation is performed when the LP data or LP parameter specification  is invalid:      Controller    Action  Integrated Controller  V series  L controller  When variable other than LP tag data/parameter is  specified, table operation error is set to TRUE(ON) and  the result is FALSE(OFF).  Unified Controller nv series  When variable other than LP tag data/parameter is  specified, error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  659    ●  Program example  [LD/FBD language notation]      FIC100.MV   SET  SCV_EXEC   SCV_P    SIGNAL1   ST  E   10  LD  MV    0  LD  MOD  FIC100.  TAG[0]  LD  LP_P  FIC100.CLI    LD  LP_D  SCV_REQ P  RMV_P   SIGNAL2   ST  E FIC100.CLI   LD  LP_D SCV_REQ N S C V   control  i Instrumentati on FB section  FIC100.MV   ST  FIC100.PV    LD    1  LD    0  LD    0  LD  FIC100.MV    LD    0  LD  FIC100.CLI    LD  FIC100.SV    LD  FIC100.  TAG[0]  LD  PID_P  PV  GAN  FFS  PID_01  SV  FFD  TR  MVT  LP_D  LP_P  MV  SCV  execution section  FIC100.MVE / FIC100.CLI / FIC100.SMV SCV_EXEC (  ) FIC100.MV   LD  SCV_EXEC FIC100.MVP   LD  SEL_REAL  G IN0 IN1 DIV_REAL   1000  LD  ZF[23]   LD    FIC100.MVK   LD  DIV_REAL FIC100.MVT   LD  MUL_REAL   DLM_REAL   E  IN  D  SCV_EXEC   LD  Variabl es:  Variable  Data type  Dec.  SCV _REQ  BOOL  VAR  SCV_EXEC BOOL  VAR  SIGNAL1  BOOL  VAR  SIGNAL2  BOOL  VAR  PID_01  PID_P  VAR  DLM_01  DLM_REAL  VAR  Control ler variables:  Variable  Data type  !FIC100  typeLP_PARA_DS  !FIC100  typeLP_DATA_DS  ZF  ARRAY[0..4095] OF REAL  In case of L3DS  DLM_01  OUT      Chapter 2    LD/FBD Instructions  6F8C1226  660    [ST language notation]  (* SCV control section *)  SIGNAL1 := SCV_P( SCV_REQ, 0, 10, FIC100.TAG[0], FIL100.CLI);  SIGNAL2 := RMV_P( SCV_REQ, FIL100.CLI);    *Positive  transition—sensing  contact  (SCV_REQ)  and  negative  transition—sensing  contact (SCV_REQ) do not perform the same operation as LD/FBD because they are  not supported by the ST language.      (* Instrumentation FB section *)  PID_01( FIC100.SV, FIC100.PV, 1, 0, 0, FIC100.MV, 0, FIC100.CLI, FIC100.TAG[0]);  FIC100.MV := PID_01.MV;    (* SCV execution section *)  SCV_EXEC := NOT(FIC100.MVE) AND NOT(FIC100.CLI) AND FIC100.SMV;  Z2 := SEL_REAL(SCV_EXEC, FIC100.MV, FIC100.MVP);  Z3 := ZF[23] / 1000 * FIC100.MVK / FIC100.MVT;  DLM_01(SCV_EXEC, Z2, Z3);  FIC100.MV := DLM_01.OUT;    ·  SCV control section  At the rise of SCV request (SCV_REQ), requests Set MV directive (MV value:10) to  the adjuster tag (FIC 100) and sets the mode to M. At the fall of SCV, resets the Set  MV directive.    ·  Instrumentation FB section  Executes current output PID against the adjuster tag (FIC100).  ·  SCV execution section    When the adjuster tag (FIC100) Set MV condition is satisfied (MVE=FALSE and  CLI=FALSE and SMV=TRUE), changes MV according to the requested content (MVP,  MVK, MVT) (resulting in MV=10 immediately after the rise of SCV_REQ). When the  Set MV condition is not satisfied, MV holds the previous value.          2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  661    Push Button ON    Tag Operation  Push Button ON    LD/FBD language  notation    Executi on control  i nput Output  PB_P    E      BNO      PB_P      PB_D  Mode PB parameter variable PB data variable   EN input  Edge execution  Index modification  Modifier  ○  ○   —  ST language notation  Output := PB_P( E, BNO, PB_P, PB_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  E  BOOL  ○   Execution control input    BNO  UINT  ○   Push button No. (1 to 8)    PB_P  PTR  —  PB parameter variable    Input  PB_D  PTR  —  PB data variable    Output  —  BOOL  —  Output      Pointers to tag table are placed in PB parameter variable and PB data variable.    A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used push button tag.    Notation  Operand  Array  Tag symbol  PB_P  PB_PARA[0]  XV100.TAG[0]  PB_D  PB_DATA[0]  XV100.ASA    The following tag symbols are referenced by this instruction:      Operand  Symbol  Type  R/W Description  PB_P  (PB_PARA)  MODS  UINT  R  Mode usage setting  MODE  UINT  R  Mode (0:M, 1:A, 2:C, 3:RM)  PB_D  (PB_DATA)  RFO[n]  BOOL  W  Button ON request (n=0: button 1 to 7:  button 8)  R/W: R=Read only, W=Write only, R/W=Read/Write  Chapter 2    LD/FBD Instructions  6F8C1226  662    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), sets the specified push button ON.    ·  When the button manipulation enable condition (PB_P.MODS="Not used" or  (PB_P.MODS="Use" and PB_D.MODE=A mode)) is satisfied, sets the corresponding  bit of the RFO of the PB data variable specified with PB_D to TRUE(ON) and outputs  TRUE(ON) as the result. (Button ON directive).  ·  This instruction sets the button ON (RFO). The content of RFO is reflected in FO by  standard output process. Therefore, the result of this instruction is not reflected when  FO is accessed immediately after executing this instruction (in that control cycle). The  reflected result can be accessed on the next cycle.  ·  The following variables can be specified for the PB data/parameter:      Controller    Variable    Integrated Controller  V series  L controller    PB tag data/parameter variable    Unified Controller  nv series  type2  PB tag data/parameter variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Executes button ON directive of the specified PB  variable  TRUE(ON)    ●  Program example  [LD/FBD language notation]      PB_P    SIGNAL1   ST  E    2  LD  BNO  XV100. TAG[0] LD  PB_P  XV100.ASA   LD  PB_D  PB_REQ P  Variabl es:  Variabl e  Data type  Dec.  PB_REQ  BOOL  VAR  SIGNAL1  BOOL  VAR  Control ler variables:  Variabl e  Data type  !XV100  typePB_PARA_DS  !XV100  typePB_DATA_DS    In case of L3DS      [ST language notation]  SIGNAL1 := PB_P( PB_REQ, 2, XV100.TAG[0], XV100.ASA);    ·   At the rise of PB request (PB_REQ), issues a button 2ON directive for the push button  tag (XV100).        2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  663    ●  Error information  ·  The following operation is performed when invalid variable is specified for the PB data  and PB parameter:      Controller    Action  Integrated Controller  V series  L controller  When variable other than PB tag data/parameter is  specified, table operation error is set to TRUE(ON) and  the result is FALSE(OFF).    Unified Controller nv series  When variable other than PB tag data/parameter is  specified, error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).      ·  If the push button On (BNO) is out of range (not 1 to 8), the instruction is treated as no  process.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.      Chapter 2    LD/FBD Instructions  6F8C1226  664    Push Button Lock    Tag Operation  Push Button Lock    LD/FBD language  notation    Execution control input Output  LB_P    E      BNO      PB_D  Mode PB data vari able   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := LB_P( E, BNO, PB_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    BNO  UINT  ○   Push  button  No.  (0:  Reset,  1  to 8: button No.)    Input  PB_D  PTR  —  PB data variable    Output  —  BOOL  —  Output    A pointer to tag table is placed in PB data variable.  A setup example is shown below.  Array No.=0, tag No.=FIC100 are assumed for the used push button tag.    Notation  Operand  Array  Tag symbol  PB_D  PB_DATA[0]  XV100.ASA  The following tag symbols are referenced by this instruction:      Operand  Symbol  Type  R/W Description  PB_D    (PB_DATA)  IFO[n]  BOOL  W  Button lock request (n=0: button 1 to 7: button 8)  (corresponding button locked when 1, unlocked  when all bits are 0)  R/W: R=Read only, W=Write only, R/W=Read/Write  ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the specified push button is locked.  When the push button No. (BNO) is between 1 and 8, the corresponding button is  locked. If the push button No. is 0, the button is unlocked.    Sets the corresponding bit of the IFO of the PB data variable specified by PB_D to  TRUE(ON) (or resets all bits to FALSE(OFF)) and outputs TRUE(ON) as the result  (Button lock directive).        2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  665  ·  This instruction locks the button (IFO). The content of IFO is reflected in FO by  standard output process. Therefore, the result of this instruction is not reflected when  FO is accessed immediately after executing this instruction (in that control cycle). The  reflected result can be accessed on the next cycle.  ·  The following parameters can be specified for the PB data:      Controller    Variable    Integrated Controller  V series  L controller  PB tag data variable  Unified Controller  nv series  type2  PB tag data variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Executes button lock directive of the specified PB  variable  TRUE(ON)    ●  Program example  [LD/FBD language notation]    LB_P    SIGNAL1    ST  E    2  LD  BNO  XV100.ASA    LD  PB_D  LB_REQ  P  Variables:    Variable  Data type  Dec.  LB_REQ  BOOL  VAR  SIGNAL1  BOOL  VAR  SIGNAL2  BOOL  VAR  Controller variables:  Variable  Data type  !XV100  typePB_PARA_DS  !XV100  typePB_DATA_DS  In case of L3DS  LB_P    SIGNAL2   ST  E    0  LD  BNO XV100.ASA   LD  PB_D LB_REQ N    [ST language notation]  SIGNAL1 := LB_P( LB_REQ, 2, XV100.ASA);  SIGNAL2 := LB_P( LB_REQ, 0, XV100.ASA);  ·  At the rise of LB request (LB_REQ), issues a button 2 lock directive for the push button  tag (XV100). At the fall of LB request, unlocks the lock.  ●  Error information  ·  The following operation is performed when invalid variable is specified for the PB data:      Controller    Action  Integrated Controller  V series  L controller  When variable other than PB tag data is specified,  table operation error is set to TRUE(ON) and the  result is FALSE(OFF).  Unified Controller nv series  When variable other than PB tag data is specified,  error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).  ·  If the push button on (BNO) is out of range (not 0 to 8), the instruction is treated as no  process.  ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    Chapter 2    LD/FBD Instructions  6F8C1226  666    Action Timer   Tag Operation  Action Timer    LD/FBD language  notation    Execution control input Output  ACT_P    E      STATE      T_D  Directive to timer T data variable   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ACT_P( E, STATE, T_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    STATE  UINT  ○   Directive to timer  (0: Start/1: Stop/2: Reset)    Input  T_D  PTR  —  T data variable    Output  —  BOOL  —  Output      A pointer to tag table is placed in T data variable.  A setup example is shown below.  The timer tag to be used will be array No.=0.    T_DATA[0]  The following tag symbols are referenced by this instruction:      Operand  Symbol  Type  R/W Description  STAT  BOOL  W  Start  STOP  BOOL  W  Stop  T_D    (T_DATA)  RST  BOOL  W  Reset  R/W: R=Read only, W=Write only, R/W=Read/Write    The following symbols can be accessed to check the execution status of the timer tag:    Operand  Symbol  Type  R/W Description  T_PARA  SET  INT  R/W Set value (target value)  VAL  INT  R/W Clock value (current value)  STAT  BOOL  R  Start  STOP  BOOL  R  Stop  RST  BOOL  R    Reset  T_DATA  UP  BOOL  R  Timeout  R/W: R=Read only, W=Write only, R/W=Read/Write        2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  667    For the timer tag, the unit of SET and VAL is different between the first half and second  half of the array.    Array No. Unit    Clock range  Accuracy (error)  0 to 255  0.1 s  0.0[s] to 3276.7[s]  0.1 [s] max. or main scan cycle  (whichever is greater)  256 to 511 0.1 min  0.0[min] to 3276.7[min] (0.0[s] to 196602[s])  0.1 [min] max.(6[s]) or main scan cycle  (whichever is greater)    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the specified timer tag is activated.    Manipulates the STAT, STOP, RST of the T data variable specified by T_D and outputs  ON as the result (timer manipulation directive). The relationships between the directive  (STATE) to the timer and STAT, STOP, RST are as shown below and either STAT,  STOP, or RST is set to ON.    Manipulation    Directive to  timer  STATE  STAT  STOP RST 0:Start  ON  OFF  OFF  1:Stop    OFF  ON  OFF  2:Reset  OFF  OFF  ON  ·  When the clock value (VAL) of the timer tag reaches the set value (SET), judgment  can be made with UP status (UP).    ·  When the set value (SET) of the timer tag is set to "0", UP status becomes ON  regardless of the timer operation status.    Even when the clock value (VAL) of the timer tag reaches the set value (SET), clocking  is continued up to the maximum value (32767).    ·  The timer operates only in the increasing direction.  ·  The following variables can be specified for the T data:    Controller    Variable    Integrated Controller  V series  L controller  T tag data variable  Unified Controller  nv series  type2  T tag data variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Executes timer manipulation directive of the  specified T variable  TRUE(ON)  Chapter 2    LD/FBD Instructions  6F8C1226  668    ●  Timing chart    T_DATA[nA].VAL Timer maximum(32767)  Timer initial value (0) T_DATA[n].STAT  T_DATA[n].STOP  T_DATA[n].RST  T_DATA[n].UP  t  T_PARA[n].SET  Start Stop  Reset  Start Reset Start      ●  Error information  ·  If the T data specification is incorrect (such as specifying variable other than T tag  data), the table operation error is set to TRUE(ON) and the instruction itself is treated  as no process.  ·  The following operation is performed when invalid variable is specified for the T data:    Controller    Action  Integrated Controller  V series  L controller  When variable other than T tag data is specified,  table operation error is set to TRUE(ON) and the  result is FALSE(OFF).  Unified Controller nv series  When variable other than T tag data is specified,  error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).    ·  If the directive to the timer (STATE) is out of range (not 0 to 2), the instruction is treated  as no process.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    ●  Notes  ·  This instruction executes a timer manipulation directive (STAT, STOP, RST). The timer  tag clocking (updating current value, timeout judgment) is synchronized with the main  scan process and is performed before program execution. Therefore, the result of this  instruction is not reflected when UP status is accessed immediately after executing  this instruction (in that control cycle). The reflected result can be accessed on the next  cycle. Also, when using this instruction in a high-speed scan process, caution is  necessary because the actual timer tag clocking is synchronized with the scan  process.          2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  669  ·  The timer accuracy (tolerance) is affected by the scan process cycle because the timer  clocking is synchronized with the main scan process. At maximum, the offset is equal  to the main scan process cycle.    ·  If this instruction is executed for the same timer tag more than once in the same  process cycle, the instruction (directive) executed last is effective and other  instructions are not reflected (either start, stop, or reset action per process cycle).    ·  Only the timer tag (T_PARA(DATA)) can be used with this instruction. Clock or count  down (TC_PARA(DATA)) cannot be used.    ●  Program example  [LD/FBD language notation]    ACT_P    SIGNAL1    ST  E    0  LD  STATE  T_DATA[0]    LD  T_D  STAT_REQ P  Variables:  Variable  Data type  Dec.  STAT_REQ  BOOL  VAR  STOP_REQ  BOOL  VAR  RST_REQ  BOOL  VAR  SIGNAL1  BOOL  VAR  SIGNAL2  BOOL  VAR  SIGNAL3  BOOL  VAR  Controller variables:  Variable  Data type  T_PARA  ARRAY[0..511] OF typeT_PARA_DS  T_DATA  ARRAY[0..511] OF typeT_DATA_DS  In case of L3DS  ACT_P    SIGNAL2   ST  E    1  LD  STATE  T_DATA[0]   LD  T_D   STOP_REQ P ACT_P    SIGNAL3   ST  E    2  LD  STATE  T_DATA[0]   LD  T_D  RST_REQ P T_DATA[0].UP    UP time  process      [ST language notation]  SIGNAL1 := ACT_P( STAT_REQ, 0, T_DATA[0]);  SIGNAL2 := ACT_P( STOP_REQ, 1, T_DATA[0]);  SIGNAL3 := ACT_P( RST_REQ, 2, T_DATA[0]);    ·  At the rise of start request (STAT_REQ), issues a start directive to the timer tag (T_DATA[0]).    ·  At the rise of stop request (STOP_REQ), issues a stop directive to the timer tag (T_DATA[0]).    ·  At the rise of reset request (RST_REQ), issues a reset directive to the timer tag (T_DATA[0]).    ·  At time-up (T_DATA[0].UP=ON), executes the UP time process.  Chapter 2    LD/FBD Instructions  6F8C1226  670    Action Counter    Tag Operation  Action Counter    LD/FBD language  notation    Execution control  i Output  ACC_P    E      STATE      C_D  Directive to counter C data variable   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := ACC_P( E, STATE, C_D );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    STATE  UINT  ○   Directive to counter  0: Increment, 1: Decrement, 2: Reset    Input  C_D  PTR  —  C data variable    Output  —  BOOL  —  Output      A pointer to tag table is placed in C data variable.  A setup example is shown below.  The timer tag to be used will be array No.=0.    C_DATA[0]  The following tag symbols are referenced by this instruction:      Operand  Symbol  Type  R/W Description  INC  BOOL  W  Increment  DEC  BOOL  W  Decrement  C_D    (C_DATA)  RST  BOOL  W  Reset  R/W: R=Read only, W=Write only, R/W=Read/Write    The following symbols can be accessed to check the execution status of the counter tag:    Operand  Symbol  Type  R/W Description  C_PARA  SET  INT  R/W Set value (target value)  VAL  INT  R/W Clock value (current value)  STAT  BOOL  R  Start  STOP  BOOL  R  Stop  RST  BOOL  R    Reset  UP  BOOL  R    Count up  C_DATA  DOWN  BOOL  R  Count down  R/W: R=Read only, W=Write only, R/W=Read/Write        2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  671    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the specified counter tag is  activated.    Manipulates the INC, DEC, RST of the C data variable specified by C_D and outputs  TRUE(ON) as the result (timer manipulation directive). The relationships between the  directive (STATE) to the counter and INC, DEC, RST are as shown below and either  INC, DEC, or RST is set to ON.      Manipulation    Directive to counter  STATE  INC DEC RST 0:Increment    ON  OFF OFF 1:Decrement    OFF ON  OFF 2:Reset  OFF OFF ON    ·  The UP status (UP) and DOWN status (DOWN) operate (judged) as follows according to  the relationship between the current value (VAL) and set value (SET) of the counter tag.    Relationship between current  value and set value  UP  DOWN Current value ≥ Set value  ON  OFF  Current value ≤ -Set value  OFF  ON  Current value = Set value = 0  ON  ON    ·  Even when the current value (VAL) reaches the set value (SET), clocking is continued  up to the maximum value (32767) or minimum value (-32768).    ·  The counter is incremented by Increment (INC) and decremented by Decrement  (DEC).  ·  The following variables can be specified for the C data:      Controller    Variable    Integrated Controller  V series  L controller    C tag data variable  Unified Controlle  nv series  type2  C tag data variable    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Executes counter manipulation directive of the  specified C variable  TRUE(ON)  Chapter 2    LD/FBD Instructions  6F8C1226  672    ●  Timing chart      Counter maximum(32767) Counter initial value(0)  -C_PARA[n].SET  C_DATA[n].UP C_DATA[n].DOWN t  Counter minimum(-32768)  C_PARA[n].SET  C_DATA[n].VAL  Increment Decrement Reset Decrement Set value=0 Reset  Increment      ●  Error information  ·  The following operation is performed when invalid variable is specified for the C data:  Controller    Action  Integrated Controller  V series  L controller    When variable other than C tag data/parameter is  specified, table operation error is set to TRUE(ON) and  the result is FALSE(OFF).  Unified Controller nv series  When variable other than C tag data/parameter is  specified, error flag and table operation error are set to  TRUE(ON) and the result is FALSE(OFF).    ·  If the directive (STATE) to the counter is out of range (not 0 to 2), the instruction is  treated as no process.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    ●  Notes  ·  This instruction executes a counter manipulation directive (INC, DEC, RST). The  updating of the counter tag (current value count, up judgment) is synchronized with the  main scan process and is performed before program execution. Therefore, the result  of this instruction is not reflected when UP status is accessed immediately after  executing this instruction (in that control cycle). The reflected result can be accessed  on the next cycle. Also, when using this instruction in a high-speed scan process,  caution is necessary because the actual counter tag update is synchronized with the  scan process.    ·  If this instruction is executed for the same counter tag more than once in the same  process cycle, the instruction (directive) executed last is effective and other  instructions are not reflected (only 1 count changes per process cycle).    ·  Only the counter tag (C_PARA(DATA)) can be used with this instruction. Clock or  count down (TC_PARA(DATA)) cannot be used.        2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  673    ●  Program example  [LD/FBD language notation]      ACC_P    SIGNAL1    ST  E    0  LD  STAT E C? DATA[0]    LD  C_D  INC_REQ  P  Variables:  Variable  Data type  Dec.  INC_REQ  BOOL  VAR  DEC_REQ  BOOL  VAR  RST_REQ  BOOL  VAR  SIGNAL1  BOOL  VAR  SIGNAL2  BOOL  VAR  SIGNAL3  BOOL  VAR  Controller variables:  Variable  Data type  C_PARA  ARRAY[0..511] OF typeC_PARA_DS  C_DATA  ARRAY[0..511] OF typeC_DATA_DS    In case of L3DS  ACC_P    SIGNAL2   ST  E   1  LD  STAT E C? DATA[0]   LD  C_D DEC_REQ P ACC_P    SIGNAL3   ST  E  2  LD  STAT E C? DATA[0]   LD  C_D  RST_REQ P C_DATA[0].UP    UP time  process    DOWN time  process  C_DATA[0].DOWN     [ST language notation]  SIGNAL1 := ACC_P( INC_REQ, 0, C_DATA[0]);  SIGNAL2 := ACC_P( DEC_REQ, 1, C_DATA[0]);  SIGNAL3 := ACC_P( RST_REQ, 2, C_DATA[0]);    ·  At the rise of increment request (INC_REQ), issues an increment directive to the  counter tag (C_DATA[0]). At the rise of decrement request (DEC_REQ), issues a  decrement directive to the counter tag (C_DATA[0]). At the rise of reset request  (RST_REQ), issues a reset directive to the counter tag (C_DATA[0]).    ·  At count up (C_DATA[0].UP=ON), executes the UP time process.    ·  At count down (C_DATA[0].DOWN=ON), executes the DOWN time process.    Chapter 2    LD/FBD Instructions  6F8C1226  674    Self Step Jump    Tag Operation  Self Step Jump    LD/FBD language  notation    Execution control input Output  SJ_P    E      STEP  Jump destination step    EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := SJ_P( E, STEP );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    Input  STEP  PTR  —  Jump destination step instance    Output  —  BOOL  —  Output      ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), the step activation location is  changed and TRUE(ON) is output as the result.    Deactivates the step to which this instruction is connected and activates the step  specified by jump destination step (STEP).    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Changes the activation location to the specified step.  TRUE(ON)    ●  Error information  ·  If a variable other than a step is specified for the jump destination step (STEP) or if the  connected destination of the execution control input (E) of this instruction is not a step  type instruction (Step, Answer Step, Phase End Step), boundary error is set to  TRUE(ON) and this instruction is treated as no process.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.          2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  675    ●  Program example  [LD/FBD language notation]      SJ_P   SIGNAL1   ST  E    PHASE1  LD  STEP CONTINUE    Variables:  Variable  Data type  Dec.  CONTINUE  BOOL  VAR  T1  BOOL  VAR  T2  BOOL  VAR  T3  BOOL  VAR  T4  BOOL  VAR  SIGNAL1  BOOL  VAR  Controller variables:  Variable  Data type  !SEQ001  typeSQ_PARA_DS  !SEQ001  typeSQ_DATA_DS    In case of L3DS  T1  INI  SEQ001  SEQ  T2  1  PHASE1  Time#10s T3  2  PHASE2  Time#10s T4  S1    [ST language notation]  SIGNAL1 := SJ_P( CONTINUE, PHASE1);    ·  If the PHASE 1, 2 repeat condition (CONTINUE) is TRUE(ON), self step jump (SJ_P)  occurs and the active location changes from S1 to PHASE1 when execution of  PHASE1 and PHASE2 completes and S1 becomes active (repeats execution of  PHASE1 and PHASE2).    ·  When the repeat condition (CONTINUE) is reset to FALSE(OFF), self step jump is not  performed when S1 becomes active and continues to the next step when T4 is set to  TRUE(ON).      ●  Restriction  ·  This instruction cannot be connected to non-SFC network (normal LD circuit). If it is  connected to normal LD circuit, unrelated step instruction (step instruction just before  the SJ_P instruction in the execution sequence) will be deactivated or a boundary  error may occur. A BOOL type LD/FBD circuit may be inserted between the Step  instruction (or Answer Step instruction, Phase End instruction) and SJ_P instruction.      SEQ instruction to which SFC network is connected  T12  S11  S12  SJ_P   SIGNAL1   ST  E    S11  LD  STEP Enabled Disabled  TON    IN    Time#10s LD  STEP  Q    TON_1  COND1 SJ_P    SIGNAL2   ST  E    S11  LD  STEP    Chapter 2    LD/FBD Instructions  6F8C1226  676    ·  A variable other than a step name cannot be specified as the jump destination step  (STEP) of a SJ_P instruction. If a variable other than a step name is specified, a  boundary error may occur and SJ_P instruction is treated as no process.    ·  Only the inside of the level (operation and phase) to which the SJ_P instruction is  connected to may be specified. Jump to other level is not possible.        Operation  T1  INI  SEQ001  SEQ  T2  1  PHASE1  Time#10s T3  2  PHASE2  Time#10s T4  S1  SJ_P    SIGNAL1   ST  E    PHASE1 LD  STEP  COND1   T4  S2  SJ_P    SIGNAL2   ST  E    P23  LD  STEP  COND2   Phase 1  T11 P11  T12 P12 T13 P13  P14  PhaseEnd SJ_P    SIGNAL3   ST  E  P11  LD  STEP  COND3 Enabled  Phase 2  T21 P21 T22 P22  T23 P23  P24  PhaseEnd SJ_P    SIGNAL4   ST  E    P11  LD  STEP  COND4 Disabled  Enabled  Disabled      ·  In the case of parallel processing, jump to other parallel process, outside the parallel  processes, or into the parallel process is not possible.        T12  S11  S12  SJ_P    SIGNAL1   ST  E    S13  LD  STEP  COND1    Disabled    T13 SJ_P    SIGNAL2   ST  E    S13  LD  STEP  COND2 S13  S14  Enabled          2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  677            T12  S11  S12  SJ_P    SIGNAL1   ST  E   S13  LD  STEP COND1 Disabled    T13  S13  S14  S1  T1  T2  S2  SJ_P   SIGNAL1   ST  E    S14  LD  STEP COND1 Disabled      ·  The SJ_P instruction cannot connect to a Phase Step instruction. Connection is  allowed to Step instruction, Answer Step instruction, and Phase End Step instruction. If  a SJ_P instruction is connected to a Phase Step instruction, the Phase Step instruction  itself may be inactive, but the inside of the phase is not inactive.      S11  T12 Enabled  Disabled  1  PHASE1  Time#10s T13 S13  SJ_P   SIGNAL1    ST  E    S11  LD  STEP COND1   SJ_P    SIGNAL2    ST  E   S12  LD  STEP COND2 T12 S12    Chapter 2    LD/FBD Instructions  6F8C1226  678    Reset Jump    Tag Operation  Reset Jump    LD/FBD language  notation    Execution control input Output  RJ_P    E      SQ_P      STEP  SQ parameter variable Jump destination step   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := RJ_P( E, SQ_P, STEP );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    SQ_P  PTR  —  SQ parameter variable    Input  STEP  PTR  —  Jump destination step instance    Output  —  BOOL  —  Output      A pointer to tag table is placed in SQ parameter variable.  A setup example is shown below.  Array No.=0, tag No.=SEQ100 are assumed for the used sequence tag.    Notation  Operand  Array  Tag symbol  SQ_P  SQ_PARA[0]  SEQ100.TAG[0]   The following tag symbols are referenced by this instruction:      Operand  Symbol  Type  R/W Description  ALIT[0..31]  BOOL ARRAY W  Alarm bit (all bits are cleared when RJ is executed)  PHNO[0..31] BOOL ARRAY W  Active phase map (all bits are cleared when RJ is executed)  ALNO[0..31] BOOL ARRAY W  Alarm phase map (all bits are cleared when RJ is executed)  CNNO[0..31] BOOL ARRAY W  Confirm wait phase map (all bits are cleared when RJ is  executed)  Referenced  by SQ_P    (SQ_DATA)  APNO  UINT  W  Active phase no. setting (cleared when RJ is executed)  R/W: R=Read only, W=Write only, R/W=Read/Write          2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  679    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.  ·  When the execution control input E is TRUE(ON), resets the sequence tag information  specified by the SQ parameter variable (SQ_P), activates the step specified by jump  destination step (STEP, and outputs TRUE(ON) as the result.    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Changes the activation location to the specified step.  TRUE(ON)    ●  Error information  ·  If the jump destination step (STEP) is specified incorrectly, boundary error is set to  TRUE(ON) and the instruction is treated as no process.    ·  When EN is used, ENO output is reset to FALSE(OFF) when the above error occurs.    ●  Program example  [LD/FBD language notation]      Variables:  Variable  Data type  Dec.  RJ_REQ  BOOL  VAR  T1  BOOL  VAR  T2  BOOL  VAR  T3  BOOL  VAR  T4  BOOL  VAR  SIGNAL1  BOOL  VAR  Controller variables:  Variable  Data type  !SEQ001  typeSQ_PARA_DS  !SEQ001  typeSQ_DATA_DS    In case of L3DS  T1  INI  SEQ001  SEQ  T2  1  PHASE1  Time#10s T3  2  PHASE2  Time#10s T4  S1  RJ_P    SIGNAL1   ST  E    SEQ001  LD  SQ_P   INI  LD  STEP RJ_REQ    PHASE1      [ST language notation]  SIGNAL1 := RJ_P( RJ_REQ, SEQ001, INI);    ·  When the reset jump condition (RJ_REQ) is OFF, PHASE1, PHASE2, and S1 are  repeatedly executed in sequence.    ·  When the reset jump condition (RJ_REQ) is TRUE(ON), all active information and  alarm information of sequence tag (SEQ001) are reset and INI is activated regardless  of the current active location.  Chapter 2    LD/FBD Instructions  6F8C1226  680    ●  Restriction  ·  The sequence that may be specified with the RJ_P instruction can only specify within  the same program. Specification from other task or user defined function block and  phase level is not possible (compile error will occur). To specify from another task  (program), use a global variable.  Example that will result in compile error:    Program(MS_001)  Operation  T1  INI  SEQ001  SEQ  T2  1  PHASE1  Time#10s  Phase1  T11 P11  T12 P12  T13 P13  P14  PhaseEnd RJ_P    SIGNAL2    ST  E   SEQ001 LD  SQ_P   INI  LD  STEP RJ_REQ2 P User FB(USER_FB)  RJ_P    SIGNAL4    ST  E    SEQ001 LD  SQ_P   INI  LD  STEP RJ_REQ4 P USER_FB   FB_1  Program (MS_002)  RJ_P    SIGNAL1   ST  E    SEQ001  LD  SQ_P    INI  LD  STEP  RJ_REQ1 P    Normal example (using global variable)    Program (MS_001)  Operation    T1 INI  SEQ001 SEQ  T2 1  PHASE1  Time#10s  User FB(USER_FB)  USER_FB FB_1  Program (MS_002)  Phase 1  T11 P11  T12 P12 T13 P13 P14  PhaseEnd RJ_REQ2  P  Global_RJ  (  )  S  RJ_REQ1 P  Global_RJ  (  )  S  RJ_P E    SEQ001 LD  SQ_P   INI  LD  STEP Global_RJ P  Global_RJ (  ) R RJ_REQ1  P  Global_RJ  (  )  S  RJ_REQ4 P Global_RJ (  ) S       2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  681    ·  Only operation step can specify RJ_P instruction. Phase step cannot specify RJ_P  instruction. If RJ_P is used in a phase, a boundary error will occur and the RJ_P  instruction will be treated as no process.      Program (MS_001)  Operation    T1  INI  SEQ001  SEQ  T2  1  PHASE1  Time#10s  T3  2  PHASE2  Time#10s  Phase 1  T11 P11 T12 P12  T13 P13  P14 PhaseEnd RJ_P    SIGNAL1   ST  E    SEQ001  LD  SQ_P   INI  LD  STEP RJ_REQ1  P  RJ_P    SIGNAL3    ST  E    SEQ001 LD  SQ_P    P11  LD  STEP  RJ_REQ3 P Normal    Boundary error      ·  No variable other than a step name can be specified as the jump destination step  (STEP) of a RJ_P instruction. If a variable other than a step name is specified, a  boundary error may occur and RJ_P instruction is treated as a no process.    ·  A step in a parallel process cannot be specified as the jump destination step (STEP) of  a RJ_P instruction (activation location cannot be changed within a parallel process). If  a step in a parallel process is specified, steps are executed in sequence from that  location and holds at the end of the parallel process (waiting for other parallel process  to end). In such case, the reactivation location must be switched.        T12  S11  S12  T13 S13  S14  RJ_P    SIGNAL1   ST  E   SEQ001  LD  SQ_P   S13  LD  STEP RJ_REQ1  P    T12  S11  S12  T13  S13  S14  Hold    RJ destination  cannot be specified.    Chapter 2    LD/FBD Instructions  6F8C1226  682    Reset Jump 2   Tag operation  Reset Jump    LD/FBD language  notation      Execution  control  input Output  RJ_P2  SQ parameter variable Jump destination phase E  SQ_P PHNO   EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := RJ_P2 ( E, SQ_P, PHNO );    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○   Execution control input    SQ_P  PTR  —  SQ parameter variable    Input  PHNO  UINT  ○   Jump destination phase number  1-32  Output  —  BOOL  —  Output      A pointer to tag table is placed in SQ parameter variable.    A setup example is shown below. Array number is 0 and tag number is SEQ 100 for the  sequence tag used.      Notation  operand  Array  Tag symbol  SQ_P  SQ_PARA[0]  SEQ100.TAG[0]   The following tag symbols are referenced by this instruction:  Operand  Symbol  Type  R/W Description  ALIT[0..31]  BOOL ARRAY W  Alarm bit (all bits are cleared when RJ is executed)  PHNO[0..31] BOOL ARRAY W  Active phase map (all bits are cleared when RJ is executed)  ALNO[0..31] BOOL ARRAY W  Alarm phase map (all bits are cleared when RJ is executed)  CNNO[0..31] BOOL ARRAY W  Confirm wait phase map (all bits are cleared when RJ is  executed)  Referenced  by SQ_P  (SQ_DATA)  APNO  UINT  W  Active phase no. setting (cleared when RJ is executed)  R/W:R = Read only, W = Write only, R/W = Read/Write    ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  performing any operation.    ·  When the execution control input E is TRUE(ON), resets the sequence tag information  specified by the SQ parameter variable (SQ_P), activates the step specified by the  jump destination phase number (PHNO) and outputs TRUE(ON) as the result.          2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  683    Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  Changes the activation location to the specified step.  TRUE(ON)    ●  Error information  ·  If  the  sequence  parameter  variable  (SQ_P)  is  out  of  the  range,  the  table  operation  error is set to TRUE(ON) and the instruction is treated as no process.    ·  When  a  phase  number  that  does  not  exist  in  the  PHNO  argument  is  specified  for  STEP, RJ instruction is treated as no process.      ●  Program example    Variable:  Variable  Data type  Dec.  RJ_REQ  BOOL  VAR  T1  BOOL  VAR  T2  BOOL  VAR  T3  BOOL  VAR  T4  BOOL  VAR  SIGNAL1  BOOL  VAR  Controller variables:  Variable  Data type  !SEQ001  typeSQ_PARA_DS  !SEQ001  typeSQ_DATA_DS    RJ_P2    SIGNAL1   ST  E   SEQ001  LD  SQ_P    2  LD  PHNO  RJ_REQ    T1  INI  SEQ001  SEQ  T2  1  PHASE1  Time#10s T3  2  PHASE2  Time#10s T4  S1  PHASE1  MS001  MS010    [ST language notation]  SIGNAL1 := RJ_P2( RJ_REQ, SEQ001, 2);    [Description of operation]  ·  When the reset jump condition (RJ_REQ) is FALSE(OFF), PHASE1, PHASE2, and S1  are executed repeatedly in sequence.    ·  When the reset jump condition (RJ_REQ) is TRUE(ON), all active information and  alarm information of the sequence tag (SEQ001) are reset and PHASE2 is activated  regardless of the current active location.      ●  Restriction  ·  The phase that may be specified by the RJ_P2 instruction is the phase step 2  instruction.    Do not specify the normal phase step or the machine may not operate correctly.    Chapter 2    LD/FBD Instructions  6F8C1226  684    SFC Initialize    Tag operation  SFC Initialize    LD/FBD language  notation      Execution  control  input Complete status  INI_STEP Initial  step E  STEP EN input  Edge execution  Index modification  Modifier  ○   ○   —  ST language notation  Output := INI_STEP( E, STEP );    ●  Argument    Arg.  Operand  Type  Const. Description    Remarks E  BOOL  ○   Execution control input    Input  STEP  PTR  —  Initial step instance    Output  —  BOOL  —  Complete status      ●  Function  ·  When the execution control input E is FALSE(OFF), FALSE(OFF) is output without  process.  ·  When the execution control input E is TRUE(ON), all SFC steps including the specified  initial step are cleared and the initial step is activated.    TRUE(ON) is output as the result.      Execution  control input  Action  Output  FALSE(OFF)  No process  FALSE(OFF)  TRUE(ON)  All SFC steps including the specified initial step are  cleared.  Initial step is activated.  TRUE(ON)    ●  Note  ·  Be sure to use the initial step name to specify STEP.       2.23    Tag Operation  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  685    ●  Program example    Variables: Variable  Data type Dec.  INI_REQ  BOOL  VAR  INI  PTR  VAR  SIGNAL  BOOL  VAR  T1 INI  SEQ001 SEQ  T2 1  PHASE1  Time#10s T3 2  PHASE2  Time#10s T4 S1  INI_STEP   SIGNAL1   ST  E  INI  LD  STEP INI_REQ PHASE1    [ST language notation]  SIGNAL1 := INI_STEP( INI_REQ, INI);      [Description of operation]  ·  When the initial condition (INI_REQ) is FALSE(OFF), PHASE1, PHASE2, and S1 are  executed repeatedly in sequence.    ·  When the initial condition (INI_REQ) is TRUE(ON), all SFC steps including the  specified initial step are cleared and the initial step is activated regardless of the  current active location.    ●  Error information  ·  Specify the initial step name for STEP, otherwise the machine may not operate  correctly.    Chapter 2    LD/FBD Instructions  6F8C1226  686      2.24  RAS    No.  Instruction  Remarks  1  Cyclic Trace  DATALOGC   2  Calendar Data Acquisition  GET_CLND  nv dedicated instruction 3  Interlock Diagnosis  DIAG_D    4  Interlock Diagnosis with First  Fault Diagnosis Permission Input DIAG_D2    2.24    RAS  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  687    Cyclic Trace    RAS  Cyclic Trace    LD/FBD language  notation      DATALOGC  Instance name    EN input  Edge execution  Index modification Modifier  —  —  —  ST language notation  [Instance name] ( );    ●  Instance structure    Name    Type  Description  Remarks  NAME  WORD ARRAY [0 to 24]  Trace variable name  POINTER  DINT  Trace variable pointer  DATATYPE DINT  Trace data type  RH  DINT  Range high limit  RL  DINT  Range low limit  EU  DINT  Unit  COMMENT WORD ARRAY [0 to 7]  Comment  INDEX  DINT  Link buffer pointer  DATA  DINT ARRAY [0 to 55]  Link buffer  NOTINIT  DINT  Initialization flag  Cannot be accessed from  the user program.    ●  Function  ·  A function block to perform cyclic trace that is written within a program.    ·  A single variable can be traced with a single function block description.    ·  Periodically traces static variable and temporary variable, or global variable used  within a program (when the cycle time is less than 50ms, the cyclic trace data is  lacking by the transmission load).  ·  Specify the task to trace, the trace FB name to use, and variable name from [Product  view] - [View] - [Data trace] of the V engineering tool. Refer to the V Engineering Tool  User's Guide for details.    ● Important  · Do not specify direct output variable as the variable name to perform cyclic trace. Correct value  cannot be traced.    In this case, perform cycle trace specifying a batch output variable rather than a direct output  variable.    Chapter 2    LD/FBD Instructions  6F8C1226  688    ●  Program example  [LD/FBD language notation]    DATALOGC  DATALOGC_1  DATALOGC  DATALOGC_2     [ST language notation]  DATALOGC_1( );  DATALOGC_2( );    ·  Performs cyclic trace of two variables VAR_BOOL and VAR_REAL specified from the  V engineering tool.    [Data log trace screen]  The following data log trace screen shows an example of programming two  DATALOGC within a program and tracing variables VAR_BOOL and VAR_REAL:          2.24 RAS  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  689    Calendar Data Acquisition   RAS  Calendar Data Acquisition  nv dedicated  instruction  LD/FBD language  notation  Execution control  input Data storage  destination  specification  GET_CLND   E      TYPE  Calendar data type  specification    EN input  Edge execution  Index modification  Modifier  ○  ○  —  ST language notation  GET_CLND( E, TYPE, Data storage destination specification);    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks E  BOOL  ○  Execution control input    Input  TYPE  UINT  ○  Calendar data type  specification    Output  —  PTR  —  Data storage destination  specification      ●  Function  ·  When execution control input E is FALSE(OFF), calendar data acquisition is not  executed.  ·  When execution control input E is TRUE(ON), calendar data in the format specified  with calendar data type specification is obtained, and output to the variable specified  with data storage destination.  ·  The calendar data type and calendar format are as follows:    Calendar data type  Calendar format  1  BCD code    15  8 7  0   0  Year  0  Month  0  Day  0  Hour    0  Minute  0  Second  01 : Year 2001 or later    00 : Year 2097   2  DT type    15  0 Year    Day  Month  TOD type    Other than above  Invalid      第2 章    LD/FBD 命令語  6F8C1226  690    ●  Program example  [LD/FBD language notation]        REQ  BCD_DAT  GET_CLND   E      TYPE  1 Stores  calendar  data  in  the  BCD data format.      [ST language notation]  GET_CLND( REQ, 1, BCD_DAT);    ·  When execution control input REQ is TRUE(ON), calendar data in the format specified  with calendar data type specification TYPE is obtained, and stored to the specified  variable BCD_DAT.    ●  Error information  ·  No processing is performed unless calendar data type specification TYPE is valid  specification.  ·  When EN is used, ENO is reset to FALSE(OFF) when the above error occurs.  2.24 RAS  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  691    Interlock Diagnosis    RAS  Interlock Diagnosis    LD/FBD language  notation      Interlock circuit  input  Interlock circuit  output  DIAG_D  Interlock circuit  diagnosis permission Interlock circuit  screen permission Interlock group  number  Instance name BI  BO ENA DSP GRP   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( BI, ENA, DSP, GRP );  [Variable name]:=[Instance name]. BO;    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  BI  BOOL  —  Interlock circuit input    ENA  BOOL  ○   Interlock circuit diagnosis  permission  1 : Permitted,  0 : Prohibited  DSP  BOOL  ○ *1 Interlock circuit screen  permission  1 : Permitted,  0 : Prohibited  Input  GRP  UINT  ○ *1 Interlock group number  1 to 32  Output  BO  BOOL  —  Interlock circuit output    *1 : Only constants can be specified.    ●  Instance structure    Name  Type  Description  Remarks  BO  BOOL  Interlock circuit output  Can be accessed from the user  program.  RESERVE   Reserved (79W)  Cannot be accessed from the user  program.    ●  Function  ·  This function block creates, monitors, and diagnoses the interlock signals of the entire  system.  It can display the diagnosis result for the interlock signals of the entire system by using  the V Engineering Tool's add-in software, "Interlock Diagnosis Package."    For details,  refer to "Integrated Controller V series Engineering Tool 2 Permissive Fault Diagnosis  Package User’s Manual (6F8C1117)."  第2 章    LD/FBD 命令語  6F8C1226  692  ·  LD circuit that consists of a contact, b contact, contact force, left bus, and  horizontal/vertical connection lines is input to interlock circuit input BI.    The number of  available contacts is 1 to 32.  ·  Only coils (normal coils) can be connected to interlock circuit output BO.  ·  Interlock circuit diagnosis permission ENA can be specified with constants and  variables.    Interlock diagnosis is performed when ENA is TRUE(ON), or stopped  when it is FALSE(OFF).  When ENA=FALSE(OFF), the interlock circuit is not disconnected because interlock  circuit output BO= interlock circuit input BI.      ·  Interlock circuit screen permission DSP can be specified only with constants.    The  interlock diagnosis screen is displayed when it is TRUE(ON), or not displayed when it  is FALSE(OFF).  When the interlock circuit consists of the main circuit and other sub circuits, only  relevant interlock signals can be displayed on the interlock diagnosis screen by setting  DSP=TRUE(ON) for the main circuit and DSP=FALSE(OFF) for the sub circuits.  ·  Interlock group number GRP is a number for grouping the interlock signals of the  entire system by plant monitoring section for efficient diagnosis and monitoring.    It  can be specified to 1 to 32 using only constants.  ·  Function block DIAG_D can be used only in programs of the POU type (excluding  programs within user defined action).    Also, DIAG_D is used in conditions where it  operates in every cycle in the scan system tasks (mains task (MS), high-speed task  (HS), ultra-high speed task (SS)) (e.g. there are cycles not executed due to the IF  statement).  ·  The group specified with interlock group number GRP must use the interlock circuit in  the same task.      ●  Restriction  ·  I/O variable, index modification, non-pointer BOOL cannot be specified directly for the  variable specified for contacts of the interlock circuit.  ·  Only coils (normal coils) can be connected to interlock circuit output BO.  ·  Interlock group number GRP must use the interlock circuit in the same task.  Correct example:  Group number is used in MS010, MS100, and MS250.  Wrong example:  Group number is used in MS010 and HS050.  ·  Function block DIAG_D cannot be used in functions or function blocks for the POU  type.  ·  The number of DIAG_D used in one program is 64.  2.24 RAS  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  693    ●  Note  ·  Do not combine DIAG_D and DIAG_D2 in the Controller. Use either DIAG_D or  DIAG_D2.    ●  Program example  [LD/FBD language notation]        DIAG_D  BI  ENA DSP GRP BO 1  LD  X1 X2  X3 X4  X5 1  LD  30  LD  Y0 Only  normal  coil  can  be connected  Interlock circuit  DIAG_D_1     [ST language notation]  Z1 := X1 AND X2;  Z2 := X3 AND NOT(X4);  Z3 := ( Z1 OR Z2) AND X5;  DIAG_D_1( Z3, 1, 1, 30);  Y0 := DIAG_D_1.BO;    ·  Because ENA input is TRUE(ON), the state of interlock circuit input BI is monitored.    Interlock circuit output BO outputs the state of interlock circuit input BI as it is.    ●  Error information  ·  If I/O variable, index modification, or non—pointer BOOL that cannot be specified  directly for the variable specified for contacts of the interlock circuit is specified, the  monitoring result is not displayed correctly when the state of interlock circuit input BI  becomes FALSE(OFF).  ·  If the calendar of the controller is abnormal, the monitoring result cannot be displayed  correctly.  第2 章    LD/FBD 命令語  6F8C1226  694    Interlock Diagnosis with First Fault Diagnosis Permission Input    RAS  Interlock Diagnosis with First Fault Diagnosis  Permission Input      LD/FBD language  notation      Interlock circuit input Interlock circuit  output  DIAG_D2  Interlock circuit diagnosis  permission Interlock circuit  screen permission Interlock group number Instance name  BI  BO  ENA DSP GRP FFENA Interlock circuit first fault  diagnosis permission   EN input  Edge execution  Index modification  Modifier  —  —  —  ST language notation  [Instance name]( BI, ENA, FFENA, DSP, GRP );  [Variable name]:=[Instance name]. BO;    ●  Arguments    Arg.  Operand  Type  Const. Description  Remarks  BI  BOOL  —  Interlock circuit input    ENA  BOOL  ○   Interlock circuit diagnosis  permission  1: Permitted, 0:  Prohibited    FFENA  BOOL  ○   Interlock circuit first fault  diagnosis permission  1: Permitted, 0:  Prohibited  DSP  BOOL  ○ *1 Interlock circuit screen  permission  1: Permitted, 0:  Prohibited  Input  GRP  UINT  ○   Interlock group number  1 to 32  Output  BO  BOOL  —  Interlock circuit output    *1 : Only constants can be specified.      ●  Instance structure    Name  Type  Description  Remarks  BO  BOOL  Interlock circuit output    Can be accessed from the user  program.    RESERVE   Reserved (79W)  Cannot be accessed from the user  program.      ●  Function  ·  This function block creates, monitors, and diagnoses the interlock signals of the entire  system.  It can display the diagnosis result for the interlock signals of the entire system by using  the V Engineering Tool's add-in software, "Interlock Diagnosis Package."    For details,  2.24 RAS  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  695  refer to "Integrated Controller V series Engineering Tool 2 Permissive Fault Diagnosis  Package User’s Manual (6F8C1117)."  ·  LD circuit that consists of a contact, b contact, contact force, left bus, and horizontal/vertical  connection lines is input to interlock circuit input BI.    The number of available contacts is 1 to  32.  ·  Only coils (normal coils) can be connected to interlock circuit output BO.  Interlock circuit diagnosis permission ENA can be specified with constants and variables.    Interlock diagnosis is performed when ENA is TRUE(ON), or stopped when it is FALSE(OFF).  When ENA is FALSE(OFF), interlock circuit output BO is set to TRUE(ON) by force.  Note that this operation differs from interlock diagnosis instruction DIAG_D.  Interlock circuit first fault diagnosis permission FFENA can be specified with constants  and variables. Interlock diagnosis is performed at all the time when interlock circuit  diagnosis permission ENA is TRUE(ON) and FFENA=TRUE(ON). First fault detection  is stopped when FFENA is FALSE(OFF). Interlock diagnosis is restarted by setting  FFENA to TRUE(ON).  ·  Interlock circuit screen permission DSP can be specified only with constants.    The interlock  diagnosis screen is displayed when it is TRUE(ON), or not displayed when it is FALSE(OFF).  When the interlock circuit consists of the main circuit and other sub circuits, only relevant  interlock signals can be displayed on the interlock diagnosis screen by setting DSP=TRUE(ON)  for the main circuit and DSP=FALSE(OFF) for the sub circuits.  ·  Interlock group number GRP is a number for grouping the interlock signals of the entire system  by plant monitoring section for efficient diagnosis and monitoring. It can be specified by  constants (1 to 32) or variables specified by the interlock grouping screen of the interlock  diagnosis package (special register – interlock group number).    Interlock group number GRP takes in the group number specified by the rise of  interlock circuit diagnosis permission ENA and performs interlock diagnosis according  to the group number.    ·  DIAG_D2 can be used only in programs of the POU type (excluding programs within user  defined action).    Also, DIAG_D2 is used in conditions where it operates in every cycle in the  scan system tasks (mains task (MS), high-speed task (HS), ultra-high speed task (SS)) (e.g.  there are cycles not executed due to the IF statement).  ·  The group specified with interlock group number GRP must use the interlock circuit in the same  task..    第2 章    LD/FBD 命令語  6F8C1226  696    ·  Interlock circuit diagnosis permission ENA and interlock circuit first fault diagnosis  permission FFENA operate as follows. The first fault state is retained by setting  FFENA to FALSE(OFF) with the next scan that detects the first fault.      ENA  FFENA  Action  FALSE(OFF)  *  Interlock diagnosis stop    FALSE(OFF)  First fault diagnosis stop  TRUE(ON)  TRUE(ON)  First fault diagnosis execution    ●  Restriction  ·  /O variable, index modification, non-pointer BOOL cannot be specified directly for the  variable specified for contacts of the interlock circuit.  ·    Only coils (normal coils) can be connected to interlock circuit output BO.  ·  Interlock group number GRP must use the interlock circuit in the same task.  Correct example:  Group number is used in MS010, MS100, and MS250.  Wrong example:  Group number is used in MS010 and HS050.  ·  Function block DIAG_D2 cannot be used in functions or function blocks of the POU  type.  ·  The number of DIAG_D2 used in one program is 64.    ·  Changing the GRP number is invalid while interlock circuit diagnosis permission ENA  is TRUE(ON).      ●  Note  ・ Do not combine DIAG_D and DIAG_D2 in the Controller. Use either DIAG_D or  DIAG_D2.    2.24 RAS  Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  697    ●  Program example  [LD/FBD language notation]        DIAG_D2 BI  ENA FFENA DSP BO 1  LD  X1 X2  X3 X4  X5 1  LD  1  LD  Y0 Only  normal  coil  can  be connected  Interlock circuit  DIAG_D2_1 GRP 30  LD      [ST language notation]  Z1 := X1 AND X2;  Z2 := X3 AND NOT(X4);  Z3 := ( Z1 OR Z2) AND X5;  DIAG_D2_1( Z3, 1, 1, 1, 30);  Y0 := DIAG_D2_1.BO;    ·   Because ENA input and and FFENA are TRUE(ON), the state of interlock circuit input BI  is monitored. When ENA input is TRUE(ON), Interlock circuit output BO outputs the state of  interlock circuit input BI as it is.      ●  Error information  ·  If I/O variable, index modification, or non-pointer BOOL that cannot be specified directly for the  variable  specified  for  contacts  of  the  interlock  circuit  is  specified,  the  monitoring  result  is  not  displayed correctly when the state of interlock circuit input BI becomes FALSE(OFF).  ·  If the calendar of the controller is abnormal, the monitoring result cannot be displayed  correctly.  第2 章    LD/FBD 命令語  6F8C1226  698    ●  Special register interlock group number  ·  Special register-Xnterlock group number is initialized at the Controller startup.    ·  Special register-interlock group numbers are placed as follows by the Controller.    ·  In a duplex system, special register interlock group numbers are not variables for  tracking. Do not change the variable value of the special register-interlock group  number from the user application program.    ·  Refer to Integrated Controller V series Engineering Tool 2 Permissive Fault Diagnosis  Package User’s Manual (6F8C1117) to specify variables for interlock group numbers.      Special register word No. Group  number  Unified  type1  Integrated S3  1  166  426  2  167  427  3  168  428  4  169  429  5  170  430  6  171  431  7  172  432  8  173  433  9  174  434  10  175  435  11  176  436  12  177  437  13  178  438  14  179  439  15  180  440  16  181  441  17  182  442  18  183  443  19  184  444  20  185  445  21  186  446  22  187  447  23  188  448  24  189  449  25  190  450  26  191  451  27  192  454  28  193  455  29  194  456  30  195  457  31  196  458  32  197  459          699  Chapter 3  SFC Instructions        Chapter 3    SFC Instructions  6F8C1226  700    No.  Instruction  Remarks  1  Step        2  Initial Step      3  Transition        4  Divergence/Convergence of  Sequence      5  Divergence/Convergence of  Simultaneous Sequence      6  Link        BOOL      7  Action    User Defined      8  Sequence      *1  9  Phase Step    *1  10  Phase End Step    *1  11  Answer Step    *1  12  Phase step 2    *1  13  Answer step 2    *1  *1 V-Tool3 and Worksheet Editor does not support these instructions.    Ans2  Ph2  N     Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  701    Step    SFC  Step    Diagram      Step name   LD circui t or action    EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Represents the minimum unit of SFC network operation.  ·  When the state of predecessor transition becomes TRUE(ON), the connected steps  become active and the ladder circuit or action connected on the right side of the step is  executed.  ·  The step state can be determined from the following variables:      Step flag: step name .X (TRUE(ON) when step is active, FALSE(OFF) when step is  inactive)  Step execution duration: step name .T (represents the duration when step is active  and is cleared to 0 the first time the step is active)  ·  Steps cannot be placed consecutively.    A transition must be placed between steps.  ·  Step is not executed consecutively within the same scan.    ●  Program example        S2  S3  T0  S3.X  T1  T2  GE_TIME  S2.T  T#30s  S1  N SIGNAL2  Transition T1  =TRUE(ON)  T2  S1.T  S1.X  T1  S2.X  S2.T  T0  Scan    S1  S3  T0  S3.X  T1  T2  GE_TIME S2.T  T#30s SIGNAL1  S2  N  SIGNAL2  SIGNAL1   Chapter 3    SFC Instructions  6F8C1226  702    ·  When  transition  T1  becomes  TRUE(ON)  while  step  S1  is  active,  step  S1  becomes  inactive  and  step  S2  becomes  active.    Step  S1  remains  active  until  transition  T1  becomes TRUE(ON).    ● Important  ·  All steps within an SFC network, whether they are active or inactive, are executed during each  scan.    With LD circuits directly connected in step flag status, active steps are executed ON and  inactive steps are executed OFF. Therefore, do not use coils with the same variable name in  more than one step. A sample program and its process are shown below:      ●  When an LD circuit is connected to the step  If a coil with the same variable name is used in steps S1 and S3, the BOOL variable  SIGNAL1 is set to TRUE(ON) when step S1 is active.    Next, the BOOL variable  SIGNAL1 becomes FALSE(OFF) because step S3 is inactive.    In other words,  SIGNAL1=FALSE(OFF) is the final value of this variable.        S2  S3  T0 T3  T1 T2 SIGNAL1  S1  SIGNAL1  SIGNAL2  [Step S1=Active: BOOL variable SIGNAL1=TRUE (ON)]  [Step S3=Inactive: BOOL variable SIGNAL1=FALSE(OFF)]      ●  When an action is connected to the step  If a BOOL action with the same variable name is used in steps S1 and S3, the  connected action is executed because step S1 is active and the BOOL variable  SIGNAL1 is set to TRUE(ON).    Next, the connected action is not executed because  step S3 is inactive. But the action block state (N) is substituted for the BOOL variable  and the SIGNAL=FALSE(OFF) is the final value of this variable.        N  SIGNAL1  S1  S2  S3  T0  T3  T1  T2  SIGNAL2  [Step S1=Active: BOOL variable due to action execution  SIGNAL1=TRUE(ON)]  [Step S3=Inactive: BOOL variable due to action not executed    SIGNAL1=FALSE(OFF)]  N  SIGNAL1        Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  703    Initial Step    SFC  Initial Step    Diagram      Step name   LD circuit or action    EN input    Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Represents the minimum unit of SFC network operation.  ·  Only during controller cold start, the connected initial step becomes active  unconditionally and makes all other steps connected to the same SFC network  inactive.    Also, the connected ladder circuit and action are executed.  ·  The step state can be determined from the following variables:      Step activation flag: step name .X (TRUE(ON) when step is active, FALSE(OFF) when  step is inactive)  Step duration: step name .T (represents the duration when step is active and is  cleared to 0 when the step first becomes active)  ·  One initial step is required in an SFC network.      ·  Initial steps cannot be placed consecutively.    A transition must be placed between  initial step and other step.  ·  Initial step is not executed consecutively within the same scan.    ●  Program example        S1  T1  INI.X  GE_TIME  INI.T  T#30s  INI  N  SIGNAL2 S1  T1  INI.X  GE_TIME INI.T  T#30s N  SIGNAL2 INI  When  INI.T≥30s and    INI.X=TRUE(ON) <During cold start>      ·  During controller cold start, initial step INI becomes active and other step S1 on the  same circuit become inactive.  ·  After initial step INI has been active for 30 seconds, it becomes inactive and step S1  becomes active.  Chapter 3    SFC Instructions  6F8C1226  704    Transition    SFC  Transition      Diagram    Variable (BOOL)  LD circui t or BOOL output FBD circui t   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Defines the transition condition from step to step.  ·  Transition to the next step is performed when the variable specified for transition is  TRUE(ON).  ·  An LD circuit or FBD circuit with BOOL output may be specified on the left connecting  side of the transition.    The operation result of this connected circuit is assigned to the  variable specified with the transition and transition is made to the next step when the  operation result is TRUE(ON).  ·  The operation of the network stops when the SFC network ends with the transition.    ●  Program example        S2  S3  T0  S3.X  T1  T2  GE_TIME S2.T  T#30s  SIGNAL1 S1  N  SIGNAL2  S1  S3  T0  S3.X  T1  T2  GE_TIME S2.T  T#30s SIGNAL1  S2  N  SIGNAL2  When transition T1=TRUE(ON)       ·  Step S2 becomes active when transition T1 becomes TRUE(ON).    Step S1 remains  active until transition T1 becomes TRUE(ON).      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  705        S1  S3  T0  S3.X  T1  T2  GE_TIME S2.T T#30s SIGNAL1 S2  N  SIGNAL2  When S2.T≥30s  S1  S2  T0 S3.X  T1 T2 S2.T T#30s S3  GE_TIME SIGNAL1  N  SIGNAL2      ·  When step S2 is active, if duration of S2 exceeds 30 seconds, step S2 becomes  inactive and step S3 becomes active.  Chapter 3    SFC Instructions  6F8C1226  706    Divergence/Convergence of Sequence   SFC  Divergence/Convergence of Sequence    Diagram    Variable (BOOL) Variable (BOOL) Variable (BOOL) Variable (BOOL) Variable (BOOL) Variable (BOOL) EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Selectively executes the SFC flow according to the transition condition placed at the  beginning of each divergence of sequence.  ·  Only one circuit is executed with the divergence of sequence.    Scan is made from the  left transition state and the first branch circuit that satisfies the condition is executed.    If more than one transition is satisfied, the priority of transition evaluation is from left to  right.  ·  A step must be placed on the predecessor divergence of sequence.  ·  A transaction must be placed on the predecessor divergence of sequence.    ●  Program example        S2  S1  SIGNAL1  S1  S4  S6  S8  S3  S5  S7  Transitions  T12  and  T13  are  both TRUE(ON)  T11 T2 T3 T12 T4 T5 T13 T6 T7 T14  T8      ·  When transitions T12 and T13 both become TRUE(ON) while step S1 is active, step  S1 becomes inactive and step S4 becomes active.  ·  The step execution priority for the divergence of sequence is S2 > S4 > S6 > S8.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  707    Divergence/Convergence of Simultaneous Sequence    SFC  Divergence/Convergence of Simultaneous Sequence    Diagram    Variable (BOOL) Variable (BOOL) EN input  Edge execution  Index modification  Modifier  —  —  —  ●  Function  ·  Simultaneously executes more than one step following divergence of simultaneous  sequences.  ·  Up to 15 divergences of simultaneous sequences are allowed.  · Divergence of simultaneous sequences ends when execution of all branch circuit ends.    (Transition to steps following the convergence of simultaneous sequences is not  performed until execution of all branch circuit completes).  ·  A transition must be placed on the predecessor divergence of simultaneous  sequences.  ·  A transition must be placed below the successor convergence of simultaneous  sequences.  ●  Program example      S1  SIGNAL1  S2  S4  S6  S8  S3  S5  S7  S9  S10  T1  T2  T4  T6  T8  T3    ·  When transition T1 becomes TRUE(ON) while step S1 is active, step S1 becomes  inactive and steps S2, S4, S6, and S8 become active.  · When steps S3, S5, S7, and S9 become active, if transition T3 is TRUE(ON), steps S3,  S5, S7, and S9 are made inactive and step S10 becomes active.  Chapter 3    SFC Instructions  6F8C1226  708    Link    SFC  Link      Diagram      Step name   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Represents the link destination (loop or jump destination) of the network.  ·  If the predecessor transition condition becomes TRUE(ON), transition is made to the  step specified by the link.    ●  Program example  ♦  Loop specification                                S1  S2  S3  T0  T3  T1  T2  SIGNAL1  S1  S1  S2  S3  T0 T3 T1 T2 SIGNAL1  Equivalent circuit *Tools use representation on left    ·  When transition T3 becomes TRUE(ON) while step S3 is active, step S3 becomes  inactive and step S1 becomes active.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  709    ♦  Jump specification                                T21  S3 S1  S2  S3  SIGNAL1  S4  S5  S1  S2  S3  T3 T1 T2 SIGNAL1  S4  T4  S5  Equivalent  circuit  T0 T3  T2  T21 T1  T11 T0  T4 T11     ·  When transition T11 becomes TRUE(ON) while step S1 is active, step S1 becomes  inactive and step S3 becomes active.    Chapter 3    SFC Instructions  6F8C1226  710    Action    SFC  Action      Diagram    BOOL action                                        User defined action                    B: Qualifier specification                U: Qualifier specification                                                                          I: Indicator variable  B  Variable (BOOL) U Action name  I  EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  An action can be added to a step and it is executed when the step becomes active.  ·  More than one action can be connected to a step.  ·  A qualifier (action qualifier) can be used to specify the behavior of the action.    ·  The action state can be determined from the following variables:      Active flag :Action name .Q (TRUE(ON) when action is active, FALSE(OFF) when  action is inactive)  Activation :Action name .A (TRUE(ON) when action is executed, FALSE(OFF) when  action is not executed)  Action timer work :Action name .T (action duration with timer)  ·  Two types of actions are available:  BOOL action:Specified with a qualifier in the action box and a variable (BOOL).  The specified action variable (BOOL) can be controlled according to the qualifier.  User defined action :Specified with a qualifier in the action box, action name, and  indicator variable (indicator variable is optional). The execution of the program  specified with action name can be controlled according to the qualifier.    Also, the  indicator variable may be updated within the action program.        Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  711    ·  The following qualifier types are actions are available:    [Qualifier types]    Qualifier  Action    N or none  Specified action variable is TRUE(ON) while the action input is TRUE(ON) or    executes the specified program.      R: Reset  Resets the set state of the specified action variable when the action input is  TRUE(ON) or resets the set state of the specified program (The actual reset is  performed by the corresponding set action).  S: Set  Specified action variable is set while the action input is TRUE(ON) or continues  execution of the specified program.  L: time Limited  Keeps the specified action variable to TRUE(ON) for the specified interval when the  action input is TRUE(ON) or executes the specified program.    If the input becomes  FALSE(OFF) before the specified interval, the specified action variable is immediately  reset to FALSE(OFF) or stops execution of the specified program.  D: Time delayed  When action input is TRUE(ON), sets the specified action variable to TRUE(ON) after  the specified delay or executes the specified program.    If the input becomes  FALSE(OFF) before the specified interval, the specified variable is not set to  TRUE(ON) and the specified program is not executed.  P: Pulse  Sets the specified action variable to TRUE(ON) only when the action input changes  from FALSE(OFF) to TRUE(ON) or executes the specified program.    Unlike P0 or  P1, this action performs final scan.  P0: Pulse    (falling edge)  Sets the specified action variable to TRUE(ON) only when the action input changes  from TRUE(ON) to FALSE(OFF) or executes the specified program.    Unlike P, this  action does not perform final scan.  P1: Pulse    (rising edge)  Sets the specified action variable to TRUE(ON) only when the action input changes  from FALSE(OFF) to TRUE(ON) or executes the specified program.    Unlike P, this  action does not perform final scan.  SD: Stored and time  delayed  Retains the state when the action input is TRUE(ON) and sets the specified action  variable to TRUE(ON) after the specified delay or executes the specified program.    The action is not executed if there is a reset before the specified interval.  DS: Delayed and Stored  When the action input is TRUE(ON), performs set operation, sets the specified action  variable, and executes the specified program after the specified delay.    Does not  perform set operation if the input becomes FALSE(OFF) before the specified interval.    The corresponding reset action is necessary to reset the stored action.  SL: Stored and time limited Retains the action state when the action input is TRUE(ON) and then sets the  specified action variable and executes the specified program for the specified interval.  The set action must be reset before it can be reused.  NH: N without final scan  Same action as N without final scan.  SH: S without final scan  Same action as S without final scan.  LH: L without final scan  Same action as L without final scan.  DH: D without final scan  Same action as D without final scan.      ● Note: Final scan      After an action connected to a step becomes active, an action is executed for one scan where  the step changes from active to inactive.    This is referred to as final scan.  Chapter 3    SFC Instructions  6F8C1226  712    [Qualifier action diagram]  The following figures show the operation of an action. AN stands for action name.  ♦  N or none    Step status  AN.Q  AN.A    (actual operation)  Scan    Final scan performed      ♦  S: Set and R: Reset    R step status  AN.Q  AN.A  (actual operation)  Scan    Fi nal scan performed  S step status    ♦  L: Limited    Step status  AN.Q  AN.A (actual operation) Scan  Fi nal scan performed  AN.T  Setting ti me  Setting time Fi nal scan performed  Setting time   ♦  D: Time delayed    Step status  AN.Q  AN.A (actual operation) Scan  Final scan performed  AN.T  Setting ti me  Setting time Setting time     Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  713    ♦  P: Pulse    Step status  AN.Q  AN.A (actual operation)  Scan  Final scan performed      ♦  P0: Pulse (falling edge)    Step status  AN.Q  AN.A (actual operation)  Scan  1 scan time      ♦  P1: Pulse (rising edge)    Step status  AN.Q  AN.A (actual operation)  Scan  1 scan time      ♦  SD: Stored and time delayed    SD step status  AN.Q  AN.A (actual operation) Scan  AN.T  Setting ti me  Setting ti me R step status  Setting time Final  scan performed  Chapter 3    SFC Instructions  6F8C1226  714    ♦  DS: Delayed and stored    DS step status  AN.Q  AN.A (actual operation) Scan  AN.T  Setting ti me  Setting ti me Setti ng time R step status  Final  scan performed                          ♦  SL: Stored and time limited    SL step status  AN.Q  AN.A (actual operation)  Scan  AN.T  Setting ti me  Setting ti me Fi nal scan performed  Setting time  R step status                                  ♦  NH: N without final scan    Step status  AN.Q  AN.A (actual operation)  Scan  Final scan not performed                          ♦  SH: S without final scan    R step status  AN.Q  AN.A (actual operation)  Scan  Fi nal scan not performed  S step status      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  715    ♦  LH: L without final scan    Step status  AN.Q  AN.A (actual operation) Scan  Fi nal scan not performed  AN.T  Setting ti me  Setting ti me Final  scan not performed  Setti ng time     ♦  DH: D without final scan    Step status  AN.Q  AN.A (actual operation) Scan  Final scan not performed  AN.T  Setting ti me  Setting ti me Setti ng time     ● Important  · When specifying an action qualifier, always use R to reset the action variable specified with S,  SD, DS, SL, or SH.    A Coil instruction cannot be used to reset action variables.    Chapter 3    SFC Instructions  6F8C1226  716    ●  Program example        Scan  S1  S2  S3  T0  T3  T1  T2  SIGNAL1 N  SIGNAL2  Transition    T1=TRUE(ON) SIGNAL1  S1.X  T1  S2.X  SIGNAL2  T0  T2  S1  S2  S3  T0  T3  T1  T2  SIGNAL1  N  SIGNAL2      ·  When transition T1 becomes TRUE(ON) while step S1 is active, step S1 becomes  inactive and step S2 becomes active. The connected N action variable SIGNAL2 is  TRUE(ON) only while step S2 is TRUE(ON).        Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  717    Sequence    SFC  Sequence      Diagram  SQ parameter SEQ    EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Associates connected SFC network with sequence tag.    ·  Controls the execution of SFC network according to the mode of the associated  sequence tag.    C mode: SFC network execution (continuous progress)  A mode: SFC network execution (conf progress)  M/RM mode: SFC network halt (jump to end of SFC network)  (Refer to the Phase Step instruction for details concerning continuous progress and  conf progress.)  ·  Single step execution  When the mode of the sequence tag is M/RM, the SFC network can be executed for  just one process cycle from the tool (pressing the    button on the program editor  control panel) or by setting the sequence tag SSE ON.    Single step execution example:      T1  T2 T3  INI  SEQ001  SEQ  1  PHASE1  Time#10s  2  PHASE2  Time#10s  T1 T2 T3  INI  SEQ001 SEQ 1 PHASE1  Time#10s 2 PHASE2  Time#10s T1  T2  T3  INI  SEQ001  SEQ  1  PHASE1  Time#10s 2  PHASE2  Time#10s > Single step  execution  After 1 scan  > <Initialized state>  <During execution (1 scan only) > <After executing 1 scan>     All transition conditions are assumed to be satisfied.    When  single  step  execution  is  performed  once  from  an  initialized  state  such  as  Initializing (long stop) or immediately after program DL, the INI step is activated for just  one  scan  time  and  the  active  location  moves  to  PHASE1.  And  when  single  step  execution is performed again, the phase part of PHASE1 is executed in sequence one  step at a time from the initial step.  Chapter 3    SFC Instructions  6F8C1226  718    ·  Changing the active location  The SFC network connected to a sequence instruction can change the active location  from OIS-DS, tool, or instruction.    Changing the active location from OIS-DS is possible when the SFC network is  stopped (RM mode) and the change can be made in phase units.    Changing the active location from the tool is possible when the SFC network is  stopped (RM or M mode) and the change can be made in step units.    Changing the active location from an instruction is possible when the SFC network is  executing (A or C mode) and the change can be made in step units. The instructions to  change the active location are Reset Jump (RJ_P) and Self Step Jump (SJ_P). Reset  jump activates the specified step after initializing (resetting all active information) the  SFC network similar to OIS-DS and tool. On the other hand, Self Step Jump makes  the step to which the Self Step Jump is connected to inactive and activates the  specified step. Therefore, when self step jump is performed within a parallel process,  only that active location is changed and other parallel active locations are unaffected.    This is summarized in the following table:    Method  Unit  Possible  mode Action  OIS-DS  Phase  RM  Resets all active information and activates specified phase  Tool  Step  RM or M Resets all active information and activates specified step  Instruction (RJ_P)  Step  A or C  Resets all active information and activates specified step  Instruction (SJ_P)  Step  A or C  Makes self step inactive and activates specified step    ●  Notes  Neither OIS-DS, tool, nor instruction can change the active location to within a parallel  process  (does  not  become  parallel  action).  If  the  active  location  is  switched  inside  a  parallel process, steps are executed in sequence from that location and held at the end  of  the  parallel  process  (waiting  for  other  parallel  process  to  end).  In  such  case,  the  activate location must be switched once more.  Changing the active location    OIS-DS:  Change the mode to RM (press the    M   button twice) in the point screen of the sequence.    Press the    [Phase change]    button.    Select the change destination phase from the phase list and press     [Change]  .  Tool:  From the control panel of the program editor, change the mode to M or RM (press the    button).    Select the change destination step and press the    button.    Change the mode to A or C (press the    button).    Refer to "2.23 Tag Operation" for information on instructions RJ_P and SJ_P.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  719    ●  Program example        T1  T2  T3  INI  SEQ001  SEQ  1  PHASE1  Time#10s  2  PHASE2  Time#10s  T1 T2 T3  INI  SEQ001 SEQ 1 PHASE1  Time#10s 2 PHASE2  Time#10s <In M or RM mode>  <In A or C mode>      ·  Stop SFC network when SEQ001 mode is M (or RM).      ·  Sequentially execute SFC network when SEQ001 mode is A (or C).        ●  Restriction  ·  This instruction must be written at the beginning of an SFC network. If it is written in  the middle of an SFC network, its operation will be unstable (not as expected).    ·  The beginning of the sequence parameter must be specified for the SQ parameter. An  index register cannot be specified for array No. A table operation error will occur if  there is an incorrect specification.    Correct example  :SQ_PARA[1]  :SEQ001.TAG[0]    Wrong example        :SQ_DATA[1]  :SEQ001.TYPE  SQ_PARA[XI]  Chapter 3    SFC Instructions  6F8C1226  720    Phase Step    SFC  Phase Step    Diagram      N  Step name Congestion timer  N: Phase no. (1-32)    EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Unlike the Step instruction, action (sub screen) is performed from the phase step itself.    ·  When the transition condition of the previous step becomes TRUE(ON), the connected  phase step becomes active and executes the ladder circuit or action connected to the  right side of the phase step (if conf progress wait, the connection on the right side of  the phase step remains FALSE(OFF) and the ladder circuit is not executed. (When  "acknowledge operation" is performed the connection on the right side of the phase  step becomes TRUE(ON)). At the same time, the SFC network written in the action  (sub screen) is executed as "phase". When phase execution completes (phase end  instruction becomes active) and the transition condition of the proceeding step  becomes TRUE(ON), its own phase step is deactivated (inactive).    ·  The portion containing the Sequence instruction and Phase Step instruction is referred  to as the operation and the portion expanded by the Phase Step instruction is referred  to as the phase.    ·  A number from 1 to 32 is set as the phase No. This number is used to associate with a  sequence tag member (phase name (PNAM) and interlock/single selection (FA)) and  the phase execution status can be monitored from OIS-DS.    ·  The Phase Step instruction has a congestion monitor timer. If phase execution does  not completed before the congestion monitor timer expires, a congestion alarm is  issued. In this case, the timer value is limited by the set value. Congestion monitor is  disabled when the congestion monitor timer is set to 0 seconds (time#0s).    ·  The step state can be determined from the following variables:      Step flag  : Step name .X (TRUE(ON) when step is active,  FALSE(OFF) when step is inactive)  Step execution duration  : Step name .T (represents the duration when step is  active and is cleared to 0 the first time the step is  active)  ·  Phase step cannot be placed consecutively with other steps. A transition must be  placed between phase step and other step.    ·  Phase step is not executed consecutively within the same scan.  ·  Conf progress and continuous progress      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  721  ·  Phase execution can be controlled with sequence tag execution control information  (mode, interlock/single setting). When the sequence tag mode is C mode, phase is  executed continuously regardless of the interlock/single setting. When the sequence  tag mode is A mode, phase is executed continuously as in C mode if the  interlock/single setting is interlock, but if the interlock/single setting is single, the phase  is temporarily halted (conf progress wait) before execution, a conf progress wait alarm  is issued, and phase execution is resumed after it is acknowledged by the operator.    Phase setting  sequence mode  Interlock Single    C mode  (continuous progress)  Execute  Execute  A mode (conf progress)  Execute  Temporary halt    Executed  resumed when acknowledged  M, RM mode  Halt  Halt    If several phases are in "conf progress wait" in a parallel process, a single acknowledge will  cancel all acknowledge waits and resume execution.    When the mode is switched to C while in "conf progress wait", all conf progress waits are  canceled and changed to continuous execution. Also, if the mode is switched to M/RM while in  "conf progress wait" and single step execution is performed, conf progress wait is canceled and  inside of the phase is executed.  ·  Acknowledge method  Press the    [conf progress]   button on the OIS-DIS sequence tag point screen.    Press the    button on the tool's program editor control panel.    Set conf progress request (CNE) of sequence tag ON from tool's tag editor or other program.  ·  Conf progress example      T1  T2  2  PHASE2  Time#10s  T3  4  PHASE4  Time#10s  1  PHASE1  Time#10s  3  PHASE3  Time#10s  T1 T2 2  PHASE2 Time#10s T3  4  PHASE4 Time#10s 1  PHASE1 Time#10s 3 PHASE3 Time#10s T1 T2 2 PHASE2  Time#10s  T3  4 PHASE4  Time#10s  1 PHASE1  Time#10s  3  PHASE3 Time#10s >  > || >  > Sequence tag (parameter)  :    FA1 : Interlock/single setting 1 Interlock  FA2 : Interlock/single setting 2 Interlock  FA3 : Interlock/single setting 3 Standalone  :    Sequence tag (data)  :    MODE:mode  A  :    Transition T1  =TRUE(ON)  Acknowledge CNE=ON  PHASE1 : Active(phase execution complete)    PHASE2 : Active (executing within phase)  PHASE3 : Active (conf progress wait)  PHASE2 : Active (executing within phase)  PHASE3 : Active (executing within phase)    Chapter 3    SFC Instructions  6F8C1226  722    If transition (T1) becomes TRUE(ON) when PHASE1 is active, PHASE2 and PHASE3 become  active. Execution within phase is started immediately because PHASE2 is "interlock". PHASE3  is  temporarily  halted  and  placed  in  conf  progress  wait  because  it  is  "single".  When  acknowledged,  PHASE3's  conf  progress  wait  is  canceled  and  the  inside  of  PHASE3  is  executed.    ●  Program example    Main screen (operation)      Sub screen (phase)  T1  T2  T3  INI  SEQ001  SEQ  1  PHASE1  Time#10s 2  PHASE2  Time#10s T11 T2 T13 P1INI  S11  S12  S13  PhaseEnd     ·  When  phase  1  (step  name:  PHASE1)  becomes  active,  the  initial  step  (step  name:  P1INI) of the sub screen (phase) becomes active. Step is executed sequentially from  P1INI  and  "Phase  execution  complete"  is  indicated  when  the  phase  end  step  (step  name:  S13)  becomes  active.  When  S13  becomes  active  and  operation  transition  condition (T2) becomes TRUE(ON), phase execution is ended and the active point is  moved to the next step (phase).    ●  Restriction  ·  Description in phase level is not allowed (phase step nesting is not allowed). If phase  steps are nested, operation will be unstable (not as expected).      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  723    Phase End Step      SFC  Phase End Step    Diagram  Step name Phase End   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Represents the minimum unit of SFC network operation.  ·  When the transition condition in the previous step becomes TRUE(ON), the connected  phase end step becomes active and the ladder circuit or action connected on the right  side of the phase end step is executed. At the same time, phase execution completion  is notified to the calling Phase Step instruction.    ·  The phase end step is active only for one scan.    ·  Phase end step can be written more than once within a phase. Execution of the phase  (SFC network) is ended when any of the phase end step becomes active.    ·  The step state can be determined from the following variables:      ·  Step flag: step name .X (TRUE(ON) when step is active, FALSE(OFF) when step is  inactive)  ·  Phase end step cannot be placed consecutively with other steps. A transition must be  placed between phase step and other step.    ·  Transition or other step instruction cannot be placed below phase end step.    ·  Phase end step is not executed consecutively within the same scan.  Chapter 3    SFC Instructions  6F8C1226  724    ●  Program example      Main screen (operation)    Sub screen (phase)  T1  T2  T3  INI  SEQ001  SEQ  1  PHASE1  Time#10s 2  PHASE2  Time#10s T11 T2 T13  P1INI  S11  S12  S13  PhaseEnd     ·  When phase 1 (step name: PHASE1) becomes active, the initial step (step name:  P1INI) of the sub screen (phase) becomes active. Step is executed sequentially from  P1INI and "Phase execution complete" is indicated when the phase end step (step  name: S13) becomes active. When S13 becomes active and operation transition  condition (T2) becomes ON, phase execution is ended and the active point is moved  to the next step (phase).    ●  Restriction  ·  Description at the operation level is not allowed. If phase step is nested, operation will  be unstable (not as expected).    ·  At least one phase end step must be written within a phase. If there is no phase end  step, the phase will not end (no transition of operation active pointer).      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  725    Answer Step   SFC  Answer Step    Diagram      Step name  Ans  Answer timer   EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  Represents the minimum unit of SFC network operation.  ·  When the state of the predecessor transition becomes TRUE(ON), the connected  answer step becomes active and the ladder circuit or action connected on the right  side of the answer step is executed.  ·  Answer step can be written more than once only in phase. Description at the operation  level is not allowed.  ·  Answer step instruction has an answer back monitor timer. If execution of the answer  step does not complete before the answer back monitor timer expires (answer back  proceeding transition is satisfied), an answer back alarm is issued. In this case, the  timer value is limited by the set value. Answer back monitor is disabled when the timer  is set to 0 seconds (time#0s).    ·  The step state can be determined from the following variables:      ·  Step flag : Stepname.X (TRUE(ON) when step is active, FALSE(OFF) when step is  inactive)  ·  Step execution duration : Stepname.T (represents the duration when step is active and  is cleared to 0 the first time the step is active)  ·  Answer step cannot be placed consecutively with other steps. A transition must be  placed between Answer step and other step.    ·  Answer step is not executed consecutively within the same scan.  ·  Restarting answer back monitor    When the SEQ tag mode is set to M (or RM) and later changed to A (or C), the answer  back monitor is restarted (timer current value is cleared to “0”, answer back alarm  restored). The answer back alarm causes M demotion. When reclosed to A, the  answer back alarm is restored to perform answer back monitor again.      ○  Remarks   The timer current value is initialized when the mode is changed from M(or RM) to A(or C).    (The answer back monitor restart function is valid for PU821 (all versions), L3DS(V3.26 and  following versions) and L2DS(V3.18 and following versions)).    Chapter 3    SFC Instructions  6F8C1226  726    ●  Program example    Main screen (operation)    Sub screen (phase)  T12 PB_P  SIGNAL1 PB_PARA[1] PB_D  BNO  PB_P  E  PB_DATA[1] 1 ↑ PB_DATA[1]. FI[1]    T1  T2  INI  SEQ001  SEQ  1  PHASE1  Time#10s T11 P1INI  S12  PhaseEnd     S11  Ans Time#10s     ·  When answer step (step name: S1) becomes active, Push Button instruction (PB_P)  is  executed  and  PB_DATA[1]  button  1  is  pressed.  If  the  transition  condition  (PB_DATA[1].FI[1]) is satisfied before the answer back timer expires (10s), no alarm  is issued and transition is made to the next step. If the timer expires, an answer back alarm is  issued.    ●  Restriction  ·  Description at the operation level is not allowed. Please be sure to describe in phase  level. When it describes in operation level, an active step does not move.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  727    Phase Step 2   SFC  Phase Step 2    Diagram    Ph2  TIM              Step  N  TIM:  Congestion timer set val ue [ms]  N:  Phase No. (1-32)  Step:  Variable name to indicate step instance  EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When the transition condition of the previous step becomes TRUE(ON), the connected  phase step becomes active and executes the ladder circuit or action connected to the  right side of the phase step 2 (for conf progress wait, the connection on the right side  of the phase step 2 remains FALSE(OFF) and the ladder circuit is not executed).    When “acknowledge operation” is performed, the connection on the right side of the  phase step 2 becomes TRUE(ON).    ·  At the same time, the SFC network is executed as “phase”.    ·  When phase execution completes (when the next phase step is active)    and the  transition condition of the proceeding step becomes TRUE(ON), its own phase step is  deactivated (inactive).    ·  The numbers from 1 to 32 are set as phase numbers. A number is used to associate  with a sequence tag member (phase name PNAM and interlock/single selection (FA))  and the phase execution status can be monitored by OIS-DS.    ·  The phase step 2 instruction has a congestion monitor timer. If phase execution is not  completed before the congestion monitor timer expires, a congestion alarm is issued.  In such case the time value is limited by the set value.    Chapter 3    SFC Instructions  6F8C1226  728    ●  Program example    T2  T1  INI  SEQ001  SEQ  1  PHASE1  Time#10s T5  2  PHASE2  Time#10s T3  S1  T4  S2  Phase 1    ·  When T1 is TRUE(ON), phase 1 (up to the previous step of the next phase step 2) is  executed.    ·  If the phase is not executed in 10 seconds, the congestion alarm is issued.      ●  Error information  ·  No action is made when the phase number is out of the range (other than 1 to 32).  ·  When the congestion monitor timer set value is 0, the timer current value is not  updated and the alarm is not issued (treated as no setting for congestion monitor).          Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  729    Answer Step 2    SFC  Answer Step 2    Diagram      Ans2    TIM              Step  TIM : Answer back timer set value [ms]  Step: Variable name to indicate step instance  EN input  Edge execution  Index modification  Modifier  —  —  —    ●  Function  ·  When the state of the predecessor transition becomes TRUE(ON), the connected  answer step becomes active and the ladder circuit or action connected on the right  side of the answer step 2 executed.    ·  Answer step 2 instruction has an answer back monitor timer. if execution of the answer  step 2 does not complete before the answer back monitor timer expires (answer back  proceeding transition is satisfied), an answer back alarm is issued. In this case, the  timer value is limited by the set value.    Answer back monitor is disabled when the timer is set to 0 second (TIME#0s).  ·  Answer step 2 cannot be placed consecutively with other steps. A transition must be  placed between the answer step 2 and other step.    ·  The answer step 2 is not executed consecutively within the same scan.      ●  Program example      Ans2  S3  T3  T1  T2  S1  SIGNAL1  TIME#10s      ·  The monitor timer is updated when the answer step (step name:Ans2) is activated.    ·    When the transition condition (T2) is satisfied before the answer back timer (10  seconds) expires, no alarm is issued and transition is made to the next step.    ·  If the timer expires, an answer back alarm is issued.    Chapter 3    SFC Instructions  6F8C1226  730    ●  Error information  ·  When the answer back monitor timer set value is 0, the timer current value is not  updated and the alarm is not issued (treated as no setting for answer back monitor).          731  Appendix A  Using Any Function      Appendix A    Using Any Function  6F8C1226  732    No.  Instruction  Remarks    (Real instruction)  Arithmetic Operations    Add  +  ADD_□□  1  Multiply  *  MUL_□□  Subtract  -  SUB_□□  2  Divide  /  DIV_□□  Logical Operations    Bitwise Boolean AND  AND  AND_□□  Bitwise Boolean OR  OR  OR_□□  3  Bitwise Boolean XOR  XOR  XOR_□□  4  Bitwise Boolean NOT  ~  NOT_□□  Comparison Functions    Greater Than  >  GT_□□  Greater Than or Equal  >=  GE_□□  Equal  =  EQ_□□  Less Than or Equal  <=  LE_□□  5  Less Than  <  LT_□□  6  Not Equal  <>  NE_□□          Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    733    ●  Any function instructions  These  are  standard  functions  for  any  data  types.  The  user  can  use  the  instruction  symbols without specifying the data type.      ·  Any Function instructions are supported by Program Editor (full graphic).  ·  Converts to equivalent instructions in the "Remarks" column when compiled.    ·  The instruction data type is fixed automatically.    Instruction type  Instruction data type  Arithmetic Operations  Logical Operations  Using the output data type, their data type is fixed.  Comparison Functions  Using the input data type, their data type is fixed.    ·  If the fixed data type is different from the input one, Type Conversion instruction is  inserted automatically.  ·  Automatic insertion of Type Conversion Instruction.  1)  The program code steps increases, when Type Conversion instruction is inserted  automatically.  2)  Type Conversion instruction is NOT inserted, if the value is rounded down or the  error margin is caused. (It is the compile error.)  Example A: Value is rounded down.  Output (UINT) = Input1 (INT) + Input2 (UINT)  If the value of input (INT) is a minus, it is rounded down.  Example B: Error margin is caused.  Output (REAL) = Input1 (DINT) + Input2 (DINT)  If the value of result beyond the limits of "-16777215" to "16777215",  the error margin is caused.  3)  When  their  instruction  type  is  Arithmetic  Operations  or  Comparison  Functions,  and  the input data type is "WORD", the type is converted into "DINT" or "UINT".  The BCD data is not supported.  Data types are indicated by "notations" (INT, REAL and others) in this section.      Appendix A    Using Any Function  6F8C1226  734    Add/multiply   Arithmetic Operation  Add/Multiply    LD/FBD language  notation      Input 1 Output □  Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○  ○   —    ●  Arguments  ・ The following data types are supported for input and output arguments:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1・・・n  2≤n≤15  Output  —    —  Output      Input 1 Output  □   Input 2 Input n   Input1…n  Symbol (□)  Output  See below  +  * See below      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    735    ●  Function  ·  The type of the instruction symbol (data type) is the same as the output data type.  Refer to the following rule tables for the input data type that can be used at once.  The data type that does not exist in the following table will be the compile error:    [Table: Rules of data types]  ○  : Compile OK,    × : Compile error  Input1…n data type  Output data type  Input1…n data type INT  DINT  UINT  REAL  WORD INT  ○   ×  ×  ×  ×  DINT  ×  ×  ×  ×  ×  UINT  ×  ×  ×  ×  ×  REAL  ×  ×  ×  ×  ×  INT  WORD  ×  ×  ×  ×  ×  INT  ○   ○   ○   ×  ○   DINT  ○   ○   ○   ×  ○   UINT  ○   ○   ○   ×  ○   REAL  ×  ×  ×  ×  ×  DINT  WORD  ○   ○   ○   ×  ○   INT  ×  ×  ×  ×  ×  DINT  ×  ×  ×  ×  ×  UINT  ×  ×  ○   ×  ○   REAL  ×  ×  ×  ×  ×  UINT  WORD  ×  ×  ○   ×  ○   INT  ○   ×  ○   ○   ×  DINT  ×  ×  ×  ×  ×  UINT  ○   ×  ○   ○   ×  REAL  ○   ×  ○   ○   ×  REAL  WORD  ×  ×  ×  ×  ×    ·  If the output data type and the input data type are different, the input data type fix  according to the output data type. That is, Type Conversion instruction is inserted  between input data and the instruction.  ·  If the input data type is "WORD", Type Conversion instruction "Bit string - Integer  conversion" is inserted.    Type conversion  Type conversion instruction  WORD→DINT  WORD_TO_DINT  WORD→UINT  WORD_TO_UINT    ·  Refer  to  the  description  of  "Arithmetic  Operation  Instructions"  for  "function",  "operation" and "error information" of each instruction (ADD / SUB / MUL / DIV).  Appendix A    Using Any Function  6F8C1226  736    ●  Program example  [LD/FBD language notation]          SAMPLE1  “INT”  LD  +  SAMPLE2  “REAL”  LD  SAMPLE3  “UINT”  LD  SAMPLE4  “REAL”  ST  SAMPLE1 “INT” LD  ADD_REAL  SAMPLE2 “REAL” LD  SAMPLE3 “UINT” LD  SAMPLE4 “REAL” ST  Type conversion  instruction  “INT→REAL” INT_TO_REAL  Internal  process Type conversion  instruction  “UINT→REAL” UINT_TO_REAL       ·  As the output data type is "REAL", "ADD_REAL" is used.    ·  To operate SAMPLE1 ("INT") and SAMPLE3 ("UINT") by "REAL", Type Conversion  instructions are automatically inserted.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    737    Subtract/Divide    Arithmetic Operation  Subtract/Divide    LD/FBD  language  notation      Input 1 Output  □  Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —    ●  Arguments  ·  The following data types are supported for input and output arguments:      Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1, 2    Output  —    —  Output          Input 2 Input 1 Output    □     Input1, 2  Symbol( □ )  Output  See below  —  /  See below    Appendix A    Using Any Function  6F8C1226  738    ●  Function  ·  The type of the instruction symbol (data type) is the same as the output data type.  Refer to the following rule tables for the input data type that can be used at once.  ·  The data type that does not exist in the following table will the compile error:    [Table: Rules of data types]    ○ : Compile OK, × : Compile Error  Input2 data type  Output data type  Input1 data type  INT  DINT  UINT  REAL  WORD INT  ○   ×  ×  ×  ×  DINT  ×  ×  ×  ×  ×  UINT  ×  ×  ×  ×  ×  REAL  ×  ×  ×  ×  ×  INT  WORD  ×  ×  ×  ×  ×  INT  ○   ○   ○   ×  ○   DINT  ○   ○   ○   ×  ○   UINT  ○   ○   ○   ×  ○   REAL  ×  ×  ×  ×  ×  DINT  WORD  ○   ○   ○   ×  ○   INT  ×  ×  ×  ×  ×  DINT  ×  ×  ×  ×  ×  UINT  ×  ×  ○   ×  ○   REAL  ×  ×  ×  ×  ×  UINT  WORD  ×  ×  ○   ×  ○   INT  ○   ×  ○   ○   ×  DINT  ×  ×  ×  ×  ×  UINT  ○   ×  ○   ○   ×  REAL  ○   ×  ○   ○   ×  REAL  WORD  ×  ×  ×  ×  ×    ·  If the output data type and the input data type are different, the input data type fix  according to the output data type. That is, type conversion instruction is inserted  between input data and the instruction.  ·  If the input data type is "WORD", Type Conversion instruction "Bit string - Integer  conversion" is inserted.    Type conversion  Type conversion instruction  WORD→DINT  WORD_TO_DINT  WORD→UINT  WORD_TO_UINT    ·  Refer  to  the  description  of  "Arithmetic  Operation  Instructions"  for  "function",  "operation" and "error information" of each instruction (ADD / SUB / MUL / DIV).      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    739    ●  Program example    [LD/FBD language notation]      SAMPLE1  “INT”  LD  —  SAMPLE2  “REAL”  LD  SAMPLE3  “REAL”  ST  SAMPLE1 “INT” LD  SUB_REAL  SAMPLE2 “REAL” LD  SAMPLE3 “REAL” ST  Type conversion  instruction  “INT→REAL” INT_TO_REAL  Internal  process     ·  As the output data type is "REAL", "ADD_REAL" is used.    ·  To operate SAMPLE1 ("INT") and SAMPLE3 ("UINT") by "REAL", the Type  Conversion Instructions are automatically inserted.  Appendix A    Using Any Function  6F8C1226  740    Bitwise Boolean AND/Bitwise Boolean OR/Bitwise Boolean XOR   Logical Operation  Bitwise  Boolean  AND/Bitwise  Boolean  OR/Bitwise  Boolean XOR    LD/FBD  language  notation      Input 1 Output  □□□  Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —    ●  Arguments  ·  The following data types are supported for input and output arguments:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1…n  2≤n≤15  Output  —    —  Output      Input 1 Output  □□□  Input 2 Input n   Input1…n  Symbol( □□□ )  Output  See below  AND  OR  XOR  See below        Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    741    ●  Function  ·  The type of the instruction symbol (data type) is the same as the output data type.  Refer to the following rule tables for the input data type that can be used at once.  ·  The data type that does not exist in the following table will be the compile error:    [Table: Rules of data types]                        ○ : Compile OK, × : Compile Error  Input 1…n data type  Output data type  Input 1…n data type BOOL  WORD  DWORD  BOOL  ○   ×  ×  WORD  ×  ×  ×  BOOL  DWORD  ×  ×  ×  BOOL  ×  ×  ×  WORD  ×  ○   ×  WORD  DWORD  ×  ×  ×  BOOL  ×  ×  ×  WORD  ×  ○   ○   DWORD  DWORD  ×  ○   ○     ·  If the output data type and the input data type are different, the input data type fix  according to the output data type. That is, Type Conversion instruction is inserted  between input data and the instruction.  ·  Refer to the description of "Logical Operation Instructions" for "function", "operation"  and "error information" of each instruction (Bitwise Boolean AND / Bitwise Boolean  OR / Bitwise Boolean XOR).    ●  Program example  [LD/FBD language notation]        SAMPLE1  “DWORD”  LD  AND  SAMPLE2  “DWORD”  LD  SAMPLE3  “WORD”  LD  SAMPLE4  “DWORD” ST  AND_DWORD  Internal  process  Type conversion  instruction  “WORD→DWORD” WORD_TO_DWORD SAMPLE1 “DWORD” LD  SAMPLE2 “DWORD” LD  SAMPLE3 “WORD” LD  SAMPLE4 “DWORD” ST      ·  As the output data type is "DWORD", "AND_DWORD" is used.    ·  To operate SAMPLE3 ("WORD") by "DWORD", Type Conversion instructions are  automatically inserted.  Appendix A    Using Any Function  6F8C1226  742    Bitwise Boolean NOT    Logical Operation  Bitwise Boolean NOT    LD/FBD  language  notation  Input  Output  ~   EN input  Edge execution  Index modification  Modifier  ○   ○   —    ●  Arguments  ·  The following data types are supported for input and output arguments:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input    Output  —    —  Output      Input  Output  □   Input1, 2  Symbol( □ )  Output  See below  ~  See below    ●  Function  ·  The type of the instruction symbol (data type) is the same as the output data type.  Refer to the following rule table for the input data type that can be used at once.  ·  The data type that does not exist in the following table will be the compile error:  [Table: Rules of data types]  ○ : Compile OK, × : Compile error  Input data type  Output data type  BOOL  WORD  DWORD  BOOL  ○   ×  ×  WORD  ×  ○   ×  DWORD  ×  ○   ○     ·  If the output data type and the input data type are different, the input data type fix  according to the output data type. That is, Type Conversion instruction is inserted  between input data and the instruction.  ·  Refer to the description of "Logical Operation Instructions" for "function", "operation"  and "error information" of each instruction (Bitwise Boolean NOT).      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    743    ●  Program example    [LD/FBD language notation]      SAMPLE1  “WORD”  LD  ~  SAMPLE2  “DWORD” ST  NOT_DWORD  Internal  process Type conversion  instruction  “WORD→DWORD” WORD_TO_DWORD SAMPLE1 “WORD” LD  SAMPLE2 “DWORD” ST      ·  As the output data type is "DWORD", "NOT_DWORD" is used.    ·  To operate SAMPLE1 ("WORD") by "DWORD", Type Conversion instructions are  automatically inserted.  Appendix A    Using Any Function  6F8C1226  744    Greater Than/Greater Than or Equal/Equal/Less Than or Equal/less Than   Comparison  Function  Greater Than/Greater Than or Equal/Equal/Less Than  or Equal/Less Than    LD/FBD  language  notation      Input 1 Output  □□  Input 2 Input n   EN input  Edge execution  Index modification  Modifier  ○   ○   —    ●  Arguments  ·  The following data types are supported for input and output arguments:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1…n  2≤n≤15  Output  —  BOOL  —  Output          Input 1 Output  □□  Input 2 Input n   Input1…n  Symbol( □□ )  See below  >  >=  =  <=  <      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    745    ●  Function  ·  Refer to the following rule tables for the input data type that can be used at once.  ·  The data type that does not exist in the following table will be the compile error:    [Table: Rules of data types]                                ○ : Compile OK, × : Compile error  Input1…n data type  Input1…n data type  INT  DINT  UINT  REAL  WORD  DWORD INT  ○   ○   ○   ○   ○   ×  DINT  ○   ○   ○   ×  ○   ×  UINT  ○   ○   ○   ○   ○   ○   REAL  ○   ×  ○   ○   ×  ×  WORD  ○   ○   ○   ×  ○   ○   DWORD  ×  ×  ○   ×  ○   ○     ·  When all the rules of "Input 1 … n" are " ○ ", the compiler is successes.  ·  The type of the instruction symbol is determined by the input data type.    If "Input 1 ... n" has two types or more of the data type, the data type is determined by  the rule in the following table:    [Table: Rules of data types]    × : Compile error  Input1…n data type  Input1…n data type  INT  DINT  UINT  REAL  WORD  DWORD INT  INT  DINT  DINT  REAL  DINT  ×  DINT  DINT  DINT  DINT  ×  DINT  ×  UINT  DINT  DINT  UINT  REAL  UINT  DWORD REAL  REAL  ×  REAL  REAL  ×  ×  WORD  DINT  DINT  UINT  ×  WORD  DWORD DWORD  ×  ×  DWORD ×  DWORD  DWORD   ·  If the data type of the inputs have three types or more of the data type, the data type  of the instruction symbol is determined by the following flow:    Example1:      Input 1  “INT”  Input 2  “INT”  Input 3  “REAL”    “INT”    “REAL” Input n  “UINT”    “REAL” Instruction symbol type (data type)  “REAL”    Appendix A    Using Any Function  6F8C1226  746    ·  If the data type of inputs (1…n) and the fixed data type are different, the input data type  fix according to the fixed data type. That is, the Type Conversion instruction is inserted  between input data and the instruction.  ·  If the input data type is "WORD", "Bit string - Integer conversion" of the Type  Conversion instructions is inserted    Type conversion  Type conversion instruction  WORD→DINT  WORD_TO_DINT  WORD→UINT  WORD_TO_UINT    ·  Refer to the description of "Logical Operation Instructions" for "function", "operation"  and "error information" of each instruction (Greater than/Greater than or  equal/Equal/Less than or equal/Less than).      ●  Important  ·  "Comparison  Function  Instructions"  are  used  following  the  data  types  that  are  not  supported.  "TIME", "TIME_OF_DAY (Abbreviation: TOD) ",  "DATE (Abbreviation: D) ", "DATE_AND_TIME (Abbreviation: DT) "    ●  Program example  [LD/FBD language notation]        SAMPLE1  “INT”  LD  >  SAMPLE2  “REAL”  LD  SAMPLE3  “UINT”  LD  SAMPLE4  “BOOL”  ST  SAMPLE1 “INT” LD  GT_REAL  SAMPLE2 “REAL” LD  SAMPLE3 “UINT” LD  SAMPLE4 “BOOL” ST  Type conversion  instruction  “INT→REAL” INT_TO_REAL  Internal  process  Type conversion  instruction  “UINT→REAL” UINT_TO_REAL     ·  Because SAMPLE1, SAMPLE2 and SAMPLE3 are different each the data type, the  data type of instruction fix "REAL" by "Rules of data types" table.    ·  To convert the SAMPLE1 ("INT") and SAMPLE3 ("UINT") into "REAL", the Type  Conversion instruction is automatically inserted.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)    747    Not Equal    Comparison  Function  Not Equal    LD/FBD  language  notation      Input 1 Output  <>  Input 2   EN input  Edge execution  Index modification  Modifier  ○   ○   —    ●  Arguments  ·  The following data types are supported for input and output arguments:    Arg.  Operand  Type  Const.  Description  Remarks  Input  —  See below  ○   Input1, 2  Input number =2  Output  —  BOOL  —  Output        Input 1 Output  □□  Input 2   Input1, 2  Symbol( □□ )  See below  <>  ●  Function  ·  Refer to the following rule table for the input data type that can be used at once.  ·  The data type that does not exist in the following table will be the compile error:    [Table: Rules of data types]  ○ : Compile OK, ×: Compile error  Input2 data type  Input1 data type  INT  DINT  UINT  REAL  WORD  DWORD  INT  ○  ○  ○  ○  ○  ×  DINT  ○  ○  ○  ×  ○  ×  UINT  ○  ○  ○  ○  ○  ○  REAL  ○  c  ○  ○  ×  ×  WORD  ○  ○  ○  ×  ○  ○  DWORD  ×  ×  ○  ×  ○  ○    ·  The type of the instruction symbol is fixed by the input data type. If "Input 1, 2 " have  two types or more of the data type, the data type is fixed by the rule in the following  table.  Appendix A    Using Any Function  6F8C1226  748    [Table: Rules of data types]    ×: Compile error  Input2 data type  Input1 data type  INT  DINT  UINT  REAL  WORD  DWORD  INT  INT  DINT  DINT  REAL  DINT  ×  DINT  DINT  DINT  DINT  ×  DINT  ×  UINT  DINT  DINT  UINT  REAL  UINT  DWORD  REAL  REAL  ×  REAL  REAL  ×  ×  WORD  DINT  DINT  UINT  ×  WORD  DWORD  DWORD  ×  ×  DWORD ×  DWORD  DWORD    ·  If the data type of inputs (1, 2)    and the fixed data type are different, the input data  type fix according to the fixed data type. That is, Type Conversion instruction is  inserted between input data and the instruction.  ·  If the input data type is "WORD", "Bit string - Integer conversion" of the Type  Conversion instructions is inserted.    Type conversion  Type conversion instruction  WORD→DINT  WORD_TO_DINT  WORD→UINT  WORD_TO_UINT    ·  Refer to the description of "Logical Operation Instructions" for "function", "operation"  and "error information" of each instruction (Not equal).    ●  Important  ·  "Comparison Function Instructions" are used following the data types that are not  supported.      "TIME", "TIME_OF_DAY (Abbreviation: TOD) ",      "DATE (Abbreviation: D) ", "DATE_AND_TIME (Abbreviation: DT) "    ●  Program example  [LD/FBD language notation]    SAMPLE1  “INT”  LD  <>  SAMPLE2  “REAL”  LD  SAMPLE3  “BOOL”  ST  SAMPLE1 “INT” LD  NE_REAL  SAMPLE2 “REAL” LD  SAMPLE3 “BOOL” ST  Type conversion  instruction  “INT→REAL” INT_TO_REAL  Internal  process      ·  Because variable SAMPLE1 and variable SAMPLE2 are different each the data type,  the data type of instruction fix "REAL" by table "Rules of data types".    ·  To convert the SAMPLE1 ("INT") into "REAL ", the Type Conversion instruction is  automatically inserted.      Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  749  Symbol      , ············································································ 501  .. ,  ··········································································· 503  .. :  ··········································································· 499      :  ·········································································· 497  % conversion··························································· 420  A  ABS ········································································· 245  ACC_P····································································· 670  ACOS ······································································ 255  ACT_P····································································· 666  ADC········································································· 294  ADD································································· 292, 313  AND········································································· 260  ARRAY_TO_STRING·············································· 231  ASC module string data input ·································· 346  ASC module string data output································ 349  ASC_TO_REAL······················································· 214  ASCDEC_TO_DINT ················································ 219  ASCHEX_TO_DINT ················································ 222  ASCII (decimal)-double integer conversion············· 219  ASCII (hexadecimal)-double integer conversion ····· 222  ASCII-HEX conversion ············································ 210  ASCII-real numbers conversion······························· 214  ASCREAD······························································· 346  ASCWRITE······························································ 349  ASIN········································································ 253  ATAN········································································ 257  ATOH_T··································································· 210  AVE·········································································· 154  AVEL········································································ 156  Absolute value························································· 245  Action······································································· 710  Action counter·························································· 670  Action timer······························································ 666  Add ·········································································· 292  Add time data··························································· 313  Add with carry·························································· 294  Answer step····························································· 725  Arccosine································································· 255  Arcsine····································································· 253  Arctangent ······························································· 257  Arithmetic operation················································· 291  Arithmetic shift ························································· 287  Array-string conversion············································231  Average of table data···············································156  Average value··························································154  B  BC············································································328  BCD-duration conversion·········································191  BCD-integer conversion···········································187  BCD-real numbers conversion·································189  BIN···········································································204  BIN conversion·························································204  Bit counter································································328  Bit operation·····························································278  Bit string-bit string conversion··································185  Bit string-integer conversion·····································183  Bitwise Boolean AND···············································260  Bitwise Boolean AND of table data ··························262  Bitwise Boolean NOT···············································268  Bitwise Boolean NOT of table data ··························269  Bitwise Boolean NOT XOR of table data ·················275  Bitwise Boolean OR·················································264  Bitwise Boolean OR of table data ····························266  Bitwise Boolean XOR···············································271  Bitwise Boolean XOR of table data··························273  C  CASE·······································································495  CMLP_P···································································639  CMPB_P··································································641  CMSQ_P··································································643  CONCAT_D_TOD····················································208  CONCAT_STRING ··················································473  COS·········································································249  CTD············································································80  CTU············································································78  CTUD·········································································82  Calendar data acquisition·········································689  Change adjuster mode·············································639  Change push button mode·······································641  Change sequence mode··········································643  Coil ·············································································60  Common logarithms·················································241  Communication························································524  Communication FB (XMIT_N)··································592  Communication FB (XMIT_T) ··································590  Comparison······························································124    6F8C1226  750  Comparison with hysteresis (greater than) ·············· 137  Comparison with hysteresis (greater than or equal)              ········································································ 141  Comparison with hysteresis (less than) ··················· 139  Comparison with hysteresis (less than or equal)              ········································································ 143  Concatenate string··················································· 473  Concatenate time data············································· 208  Conditional execution instruction/End of conditional  execution instruction·················································· 75  Contacts/Coils···························································· 52  Control statements··················································· 485  Controller global variable··········································· 10  Cosine ····································································· 249  Counters···································································· 77  Current output PID··················································· 605  Current output sample PI········································· 612  Cyclic trace······························································ 687  D  DATALOGC····························································· 687  DB············································································ 372  DCL_P····································································· 633  DEC································································· 309, 326  DEF_STRING·························································· 483  DEG_TO_RAD························································ 202  DEG-RAD conversion·············································· 202  DEL_L······································································ 102  DELETE··································································· 477  DI_T········································································· 464  DIAG_D··································································· 691  DIAG_D2 ································································· 694  DIF2········································································· 374  DINT_TO_ASCDEC················································ 225  DINT_TO_ASCHEX ················································ 228  DINT_TO_BCD_DWORD········································ 174  DINT_TO_BCD_WORD·········································· 174  DINT_TO_DWORD················································· 172  DINT_TO_INT ························································· 169  DINT_TO_REAL······················································ 171  DINT_TO_TIME······················································· 176  DINT_TO_UINT······················································· 169  DINT_TO_WORD···················································· 172  DIS_P······································································ 458  DIV··································································· 303, 319  DLM········································································· 414  DO··········································································· 515  Drive Device State Read··········································369  DT ············································································402  DT_TO_DATE··························································206  DT_TO_TOD····························································206  DUPLEX_CHG·························································595  DUPLEX_DOWN·····················································597  DWORD_BCD_TO_DINT········································187  DWORD_BCD_TO_INT···········································187  DWORD_BCD_TO_REAL·······································189  DWORD_BCD_TO_TIME········································191  DWORD_BCD_TO_UINT········································187  DWORD_TO_DINT··················································183  DWORD_TO_INT ····················································183  DWORD_TO_UINT··················································183  DWORD_TO_WORD···············································185  Data type······································································6  Data exchange·························································120  Data structure·······························································8  Data processing·······················································321  Dead band ·······························································372  Dead time·································································402  Decode·····································································326  Decrement ·······························································309  Define string·····························································483  Delete string·····························································477  Derivative·································································374  Direct I/O··································································355  Divergence/Convergence of sequence····················706  Divergence/Convergence of simultaneous sequences            ········································································707  Divide·······································································303  Divide time data ·······················································319  Double cross limit·····················································633  Double integer-ASCII (decimal) conversion·············225  Double integer-ASCII (hexadecimal) conversion·····228  Down counter·····························································80  Drive Device State Read··········································369  Duplex control ··························································594  Duplex online-standby change·································595  Duplex self-system down·········································597  Duration-BCD conversion ········································196  Duration-integer conversion·····································193  Duration-real numbers conversion···························195  E  EI_T ·········································································463  ELSE (CASE statement)··········································505    Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  751  ELSE (IF statement) ················································ 490  ELSEIF ···································································· 492  EN_P······································································· 456  ENC········································································· 324  END_CASE····························································· 507  END_FOR ······························································· 513  END_IF···································································· 494  END_REPEAT························································· 523  END_WHILE···························································· 518  EQ ··········································································· 129  EQUALIZE_ADDR··················································· 601  EQUALIZE_VAR······················································ 599  EXIT (FOR statement) ············································· 511  EXIT (REPEAT statement)······································· 521  EXIT (WHILE statement) ········································· 516  EXP ········································································· 239  EXPT ······································································· 311  Encode ···································································· 324  Engineering unit conversion ···································· 418  Equal ······································································· 129  Essential succession PID········································ 422  Estimate with reset ·················································· 430  Event program start up ············································ 460  Execution control ······················································· 72  Exponential ······························································ 239  Extract string···························································· 471  F  FBD language······························································ 3  FFD_P····································································· 629  FIND········································································ 481  FOR_DO·································································· 509  Falling edge detector ················································· 58  Feed forward ··························································· 629  Find string································································ 481  Fix MV ····································································· 388  Flip-flops ·································································· 104  Forced coil ································································· 66  Forced negated coil ··················································· 67  Forced negative transition-sensing coil ····················· 71  Forced positive transition-sensing coil ······················· 70  Forced RESET coil ···················································· 69  Forced SET coil ························································· 68  Function····································································· 18  Function block ··························································· 22  G  GE············································································127  GE_L········································································141  GET_CLND······························································689  GET_DRV_STS·······················································369  GET_IO_STS···························································361  GET_IP_INF ····························································352  GET_SIO_STS ························································357  GT············································································125  GT_L········································································137  Global variable···························································10  Greater than·····························································125  Greater than or equal ···············································127  H  HEX-ASCII conversion·············································212  HTOA_T···································································212  I  I/O fallback recovery request ···································367  I/O fallback request ··················································365  I/O module state read···············································361  I/O node state read ··················································357  IF··············································································486  ILNL ·········································································395  ILNL_REAL2····························································399  INC···········································································307  INI_STEP·································································684  INSERT····································································475  INT_TO_BCD_DWORD···········································174  INT_TO_BCD_WORD·············································174  INT_TO_DINT··························································169  INT_TO_DWORD····················································172  INT_TO_REAL·························································171  INT_TO_TIME··························································176  INT_TO_UINT··························································169  INT_TO_WORD·······················································172  INTG ········································································377  IO_T·········································································355  IOFB_REQ·······························································365  IORC_REQ······························································367  Increment ·································································307  Index registers····························································25  Initial step·································································703  Initialize table data ···················································122    6F8C1226  752  Insert string······························································ 475  Integer-BCD conversion ·········································· 174  Integer-bit string conversion ···································· 172  Integer-duration conversion····································· 176  Integer-integer conversion······································· 169  Integer-real numbers conversion····························· 171  Integrator ································································· 377  Interlock diagnosis··················································· 691  Interlock Diagnosis with First Fault Diagnosis Permission Input            ····················································································694  Interrupt disable······················································· 464  Interrupt enable························································ 463  Inverse polygonal line function ································ 395  Inverse polygonal line function (high-speed version)            ········································································ 399  Inverter······································································· 59  I/O············································································ 333  I/O memory read······················································ 334  I/O memory read (nv) ·············································· 340  I/O memory write ····················································· 337  I/O memory write (nv) ·············································· 343    J  JCR············································································ 73  JCS············································································ 73  Jump control set/reset ··············································· 73  Jump/Label ································································ 74  L  LABEL ······································································· 74  LAG2 ······································································· 416  LB_P········································································ 664  LD language ································································ 3  LE ············································································ 131  LE_L ········································································ 143  LEFT········································································ 467  LEN·········································································· 466  LIMIT ······································································· 158  LN············································································ 243  LOG········································································· 241  LT············································································· 133  LT_L········································································· 139  Lag/Lead filter ·························································· 416  Leftmost extract string ············································· 467  Less than································································· 133  Less than or equal ···················································131  Limiter ······································································158  Link ··········································································708  Local variable·····························································10  Logical operation······················································259  Logical shift ······························································289    M  MAV··········································································406  MAV_N·····································································410  MAX·········································································146  MAXL ·······································································148  MCR···········································································76  MCS···········································································76  MID ··········································································471  MIN ··········································································150  MINL ········································································152  MOD·········································································305  MOVE ······································································116  MPX·········································································165  MREAD····································································334  MREAD_N ·······························································340  MUL ·································································300, 317  MUL_INT_DINT·······················································302  MUX·········································································163  MVF ·········································································388  MV calculation··························································385  MVS·········································································385  MWRITE ··································································337  MWRITE_N······························································343  Master control set/reset··············································76  Maximum ·································································146  Maximum of table data·············································148  Minimum ··································································150  Minimum of table data··············································152  Move data ································································116  Move table data························································118  Moving ····································································· 111  Moving average (high-speed version)······················406  Moving average (low-speed version) ·······················410  Multiplex···································································163  Multiplex of table data ··············································165  Multiply·····························································300, 302  Multiply time data·····················································317    Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  753  N  NE············································································ 135  NEG········································································· 200  NOT········································································· 268  Natural logarithms···················································· 243  Negated coil······························································· 61  Negative transition sensing contact ··························· 56  Negative transition-sensing coil ································· 65  Network variable························································ 10  Non-tracking type static variable································ 10  Normally closed contact············································· 54  Normally closed contact gate··································· 114  Normally open contact ··············································· 53  Normally open contact gate····································· 112  Not equal ································································· 135  Numeric function······················································ 237  O  OR··········································································· 264  Off-delay timer ··························································· 90  On/off-delay timer ···················································· 102  On-delay timer ··························································· 87  P  PB_P ······································································· 661  PCT ········································································· 420  PID_P······································································ 605  PID2········································································· 380  PID3········································································· 422  PIDP_P···································································· 618  PLN·········································································· 390  PLN_REAL2 ···························································· 393  Parameter structure················································· 433  Partial equalizer (address specification) ·················· 601  Partial equalizer (variable specification) ·················· 599  Phase end step························································ 723  Phase step······························································· 720  Polygonal line function············································· 390  Polygonal line function (high-speed version) ··········· 393  Positive transition-sensing coil··································· 64  Positive transition-sensing contact ···························· 55  Power ······································································ 311  Process control ························································ 603  Process operation···················································· 371  Program····································································· 18  Program control ·······················································451  Program disable·······················································458  Program enable ·······················································456  Program organization unit ··········································17  Pulse output PID······················································618  Pulse output sample PI ············································623  Pulse timer ·································································93  Push button lock ······················································664  Push button ON ·······················································661  R  RAD_TO_DEG·························································203  RAD-DEG conversion··············································203  RAS··········································································686  REAL_TO_ASC·······················································216  REAL_TO_BCD_DWORD·······································179  REAL_TO_BCD_WORD··········································179  REAL_TO_DINT ······················································177  REAL_TO_INT·························································177  REAL_TO_TIME······················································181  REAL_TO_UINT ······················································177  REPEAT···································································519  REPLACE································································479  RETURN··································································452  RIGHT······································································469  RJ_P········································································678  RJ_P2 ······································································682  RMV_P·····································································655  ROL··········································································285  ROR·········································································283  RS············································································107  RSM_L·····································································430  RSTC·······································································323  RSV_P·····································································649  RTC············································································98  RTC_N·····································································100  Rate limiter·······························································414  Reading and writing variable······································15  Real number format ·····················································9  Real numbers-ASCII conversion······························216  Real numbers-BCD conversion ·······························179  Real numbers-duration conversion··························181  Real numbers-integer conversion····························177  Real time clock···················································98, 100  Remainder ·······························································305  Replace string··························································479  Reset carry·······························································323    6F8C1226  754  RESET coil ································································ 63  Reset jump ······························································ 678  Reset MV································································· 655  Reset SV ································································· 649  Reset type flip-flop··················································· 107  Return······································································ 452  Rightmost extract string··········································· 469  Rising edge detector·················································· 57  Rotate bits left ·························································· 285  Rotate bits right························································ 283  S  SBB ········································································· 298  SCV_P····································································· 657  SEL·········································································· 161  SEMA ······································································ 109  SETC······································································· 322  SFA·········································································· 287  SFC language······························································ 4  SFL·········································································· 289  SHL·········································································· 281  SHR········································································· 279  SIN··········································································· 247  SJ_P········································································ 674  SMV_P ···································································· 651  SPI_P ······································································ 612  SPIP_P···································································· 623  SQRT······································································· 238  SR············································································ 105  SS·············································································· 96  SSV_P····································································· 645  ST language ································································ 4  START_P································································· 460  STRING_TO_ARRAY·············································· 233  SUB································································· 296, 315  Selection·································································· 145  Selector ··································································· 161  Self step jump·························································· 674  Semaphore······························································ 109  Sequence ································································ 717  Set carry ·································································· 322  SET coil ····································································· 62  Set MV····································································· 651  Set SV ····································································· 645  Set type flip-flop······················································· 105  Shift bits left ····························································· 281  Shift bits right ··························································· 279  Shut CV····································································657  Sign negative ···························································200  Sine··········································································247  Single shot ·································································96  Socket communication receive ························558, 570  Socket communication send····························525, 542  Square root ······························································238  State change detection read ····································352  Static variable·····························································10  Station global variable················································10  Step··········································································701  String length·····························································466  String processing ·····················································465  String-array conversion············································233  Subtract····································································296  Subtract time data····················································315  Subtract with carry ···················································298  Super two degrees of freedom PID··························380  System flags ······························································26  T  TAN··········································································251  TAND········································································262  TEST········································································277  THEN·······································································488  TIME_TO_BCD_DWORD········································196  TIME_TO_BCD_WORD ··········································196  TIME_TO_DINT·······················································193  TIME_TO_INT··························································193  TIME_TO_REAL······················································195  TIME_TO_UINT·······················································193  TINZ·········································································122  TMOV·······································································118  TNOT ·······································································269  TO_INDEX·······························································235  TOF············································································90  TOFM_P ····································································90  TON············································································87  TONM_P····································································87  TOR··········································································266  TP ··············································································93  TRST········································································331  TRUNC ····································································198  TSET········································································329  TXNR·······································································275  TXOR·······································································273  Table bit reset···························································331    Unified Controller nv series/Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST)  755  Table bit set······························································ 329  Tag number conversion ··········································· 235  Tag operation··························································· 638  Tangent ···································································· 251  Task ··········································································· 16  Temporary variable···················································· 10  Test ·········································································· 277  Time data type conversion······································· 206  Timers········································································ 85  Transition································································· 704  Truncation································································ 198  Type conversion ······················································ 167  U  UINT_TO_BCD_DWORD········································ 174  UINT_TO_BCD_WORD·········································· 174  UINT_TO_DINT······················································· 169  UINT_TO_DWORD················································· 172  UINT_TO_INT ························································· 169  UINT_TO_REAL······················································ 171  UINT_TO_TIME······················································· 176  UINT_TO_WORD···················································· 172  UNT ········································································· 418  UNTIL ······································································ 520  URCV_N·································································· 570  URCV_T ·································································· 558  USEND_N ······························································· 542  USEND_T································································ 525  Up counter ································································· 78  Up down counter ······················································· 82  User defined function··············································· 453  User defined function block ····································· 454  V  Variable declaration examples··································· 11  Variable memory allocation rules······························· 11  Variables···································································· 10  W  WHILE····································································· 514  WORD_BCD_TO_DINT·········································· 187  WORD_BCD_TO_INT············································· 187  WORD_BCD_TO_REAL········································· 189  WORD_BCD_TO_TIME·········································· 191  WORD_BCD_TO_UINT·········································· 187  WORD_TO_DINT···················································· 183  WORD_TO_DWORD···············································185  WORD_TO_INT·······················································183  WORD_TO_UINT····················································183  X  XCHG·······································································120  XMIT_N····································································592  XMIT_T···································································590  XOR·········································································271        6F8C1226  756    Unied Controller nv series & Integrated Controller V series Programming Instructions (LD/FBD/SFC/ST) September 30, 2010 © Toshiba Corporation 2010     All Right Reserved. No part of this document may be reproduced without the prior written consent of Toshiba. Transmission Distribution & Industrial Systems Company Microelectronics & System Components Department - System Components Support Group 1, Toshiba-Cho, Fuchu-Shi, Tokyo, 183-8511, Japan            Tel +81-42-333-2206 Third Edition Notes (1)  The technical information provided herein describes typical operations and applications of the product and does not  guarantee the intellectual property rights or other rights of Toshiba or third parties nor allows license of its use. (2)  No part or the whole of this document may be reproduced without prior consent. (3)  The information herein may be changed in the future without notice. (4)  All  possible  measures  have  been  taken  to  prepare  the  information  herein.  If  you  have  any  question,  comment,  or  nd any error, please contact us. PROSEC, TOSLINE, TOSDIC, CIEMAC are trademarks or registered trademarks of Toshiba Corporation. Microsoft, Windows are registered trademarks of Microsoft Corporation in the U.S. and other countries. DeviceNet is a registered trademark of Open DeviceNet Vender Association Inc. 6F8C1226 Programming Instructions  (LD/FBD/SFC/ST) Unied Controller nv Series Integrated Controller vseries 1226.3.1009   P r o g r a m m i n g   I n s t r u c t i o n s   ( L D / F B D / S F C / S T ) U n i  e d   C o n t r o l l e r   n v   s e r i e s   & I n t e g r a t e d   C o n t r o l l e r   V   s e r i e s 
    
    
        Copyright © 2025 DOKUMEN.SITE Inc.