ML200 PLC Softmaster Document



Comments



Description

Honeywell Process SolutionsMasterLogic PLC Instruction List ML200-IL R1.1 5/09 Release 1.1 Honeywell Confidential & Proprietary This work contains valuable, confidential, and proprietary information. Disclosure, use or reproduction outside of Honeywell Inc. is prohibited except as authorized in writing. This unpublished work is protected by the laws of the United States and other countries. Notices and Trademarks Copyright 2009 by Honeywell International Inc. Release 1.1 May, 2009 While this information is presented in good faith and believed to be accurate, Honeywell disclaims the implied warranties of merchantability and fitness for a particular purpose and makes no express warranties except as may be stated in its written agreement with and for its customers. In no event is Honeywell liable to anyone for any indirect, special or consequential damages. The information and specifications in this document are subject to change without notice. Honeywell, PlantScape, Experion PKS, and TotalPlant are registered trademarks of Honeywell International Inc. Other brand or product names are trademarks of their respective owners. Honeywell International Process Solutions 2500 West Union Hills Phoenix, AZ 85027 1-800 343-0228 ii MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 About This Document This document describes the Instruction List for MasterLogic 200. Release Information Document Name MasterLogic PLC Instruction List Document ID ML200-IL Release Number 1.1 Publication Date 5/09 References The following list identifies all documents that may be sources of reference for material discussed in this publication. Document Title Contacts World Wide Web The following Honeywell web sites may be of interest to Process Solution customers. Honeywell Organization Corporate Process Solutions WWW Address (URL) http://www.honeywell.com http://www.honeywell.com/ps R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary iii Contacts Telephone Contact us by telephone at the numbers listed as follows. Location United States and Canada Europe Pacific Organization Honeywell IAC Solution Support Center Honeywell TAC-EMEA Honeywell Global TAC Pacific Phone 1-800-822-7673 +32-2-728-2704 1300-300-4822 (toll free within Australia) +61-8-9362-9559 (outside Australia) +91-20-2682-2458 +82-2-799-6317 +86-10-8458-3280 ext. 361 India Korea People’s Republic of China Singapore Taiwan Japan Elsewhere Honeywell Global TAC India Honeywell Global TAC Korea Honeywell Global TAC China Honeywell Global TAC South East Asia Honeywell Global TAC Taiwan Honeywell Global TAC Japan Call your nearest Honeywell office +65-6580-3500 +886-7-323-5900 +81-3-5440-1303 iv MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Symbol Definitions Symbol Definitions The following table lists those symbols used in this document to denote certain conditions. Symbol Definition ATTENTION: Identifies information that requires special consideration. TIP: Identifies advice or hints for the user, often in terms of performing a task. REFERENCE -EXTERNAL: Identifies an additional source of information outside of the bookset. REFERENCE - INTERNAL: Identifies an additional source of information within the bookset. CAUTION Indicates a situation which, if not avoided, may result in equipment or work (data) on the system being damaged or lost, or may result in the inability to properly operate the process. CAUTION: Indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury. It may also be used to alert against unsafe practices. CAUTION symbol on the equipment refers the user to the product manual for additional information. The symbol appears next to required information in the manual. WARNING: Indicates a potentially hazardous situation, which, if not avoided, could result in serious injury or death. WARNING symbol on the equipment refers the user to the product manual for additional information. The symbol appears next to required information in the manual. WARNING, Risk of electrical shock: Potential shock hazard where HAZARDOUS LIVE voltages greater than 30 Vrms, 42.4 Vpeak, or 60 VDC may be accessible. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary v Symbol Definitions Symbol Definition ESD HAZARD: Danger of an electro-static discharge to which equipment may be sensitive. Observe precautions for handling electrostatic sensitive devices. Protective Earth (PE) terminal: Provided for connection of the protective earth (green or green/yellow) supply system conductor. Functional earth terminal: Used for non-safety purposes such as noise immunity improvement. NOTE: This connection shall be bonded to Protective Earth at the source of supply in accordance with national local electrical code requirements. Earth Ground: Functional earth connection. NOTE: This connection shall be bonded to Protective Earth at the source of supply in accordance with national and local electrical code requirements. Chassis Ground: Identifies a connection to the chassis or frame of the equipment shall be bonded to Protective Earth at the source of supply in accordance with national and local electrical code requirements. vi MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Contents 1. 1.1 INTRODUCTION TO MASTERLOGIC PLC.................................21 Overview ........................................................................................................ 21 Background ..........................................................................................................................21 Features of IEC 61131-3 Language .....................................................................................21 Types of Language ..............................................................................................................21 2. 2.1 2.2 SOFTWARE STRUCTURE ..........................................................23 Introduction ................................................................................................... 23 Project ............................................................................................................ 24 Global/Direct Variable ..........................................................................................................24 Parameter ............................................................................................................................24 User Data Type ....................................................................................................................24 Scan Program ......................................................................................................................24 User Function/Function Block ..............................................................................................25 Task Program.......................................................................................................................25 3. 3.1 3.2 COMMON ELEMENTS.................................................................27 Overview ........................................................................................................ 27 Expression ..................................................................................................... 27 Identifiers..............................................................................................................................27 Data Expression...................................................................................................................27 3.3 Data Type ....................................................................................................... 31 Basic Data Type...................................................................................................................31 Data Type Hierarchy Chart...................................................................................................33 Initial Value...........................................................................................................................33 Data Type Structure .............................................................................................................34 3.4 Variable .......................................................................................................... 37 Variable Expression .............................................................................................................37 Variable Declaration .............................................................................................................39 Reserved Variable................................................................................................................41 Reserved Word ....................................................................................................................42 3.5 Program Type ................................................................................................ 44 Function ...............................................................................................................................44 Function Block......................................................................................................................44 Program ...............................................................................................................................45 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary vii Contents Symbol Definitions 3.6 Output Type Selection...................................................................................46 Internally Determined Output type....................................................................................... 46 Data Type Selection Rules .................................................................................................. 48 4. 4.1 4.2 SFC (SEQUENTIAL FUNCTION CHART)................................... 51 Introduction....................................................................................................51 SFC Structure.................................................................................................53 Step..................................................................................................................................... 53 Transition ............................................................................................................................ 53 Action .................................................................................................................................. 54 Action Qualifier .................................................................................................................... 56 4.3 Extension Regulation ....................................................................................62 Serial Connection ................................................................................................................ 62 Selection Branch ................................................................................................................. 62 Parallel Branch (simultaneous branch)................................................................................ 64 Jump ................................................................................................................................... 65 5. 5.1 5.2 5.3 5.4 5.5 5.6 LD (LADDER DIAGRAM) ............................................................ 69 Introduction....................................................................................................69 Bus ..................................................................................................................70 Link..................................................................................................................71 Contact............................................................................................................72 Coil ..................................................................................................................73 Calling Functions and Function Blocks ......................................................75 Configuration ....................................................................................................................... 69 6. 6.1 FUNCTION AND FUNCTION BLOCK......................................... 81 Functions........................................................................................................81 Type Conversion Function .................................................................................................. 81 Numerical Operation Function............................................................................................. 92 Bit Array Function................................................................................................................ 95 Selection Function............................................................................................................... 96 Data Exchange Function ..................................................................................................... 96 Comparison Function .......................................................................................................... 97 Character String Function ................................................................................................... 98 Date and Time of Day Function........................................................................................... 99 System Control Function ................................................................................................... 100 viii MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Contents Symbol Definitions File Function.......................................................................................................................100 Data Manipulation Function................................................................................................101 Stack Operation Function...................................................................................................101 6.2 6.3 6.4 Ladder Functions ....................................................................................... 102 Array Operation Function........................................................................... 103 Basic Function Block.................................................................................. 104 Bistable Function Block ......................................................................................................104 Edge Detection Function Block ..........................................................................................104 Counter ..............................................................................................................................104 Timer ..................................................................................................................................104 File Function Block .............................................................................................................105 Other Function Block..........................................................................................................105 Communication Function Block..........................................................................................106 Special Function Block .......................................................................................................106 Motion Control Function Block ...........................................................................................106 Positioning Function Block .................................................................................................106 6.5 Expanded Functions................................................................................... 109 7. 7.1 BASIC FUNCTIONS...................................................................111 List of Basic functions................................................................................ 111 ABS - Absolute value operation .........................................................................................111 ACOS - Arc Cosine Operation............................................................................................114 ADD - Addition ...................................................................................................................116 ADD_TIME - Time Addition ................................................................................................118 AND - Logical AND (Logical multiplication) ........................................................................121 ASIN - Arc Sine operation ..................................................................................................123 ATAN - Arc Tangent operation ...........................................................................................124 BCD_TO_*** - Converts BCD data into an integer number................................................126 BOOL_TO_*** - BOOL type conversion .............................................................................128 BYTE _TO_*** - BYTE type conversion .............................................................................130 CONCAT - Concatenates a String .....................................................................................132 CONCAT_TIME - Concatenates date and time of day.......................................................135 COS - Cosine operation .....................................................................................................137 DATE_TO_*** - Date type conversion................................................................................138 DELETE - Delete a string ..................................................................................................140 DINT_TO_*** - DINT type conversion ................................................................................142 DIV - Division .....................................................................................................................145 DIV_TIME - Time division...................................................................................................147 DT_TO_*** - DT type conversion .......................................................................................149 DWORD_TO_*** - DWORD type conversion .....................................................................151 EQ - ‘Equal to’ comparison.................................................................................................154 EXP - EXP operation..........................................................................................................156 EXPT - Exponential operation ............................................................................................157 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary ix Contents Symbol Definitions FIND - Find a string ........................................................................................................... 159 GE - ‘Greater than or equal to’ comparison ....................................................................... 160 GT - ‘Greater than’ comparison ......................................................................................... 162 INSERT - Inserts a String.................................................................................................. 164 INT_TO_*** - INT type conversion .................................................................................... 166 LE -'Less than or equal to' comparison ............................................................................. 168 LEFT - Takes the left side of a String ................................................................................ 171 LEN - Finds a length of a String ................................................................................... 172 LIMIT - Limits upper and lower boundaries ....................................................................... 174 LINT_TO_*** - LINT type conversion ................................................................................ 176 LN - Natural logarithm operation ....................................................................................... 179 LOG - Base 10 Logarithm operation.................................................................................. 181 LREAL_TO_*** - LREAL type conversion ......................................................................... 183 LT - ‘Less than’ comparison .............................................................................................. 186 LWORD_TO_*** - LWORD type conversion ..................................................................... 188 MAX - Maximum value ...................................................................................................... 190 MID - Takes the middle part of a String............................................................................. 192 MIN - Minimum value ........................................................................................................ 194 MOD - Dividing result (remainder)..................................................................................... 196 MOVE - Data movement (Copy data)................................................................................ 198 MUL - Multiplication........................................................................................................... 200 MUL_TIME - Time multiplication ....................................................................................... 203 MUX - Selection from multiple inputs ................................................................................ 205 NE - ‘Not equal to’ comparison.......................................................................................... 207 NOT - Reverse Logic (Logic inversion) ............................................................................. 210 OR - Logic Sum................................................................................................................. 211 REAL_TO_*** - REAL type conversion ............................................................................. 213 REPLACE - String replacement ........................................................................................ 215 RIGHT - To take the right of character string .................................................................... 217 ROL - Rotate to Left .......................................................................................................... 219 ROR - Rotate to right......................................................................................................... 222 SEL - Selection from two inputs ........................................................................................ 224 SHL - Shift Left .................................................................................................................. 226 SHR - Shift Right ............................................................................................................... 227 SIN - Sine operation .......................................................................................................... 230 SINT_TO_*** - SINT type conversion................................................................................ 231 SQRT - Square root operation........................................................................................... 234 STRING_TO_*** - STRING type conversion .................................................................... 235 SUB - Subtraction ...................................................................................................... 238 SUB_DATE - Date subtraction .......................................................................................... 240 SUB_DT - Date and Time subtraction ............................................................................... 242 SUB_TIME - Time subtraction........................................................................................... 243 SUB_TOD - TOD Subtraction............................................................................................ 246 TAN - Tangent Operation .......................................................................................... 247 TIME_TO_*** - TIME type conversion............................................................................... 249 TOD_TO_*** - TOD type conversion................................................................................. 250 TRUNC - Round off the decimal fraction of IN and converts into integer number ............. 252 x MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Contents Symbol Definitions UDINT_TO_*** - UDINT type conversion ...........................................................................254 UINT_TO_*** - UINT type conversion ................................................................................257 ULINT_TO_*** - ULINT type conversion ........................................................................259 USINT_TO_*** - USINT type conversion ...........................................................................262 WDT_RST - Initialize Watch_Dog timer........................................................................264 WORD_TO_*** - WORD type conversion .........................................................................266 XOR - Exclusive OR....................................................................................................269 ***_TO_BCD - Converting ANY Type to BCD type ............................................................270 8. 8.1 APPLICATION FUNCTIONS......................................................275 List of Application Functions..................................................................... 275 ARY_ASC_TO_BCD ..........................................................................................................275 ARY_ASC_TO_BYTE ........................................................................................................278 ARY_AVE (Finds an average of an array)..........................................................................280 ARY_BCD_TO_ASC ..........................................................................................................283 ARY_BYTE_TO_ASC ........................................................................................................285 ARY_CMP (Array comparison) ..........................................................................................287 ARY_FLL (Filling an array with data) .................................................................................290 ARY_MOVE (Array move)..................................................................................................294 ARY_ROT_C (Array Bit ROTATE with Carry) ....................................................................297 ARY_SCH (Array search).............................................................................................301 ARY_SFT_C (Array of Bit Shift Left with Carry) .................................................................304 ARY_SWAP (Upper/Lower elements swapping of an array)..............................................307 ASC_TO_BCD (Converts ASCII to BCD)...........................................................................309 ASC_TO_BYTE (Converts ASCII to BYTE data) ...............................................................311 BCD_TO_ASC (Converts BCD to ASCII data)...................................................................312 BIT_BYTE (Combines 8 bits into BYTE) ............................................................................313 BMOV (Moves part of a bit string) ......................................................................................315 BSUM (Counts on-bit number of input) ..............................................................................319 BYTE_BIT (Divides byte into 8 bits) ...................................................................................320 BYTE_TO_ASC (Converts BYTE to ASCII data) ...............................................................323 BYTE_WORD (Combines 2 bytes into WORD) .................................................................324 BYTE_STRING (Converting Byte Array to String)..............................................................325 DEC (Decrease IN data by 1 bit)........................................................................................326 DECO (Decodes the configured bit position)......................................................................328 DEG (Converts radian into degree)....................................................................................330 DI ......................................................................................................................................331 DIREC_IN (Update input data immediately).......................................................................334 DIREC_O (Update output module data immediately).........................................................338 DIS (Data distribution) ........................................................................................................340 DWORD_LWORD (Combines two DWORD data into LWORD) ........................................343 DWORD_WORD (Divides DWORD into 2 WORD data) ....................................................345 EMOV (Reading data from the preset flash area) ..............................................................346 EBCMP (Check the consistency after comparing content).................................................348 EERRST (Clearing flash memory-related error flag) ..........................................................350 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary xi Contents Symbol Definitions ENCO (Produces ON bit position as number) ................................................................... 351 EI (Permits running for task program (Cancel of DI)) ........................................................ 353 ESTOP (Emergency running stop by program) ................................................................. 354 FALS (Saving a user-defined constant(N) to the configured address in F(_FALS_NUM)) 356 GET_CHAR (Gets one character from a String)................................................................ 358 INC (Increase IN data by 1)............................................................................................... 359 LWORD_DWORD (Divides LWORD into two DWORD data)............................................ 361 MCS (Master Control) ....................................................................................................... 362 MCSCLR (Master Control Clear)....................................................................................... 365 MEQ (Masked Equal) ........................................................................................................ 366 OUTOFF (Every Output OFF if input condition is ON) ...................................................... 368 PUT_CHAR (Puts a character in a string) ......................................................................... 370 RAD (Converts degree into radian) ................................................................................... 371 ROTATE_A (Rotates configured array elements) ............................................................. 373 ROTATE_C (Rotate with Carry) ........................................................................................ 377 RSET (Converts the set block number to the configured block number)........................... 380 SEG_WORD (Converts BCD or HEX into 7 segment display code) ................................. 381 SHIFT_A (Shifts configured array elements) ..................................................................... 385 SHIFT_C (Shift with Carry)................................................................................................ 390 STOP (Stop running by program)...................................................................................... 393 STRING_BYTE (Convert a string into a byte array) .......................................................... 394 SWAP (Swaps upper data for lower data) ......................................................................... 396 UNI (Unites data)............................................................................................................... 398 WORD_BYTE (Divides WORD into two bytes) ................................................................. 402 WORD_DWORD (Combines two WORD data into DWORD) ........................................... 403 XCHG (Exchanges two input data).................................................................................... 404 XNR (Exclusive Logical AND) ........................................................................................... 407 9. 9.1 BASIC FUNCTION BLOCKS .................................................... 409 Function block library .................................................................................409 CTD - Down Counter (function block)................................................................................ 409 CTU - Up Counter (function block) .................................................................................... 412 CTUD - Up/Down Counter (function block) ....................................................................... 417 FF - Reverse output bit...................................................................................................... 420 F_TRIG - Falling Edge Detection (function block .............................................................. 422 RS - Reset Priority Bistable (function block)...................................................................... 423 RTC_SET - Writes Time data............................................................................................ 425 R_TRIG - Rising Edge Detection (function block) ............................................................. 428 SEMA - Semaphore (System resource allocation) ............................................................ 429 SR - Set Priority Bistable (function block).......................................................................... 433 TOF - OFF Delay Timer (function block) ........................................................................... 434 TON - ON Delay Timer (function block)............................................................................. 437 TP - Pulse timer (function block) ....................................................................................... 439 10. xii APPLICATION FUNCTION BLOCKS ....................................... 443 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Contents Symbol Definitions 10.1 List of Application Function Blocks ...................................................... 443 CTR - Ring Counter ..........................................................................................................443 DUTY - Scan setting ON/OFF ............................................................................................446 EBREAD - Write R area data to Flash area .......................................................................448 EBWRITE - Write R area data to Flash area......................................................................450 FIFO - Load/Unload data to FIFO stack (First In First Out) ................................................452 LIFO - Load/Unload data to LIFO stack (Last In First Out).................................................458 SCON - Step Controller (Step in order and jump of step) ..................................................465 TMR - Integration Timer .....................................................................................................471 TMR_FLK - TMR with Flicker .............................................................................................473 TMR_UINT - TMR with Integer setting ...............................................................................476 TOF_RST - Delay Timer is able to output OFF in operation ..............................................478 TOF_UINT - OFF Timer of Integer setting..........................................................................481 TON_UINT - ON Timer of Integer setting ...........................................................................483 TP_RST - Pulse timer is able to OFF output of contact .....................................................485 TP_UINT - Pulse Timer with Integer setting .......................................................................489 TRTG Retriggerable Timer............................................................................................491 TRTG_UINT - Retriggerable Timer with Integer setting .....................................................494 11. 11.1 COMMUNICATION AND SPECIAL FUNCTION BLOCKS........497 Communication Function Blocks .......................................................... 497 P2PSN - Station No. setting ...............................................................................................497 P2PRD - Read area setting................................................................................................499 P2PWR - Write area setting ...............................................................................................501 11.2 Special Function Block ........................................................................... 504 GET - Read special module data .......................................................................................504 PUT - Write data to a special module.................................................................................505 ARY_GET - Read special module data(Array) ...................................................................507 ARY_PUT - Write special module data(Array) ...................................................................509 11.3 Motion Control Function Block .............................................................. 511 GETM - Read motion control module data .........................................................................511 PUTM - Write data into a special module(motion module) .................................................512 ARY_GETM - Read motion control module data (Array)....................................................513 ARY_PUTM - Write motion control module data(Array) .....................................................514 APM_ORG - Homing Start .................................................................................................517 APM_FLT - Floating origin setting......................................................................................518 APM_DST - Direct Start .....................................................................................................519 APM_IST - Indirect Start ....................................................................................................522 APM_LIN - Linear interpolation run ....................................................................................523 APM_CIN - Circular interpolation run .................................................................................525 APM_SST - Simultaneous Start .........................................................................................527 APM_VTP - Speed/Position switching ...............................................................................528 APM_PTV - Position/Speed switching ...............................................................................530 APM_STP - Decelerating stop ...........................................................................................531 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary xiii Contents Symbol Definitions APM_SKP - Skip run ......................................................................................................... 532 APM_SSP - Position synchronization................................................................................ 534 APM_SSS - Speed synchronization .................................................................................. 536 APM_POR - Position override ........................................................................................... 537 APM_SOR - Speed override ............................................................................................. 539 APM_PSO - Positioning speed override............................................................................ 541 APM_NMV - Continuous run ............................................................................................. 542 APM_INC - Inching run ..................................................................................................... 544 APM_RTP - Return to the position before manual run ...................................................... 545 APM_SNS - Run step number change.............................................................................. 546 APM_SRS - Repeat step number change......................................................................... 547 APM_MOF - M code cancellation...................................................................................... 548 APM_MOF - Current position preset ................................................................................. 550 APM_ZONE - Zone Output allowed/prohibited.................................................................. 551 APM_EPRE - Encoder value preset.................................................................................. 552 APM_TEA - Singular teaching........................................................................................... 553 APM_ATEA - Plural teaching ............................................................................................ 555 APM_SBP - Basic parameter teaching.............................................................................. 558 APM_SEP - Extension parameter teaching....................................................................... 560 APM_SHP - Origin return parameter setting ..................................................................... 562 APM_SMP - Manual run parameter teaching .................................................................... 565 APM_SIP - Input signal parameter teaching ..................................................................... 566 APM_SCP - Common parameter teaching........................................................................ 568 APM_SMD - Run data teaching ........................................................................................ 571 APM_EMG - Emergency stop ........................................................................................... 573 APM_RST - Error reset/Output prohibition cancel............................................................. 574 APM_PST - Point run ........................................................................................................ 575 APM_WRT - Save parameter/run data.............................................................................. 577 APM_CRD - Read run info ................................................................................................ 578 APM_SRD - Read run state .............................................................................................. 580 APM_ENCRD - Read encoder value................................................................................. 584 APM_JOG - Jog run .......................................................................................................... 585 APM_MPG - Manual pulse generator(MPG) run ............................................................... 586 12. 12.1 BUILT-IN PID FUNCTION ......................................................... 589 Overview of Built-in PID Control ............................................................589 PID Control........................................................................................................................ 589 Features of Built-in PID Function....................................................................................... 589 12.2 PID Control Operation .............................................................................591 Terms used ....................................................................................................................... 591 PID Equation ..................................................................................................................... 591 P Control ........................................................................................................................... 592 PI Control .......................................................................................................................... 594 PID Control........................................................................................................................ 595 xiv MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Contents Symbol Definitions 12.3 PID Instruction ......................................................................................... 597 PID Loop State...................................................................................................................597 PID Instruction Group.........................................................................................................598 12.4 PID Flag Configuration............................................................................ 601 Common Bit Area...............................................................................................................605 Individual Data Operation...................................................................................................609 12.5 Functions of PID Instruction .................................................................. 620 Control Methods including PID...........................................................................................620 Operation and Function of Anti Wind – up..........................................................................620 Operation and Function of Auto-tuning ..............................................................................620 Operation and Function of Cascade...................................................................................621 Directions of PID Instructions .............................................................................................623 Hardware Configuration .....................................................................................................623 Program example 1............................................................................................................629 PID Control.........................................................................................................................630 AT (Auto-tuning) Operation ................................................................................................642 Program Example 2 ...........................................................................................................644 Cascade Operation ............................................................................................................646 13. 13.1 13.2 PROCESS CONTROL LIBRARY...............................................649 Introduction.............................................................................................. 649 Process Control Function and Function Block .................................... 651 Background ........................................................................................................................649 PIDRUN - PID Operator .....................................................................................................651 PIDCAS - Cascade PID Operator ......................................................................................653 PIDINIT - PID Initialize .......................................................................................................654 PIDPRMT - PID Parameter Change...................................................................................655 ONOFF - N / OFF Control ..................................................................................................657 SW_L - Input latch..............................................................................................................661 SW_2V - 2-Way Valve Control ...........................................................................................663 SW_3V - 3-Way Valve Control ...........................................................................................665 13.3 Data Process Function, Function Block ............................................... 668 LIM_PL(_R) - Max./Min. value limit ....................................................................................668 LIMR(_R) - Max./Min. value, max. variance limit................................................................670 LIMR_DR(_R) - Directional max. variance limit..................................................................673 RATIO(_R) - Ratio converter..............................................................................................675 SCALE(_UI, _R) - Scale converter.....................................................................................677 TIME_EN(_UI) - Converting day, hour, minute, second and 1/1000 sec to TIME type data679 TIME_DE(_UI) Separating TIME type data to day, hour, minute, second and 1/1000 second ...........................................................................................................................................681 CUT(_R) - Small signal cut filter.........................................................................................683 D_BAND(_R) Deadband Application Output ......................................................................685 DELAY (_R) - Delay Output ...............................................................................................688 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary xv Contents Symbol Definitions VAR_SW (_R) - Constant selection switch........................................................................ 690 ANA_RSW(_R) - Analog increment limit switch ................................................................ 692 ANA_TSW(_R) - Analog time limit switch.......................................................................... 693 ANA_SEL(_R) - Analog scale comparative switch ............................................................ 695 LAG(_R) - HF limit filter ..................................................................................................... 698 LEADLAG(_R) - HF/LF limit filter....................................................................................... 700 13.4 Arithmetic Operation Function, Function Block...................................703 ADD2 - Y = G1X1 + G2X2................................................................................................. 703 DIV2 - Y = Gain (X1 / X2) .................................................................................................. 704 ARITH1 - Y = (G1X1+G2X2)G3 + G4................................................................................ 706 ARITH2 - Y = (G1X1+G2X2+G3X3+G4X4)G5 + G6 ......................................................... 708 SUMA(_R) - Analog Summer ............................................................................................ 710 TOTAL(_R) - Analog totalizer ............................................................................................ 713 AVG_NUM(_R) - Average number output ......................................................................... 717 AVG_MOV(_R) - Moving average output .......................................................................... 719 13.5 Data Measuring Function, Function Block ............................................721 ALARM_R - Alarm indicator .............................................................................................. 721 HYS(_R) - Directional deadband ....................................................................................... 725 RATE(_R) - Measuring Variation Per Section ................................................................... 727 DMON(_***) - Saving input array as much as output array ............................................... 730 13.6 Data Function Block, Function Block ....................................................732 POWF - PF Instrument...................................................................................................... 732 LOOKUP(_R) - LOOK-UP Table output ............................................................................ 736 F_RAMP(_R) - Singular RAMP Function output................................................................ 738 F_SAWS_R - SAW Tooth Wave Output............................................................................ 740 F_TRIA_R - Triangular wave output.................................................................................. 743 F_SQUR_R - Square wave output .................................................................................... 746 F_TRAP_R - Trapezoid wave output................................................................................. 748 F_SINE_R - Sine wave output........................................................................................... 751 F_USER(_DI, _R) - User-defined wave output.................................................................. 753 14. 14.1 EXPANDED FUNCTIONS ......................................................... 757 Overview of Expanded functions ...........................................................757 FOR/NEXT/BREAK - LOOP command ............................................................................. 757 CALL/SBRT/RET - Command of function call ................................................................... 759 JMP - JUMP command ..................................................................................................... 761 INIT_DONE - Command to terminate an initial task .......................................................... 762 END - END command ....................................................................................................... 763 15. 15.1 xvi STRUCTURED TEXT ................................................................ 765 Overview of ST (Structured Text) ...........................................................765 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 Contents Symbol Definitions 15.2 15.3 Comments ................................................................................................ 765 Expression ............................................................................................... 766 + operator...........................................................................................................................768 - Operator...........................................................................................................................769 * Operator...........................................................................................................................769 / Operator ...........................................................................................................................770 MOD operation...................................................................................................................771 ** Operator .........................................................................................................................772 AND or & Operator.............................................................................................................772 OR operator .......................................................................................................................773 XOR operator .....................................................................................................................774 = operator...........................................................................................................................775 <> operator.........................................................................................................................775 > operator...........................................................................................................................776 < operator...........................................................................................................................777 >= operator.........................................................................................................................778 <= operator.........................................................................................................................779 NOT operator .....................................................................................................................780 - operator............................................................................................................................780 15.4 Statements ............................................................................................... 781 Assignment statements ......................................................................................................781 Function and function block control statements ................................................................781 Selection statements ..........................................................................................................782 Iteration statements............................................................................................................783 IF........................................................................................................................................785 CASE .................................................................................................................................787 FOR ...................................................................................................................................788 WHILE................................................................................................................................789 REPEAT.............................................................................................................................790 EXIT ...................................................................................................................................791 16. 16.1 APPENDIX 1 NUMERICAL SYSTEM AND DATA STRUCTURE793 Numerical (data) Representation ........................................................... 793 Decimal ..............................................................................................................................793 Binary .................................................................................................................................793 Hexadecimal ......................................................................................................................795 Binary Coded Decimal (BCD).............................................................................................797 Table of Numeral Systems .................................................................................................798 16.2 16.3 Integer Representation ........................................................................... 800 Negative Number Representation.......................................................... 802 17. R1.1 5/09 APPENDIX 2 FLAG LIST (XGI) .................................................803 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary xvii ........................................... 838 Standby CPU system operation status information flag ................................4 17........................................... ** = 0 ~ 31)........816 P2P Flag (* = 0 ~ 8...3 17............... 837 18.....................................817 PID Flag (* = 0 ~ 7............................... 834 18.............6 System Operation Status Information Flag .............................................803 Modes and Status .........................................8 18......1 5/09 ........................................5 System Warning Detail Flag.... 836 Standby CPU system warning detail flag ......838 Master CPU system operation status information flag. 832 Standby CPU System warning representative flag...811 Operation Result Flag..............................................................825 Master CPU system error representative flag...........836 Master CPU system warning detail flag................................................................................................................................................................................................................Contents Symbol Definitions 17....................................832 Master CPU System warning representative flag .11 xviii Redundant Operation Mode Information Flag............................. 803 System Error ........................................................................................................4 System Warning Representative Flag.....................................809 User Flag ......................................................................845 Operation mode Key Status Flag .7 18.....................................................................10 18...................... 827 18................. *** = 000 ~ 127) .....5 17................................................................7 17.............................846 Link Flag (L) List .................... 805 17...................................................8 System Warning ........................847 Communication Flag (P2P) List... 831 18.......818 18.........................................................3 System Error Detail Flag ..........................................................................................9 18................... 830 Standby CPU system error detail flag ............................................................................................................................................................... 823 User Flag ............................................................................823 System Error Representative Flag .................812 System Run Status Information .................844 Operation Result Information Flag.......................................................2 APPENDIX 3 FLAG LIST (XGR) ...............................................1 18......................................................................................851 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1......2 17.................. 18...........................................................830 Master CPU system error detail flag...6 17......................... 825 Standby CPU System error representative flag. 841 18.................................................................................................................... ** = 0 ~ 63).....1 Summary of Special Internal Flag (F)........................813 High-speed Link Flag (* = 0 ~ 12...................................................................................... .12 Reserved Word .................................................... 857 Environmental Policy ..............................................................................1 19.................................... 19...Contents Symbol Definitions 18............. 857 R1...2 WARRANTY AND ENVIRONMENTAL POLICY....................... 854 19...............................................857 Scope of Warranty.....................1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary xix .. Contents Symbol Definitions xx MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Supports various languages so that the user can select the optimal language suitable for the environment. ST (Structured Text): A high-level PASCAL type language. 4. 2. 1. Character language − 2.1 5/09 . 1. Features of IEC 61131-3 Language The MasterLogic PLC is based on the standard IEC (International Electro technical Commission) language. function blocks and programs to enable bottom-up design and top-down design and structural creation of a PLC program Program storage in a library system to enable future use in other environments. Offers program elements such as functions. 3. The MasterLogic PLC is based on the standard language of IEC (International Electro technical Commission). Introduction to MasterLogic PLC 1. The features of the IEC language as supported by the PLC are as follows. two character languages and SFC. − − Illustrated Language LD (Ladder Diagram): It is a graphical language based on the ladder logic FBD (Function Block Diagram): It is a graphical language for depicting signal and data flows through function blocks.1.1 Overview This document describes the languages supported by MasterLogic PLC. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 21 − R1. Background Types of Language The PLC language standardized by IEC consists of two illustrated languages. This enables the reuse of the software. Supports several data types. IL (Instruction List): A low-level ‘assembly like’ language based on similar instruction list languages. Introduction to MasterLogic PLC 1.1 5/09 . Overview 3.1.1. SFC (Sequential Function Chart) 22 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Project Global/Direct Variable Basic Parameter I/O Parameter User Data Type Parameter Scan Program User Function/Function Block Task Program R1. ensure that you have an overall PLC system defined in software terms. all component elements necessary for the PLC system are defined hierarchically. Software Structure 2. In the project.2.1 Introduction Before making a PLC program. The overall PLC system is defined as one project in the MasterLogic PLC.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 23 . DINT. It sequentially performs the same operations as per the program starting from the first step to the last step. • Basic Parameter: consists of four parts. ANY_NUM contains all of LREAL.) Global/Direct Variable The project enables global variable setting. I/O Parameter: Used to configure I/O modules. direct variable setting and flag. • User Data Type Data type is a classification showing its unique characteristics. see section on Common Elements. a scan program may read input data at the input module.INTERNAL For additional information on User Data Type.2 Project For a 2MLI-CPUU program. REAL. run a program to the end and read the results to the output module. in which a user prepares or uses the already available information. REFERENCE . basic parameters. Software Structure 2.2. SINT. ULINT. Retain area setting and Error operation setup. For example. UINT and USINT. 24 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. etc. I/O parameters. LINT. INT.1 5/09 .2. settings such as basic operation setup. Project 2. Creating a project comprises of configuring and programming all elements necessary for a PLC system (scan programs. Parameter The user can alter the default CPU parameters and/or configure the IO Modules. task definitions. UDINT. For instance. time and output control. Scan Program The scan program is a basic method of executing a program repeatedly on a PLC. the first priority is given to project configuration. Project User Function/Function Block • Function: Is an operation unit that immediately yields the operation results for an input such as four arithmetical operations and comparative operations.2. Among tasks of equal priority. Function block: Is an operation unit that memorizes the operation results within the commands such as timer and counter or results derived from several scans. the processing happens by the order of occurrence. • Task Program • Task program does not repeat scanning unlike a scan program and instead. Function blocks are the fundamental element for logic programs. executes only when its execution condition occurs. Function blocks like timer and counter have input and output connections to indicate the flow. a higher priority task program is processed first. • R1. Software Structure 2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 25 . There are fixed cycle tasks and internal contact tasks.2. If several tasks are waiting. Software Structure 2.2.1 5/09 .2. Project 26 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 3.1 5/09 Examples -12. 1. • • • Identifiers Identifiers must be alphanumeric starting with an underscore (_).0E+6.1 Overview The elements of 2MLI PLC program (programs. _12V7.234E6 2#1111_1111. character string. time data type etc. 0. All the languages share common grammar elements. functions. etc. _ABCD Data Expression The data in 2MLI PLC is.14159_26 -1.2 Expression Identifiers are used as variable names. recognized in upper-case. 123_456. SFC.456. Blank (space) is not allowed in identifiers. LIMSW5. +986 -12. 1. 3.34E-12. Types Upper case alpha-numeric characters Upper case alphabets. IDENT LIM_SW_2.3. Common Elements 3. function blocks) can be programmed in other languages such as LD.0. ABCD. numbers and underscore Uppercase alpha-numeric characters starting with an underscore(_) Examples IW210.0. identifiers may consist of alphanumeric characters. 0. numeric data type. QX75. IW215Z. 0. In case of a variable or instance name. AB_CD _MAIN. Types Integer Real number Real number with an exponent Binary number Octal number R1. 2#11100000 8#377(decimal 255) 8#340(decimal 224) MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 27 . they are real numbers. octal. hexadecimal numbers.3. 0 ~ 9 and A ~ F are used (including small letters a ~ f) in expressing hexadecimal. plus/minus signs can be used. Not available to have plus/minus signs in expressing hexadecimal. When using real numbers with exponents.2. it does not bear any significance. Common Elements 3. The letter ‘E’ standing for the exponent does not distinguish between the upper case and lower case of alphabets. TRUE. In case of expressing an exponent. not to mention decimal. which can be distinguished by placing # in front of each numerical character. FALSE Numeric data type • • There are integer and real numbers. Boolean data may be expressed as an integer 0 or 1. Expression Types Hexadecimal number BOOL data Examples 16#FF(decimal 255) 16#E0(decimal 224) 0. Ex) ‘CONVEYER’ Time Data type Time variables are classified as follows: 1.0E-5 ( ○ ) • • • • Integer includes binary.1 5/09 . Ex) 12E-5 ( × ) 12. • • • Character String • • Character string covers all the letters surrounded with single quotation marks. 1. Decimal complies with general decimal data type expression and if there is a decimal point. Discontinuous underscore (_) can be placed between numeric characters. The length is limited up to 31 letters in case of the character string constant and the initialization. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. the followings are not allowed. 28 Duration data: Calculates and controls the elapsed time of a controlling event. Several data types such as date (d). T#14. m. Decimal point is not available at ‘ms’ unit. t#5d14h12m18s356ms • • • • • Time of Day and Date There are three types expressing ‘Time of Day and Date’ as follows: Date. 'T#' or 't#'. Date and Time. hour (h).7m. Duration data can overflow at the maximum unit.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 29 .3. Content Date prefix Time of Day prefix Date and time prefix D# TOD# DT# Reserved word R1. Common Elements 3. h.7d. Duration data can start with any unit (d. It does not exceed T#49d17h2m47s295ms (32bits by ‘ms’ unit) The data is limited to the third decimal place in the second unit (s).7s. minute (m). s and ms). Content Duration (no underline) Examples T#14ms. T#14. second (s) and millisecond (ms) must be written in sequence. if any. T#14. and the data with a decimal point is available except ‘ms’.2. Time of the Day and Date data: Displays the time of the starting/ending point of a controlling event. Upper and lower case alphabets are both available. Time of Day. Duration • • Duration data starts with the reserved word. the minimum unit can be omitted but the medium unit between duration units must not be skipped. Expression 2. Use of underscore (_) is not allowed. t#25h15m. Millisecond (ms).7h t#14. 369 Date and Time DT#1984-06-25-15:36:55.3.36 tod#15:36:55.369 Examples • 30 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Content Date D#1984-06-25 d#1984-06-25 Time of Day TOD#15:36:55. Expression • • The date of starting point is January 1st.36 dt#1984-06-25-15:36:55. Common Elements 3.2. which is up to the third decimal place in the ‘ms’ unit. 1984.1 5/09 . The overflow is not allowed for all the units when expressing ‘Time of Day’ and ‘Date and Time’. There is a limit on 'Time of Day’ and ‘Date and Time'. 2250738585072014e-308 ~ 1.3 Data Type Data has a data type showing its character.483. Basic Data Type 2MLI PLC supports the following basic data types.147. S.3.147.294.2250738585072014e308 LREAL Long Real Numbers 64 or 0 or 2. Data Type 3.648 ~ 2. Common Elements 3.402823466e+038 ~ 1.175494351e-038 ~ 3.768 ~ 32.3.535 0 ~ 4.402823466e+038 10 1.175494351e-038 or 0 or 1.767 -2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 31 .483.295 0 ~ 264-1 -3.967.7976931348623157e+30 8~ -2.647 -263 ~ 263-1 0 ~ 255 0 ~ 65.7976931348623157e+30 8 R1.No 1 2 3 4 5 6 7 8 9 REAL Real Numbers 32 Reserved Word SINT INT DINT LINT USINT UINT UDINT ULINT Data Type Short Integer Integer Double Integer Long Integer Unsigned Short Integer Unsigned Integer Unsigned Double Integer Unsigned Long Integer Size (bits) 8 16 32 64 8 16 32 64 Range -128 ~ 127 -32. 999 0.1 16#0 ~ 16#FF 16#0 ~ 16#FFFF 16#0 ~ 16#FFFFFFFF 16#0 ~ 16#FFFFFFFFFFFFFFFF 15 16 17 18 19 20 STRING BOOL BYTE WORD DWORD LWORD Character String Boolean Bit String of Length 8 Bit String of Length 16 Bit String of Length 32 Bit String of Length 64 32*8 1 8 16 32 64 32 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3.999 DT#1984-01-01-00:00:00 ~ TIME DATE TIME_OF_DAY Duration Date Time Of Day DATE_AND_TIME Date and Time of Day 64 DT#2163-12-3123:59:59. Common Elements 3.No 11 12 13 14 Reserved Word Data Type Size (bits) 32 16 32 Range T#0S ~ T#49D17H2M47S295MS D#1984-01-01 ~ D#2163-66 TOD#00:00:00 ~ TOD#23:59:59. Data Type S.3.1 5/09 . For example. ULINT BOOL. DINT. LWORD REAL. INT. UINT. UDINT. BYTE and BOOL. SINT.3.0 T#0s D#1984-01-01 TOD#00:00:00 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 33 Initial Value . LINT USINT. if a data type is expressed as ANY_BIT. it is automatically assigned as follows.3. it can use one of the following data types: LWORD. REAL. Data Type Data Type Hierarchy Chart Data types used in 2MLI PLC are as follows: • Data expressed as ANY_NUM includes LREAL. BYTE. UDINT. USINT hereafter. WORD. DINT. Common Elements 3. LINT. WORD. Data Type SINT. DWORD. ULINT. DWORD. LREAL TIME DATE TIME_OF_DAY R1. • Initial Value If an initial value of data is not assigned.1 5/09 0 0 0 0. INT. UINT. Common Elements 3.3.3. Data Type Data Type DATE_AND_TIME STRING Initial Value DT#1984-01-01-00:00:00 ' ' (empty string) Data Type Structure # Bit String # Unsigned Integer 34 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . 3. Common Elements 3. 1: negative number) Exponent: exponent of 2(2 e-127 : e=b30b29.b0...1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 35 .. e=b62b61.b52 ) Fraction: a decimal fraction (Fraction: f=b22b21..b23..... Data Type # Integer (negative number is expressed as 2's complement) # Real (based on the IEEE Standard 754-1984) • • • S: sign (0: positive number.3. f=b51b50.b0 ) # Time R1. Data Type # Date #BCD 36 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3.3. Common Elements 3.1 5/09 . a prefix of the data size. 1 2 3 4 5 6 R1. A variable by identifier must be unique within its ‘effective scope’ (program area where the variable was declared) in order to distinguish it from other variables. and more than one unsigned integer divided by a period (.4. A direct variable is expressed as one. etc. • • Location prefix No.). Common Elements 3. Variable Expression • Variables can be expressed in two ways: by giving a name to a data element using an identifier (Variable by Identifier) or by directly assigning a memory address or an input/output of PLC to a data element (Direct Variable). memory. The prefixes are shown as follows.1 5/09 X None B W D L Prefix Meaning 1 bit size 1 bit size 1 byte (8 bits) size 1 word (16 bits) size 1 double word (32 bits) size 1 long word (64 bits) MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 37 . ‘Variable’ refers to something that can vary such as an input/output of PLC. which starts with the percentage sign (%) followed by the ‘location prefix’. 1 2 3 4 5 I Q M R W Prefix Meaning Input Location Output Location Memory Location (M) Memory Location (R) Memory Location (W) Size prefix No.4 Variable A variable has its own value and refers to data used in a program.3. Variable 3. 1 slot on no.3 base (1 bit) 1st word input of no. Common Elements 3.1 5/09 .4.3. Variable No.1. R.n2.4 or %Q3.1 %MD48 %MW40.1. W The n1th data according to [size prefix] (starting from “0”) The n2th data of the n1th data (starting from “0”) : available to omit Not used n2 n3 Examples %QX3.4.4 %IW2.n3 Number n1 I. Prefix size Meaning Expression format % [Location Prefix] [Size Prefix] n1.2 base (16bits) 48th double word memory 3rd bit of 40th word memory (internal memory doesn’t have a base or a slot number) 38 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Q Base number (starting from “0”) Slot number (starting from “0”) n3 data according to the [size prefix] (starting from “0”) M.3 4th output of no.4 slot on no. A user sets a location of variable. Common Elements 3.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 39 . function blocks. using a direct variable (Direct Variable). Memory allocation Memory allocation assigns memory for a variable. • • Variable type The variable type defines how to declare variables. The contents of a declared variable are as follows. R1. Variable • • • Lower case alphabets are not allowed as a prefix. functions.3. etc) have parts that can be declared to edit their variables. Memory assignment Auto Assign (AT) Description The compiler sets a variable location automatically (Automatic Allocation Variable). Variable Declaration • Program elements (programs. Variables must be declared before using them in program elements. Direct variables are available to use without a variable declaration. Variable types VAR VAR_RETAIN VAR_CONSTANT VAR_EXTERNAL Description General variable available to read/write Retaining(data-keeping) variable Read only variable Declaration to use the variable declared as VAR_GLOBAL Data type Data type sets a variable data type. A variable without a size prefix is treated as 1 bit.4. Rules are: − − Retention Variable retains its data when the system is set as ‘Warm Restart’.INTERNAL The initial value is not assigned when it comes to VAR_EXTERNAL. If variable VAL1. A variable is set with an initial value as is shown in section on Initial Value if not assigned. 40 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3. If the program is compiled again after modification. Common Elements 3. Variable REFERENCE . variables are initialized as the initial values set by users or the basic initial values. it is not fixed in the internal memory. must be initialized as the initial values set by a user or the basic initial values in case of ‘Warm Restart’ or ‘Cold Restart’. You can declare variable VAR_RETAIN that keeps its data in case of power failure. which are not declared as VAR_RETAIN. In case of Cold Restart. the location may change. the compiler and linker fix its location. REFERENCE .INTERNAL The location of Automatic Allocation Variable is not fixed. The merit of Automatic Allocation Variable is that users don’t have to care the location of the internal variables because its location is not overlapped as long as a variable name is different from others. Variables. for example. you cannot assign an initial value to %I or %Q variables.4. Use of Direct Variable is not recommended except %I and %Q because the location of a variable is fixed and it cannot be overlapped in a wrongly-used case. Initial Value Assignment: assigns an initial value. was declared as BOOL.1 5/09 . In case of ‘Variable Declaration’. Effective scope of variable declaration. must not be declared as VAR_RETAIN or VAR_CONSTANT. REFERENCE . When declaring the Array Variable. which are assigned as %I or %Q. On the contrary. Common Elements 3. These variables are used for special purposes and users cannot declare variables with the name of the Reserved Variables.2 Auto Auto Reserved Variable • ‘Reserved Variable’ refer to variables previously declared in the system. ‘STRING’ type among Elementary Data Types is not allowed. users can get an access to 'Global Variable' from other program elements by declaring it as 'VAR_EXTERNAL'.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 41 .INTERNAL For additional information. Users can declare variables 'Array' with Elementary Data Type. Users can use these reserved variables without variable declaration. Variable REFERENCE . is limited to the program where variables are declared.3. the area which is available to use the variable. Examples of Variable Declaration Variable Name I_VAL BIPOLAR LIMIT_SW GLO_SW READ_BUF Variable Kind VAR VAR_RETAIN VAR VAR_EXTERNAL VAR Data Type INT REAL BOOL DWORD ARRAY OF INT[10] Initial Value 1234 Memory Allocation Auto Auto %IX1.4. users are supposed to set Data Type and Array Size. see section on Appendix 2 Flag List (XGI) Summary of Special Internal Flag (F) and 2MLI-CPUU User’s Manual • R1. And users can't use variables declared in other program in the above area.INTERNAL Variables.0. ... DT# EXIT FOR . And these reserved words cannot be used as an identifier...4.. END_ACTION ARRAY .... END_PROGRAM REPEAT .. END_IF OK Operator (IL language) Operator (ST language) 13 14 15 16 17 18 19 42 PROGRAM PROGRAM . END_FUNCTION_BLOCK Name of function block 10 11 12 IF . ELSIF . UNTIL ... ELSE ...... END_FOR FUNCTION . END_RESOURCE RETAIN RETURN STEP . THEN . END_CASE CONFIGURATION . S. END_CONFIGURATION Name of data type 5 6 7 8 9 DATE#... Variable Reserved Word Reserved words are previously defined words to use in the system.. OF AT CASE . END_FUNCTION FUNCTION_BLOCK .. DO ...... TO . END_REPEAT RESOURCE .. ELSE . BY .....1 5/09 .3.....No 1 2 3 4 Reserved words ACTION ... END_STEP MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Common Elements 3. D#DATE_AND_TIME#.. OF ..... END_TYPE VAR .. Common Elements 3..... END_VAR VAR_IN_OUT ....... TO ... WITH TIME_OF_DAY#.3. END_VAR 27 28 29 30 VAR_ACCESS . END_TRANSITION TYPE .. END_WHILE WITH R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 43 .. END_VAR VAR_OUTPUT .. DO ... END_VAR WHILE .No 20 21 22 23 24 25 26 Reserved words STRUCTURE .. TOD# TRANSITION .... END_VAR VAR_EXTERNAL .. Variable S... END_STRUCTURE T# TASK . END_VAR VAR_INPUT ... END_VAR VAR_GLOBAL ...4. FROM.. to be a function.3. which is called as “instance. to the function. A function has a variable whose name is the same as that of the function and whose data type is the same as the data type of the result of the function. Common Elements 3. A function block must declare the instance as it declares variables before using them. That is. A function block or a program cannot be called from inside a function.1 5/09 . An internal variable of a function cannot have an initial value. A function block must have its data memory to preserve the output value as well as variables used inside.5. Data transfer from program composition elements which call the function. A function is called by program elements and used. A function block has data inside. users cannot call a program inside a program or a function block for use. Instance is a set of variables used in a function block. consistent input must yield consistent output.” A program is a kind of a function block and also needs to declare “instance. Use of direct variables inside the function is not allowed. Program Type 3. is executed through an input of a function. • • • • • • • Function Block A function block can have several outputs. 44 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. It is not available to call its own program in the program (recursive call is prohibited) Function • A function has one output and does not have any data with status in it.” However. contrary to a function block. This variable is automatically created when making a function and the result value of the function is written in the output. Users can’t declare a function as VAR_EXTERNAL and use it. function block and program.5 Program Type There are three types of program: function. Common Elements 3. Use of direct variables in the program is allowed. Program Type • Users can declare a direct variable inside a function block. • Program • • • • Users can use a program after declaring an instance like a function block. R1.5. A program does not have input/output variables. Calling a program inside the function block is not allowed. users can use a direct variable declared as Global Variable and allocated according to ‘Assign (AT)’ after declaring it as VAR_EXTERNAL. A program can call functions or function blocks.3. and moreover.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 45 . If selected as in the following figure.6.6 Output Type Selection Although a function has one name. Internally Determined Output type 46 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Output Type Selection 3.3. depending on available variables. ADD can be divided and processed in various kinds. the function shown in a ladder program is ADD but ADD2_SINT function is executed internally.1 5/09 . Common Elements 3. For instance. an output type in which a variety of variable types may be entered is divided into various types. depending on the number of input defined or I/O variable types. Output Type Selection • An internally used function is automatically selected in SoftMaster. depending on a user-selected variable type. WORD. 2 inputs are selected among ADD function and I/O variables are selected as DINT. ADD2_DINT is selected as described above.3.6. DWORD. For instance. SoftMaster has a ‘Strict type check' (View->Check program) option to allow an operation if its operand sizes (BYTE.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 47 . • R1. and LWORD) are same. Common Elements 3. Although IEC allows an operation between and among same types. Common Elements 3.3. Output Type Selection Data Type Selection Rules • If an input variable is of multiple data type.6. then. an internally used function is used to determine the type of the output variable. If a constant is used as input in a function in which various input variable types and one output variable type are allowed.1 5/09 . a function is determined by a constant. For instance. • 48 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. ***_TO_BCD is used as follows. 3.6. Positive constant is determined as ‘unsigned’ while negative one is determined as ‘signed’. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 49 . UINT_TO_BCD_WORD is selected depending on constant type. In this case. Output Type Selection A function is determined depending on output variable type because input variable is constant. Common Elements 3. the following two functions whose output is word are available (INT_TO_BCD_WORD/UINT_TO_BCD_WORD). 1 5/09 .3. Output Type Selection 50 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.6. Common Elements 3. and provides how to connect them with each other.1 Introduction • SFC is a structured language that extends an application program in the form of a flow chart according to the processing sequence. SFC splits an application program into step and transition. SFC (Sequential Function Chart) 4. using a PLC language.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 51 .4. Each step is related to action and each transition is related to transition condition. As SFC must contain the state information. only program and function block among program types are available to apply this SFC. Type • • • R1. Introduction 52 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. SFC (Sequential Function Chart) 4.4.1 5/09 . The initial step has to be activated first. • If a next transition condition of activated initial step (S1) is established.4.2 Step SFC Structure Step indicates a sequence control unit by connecting the action. the current step is inactivated and the next step is activated. There must be a transition between step and step. In case the result of the transition condition is 1. Transition • • • Transition indicates the execution condition between steps. The result of a transition condition must always be a BOOL type and the variable name must be TRANS for any transition. • • R1. When step is in an active state. A transition condition must be described as a PLC language such as IL or LD.2. SFC (Sequential Function Chart) 4. SFC Structure 4. the attached content of the action is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 53 . the currently activated step 1 (S1) is inactivated and Step 2 (S2) connected to S1 is activated. function and function block output retain their state prior to inactivation. The step without action is regarded as a waiting action and it is required to wait until the next transition condition is 1. When action becomes inactivated. S1 is inactivated and S2 is activated. SFC (Sequential Function Chart) 4. S. A transition condition of all transition must be output in TRANS variable.2. TRANS is the internally declared variable. SFC Structure S1 T1 S2 T2 TRAN1 The content of TRAN1 When TRANS is on. However. the state after activating the contact output in action is 0. R.1 5/09 . • • • 54 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Action • • Each step is able to connect up to two actions.4. Action qualifier is used to control action. Action is composed of PLC language such as LD and the action is executed while the step is activated. this action is scanned again.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 55 . When action is inactivated. • Reference Post Scan When action is inactivated.2.4. this action is Post Scanned and then passes to the next step. It goes on executing even if S1 is inactivated. SFC Structure S 1 T1 N S A C T IO N 1 A C T IO N 2 The content of ACTION1 The content of ACTION2 • • ACTION1 is executed only when S1 is activated. SFC (Sequential Function Chart) 4. ACTION2 is executed until activated S1 meets R qualifier. R1. 4. as the contact of post scan is 0. Action Qualifier Whenever action is used. S (Set) It continues the action after the step is activated (until the action is reset by R qualifier). is 0. S. N (Non-Stored) Action is executed only when the step is activated. Types of action qualifier are as follows.2.0 is 0. are not included.. action qualifier is followed. SFC (Sequential Function Chart) 4.0. The action of step defines an executing point and time according to the assigned qualifier. 56 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function. In this figure. the program output. which is composed of contacts. C and %Q0. function block.1 5/09 . SFC Structure As it is scanned as if there is a contact (contact with the value of 0) in the early part of an action program. R output etc. SD. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 57 . SL or DS qualifier. SFC Structure R (Overriding Reset) It terminates the execution of an action previously started with the S. SFC (Sequential Function Chart) 4. L (Time Limited) It starts the action when the step becomes active and continues until the step is inactive or a set time elapses.4.2. 1 5/09 .after the time delay the action starts (if the step is still active) and continues until inactivated. R _TR IG Step connected by P C LK Q Act i on 58 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.4.2. TO N Step connected by D T IN PT Q ET Act i on P (Pulse) It starts the action when the step is active and executes the action only once. SFC Structure D (Time Delayed) Start a delay timer when the step is activated . SFC (Sequential Function Chart) 4. If the step is inactive or reset is activated during the time delay.after the time delay the action starts (if step is still active) and continues until reset by R qualifier. R1. DS (Delayed & Stored) It starts a delay timer when the step is activated .2. SFC (Sequential Function Chart) 4. If the reset is activated during the time delay. the action does not start. the action starts and continues until reset (regardless of step activation/deactivation).after the time delay. the action does not start.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 59 .4. SFC Structure SD (Stored & Time Delayed) It starts a delay timer when the step becomes active . 60 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. SFC (Sequential Function Chart) 4.4.1 5/09 . SFC Structure Step connected by DS Action Step connected by R T SL (Stored & Timed Limited) It starts the action when the step is activated and continues for a set time or until the action is reset (regardless of step activation/inactivation).2. SFC Structure R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 61 .2.4. SFC (Sequential Function Chart) 4. the processor chooses the left-most path.4. the processor finds the first path with a true transition in the sequence of the program scan and executes the steps and transitions in that path. If more than one path in a selection branch becomes true at the same time. The following example shows a typical scan sequence. Selection Branch When a processor executes a selection branch.1 5/09 . Example 62 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Extension Regulation 4. A step always divides two transitions without direct connection. SFC (Sequential Function Chart) 4. the lower step is activated if the upper step is active and the transition condition connected to the next is 1.3 Extension Regulation • • Serial Connection Steps are always divided by transitions without direct connections.3. • For the transition between steps connected by serial. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 63 . the order of activation is S1 -> S4 -> S3. Extension Regulation S1 T1 T2 T4 T6 T5 T7 S2 S4 S5 S3 T3 • • • * In the transition condition of T1 is 1. * In the transition condition of T5 is 1. * In the transition condition of T4 is 1.4. the order of activation is S1 -> S5 -> S3. SFC (Sequential Function Chart) 4. R1. the order of activation is S1 -> S2 -> S3.3. the step connected to the next step is activated.4. if the transition condition connected to the next step is 1. * In case the transition condition of T4 and T5 is 1 at the same time. all steps tied to this transition are activated. the processor chooses the left-most path. • Parallel Branch (simultaneous branch) • When connecting using a parallel branch. In case of combining in parallel branch. the order of activation is S1 -> S4 -> S3. The extension of each branch is the same as serial connection.3. • Example S1 T1 T2 T3 S2 S3 S4 S6 S7 T6 S8 T4 S5 T5 64 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. if the transition condition is 1 when the state of the last step of each branch is activated. Extension Regulation If the transition conditions are 1 at the same time. the order of activation is S1 -> S2 -> S3. The steps in the state of activation are as many as the number of branches. SFC (Sequential Function Chart) 4. • * In case the transition condition of T1 and T4 is 1 at the same time.1 5/09 . 3. If the transition condition of T4 is 1 when S4. Extension Regulation • If the transition condition of T1 is 1 when S1 is active. S7 and S8 are activated.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 65 . SFC (Sequential Function Chart) 4. S6 and S8 are activated and S1 is inactivated. • * The order of activation S1-+->S2--->S3--->S4-+->S5 +->S6--->S7-------+ +->S8-------------+ Jump • If the transition condition connected to the next step is 1. after the last step of the SFC is activated. S5 is activated and S4.4. the initial step of SFC is activated. S7 and S8 are inactivated. Example S1 S2 S3 T1 T2 T3 The order of activation R1. S2. Extension Regulation • • It is possible to extend to the place using a jump. Jump within a parallel branch 66 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. SFC (Sequential Function Chart) 4.1 5/09 . S1 T1 ABC S2 T2 S3 T3 S4 T4 S5 T5 ABC 2. A jump to the inside or outside of a parallel branch is not permissible. Example 1. Jump can only be placed at the end of a SFC program or the end of a selection branch.3. the jump within a parallel branch is however permissible. Jump at the end of the selection branch S2 is activated after S5.4. SFC (Sequential Function Chart) 4.4. Extension Regulation S1 T1 LABEL1 S2 T2 S3 T3 S4 S5 T4 S6 T7 LABLE1 S9 T6 S8 T9 S7 T8 T5 R1.3.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 67 . 3.1 5/09 .4. Jumping inside a parallel branch is not allowed. S1 T1 LABEL1 S2 T2 S3 T3 T4 LABEL1 S6 S5 T5 S4 68 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. SFC (Sequential Function Chart) 4. Extension Regulation 3. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 69 . LD (Ladder Diagram) 5. Configuration R1.1 Introduction LD program is the graphical representation of a PLC program using symbols such as a coil or contact used in relay logic diagram.5. S. Symbol Name Description Left bus line 2 The value is not fixed.2.2 Bus Bus line as a power line is vertically placed on either sides of a LD graphic diagram. Right bus line 70 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.5.1 5/09 . LD (Ladder Diagram) 5.No 1 Its value is always 1 (BOOL). Bus 5. There are two types of a connection line of LD: horizontal connection line and vertical connection line. Power flow line has always a BOOL value and there's only one power flow line in one rung that is connected by lines.No 1 Symbol Name Horizontal connection line Description It transmits the left side value to the right side It is a logical OR of horizontal connection lines of its left side 2 Vertical connection line R1. LD (Ladder Diagram) 5.3.5.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 71 . S.3 Link The value (BOOL 1) of left bus line is transmitted to the right side by the ladder diagram. Link 5. The line that transmits value is called as 'power flow line' or 'connection line' which is connected to a contact or coil. which is the result of the logical AND operation of these: the state of left horizontal connection line.4. it maintains ON state during one scan (current scan). which transmits the state of the left connection line to the right connection line. which was ON in the previous scan is OFF. P 2 *** Positive TransitionSensing Contact N Negative Transition-Sensing Contact 72 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.4 Contact 'Contact' transmits a value to the right horizontal connection line.No 1 Symbol *** Name Description When the BOOL variable (marked with ***).5. it maintains ON state during just one scan (current scan). Static contact S. When the BOOL variable (marked with ***) is OFF. Otherwise the state of the right connection line is OFF.1 5/09 . Boolean input/output related to the current contact or memory variables. LD (Ladder Diagram) 5. Standard contact symbols are as follows. Normally open contact 2 *** Normally closed contact State transition-sensing contact S. It does not change the value of variable related to the contact. which was OFF in the previous scan is ON. which transmits the state of the left connection line to the right connection line. Otherwise the state of the right connection line is OFF. Contact 5. When the BOOL variable (marked with ***).No 1 Symbol *** Name Description When the BOOL variable (marked with ***) is ON. Standard coil symbols are as follows. ( ) 2 *** ( ) Latched Coils S.No 1 Symbol *** Coil Name Description Put the state of left connection line into the associated BOOL variable (marked with ***).1 5/09 Symbol Name Description 73 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . Negated Coil That is. the associated BOOL variable is OFF. LD (Ladder Diagram) 5.No 1 Symbol *** Name Description It sets the associated BOOL variable (marked with ***) to ON when the left link is in the ON state and remains set until reset by a Reset coil. Put the negated value of the state of left connection line into the associated BOOL variable (marked with ***). if the state of the left connection line is OFF.5. and to its right is a right bus line. It sets the associated BOOL variable (marked with ***) to OFF when the left link is in the ON state and remains reset until set by a Set coil.5 Coil The coil stores the state of the left connection line or the processing result of state transition in the associated BOOL variable.5. (S) 2 *** Set (Latch) Coil (R) Reset (Unlatch) Coil State Transition-sensing Coils S. Coil 5. Coils are placed in the right extreme of LD. Momentary Coils S.No R1. the associated BOOL variable is ON and if the state of the left connection line is ON. 5. the associated BOOL variable (marked with ***) is ON during the current scan.1 5/09 . the associated BOOL variable (marked with ***) is ON during the current scan. If the state of its left connection that was ON in the previous scan is OFF in the current scan. Coil 1 *** (P) Positive TransitionSensing Coil If the state of its left connection that was OFF in the previous scan is ON in the current scan. LD (Ladder Diagram) 5.5. 2 *** (N) Negative Transition-Sensing Coil 74 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 6. Example • To enable power flow inside a function or function block.6 Calling Functions and Function Blocks • The connection to a function or a function block is done by putting suitable data or variable to their input/output. EN and ENO are BOOL-type input/output in a function while a data type of the first input and first output are BOOL-type in a function block. it must contain at least one BOOL-type input and BOOL-type output. Calling Functions and Function Blocks 5.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 75 .5. LD (Ladder Diagram) 5. R1. Calling Functions and Function Blocks Example • Conventionally. LD (Ladder Diagram) 5. the default is for the value of EN to be copied to the output ENO.1 5/09 76 . when connecting the power flow line to the function output instead of the ENO. an error occurs in the execution of a function. then the function is executed. the ladder logic connecting a Boolean input to a function is called EN and the corresponding output Boolean is called ENO.5.6. do not connect anything to the ENO output. When connecting the power flow line to the function output. or enable out. In all cases. All the inputs of a function are assigned by entering its data at the left MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If the value of EN is 1. However. EN is connected to the power flow line but ENO does not have to be connected to it. If. the output data type must be a BOOL type. otherwise it is not executed. for whatever reason. the function is responsible to set ENO to FALSE (BOOL 0). When connecting the power flow line to the function block. The output of a function is stored at the output variable on its right side. it is always executed because there is neither EN nor ENO in it. If a function block is connected to the power flow line. which can be user-defined and must be unique to LD in which the function block appears.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 77 . Therefore.6. R1. Calling Functions and Function Blocks side of the function.5. LD (Ladder Diagram) 5. • Assignment of inputs of a function block in a LD is the same as that for a function. The name of the function block is the "instance" name. use Jump (-->>) to determine whether or not to execute a function block according to the logic result. You do not have to assign output variables because they are in the instance. connect it to the input/output whose data type is BOOL. LD (Ladder Diagram) 5. Calling Functions and Function Blocks Example • You can place a function or a function block in any place of an LD.6. A program can be made by connecting the power flow line to their output and then put the contact to it.5.1 5/09 . Example 78 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 6. Calling Functions and Function Blocks • Only one power flow line can be connected to a function or a function block. Example R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 79 . LD (Ladder Diagram) 5.5. 6.5. LD (Ladder Diagram) 5.1 5/09 . Calling Functions and Function Blocks 80 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1 Functions It converts each input data type into an output data type.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 81 . Function Group ARY_ASC_TO_*** Function ARY_ASC_TO_BYTE ARY_ASC_TO_BCD ARY_BYTE_TO_*** ARY_BYTE_TO_ASC ARY_BCD_TO_*** ASC_TO_*** ARY_BCD_TO_ ASC ASC_TO_BCD ASC_TO_BYTE ***BCD_TO_*** BYTE_BCD_TO_SINT WORD_BCD_TO_INT DWORD_BCD_TO_DINT LWORD_BCD_TO_LINT BYTE_BCD_TO_USINT WORD_BCD_TO_UINT Input data type WORD(ASCII) WORD(ASCII) BYTE BYTE (BCD) BYTE (BCD) WORD (BCD) BYTE (BCD) WORD (BCD) Output data type BYTE BYTE (BCD) WORD(ASCII) WORD(ASCII) USINT UINT SINT INT Remarks Type Conversion Function DWORD (BCD) DINT LWORD (BCD) LINT BYTE (BCD) WORD (BCD) USINT UINT DWORD_BCD_TO_UDINT DWORD (BCD) UDINT LWORD_BCD_TO_ULINT BCD_TO_ASC BYTE_TO_ASC TRUNC BCD_TO_ASC BYTE_TO_ASC TRUNC_REAL TRUNC_LREAL REAL_TO_*** REAL_TO_SINT LWORD (BCD) ULINT BYTE (BCD) BYTE REAL LREAL REAL WORD ASC(BYTE) DINT LINT SINT R1.6. Function and Function Block 6. Function and Function Block 6.6.1 5/09 . Functions Function Group Function REAL_TO_INT REAL_TO_DINT REAL_TO_LINT REAL_TO_USINT REAL_TO_UINT REAL_TO_UDINT REAL_TO_ULINT REAL_TO_DWORD REAL_TO_LREAL REAL_TO_STRING Input data type REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL LREAL LREAL LREAL LREAL LREAL LREAL LREAL LREAL LREAL LREAL LREAL SINT SINT SINT Output data type INT DINT LINT USINT UINT UDINT ULINT DWORD LREAL STRING SINT INT DINT LINT USINT UINT UDINT ULINT LWORD REAL STRING INT DINT LINT - Remarks LREAL_TO_*** LREAL_TO_SINT LREAL_TO_INT LREAL_TO_DINT LREAL_TO_LINT LREAL_TO_USINT LREAL_TO_*** LREAL_TO_UINT LREAL_TO_UDINT LREAL_TO_ULINT LREAL_TO_LWORD LREAL_TO_REAL LREAL_TO_STRING SINT_TO_*** SINT_TO_INT SINT_TO_DINT SINT_TO_LINT 82 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. 6.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 83 . Function and Function Block 6. Functions Function Group Function SINT_TO_USINT SINT_TO_UINT SINT_TO_UDINT SINT_TO_ULINT SINT_TO_BOOL SINT_TO_BYTE SINT_TO_WORD SINT_TO_DWORD SINT_TO_LWORD SINT_TO_REAL SINT_TO_LREAL SINT_TO_STRING Input data type SINT SINT SINT SINT SINT SINT SINT SINT SINT SINT SINT SINT INT INT INT INT INT INT INT INT INT INT INT INT Output data type USINT UINT UDINT ULINT BOOL BYTE WORD DWORD LWORD REAL LREAL STRING SINT DINT LINT USINT UINT UDINT ULINT BOOL BYTE WORD DWORD LWORD - Remarks INT_TO_*** INT_TO_SINT INT_TO_DINT INT_TO_LINT INT_TO_USINT INT_TO_UINT INT_TO_UDINT INT_TO_ULINT INT_TO_BOOL INT_TO_BYTE INT_TO_WORD INT_TO_DWORD INT_TO_LWORD R1. 1.6. Function and Function Block 6. Functions Function Group Function INT_TO_REAL INT_TO_LREAL INT_TO_STRING Input data type INT INT INT DINT DINT DINT DINT DINT DINT DINT DINT DINT DINT DINT DINT DINT DINT DINT LINT LINT LINT LINT LINT LINT Output data type REAL LREAL STRING SINT INT LINT USINT UINT UDINT ULINT BOOL BYTE WORD DWORD LWORD REAL LREAL STRING SINT INT DINT USINT UINT UDINT - Remarks DINT_TO_*** DINT_TO_SINT DINT_TO_INT DINT_TO_LINT DINT_TO_USINT DINT_TO_UINT DINT_TO_UDINT DINT_TO_ULINT DINT_TO_BOOL DINT_TO_BYTE DINT_TO_WORD DINT_TO_*** DINT_TO_DWORD DINT_TO_LWORD DINT_TO_REAL DINT_TO_LREAL DINT_TO_STRING LINT_TO_*** LINT_TO_SINT LINT_TO_INT LINT_TO_DINT LINT_TO_USINT LINT_TO_UINT LINT_TO_UDINT 84 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 85 .6. Function and Function Block 6. Functions Function Group Function LINT_TO_ULINT LINT_TO_BOOL LINT_TO_BYTE LINT_TO_WORD LINT_TO_DWORD LINT_TO_LWORD LINT_TO_REAL LINT_TO_LREAL LINT_TO_STRING Input data type LINT LINT LINT LINT LINT LINT LINT LINT LINT USINT USINT USINT USINT USINT USINT USINT USINT USINT USINT USINT USINT USINT USINT USINT Output data type ULINT BOOL BYTE WORD DWORD LWORD REAL LREAL STRING SINT INT DINT LINT UINT UDINT ULINT BOOL BYTE WORD DWORD LWORD REAL LREAL STRING - Remarks USINT_TO_*** USINT_TO_SINT USINT_TO_INT USINT_TO_DINT USINT_TO_LINT USINT_TO_UINT USINT_TO_UDINT USINT_TO_ULINT USINT_TO_BOOL USINT_TO_BYTE USINT_TO_WORD USINT_TO_DWORD USINT_TO_LWORD USINT_TO_REAL USINT_TO_LREAL USINT_TO_STRING R1.1. Functions Function Group UINT_TO_*** Function UINT_TO_SINT UINT_TO_INT UINT_TO_DINT UINT_TO_LINT UINT_TO_USINT UINT_TO_UDINT UINT_TO_ULINT UINT_TO_BOOL UINT_TO_BYTE UINT_TO_WORD UINT_TO_DWORD Input data type UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UINT UDINT UDINT UDINT UDINT UDINT UDINT UDINT UDINT Output data type SINT INT DINT LINT USINT UDINT ULINT BOOL BYTE WORD DWORD LWORD REAL STRING LREAL DATE SINT INT DINT LINT USINT UINT ULINT BOOL - Remarks UINT_TO_*** UINT_TO_LWORD UINT_TO_REAL UINT_TO_STRING UINT_TO_LREAL UINT_TO_DATE UDINT_TO_*** UDINT_TO_SINT UDINT_TO_INT UDINT_TO_DINT UDINT_TO_LINT UDINT_TO_USINT UDINT_TO_UINT UDINT_TO_ULINT UDINT_TO_BOOL 86 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function and Function Block 6.1.1 5/09 .6. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 87 . Function and Function Block 6.6. Functions Function Group Function UDINT_TO_BYTE UDINT_TO_WORD UDINT_TO_DWORD UDINT_TO_LWORD UDINT_TO_REAL UDINT_TO_LREAL UDINT_TO_TOD UDINT_TO_TIME UDINT_TO_STRING Input data type UDINT UDINT UDINT UDINT UDINT UDINT UDINT UDINT UDINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT ULINT Output data type BYTE WORD DWORD LWORD REAL LREAL TOD TIME STRING SINT INT DINT LINT USINT UINT UDINT BOOL BYTE WORD DWORD LWORD REAL LREAL STRING - Remarks ULINT_TO_*** ULINT_TO_SINT ULINT_TO_INT ULINT_TO_DINT ULINT_TO_LINT ULINT_TO_USINT ULINT_TO_UINT ULINT_TO_UDINT ULINT_TO_BOOL ULINT_TO_BYTE ULINT_TO_WORD ULINT_TO_DWORD ULINT_TO_LWORD ULINT_TO_REAL ULINT_TO_LREAL ULINT_TO_STRING R1.1. 6.1.1 5/09 . Functions Function Group BOOL_TO_*** Function BOOL_TO_SINT BOOL_TO_INT BOOL_TO_DINT BOOL_TO_LINT BOOL_TO_USINT BOOL_TO_UINT BOOL_TO_UDINT BOOL_TO_ULINT BOOL_TO_BYTE Input data type BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE Output data type SINT INT DINT LINT USINT UINT UDINT ULINT BYTE WORD DWORD LWORD STRING SINT INT DINT LINT USINT UINT UDINT ULINT BOOL WORD DWORD - Remarks BOOL_TO_*** BOOL_TO_WORD BOOL_TO_DWORD BOOL_TO_LWORD BOOL_TO_STRING BYTE_TO_*** BYTE_TO_SINT BYTE_TO_INT BYTE_TO_DINT BYTE_TO_LINT BYTE_TO_USINT BYTE_TO_UINT BYTE_TO_UDINT BYTE_TO_ULINT BYTE_TO_BOOL BYTE_TO_WORD BYTE_TO_DWORD 88 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function and Function Block 6. Functions Function Group Function BYTE_TO_LWORD BYTE_TO_STRING Input data type BYTE BYTE WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD Output data type LWORD STRING SINT INT DINT LINT USINT UINT UDINT ULINT BOOL BYTE DWORD LWORD DATE STRING SINT INT DINT LINT USINT UINT UDINT ULINT - Remarks WORD_TO_*** WORD_TO_SINT WORD_TO_INT WORD_TO_DINT WORD_TO_LINT WORD_TO_USINT WORD_TO_UINT WORD_TO_UDINT WORD_TO_ULINT WORD_TO_BOOL WORD_TO_BYTE WORD_TO_DWORD WORD_TO_LWORD WORD_TO_DATE WORD_TO_STRING DWORD_TO_*** DWORD_TO_SINT DWORD_TO_INT DWORD_TO_DINT DWORD_TO_LINT DWORD_TO_USINT DWORD_TO_UINT DWORD_TO_UDINT DWORD_TO_ULINT R1. Function and Function Block 6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 89 .1.6. Functions Function Group Function DWORD_TO_BOOL DWORD_TO_BYTE DWORD_TO_WORD DWORD_TO_LWORD DWORD_TO_REAL DWORD_TO_TIME DWORD_TO_TOD Input data type DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD LWORD STRING Output data type BOOL BYTE WORD LWORD REAL TIME TOD STRING SINT INT DINT LINT USINT UINT UDINT ULINT BOOL BYTE WORD DWORD LREAL DT STRING SINT - Remarks DWORD_TO_*** LWORD_TO_*** DWORD_TO_STRING LWORD_TO_SINT LWORD_TO_INT LWORD_TO_DINT LWORD_TO_LINT LWORD_TO_USINT LWORD_TO_UINT LWORD_TO_UDINT LWORD_TO_ULINT LWORD_TO_BOOL LWORD_TO_BYTE LWORD_TO_WORD LWORD_TO_DWORD LWORD_TO_LREAL LWORD_TO_DT LWORD_TO_STRING STRING_TO_*** 90 STRING _TO_SINT MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.6.1 5/09 . Function and Function Block 6.1. 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 91 .6. Function and Function Block 6. Functions Function Group Function STRING _TO_INT STRING _TO_DINT STRING _TO_LINT STRING _TO_USINT STRING _TO_UINT STRING _TO_UDINT STRING _TO_ULINT STRING _TO_BOOL STRING _TO_BYTE STRING _TO_WORD STRING _TO_DWORD STRING _TO_LWORD STRING _TO_REAL STRING _TO_LREAL STRING _TO_DT STRING _TO_DATE STRING _TO_TOD STRING _TO_TIME Input data type STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING TIME TIME TIME DATE DATE DATE Output data type INT DINT LINT USINT UINT UDINT ULINT BOOL BYTE WORD DWORD LWORD REAL LREAL DT DATE TOD TIME UDINT DWORD STRING UINT WORD STRING - Remarks TIME_TO_*** TIME_TO_UDINT TIME_TO_DWORD TIME_TO_STRING DATE_TO_*** DATE_TO_UINT DATE_TO_WORD DATE_TO_STRING R1. 1 5/09 Remarks . Function and Function Block 6.1. Function Function General Function 1 2 ABS SQRT Absolute value operation Square root operation Logarithm 3 4 92 LN LOG Natural logarithm operation Common logarithm Base to 10 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Functions Function Group TOD_TO_*** Function TOD_TO_UDINT TOD_TO_DWORD TOD_TO_STRING Input data type TOD TOD TOD DT DT DT DT SINT INT DINT LINT USINT UINT Output data type UDINT DWORD STRING LWORD DATE TOD STRING BYTE (BCD) WORD (BCD) - Remarks DT_TO_*** DT_TO_LWORD DT_TO_DATE DT_TO_TOD DT_TO_STRING ***_TO_BCD SINT_TO_BCD_BYTE INT_TO_BCD_WORD DINT_TO_BCD_DWORD LINT_TO_BCD_LWORD USINT_TO_BCD_BYTE UINT_TO_BCD_WORD DWORD (BCD) LWORD (BCD) BYTE (BCD) WORD (BCD) - UDINT_TO_BCD_DWORD UDINT ULINT_TO_BCD_LWORD ULINT DWORD (BCD) LWORD (BCD) - Numerical Operation Function Numerical operation function with one input No.6. 6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 93 . Function and Function Block 6. Functions operation 5 EXP Natural exponential operation Trigonometric function 6 7 8 9 10 11 SIN COS TAN ASIN ACOS ATAN Sine operation Cosine operation Tangent operation Arc sine operation Arc Cosine operation Arc Tangent operation Angle function 12 13 14 RAD_REAL RAD_LREAL DEG_REAL DEG_LREAL Convert degree into radian - 15 Convert radian into degree - R1.1. 3 4 5 6 7 SUB DIV MOD EXPT MOVE Subtraction (OUT <= IN1 . Function Description Remarks Operation function whose input number (n) can be extended up to 8.6..1.1 5/09 .. Functions Basic Arithmetic Function No. 1 2 ADD MUL Addition (OUT <= IN1 + IN2 + . + INn) Multiplication (OUT <= IN1 * IN2 * ...IN2) Division (OUT <= IN1 / IN2) Calculate remainder (OUT <= IN1 Modulo IN2) Exponential operation (OUT <= IN1IN2) Copy data (OUT <= IN) Input data exchange 8 XCHG_*** Exchanges two input data - 94 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. * INn) - Operation function of which input number is fixed. Function and Function Block 6. . Functions Bit Array Function Bit-shift Function No.... 1 2 3 4 5 6 Function SHL SHR SHIFT_C_*** ROL ROR Description Shift input to the left of N bit(the right is filled with 0) Shift input to the right of N bit (the left is filled with 0) - Remarks Shift input to the configured direction as much as N bit (carry) Rotate input to the left of N bit Rotate input to the right of N bit - ROTATE_C_*** Rotate input to the direction as much as N bit (carry) Bit Operation Function No.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 95 . AND INn) Remarks Logical OR (OUT <= IN1 OR IN2 OR ..6..1. OR INn) Exclusive OR (OUT <= IN1 XOR IN2 XOR .. Function and Function Block 6. XNR INn) - R1. 1 2 3 4 5 Function AND OR XOR NOT XNR Description Logical AND (OUT <= IN1 AND IN2 AND . XOR INn) Reverse logic (OUT <= NOT IN1) Exclusive logic AND (OUT <= IN1 XNR IN2 XNR .. . Swaps upper/lower DWORD of LWORD elements in array. Function and Function Block 6.. ARY_SWAP_W Swaps upper/lower BYTE of WORD ORD elements in array....1 5/09 . 1 Function SWAP_BYTE SWAP_WORD Description Swaps upper NIBBLE for lower NIBBLE data of BYTE.6.Inn Limits upper and lower boundaries Outputs the K-th input among input IN1. SWAP_LWORD Swaps upper DWORD for lower DWORD data of LWORD. - 96 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.…INn - Data Exchange Function No. Remarks SWAP_DWORD Swaps upper WORD for lower WORD data DWORD. Swaps upper BYTE for lower BYTE data of WORD..1. 2 ARY_SWAP_BY Swaps upper/lower NIBBLE of BYTE TE elements in array. Functions Selection Function No.Inn Remarks Produces the minimum value among input IN1. 1 2 3 4 5 Function SEL MAX MIN LIMIT MUX Description Selects from two inputs (IN0 or IN1) Produces the maximum value among input IN1. ARY_SWAP_D WORD ARY_SWAP_L WORD Swaps upper/lower WORD of DWORD elements in array. 1 GT Function Description ‘Greater than’ comparison OUT <= (IN1>IN2) & (IN2>IN3) & .. & (INn-1 <= INn) 5 LT ‘Less than’ comparison OUT <= (IN1<IN2) & (IN2<IN3) & ... & (INn-1 > INn) 2 GE ‘Greater than or equal to’ comparison OUT <= (IN1>=IN2) & (IN2>=IN3) & . & (INn-1 = INn) 4 LE 'Less than or equal to' comparison OUT <= (IN1<=IN2) & (IN2<=IN3) & .... Function and Function Block 6. & (INn-1 <> INn) Remarks R1. & (INn-1 < INn) 6 NE ‘Not equal to’ comparison OUT <= (IN1<>IN2) & (IN2<>IN3) & ...1..1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 97 . & (INn-1 >= INn) 3 EQ ‘Equal to’ comparison OUT <= (IN1=IN2) & (IN2=IN3) & . Functions Comparison Function No..6... Functions Character String Function No. 1 2 3 4 5 6 7 8 Function LEN LEFT RIGHT MID CONCAT INSERT DELETE REPLACE Description Find a length of a character string Remarks Take a left side of a string (size of L) and output it Take a right side of a string (size of L) and output it Take a middle side of a string (size of L from the P-th character) Concatenate the input character string in order - Insert the second string after the P-th character of the first string Delete a string (size of L from the P. 98 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.6. Function and Function Block 6.1.1 5/09 .th character) Replace a size of L from the P-th character of the first string by the second string - 9 FIND Find a starting point of the first string which has a same pattern of the second string. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 99 . Functions Date and Time of Day Function No. Function and Function Block 6.6. 1 2 Function ADD_TIME SUB_TIME SUB_DATE SUB_TOD SUB_DT 3 4 5 MUL_TIME DIV_TIME Description Add time (Time/time of day/date and time addition) Subtract time (Time/time of day/date and time subtraction) Calculate time by subtracting date from date Calculate time by subtracting TOD from TOD Calculate time by subtracting DT from DT Multiply number to time Divide time by number Remarks CONCAT_TIME Concatenate date to make TOD R1.1. 6. Function and Function Block 6. Functions System Control Function No. 1 2 3 4 Function RSET EBCMP EMOV EERRST Description Setting file register block number Block comparison Reading data from the preset flash area Remarks Flash memory related error flag clear - 100 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1.1 5/09 . 1 2 3 4 5 6 7 8 9 10 11 DI EI STOP ESTOP DIREC_IN DIREC_O WDT_RST MCS MCSCLR FALS OUTOFF Function Description Invalidates interrupt (Not to permit task program starting) Permits running for a task program Stop running by a task program Emergency running stop by a program Update input data Updates output data Initialize a timer of watchdog Master Control Master Control Clear Self check(error display) Output OFF Remarks File Function No. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 101 . Function and Function Block 6. Functions Data Manipulation Function No.1. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Function MEQ_*** DIS_*** UNI_*** BIT_BYTE BYTE_BIT BYTE_WORD WORD_BYTE Description Compare whether two inputs are equal after masking Data distribution Unite data Combine 8 bits into one BYTE Divide one BYTE into 8 bits Combine two bytes into one WORD Divide one WORD into two bytes Remarks WORD_DWOR Combine two WORD data into D DWORD DWORD_WOR Divide DWORD into 2 WORD data D DWORD_LWO RD LWORD_DWO RD GET_CHAR PUT_CHAR Combine two DWORD data into LWORD Divide LWORD into two DWORD data Get one character from a character string Puts a character in a string - STRING_BYTE Convert a string into a byte array BYTE_STRING Convert a byte array into a string Stack Operation Function No. 1 2 Function FIFO_*** LIFO_*** Description First In First Out Last In First Out Remarks R1.6. 1 2 3 4 5 6 7 Function ENCO_B.D.W.W.W.W.D. Ladder Functions 6.W.D. Function and Function Block 6.L Increase IN data Decrease IN data 102 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.2 Ladder Functions No.6.1 5/09 . L SEG_WORD Description(n can be extended up to 8) Output a position of ON bit by number Turn a selected bit on Output a number of ON bit Convert BCD/HEX into 7-segment code Remarks BMOV_B.W.2.D. L BSUM_B. Move part of a bit string L INC_B.D.L DEC_B. L DECO_B.D. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 103 . Function and Function Block 6. 1 2 3 4 5 6 7 8 9 Function ARY_MOVE ARY_CMP_*** ARY_SCH_*** ARY_FLL_*** ARY_AVE_*** ARY_SFT_C_*** ARY_ROT_C_*** SHIFT_A_*** ROTATE_A_*** Description Copy array-typed data (OUT <= IN) Array comparison Array search Filling an array with data Find an average of an array Array bit shift left with carry Bit rotation of array with carry Shift array elements Rotates array elements Remarks R1.3 Array Operation Function No.3. Array Operation Function 6.6. 1 Function Block CTU_*** Description Up Counter INT. ULINT 4 CTR Ring Counter Remarks Timer No. 1 2 3 Function Block R_TRIG F_TRIG FF Description Rising edge detector Falling edge detector Reverse output if input condition rises Remarks Counter No.LINT. Basic Function Block 6.LINT.UDINT.UINT.UDINT. ULINT 2 CTD_*** Down Counter INT. 1 2 3 Function Block SR RS SEMA Description Set preference bistable Reset preference bistable Semaphore Remarks Bistable Function Block Edge Detection Function Block No.LINT. ULINT 3 CTUD_*** Up Down Counter INT. Function and Function Block 6.UINT.DINT.UDINT. 1 Function Block TP Description Pulse Timer Remarks 104 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.UINT.1 5/09 .DINT.4.4 Basic Function Block No.6.DINT. 6. Function and Function Block 6. 1 1 Function Block EBREAD EBWRITE Description Read R area data from flash area Write R area data to flash area Remarks Other Function Block No. Basic Function Block No. 2 3 4 5 6 7 8 9 10 11 12 13 Function Block TON TOF TMR TP_RST TRTG TOF_RST TON_UINT TOF_UINT TP_UINT TMR_UINT TMR_FLK TRTG_UINT Description On-Delay Timer Off-Delay Timer Integrating Timer TP with reset Retriggerable Timer TOF with reset TON with integer setting TOF with integer setting TP with integer setting TMR with integer setting Blink timer Integer setting retriggerable timer - Remarks File Function Block No. 1 2 3 Function Block SCON DUTY RTC_SET Description Step Controller Scan setting ON/OFF Write time data Remarks R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 105 .4. 6. 1 2 106 Function Block APM_ORG APM_FLT Description Return to original point run Floating original point MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Remarks R1. Function and Function Block 6. 1 2 3 4 Function Block GET PUT ARY_GET ARY_PUT Description Read special module data Write special module data Read special module data(array) Write special module data(array) Remarks Motion Control Function Block No.4. 1 2 3 4 Function Block GETM PUTM ARY_GETM ARY_PUTM Description Read motion control module data Write motion control module data Read motion control module data(array) Write motion control module data(array) Remarks Positioning Function Block No. Basic Function Block Communication Function Block No. setting Read area setting Write area setting Remarks Special Function Block No.1 5/09 . 1 2 3 Function Block P2PSN P2PRD P2PWR Description Station no. 1 5/09 APM_SNS APM_SRS APM_MOF APM_PRS 107 . Basic Function Block No. change Repeat step no.6. Function and Function Block 6.4. Function Block Description setting Remarks 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 APM_DST APM_IST APM_LIN APM_CIN APM_SST APM_VTP APM_PTV APM_STP APM_SKP APM_SSP APM_SSS APM_POR APM_SOR APM_PSO APM_NMV APM_INC APM_RTP Direct run Indirect run Linear interpolation run Circular interpolation run Simultaneous run Speed/position control conversion Position/speed control conversion Decelerating stop Skip run Position synchronization Speed synchronization Position override Speed override Positioning speed override Continuous run Inching run Return run to the previous position of manual operation Run step no. change M code cancel Present position preset MasterLogic PLC Instruction List Honeywell Confidential & Proprietary - 20 21 22 23 R1. RAM) Basic parameter setting Extension parameter setting Original point return parameter setting Manual operation parameter setting Input signal parameter setting Common parameter setting Operation data setting Emergency stop Error reset/output prohibition cancel Point run Saving parameter/run data Reading run info Reading run info Reading encoder value Jog run Remarks R1. RAM) Plural teaching(ROM.6.4. Function and Function Block 6. Basic Function Block No.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 108 Function Block APM_ZONE APM_EPRE APM_TEA APM_ATEA APM_SBP APM_SEP APM_SHP APM_SMP APM_SIP APM_SCP APM_SMD APM_EMG APM_RST APM_PST APM_WRT APM_CRD APM_SRD APM_ENCRD APM_JOG Description Zone output allowed/prohibited Encoder value preset Singular teaching(ROM. 5.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 109 . Expanded Functions 6.5 Expanded Functions No. 1 2 3 4 5 6 7 8 9 Function Block FOR NEXT BREAK CALL SBRT RET JMP INIT_DONE END Description Repeat a block of FOR ~ NEXT n times Escape a block of FOR ~ NEXT Call a SBRT routine Assign a routine to be called by the CALL function RETURN Jump to a place of LABLE Terminate an initial task Terminate a program Remarks R1.6. Function and Function Block 6. 1 5/09 . Expanded Functions 110 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.6. Function and Function Block 6.5. OUT must be the same data type. DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL BYTE REAL TIME DINT UINT SINT LINT TOD INT Variable DATE ANY IN type variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ R1.1 List of Basic functions Availability: 2MLI-CPUU.7. 2MLR-CPUH Flags: _ERR.Absolute value operation Input EN: executes the function in case of 1 IN: input value of absolute value operation Output ENO: 1 OUT: absolute value IN. Basic Functions 7. _LER ABS .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 111 DT . • • If X≥0. │X│= -X. OUT = ⏐IN⏐ X’s absolute value.1. Example: If data type is SINT and IN value is -128. If X<0. _ERR and _LER flags are set. Basic Functions 7.7. Output the absolute value of IN as ‘OUT’. Flag Flag _ERR Description If IN value is (-) min value. List of Basic functions Function 1. 2.1 5/09 . an error occurs. │X│= X. 112 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. │X│. If VALUE = 200. ABS_VALUE = ⏐-7⏐ = 7.0. If VALUE = -7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 113 .1.0) is ON. List of Basic functions Program Example If the transition condition (%IX0.7. ABS function is executed. Basic Functions 7. The negative number of INT type is represented as the 2's compliment form (see section on Data Type Structure) R1. ABS_VALUE = ⏐200⏐ = 200. Arc Cosine Operation Availability: 2MLI-CPUU.7. List of Basic functions ACOS . Basic Functions 7. OUT must be the same data type. 2MLR-CPUH Flags: _ERR. DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DINT UINT SINT LINT TOD INT ANY IN type variable OUT ○ ○ ○ ○ Function a) It converts input IN into its Arc Cosine value and produces output OUT.1. _LER Input EN: executes the function in case of 1 IN: input value of Arc Cosine operation Output ENO: outputs EN value as it is OUT: Arc Cosine (radian) IN.1 5/09 DT Variable DATE BYTE REAL TIME . The output range is between 0 and π. OUT = ACOS (IN) 114 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Basic Functions 7.1. Program Example a) b) If the transition condition (%IX0. ACOS is executed If INPUT is 0.5235... _ERR.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 115 . (π/6 rad = 30°). R1..3) is ON. RESULT is 0.0 and 1. List of Basic functions Flag Flag _ERR Description Unless an IN value is between -1. (/ 2).7.1. _LER flags are set..0.8660. Arc Cosine Operation function. 116 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.Addition Availability: 2MLI-CPUU..1. IN2. Basic Functions 7.. _LER Input EN: executes the function in case of 1 IN1: value to be added IN2: value to add Input variable number can be extended up to 8 Output ENO: without an error. it is 1 OUT: added value IN1. List of Basic functions ADD . 2MLR-CPUH Flags: _ERR. OUT must be the same data type.7.1 5/09 . OUT = IN1 + IN2 + . + INn Flag Flag _ERR Description When the output value is out of its data type. Program Example R1.... List of Basic functions DWORD TIME DINT UINT SINT LINT TOD INT Variable IN1 ANY type variable IN2 OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It adds input variables up (IN1.#INF000000000000e+000. 1.#SNAN00000000000e+000. . or min.. If REAL (or LREAL) type operation exceeds the max. n: number of inputs) and produces output OUT.1.. Basic Functions 7. IN2. value of REAL (or LREAL) in the middle of operation because it performs operation sequentially from IN1 to IN8. _ERR.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 117 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . _ERR. _LER flag is set and the result is unlimited or abnormal value.#QNAN00000000000e+000). and INn. (1. _LER flags are set. 1.7. 1. _LER 118 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. ADD function is executed If input variable VALUE1 = 300. output variable OUT_VAL = 300 + 200 + 100 = 600 ADD_TIME . VALUE2 = 200.7. Basic Functions 7.Time Addition Availability: 2MLI-CPUU. List of Basic functions a) b) If the transition condition (%MX0) is ON. and VALUE3 = 100. 2MLR-CPUH Flags: _ERR.1 5/09 . List of Basic functions Input EN: executes the function in case of 1 IN1: reference time. it is 1 OUT: added result of TOD or time IN1. DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DINT UINT SINT LINT TOD ○ ○ INT ANY IN1 type variable OUT ○ ○ Function a) b) If IN1 is TIME.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 119 DT ○ ○ Variable DATE BYTE REAL TIME . and OUT must be the same data type: If IN1 type is TIME_OF_DAY. it adds TIME to reference TIME_OF_DAY and produces output TIME_OF_DAY.7. IN2. IN1 is TIME_OF_DAY. added TIME is an output.1. Basic Functions 7. time of date IN2: time to add Output ENO: without an error. R1. OUT type is also TIME_OF_DAY. If START_TIME is TOD#08:30:00 and WORK_TIME is T#2H10M20S500MS. _LER flag is be set. ADD_TIME function is executed. _ERR.0) is ON. An error occurs: When the result of adding the time and the time is out of range of TIME data type T#49D17H2M47S295MS The result of adding TOD (Time of Day) and the time exceeds 24hrs. the output data type is DT (Date and Time of Day) adding the time to the standard date and time of day.1. END_TIME is TOD#10:40:20. Basic Functions 7. List of Basic functions c) If IN1 is DATE_AND_TIME.7. 120 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . The result of adding the date and DT (Date and the Time of Day) exceeds the year.1. _ERR Program Example a) b) If the transition condition (%IX0. 2163.5. Flag Flag Description If an output value is out of range of related data type. IN2. List of Basic functions AND . and OUT must be the same data type. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: input 1 IN2: input 2 Input variables can be extended up to 8. Basic Functions 7.7.1.Logical AND (Logical multiplication) Availability: 2MLI-CPUU. Output ENO: outputs EN value as it is OUT: AND result IN1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 121 . R1. ... IN1 1111 .1..7. Basic Functions 7. 0000 Program Example a) b) If the transition condition (%IX0.0.. the AND function is executed.. List of Basic functions DWORD DINT SINT LINT TOD INT Variable IN1 ANY type variable IN2 OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It performs a logical AND operation on the input variables by bit and produces output OUT. 0000 & IN2 1010 .1 5/09 STRING LWORD WORD LREAL UDINT USINT UINT ULINT BOOL TIME DATE BYTE REAL DT . the result of AND is shown in OUT (%QB0. 1010 OUT 1010 ..0)..1.1) is ON... If INI = %MB10 and IN2 = ABC. 122 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1... The output value is between -π/2 and π/2.7.1. OUT = ASIN (IN) R1. Basic Functions 7. 2MLR-CPUH Flags: _ERR. List of Basic functions ASIN .Arc Sine operation Availability: 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 123 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . DWORD DINT UINT SINT LINT TOD INT ANY IN type variable OUT ○ ○ ○ ○ Function a) It produces an output (Arc Sine value) of IN. _LER Input EN: executes the function in case of 1 IN: input value of Arc Sine operation Output ENO: outputs EN value as it is OUT: radian output value after Arc Sine operation IN and OUT must be the same data type. ..0471. List of Basic functions Error Flag _ERR Description If an input value exceeds the range from -1.3) is ON.Arc Tangent operation Availability: 2MLI-CPUU.0 to 1. If INPUT variable is 0.1. ( 3 /2). _ERR and _LER flags are set.. ATAN . Basic Functions 7. ASIN function is executed... (π/3 radian = 60°).7. the RESULT is 1.8660.1.1 5/09 .. Program Example a) b) If the transition condition (%IX0.0. 2MLR-CPUH Input EN: executes the function in case of 1 IN: Input value of Arc Tangent operation 124 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 3) is ON..7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 125 DT .7853. OUT = ATAN (IN) Program Example a) b) If the transition condition (%IX0.0.1. ( π/4 rad = 45°). List of Basic functions Output ENO: outputs EN value as it is OUT: radian output value after Arc Tangent operation IN.1.. Basic Functions 7. R1. then output RESULT is 0. OUT must be the same data type. If INPUT = 1. ATAN function is executed. DWORD TIME DINT UINT SINT LINT Variable ANY IN type variable OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TOD INT ○ ○ ○ ○ Function a) It produces an output (Arc Tangent value) of IN value. The output value is between -π/2 and π/2. _LER Input EN: executes the function in case of 1 IN: ANY_BIT (BCD) Output ENO: outputs EN value as it is OUT: type-converted data DWORD DINT UINT SINT LINT TOD INT ANY IN type variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT : excluding BOOL from ANY_BIT types Function a) It converts input IN type and produces output OUT Function 126 Input type Output type Description R1. 2MLR-CPUH Flags: _ERR. Basic Functions 7.Converts BCD data into an integer number Availability: 2MLI-CPUU.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .7. List of Basic functions BCD_TO_*** . then the output is 0 and _ERR. List of Basic functions BYTE_BCD_TO_SINT WORD_BCD_TO_INT DWORD_BCD_TO_DINT LWORD_BCD_TO_LINT BYTE_BCD_TO_USINT WORD_BCD_TO_UINT BYTE WORD DWORD LWORD BYTE WORD SINT INT DINT LINT USINT UINT UDINT ULINT It converts BCD data into an output data type. only the part of its data (0 16#9999) is normally converted. _LER flags is set. It coverts only when the input date type is a BCD value. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 127 .1. Program Example a) If the transition condition (%MX0) is ON. Basic Functions 7. BCD_TO_*** function is executed. If an input data type is WORD. DWORD_BCD_TO_UDINT DWORD LWORD_BCD_TO_ULINT LWORD Flag Flag _ERR Description If IN is not a BCD data type.7. 2MLR-CPUH Input EN: executes the function in case of 1 IN: bit to convert (1 bit) Output ENO: outputs EN value as it is OUT: type-converted data DWORD ANY type Variable variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types 128 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Basic functions b) If BCD_VAL (BYTE) = 16#22 (2#0010_ 0010).1.1 5/09 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT DT . BOOL_TO_*** .7.BOOL type conversion Availability: 2MLI-CPUU. Basic Functions 7. then the output variable OUT_VAL (SINT) = 22 (2#0001_ 0110). 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 129 . Program Example R1. Description If the input value (BOOL) is 2#0. it produces the integer number ‘0’ and if it is 2#1. it does the integer number ‘1’ according to the output data type BOOL_TO_DWORD DWORD BOOL_TO_LWORD LWORD BOOL_TO_STRING STRING It converts BOOL into a STRING type.1. List of Basic functions Function a) It converts input IN type and produces output OUT Function BOOL_TO_SINT BOOL_TO_INT BOOL_TO_DINT BOOL_TO_LINT BOOL_TO_USINT BOOL_TO_UINT BOOL_TO_UDINT BOOL_TO_ULINT BOOL_TO_BYTE BOOL_TO_WORD Output type SINT INT DINT LINT USINT UINT UDINT ULINT BYTE WORD It converts BOOL into the output data type whose upper bits are filled with 0.7. Basic Functions 7. which is ‘0’ or ‘1’. 1 5/09 . 2MLR-CPUH Input EN: executes the function in case of 1 IN: bit String to convert (8 bits) Output ENO: outputs EN value as it is OUT: type-converted data 130 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. BOOL_TO_*** function is executed.1. If input BOOL_VAL (BOOL) = 2#1. List of Basic functions a) b) If the transition condition (%MX0) is ON.7.BYTE type conversion Availability: 2MLI-CPUU. BYTE _TO_*** . Basic Functions 7. then output OUT_VAL (BYTE) = 2#0000_ 0001. R1. Converts into ULINT type filling the upper bits with 0. Converts into DWORD type filling the upper bits with 0. Takes the lower 1 bit and converts it into BOOL type. Function BYTE _TO_SINT BYTE _TO_INT BYTE _TO_DINT BYTE _TO_LINT BYTE _TO_USINT BYTE _TO_UINT BYTE _TO_UDINT BYTE _TO_ULINT BYTE _TO_BOOL BYTE _TO_WORD BYTE _TO_DWORD BYTE _TO_LWORD Output type SINT INT DINT LINT USINT UINT UDINT ULINT BOOL WORD DWORD LWORD Description Converts into SINT type without changing its internal bit array. Converts into WORD type filling the upper bits with 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ LWORD WORD LREAL UDINT ULINT REAL INT DINT LINT USINT BOOL DATE BYTE TIME . Converts into DINT type filling the upper bits with 0. List of Basic functions DWORD UINT SINT ANY type variable TOD OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT 131 Variable *ANY_BIT: excluding BOOL from ANY_BIT types Function a) It converts input IN type and produces output OUT. Converts into INT type filling the upper bits with 0.1. Converts into UDINT type filling the upper bits with 0. Converts into LWORD type filling the upper bits with 0. Basic Functions 7.7. Converts into UINT type filling the upper bits with 0. Converts into LINT type filling the upper bits with 0. Converts into USINT type without changing its internal bit array. List of Basic functions BYTE _TO_STRING STRING Converts the input value into STRING type. _LER 132 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. OUT_VAL (SINT) = 24 (2#0011_0000).1 5/09 .Concatenates a String Availability: 2MLI-CPUU. CONCAT . BYTE_TO_*** function is executed If IN_VAL (BYTE) = 2#0001_1000.1. Basic Functions 7.7. 2MLR-CPUH Flags: _ERR. Program Example a) b) If the transition condition (%MX10) is ON. it is 1.1 5/09 If the transition condition (%IX0. then the output CONCAT is the concatenate String of each input String (up to 31 letters). _LER flags is set. INn (n: number of inputs) in order and produces output String OUT. _ERR Program Example a) R1.1) is ON. Flag Flag Description If the sum of character number of each input String is greater than 31.2. CONCAT function is executed. IN2.7. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 133 . Output ENO: without an error. List of Basic functions Input EN: executes the function in case of 1 IN1: input String IN2: input String Input variable number can be extended up to 8. OUT: output String Function a) It concatenates the input String IN1. and _ERR. IN3. Basic Functions 7.1. …. Basic Functions 7.7.1. 134 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . List of Basic functions b) If input variable IN_TEXT1 = ‘ABCD’ and IN_TEXT2 = ‘DEF’. then OUT_TEXT = ‘ABCDDEF’. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 135 . Basic Functions 7. List of Basic functions CONCAT_TIME . 2MLR-CPUH Input EN: executes the function in case of 1 IN1: date data input IN2: Time of day data input Output ENO: outputs EN value as it is OUT: DT (Date and Time of Day) output Function a) It concatenates IN1 (date) and IN2 (time of day) and produces output OUT (DT).7.1.Concatenates date and time of day Availability: 2MLI-CPUU. R1. 1 5/09 . Basic Functions 7. List of Basic functions Program Example a) b) If the transition condition (%MX1) is ON. CONCAT_TIME function is executed. 136 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. then.7. If START_DATE = D#1995-12-06 and START_TIME = TOD#08:30:00. output START_DT = DT#1995-12-06-08:30:00.1. 2MLR-CPUH Input EN: executes the function in case of 1 IN: radian input value of Cosine operation Output ENO: outputs EN value as it is OUT: result value of Cosine operation IN and OUT must be the same data type.7. List of Basic functions COS .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT 137 Variable DATE BYTE REAL . Basic Functions 7. DWORD STRING LWORD WORD LREAL USINT UINT UDINT ULINT BOOL TIME DINT SINT LINT TOD INT ANY IN type variable OUT ○ ○ ○ ○ Function a) It produces IN’s Cosine operation value. OUT = COS (IN) R1.1.Cosine operation Availability: 2MLI-CPUU. COS (π/6) = 3 / 2 = 0. 2MLR-CPUH Input EN: executes the function in case of 1 IN: date data to convert 138 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1..866 DATE_TO_*** .3) is ON.5235 (π/6 rad = 30°).8660 .7. COS function is executed. Basic Functions 7. ( 3 / 2 )..Date type conversion Availability Flags 2MLI-CPUU. If input INPUT = 0. List of Basic functions Program Example a) b) If the transition condition (%IX0. output RESULT = 0.1.1 5/09 .1. List of Basic functions Output ENO: outputs EN value as it is OUT: type-converted data DWORD STRING ○ LWORD WORD LREAL UINT UDINT USINT ULINT BOOL ANY type Variable variable IN DATE BYTE REAL TIME INT DINT LINT SINT ○ ○ Function a) It converts an input IN type and produces output OUT.7. Function DATE_TO_UINT DATE_TO_WORD DATE_TO_STRING Output type UINT WORD STRING Description Converts DATE into UINT type. Converts DATE into WORD type. Program Example a) If the transition condition (%MX0) is ON. Basic Functions 7. DATE_TO_*** function is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary TOD DT 139 . R1. Converts DATE into STRING type.1. Basic Functions 7. _LER Input EN: executes the function in case of 1 IN: input String L: length of String to delete P: position of String to delete Output ENO: without an error. it is 1 OUT: output String 140 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. OUT_VAL (STRING) = D#1995-1201.7.Delete a string Availability Flags 2MLI-CPUU.1 5/09 . List of Basic functions b) If IN_VAL (DATE) = D#1995-12-01. 2MLR-CPUH _ERR.1. DELETE . produces output OUT. or if P > character number of IN.0. List of Basic functions Function a) Flag Flag _ERR Description If P ≤ 0 or L < 0.1.0) is ON. _ERR and _LER flags is set. LENGTH = 3.7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 141 . DELETE function is executed If input variable IN_TEXT = ‘ABCDEF’. Basic Functions 7. and POSITION = 3. R1. Program Example a) b) If the transition condition (%IX0. After deleting a String (L) from the P character of IN. then OUT_TEXT (STRING) is ‘ABF’. _LER Input EN: executes the function in case of 1 IN: double integer value to convert Output ENO: without an error. 2MLR-CPUH _ERR. OUT: type-converted data 142 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1.7. List of Basic functions DINT_TO_*** . Basic Functions 7.DINT type conversion Availability Flags 2MLI-CPUU.1 5/09 . it is 1. Basic Functions 7. normal conversion.483. Takes the low 1 bit and converts into BOOL type. normal conversion. normal conversion. Takes the low 8 bit and converts into BYTE type. an error occurs. Except this.483. an error occurs. List of Basic functions DWORD ANY type Variable variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding DINT. If input is 0 ° 65.535. normal conversion. Except this. an error occurs. DINT_TO_INT DINT_TO_LINT DINT_TO_USINT INT LINT USINT DINT_TO_UINT UINT DINT_TO_UDINT UDINT DINT_TO_ULINT DINT_TO_BOOL DINT_TO_BYTE DINT_TO_WORD DINT_TO_DWORD ULINT BOOL BYTE WORD DWORD R1.768 ° 32.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 143 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT DT . Except this. Except this. If input is 0 ° 255. normal conversion.647. If input is -32. an error occurs.147. Takes the low 16 bit and converts into WORD type. Except this. If input is 0 ° 2. an error occurs.7. If input is 0 ° 2. normal conversion. an error occurs. Converts normally into LINT type.147. Converts into DWORD type without changing the internal bit array. TIME and DATE from ANY types Function a) It converts Input IN type and produces output OUT. Function DINT_TO_SINT Output type SINT Description If input is -128 ° 127.1.767.647. Except this. DINT_TO_LREAL LREAL During conversion. DINT_TO_STRING • STRING Flag Flag Description If a conversion error occurs.7. _ERR When an error occurs. Converts the input value into STRING type. an error caused by the precision may occur. List of Basic functions Function DINT_TO_LWORD Output type LWORD Description Converts into LWORD type filling the upper bytes with 0. it takes as many lower bits as the bit number of the output type and produces an output without changing the internal bit array Program Example a) 144 If the transition condition (%MX1) is ON. an error caused by the precision may occur. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _LER flags is set. Basic Functions 7. Converts DINT into REAL type.1. DINT_TO_*** function is executed. Converts DINT into LREAL type. _ERR.1 5/09 . DINT_TO_REAL REAL During conversion. DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DINT UINT SINT LINT TOD INT ANY type variable IN1 IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 145 R1.Division If INI = DINT_VAL (DINT) = -77. IN2 and OUT must be the same data type.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT Variable DATE BYTE REAL TIME .1. _LER Input EN: executes the function in case of 1 IN1: the value to be divided (dividend) IN2: the value to divide (divisor) Output ENO: without an error. 2MLR-CPUH _ERR. SINT_VAL (SINT) = -77. List of Basic functions b) DIV . Basic Functions 7. Availability Flags 2MLI-CPUU. OUT: the divided result (quotient) The variables connected to IN1.7. it is 1. 1. Basic Functions 7. value of each type. Program Example 146 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . _ERR. and the results exceeds the max. _LER flags is set. List of Basic functions OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It divides IN1by IN2 and produces an output omitting decimal fraction from the quotient.7. OUT = IN1/IN2 IN1 7 7 -7 -7 7 2 -2 2 -2 0 IN2 3 -3 -3 3 × Error Decimal fraction omitted OUT Remarks Flag Flag _ERR Description If the value to divide (divisor) is ‘0’. 2MLR-CPUH _ERR.0. List of Basic functions a) b) If the transition condition (%IX0. DIV_TIME . _LER Input EN: executes the function in case of 1 IN1: Time to divide IN2: The value to divide R1.1. then output OUT_VAL = 300/100 = 3.Time division Availability Flags 2MLI-CPUU. If input VALUE1 = 300 and VALUE2 = 100.7. Basic Functions 7.0) is ON. DIV function is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 147 . 7. Flag Flag Description If a divisor (IN2) is 0 or less than 0. 148 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Program Example This is the program that calculates the time required to produce one product in some product line if the working time of day is 12hr 24min 24sec and product quantity of a day is 12 in a product line. Basic Functions 7. it is 1.1 5/09 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT .1. _ERR and _LER flags are ON and it outputs 0. OUT: divided result time DWORD TIME DINT UINT SINT LINT ANY type variable TOD INT Variable IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It divides IN1 (time) by IN2 (number) and produces output OUT (divided time). _ERR If a negative number is entered into IN2. _ERR and _LER flags is set. List of Basic functions Output ENO: without an error. 7. _LER R1.1. If it divides TOTAL_TIME (T#12H24M24S) by PRODUCT_COUNT (12). 2MLR-CPUH _ERR.DT type conversion Availability Flags 2MLI-CPUU. DT_TO_*** .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 149 . the time required to produce one product TIME_PER_PRO (T#1H2M2S) is an output. it takes 1hr 2min 2sec to produce one product. Basic Functions 7. List of Basic functions a) b) If the transition condition (%IX0.0) is ON.1. That is. DIV_TIME function is executed. R1. List of Basic functions Input EN: executes the function in case of 1 IN: date and time of day data to convert Output ENO: outputs EN value as it is OUT: type-converted data DWORD DINT UINT SINT LINT ANY type variable TOD INT OUT ○ ○ ○ DT Variable Function a) It converts Input IN type and produces output OUT. Converts DT into DATE type. Output type Description Converts DT into LWORD type. Converts DT into TOD type. DT_TO_LWORD LWORD (The inverse conversion is available as there is no internal data change).7.1 5/09 Function DT_TO_DATE DT_TO_TOD DT_TO_STRING 150 DATE TOD STRING MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .1. Converts DT into STRING type. Basic Functions 7. output OUT_VAL (DATE) = D#1995-12-01 DWORD_TO_*** . _LER Input EN: executes the function in case of 1 IN: bit String to convert (32bit) R1. 2MLR-CPUH _ERR. Basic Functions 7. DT_TO_*** function is executed.7.DWORD type conversion Availability Flags 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 151 . List of Basic functions Program Example a) b) If the transition condition (%MX20) is ON.1. If input IN_VAL (DT) = DT#1995-12-01-12:00:00. 1. Basic Functions 7. Converts into DINT type without changing the internal bit array. 152 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. LREAL and DATE from ANY types Function a) It converts Input IN type and produces output OUT. Takes the lower 1 bit and converts into BOOL type. Takes the lower 16 bits and converts into UINT type.7. Converts into UDINT type without changing the internal bit array. List of Basic functions Output ENO: outputs EN value as it is OUT: type-converted data DWORD DINT UINT SINT LINT ANY type variable TOD INT OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ Variable *ANY: excluding DWORD. Converts into LINT type filling the upper bits with 0 Takes the lower 8 bits and converts into USINT type. Takes the lower 16 bits and converts into INT type.1 5/09 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . Converts into ULINT type filling the upper bits with 0. Function DWORD_TO_SINT DWORD_TO_INT DWORD_TO_DINT DWORD_TO_LINT DWORD_TO_USINT DWORD_TO_UINT DWORD_TO_UDINT DWORD_TO_ULINT DWORD_TO_BOOL Output type SINT INT DINT LINT USINT UINT UDINT ULINT BOOL Description Takes the lower 8 bits and converts into SINT type. If output IN_VAL (DWORD) = 16#3E8 (1000). DWORD_TO_TOD TOD DWORD_TO_STRING STRING Program Example a) b) If the transition condition (%MX0) is ON. Basic Functions 7. Takes the lower 16 bits and converts into WORD type. _LER flags is set and it is alternately converted within the range of TOD. _ERR. List of Basic functions Function DWORD_TO_BYTE DWORD_TO_WORD DWORD_TO_LWORD DWORD_TO_REAL DWORD_TO_TIME Output type BYTE WORD LWORD REAL TIME Description Takes the lower 8 bits and converts into BYTE type. R1. Converts into LWORD type filling the upper bits with 0.7. Converts into TIME type without changing the internal bit array.999). output OUT_VAL (TOD) = TOD#1S.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 153 . DWIRD_TO_TOD function is executed. with a value out of TOD range(TOD#23:59:59. However. Converts into REAL type without changing the internal bit array. Changes input value into decimal and converts into STRING type.1. Converts into TOD type without changing the internal bit array. IN2 .. IN1. That is.7.. must be the same type. TOD by converting decimal into MS unit. Basic Functions 7. see section on Data Type Structure.1. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: the value to be compared IN2: the value to compare Input variable number can be extended up to 8. REFERENCE .1 5/09 . List of Basic functions c) Calculates TIME.INTERNAL For additional information. 1000 is 1000ms = 1s. Output ENO: outputs EN value as it is OUT: comparison result value 154 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. EQ .‘Equal to’ comparison Availability 2MLI-CPUU. 1. OUT is 0.0.1 = 1. List of Basic functions DWORD DINT UINT SINT LINT TOD INT ANY type variable IN1 IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ ○ Variable ○ ○ Function a) b) If IN1 = IN2 = IN3 . VALUE2 = 300. VALUE3 = 300 (comparison result VALUE1 = VALUE2 = VALUE3)..7. output %QX0. Program Example a) b) If the transition condition (%IX0. EQ function is executed If VALUE1 = 300. output OUT is 1. = INn (n : number of inputs). In other cases. Basic Functions 7.0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 155 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .. R1.1) is ON. 7. Basic Functions 7. DWORD DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ Function a) It calculates the natural exponent with exponent IN and produces output OUT. 2MLR-CPUH _ERR.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . OUT must be the same data type.EXP operation Availability Flags 2MLI-CPUU. OUT = e 156 IN MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. List of Basic functions EXP . _LER Input EN: executes the function in case of 1 IN: input value of exponent operation Output ENO: outputs EN value as it is OUT: result value of exponent operation IN. Exponential operation Availability Flags 2MLI-CPUU. List of Basic functions Error Flag _ERR Description If output is out of the range of a type.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 157 .3) is ON. 2MLR-CPUH _ERR.0.1. Basic Functions 7. RESULT = e INPUT INPUT = 2. RESULT is 7. RESULT = 7. EXP function is executed If INPUT is 2.3890. _LER Input EN: executes the function in case of 1 IN1: real number IN2: exponent R1.0.3890…. EXPT ..1. _ERR and _LER flags are set.7. Program Example a) b) If the transition condition (%IX0.. List of Basic functions Output ENO: outputs EN value as it is OUT: result value IN1 and OUT must be the same data type.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .7. DWORD DINT UINT SINT LINT TOD INT IN1 ANY type variable IN2 OUT ○ ○ ○ ○ ○ ○ Function a) It calculates IN1 with exponent IN2 and produces output OUT.1. Basic Functions 7. OUT = IN1 Error Flag _ERR Description If an output is out of range of related data type. IN2 Program Example 158 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _ERR and _LER flags is set. List of Basic functions a) b) If the transition condition (%IX0.1. If the location is found.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 159 . output is 0.1. it shows a position of a first character of String IN2 from String IN1.5. Otherwise.5 ×1. Basic Functions 7.5 ×1.53 = 1.Find a string Availability 2MLI-CPUU. If input INPUT1= 1.5 3 FIND . R1.5 = 3. output RESULT = 1.375 = 1.3) is ON. 3. ‘EXPT’ exponential function is executed.375. INPUT2 = 3. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: input String IN2: String to find Output ENO: outputs EN value as it is OUT: location of String to be found Function a) It finds the location of String IN2 from input String IN1.7. 2MLR-CPUH 160 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. GE . The first location of IN_TEXT2 (‘BC’) from input String IN_TEXT1 (‘ABCEF’) is 2nd.7. FIND function is executed If input String IN_TEXT1=‘ABCEF’ and IN_TEXT2=‘BC’.1 5/09 .1) is ON. List of Basic functions Program Example a) b) c) If the transition condition (%IX0.‘Greater than or equal to’ comparison Availability 2MLI-CPUU.1. Basic Functions 7. then output variable POSITION = 2.1. Otherwise it is 0.. must be the same data type. Basic Functions 7. Output ENO: outputs EN value as it is OUT: comparison result value DWORD DINT UINT SINT LINT TOD INT ANY type variable IN1 IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ ○ Variable Function a) b) If IN1 ≥ IN2 ≥ IN3. an output is 1. .. List of Basic functions Input EN: executes the function in case of 1 IN1: the value to be compared IN2: the value to compare Input variable number can be extended up to 8. ≥ INn (n: number of inputs). IN1.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 161 STRING ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . IN2..7.. Program Example R1. List of Basic functions a) b) If the transition condition (%MX77) is ON. GT .1.1 5/09 .7. VALUE3 = 200.01 = 1. Basic Functions 7. The output %QX0. comparison result is VALUE1 ≥ VALUE2 ≥ VALUE3. 2MLR-CPUH 162 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.‘Greater than’ comparison Availability 2MLI-CPUU. GE function is executed If input variable VALUE1 = 300. Output ENO: outputs EN value as it is OUT: comparison result value DWORD STRING ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DINT UINT SINT LINT TOD ○ ○ INT ANY type IN1 variable IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) b) R1. Basic Functions 7. IN2. List of Basic functions Input EN: executes the function in case of 1 IN1: the value to be compared IN2: the value to compare Input variable number can be extended up to 8.1 5/09 If IN1 > IN2 > IN3. IN1.. Otherwise it is 0... an output is 1. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 163 DT ○ ○ Variable DATE BYTE REAL TIME .7. . must be the same data type.1.. > INn (n: number of inputs). 1 = 1. INSERT . List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON. Basic Functions 7. 2MLR-CPUH _ERR. The output %QX0.Inserts a String Availability Flags 2MLI-CPUU.1 5/09 . GT function is executed (2) If input variable VALUE1 = 300. comparison result is VALUE1 > VALUE2 > VALUE3.1. and VALUE3 = 100.7.0. _LER Input EN: executes the function in case of 1 IN1: String to be inserted IN2: String to insert P: position to insert a String 164 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. VALUE2 = 200. If input variable IN_TEXT1 = ‘ABCD’.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 165 . R1. ‘character number of variable IN1’ < P.7. INSERT function is executed. and POSITON = 2. or if the character number of the result exceeds 31 (32 characters are produced). Program Example a) b) If the transition condition (%M0) is ON. List of Basic functions Output ENO: without an error. OUT: output String Function a) Flag Flag _ERR Description If P ≤ 0. Basic Functions 7. output variable OUT_TEXT = ‘ABXYCD’.1. _LER flags is set. IN_TEXT2 = ‘XY’. then _ERR. it is 1. It inserts String IN2 after the P character of IN1 and produces output OUT. Basic Functions 7.INT type conversion Availability Flags 2MLI-CPUU. TOD and DT from ANY types 166 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _LER Input EN: executes the function in case of 1 IN: integer value to convert Output ENO: without an error. TIME. 2MLR-CPUH _ERR. it is 1.7. OUT: type-converted data DWORD DINT UINT SINT LINT ANY type variable TOD INT OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT Variable *ANY: excluding INT.1.1 5/09 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . DATE. List of Basic functions INT_TO_*** . Except this. Output Type SINT DINT LINT USINT UINT UDINT ULINT BOOL BYTE WORD Description If input is -128 127. an error occurs. Converts INT into REAL type normally. Except this. Converts into DWORD type filling the upper bits with 0. an error occurs. Takes the lower 1 bit and converts into BOOL type. List of Basic functions Function a) It converts input IN type and produces output OUT.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 167 . normal conversion. Converts into LWORD type filling the upper bits with 0. normal conversion. an error occurs. normal conversion. If input is 0 32767.7. Except this. Except this. an error occurs. Takes the lower 8 bits and converts into BYTE type. Except this. Function INT_TO_SINT INT_TO_DINT INT_TO_LINT INT_TO_USINT INT_TO_UINT INT_TO_UDINT INT_TO_ULINT INT_TO_BOOL INT_TO_BYTE INT_TO_WORD INT_TO_DWORD DWORD INT_TO_LWORD LWORD INT_TO_REAL INT_TO_LREAL INT_TO_STRING REAL LREAL STRING R1. Converts into DINT type normally. Converts INT into STRING type normally. an error occurs. normal conversion. If input is 0 255.1. Converts into WORD type without changing the internal bit array. Converts into LINT type normally. If input is 0 32767. Basic Functions 7. Converts INT into LREAL type normally. normal conversion. If input is 0 32767. 1. INT_TO_*** function is executed. _ERR _LER flags is set. Basic Functions 7. output variable OUT_WORD (WORD) = 16#200. 2MLR-CPUH 168 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7. _ERR If an error occurs. LE -'Less than or equal to' comparison Availability 2MLI-CPUU. If input variable IN_VAL (INT) = 512 (16#200). List of Basic functions Flag Flag Description If a conversion error occurs.1 5/09 . take as many lower bits as the bit number of the output type and produces an output without changing the internal bit array Program Example a) b) If the input condition (%MX0) is ON. List of Basic functions Input EN: executes the function in case of 1 IN1: the value to be compared IN2: the value to compare Input variable number can be extended up to 8. Otherwise it is 0.7...1 5/09 If IN1 ≤ IN2 ≤ IN3. Basic Functions 7.. IN2. . MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .. output OUT is 1. Output ENO: outputs EN value as it is OUT: comparison result value DWORD DINT UINT SINT LINT TOD ○ ○ INT ANY type variable IN1 IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ ○ 169 Variable Function a) b) R1. ≤ INn (n: number of inputs).must be the same data type.1. IN1. VALUE2 = 200. If input variable VALUE1 = 100. Basic Functions 7. output %QX0.0. and VALUE3 = 200. 170 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .1 = 1 (VALUE1 ≤ VALUE2 ≤ VALUE3).7.1. List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON. LE function is executed. _LER Input EN: executes the function in case of 1 IN: input String L: length of a String Output ENO: without an error.Takes the left side of a String Availability Flags 2MLI-CPUU. List of Basic functions LEFT .1.7. Program Example R1. _ERR and _LER flags is set. 2MLR-CPUH _ERR.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 171 . OUT: output String Function a) Flag It takes a left String (L) of IN and produces output OUT. it is 1. Basic Functions 7. Flag _ERR Description If L < 0. 7. output String OUT_TEXT = ‘ABC’. Basic Functions 7.1 5/09 . function LEFT function is executed. List of Basic functions a) b) If the transition condition (%MX0) is ON. 2MLR-CPUH Input EN: executes the function in case of 1 IN: input String 172 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. LEN . If input variable IN_TEXT = ‘ABCDEFG’ and LENGTH = 3.1.Finds a length of a String Availability 2MLI-CPUU. List of Basic functions Output ENO: outputs EN value as it is OUT: the length of a String Function a) It produces a length (character number) of the input String (IN). If input variable IN_TEXT = ‘ABCD’. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 173 . Basic Functions 7. Program Example a) b) If the transition condition (%MX0) is ON.7. LEN function is executed. output variable LENGTH = 4.1. 1 5/09 . IN.1. MX.Limits upper and lower boundaries Availability 2MLI-CPUU. 2MLR-CPUH Input EN: executes the function in case of 1 MN: minimum value IN: the value to be limited MX: maximum value Output ENO: outputs EN value as it is OUT: value in the range MN. List of Basic functions LIMIT . OUT must be the same data type.7. Basic Functions 7. DWORD STRING ○ ○ ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD ○ ○ ○ ○ INT Variable MN ANY type IN variable MX OUT DATE ○ ○ ○ ○ BYTE REAL ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 174 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT ○ ○ ○ ○ R1. LIMIT_LOW 1000 1000 1000 IN_VALUE 2000 500 4000 LIMIT_HIGH 3000 3000 3000 OUT_VAL 2000 1000 3000 R1. if MN ≤ IN ≤ MX. OUT = IN.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 175 . MX is an output. Basic Functions 7. That is. That is.1. upper limit input (LIMIT_HIGH) and limited value input IN_VALUE is as follows. LIMIT function is executed.7. If input IN value is less than MN. If input IN value is greater than MX. OUT = MN. Program Example a) b) If the transition condition (%MX0) is ON. List of Basic functions Function a) b) c) If input IN value is between MN and MX. if IN < MN. the IN is an output. That is. MN is an output. if IN > MX. Output variable OUT_VAL for lower limit input LIMIT_LOW. OUT = MX. 1 5/09 .LINT type conversion Availability Flags 2MLI-CPUU. Basic Functions 7. it is 1 OUT: type converted data 176 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _LER Input EN: executes the function in case of 1 IN: long integer value to convert Output ENO: without an error. List of Basic functions LINT_TO_*** .1. 2MLR-CPUH _ERR.7. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT DT . Output type SINT INT DINT USINT UINT UDINT ULINT BOOL BYTE WORD Description If input is -128 ~ 127. normal conversion. normal conversion. Otherwise an error occurs.1. Otherwise an error occurs. Takes the lower 1 bit and converts into BOOL type. normal conversion. If input is 0 ~ 232-1. Takes the lower 8 bits and converts into BYTE type. TOD. Otherwise an error occurs. Otherwise an error occurs. Takes the lower 32 bits and converts into DWORD type. List of Basic functions DWORD ANY type Variable variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding LINT. Basic Functions 7. If input is 0 ~ 263-1. If input is -231 ~ 231-1. normal conversion.768~ 32.535. normal conversion. If input is 0~ 255. Takes the lower 16 bits and converts into WORD type.767. TIME. Otherwise an error occurs. Converts into LWORD type without changing the internal bit array. Otherwise an error occurs.7. 177 Function LINT_TO_SINT LINT_TO_INT LINT_TO_DINT LINT_TO_USINT LINT_TO_UINT LINT_TO_UDINT LINT_TO_ULINT LINT_TO_BOOL LINT_TO_BYTE LINT_TO_WORD LINT_TO_DWORD DWORD LINT_TO_LWORD LWORD R1. normal conversion. Otherwise an error occurs. If input is 0~ 65. and DT from ANY types Function a) It converts input IN type and produces output OUT. If input is –32. DATE. normal conversion. 1 5/09 . lower bits equal to the bit number of the output type are taken to produces an output without changing the Internal bit array. Basic Functions 7.456.456. Converts the input value into STRING type. Converts LINT into LREAL type.1. output variable OUT_VAL (DINT) = 123. _ERR and _LER flags are set. 178 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.789. List of Basic functions Function Output type Description Converts LINT into REAL type.0. LINT_TO_LREAL LREAL During the conversion. If an error occurs. LINT_TO_*** function is executed. an error caused by the precision may occur. LINT_TO_REAL REAL During the conversion. an error caused by the precision may occur.0) is ON.7. If input variable IN_VAL (LINT) = 123. Program Example a) b) If the input condition (%IX0.789. LINT_TO_STRING STRING Flag Flag _ERR Description If a conversion error occurs. OUT must be the same data type R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 179 .Natural logarithm operation Availability Flags 2MLI-CPUU. List of Basic functions LN . Basic Functions 7. 2MLR-CPUH _ERR. _LER Input EN: executes the function in case of 1 IN: input value of natural logarithm operation Output ENO: outputs EN value as it is OUT: natural logarithm value IN.7.1. 3) is ON. LN function is executed. Program Example a) b) If the transition condition (%IX0..7. 180 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Basic functions DWORD DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ Function a) It finds a natural logarithm value of IN and produces output OUT. If input variable INPUT is 2...1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .0. _ERR and _LER flags is set. Basic Functions 7.6931. OUT = ln (IN) Error Flag _ERR Description If an input is 0 or a negative number. output variable RESULT is 0..0) = 0.1. ln (2.6931..1. 7. 2MLR-CPUH _ERR. Basic Functions 7.1. OUT = log10 (IN) = log (IN) R1. _LER Input EN: executes the function in case of 1 IN: input value of common logarithm operation Output END: outputs EN value as it is OUT: the value of common logarithm operation IN. List of Basic functions LOG . DWORD TIME DINT UINT SINT LINT TOD INT Variable ANY type IN variable OUT ○ ○ ○ ○ Function a) It finds the value of Base 10 Logarithm of IN and produces output OUT.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 181 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT .Base 10 Logarithm operation Availability Flags 2MLI-CPUU. OUT must be the same data type. If input variable INPUT is 2.1.3) is ON. 182 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3010 . _ ERR and _LER flags is set.… Log10 (2.1 5/09 . Program Example a) b) If the transition condition (%IX0.0) = 0..3010. List of Basic functions Error Flag _ERR Description If input value IN is 0 or a negative number... output variable RESULT is 0. the LOG function is executed. Basic Functions 7.7.1.0. it is 1. List of Basic functions LREAL_TO_*** .7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 183 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .LREAL type conversion Availability Flags 2MLI-CPUU. _LER Input EN: executes the function in case of 1 IN: LREAL value to convert Output ENO: without an error. OUT: type converted data DWORD DINT UINT SINT LINT ANY type variable TOD INT OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT Variable Function a) It converts input IN type and produces output OUT. Basic Functions 7. Function Output type Operation R1.1. 2MLR-CPUH _ERR. 768 ~ 32. Otherwise an error occurs (decimal round off). Otherwise an error occurs (decimal round off).767. If integer number of input is 0 ~ 232-1. Otherwise an error occurs (decimal round-off).1 5/09 LREAL_TO_STRING 184 STRING MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .7. normal conversion. Otherwise an error occurs (decimal round off). Otherwise an error occurs (decimal round off). normal conversion. normal conversion. normal conversion.1. If integer number of input is 0 ~ 264-1. R1. LREAL_TO_SINT SINT LREAL_TO_INT INT LREAL_TO_DINT DINT LREAL_TO_LINT LINT LREAL_TO_USINT USINT LREAL_TO_UINT UINT LREAL_TO_UDINT UDINT LREAL_TO_ULINT ULINT LREAL_TO_LWORD LWORD Converts into LWORD type without changing the internal bit array. normal conversion. If integer number of input is -32. If integer number of input is -263 ~ 263-1. If integer number of input is -231 ~ 231-1. Otherwise an error occurs (decimal round off). Converts LREAL into STRING type normally. Converts LREAL into REAL type normally. LREAL_TO_REAL REAL During the conversion. Otherwise an error occurs (decimal round off). normal conversion. List of Basic functions Function Output type Operation If integer number of input is -128 ~ 127. If integer number of input is 0 ~ 255. an error caused by the precision may occur.535. If integer number of input is 0 ~ 65. normal conversion. Otherwise an error occurs (decimal round off). Basic Functions 7. normal conversion. LREAL_TO_*** function is executed. an output is 0. R1. If input variable LREAL_VAL (LREAL) = -1.7.1.34E-12.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 185 . Program Example a) b) If the input condition (%MX0) is ON. List of Basic functions Flag Flag _ERR Description If an overflow occurs because an input value is greater than the value available for the output type. Basic Functions 7. If an error occurs. output variable REAL_VAL (REAL) = -1. _ERR and _LER flags are set.34E-12. 7.‘Less than’ comparison Availability 2MLI-CPUU. Basic Functions 7.. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: the value to be compared IN2: the value to compare Input variable number can be extended up to 8 IN1.. .1. IN2.1 5/09 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .must be the same data type Output ENO: outputs EN value as it is OUT: comparison result value DWORD DINT UINT SINT LINT TOD INT ANY type variable IN1 IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ ○ Variable ○ ○ 186 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Basic functions LT . Program Example a) b) If the transition condition (%MX0) is ON. R1.0 = 1 because of VALUE1 < VALUE 2 < VALUE 3 as a result of the comparison. Otherwise output OUT is 0.7. output %Q0.. VALUE2 = 200. < INn (n: number of inputs). LT function is executed If input variable VALUE1 = 100.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 187 . output value OUT is 1.1.0. and VALUE3 = 300.. Basic Functions 7. List of Basic functions Function a) b) If IN1 < IN2 < IN3. DATE and TOD from ANY types Function a) It converts input IN type and produces output OUT. Basic Functions 7.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT DT . Function LWORD_TO_SINT 188 Output type SINT Description Takes the lower 8 bits and converts into SINT type. List of Basic functions LWORD_TO_*** .LWORD type conversion Availability 2MLI-CPUU. R1. REAL.7. 2MLR-CPUH Input EN: executes the function in case of 1 IN: bit String to convert (64bit) Output ENO: outputs EN value as it is OUT: type-converted data DWORD ANY type Variable variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding LWORD. TIME. with a value out of DT range (DT#2163-12-31-23:59:59:999). Takes the lower 32bits and converts into DINT type. _LER flags are set and it is alternately converted within the range of DT. However. List of Basic functions Function LWORD_TO_INT LWORD_TO_DINT LWORD_TO_LINT LWORD_TO_USINT LWORD_TO_UINT LWORD_TO_UDINT LWORD_TO_ULINT LWORD_TO_BOOL LWORD_TO_BYTE LWORD_TO_WORD Output type INT DINT LINT USINT UINT UDINT ULINT BOOL BYTE WORD Description Takes the lower 16bits and converts into INT type. Takes the lower 8 bits and converts into BYTE type. Takes the lower 32 bits and converts into DWORD type. Takes the lower 1 bit and converts into BOOL type. Converts into DT type without changing the internal bit array. Takes the lower 32bits and converts into UDINT type. Takes the lower 8 bits and converts into USINT type. Takes the lower 16 bits and converts into WORD type. LWORD_TO_DWORD DWORD LWORD_TO_LREAL LREAL LWORD_TO_DT DT LWORD_TO_STRING STRING Program Example R1. Basic Functions 7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 189 . _ERR. Converts into ULINT type without changing the internal bit array.7. Converts input value into STRING type. Converts into LINT type without changing the internal bit array.1. Takes the lower 16 bits and converts into UINT type. Converts LWORD into LREAL type. Basic Functions 7.Maximum value Availability 2MLI-CPUU. output variable OUT_VAL (LINT) is -1 (16#FFFF_FFFF_FFFF_FFFF). LWORD_TO_*** function is executed. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: the value to be compared IN2: the value to compare 190 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1.1 5/09 . MAX . If input variable IN_VAL (LWORD) = 16#FFFF_FFFF_FFFF_FFFF.7. List of Basic functions a) b) If the input condition (%MX0) is ON. . R1. Basic Functions 7. Output ENO: outputs EN value as it is OUT: maximum value among input IN1.7.…. INn (n: number of inputs).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 191 STRING ○ ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL .. MAX function is executed. List of Basic functions Input variable number can be extended up to 8. Program Example a) If the transition condition (%MX0) is ON.. IN2. IN2.1. OUT must be the same data type DWORD TIME DINT UINT SINT LINT TOD INT ANY type Variable IN1 IN2 OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ ○ ○ Variable Function a) It produces the maximum value among input IN1.. Basic Functions 7. Output OUT_VAL is 200. MID . maximum value is 200. List of Basic functions b) As the result of comparing input variable (VALUE1 = 100 and VALUE2 = 200).1. it is 1.7.1 5/09 .Takes the middle part of a String Availability Flags 2MLI-CPUU. _LER Input EN: executes the function in case of 1 IN: input String L: the length of String to output P: starting location of String to output Output ENO: without an error. OUT: output String 192 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2MLR-CPUH _ERR. output variable OUT_TEXT = ‘BCD’.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 193 . R1. then _ERR and _LER flags are set. List of Basic functions Function a) Flag Flag _ERR Description If (character number of variable IN) < P. Basic Functions 7.7. and starting location of character starting POSITION = 2.0.0) is ON. If input String IN_TEXT = ‘ABCDEFG’. Program Example a) b) If the transition condition (%IX0. It produces a String (L) of IN from the P character.1. MID function is executed. P <= 0 or L < 0. the length of String LENGTH = 3. List of Basic functions MIN . IN2. OUT must be the same data type. DWORD DINT UINT SINT LINT TOD INT ANY type variable IN1 IN2 OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT ○ ○ ○ Variable 194 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 STRING ○ ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . .Minimum value Availability 2MLI-CPUU. Basic Functions 7.7....1. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: value to be compared IN2: value to compare Input variable number can be extended up to 8 Output ENO: outputs EN value as it is OUT: minimum value among input values IN1. . Program Example a) b) If the transition condition (%MX100) is ON. INn (n: number of inputs). .1. R1.. IN2. List of Basic functions Function a) Produces the minimum value among input IN1. MIN function is executed. The output is OUT_VALUE = 100 because its minimum value is 100 as the result of comparing VALUE1 = 100 to VALUE2 = 200. . Basic Functions 7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 195 .7. Dividing result (remainder) Availability 2MLI-CPUU.. Basic Functions 7.7. List of Basic functions MOD .1. OUT must be the same data type.1 5/09 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . DWORD TIME DINT UINT SINT LINT TOD INT Variable IN1 IN2 OUT ANY type variable ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 196 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. IN2.. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: dividend IN2: divisor Output ENO: outputs EN value as it is OUT: dividing result (remainder) IN1. the remainder value OUT_VAL is 7 as a result of dividing 37 by 10. If the dividend VALUE1 = 37 and the divisor VALUE2 = 10. List of Basic functions Function a) Divides IN1 by IN2 and outputs its remainder as OUT. OUT = 0 ) IN1 7 7 -7 -7 7 2 -2 2 -2 0 IN2 1 1 -1 -1 0 OUT Program Example a) b) If the transition condition (%MX100) is ON.(IN1/IN2) × IN2 ( If IN2 = 0. the MOD function is executed. R1.1. Basic Functions 7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 197 . OUT = IN1 .7. DWORD DINT UINT SINT LINT TOD Variable ANY type variable IN OUT STRING ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE ○ ○ BYTE REAL TIME INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 198 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Basic Functions 7.1 5/09 DT ○ ○ .1.Data movement (Copy data) Availability 2MLI-CPUU.7. List of Basic functions MOVE . 2MLR-CPUH Input EN: executes the function in case of 1 IN: value to be moved Output ENO: outputs EN value as it is OUT: moved value Variables connected to IN and OUT are the same type. a) b) If the transition condition (%MX100) is ON. Program Example This is a program that transfers the 8-contact inputs %I0.4.7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 199 . Basic Functions 7.0~%Q0.0. List of Basic functions Function a) Moves an IN value to OUT.7 to the variable D and then moves them to output %Q0. R1. the MOVE function is executed.0.4.0~%I0.7.7 by the second one.4. It moves 8-contact input module data to the variable D by the first MOVE function and moves them to %Q0.1.4.0~%Q0. Output ENO: without an error..1. OUT are all the same data type. . Basic Functions 7.7. List of Basic functions MUL . 2MLR-CPUH _ERR.1 5/09 DT . it is 1 OUT: multiplied value Variables connected to IN1.. DWORD STRING LWORD WORD LREAL UDINT USINT DATE BYTE REAL TIME DINT UINT SINT LINT ANY type variable IN1 IN2 TOD INT Variable ULINT BOOL ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 200 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _LER Input EN: executes the function in case of 1 IN1: multiplicand IN2: multiplier Input is available to extend up to 8..Multiplication Availability Flags 2MLI-CPUU. IN2. the _ERR and _LER flags are set. LREAL type operation exceeds the max. MUL function is executed. value in the middle of the operation because it performs the operation sequentially from IN1 to IN8.. 1. If REAL. or min. (1. _LER flag is set and the result is unlimited or abnormal value.. If input variables of MUL function.#SNAN00000000000e+000.#INF000000000000e+000. × INn Flag Flag _ERR Description If an output value is beyond the range of its data-type. Program Example a) b) R1.. the _ERR. List of Basic functions OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) Multiplies an IN1.#QNAN00000000000e+000).7. IN2. OUT = IN1 × IN2 × . VALUE1 = 30. then the output variable OUT_VAL = 30 ×20 ×10 = 6000..1. Basic Functions 7.. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 201 . 1. VALUE2 = 20. VALUE3 = 10. INn (n: number of inputs) and outputs the result as OUT.1 5/09 If the transition condition (%MX0) is ON.. List of Basic functions 202 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Basic Functions 7.7.1.1 5/09 . 1.Time multiplication Availability Flags 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 203 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . _LER Input EN: executes the function in case of 1 IN1: time to be multiplied IN2: multiplying value Output ENO: without an error.7. it is 1 OUT: multiplied result DWORD DINT UINT SINT LINT ANY type variable TOD INT IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) Multiplies the IN1 (time) by IN2 (number) and outputs the result time as OUT. R1. List of Basic functions MUL_TIME . 2MLR-CPUH _ERR. Basic Functions 7. Program Example This is the program that sets the required working time: the average estimated time per unit product is 20min 2sec and the number of product to produce a day is 20 in one product line. If the transition condition (%MX0) is ON.1 5/09 . Basic Functions 7. a) b) c) d) Write input variable (IN1: the estimated time per unit product) UNIT_TIME: T#20M2S.7. T#6H40M40S is produced in output TOTAL_TIME. List of Basic functions Flag Flag _ERR Description If an output value is out of its TIME-data range. _ERR and _LER flags are ON and IN2 is converted to hexadecimal. If a negative value is entered to IN2. Write input variable (IN2: quantity of production) PRODUCT_COUNT: 20. _ERR and _LER flags are set. 204 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. producing the multiplication result.1. Write TOTAL_TIME to the output variable (OUT: total required working time). …. _LER Input EN: executes the function in case of 1 K: selection IN0: the value to be selected IN1: the value to be selected Input variable number can be extended up to 7(IN0... IN1.Selection from multiple inputs Availability Flags 2MLI-CPUU. IN1. IN6) Output ENO: without an error. List of Basic functions MUX .7. OUT: the selected value IN0. R1. it is 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 205 . Basic Functions 7.1. 2MLR-CPUH _ERR. OUT must be the same data type. then IN0 is an output and _ERR. If K is negative. INn) with K value and produces it. if K = n.1 5/09 STRING ○ ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE DT . List of Basic functions DWORD BYTE REAL TIME DINT UINT SINT LINT TOD ○ ○ ○ INT Variable IN0 IN1 OUT ANY type variable ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) b) Selects one among several inputs (IN0. MUX function is executed.7. If K = 0. _ERR and _LER flags are set Program Example a) b) 206 If the transition condition (%MX0) is ON. INn is an output. if K = 1. _LER flags are set.1. IN1. Basic Functions 7. Input variable is selected by selection variable S and is moved to OUT. IN1 is an output. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Flag Flag _ERR Description If K is greater than or equal to ‘n’ which is the number of input variable INn. IN0 is an output. …. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: The value to be compared IN2: The value to be compared IN1.‘Not equal to’ comparison Availability 2MLI-CPUU. List of Basic functions NE .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 207 .7. IN2 must be the same data type.1. Output ENO: outputs EN value as it is OUT: the compared result value R1. Basic Functions 7. 7.0. If input variable VALUE1 = 300. NE function is executed. List of Basic functions DWORD TIME DINT UINT SINT LINT TOD ○ ○ INT Variable IN1 IN2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) b) If IN1 is not equal to IN2. output OUT is 1.1.1 5/09 STRING ○ ○ LWORD WORD LREAL UDINT USINT • F u n c ANY type t variable i o n ULINT BOOL DATE BYTE REAL DT . output result value is %QX0. Program Example a) b) If the transition condition (%IX0. 208 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. VALUE2 = 200 (the compared result VALUE1 and VALUE2 are different). Basic Functions 7.1 = 1. output OUT is 0.0) is ON. If IN1 is equal to IN2.0. 7. Basic Functions 7. List of Basic functions R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 209 .1. 0101 210 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7. IN 1100.. 1010 OUT 0011 .. OUT must be the same data type..1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL .. Basic Functions 7.1.. DWORD TIME DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It inverts the IN (by bit) and produces output OUT...Reverse Logic (Logic inversion) Availability 2MLI-CPUU. 2MLR-CPUH Input EN: executes the function in case of 1 IN: the value to be logically inverted Output ENO: outputs EN value as it is OUT: the inversed (NOT) value IN.. List of Basic functions NOT . 1. List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON. input data value of %MB10 is inversed and is written in %QB0.Logic Sum Availability 2MLI-CPUU. If NOT function is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 211 .0.7.0. NOT function is executed. R1. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: input 1 IN2: input 2 Input variables can be extended up to 8. OR . Basic Functions 7. . OUT must be the same data type.. 1010 1111 .0. IN1 OR IN2 1010 ..1 5/09 DT . List of Basic functions Output ENO: outputs EN value as it is OUT: OR result IN1. 1010 Program Example a) b) If the transition condition (%MX0) is ON..... The result of a logic sum (OR) for %MB10 = 2#1100_1100 and ABC = 2#1111_0000 is produced in %QB0..7.. function OR is executed. IN2.. DWORD TIME DINT UINT SINT LINT TOD Variable ANY type variable IN OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It performs a logical OR on the input variables by bit and produces output OUT.. 0000 OUT 1111 .. Basic Functions 7.0 = 2#1111_1100 212 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. REAL type conversion Availability Flags 2MLI-CPUU.7.1. Basic Functions 7. 2MLR-CPUH _ERR. OUT: type-converted data DWORD STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DINT UINT SINT LINT ANY type variable TOD INT OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 213 DT Variable TIME . _LER Input EN: executes the function in case of 1 IN: the REAL value to be converted Output ENO: without an error. List of Basic functions REAL_TO_*** . it is 1. Converts REAL into LREAL type normally. normal conversion. Otherwise an error occurs. Otherwise an error occurs.768 32. normal conversion. (Decimals round-off) If integer part of input is 0 264-1. normal conversion. (Decimals round-off) If integer part of input is 0 255.535. (Decimals round-off) If integer part of input is 0 65. Converts REAL into STRING type normally. (Decimals round-off) If integer part of input is -231 231-1. normal conversion. (Decimals round-off) Converts into DWORD type without changing the internal bit array.1. Basic Functions 7. (Decimals round-off) If integer part of input is -263 263-1.7. Otherwise an error occurs. Function REAL_TO_SINT Output Type SINT Description If integer part of input is -128 127. REAL_TO_INT INT REAL_TO_DINT DINT REAL_TO_LINT LINT REAL_TO_USINT USINT REAL_TO_UINT UINT REAL_TO_UDINT UDINT REAL_TO_ULINT ULINT REAL_TO_DWORD REAL_TO_LREAL REAL_TO_STRING DWORD LREAL STRING 214 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. (Decimals round-off) If integer part of input is -32. (Decimals round-off) If integer part of input is 0 232-1. normal conversion. List of Basic functions Function a) It converts the IN type and outputs it as OUT.1 5/09 . normal conversion. Otherwise an error occurs. normal conversion. Otherwise an error occurs. Otherwise an error occurs. Otherwise an error occurs.767. normal conversion. Otherwise an error occurs. If an error occurs. Program Example a) b) If the transition condition (%MX0) is ON. the output is 0. REPLACE . DINT_VAL (DINT) = 12.7. function REAL_TO_*** is executed If REAL_VAL (REAL type) = 1. _LER flags are set. 2MLR-CPUH _ERR. _LER R1. Basic Functions 7.String replacement Availability Flags 2MLI-CPUU.234E4.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 215 . List of Basic functions Flag Flag _ERR Description If overflow occurs (an input value is greater than the value to be stored in output type).340. _ERR.1. List of Basic functions Input EN: executes the function in case of 1 IN1: character string to be replaced IN2: character string to replace L: the length of character string to be replaced P: position of character string to be replaced Output ENO: without an error. Basic Functions 7. P > (input character number of IN1) or character number of result > 30 216 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7. _LER flag is set if P ≤ 0 or L < 0.1. Flag Flag _ERR Description _ERR.1 5/09 . it is 1 OUT: output character string Function a) Its function is to remove the L-length charter from IN1 (starting from P) and put IN2 in the removed position as output OUT. input variable of character string to replace IN_TEXT2 = `X`.To take the right of character string Availability Flags 2MLI-CPUU. then ‘BCD’ of IN_TEXT1 is replaced with ‘X’ of IN_TEXT2 and output variable OUT_TEXT is ‘AXEF’. _LER R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 217 . input variable of character string length to be replaced LENGTH = 3 and input variable of character string position designation to be replaced POSITION = 2. List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON. RIGHT . If input variable of character string to be replaced IN_TEXT1 = `ABCDEF`.7. 2MLR-CPUH _ERR. Basic Functions 7. function REPLACE (character string replacement) is executed.1. it is 1 OUT: output character string Function a) Flag Flag _ERR Description If L < 0. Basic Functions 7.1 5/09 . List of Basic functions Input EN: If EN is 1. It takes a right L-length character string of IN and produces output OUT. Program Example 218 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7. function executes IN: input character string L: length of character string Output ENO: without an error.1. _ERR and _LER flag is set. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 219 . ROL . List of Basic functions a) b) If the transition condition (%IX0. output character string variable OUT_TEXT = `EFG`.7. If character string declared as input variable IN_TEXT = `ABCDEFG` and the length of character string to output LENGTH = 3.0. Basic Functions 7.1. 2MLR-CPUH Input EN: executes the function in case of 1 R1.Rotate to Left Availability 2MLI-CPUU. function RIGHT (to take the right of character string) is executed.0) is ON. Basic Functions 7.0.0 is ON. 220 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 DT . Program Example a) This is the program that rotates the value of input data (2#1100_1100_1100_1100:16#CCCC) to the left by 3 bits if input %IX0.7. List of Basic functions IN: the value to be rotated N: bit number to rotate Output ENO: outputs EN value as it is OUT: the rotated value DWORD DATE BYTE REAL Variable ANY type variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD INT IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT Function a) It rotates input IN to the left as many as N bit number.1. (4) If the transition condition (%IX0. R1. function ROL is executed and a data bit set as input variable is rotated to the left by 3 bits and produces output OUT_VALUE.0. List of Basic functions (1) Set input variable IN_VALUE to rotate.1. (3) Set output variable to output the rotated data value as OUT_VALUE. Basic Functions 7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 221 . (2) Set the value to be rotated (3).0) is ON.7. Basic Functions 7. 2MLR-CPUH Input EN: executes the function in case of 1 IN: the value to be rotated N: bit number to rotate Output ENO: outputs EN value as it is OUT: the rotated value DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD INT Variable ANY type variable IN OUT DATE R1.1.7. 222 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT .Rotate to right Availability 2MLI-CPUU. List of Basic functions ROR .1 5/09 BYTE REAL ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY types Function a) It rotates input IN to the right as many as N bit number. 1.0. R1.0. function ROR (rotate Right) is executed and data bit set as input variable is rotated to the right by 3 bits and produces output OUT_VALUE.0) is ON. (3) If the transition condition (%IX0. List of Basic functions Program Example a) This is the program that rotates input data value (2#1110_0011_0011_0001: 16#E331) to the right by 3 bits if input %I0.7.0 is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 223 . (2) Insert bit number 3 into bit number input N. Basic Functions 7. (1) Set input variable of a data value to rotate as IN_VALUE. 1 5/09 STRING ○ ○ ○ LWORD WORD LREAL UDINT USINT ULINT BOOL INT DT . IN2. OUT must be the same type.Selection from two inputs Availability 2MLI-CPUU. List of Basic functions SEL .1. 2MLR-CPUH Input EN: executes the function in case of 1 G: selection IN0: the value to be selected IN1: the value to be selected Output ENO: outputs EN value as it is OUT: the selected value IN1. Basic Functions 7.7. DWORD DATE BYTE REAL TIME DINT UINT SINT LINT TOD ○ ○ ○ Variable ANY type variable IN0 IN1 OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 224 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Program Example If the input (%MX0) is ON. Basic Functions 7. IN0 is an output and if G is 1. If S = 1 and VALUE1 = 16#1110. IN1 is an output. VALUE2 = 16#FF00.1. then output variable %QW0.7. R1. function SEL is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 225 . this program selects an input between the two (VALUE1.0 = 16#FF00. List of Basic functions Function a) If G is 0. VALUE2) and outputs the value as described in S. a) b) If the transition condition (%MX0) is ON.0. IN: bit string to be shifted N: bit number to be shifted Output ENO: outputs EN value as it is OUT: the shifted value DWORD TIME DINT UINT SINT LINT Variable ANY type variable IN OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TOD INT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT Function a) b) It shifts input IN to the left as many as N bit number.1. List of Basic functions SHL .7. N number bit on the rightmost of input IN is filled with 0.1 5/09 DT . 2MLR-CPUH Input EN: If EN is 1. Basic Functions 7. function is executed.Shift Left Availability 2MLI-CPUU. 226 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. function SHL (shift Left) is executed and data bit set as input variable shifts to the left by 3 bits and produces output OUT_VALUE.0 is ON (1) Set the input variable IN_VALUE (2#1100_1100_1100_1100: 16#CCCC). 2MLR-CPUH MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 227 .1.Shift Right Availability R1.0. (2) Insert bit number 3 into N.0) is ON. (3) If the transition condition (%IX0. Basic Functions 7. SHR .1 5/09 2MLI-CPUU.7. List of Basic functions Program Example a) This is the program that shifts input data value (2#1100_1100_1100_1100:16#CCCC) to the left by 3 bits if input %IX0.0. Basic Functions 7.1. List of Basic functions Input EN: executes the function in case of 1 IN: bit string to be shifted N: bit number to be shifted Output ENO: outputs EN value as it is OUT: the shifted value DWORD TIME DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT Function a) b) 228 It shifts input IN to the right as many as N bit number. N number bit on the leftmost of input IN is filled with 0. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL . 7. Data bit set as input variable shift to the right by 3 bits and produces outputs OUT_VALUE.1. R1. Basic Functions 7. List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 229 . function SHL (Shift Left) is executed. 2MLR-CPUH Input EN: executes the function in case of 1 IN: input value of Sine operation (radian) Output ENO: outputs EN value as it is OUT: Sine operation result value IN.1 5/09 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DT .7. OUT must be the same data type. OUT = SIN (IN) 230 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.Sine operation Availability 2MLI-CPUU. Basic Functions 7. List of Basic functions SIN . DWORD DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT Variable ANY type variable IN OUT ○ ○ ○ ○ Function a) Finds the Sine operation value of IN and produces output OUT.1. . List of Basic functions Program Example a) b) If the transition condition (%IX0.1..0) is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 231 .SINT type conversion Availability Flags 2MLI-CPUU. If the value of input variable INPUT is 1.. 2MLR-CPUH _ERR. ( 3 /2 ). function SIN (Sine operation) is executed. _LER Input EN: executes the function in case of 1 IN: short Integer value R1. (π/3 rad = 60°). RESULT declared as output variable is 0. SIN(π/3) = 0.0.8660 3 /2 = SINT_TO_*** . . Basic Functions 7..7.0471 .8660 . 7. normal conversion. Takes the lower 1 bit and converts into BOOL type. Converts into BYTE type without changing the internal bit array. 232 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Basic Functions 7. Otherwise an error occurs. normal conversion. If input is 0 127. OUT: type-converted data DWORD TIME DINT UINT SINT LINT ANY type variable TOD INT Variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding SINT. If input is 0 127. If input is 0 127. normal conversion. Converts into WORD type filling the upper bits with 0. it is 1. TIME.1 5/09 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . TOD and DT from ANY types Function a) It converts the IN type and outputs it as OUT. DATE. If input is 0 127. Converts into LINT type normally. Otherwise an error occurs. normal conversion. List of Basic functions Output ENO: without an error. Otherwise an error occurs. Otherwise an error occurs. Function SINT_TO_INT SINT_TO_DINT SINT_TO_LINT SINT_TO_USINT SINT_TO_UINT SINT_TO_UDINT SINT_TO_ULINT SINT_TO_BOOL SINT_TO_BYTE SINT_TO_WORD Output type INT DINT LINT USINT UINT UDINT ULINT BOOL BYTE WORD Description Converts into INT type normally.1. Converts into DINT type normally. If input variable IN_VAL (SINT type) = 64 (2#0100_0000). output variable OUT_VAL (BYTE type) = 16#40 (2#0100_0000). R1. Converts SINT into REAL type normally.1. List of Basic functions Function SINT_TO_DWORD SINT_TO_LWORD SINT_TO_REAL SINT_TO_LREAL SINT_TO_STRING Output type DWORD LWORD REAL LREAL STRING Description Converts into DWORD type filling the upper bits with 0. If an error occurs. Basic Functions 7. _ERR and _LER flag is set.7. function SINT_TO_*** is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 233 . take the lower bits as many as bit number of output type and output it without changing the internal bit array. Converts SINT into LREAL type normally. Flag Flag _ERR Description If a conversion error occurs. Program Example a) b) If the input condition (%MX0) is ON. Converts into LWORD type filling the upper bits with 0. Converts SINT into STRING type normally. _LER Input EN: executes the function in case of 1 IN: input value of square root operation Output ENO: without an error. List of Basic functions SQRT . 2MLR-CPUH _ERR. OUT = 234 IN MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT .7.1. OUT: square root value IN. Basic Functions 7. it is 1. DWORD SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ Function a) It finds the square root value of IN and output it as OUT. OUT must be the same data type.Square root operation Availability Flags 2MLI-CPUU. 1.0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 235 .0. If the value of input variable declared as INPUT is 9. Basic Functions 7.0 = 3.0 STRING_TO_*** . Program Example a) b) If the transition condition (%MX0) is ON. RESULT declared as output variable is 3. _ERR and _LER flag is set.7. 9. function SQRT (square root operation) is executed.STRING type conversion Availability Flags 2MLI-CPUU. 2MLR-CPUH _ERR. List of Basic functions Flag Flag _ERR Description If the value of IN is a negative number. _LER R1. 7. List of Basic functions Input EN: If EN is 1. Converts STRING into INT type. R1. Converts STRING into USINT type.1. IN: character string Output ENO: without an error. it is 1. OUT: type-converted data DWORD TIME DINT UINT SINT LINT ANY type variable TOD ○ INT Variable IN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding STRING from ANY types Function a) Converts the IN type and outputs it as OUT. Basic Functions 7. Function STRING_TO_SINT STRING_TO_INT STRING_TO_DINT STRING_TO_LINT STRING_TO_USINT STRING_TO_UINT STRING_TO_UDINT 236 Output type SINT INT DINT LINT USINT UINT UDINT Description Converts STRING into SINT type. function converts. Converts STRING into UDINT type. Converts STRING into LINT type. Converts STRING into UINT type.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . Converts STRING into DINT type. Converts STRING into DATE type. Converts STRING into TIME type. STRING_TO_DWORD DWORD STRING_TO_LWORD STRING_TO_REAL STRING_TO_LREAL STRING_TO_DT STRING_TO_DATE STRING_TO_TOD STRING_TO_TIME LWORD REAL LREAL DT DATE TOD TIME • Flag Flag _ERR Description If input character type does not match with output data type.7. Basic Functions 7. List of Basic functions Function STRING_TO_ULINT STRING_TO_BOOL STRING_TO_BYTE STRING_TO_WORD Output type ULINT BOOL BYTE WORD Description Converts STRING into ULINT type. Converts STRING into DWORD type. Converts STRING into LREAL type. _ERR and _LER flag is set. Converts STRING into DT type. Converts STRING into WORD type. Program Example R1.1. Converts STRING into LWORD type. Converts STRING into REAL type. Converts STRING into BOOL type.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 237 . Converts STRING into TOD type. Converts STRING into BYTE type. If input variable IN_VAL (STRING) = ‘-1. Basic Functions 7. 238 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . SUB .7. List of Basic functions a) b) If the input condition (%MX0) is ON.Subtraction Availability Flags 2MLI-CPUU.34E12’. 2MLR-CPUH _ERR. function STRING_TO_*** is executed. OUT: the subtracted result value The variables connected to IN1. _LER Input EN: executes the function in case of 1 IN1: the value to be subtracted IN2: the value to subtract Output ENO: without an error.34E12. IN2 and OUT must be the same data type. output variable OUT_VAL (REAL) = -1.1. it is 1. _ERR and _LER flags are set. OUT = IN1 ― IN2 Flag Flag _ERR Description If output value is out of range of related data type. 1._LER flag is set and the result is unlimited or abnormal value. 1. value in the middle of operation because it performs operation sequentially from IN1 to IN8. (1.#INF000000000000e+000.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 239 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . Basic Functions 7. If LREAL type operation exceeds the max or min. List of Basic functions DWORD TIME DINT UINT SINT LINT TOD INT Variable IN1 IN2 OUT ANY type variable ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) It subtracts IN2 from IN1 and outputs it as OUT.1.#QNAN00000000000e+000) Program Example R1.7.#SNAN00000000000e+000. _ERR. 2MLR-CPUH _ERR.Date subtraction Availability Flags 2MLI-CPUU. VALUE2 = 200.7. function SUB is executed.1. If input variables VALUE1 = 300. it is 1.1 5/09 . 240 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _LER Input EN: executes the function in case of 1 IN1: standard date IN2: the date to subtract Output ENO: without an error. SUB_DATE . List of Basic functions a) b) If the transition condition (%MX0) is ON. OUT_VAL is 100 after the operation. Basic Functions 7. OUT: produces the difference between two dates as time data. 7. the working days declared as output variable WORK_DAY is T#44D. Flag Flag Description If output value is out of range (TIME data type).0) is ON. If input variable CURRENT_DATE is D#1995-12-15 and START_DATE is D#1995-11-1. Program Example a) b) If the transition condition (%IX0. List of Basic functions Function a) It subtracts IN2 (specific date) from IN1 (standard date) and outputs the difference between two dates as OUT. _ERR An error occurs: 1) when date difference exceeds the range of TIME data type (T#49D17H2M47S295MS).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 241 . R1. Basic Functions 7.1.0. function SUB_DATE is executed. 2) the result of date operation is a negative number. _ERR and _LER flags are set. If the result of date and time of day subtraction operation is a negative number.7. it is 1. _ERR and _LER flags are set. Flag Flag Description If output value is out of range of TIME data type. 2MLR-CPUH _ERR. an error occurs.1. List of Basic functions SUB_DT .1 5/09 . _LER Input EN: executes the function in case of 1 IN: standard date and time of day IN2: date and time of day to subtract Output ENO: without an error. OUT: the subtracted result time Function a) It subtracts IN2 (specific date and time of day) from IN1 (standard date and time of day) and outputs the time difference as OUT. Basic Functions 7. _ERR 242 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.Date and Time subtraction Availability Flags 2MLI-CPUU. List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 243 . function SUB_DT (Time and Date subtraction) is executed.1. _LER R1.7. 2MLR-CPUH _ERR. If the current date and time of day CURRENT_DT is DT#1995-12-1514:30:00 and the starting date and the time of day to work START_DT is DT#1995-12-13-12:00:00. SUB_TIME . Basic Functions 7. the continuous working time declared as output variable WORK_TIME is T#2D2H30M.Time subtraction Availability Flags 2MLI-CPUU. it subtracts the time from the standard time and produces OUT (time difference). List of Basic functions Input EN: executes the function in case of 1 IN1: standard time of day IN2: the time to subtract Output ENO: without an error. Basic Functions 7. if IN1 type is TIME.7. That is. it subtracts the time from the standard time of day and outputs the time of a day as OUT. If IN1 is TIME_OF_DAY. OUT: the subtracted result time or time of day OUT data type is the same as the input IN1 type.1. it is 1.1 5/09 DT ○ ○ . 244 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. DWORD SINT LINT TOD INT Variable ANY type variable IN1 OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT ○ ○ ○ ○ Function a) b) If IN1 is TIME. OUT type must be TIME. If total working time declared as input variable TARGET_TIME is T#2H30M. _ERR and _LER flags are set. it subtracts the time from the standard date and the time of day and produces the date and the time of day as OUT. an error occurs.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 245 . the elapsed time ELAPSED_TIME is T#1H10M30S300MS..0) is ON. List of Basic functions c) If IN1 is DATE_AND_TIME. the remaining working time declared as output variable TIME_TO_GO is T#1H19M29S700MS. function SUB_TIME (time subtraction) is executed. R1.0. Basic Functions 7.7. Flag Flag Description If the output value is out of range of related data type. Program Example a) b) If the transition condition (%IX0.1. _ERR If the result subtracting the time from the standard time is a negative number or the result subtracting the time from the time of day is a negative number. 246 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it is 1 OUT: the subtracted result time Function a) It subtracts the IN2 (specific time of day) from IN1 (standard time of day) and outputs the time difference as OUT.1.1 5/09 . List of Basic functions SUB_TOD . an error occurs. Flag Flag _ERR Description If the result subtracting the time of day from the time of day is a negative number. _LER Input EN: executes the function in case of 1 IN1: standard time of day IN2: the time of day to subtract Output ENO: without an error. 2MLR-CPUH _ERR. Basic Functions 7.7.TOD Subtraction Availability Flags 2MLI-CPUU. Tangent Operation Availability 2MLI-CPUU. List of Basic functions Program Example a) b) If the transition condition (%IX0. 2MLR-CPUH Input EN: executes the function in case of 1 IN: tangent input value (radian) R1.500 and the starting time to work START_TIME is TOD#12:00:00.0. Basic Functions 7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 247 .0) is ON. the required time to work WORK_TIME declared as output variable is T#2H20M30S500MS. function SUB_TOD (time of day subtraction) is executed. TAN .1. If END_TIME declared as input variable is TOD#14:20:30.7. 1.7853..7. List of Basic functions Output ENO: outputs EN value as it is OUT: the result value of Tangent operation IN. If the value of input variable declared as INPUT is 0. OUT must be the same data type DWORD TIME DINT UINT SINT LINT TOD INT Variable ANY type variable IN OUT ○ ○ ○ ○ Function a) It performs Tangent operation of IN and produces output OUT. RESULT declared as output variable is 1. function TAN (Tangent operation) is executed.1 5/09 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . OUT = TAN(IN) Program Example a) b) If the transition condition (%MX0) is ON.0000. TAN(π/4) = 1 248 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Basic Functions 7.. (π/4 rad = 45°). 1. 2MLR-CPUH Input EN: executes the function in case of 1 IN: time data to be converted Output ENO: outputs EN value as it is OUT: type-converted data DWORD DATE BYTE REAL TIME DINT UINT SINT LINT ANY type variable TOD INT Variable OUT ○ ○ R1. Basic Functions 7.TIME type conversion Availability 2MLI-CPUU.7. List of Basic functions TIME_TO_*** .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 249 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DT . It converts only data type without changing the data (internal bit array state). Converts TIME into DWORD type. function TIME_TO_*** is executed.1 5/09 . 2MLR-CPUH MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function TIME_TO_UDINT Output type UDINT Description Converts TIME into UDINT type.7. Basic Functions 7. output variable OUT_VAL (UDINT) = 120. If input variable IN_VAL (TIME) = T#120MS. List of Basic functions Function a) It converts the IN type and produces OUT. TOD_TO_*** . It converts only data type without changing the data (internal bit array state). Converts TIME into STRING type.TOD type conversion Availability 250 2MLI-CPUU.1. TIME_TO_DWORD TIME_TO_STRING DWORD STRING Program Example a) b) If the transition condition (%MX0) is ON. TOD_TO_UDINT UDINT Converts only data type without changing a data (internal bit array state). TOD_TO_DWORD DWORD Converts only data type without changing a data (internal bit array state). Output type Description Converts TOD into UDINT type.7. Basic Functions 7. List of Basic functions Input EN: executes the function in case of 1 IN: time of a day data to be converted Output ENO: outputs EN value as it is OUT: type-converted data DWORD Variable OUT STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT ANY type variable TOD INT ○ ○ Function a) It converts the IN type and outputs it as OUT.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 251 DT . Converts TOD into STRING type. Function TOD_TO_STRING STRING R1.1. Converts TOD into DWORD type. 7. TRUNC . _LER Input EN: executes the function in case of 1 IN: REAL value to be converted 252 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Basic functions Program Example a) b) If the transition condition (%MX0) is ON.1. 2MLR-CPUH _ERR.1 5/09 . output variable OUT_VAL (STRING) = ‘TOD#12:00:00’. function TOD_TO_*** is executed If input variable IN_VAL (TOD) = TOD#12:00:00.Round off the decimal fraction of IN and converts into integer number Availability Flags 2MLI-CPUU. Basic Functions 7. _LER flag is set: 1) if the converted value is greater than maximum value of data type connected to OUT. it is 1. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 253 STRING LWORD WORD LREAL UDINT USINT ULINT INT DT . OUT: the Integer converted value DWORD BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD Variable ANY type variable IN OUT ○ ○ ○ ○ Function Function TRUNC Input type REAL LREAL Output type DINT LINT Description Round off the decimal fraction of input IN and outputs the Integer value as OUT. _ERR Program Example a) R1. 2) if the variable connected to OUT is Unsigned Integer and the converted output value is a negative number. Basic Functions 7.1 5/09 If the transition condition (%MX0) is ON.1. function TRUNC is executed. Flag Flag Description _ERR. List of Basic functions Output ENO: without an error. the output is 0.7. UDINT type conversion Availability Flags 2MLI-CPUU. UDINT_TO_*** .6. 2MLR-CPUH _ERR.7. Basic Functions 7. _LER Input EN: executes the function in case of 1 IN: Unsigned Double Integer value to be converted Output ENO: outputs EN value as it is OUT: type-converted data DWORD TIME DINT UINT SINT LINT ANY type variable TOD ○ INT OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT Variable *ANY: excluding UDINT. DATE and DT from ANY types 254 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. INT_VALUE(INT) = -1.1.6. output variable INT_VALUE (INT) = 1.1 5/09 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL . If REAL_VALUE(REAL) = -1. List of Basic functions b) If input variable REAL_VALUE (REAL) = 1. 1 5/09 TOD MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . If input is 0~32. Takes the lower 8 bits and converts into BYTE type. UDINT_TO_LREAL LREAL During the conversion. Otherwise an error occurs. If input is 0~65. Function UDINT_TO_SINT UDINT_TO_INT UDINT_TO_DINT UDINT_TO_LINT UDINT_TO_USINT UDINT_TO_UINT UDINT_TO_ULINT UDINT_TO_BOOL UDINT_TO_BYTE UDINT_TO_WORD UDINT_TO_DWORD UDINT_TO_LWORD Output type SINT INT DINT LINT USINT UINT ULINT BOOL BYTE WORD DWORD LWORD Description If input is 0~127.535. If input is 0~2.483. normal conversion. Converts into DWORD type without changing the internal bit array.7. Converts UDINT into ULINT type normally. Takes the lower 16 bits and converts into WORD type. Takes the lower 1 bit and converts into BOOL type.647. normal conversion. If input is 0~255.1. Converts UDINT into LINT type normally.147. Otherwise an error occurs. Otherwise an error occurs. Converts UDINT into LREAL type. Otherwise an error occurs. Otherwise an error occurs. normal conversion. an error caused by the precision may occur. Converts into TOD type without changing the 255 UDINT_TO_TOD R1. Converts UDINT into REAL type. Basic Functions 7. List of Basic functions Function a) It converts the IN type and outputs it as OUT. an error caused by the precision may occur. UDINT_TO_REAL REAL During the conversion. normal conversion.767. Converts into LWORD type filling the upper bits with 0. normal conversion. Flag Flag _ERR Description If a conversion error occurs. output variable OUT_VAL (TIME) = T#123MS. Converts UDINT into STRING type.999). UDINT_TO_TIME UDINT_TO_STRING TIME STRING Converts into TIME type without changing the internal bit array. Program Example a) b) If the input condition (%MX0) is ON. _ERR and _LER flags are set. with a value out of TOD range (TOD#23:59:59. _LER flags is set and it is alternately converted within the range of TOD. take the lower bits as many as a bit number of an output data type and produces the output without changing the internal bit array. Basic Functions 7. If an error occurs.1. _ERR. However. function UDINT_TO_*** is executed. If input variable IN_VAL (UDINT) = 123. 256 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7. List of Basic functions Function Output type Description internal bit array.1 5/09 . Basic Functions 7. _LER Input EN: executes the function in case of 1 IN: Unsigned Integer value to be converted Output ENO: outputs EN value as it is OUT: type-converted data DWORD DINT UINT SINT LINT ANY type variable TOD INT OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ DT Variable *ANY: excluding UINT. normal conversion.1 5/09 Output type SINT INT Description If input is 0~127.UINT type conversion Availability Flags 2MLI-CPUU. List of Basic functions UINT_TO_*** .767.7. TOD and DT from ANY types Function It converts the IN type and outputs it as OUT. If input is 0~32.1. 2MLR-CPUH _ERR. TIME. Otherwise an error occurs. Function UINT_TO_SINT UINT_TO_INT R1. 257 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . normal conversion. Takes the lower 8 bits and converts into BYTE type. Converts UINT into STRING type. Converts into LWORD type filling the upper bits with 0. Basic Functions 7. Converts into DATE type without changing the internal bit array. List of Basic functions Function Output type Description Otherwise an error occurs. normal conversion. Converts into DWORD type filling the upper bits with 0. If input is 0~255. Converts into WORD type without changing the internal bit array. Program Example 258 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Converts UINT into REAL type.7. Converts UINT into LREAL type. _ERR and _LER flags are set. Takes the lower 1 bit and converts into BOOL type. Converts UINT into ULINT type normally. If error occurs. UINT_TO_DWORD DWORD UINT_TO_LWORD LWORD UINT_TO_REAL UINT_TO_LREAL UINT_TO_DATE REAL LREAL DATE UINT_TO_STRING STRING Flag Flag _ERR Description If a conversion error occurs. Converts UINT into UDINT type normally.1. UINT_TO_DINT UINT_TO_LINT UINT_TO_USINT UINT_TO_UDINT UINT_TO_ULINT UINT_TO_BOOL UINT_TO_BYTE UINT_TO_WORD DINT LINT USINT UDINT ULINT BOOL BYTE WORD Converts UINT into UDINT type normally. it takes as many lower bits as a bit number of output type and produces an output without changing its internal bit array. Otherwise an error occurs. Converts UINT into ULINT type.1 5/09 . ULINT type conversion Availability Flags 2MLI-CPUU. 2MLR-CPUH _ERR.1. If input variable IN_VAL (UINT) = 255 (2#0000_0000_1111_1111). Basic Functions 7.7. _LER Input EN: executes the function in case of 1 IN: Unsigned Long Integer value to be converted R1. List of Basic functions a) b) If the input condition (%MX0) is ON. ULINT_TO_*** . output variable OUT_VAL (WORD) = 2#0000_0000_1111_1111. function UINT_TO_*** is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 259 . If input is 0~32. Takes the lower 8 bits and converts into BYTE type. normal conversion. Function ULINT_TO_SINT ULINT_TO_INT ULINT_TO_DINT ULINT_TO_LINT ULINT_TO_USINT ULINT_TO_UINT ULINT_TO_UDINT ULINT_TO_BOOL ULINT_TO_BYTE ULINT_TO_WORD 260 Output type SINT INT DINT LINT USINT UINT UDINT BOOL BYTE WORD Description If input is 0~127. If input is 0~231-1. If input is 0~255. Otherwise an error occurs.1. normal conversion. If input is 0~263-1. TIME. R1. Otherwise an error occurs. normal conversion. List of Basic functions Output ENO: outputs EN value as it is OUT: type-converted data DWORD STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE ○ BYTE TIME DINT UINT SINT LINT ANY type variable TOD INT Variable OUT REAL ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding UINT. normal conversion. Takes the lower 16 bits and converts into WORD type. TOD and DT from ANY types Function a) It converts the IN type and outputs it as OUT. Otherwise an error occurs. Otherwise an error occurs. Otherwise an error occurs.7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT . Otherwise an error occurs. If input is 0~232-1. Otherwise an error occurs.535. Basic Functions 7. normal conversion. normal conversion.767. normal conversion. Takes the lower 1 bit and converts into BOOL type. If input is 0~65. Converts ULINT into REAL type. an error caused by the precision may occur.567. ULINT_TO_LREAL LREAL During the conversion. function ULINT_TO_*** is executed. ULINT_TO_DWORD DWORD ULINT_TO_LWORD LWORD ULINT_TO_REAL REAL During the conversion.567. ULINT_TO_STRING STRING Flag Flag _ERR Description If a conversion error occurs. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 261 R1. Basic Functions 7. If error occurs. an error caused by the precision may occur.899. Converts ULINT into STRING type. it takes as many lower bits as a bit number of output type and produces an output without changing its internal bit array Program Example a) b) If the input condition (%MX0) is ON. If input variable IN_VAL (ULINT) = 123. then output variable OUT_VAL (LINT) = 123.7. _ERR and _LER flags are set.1. List of Basic functions Function Output type Description Takes the lower 32 bits and converts into DWORD type.1 5/09 . Converts ULINT into LREAL type. Converts into LWORD type without changing the internal bit array.899. TIME. Basic Functions 7.USINT type conversion Availability Flags 2MLI-CPUU. TOD and DT from ANY types 262 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . DATE.7. _LER Input EN: executes the function in case of 1 IN: Unsigned Short Integer value to be converted Output ENO: outputs EN value as it is OUT: type-converted data DWORD TIME DINT UINT SINT LINT ANY type variable TOD INT Variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding USINT.1. 2MLR-CPUH _ERR. List of Basic functions USINT_TO_*** . Flag Flag _ERR Description If a conversion error occurs. List of Basic functions Function a) It converts the IN type and outputs it as OUT. Otherwise an error occurs. Converts USINT into INT type normally. Converts into BYTE type without changing the internal bit array. Converts into LWORD type filling the upper bits with 0. normal conversion. Converts USINT into ULINT type normally. Converts USINT into DINT type normally. it takes as many lower bits as a bit number of output type and produces an output without changing its internal bit array. R1.7. Converts USINT into UDINT type normally. Function USINT_TO_SINT USINT_TO_INT USINT_TO_DINT USINT_TO_LINT USINT_TO_UINT USINT_TO_UDINT USINT_TO_ULINT USINT_TO_BOOL USINT_TO_BYTE USINT_TO_WORD USINT_TO_DWORD USINT_TO_LWORD USINT_TO_REAL USINT_TO_LREAL USINT_TO_STRING Output type SINT INT DINT LINT UINT UDINT ULINT BOOL BYTE WORD DWORD LWORD REAL LREAL STRING Description If input is 0~127. If error occurs. Basic Functions 7. Converts USINT into LREAL type. Converts USINT into STRING type. Converts USINT into UINT type normally.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 263 . Converts into WORD type filling the upper bits with 0.1. Converts into DWORD type filling the upper bits with 0. Converts USINT into LINT type normally. Takes the lower 1 bit and converts into BOOL type. Converts USINT into REAL type. _ERR and _LER flags are set. function ULINT_TO_*** is executed. List of Basic functions Program Example a) b) If the input condition (%MX0) is ON.1 5/09 . Basic Functions 7. If input variable IN_VAL (USINT) = 123.1.Initialize Watch_Dog timer 2MLI-CPUU. 2MLR-CPUH 264 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7. WDT_RST Availability . output variable OUT_VAL (SINT) = 123. 1. Care must be taken so that either the time from 0 line of program to WDT_RST function T1 or the time from WDT_RST function to the time by the end of program T2 does not exceed the setting value of scan Watch_Dog Timer. Basic Functions 7. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 265 . change the scan time with the setting value of scan Watch_Dog Timer.7. Program Example This is the program that the time to execute the program becomes 300ms according to the transition condition in the program of which scan Watch_Dog timer was set as 200ms. If scan time exceeds the scan Watch_Dog Time. List of Basic functions Input EN: executes the function in case of 1 REQ: required to initialize watchdog timer Output ENO: outputs EN value as it is OUT: After Watch_Dog timer initialization. please. Available to use in case that scan time exceeds Watch-Dog Time set by the condition in the program. output is 1 Function a) b) c) d) It resets Watch-Dog Timer among the programs. b) WDT_RST function is available to use several times during 1 scan. Basic Functions 7.WORD type conversion Availability 2MLI-CPUU. WORD_TO_*** .7.1 5/09 . If WDT-RST function is executed.1. 2MLR-CPUH 266 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Basic functions a) b) If the transition condition (%MX0) is ON. it is available to set the program that extends the scan time to 300ms according to the transition condition of program within the scan Watch_Dog Time (200ms). function WDT-RST is executed. 267 R1. Basic Functions 7.7. Converts into LINT type filling the upper bits with 0.1. List of Basic functions Input EN: executes the function in case of 1 IN: Bit string to be converted (16 bit) Output ENO: outputs EN value as it is OUT: type-converted data DWORD TIME DINT UINT SINT LINT ANY type variable TOD INT Variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding WORD.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING ○ LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . Function WORD _TO_SINT WORD _TO_INT WORD _TO_DINT WORD _TO_LINT WORD _TO_USINT WORD _TO_UINT WORD _TO_UDINT Output type SINT INT DINT LINT USINT UINT UDINT Description Takes the lower 8 bits and converts into SINT type. REAL. Converts into INT type without changing the internal bit array. TOD and DT from ANY types Function a) It converts the IN type and outputs it as OUT. Takes the lower 8 bits and converts into SINT type. TIME. LREAL. Converts into DINT type filling the upper bits with 0. Converts into INT type without changing the internal bit array. Converts into DINT type filling the upper bits with 0. Converts WORD into STRING type.1.369 268 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If input variable IN_VAL (WORD) = 2#0001_0001_0001_0001.7. function WORD-TO-*** is executed.1 5/09 . Converts into LWORD type filling the upper bits with 0. output variable OUT_VAL (INT) = 4. Takes the lower 1 bit and converts into BOOL type. List of Basic functions Function WORD _TO_ULINT WORD _TO_BOOL WORD _TO_BYTE WORD _TO_DWORD Output type ULINT BOOL BYTE DWORD Description Converts into LINT type filling the upper bits with 0. WORD _TO_LWORD LWORD WORD _TO_DATE DATE WORD _TO_STRING STRING Program Example a) b) If the input condition (%MX0) is ON. Converts into DWORD type filling the upper bits with 0.096 + 256 + 16 + 1 = 4. Takes the lower 8 bits and converts into SINT type. Converts into DATE type without changing the internal bit array. Basic Functions 7. 7. Output ENO: outputs EN value as it is OUT: the result of XOR operation IN1. OUT must be the same data type.. Basic Functions 7.1 5/09 1111 . 2MLR-CPUH Input EN: executes the function in case of 1 IN1: the value to be XOR IN2: the value to be XOR Input variable number can be extended up to 8.. DWORD DATE BYTE REAL Variable ANY type variable IN OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) Do XOR operation for IN1 and IN2 per bit and produces OUT. List of Basic functions XOR .1. IN2..Exclusive OR Availability 2MLI-CPUU.. IN1 R1. 0000 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 269 DT . . Basic Functions 7. ABC = 1111_0000.... 1010 0101 .7.Converting ANY Type to BCD type Availability Flags 2MLI-CPUU. If input variable %MB10 = 1100_1100. ***_TO_BCD .0 = 0011_1100.1 5/09 . 2MLR-CPUH _ERR. 1010 a) b) If the transition condition (%MX0) is ON. function XOR is executed. List of Basic functions XOR IN2 OUT Program Example 1010 . _LER 270 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1..0.1.... the result of XOR operation for two inputs is %QB0. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 271 TOD INT Variable TIME DINT UINT ANY type variable DT STRIN G USINT ULINT BOOL DATE BYTE REAL . Basic Functions 7. List of Basic functions Input EN: execute the function in case of 1 IN: enter ANY_BIT with BCD type data Output ENO: outputs EN value as it is OUT: type converted data WORD DWOR D LWOR D SINT LREAL UDINT LINT IN OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL type from ANY_BIT Function a) It converts the IN type and outputs it as OUT R1.7.1. 0 16#9999 are normally converted) 272 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Normally converted as long as it is BCD value. List of Basic functions Function SINT_TO_BCD_BYTE INT_TO_BCD_WORD DINT_TO_BCD_DWORD LINT_TO_BCD_LWORD USINT_TO_BCD_BYTE UINT_TO_BCD_WORD UDINT_TO_BCD_DWORD ULINT_TO_BCD_LWORD Input type SINT INT DINT LINT USINT UINT UDINT ULINT Output type BYTE WORD DWORD LWORD BYTE WORD DWORD LWORD Description Converting ANY type to BCD type. Basic Functions 7. the values.1. (if input data type is WORD.7. If IN_VAL (SINT type) = 16#22(2#0001_0110).7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 273 . output is 0. SINT_TO_BCD function is executed. _ERR and _LER flags are set. BCD_VAL (BYTE type) = 16#22 (2#0010_0010) declared as a function’s output variable is produced. Program Example a) b) If the execution condition (%MX0) is ON. R1. Basic Functions 7.1. List of Basic functions Flag Flag _ERR Description If IN is not the data within BCD range. . _LER Input EN: executes the function in case of 1 IN: ASCII Array input Output ENO: without an error.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 275 . R1. 2MLR-CPUH _ERR.8. Application Functions 8. it is 1 OUT: BCD Array output Function c) It converts a word array input (ASCII data) to a byte array output (BCD data).1 List of Application Functions ARY_ASC_TO_BCD Input : ASCII Array. Output: BCD Array Availability Flags 2MLI-CPUU. Program Example a) b) If the transition condition (%MX0) is ON.8. its responding elements of OUT array are 16#00 (while other elements of IN1 are normally converted). there’s no change in OUT data. and _ERR and _LER flags are set. If the input ASC_ARY data is ASC_ARY[0] ASC_ARY[1] ASC_ARY[2] 3031 3839 3334 276 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. and _ERR and _LER flags are set. _ERR If the number of each input/output array is different.1. the number of array is regarded as ‘0’ and _ERR and _LER flags occur. Application Functions 8.1 5/09 . If the elements of IN array are not between 0 and 9 (hexadecimal). _ERR and _LER flags occur. List of Application Functions Flag Flag Description If the number of each input/output array is different. ARY_ASC_TO_BCD function is executed. if output array variable is omitted. BYTE_ARY[0] BYTE_ARY[1] BYTE_ARY[2] 01 89 34 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 277 . Application Functions 8. List of Application Functions Output BCD_ARY data is as follows.1.8. 2MLR-CPUH _ERR.1 5/09 . _LER Input EN: executes the function in case of 1 IN1: ASCII Array input Output ENO: without an error. it is 1 OUT: BYTE Array output Function a) It converts a word array input (ASCII data) to a byte array output (hexadecimal).1. List of Application Functions ARY_ASC_TO_BYTE Input: ASCII Array. 278 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8. Application Functions 8. Output: BYTE Array Availability Flags 2MLI-CPUU. if output array variable is omitted. _ERR and _LER flags occur. Application Functions 8. the number of array is regarded as ‘0’ and _ERR and _LER flags occur.8. List of Application Functions Flag Flag Description If the number of each input/output array is different. If Input ASC_ARY is as following: ASC_ARY[0] ASC_ARY[1] ASC_ARY[2] 3441 3346 3239 R1. Program Example a) b) If the transition condition is (%MX0) is ON. its responding elements of OUT array are 0 (while other elements of IN1 are normally converted). there’s no change in OUT data. _ERR If the number of each input/output array is different. ARY_ASC_TO_BYTE function is executed.1. and _ERR and _LER flags are set. and _ERR and _LER flags are set. If the elements of IN array are not between 0 and F (hexadecimal).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 279 . 8.1. _LER Input EN: executes the function in case of 1 IN: data array for average INDX: starting point to average in an array LEN: number of array elements for average Output ENO: without an error. Application Functions 8. List of Application Functions Output BYTE_ARY data is as following: BYTE_ARY[0] BYTE_ARY[1] BYTE_ARY[2] 4A 3F 29 ARY_AVE (Finds an average of an array) Availability Flags 2MLI-CPUU. 2MLR-CPUH _ERR. it is 1 OUT: average of an array 280 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . it finds an average between INDX (Array index) and ‘INDX – |LEN|’.1. Its output is rounded off. If LEN is a negative number. Input and output array is the same type. List of Application Functions DWORD TIME DINT UINT SINT LINT TOD 281 INT Variable ANY IN type variable OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) b) c) ARY_AVE function finds an average for a specified length of an array. R1. Function ARY_AVE ARY_AVE ARY_AVE ARY_AVE ARY_AVE ARY_AVE ARY_AVE ARY_AVE ARY_AVE ARY_AVE Output type SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL Description Finds an average for SINT value (decimal is rounded off) Finds an average for INT value (decimal is rounded off) Finds an average for DINT value (decimal is rounded off) Finds an average for LINT value (decimal is rounded off) Finds an average for USINT value (decimal is rounded off) Finds an average for UINT value (decimal is rounded off) Finds an average for UDINT value (decimal is rounded off) Finds an average for ULINT value (decimal is rounded off) Finds an average for REAL value. Finds an average for LREAL value. Application Functions 8.8. List of Application Functions Flag Flag Description If it is configured beyond the array range. _ERR and _LER flags are set. number of IN INDX + LEN > max. _ERR ※ An error occurs when INDX < 0 or INDX > max.8. number of IN Program Example 282 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If an error occurs.1. Application Functions 8.1 5/09 . the output is 0. 1. 2MLR-CPUH _ERR. R1. it calculates the average value of 6 from the 3rd of Array Index. it rounds off and outputs 16.1. Application Functions 8. _LER Input EN: executes the function in case of 1 IN: BCD array input Output ENO: without an error. ARY_BCD_TO_ASC Input: BCD Array.6) is ON.045.8 but its output type is INT. ARY_AVE_INT function is executed If the value within ARRAY is as same as the above-presented picture. Output: ASCII Array Availability Flags 2MLI-CPUU. List of Application Functions a) b) c) If input transition condition (%IX1. it is 1 OUT: ASCII array output Function a) It converts a byte array input (BCD) to a word array (ASCII).044.8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 283 . Since the mean value is 16. _ERR and _LER flags occur. if output array variable is omitted. and _ERR and _LER flags are set. the number of array is regarded as ‘0’ and _ERR and _LER flags occur. If the input BCD_ARY is as follows 284 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _ERR If the number of each input/output array is different.1 5/09 . there's no change in OUT data. Application Functions 8. and _ERR and _LER flags are set. its responding elements of OUT array are 0 (while other elements of IN1 are normally converted). List of Application Functions Flag Flag Description If the number of each input/output array is different.8. If the elements of IN array are not between 0 and 9 (hexadecimal). Program Example a) b) If the transition condition (%MX0) is ON.1. ARY_BCD_TO_ASC function is executed. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 285 . Output: ASCII Array Availability Flags 2MLI-CPUU.1. _LER Input EN: executes the function in case of 1 IN: BYTE array input Output ENO: without an error. it is 1 OUT: ASCII Array output R1.8. ASC_ARY[0] ASC_ARY[1] ASC_ARY[2] 3031 3839 3435 ARY_BYTE_TO_ASC Input: BYTE Array. List of Application Functions BYTE_ARY[0] BYTE_ARY[1] BYTE_ARY[2] 01 89 45 Output ASC_ARY is as follows. 2MLR-CPUH _ERR. Application Functions 8. If the number of each input/output array is different.1. Program Example a) b) If the transition condition (%MX0) is ON. ARY_BYTE_TO_ASC function is executed. Flag Flag _ERR Description If the number of each input/output array is different. if output array variable is omitted. Application Functions 8.1 5/09 . the number of array is regarded as ‘0’ and _ERR and _LER flags occur.8. List of Application Functions Function a) It converts a byte array input (HEX) to a word array (ASCII). If the input BYTE_ARY is as 286 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. there's no change in OUT data. and _ERR and _LER flags are set. _ERR and _LER flags occur. 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 287 . ASC_ARY[0] ASC_ARY[1] ASC_ARY[2] 3441 3346 3239 ARY_CMP (Array comparison) Availability Flags 2MLI-CPUU.8. List of Application Functions BYTE_ARY[0] BYTE_ARY[1] BYTE_ARY[2] 4A 3F 29 The output ASC_ARY is as follows. Application Functions 8. 2MLR-CPUH _ERR. _LER Input EN: executes the function in case of 1 IN1: first array to compare IN1_INDX : starting point in 1st array for comparison IN2: second array to compare R1. Compares two DWORD Arrays. Compares two BYTE Arrays. Application Functions 8. it compares two arrays between IN*_INDX (Array INDX) and “Array INDX – |LEN|. Compares two INT Arrays. List of Application Functions IN2_INDX : starting point in 2nd array for comparison LEN: number of elements to compare Output ENO: without an error.” Input array type BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT UINT Description Compares two BOOL Arrays. Compares two LINT Arrays.1. Compares two DINT Arrays. Compares two UINT Arrays. If LEN is a negative number.8.1 5/09 Function ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP 288 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary DT ○ ○ . it is 1 DWORD TIME DINT UINT SINT LINT TOD ○ ○ Variable ANY type variable IN1 IN2 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE ○ ○ BYTE REAL INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ARRAY OF ANY: excluding STRING from ANY types Function a) b) It compares two arrays whether they have the same value. Compares two LWORD Arrays. Compares two USINT Arrays. R1. Compares two SINT Arrays. Compares two WORD Arrays. it is 1 OUT: if two arrays are equal. Compares two REAL Arrays. number of IN1 IN2_INDX + LEN ≥ max. Compares two TIME Arrays.1. number of IN2 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 289 . Flag Flag Description If it is configured beyond the array range. Compares two DT Arrays. _ERR and _LER flags are set. Application Functions 8. Compares two DATE Arrays. number of IN1 _ERR IN2_INDX < 0 or IN2_INDX > max. Compares two LREAL Arrays. Compares two TOD Arrays.8. Compares two ULINT Arrays. number of IN2 IN1_INDX + LEN ≥ max. • An error occurs when: IN1_INDX < 0 or IN1_INDX > max. List of Application Functions Function ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP ARY_CMP Input array type UDINT ULINT REAL LREAL TIME DATE TOD DT Description Compares two UDINT Arrays. the output %Q1.8. if the elements from 11th to 20th of IN_ARY1 and the elements of IN_ARY 2 are equal.1 5/09 . ARY_CMP function is executed. When IN_ARY1 is a time array with 100 elements and IN_ARY2 is a time array with 10 elements. _LER 290 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3.2 is ON. List of Application Functions Program Example a) b) If the input transition condition (%MX0) is ON. Application Functions 8.1. ARY_FLL (Filling an array with data) Availability Flags 2MLI-CPUU. 2MLR-CPUH _ERR. ” R1. List of Application Functions Input EN: executes the function in case of 1 DATA: the data to fill an array INDX: starting point of an array to be filled LEN: number of array elements to be filled Output ENO: without an error. it is 1 OUT: without an error.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 291 DT . If LEN is minus.1. it is 1 In/Out SRC: an array to be filled DWORD DINT UINT SINT LINT TOD Variable ANY type variable DATA SRC STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ARRAY OF ANY: excluding STRING from ANY types Function a) b) It fills an array with the input data. it fills an array from INDX to “INDX – |LEN|. Application Functions 8.8. Fills an INT Array with the input data. Fills a TOD Array with the input data. Fills a LREAL Array with the input data. Fills a USINT Array with the input data. Application Functions 8. Fills a LWORD Array with the input data. _ERR If an error occurs. Flag Flag Description If it is configured beyond the array range. Fills a LINT Array with the input data.1. _ERR and _LER flags are set. List of Application Functions Function ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL ARY_FLL In/out array type BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL TIME DATE TOD DT Description Fills a BOOL Array with the input data. Fills a BYTE Array with the input data. Fills a TIME Array with the input data.1 5/09 . Fills a DINT Array with the input data. An error occurs when: 292 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Fills a WORD Array with the input data. Fills a DWORD Array with the input data. Fills a ULINT Array with the input data. there’s no change in arrays and OUT is OFF. Fills a REAL Array with the input data. Fills a UINT Array with the input data. Fills a UDINT Array with the input data. Fills a DT Array with the input data. Fills a SINT Array with the input data. Fills a DATE Array with the input data.8. ARY_FLL function is executed. Application Functions 8. element number of IN INDX + LEN ≥ max. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 293 . It fills 4 elements of IN_ARY starting from INDX with 34. List of Application Functions Flag Description INDX < 0 or INDX > max. element number of IN Program Example a) b) R1.8.1.1 5/09 If input condition (%MX0) is ON. 2MLR-CPUH _ERR. unavailable) IN_INDX: starting pointer of array to move OUT_INDX: starting pointer of array to be moved Output ENO: without an error.8.15) is ON.13. unavailable) 294 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Functions c) If LEN is 9.1. it is beyond the array range and an error occurs. _LER Input EN : executes the function in case of 1 MOVE_NUM: array number to move IN: array variable to move (STRING type. Application Functions 8. _ERR and _LER flags are on and the output (%QX1.1 5/09 . ARY_MOVE (Array move) Availability Flags 2MLI-CPUU. it is 1 OUT: array variable to be moved (STRING type. _ERR and _LER flags occur. it moves IN data to OUT. It copies MOVE_NUM elements of IN (from IN_INDX) and pastes it in OUT (from OUT_INDX). Data size 1 Bit 8 Bit 16 Bit 32 Bit 64 Bit BOOL BYTE/ SINT/ USINT WORD / INT / UINT / DATE DWORD / DINT / UDINT / TIME / TOD DT Variable type Flag Flag Description An error occurs when IN and OUT array data sizes are different. Then ARY_MOVE function is not executed. List of Application Functions DWORD TIME DINT UINT SINT LINT TOD INT Variable ANY type variables IN OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ARRAY OF ANY: excluding STRING from ANY types Function a) b) c) d) If EN is 1. R1. _ERR If the number of each input/output array is different. IN and OUT are the same data type (the number of each array can be different). An error occurs when 1) the array number of IN Array < (IN_INDX + MOVE_NUM) and 2) the array number of OUT Array < (OUT_INDX + MOVE_NUM).8. the number of array is regarded as ‘0’ and _ERR and _LER flags occur. The data size is as follows. Application Functions 8. if output array variable is omitted.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 295 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT .1. and OUT is 0. EN0 is OFF and _ERR and _LER flags are set. ARY_MOVE function is executed. Now the data type of ARY_DES is WORD. List of Application Functions Program Example Variable name ARY_SRC ARY_DES Variable type INT WORD Array number 10 15 a) b) If the transition condition (A) is ON. It moves 5 elements from ARY_SRC[5] to ARY_DES[10].1. Application Functions 8. it’s a hexadecimal.1 5/09 .8. Before ARY_SRC[0] ARY_SRC[1] ARY_SRC[2] ARY_SRC[3] 0 11 22 33 ARY_DES[0] ARY_DES[1] ARY_DES[2] ARY_DES[3] 16#0 16#1 16#2 16#3 ARY_SRC[0] ARY_SRC[1] ARY_SRC[2] ARY_SRC[3] 0 11 22 33 After ARY_DES[0] ARY_DES[1] ARY_DES[2] ARY_DES[3] 16#0 16#1 16#2 16#3 296 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2MLR-CPUH _ERR.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 297 .8. List of Application Functions Before ARY_SRC[4] ARY_SRC[5] ARY_SRC[6] ARY_SRC[7] ARY_SRC[8] ARY_SRC[9] 44 55 66 77 88 99 ARY_DES[4] ARY_DES[5] ARY_DES[6] ARY_DES[7] ARY_DES[8] ARY_DES[9] ARY_DES[1 0] ARY_DES[1 1] ARY_DES[1 2] ARY_DES[1 3] ARY_DES[1 4] 16#4 16#5 16#6 16#7 16#8 16#9 16#A 16#B 16#C 16#D 16#E ARY_SRC[4] ARY_SRC[5] ARY_SRC[6] ARY_SRC[7] ARY_SRC[8] ARY_SRC[9] 44 55 66 77 88 99 - After ARY_DES[4] ARY_DES[5] ARY_DES[6] ARY_DES[7] ARY_DES[8] ARY_DES[9] ARY_DES[1 0] ARY_DES[1 1] ARY_DES[1 2] ARY_DES[1 3] ARY_DES[1 4] 16#4 16#5 16#6 16#7 16#8 16#9 16#3 7 16#4 2 16#4 D 16#5 8 16#6 3 ARY_ROT_C (Array Bit ROTATE with Carry) Availability Flags 2MLI-CPUU. _LER R1. Application Functions 8.1. 8. 298 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. Output: the result is stored in configured array in SRC and a bit array data from END to STRT is written at CYO.1 5/09 DT . it is 1 CYO: Output Carry bit Array after rotate Input/Output SRC: Source Array to rotate DWORD DINT UINT SINT LINT ANY type variable TOD Variable SRC STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ *ARRAY OF ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) It rotates as many bits of array elements as they’re specified. Application Functions 8. Setting - Scope: it sets a rotation scope with STRT and END. List of Application Functions Input EN: executes the function in case of 1 STRT: starting bit to rotate END: ending bit to rotate N: number to rotate Output ENO: without an error. Rotation direction and time: it rotates N times from STRT to END. 8. _ERR and _LER flags are set.1. Flag Flag Description If the number of SRC and CYO Arrays are different. R1. _ERR If STRT and END are out of bit range of SRC. an error occurs. When an error occurs.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 299 . List of Application Functions Function ARY_ROT_C ARY_ROT_C ARY_ROT_C ARY_ROT_C In/Out Array Type BYTE WORD DWORD LWORD Description It rotates elements of an array as many bits as they’re specified. Application Functions 8. there’s no change in SRC and CYO. List of Application Functions *If the number of each input/output array is different.1 5/09 . the number of array is regarded as ‘0’ and _ERR and _LER flags occur.8. The result is stored at IN_ARY and the carry bit arrays are written in CYO Array. Program Example a) b) c) If the input condition (%MX2) is ON. _ERR and _LER flags occur.1. Application Functions 8. if output array variable is omitted. ARY_ROT_C function is executed. 300 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. It rotates 2 times the bit (from 3 to 13 bit) arrays of IN_ARY from STRT to END. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 301 . Application Functions 8.8. List of Application Functions ARY_SCH (Array search) 2MLI-CPUU.1. 2MLR-CPUH Availability Input EN: executes the function in case of 1 DATA: data to search IN: array to search R1. Search in LINT Array. Search in INT Array. OUT is 1. Search in DWORD Array. Search in LWORD Array.1. Search in SINT Array. Application Functions 8.8.1 5/09 DT ○ ○ Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT . Search in WORD Array. R1. it is 1 P: first position of an object array N: total number of array elements equal to an object DWORD SINT LINT TOD ○ ○ INT ANY type variable DATA IN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ARRAY OF ANY: excluding STRING from ANY types Function a) It finds an equal value of input in arrays and produces its first position and total number. When it finds at least one which is equal to an object in arrays. Search in DINT Array. Search in BYTE Array. Search in USINT Array. Function ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH 302 Input Array type BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Description Search in BOOL Array. List of Application Functions Output ENO: outputs EN value as it is OUT: if it finds. Search in LREAL Array. Search in TIME Array.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 303 . Search in REAL Array. Search in DT Array. Search in DATE Array.1. Search in UDINT Array. List of Application Functions Function ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH ARY_SCH Input Array type UINT UDINT ULINT REAL LREAL TIME DATE TOD DT Description Search in UINT Array. Search in ULINT Array.8. Program Example R1. Search in TOD Array. Application Functions 8. ARY_SCH function is executed.1 5/09 . it is 1 304 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2MLR-CPUH _ERR. Application Functions 8. so the output %Q1.0 is ON. When IN_ARY is a 10-byte array. The result is: 1) 1. the first position of an array. ARY_SFT_C (Array of Bit Shift Left with Carry) Availability Flags 2MLI-CPUU. 2) 3. is stored at NUM. The total number is 3. List of Application Functions a) b) c) If the input condition (%MX1) is ON. three bytes are found as the above. _LER Input EN: executes the function in case of 1 CYI: Input Carry bit Array STRT: starting bit to shift END: ending bit to shift N: bit number to shift Output ENO: without an error.8. the total number.1. is stored at POS. if you search for “22h” in this array.3. 1. Setting Scope: it sets a shifting scope with STRT and END. R1. Application Functions 8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 305 DT . List of Application Functions CYO: Output Carry bit Array after shift In/Out SRC: Source Array to shift DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE TIME DINT UINT SINT LINT ANY type variable TOD INT Variable SRC REAL ○ ○ ○ ○ *ARRAY OF ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) It shifts as many bits of array elements as they’re specified. Shifting direction and time: it shifts N times from STRT to END. Input data: it fills the empty bits with input data (CYI). Output: the result is stored in ANY_BIT_ARY and an overflowing bit array data from END is written at CYO.8. _ERR An error occurs if STRT and END are out of SRC range. the number of array is regarded as ‘0’ and _ERR and _LER flags occur. _ERR and _LER flags occur. if output array variable is omitted. SRC and CYO Array are different.1.8. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _ERR and _LER flags are set. When an error occurs. *If the number of each input/output array is different. there’s no change in SRC and CYO. ARY_SFT_C function is executed.1 5/09 . Flag Flag Description If the number of CYI. Program Example a) 306 If input condition (%MX2) is ON. List of Application Functions Function ARY_SFT_C ARY_SFT_C ARY_SFT_C ARY_SFT_C In/Out array type BYTE WORD DWORD LWORD Description It shifts as many bits of array elements as they’re specified. Application Functions 8. 8. 2MLR-CPUH _ERR. ARY_SWAP (Upper/Lower elements swapping of an array) Availability Flags 2MLI-CPUU.1. Application Functions 8. _LER R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 307 . It produces its shifting result at SRC_ARY and a carry bit array is written at CYO. List of Application Functions b) c) d) It shifts a bit array (from 4 to 13 bit) of SRC 3 times from STRT to END. The bit array after shifting is filled with CYI (2#0011). 1 5/09 DT . the number of array is regarded as ‘0’ and _ERR and _LER flags occur. it is 1 OUT: array output after swapping DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD INT Variable ANY type variable IN OUT DATE BYTE REAL ○ ○ ○ ○ ○ ○ ○ ○ *ARRAY OF ANY_BIT: excluding BOOL from ANY_BIT types Function a) Flag Flag _ERR Description _ERR and _LER flags are set if two arrays are different. if output array variable is omitted. there’s no change in an OUT array.1. If the number of each input/output array is different. Application Functions 8.8. 308 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. It swaps upper/lower elements after dividing an array. List of Application Functions Input EN: executes the function in case of 1 IN1: array input Output ENO: without an error. _ERR and _LER flags occur. List of Application Functions Program Example a) b) If the transition condition (%MX0) is ON.1. Application Functions 8. If IN_ARY data is as follows IN_ARY[0] IN_ARY[1] IN_ARY[2] 12AB 23BC 34CD OUT_ARY data is as follows. ARY_SWAP function with WORD type is executed. _LER R1. OUT_ARY[0] OUT_ARY[1] OUT_ARY[2] AB12 BC23 CD34 ASC_TO_BCD (Converts ASCII to BCD) Availability Flags 2MLI-CPUU.8. 2MLR-CPUH _ERR.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 309 . the output is 0 and _ERR and _LER flags are set. Application Functions 8.1 5/09 . IN: ASCII input Output ENO: without an error. it is 1 OUT: BCD output Function a) Flag Flag Description If IN is not a hexadecimal number between 0 ~ 9.1. _ERR Program Example 310 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8. List of Application Functions Input EN: executes the function in case of 1. It converts two ASCII data into two-digit BCD (Binary Coded Decimal) data. List of Application Functions a) b) If the transition condition (%MX0) is ON. R1.8. IN: ASCII input Output ENO: without an error. It converts two ASCII data to 2-digit hexadecimal (HEX).1. ASC_TO_BCD function is executed. 2MLR-CPUH _ERR. If input variable ASCII_VAL (WORD) = 16#3732 = “72”. Application Functions 8. its output is 0 and _ERR and _LER flags are set. output variable BCD_VAL (BYTE) = 16#72.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 311 . it is 1 OUT: BYTE Output Function a) Flag Flag _ERR Description If IN is not between ‘0’ and ‘F’. _LER Input EN: executes the function in case of 1. ASC_TO_BYTE (Converts ASCII to BYTE data) Availability Flags 2MLI-CPUU. 1 5/09 . _LER Input EN: executes the function in case of 1. it is 1 OUT: ASCII Output 312 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. IN: BCD input Output ENO: without an error. Application Functions 8. ASC_TO_BYTE function is executed. If input ASCII_VAL (WORD) = 16#4339. List of Application Functions Program Example a) b) If the transition condition (%MX0) is ON. output BYTE_VAL (BYTE) = 16#C9.1. BCD_TO_ASC (Converts BCD to ASCII data) Availability Flags 2MLI-CPUU.8. 2MLR-CPUH _ERR. It converts 2-digit BCD data to two ASCII data. If input BCD_VAL (BYTE) = 16#85.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 313 . BCD_TO_ASC function is executed.1.8. Application Functions 8. Program Example a) b) If the transition condition (%MX0) is ON. List of Application Functions Function a) Flag Flag _ERR Description If IN is not a hexadecimal number between 0 and 9. 2MLR-CPUH R1. its output is 16#3030 (“00”) and _ERR/_LER flags are set. output ASCII_VAL (WORD) = 16#3835 = “85.” BIT_BYTE (Combines 8 bits into BYTE) Availability 2MLI-CPUU. IN8: MSB (Most Significant Bit). Application Functions 8.1 5/09 . IN1 ~ IN8: Bit input Output ENO: without an error. it is 1 OUT: Byte output Function a) It combines 8 bits into one byte. List of Application Functions Input EN: executes the function in case of 1.1.8. IN1: LSB (Least Significant Bit). 314 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1.1. If 8 input are (from INPUT1 to INPUT 8) {0.8.0. _LER R1. BIT_BYTE function is executed.1. BMOV (Moves part of a bit string) Availability Flags 2MLI-CPUU.1.0}. Application Functions 8. List of Application Functions Program Example a) b) If the transition condition (%MX3) is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 315 . 2MLR-CPUH _ERR. OUTPUT (BYTE) = 2#0110_1100.1.0. 1 5/09 DT .1. Application Functions 8. IN1: String data having bit data to be combined IN2: String data having bit data to be combined IN1_P: Start bit position on IN1 set data IN2_P: Start bit position on IN2 set data N: Bit number to be combined Output ENO: without an error. it is 1 OUT: Combined bit string data output DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD INT Variable IN1 IN2 OUT DATE BYTE REAL ANY type variable ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types 316 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Functions Input EN: executes the function in case of 1.8. 8. IN2_P = 8. it takes N bits of IN1 starting from the IN1_P bit and moves it to IN2 starting from IN2_P bit. Flag Flag _ERR Description If IN1_P and IN2_P exceed the data range or N is negative or N bit of IN1_P and IN2_P exceeds the data range. IN2 = 0000_1010_1010_1111. Input data types are B (BYTE).1. IN1_P = 4. then output data is 0000_1111_1010_1111. W (WORD). N = 4. Program Example a) R1. Application Functions 8. If N1 = 1111_0000_1111_0000.1 5/09 If the transition condition (%MX0) is ON. List of Application Functions Function a) b) If EN is 1. L (LWORD). MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 317 . _ERR and _LER flags are set. BMOV function is executed. D (DWORD). IN2_P = 8.1. DESTINE = 2#0000_0000_0000_0000 as declared as input variable and IN1_ P = 0.8.1 5/09 . List of Application Functions b) Since SOURCE = 2#0101_1111_0000_1010. the operations yields 2#0000_1010_0000_0000. N = 4. and it is changed to DESTINE = 2#0000_1010_0000_0000 because output is configured as DESTINE. Application Functions 8. 318 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Application Functions 8.8. 2MLR-CPUH Input EN: executes the function in case of 1. Function BSUM BSUM R1. IN type BYTE WORD Description You can select one of these functions according to input data. DWORD and LWORD. WORD. Input data types are BYTE. N: input data to detect ON bit Output ENO: outputs EN value as it is OUT: Result data (sum of on-bit number) DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT ANY type variable TOD INT IN ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) If EN is 1. it counts bit number of 1 among IN bit string and produces output OUT. List of Application Functions BSUM (Counts on-bit number of input) Availability 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 319 DT Variable .1. then it counts onbit number. 2MLR-CPUH 320 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . 3. BSUM function is executed. BYTE_BIT (Divides byte into 8 bits) Availability 2MLI-CPUU.1. List of Application Functions Function BSUM BSUM IN type DWORD LWORD Description Program Example a) b) If the transition condition (%MX0) is ON. If input SWITCHS (WORD) = 2#0000_0100_0010_1000. Application Functions 8.8. So the output ON_COUNT (INT) = 3. Application Functions 8. IN: BYTE input Output ENO: outputs EN value as it is QO1~8: bit output Function a) b) It divides one byte into 8 bits (QO1~QO2).8. QO1: LSB (Least Significant Bit) R1.1. List of Application Functions Input EN: executes the function in case of 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 321 . QO8: MSB (Most Significant Bit). 1. 0. BYTE_BIT function is executed. it distributes INPUT from Q01 to Q08 in order. 1}. 1. 322 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. The order is 2#{0. 0.1 5/09 . List of Application Functions Program Example a) b) If the execution condition (%MX0) is ON. 0.1. Application Functions 8.8. 1. If INPUT = 16#AC = 2#1010_1100. 2MLR-CPUH Input EN: executes the function in case of 1. Ex) 16#12 -> 3132 b) In case of 16#A~F. List of Application Functions BYTE_TO_ASC (Converts BYTE to ASCII data) Availability 2MLI-CPUU. Application Functions 8. it produces ASCII data for character.1. IN: BYTE input Output ENO: outputs EN value as it is OUT: ASCII output Function a) It converts 2-digit hexadecimal into two ASCII data. Program Example R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 323 .8. 8. 2MLR-CPUH Input EN: executes the function in case of 1. Application Functions 8. List of Application Functions a) b) If the transition condition (%MX0) is ON.1 5/09 . LOW: lower BYTE input HIGH: upper BYTE input Output ENO: outputs EN value as it is OUT: WORD output Function a) It combines two bytes into one word. BYTE_WORD (Combines 2 bytes into WORD) Availability 2MLI-CPUU. HIGH: upper BYTE input 324 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. If input BYTE_VAL (BYTE) = 16#3A. ‘A’. LOW: lower BYTE input. output ASCII_VAL (WORD) = 16#3341 = ‘3’. BYTE_TO_ASC function is executed. List of Application Functions Program Example a) b) If the transition condition (%MX3) is ON.1.8. BYTE_STRING (Converting Byte Array to String) Availability 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 325 . If input BYTE_IN1 = 16#56 and BYTE_IN2 = 16#AD. Application Functions 8. output variable OUTPUT = 16#AD56. 2MLR-CPUH Input EN : executes the function in case of 1 IN : input Byte Array Output ENO : outputs EN value as it is OUT : outputs converted string R1. BYTE_WORD function is executed. Application Functions 8. If setting INPUT array variable as 3 and if entering INPUT[0] = 16#41.1 5/09 . DEC (Decrease IN data by 1 bit) Availability 2MLI-CPUU. 2MLR-CPUH Input EN: executes the function in case of 1. BYTE_STRING function is executed. Output RESULT = ‘A15’.8. IN: input data to decrease 326 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Functions Function a) Converts Byte Array to a string. Program Example a) b) If the execution condition(%MX2) is ON. INPUT[1] = 16#31. INPUT[2] = 16#35.1. List of Application Functions Output ENO: outputs EN value as it is OUT: result data DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL TIME DINT UINT SINT LINT TOD INT Variable ANY type variable IN OUT DATE BYTE REAL ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) c) If EN is 1. IN/OUT type BYTE WORD DWORD LWORD You can select one of these functions according to in/out data type. DWORD and LWORD.1. Even though the underflow occurs.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 327 DT .8. Application Functions 8. then the output result data is 16#FFFF. Description FUNCTION DEC DEC DEC DEC Program Example R1. it produces an output after decreasing bit-string data of IN by 1. WORD. an error won’t occur and if the result is 16#0000. Input data types are BYTE. 8. output variable %MW20 = 16#0006 (2#0000_0000_0000_0110).1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL . DECO (Decodes the configured bit position) Availability Flags 2MLI-CPUU. IN: input data for Decoding Output ENO: without an error. it is 1 OUT: Decoding result data DWORD TIME DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types 328 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If input variable %MW100 = 16#0007 (2#0000_0000_0000_0111). DEC function is executed. List of Application Functions a) b) If the transition condition (%MX0) is ON.1. _LER Input EN: executes the function in case of 1. Application Functions 8. 2MLR-CPUH _ERR. FUNCTION DECO DECO DECO DECO BYTE WORD DWORD LWORD You can select one of these functions according to output data type. WORD. Output data types are BYTE.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 329 . it turns on ‘the configured position bit of output bit-string data’ according to the value of IN. OUT type Description Flag Flag _ERR Description If input data is a negative number or bit position data is out of output-type range. Since the only 5th bit of output is ON if ON_POSITON(INT) = 5 as declared as input variable. DWORD and LWORD. Program Example a) b) If the transition condition (%MX0) is ON. (in case of DECO_WORD. DECO function is executed. then OUT is 0 and _ERR/_LER flags are set.8. it is RELAYS(WORD type) = 2#0000_0000_0010_0000. List of Application Functions Function a) b) If EN is 1. it’s more than 16). R1. and produces an output.1. Application Functions 8. 1 5/09 DT . List of Application Functions DEG (Converts radian into degree) Availability 2MLI-CPUU. Application Functions 8.1. 2MLR-CPUH Input EN: executes the function in case of 1.8. Input type REAL LREAL Output type REAL LREAL It Description converts input Function DEG DEG (radian) into output (degree). IN: radian input Output ENO: outputs EN value as it is OUT: degree output DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT Variable ANY type variable IN OUT ○ ○ ○ ○ Function a) It converts radian input into degree output. 330 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. DI CPU DI Application Invalidates task program (Not to permit task program starting) ● ● 2MLI-CPUU 2MLR-CPUH Input EN: executes the function in case of 1 REQ: required to invalidate task program starting R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 331 . If input variable RAD_VAL = 1.7295779513078550e+001. Application Functions 8. List of Application Functions Program Example a) b) If the transition condition (%M0) is ON.0. then output variable DEG_VAL = 5.1.8. DEG function is executed. interrupt). miss the continuity of operation process due to the execution of other task program). If you want to partially stop the task program for the troubled part. interrupt: the task occurred when it is not permitted to execute is executed after 'EI' function or the current-running task program execution. Application Functions 8.1. it stops a task program (single. it is 1 Function a) b) c) d) If EN = 1 and REQ = 1. Once DI function is executed. List of Application Functions Output ENO: outputs EN value as it is OUT: if DI is executed. please use ‘EI’ function. The task programs created while its execution is not invalidated is executed according to task program types as follows. it repeats a task program as many as the state of single variable changes. if it occurs more than 2 times.1 5/09 . e) - Program Example This is the program that controls the task program increasing the value per second by using DI (Invalidates task program) and EI (permits running for task program). it is available to use this function. Interval task. Single task: it is executed after 'EI' function or current-running task program execution. TASK_ERR is ON and TC_CNT (the number of task collision) is counted. a) Scan program (TASK program control) 332 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8. interval. In this case. a task program does not start even if REQ input is 0. In order to start a task program normally. (otherwise. But. 1. List of Application Functions d) Scan program (TASK program control) e) f) g) h) If REQ (assigned as direct variable %IX0. EI function is executed and output EI_OK is 1.1.1. DI function is executed and output DI_OK is 1. If DI function is executed.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 333 . If EI function is executed.14) of DI is ON. Application Functions 8. the task program to be executed per second stops. If REQ (assigned as direct variable %IX0.15) of EI is ON.8. R1. the task program stopped due to function DI restarts. 1.8.1 5/09 b) c) 334 . DIREC_IN function reads 64-bit data of an input module from the configured position of a BASE and a SLOT. At this time. OUT: if update is completed. 2MLR-CPUH Input EN: executes the function in case of 1 BASE: base number of an input module installed SLOT: slot number of an input module installed MASK_L: designates bits not to be updated among lower 32-bit data of input MASK_H: designates bits not to be updated among upper 32-bit data of input Output ENO: without an error. and updates them. only the actual contacts of an input module is updated in the image scope. Application Functions 8. DIREC_IN function is available to use when you want to change the ON/OFF state of input (%I) during the scan. it is 1. output is 1. List of Application Functions DIREC_IN (Update input data immediately) Availability 2MLI-CPUU. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function a) If EN is 1 during the scan. List of Application Functions d) Generally. 3) It doesn't matter what data are set in MASK_H (upper 32-bit input) because a 16-contact module is installed on the slot and base.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 335 .0 is updated with 2#1010_1010_1110_1011 during the scan because a lower 16-bit data of MASK_L (lower 32-bit input) which is not going to be changed is updatable. it's impossible to update input data during 1 scan (executing a scan program) because a scan-synchronized batch processing mode executes the batch processing to read input data and produce output data after a scan program. e) Program Example a) 1. R1.0 because a 16-contact module is installed.3 of the 3rd extension base of which input data are 2# 1010_1010_1110_1011. function DIREC_IN function is executed. 2) The image scope to update is %IW3. %IW3. Application Functions 8.1. It's available to update related input data.3. This is the program that updates a 16-contact module installed in the slot no.8.3. 1) If the input condition (%MX0) is ON. if you use DIREC_IN function during program execution. 3 of the 3rd extension base of which input data are 16#0000_FFFF_AAAA_7777 (2#0000_0000_0000_0000_1111_1111_1111_1111_1010 _1010_1010_1010_0111_0111_0111_0111). The image scope to update is %ID3.1 5/09 . 2. 336 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.0 is updated with 2#0000_0000_1111_1111_1100_1100_0011_0011 during the scan because a lower 32-bit data of MASK_L (lower 32-bit input) which is not going to be changed is updatable.3.3. Application Functions 8. If input condition (%MX0) is ON. %ID3.3 of the 3rd extension base of which input data are 2#0000_0000_1111_1111_1100_1100_0011_0011. List of Application Functions b) This is the program that updates the lower 32-bit data of the 32-contact module installed in the slot no.1.8. function DIREC_IN is executed. c) This is the program that updates the lower 48-bit data of the 64-contact module installed in the slot no. 1.0 because a 32-contact module is installed. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 337 .3. 3) %ID3.1 is updated because only the lower 16-bit data update among upper 32 bits (MASK_H) is allowed.3. the data update of the image scope is as follows. output REF_OK is 1.8. Application Functions 8.1).0 (%ID3. 2) The installed module is a 64-contact module and the image scope to update is %IL3.1.3. List of Application Functions 1) If the input condition (%MX0) is ON. 6) If the input update is completed. 4) %IW3.3.0 is updated because the lower 32-bit data (MASK_L) update is allowed. 5) Accordingly.3. R1. function DIREC_IN function is executed.2 of %ID3.3.0 and ID3. it's impossible to update input data during 1 scan (executing a scan program) because a scan-synchronized batch processing mode executes the MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8. DIREC_O function reads 64-bit data of an output module from the configured position of BASE and SLOT and updates the unmasked (MASK (1)) data. it is 1. Function a) If EN is 1 during the scan. OUT: if update is completed. 2MLR-CPUH Input EN: executes the function in case of 1 BASE: base number of an input module installed SLOT: slot number of an input module installed MASK_L: designates bits not to be updated among lower 32-bit data of output MASK_H: designates a bit not to update among upper 32-bit data of output Output ENO: without an error.1. Generally. DIREC_O is available to use when you want to change the ON/OFF state of output (%Q) during the scan. Application Functions 8. List of Application Functions DIREC_O (Update output module data immediately) Availability 2MLI-CPUU.1 5/09 b) c) 338 . output is 1. - Input the base number 2 and slot number 4 in which an output module is installed. d) e) It's available to update related output data. ENO and OUT are '0' (without an error. Application Functions 8. Set MASK_L as 16#FFFF0000 because the output data to produce are the lower 16 bits among the output contacts. If the transition condition (%IX0. DIREC_O is executed and the data of the output module is updated as 2#0111_0111_0111_0111 during the scan. If the base/slot number is wrong or it is not available to write data normally in an output module.0) is ON. it is 1).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 339 . List of Application Functions batch processing to read input data and produce output data after a scan program.1.4 of the 2nd extension base. Program Example a) This is the program that produces output data 2#0111_0111_0111_0111 in a 32-contact relay output module installed in the slot no. R1. if you use DIREC_O function during program execution.0.8. 4 of the 2nd extension base. 2MLR-CPUH _ERR. List of Application Functions b) This is the program that updates the lower 24 bits of the 32-contact transistor output module. with 2#1111_0000_1111_0000_1111_0000 during the scan.0. function DIREC_O is executed and the data of the output module is updated as DIS (Data distribution) Availability Flags 2MLI-CPUU. If the transition condition (%IX0.0) is OFF. - Input the base number 2 and slot number 4 in which an output module is installed. _LER 340 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. installed in the slot no. Application Functions 8.1 5/09 . Set MASK_L as 16#FF000000 because the output data to produce are the lower 24 bits among the output contacts.1.8. Application Functions 8. List of Application Functions Input EN: executes the function in case of 1. it is 1 OUT: distributed array output DWORD UDINT USINT ULINT BOOL DATE BYTE REAL DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types R1.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 341 DT Variabl e STRING LWORD WORD LREAL TIME . IN: input data SEG: configured bit array for data distribution Output ENO: without an error.8. List of Application Functions Function a) It distributes input data over OUT after segmenting input data by bit number set by SEG. Description Function DIS DIS DIS DIS Flag Flag _ERR Description If the sum of configured number of SEG exceeds input variable bit number.1 5/09 . *If output array is omitted.1. _ERR and _LER flags are set. Input BYTE WORD DWORD LWORD It distributes IN input by bit number set with SEG array and outputs OUT array which is the same type as IN.8. it assumes the number of array as 0. producing _ERR and _LER flags. Application Functions 8. 342 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. then. SEG_ARY = {3. output variable DIS_DATA is DIS_DATA[0]=16#0006 DIS_DATA[1]=16#000A DIS_DATA[2]=16#0008 DIS_DATA[3]=16#0003 DWORD_LWORD (Combines two DWORD data into LWORD) Availability 2MLI-CPUU. DIS function is executed. 4}. List of Application Functions Program Example a) b) If the transition condition (%MX0) is ON. 4.1. 5. Application Functions 8.8. 2MLR-CPUH Input EN: executes the function in case of 1. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 343 . If input variable WORD_IN = 16#3456. DWORD_LWORD function is executed.1 5/09 .1. If input variable INPUT1 = 16#1A2A_3A4A and INPUT2 = 16#8C7C_6C5C. Application Functions 8. HIGH: upper DWORD Input Program Example a) b) If the transition condition (%MX11) is ON. then. List of Application Functions LOW: lower DWORD Input HIGH: upper DWORD Input Output ENO: outputs EN value as it is OUT: LWORD Output Function a) It combines 2 DWORD data into one LWORD data.8. output variable RESULT = 16#8C7C_6C5C_1A2A_3A4A. LOW: lower DWORD Input. 344 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1. HIGH: upper WORD Output R1. LOW: lower WORD Output.8. List of Application Functions DWORD_WORD (Divides DWORD into 2 WORD data) Availability 2MLI-CPUU. Application Functions 8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 345 . 2MLR-CPUH Input EN: executes the function in case of 1 IN: DWORD Input Output ENO: outputs EN value as it is LOW: lower WORD Output HIGH: upper WORD Output Function a) It divides one DWORD into two WORD data. 8. WORD_OUT1 = 16#AABB and WORD_OUT2= 16#1122. If input variable INPUT = 16#1122_AABB. _LER Input REQ : executes the function in case of 1 F_NO: Block NO(0~31) with the data to move 346 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . EMOV (Reading data from the preset flash area) Availability Flags 2MLI-CPUU. DWORD_WORD function is executed. 2MLR-CPUH _ERR.1. Application Functions 8. List of Application Functions Program Example a) b) If the transition condition (%MX5) is ON. then. ADDR variable must also use 4BYTE type variable..) to DATA. REAL . _ERR and _LER are set. if declaring 4BYTE type variables (DWORD.535. DINT.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 347 DT Variable . Application Functions 8. If F_NO is 31 and greater or ADDR value exceeds 65.. For instance. please set ADDR value according to DATA type. Output EN0: produces 1 if executing without error DATA: data saving area (all variables except BOOL and STRING available) DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT ANY type variable DATA ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding BOOL and STRING from ANY types Function a) b) c) The command moves one data among 32 block data in flash memory It moves the data in ADDR of the F_NO (flash number) block according to the type set in DATA.1. UDINT. it does not produce any error but any undesirable data may be moved. List of Application Functions ADDR: Byte address of a block set with B_NO.535 R1. Then the moved data is entered to DATA variable. If the variable type declared as DATA and the ADDR variable type are not identical.8. d) Flag Flag _ERR Description If F_NO value is 31 and over or ADDR value exceeds 65. move DWORD DATA in 4BYTE OFFSET of No. 2MLR-CPUH Input EN: executes the function in case of 1 R_N0: R device block no. EMOV function is executed.1 Flash Block to DW1(DWORD). EBCMP (Check the consistency after comparing content) Availability 2MLI-CPUU. F_N0: Flash memory block no. If setting F_N0 = 1.1.8.1 5/09 . Application Functions 8. 348 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. ADDR_DW(DWORD type) = 4. List of Application Functions Program Example a) b) If the execution condition (%MX5) is ON. RESULT (BOOL) is ON and shows OUT (no.0 and flash block no. Application Functions 8. it compares data in DWORD.8. STAT = 2. EBCMP function is executed. In case of inconsistency. If setting R_AREA = 0.1. Even though there is only one error after the entire comparison.1 are consistent. R1. of inconsistency (DWORD) Function a) The command to check the consistency by comparing a block of R device and another block of flash memory while input contact is ON. it shows an error. STAT shows error status. if it is greater than 31 in F_NO input.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 349 . List of Application Functions Output ENO: ON if comparison is complete STAT: Error status MATCH: ON if comparison results are consistent DIFF: No. STAT = 3. b) c) Program Example a) b) If the execution condition (%MX5) is ON. STAT = 1. of inconsistency) = 0. it saves the number in DIFF. F_AREA = 1 and if R device block no. if it is greater than 1 in R_NO input. 1 5/09 . Program Example a) I f t h e 350 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _RBLOCK_ER_FLAG occurs when reading (EBREAD) and writing (EBWRITE) flash memory block at the same time. 2MLR-CPUH Input EN: the function is executed if ON REQ: executes clearing if ON Output ENO: outputs EN value as it is OUT: when clearing error flag Function a) b) If input contact is ON and REQ is ON.1. it clears _RBLOCK_ER_FLAG as 0. Application Functions 8.8. List of Application Functions EERRST (Clearing flash memory-related error flag) Availability 2MLI-CPUU. 1 5/09 If EN is 1. ENCO (Produces ON bit position as number) Availability Flags 2MLI-CPUU. it clears as 0. b) If flash memory-related error flag (_RBLOCK_ER_FLAG) is set. Function a) b) R1. Application Functions 8.1. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 351 DT . D(DWORD) and L(LWORD).8. EERRST function is executed. List of Application Functions execution condition (%MX5) is ON. it is 1 OUT: Encoding result data DWORD DINT UINT SINT LINT TOD Variable ANY type variable IN OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types. 2MLR-CPUH _ERR. it produces the most priority bit position among bits of 1 to OUT. Input data types are B(BYTE). W(WORD). _LER Input EN: executes the function in case of 1 IN: input data to encode Output ENO: without an error. 1 5/09 . ENCO function is executed. it produces the positions of 2 bits with ON. 352 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. so that ‘11’ is saved into ON_POSITION(INT Type). List of Application Functions FUNCTION ENCO ENCO ENCO ENCO BYTE IN type Description WORD DWORD LWORD Uses a desirable ENCO function type depending on input variable type.1. _ERR and _LER flags are set. ‘11’ out of ‘11’ and ‘1’. Program Example a) b) If the execution condition (%MX0) is ON.8. Application Functions 8. Flag Flag _ERR Description OUT is -1 if no bit among input data is 1. that is. If SWITCHS (WORD type) = 2#0000_1000_0000_0010. task program blocked by 'DI' function starts normally. task program starts normally even if REQ input is 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 353 . 2MLR-CPUH Input EN: executes the function in case of 1 REQ: required to permit running for task program Output ENO: outputs EN value as it is OUT: If EI is executed. List of Application Functions EI (Permits running for task program (Cancel of DI)) Availability 2MLI-CPUU. an output is 1 Function a) b) c) If EN is 1 and REQ input is 1.8. Application Functions 8. Task programs created when they are not permitted to operate is executed after 'EI' function or the current-running task program execution. R1. Once 'EI' command is executed.1. List of Application Functions Program Example a) b) If EN_TASK is 1. program operation stops immediately and returns to STOP mode.1. Refer to function 1 OUT: if ESTOP is executed. output EN_OK is 1. Application Functions 8. a task program starts normally. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. ESTOP (Emergency running stop by program) Availability 2MLI-CPUU. an output is 1 Function a) If transition condition EN is 1 and the signal to require the emergency running stop by program REQ is 1.1 5/09 354 . If EI function permits running for a task program. 2MLR-CPUH Input EN: executes the function in case of 1 REQ: requires the emergency running stop Output ENO: outputs EN value as it is.8. 2. the running program stops immediately and returns to STOP mode. an error may occur when restarts. It is OFF when the program enters into RUN in the status. it is available to use it as a double safety device with mechanical interrupt. Application Functions 8. If ACCIDENT = 1. Note In case of emergency. R1. it stops the running program during operation. it does not start despite of power re-supply.8. If operation mode moves from STOP to RUN.0) is ON. Flag Flag _ESTOP_ON Description It turns ON if the program is stopped by ESTOP command. List of Application Functions b) c) d) In case that a program stops by 'ESTOP' function.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 355 . Program Example a) b) If the transition condition (%IX0. it restarts. if it is not a cold restart mode.1. ESTOP function is executed. If 'ESTOP' function is executed. To cancel FALS. NUM can be configured between 16#0000 ~ 16#FFFF and the first generated number is saved until it is cancelled.8. 356 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .1. 2MLR-CPUH Input EN: executes the function in case of 1 NUM: number to be saved in F Output ENO: outputs EN value as it is OUT: produces ON if it normally works Function a) b) c) The command saves a user-defined constant (N) to the configured address in F (_FALS_NUM). Application Functions 8. List of Application Functions FALS (Saving a user-defined constant(N) to the configured address in F(_FALS_NUM)) Availability 2MLI-CPUU. FALS 0000 is executed. Application Functions 8. c) d) R1.0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 357 . %IX0.2.0.8. each FALS function is executed (ex: FALS_NUM1=31.1. %IX0. the value is saved into the first _FALS_NUM_Flag. The value is saved in _FALS_NUM Flag according to the execution condition (%IX0.4.3. and the next value is not saved until FALS is canceled. List of Application Functions Program Example a) b) If the execution condition is ON. To cancel FALS. It is convenient to view the status if executing the program by setting a value of special condition and checking _FALS_NUM Flag. FALS_NUM2=32). 0000 must be set in NUM.0). 8. List of Application Functions GET_CHAR (Gets one character from a String) Availability Flags 2MLI-CPUU. Application Functions 8. 358 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. the output is 16#00.1 5/09 . If an error occurs. It extracts one byte from a String starting from N. 2MLR-CPUH _ERR.1. _LER Input EN: executes the function in case of 1 IN: STRING input N: position in a String Output ENO: outputs EN value as it is OUT: Byte Output Function a) Flag Flag _ERR Description _ERR/_LER flags are set if N exceeds the number of byte in STRING. 8. When input INPUT (STRING) = “LS 2MLI PLC. output variable OUTPUT is 16#58 (“X”). INC (Increase IN data by 1) Availability 2MLI-CPUU. Application Functions 8. 2MLR-CPUH Input EN: executes the function in case of 1 IN: Input data to increase Output ENO: outputs EN value as it is OUT: result data after increase R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 359 .1. List of Application Functions Program Example a) b) If the transition condition (%MX0) is ON. GET_CHAT function is executed.” if you extract 4th character from this string. 8. Application Functions 8. it increases IN bit string data by 1 and produces an output. DWORD and LWORD. An error does not occur when there’s an overflow. Input data types are BYTE. the result is 16#0000 in case of 16#FFFF. 360 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Functions DWORD DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) c) If EN is 1. WORD.1. FUNCTION INC INC INC INC BYTE IN/OUT type Description WORD DWORD LWORD You can select one of these functions according to the in/out data type.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 361 . List of Application Functions Program Example a) b) If the transition condition (%MX0) is ON. If input variable %MW10 = 16#0007 (2#0000_0000_0000_0111). INC function is executed. 2MLR-CPUH Input EN: executes the function in case of 1 IN: LWORD Input Output ENO: outputs EN value as it is LOW: lower DWORD Output HIGH: upper DWORD Output R1. Application Functions 8. LWORD_DWORD (Divides LWORD into two DWORD data) Availability 2MLI-CPUU.1.8. then output variable %MW100 =16#0008 (2#0000_0000_0000_1000). 8. LOW: lower DWORD Output. HIGH: upper DWORD Output Program Example a) b) If the transition condition (%MX10) is ON.1.1 5/09 . then DWORD_OUT1 = 16#CCCC_DDDD DWORD_OUT2 = 16#AAAA_BBBB. LWORD_DWORD function is executed. MCS (Master Control) Availability 2MLI-CPUU. If the input variable INPUT = 16#AAAA_BBBB_CCCC_DDDD. 2MLR-CPUH 362 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Application Functions 8. List of Application Functions Function a) It divides one LWORD into two DWORD data. function block Description Current value (CV) becomes 0 and the output (Q) becomes off. MCS function is executed and the program between MCS and MCSCLR function is normally executed. NUM: Nesting (0~15) Output ENO: If MCS is executed. That is to say. Master Control is divided by Nesting (NUM).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 363 . List of Application Functions Input EN: executes the function in case of 1. scan time is not shortened because the instructions between MCS and MCSCLR function are executed as the above. it is 1 Function a) b) If EN is ON. the program between MCS and MCSCLR function is executed as follows: Instruction Timer Counter Coil Negated coil Set coil. MCS function is executed till the end of the program. You can set up Nesting (NUM) from 0 to 15 and if you set it more than 16. Application Functions 8. All retains its current value. All becomes off. Nesting is available in MCS. Output (Q) becomes off and CV retains its present state.1. ATTENTION If you use MCS without ‘MCSCLR’. c) d) Even when EN is OFF. reset coil Function. All retains its current value. If EN is OFF. MCS is not executed normally. R1. All becomes off.8. 1. Application Functions 8. List of Application Functions Program Example 364 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .8. Program Example Refer to the MCS function example. MCSCLR of the number. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 365 . 2MLR-CPUH Input EN: executes the function in case of 1 NUM: Nesting (0~15) Output ENO: if MCSCLR is executed.1. And it indicates the end of the Master Control.8. MCSCLR (Master Control Clear) Availability 2MLI-CPUU. There’s no contact before MCSCLR function. Unless MCS and MCSCLR are combined as a pair. If MCSCLR function is executed. List of Application Functions a) The value corresponding to NUM of each MCS function sets an area with its counterpart. it clears all the MCS instructions which are less than or equal to Nesting (NUM). MCS function is executed to the end of the program. it is 1 Function a) b) c) It clears a Master Control instruction. Application Functions 8. NESTING (NUM) can be set between 0~15 and the higher number is not allowed. 8. Application Functions 8.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . IN1: Input1 IN2: Input2 MASK: input data to mask Output ENO: outputs EN value as it is OUT: when equal.1. 2MLR-CPUH Input EN: executes the function in case of 1. it is 1 DWORD DINT UINT SINT LINT TOD INT ANY type variable IN1 IN2 MASK ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types 366 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Functions MEQ (Masked Equal) Availability 2MLI-CPUU. and MASK for masking is a bit array 2#00101100. It’s available to see whether or not specific bits are on in a variable. Application Functions 8. List of Application Functions Function a) It compares whether two input variables are equal after masking. If it masks an 8-bit variable with 2#11111100. Function MEQ MEQ MEQ MEQ BYTE WORD DWORD LWORD It compares whether two variables are equal after making.8. Input variable MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 367 . IN1 is an input variable. IN2 is 16#FF. then output OUT is 1.1. For example. If IN1 and IN2 after masking are equal. MEQ function is executed. lower 2 bits are excluded when it compares input values. Input type Description b) Program Example a) b) R1. then.1 5/09 If the transition condition (%MX0) is ON. in case of comparing 8-bit variables. 20 is ON. it keeps the previous state.1. 368 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. REQ = 0. the comparing bits of input variables after masking are as follows: INPUT1 (BYTE) = 2#01010100 INPUT2 (BYTE) = 2#01010100 INPUT1 and INPUT2 are equal. List of Application Functions INPUT1 (BYTE) = 2#01011100 INPUT2 (BYTE) = 2#01110101 MASK (BYTE) = 2#11010110 Then.3. Clear all the output OFF when EN = 1. 2MLR-CPUH Input EN : executes the function in case of 1 REQ: stop every output by program Output EN0: check the operation Function a) b) c) Every output is OFF if EN = 1 and REQ = 1.8. OUTOFF (Every Output OFF if input condition is ON) Availability 2MLI-CPUU.1 5/09 . Application Functions 8. output contact %QX1. Above and beyond these cases. therefore. OUTOFF function is executed and every output module is OFF. R1.8.0. The actual output module is OFF although it seems to be set on the program monitor. If operating with Reg = 1 after setting SW2 ON. Application Functions 8.1.0) is set. the output (%QX0. List of Application Functions Program Example a) b) c) It sets a program as the above example after output module is established.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 369 . If SW1 is ON. 370 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If an error occurs. _LER Input EN: executes the function in case of 1 DATA: BYTE input to insert a STRING IN: STRING input N: setting position in a STRING Output ENO: outputs EN value as it is OUT: STRING output Function a) Flag Flag _ERR Description If N value exceeds a byte number of a string.8. the output is 16#00. Application Functions 8. List of Application Functions PUT_CHAR (Puts a character in a string) Availability Flags 2MLI-CPUU. _ERR and _LER flags are set. 2MLR-CPUH _ERR.1. It overwrites one BYTE input on a specific position (N) string.1 5/09 . and N = 2. then. Application Functions 8. If input variable INPUT = 16#41 (“A”) and STRING_IN = “TOKEN”.1. PUT_CHAR function is executed.8. output RESULT is “TAKEN”. 2MLR-CPUH Input EN: executes the function in case of 1. IN: degree Input Output ENO: outputs EN value as it is OUT: radian output R1. RAD (Converts degree into radian) Availability Flags 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 371 . List of Application Functions Program Example a) b) If the transition condition (%MX1) is ON. 1. RAD_REAL function is executed.8. if input is 3700. 372 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . its output RAD_VAL = 2. Application Functions 8. For example. it converts normally. If the degree is over 360°. output is radian value corresponding to 370° 360° = 10°. Program Example a) b) If the transition condition (%MX0) is ON. List of Application Functions DWORD DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ Function a) b) It converts a degree value ( °) into a radian value.21656823. If input variable DEG_VAL = 127( °). Function RAD RAD Input type REAL LREAL Output type REAL LREAL Description It converts a degree value ( °) into a radian value. 8. it is 1 OUT: overflowing data In/Out SRC: array block to rotate DWORD DINT UINT SINT LINT TOD Variable ANY type variable SRC OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding STRING from ANY types R1. List of Application Functions ROTATE_A (Rotates configured array elements) Availability Flags 2MLI-CPUU. Application Functions 8. _LER Input EN: executes the function in case of 1 N: element number to rotate STRT: starting position to rotate in an array block END: ending position to rotate in an array block Output ENO: without an error.1. 2MLR-CPUH _ERR.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 373 DT . Application Functions 8. − − It rotates configured elements of an array block in the chosen direction. Setting: Scope: STRT and END set a data array to rotate Rotation direction and time: rotates N times in the chosen direction set by STRT and END (STRT → END) Input data setting: fills an empty element with data pushed from END after rotation with Input data (IN) Output: the result is written at the ARRAY configured by SRC. and the data to rotate from END to STRT is written at OUT. R1. List of Application Functions Function 1.1. − − Function ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A 374 In/Out array type BOOL BYTE WORD DWORD LWORD SINT MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Description It rotates configured elements of an array block in the chosen direction.1 5/09 . 2.8. TIME=T#0S). producing _ERR and _LER flags. INT=0. If an error occurs. _ERR and _LER flags are set.8.e.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 375 .1. there’s no change in SRC and output OUT is the initial value of each variable type(i. it assumes the output array number as 0. R1. _ERR *If output array variable is omitted. Application Functions 8. List of Application Functions Function ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A ROTATE_A INT In/Out array type Description DINT LINT USINT UINT UDINT ULINT REAL LREAL TIME DATE TOD DT Flag Flag Description If STRT or END exceed the range of SRC array element. It rotates configured elements (from 2nd to 8th elements) of SRC_ARY in the chosen direction set by STRT and END (from index 8 to index 2).8. The overflowing data (16#44) is written at OUT.1 5/09 . List of Application Functions Program Example a) b) c) If input condition (%MX2) is ON. ROTATE_A function is executed. Application Functions 8. 376 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 377 . STRT: starting bit position of SRC bit array to rotate END: ending bit position of SRC bit array to rotate N: bit number to shift R1. List of Application Functions ROTATE_C (Rotate with Carry) Availability Flags 2MLI-CPUU. 2MLR-CPUH _ERR. _LER Input EN: executes the function in case of 1.8. Application Functions 8. Rotation direction and time: rotates N times in the chosen direction set by STRT and END (STRT → END) 3. and the data to rotate from END to STRT is written at OUT. 378 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8. Scope: STRT and END set a bit data to rotate. Output: the result is written at ANY_BIT configured by SRC.1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . 2.1. List of Application Functions Output ENO: without an error. Setting: 1. it is 1 OUT: carry output In/Out SRC: variable for rotation DWORD DINT UINT SINT LINT ANY type variable TOD INT SRC ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) It rotates a configured bit array of SRC bit arrays in the chosen direction. Application Functions 8. Flag Flag _ERR Description If STRT or END exceed the bit number of SRC variable type. List of Application Functions Function ROTATE_C ROTATE_C ROTATE_C ROTATE_C SRC type BYTE WORD DWORD LWORD Description It rotates a configured bit array of SRC bit arrays N times in the chosen direction. R1.1. ROTATE_C function is executed. Application Functions 8.8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 379 . there’s no change in SRC and _ERR and _LER flags are set Program Example a) If the transition condition (%MX2) is ON. from STRT (13) to END (3). 2MLR-CPUH Input EN: executes the function in case of 1 B_NO: block NO(0~1) to convert Output EN0: without an error. Application Functions 8.1.1 5/09 . The result data after rotation is written at SRC (16#896D).8. List of Application Functions b) It rotates the configured bit array. it is 1 380 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. and the overflowing bit (0) is written at OUT. of SRC (16#A5A5) 2 times in the chosen direction set by STRT and END (from STRT to END): refer to the diagram as follows. c) RSET (Converts the set block number to the configured block number) Availability 2MLI-CPUU. SEG_WORD (Converts BCD or HEX into 7 segment display code) Availability 2MLI-CPUU. 2MLR-CPUH R1. Flag Flag _ERR Description If B_N0 value is over 2. BLOCK_NUM (UINT type) can be 0 or 1 and convert it to the configured R block. Program Example a) b) If the execution condition (%MX0) is ON. _ERR and _LER Flags are set. If S is over the max block number. RSET function is executed.1. Application Functions 8.8. error flag (_ERR) is set. Block number is initialized to 0 if converting stop to run. List of Application Functions Function a) i) j) Convert the set block number (_RBANK_NUM) to the configured block number.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 381 . 8. INT -> 8-digit BCD-type 7 segment code: Divide INT by 10. 1. 4-digit HEX -> 4-digit 7 segment code: use SEG function. 3. use SEG function.1 5/09 . 2. after dividing them into 4 digits. If an input is BCD type. it converts BCD or HEX (hexadecimal) of IN into 7 segment display code as follows and produces output OUT. INT -> 4-digit BCD-type 7 segment code: use INT_TO_BCD function first and SEG function. And in case of HEX input. 382 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. IN: Input data to covert into 7 segment code Output ENO: outputs EN value as it is OUT: result data converted into 7 segment data Function a) b) If EN is 1. 4. Display example 1.1. 5. List of Application Functions Input EN: executes the function in case of 1.000 and convert ‘quotient’ and ‘remainder’ into upper/lower 4-digit 7 segment code using INT_TO_BCD and SEG function. HEX type. 4-digit BCD -> 4-digit 7 segment code: use SEG function. When 7 segment display digits are more than 4. it's available to display a number between 0000 and FFFF on 4-digit 7 segment display. INT -> 4-digit HEX-type 7 segment code: use INT_TO_WORD function first and SEG function. In case of BCD. Application Functions 8. 2. it is available to display a number between 0000 and 9999. Application Functions 8.8. • 7 Segment Configuration R1. If input variable BCD_DATA (WORD) = 16#1234. List of Application Functions Program Example a) b) If the transition condition (%MX0) is ON. SEG_WORD function is executed.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 383 . the output is ‘2#00000110_01011011_01001111_01100110’ which is displayed as a 7 segment code (1234) and written at SEG_PATTERN (DWORD). 8.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . Application Functions 8. List of Application Functions • Conversion table for 7 segment code Input (BCD) Input (Hex) INT Output B7 B6 B5 B4 B3 B2 B1 B0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 Display Data 0 1 2 3 4 5 6 7 8 9 384 0 1 2 3 4 5 6 7 8 9 A B C D E 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 7 8 9 A B C D E R1. 2MLR-CPUH _ERR. IN: Input data to empty element after shifting N: number to shift STRT: starting position to shift in an array block END: ending position to shift in an array block Output ENO: without an error.8. it is 1 R1. _LER Input EN: executes the function in case of 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 385 . List of Application Functions Input (BCD) Input (Hex) INT Output B7 B6 B5 B4 B3 B2 B1 B0 0 0 1 Display Data - F 15 0 1 1 1 0 0 1 0 F SHIFT_A (Shifts configured array elements) Availability Flags 2MLI-CPUU.1. Application Functions 8. List of Application Functions OUT: overflowing data In/Out SRC: array block to shift DWORD DINT UINT SINT LINT TOD Variable IN1 IN2 OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ANY type variable ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding STRING from ANY types Function a) b) It shifts configured elements of an array block in the chosen direction.8. 386 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. and the overflowing data by shifting from END to STRT is written at OUT.1 5/09 DT . Shifting direction and time: rotates N times in the chosen direction set by STRT and END (STRT → END).1. Input data setting: fills an empty element after shifting with input data (IN). Application Functions 8. Setting: • • • • Scope: STRT and END set a data array to rotate. Output: the result is written at ARRAY configured by SRC. 1. List of Application Functions Function SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A R1. 387 .1 5/09 In/Out Array Type BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT UINT UDINT ULINT REAL MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Description It shifts configured elements of an array block in the chosen direction.8. Application Functions 8. producing _ERR and LER flags.8. _ERR and _LER flags are set. If an error occurs. List of Application Functions Function SHIFT_A SHIFT_A SHIFT_A SHIFT_A SHIFT_A In/Out Array Type LREAL TIME DATE TOD DT Description Flag Flag Description If STRT or END exceed the range of SRC array element. INT=0.1. _ERR *If output array is omitted. there’s no change in SRC and output OUT is the initial value of each variable type(i. 388 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. TIME=T#0S).1 5/09 .e. it assumes the number of array as 0. Application Functions 8. SHIFT_A function is executed.8. List of Application Functions Program Example a) b) c) d) e) If the input condition (%MX2) is ON. It shifts configured elements (from 2nd to 8th elements) of SRC_ARY. The overflowing data (1234). The empty elements after shifting. It shifts three times the configured elements. are filled with input ‘555’. R1.1. Application Functions 8. is written at OUT. from array index 2 to array index 3. carry output.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 389 . 1. List of Application Functions SHIFT_C (Shift with Carry) Availability Flags 2MLI-CPUU. 2MLR-CPUH _ERR. Application Functions 8. _LER Input EN: executes the function in case of 1 CYI: Carry Input STRT: starting bit position of SRC bit array to shift END: ending bit position of SRC bit array to shift 390 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8.1 5/09 . . R1.8. it is 1 OUT: carry output In/Out SRC: variable to shift DWORD DINT UINT SINT LINT TOD Variable ANY type variable OUT STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types Function a) b) It shifts a configured bit array of SRC bit arrays N times in the chosen direction. Shifting direction and time: shifts N times from STRT to END. List of Application Functions N: bit number to shift Output ENO: without an error. Setting: • • • • Scope: STRT and END set a bit data to shift. Input data setting: fills empty bit after shifting with input data (CYI). Application Functions 8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 391 DT . Output: the result is written at ANY_BIT configured by SRC. and the overflowing bit data by shifting from END to STRT is written at OUT.1. 1 5/09 .8. SHIFT_C function is executed. Flag Flag _ERR Description If STRT or END exceed the bit number of SRC variable type. Program Example a) 392 If the transition condition (%MX2) is ON. List of Application Functions Function SHIFT_C SHIFT_C SHIFT_C SHIFT_C BYTE WORD SRC type Description DWORD LWORD It shifts a configured bit array of SRC bit arrays N times. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. there’s no change in SRC and _ERR and _LER flags are set.1. Application Functions 8. stop running and return to STOP mode.8. List of Application Functions b) c) 16#A5A5 is shifted from STRT to END by 2 bits and the empty bits after shifting are filled with 1 (CYI). If function 'STOP' is executed. STOP (Stop running by program) Availability 2MLI-CPUU. SRC after shifting is 16#969D and the overflowing bit data (0) is written at OUT after 2-bit shifting. the program stops after completing scan program in executing. Function a) b) R1. Application Functions 8.1 5/09 If EN and REQ are 1. it is 1. 2MLR-CPUH Input EN: executes the function in case of 1 RE: requires the operation stop by program Output ENO: outputs EN value as it is OUT: If STOP function is executes.1. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 393 . It is recommended to turn off the power of PLC in the stable state after executing 'STOP' function declared as input variable. it becomes to STOP mode after completing the scan program in executing. STRING_BYTE (Convert a string into a byte array) Availability 2MLI-CPUU.1.0) and LOG_OUT is 1. Flag Flag _USTOP_ON Description ON if stopped by STOP instruction. Application Functions 8. Program Example a) If the transition condition (%IX0. 2MLR-CPUH 394 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.0.8.1 5/09 . It is OFF if entering into RUN. List of Application Functions c) Program restarts in case of power re-supply or the change of operation mode from STOP to RUN. function converts. STRING_BYTE function is executed.1. If IN_VAL = ‘ABC’.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 395 . IN: string input Output ENO: outputs EN value as it is OUT: outputs converted Byte Array Function a) It converts a string into 31 byte arrays. OUT_VAL[2] = 16#43 R1.8. Application Functions 8. Program Example a) b) If the transition condition (%MX2) is ON. OUT_VAL[1] = 16#42. List of Application Functions Input EN: if EN is 1. OUT_VAL[0] = 16#41. IN: Input Output ENO: outputs EN value as it is OUT: swapped data DWORD ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types Function a) It swaps upper data for lower data. 2MLR-CPUH Input EN: executes the function in case of 1. 396 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 DT Varia ble STRING LWORD WORD LREAL UDINT USINT . List of Application Functions SWAP (Swaps upper data for lower data) Availability 2MLI-CPUU.8.1. Function SWAP BYTE Input type Description Swaps upper nibble for lower nibble data. Application Functions 8. R1. List of Application Functions Function SWAP WORD Input type Description Swaps upper byte for lower byte data.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 397 . Application Functions 8. SWAP LWORD Swaps upper double word for lower double word data.8. If INPUT (BYTE) = 16#5F. Program Example a) b) If the transition condition (%MX0) is ON. SWAP function is executed. RESULT (BYTE) = 16#F5.1. SWAP DWORD Swaps upper word for lower word data. 1 5/09 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME .8. it is 1 OUT: united data output DWORD DINT UINT SINT LINT TOD INT ANY type variable IN OUT ○ ○ ○ ○ ○ ○ ○ ○ *ANY_BIT: excluding BOOL from ANY_BIT types 398 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _LER Input EN: executes the function in case of 1 IN: input data array SEG: bit-number-designate array to unite data Output ENO: without an error. Application Functions 8. 2MLR-CPUH _ERR.1. List of Application Functions UNI (Unites data) Availability Flags 2MLI-CPUU. R1. Function UNI UNI UNI UNI If the sum of value set by SEG exceeds the bit number of input data type.8. Application Functions 8. List of Application Functions Function a) It unites an input data array from the lower bit to a configured bit set by SEG and produces an output. _ERR and _LER flags are set.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 399 . Input type BYTE WORD DWORD LWORD Output type BYTE WORD DWORD LWORD Description It cuts an input array into bit data set by SET and produces an output (united data) with the same array type of input. List of Application Functions Flag Flag Description If the sum of value set by SEG exceeds the bit number of input data type. Application Functions 8. _ERR and _LER flags are set. _ERR Program Example a) If the transition condition (%MX0) is ON. output OUT is 0 and _ERR and _LER flags are set. If the number of arrays of IN and SEG is different. UNI function is executed. 400 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.8.1.1 5/09 . b) If input IN_ARY and SEG_ARY are as follows output RESULT = 2#0010_1011_1011_0101 = 16#2BB5. Application Functions 8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 401 .8.1. List of Application Functions R1. 1 5/09 . LOW: lower byte output.1.8. Application Functions 8. HIGH: upper byte output Program Example 402 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2MLR-CPUH Input EN: executes the function in case of 1 IN: WORD Input Output ENO: outputs EN value as it is LOW: lower BYTE output HIGH: upper BYTE output Function a) It divides one word data into two byte data. List of Application Functions WORD_BYTE (Divides WORD into two bytes) Availability 2MLI-CPUU. 1. HIGH: upper WORD input. LOW: lower WORD input.8. WORD_BYTE function is executed. WORD_DWORD (Combines two WORD data into DWORD) Availability 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 403 . Application Functions 8. LOW: lower WORD input HIGH: upper WORD input Output ENO: outputs EN value as it is OUT: DWORD output Function a) It combines two WORD data into one DWORD. 2MLR-CPUH Input EN: executes the function in case of 1. then BYTE_OUT1 = 16#CD and BYTE_OUT2 = 16#AB. R1. If input variable INPUT is 16#ABCD. List of Application Functions a) b) If the transition condition (%MX3) is ON. 1 5/09 . output variable RESULT=16#A0B0_1020. Application Functions 8. 2MLR-CPUH Input EN: executes the function in case of 1 Output ENO: outputs EN value as it is In/Out SRC1: In/Output 1 SRC2: In/Output 2 404 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. List of Application Functions Program Example a) b) If the transition condition (%IX1.1. If input variable INPUT1 = 16#1020 and INPUT2 = 16#A0B0. XCHG (Exchanges two input data) Availability 2MLI-CPUU.5) is ON.8. WORD_DWORD function is executed. Exchanges two UINT input data.8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 405 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . Exchanges two INT input Exchanges two DINT input data.1. Application Functions 8. R1. Exchanges two LINT input data. Exchanges two DWORD input data. Exchanges two SINT input data. Exchanges two LWORD input data. Exchanges two USINT input data. List of Application Functions DWORD DINT UINT SINT LINT TOD INT ANY type variable SRC1 SRC2 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Function a) Exchanges input1 data with input2 data. Exchanges two WORD input data. Exchanges two UDINT input data. Exchanges two BYTE input data. Function XCHG XCHG XCHG XCHG XCHG XCHG XCHG XCHG XCHG XCHG XCHG XCHG BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT UINT UDINT In/Out type Description Exchanges two BOOL input data. INPUT1 = 1 and INPUT2 = 0. Exchanges two LREAL input data. Exchanges two TOD input data. XCHG function is executed. it exchanges two input data. Exchanges two DT input data. After the function execution.8. Application Functions 8. Exchanges two REAL input data.1. 406 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Exchanges two TIME input data. Exchanges two DATE input data. Exchanges two STRING input data. List of Application Functions Function XCHG XCHG XCHG XCHG XCHG XCHG XCHG XCHG ULINT REAL LREAL TIME DATE TOD DT In/Out type Description Exchanges two ULINT input data. STRING Program Example a) b) If the transition condition (%MX0) is ON. If INPUT1 = 0 and INPUT2 = 1. 8. List of Application Functions XNR (Exclusive Logical AND) Availability 2MLI-CPUU. and OUT must be the same data type. 2MLR-CPUH Input EN: executes the function in case of 1 IN1: XNR-to-be value IN2: XNR-to-be value Input variables can be extended up to 8.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 407 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL DT . Output ENO: outputs EN value as it is OUT: XNR result IN1. DWORD TIME DINT UINT SINT LINT TOD INT Variable IN1 IN2 OUT ANY type variable ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ R1. IN2. Application Functions 8. 1 5/09 . If %MB10 = 16#F0 = 2#1111_0000 and ABC(BYTE type) = 16#AA = 2#1010_1010. Application Functions 8. the result of XNR is shown in OUT (%QB0. 0101 1111 . List of Application Functions Function a) It performs XNR operation on the input variables by bit and produces output OUT.. 408 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.0....8.. XNR function is executed.1... IN1 XNR IN2 OUT Program Example 1010.. 0000 a) b) If the transition condition (%MX0) is ON...0 = 16#A5 = 2#1010_0101). 1010 1010... 9.Down Counter (function block) Availability 2MLI-CPUU.1 Function block library Before using basic function block. it is recommended to understand 3. 2MLR-CPUH Input CD: down counter pulse input LD: loads a preset value PV: preset value Output Q: down counter output CV: current value Variable Any type variable PV CV BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL TIME DATE TOD DT STRING ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 409 *ANY_INT: excluding SINT and USINT from ANY_INT types R1.1 5/09 . it is facilitative to write a program. CTD .4.2 Function Block and apply function block library to a program. Basic Function Blocks 9. Increase as much as the max UINT (0).808). PV is loaded into CV (CV=PV).372. Function block library Function a) Down counter function block CTD decreases the current value (CV) by 1 with every rising pulse input.9. after reaching it. Function Block CTU_INT CTU_DINT CTU_LINT CTU_UINT CTU_UDINT CTU_ULINT PV INT DINT LINT UINT UDINT ULINT Description Increase as much as the max INT (32767). CV does not change its value. d) Output Q is 1 when CV is 0 or a negative number. Decrease as much as the min DINT(-2. Function Block CTD_INT CTD_DINT CTD_LINT CTD_UINT CTD_UDINT CTD_ULINT PV INT DINT LINT UINT UDINT ULINT Description Decrease as much as the min INT(-32. Decrease as much as the min LINT(9. Increase as much as the max ULINT (0). Increase as much as the max UDINT (0). Increase as much as the max LINT (9223372036854775807).648). Basic Function Blocks 9. Decrease as much as the min UDINT(0).768). Decrease as much as the min ULINT(0).036.483. c) When LD is 1. Function Block CTUD_INT PV INT Description Increase/decrease as much as INT(-32768 ~ 32767) 410 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.775.147. Increase as much as the max DINT (2147483647).1. Decrease as much as the min UINT(0).854. b) CV decreases only when CV is more than the minimum value of INT (-32768).223.1 5/09 . 14) five times. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 411 .1 5/09 Register the name of CTD function block (COUNT_D). Basic Function Blocks 9.1. 1.1.9. R1.0) when the down counter pulse input enters the input contact (%IX0. Function block library Function Block CTUD_DINT CTUD_LINT CTUD_UINT CTUD_UDINT CTUD_ULINT − PV DINT LINT UINT UDINT ULINT Description Increase/decrease as much as DINT(0 ~ 231-1) Increase/decrease as much as LINT(0 ~ 263-1) Increase/decrease as much as UINT(0 ~ 65535) 32 Increase/decrease as much as UDINT(0 ∼ 2 -1) 63 Increase/decrease as much as ULINT(0 ∼ 2 -1) Time Chart Program Example This is the program that sets the output contact (%QX0.3. Compile and write your program to the PLC after completing the program.0) will be set.3. 6. When the down counter pulse input enters the input contact (%IX0. Basic Function Blocks 9. 5. PV 5 will be loaded into CV (Count_CV). CV (COUNT_CV) will be 0 and Q (COUNT_CV) will be 1. 12. Set the CV value as the random output variable (COUNT_CV).1. Set the PV value as 5 in range of INT ((-32. 9.1 5/09 .767). 11. 2MLR-CPUH Input CU: up counter pulse input R: reset input PV: loads a preset value 412 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.9.1. The current value CV (COUNT_CV) decreases by 1 when the pulse input enters the input contact (%IX0.14) attached to CD.14). 3.Up Counter (function block) Availability 2MLI-CPUU. 8. Set the Q value as the random output variable (COUNT_Q). 7. If program runs. 4. After writing. 10. change the PLC mode (Stop -> Run). Function block library 2.14) five times.1. If Q (COUNT_Q) is 1. Make the input contact (%IX0.768~32.1. the output contact (%Q0. Make the flag _10N (1 scan On contact) that loads PV into CV. CTU . 9. Basic Function Blocks 9.1. Function block library Output Q: increase counter output CV: current value DWORD Variable Any type variable PV CV STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME DINT UINT SINT LINT TOD INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_INT: excluding SINT and USINT from ANY_INT types Function a) b) c) d) e) Up counter function block CTU increases the current value (CV) by 1 with every rising pulse input. CV increases only when CV is less than the maximum value of INT (32767); after reaching it, CV does not change its value. When the reset input (R) is 1, CV is cleared (0). Output Q is 1 when CV is equal to or more than PV. PV value reloads the preset value and operate it when CTU function block is executed. PV INT DINT LINT UINT UDINT Description Increase as much as the max INT (32767). Increase as much as the max DINT (2147483647). Increase as much as the max LINT (9223372036854775807). Increase as much as the max UINT (0). Increase as much as the max UDINT (0). Function Block CTU_INT CTU_DINT CTU_LINT CTU_UINT CTU_UDINT R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 413 DT 9. Basic Function Blocks 9.1. Function block library Function Block CTU_ULINT PV ULINT Description Increase as much as the max ULINT (0). − Time Chart 414 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library Program Example a) This is the program that sets the output contact (%QX0.3.0) when the increase counter pulse input enters the input contact (%IX0.1.15) ten times 1) Register the name of CTU function block (COUNT_U). 2) Make the input contact %I0.1.15 attached to CU. 3) Set the PV value as 10. 4) Assign input contact %IX0.1.5 to the reset input R. 5) Set the CV value as the random output variable (COUNT_CV). 6) Set the Q value as the random output variable (COUNT_Q). 7) Compile and write your program to the PLC after completing the program. 8) After writing, change the PLC mode (Stop > Run). 9) The current value CV (COUNT_CV) increases by 1 when the pulse input enters the input contact (%IX0.1.15). 10) When the up counter pulse input enters the input contact (%IX0.1.15) ten times, CV (COUNT_CV) is 10 and Q (COUNT_Q) is 1. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 415 9. Basic Function Blocks 9.1. Function block library 11) If Q (COUNT_Q) is 1, the output contact (%QX0.3.0) is set. 416 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library CTUD - Up/Down Counter (function block) Availability 2MLI-CPUU, 2MLR-CPUH Input CU: up counter pulse input CD: down counter pulse input R: reset LD: loads a preset value PV: preset value Output QU: up counter output QD: down counter output CV: current value DWORD STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DINT UINT SINT LINT TOD INT Any type variable PV CV ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY_INT: excluding SINT and USINT from ANY_INT types R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 417 DT Variable DATE BYTE REAL TIME 9. Basic Function Blocks 9.1. Function block library Function a) Up/Down counter function block CTUD increases the current value (CV) by 1 with every rising up-counter pulse input (CU) and decreases CV by 1 with every rising down-counter pulse input (CD). Note that CV is between -32768 and 32767 (INT). When LD is 1, PV is loaded into CV (CV=PV). When the reset input R is 1, CV is cleared (0). When CV reaches PV, the output QU is 1; when CV is 0 or a negative integer, the output QD is 1. The operation for each input signal is executed in order of R > LD > CU > CD. Note that if the input signals are fed to the input (CU, CD, R, and LD) of CTUD at the same time, the operation of CTU follows the above priority. PV INT DINT LINT UINT UDINT ULINT Description Increase/ decrease as much as INT(32768 ~ 32767) Increase/decrease as much as DINT(0 ~ 231-1) Increase/decrease as much as LINT(0 ~ 263-1) Increase/decrease as much as UINT(0 ~ 65535) Increase/decrease as much as UDINT(0 232-1) Increase/decrease as much as ULINT(0 263-1) b) c) d) e) f) Function Block CTUD_INT CTUD_DINT CTUD_LINT CTUD_UINT CTUD_UDINT CTUD_ULINT 418 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library − Time Chart Program Example Conditions are: the temporary loading part STACK_MAX is 100; IN is 1 with every material-input signal while OUT is 1 with every material-output signal. If the material R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 419 9. Basic Function Blocks 9.1. Function block library input process is faster than the material-output one and every material is loaded so that the STACK_MAX is equal to or more than 100, then QU is 1 (STACK_FULL = 1); if there's no material left in the loading part, QD is 1 (STACK_EMPTY = 1). At the STORED_NUMBER, the number of remaining material in the loading part is shown. FF - Reverse output bit Availability 2MLI-CPUU, 2MLR-CPUH Input CLK : input signal Output Q : reverse output by instruction 420 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library Function a) FF reverses output Q as the input status connected to CLK is changed from 0 to 1. − Time Chart Program Example a) By watching the status of input variable, %IX0.0.0, when the input is changed from 0 to 1, the DETECT is reversed. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 421 9. Basic Function Blocks 9.1. Function block library F_TRIG - Falling Edge Detection (function block Availability 2MLI-CPUU, 2MLR-CPUH Input CLK: input signal Output Q: falling edge detection result Function a) The output Q of function block F_TRIG is 1 with the falling pulse input to CLK. And 1 scan later, without further falling pulse input, the output Q is 0 ever after. − Time Chart 422 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library Program Example a) If the input variable (%IX0.0.0) changes from 1 to 0, while detecting its state, the output variable FALL_DETECT is 1. And 1 scan later, the output variable FALL_DETECT is 0. RS - Reset Priority Bistable (function block) Availability 2MLI-CPUU, 2MLR-CPUH RS BO O L BO O L S R1 Q 1 BO O L Input R_1: Reset condition S: Set condition Output Q1: operation result R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 423 9. Basic Function Blocks 9.1. Function block library Function If R1 is 1, output Q1 is 0 regardless of the state of S. The output variable Q1 is 1 when it maintains the previous state, R1 is 0, and S is 1, it is 1. The initial state of Q1 is 0. − Time Chart Program Example 424 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library It outputs the operation results with RESET1 as Reset condition and SET1 as Set condition to RESULT. Let’s replace the operation conditions; as the above time chart, R_1 to RESET1, S to SET1 and Q1 to RESULT. a) b) c) If SET1 declared as input variable is ON, output variable RESULT is 1. If RESET1 declared as output variable is ON, output variable declared as RESULT is 0. If SET1 and RESET1 declared as input variables are ON, the output variable RESULT is 0. RTC_SET - Writes Time data Availability Flags 2MLI-CPUU, 2MLR-CPUH _ERR, _LER Input REQ: executes the function with rising pulse input DATA: TIME data to input Output DONE: without an error, it is 1 STAT: If an error occurs, an error code is written Function a) It writes RTC data to Clock Device with a rising pulse input. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 425 9. Basic Function Blocks 9.1. Function block library Variable DATA[0] DATA[1] DATA[2] DATA[3] Content Year Month Dates Hours Example 16#01 16#03 16#15 16#18 Variable DATA[4] DATA[5] DATA[6] DATA[7] Content Minute Second No check Year Example 16#30 16#45 16#20 * The above example is “2001-03-15 18:30:45, Thursday”. * Day of the week data is not separately entered. The day of the week is automatically set. b) 2. The above DATA variables are declared as array Byte variables and set as BCD data. Flag Flag _ERR Description If CPU does not support RTC function or RTC data is out of range, the output is 0 and the error code is written at STAT. Error code 00 02 No error Description Wrong RTC data. Example: 14 (Months) 32 (Dates) 25 (Hours) * Modify RTC data. Program Example Its RTC data is Dec 5, 2006. 10:39:45, Tuesday. a) b) When SET_SW is ON, RTC_SET function block renews or modifies the SET_data (RTC data). Variable setting is shown as follows. 426 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library Variable DATA[0] DATA[1] DATA[2] DATA[3] Content Year Month Date Hour Example 16#06 16#12 16#05 16#10 Variable DATA[4] DATA[5] DATA[6] DATA[7] Content Minute Second No check Year Example 16#39 16#45 16#20 c) In addition to the method set by allowing initial value to DATA variable, it may be set by saving each preset value to DATA[ ] variable, using function MOVE. Use the following flags to read RTC data. e.g. 1998-12-22 19:37:46, Tuesday d) Flag _RTC_TOD Type TOD Content Current time Description Current time of RTC Current day of RTC Data TOD#19:37:4 6 _RTC_WEEK UINT Current day *(0: Mon, 1: Tue, 2: Wed, 3: Thu, 4: Fri, 5: Sat, 6: Sun) Current date of RTC 2 _RTC_DATE DATE Current date (1984-01-01 ~ 2063-0606) D#1998-12-22 _HUND_WK _TIME_DAY _MON_YEAR _SEC_MIN WORD WORD WORD WORD Hundred year/day Time/date Month/year Second/minute Discriminated by BYTE 16#1902 16#1922 16#1298 16#4637 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 427 9. Basic Function Blocks 9.1. Function block library R_TRIG - Rising Edge Detection (function block) Availability 2MLI-CPUU, 2MLR-CPUH Input CLK: input signal Output Q: rising edge detection result Function a) The output Q of function block R_TRIG is 1 with the rising pulse input to CLK. And 1 scan later, without further rising pulse input, the output Q is 0 ever after. − Time Chart 428 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 9. Basic Function Blocks 9.1. Function block library Program Example If the input variable IN_SIGNAL changes from 0 to 1, while detecting its state, the output variable RISE_DETECT is 1. And 1 scan later, the output variable RISE_DETECT is 0. SEMA - Semaphore (System resource allocation) Availability 2MLI-CPUU, 2MLR-CPUH Input CLAIM: signal to claim a resource monopoly RELEASE: release signal Output BUSY: waiting signal not to obtain the claimed resource Function This function block is used to get an exclusive control right for system resources. BUSY that is using the resource in other program is 1 when SEMA function is executed (CLAIM = 1 or 0, RELEASE = 0). If you want to obtain the resource control right, wait until BUSY is 0 after executing SEMA function block (CLAIM = 1, RELEASE = 0). When BUSY is 0, it controls the associate resource and after completing the control, it transfers the control right executing SEMA function block once again with CLAIM = 0 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 429 END_VAR BUSY : = X . and claim the right to control the printer. Function block library and RELEASE = 1.1 5/09 . Internal execution structure of SEMA function block. END_IF − Time Chart The access right to control the same resource is transferred between the program block A and the program block B. Each program to claim the same resource must be configured as the same priority. If you execute SEMA function block (PRINTER). ELSIF RELEASE THEN BUSY : = 0. VAR X : BOOL : = 0 . only the program that has the control right can execute SEMA function block with CLAIM = 0 and RELEASE = 1) a) b) c) The instance of SEMA must be declared as "GLOBAL" so that its access is available in the programs requiring the resource. while the printer is used in other program block. X : = 0 . (At this time.9. BUSY is 1 then outputs 1 to OT_AVAIL. Program Example When you want to produce a printer output in different program blocks with the printer attached to the PLC system. Basic Function Blocks 9. you can easily control it by declaring the instance 'PRINTER' as a ‘GLOBAL' and using SEMA function block named as 'PRINTER' in each program. IF CLAIM THEN X : = 1 . when START is 1 and END is 0. If the printer is not used in 430 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 431 . R1. which means you can start the program to produce the printer output with it. execute SEMA with START = 0 and END = 1 so that other program can get the right to control it.1. After completing the print control.9. Basic Function Blocks 9. BUSY is 0. Function block library other program block. Basic Function Blocks 9.9. Function block library 432 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .1. 9.1.Set Priority Bistable (function block) Availability 2MLI-CPUU. 2MLR-CPUH Input S1: set condition R: reset condition Output Q1: operation result Function a) b) c) If S1 is 1. The output variable Q1 is 0 and it maintains the previous state when S1 is 0. and R is 1. R1. Function block library SR . The initial state of Q1 is 0. Basic Function Blocks 9. output Q1 is 1 regardless of the state of R.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 433 . Function block library − Time Chart Program Example a) b) If input variable SET1 becomes ON.OFF Delay Timer (function block) Availability 2MLI-CPUU. output variable RESULT is 1.9. TOF . Basic Function Blocks 9. 2MLR-CPUH 434 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. The output variable RESULT becomes 0 when input variable SET1 becomes OFF and RESET ON.1 5/09 . If IN becomes 1 before ET reaches the preset time. Basic Function Blocks 9. After IN becomes 0. Q becomes 0.9. ET is 0 again. Q is 1. And after IN becomes 0 and the preset time (PT) of TOF passes. − Time Chart R1. the elapsed time (ET) is shown.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 435 .1. Function block library Input IN: timer operation condition PT: preset time Output Q: timer output ET: elapsed time Function a) b) c) If IN is 1. Basic Function Blocks 9. TOF is initialized (TIMER_OK is 1).1 5/09 . the elapsed time (ET_TIME) is measured and shown.9.1. Function block library Program Example a) b) c) Output variable TIMER_OK is 1 when input variable T_OFF becomes 1. TIMER_OK is 0 only if 10 seconds passes after T_OFF becomes 0. If T_OFF becomes 1 again in 10 seconds after it turned OFF. 436 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. After T_OFF becomes 0. ET is 0.ON Delay Timer (function block) Availability 2MLI-CPUU. Q is 0.1.9. Function block library TON . 2MLR-CPUH Input IN: timer operation condition PT: preset time Output Q: timer output ET: elapsed Time Function a) b) c) − Elapsed time (ET) is measured and shown after IN becomes 1. Time Chart R1. If IN becomes 0 after Q is 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 437 . When IN becomes 0 before ET reaches the preset time. Basic Function Blocks 9. ET_TIME. When T_ON = 0 before ET_TIME reaches the preset time (10s). the elapsed time is output to output variable.1. then TIMER_OK = 0 and ET_TIME = 0. If T_ON = 0 after TIMER_OK = 1. 438 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .9. After input variable T_ON is 1. Function block library Program Example a) b) c) d) The output TIMER_OK = 1 ten seconds later after the input T_ON is asserted (T_ON = 1). Basic Function Blocks 9. ET_TIME is 0. The state of IN doesn't matter while ET is measured (increased). If IN = 1.9. Q is 1 only during the preset time PT. if ET reaches PT.Pulse timer (function block) Availability 2MLI-CPUU. ET = 0. Basic Function Blocks 9. Q is 0.1. R1. if IN = 0 after ET reaches PT. 2MLR-CPUH Input IN: timer operation condition PT: preset time Output Q: timer output ET: elapsed Time Function a) b) c) If IN = 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 439 . elapsed time ET starts to be measured and maintains its value after when it reaches PT. Function block library TP . 9. the state of input T_TP doesn't affect TIMER_OK. Function block library • Time Chart Program Example a) TIMER_OK is 1 during 10 seconds after input T_TP was asserted (T_TP = 1). MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. While ET_TIME increases during 10 seconds.1.1 5/09 440 . Basic Function Blocks 9. array index error occurs only when the contact is ON. ATTENTION TP function block keeps operating until its operation is complete even if the contact is changed from ON to OFF. R1.9. Basic Function Blocks 9. Function block library b) ET_TIME increases when it reaches T#10S and then it becomes 0 when T_TP = 0.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 441 . TP function block does not produce any array index error as long as the contact is OFF although function block is operating. In case of a variable using array index. Therefore. 1. Function block library 442 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.9. Basic Function Blocks 9.1 5/09 . When CV reaches PV.1 List of Application Function Blocks CTR .10. If CV is less than PV or reset input (RST) is 1. after CV reaches PV. 2MLR-CPUH Input CD: pulse input of Ring Counter PV: preset value RST: reset Output Q: Ring Counter output CV: current value Function a) CTR function block (Ring Counter) functions: current value (CV) increases with the rising pulse input (CD) and if. CD becomes 1. Application Function Blocks 10. output Q is 1. b) c) R1.Ring Counter Availability 2MLI-CPUU. output Q is 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 443 . then CV is 1. 0 to the input contact of CD referring to the above. Set %IX1.1.1.1.0 is depicted as follows a) b) c) 444 Define CTR function block as INS_CTR. Application Function Blocks 10. Set 10 to PV.1 is ON with 10-time rising pulse input of %IX1.1 5/09 . MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Function Blocks Time Chart Program Example Output %QX1.10.3. With 10-time rising input pulse of input contact. then Q (COUNT_Q) is 0 and output contact %QX1. If Q (COUNT_Q) is 1. R1. Application Function Blocks 10.1.0 is ON If the rising input pulse is loaded into input contact %IX1.3. compile and write it to PLC. When ‘Write’ is complete.10. List of Application Function Blocks d) e) f) g) h) i) j) k) l) Set %IX1. After a program is complete.3.1. Set random variable COUNT_NUM to CV Set random output variable COUNT_Q to Q. CV (COUNT_NUM) increases by 1 in number with the rising input pulse of %IX1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 445 .1.1. CV is 10 which is the same as PV and output variable COUNT_Q is 1.0 is OFF. output contact %QX1.0.10 to RST resetting CV.0. do ‘Mode Change’ (Stop > Run). OUT is OFF.10. Application Function Blocks 10. 446 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Function Blocks DUTY . OUT is always ON. If SON < 0 or SOFF < 0. If REQ is OFF.1. OUT is always OFF. If SON = 0. OUT: output is 1 during on scan time Function a) b) c) d) e) DUTY function block produces a pulse which is ON during the SON scan time and off during the SOFF scan time while REQ is ON.1 5/09 . If SON > 0 and SOFF = 0.Scan setting ON/OFF Availability 2MLI-CPUU. 2MLR-CPUH Input REQ: required to execute the function block SON: scan number to turn ON SOFF: scan number to turn OFF Output DONE: it is 1 when REQ is ON and both input variables are not less than 0. then DONE is OFF and OUT is 0. When ‘Write’ is complete. do ‘Mode Change’ (Stop > Run). List of Application Function Blocks Time Chart Program Example If input contact %IX1.3. compile and write it to PLC. a) b) c) d) e) f) g) R1.3.1.0 to output OUT.1.1.0 to REQ (the input contact) of DUTY. Set 4 to SOFF.10. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 447 .0 is ON during 3 scan times and off during 4 scan times. Application Function Blocks 10. Set %IX1. Set 3 to SON. After a program is complete. output contact %QX1.1 5/09 Define DUTY function block as DUTY_C. Set %QX1.0 is set. DONE is 1 if normally completed. 2MLR-CPUH Input REQ: requires to execute Function Block F_NO: Flash block no. EBREAD .3. when reading data R_NO: R area block number Output DONE: maintains 1 after normally working STAT: displaying error info Function a) Transfer 1 block (64Kbyte) of a configured R device to a block of flash area to save.0 is ON during 3 scan times and off during 4 scan times.10.Write R area data to Flash area Availability 2MLI-CPUU.1.1. 448 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Function Blocks h) If input contact %IX1.1 5/09 . output contact %QX1. Application Function Blocks 10.0 is ON. R1. List of Application Function Blocks b) If R_NO is 2 and over. if reading data from flash. In addition. the bit corresponds to F_NO of _RBLOCK_RD_FLAG is ON.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 449 . c) While processing an instruction. STAT = 2 while _ERR and _LER is ON. DONE = 0 and STAT = 5.10. DONE = 0 and STAT = 10 if Read/Write operation on a flash area is in progress during the operation is running. STAT = 1 and if F_NO is 32 and over. Application Function Blocks 10. 1 5/09 .10.Write R area data to Flash area Availability 2MLI-CPUU. Application Function Blocks 10. 450 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2MLR-CPUH Input REQ: To execute Function Block R_NO: block number of R device(internal RAM) E_NO: block number of flash area to save Output DONE: maintains 1 after normally working STAT: ERR info Function a) Transfer 1 block (64Kbyte) of a configured R device to a block of flash area to save.1. List of Application Function Blocks EBWRITE . DONE is 1 if normally completed. 1. STAT = 2 while _ERR and _LER is ON. DONE = 0 and STAT = 10 if Read/Write operation on a flash area is in progress during the operation is running. List of Application Function Blocks b) If R_NO is 2 and over. R1. the bit corresponding to F_NO of _RBLOCK_WR_FLAG is ON. DONE = 0 and STAT = 5. In addition.10. c) 3. Application Function Blocks 10. While processing an instruction.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 451 . if writing to flash. STAT = 1 and if F_NO is 32 and over. Load/Unload data to FIFO stack (First In First Out) Availability 2MLI-CPUU. it’s 1 DWORD TIME DINT UINT SINT LINT TOD Variable ANY type variable IN 452 STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL INT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.10.1 5/09 DT . 2MLR-CPUH Input REQ: To execute the function block IN: input data to be stored at FIFO stack LOAD: FB is ON the input mode. if it’s on. if it’s on. List of Application Function Blocks FIFO . it’s 1 EMTY: if FIFO stack is empty.1. Application Function Blocks 10. it’s the data from FIFO stack PNT: pointer for input data of FIFO stack FULL: if FIFO stack is full. UNLD: FB is ON the output mode. RST: pointer value reset FIFO : Array used as FIFO stack Output DONE: it’s 1 after first execution OUT: on output mode. If RST is loaded to FIFO. If Input and Output mode are set ON at the same time. List of Application Function Blocks FIFO OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding STRING from ANY types. If you want to keep the data of FIFO array variables and FIFO function block instance in case that power is OFF or power failure occurs. the rest elements are shifts. The stack number is the input array number set by In/Output variable FIFO. d) e) f) g) h) i) R1. But OUT at the output mode is retained in the converted input mode after output mode operation. OUT is 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 453 . or the number of pointers to be loaded.10. Reset functions are able to operate without REQ input. PNT value is decreased by 1. If it’s on the input mode. PNT shows the position of IN to be loaded next time. If data is unloaded from FIFO. set them as 'RETAIN'. it executes In/Output simultaneously. PNT is initialized as 0. *ARRAY OF ANY: excluding STRING from ARRAY_ANY types Function a) b) c) It loads IN to FIFO or unloads data from FIFO.1. then the output is the lowest element of stack. Application Function Blocks 10. and the element position of PNT is cleared (0). EMTY is ON and all the data of FIFO stack are cleared as 0. 1 5/09 .10. Application Function Blocks 10. List of Application Function Blocks Function Block FIFO_BOOL FIFO_BYTE FIFO_WORD FIFO_DWORD FIFO_LWORD FIFO_SINT FIFO_INT FIFO_DINT FIFO_LINT FIFO_USINT FIFO_UINT FIFO variable type BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT USINT UINT Description It functions as FIFO for BOOL-type data It functions as FIFO for BYTE-type data It functions as FIFO for WORD-type data It functions as FIFO for DWORD-type data It functions as FIFO for LWORD-type data It functions as FIFO for SINT-type data It functions as FIFO for INT-type data It functions as FIFO for DINT-type data It functions as FIFO for LINT-type data It functions as FIFO for USINT-type data It functions as FIFO for UINT-type data 454 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 455 .10. Application Function Blocks 10.1. List of Application Function Blocks Function Block FIFO_UDINT FIFO_ULINT FIFO_REAL FIFO_LREAL FIFO_TIME FIFO_DATE FIFO_TOD FIFO_DT FIFO variable type UDINT ULINT REAL LREAL TIME DATE TOD DT Description It functions as FIFO for UDINT-type data It functions as FIFO for ULINT-type data It functions as FIFO for REAL-type data It functions as FIFO for LREAL-type data It functions as FIFO for TIME-type data It functions as FIFO for DATE-type data It functions as FIFO for TOD-type data It functions as FIFO for DT-type data R1. 1. List of Application Function Blocks Program Example 456 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Application Function Blocks 10.10. load function is executed.10.15 is ON. a) b) c) d) If the input conditions (%IX1. 1111 is unloaded from FIFO stack and PNT_INDEX decreased by 1. %IX1. PNT_INDEX is initialized as 0 and EMTY_FLAG is ON. reset function is executed.0. List of Application Function Blocks FIFO_INT function block is used as the above. If input contact %IX1.1.1. Application Function Blocks 10. If input contact %IX1.1 is ON.1.1.1. The two examples of the above execute the same operation.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 457 .1. If input contact %IX1.0 is ON. Note that both instance names must be the same. FIFO_INT is executed.1. %IX1.1. The preceding figure illustrates a program which executes input and output functions at the same time using only one function block and the following figure illustrates a program which executes input and output functions independently to using input function and output function respectively.15) are on. unload function is executed. 5555 is loaded to FIFO stack and PNT_INDEX increased by 1. All the stack of FIFO is cleared as 0. R1. 10.1. List of Application Function Blocks LIFO .1 5/09 .Load/Unload data to LIFO stack (Last In First Out) Availability 2MLI-CPUU. Application Function Blocks 10. 2MLR-CPUH 458 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 459 DT Variable STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME . If LOAD and UNLD are on at the same time. input IN is produced as output OUT.10.1. it’s 1 EMTY: if LIFO stack is empty. it’s the data from LIFO stack PNT: pointer for input data of LIFO stack FULL: if LIFO stack is full. if it’s ON RST: pointer value reset LIFO : Array used as LIFO stack Output DONE: it’s 1 after first execution OUT: on output mode. Application Function Blocks 10. *ARRAY OF ANY: excluding STRING from ARRAY OF ANY types Function a) b) It loads IN to LIFO or unloads data from LIFO. R1. it’s 1 DWORD DINT UINT SINT LINT TOD INT ANY type variable IN LIFO OUT ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ *ANY: excluding STRING from ANY types. List of Application Function Blocks Input REQ: To execute the function block IN: input data to be stored at LIFO stack LOAD: FB is ON the input mode. if it’s ON UNLD: FB is ON the output mode. in the input mode converted after output mode operation.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . If load and unload signals are entered simultaneously. or the number of pointers to be loaded.1. The stack number is the array number set by In/Output variable LIFO. OUT is 0. If you want to keep the data of LIFO array variables and LIFO function block instance in case that power is OFF or power failure occurs. Reset functions are able to operate without REQ input.10. PNT is initialized as 0. unloaded data is deleted in stack and initialized as 0. PNT shows the position of IN to be loaded next time. IN is produced to OUT. However. OUT value of output mode is maintained g) h) i) j) k) FIFO Function Block LIFO_BOOL LIFO_BYTE LIFO_WORD LIFO_DWOR D LIFO_LWORD LIFO_SINT LIFO_INT LIFO_DINT LIFO_LINT 460 variable type BOOL BYTE WORD DWORD LWORD SINT INT DINT LINT Description It functions as LIFO for BOOL-type data It functions as LIFO for BYTE-type data It functions as LIFO for WORD-type data It functions as LIFO for DWORD-type data It functions as LIFO for LWORD-type data It functions as LIFO for SINT-type data It functions as LIFO for INT-type data It functions as LIFO for DINT-type data It functions as LIFO for LINT-type data R1. List of Application Function Blocks c) d) e) f) If data is unloaded from LIFO by unload function of LIFO_***. In case of input mode. EMTY is ON and all the data of LIFO stack are cleared as 0. Application Function Blocks 10. If it's on the input mode. set them as 'RETAIN'. output OUT is 0. If RST is loaded to LIFO. Application Function Blocks 10. List of Application Function Blocks LIFO_USINT LIFO_UINT LIFO_UDINT LIFO_ULINT LIFO_REAL LIFO_LREAL LIFO_TIME LIFO_DATE LIFO_TOD LIFO_DT USINT UINT UDINT ULINT REAL LREAL TIME DATE TOD DT It functions as LIFO for USINT-type data It functions as LIFO for UINT-type data It functions as LIFO for UDINT-type data It functions as LIFO for ULINT-type data It functions as LIFO for REAL-type data It functions as LIFO for LREAL-type data It functions as LIFO for TIME-type data It functions as LIFO for DATE-type data It functions as LIFO for TOD-type data It functions as LIFO for DT-type data R1.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 461 .10. 1.10. List of Application Function Blocks Program Example 462 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Application Function Blocks 10.1 5/09 . List of Application Function Blocks LIFO_TIME function block is used as the above. %IX1. T#55S is unloaded from LIFO stack and PNT_INDEX decreased by 1.15) are on.10. using input function and output function respectively. load function is executed. R1.0 is ON.1. unload function is executed.1. All the stack of LIFO is cleared as T#0S.1. %IX1. If input contact %IX1. LIFO_TM is executed.1.0. a) b) c) d) If the input conditions (%IX1. If input contact %IX1.1 is ON. The preceding figure illustrates a program which executes input and output functions at the same time using only one function block and the following figure illustrates a program which executes input and output functions independently.1. Note that both instance names must be the same. PNT_INDEX is initialized as 0 and EMTY_FLAG is ON. reset function is executed.1.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 463 . The two examples of the above execute the same operation. If input contact %IX1.15 is ON.1. Application Function Blocks 10. T#55S is loaded to LIFO stack and PNT_INDEX increased by 1. Application Function Blocks 10.10.1 5/09 .1. List of Application Function Blocks 464 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it is OFF S: produces an set bit array CUR_S: produces a current step number Function a) Setting of step controller group The instance name of function block is the name of step controlling group. Manu1.S[1]. it is ON.1. Examples of step contacts: S00. OUT function is enabled.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 465 . (Examples of FB declaration: S00. the function block is executed S/O: if 0. SET function is enabled.Step Controller (Step in order and jump of step) Availability Flags 2MLI-CPUU.10. Application Function Blocks 10. G01. SET: step number (0 ~ 99) Output DONE: without an error.S[1]) R1. if 1. List of Application Function Blocks SCON . If error is occurred or there is no request of execution. G01.S[1]. _LER Input REQ: if it’s 1. Manu1. 2MLR-CPUH _ERR . Application Function Blocks 10. even when several input conditions are ON. If Sxx. it returns to its first step.1.10.S[0] is ON. it keeps its state even when the input is OFF.. last programmed one is produced. If the present step number is ON.S[0] is ON. If Sxx. List of Application Function Blocks b) In case of SET function (ST_0/JP_1 = 0) In the same step controller group.1 5/09 . all the SET output is cleared. the present step number can be ON when the previous step number is ON. only one step number is ON. Only one step number is ON even when several input conditions are ON at the same time. If the present step number is ON. c) In case of JUMP function (ST_0/JP_1 = 1) In the same step controller group. 466 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If input conditions are ON at the same time. it keeps its state even when the input is OFF. If an error occurs. List of Application Function Blocks Flag Flag _ERR Description An error occurs when step setting (SET) is out of its range (0 ~ 99). DONE is OFF and step output maintains its previous step. − In case of SET function (ST_0/JP_1 = 0).10. using SC1 group R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 467 .1. Application Function Blocks 10. 1 5/09 .10. List of Application Function Blocks 468 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. Application Function Blocks 10. List of Application Function Blocks R1. Application Function Blocks 10.10.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 469 . List of Application Function Blocks 470 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Application Function Blocks 10.1.10. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 471 . Application Function Blocks 10. Even if IN is 0 before ET reaches PT.10. List of Application Function Blocks NO 1 2 3 4 %MX1 ON ON ON ON %MX2 OFF ON ON ON %MX3 OFF OFF ON ON %MX4 OFF OFF OFF ON S_O [1] ○ S_O [23] S_O [98] S_O [0] ○ ○ ○ TMR . ET keeps its value. If IN is 1 again.1 5/09 When IN is 1. elapsed time is produced at ET integrating its previous value. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time RST: reset Output Q: timer output ET: elapsed time Function a) b) R1.1.Integration Timer Availability 2MLI-CPUU. elapsed time is produced at ET. Q and ET are 0. Program Example 472 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Application Function Blocks 10.10. Q is 1. List of Application Function Blocks c) d) Time Chart If ET reaches PT.1.1 5/09 . If RST is 1. Application Function Blocks 10.1. If T_TMR is 1.TMR with Flicker Availability 2MLI-CPUU.12 is 1. elapsed time ET_TIME and output variable TIMER_OK are all cleared. TMR_FLK . If input contact %IX1. Elapsed time is produced at ET_TIME after T_TMR is 1. output variable TIMER_OK is 1. elapsed time is produced at ET_TIME integrating its previous value.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 473 . List of Application Function Blocks a) b) c) d) e) If 10 seconds passes after input variable T_TMR is 1. ET_TIME keeps its value even if T_TMR is 0 before ET_TIME reaches its preset time 10 seconds.1.10. 2MLR-CPUH R1. it is executed with its previous data. it stops its function of either ON or OFF operation and keeps its time. After setting time which is set by ON. Q becomes 1 and Q maintains its value during ON setting time. Application Function Blocks 10.10. 474 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. List of Application Function Blocks Input IN: operation condition for Timer ON: ON setting time of timer OFF: OFF setting time of timer RST: reset Output Q: Timer output ET: elapsed time Function a) b) c) d) e) Time Chart As soon as IN gets 1. If IN is 0. output Q is always 0.1. Output Q is 0 while IN is 0. If ON is 0.1 5/09 . Q is 0 during the time which is set by OFF. If IN is 1 again. then it keeps its time and output contact %QX1. If input variable T_TMR_FLK is 0.1. Application Function Blocks 10.1. R1. If input %IX1. Output contact %QX1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 475 . List of Application Function Blocks Program Example a) b) c) d) e) f) If input variable T_TMR_FLK is 1.10.5 is 1 during 5 seconds set by ON after input variable T_TMR_FLK is 1.5 are all cleared.5 is 0. it is executed again. TON time (ON) when Q is 1 and TOF time (OFF) when Q is 0 are produced at ET_TIME by turns while T_TMR_FLK is 1.1. If T_TMR_FLK is 1. elapsed time ET_TIME and output contact %QX1.1.1.1.12 is 1. Output contact %QX1. TMR_FLK function block is executed.5 is 0 during 2 seconds set by OFF after 5 seconds set by ON. 1 5/09 . ET keeps its value. If RST is 1. Even if IN is 0 before ET reaches PT. List of Application Function Blocks TMR_UINT .10. 476 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.TMR with Integer setting Availability 2MLI-CPUU. If IN is 1 again.1. Application Function Blocks 10. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time UNIT: time unit of setting time RST: reset input Output Q: timer output ET: elapsed time Function a) b) c) d) e) Elapsed time is produced at ET after IN is 1. Setting time is PT x UNIT (ms). elapsed time is increased. Q is 1 when elapsed time reaches preset time. Q and ET are 0. Application Function Blocks 10. Elapsed time is produced at ET_TIME after input variable T_TMR is 1. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 477 .10. Output variable TIMER_OK is 1. Even if T_TMR is 0 before ET_TIME reaches preset time 10 seconds.1. ET_TIME keeps its value.1 5/09 Setting time is PT x UNIT[ms] = 10 x 1000[ms] = 10[s]. if 10 seconds passes after input variable T_TMR is 1. List of Application Function Blocks Time Chart Program Example a) b) c) d) R1. List of Application Function Blocks e) f) If input variable T_TMR is 1 again.1.1. elapsed time ET_TIME and output contact TIMER_OK are all cleared.5 is 1.1 5/09 .10. TOF_RST . elapsed time is produced at ET integrating its previous value. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time RST: reset Output Q: Timer output ET: elapsed time 478 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Application Function Blocks 10.Delay Timer is able to output OFF in operation Availability 2MLI-CPUU. If input contact %IX1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 479 . Q and ET are 0. Application Function Blocks 10. Elapsed time is produced at ET after IN is 0. If RST is 1. Program Example R1.10. List of Application Function Blocks Function a) b) c) d) Time Chart Q is 1 when IN is 1 and Q is 0 when preset time (PT) elapses after IN became 0. Elapsed time is 0 if IN is 1 before ET reaches PT.1. List of Application Function Blocks a) b) c) d) If input variable T_TOF_RST is 1. TOF_RST is initialized. If T_TOF_RST is 1 within 10 seconds after it turns off. And TIMER_OK is 0 when 10 seconds elapse after T_TOF_RST became 0. TOF_RST Function Block does not produce any array index error as long as the contact is OFF although function block is operating 480 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.10. array index error occurs only when the contact is ON. Elapsed time is produced at ET_TIME. ATTENTION TOF_RST Function Block keeps operating after the contact is ON until its operation is complete. In case of a variable using array index.1 5/09 . Therefore. If input contact %IX1.1.15 is 1. output variable TIMER_OK is 1. Application Function Blocks 10.1. elapsed time ET_TIME and output contact TIMER_OK are all cleared. If RST is 1. Time Chart R1. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time UNIT: time unit of setting time RST: reset Output Q: Timer output ET: elapsed time Function a) b) c) d) e) • 1. ET becomes 0 again. if setting time (PT) passes after IN is 0. List of Application Function Blocks TOF_UINT . 4. Q is 1 when IN is 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 481 . 2. Setting time is PT x UNIT (ms). 5. 2MLI-CPUU.10.1.OFF Timer of Integer setting Availability . 3. And Q is 0. Elapsed time is produced at ET after IN is 0. Q and ET are 0. If IN is 1 before ET reaches PT. Application Function Blocks 10. TOF_UINT is initialized. If input variable T_TOF is 1. if 10 seconds passes after T_TOF is 0. List of Application Function Blocks Program Example a) b) c) d) e) Preset time PT x UNIT[ms] = 10 x 1000[ms] = 10[s]. Elapsed time is produced at ET_TIME. Application Function Blocks 10.1. TIMER_OK is 0. If T_TOF becomes 1 again within 10 seconds.1 5/09 . output variable TIMER_OK is 1.5 is 1.10. If input contact %IX1. TIMER_OK and ET_TIME are all cleared 482 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. ON Timer of Integer setting Availability 2MLI-CPUU. In case of a variable using array index. array index error occurs only when the contact is ON.10. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time UNIT: time unit of setting time R1. Therefore. TOF_UINT Function Block does not produce any array index error as long as the contact is OFF although function block is operating. Application Function Blocks 10.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 483 .1. List of Application Function Blocks ATTENTION TOF_UINT Function Block keeps operating after the contact is ON until its operation is complete. TON_UINT . MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . if IN is 0 before ET reaches PT. List of Application Function Blocks Output Q: timer output ET: elapsed time Function a) b) c) d) Elapsed time is produced at ET after IN is 1. Elapsed time ET is 0. Preset time is PT x UNIT[ms].1.10. Application Function Blocks 10. • Time Chart Program Example a) 484 Preset time is PT x UNIT[ms] = 10 x 1000[ms] = 10[s]. if IN is 0 after Q is 1. Q is 0. Pulse timer is able to OFF output of contact Availability 2MLI-CPUU. output variable TIMER_OK is 1. If T_TON is 0 after TIMER_OK is 1. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time RST: reset R1.1.10. TP_RST . TIMER_OK and ET_TIME are 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 485 . Application Function Blocks 10. ET_TIME is 0. List of Application Function Blocks b) c) d) e) If 10 seconds passes after input variable T_TON is ON. If T_TON is 0 before elapsed time ET_TIME reaches 10 seconds. Elapsed time is produced at ET_TIME after input variable T_TON is ON. 1. keeps its value at PT and is cleared when IN is 0.10. ET increases its value from when IN is 1. timer output Q is 0.1 5/09 . 486 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Application Function Blocks 10. Q is 1. And if elapsed time reaches preset time. It doesn't matter whether IN changes its state or not while timer output Q is 1 (during a pulse output). output Q and ET are 0. If RST is 1. List of Application Function Blocks Output Q: timer output ET: elapsed time Function a) b) c) d) If IN is 1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 487 . Application Function Blocks 10.1.10. List of Application Function Blocks • Time Chart Program Example R1. If input contact %IX1.1.12 is 1. TP_RST Function Block does not produce any array index error as long as the contact is OFF although function block is operating. array index error occurs only when the contact is ON. b) c) ATTENTION TP_RST Function Block keeps operating after the contact is ON until its operation is complete. TIIMER_OK and ET_TIME are all cleared. TIMER_OK is 0. Once TP_RST timer is executed. output variable TIMER_OK is 1. input T_TP_RST doesn't matter during 10 seconds. Therefore. ET_TIME value increases and stops at 10S. List of Application Function Blocks a) If input variable T_TP_RST is 1. And if T_TP_RST is 0.1 5/09 . 488 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. ET_TIME becomes 0. In case of a variable using array index.10. Application Function Blocks 10. And 10 seconds later. R1. If RST is 1. output Q and ET are 0. Application Function Blocks 10.1. keeps its value at PT and is cleared when IN is 0. It doesn't matter whether IN changes its state or not while timer output Q is 1 (during a pulse output).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 489 . 2MLR-CPUH Input IN: operation condition for Timer PT: preset time UNIT: time unit of setting time RST: reset Output Q: timer output ET: elapsed time Function a) b) c) d) e) If IN is 1. And if elapsed time reaches preset time.Pulse Timer with Integer setting Availability 2MLI-CPUU. timer output Q is 0. ET increases its value from when IN is 1. Q is 1. Preset time is PT x UNIT[ms]. List of Application Function Blocks TP_UINT .10. ET_TIME value increases and stops at 1. And if T_TP is 0. input T_TP doesn't matter.5 is 1.000. it is 0. List of Application Function Blocks • Time Chart Program Example a) b) Preset time is PT x UNIT[s] = 10 x 100[ms] = 1[s].10. output variable TIMER_OK is 1.1. Application Function Blocks 10. TIMER_OK and ET_TIME are all cleared. If input variable T_TP is 1. Once TP_UINT timer is executed. TIMER_OK is 0.1. If input contact %IX1. c) d) 490 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. And 10 seconds later.1 5/09 . Application Function Blocks 10. Therefore. TRTG Retriggerable Timer Availability 2MLI-CPUU. List of Application Function Blocks ATTENTION TP_UINT Function Block keeps operating after the contact is ON until its operation is complete. In case of a variable using array index. TP_UINT Function Block does not produce any array index error as long as the contact is OFF although function block is operating.10.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 491 . 2MLR-CPUH Input IN: operation condition for Timer PT: preset time RST: reset R1. array index error occurs only when the contact is ON.1. 1 5/09 . Time Chart Program Example 492 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If IN turns on again before elapsed time reaches preset time. Q is 0.10.1. then elapsed time is set as 0 and increased again. timer output Q is 0. And if it reaches PT. If RST is 1. Application Function Blocks 10. And if elapsed time reaches preset time. List of Application Function Blocks Output Q: timer output ET: elapsed time Function a) b) c) • Q is 1 as soon as IN becomes 1. timer output Q and elapsed time ET are 0. TIMER_OK and ET_TIME are all cleared. TIMER_OK is 1 during 10 seconds even when T_TRTG becomes 0 from 1. TRTG Function Block does not produce any array index error as long as the contact is OFF although function block is operating. In case of a variable using array index. If T_TRTG becomes 1 from 0 after timer is executed. ET_TIME is set as 0 and increased again. Application Function Blocks 10. ET_TIME value increases and stops at T#10S. List of Application Function Blocks a) TIMER_OK is 1 during 10 seconds after input variable T_TRTG becomes 1 from 0. b) c) d) ATTENTION TRTG Function Block keeps operating after the contact is ON until its operation is complete. R1. And it is 0 when T_TRTG is 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 493 .10.15 is 1.1.1. array index error occurs only when the contact is ON. Therefore. If input contact %IX1. Application Function Blocks 10. 2MLR-CPUH Input IN: operation condition for Timer PT: preset time UNIT: time unit of setting time RST: reset Output Q: timer output ET: elapsed time Function a) b) c) d) Q is 1 as soon as IN becomes 1. If RST is 1. Q is 0. Preset time is PT x UNIT[ms].1 5/09 . And if it reaches PT. timer output Q is 0. timer output Q and elapsed time ET are 0.10. List of Application Function Blocks TRTG_UINT .1. 494 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. And if elapsed time reaches preset time. If IN turns on again before elapsed time reaches preset time. then elapsed time is set as 0 and increased again.Retriggerable Timer with Integer setting Availability 2MLI-CPUU. ET_TIME is set as 0 and increased again.1. ET_TIME value increases and stops at 10000.1.5 is 1. If input contact %IX1. c) d) e) R1. TIMER_OK is 1 during 10 seconds after input variable T_TRTG becomes 1 from 0. List of Application Function Blocks • Time Chart Program Example a) b) Preset time is PT x UNIT[ms] = 10 x 1000[ms] = 10[s].10. Application Function Blocks 10. And it is 0 when T_TRTG is 0. If T_TRTG becomes 1 from 0 after timer is executed. TIMER_OK and ET_TIME are all cleared.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 495 . TIMER_OK is 1 during 10 seconds even when T_TRTG becomes 0 from 1. Application Function Blocks 10.1 5/09 . Therefore.10. TRTG_UINT Function Block does not produce any array index error as long as the contact is OFF although function block is operating. array index error occurs only when the contact is ON. In case of a variable using array index. 496 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. List of Application Function Blocks ATTENTION TRTG_UINT Function Block keeps operating after the contact is ON until its operation is complete. 11. motion control function blocks and positioning function blocks.Station No.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 497 . P2PSN .1 Communication Function Blocks This chapter describes communication function blocks. 2MLR-CPUH Input REQ: To execute the function block P_NUM: P2P number BL_NUM: block number NUM: station number Output DONE: maintains 1 after the first operation STAT: completion and ERR info R1. refer to User’s Manual of the respective communication block. setting Availability 2MLI-CPUU. Communication and Special Function Blocks 11. For the details of communication function blocks. special function blocks. Communication Function Blocks Function d) e) f) Error a) If an error occurs. STAT_NUM 1 P2P no. Communication modules: FDEnet. 0~31 > 498 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. Communication and Special Function Blocks 11. Snet. Message Description If a value except P_NUM(1~8) is set If a value except BL_NUM(0~63) 2 Block No. setting is set < In case of Snet. 0~31 > 4 5 6 No slot Module inconsistency Module inconsistency Not a communication module communication module not You can change the station number of P2P destination while running by using P2PSN instruction. Change the block station number of P2P BL_NUM block of P_NUM to NUM. it displays the error number in STAT. when it is set out of value NUM(0~63) < In case of Snet. It is occurred.11.1 5/09 . setting available in the instruction 7 Error setting of station No. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 499 DT . Communication and Special Function Blocks 11. Communication Function Blocks P2PRD .Read area setting Availability 2MLI-CPUU. 2MLR-CPUH Input REQ: requires to execute the function block P_NUM: P2P number BL_NUM: block number VAL_NUM: variable number VAL_SIZE: variable size DEV: device(input only for a direct variable) Output DONE: maintains 1 after the first operation STAT: completion and ERR info DWORD DINT UINT SINT LINT ANY Type Variable TOD Variable DEV STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ ○ R1.11.1. FDEnet. Communication and Special Function Blocks 11. 0~31 > If a variable number not allowed in P2P parameter set in PD is input No communication module Communication module not available in the instruction MODBUS offset can not be input(ex. block and variable by using P_NUM. VAL_SIZE means variable size and if individual. Because DEV can be input only 500 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it changes the variable size and device to VAL_SIZE(if continuous. Error a) If it is out of the allowable scope of P2P parameter set in PD.11. Communication Function Blocks Function a) P2PRD instruction changes the variable size and READ device area of P2P parameter block. Snet. (both individual/continuous reads are changeable) b) After designating P2P parameter. VAL_NUM. the error number occurs as follows. where DEV can be input only for a direct variable(ex. Message P2P number setting error Description If a value except P_NUM(1~8) is set If a value except BL_NUM(0~63) is set 2 Block number setting error < In case of Snet. h10000). Communication modules: FEnet.1. %MW100).1 5/09 STAT 1 3 Variable number setting error 4 5 6 No slot Module inconsistency Module inconsistency 10 MODBUS setting error . it means the size of variable type). BL_NUM. Communication Function Blocks STAT Message Description for a direct variable If a variable size not allowed in P2P parameter set in PD is input If a variable type not allowed in P2P parameter set in PD is input 11 Variable size setting error 12 Data type setting error P2PWR .Write area setting Availability 2MLI-CPUU. 2MLR-CPUH Input REQ: requires to execute the function block P_NUM: P2P number BL_NUM: block number VAL_NUM: variable number R1.1.11.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 501 . Communication and Special Function Blocks 11. block and variable by using P_NUM. Snet. FDEnet. Communication and Special Function Blocks 11. VAL_NUM. it changes the variable size and device to VAL_SIZE(if continuous. it means the size of variable type). If it is out of the allowable scope of P2P parameter set in PD. Communication modules: FEnet. Error 1. BL_NUM. (both individual/continuous reads are changeable) b) After designating P2P parameter. 0~31> 502 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. VAL_SIZE means variable size and if individual. STAT 1 Message P2P number setting error Description If a value except P_NUM(1~8) is set If a value except BL_NUM(0~63) is set 2 Block number setting error <In case of Snet.11. %MW100). where DEV can be input only for a direct variable(ex.1 5/09 DT .1. Communication Function Blocks VAL_SIZE: variable size DEV: device(input only for a direct variable) Output DONE: maintains 1 after the first operation STAT: completion and ERR info DWORD DINT UINT SINT LINT ANY Type Variable TOD Variable DEV STRING LWORD WORD LREAL UDINT USINT ULINT BOOL DATE BYTE REAL TIME INT ○ ○ ○ ○ ○ Function a) P2PRD instruction changes the variable size and WRITE device area of P2P parameter block. the error number occurs as follows. 1. Because DEV can be input only for a direct variable If a variable size not allowed in P2P parameter set in PD is input If a variable type not allowed in P2P parameter set in PD is input 11 Variable size setting error 12 Data type setting error R1. Communication and Special Function Blocks 11.11. Communication Function Blocks STAT Message Description If a variable number not allowed in P2P parameter set in PD is input No communication module Communication module not available in the instruction MODBUS offset can not be input(ex. 3 Variable number setting error 4 5 6 No slot Module inconsistency Module inconsistency 10 MODBUS setting error h10000).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 503 . 1 5/09 . UINT.Read special module data Availability 2MLI-CPUU.11.2. DINT and UDINT types are available Function a) Read data from a configured special module. WORD. Special Function Block 11. 2MLR-CPUH Input REQ: executes the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Module address 512(h200) ~ 1023(h3FF) Output DONE: 1 output in case of normal execution STAT: Error information DATA: Data read from a module *ANY: Among ANY types. Communication and Special Function Blocks 11. DWORD. INT. 504 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.2 Special Function Block GET . 2. Read data as much as UNIT from the configured module address (MADDR).Write data to a special module Availability 2MLI-CPUU.11. 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting R1. Special Function Block Function Block GET_WORD GET_DWORD GET_INT GET_UINT GET_DINT GET_UDINT Output(ANY) type WORD DWORD INT UINT DINT UDINT Description Read data as much as WORD from the configured module address (MADDR). PUT . Read data as much as INT from the configured Module address (MADDR). Communication and Special Function Blocks 11. Read data as much as UDINT from the configured module address (MADDR). Read data as much as DWORD from the configured module address (MADDR).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 505 . Read data as much as DINT from the configured module address (MADDR). Save UDINT data into the configured module address (MADDR). Special Function Block MADDR: Module address DATA: data to save into a module Output DONE: 1 output in case of normal execution STAT: Error information *ANY: Among ANY types.2. Save DINT data into the configured module address (MADDR). DWORD. Communication and Special Function Blocks 11. Save INT data into the configured module address (MADDR). Input(ANY) type WORD DWORD INT UINT DINT UDINT Description Save WRD data into the configured module address (MADDR). Save UNIT data into the configured module address (MADDR).1 5/09 . Save DWORD data into the configured module address (MADDR). DINT and UDINT types are available Function a) Read data from the configured special module. INT. USINT.11. Function Block PUT_WORD PUT_DWORD PUT_INT PUT_UINT PUT_DINT PUT_UDINT 506 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. WORD. Communication and Special Function Blocks 11. Special Function Block ARY_GET .11.Read special module data(Array) Availability 2MLI-CPUU.2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 507 . 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Module address M_IDX: distance away from MADDR DEST: array variable to save read data D_IDX: Start index of DEST variable CNT: No. of data to read Output DONE: 1 output in case of normal execution STAT: Error information R1. WORD. UINT.2. Communication and Special Function Blocks 11. Read data as much as CNT in UINT from the configured module address (MADDR). DWORD.11. INT.1 5/09 . Function Block ARY_GET_WORD ARY_GET_DWORD ARY_GET_INT ARY_GET_UINT ARY_GET_DINT ARY_GET_UDINT 508 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Output(DEST) Type WORD DWORD INT UINT DINT UDINT Description Read data as much as CNT in WORD from the configured module address (MADDR) Read data as much as CNT in DWORD from the configured module address (MADDR) Read data as much as CNT in INT from the configured module address (MADDR). Special Function Block *ARRAY OF ANY: among ANY types. Read data as much as CNT in DINT from the configured module address (MADDR). DINT and UDINT types are available Function a) Read data from the configured special module. Read data as much as CNT in UDINT from the configured module address (MADDR). 2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 509 . Special Function Block ARY_PUT .Write special module data(Array) Availability 2MLI-CPUU. Communication and Special Function Blocks 11. of data to read Output DONE: 1 output in case of normal execution STAT: Error information R1.11. 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Module address M_IDX: distance away from MADDR DEST: Data array variable to save D_IDX: Start index of DEST variable CNT: No. UINT. Input(DEST) type WORD DWORD INT UINT DINT UDINT Description Save data as much as CNT in WORD into the configured module address (MADDR) Save data as much as CNT in DWORD into the configured module address (MADDR) Save data as much as CNT in INT into the configured module address (MADDR). Save data as much as CNT in UINT into the configured module address (MADDR) Save data as much as CNT in DINT into the configured module address (MADDR) Save data as much as CNT in LDINT into the configured module address (MADDR) Function Block ARY_PUT_WORD ARY_PUT_DWORD ARY_PUT_INT ARY_PUT_UINT ARY_PUT_DINT ARY_PUT_UDINT 510 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. WORD. DINT and UDINT types are available Function a) Read data from the configured special module. Special Function Block *ARRAY OF ANY: among ANY types. DWORD.11. Communication and Special Function Blocks 11. INT.2.1 5/09 . 11. Communication and Special Function Blocks 11.3. 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Module address 512(0x200) ~ 1023(0x3FF) Output DONE: 1 output in case of normal execution STAT: Error information DATA: Data read from a module Function a) Read data from the shared read memory address MADDR of the configured motion control module.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 511 .3 Motion Control Function Block GETM . Motion Control Function Block 11. Output(DATA) type DWORD Description Read data as much as DWORD from the configured module address (MADDR). Function Block GETM_DWORD R1.Read motion control module data Availability 2MLI-CPUU. Function Block PUT_DWORD 512 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .3.11.Write data into a special module(motion module) Availability 2MLI-CPUU. Communication and Special Function Blocks 11. Motion Control Function Block PUTM . DATA type DWORD Description Save DWORD data into the configured module address (MADDR). 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Module address 0(0x00) ~ 511(0x1FF) DATA: data to save into a module Output DONE: 1 output in case of normal execution STAT: Error information Function a) Save data into the shared write memory MADDR of the configured motion control module. 1 5/09 Read data as much as the size from the shared read memory MADDR of the configured motion control module. Communication and Special Function Blocks 11. 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Address to start reading 512(0x200) ~ 1023(0x3FF) SIZE: No. Motion Control Function Block ARY_GETM .11.Read motion control module data (Array) Availability 2MLI-CPUU.3. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 513 . of data to read (1 ~ 512) Output DONE: 1 output in case of normal execution STAT: Error information DATA: Array variable to save read data (ARRAY of DWORD) Function a) R1. of data to write (1 ~ 512) Output DONE: 1 output in case of normal execution STAT: Error information 514 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . 2MLR-CPUH Input REQ: execute the function in case of 1 BASE: Base position setting SLOT: Slot position setting MADDR: Address to start writing. Communication and Special Function Blocks 11.3.Write motion control module data(Array) Availability 2MLI-CPUU.11. Motion Control Function Block ARY_PUTM . 0(h0) ~ 511(h1FF) DATA: Array variable to save data (ARRAY OF DWORD) SIZE: No. 1 5/09 ORG FLT DST IST LIN CIN SST VTP PTV STP SKP SSP SSS POR SOR PSO NMV INC RTP SNS SRS MOF Description Homing Start Floating Origin Setting Direct Start Indirect Start Linear interpolation run Circular interpolation run Simultaneous Start Speed/Position switching Position/Speed switching Decelerating stop Skip run Position synchronization Speed synchronization Position Override Speed Override Positioning Speed override Continuous run Inching Start Return to the position before manual run Change run step number Change repeat step number Cancel M code MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Condition Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Time (㎳) 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 515 . Motion Control Function Block Function a) Save data as much as the size to the shared write memory addresses MADDR of the configured motion control module.3. Name 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 R1. Communication and Special Function Blocks 11.11. 11.02 0.02 0.1 5/09 .3.000 0. Communication and Special Function Blocks 11.02 5 5 516 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Motion Control Function Block Name 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 PRS ZONE EPRE TEA ATEA SBP SEP SHP SMP SIP SCP SMD EMG RST PST WRT CRD SRD ENCRD JOG MPG Description Preset the current position Zone Output allowed/prohibited Preset encoder value Single teaching Plural teaching Basic parameter teaching Extension parameter teaching Homing parameter teaching Manual run parameter teaching External signal parameter teaching Common parameter teaching Run data teaching Emergency stop Error reset/Output prohibition cancel Point run Save parameter/operation data Read Run Info Read Run State Read Encoder Value Jog Run Manual pulse generator (MPG) run Condition Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Edge Level Level Level Level Edge Time (㎳) 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 1. Motion Control Function Block APM_ORG .1 5/09 .3. Communication and Special Function Blocks 11. 2:Z axis Output DONE: maintains 1 after the first operation STAT: output error number that occurs while executing the function block Function a) b) The instruction commands origin return run to the positioning module. compensation. 1:Y axis. Instruct origin return instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. Run instruction to find origin by means of the direction. speed (high speed/low speed) and dwell time set in origin return parameter of each axis. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 517 c) R1.Homing Start Availability 2MLI-CPUU.11. If other value but the value is set. instead of executing return of a machine.11. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1:Y axis. Motion Control Function Block d) It can set an axis to instruct and the following value.3. Communication and Special Function Blocks 11. 1: Y axis. As the command used to set the current position as origin. 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. it produces “Error6.1 5/09 518 .Floating origin setting Availability 2MLI-CPUU.” 0: X axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. Function a) b) The instruction commands executing floating origin setting to the positioning module. 2: Z axis APM_FLT . the address configured in origin return address is set as the current position. 11. 1: Y axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module R1. 2: Z axis d) APM_DST .” 0: X axis. It can set an axis to instruct and the following value.Direct Start Availability 2MLI-CPUU. it produces “Error6. If other value but the value is set.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 519 . Motion Control Function Block c) It commands floating origin command to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). Communication and Special Function Blocks 11.3. /dec./dec.000[pps] DWELL: dwell time 0 ~ 50000[ms] MCODE: Setting M Code POS/SPD: Setting position control/speed control 0 : position control./dec. 2:Z axis ADDR: Setting target position address -2.11. Communication and Special Function Blocks 11.483.483.000.3. time 4 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block Function a) The instruction commands direct run to the positioning module. 520 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.648 ~ +2.147. time 3 3 : acc.647 SPEED: Setting target speed Open Collector : 1 ~ 200.1 5/09 . 1 : relative TIME_SEL: setting acc. time 2 2 : acc. 1:Y axis./dec. time number − − − − 0 : acc. 1 : speed control ABS/INC: Setting absolute/relative coordinates 0 : absolute.147./dec.000[pps] Line Driver : 1 ~ 1. Motion Control Function Block AXIS: Setting an axis to instruct 0:X axis. time 1 1 : acc. 11. Communication and Special Function Blocks 11. it generates “Error11” to STAT. d) R1. Motion Control Function Block b) c) It used when running by designating the run step number of the axis configured as run data. it produces “Error6. DWELL and TIME_SEL are out of the range.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 521 . If other value but the value is set.3.” 0: X axis. 1: Y axis. It can set an axis to instruct and the following value. It commands direct run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). 2: Z axis If the value set in SPEED. 1:Y axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis.11.Indirect Start Availability 2MLI-CPUU. Function a) b) The instruction commands direct run to the positioning module. Communication and Special Function Blocks 11. 522 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .3. Motion Control Function Block APM_IST . It used when running by designating the run step number of the axis configured as run data. 2:Z axis STEP: Step number to run 0 ~ 400 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. 11. it generates “Error11” to STAT.” 0: X axis. If other value but the value is set. It can set an axis to instruct and the following value. If 0 is set in STEP. it produces “Error6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 523 . 1: Y axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module LIN_AXIS: Setting interpolation run axis 3 : X/Y axis 5 : X/Z axis R1.3.Linear interpolation run Availability 2MLI-CPUU. 2: Z axis If the value set in STEP is out of the range(0 ~ 400). Communication and Special Function Blocks 11. Motion Control Function Block c) It commands indirect run to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). d) APM_LIN . it operates the current step. ” It can be set by setting each bit as follows. Motion Control Function Block 6 : Y/Z axis 7 : X/Y/Z axis STEP: Step number to run 0 ~ 400 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. It commands linear interpolation run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It commands for linear interpolation run in the 2 or 3 axes positioning module. it produces “Error6. Communication and Special Function Blocks 11. it generates “Error11” to STAT. it operates the current step.1 5/09 .11. 524 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function a) b) c) The instruction commands linear interpolation instruction to the positioning module. If other value but the preset value is set in LIN_AXIS. 2 Z axis 1 Y axis 0 X axis d) 15 ~ 4 - If the value is out of the range set in STEP (0 ~ 400). If 0 is set in STEP.3. Motion Control Function Block APM_CIN .Circular interpolation run Availability 2MLI-CPUU.11. Communication and Special Function Blocks 11.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 525 . 1:Y axis. 2:Z axis SLV_AXIS: Setting linear interpolation sub axes 0:X axis. 1:Y axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module MST_AXIS: Setting circular interpolation main axis 0:X axis. 2:Z axis STEP: Step number to run 0 ~ 400 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block.3. R1. it operates the current step. Motion Control Function Block Function a) b) c) The instruction commands circular interpolation run instruction to the positioning module. Communication and Special Function Blocks 11. It commands for circular interpolation run in 2 or 3 axes positioning module. it generates “Error11” to STAT. 2: Z axis e) SLV_AXIS sets the sub axis of circular interpolation run and the following values can be set. 2: Z axis If the values of MST_AXIS and SLV_AXIS are set out of the range. 1: Y axis.3. 0: X axis. 1: Y axis. MST_AXIS sets the main axis of circular interpolation run and the following values can be set.” If the value is out of the range set in STEP (0 ~ 400). 0: X axis.11. it generates “Error6. If 0 is set in STEP. d) 526 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . It commands circular interpolation run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). Simultaneous Start Availability 2MLI-CPUU.3.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 527 . Communication and Special Function Blocks 11.11. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module SST_AXIS : Setting simultaneous run axes − − − − 3 : X/Y axis 5 : X/Z axis 6 : Y/Z axis 7 : X/Y/Z axis X_STEP: Setting the simultaneous run step number of X axis(0 ~ 400) Y_STEP: Setting the simultaneous run step number of Y axis(0 ~ 400) Z_STEP: Setting the simultaneous run step number of Z axis(0 ~ 400) Output DONE: maintains 1 after the first operation R1. Motion Control Function Block APM_SST . Function a) b) c) The instruction commands simultaneous run instruction to the positioning module.” It can be set as follows by setting each bit. APM_VTP . If 0 is set in X_STEP.11.Speed/Position switching Availability 2MLI-CPUU. Y_STEP and Z_STEP are out of the range (0 ~ 400). 2MLR-CPUH 528 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If the value is set out of the range to SST_AXIS.3. It is executed when simultaneously running 2 or 3 axes It commands the simultaneous run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). 15 ~ 4 2 Z axis 1 Y axis 0 X axis d) e) f) g) Set the step number run by X axis. Motion Control Function Block STAT: Output the error number that occurs while executing the function block. Y_STEP and Z_STEP. it generates “Error11” to STAT. Y axis and Z axis simultaneously to X_STEP. Y_STEP and Z_STEP . If the value set in X_STEP. Communication and Special Function Blocks 11.1 5/09 . it operates the current step. it generates “Error6. the origin is determined and it moves to the target position by the previous speed control. A configured axis converts speed control to position control if receiving speed/position control instruction while being run by speed control run. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. As soon as the instruction is executed. It can set an axis to instruct and the following value. If other value but the value is set. 1:Y axis. Communication and Special Function Blocks 11. It commands speed/position control instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 529 . 1: Y axis. it produces “Error6. 2: Z axis e) R1. Function a) b) c) d) The instruction commands speed/position control conversion instruction to the positioning module.” 0: X axis. 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. completing positioning.3.11. Motion Control Function Block APM_PTV . 530 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis.3.Position/Speed switching Availability 2MLI-CPUU. As soon as the instruction is executed.1 5/09 . A configured axis converts speed control to position control if receiving position/speed control instruction while being run by speed control run. Function a) b) c) The instruction commands position/speed control conversion instruction to the positioning module. completing positioning. 1:Y axis. the origin is not determined and it moves to the target position by the previous speed control.11. Communication and Special Function Blocks 11. If other value but the value is set.535 : 1 ~ 65./dec. Motion Control Function Block d) It commands speed/position control instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module).535ms R1. it produces “Error6.Decelerating stop Availability 2MLI-CPUU. Communication and Special Function Blocks 11. 1:Y axis.” 0: X axis. time applied when starting running 1 ~ 65. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis.11. It can set an axis to instruct and the following value.3. 2: Z axis e) APM_STP . 2:Z axis DEC_TIME: Decelerating stop time 0: Acc.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 531 . 1: Y axis. 3.11. It can set an axis to instruct and the following value. 2: Z axis e) APM_SKP .1 5/09 . If other value but the value is set.Skip run Availability 2MLI-CPUU.” 0: X axis. it produces “Error6. 1: Y axis. 2MLR-CPUH Input REQ: requires to execute the function block 532 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Motion Control Function Block Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. It command decelerating stop to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It is used to exit each speed/position synchronization in speed synchronization or position synchronization. Function a) b) c) d) Instruction executing decelerating stop to the positioning module It decelerates and stops when it receives the stop command while running by run data and resumes running by run command. Communication and Special Function Blocks 11. 11. Communication and Special Function Blocks 11.3. Motion Control Function Block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) d) The instruction commands skip run instruction to the positioning module. It is executed when moving to the next step without run step. Every time the instruction is executed, it skips the current run step and starts the next run step. It commands skip run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 533 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_SSP - Position synchronization Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis STEP: Step number to run 0 ~ 400 MST_AXIS: Setting position synchronization main axis 0:X axis, 1:Y axis, 2:Z axis MST_ADDR: Setting main axis to execute position synchronization -2,147,483,648 ∼ 2,147,483,647 534 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands position synchronization instruction to the positioning module If an axis with the instruction is set as sub axis and the axis set as main axis reaches to the set synchronization position, it starts run step set in instruction axis. It commands positioning instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) It sets the position synchronization main axis to MST_AXIS and the following values can be set. If other value out of the range is set, it generates “Error6.” 0: X axis, 1: Y axis, 2: Z axis c) d) R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 535 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_SSS - Speed synchronization Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis MST_AXIS: Setting main axis of speed synchronization 0:X axis, 1:Y axis, 2:Z axis, 3:Encoder MST_RAT: Setting speed rate of main axis 1 ~ 65,535 SLV_RAT: Setting speed rate of sub axis 1 ~ 65,535 536 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Output DONE : maintains 1 after the first operation STAT : Output the error number that occurs while executing the function block. Function a) b) c) d) The instruction commands speed synchronization instruction to the positioning module. It is executed when controlling at the rate of run speed between both axes. It must be set to be “speed rate of sub axis/speed rate of main axis ≤ 1” if using speed synchronization run. It commands speed synchronization instruction to the assigned AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis f) It can set as main axis in MST_AXIS and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis, 3: Encoder APM_POR - Position override Availability 2MLI-CPUU, 2MLR-CPUH e) R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 537 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis POR_ADDR : Setting new target position -2,147,483,648 ∼ 2,147,483,647 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) The instruction commands position override instruction to the positioning module. It used when changing target position while instruction axis is running. It commands position override instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) Set the target position to change in POR_ADDR. d) 538 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_SOR - Speed override Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis SOR_SPD: Setting new run speed value Open Collector: 0 ∼ 200,000[pps] Line Driver: 0 ∼ 1,000,000[pps] Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) The instruction commands speed override instruction to the positioning module. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 539 R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block b) c) It used when changing run speed while instruction axis is running. It commands speed override instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis d) e) Set the target speed to change in SOR_SPD. If the value is set out of the range, it generates “Error11.” Open Collector: 0 Line Driver: 0 200,000[pps] 1,000,000[pps] 540 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_PSO - Positioning speed override Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis PSO_ADDR: Position to change speed -2,147,483,648 ∼ 2,147,483,647 PSO_SPD: Setting new run speed value Open Collector: 0 ∼ 200,000[pps] Line Driver: 0 ∼ 1,000,000[pps] R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 541 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) The instruction commands positioning speed override instruction to the positioning module. It is executed when changing run speed after the axis reaches to a certain position while it is running. It commands speed override instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) Set the target speed to change in PSO_SPD. The range is as follows and if it is set out of the range, it generates “Error11.” Open Collector: 0 ~ 200,000[pps] Line Driver: 0 ~ 1,000,000[pps] APM_NMV - Continuous run Availability 2MLI-CPUU, 2MLR-CPUH d) 542 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) The instruction commands continuous run instruction to the positioning module. It is executed to change the current step to the next step without stop. It commands continuous run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis d) R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 543 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_INC - Inching run Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis INCH_VAL: Setting the movement to move to inching run -2,147,483,648 ∼ 2,147,483,647 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) 544 The instruction commands inching run instruction to the positioning module. Inching run is, as a type of manual run, used to process minute movement as quantitative run. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block c) d) The inching run speed is set in manual run parameter. It commands inching run floating origin instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) APM_RTP - Return to the position before manual run Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 545 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Function a) b) c) The instruction commands return to the position before manual run to the positioning module. It is executed to return to the position before manual run when the position is changed by manual run after positioning. It commands Return to the position before manual run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis APM_SNS - Run step number change Availability 2MLI-CPUU, 2MLR-CPUH d) Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis 546 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block STEP: Setting run step number to run 1 ~ 400 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) The instruction commands run step number change instruction to the positioning module. It is executed to change run step of the axis It commands run step number change instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) Set the step number to run in STEP between 1 ~ 400; if other value is set out of the range, it generates “Error11.” d) APM_SRS - Repeat step number change Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 547 11. Communication and Special Function Blocks 11.3. Motion Control Function Block SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis STEP: Setting repeat step number to change 1 ~ 400 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands repeat step number change instruction to the positioning module. It is executed to start run in a certain run step by designating start step number of repeat run in case of repeat run in which it returns to repeat run step if it meets repeat run while running by run data. It commands repeat step change instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) Set the step number to start repeat run in STEP between 1 ~ 400; if other value is set out of the range, it generates “Error11.” c) d) APM_MOF - M code cancellation Availability 2MLI-CPUU, 2MLR-CPUH 548 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) The instruction commands M code cancellation instruction to the positioning module. If M code is set in the parameter of each axis to With or After mode, it is executed to turn off the signal when the M code signal of the axis is ON. It commands M code cancellation instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 549 d) 147.648 ∼ 2.647 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block.3. 1:Y axis.1 5/09 550 .Current position preset Availability 2MLI-CPUU. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.483. Motion Control Function Block APM_MOF . As the command used to change the current position to a temporary position.11. Communication and Special Function Blocks 11.483. Function a) b) The instruction commands current position preset instruction to the positioning module.147. 2:Z axis PRS_ADDR: Setting the current position value to change -2. the origin is determined if executing the command. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. 11. Communication and Special Function Blocks 11.3. Motion Control Function Block c) It commands current position preset instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis d) APM_ZONE - Zone Output allowed/prohibited Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis ZONE_EN: Zone Output allowed/prohibited 0: prohibited, 1: allowed Output DONE: maintains 1 after the first operation R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 551 11. Communication and Special Function Blocks 11.3. Motion Control Function Block STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands Zone Output allowed/prohibited instruction to the positioning module. It commands to allow or prohibit Zone Output by using the position data of zone set in common parameter and the position data value set in Zone1, Zone2 and Zone3. It commands Zone Output allowed/prohibition instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis APM_EPRE - Encoder value preset Availability 2MLI-CPUU, 2MLR-CPUH c) d) Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis 552 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block EPRE_VAL: Setting encoder preset value 0 ∼ 4,294,967,295 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) c) The instruction commands encoder value preset instruction to the positioning module. It commands to preset the current encoder value set in EPRE_VAL. It commands encoder value preset instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis APM_TEA - Singular teaching Availability 2MLI-CPUU, 2MLR-CPUH d) R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 553 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis STEP: Setting step number for teaching 0 ~ 400 RAM/ROM: Selecting RAM teaching/ROM teaching type 0 : RAM teaching, 1 : ROM teaching POS/SPD: Selecting position teaching/speed teaching type 0 : position teaching, 1 : speed teaching TEA_VAL: Setting teaching value Position teaching: -2,147,483,648 ∼ 2,147,483,647 Speed teaching: Open Collector 0 ∼ 200,000[pps] Line Driver 0 ∼ 1,000,000[pps] Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands singular teaching instruction to the positioning module. Speed teaching can be used when using a temporary speed for run data of a certain step while position teaching is used to set a temporary position for run data of a certain run step. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 554 11. Communication and Special Function Blocks 11.3. Motion Control Function Block c) It commands singular teaching instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis d) e) f) It can set the step number of run data for teaching in STEP between 0 ~ 400. If other value is set out of the range, it generates “Error11.” In case of position teaching, a position value for teaching is set in TEA_VAL while speed value for teaching is set; the setting ranges are as follows. If other value is set out of the range, it generates “Error11.” • • Position teaching range: -2,147,483,648 ~ 2,147,483,647 Speed teaching range: Open Collector Output -> 0 ~ 200,000 [pps] Line Driver Output -> 0 ~ 1,000,000 [pps] APM_ATEA - Plural teaching Availability 2MLI-CPUU, 2MLR-CPUH R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 555 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0 : X axis, 1:Y axis, 2:Z axis STEP: Setting step number for teaching, 0 ~ 400 RAM/ROM: Selecting RAM teaching/ROM teaching 0 : RAM teaching, 1 : ROM teaching POS/SPD: Selecting position teaching/speed teaching type 0 : position teaching, 1 : speed teaching TEA_CNT : Setting the no. of data for teaching, 1 ~ 16 TEA_VAL : Setting teaching value Position teaching: -2,147,483,648 ∼ 2,147,483,647 Speed teaching : Open Collector 0 ∼ 200,000[pps] Line Driver 0 ∼ 1,000,000[pps] Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands plural teaching instruction to the positioning module. Speed teaching can be used when using a temporary speed for run data of a certain step while position teaching is used to set a temporary position for run data of a certain run step. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 556 11. Communication and Special Function Blocks 11.3. Motion Control Function Block c) d) Using the teaching plural function block, up to 16 target positions and speed values can be changed. It commands plural teaching instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) f) g) h) It can set the step number of run data for teaching in STEP between 0 ~ 400. If other value is set out of the range, it generates “Error11.” The number of data is set in TEA_CNT up to 16. If other value is set out of the range, it generates “Error11.” In case of position teaching, a position value for teaching is set in TEA_VAL while speed value for teaching is set; the setting ranges are as follows. • • Position teaching range: -2,147,483,648 2,147,483,647 200,000 [pps] Speed teaching range: Open Collector Output -> 0 Line Driver Output -> 0 1,000,000 [pps] R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 557 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_SBP - Basic parameter teaching Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis BP_VAL: basic parameter value to change BP_NO: basic parameter item number to change Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) The instruction commands basic parameter teaching instruction to the positioning module. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 558 11. Communication and Special Function Blocks 11.3. Motion Control Function Block b) The parameter modified by basic parameter setting instruction is valid only when the power is ON. To save the parameter modified by basic parameter setting instruction, it is necessary to save the parameter value modified by save parameter/run data save instruction (WRT) to ROM after setting basic parameter. It commands basic parameter setting instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis c) d) e) The following values can be set in the basic parameter item number. • • • • • • • • • • • 1: speed limit 2: bias speed 3: acc./dec. time 1 4: acc./dec. time 2 5: acc./dec. time 3 6: acc./dec. time 4 7: no. of pulse per rotation 8: conveyance distance per rotation 9: pulse output mode 10: unit 11: unit allocation R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 559 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_SEP - Extension parameter teaching Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis EP_VAL: Extension parameter value to change EP_NO: Extension parameter number to change Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) The instruction commands extension parameter teaching instruction to the positioning module. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 560 11. Communication and Special Function Blocks 11.3. Motion Control Function Block b) The parameter modified by extension parameter setting instruction is valid only when the power is ON. To save the parameter modified by extension parameter setting instruction, it is necessary to save the parameter value modified by save parameter/run data save instruction (WRT) to ROM after setting extension parameter. It commands extension parameter setting instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis c) d) e) The following values can be set in the extension parameter item number. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 561 11. Communication and Special Function Blocks 11.3. Motion Control Function Block • • • • • • • • • • • • • • • • • Software upper limit Software lower limit Backlash compensation Position completion output time S-Curve rate External instruction selection Pulse output direction Acc./dec. pattern M code number Position display during uniform run Upper/lower limit display during uniform run External speed/position control conversion allowed External instruction allowed External stop allowed External simultaneous run allowed Positioning completion condition Driver ready/in-position APM_SHP - Origin return parameter setting Availability 2MLI-CPUU, 2MLR-CPUH 562 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis HP_VAL: origin return parameter value to change HP_NO: origin return parameter item number to change Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands an origin return parameter teaching instruction to the positioning module. The parameter modified by origin return parameter setting instruction is valid only when the power is ON. To save the parameter modified by origin return parameter setting instruction, it is necessary to save the parameter value MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 563 R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block modified by save parameter/run data save instruction (WRT) to ROM after setting origin return parameter. c) It commands origin return parameter teaching instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) The values to set to origin return parameter items are as follows. • • • • • • • • • d) Origin address Origin return high speed Origin return low speed Acc./dec. time of origin return Dwell time of origin return Origin compensation Re-run time of origin return Origin return mode Origin return direction 564 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block APM_SMP - Manual run parameter teaching Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis MP_VAL: Manual run parameter value to change MP_NO: Manual run parameter item number to change Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) R1.1 5/09 The instruction commands manual run parameter teaching instruction to the positioning module. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 565 11. Communication and Special Function Blocks 11.3. Motion Control Function Block b) The parameter modified by manual run parameter teaching instruction is valid only when the power is ON. To save the parameter modified by manual run parameter teaching instruction, it is necessary to save the parameter value modified by parameter/run data save instruction (WRT) to ROM after setting manual run parameter teaching. It commands manual run parameter teaching instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis c) d) e) The values to set in manual run parameter item number are as follows. • • • • Jog high speed Jog low speed Jog acc./dec. time Inching speed APM_SIP - Input signal parameter teaching Availability 2MLI-CPUU, 2MLR-CPUH Input REQ: requires to execute the function block 566 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 11. Communication and Special Function Blocks 11.3. Motion Control Function Block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis, 1:Y axis, 2:Z axis IP_VAL: External signal parameter value to change / setting the signal allocated by each bit. Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Function a) b) The instruction commands input signal parameter teaching to the positioning module. The parameter modified by input signal parameter teaching instruction is valid only when the power is ON. To save the parameter modified by input signal parameter setting instruction, it is necessary to save the parameter value modified by save parameter/run data save instruction (WRT) to ROM after setting external signal parameter. It commands input signal parameter teaching to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. If other value but the value is set, it produces “Error6.” 0: X axis, 1: Y axis, 2: Z axis e) The setting of each input signal setting area has the following meaning. 0: contact A, 1: contact B The signals allocated to each bit of input signal parameter value to change are as follows. Bit 0 R1.1 5/09 Input signal Upper limit signal 6 Bit Q signal Instruction signal 567 c) d) MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Communication and Special Function Blocks 11. stop signal 7 8 9 10 15 ~ 11 Sub instruction signal Speed/position conversion signal Driver ready/in-position signal External simultaneous run signal - APM_SCP . 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis.3. 1:Y axis.Common parameter teaching Availability 2MLI-CPUU. 2:Z axis CP_VAL: Common parameter value to change 568 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. origin signal Origin signal Emergency stop signal Dec. Motion Control Function Block 1 2 3 4 5 Lower limit signal Approx.1 5/09 .11. it produces “Error6. Communication and Special Function Blocks 11. 1: Y axis. To save the parameter modified by common parameter setting instruction.11. it is necessary to save the parameter value modified by using save parameter/run data instruction (WRT) to ROM after common parameter teaching. 2: Z axis e) The values to set in common parameter item number are as follows. Function a) b) The instruction commands common parameter teaching instruction to the positioning module.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 569 . Motion Control Function Block CP_NO: Common parameter item number to change Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. If other value but the value is set.3. The parameter modified by common parameter setting instruction is valid only when the power is ON.” 0: X axis. c) d) R1. It commands common parameter teaching instruction to the axis configured as the positioning axis configured as BASE (base number of positioning module) and SLOT (slot number of positioning module). It can set an axis to instruct and the following value. Communication and Special Function Blocks 11.11.3.1 5/09 . Motion Control Function Block • • • • • • • • • • • • • • Pulse Output level Circular interpolation method Encoder Input mode Encoder Auto Reload value ZONE Output mode ZONE1 axis setting ZONE2 axis setting ZONE3 axis setting ZONE1 ON area ZONE1 OFF area ZONE2 ON area ZONE2 OFF area ZONE3 ON area ZONE3 OFF area 570 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Communication and Special Function Blocks 11. Motion Control Function Block APM_SMD . 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. 2:Z axis STEP: Run step number to change 0 ~ 400 MD_VAL: Run data value to change MD_NO: Run data item number to change R1.3.11. 1:Y axis.Run data teaching Availability 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 571 . ” 0: X axis. It can set an axis to instruct and the following value. 2: Z axis e) The following values can be set into the run data item number. Function a) b) The instruction commands run data teaching instruction to the positioning module. Motion Control Function Block Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. If other value but the value is set. • • • • • • • • • • • c) d) target position circular interpolation sub point target speed dwell time M code control method run mode run pattern coordinate acc./dec. number circular interpolation direction MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3. it is necessary to save the parameter value modified by using save parameter/run data instruction to ROM. 1: Y axis.1 5/09 572 . To save the parameter modified by run data setting instruction.11. It commands run data teaching instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). Communication and Special Function Blocks 11. The parameter modified by run data teaching instruction is valid only when the power is ON. it produces “Error6. Communication and Special Function Blocks 11. c) d) R1. Function a) b) The instruction commands emergency stop instruction to the positioning module. It commands Emergency stop instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). It is executed when stopping running due to emergency situation and every axis receiving the instruction would stop. to resume running.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 573 .3. Since it is converted to output prohibition and origin not determined.11. it needs to cancel output prohibition and determine the origin again. Motion Control Function Block APM_EMG . 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block.Emergency stop Availability 2MLI-CPUU. 2:Z axis INH_OFF: Output prohibition cancellation 0: Error reset 1: Error reset/Output prohibition cancellation Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Communication and Special Function Blocks 11.11.Error reset/Output prohibition cancel Availability 2MLI-CPUU.3. Motion Control Function Block APM_RST . 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis.1 5/09 . 574 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1:Y axis. Communication and Special Function Blocks 11. it produces “Error6.Point run Availability 2MLI-CPUU. It can set an axis to instruct and the following value.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 575 . 1: Y axis. c) APM_PST . Motion Control Function Block Function a) b) The instruction commands error reset/output prohibition cancellation to the positioning module. It commands Error reset/output prohibition cancel instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module).11. 2: Z axis d) It is executed when canceling the status of pulse output prohibited by external emergency stop or upper/lower limit detection or resetting an error that occurs when parameter is out of the range or while running.3.” 0: X axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct R1. If other value but the value is set. 1 5/09 . Motion Control Function Block 0:X axis. 1:Y axis. Function a) b) The instruction commands point run instruction to the positioning module.” 0: X axis. If other value out of the range is set in PST_CNT or PST_VAL. 2: Z axis d) e) It is executed when continuously running without stop by one instruction by setting max. it generates “Error6. 2:Z axis PST_CMT: Setting the number of point run step 0 ~ 19 PST_VAL: Setting the point run step number 0 ~ 400 Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. It can set an axis to instruct and the following value. 20 run steps in case of PTP (point to point) run. If other value but the value is set. It commands point run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). it produces “Error6.3. Communication and Special Function Blocks 11.” c) 576 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1: Y axis.11. 2:Z axis WRT_AXIS: Setting save axis(by setting each bit) 0bit:X axis.Save parameter/run data Availability 2MLI-CPUU.3. Function a) The instruction commands save parameter/run data instruction to the positioning module. 1:Y axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. 1bit:Y axis. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 577 . 2bit:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block.11. Motion Control Function Block APM_WRT . Communication and Special Function Blocks 11. Read run info Availability 2MLI-CPUU. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. 1: Y axis.1 5/09 . If other value but the value is set. Motion Control Function Block b) It commands save parameter/run data instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). 2: Z axis c) d) It commands the instruction to save the current run parameter and run data of the axis set in WRT_AXIS to Flash ROM. Communication and Special Function Blocks 11.3. 1:Y axis. it produces “Error6. APM_CRD .” 0: X axis. It can set an axis to instruct and the following value.11. 2:Z axis 578 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 579 .3. Communication and Special Function Blocks 11. Motion Control Function Block Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block.” 0: X axis. run data number and M code number of the preset axis or be used in a user program. ERR: display error during operation CA: display current position address CV: display current run speed STEP: display current run data step number MCD: display current MCode value Function a) b) The instruction commands read run info instruction to the positioning module. It can set an axis to instruct and the following value. It commands Read current run info instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module).11. If other value but the value is set. 1: Y axis. it produces “Error6. 2: Z axis d) It can monitor by reading the current position address. run speed. c) R1. 2:Z axis Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. Communication and Special Function Blocks 11. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module LOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis.11. Motion Control Function Block APM_SRD .Read run state Availability 2MLI-CPUU. ST1: state 1 ST2: state 2 ST3: state 3 580 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .3. 1:Y axis. the output variables of current run state bit read function block is important information that must be applied in the program. It can set an axis to instruct and the following value. If other value but the value is set. Each bit of ST1 ~ ST4 has the following meaning. 1: prohibited) [2] [3] R1. 2: Z axis d) e) The content of ST1 ~ ST7. 1: Y axis. 1: completed) ST1 [1] Error state [5] Pulse Output prohibited (0: allowed.” 0: X axis. Communication and Special Function Blocks 11.3.1 5/09 Positioning complete M Code ON signal [6] [7] Stop 581 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .11. it produces “Error6. c) Bit [0] Description Running(0: BUSY) stop. It commands Read run state instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). 1: Bit [4] Description Origin determined (0: not determined. Motion Control Function Block ST4: state 4 ST5: state 5 ST6: state 6 ST7: state 7 Function a) b) The instruction commands read run state run instruction to the positioning module. 1 5/09 . 1: reverse) [4] [5] [6] [7] Accelerating Constant speed Decelerating Dwelling [0] [1] ST3 [2] 1 axis position control 1 axis speed control 2 axes linear interpolation [4] [5] [6] 2 axes circular interpolating Origin return running Position running synchronization [3] 3 axes linear interpolation [7] Speed running synchronization [0] Jog low speed running [4] Returning to the position before manual run ST4 [1] [2] [3] Jog high speed running Inching running MPG running [5] [6] [7] - f) 582 Each bit of ST5 ~ ST7 has the following meaning. Motion Control Function Block Bit Description (0: OFF. 1: ON) Bit Description [0] [1] ST2 [2] [3] Upper limit detected Lower limit detected Emergency stop state Direction (0: forward. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.11. respectively.3. Communication and Special Function Blocks 11. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 583 . origin signal [0] Speed/position conversion signal control [4] - [1] ST7 [2] Driver signal ready/in-position [5] - External simultaneous run signal [6] - [3] - [7] - R1. Motion Control Function Block Bit [0] [1] ST5 [2] [3] [0] [1] ST6 [2] [3] Description Axis state(0: sub. 1: main) Main axis info(X axis) Main axis info(Y axis) Main axis info(Z axis) Emergency stop signal External stop signal External command signal Jog high speed reverse signal Bit [4] [5] [6] [7] [4] [5] [6] [7] Description Main axis info[Encoder] Upper limit signal Lower limit signal Origin signal Approx.3. Communication and Special Function Blocks 11.11. It commands Read encoder value instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module).1 5/09 .11. ENC_VAL: current encoder value Function a) b) The instruction commands read encoder value instruction to the positioning module. Motion Control Function Block APM_ENCRD .3. 584 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Communication and Special Function Blocks 11. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block.Read encoder value Availability 2MLI-CPUU. Jog run Availability 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 585 . Motion Control Function Block APM_JOG . 1:Y axis. 2MLR-CPUH Input REQ: requires to execute the function block BASE: Setting the base number with a module SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. 2:Z axis JOG_DIR: Setting rotation direction of jog run 0: forward. 1: reverse LOW/HIGH: Setting jog run speed 0: low speed jog run 1: high speed jog run R1.11. Communication and Special Function Blocks 11.3. 11. It can set an axis to instruct and the following value. Function a) b) c) d) The instruction commands jog run instruction to the positioning module. 2: Z axis APM_MPG .3. If other value but the value is set. it stops in case of OFF. pulse is output by the value. The manual run function for test is used to verify the address for system operation. If connection condition of input variable REQ is ON. wiring state and teaching. 1: Y axis. Communication and Special Function Blocks 11. 2MLR-CPUH e) Input REQ: requires to execute the function block BASE: Setting the base number with a module 586 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.Manual pulse generator(MPG) run Availability 2MLI-CPUU.1 5/09 . it produces “Error6.” 0: X axis. Motion Control Function Block Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block. It commands jog run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). Motion Control Function Block SLOT: Setting the slot number with a module AXIS: Setting an axis to instruct 0:X axis. 1: Y axis.” 0: X axis. It can set an axis to instruct and the following value. If other value but the value is set. it produces “Error6.11. 1:Y axis.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 587 .3. 2: Z axis d) R1. 2:Z axis MPG_EN: MPG run allowed/prohibited setting 0: prohibited. Instruct positioning module to be ready for running when it is necessary to run by using externally installed MPG. It commands MPG run instruction to the configured AXIS of the positioning module where it is configured at BASE (base number of positioning module) and SLOT (slot number of positioning module). Communication and Special Function Blocks 11. 1: allowed Output DONE: maintains 1 after the first operation STAT: Output the error number that occurs while executing the function block Function a) b) c) It commands to instruct positioning module to execute MPG run. . Features of Built-in PID Function The features of PID function built-in 2MLI-CPUU are as follows. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 589 . When a sensor detects the current state of an object to control and delivers it to a control. PLC functions as a control.1 5/09 It has a fast operation cycle up to 0. Built-in PID Function 12. a sensor detects the changed state and re-sends it to PLC. an error between two values. R1.12. Finally. in a whole control system while sensor and driver are used to detect an object to control and drive the system. It can execute precise control operation.1 Overview of Built-in PID Control PID Control PID Control compares the value measured at detection (process value) to the predetermined value. respectively. if any. 2. a driver drives the object according to the output. making the current value to the target value.6ms. in order to maintain the state of an object to control be a pre-determined value (target value). As presented in the previous figure. forming a closed loop. A procedure circulating a control loop repeats at the unit of several seconds and hundreds of microseconds and the time is called control cycle. 1. Meanwhile. It can operate totally 256 loops by using 32 loops in 8 blocks. PLC executes an operation of output and delivers it to a driver. adjusts outputs (control signal) to eliminate. 1. max value and min value of MV. 10. Symbol function facilitates setting and monitoring.12. It protects the system by restricting the max. 7. It protects the drive by restricting the max. Strong dual anti windup prevents effective over/under shoot. 4. Auto-tuning function is used for PID control. It may be operated by external device (HMI). It supports forward/reverse operation process. 5. 590 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. variance of PV. Cascade PID control is available. Built-in PID Function 12. variance.1 5/09 . 8. 9.1. Overview of Built-in PID Control 3. 6. 2. PID Control Operation 12. which is detected by a sensor E: Error of an object to control.3.5).2 PID Control Operation Terms used It describes the terms necessary to explain PID control operation. which is expressed in (SV – PV) MV: Control input or control’s output MV_p(MVp): Proportional component of MV MV_i(MVi): Integral component of MV MV_d(MVd): Differential component of MV PID Equation PID Equation may be expressed from equation (14.1) through equation (14.3. SV: Set value to which an object to control should reach T_s(Ts) : Sampling time (control cycle) K_p(Kp): Proportional constant T_i(Ti): Integral time constant T_d(Td) : Differential time constant PV: Current state of an object to control.12. Built-in PID Function 12. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 591 . 1 5/09 . respectively and error E is 15. Adjust the coefficient according to the system. that is. MV of P control consists of proportional operation.3) (14. the more sensitive it is to error. 592 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1) (14.3.5).2. SV and PV are 50℃ and 35℃.3.12. if subtracting I and D.3. MV_p only. as presented in the equation (14. For instance. the larger it is set. MV_i and MV_d. I and D.5) MV p = K p E MVi = Kp Ti ∫ E dt dE dt MVd = K pTd MV = MV p + MVi + MVd Error is a mathematical expression indicating how far the current system is out of a user’s desirable state.3.3. P Control As seen in the equation (14. MV_p. The term is applicable as a type multiplying proportional coefficient by error. alike. if subtracting D from PID control equation.3. it results in P control. the difference between SV and PV. The control executes PID operation according to the error.7). namely.3. PID Control Operation E = SV − PV (14. Note that MV totally consists of each component of P. assuming that a user wants to maintain water in an electric kettle at 50℃ and the temperature of water is 35℃. it results in PI control.4) (14. Built-in PID Function 12.2) (14. 2. The following system is made to help you understand.2℃).8℃(about 7.6%).0 and the above tendency is gained by adjusting K_p value properly. Built-in PID Function 12. reducing MV. the control tendency features as follows. As such.6) (14. In the previous simulation.12. SV is 50.7) When applying P control to a temporary virtual system.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 593 . so it maintains state balance at equilibrium point (in the example. as smaller error (E) is. the reason why P control has a permanent residual drift is because as closer PV approaches to SV.2℃. so the residual drift is 3. The previous system shows a stable state in 4 seconds after being operated at 20℃ and it is maintained at 46. it may be different with the actual temperature (control) system.3. PID Control Operation MV p = K p E MV = MV p (14. R1. PI control is used to supplement the residual drift intrinsically existing in P control. 46.3. 2.10) Even though error is uniform. Built-in PID Function 12. PI control uses integration of the error. the integral is accumulated as time goes on if applying integral calculus until the error is eliminated.9) ∫ E dt MV = MV p + MVi (14.1 5/09 . a disadvantage of proportional term. PI control may be used to supplement the residual drift intrinsically existing in P control. To reduce the residual drift. Note that Ti.3. the integral time constant is the denominator of integral term.10).3. so it represents that integral effect is larger as smaller the value of Ti. PID Control Operation PI Control PI (proportional-integral) control is calculated by summing up proportional term and integral term as seen in the equation (14. MV p = K p E MVi = Kp Ti (14. The following graph shows the results of PI control to P control application system.12.3. 594 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Therefore.8) (14.3. it is common to use 0. PID Control Operation As a result of adding integral effect.1) through (14.2℃ and dropped. Built-in PID Function 12. it is necessary to install a filter on the sensor’s input and set the differential coefficient small to prevent differential effect from operating against a small change as much as a system noise. so it is necessary to relieve the overshoot through proper coefficient tuning or improve it by means of PIC control applying differential effect.5).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 595 . the residual drift disappears and the system is converged to 50℃ accurately. deepening overshoot. Excessive overshoot may overburden the system or make it unstable. irrespective of the error of the system. PID Control PID control relieves the vibration of PI control by adding differential effect to PI control as expressed in equation (14. However.3.2.1. R1. for which it increased up to 61.12. the temperature temporarily increased more than a desirable temperature.3. The effect is working when the system’s state is changed after comparing to the previous state.001 ~ 0. However. In case of an actual system. 0 온도 Temperature 30.0 50.0 0.2. PID Control Operation 60. Built-in PID Function 12.0 0 2 4 6 8 10 12 14 16 Second 초 596 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.0 20.1 5/09 .0 10.12.0 40. internal state and user setting are maintained and the control operation stops. AUTOTUNE. T_i. T_d) and operation cycle (T_s). Loops that operate by cascade are indicated in a state flag. However. PIDPAUSE is the state in which output.3. PID Instruction 12. MV is output by PID operation and it executes every scan operation independently. R1. PIDxx_STATE and in the state. PIDRUN. it goes into AUTOTUNE state when it goes toward PIDRUN and PIDCAS. PIDSTOP. its internal state is initialized and the user setting is maintained. 13. It is possible to enter PIDCAS state by using PIDCAS instruction after setting these two loops in a way like PIDRUN. it is necessary to turn on PIDxx_PAUSE bit or use PIDPAUSE instruction. it may enter PIDRUN state. 12. executing control operation. so it loses the previous coefficients. 14. In case “contact front of PIDRUN instruction is ON”. These values are updated as soon as Auto-tuning ends.3 PID Instruction PID Loop State A PID loop has 5 states. it is possible to enter PIDPAUSE as long as the previous state is PIDRUN. _PID[B]_[L]AT_EN is on. In this state. If among PIDSTOP. it is not possible to access the PIDPAUSE state. AUTOTUNE checks a system’s response for a series of inputs and finds PID coefficient (K_p. PIDRUN is the state in which PID loop normally executes control operation. Built-in PID Function 12. and data are exchanged between loops as the internal connection necessary for two loops are automatically created. it enters PIDRUN state. 11. 15. AUTOTUNE is the state that is immediately executed when a user turns on _PID[B]_[L]AT_EN bit either PIDRUN or PIDCAS. PIDCAS is the state in which two loops form a master loop and a slave loop respectively. PIDRUN or PIDCAS state is restored. PIDSTOP is the state in which output (MV) is MV_min. To enter PIDPAUSE state. so it applies every setting that is changed during the procedure. Once AUTOTUNE is complete. or if there is PIDRUN instruction in ladder program and PIDxx_REM_RUN is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 597 . remote operation PIDxx_REM_RUM bit does not work.12. PIDCAS and PIDPAUSE. PIDINIT and PIDPRMT. 598 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. PIDRUN PIDRUN.1 5/09 . and both exist for the use convenience of PIDRUN or PIDCAS instruction. is the instruction taking charge of single PID loop control. every operation of PID function is wholly taken by PIDRUN or PIDCAS instruction. _PID[B]_[L]STATE. as a basic PID control instruction.3. If inputting block number (0 ~ 7) into BLOCK and loop number (0 ~ 31) into LOOP. PIDCAS.12. PID_STAT displays the operation information for a PID loop. a loop of the block is selected. PID Instruction PID Instruction Group PID instruction group includes four instructions. PIDINIT and/or IDPPMT instructions works as long as it exists on a ladder program with PIDRUN or PIDCAS instruction. Built-in PID Function 12. PIDCAS PIDCAS is the instruction to execute cascade control using two loops. Actually. PIDRUN. the master and slave of the block are selected. PID Instruction If you input block number (0 ~ 7) into BLOCK. both loops always mutually observe part of the operation information on each loop (i. MST_STAT/SLV_STAT shows the operation information on master/slave loops. while the slave loop executes its operation by using SV receiving from master loop.e. _PID[B]_[L]STATE. Built-in PID Function 12. ATTENTION Cascade Operation: Basically.12.3. conversion from/to windup. The block number of both loops must be the same. master loop number (0 ~ 31) into LOOP_MST and slave loop number (0 ~ 31) into LOOP_SLV.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 599 . R1. manual mode and/or auto mode conversion). Besides. master loop inputs its MV to SV of slave loop during operation. T_i and T_d to user-defined values.12. a loop of the block is selected. a loop of the block is selected. Built-in PID Function 12.) PIDINIT BOOL UINT UINT REQ BLOCK LOOP DONE BOOL If you input block number (0 ~ 7) into BLOCK and loop number (0 ~ 31) into LOOP. The initialized area is the setting and state of the designated block[B] and loop[L]. K_p.1 5/09 . PIDPRMT BOOL UINT UINT INT UINT REAL REAL REAR REQ BLOCK LOOP SV T_S K_p Ti T_d DONE BOOL If you input block number (0 ~ 7) into BLOCK and loop number (0 ~ 31) into LOOP.3. PIDPRMT PIDPRMT changes the major settings of PIDRUN including SV. PID Instruction PIDINIT It initializes the setting and state of a PID loop. T_s. 600 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. and 0 is input to every setting of the loop(bit is off. Built-in PID Function 12. 1:RUN) Select PID proportional calculation source (0:ERR. 1:Enable) MV non-impact conversion when converting PID mode(A/M) (0:Disable. 1:PV) Select PID differential calculation source (0:PV. PID Flag Configuration 12.constant (T_i)[sec] PID D – constant (T_d)[sec] PID PV variation limit PID MV variation limit PID MV max.1ms] PID P – constant (K_p) PID I . 1:reverse) Prohibit PID Anti Wind-up2 (0:allowed.4 PID Flag Configuration The following table shows the flag configuration when using the built-in PID function for 2MLI-CPUU.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 601 . 1:prohibited) PID remote (HMI) execution bit (0:STOP. 1: manual) PID Pause (0: STOP/RUN 1:PAUSE) Select PID operation (0: forward.4. value limit R1.12. 1:Enable) PID target value (SV) PID operation cycle (T_s)[0. Symbol _PID[B]_[L]MAN _PID[B]_[L]PAUSE _PID[B]_[L]REV _PID[B]_[L]AW2D _PID[B]_[L]REM_RUN _PID[B]_[L]P_on_PV _PID[B]_[L]D_on_ERR _PID[B]_[L]AT_EN _PID[B]_[L]MV_BMPL _PID[B]_[L]SV _PID[B]_[L]T_s _PID[B]_[L]K_p _PID[B]_[L]T_i _PID[B]_[L]T_d _PID[B]_[L]d_PV_max _PID[B]_[L]d_MV_max _PID[B]_[L]MV_max K device area %KX[0+1050B+L] %KX[32+1050B+L] %KX[64+1050B+L] %KX[96+1050B+L] %KX[128+1050B+L] %KX[160+1050B+L] %KX[192+1050B+L] %KX[224+1050B+L] %KX[256+1050B+L] %KW[24+1050B+32L ] %KW[25+1050B+32L ] %KD[13+525B+16L] %KD[14+525B+16L] %KD[15+525B+16L] %KW[32+1050B+32L ] %KW[33+1050B+32L ] %KW[34+1050B+32L ] Data type BIT BIT BIT BIT BIT BIT BIT BIT BIT INT WORD REAL REAL REAL WORD WORD INT Description Select PID output (0: auto. 1:ERR) Set PID auto-tuning (0:Disable. 1:MAN_OUT) R1. value limited) PID Alarm 5 (1:MV min.4. 1:DONE) PID State 3 (0:REM_STOP. Built-in PID Function 12.12. value limit PID manual output (MV_man) PID State PID Alarm 0 (1:T_s setting is small) PID Alarm 1 (1:K_p is 0 ) PID Alarm 2 (1:PV variation limited) PID Alarm 3 (1:MV variation limited) PID Alarm 4 (1:MV max. 1:AT_RUN) PID State 2 (0:AT_UNDONE. PID Flag Configuration Symbol _PID[B]_[L]MV_min _PID[B]_[L]MV_man _PID[B]_[L]STATE _PID[B]_[L]ALARM0 _PID[B]_[L]ALARM1 _PID[B]_[L]ALARM2 _PID[B]_[L]ALARM3 _PID[B]_[L]ALARM4 _PID[B]_[L]ALARM5 _PID[B]_[L]ALARM6 _PID[B]_[L]ALARM7 _PID[B]_[L]STATE0 _PID[B]_[L]STATE1 _PID[B]_[L]STATE2 _PID[B]_[L]STATE3 _PID[B]_[L]STATE4 602 K device area %KW[35+1050B+32L ] %KW[36+1050B+32L ] %KW[37+1050B+32L ] %KX[592+16800B+5 12L] %KX[593+16800B+5 12L] %KX[594+16800B+5 12L] %KX[595+16800B+5 12L] %KX[596+16800B+5 12L] %KX[597+16800B+5 12L] %KX[598+16800B+5 12L] %KX[599+16800B+5 12L] %KX[600+16800B+5 12L] %KX[601+16800B+5 12L] %KX[602+16800B+5 12L] %KX[603+16800B+5 12L] %KX[604+16800B+5 Data type INT INT WORD BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT Description PID MV min. 1:PID_RUN) PID State 1 (0:AT_STOP.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . 1:REM_RUN) PID State 4 (0:AUTO_OUT. value limited) PID Alarm 6 (1:AT abnormal cancellation state) PID Alarm 7 PID State 0 (0:PID_STOP. 1 5/09 %KX[605+16800B+5 12L] %KX[606+16800B+5 12L] %KX[607+16800B+5 12L] %KW[38+1050B+32L ] %KW[39+1050B+32L ] %KW[40+1050B+32L ] %KW[41+1050B+32L ] %KD[21+525B+16L] %KD[22+525B+16L] %KD[23+525B+16L] %KD[24+525B+16L] %KW[50+1050B+32L ] %KW[51+1050B+32L ] %KW[52+1050B+32L ] %KW[53+1050B+32L ] %KW[54+1050B+32L ] %KW[55+1050B+32L BIT BIT BIT INT INT INT WORD DINT REAL REAL REAL WORD WORD WORD INT WORD WORD PID State 5 (0:CAS_STOP.4. Built-in PID Function 12. 1:AW_ACT) PID Present value (PV) PID previous present value (PV_old) PID Output value (MV) PID non-impact operating memory PID control error PID output P component PID output I component PID output D component PID deadband setting (operating after stabilizing) PID differential function Lag filter PID auto-tuning hysterisis setting PID auto-tuning SV setting PID auto-tuning state indication (setting by user prohibited) PID internal memory (setting by user prohibited) 603 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .12. CAS_RUN) PID State 6 (0:SLV/SINGLE. PID Flag Configuration Symbol K device area 12L] Data type Description _PID[B]_[L]STATE5 _PID[B]_[L]STATE6 _PID[B]_[L]STATE7 _PID[B]_[L]PV _PID[B]_[L]PV_old _PID[B]_[L]MV _PID[B]_[L]MV_BMPL _val _PID[B]_[L]ERR _PID[B]_[L]MV_p _PID[B]_[L]MV_i _PID[B]_[L]MV_d _PID[B]_[L]DB_W _PID[B]_[L]Td_lag _PID[B]_[L]AT_HYS_v al _PID[B]_[L]AT_SV _PID[B]_[L]AT_step _PID[B]_[L]INT_MEM R1. 1:CAS_MST) PID State 7 (0:AW_STOP. 4. Built-in PID Function 12.1 5/09 . PID Flag Configuration Symbol ] K device area Data type Description * : Area prohibited from user’s setting * B : PID block number [0~7] * L : PID loop number [0~31] 604 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.12. The loop setting for the PID loop such as SV. Td.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 605 . Ti. L : loop _PID[B]_[L]MAN i. A user may change PID setting simply by writing data on the memory and get the result reflected to the next cycle.) _PID3_25PAUSE : because of block 3 and loop 25. of loops that PID function may use in a block is collected. the max. Each loop independently works and may execute auxiliary operation like the application of cascade. ETC. Therefore. no. MV_rvs. the state of PID loops such as PV.e. • Common bit area i.e. 32 bits. and the state and setting of each bit are saved in the correct order of bits. ATTENTION • PID memory statement format B: block. information on the K device memory configuration may help you understand the memory location of PID. %KW0024 ~ %KW0055 area is the individual data area for PID block 0 and loop 0. %KW0056 ~ %KW1047 area is the memory of loop 1 through 31 with the format of block 0 & loop 0. The location and order of the memory area as mentioned may change without prior notice to improve the product performance.e.) _PID3_05MAN : means MAN bit of block 3 and loop 5. n R1. T_s.) _PID5_30SV : because of block 5 and loop 30. where the setting and state of block 0 and loop 0 are saved. • Individual data area i. ERR. dPV_max.4. MVi. It has a double word format of 32 bits as the information on 32 loops for an item. forming a double-word. Built-in PID Function 12. MVp. and during the execution of PID function. it represents the location of %KX[32+1050B+L] = %KX3207. PID Flag Configuration %KX[0+1050B] ~ %KX[287+1050B] area is the common bit area of the block PID loop. The bit state and settings of each bit are collected and arranged on the front of each PID block. Additionally. Kp.12. it represents the location of %KW[24+1050B+32L] = %KW6234. MV_max. MV_min and dMV_max are saved in the area. MVd and PV are also saved. MV_man. Common Bit Area Common bit area is the part that gathers every data consisting of bits for each of the 32 loops. MV. If the system state ascends when system input rises. Built-in PID Function 12. it is set as [Default] AUTO. it is called a forward system.1 5/09 . the temperature rises as the system input increases.Setting area K DEVICE AREA : %KX [0+1050B+L] Data unit : BIT It determines whether PID function of n th loop is operated manually or automatically(AUTO/MANUAL). the PAUSE function must be used with care. 606 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Therefore. m is the value that the loop number. [Default] PAUSE is cancelled. n is converted to a hexadecimal.Setting area . In case of a boiler. PID Flag Configuration th bit means the information on the n th loop. which is the value a user wants. _PID[B]_[L]MAN (PID Manual operation enable) .Setting area K DEVICE AREA : %KX [32+1050B+L] Data unit : BIT It makes n th PID loop in pause state. since control system may result in unexpected results if the system state is changed to PAUSE.4. in case of a cooling system. If the bit is off. the temperature drops as the system input rises. so it is a forward system. _PID[B]_[L]PAUSE (PID PAUSE mode) . _PID[B]_[L]REV (PID REVerse operation) K DEVICE AREA : %KX64+1050B+L] Data unit : BIT It sets whether a control system is a forward system or reverse system. If a bit is off. it outputs a user desirable temporary value. if it descends when it increases. AUTO state outputs the results that PID operation is normally executed while MANUAL state does not execute PID operation and instead. On the other hand. so it is a reverse system. it is called a reverse system.12. If converting PAUSE to RUN state again. it continuously controls. The output is generated as _PID[B]_[L]MV_man. If using the function. ATTENTION _PID[B]_[L]PAUSE If making a PID loop in PAUSE state by using PID[B]_[L]PAUSE and PIDPAUSE instruction. [Default] (if contact is off). The function of Anti wind-up is detailed in 14. Indeed. it functions alike the effect that PIDRUN instruction contact is on/off. PIDRUN instruction’s operation contact may be assigned to a fixed address. In such a case. _PID[B]_[L]AW2D (PID Anti Wind-up 2 Disable) .6.Setting area K DEVICE AREA : %KX[128+1050B+L] Data unit : BIT It is the external operation instruction of PIDRUN. PID Flag Configuration If the bit is off.Setting area K DEVICE AREA : %KX[96+1050B+L] Data unit : BIT If the bit is off when a user does not want it. _PID[B]_[L]REM_RUN (PID REMote RUN ).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 607 .4. the control system may show unexpected results due to improper control. PIDRUN instruction stops. Built-in PID Function 12. If the bit is off. PIDRUN instruction executes OR operation of “PIDRUN instruction’s input condition” contact and the bit to determine whether to execute the operation. so a user may conveniently use external I/O devices such as HMI. [Default] Anti Wind-up2 function is enabled. since PIDRUN instruction executes initialization. every operation stops and it outputs the last calculation before PAUSE state. If the bit is off. Anti Wind-up2 function is deactivated. In the first scan of PLC. it escapes from PAUSE and turns STOP or RUN state if turning on PLC in PAUSE state. in which PAUSE bit is off. if system state is changed. Being used as an external operation instruction.12. so PAUSE function should be carefully used. it is set as [Default] Forward system. R1. ATTENTION _PID[B]_[L]REM_RUN The bit is saved in K device even though PLC stops. in an unstable state of instantaneous control due to initial response or disturbance. and in ON state. PIDRUN instruction operates. _PID[B]_[L]D_on_ERR (PID D on ERRor) . If the bit is off. Anti Wind-up function does not work. it executes P operation with PV value. it does not overburden the driver. power failure). D operation uses PV and the default is also set to be D operation using PV. and D operation using ERR may cause excessive input to a driver instantly because D response may have sudden change as SV is changed by a user. D operation is operated with ERR or PV.1 5/09 . rather using ERR. If the bit is off. it executes D operation with ERR value.Setting area K DEVICE AREA : %KX[192+1050B+L] Data unit : BIT It sets the D operation source of PID loop as ERR. so if PLC stops and operates with the bit ON (i. PID Flag Configuration _PID[B]_[L]P_on_PV (PID P on PV) . and P operation using PV is relatively slow moving to stable state. the system is initialized from the first scan and then. PID executes D operation with PV in [Default] state. However.e. the bit should be on.4. PID executes P operation with ERR in [Default] state and in case of on.Setting area K DEVICE AREA: %KX[160+1050B+L] Data unit : BIT It sets the P operation source of PID loop as PV. Built-in PID Function 12. If using ERR without the algorithm.Setting area K DEVICE AREA : %KX[224+1050B+L] Data unit : BIT 608 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. It means that output fluctuation is not steep and consequently. P operation is operated with ERR or PV. To prevent it.12. since the range of internal operation value changes. _PID[B]_[L]AT_EN (PID AutoTuning ENable) . In case of OFF. The PID setting does not have any change.Setting area K DEVICE AREA : %KX[256+1050B+L] Data unit : BIT It calculates MV through operation. if the bit is ON.4. If the bit is off. a driver operates the system with 1000 and instantly receives 2000 during mode conversion. so when PLC stops and operates with the bit on(i. AT finds out T_s (operation cycle) and PID coefficients (K_p. the PID loop outputs during conversion gradually increases and operates it so that 2000 is output. power failure). _PID[B]_[L]MV_BMPL (PID MV BuMPLess changeover) . Then. [Default] AT function is disabled and AT is executed at the ascending edge. it does not go to AT mode again. the system is initialized from the first scan and then. Before operating AT.e. so the system operates with the state before PLC stops. Individual Data Operation The individual data area of block B and loop L is %KW[24+1050B+32L] ~ %KW[55+1050B+32L]. If the bit is ON (the bit of master loop in case of cascade). ATTENTION _PID[B]_[L]AT_EN The bit is initialized to off as soon as the PLC is turned to RUN mode. [Default] bumpless changeover function is disabled. R1. T_i and T_d) approximately. _PID[B]_[L]MV_BMPL For instance. it is turned to auto output and 2000 output is to be generated. Built-in PID Function 12. it executes a bumpless changeover. PID Flag Configuration It auto-tunes the PID loop. reflects it into the internal state and stabilizes MV so that MV continues smoothly after the PID loop is converted from manual output mode to auto output mode.12.6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 609 . The function is different in algorithm for single operation and cascade operation but both operate with the bit. assuming that manual output value is 1000. it is necessary to set PID[B]_[L]HYS_val item and the functions of AT is detailed in 14. _PID[B]_[L]STATE alarm bit is displayed. Built-in PID Function 12.1ms up to 6553.Setting area K DEVICE AREA : %KW[25+1050B+32L] Data unit : WORD [ 0 ~ 65535 ] It sets the sampling time of a loop.40282347e+38 ~ -1.40282347e+38 ] It sets the proportional constant(K_p) of a loop.1ms. The sampling time may be set. PID Flag Configuration _PID[B]_[L]SV (PID Set-point Value) . and it is also set at the unit of 1 integer per 0. The state is indicated with numbers and it should be converted.Setting area K DEVICE AREA : %KW[24+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It sets SV of a loop. 0 . if setting the sampling time to 100ms. it is the system state that a user defines. SV should be set to 5000 when controlling the temperature at 50°C in a system in which PV is sensed for 5000.4.12. so if K_p is increasing. if a user sets the sampling time to 0. speed control operation is executed in the current environment. _PID[B]_[L]K_p (PID Proportional Gain) . it is set in scan cycle control mode and control operation is executed every scan.17549435e-38 ~ 3.17549435e-38 . Especially. at least. 1. if temperature is 50°C. input 1000 to _PID[B]_[L]T_. based on PV along the system’s gain and input accordingly.1ms. _PID[B]_[L]T_s (PID Sampling Time) . integral and differential) among PID control effects.5 ms in 0. As described in the previously. so the max. I and D(Proportional. That is. 610 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. K_p is multiplied by P.Setting area K DEVICE AREA : %KD[13+525B+16L] Data unit : REAL [ -3. For instance. If it exceeds the current scan speed due to two short sampling time. Sampling time is the cycle of control operation and represents the time cycle of control operation. from 0. differential effect is also larger while integral effect is reduced.1 5/09 . Especially. PID outputs 0 as its MV and will not output until PV is cooled down to 0 (0 degrees).4.40282347e+38 ~ -1. K_p can be set within the range of real number(REAL). refer to 14. PID Flag Configuration Especially. refer to 14. ATTENTION _PID[B]_[L]SV PID changes the output (MV) through several operations until SV=PV. _PID[B]_[L]T_d (PID derivative Time gain) K DEVICE AREA : %KD[15+525B+16L] Data unit : REAL [ -3.17549435e-38 . 0 . if _PID[B]_[L]K_p setting is 0.Setting area K DEVICE AREA : %KD[14+525B+16L] Data unit : REAL [ -3.40282347e+38 ~ -1. refer to 14. For instance.6. if the current temperature is 20 degrees and the SV of simple heater of which PV is 2000 (20 degrees) is set to 0.17549435e-38 . 1. For details. Especially. T_d is multiplied by D(differential) term out of PID control effects.Setting area R1. . _PID[B]_[L]T_i (PID integral Time gain) . 1. it does not execute P control.12. if _PID[B]_[L]T_i setting is 0. it does not execute I control and for details.17549435e-38 ~ 3. 0 . differential effect is increasing. PIDRUN seems not to operate. it does not execute D control and for details. so if T_i is increasing. T_i may be set to the range of real number (REAL).6. so if T_d is increasing. T_d may be set to the range of real number(REAL).6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 611 .40282347e+38 ] It sets the differential time constant(T_d). T_i divides I (integra) term out of PID control effects.40282347e+38 ] It sets the integral time constant (T_i) of a loop.17549435e-38 ~ 3. the integral effect is reduced. if _PID[B]_[L]T_d setting is 0. Built-in PID Function 12. if SV is 0. Therefore. In an actual control. noise and disturbance.Setting area K DEVICE AREA : %KW[35+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] 612 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.Setting area K DEVICE AREA : %KW[34+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It limits the max value of MV of a loop. output of a control delivered to output device and cuts off any system error. Especially. In detail. the convergence time may take longer because system’s change is reflected late. On the other hand.Setting area K DEVICE AREA : %KW[33+1050B+32L] Data unit : WORD [ 0 ~ 65535 ] It limits the MV variation of a loop. PID Flag Configuration _PID[B]_[L]dPV_max (PID delta PV MAXimum limit) .12. if PV is changed over the value set in _PID[B]_[L]dPV_max. To prevent it. Built-in PID Function 12. _PID[B]_[L]dMV_max (PID delta MV MAXimum limit) . system may not be stabilized or be subject to trouble or unstable operation due to overload on a driver. it prevents any overflow or other undesirable value from being delivered. if the value is set to 0. Especially. it limits the output variation of a control. In addition. avoiding any change exceeding the value. make sure to set it suitable for the characteristics of a system. the function does not work. _PID[B]_[L]MV_max (PID MV MAXimum limit) . _PID[B]_[L]MV_min (PID MV MINimum limit) . if _PID[B]_[L]dPV_max is set to small.Setting area K DEVICE AREA : %KW[32+1050B+32L] Data unit : WORD [ 0 ~ 65535 ] It sets the PV variation of a loop. PV may be reflected with undesirable signals such as sensor’s malfunction. To prevent it. PV does not always reflect the accurate state of system. the function does not operate. if the value is set to 0.4. If control system is rapidly changed. It prevents overload by limiting the max.1 5/09 . it protect it primarily. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 613 . It is located at the address of %KW[37+1050B+32L] while each bit(16) has 16 meanings respectively. In addition. _PID[B]_[L]ALARM 2 : PV variation is limited.Setting disabled K DEVICE AREA : %KW[37+1050B+32L] Data unit : WORD [ h00 ~ hff ] or BIT It indicates the state of abnormal state of a loop. a part of them are used. The value set here outputs the value of PID[B]_[L]MV_man as the MV of a loop if _PID[B]_[L]MAN of common bit area is on. among 16 bits. value of MV of a loop. At present. _PID[B]_[L]ALARM 1 : K_p is 0. R1.12.4. _PID[B]_[L]ALARM 4 : MV max.Setting area K DEVICE AREA : %KW[36+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It designates MV if a loop is set as a manual operation. Built-in PID Function 12. PID Flag Configuration It limits the min. STATE is on only for a moment that the related operation occurs while the operation is cancelled. _PID[B]_[L]ALARM 0 : skipping an operation because T_s setting is too small. _PID[B]_[L]MV_man (PID MANual MV variable) . value is limited. The low 8 bits of STATE(_PID[B]_[L]ALARM 0 ~ _PID[B]_[L]ALARM 7) represent kinds of abnormal state of a loop while the high 8 bits of STATE(_PID[B]_[L]STATE 0 ~ _PID[B]_[L]STATE 7) indicates the control state of a loop. Assignment of each bit is as follows. it prevents any overflow or other undesirable value from being delivered. _PID[B]_[L]ALARM 3 : MV variation is limited. _PID[B]_[L]STATE (PID STATE) . output of a control delivered to output device and cuts of any system error. It prevents overload by limiting the min. it returns to off. value is limited. _PID[B]_[L]MV (PID Manipulated output Variable) . _PID[B]_[L]STATE 0 : PID operation is in progress(effective in case of PLC run) _PID[B]_[L]STATE 1 : PID AT is in progress.12. Built-in PID Function 12. _PID[B]_[L]PV (PID Process Variable) . it may be subject to malfunction. PID Flag Configuration _PID[B]_[L]ALARM 5 : MV min.I/O area K DEVICE AREA : %KW[38+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It represents the PV of a loop.I/O area K DEVICE AREA : %KW[40+1050B+32L] 614 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _PID[B]_[L]ALARM 6 : abnormally canceled during AT. _PID[B]_[L]STATE 4 : PID mode is manual output mode. If inputting a temporary value. _PID[B]_[L]STATE 7 : Anti Wind-up is operating during PID operation. PV is the indicator showing the current state of the system and the input from sensor is saved into U device of CPU via input devices such as A/D conversion module. _PID[B]_[L]STATE 5 : PID loop belongs to cascade. The value should be moved to _PID[B]_[L]PV by using instructions such as MOV every time it scans. _PID[B]_[L]STATE 2 : PID AT is complete. if necessary.Setting disabled K DEVICE AREA : %KW[39+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It is used for integral/differential operation to the previous PV state of a step of the related loop and it is recommended to refer to it. _PID[B]_[L]STATE 3 : PID is operating remotely by _PID[B]_[L]REM_RUM bit. Refer to the examples described in the end of the user’s manual. _PID[B]_[L]PV_old (PID previous PV) .4. _PID[B]_[L]STATE 6 : PID loop is the cascade master loop.1 5/09 . MV is a signal source to drive a system and conversely as described in 12) _PID_PV. ATTENTION Bumpless Change Over In case PID control returns to auto output mode after being converted to manual output mode. Therefore. By expanding it. ideal control system can be defined that if control R1. _PID[B]_[L]MV_BMPL_val (PID MV BuMPLess changeover VALue) .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 615 . and if error is 0. It is used as an indication how far the current state is distance from the desirable state. In PID. by which the system is subject to mode conversion impact.Setting disabled K DEVICE AREA : %KW[41+1050B+32L] Data unit : WORD [ 0 ~ 65535 ] A loop saves the information necessary for operating Bumpless changeover. a certain output is allowed in manual mode and as soon as it is converted to auto mode. which detects the last state of manual mode of the current system during the mode conversion and induces it to continue the control output from the part smoothly. it uses MV_BMPL function. master loop detects the slave loop state with master loop MV_BMPL allowed and creates the control output to be smoothly continued. That is. Also.12. the output rises from 0 again.Setting disabled K DEVICE AREA : %KD[21+525B+16L] Data unit : DINT [ -2747483648 ~ 2747483647 ] It represents the current error of a loop. PID Flag Configuration Data unit : INT [ -32768 ~ 32767 ] It represents MV of a loop. error is defined as SV – PV. it is delivered to U device by using instruction such as MOV every time it scans and it is used as the input of system drive via output devices such as D/A conversion module. it means that the control system state reaches the desirable state. it increases the output from 0 like a control system that is newly started. _PID[B]_[L]ERR (PID ERRor value) . refer to the examples of program. Built-in PID Function 12. The memory is automatically set and input by means of PID internal operation while it is prohibited for a user to set the value. To prevent the mode conversion impact.4. integral and differential control outputs can be independently calculated.17549435e-38 . _PID[B]_[L]MV_p (PID MV Proportional component) . _PID[B]_[L]MV_i (PID MV Integral component) . If the current system error is known.40282347e+38 ] It displays the differential control value of a loop. error is rapidly reduced from its excessive state and reaches to the normal state.17549435e-38 ~ 3. _PID[B]_[L]MV_d (PID MV Derivative component) .40282347e+38 ~ -1. proportional. That is.40282347e+38 ] It represents the proportional control value of a loop.40282347e+38 ] It displays the integral control value of a loop. 0 . the vibration is minimized and the residual drift(stable state error) is maintained as 0.Setting prohibited K DEVICE AREA : %KD[24+525B+16L] Data unit : REAL [ -3. 1. 1.Setting disabled K DEVICE AREA : %KD[22+525B+16L] Data unit : REAL [ -3. 616 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.17549435e-38 . By comparing three outputs. 1. _PID[B]_[L]DB_W (PID DeadBand Width) . the operation state of control system and PID control may be accurately comprehended while MV is calculated with the sum of MV_p. it is necessary to substitute SV for PV(can not checked externally). if PV is within the section of [SV – DB_W] ~ [SV + DB_W].17549435e-38 ~ 3.12.40282347e+38 ~ -1. Built-in PID Function 12. 0 . The only positive value is available and it operates within the area set up and down the SV. MV_i and MV_d.Setting prohibited K DEVICE AREA : %KD[23+525B+16L] Data unit : REAL [ -3. PID Flag Configuration starts.Setting area K DEVICE AREA : %KW[50+1050B+32L] Data unit : WORD [ 0 ~ 65535 ] It sets the deadband of a loop. If setting the value to 0.17549435e-38 ~ 3.17549435e-38 .4.1 5/09 . the function does not work.40282347e+38 ~ -1. 0 . If setting it as 0. it's like the pause to control in a stable section and through it.7. _PID[B]_[L]AT_HYS_val value operates as a high deadband when PV increases or as a low deadband when PV decreases. It is normally used to avoid excessive force on drivers as the system output slightly vibrates by differential vibration. a deadband is formed as much as up/down of SV. of a loop and makes the differential effect reacting as an instant impact more smooth and constantly. it may result in more smooth differential output. ERR is forcibly calculated as 0 and the change of MV stops as long as PV remains in the section. AT_SV used for SV is separately set. If inputting a value into DB_W during PID control.12. If setting it higher. _PID[B]_[L]Td_lag (PID Td lag filter) . _PID[B]_[L]AT_SV (PID Autotuning SV) . a driver receives input uniformly while it operate stably and helps it not to be overburdened. AT vibrates 3 times up and down around AT_SV. _PID[B]_[L]AT_HYS_val (PID Autotuning HYSteresis value) .Setting area K DEVICE AREA : %KW[52+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It sets a proper directional deadband during AT of a loop. PID Flag Configuration ATTENTION Deadband It is used to eliminate small output flunctuation resulting from small change of state as PV approaches to SV. How to set _PID[B]_[L]AT_HYS_val is described in 14.4. the function does not work. It is recommended to use it after the system is properly stablized in a section set as deadband. Successful AT results depend on setting it properly.4.Setting area K DEVICE AREA : %KW[53+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] During AT of a loop. That is. If PV follows SV and enters the inside of deadband during control. R1. Built-in PID Function 12. based on differential calculation. The reason is because a control may suffer from temporary transient phenomena while entering into the deadband.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 617 .Setting area K DEVICE AREA : %KW[51+1050B+32L] Data unit : WORD [ 0 ~ 65535 ] It sets the primary delay filter. That is. _PID[B]_[L]AT_step may have a value between 0 ~ 7. 4 and 6 are the PV decreasing section. with which the deadband value is applicable only for high section of SV when the system’s PV increases toward SV. And. there is high/low convergence once but it may recognize it as several conversions. it’s like a digital switch’s chattering.1 5/09 . Vibration is completely eliminated but it may have residual drift and output has little change.Setting prohibited K DEVICE AREA : %KW[54+1050B+32L] Data unit : INT [ -32768 ~ 32767 ] It displays the AT operation state of the loop.12. almost signals may have even a part of noise component. and vice versa. During the procedure. PID control uses unidirectional deadband (hysteresis). It may have sudden output fluctuation. 618 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.4. during which it increases and decreases PV from SV 3 times. 2) I/O area : _PID[B]_[L]PV and _PID[B]_[L]MV are – I/O area respectively. The PID control instruction executes auto-tuning by using the converted value. The area not only displays operation information to a user but also saves the information necessary for operation. it may have vibration and overshoot. ATTENTION Transient state and normal state 1) Transient state : the state that a control system starts controlling and searching for a desirable control state. 1. D/A and others). and as a step in which integral value is stabilized. so it is necessary to connect to external devices(A/D. Built-in PID Function 12. so the control system may malfunction if setting it temporarily. High / low deadband If analog component of a sensor is converted to digital via AD device. if noise is input when SV=PV. WARNING 1) Setting prohibited : It is prohibited to set any item with the indication of – Setting prohibited among the items described in the above common bit area and individual loop area. 0 indicates AT operation is not started while 7 indicates AT operation is complete. To overcome it. 2) Normal state : the state that a control system reaches a desirable state via transient state. 3 and 5 are PV increasing section and 2. PID Flag Configuration _PID[B]_[L]AT_step (PID Auto-tuning step) . 4.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 619 . PID Flag Configuration R1. Built-in PID Function 12.12. if expecting several characteristics(mostly stabilization). In addition. _PID[B]_[L]MV_max. like PI control and PID control. not integral nor differential. Anti Wind-up 2 is organically connected MVp(proportional term result). set _PID[B]_[L]Kp and _PID[B]_[L]Ti only and input 0 to _PID[B]_[L]Td. a user may cancel an operation if Anti Wind-up 2 makes _PID[B]_[L]AW2D bit on the common bit area ON. ID control has 0 output theoretically once setting 0 to _PID[B]_[L]Kp(refer to equation 14.5). Then. MVi maintains the previous value without any calculation. For instance.3. in case of P control. enabling ID control. interestingly. Anti Wind-up 1 and Anti Wind-up 2. The operation principle is to limit MVi(integral result) to _PID[B]_[L]MV_max and _PID[B]_[L]MV_min. Built-in PID Function 12. Operation and Function of Anti Wind – up PIDRUN instruction supports two wind-up prevention functions. On the other hand. ID control and PID control and may not be cancelled. actual PIDRUN instruction calculates MVp = 0 and K_p = 1 internally if inputting 0 to _PID[B]_[L]Kp. I and D components. which are slightly complicate than the above-listed controls. However. I control and D control. I control and D control. ID control sets 0 to _PID[B]_[L]Kp and substitutes each ID control coefficient to _PID[B]_[L]Ti and _PID[B]_[L]Td. On the other hand. are often used. Operation and Function of Auto-tuning PIDRUN instruction has the AT function that tests a system through several basic settings and calculates _PID[B]_[L]T_s. _PID[B]_[L]K_p. it may be structured by setting _PID[B]_[L]Ti and _PID[B]_[L]Td as 0. To enable various controls.5. Meanwhile.1 5/09 . If only with MVp.12. Therefore. suitable for the system. _PID[B]_[L]AT_HYS_val and _PID[B]_[L]AT_SV should be set before AT while the AT function sets MV three times in good order of 620 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. PD control and PID control. MV may reach 土(_PID[B]_[L]MV_max) because of a large system error. The values such as _PID[B]_[L]MV_min. resumes I control and prevents MVi from being excessively accumulated. _PID[B]_[L]T_i and _PID[B]_[L]T_d. The former one that is basically supported may work for controls including I control. if you wish to use ID control. set _PID[B]_[L]Kp as 0 and set the remaining _PID[B]_[L]Ti and _PID[B]_[L]Td. If PI control is desired. if an error is large. Likewise. PIDRUN instructions support the function to allow or prohibit such controls by P.3. And.2 through 14. ID control. it induces PV to move to SV only with MVp. Functions of PID Instruction 12. PI control. it works for a control accompanying with P control and I control.5 Functions of PID Instruction Control Methods including PID The most commonly used PID controls are P control. checks the system’s state(PV) response.5. _PID[B]_[L]K_p. refer to the AT setting described in 14. In a case. which monitors. with which it controls the temperature of the heating furnace. which is divided into flow control and temperature control. calculates the flow value(MV_mst) calculated for a desirable temperature(SV_mst) and delivers it to slave loop. assuming temperature control through fuel’s flowrate. looking into the cascade operation. _PID[B]_[L]K_p. master loop measures temperature(PV_mst) at relatively later cycle than slave loop. cascade plays a role to deliver the MV(MV_mst) of master loop to SV of slave loop(SV_slv) with two loop operated.4 and induce the AT operation accordingly. it opens the fuel valve and control fuel’s flow. calculates _PID[B]_[L]T_s. To calculate the accurate tuning value. the application of cascade PID requires installing fuel’s flowmeter on a system. _PID[B]_[L]T_i and _PID[B]_[L]T_d suitable for the measurements. Therefore. Functions of PID Instruction _PID[B]_[L]MV_max and _PID[B]_[L]MV_min. _PID[B]_[L]K_p. _PID[B]_[L]T_i and _PID[B]_[L]T_d. measures the time and vibration degree to reach to the AT target value(AT_ST) and finally. ATTENTION Auto-tuning When a series of works end.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 621 . AT may automatically substitutes _PID[B]_[L]T_s. For instance. respectively. Now. Operation and Function of Cascade PIDCAS instruction executes CASCADE PID control by operating two PID loops. slave loop controls a flow by using a valve while master loop controls temperature by using the flow. the flowmeter so that fuel is supplied as much as flow needed by master loop and controls flow by using a valve. measures the fuel input at more frequency than master loop and adjusts the valve open/close(MV_slv). where the master loop delivers a desirable flow to the slave loop. Built-in PID Function 12. slave loop operates only with the target flow received from master. in case of a single loop PID control. in turn. operates it. a single PID loop is a system to indirectly control temperature. so a user must note that _PID[B]_[L]T_s. which are calculated. CASCADE PID control is used for chemical process or temperature control through fuel and the two loops used are called master and slave.12. _PID[B]_[L]T_i and _PID[B]_[L]T_d that are used before are to be eliminated. That is. Simply. Slave loop sets the flow value(MV_mst) received from master as its target(SV_slv).7. As such. irrespectively of temperature. In general. to the corresponding positions. Therefore. R1. AT performance depends on the anticipated value. 622 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. if it increases or decreases the target slave value(SV_mst). Built-in PID Function 12. it does master loop. heater ATTENTION Cascade system’s auto-tuning Cascade system’s AT auto-tunes slave loop first and then. When the manual mode _PID[B]_[L]MAN bit is not on in the master loop. Functions of PID Instruction If slave loop is converted to manual output state. to auto-tune slave loop. despite of anti-windup. it exchanges state data between two loops. master loop is also converted to auto output mode. the second windup for the entire cascade loop is prevented. As such.5. The function operates in accordance with the conditions without setting and _PID[B]_[L]PAUSE bit is not on.1 5/09 . If slave loop is caught in anti-windup. it executes AT of master loop. so master loop is also converted to manual output mode. the slave loop operates as an independent loop. when if _PID[B]_[L]MV_BMPL is on.12. it is necessary to anticipate how much SV the slave lop receives from master loop. smoothly executing the conversion. However. Once it starts working properly after the AT of slave loop. When slave loop is converted to auto output mode again. master output is not used. and if setting the value as AT_SV. master loop operates in PIDPAUSE mode. it is necessary to register them to a project and set them properly. respectively. Hardware Configuration The example system is structure as follows. Then.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 623 . calculates the output through operation and delivers it to an output module. A/D. First of all.5. R1. In general. special module and SoftMaster functions. CPU (2MLI-CPUU) CPU is a PID control because PID operation is executed here.12. Built-in PID Function 12. Please refer to the manual for the details on CPU. A control receives the data sensed by an input module. Functions of PID Instruction Directions of PID Instructions The chapter describe the directions of PID instructions. input and output use A/O conversion modules and D/A conversion modules. a user should connect I/O and design(tune) the inside of PID control. D/A conversion module and parameter registration To use A/D and D/A conversion module. install A/D and D/A modules and use the I/O synchronization function of I/O information module to register them. 2MLF-AV8A has 8 channels(CH0 ~ CH7). The following figure shows the setting window of 2MLF-AV8A in SoftMaster. Built-in PID Function 12. and the range of the value for PID control is to be set between 0 ~ 1000. as the global parameter. and it is delivered to PLC. which is x2000. a digital value to PLC. AGFAV8A setting may be changed in the I/O parameter setting window. it is necessary to register a parameter to use among the parameters assigned to the module. the 0 ~ 5 signal detected from a sensor during A/D conversion module operation is converted to a digital value between 0 ~ 1000. which appears when selecting I/O parameter in ‘Parameter’ item of project window.1 5/09 . A/D conversion module channel 0 receives 0 ~ 5 V as its input and delivers the output. Functions of PID Instruction Once a module is registered. Output data type is the PV of PID control.12.5. A/D Conversion Module (2MLF-AV8A) It functionally receives the state of an object to control from a sensor and delivers it to CPU. Now. Then. Change CH 0 to ‘Operate’ and set the input range to 0 ~ 5V(set along a sensor). 624 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. The MV digital output of 0 ~ 1000.12. to 4mA ~ 20mA and delivers it to a drive of an object to control. Built-in PID Function 12. Functions of PID Instruction D/A Conversion Module (2MLF-DV4A) D/A conversion module functionally converts the control output digital value. The figure shows the setting window of 2MLF-DV4A in SoftMaster. R1. which is created by PID control operation is reduced as small as 1/2000 and it is delivered to the signal of the driver. it may be changed in the I/O parameter setting window. 2MLF-DV4A model has totally 4 channels and like 2MLF-AC8A.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 625 . which is created by PLC’s control operation.5. It is necessary to change CH0 to ‘Operate’ and set the output range to 0 ~ 5V (set along a driver). Built-in PID Function 12. 626 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . it is necessary to register the parameter of each module prior to use.5. Functions of PID Instruction Register Parameter To approach A/D conversion module and D/A conversion module.12. A parameter of every special module installed may be automatically registered through the auto registration of special module parameter of Edit menu after opening Global Parameter in the project window. select parameters necessary for executing the ladder program and register them as the local parameters.12. Functions of PID Instruction Among them.5. Built-in PID Function 12.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 627 . R1. if a driver is voltage type of 0V ~ 5V. the output created by a sensor should be used as an input of A/D conversion module while the output created by D/A conversion module should be used as the input of driver. D/A conversion module should be also voltage type of 0V ~ 5V. if a sensor is current type of 4mA ~ 20mA. Functions of PID Instruction Sensor and Driver Besides D/A conversion module. it should be A/D conversion module type of 4mA ~ 20mA. Therefore. Built-in PID Function 12. If it is used directly as the motive power of driver. sensor and driver are media to deliver a state to a control from an object to control and deliver the output of a control to an object to control from a control. The output of D/A conversion module is used as a drive signal of a driver. PLC may be subject to malfunction. 628 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.12. For instance.5.1 5/09 . In addition. 5. Program example 1 The figure shows a program example to execute PID control by using A/D conversion module and D/A conversion module. Functions of PID Instruction Object to control The system uses water level control system as its object to control. Built-in PID Function 12. The structure of the water control system is as follows. (but. The water level system is designed to supply water to a water tank of which bottom is slightly open and maintain a desirable water level.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 629 . The water in a tank uniformly flows out and the increase/decrease of water depends on the water inflow by means of a pump.12. PID constant and SV value are set in the parameter monitor window in the program) R1. it is possible to view “Select Parameter/Device” 630 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it executes the control operation of PIDRUN block 0 and loop 0 and if it is complete. Built-in PID Function 12.12. the module outputs the value set when it is registered. PID Control (1) Register Parameter Monitor Register PID parameters in the parameter monitor window and execute control setting. If D/A output is deactivated. Functions of PID Instruction L1 : delivers A/D conversion input data to PV of PIDRUN instruction by using constant On contact.1 5/09 . “Register in Parameter/Comment”. L5 : If %MX0 bit is on. L10 : Delivers MV output of PIDRUN instruction to D/A conversion output data by using constant ON contact. it activates D/A output.5. If clicking the right button of mouse in the parameter monitor window and selecting. it is possible to monitor parameters and change the values even during the program RUN. If selecting all parameters and checking “OK”.”.12. a user can see the parameter to save the setting and state of block 0 and loop 0.” and “Parameter No.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 631 . R1. If selecting PID in “List”. Functions of PID Instruction window. Built-in PID Function 12.5. canceling “View All” and inputting 0 to “Block No. Functions of PID Instruction Getting SV To set SV. it was analyzed that PV outputs 8333 when the water level is 250mm. Simply. the value actually measured should be used as the state value of water level 250mm. set the parameters registered to the parameter monitor window. it is necessary to know PV conversion value of a system that a user desires. 8250. K_p and MV_max.5.1 5/09 . SV. The value is also used as SV when controlling 250mm. Settings include three. if a user desires to maintain the water level at 250mm.12. In the system. Therefore. but as a result of operating it actually. it searches for the PV value indicating 250mm. the sensor output value was 8250. 632 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. The cause of the error must be attributable to inaccurate sensor. Then. The following figure shows the view of example program’s parameter monitor window. error of measurement reference point and others. The value can be found by numerical analysis but it is more accurate to check it by using the response of an object to control experimentally. Control setting Download the previously created program to PLC and start monitoring. Built-in PID Function 12. 12. which is actually measured and Kp is given with 5 temporarily.5. MV_max is an item to limit the max. Functions of PID Instruction SV is set to 8250. R1. Built-in PID Function 12.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 633 . value of MV and is set to 1000 in accordance with ADC / DAC module. arrange it properly. 634 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Functions of PID Instruction Control state observance using trend monitor It activates trend monitor among the monitor functions of SoftMaster. register the data to observe. By allowing the docking of trend monitor. Built-in PID Function 12.12. By means of trend setting.1 5/09 .5. 12. Built-in PID Function 12.5.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 635 . Functions of PID Instruction R1. 5.12. select the trend graph tab on the bottom and register the parameters to monitor such as SV and PV of block 0 and loop 0. Built-in PID Function 12. Functions of PID Instruction Set the monitoring cycle as 200ms.1 5/09 . 636 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 12.5. the system starts operating. Built-in PID Function 12.4) If contact (%MX0) is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 637 . R1.7. Increase K_p to 100 and restart it. refer to 14. Functions of PID Instruction Program Execution (here. an example is introduced to show how to find a parameter manually and for auto tuning. Built-in PID Function 12.1 5/09 . 638 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Functions of PID Instruction It can be found that it uniformly and permanently vibrates due to too large K_p.12.5. R1. Set K_p = 10. the normal state residual drift lasts and there is a slight overshoot. Built-in PID Function 12. Functions of PID Instruction Set ‘K_p = 20.5.12. T_i =1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 639 . Due to too large T_i . T_i = 100’. 1 5/09 .5. 640 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. T_i = 5. Functions of PID Instruction Due to too small T_i. PV is slowly fluctuating. Built-in PID Function 12. Set K_p = 10.12. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 641 . Therefore. so it executes PI control only.12. Built-in PID Function 12. Functions of PID Instruction It shows the satisfactory results. R1.5. T_d = 0. tuning results are K_p = 10. T_i = 5. The current system is the system slow enough to control only with PI. To avoid duplicate. _PID[B]_[L]AT_SV value is used only during AT and once AT is complete. which is used only during AT. For instance. outputs of the system. depending on the system speed(how fast PV approaches SV). Built-in PID Function 12. AT increases PV by maintaining MV as _PID[B]_[L]MV_max up to 5100 ( SV + _PID[B]_[L]HYS_val ) and then. set _PID[B]_[L]HYS_val. In other cases. In AT. based on _PID[B]_[L]SV. During AT. it increases (automatically) from 0 up to 7. PV vibrates the system during AT so to be over _PID[B]_[L]SV. 0 Æ 10000 Æ 0 three times. 642 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. that is. Basically. if SV is 5000 and _PID[B]_[L]HYS_val is 100. executing tuning while reducing PV. especially using AT function.3. The basic AT function may operate with the system not operated. set _PID[B]_[L]AT_SV. it is necessary to set _PID[B]_[L]dMV.12. both values change in 3 cycles. in case of _PID[B]_[L]MV_min = 0. in case there is any possibility that a sudden change overburden the system. Then. it occurs higher than the reference during ascent while it does lower than the reference during descent.1 5/09 . AT executes different operation by stages while step increases form 0 to 7 and the step of the current loop can be checked by _PID[B]_[L]AT_step. it maintains MV as _PID[B]_[L]MV_min up to 4900 ( SV . check the setting of AT. In PIDSTOP state.5. As a deadband that occurs when PV approaches SV. Functions of PID Instruction AT (Auto-tuning) Operation While using and operating the system described in the above 14. That is. set _PID[B]_[L]MV_min and _PID[B]_[L]MV_max. _PID[B]_[L]MV_min and _PID[B]_[L]MV_max are respectively regarded as the min. so it is necessary to set a SV value suitable for the case harmful to the system into _PID[B]_[L]AT_SV. when the system has a PV less than _PID[B]_[L]AT_SV (smaller one in case of reverse operation). it automatically operates the system. AT step is 0 but once AT starts. apply the setting after trying to execute up to (4) of the above 14. Now. make sure to set _PID[B]_[L]AT_SV like _PID[B]_[L]SV.7./max. Next. As such._PID[B]_[L]HYS_val ). Although _PID[B]_[L]SV value was already set in the above. _PID[B]_[L]MV_max = 10000.7. the system operation signal(MV) that is delivered to motor or heater repeats the output. Therefore.3. at which AT stops. it may be subject to malfunction if a user manipulates the steps. Built-in PID Function 12.5.12.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 643 . R1. Functions of PID Instruction The above graph is the water level waveform gained by setting _PID[B]_[L]HYS_val value (50 in the example) properly and MV should have 3 square waveforms as seen in the figure. is not clear.3 square wave form on MV.3. Built-in PID Function 12.7. user defined values like U_SV. which is gained from the water level waveform. accurate AT operation may not be secured.12. Program Example 2 The figure shows the program that PID constant and SV setting are changed in the program. so if no. too large _PID[B]_[L]HYS_val is input.5. U_Kp. In addition. U_Ts. the system may slow down disadvantageously. 644 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _PID[B]_[L]HYS_val is set too small (10 in the figure). U_Ti and U_Td are input as PID parameters and it is also allowed to use monitor window as presented in 14.1 5/09 . Functions of PID Instruction In the above graph. If PIDPRMT contact (%MX01) is on. Functions of PID Instruction R1.5.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 645 . Built-in PID Function 12.12. 646 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.12.5.1 5/09 . Functions of PID Instruction Cascade Operation The above ladder program is the view of cascade configuration. based on the following block diagram. Built-in PID Function 12. to control the signal delivered to fuel valve more actively.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 647 .5. it supplies a uniform fuel on the operation of slave loop when master loop instructs a temporary value of fuel. Functions of PID Instruction The above block diagram is the system to measure the temperature of heating furnace.12. supply fuel to the heater and maintain a desirable temperature. if installing a flowmeter and structuring a slave loop. heater R1. Also. Built-in PID Function 12. 5.1 5/09 . Built-in PID Function 12.12. Functions of PID Instruction 648 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. which is used to notify any error in instruction. Operation stop Output reset Input is designed to be X.13.Y_max inversion Operation stop R1. STAT Some process control library functions and function blocks have STAT. Process Control Library 13. arithmetic instruction. the content of STAT code is as follows. it is displayed if X_min is larger than X_max while it is limited to max. Operation on STAT Name occurrence In case it may not work as previously set because 1 T_s error Scancycle operation T_s setting is earlier than the current scan time. data measurement and data creation. other than 0.X_max inversion 4 Y_min./min.1 Introduction Background This chapter describes the process control library relating to process control./min. Output is designed to be X. it means that the instruction had an error. it operates with the earliest time as possible and displays it. it is displayed if Y_min is larger than Y_max while it is limited to Output reset Operation stop 8 Other setting error Output reset max.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 649 . data process. If STAT has any other value. It means any other erroneous state of setting except the above statements Description 2 X_min. outputs 0 and make. if setting T_s as 0. if any. it processes the instruction every time it scans.#inf00000 E+000 or 1. if 2 should be the output to STAT as X_min and X_max are inversed while 4 should be output to STAT as Y_min and Y_max are inversed. and min. limits of X or Y. limit Process library keeps several min/max. As being structured to execute an operation if passing T_s time after comparing the previous operation time and the present time as it approaches to the instruction. 0 ≤ E (T_s) < T scan In the case. Process Control Library 13.13. In general. a bit displaying on the bottom of output that such limits are valid exists (i. Therefore.1.1 5/09 . Errors except T_s error in which STAT is 1 stop function or function block. limits. which is the way displaying that it is limited both to max. Introduction If two or more are detected in the above.: X_max_AL) and especially. T_s T_s existing in some instructions represents operation cycle of instruction and if setting T_s.e. That is. 6 should be output. Abnormal input It may not work properly if an instruction to have real numbers had abnormal input such as 1./min. limit and min. 650 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. T_s error is accumulated. DONE and ENO off. limit are set alike.#QNAN0000 E+000. it has temporal error E (T_s) and the error is not accumulated ordinarily because it reflects the error in the next operation cycle. values are limited. Setting same max. the sum of 2 and 4. if max. -1. if max. limit and min. the sum of two STATs is output. both alarms are turned on.#inf00000 E+000. the instruction operates every T_s time. and the instruction executes operation every time it scans to solve accumulated error and it outputs 1 to STAT value. 2. It executes PID operation of the related block and loop. it may work with STAT 1 indicated or STAT 1 blinks unless T_s setting does not have tolerance properly. the execution speed may not be same per scan. Process Control Library 13.1 5/09 . Totally 256 PID loops are available independently because the block may be 0 ~ 7 and loop of each block may be 0 ~ 31. so it should indicate 1 in STAT and the scan operates with 4ms. If scan is shortened to 2ms or 3ms. 2MLR Input REQ: Function block execution request BLOCK: Block number (0~7) LOOP: Loop number (0~31) Output DONE: On if done without error PID_STAT: PID state alarm Functions 1. STAT 1 is turned off and blinks. In the case. Output PID_STAT is hexadecimal and each PID loop shows the state as presented in the following table.PID Operator CPU Applicable: 2MLI. it may work properly if its scan cycle is 2ms or 3ms but the instruction may not work normally if it reaches to 4ms. 13. Process Control Function and Function Block ATTENTION Blinking STAT 1 (T_S error): Since every scan of PLC may have different data volume.13. 3.2 Process Control Function and Function Block PIDRUN . if a user sets T_s as 3ms and its scan cycle fluctuates between 2 ~ 4ms. 2. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 651 R1. For instance. 2. PV is limited by dPV_max setting. 4. Unused A loop is being operated. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Process Control Library 13. 16#0002 16#0004 ALARM 16#0008 16#0010 16#0020 16#0040 16#0080 16#0100 16#0200 16#0400 16#0800 STATE 16#1000 16#2000 16#4000 16#8000 K_p ERR dPV_AL dMV_AL MVmax_AL MVmin_AL AT_fail Unused PID_STAT AT_STAT AT_DONE EX_RUN MAN_OUT CAS_STAT CAS_MST AW_STAT Note that K_p is 0. AW1(Anti wind-up) or AW2 is operating. Process Control Function and Function Block Class Display 16#0001 Flag T_s ERR Description It may not execute every T_s because T_s setting is too small. Manual output in progress CAS (Cascade) in progress CAS (Cascade) operates as master. 652 Each state may be presented simultaneously. AT (Auto-tuning) is abnormally ended.13. Started by external run signal.1 5/09 . AT (Auto-tuning) in progress AT (Auto-tuning) ends. MV is limited by MV_max setting. MV is limited by dMV_max setting. MV is limited by MV_min setting. Block may be 0 ~ 7.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 653 . 3. and master loop and slave loop should be between 0 ~ 31 in a same block and differently. Process Control Function and Function Block PIDCAS .Cascade PID Operator Applicable CPU: 2MLI.2. R1. Executes Cascade PID operation with a combination of two loops for a block. 2MLR Input REQ : Function block execution request BLOCK : Block number LOOP_MST : Master loop number LOOP_SLV: Slave loop number Output DONE : On if done without error MST_STAT: Master loop state alarm SLV_STAT: Slave loop state alarm Functions 1. 2. Process Control Library 13.1>. MST_STAT and SLV_STAT for output are hexadecimal and represent the states of master and slave respectively as presented in Table<13.13. Program Example Once input contact REQ is set. Process Control Function and Function Block PIDINIT . it initializes every setting of PID block 0 and loop 0 to 0.2. 2MLR Input REQ: Function block execution request BLOCK: Block number LOOP: Loop number Output DONE: On if done without error Function 1. Process Control Library 13.13. Initializes all loop PID settings of a block to 0.PID Initialize Applicable CPU: 2MLI. 654 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . The setting items to be changed are SV. Process Control Function and Function Block PIDPRMT . It changes PID settings of loop and block to input value.2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 655 . T_s. T_i and T_d as expressed in input.PID Parameter Change Applicable CPU: 2MLI. R1. K_p. 2. 2MLR Input REQ: Function block execution request BLOCK: Block number LOOP: Loop number SV: Set value T_s: Operation cycle K_p: Proportional constant Ti: Integral constant T_d: Differential constant Output DONE: On if done without error Functions 1. Process Control Library 13.13. 2.13. Program Example Main setting of PID block 0 and loop 0 is changed with the input values as seen in the figure. pattern control may be executed in accordance with system response. Since applying PIDPPMT instruction may change coefficient according to the conditions of a PID loop. Process Control Function and Function Block 3. 656 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Process Control Library 13.1 5/09 . 2.13. 2MLR Input REQ : Function block execution request MAN : Manual mode conversion bit MAN_MV: Manual mode conversion value SV: Set value PV: Present value PH_OFF: PV High section cancel bit PL_OFF: PV Low section cancel bit PH: PV High section set value R1.N / OFF Control Applicable CPU: 2MLI. Process Control Function and Function Block ONOFF . Process Control Library 13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 657 . Process Control Function and Function Block PL: PV Low section set value PH_DT: PV High section set delay time PL_DT: PV Low section set delay time HYS: Hysterisis radius setting PV_max: PV max. 2. 4. MV = On In case of (SV + HYS) < PV. 3. ON/OFF control creating Booltype output MV If PV is received from AD. it is converted to manual mode and MAN_MV value is output to MV. MV = Off In case of (SV – HYS) ≤ PV ≤ (SV + HYS).13. limit Output DONE : On if done without error STAT: State alarm MV: Output value EV: Error value PH_AL: PV High alarm PL_AL: PV Low alarm PV_max_AL : PV max. 5. 7. Process Control Library 13. Once setting MAN. limit PV_min: PV min.2. high alarm PV_min_AL : PV min. irrespective of the operation results.1 5/09 . 658 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it is necessary to convert the data type to REAL prior to use. In case of (SV – HYS) > PV. MV = MV(previous) It represents ‘Error value EV = SV – PV’. 6. low alarm Functions 1. 10. However. If setting each up/down section of PV to PH/PL. the output may be displayed with ‘1. In PH_DT/PL_DT. PV input may be limited by setting the max. it does not execute each PH_AL/PL_AL operation. the output delay time of 에는 PH_AL/PL_AL may be set. When it reaches the limits. PV_max_AL/PV_min_AL alarms are ON.13. Process Control Function and Function Block 8.2. 9.#inf00000 E+000’ or ‘-1. it displays the respective corresponding PH_AL/PL_AL alarm when it is beyond the sections.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 659 . value of each PV in PV_max/PV_min. 12.#inf00000 E+000’but the output except EV is normally operated./min. if PH_OFF/PL_OFF bit is ON. If EV is out of the real number data range . 11. R1. Process Control Library 13. 2. in case of not more than 4000. PH_AL is set. Process Control Function and Function Block Program Example • If PV is over 8100 (8000+100). MV is ON. • • 660 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. PL_AL is set. it is regarded as 0 and PV_min_AL is set.13. it is regarded as 16000 and PV_max_AL is set. Process Control Library 13. if it is not more than 0. MV is OFF while if PV is less than 7900 (8000100). If PV is not less than 12000.1 5/09 . If PV is not less than 16000. 2MLR Input REQ : Function block execution request REM : Remote input setting L_IN: Local input R_IN: Remote input CH_B: Check back input TIMER: Check back queue time Output DONE : On if done without error Y: Output value T_OVER: Time over alarm T_LEFT: Left time display FAULT: Check back failure alarm R1. Process Control Function and Function Block SW_L .2. Process Control Library 13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 661 .Input latch CPU Applicable:2MLI.13. 13. In 10 secs. Y is ON and timer works for 10 seconds. Y continues to be ON. 662 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Y is OFF and Fault is ON. if CH_B is ON. 3.2. in case of ON. it is designed that it determines a trouble and outputs fault without any operation instruction unless CHECK_BACK signal (RUN signal of a pump) is input after an operation instruction Y is output. it receives R_IN as its input. 6. outputs OFF to Y and turns FAULT ON. If REM is OFF. T_LEFT shows the left time and T_OVER is ON after the left time passes. 5. it may not work due to a fault/trouble or it may cause an accident due to any other reasons as it outputs continuous operation instruction unless it is checked whether a pump actually works with a check back signal after receiving pump operation instruction. Process Control Library 13. if CH_B is OFF even for a while. during while T_LEFT shows the left time. Against it. Program Example If IN is ON with REQ set. If CH_B and input are ON after a time set in TIMER. Process Control Function and Function Block Functions 1. T_OVER is ON. it regards it as system fault. Y is maintained as ON while if CH_B is OFF. 4. Then it outputs OFF to Y even though CH_B is ON again. If using pump control. Once the first input is ON. If input is OFF. it receives L_IN as its input.1 5/09 . output Y is ON and it waits for CH_B (check back) signal for a time set in TIMER. 2. it operates from the first step. 2-Way Valve Control Applicable CPU: 2MLI. 2MLR Input REQ : Function block execution request REM: Remote input setting V2_IN: Select local valve2/1 RV2_IN: Select remote valve2/1 CH_B1: Input valve 1 check back CH_B2: Input valve 2 check back TIMER: Check back queue time Output DONE : On if done without error Y1: Output 1 Y2: Output 2 T_OVER: Time over T_LEFT: Left time display FAULT: Check back failure alarm R1. Process Control Library 13. Process Control Function and Function Block SW_2V .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 663 .2.13. If check back signal is not input in a check back input delay time after open instruction. T_OVER is ON. If CH_B2 is ON.13. In 10 secs. 7. 5. 6. output Y1 is ON and it waits for CH_B1 signal for a time set in timer. fault is OFF. 2. output Y2 is ON and it waits for CH_B2 signal for a time set in timer. If REM is OFF. 3. the only selected side should be open and the other side should be closed. T_LEFT shows the left time and T_OVER is ON once the queue time passes. Program Example If IN is ON with REQ set. Y2 is ON and the timer works for 10 secs. If input is reversely changed from/to ON -> OFF. Y1 and Y2 are OFF.1 5/09 . and the output may be secured as long as timer setting is set more than twice of scan cycle. it receives V2_IN as its input. fault is off. In case of 2-way valve. Process Control Function and Function Block Functions 1. if check back signal is input. If CH_B is OFF. Process Control Library 13. 4. if CH_B is ON. a valve may work properly unless it generates any output. if CH_B2 is off. the output is OFF. In a time set in timer. during which T_LEFT shows the left time. In addition. the fault is ON. If input is changed from/to OFF -> ON. It works from the first with input changed. it receives RV2_IN as its input. if REM is ON. 664 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.2. fault is output. fault is ON. and the output. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 665 .13. Process Control Library 13. Process Control Function and Function Block SW_3V .2. 2MLR Input REQ : Function block execution request REM: Remote input setting V_IN: Local input selection (1~3) RV_IN: Remote input selection (1~3) CH_B1: Input valve1 check back CH_B2: Input valve2 check back CH_B2: Input valve3 check back TIMER: Check back queue time Output DONE : On if done without error Y1: Output 1 Y2: Output 2 Y3: Output 3 R1.3-Way Valve Control Applicable CPU: 2MLI. 5. In addition. If check back signal is not input in a check back input delay time after open instruction. It works from the first with input changed. 666 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. if CH_Bn is ON. Input should have a value between 1 ~ 3. T_LEFT shows the left time and T_OVER is ON once the queue time passes. In a time set in timer. 4.2. 6. If input is changed from/to Vm -> Vn.1 5/09 . 2. In case of 3-way valve. Process Control Function and Function Block T_OVER: Time over T_LEFT: Left time display FAULT: Check back failure alarm Functions 1. a valve may work properly unless it generates any output.if REM is ON. it outputs 8 to STAT. if check back signal is input. it receives RV_IN as its input. and if it is not in the range.13. the only selected side should be open and the other side should be closed. 3. fault is off. output Yn is ON and it waits for CH_Bn signal for a time set in timer. and the output may be secured as long as timer setting is set more than twice of scan cycle. If REM is OFF. If CH_Bn is OFF. it receives V_IN as its input . Process Control Library 13. fault is output. fault is ON. the output is OFF. 7. R1. In 10 seconds. Process Control Library 13.13. If CH_B3 is ON. Process Control Function and Function Block Program Example If IN is changed to 4 with REQ set. T_OVER is ON and the output. During the time. fault is OFF. fault is ON. if CH_B3 is OFF.2. Y2 and Y3 are OFF.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 667 . Y1. Y3 is ON and timer works for 10 seconds. T_LEFT shows the left time. A value between Y_max and Y_min passes without restriction. output alarm Functions 1.Max. output limit Output ENO : On if done without error STAT: State alarm Y: Output Y_max_AL: Over max. output limit Y_min: Min.13.3 Data Process Function. Function Block LIM_PL(_R) . Data Process Function. 668 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2. output alarm Y_min_AL: Less min. value limit Applicable CPU: 2MLI./min.1 5/09 . Function Block 13.3. values. Process Control Library 13./Min. 2MLR Input EN: Function execution request X : Input Y_max: Max. It generates output Y by limiting input X within the max. 5. If INPUT is 3 : it outputs 3 to Y without restriction. Y_max_AL is ON and it outputs Y_max to Y. If INPUT is -12 : it outputs -10 (Y_min) to Y and Y_min_AL is On. R1. Function Block 3. If Y_max is not more than Y_min. If max. Program Example • • • If INPUT is 20 : it outputs 10 (Y_max) to Y and Y_max_AL is On. Y_min_AL is ON and it outputs Y_min to Y. Process Control Library 13. Data Process Function. 4.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 669 .13.3. limit is not less than Y_max. STAT indicates 4 and it outputs 0. If min. limit is not more than Y_min. variance rate limit state alarm 670 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.13. 2MLR Input REQ: Function block execution request MAN: Manual mode setting MAN_Y: Manual output RESET: Block operation reset X: Input RATE: Max. output limit Y_min: Min. Data Process Function. Process Control Library 13.1 5/09 .Max. variance rate limit Y_max: Max./Min. output limit Output DONE : On if done without error STAT: State alarm Y: Output value RATE_AL: Max.3. variance limit Applicable CPU: 2MLI. Function Block LIMR(_R) . max. value. /min. 7. output alarm Y_min_AL: Less min. output alarm Functions 1. 2. it outputs the value of MAN_Y to Y. R1. if MAN is OFF again. If variation is limited. It limits the max. If RESET is ON. Variance limit equation : 4. values are limited. If MAN is ON. Function Block Y_max_AL: Over max.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 671 .e. value. if max.13. 5. 3.e. it indicates Y_max_AL or Y_min_AL. it initializes the output Y to 0. P contact) to REQ.3./min. It may work at a desirable cycle if using the volume conversion detection contact of clock (i. 6. Process Control Library 13. _T1s) or other volume conversion detection contact (i. it indicates RATE_AL. The function block saves the internal state even though REQ is OFF and it resumes the previous operation if REQ is ON again. variance rate of input X and outputs by limiting the max. the variance is limited from the state. Data Process Function. 13.1 5/09 . so it passes the variance limit and max. Then.3. 672 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. outputs Y = 10000 and Y_max_AL is ON. Function Block Program Example 1. 3. X is changed from/to 0 3000 : the max. Then. X is changed from/to 0 30000 : the max. it increases by 5000. value limit and Y_max_AL is ON. so it is restricted to the variance limit for 2 scans. it increases by 5000. value limits and outputs Y = 3000. Data Process Function. variance is allowed up to 5000. Process Control Library 13. X is changed from/to 0 10000 : the max. so it is restricted to the variance limit for 6 scans. 2. variance is allowed up to 5000. variance is allowed up to = 5000./min. outputs Y = 10000 due to max. up/down variation of input X.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 673 . R1.3. 2MLR Input REQ: Function block execution request RESET : Block operation reset X: Input UP_val: Up limit DN_val: Down limit Output DONE : On if done without error STAT: State alarm Y: Output value UP_AL: Up limit alarm DN_AL: Down limit alarm Functions 1. respectively. Function Block LIMR_DR(_R) .13.Directional max. Process Control Library 13. 2. It outputs by limiting the max. variance limit Applicable CPU: 2MLI. The function block saves the internal state even though REQ is OFF and it resumes the previous operation if REQ is ON again. Data Process Function. DN_AL is OFF. 4.e. It may work at a desirable cycle if using the volume conversion detection contact of clock (i. Y decreases by 2 for 500 scans. if it outputs Y = 0. 6. 5. during which DN_AL is ON.e. Y may be increased or decreased as much as UP_val or DN_val. Y increases by 5 for 600 scans. it is displayed with UP_AL or DN_AL bit. if it outputs Y = 3000. UP_AL is OFF. up variation is 5. Function Block 3.13. down variation is 2. X is changed from/to 1000 0 : since the max. Program Example 1. Data Process Function. For the variation of X. Process Control Library 13. If UP_val or DN_val is negative. P contact) to REQ. X is changed from/to 0 3000 : since the max. _T1s) or other volume conversion detection contact (i. In case of RESET. 674 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. during which UP_AL is ON. 7. it outputs 8 to STAT.3. 2.1 5/09 . In case the Up/Dn limits are applied. the input X is directly reflected to Output Y. 2MLR Input REQ : Function block execution request X : Input RATE: Rate X_max: Max. output limit Y_min: Min. input limit X_min: Min.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 675 . output limit Output DONE : On if done without error STAT : State alarm Y: Output value X_max_AL: Input high alarm X_min_AL: Input low alarm Y_max_AL : Output high alarm Y_min_AL : Output low alarm R1. Function Block RATIO(_R) .Ratio converter Applicable CPU: 2MLI. input limit Y_max: Max.3.13. Process Control Library 13. Data Process Function. Y_max_AL or Y_min_AL alarm. Note that the reference point is not 0 but X_min.3. X_max_AL = On Y=0 676 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. . 10000 is input. it displays X_max_AL. 2./min./min. values of Y. and vice versa. Function Block Functions 1. 4. . value or not more than the min. values of X. Output Y is calculated from the equation: X_max and X_min limit the max. In case of not less than the max. value set in I/O. 3. In case of X = 20000 & RATE = 50 : If X is not less than X_max.1 5/09 . instead of X if X is not less than X_max. and vice versa. 5.13. Process Control Library 13. It outputs a certain ratio of input X to Y. it operates with Y_max if Y is not less than Y_max. X_min_AL. 6. X_max. Program Example 1. it operates with X_max. Y_max and Y_min limit the max. Data Process Function. In case of X=1000 & RATE=20 : X is input with 1000. In case of X = 20000. Function Block 2. it is operated with X_max. 10000.3. Y_min_AL = ON Since Y is not more than Y_min. Y = -7800 3. 2MLR Input EN : Function execution request X : Input X_max: Max. input limit X_min: Min.X_max_AL = ON. input limit Y_max: Max. _R) .Scale converter Applicable CPU: 2MLI. . Data Process Function. output scale R1. Process Control Library 13. it is output with Y_min. RATE = -250 : since X is not less than X_max. Y = -20000 SCALE(_UI.13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 677 . it outputs 8 to STAT because the denominator of the equation is 0. 2./min. 1._R) instruction outputs STAT 2. 3. It changes input X to the scale set after limiting the max.13. If X_max and X_min are same. Data Process Function. 8 and 12. Process Control Library 13.3. The output equation is as follows: 4. 678 If X is 4000: MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function Block Y_min: Min. It sets the range of input X to X_max. output scale Output ENO : On if done without error STAT: State alarm Y: Output value Functions 1. values. 6.1 5/09 . X_min and that of Y to Y_max. 4. Program Example It scales the value between 0 ~ 16000 to a value between -100 ~ 100. Y_min. 5. ENO is OFF. If SCALE (_UI. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 679 . Process Control Library 13. Function Block 2. Despite of Y = 150. 5. 3.3. TIME_EN(_UI) . it outputs Y = 100 because of Y_max = 100. 4.13. If X is 20000: it limits X to 16000.Converting day. hour. minute. second and 1/1000 sec to TIME type data CPU Applicable: CPU2MLI2MLR Input REQ : Function block execution request DAY : day HOUR : hour MIN: minute SEC: second mSEC: 1/1000 second R1. Data Process Function. it is OUT = T#0d20h20m0s0ms 680 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. MIN=30000. it generates STAT 8 and does not execute any operation.13. minute. If input is negative or if output result is output of the data expression range (0~49d17h2m47s295ms) of TIME type data. second and 1/1000 second data to TIME type parameter. 2. HOUR=0. Program Example 1. it is OUT = T#1d1h1m1s1ms In case of DAY=0. mSEC=0. HOUR=1. It converts day.3. Process Control Library 13.1 5/09 . mSEC=1. Function Block Output DONE : On if done without error STAT : State alarm OUT: Time output value Functions 1. SEC=0. hour. In case of DAY=1. 2. Data Process Function. SEC=1. MIN= 1. hour.13. Process Control Library 13. Data Process Function.3. second and 1/1000 second CPU Applicable: CPU2MLI2MLR Input REQ : Function block execution request IN: Time input MODE: Output mode(0~4) Output DONE : On if done without error STAT : State alarm DAY: Day HOUR : Hour MIN: Minute SEC: Second mSEC: 1/1000 second OVER_AL: Overflow alarm R1. minute. Function Block TIME_DE(_UI) Separating TIME type data to day.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 681 . Function Block Functions 1. hour. 8. If MODE is more than 5. mSEC= 1. DAY =0. It outputs as follows. SEC= 1. DAY =1.3. MODE 0 : display all day/hour/minute/second/ms MODE 1 : display hour/minute/second/ms MODE 2 : display minute/second/ms MODE 3 : display second/ms MODE 4 : display ms only If it is out of the range of output data. HOUR=25. 6. MODE = 1. 682 In case of IN =T#1d1h1m1s1ms. Process Control Library 13. MIN= 1. it indicates STAT 8 and does not work. (65535 in case of TIME_DE_UI) and sets OVER_AL. It outputs TIME type input separately by day. MODE = 0. 4. OVER_AL=Off In case of IN =T#1d1h1m1s1ms. Data Process Function. 9. 2. 2. MIN= 1. it outputs the max. HOUR= 1. mSEC= 1. 3. SEC= 1. second and 1/1000 second. depending on mode. 7. minute.1 5/09 . 5. OVER_AL=Off MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Program Example 1. value.13. OVER_AL=Off. HOUR= 0. IN case of IN =T#1d1h1m1s1ms. DAY =0. mSEC=32767. 6. HOUR= 0. MODE = 0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 683 .Small signal cut filter CPU Applicable: CPU2MLI2MLR Input EN: Function execution request X: Input CUT: Small signal cut range (%) X_max: Max. OVER_AL=On In case of IN =T#90061001ms. HOUR= 0. CUT(_R) . SEC=1. SEC= 1. mSEC= 1. Function Block 3. mSEC= 1. MODE = 4. SEC= 0. HOUR=1. Process Control Library 13. SEC=32767. DAY =0. input limit X_min: Min. input limit Output ENO : On if done without error R1. MIN= 0. MODE = 3. mSEC=1. Data Process Function. 4. input is modified and displayed as T#1d1h1m1s1ms. 5.3. The results are DAY=1. DAY =0. OVER_AL=On In case of IN =T#1d1h1m1s1ms.13. MIN=1501. MIN= 0. MIN=1. OVER_AL=Off In case of IN =T#1d1h1m1s1ms. MODE = 2. 5. Process Control Library 13. If input is a value between [X_min] and [CUT% of X_min ~ X_max]. 684 If X is 4000 : since it is not in 5% (CUT) of 16000 (Xmax .1 5/09 . Function Block STAT: State alarm Y: Output value CUT_ACT: CUT operation in progress. which is notified by alarm: X_max_AL and X_min_AL. it is ignored and the system outputs X_min. Program Example 1. If X_min is larger than X_max. limit is : it outputs Y = X_min and CUT_ACT is ON. Note that the reference point is not 0 but [X_min]. STAT indicates 2 and outputs 0. the max. limit alarm Functions 1. 3. If the input of max.13.3. X_max_AL: Input max. Data Process Function. 4000 is output with no change. For input. 4. limit alarm X_min_AL: Input min. 2./min. values are limited by X_max/X_min. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1./min.Xmin). 2MLR Input EN: Function execution request X: Input OFFSET : Output offset DB: Deadband half width GAIN: GAIN(%) of Deadband section Output ENO : On if done without error Y: Output value DB_ACT: Alarm if input is within DB Functions 1.13.3. R1. it outputs 0(X_min) and CUT_ACT is ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 685 . Process Control Library 13. Function Block 2. If X is 18000 : since it is limited to 16000. Data Process Function. the value of 16000 is output and X_max_AL is ON. 5% of 16000. 3. D_BAND(_R) Deadband Application Output CPU Applicable: 2MLI. If X is 100 : since it is not more than 800. Output Y is calculated by applying deadband to input X. Function Block 2. If operation result is out of the data expression range of integer(INT).#inf00000 E+000’ or ‘-1.#inf00000 E+000’and in the case. 7.1 5/09 . Data Process Function. Both ends of deadband affect the output outside the deadband. Since DB represents scale.3. If operation result is out of the data expression range of real number (REAL). DB_ACT bit is ON if input X is within deadband. it should be used through absolute value operation like |DB|. output is indicated ‘1. ENO bit is OFF. 6. the output is limited to INT (-32768 ~ 32767). 5. Process Control Library 13. The I/O equation of deadband is as follows: 8. 4. a) UNDER THE BAND (X is not more than -|DB|) : b) IN THE BAND (X is within -|DB| ~ |DB|) : c) 686 OVER THE BAND (X is larger than |DB|) : MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 3.13. Deadband is set with a range of –|DB| ~ |DB|. If INPUT is 3 : X is within DB = 5. Data Process Function. Function Block Program Example 1. Process Control Library 13.If INPUT is 16 : R1. DB_ACT is ON 3.3.If INPUT is -8 : 2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 687 .13. 2MLR Input REQ: Function block execution request MAN: Manual mode MAN_Y: Manual mode output PAUSE: Pause X : Input DELAY: No. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function Block DELAY (_R) .13.1 5/09 . It saves the current input every scan cycle and outputs the previous input at the same time.Delay Output CPU Applicable: 2MLI.3. 688 It generates output X of which input X is delayed as much as T_s * DELAY (T_s unit : [sec]). of Delay sample T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value Functions 1. Data Process Function. Process Control Library 13. 2. output pauses and the current data are saved. it outputs 8 to the STAT and does not work. Since DELAY is 20 and T_s is 500ms. Y outputs X value 10 seconds ago.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 689 . It is possible to input DELAY scan up to 100 scans. If PAUSE is ON. it outputs MAN_Y in manual mode and it does not save the current data. Data Process Function. R1. If MAN is ON. Process Control Library 13. 6.13. Program Example 1. if more value is input.3. Function Block 3. 4. If the first operation is permitted. so it outputs 0 as much as T_s * DELAY when it returns to auto mode. 5. it outputs 0 as much as T_s * DELAY because there is not previous value. output limit Y_min: Min.1 5/09 . output alarm 690 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Process Function. 2MLR Input REQ : Function block execution request SEL: Select Input 1/2 X1: Input 1 X2: Input 2 Y_max: Max.13.Constant selection switch CPU Applicable: 2MLI. output alarm Y_min_AL: Less min. output limit EX_IN: Select external input EX_X: External input Output DONE : On if done without error STAT: State alarm Y: Output value Y_max_AL: Over max. Function Block VAR_SW (_R) .3. Process Control Library 13. /min value of output may be limited by setting Y_max and Y_min. Data Process Function. 5. 2. EX_X is also limited by the max.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 691 . The max. It is possible to output EX_IN by connecting external devices (MMI and etc) to EX_X. value. If Y_min is larger than Y_max.13. Process Control Library 13. If X2 is 1000 and in case of EX_IN=ON. EX_X=-1000: EX_IN is applied and after being limited by the min. Program Example Since SEL is 1. It outputs X1 or X2 depending on SEL bit setting./min. 2. 3. 1. 4.3. values. 3. value. it outputs 0 and Y_min_AL is ON. Function Block Functions 1. STAT outputs 4. it outputs 16000 and Y_max_AL is ON. If X2 is 10000 and EX_IN is OFF: X2 is applied and it outputs 10000. R1. it outputs X2 if EX_IN is OFF. If X2 is 20000 and EX_IN is OFF: X2 is applied and after being limited by the max. RESET works as soon as REQ is ON. 3. it reaches to the value ( X1 / X2 ) selected as Y increases or decreases as much as DEL_Y every T_s. Process Control Library 13. 2MLR Input REQ : Function block execution request SEL : Select input X1: Input 1 X2: Input 2 DEL_Y : Output increment limit T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value Functions 1. 2.1 5/09 692 . It selectively outputs X1 or X2 depending on SEL bit setting. Function Block ANA_RSW(_R) .13.Analog increment limit switch CPU Applicable: 2MLI.3. If SEL bit is changed. Data Process Function. Therefore. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it outputs the input selected by SEL as its initial value. 13. Function Block 4. Data Process Function. Even though SEL bit is not changed.Analog time limit switch CPU Applicable: 2MLI. Program Example 1. Y increases by 10 every 500ms and it reaches to Y=300 in 10 seconds. Process Control Library 13. it reaches to the value selected as Y increases or decreases as much as DEL_Y every T_s if the value selected by SEL (X1 / X2) is changed. ANA_TSW(_R) . If it is changed from SEL=OFF to SEL=ON. Y increases by 10 every 500ms and it reaches to Y=200. 2MLR Input REQ : Function block execution request R1. If X1 is changed to 300 with SEL=OFF. 2.3.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 693 . therefore. it follows T_21 time.#inf00000 E+000’or ‘-1. 5.5. 2. If the operation result is out of the data expression range of integer (INT). It selectively outputs X1 or X2 depending on SEL bit setting. it follows T_12 time. it may reach to the target input earlier than the pre-determined time. 4. depending on SEL selection. An integer type instruction. 3. Therefore. the output is limited to INT (-32768 ~ 32767). so it has an error up to 0. DONE bit is OFF. Function Block SEL : Select input X1: Input 1 X2: Input 2 T_12 : Input 1->2 conversion time T_21: Input 2->1 conversion time Output DONE : On if done without error Y: Output value Functions 1.1 5/09 . 7. 6. ANA_TSW is subject to round-off during the conversion. RESET works as soon as REQ is ON. Process Control Library 13.#inf00000 E+000’ and in the case. it outputs the input selected by SEL as its initial value.3. If it is changed from X1 to X2. 694 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If the operation result is out of the data expression range of real number (REAL). Data Process Function.13. It changes the data before SEL change to the data after SEL change gradually (RAMP). the output is displayed as ‘1. if it is conversely changed from X2 to X1. based on the pre-determined time. Data Process Function. ANA_SEL(_R) . Function Block Program Example 1. 1000 for 5 seconds. Process Control Library 13. 2MLR Input REQ : Function block execution request HIGH : Select scale-based input LOW : Select scale-based input R1.13. 2.3.Analog scale comparative switch Applicable CPU:2MLI.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 695 . In case of SEL=OFF In case of SEL=ON ON : it decreases toward Y=1000 OFF: it increases toward Y=-1000 -1000 for 3 seconds. 13. it outputs the lowest one among X1 ~ X3 and the corresponding BS is ON. 3.3. Data Process Function. LOW = OFF. 6. if three inputs are same. In case of HIGH = ON. After selecting a middle value as above. X3 among the inputs is disregarded. LOW = ON. In the case. 696 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. if two inputs are same.1 5/09 . Process Control Library 13. 4. In case of X3_LOCK = ON. In case of HIGH = OFF. 2. it selects a middle one. After selecting a middle value. it is equal to 2 input. it outputs the highest one among X1 ~ X3 and the corresponding BS is ON. If HIGH = LOW (both ON or OFF) is set. it outputs these three values to output Y and every BS is ON. 5. it outputs the two values to output Y and the corresponding two BS are ON. Function Block X1: Input 1 X2: Input 2 X3: Input 3 X3_LOCK: Input 3 effective bit Output DONE : On if done without error Y: Output value BS1: Block select1 BS2: Block select2 BS3: Block select3 Functions 1. so the middle value is defined as a larger one between them. It outputs a middle value among X1 ~ X3 and the corresponding BS is ON. In case of HIGH = ON. X3_LOCK = ON. In case of HIGH = OFF. LOW = OFF. it outputs Y = 1000 and BS3 is ON. it outputs Y = 3000 and BS1 is ON. Process Control Library 13. In case of HIGH = OFF. it outputs Y = 5000 and BS2 is ON. 3. LOW = OFF. it outputs Y = 5000 and BS2 is ON. X3_LOCK = OFF. LOW = ON. In case of HIGH = ON. 4. 2.3. In case of HIGH = ON.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 697 . X3_LOCK = ON. 5. In case of HIGH = OFF. Data Process Function. 6. Function Block Program Example 1. X3_LOCK = OFF. LOW = ON. X3_LOCK = OFF. it outputs Y = 3000 and BS1 is ON.13. LOW = ON. R1. LOW = ON. it outputs Y = 3000 and BS1 is ON. X3_LOCK = OFF. HF limit filter Applicable CPU: 2MLI. 2MLR Input REQ : Function block execution request FILT_ON : Filter ON X : Input GAIN: Filter gain (%) LAG: LAG filter coefficient OFFSET: Output offset T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value 698 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .13. Function Block LAG(_R) .3. Process Control Library 13. Data Process Function. R1. After the filter operation. it indicates STAT 8 and outputs 0. LAG filter operates and the output equation is as follows. 2. Function Block Functions 1.13. 7. Y represents actual output while represents internal output. Data Process Function. If in the LAG_R operation. Input X is output to output Y via LAG filter. the data are out of the expression range of real number parameter(REAL). It processes with filter limiting HF components. If FILT_ON bit is on. ATTENTION In the above equation. OFFSET is added to the internal output value and the offset does not pass the filter. The input-output procedure may have an error lower than 0. LAG filter does not filtrate input and the output equation is as follows. 5. 3. Process Control Library 13.001%.3.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 699 . 4. If FILT_ON bit is off. 6. it filtrates HF component and outputs. Data Process Function. 2MLR Input REQ 700 : Function block execution request MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3. LEADLAG(_R) .13. Function Block Program Example If input X is changed with REQ and FILT_ON turned on.1 5/09 .HF/LF limit filter Applicable CPU: 2MLI. It is operated by I/O equation every 10msec (T_s). Process Control Library 13. it generates outputs. 13.1 5/09 After the filter operation. LEADLAG filter does not filtrate input and the output equation is as follows. It processes with filter limiting HF/LF components Output is generated through LEAD filter and LAG filter. Data Process Function. LLEADLAG filter operates and the output equation is as follows. If FILT_ON bit is on. R1. If FILT_ON bit is off. 5.3. 2. OFFSET is added to the internal output value and the offset does not pass the filter. 4.001%. The input-output procedure may have an error lower than 0. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 701 . Process Control Library 13. 6. Function Block FILT_ON: Filter ON X : Input GAIN: Filter gain (%) LEAD : LEAD filter coefficient LAG: LAG filter coefficient OFFSET: Output offset T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value Functions 1. 3. Y represents actual output while represents internal output. 702 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Process Control Library 13. the data are out of the expression range of real number parameter(REAL). It is operated by I/O equation every 10msec (T_s). it filtrates HF/LF component and outputs.1 5/09 . Data Process Function.13. it generates outputs. Function Block ATTENTION In the above equation. Program Example If input X is changed with REQ and FILT_ON turned on.3. it indicates STAT 8 and outputs 0. 7. If in the LEADLAG_R operation. 13. 2. If the operation result is out of the data expression range of Y (REAL). ‘1. Function Block 13. 2MLR Input EN : Function execution request GAIN1 : Operation gain 1 X1: Input 1 GAIN2: Operation gain 2 X2: Input 2 Output ENO : On if done without error Y: Output value Function 1. Arithmetic Operation Function. Process Control Library 13.Y = G1X1 + G2X2 Applicable CPU:2MLI.#inf00000 E+000’.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 703 .4. ENO is OFF and it is displayed as 1. R1. ‘-1.#inf00000 E+000’. DONE bit is OFF.4 Arithmetic Operation Function.#QNAN0000e+000’and in the case. Function Block ADD2 . It executes the pre-determined arithmetic operations. Function Block Program Example In case of X1 = 10. 2MLR Input EN : Function execution request GAIN : Operation gain X1: Input 1 X2: Input 2 704 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.7 (10.Y = Gain (X1 / X2) Applicable CPU: 2MLI.3 (20.4.0. Arithmetic Operation Function.0 + 26.0’. Process Control Library 13.0.0) + 1. DIV2 .0) = 7. X2 = 20.13.1 5/09 .0 = 33. it results in ‘Y = 0. 2.0 / 20.4 (10.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 705 . Function Block Output ENO : On if done without error Y: Output value Functions 1. it outputs ‘1. R1.2’. Program Example In case of X1 = 10. X2 = 20.13. ENO is OFF and it is displayed as 1. If the operation result is out of the data expression range of Y(REAL). If X2 value is 0.4. Arithmetic Operation Function.0. 3.#QNAN0000 E+000’because its denominator is 0.#inf00000 E+000’and in the case. Process Control Library 13. DONE bit is OFF.0) = 0.0.#inf00000 E+000’or ‘-1. it results in ‘Y = 0. It executes the pre-determined arithmetic operations. Y = (G1X1+G2X2)G3 + G4 Applicable CPU:2MLI.4.1 5/09 .13. Process Control Library 13. 706 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 2MLR Input EN : Function execution request GAIN1 : Operation gain 1 X1: Input 1 GAIN2: Operation gain 2 X2: Input 2 GAIN3: Operation gain 3 GAIN4: Operation gain 4 Output ENO : On if done without error Y: Output value Functions 1. Arithmetic Operation Function. It executes the pre-determined arithmetic operations. Function Block ARITH1 . ENO is OFF and it is displayed as 1.#QNAN0000e+000’and in the case.0)2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 707 . it results in ‘Y = (0.4.0 = (4.0.0+3. Process Control Library 13. R1.#inf00000 E+000’. DONE bit is OFF.#inf00000 E+000’.13. X2 = 20.4(10.0.0+10.0)+0. Program Example In case of X1 = 10.0’. If the operation result is out of the data expression range of Y(REAL).0+10. Arithmetic Operation Function.0))2. ‘1. Function Block 2. ‘-1.15(20.0 = 24. 2MLR Input EN : Function execution request GAIN1 : Operation gain 1 X1: Input 1 GAIN2 : Operation gain 2 X2: Input 2 GAIN3 : Operation gain 3 X3: Input 3 GAIN4 : Operation gain 4 X4: Input 4 GAIN5 : Operation gain 5 GAIN6 : Operation gain 6 708 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Arithmetic Operation Function.1 5/09 . Process Control Library 13.4. Function Block ARITH2 .Y = (G1X1+G2X2+G3X3+G4X4)G5 + G6 Applicable CPU:2MLI.13. 0.7+10. ‘1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 709 . If the operation result is out of the data expression range of Y (REAL). ‘-1. X2 = 20.2(30.0’. it results in ‘Y = (0.#QNAN0000e+000’and in the case. X3 = 10. 2.0. It executes the pre-determined arithmetic operations. Program Example In case of X1 = 10.#inf00000 E+000’.#inf00000 E+000’. Function Block Output ENO : On if done without error Y: Output value Functions 1.3(10.0)+0. DONE bit is OFF.4.5(20.0. Arithmetic Operation Function. Process Control Library 13.0))0.7+10. R1.0.0 = 24. ENO is OFF and it is displayed as 1.13.0 = (1+10+3+6)0.0)+0.1(10. x4 = 30.0)+0. 1 5/09 . 2MLR Input REQ : Function block execution request RESET: Block operation reset Y_RESET: reset value MAN: manual mode Y_MAN: Manual output value X : Input CUTOFF: Small signal cut width SQRT: Square root setting GAIN: Input gain (%) TIMER: Timer setting T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value 710 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.Analog Summer Applicable CPU:2MLI.4.13. Function Block SUMA(_R) . Process Control Library 13. Arithmetic Operation Function. it is indicated with ‘1. 5. Function Block T_LEFT: Timer left time FIN: Timer finish display Functions 1. it may have a skipping section of operation. whether negative or positive. Arithmetic Operation Function. 2.#inf00000 E+000’and in the case.13. If the operation results is out of the data expression range of Y(REAL). it operates from the first as much as from Y_RESET to TIMER time. it resumes the operation from Y_RESET value. If SQRT bit is on. 6. Process Control Library 13. If |X| is equal to or not more than |CUTOFF|. it may have an error less than T_s set time when the timer is finished. it outputs Y_RESET value. 3. Therefore. R1. 7.4.#inf00000 E+000’ or ‘-1. MAN_Y value is output but if the bit is OFF. 4. SUMA (INT type) instruction supports real number type output to prevent too fast saturation that may occur when output rapidly increases if it is summed up to a direction. FIN and etc) will be normally processed. If RESET bit is on. it operates with square-rooted X. it processes it as X = 0. 8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 711 . If MAN bit is on. if RESET bit is off. It sums up analog data input to X at the preset interval and outputs the result to Y. If program scan time is longer than 1msec. DONE bit is off but the internal state(T_LEFT. Process Control Library 13. 2. Then. In case of X=10. 712 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Then. Y increases by 10 every 2 seconds and it outputs Y = 150.1 5/09 . it results in ‘FIN = On’. In case of X=10. T_s= T#1s : If REQ is on.13. it results in ‘FIN = On’. Arithmetic Operation Function.4. Y increases by 10 every second and it outputs Y = 300. T_s= T#2s : If REQ is on. Function Block Program Example 1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 713 . Function Block TOTAL(_R) . Arithmetic Operation Function.13.Analog totalizer Applicable CPU:2MLI2MLR Input REQ : Function block execution request RESET: Block operation reset Y_RESET: Reset value TARGET: Set value X : Input value CUTOFF: Small signal cut width SQRT: Square root setting GAIN: Input gain (%) TIMER: Operation time TP1: Trip point 1 TP2: Trip point 2 R1. Process Control Library 13.4. and it applies the delivery rate through gain. As in the below figure. Arithmetic Operation Function. 2.1 5/09 . Totaling is executed from Y_RESET. 714 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. it totals by means of the operation of trapezoid addition. It totals analog data input to X. Process Control Library 13. 3. Function Block TP3: Trip point 3 TP4: Trip point 4 T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value TARG_AL: Set value alarm FIN: Operation finish alarm T_LEFT: Operation time end alarm TP1_AL: Trip point 1 alarm TP2_AL: Trip point 2 alarm TP3_AL: Trip point 3 alarm TP4_AL: Trip point 4 alarm Functions 1.4. in which the shaded area is added every T_s of operation cycle.13. it restarts the operation from Y_RESET value. it processes it as X = 0. FIN and etc) is normally processed. If output value is within TARGET-TP[n] ≤ Y ≤ TARGET+TP[n].4.13. 10. Function Block 4. If operation result is out of the data expression range of real number (REAL). In the case.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 715 . After the set value is set. DONE bit is off but the internal state (T_LEFT. it notifies a user that output value is more than the set value by means of TARG_AL. If |X| is not more than |CUTOFF|. 14. 15. output is displayed as 1. 12. 6. 9. it may have a skipping section of operation. If SQRT bit is on. If RESET is canceled as RESET bit is off. it turns on TP[n]_AL and shows how close it approaches to the set value. If operation result is out of the data expression range of integer(INT). Input-output may have an error less than 0. so it may have an error less than T_s time.#inf00000 E+000’. If program scan time is not less than 1msec. it may result in incorrect operation procedure. it operates with square-rooted X. R1. Arithmetic Operation Function. the output is limited to INT (-32768 ~ 32767).0e+38. 7. If RESET bit is on. 13. 5. 8. it becomes reset and outputs Y_RESET. 11. Process Control Library 13. If |GAIN * X| has a huge range over 1.#inf00000 E+000’ or ‘-1.001%. Output Y increases or decreases with no influence of target. Arithmetic Operation Function. TARG_AL is on in case of Y ≥ 5000 TP1_AL is on in case of 5000 – TP1 ≤ Y ≤ 5000 + TP1 TP2_AL is on in case of 5000 – TP2 ≤ Y ≤ 5000 + TP2 TP3_AL is on in case of 5000 – TP3 ≤ Y ≤ 5000 + TP3 TP4_AL is on in case of 5000 – TP4 ≤ Y ≤ 5000 + TP4 2. T_s=T#5s: Output Y increases from 10 (Y_RESET) by 500 for the first cycle (trapezoid addition). MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Then. Then. Function Block Program Example 1.13.1 5/09 716 . In case of X=200. Process Control Library 13. T_s=T#1s: Output Y increases from 10 (Y_RESET) by 100 for the first cycle (trapezoid addition). it increases by 200 per second from the next cycle and it outputs 5910 in 30 seconds. it increases by 1000 per 5 seconds from the next cycle and it outputs 5510 in 30 seconds.4. In case of X=200. 13.Average number output Applicable CPU:2MLI.4. Function Block TARG_AL is on in case of Y ≥ 5000 TP1_AL is on in case of 5000 – TP1 ≤ Y ≤ 5000 + TP1 TP2_AL is on in case of 5000 – TP2 ≤ Y ≤ 5000 + TP2 TP3_AL is on in case of 5000 – TP3 ≤ Y ≤ 5000 + TP3 TP4_AL is on in case of 5000 – TP4 ≤ Y ≤ 5000 + TP4 AVG_NUM(_R) . Process Control Library 13. Arithmetic Operation Function.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 717 . 2MLR Input REQ: Function block execution request MAN: Manual mode setting MAN_Y: Manual output X: Input N: Average number T_s: Operation cycle Output DONE : On if done without error STAT: State alarm R1. T_s= T#1s. 6. Program Example 1. T_s= T#1s. X * N is out of the data expression range of real number (REAL).#inf00000 E+000’ and in the case. the output is indicated as ‘1. If N is 0 or not less than 30001. it outputs 8 to STAT. N=3 : Y increases by 3 per 3 seconds X increases by 1 per second from 0.4. Arithmetic Operation Function. 2.1 5/09 718 . DONE bit is off. 3. T_s= T#2s. 4. If operation result is out of the data expression of integer(INT).#inf00000 E+000’ or ‘-1. 2. T_s is disregarded. N=6 : Y increases by 6 per 6 seconds MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Process Control Library 13. Function Block Y: Output value Functions 1. Output Y is updated with a new average every N * T_s. If MAN bit is on. N=3 : Y increases by 6 per 6 seconds X increases by 1 per second from 0. X increases by 1 per second from 0. It receives input X every T_s and outputs N average value. 5. If in the operation procedure.13. 3. the output is limited to INT (-32768 ~ 32767). Output Y has MAN_Y. If MAN bit is on.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 719 . Process Control Library 13.13. Arithmetic Operation Function. 3. R1. Output Y has MAN_Y. Output Y is updated with a new average every T_s. 2.4. T_s is disregarded. 2MLR Input REQ: Function block execution request MAN: Manual mode setting MAN_Y: Manual output X: Input N: Average number T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value Functions 1. Function Block AVG_MOV(_R) . It receives input X every T_s and outputs the values before the present time and N average value.Moving average output Applicable CPU:2MLI. the output is limited to INT (-32768 ~ 32767). Program Example 1. the output is indicated as ‘1.4. DONE bit is off. 2. T_s= T#1s.#inf00000 E+000’ and in the case. N=6 : Y increases by 1 per second 720 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. If operation result is out of the data expression of integer (INT). 6. X increases by 1 from 0.1 5/09 . If N is 0 or not less than 101. If in the operation procedure. Arithmetic Operation Function. N=3 : Y increases by 1 per second X increases by 1 from 0. Function Block 4. N=3 : Y increases by 2 per 2 seconds X increases by 1 from 0. Process Control Library 13. T_s= T#2s. 3. X * N is out of the data expression range of real number (REAL). T_s= T#1s. 5. it outputs 8 to STAT.#inf00000 E+000’ or ‘-1.13. 13.5 Data Measuring Function. Process Control Library 13.Alarm indicator Applicable CPU: 2MLI. Function Block ALARM_R . 2MLR Input REQ : Function block execution request X : Input YH1_OFF: Output value high 1 section off bit YH2_OFF: Output value high 2 section off bit R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 721 . Function Block 13. Data Measuring Function.5. 1 5/09 . Function Block YL1_OFF: Output value low 1 section off bit YL2_OFF: Output value low 2 section off bit YH1: Output high 1 section value YH2: Output high 2 section value YL1: Output low 1 section value YL2: Output low 2 section value YH1_DT: Output high 1 section waiting time (sec) YH2_DT: Output high 2 section waiting time (sec) YL1_DT: Output low 1 section waiting time (sec) YL2_DT: Output low 2 section waiting time (sec) X_MAX: Max. output scale Output DONE : On if done without error Y: Output value STAT: State alarm YH1_AL: Output high 1 section alarm YH2_AL: Output high 2 section alarm YL1_AL: Output low 1 section alarm YL2_AL: Output low 2 section alarm X_max_AL: Input high alarm X_max_AL: Input high alarm 722 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. input limit Y_sMAX: Max. output scale Y_sMIN: Min. Process Control Library 13. input limit X_MIN: Min.13. Data Measuring Function.5. Data Measuring Function. it does not work because the denominator is 0 and STAT outputs 8. 5. Function Block Functions 1. it can execute the operations of 2 upper limits. It changes and outputs integer input X to real number.5. 2 lower limits and scale. 2. 6. Since input is integer type. YH1 and YH2 may set high limits and notify an operator of any fault. an operator may set whether to use the function (YH_OFF) and the delay time (YH_DT). 3. It executes scale operation from the value between X_MIN ~ X_MAX to the value between Y_sMIN ~ Y_sMAX. 4. YL1 and YL2 may set low limits and notify an operator of when it is not more than it. it receives input from special module or external device and uses it as its input with no conversion. an operator may set whether to use the function (YL_OFF) and the delay time (YL_DT). In case of X_max = X_min. with it.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 723 .13. with it. Process Control Library 13. R1. YH1_AL On in a second.5. In case of X = 8900: Y = 11125. YH2_AL On in 2 seconds In case of X = 11000: Y = 13750.1 5/09 . YL2_AL On in 4 seconds.13. 3. Data Measuring Function. Process Control Library 13. YL1_AL On in 3 seconds In case of X = 1200: Y = 1500. YH2_AL On in 2 seconds In case of X = 2100: Y = 2625. 2. 4. YL1_AL On in 3 seconds. 724 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function Block Program Example 1. Function Block HYS(_R) . In case of UP_in < X.1 5/09 It receives input X. applies directional deadband(hysterisis) to it and notifies an operator of UP/DOWN state.Directional deadband Applicable CPU:2MLI. 2. Data Measuring Function. R1. In case of UP_out ≤ X ≤ UP_in. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 725 . UP_AL is On. 2MLR Input REQ: Function block execution request X : Input UP_in: Up set trigger UP_out: Up reset trigger DN_out: Down reset trigger DN_in: Down set trigger Output DONE : On if done without error STAT: State alarm UP_AL: Max. it maintains the previous UP_AL state.13. value high alarm DN_AL: Min. value high alarm Functions 1. Process Control Library 13.5. 3. Process Control Library 13. 8. Function Block 4. 5. In case UP_in value is not more than UP_out value. 6. In case of X < UP_out. DN_AL is on. 7. In case of X < DN_in. In case of DN_in ≤ X ≤ DN_out. In case of DN_out < X.13. it outputs 8 to STAT. Data Measuring Function. it outputs 8 to STAT. 9. 726 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . UP_AL is off.5. In case DN_out value is not more than DN_in value. DN_AL is Off. it maintains the previous DN_AL state. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 727 . Function Block Program Example 1. 3. If X is changed from 0 to 800: UP_AL On. DN_AL Off If X is changed from 800 to 650: UP_AL On. 2MLR R1. DN_AL Off If X is changed from 650 to 300: UP_AL Off. Process Control Library 13.Measuring Variation Per Section Applicable CPU:2MLI. DN_AL On RATE(_R) . Data Measuring Function.5. DN_AL Off If X is changed from 300 to 50: UP_AL Off.13. DN_AL On If X is changed from 50 to 150: UP_AL Off. 2. 4. 5. 5.13. it processes it with low pass filter of input. 2. The I/O equation of RATE instruction including LAG is as follows. Process Control Library 13. If PAUSE bit is on. The above equation may be summarized as follows if LAG is 0. 3. the block pauses. Data Measuring Function. If setting time constant in LAG. 6. 728 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Function Block Input REQ: Function block execution request MAN: Converting to Manual mode MAN_Y: Manual output value PAUSE: Pause X: Input LAG: LAG filter coefficient T_s: Operation cycle Output DONE : On if done without error STAT: State alarm Y: Output value X_old: Previous X Functions 1. If MAN bit is on. 4. 5. it outputs MAN_Y.1 5/09 . RATE function is the instruction indicating the variation per second of input X. #inf00000 E+000’. Y outputs -30 R1. Process Control Library 13. If the operation result is out of the data expression range of real number (REAL). If X increases by 1 per second. the output is displayed as ‘1. DONE bit is off but the internal state (i. Y outputs 1 If X increases from 10 by 1 per second. X_old) is normally processed.#inf00000 E+000’ or ‘-1. Program Example 1. the output is limited to INT (-32768 ~ 32767).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 729 . Y outputs 1 If X decreases from 10 by 30 per second. 2.e. In the case.5. 8. Function Block 7. If the operation result is out of the data expression range of integer (INT). 3.13. Data Measuring Function. Process Control Library 13.13. 730 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. It saves input X to Y (Array) every operation cycle (T_s). Function Block DMON(_***) .1 5/09 . Data Measuring Function. 2. of full output array INDEX: Array No. It is used to save the data that are changing temporally.5. 2MLR Input REQ : Function block execution request SNG/LOOP : Single/Loop operation X: Input T_s: Operation cycle Y: Output value Output DONE : On if done without error STAT: State alarm FULL: Output array full LOOP: No.Saving input array as much as output array Applicable CPU:2MLI. of location to save Functions 1. R1. _UDI (UDINT). 3. If SNG_LOOP is On. _W (WORD) and _DW (DWORD) may be used selectively. of array and stops with FULL on.5. 7. 1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 731 . If LOOP value is over 65535. 6. the data type started with DMON such as _DI (DINT).10] of INT type.13. it is engaged in single operation. 5. If SNG_LOOP is converted to single/loop. it is engaged in loop operation. 2. of array and continues to rewrite the original values from the first. depending on I/O data. X increases from 10 by 1 per second : a value is saved per second in good order of Y[0]=10 … Y[10]=20 and it results in FULL=On from 12 seconds. DMON function block is INT type instruction. X increases from 0 by 1 per second Y[0]=0 … a value is saved in good order of Y[10]=10 and it results in FULL=On from 12 seconds. Function Block 3. LOOP increases ever time array is full. _R (REAL). saves as much as no. saves as much as no.. Program Example Y is set to ARRAY [0. 4. Data Measuring Function. it is reset to 0. it is necessary to allow REQ again and initialize it prior to use. If SNG_LOOP is Off. _UI (UINT). During loop operation. Process Control Library 13. X decreases from 10 by 3 per seconds : a value is saved per second in good order of Y[0]=10 … Y[10]=-20 and it results in FULL=On from 12 seconds. 13.6 Data Function Block. input limit Output DONE : On if done without error 732 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Function Block. Function Block 13. 2MLR Input REQ : Function block execution request MODE : Mode conversion PAUSE : Pause X: Input LEAD_OFF: Lead alarm off LAG_OFF: Lag alarm off LEAD_DT: Lead alarm ON delay time LAG_DT: Lag alarm ON delay time X_max: Max.1 5/09 .PF Instrument Applicable CPU:2MLI. Function Block POWF .6. input limit X_min: Min. Process Control Library 13. it generates output Y along the PF profile. Profile type is selected depending on mode (0 ~ 3 selectable). it does not operate because the denominator is 0 and STAT indicates 8. It indicates lead and lag in LEAD_AL and LAG_AL and it is possible to set indication (_OFF) and delay time (_DT).1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 733 . lead offset 1 and lag offset -1. In case of X_max = X_min. If PAUSE is On. output Y is defined as 0. By referring to the input X receiving from PF sensor./min.5. MODE 2 : inclination -0. lead offset -1 and lag offset 1.5.6. Function Block STAT: State alarm Y: Output value X_pcnt: Percent output LEAD_AL: Lead alarm LAG_AL: Lag alarm X_max_AL X_min_AL Functions 1. 7. : Max. MODE 1 : inclination 1. 4. value low alarm At a point where X is 50%(center of the graph). indicated in X_PCNT and executes operation with %. operation stops and it does not indicate alarm bit until operation resumes. It is possible to set the max. 3. value of input X is limited by setting X_max and X_min. Input X is converted to the unit of % by setting X_max and X_min. 6. 2.13. MODE 3 : inclination -1. Data Function Block. 10. MODE 0 : inclination 0. it outputs 8 to STAT. value high alarm : Min. lead offset -1 and lag offset 1. value of input X in X_max and X_min. 8./min. a) b) c) d) 5. The outputs by modes are as presented in the figure below. When MODE is more than 3. The max. R1. 9. lead offset 1 and lag offset -1. Process Control Library 13. 1 5/09 . Input-output may have an error less than 0.001%. Process Control Library 13.13. Function Block 11. 734 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Function Block.6. LAG_AL = Off If X is 1500 : X_PCNT = 50 and Y = 0. LEAD_AL = Off.13. LAG_AL = Off If X is 2000 : X_PCNT = 66 and Y = -0. Data Function Block. 2. Process Control Library 13. Function Block Program Example 1. in 1 second. LEAD_AL = Off. If X is 0 : X_PCNT = 0 and Y = 0.5.6. 3.84.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 735 . in 2 seconds LAG_AL = On R1. LEAD_AL = On. 2. 2MLR Input REQ: Function block execution request X: Input REF_X: X coordinate array of LOOK-UP table REF_Y: Y coordinate array of LOOK-UP table Output DONE : On if done without error STAT: State alarm Y: Output value X_max_AL : REF_X high alarm X_min_AL : REF_X low alarm Functions 1. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.6.LOOK-UP Table output Applicable CPU:2MLI. 736 By using input array (REF_X) and output array (REF_Y). it indicates X_max_AL and X_min_AL. it generates alarm. Process Control Library 13. Input array REF_X should be arranged in ascending order. Function Block LOOKUP(_R) .13. and if the elements of array are same. If the value input through input X is same or out of the range of input array (REF_X). it creates LOOK-UP table by sections and gets output by applying input X. 3. Data Function Block.1 5/09 . Function Block 4.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 737 .e. of REF_X and REF_Y arrays are different. Data Function Block. If the no. If operation result is out of the data expression range of integer (INT).6. and in the case. it is indicated as ‘1. DONE bit is off but the internal state (i. X_max_AL. 5. If operation result is out of the data expression range of real number (REAL).#inf00000 E+000’ or ‘-1. STAT outputs 8. STAT outputs 8. 7. the output is limited to INT (-32768 ~ 32767).13.#inf00000 E+000’. 6. If the elements of REF_X are not arranged in ascending order. Program Example R1. Process Control Library 13. X_min_AL) is normally processed. 4] of INT and also sets the elements of array as [10. Function Block It sets REF_X as ARRAY [0. Process Control Library 13. 3. X_max_AL = Off If X is 100 : Y = 20. X_max_AL = Off If X is 15 : Y = 15. 50. X_min_AL = Off. X_min_AL = Off.. 20]. If X is 5: Y = 10.6.4] of INT and also sets the element of array as [10. 50]. It sets REF_Y as ARRAY [0..1 5/09 . 40. X_max_AL = On F_RAMP(_R) . X_max_AL = Off If X is 45 : Y = 35. 2. 4. 10. X_min_AL = Off. 30. 1.13. 20. 20.Singular RAMP Function output Applicable CPU:2MLI2MLR Input REQ: Function block execution request START : Operation start Y_FIN: RAMP function target value T_START: Operation waiting time T_RISE: Total rise section Y_OFFSET: Output offset Output DONE : On if done without error 738 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Function Block. X_min_AL = On. DONE bit is off but the internal state(i. it starts waveform output. F_RAMP_R: if Y_FIN + Y_OFFSET is out of the data expression range of Y (REAL). it is limited to -32768 ≤ Y ≤ 32767. If REQ is off. If START is off with REQ On. 6. waveform rise time in T_RISE and offset in Y_OFFSET. In case of START On.13. waiting time after start in T_START. The equation of each section is as follows.e.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 739 . 7. F_RAMP: if Y_FIN + Y_OFFSET is out of the data expression range of Y (INT). it maintains the value of last state in an operation.#inf00000 E+000’during operation and in the case. the result is indicated as ‘1. Data Function Block. 2. it initializes with its initial value and waits for operation start (START On). It outputs RAMP function. 8. 4. Process Control Library 13. If waveform rise is finished. s0 : Y = Y_OFFSET R1. Function Block Y: Output FIN: Normal state alarm Functions 1. 5. FIN is on. FIN) is normally processed. 3.#inf00000 E+000’ or ‘-1. It sets RAMP function target value in Y_FIN.6. t is the time passed after START) Program Example If setting START ON with the above setting. Function Block s1 : Y = Y_FIN * (t – T_START) / T_RISE + Y_OFFSET s2 : Y = Y_FIN + Y_OFFSET (where. it is possible to get a waveform increasing from 100 to 1000 in 2 seconds. F_SAWS_R .1 5/09 . Process Control Library 13. Data Function Block.6.SAW Tooth Wave Output Applicable CPU:2MLI2MLR Input REQ: Function block execution request 740 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.13. 7.6. scan may have an error at S2 and S5. Function’s output count CNT increases once a cycle output ends. it increases from 0 again. it maintains the value of last state in an operation. Function Block START : Operation start AMP: SAWS function target value T_HALF: Function half cycle T_REST1: Waveform waiting time 1 T_REST2: Waveform waiting time 2 UNIPOLAR: Unipolar function output Y_OFFSET: Output offset Output DONE : On if done without error Y: Output value CNT: Output repeat frequency Functions 1. an error is larger because as smaller H_HALF value as larger the inclination of a graph. it is limited to -32768 ≤ Y ≤ 32767. In case of START On.1 5/09 . Process Control Library 13. F_SAWS: if Y_FIN + Y_OFFSET is out of the data expression range of Y (INT). if it is over 65535. rise time of saw tooth wave in T_HALF and offset in Y_OFFSET. 4. If START is off with REQ On. MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 741 9. the range of UINT. R1. 6. values. If UNIPOLAR is on. it outputs bipolar function./min. If REQ is off.13. 8. it initializes with its initial value and waits for operation start (START On). in case of off. the max. It sets amplitude of SAWS function in AMP. It outputs saw tooth wave. it outputs unipolar function. 3. it starts waveform output. 5. In case it skips a scan (if scan is longer than 1msec). 2. Data Function Block. 742 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. DONE bit is off but the internal state (i. Data Function Block. Function Block 10. it is indicates as ‘1.6. it outputs the waveform.#inf00000 E+000’during operation and in the case.#inf00000 E+000’ or ‘-1. Process Control Library 13.1 5/09 . F_SAWS_R: if Y_FIN + Y_OFFSET is out of the data expression range of Y (REAL). CNT) is normally processed. Program Example In case of START On in the above setting.e.13. Triangular wave output Applicable CPU:2MLI. 2MLR Input REQ: Function block execution request START : Operation start AMP: TRIA function target value T_HALF: Function half cycle T_REST1: Waveform waiting time 1 T_REST2: Waveform waiting time 2 UNIPOLAR: Unipolar function output Y_OFFSET: Output offset Output DONE : On if done without error Y: Output value CNT: Output repeat frequency R1. Function Block F_TRIA_R . Data Function Block. Process Control Library 13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 743 .13.6. if it is over 65535.#inf00000 E+000’during operation and in the case.e. If UNIPOLAR is on. If START is off with REQ On. the range of UINT. 744 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. DONE bit is off but the internal state (i. F_TRIA_R: if Y_FIN + Y_OFFSET is out of the data expression range of Y (REAL). in case of off. F_TRIA: if Y_FIN + Y_OFFSET is out of the data expression range of Y (INT). it starts waveform output. In case it skips a scan (if scan is longer than 1msec).#inf00000 E+000’ or ‘-1. CNT) is normally processed. Process Control Library 13. 5.13. Data Function Block. scan may have an error at S2 and S5. 7. it is limited to -32768 ≤ Y ≤ 32767. it outputs unipolar function. it outputs bipolar function. the max. It sets amplitude of TRIA function in AMP. 10. 8. an error is larger because as smaller H_HALF value as larger the inclination of a graph. 6./min. triangular rise time in T_HALF and offset in Y_OFFSET. 2. It outputs triangular wave. it initializes with its initial value and waits for operation start (START On). If REQ is off. it maintains the value of last state in an operation. it increases from 0 again. Function Block Functions 1. In case of START On. 9. it is indicates as ‘1. 4. values. 3.6. Function’s output count CNT increases once a cycle output ends.1 5/09 . R1.13. Data Function Block. Process Control Library 13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 745 . it outputs the waveform. Function Block Program Example In case of START On in the above setting.6. 746 It outputs square waveform.1 5/09 . MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Function Block. Process Control Library 13.13. Function Block F_SQUR_R .6.Square wave output Applicable CPU:2MLI2MLR Input REQ: Function block execution request START : Operation start AMP: SQUR function target value T_HALF: Function half cycle T_REST1: Waveform waiting time 1 T_REST1: Waveform waiting time 2 UNIPOLAR: Unipolar function output Y_OFFSET: Output offset Output DONE : On if done without error Y: Output value CNT: Output repeat frequency Functions 1. F_SQUR_R: if Y_FIN + Y_OFFSET is out of the data expression range of Y (REAL). 3. If START is off with REQ On. it starts waveform output. it outputs bipolar function. Process Control Library 13.#inf00000 E+000’ or ‘-1. it is limited to -32768 ≤ Y ≤ 32767. if it is over 65535. It sets amplitude of SQUR function in AMP. 9. 7. 5.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 747 . the range of UINT.13. rise half cycle of square wave in T_HALF and offset in Y_OFFSET. DONE bit is off but the internal state (i. in case of off. it is indicates as ‘1. it maintains the value of last state in an operation. it initializes with its initial value and waits for operation start (START On). If UNIPOLAR is on. Function Block 2. If REQ is off. 6. 4.e. CNT) is normally processed. it increases from 0 again.#inf00000 E+000’during operation and in the case. Data Function Block. F_SQUR: if Y_FIN + Y_OFFSET is out of the data expression range of Y (INT). 8. R1. it outputs unipolar function.6. Function’s output count CNT increases once a cycle output ends. In case of START On. 1 5/09 . Process Control Library 13.Trapezoid wave output Applicable CPU:2MLI. Data Function Block. Function Block Program Example In case of START On in the above setting. it outputs the waveform.13. F_TRAP_R .6. 2MLR Input REQ: Function block execution request START : Operation start AMP: TRAP function target value 748 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Function Block. It sets amplitude of TRAP function in AMP. 4. it outputs triangular wave and the output of AMP scale is not secured. it increases from 0 again. 5. If UNIPOLAR is on. it initializes with its initial value and waits for operation start (START On). 8. it maintains the value of last state in an operation. F_TRAP: if Y_FIN + Y_OFFSET is out of the data expression range of Y (INT). If T_RISE is more than half of T_HALF. it outputs bipolar function. If REQ is off.#inf00000 E+000’during R1. It outputs trapezoid wave.13. If START is off with REQ On. it is indicates as ‘1. 3. in case of off. 7. F_TRAP_R: if Y_FIN + Y_OFFSET is out of the data expression range of Y (REAL). it starts waveform output. if it is over 65535. 6. Function Block T_HALF: Function half cycle T_RISE: Trapezoid output time T_REST1: Waveform waiting time 1 T_REST1: Waveform waiting time 2 UNIPOLAR: Unipolar function output Y_OFFSET: Output offset Output DONE : On if done without error Y: Output value CNT: Output repeat frequency Functions 1. 2.#inf00000 E+000’ or ‘-1. the range of UINT. half cycle of waveform in T_HALF and offset in Y_OFFSET.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 749 . 9. trapezoid output time in T_RISE. Process Control Library 13. Function’s output count CNT increases once a cycle output ends. it is limited to -32768 ≤ Y ≤ 32767. In case of START On. it outputs unipolar function.6. 10. Program Example In case of START On in the above setting.13. Function Block operation and in the case. 750 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. DONE bit is off but the internal state (i. it outputs the waveform. CNT) is normally processed.6.e. Data Function Block. Process Control Library 13.1 5/09 . 6. Process Control Library 13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 751 . Data Function Block.13. Function Block F_SINE_R .Sine wave output Applicable CPU:2MLI2MLR Input REQ: Function block execution request START : Operation start AMP: SINE function target value T_HALF: Function half cycle T_REST1: Waveform waiting time 1 T_REST2: Waveform waiting time 2 UNIPOLAR: Unipolar function output Y_OFFSET: Output offset Output DONE : On if done without error Y: Output value CNT: Output repeat frequency R1. In case it skips a scan (if scan is longer than 1msec). It sets amplitude of SINE function in AMP.6.#inf00000 E+000’ or ‘-1. 5. If REQ is off. 8. 6. CNT) is normally processed. 3.#inf00000 E+000’during operation and in the case. 2.1 5/09 . an error is larger because as smaller H_HALF value as larger the inclination of a graph. 4. 9. Function Block Functions 1. F_SINE: if Y_FIN + Y_OFFSET is out of the data expression range of Y (INT). it is limited to -32768 ≤ Y ≤ 32767.e. it starts waveform output. half cycle of sine wave in T_HALF and offset in Y_OFFSET. In case of START On. 7. it increases from 0 again. the max. It outputs sine wave. If START is off with REQ On. F_SINE_R: if Y_FIN + Y_OFFSET is out of the data expression range of Y (REAL). 10. scan may have an error at S2 and S5. 752 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Process Control Library 13. If UNIPOLAR is on. it initializes with its initial value and waits for operation start (START On). it outputs unipolar function. it outputs bipolar function. DONE bit is off but the internal state (i. if it is over 65535. Function’s output count CNT increases once a cycle output ends. the range of UINT.13. it is indicates as ‘1. it maintains the value of last state in an operation. Data Function Block. values./min. in case of off. Function Block Program Example In case of START On in the above setting. _R) . Data Function Block. it outputs the waveform.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 753 .6.13. F_USER(_DI. Process Control Library 13.User-defined wave output Applicable CPU:2MLI2MLR Input REQ: Function block execution request PAUSE : Pause RPT : Repeat REF_TIME : Time array R1. it increases from 0 again. 8. It outputs user-defined waveform. 5. it is regarded as singular function if RPT is off when the waveform ends. If REQ is off. That is. If the data of initial state (0 second) is not defined. Output pauses if PAUSE bit is on. In case of singular (RPT = Off). if it is over 65535. FIN is on after output is complete and TIMER indicates the progress time. it outputs repetitively from the first after output is complete. 3. Data Function Block. 9. A user defines the wave by using REF_TIME and REF_DATA. it is regarded as the first value of REF_DATA. 4. The output count CNT of repetitive function increases if a cycle of output ends. it is regarded as singular function. it outputs 3000 for 2 seconds just after wave start. In case of repetitive (RPT = On). 10. the range of UINT. Even in case of repetitive waveform. As soon as a waveform ends. 6. the wave is repetitively output. CNT indicates function output count while timer displays the progress time of the cycle. if it is defined as the first data (2 seconds. However. it maintains the value of last state in an operation. Process Control Library 13.1 5/09 . 2. it is regarded as repetitive function. 7. the initialize output with REQ ON is not limited by PAUSE.6. Function Block REF_DATA : Data array Output DONE : On if done without error STAT: State alarm Y: Output value FIN: Output complete (if not repetitive) CNT: Repeat frequency TIMER: Timer value within FB Functions 1. RPT is checked. and in case of off.13. if RPT is on. 3000). If RPT bit is on. 754 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. In case the number of REF_TIME and REF_DATA are different. Process Control Library 13.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 755 . In case the elements of REF_TIME are not arranged in ascending order. STAT outputs 8. STAT outputs 8. T#5s.6. FIN is on and waveform output does not resume even though RPT is changed. 13. Function Block 11. Program Example It sets REF_TIME as ARRAY [0. It may be initialized after REQ is off. If waveform output ends in singular function. Data Function Block. R1.2] of INT and also sets the element of array as [T#0s.. T#15s].13. 12. 2] of INT and also sets the element of array as [10.. Function Block It sets REF_DATA as ARRAY [0. Process Control Library 13.13. If being executed as above. 5].1 5/09 .6. the following waveform is output when REQ is allowed in the following block. 20. 756 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data Function Block. ) of a part of program during user program run. FOR/NEXT/BREAK . Expanded Functions 14.14. _LER Repeat a block of FOR ~ NEXT n times Escape a block of FOR ~ NEXT R1. FOR ~ NEXT. 2MLR-CPUH _ERR. etc. It is used for a specific processing (ex. CALL.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 757 .1 Overview of Expanded functions This chapter describes each expanded function.LOOP command Availability Flags 2MLI-CPUU. 535. n is available 1 ~ 65.1 5/09 . Keep the range of WDT value to avoid delaying the scan time. Expanded Functions 14. Overview of Expanded functions Function • PLC repeats FOR ~ NEXT command n times and then processes the next step of NEXT command. 758 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.14. • • • • Program Example a) b) It operates FOR ~ NEXT loop 100 times repeatedly. REAK command is the instruction to escape FOR ~ NEXT loop.1. turn the switch on and run the BREAK command. FOR ~ NEXT command is able to use 16 NESTINGs. To escape the loop during a repetition. Nested CALL n command is usable.14. 2MLR-CPUH Call a SBRT routine Assign a routine to be called by the CALL function RETURN Function a) b) c) d) With an input condition and the CALL n command. Expanded Functions 14. R1. A program which is in SBRT can call another SBRT.Command of function call Availability 2MLI-CPUU. A program can escape the FOR ~ NEXT loop with a BREAK command.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 759 . In this case. END command is impossible to use in the SBRT. and the program among SBRT n ~ RET must be placed after END command.1. Overview of Expanded functions CALL/SBRT/RET . it operates a program among the SBRT n ~ RET command. When SBRT (Motor Start) is called. Expanded Functions 14. 760 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. a program is run in the SBRT until RET command.1 5/09 . It goes to the position again where CALL command is called.14.1. Overview of Expanded functions Program Example a) b) c) It calls a SBRT (Motor Start) if the program operates CALL command. SBRT command must be placed after the END command. 0 is ON. it doesn’t operate ABS function. Expanded Functions 14. b) c) Program Example a) When %IX0.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 761 .JUMP command Availability 2MLI-CPUU. 2MLR-CPUH Jump to a place of LABLE Function a) If a switch of JMP (LABLE) command is ON. It is recommended that the program which must not be run in a state of emergency is placed between JMP and LABLE. it jumps to the next of the assigned LABLE.1.0. but JMP can be repeated. R1.14. Overview of Expanded functions JMP . LABLE must not be duplicated. All the commands between JMP and LABLE are not processed. 0. Expanded Functions 14.Command to terminate an initial task Availability 2MLI-CPUU. you neither terminate the initial task program nor enter a scan program.0 is ON. You had better to terminate an initial task program using this command when you program an initial task program. Program Example a) When %IX0. Overview of Expanded functions INIT_DONE .14.1. Otherwise. it terminates an initial task.1 5/09 . 2MLR-CPUH Terminate an initial task Function a) b) It terminates an initial task. 762 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Overview of Expanded functions END . After the processing of the END command.END command Availability 2MLI-CPUU. the program goes to the beginning of itself and process again. Expanded Functions 14.1. 2MLR-CPUH Terminate a program Function a) b) It indicates the end of a program.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 763 .14. R1. Expanded Functions 14.1 5/09 .14. Overview of Expanded functions 764 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1. R1.1 Overview of ST (Structured Text) PLC can be programmed by text language named by ST. one line comment and block comment.2 Comments There are two types in comments. 15.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 765 .15. • • One line comment uses “//”. Structured Text 15. For example. that line is used as comment line. Block comment considers text between “*” and “*”. Expression 15.) ADD(X. Expression consists of operator and operand.15. And also. character.3 Expression 1. character string. function block). >= = <> & AND 10 11 Bool logical Exclusive OR Bool logical OR XOR OR Low Order High 766 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3. 2. defined variable (named variable. defined function (function.1 5/09 . <=. expression is calculated according to order of operator in the following Operator of ST language table. Y) 3 Not Complement 4 5 Exponent Multiplication Division Remain 6 Add Subtract 7 8 Compare same Not same 9 Bool logical AND NOT ** * / MOD + <. Operator of ST is described in the following table. Expression always has result value. Operand may be constant. direct variable). Number 1 2 Operation Parenthesis Function Symbol (Expression) Function name (Parameter list) Ex. >. Structured Text 15. time character. Function block Ex. adds A to B and subtracts C from result of A+B. Bool type expression is calculated until determining the result value. When function is used in the expression. TIME_ET ) 5. MX := 5. A+B-C: first. Division by 0 Operand is not applicable data type for operation. − − − When executing operation. operation in left of expression has higher order. B. BOOL_Q. Method Fixed type Available Non fixed type Unavailable Fixed Fixed Function Ex. OUT := LIMIT(MIN. For example. Structured Text 15. 6. 5). Function is recalled as an expression factor which has function name and parenthesis including parameter. TIME_PT. Function block Ex. TIME_ET ) • EN. ENO parameter cannot be used. IN. SIN(A)*COS(B): SIN(A) is executed firstly and COS(B) is executed lastly. Result of arithmetic operation exceeds range of data type.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 767 . 4. MIN := 1). left operand is executed firstly.15. Expression 3. BOOL_Q. of Variable Changeable Ex. R1. If operator has two operands. Among same operations which have same order.) INST_TOF (BOOL_IN. For example. Characteristic Variable assignment Variable order Changeable No.) A := LIMIT(1. the following condition is dealt with error. TIME_PT.) A := LIMIT(IN := B.) INST_TOF (BOOL_IN. Function Ex.3. operand and conversion of result follows the following table. MX). • Input parameter type is already determined in function in which parameter type is changeable. For proper operation. 2. “:=” is used. in case inner parameter is VAR_OUTPUT. INT1 := ADD(INT#1 INT1 := ADD(B INT1 := ADD_INT(1 Set variable type. Structured Text 15. use one of the following methods. • In fixed type. Use function block type is already set. Expression result := expression1 + expression2 Items Result expression1 expression2 Description Named variable or direct variable ANY_NUM type ANY_NUM type 768 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Ex.1 5/09 . VAR_IN_OUT. Expression Characteristic • VAR_IN_OUT can be used one time. ET => ET_OUT). + operator • • + Operator is used to add two operands. • In fixed type. in case inner parameter is VAR_INPUT. • Function block uses instant name. Description Error occurs during determining function type.) INST_TON1(IN := TRUE. Q => Q_OUT. Set variable (B).3. PT := T#100MS.15. 3). “=>” is used. Example INT1 := ADD(1. Constant and variable can be used as operands (Val1. Result := Val1 .3.Operator • • Subtracts right value from left value. Result := Val1 + Val2. Description Subtracts right value(Val2) from left value(Val1) and inputs result. refer Data Type Hierarchy Chart section. Description Adds Val1(20) to Val2(4) and inputs result Value of Result becomes 24. Expression result := expression1 . * Operator • • Multiplies two operands Expression result := expression1 * expression2 R1. ATTENTION ANY_NUM includes ANY_REAL type and ANY_INT. Expression Example Val1 := 20. Structured Text 15.Val2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 769 . Val2).15. Val2). Val2 := 4. For more details. .expression2 Items result expression1 expression2 Description Named variable or direct variable ANY_NUM ANY_NUM Example Val1 := 20. Value of result becomes 16 Constant and variable can be used as operands (Val1. Val2 := 4. Expression Items result expression1 expression2 Description Named variable or direct variable ANY_NUM type ANY_NUM type Example In1 := 2 . / Operator • • Divides left value by right value. Structured Text 15. result is also REAL type. Val2).1 5/09 . result is real but number less than decimal point is removed. Value of result becomes 40.15. result is also integer. • Expression result := expression1 / expression2 Item result expression1 expression2 Description Named variable or direct variable ANY_NUM type ANY_NUM type 770 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Data type of result is different according to data type of operand. If operand is integer. Constant and variable can be used as operands (Val1. If operand is REAL type.3. Result := 20 * In1 . If 5 (int) is divided by 3 (int). Description Multiplies 20 by In1(2) and inputs result. 15. Structured Text 15.3. Expression Example In1 := 2 ; Result := 20 / In1 ; Description Divides 20 by 2(ln1) and inputs Result. Result becomes 10. Constant and variable can be used as operands. ATTENTION If some value is divided by 0, operation error flag (_ERR) is On and CPU keeps RUN mode. MOD operation • • Finds remain when dividing left value by right value Expression result := expression1 MOD expression2 Item result expression1 expression2 Description Named variable or direct variable ANY_NUM type ANY_NUM type Example In1 := 10 ; Result := 12 MOD In1 ; Description Divides 12 by 10(ln1) and inputs remain into Result Constant and variable can be used as operands. ATTENTION If some value is divided by 0, operation error flag (_ERR) is On and CPU keeps RUN mode. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 771 15. Structured Text 15.3. Expression ** Operator • • Exponential operator is used to multiply left number as many as right number times Expression result := expression1 ** expression2 Item result expression1 expression2 Description Named variable or direct variable ANY_REAL type ANY_REAL type Example In1 := 3 ; Result := 10 ** In1 ; Description Multiplies 10 as many as 3 times and inputs it to Result. Result becomes 1000. Constant and variable can be used as operands. AND or & Operator • • Executes logical bit AND operation. Expression result := expression1 AND expression2 or result := expression1 & expression2 Item result expression1 expression2 Description Named variable or direct variable ANY_BIT type ANY_BIT type 772 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.3. Expression Result of logical bit AND operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 0 0 0 1 result Example Result := 2#10010011 AND 2#00111101 ; Description Since first bit and 5th bit of two operands are both 1, result is 2#00010001. Constant and variable can be used as operands. OR operator • • Executes logical bit OR operation. Expression result := expression1 OR expression2 Item result expression1 expression2 Description Named variable or direct variable ANY_BIT type ANY_BIT type Result of logical bit OR operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 0 1 1 1 result R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 773 15. Structured Text 15.3. Expression Example Result := 2#10010011 OR 2#00111101 ; Description Since there are 1 except 7th bit in two operands, Result is 2#10111111. XOR operator • • If bits of two operands are different, result bit is 1. Expression result := expression1 XOR expression2 Item result expression1 expression2 Description Named variable or direct variable ANY_BIT type ANY_BIT type Result of logical bit XOR operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 0 1 1 0 result Example Result := 2#10010011 XOR 2#00111101; Description Since first bits of two operands are 1, first bit of result is 0. Result is 2#10101110. 774 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.3. Expression = operator • • Compares two operands if they are same. Expression result := expression1 = expression2 Item result expression1 expression2 Description Named variable or direct variable ANY type ANY type Result of logical bit = operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 1 0 0 1 result Example Val1 := 20; Val2 := 20 ; Result := Val1 = Val2 ; Description Compares Val1 and Val2 and output result. Result is 1. <> operator • • Compares two operands if they are not same. Expression result := expression1 <> expression2 R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 775 15. Structured Text 15.3. Expression Item result expression1 expression2 Description Named variable or direct variable ANY type ANY type Result of logical bit <> operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 0 1 1 0 result Example Val1 := 20; Val2 := 20 ; Result := Val1 <> Val2 ; Description Compares Val1 and Val2 and output result. Result is 0. > operator • • Compares two operands if left one is larger than right one. Expression result := expression1 > expression2 Item result expression1 expression2 Description Named variable or direct variable ANY type ANY type Result of logical bit > operation is as follows. 776 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.3. Expression expression1 0 0 1 1 0 1 0 1 expression2 0 0 1 0 result Example Val1 := 20; Val2 := 10 ; Result := Val1 > Val2 ; Description Compares two operands if left one is larger than right one. Result is 1. < operator • • Compares two operands if left one is smaller than right one. Expression result := expression1 < expression2 Item result expression1 expression2 Description Named variable or direct variable ANY type ANY type Result of logical bit < operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 0 1 0 0 result R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 777 15. Structured Text 15.3. Expression Example Val1 := 20; Val2 := 10 ; Result := Val1 < Val2 ; Description Compares two operands if left one is smaller than right one. Result is 0. >= operator • • Compares two operands if left one is larger than right one or same. Expression result := expression1 >= expression2 Item result expression1 expression2 Description Named variable or direct variable ANY type ANY type Result of logical bit >= operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 1 0 1 1 result Example Val1 := 20; Val2 := 20 ; Result := Val1 >= Val2 ; Description Compares two operands if left one is larger than right one or same. Result is 1. 778 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.3. Expression <= operator • • Compares two operands if left one is smaller than right one or same. Expression result := expression1 <= expression2 Item result expression1 expression2 Description Named variable or direct variable ANY type ANY type Result of logical bit <= operation is as follows. expression1 0 0 1 1 0 1 0 1 expression2 1 0 1 1 result Example Val1 := 2; Val2 := 20 ; Result := Val1 <= Val2 ; Description Compares two operands if left one is smaller than right one or same. Result is1. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 779 15. Structured Text 15.3. Expression NOT operator • • Changes bit value from 1 to 0 or from 0 to 1. Expression result := NOT expression Item result expression Description Named variable or direct variable ANY_BIT type Example Val1 = 2#1100; Result:= NOT Val1 ; Description Changes Val1 and output Result. Result is 2#0011. - operator • • Adds negative sign into value. Expression result := - expression Item result expression Description Named variable or direct variable ANY_NUM type Example Val1 = 10; Result:= - Val1 ; Description Adds negative sign into value and output Result. Result is -10. 780 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.4. Statements 15.4 Statements • • Statements of ST language are summarized in <Table 3>. Statement is ended by semi colon(;). Assignment statements • Assignment statement consists of Variable, operator(:=) and expression. Ex.) A := B + C ; • It is available to assign return value of function. Function and function block control statements 1. • There are two methods to input function or function block. Fixed type: You can arrange input parameter in temporary order and skip output parameter. It is also available to assign value to input parameter. − − Example of function: OUT := LIMIT(MN := B, MX := 20, IN := 10) ; Example of function block: INST_TON(IN := %IX0.0.0, PT := T#1s, Q => Output, ET => elapsed time) ; Output variable of function block does not use Assignment statement. • Non fixed type: Input parameter should be arranged in order of function or function block. You cannot skip any parameter and assign value to input parameter. − − Example of function: OUT := LIMIT(B, 20, 10) ; Example of function block: INST_TON(%IX0.0.0, T#1s, Output, elapsed time) ; EN, ENO parameter is not inputted. VAR_IN_OUT parameter can’t assign location of input and doesn’t use output part. Function block uses instance name. - INST_TON(IN := TRUE, PT := T#100MS, Q => Q_OUT, ET => ET_OUT ); 2. 3. 4. 5. 6. Since function block doesn’t have return type, it can’t be used as expression. RETURN statement is used when going out from function or function block. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 781 15. Structured Text 15.4. Statements For example, that can be used in IF statements as an execution result in case of meeting condition. 7. Among function, function that has one more output value cannot be used with assignment statement type. So you should use function block type. But it does not use instance name. Example of fixed type BYTE_BIT( IN := BYTE_IN, Q01 => BOOL_Q01, Q02 => BOOL_Q02, Q03 => BOOL_Q03, Q04 => BOOL_Q04, Q05 => BOOL_Q05, Q06 => BOOL_Q06, Q07 => BOOL_Q07, Q08 => BOOL_Q08 ); • • Example of non-fixed type BYTE_BIT( BYTE_IN, BOOL_Q01, BOOL_Q02, BOOL_Q03, BOOL_Q04, BOOL_Q05, BOOL_Q06, BOOL_Q07, BOOL_Q08 ); ATTENTION ST does not supports extension statement (BREAK, CALL, END, FOR, INIT_DONE, JMP, NEXT, RET, SBRT). Selection statements 1. 2. • − − There are two types, IF and CASE. According to specific condition, Selection statement executes one statement or one group of statements among diverse statements. IF If condition of Bool expression is 1, it executes a group of statements. If condition is not 1, it does not execute group of statements. But there is ELSE, it executes a group of statements following ELSE. If condition of ELSEIF is 1, a group of statements following ELEIF is executed. CASE It consists of list of groups of statements and expression that calculates variable of INT type. Each group can be set as integer and range of integer. • − − 782 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.4. Statements − A group of statements in range of Selector is executed and if any value is not in range of Selector, a group of statements following ELSE is executed. If there is no ELSE, no group of statements is not executed. Iteration statements 1. 2. • There are three types, FOR, WHILE and REPEAT. Some group is executed repeatedly by iteration statement. FOR − − It is used when number of repetition is already determined. In FOR statement, a group of statements is executed repeatedly until END_FOR and status of repetition is saved in control variable of FOR loop. Control variable, initial value and final value is expressed as integer type (SINT, INT, DINT) and does not change by repeated statement. Checking the condition for the end is executed at the start of each repetition. If initial value exceeds the final value, a group of statements is not executed any more. − • WHILE and REPEAT − WHILE statement (ended by END_WHILE) is executed repeatedly until Bool expression is 0. REPEAT statement (ended by UNTIL) is executed repeatedly until Bool expression is 1. (A group of statements is executed at least one time) WHILE and REPEAT is not used for synchronizing process like “wait loop” which has the end condition determined exteriorly. EXIT statement is used to end iteration statements before meeting the end condition. EXIT statement is used to stop repetition before meeting the condition. When EXIT statement is used in overlapped repetition statements, relevant EXIT is applied to the loop in which EXIT exists. So, statements after first loop terminator (END_FOR, END_WHILE, END_REPEAT) are executed. IF WHILE and REPEAT are executed in unlimited loop, error occurs. − − − − − R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 783 15. Structured Text 15.4. Statements Number 1 2 Command Assignment Recall of FB Using output of FB Example A:=B; CV:= CV+1; C:=SIN(X); CMD_TMR(IN:=%IX5, PT:= T#300ms); A:=CMD_TMR.Q; RETURN; D:=B*B -4*A*C; IF D<1.0 THEN NROOTS :=0; ELSIF D= 0.0 THEN NROOTS := 1; X1:= -B/(2.0*A); ELSE X1:= (-B+SQRT(D))/(2.0*A); X2:= (-B-SQRT(D))/(2.0*A); END_IF; 3 4 RETURN IF 5 CASE TW := BCD_TO_INT(THUMBWHEEL); TW_ERROR := 0; CASE TW OF 1, 5: DISPLAY := OVEN_TEMP; 2: DISPLAY := MOTOR_SPEED; 3: DISPLAY := GROSS – TARE; 4,6..10: DISPLAY := STATUS(TW-4); ELSE DISPLAY := 0; TW_ERROR := 1; END_CASE; QW100 := INT_TO_BCD(DISPLAY); 6 FOR J := 101; 784 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.4. Statements Number Command Example FOR I := 1 TO 100 BY 2 DO IF WORDS[I] = ‘KEY’ THEN J := I; EXIT; END_IF; END_FOR ; 7 WHILE J := 1; WHILE J <= 100 & WORDS[J] <> ‘KEY’ DO J := J+2; END_WHILE; 8 REPEAT J := -1; REPEAT J := J+2; UNTIL J = 101 OR WORDS[J] = ‘KEY’ END_REPEAT ; 9 10 EXIT Null/Space command text EXIT; ; EXIT is used for all repetition texts (FOR, WHILE, REPEAT). IF • • It is used for program to select more than one Expression IF condition THEN statements [ELSE elsestatements ] END_IF Or IF condition THEN R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 785 15. Structured Text 15.4. Statements statements [ELSIF condition-n THEN elseifstatements] . . . [ELSE elsestatements] END_IF Item condition Description If condition is TRUE, a statement following THEN is executed. In case of FALSE, ELSIF or ELSE is executed. If condition is TRUE, a statement more than one is executed. N conditions can be used. If condition-n is TRUE, a statement more than one is executed. If condition or condition-n is false, a statement more than one is executed. statements condition-n elseifstatements elsestatements Example IF Val1 <= 10 THEN Result := 10; END_IF; IF Val1 <= 10 THEN Result := 10; ELSE Result := 20; END_IF; Description If condition (Val1 <= 10) is TRUE, 10 is assigned into Result. If condition (Val1 <= 10) is TRUE, 10 is assigned into Result. If condition is FALSE, 20 is assigned into Result. 786 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 15. Structured Text 15.4. Statements Example IF Val1 <= 10 THEN Result := 10; ELSIF Val1 <= 20 THEN Result := 20; ELSE Result := 30; END_IF; Description If condition (Val1 <= 10) is TRUE, 10 is assigned into Result. If condition is FALSE, ELSEIF is executed. If second condition (Val <= 20) is TRUE, 20 is assigned into Result. If second is FALSE, a statement under ELSE is executed. Namely, 30 is assigned into Result. CASE • Diverges according to value of expression following CASE. Expression should be integer. When value of expression is not included in case list, a statement after ELSE is executed. If there is no ELSE, no statement list is executed. Expression • CASE expression OF case_list : statement_list { case_list : statement_list} [ELSE statement_list] END_CASE Item expression case_list Description Only INT type is available. case_list_element {',' case_list_element} There are diverse statement like above. case_list_element subrange statement_list Subrange or signed_integer are available signed_integer .. signed_integer type Executes more than one statements R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 787 increment is 1. Expression • FOR counter := start TO end [BY step] DO statements END_FOR Item counter Description Integer (SINT.15. 10 : Result := 30 . Structured Text 15. 40 is assigned into Result. FOR • It is used to deal with repetition and uses three control statements. Statements Example CASE Val1 OF 1 : Result := 10 . It is executed according to three control texts. First. 7. ELSE Result := 40 . end. statement for initialization is necessary. condition is checked first and loop is executed later.5 : Result := 20 . If value of Val1 is 7 or 10.. 2. So no loop may be executed. INT.4.1 5/09 . In FOR statement. loop is executed one time. 788 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. END_CASE . If this is not used. Then counter values increases as many as BY value and condition is checked again. 20 is assigned into Result. Description If value of Val1 is 1. 30 is assigned into Result. 10 is assigned into Result. DINT) s start. If To expression is TRUE (present counter value is less than end value). start end step statements Initial value of counter Last value of counter Indicates increment of count variable whenever loop is executed. In case of other values. step should be same type. If value of Val1 is 2~5. ATTENTION • • • Because of long scan time. BY part can be skipped. In case of skip. R1. SUM := 0. Final value of SUM is 6. it goes out from loop. statements If condition is TRUE.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 789 . END_FOR . So no loop may be executed. Statements Example SUM := 0. statements more than one are executed. Final value of SUM is 11. If start is larger than end.4.15. Counter variable increases from 0 to 10 as many as 2. watch . In WHILE statement. FOR counter := 0 TO 10 DO SUM := SUM + 1.dog may be on. In case of FLASE. Expression • WHILE condition DO statements END_ WHILE Item condition Description If condition is TRUE. Structured Text 15. FOR text is not executed. Description Counter variable increases from 0 to 10 as many as 1. END_FOR . 1 is added into SUM variable repeatedly. FOR counter = 0 TO 10 BY 2 DO SUM := SUM + 1. statements after DO are executed. it increases as many as 1. WHILE • It is executed repeatedly until condition is 0. 1 is added into SUM variable repeatedly. condition is checked first and loop is executed later. due to long scan time. loop is executed first and condition is checked later. 790 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Description If condition that Counter is less than 20 is TRUE.1 5/09 . Expression • REPEAT statements UNTIL condition END_REPEAT Item condition statements Description If condition is FALSE. In REPEAT statement. it is executed repeatedly and if TRUE. it can’t go out from loop. Structured Text 15. ATTENTION In WHILE statement. in case condition doesn’t become 0. a statement is executed. watch-dog is on. If condition is FALSE. goes out from loop. Statements Example Counter := 0 WHILE Counter < 20 DO Counter := Counter + 1.15. Loop is executed repeatedly until condition is TRUE. In this case. END_WHILE . REPEAT • Statement is executed repeatedly until condition is TRUE. So be careful so that condition is not always TRUE. it goes out from loop. So loop is executed at least one time.4. Expression EXIT Example SUM := 0. loop ends. REPEAT). Text is executed repeatedly when Counter is less than 20 and if Counter is larger than 20. Counter variable becomes 0 and SUM becomes 1. it cannot go out from loop. Structured Text 15. UNTIL Counter > 20 END_REPEAT . Counter variable is set to 1. If the condition that Counter variable is larger than 2 is met. Counter := 0. EXIT • • • It is used to go out from iteration statements (WHILE. Statements Example Counter := 0.15. FOR. Description Counter variable increases from 0 to 10 as many as1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 791 . watch-dog is on. Description First. ATTENTION In REPEAT statement. EXIT.4. R1. If it is used outside iteration statements. But because of EXT. condition is TRUE and it goes out from loop. But because of IF statement and EXIT statement. error occurs. END_FOR . WHILE Counter < 20 DO Counter := Counter + 1 . due to long scan time. If Counter variable is 21. in case condition does not become 1. IF Counter = 10 THEN EXIT. it goes out from loop or it executes loop. REPEAT DO Counter := Counter + 1. In this case. So be careful so that condition is not always FALSE. loop ends. FOR Counter := 0 TO 10 DO SUM := SUM + 1. loop ends when Counter is 10. Structured Text 15. loop ends otherwise loop is executed repeatedly. If Counter is larger than 20. END_IF. Statements Example END_IF. REPEAT DO Counter := Counter + 1 . END_WHILE .4. loop ends when Counter is 10.1 5/09 . Counter variable increase as many as 1. But because of IF statement and EXIT statement. Description Counter := 0. UNTIL Counter > 20 END_REPEAT . IF Counter = 10 THEN EXIT. 792 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.15. a decimal number. it is carried to ‘10’ followed by 0 and 1 and keeps counting. Binary R1. any numerical operation is processed by binary system (1 or 0). 2. 1. Decimal Decimal number system means the “number expressing an order or size (volume) using 0~9. followed by 0. Therefore. 3. 0 and 1. binary. 1 is called bit. we conveniently use the decimal system. respectively in order to write or read numerical data to/from PLC. Therefore.16.” Binary Binary numeral presents a numeral meaning an order and size by using two symbols. 153 can be expressed as follows in the view of line and “weight of line.1 5/09 Decimal 793 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . This chapter describes the representation of decimal. For instance. And. a cipher of 0. On the other hand. That is. hexadecimal and binary-coded decimal notation and the relations. so decimal or hexadecimal number systems must be converted to hexadecimal or decimal number systems. Appendix 1 Numerical System and Data Structure 16.1 Numerical (data) Representation PLC CPU remembers and processes every data as the states of ON and OFF or ‘1’and ’0’. 4…9. it is carried to ‘10’ and keeps counting. 1 5/09 . Numerical (data) Representation 0 1 10 11 100 101 110 111 1000 …… 0 1 2 3 4 5 6 7 8 …… For instance. let’s think what the given binary numeral can be expressed in decimal number system. try to attach bit number and bit weight from the very right.16.1. 794 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. “10011101” As considering line number and the weight of line in decimal number system. Appendix 1 Numerical System and Data Structure 16. a binary numeral is converted to a decimal numeral by adding the weights of bits of which code is 1. Numerical (data) Representation How about summing the multiplication of weights of each bit code like decimal number system? = 1 x 128 + 0 x 64 + 0 x 32 + 1 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1 = 128 + 16 + 8 + 4 + 1 = 157 That is. hexadecimal numeral means the ‘number representing an order and size by using 0~9 and A~F.16. Appendix 1 Numerical System and Data Structure 16.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 795 .” R1.1. In general. Hexadecimal Like decimal or binary numeral. 1 byte consists of 8bits while 1 word consists of 16 bits (2 bytes). as the above. Numerical (data) Representation Then. followed by 0. Appendix 1 Numerical System and Data Structure 16. …D. 2. it is carried to ‘10’ and keeps counting.1.16. 1. Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 Hexadecimal 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 10000 10001 10010 Binary 796 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . F. E. 157 can be expressed as follows and the weight of each bit can be also expressed as follows. a decimal numeral. Numerical (data) Representation A digit of hexadecimal number corresponds to 4 bits of binary numeral.16.1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 797 . Appendix 1 Numerical System and Data Structure 16.” Therefore. R1. For instance.999(max of 4 lines) of decimal numeral in 16 bits. Binary Coded Decimal (BCD) Binary coded decimal means the “number expressing each line of a decimal numeral in binary number system. binary coded decimal represents 0 ~ 9. Numerical (data) Representation Table of Numeral Systems Binary coded Decimal (BCD) 00000000 00000000 00000000 00000001 00000000 00000010 00000000 00000011 00000000 00000100 00000000 00000101 00000000 00000100 00000000 00000111 00000000 00001000 00000000 00001001 00000000 00010000 00000000 00010001 00000000 00010010 00000000 00010011 00000000 00010100 00000000 00010101 00000000 00000110 00000000 00000111 00000000 00001000 00000000 00001001 00000000 00100000 00000000 00100001 00000000 00100010 00000000 00100011 798 Binary (BIN) 00000000 00000000 00000000 00000001 00000000 00000010 00000000 00000011 00000000 00000100 00000000 00000101 00000000 00000100 00000000 00000111 00000000 00001000 00000000 00001001 00000000 00001010 00000000 00001011 00000000 00001100 00000000 00001101 00000000 00001110 00000000 00001111 00000000 00010000 00000000 00010001 00000000 00010010 00000000 00010011 00000000 00010100 00000000 00010101 00000000 00010110 00000000 00010111 Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Hexadecimal (H) 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F 0010 0011 0012 0013 0014 0015 0016 0017 R1. Appendix 1 Numerical System and Data Structure 16.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .1.16. Numerical (data) Representation 00000001 00000000 00000001 00100111 00000010 01010101 00010000 00000000 00100000 01000111 01000000 10010101 10011001 10011001 00000000 01100100 00000000 01111111 00000000 11111111 00000000 11100000 00000000 11111111 00000000 11111111 00000111 00001111 00100111 00010000 01111111 11111111 100 127 255 1.999 10. Appendix 1 Numerical System and Data Structure 16.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 799 .047 4.000 2.000 32.095 9.16.767 0064 007F 00FF 03E8 07FF 0FFF 270F 2710 7FFF R1.1. be cautious of sign bit position. it is expressed as ‘negative number’.’ Because of different position of MSB in 16 or 32 bits.1 5/09 . it represents ‘positive number’ while if it is 1.16.2 Integer Representation 2MLI-CPUU command is based on negative number system operation (Signed) If the top level bit (MSB) is 0. Appendix 1 Numerical System and Data Structure 16. Integer Representation 16. 800 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. The top level bit expressing negative/positive is called ‘sign bit.2. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 801 .2.16. Appendix 1 Numerical System and Data Structure 16. Integer Representation *If 16 bits *If 32 bits R1. 1 5/09 . 16. Negative Number Representation 16. 15. Appendix 1 Numerical System and Data Structure 16.3 Negative Number Representation Example: How to express – 0001 14. Represent 0001 in case of negative number (b15 = 1). Plus 1 to the result of (2). Reverse the result of (1) (b15 = excluded).16. 802 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.3. 1 Summary of Special Internal Flag (F) Modes and Status Reserved Variable _SYS_STATE _RUN _STOP _ERROR _DEBUG _LOCAL_CON _MODBUS_CON _REMOTE_CON _RUN_EDIT_ST _RUN_EDIT_CHK _RUN_EDIT_DONE _RUN_EDIT_NG _CMOD_KEY _CMOD_LPADT _CMOD_RPADT _CMOD_RLINK _FORCE_IN _FORCE_OUT _SKIP_ON _EMASK_ON _MON_ON R1.1 5/09 Data Type BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Description PLC mode and operation status RUN status STOP status ERROR status DEBUG status Local control mode MODBUS control mode Remote control mode Downloading edit program during run Processing edit program during run Complete edit program during run Abnormally complete edit program during run Run mode changed by key Run mode changed by local PADT Run mode changed by remote PADT Run mode changed by remote COM module Forced input status Forced output status I/O skip Error mask on Monitor on 803 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .17. Appendix 2 Flag List (XGI) 17. Appendix 2 Flag List (XGI) 17.1 5/09 .2 System Warning Reserved Variable _USTOP_ON _ESTOP_ON _INIT_RUN _PB1 _PB2 _USER_WRITE_F _RTC_WR _SCAN_WR _CHK_ANC_ERR _CHK_ANC_WAR _USER_STAUS_F _INIT_DONE _KEY _KEY_PREV _RBLOCK_STATE Data Type BOOL BOOL BOOL BOOL BOOL WORD BOOL BOOL BOOL BOOL WORD BOOL DWORD DWORD WORD Description Stop by STOP function Stop by ESTOP function Initialization task is running Program code 1 selected Program code 2 selected Contact available by program Write/read data in RTC Initialize scan value Error detection from external device Warning detection from external device User contact Initialization task complete Current status of local key Previous status of local key Flash block status ATTENTION For additional information. see corresponding CPU User’s Guide.17. 804 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Appendix 2 Flag List (XGI) 17.1. Summary of Special Internal Flag (F) System Error Reserved Variable _CNF_ER _CPU_ER _IO_TYER _IO_DEER _FUSE_ER _IO_RWER _IP_IFER _IO_TYER_N _IO_DEER_N _FUSE_ER_N _IO_RWER_N _IP_IFER_N _ANNUM_ER _BPRM_ER _IOPRM_ER _SPPRM_ER _CPPRM_ER _PGM_ER WORD BOOL BOOL BOOL BOOL BOOL BOOL WORD WORD WORD WORD WORD BOOL BOOL BOOL BOOL BOOL BOOL Data Type Description System warning CPU error Module type inconsistence error Module installation error Fuse blown I/O module read/write error (trouble) Special/COM module interface error Slot number of module type inconsistence error Slot number of module installation error Slot number of fuse blown Slot number of I/O module read/write error (trouble) Slot number of special/COM module interface error Heavy trouble detection error of external device Basic parameter error IO configuration parameter error Special module parameter error Communication module parameter error Program error R1.17.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 805 . 17.1 5/09 .2 System Warning Reserved Variable _CDOVER_ER _CODE_ER _TMRIDX_ER _COMPILE_ER _INST_ER _SWDT_ER _BASE_POWER_ER _WDT_ER _IO_RWER0 _IO_RWER1 _IO_RWER2 _IO_RWER3 _IO_RWER4 _IO_RWER5 _IO_RWER6 _IO_RWER7 _FUSE_ER0 _FUSE_ER1 BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL WORD WORD WORD WORD WORD WORD WORD WORD Data Type Description Execution code out of area error Program code error Timer index error Compile error Operation error System watch-dog on Base power error Scan watch-dog timer on Main base module read/write error Increase base 1 module read/write error Increase base 2 module read/write error Increase base 3 module read/write error Increase base 4 module read/write error Increase base 5 module read/write error Increase base 6 module read/write error Increase base 7 module read/write error Main base fuse disconnection error Increase base 1 fuse disconnection error WORD WORD 806 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Appendix 2 Flag List (XGI) 17. 1. Summary of Special Internal Flag (F) Reserved Variable _FUSE_ER2 _FUSE_ER3 _FUSE_ER4 _FUSE_ER5 _FUSE_ER6 _FUSE_ER7 _IO_TYER0 _IO_TYER1 _IO_TYER2 _IO_TYER3 _IO_TYER4 _IO_TYER5 _IO_TYER6 _IO_TYER7 _IO_DEER0 _IO_DEER1 WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD Data Type Description Increase base 2 fuse disconnection error Increase base 3 fuse disconnection error Increase base 4 fuse disconnection error Increase base 5 fuse disconnection error Increase base 6 fuse disconnection error Increase base 7 fuse disconnection error Main base module type error Increase base 1 module type error Increase base 2 module type error Increase base 3 module type error Increase base 4 module type error Increase base 5 module type error Increase base 6 module type error Increase base 7 module type error Main base module installation error Increase base 1 module installation error R1.17.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 807 . Appendix 2 Flag List (XGI) 17. 17.2 System Warning Reserved Variable _IO_DEER2 _IO_DEER3 _IO_DEER4 _IO_DEER5 _IO_DEER6 _IO_DEER7 WORD WORD WORD WORD WORD WORD Data Type Description Increase base 2 module installation error Increase base 3 module installation error Increase base 4 module installation error Increase base 5 module installation error Increase base 6 module installation error Increase base 7 module installation error 808 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Appendix 2 Flag List (XGI) 17.1 5/09 . 2.2 System Warning Reserved Variable _CNF_WAR _RTC_ER _DBCK_ER _HBCK_ER _ABSD_ER _TASK_ER _BAT_ER _ANNUM_WAR _LOG_FULL _BASE_INFO_ER _HS_WAR1 _HS_WAR2 _HS_WAR3 _HS_WAR4 _HS_WAR5 _HS_WAR6 _HS_WAR7 _HS_WAR8 Data Type DWORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Description System error status RTC data error Data backup error Hot restart unavailable Stop by abnormal run Task conflict Battery error External device warning detected Log memory full Base information error Over high-speed link parameter 1 Over high-speed link parameter 2 Over high-speed link parameter 3 Over high-speed link parameter 4 Over high-speed link parameter 5 Over high-speed link parameter 6 Over high-speed link parameter 7 Over high-speed link parameter 8 R1. Appendix 2 Flag List (XGI) 17.17.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 809 . System Warning 17. 2 System Warning Reserved Variable _HS_WAR9 _HS_WAR10 _HS_WAR11 _HS_WAR12 _P2P_WAR1 _P2P_WAR2 _P2P_WAR3 _P2P_WAR4 _P2P_WAR5 _P2P_WAR6 _P2P_WAR7 _P2P_WAR8 _CONSTANT_ER _ANC_ERR _ANC_WAR BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL WORD WORD Data Type Description Over high-speed link parameter 9 Over high-speed link parameter 10 Over high-speed link parameter 11 Over high-speed link parameter 12 Over P2P – parameter 1 Over P2P – parameter 2 Over P2P – parameter 3 Over P2P – parameter 4 Over P2P – parameter 5 Over P2P – parameter 6 Over P2P – parameter 7 Over P2P – parameter 8 Fixed cycle error Error info of external device Warning info of external device 810 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Appendix 2 Flag List (XGI) 17.1 5/09 .17. User Flag 17.3.3 User Flag Reserved Variable _USER_F _T20MS _T100MS _T200MS _T1S _T2S _T10S _T20S _T60S _ON _OFF _1ON _1OFF _STOG _USER_CLK WORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL WORD Data Type Description Available user’s timer 20ms cycle clock 100ms cycle clock 200ms cycle clock 1s cycle clock 2s cycle clock 10s cycle clock 20s cycle clock 60s cycle clock All time ON bit All time OFF bit The only first scan on bit The only first scan off bit Reversal at every scanning Clock settable by a user R1. Appendix 2 Flag List (XGI) 17.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 811 .17. 2 System Warning 17.4 Operation Result Flag Reserved Variable _LOGIC_RESULT _ERR _LER _ARY_IDX_ERR _ARY_IDX_LER _ALL_OFF _PUT_CNT _GET_CNT _FPU_FLAG_E _FPU_FLAG_I _FPU_FLAG_O _FPU_FLAG_U _FPU_FLAG_V _FPU_FLAG_Z _FPU_LFLAG_I _FPU_LFLAG_O _FPU_LFLAG_U _FPU_LFLAG_V _FPU_LFLAG_Z _PUTGET_ERR _PUTGET_NDR 812 WORD BOOL BOOL BOOL BOOL BOOL DWORD DWORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL WORD WORD MasterLogic PLC Instruction List Honeywell Confidential & Proprietary Data Type Description Logic result Operation error flag ON for 1 scan if any operation error Out of arrangement index error flag Out of arrangement index latch error flag ON if every output is off Increase by PUT execution Increase by GET execution Not normalized value input error flag Incorrect error flag Overflow error flag Underflow error flag Ineffective operation error flag Zero division error flag Incorrect error latch flag Overflow error latch flag Underflow error latch flag Ineffective operation error latch flag Zero division error latch flag PUT/GET error PUT/GET complete R1. Appendix 2 Flag List (XGI) 17.1 5/09 .17. 1ms Min.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 813 . scan time after run in 0.5. Appendix 2 Flag List (XGI) 17. scan time after run in 0. System Run Status Information 17.5 System Run Status Information Reserved Variable _CPU_TYPE _CPU_VER _OS_VER _OS_DATE _SCAN_MAX _SCAN_MIN _SCAN_CUR _MON_YEAR _TIME_DAY _SEC_MIN _HUND_WK _MON_YEAR_DT _TIME_DAY_DT _SEC_MIN_DT _HUND_WK_DT _RTC_DATE _RTC_WEEK _RTC_TOD _AC_FAIL_CNT WORD WORD DWORD DWORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD DWORD DWORD Data Type Description CPU type information CPU version OS version OS distribution date Max.17.1ms Month/year data of PLC Hour/day data of PLC Second/minute data of PLC Hundred years/day of the week data of PLC Clock info data ( month / year ) Clock info data ( hour / day ) Clock info data ( second / minute ) Clock info data ( hundred years / day of the week ) Present date of RTC Present day of the week of RTC Present time of RTC (ms) Saving power failure frequency R1.1ms Current scan time in 0. 17.1 5/09 . Appendix 2 Flag List (XGI) 17.2 System Warning Reserved Variable _ERR_HIS_CNT _MOD_HIS_CNT _SYS_HIS_CNT _LOG_ROTATE _BASE_INFO0 _BASE_INFO1 _BASE_INFO2 _BASE_INFO3 _BASE_INFO4 _BASE_INFO5 _BASE_INFO6 _BASE_INFO7 _RBANK_NUM _RBLOCK_RD_FLAG _RBLOCK_WR_FLAG _RBLOCK_ER_FLAG _REF_COUNT _REF_OK_CNT _REF_NG_CNT Data Type DWORD DWORD DWORD DWORD WORD WORD WORD WORD WORD WORD WORD WORD WORD DWORD DWORD DWORD DWORD DWORD DWORD Description Saving error occurrence frequency Saving mode reversal frequency Saving system history occurrence frequency Saving log rotate info Main base slot info Increase base 1 slot info Increase base 2 slot info Increase base 3 slot info Increase base 4 slot info Increase base 5 slot info Increase base 6 slot info Increase base 7 slot info Currently used block number ON when reading flash N block data ON when writing flash N block data Error during flash N block service Increase when module refresh is executed Increase when module refresh is normal Increase when module refresh is abnormal 814 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 815 .5.17. Appendix 2 Flag List (XGI) 17. System Run Status Information Reserved Variable _REF_LIM_CNT Data Type DWORD Description Increase when module refresh is abnormal (TIME OUT) Increase when module refresh is abnormal Increase when reading module 1 word abnormally Increase when writing module 1 word abnormally Increase in case of module block data service Increase in case of block data service error Increase in case of block data service error Increase if CPU internal buffer is full Instantaneous AC failure frequency FALS number _REF_ERR_CNT _MOD_RD_ERR_CNT _MOD_WR_ERR_CNT _CA_CNT _CA_LIM_CNT _CA_ERR_CNT _BUF_FULL_CNT _AC_F_CNT _FALS_NUM DWORD DWORD DWORD DWORD DWORD DWORD DWORD WORD WORD R1. 1 5/09 .* Run operation mode of *** block of high speed link no.* Run error mode of *** block station of high speed link no.* *** block setting of high speed link no.2 System Warning 17. Appendix 2 Flag List (XGI) 17.* Normal communication with *** block station of high speed link no.17. *** = 000 ~ 127) Reserved Variable _HS*_RLINK _HS*_LTRBL _HS*_STATE*** _HS*_MOD*** _HS*_TRX*** _HS*_ERR*** _HS*_SETBLOCK*** Data Type BOOL BOOL BOOL BOOL BOOL BOOL BOOL Description Every station of high speed link no.* 816 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.* normally works Abnormal status after _HS*RLINK ON General status of *** block of high speed link no.6 High-speed Link Flag (* = 0 ~ 12. * completed abnormally Error code in case of ** block service of P2P no. P2P Flag (* = 0 ~ 8.* completed successfully ** block service of P2P no. ** = 0 ~ 63) Reserved Variable _P2P*_NDR** _P2P*_ERR** _P2P*_STATUS** _P2P*_SVCCNT** _P2P*_ERRCNT** Data BOOL BOOL WORD DWORD DWORD Description ** block service of P2P no. Appendix 2 Flag List (XGI) 17.* R1.* ** block abnormal service frequency of P2P no. ** = 0 ~ 63) 17.* ** block normal service frequency of P2P no.7.17.7 P2P Flag (* = 0 ~ 8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 817 . 1:PAUSE) – block* loop** PID operation selection(0:forward .1:manual) block* loop** PID pause (0:STOP/RUN .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . ** = 0 ~ 31) Reserved Variable _PID*_MAN _PID*_**MAN _PID*_PAUSE _PID*_**PAUSE _PID*_REV _PID*_**REV _PID*_AW2D _PID*_**AW2D _PID*_REM_RUN _PID*_**REM_RUN _PID*_P_on_PV _PID*_**P_on_PV _PID*_D_on_ERR _PID*_**D_on_ERR _PID*_AT_EN _PID*_**AT_EN 818 Data Type DWORD BOOL DWORD BOOL DWORD BOOL DWORD BOOL DWORD DWORD DWORD BOOL DWORD BOOL DWORD BOOL Description PID output selection(0:auto .1:PAUSE) – block* PID pause (0:STOP/RUN .1:RUN) – block* loop** PID proportional(P) cal source selection (0:ERR. 1:ERR) – block* PID differential(D) cal source selection (0:PV.2 System Warning 17. 1:PV) – block* PID proportional(P) cal source selection (0:ERR.1:reverse) – block* PID operation selection(0:forward .1:reverse) – block* loop** PID Anti Wind-up2 prohibited(0:enable .block* loop** PID differential(D) cal source selection (0:PV. R1.1:disable) – block* PID Anti Wind-up2 prohibited(0:enable .1:disable) – block* loop** PID remote(HMI) execution bit (0:STOP .block* loop** PID auto tuning setting (0:Disable. 1:PV) .1:RUN) – block* PID remote(HMI) execution bit (0:STOP .1:manual) – block* PID output selection(0:auto . 1:ERR) . Appendix 2 Flag List (XGI) 17.17. 1:Enable) – block* PID auto tuning setting (0:Disable.8 PID Flag (* = 0 ~ 7. MV no impact change setting (0:Disable.17. 1:Enable) – block* loop** PID target value (SV) – block* loop** PID operation cycle (T_s)[0. value limit – block* loop** PID manual output (MV_man) – block* loop** PID State – block* loop** PID Alarm 0 (1:T_s setting is low) – block* loop** PID Alarm 1 (1:K_p is 0) – block* loop** PID Alarm 2 (1:PV variation is limited) – block* loop** PID Alarm 3 (1:MV variation is limited) – block* loop** PID Alarm 4 (1:MV max.MV smoothing setting (0:Disable. PID Flag (* = 0 ~ 7.constant (T_i)[sec] – block* loop** PID D .8.constant (T_d)[sec] – block* loop** PID PV variation limit – block* loop** PID MV variation limit – block* loop** PID MV max.constant (K_p) – block* loop** PID I . 1:Enable) – block* PID mode change(A/M) . ** = 0 ~ 31) Reserved Variable Data Type Description 1:Enable) – block* loop** PID mode change(A/M) .1msec] – block* loop** PID P . value limit – block* loop** PID MV min. Appendix 2 Flag List (XGI) 17. value is limited) 819 _PID*_MV_BMPL DWORD _PID*_**MV_BMPL _PID*_**SV _PID*_**T_s _PID*_**K_p _PID*_**T_i _PID*_**T_d _PID*_**d_PV_max _PID*_**d_MV_max _PID*_**MV_max _PID*_**MV_min _PID*_**MV_man _PID*_**STATE _PID*_**ALARM0 _PID*_**ALARM1 _PID*_**ALARM2 _PID*_**ALARM3 _PID*_**ALARM4 R1.1 5/09 BOOL INT WORD REAL REAL REAL WORD WORD INT INT INT WORD BOOL BOOL BOOL BOOL BOOL MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . 1:MAN_OUT) – block* loop** PID State 5 (0:CAS_STOP. 1:PID_RUN) – block* loop** PID State 1 (0:AT_STOP. 1:REM_RUN) – block* loop** PID State 4 (0:AUTO_OUT. 1:CAS_RUN) – block* loop** PID State 6 (0:SLV/SINGLE. value is limited) – block* loop** PID Alarm 6 (1:AT abnormal cancellation ) – block* loop** PID Alarm 7 – block* loop** PID State 0 (0:PID_STOP.2 System Warning Reserved Variable Data Type Description – block* loop** _PID*_**ALARM5 _PID*_**ALARM6 _PID*_**ALARM7 _PID*_**STATE0 _PID*_**STATE1 _PID*_**STATE2 _PID*_**STATE3 _PID*_**STATE4 _PID*_**STATE5 _PID*_**STATE6 _PID*_**STATE7 _PID*_**PV _PID*_**PV_old _PID*_**MV _PID*_**MV_BMPL_val _PID*_**ERR _PID*_**MV_p 820 BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL INT INT INT INT DINT REAL PID Alarm 5 (1:MV min. 1:AT_RUN) – block* loop** PID State 2 (0:AT_UNDONE.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . 1:CAS_MST) – block* loop** PID State 7 (0:AW_STOP. 1:DONE) – block* loop** PID State 3 (0:REM_STOP. 1:AW_ACT) – block* loop** PID present value (PV) – block* loop** PID previous value (PV_old) – block* loop** PID output value (MV) – block* loop** PID no impact operation memory (user setting prohibited) – block* loop** PID control error value – block* loop** PID output P element – block* loop** R1. Appendix 2 Flag List (XGI) 17.17. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 821 . PID Flag (* = 0 ~ 7. ** = 0 ~ 31) Reserved Variable _PID*_**MV_i _PID*_**MV_d _PID*_**DB_W _PID*_**Td_lag _PID*_**AT_HYS_val _PID*_**AT_SV _PID*_**AT_step _PID*_**INT_MEM Data Type REAL REAL WORD WORD WORD INT WORD WORD Description PID output I element – block* loop** PID output D element – block* loop** PID deadband setting (operation after stabilization) – block* loop** PID differential function LAG filter – block* loop** PID auto tuning hysteresis setting – block* loop** PID auto tuning SV setting – block* loop** PID auto tuning status (user setting prohibited) – block* loop** PID internal memory (user setting prohibited) – block* loop** R1.17.8. Appendix 2 Flag List (XGI) 17. 2 System Warning 822 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Appendix 2 Flag List (XGI) 17.17. 1 User Flag Address Flag name Type BOOL BOOL BOOL BOOL BOOL BOOL BOOL Writable Contents 20ms cycle clock 100ms cycle clock 200ms cycle clock 1s cycle clock 2s cycle clock 10s cycle clock 20s cycle clock _T100ms clock example 50ms 50ms Description Clock signal used in user program reverses On/Off per a half cycle Please use more enough long clock signal than PLC scan time. %FX6144 _T20MS %FX6145 _T100MS %FX6146 _T200MS %FX6147 _T1S %FX6148 _T2S %FX6149 _T10S %FX6150 _T20S %FX6151 _T60S BOOL - 60s cycle clock %FX6153 _ON %FX6154 _OFF %FX6155 _1ON %FX6156 _1OFF BOOL BOOL BOOL BOOL - Ordinary time On Ordinary time Off 1’st scan On 1’st scan Off Reversal every scan (scan toggle) All output Off Always On state flag. used when writing user program.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . (On state for first scan) On in case all outputs are off 823 %FX6157 _STOG BOOL - %FX6163 _ALL_OFF BOOL R1. Always Off state flag.18. used when writing user program. Clock signal starts from Off condition when initialization program starts or scan program starts. Only 1’st scan On after operation start Only 1’st scan Off after operation start On/Off reversed flag per every scan when user program is working. Appendix 3 Flag List (XGR) 18. 1 5/09 .18. century available) 824 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. second.. Appendix 3 Flag List (XGR) 17. minute. _RTC_TIM 7] E_USER OF BYTE Available Flag that requests detecting light fault (warning) of external Flag used when switching master/standby Flag for user to set time Available %FW3860 Available Time to set (year. day.2 System Warning Address Flag name Type Writable Available Contents Writing data to RTC Initialize scan value Request for detecting heavy fault of external device Request for detecting light fault of external device Master/Standby switching Description Write data to RTC and Read Initialize scan value %FX3072 _RTC_WR BOOL 0 %FX3072 _SCAN_W BOOL 1 R Available %FX3072 _CHK_AN BOOL 2 C_ERR Available Flag that requests detecting heavy fault of external %FX3072 _CHK_AN BOOL 3 C_WAR %FX3072 _MASTER BOOL 4 _CHG ARRAY[0. month. hour. Appendix 3 Flag List (XGR) 18.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 825 .2.2 System Error Representative Flag Master CPU system error representative flag Address Flag name _CN F_E R Type DWO RD Bit position Represe ntative flag Contents System error (heavy fault error) Description Handles error flags about non-operation fault error as below.18. (Refer to “_IO_TYER_N. _FUSE_ER[n]” ) Representative flag displayed when heavy fault error detected by user program is recorded in “_ANC_ERR[n]”. %FX209 0 BIT 10 It is abnormal to the special module parameter. (Refer to “_IO_DEER_N. (Refer to “_FUSE_ER_N. _IO_TYER[n]” ) _IO_ DEE R _FU SE_ ER _AN NU M_E R _BP RM_ ER _IO PRM _ER _SP PRM _ER Module detachment error Representative flag displayed when the module configuration for each slot is changed while running. _IO_DEER[n]” ) Representative flag displayed when the fuse of module is cut off. BIT 9 It is abnormal to the I/O configuration parameter. Representative flag displayed when I/O %FX208 1 _IO_ TYE R BOO L Error when Module type mismatched configuration parameter for each slot is not matched with practical module configuration or a specific module is applied in the wrong location. System Error Representative Flag 18. %FD65 BIT 1 %FX208 2 BOO L BIT 2 %FX208 3 BOO L BIT 3 Fuse cutoff error Heavy fault detection error in external device Basic parameter error I/O parameter error Special module parameter error %FX208 6 BOO L BIT 6 %FX208 8 %FX208 9 BOO L BOO L BOO L BIT 8 Basic parameter doesn’t match CPU type. R1. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .18. Displayed when the saved program gets damages by an abnormal end of CPU or program cannot work. Appendix 3 Flag List (XGR) 17. Indicates that while user program is running. BIT 13 BOO L BIT 14 %FX209 5 BOO L BIT 15 Abnormal base power Base power off or power module error %FX209 6 BOO L BIT 16 Scan watchdog error Base information error Extension base detachment error Redundant parameter error Module attachment Indicates that the program scan time exceeds the scan watchdog time specified by a parameter. %FX209 2 %FX209 3 %FX209 4 BOO L BOO L BIT 12 Indicates that there is problem with usermade program.2 System Warning Address Flag name _CP PRM _ER _PG M_E R _CO DE_ ER _SW DT_ ER _BA SE_ PO WE R_E R _WD T_E R _BA SE_I NFO _ER _BA SE_ DEE R _DU PL_ PRM _ER _INS TAL Type Bit position Contents Communicati on module parameter error Program error Program code error CPU abnormal ends. Description %FX209 1 BOO L BIT 11 It is abnormal to the communication module parameter. %FX209 7 BOO L BIT 17 Base information is abnormal %FX210 2 BOO L BIT 22 Extension base is detatched %FX210 3 %FX210 4 826 BOO L BOO L BIT 23 Abnormal Redundant parameter BIT 24 The module which can’t be inserted into main base is inserted in to main base or R1. the program code can’t be interpreted. _SB_IO_TYERR) %FX412 9 _SB_IO _TYER BO OL BIT 1 Module type mismatch error %FX413 0 _SB_IO _DEER BO OL BIT 2 Module detachment error Representative flag displayed when the module configuration for each slot is changed while running. 827 R1.2.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . Attached module is different with I/O parameter or some module which can’t be inserted into some slot is inserted some slot. Standby CPU System error representative flag Address Flag name _SB_CN F_ER Type DW OR D Bit positio n Repres entativ e flag Contents System error (heavy fault error) Description %FD12 9 Handles error flags about non-operation fault error as below. error Synchronization between master and standby CPU is abnormal %FX210 7 BOO L BIT 27 A/B SIDE key overlap error A. They should be different. System Error Representative Flag Address Flag name L_E R _BA SE_I D_E R _DU PL_ SYN C_E R _AB _SID EKE Y_E R Type Bit position Contents position error Description The module which can’t be inserted into extension base is inserted in to extension base %FX210 5 BOO L BIT 25 Overlapped extension base number extension base number is overlapped %FX210 6 BOO L BIT 26 Redundant operation Sync. standby CPU are overlapped. Appendix 3 Flag List (XGR) 18.B side key of master.18. Representative flag that detects them and displays (refer to _SB_IO_TYER_N. the program code can’t be interpreted. %FX413 9 BO OL BIT 11 It is abnormal to the communication module parameter. %FX413 4 _SB_AN NUM_E R BO OL BIT 6 Representative flag displayed when heavy fault error detected by user program is recorded in “_ANC_ERR[n]”. Indicates that while user program is running._SB_IO_DEERR] %FX413 1 _SB_FU SE_ER BO OL BIT 3 Fuse cutoff error Heavy fault detection error in external device Basic parameter error I/O parameter error Special module parameter error Communicat ion module parameter error Program code error CPU abnormal ends. It is abnormal to the I/O configuration parameter BIT 9 %FX413 8 BIT 10 It is abnormal to the special module parameter. %FX414 1 %FX414 2 BO OL BIT 13 BO OL BIT 14 %FX414 3 BO OL BIT 15 Base power off or power module error 828 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 . Displayed when the saved program gets damages by an abnormal end of CPU or program cannot work.2 System Warning Address Flag name Type Bit positio n Contents Description (refer to _SB_IO_DEER_N.18. Abnormal base power Representative flag displayed when the fuse of module is cut off. Appendix 3 Flag List (XGR) 17. %FX413 6 %FX413 7 _SB_BP RM_ER _SB_IO PRM_E R _SB_SP PRM_E R _SB_CP PRM_E R _SB_CO DE_ER _SB_S WDT_E R _SB_BA SE_PO WER_E R BO OL BO OL BO OL BIT 8 Basic parameter doesn’t match CPU type. error Standby CPU run error extension base number is overlapped %FX415 4 %FX415 6 BO OL BO OL BIT 26 Synchronization between master and standby CPU is abnormal Standby CPU fails to join redundant operation when MASTER CPU is error BIT 28 R1. System Error Representative Flag Address Flag name _SB_W DT_ER _SB_BA SE_INF O_ER _SB_BA SE_DEE R _SB_DU PL_PRM _ER Type Bit positio n BIT 16 Contents Scan watchdog error Base information error Extension base detachment error Abnormal redundant parameter Module attachment position error Description Indicates that the program scan time exceeds the scan watchdog time specified by a parameter. Appendix 3 Flag List (XGR) 18.2. %FX415 1 BO OL BIT 23 Redundant parameter is Abnormal %FX415 2 _SB_IN STALL_ ER BO OL BIT 24 The module which can’t be inserted into main base is inserted in to main base or The module which can’t be inserted into extension base is inserted in to extension base %FX415 3 _SB_BA SE_ID_ ER _SB_DU PL_SYN C_ER _SB_CP U_RUN_ ER BO OL BIT 25 Overlapped extension base number Redundant operation Sync.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 829 . Base information is abnormal %FX414 4 %FX414 5 BO OL BO OL BIT 17 %FX415 0 BO OL BIT 22 Extension base is detached.18. first slot is indicated Indicates slot number where module detachment error occurs.. the user can know a reason of heavy fault. When two or more occurs..3 1] OF WORD ARRAY[0. By monitoring this flag. When two or more occurs. first slot is indicated Indicates slot number Fuse cutoff error occurs. R1.3 System Error Detail Flag Master CPU system error detail flag Address %FW42 4 %FW45 6 %FW48 8 Flag name _IO_TY ERR _IO_D EERR _FUSE _ERR _BASE _DEER R _BASE _POW ER_FAI L _IO_TY ER_N Type ARRAY[0. it develops an external heavy fault detection error. Appendix 3 Flag List (XGR) 17. first slot is indicated Classifies the type of user defined error and writes value except 0.2 System Warning 18.1 5/09 %FW41 6 WORD - %FW41 7 %FW41 8 _IO_D EER_N _FUSE _ER_N WORD - WORD - %FW19 22 _ANC_ ERR WORD Availabl e Heavy fault information of external device 830 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .3 1] OF WORD DWORD Writable Contents Module type mismatch error Module detachment error Fuse cutoff error Extension base detachment error Information of base where power module error occurs Module type mismatch slot number Module detachment slot number Fuse cutoff slot number Description Indicates slot and base where module mismatch error occurs Indicates slot and base where module detachment error occurs Indicates slot and base where fuse cutoff error occurs Indicates base where extension base is detached - - - %FD83 - %FD57 4 DWORD - Indicates base where power module error occurs Indicates slot number where module type mismatch error occurs. If detection of heavy fault is requested.3 1] OF WORD ARRAY[0. When two or more occurs.18.. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 831 . System Error Detail Flag Standby CPU system error detail flag Address %FD14 7 %FW58 8 %FW58 9 Flag name _SB_BASE_DE ERR _SB_IO_TYER R _SB_IO_DEER R Type DWORD Writable Contents Extension base detachment error Module type mismatch error Module detachment error Description Indicates base where extension base is detached Indicates slot and base where module mismatch error occurs Indicates slot and base where module detachment error occurs WORD - WORD - R1. Appendix 3 Flag List (XGR) 18.18.3. Abnormal HS parameter It is not single CPU RUN mode and redundant configuration is not configured %FD66 _CNF_WAR DWORD Representative flag System warning %FX2114 _BASE_EXIST_WAR BOOL BIT 2 Not joined base Stop by operation error Task collision Battery error %FX2115 _AB_SD_ER BOOL BIT 3 %FX2116 _TASK_ER BOOL BIT 4 %FX2117 _BAT_ER BOOL BIT 5 %FX2118 _ANNUM_WAR BOOL BIT 6 External device fault %FX2120 _HS_WAR BOOL BIT 8 High speed link %FX2121 _REDUN_WAR BOOL BIT 9 Redundant configuratio n warning 832 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.1 5/09 .4 System Warning Representative Flag Master CPU System warning representative flag Address Flag name Type Bit position Contents Description Representative flag displayed the system warning state %FX2112 _RTC_ER BOOL BIT 0 RTC error Indicates that RTC data is abnormal Warns there is base which doesn’t join operation Stopped by abnormal operation It is collided to the task It is to the error in the battery state Indicates that the light fault in the external device is detected.2 System Warning 18.18. Appendix 3 Flag List (XGR) 17. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 833 . System Warning Representative Flag Address Flag name Type Bit position Contents Description OS versions between CPUs. extension managers.4.18. Appendix 3 Flag List (XGR) 18. extension drive modules are different Configure an extension cable as the Ring topology Abnormal P2P parameter Fixed cycle error One or two power module is error In case of canceling the base skip. base is different with IO parameter Base number of extension drive module is not 1~31 %FX2122 _OS_VER_WAR BOOL BIT 10 O/S version mismatch %FX2123 _RING_WAR BOOL BIT 11 Ring topology configuratio n warning P2P parameter Fixed cycle error Power module error warning %FX2132 %FX2140 _P2P_WAR _CONSTANT_ER BOOL BOOL BIT 20 BIT 28 %FX2141 _BASE_POWER_WAR BOOL BIT 29 %FX2142 _BASE_SKIP_WAR BOOL BIT 30 Base skip cancelation warning %FX2143 _BASE_NUM_OVER_WAR BOOL BIT 31 Base number setting error R1. Appendix 3 Flag List (XGR) 17.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .18. extension managers. extension drive modules are different Configure an extension cable as the Ring topology Abnormal P2P parameter %FD130 DWOR D System warning %FX416 0 %FX416 2 %FX416 3 %FX416 4 %FX416 5 %FX416 6 %FX416 8 %FX417 0 %FX417 1 %FX418 0 %FX418 8 %FX418 834 BOOL RTC error BOOL BIT 2 Not joined base Stop by operation error Task collision Battery error External device fault High speed link O/S version mismatch Ring topology configuration warning P2P parameter Fixed cycle error Power module BOOL BOOL BOOL BIT 3 BIT 4 BIT 5 BOOL BIT 6 BOOL BIT 8 BOOL BIT 10 BOOL BIT 11 BOOL BIT 20 BOOL BIT 28 Fixed cycle error BOOL BIT 29 One or two power module is R1.2 System Warning Standby CPU System warning representative flag Address Flag name _SB_CN F_WAR _SB_RT C_ER _SB_BAS E_EXIST _WAR _SB_AB_ SD_ER _SB_TAS K_ER _SB_BAT _ER _SB_AN NUM_WA R _SB_HS_ WAR _SB_OS_ VER_WA R _SB_RIN G_WAR _SB_P2P _WAR _SB_CO NSTANT _ER _SB_BAS E_POWE Type Bit position Represe ntative flag BIT 0 Contents Description Representative flag displayed the system warning state Indicates that RTC data is abnormal Warns there is base which doesn’t join operation Stopped by abnormal operation It is collided to the task It is to the error in the battery state Indicates that the light fault in the external device is detected. Abnormal HS parameter OS versions between CPUs. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 835 .4. Appendix 3 Flag List (XGR) 18.18. System Warning Representative Flag Address 9 %FX419 0 Flag name R_WAR _SB_BAS E_SKIP_ WAR _SB_BAS E_NUM_ OVER_W AR Type Bit position Contents error warning error Description BOOL BIT 30 Base skip cancelation warning Base number setting error In case of canceling the base skip. base is different with IO parameter Base number of extension drive module is not 1~31 %FX419 1 BOOL BIT 31 R1. 2 System Warning 18. Appendix 3 Flag List (XGR) 17..7] OF BOOL DWORD - %FX2640 - %FD587 - %FW164 %FW165 WORD - WORD %FW1923 _ANC_W AR WORD - Light fault information external device 836 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.5 System Warning Detail Flag Master CPU system warning detail flag Address Flag name _HS_WA RN _P2P_W ARN _BASE_ ACPF_W AR _HS_WA R_W _P2P_W AR_W Type Writable Contents Abnormal HS parameter Abnormal P2P parameter Instantaneous power cutoff occurrence warning information Abnormal HS parameter Abnormal P2P parameter Description Relevant flag is on in case Hs parameter is abnormal Relevant flag is on in case P2P parameter is abnormal P2P Indicates base where Instantaneous power cutoff occurs Indicates abnormal HS link number by bit Indicates abnormal P2P link number by bit Classifies the type of user defined error and writes value except 0.1 5/09 .18. If detection of heavy fault is requested. it develops an external light fault detection error. the user can know a reason of light fault. %FX2624 ARRAY[0.1 1] OF BOOL ARRAY[0. By monitoring this flag.. 1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 837 . 7] OF BOOL WORD WORD Writable Contents Abnormal HS parameter Abnormal P2P parameter Abnormal HS parameter Abnormal P2P parameter Description Relevant flag is on in case Hs parameter is abnormal Relevant flag is on in case P2P parameter is abnormal P2P Indicates abnormal HS link number by bit Indicates abnormal P2P link number by bit %FX4688 - %FW292 %FW293 - R1.5. System Warning Detail Flag Standby CPU system warning detail flag Address %FX4672 Flag name _SB_HS_WA RN _SB_P2P_W ARN _SB_HS_WA R_W _SB_P2P_W AR_W Type ARRAY[0.. 11] OF BOOL ARRAY[0. Appendix 3 Flag List (XGR) 18.18.. 18.2 System Warning 18. Appendix 3 Flag List (XGR) 17.6 System Operation Status Information Flag Master CPU system operation status information flag Address %FD64 %FX204 8 %FX204 9 %FX205 0 %FX205 1 %FX205 2 %FX205 4 %FX205 8 %FX205 9 %FX206 0 %FX206 1 %FX206 2 %FX206 3 838 Flag name _SYS_STA TE _RUN _STOP _ERROR _DEBUG _LOCAL_C ON _REMOTE _CON _RUN_EDI T_DONE _RUN_EDI T_NG _CMOD_K EY _CMOD_L PADT _CMOD_R PADT _CMOD_R LINK Type DWORD BOOL BOOL BOOL BOOL Bit position Represent ative flag BIT 0 BIT 1 BIT 2 BIT 3 Contents PLC Mode and operation state RUN STOP ERROR DEBUG Indicates operation mode changeable state only by the Mode key and XG5000. It is Remote control mode Indicates completion of editing during Run Edit is ended abnormally during Run Indicates Operation mode change by key Indicates operation mode change by local PADT Indicates operation mode change by remote PADT Indicates operation mode change by remote R1. Indicates CPU’s operation status BOOL BIT 4 Local control Remote Mode On Editing during Run completed Editing during Run abnormally completed Operation mode change by key Operation mode change by local PADT Operation mode change by remote PADT Operation mode change by remote BOOL BOOL BIT 6 BIT 10 BOOL BIT 11 BOOL BIT 12 BOOL BIT 13 BOOL BIT 14 BOOL BIT 15 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .1 5/09 Description Indicates PLC mode and operation state of system. CPU position (A-SIDE: ON. Appendix 3 Flag List (XGR) 18.6. Indicates O/S version of extension drive module Indicates how many base is installed %FX206 4 %FX206 5 %FX206 6 %FX206 7 %FX206 9 _FORCE_I N _FORCE_ OUT _SKIP_ON _EMASK_ ON _USTOP_ ON BOOL BOOL BOOL BOOL BIT 16 BIT 17 BIT 18 BIT 19 Forced Input Forced Output Input/Output Skip Fault mask Stopped by STOP function BOOL BIT 21 %FX207 0 _ESTOP_ ON BOOL BIT 22 Stopped by ESTOP function O/S version of extension drive module Base information %FW192 _SL_OS_V ER _BASE_IN FO _RTC_TIM E _INIT_RUN _AB_SIDE _PB1 _PB2 ARRAY[0.31] OF WORD ARRAY[0. System Operation Status Information Flag Address Flag name Type Bit position Contents communication module Description communication module Forced On/Off state about input contact Forced On/Off state about output contact I/O Skip on execution Fault mask on execution Stopped after scan completion by ‘STOP’ function while RUN mode operation. . . Instantly stopped by ‘ESTOP’ function while RUN mode operation.31] OF WORD ARRAY[0.7] OF BYTE BOOL BOOL BOOL BOOL - %FW600 - %FB12 %FX207 2 %FX207 4 %FX207 6 %FX207 R1.1 5/09 - Current clock Initialization task on execution CPU position Program Code 1 Program Code 2 Indicates current clock User defined Initialization program on execution. . BSIDE: OFF) Program code 1 is selected Program code 1 is selected 839 - MasterLogic PLC Instruction List Honeywell Confidential & Proprietary .18. scan time after Run Indicates current scan time (unit 0. scan time Current scan time If this flag is set by user’s initial program. of power cutoff Max. of instantaneous power cutoff The no. scan time Min.18. scan time after(unit: 0. Indicates RTC’s current date Indicates CPU O/S version Indicates CPU O/S data Indicates extension manager O/S version Whether it is provided to other division Indicates FALS number Indicates RTC’s current clock RTC.2 System Warning Address 7 Flag name Type Bit position Contents Description %FX307 36 _INIT_DON E _RTC_DAT E _OS_VER _OS_DATE _CP_OS_V ER _OS_TYPE _FALS_NU M _RTC_TO D _RUN_EDI T_CNT _AC_F_CN T _POWER_ OFF_CNT _SCAN_M AX _SCAN_MI N _SCAN_C UR BOOL writable Initialization task execution completion RTC’s current date O/S version O/S data Extension manager O/S version For PLC classification FALS number RTC’s current clock The no.1 5/09 %FW584 %FD67 %FD68 %FD69 DATE DWORD DWORD DWORD - %FD573 %FW108 1 %FD293 DWORD INT TIME_OF _DAY UDINT - %FD582 - %FW140 UINT - %FW158 %FW386 %FW387 %FW388 840 UINT UINT UINT UINT writable writable writable MasterLogic PLC Instruction List Honeywell Confidential & Proprietary . of instantaneous power cutoff Indicates the no. Appendix 3 Flag List (XGR) 17. of editing during Run Indicates the no. of editing during Run The no. of power cutoff Indicates max.1ms) Indicates min. (ms unit) Indicates the no.1ms) R1. it is started to execution of scan program after initial program completion. System Operation Status Information Flag Address %FW585 %FW141 %FW633 Flag name _RTC_WE EK _CPU_TYP E _RBANK_ NUM Type UINT WORD WORD Bit position - Contents RTC’s current day CPU ID (XGR 0xA801) Currently used block no.18. Appendix 3 Flag List (XGR) 18.6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 841 . Description Indicates RTC’s current day Indicates CPU type Indicates currently used block no. Standby CPU system operation status information flag Address Flag name _SB_SYS_ STATE _SB_RUN _SB_STOP _SB_ERRO R _SB_LOCA L_CON _SB_REMO TE_CON _SB_RUN_ EDIT_DON E _SB_RUN_ EDIT_NG _SB_CMOD _KEY Type DWOR D BOOL BOOL BOOL BOOL BOOL Bit position Represe ntative flag BIT 0 BIT 1 BIT 2 BIT 4 BIT 6 Contents System information RUN STOP ERROR Local control Remote mode On Editing during Run completed Editing during Run abnormally completed Operation mode change by key Local control mode Remote control mode Indicates completion of editing during Run Edit is ended abnormally during Run Indicates Operation mode change by key Indicates CPU’s operation status Description %FD128 %FX409 6 %FX409 7 %FX409 8 %FX410 0 %FX410 2 %FX410 6 %FX410 7 %FX410 8 Handles system information BOOL BIT 10 BOOL BIT 11 BOOL BIT 12 R1. Instantly stopped by ‘ESTOP’ function while RUN mode operation. Indicates CPU O/S version Indicates CPU O/S data Indicates O/S version of extension drive module BOOL BOOL BIT 14 %FX411 1 %FX411 2 %FX411 3 %FX411 4 %FX411 5 %FX411 7 _SB_CMOD _RLINK _SB_FORC E_IN _SB_FORC E_OUT _SB_SKIP_ ON _SB_EMAS K_ON _SB_USTO P_ON BOOL BIT 15 BOOL BOOL BOOL BOOL BIT 16 BIT 17 BIT 18 BIT 19 BOOL - %FX411 8 _SB_ESTO P_ON _SB_OS_V ER _SB_OS_D ATE _SB_CP_O S_VER BOOL - Stopped by ESTOP function %FD131 %FD132 DWOR D DWOR D DWOR D - O/S version O/S data O/S version of extension drive module %FD133 - 842 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Appendix 3 Flag List (XGR) 17.1 5/09 .2 System Warning Address %FX410 9 %FX411 0 Flag name _SB_CMOD _LPADT _SB_CMOD _RPADT Type Bit position BIT 13 Contents Operation mode change by local PADT Operation mode change by remote PADT Operation mode change by remote communication module Forced Input Forced Output Input/Output Skip Fault mask Stopped by STOP function Description Indicates operation mode change by local PADT Indicates operation mode change by remote PADT Indicates operation mode change by remote communication module Forced On/Off state about input contact Forced On/Off state about output contact I/O Skip on execution Fault mask on execution Stopped after scan completion by ‘STOP’ function while RUN mode operation.18. 6. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 843 . of power cutoff %FW269 %FW632 WORD WORD - Indicates CPU type Indicates how many base is installed. Appendix 3 Flag List (XGR) 18. of power cutoff CPU ID (XGR 0xA801) Base information Description %FW286 UINT Indicates the no. System Operation Status Information Flag Address Flag name _SB_POWE R_OFF_CN T _SB_CPU_ TYPE _SB_BASE _INFO Type Bit position - Contents The no.18. Appendix 3 Flag List (XGR) 17.1 5/09 .18.7 Redundant Operation Mode Information Flag Address Flag name _REDUN_ STATE _DUAL_R UN _RING_T OPOLOG Y _LINE_TO POLOGY _SINGLE_ RUN_A _SINGLE_ RUN_B _MASTER _RUN_A Type DWOR D BOOL Bit position Represen tative flag Contents Redundant operation information Redundant operation Ring topology status Line topology status A-SIDE single Run mode B-SIDE single Run mode A-SIDE is master Run mode (Incase standby CPU exists) B-SIDE is master Run mode (Incase standby CPU exists) Description Representative flag that indicates Redundant operation information Now Redundant operation CPU A.2 System Warning 18. CPU B are normal Extension base is configure as ring %FD0 %FX0 BIT 0 %FX1 BOOL BIT 1 %FX2 %FX4 %FX5 BOOL BOOL BOOL BIT 2 BIT 4 BIT 5 Extension base is configure as line Indicates A-SIDE single Run mode Indicates B-SIDE single Run mode %FX6 BOOL BIT 6 Indicates A-SIDE is master Run mode %FX7 _MASTER _RUN_B BOOL BIT 7 Indicates B-SIDE is master Run mode 844 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. in case of using array. it is renewed every operation Operation error latch flag by program block (PB) unit. index is out of setting value’s range Error occurred when index is out of setting value’s range. Error is kept until relevant program ends and the user erases this by program %FX70 4 _ARY_IDX_ LER BOO L Writable %FX61 60 _ERR BOO L Writable %FX61 65 _LER BOO L Writable Operation error latch flag R1. Operation Result Information Flag 18. Appendix 3 Flag List (XGR) 18. is kept and the user erases this by program As an operation error flag by unit of operation function (FN) or function block (FB).8.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 845 .18.8 Operation Result Information Flag Address %FX67 2 Flag name _ARY_IDX_ ERR Type BOO L Writable Writable Contents Index range excess error in case of using array Index range excess error latch in case of using array Operation error flag Description In case of using array. not remote: On) CPU key position status information(Stop: off. not stop: On) CPU key position status information(Run: off.9 Operation mode Key Status Flag Address Flag name _REM OTE_ KEY _STO P_KE Y _RUN _KEY Type BOO L BOO L BOO L Writable Contents Remote key status information Stop key status information Run key status information Description CPU key position status information(remote: off.2 System Warning 18. not Run: On) %FX291 - %FX294 - %FX295 - 846 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. Appendix 3 Flag List (XGR) 17.1 5/09 .18. or 2. this flag shall be On. In case that all station set in parameter is RUN mode and no error. it keeps On unless stopped by LINK_DISABLE.10 Link Flag (L) List It describes data link (L) flag. k block general state MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 847 . HS link _HSn_RLI NK Bit _HSn_LT RBL Bit _HSn_ST ATE[k] (k=000~1 27) Bit Array R1. LINK TROUBLE shall be On if the above 1. and if the condition return to the normal state. (High speed link no. 2. The communication state of data block set in the parameter is not good. and On under the condition as below. Abnormal state after _HSn_RLINK ON 1. In case that the station set in the parameter is not RUN mode. 1 ~ 12). High speed link parameter “n” normal operation of all station 1. 2 & 3 conditions occur.1 5/09 High speed link parameter “n”. it shall be Off again. The following table describes the Communication Flag List according to High speed link no. All data block set in parameter is communicated normally. Indicates the general state of communication information for each data block of setting parameter. Once RUN_LINK is On. The parameter set in each station itself is communicated normally.10. Appendix 3 Flag List (XGR) 18. There is an error in the station set in the parameter. and 3.18. if communication state of the station set in the parameter and data block is as follows. In the state of _HSmRLINK flag On. Link Flag (L) List 18. Item Keyword Type Content Description Indicates normal operation of all station according to parameter set in High speed link. or 3. bit Array Indicates whether or not to set k data block of parameter. k block station operation error mode High speed link parameter “n”. Appendix 3 Flag List (XGR) 17.2 System Warning Item Keyword Type Content Description HS1STATEk=HS1MODk&_HS1TR X k&(~_HSnERRk ) _HSn_MO D[k] (k=000~1 27) Bit Array High speed link parameter “n”. k block station High speed link parameter “n”.18. _HSn_TR X[k] (k=000~1 27) Bit Array Indicates if communication state of k data of parameter is communicated smoothly according to the setting. k block station RUN operation mode Normal communicatio n with High speed link parameter “n”.1 5/09 . k block setting Indicates operation mode of station set in k data block of parameter. 848 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. _HSn_ER R[k] (k=000~1 27) _HSn_SE TBLOCK[ k] Bit Array Indicates if the error occurs in the communication state of k data block of parameter. mode information of block no. 48~63.10. Thus. is as follows by a simple calculation formula. L00012. 64~79.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 849 . Appendix 3 Flag List (XGR) 18. 96~111. and appears 8 words by 16 per 1 word for 128 blocks from 000~127. ∗ Calculation formula : L area address = L000000 + 500 x (High speed link no. and block 16~31. L00013. L00016. Link Flag (L) List ATTENTION High Speed Link no. the flag address of different high speed link station no. L00015. 32~47. Remarks Comparing with High speed link 1 from [above table].18. For example. 80~95. L00017. R1. – 1) k means block no. 1 2 3 4 5 6 7 8 9 10 11 L area address L000000~L0 0049F L000500~L0 0099F L001000~L0 0149F L001500~L0 0199F L002000~L0 0249F L002500~L0 0299F L003000~L0 0349F L003500~L0 0399F L004000~L0 0449F L004500~L0 0499F L005000~L0 0549F In case of using high speed line flag for Program and monitoring. 112~127 information for L00011. mode information (_HS1MOD) appears from block 0 to block 15 for L00010. 55 appears in L000137. you can use the flag map registered in XG5000 conveniently. L00014. P2P block(xx ) : 0~63).1 5/09 . xx Block service normal count Indicates P2P parameter n. xx Block service abnormal end P2P _P2Pn_STA TUSxx Indicates error code in case of P2P parameter n. xx Block service abnormal end P2P parameter n. xx Block service normal end Description _P2Pn_ERR xx Bit Indicates P2P parameter n. xx Word Block service abnormal end error Code P2P parameter n. xx Block service abnormal end _P2Pn_SVC CNTxx Doubl e word _P2Pn_ERR CNTxx Indicates P2P parameter n.18. Keyword Type Contents P2P parameter n. xx _P2Pn_NDR xx Bit Block service normal end P2P parameter n. No.2 System Warning The following table describes the Communication Flag List according to P2P Service Setting (P2P parameter no. xx Block service normal count Doubl e word P2P parameter n. xx Block service abnormal count Indicates P2P parameter n. Appendix 3 Flag List (XGR) 17. xx Block service abnormal count 850 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.(n) : 1~8. xx block Area device 3 to read P2P parameter n. it is possible to edit during RUN by using P2PSN command. Saves area device 1 to read P2P parameter n. xx block.11 Communication Flag (P2P) List The following table describes the Link Register List according to P2P No. Flags Type Contents Description Saves another station no. In case of using another station no.18. R1.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 851 . xx block Area size 3 to read P2P parameter n. xx block. xx block another station no N00001 ~ N00004 _PnBxxR D1 Device structu re Area device 1 to read P2P parameter n. xx block Area device 2 to read P2P parameter n. 00 block. N00010 _PnBxxRS 2 Word Saves area size 2 to read P2P parameter n. xx block. No. N00000 _PnBxxSN Word P2P parameter n. Communication Flag (P2P) List 18. P2P Block(xx) : 0~63). at XG-PD. N00015 _PnBxxRS 3 Word Saves area size 3 to read P2P parameter n. of P2P parameter 1.(P2P Parameter No.11. xx block. N00011 ~ N00014 _PnBxxR D3 Device structu re Saves area device 3 to read P2P parameter n. xx block N00005 _PnBxxRS 1 Word Saves area size 1 to read P2P parameter n. N00006 ~ N00009 _PnBxxR D2 Device structu re Saves area device 2 to read P2P parameter n. xx block. Appendix 3 Flag List (XGR) 18. xx block Area size 2 to read P2P parameter n. (n) : 1~8. xx block Area size 1 to read P2P parameter n. xx block. N00025 _PnBxxW S1 Word Saves area size 1 to save P2P parameter n. N00026 ~ N00029 _PnBxxW D2 Device structu re Saves area device 2 to save P2P parameter n. xx block. xx block Area device 3 to save P2P parameter n. N00030 _PnBxxW S2 Word Saves area size 2 to save P2P parameter n.2 System Warning No.18. xx block. N00035 _PnBxxW S3 Word Saves area size 3 to save P2P parameter n. xx block. N00031 ~ N00034 _PnBxxW D3 Device structu re Saves area device 3 to save P2P parameter n. xx block Area device 2 to save P2P parameter n. N00016 ~ N00019 Flags _PnBxxR D4 Type Device structu re Contents Area device 4 to read P2P parameter n. xx block Area size 4 to read P2P parameter n. xx block Description Saves area device 4 to read P2P parameter n. xx block. xx block. xx block Area size 2 to save P2P parameter n. xx block Area device 1 to save P2P parameter n. N00021 ~ N00024 _PnBxxW D1 Device structu re Saves area device 1 to save P2P parameter n. xx block. xx block. xx block Area size 3 to save P2P parameter n.1 5/09 . Appendix 3 Flag List (XGR) 17. 852 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. xx block Area size 1 to save P2P parameter n. N00020 _PnBxxRS 4 Word Saves area size 4 to read P2P parameter n. xx block. xx block. The area not used by P2P service as address is divided. Appendix 3 Flag List (XGR) 18. xx block Description Saves area device 4 to save P2P parameter n. block index.18. N00040 _PnBxxW S4 WORD Saves area size 4 to save P2P parameter n.. xx block. can be used by internal device. Communication Flag (P2P) List No.11. N area has a different address classified according to P2P parameter setting no.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 853 . xx block Area size 4 to save P2P parameter n. R1. ATTENTION N area shall be set automatically when setting P2P parameter by using XG-PD and available to modify during RUN by using P2P dedicated command. N00036 ~ N00039 Flags _PnBxxW D4 Type Device structu re Contents Area device 4 to save P2P parameter n. . D# DATE_AND_TIME#. END_FUNCTION_BLOCK Names of Function Block IF .... Reserved Words ACTION ...... END_REPEAT RESOURCE ... END_IF OK Operator (IL Language) Operator (ST Language) PROGRAM PROGRAM . BY .12 Reserved Word The reserved words are predefined words to use in the system... DO . OF AT CASE . END_PROGRAM REPEAT . OF .. THEN .. END_RESOURCE 854 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.... END_FUNCTION FUNCTION_BLOCK . DT# EXIT FOR .. END_FOR FUNCTION . END_ACTION ARRAY . END_CASE CONFIGURATION . Appendix 3 Flag List (XGR) 17..... TO .... it is impossible to use them as the identifier.... END_CONFIGURATION Name of Data Type DATE#.... ELSE ..18.... UNTIL .. ELSE ... Therefore.2 System Warning 18. ELSIF ..1 5/09 . .1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 855 . END_TYPE VAR ...... Appendix 3 Flag List (XGR) 18.... TOD# TRANSITION . END_VAR VAR_OUTPUT .. END_VAR VAR_ACCESS .18... END_WHILE WITH R1. END_VAR VAR_EXTERNAL . END_STRUCTURE T# TASK . END_VAR WHILE .. END_VAR VAR_GLOBAL .. END_TRANSITION TYPE .... END_STEP STRUCTURE .. DO .. WITH TIME_OF_DAY#. END_VAR VAR_IN_OUT . Reserved Word RETAIN RETURN STEP .. TO ... FROM....... END_VAR VAR_INPUT .....12. 2 System Warning 856 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1.18.1 5/09 . Appendix 3 Flag List (XGR) 17. Not attributable to the company. environment or handling otherwise specified in the manual.. Any trouble or defect occurring for the above-mentioned period is partially replaced or repaired. make sure to use the product considering the safety for system configuration or applications. Owing to the reasons unexpected at the level of the contemporary science and technology when delivered. Any trouble attributable to unreasonable condition. 19. 3. Ltd supports and observes the environmental policy as below. 2. 1. 4. 6.1 5/09 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary 857 . for instance. natural disasters or fire. Due to unintended purposes.1 Scope of Warranty The product you purchased is guaranteed for 18 months from the date of manufacturing. 5.19. Warranty and Environmental Policy 19. However. Any trouble attributable to others’ products. R1. 7. please note the following cases are excluded from the scope of warranty. Since the above warranty is limited to PLC unit only.2 Environmental Policy LS Industrial Systems Co. If the product is modified or repaired in any other place not designated by the company. 1 5/09 . Warranty and Environmental Policy 17.19.2 System Warning 858 MasterLogic PLC Instruction List Honeywell Confidential & Proprietary R1. . Honeywell International Process Solutions 2500 West Union Hills Phoenix. AZ 85027 .
Copyright © 2024 DOKUMEN.SITE Inc.