Mitsubishi FX1S Series Programming Manual

Mitsubishi FX1S Series Programming Manual

Melsec-f
Hide thumbs Also See for FX1S Series:
Table of Contents

Advertisement

Quick Links

PROGRAMMING MANUAL
II
THE FX SERIES OF PROGRAMMABLE CONTROLLER
(FX
, FX
, FX
FX
)
1S
1N
2N,
2NC

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi FX1S Series

  • Page 1 PROGRAMMING MANUAL THE FX SERIES OF PROGRAMMABLE CONTROLLER , FX , FX...
  • Page 3: Fx Series Programmable Controllers

    • If in doubt about the operation or use of the PLC please consult the nearest Mitsubishi Electric distributor. • This manual is subject to change without notice.
  • Page 4 FX Series Programmable Controllers FAX BACK - Combined Programming Manual (J) Mitsubishi has a world wide reputation for its efforts in continually developing and pushing back the frontiers of industrial automation. What is sometimes overlooked by the user is the care and attention to detail that is taken with the documentation.
  • Page 5 FX Series Programmable Controllers Guidelines for the Safety of the User and Protection of the Programmable Controller (PLC) This manual provides information for the use of the FX family of PLC’s. The manual has been written to be used by trained and competent personnel. The definition of such a person or persons is as follows;...
  • Page 6 FX Series Programmable Controllers...
  • Page 7: Table Of Contents

    FX Series Programmable controllers 1. Introduction....................1-1 1.1 Overview......................1-1 1.2 What is a Programmable Controller? ..............1-2 1.3 What do You Need to Program a PLC? .............. 1-2 1.4 Special considerations for programming equipment ........... 1-3 1.4.1 Current Generation CPU all versions ............... 1-3 1.5 Associated Manuals ....................
  • Page 8 3. STL Programming .................3-1 3.1 What is STL, SFC And IEC1131 Part 3? ............. 3-1 3.2 How STL Operates ....................3-2 3.2.1 Each step is a program ..................... 3-2 3.3 How To Start And End An STL Program ............. 3-3 3.3.1 Embedded STL programs ..................
  • Page 9 4.11 High Speed Counters ..................4-22 4.11.1 Basic High Speed Counter Operation ..............4-23 4.11.2 Availability of High Speed Counters ............... 4-24 4.11.3 1 Phase Counters - User Start and Reset (C235 - C240) ........4-26 4.11.4 1 Phase Counters - Assigned Start and Reset (C241 to C245) ......4-27 4.11.5 2 Phase Bi-directional Counters (C246 to C250) ............
  • Page 10 5.3 Arithmetic And Logical Operations -Functions 20 to 29 ........5-29 5.3.1 ADD (FNC 20) ......................5-30 5.3.2 SUB (FNC 21) ......................5-31 5.3.3 MUL (FNC 22) ......................5-32 5.3.4 DIV (FNC 23)......................5-33 5.3.5 INC (FNC 24) ......................5-34 5.3.6 DEC (FNC 24) ......................
  • Page 11 5.8 External FX I/O Devices - Functions 70 to 79 ..........5-100 5.8.1 TKY (FNC 70)......................5-101 5.8.2 HKY (FNC 71) ....................... 5-102 5.8.3 DSW (FNC 72) ...................... 5-104 5.8.4 SEGD (FNC 73) ....................5-106 5.8.5 SEGL (FNC 74) ..................... 5-107 5.8.6 ARWS (FNC 75) ....................
  • Page 12 5.15 Gray Codes - FNC 170 to FNC 179 ..............5-184 5.15.1 GRY (FNC 170) ..................... 5-185 5.15.2 GBIN (FNC 171) ....................5-185 5.15.3 RD3A (FNC 176) ....................5-187 5.15.4 WR3A (FNC 177) ....................5-188 5.16 Additional Functions - FNC 180 to FNC 189 ........... 5-190 5.16.1 EXTR (FNC 180) ....................
  • Page 13 9. Assigning System Devices ..............9-1 9.1 Addressing Extension Modules ................9-1 9.2 Real Time Clock Function ................... 9-2 9.2.1 Setting the real time clock ..................9-2 9.3 Analog Expansion Boards ................... 9-4 9.3.1 FX1N-1DA-BD ......................9-4 9.3.2 FX1N-2AD-BD ......................9-11 10.Points Of Technique................10-1 10.1 Advanced Programming Points .................
  • Page 15: Introduction

    FX Series Programmable Controllers Introduction 1 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 16 FX Series Programmable Controllers Introduction 1 Chapter Contents 1. Introduction....................1-1 1.1 Overview......................1-1 1.2 What is a ProgrammableController? ..............1-2 1.3 What do You Need to Program a PC? ..............1-2 1.4 Curent Generation CPU’s, All versions ............... 1-3 1.5 Associated Manuals .................... 1-4...
  • Page 17: Overview

    This is a generic term which is often used to describe all Programmable Controllers without identifying individual types or model names. 4) CPU version numbers and programming support As Mitsubishi upgrades each model different versions have different capabilities. - Please refer to section 1.4 for details about peripheral support for each model.
  • Page 18: What Do You Need To Program A Plc

    What do You Need to Program a PLC? A variety of tools are available to program the Mitsubishi FX family of PLCs. Each of these tools can use and access the instructions and devices listed in this manual for the identified PLC.
  • Page 19: Special Considerations For Programming Equipment

    Introduction 1 Special considerations for programming equipment 1.4.1 Current Generation CPU all versions The introduction of the current CPU provides the FX user with many new devices and instructions. To use the full features of the current range of FX units the user must upgrade older software and hardware programming tools.
  • Page 20: Associated Manuals

    Introduction 1 Associated Manuals Manual name Number FX Base Unit Hardware FX1S Hardware manual JY992D83901 FX1N Hardware manual JY992D88201 FX2N Hardware manual JY992D66301 FX2NC Hardware manual JY992D76401 FX Programming FX0, FX0S, FX0N, FX, FX2C, FX2N, FX2NC Programming manual JY992D48301 FX1S, FX1N, FX2N, FX2NC Programming manual JY992D88101 FX Peripherals FX-10P-E Operation manual...
  • Page 21 Introduction 1 Manual name Number FX DU, GOT and DM units FX-5DM Users manual JY992D84901 FX-10DM Users manual JY992D86401 FX Positioning FX-1HC Users guide JY992D53001 FX2N/FX-1PG-E Users manual JY992D65301 E-20P-E Operation manual JY992D44901 FX2N-1HC Users guide JY992D65401 FX2N-1RM-E-SET Users manual JY992D71101 FX2N-10GM Users guide JY992D77701...
  • Page 22 Introduction 1 Memo...
  • Page 23: Basic Program Instructions

    FX Series Programmable Controllers Basic Program Instructions 2 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 24 FX Series Programmable Controllers Basic Program Instructions 2 Chapter Contents 2. Basic Program Instructions ..............2-1 2.1 What is a Program? ..................... 2-1 2.2 Outline of Basic Devices Used in Programming ..........2-1 2.3 How to Read Ladder Logic .................. 2-2 2.4 Load, Load Inverse ....................
  • Page 25: What Is A Program

    FX Series Programmable Controllers Basic Program Instructions 2 Basic Program Instructions What is a Program? A program is a connected series of instructions written in a language that the PLC can understand. There are three forms of program format; instruction, ladder and SFC/STL. Not all programming tools can work in all programming forms.
  • Page 26: How To Read Ladder Logic

    FX Series Programmable Controllers Basic Program Instructions 2 How to Read Ladder Logic Ladder logic is very closely associated to basic relay logic. There are both contacts and coils that can be loaded and driven in different configurations. However, the basic principle remains the same.
  • Page 27: Load, Load Inverse

    FX Series Programmable Controllers Basic Program Instructions 2 Load, Load Inverse Mnemonic Function Format Devices Program steps Initial logical operation contact X, Y, M, S, T, C (LoaD) type NO (normally open) Initial logical operation contact X, Y, M, S, T, C (LoaD Inverse) type NC (normally closed)
  • Page 28: Out

    FX Series Programmable Controllers Basic Program Instructions 2 Mnemonic Function Format Devices Program steps Y, M:1 S, special M Final logical coils: 2 operation type coil Y, M, S, T, C (OUT) drive C (16 bit): 3 C (32 bit): 5 Basic points to remember: - Connect the OUT instruction directly to the right hand bus bar.
  • Page 29: Double Coil Designation

    FX Series Programmable Controllers Basic Program Instructions 2 2.5.2 Double Coil Designation Double or dual coiling is not a recommended practice. Using multiple output coils of the s a m e d e v i c e c a n c a u s e t h e p r o g r a m operation to become unreliable.
  • Page 30: And, And Inverse

    FX Series Programmable Controllers Basic Program Instructions 2 And, And Inverse Mnemonic Function Format Devices Program steps Serial connection of NO (normally X, Y, M, S, T, C (AND) open) contacts Serial connection of NC (normally X, Y, M, S, T, C (AND Inverse) closed) contacts Program example:...
  • Page 31: Or, Or Inverse

    FX Series Programmable Controllers Basic Program Instructions 2 Or, Or Inverse Mnemonic Function Format Devices Program steps Parallel connection of NO X, Y, M, S, T, C (OR) (normally open) contacts Parallel connection of NC X, Y, M, S, T, C (OR Inverse) (normally closed) contacts...
  • Page 32: Load Pulse, Load Trailing Pulse

    FX Series Programmable Controllers Basic Program Instructions 2 Load Pulse, Load Trailing Pulse Mnemonic Function Format Devices Program steps Initial logical operation - X, Y, M, S, T, C (LoaDPulse) Rising edge pulse Initial logical operation Falling (LoaD Falling X, Y, M, S, T, C / trailing edge pulse) pulse...
  • Page 33: And Pulse, And Trailing Pulse

    FX Series Programmable Controllers Basic Program Instructions 2 And Pulse, And Trailing Pulse Mnemonic Function Format Devices Program steps Serial connection of Rising edge X, Y, M, S, T, C (ANd Pulse) pulse Serial connection of Falling / (ANd Falling X, Y, M, S, T, C trailing edge pulse)
  • Page 34: Or Pulse, Or Trailing Pulse

    FX Series Programmable Controllers Basic Program Instructions 2 2.10 Or Pulse, Or Trailing Pulse Mnemonic Function Format Devices Program steps Parallel connection of X, Y, M, S, T, C (OR Pulse) Rising edge pulse Parallel connection of (OR Falling X, Y, M, S, T, C Falling / trailing pulse) edge pulse...
  • Page 35: Or Block

    FX Series Programmable Controllers Basic Program Instructions 2 2.11 Or Block Mnemonic Function Format Devices Program steps Parallel connection of multiple contact (OR Block) circuits Program example: Non-preferred batch Recommended sequential programming method programming method Basic points to remember: - An ORB instruction is an independent instruction and is not associated with any device number.
  • Page 36: And Block

    FX Series Programmable Controllers Basic Program Instructions 2 2.12 And Block Mnemonic Function Format Devices Program steps Serial connection of multiple (ANd Block) parallel circuits Program example: Recommended sequential programming method Basic points to remember: - An ANB instruction is an independent instruction and is not associated with any device number - Use the ANB instruction to connect multi-contact circuits (usually parallel circuit blocks) to the preceding circuit in series.
  • Page 37: Mps, Mrd And Mpp

    FX Series Programmable Controllers Basic Program Instructions 2 2.13 MPS, MRD and MPP Mnemonic Function Format Devices Program steps Stores the current result of the (Point Store) internal PLC operations Reads the current result of the (Read) internal PLC operations Pops (recalls and removes) the (PoP)
  • Page 38 FX Series Programmable Controllers Basic Program Instructions 2 Multiple program examples: X0 X1 X2 X3 X4 2-14...
  • Page 39: Master Control And Reset

    FX Series Programmable Controllers Basic Program Instructions 2 2.14 Master Control and Reset Mnemonic Function Format Devices Program steps Y, M (no special M coils allowed) Denotes the start (Master N denotes the of a master control MC N block Control) nest level (N0 to N denotes the...
  • Page 40 FX Series Programmable Controllers Basic Program Instructions 2 Nested MC program example: M100 Level N0: Bus line (B) active when X0 M100 is ON. M101 Level N1: Bus line (C) active when both X0 and X2 are ON. M101 M102 Level N2: Bus line (D) active when M102 X0,X2 and X4 are ON.
  • Page 41: Set And Reset

    FX Series Programmable Controllers Basic Program Instructions 2 2.15 Set and Reset Mnemonic Function Format Devices Program steps Y,M:1 Sets a bit device Y, M, S S, special M (SET) permanently ON coils:2 Y, M, S, D, V, Z Resets a bit (see section D, special D device...
  • Page 42: Timer, Counter (Out & Reset)

    FX Series Programmable Controllers Basic Program Instructions 2 2.16 Timer, Counter (Out & Reset) Mnemonic Function Format Devices Program steps 32 bit Driving timer or T, C counters:5 (OUT) counter coils Others: 3 T, C Resets timer and (see section counter, coils 2.15 for other T, C:2...
  • Page 43: Normal 32 Bit Counters

    FX Series Programmable Controllers Basic Program Instructions 2 2.16.2 Normal 32 bit Counters The 32 bit counter C200 counts (up-count, down-count) according to the ON/OFF state of M8200. In the example program shown on the previous page C200 is being used to count the number of OFF ~ ON cycles of input X4.
  • Page 44: Leading And Trailing Pulse

    FX Series Programmable Controllers Basic Program Instructions 2 2.17 Leading and Trailing Pulse Mnemonic Function Format Devices Program steps Y, M Rising edge (no special M (PuLSe) pulse coils allowed) Y, M Falling / trailing (no special M (PuLse Falling) edge pulse coils allowed) Program example:...
  • Page 45: Inverse

    FX Series Programmable Controllers Basic Program Instructions 2 2.18 Inverse Mnemonic Function Format Devices Program steps Invert the current result of the (Inverse) internal PLC operations Program example: Basic points to remember: - The INV instruction is used to change (invert) the logical state of the current ladder network at the inserted position.
  • Page 46: No Operation

    FX Series Programmable Controllers Basic Program Instructions 2 2.19 No Operation Mnemonic Function Format Devices Program steps No operation or (No Operation) null step Basic points to remember: - Writing NOP instructions in the middle of a program minimizes step number changes when changing or editing a program.
  • Page 47: End

    FX Series Programmable Controllers Basic Program Instructions 2 2.20 Mnemonic Function Format Devices Program steps Forces the current program scan to (END) Basic points to remember: - Placing an END instruction in a program forces that program to end the current scan and carry out the updating processes for both inputs and outputs.
  • Page 48 FX Series Programmable Controllers Basic Program Instructions 2 MEMO 2-24...
  • Page 49: Stl Programming

    FX Series Programmable Controllers STL Programming 3 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 50 FX Series Programmable Controllers STL Programming 3 Chapter Contents 3. STL Programming .................3-1 3.1 What is STL, SFC And IEC1131 Part 3? ............. 3-1 3.2 How STL Operates ....................3-2 3.2.1 Each step is a program ..................... 3-2 3.3 How To Start And End An STL Program ............. 3-3 3.3.1 Embedded STL programs ..................
  • Page 51: What Is Stl, Sfc And Iec1131 Part 3

    SFC. This is not a coincidence as this programming technique has been developed deliberately to achieve an easy to program and monitor system. One of the key differences to Mitsubishi’s STL programming system is that it can be entered into a PLC in 3 formats. These are: Ι) Instruction - a word/mnemonic entry system...
  • Page 52: Each Step Is A Program

    FX Series Programmable Controllers STL Programming 3 How STL Operates As previously mentioned, STL is a system which allows the user to write a program which functions M8002 in much the same way as a flow chart, this can be seen in the diagram opposite.
  • Page 53: How To Start And End An Stl Program

    SET or just included in an OUT S 22 instruction. However, within Mitsubishi’s STL programming language an STL coil which is SET S 27 SET has a different meaning than one that is included in an OUT instruction.
  • Page 54: Terminating An Stl Program

    FX Series Programmable Controllers STL Programming 3 Initial Steps For an STL program which is to be activated M8002 on the initial power up of the PLC, a trigger SET S005 similar to that shown opposite could be used, X001 i.e.
  • Page 55: Moving Between Stl Steps

    FX Series Programmable Controllers STL Programming 3 Moving Between STL Steps To activate an STL step the user must first drive the state coil. Setting the coil has already been identified as a way to start an STL program, i.e. drive an initial state. It was also noted that using an OUT statement to driving a state coil has a different meaning to the SET instruction.
  • Page 56: Using Out To Drive An Stl Coil

    FX Series Programmable Controllers STL Programming 3 3.4.2 Using OUT to drive an STL coil This has the same operational features as using SET. However, there is one major function which SET is not used. This is to make what is termed ‘distant jumps’. OUT is used for loops and jumps If a user wishes to ‘jump’...
  • Page 57: Rules And Techniques For Stl Programs

    FX Series Programmable Controllers STL Programming 3 Rules and Techniques For STL programs It can be seen that there are a lot of advantages to using STL style programming but there are a few points a user must be aware of when writing the STL sub-programs. These are highlighted in this section.
  • Page 58 FX Series Programmable Controllers STL Programming 3 • When an STL step transfers control to the next STL step there is a period (one scan) while both steps are active. This can cause problems with dual coils; particularly timers. S 30 T001 If timers are dual coiled care must be taken to T001...
  • Page 59: Single Signal Step Control

    FX Series Programmable Controllers STL Programming 3 3.5.2 Single Signal Step Control Transferring between active STL steps can be controlled by a single signal. There are two methods the user can program to achieve this result. Method 1 - Using locking devices In this example it is necessary to program separate locking devices, and the controlling signal must only pulse ON.
  • Page 60: Restrictions Of Some Instructions When Used With Stl

    FX Series Programmable Controllers STL Programming 3 Restrictions Of Some Instructions When Used With STL Although STL can operate with most basic and applied instructions there are a few exceptions. As a general rule STL and MC-MCR programming formats should not be combined. Other instruction restrictions are listed in the table below.
  • Page 61: Using Stl To Select The Most Appropriate Program

    FX Series Programmable Controllers STL Programming 3 Using STL To Select The Most Appropriate Program So far STL has been considered as a simple flow charting programming language. One of STL’s exceptional features is the ability to create programs which can have several operating modes.
  • Page 62: Using Stl To Activate Multiple Flowssimultaneously

    FX Series Programmable Controllers STL Programming 3 Limits on the number of branches • Please see page 3-14 for general notes on programming STL branches. Notes on using the FX-PCS/AT-EE software • Please see page 3-15 for precautions when using the FX-PCS-AT/EE software. Using STL To Activate Multiple Flows Simultaneously In the previous branching technique, it was seen how a single flow could be selected from a...
  • Page 63 FX Series Programmable Controllers STL Programming 3 When a group of branch flows are activated, the user will often either; a) ‘Race’ each flow against its counter parts. The flow which completes fastest would then activate a joining function (“First State Merge” described in the previous section) OR b) The STL flow will not continue until ALL branch flows have completed there tasks.
  • Page 64: General Rules For Successful Stl Branching

    FX Series Programmable Controllers STL Programming 3 General Rules For Successful STL Branching For each branch point 8 further branches may be programmed. There are no limits to the num- ber of states contained in a single STL flow. Hence, the possibility exists for a single initial state to branch to 8 branch flows which in turn could each branch to a further 8 branch flows etc.
  • Page 65: General Precautions When Usingfx-Pcs/At-Ee Software

    FX Series Programmable Controllers STL Programming 3 Further recommended program changes: S 20 S 20 Rewrite as... S 21 S 23 S 25 S 27 S 21 S 23 S 25 S 27 S 22 S 24 S 26 S 28 S 22 S 24 S 26...
  • Page 66: Programming Examples

    FX Series Programmable Controllers STL Programming 3 3.11 Programming Examples 3.11.1 A Simple STL Flow Loading hopper Start button Ore truck Ore dischange point This simple example is an excerpt from a semi-automatic loading-unloading ore truck program. This example program has a built in, initialization routine which occurs only when the PLC is powered from OFF to ON.
  • Page 67 FX Series Programmable Controllers STL Programming 3 Once at the discharge point the truck opens its bottom doors (Y13). After a timed duration in which the truck empties its contents, the program checks to see if the repeat mode was selected on the last cycle, i.e.
  • Page 68: A Selective Branch/ First State Merge Example Program

    FX Series Programmable Controllers STL Programming 3 3.11.2 A Selective Branch/ First State Merge Example Program The following example depicts an automatic sorting robot. The robot sorts two sizes of ball bearings from a mixed ‘source pool’ into individual storage buckets containing only one type of ball bearing.
  • Page 69 FX Series Programmable Controllers STL Programming 3 Full STL flow diagram/program. This example uses the dot notation to identify normally open and normally closed contacts. Start Normally open contacts Zero-point arrival Normally closed contacts Lower pickup arm S 21 Lower limit = small ball Lower limit = large ball Collect ball S 22...
  • Page 70: Advanced Stl Use

    FX Series Programmable Controllers STL Programming 3 3.12 Advanced STL Use STL programming can be enhanced by using the Initial State Applied Instruction. This instruction has a mnemonic abbreviation of IST and a special function number of 60. When the IST instruction is used an automatic assignment of state relays, special auxiliary relays (M coils) is made.
  • Page 71: Devices In Detail

    FX Series Programmable Controllers Devices in Detail 4 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 72 FX Series Programmable Controllers Devices in Detail 4 Chapter Contents 4. Devices in Detail..................4-1 4.1 Inputs ........................4-1 4.2 Outputs ........................ 4-2 4.3 Auxiliary Relays ....................4-3 4.3.1 General Stable State Auxiliary Relays ..............4-3 4.3.2 Battery Backed/ Latched Auxiliary Relays..............4-4 4.3.3 Special Diagnostic Auxiliary Relays ................
  • Page 73: Inputs

    FX Series Programmable Controllers Devices in Detail 4 Devices in Detail Inputs Device Mnemonic: X Purpose: Representation of physical inputs to the programmable controller (PLC) Alias: I/P (X) Input Input contact Available forms: NO () and NC (‚) contacts only (see example device usage for references) Devices numbered in: Octal, i.e.
  • Page 74: Outputs

    FX Series Programmable Controllers Devices in Detail 4 Outputs Device Mnemonic: Y Purpose: Representation of physical outputs from the programmable controller Alias: O/P Out (Y) Output (Y) Output (coil/ relay/ contact) Available forms: NO () and NC contacts and output coils (‚) (see example device usage for references) Devices numbered in: Octal, i.e.
  • Page 75: Auxiliary Relays

    FX Series Programmable Controllers Devices in Detail 4 Auxiliary Relays Device Mnemonic: M Purpose: Internal programmable controller status flag Alias: Auxiliary (coil/ relay/ contact/ flag) M (coil/ relay/ contact /flag) M (bit) device Available forms: NO () and NC contacts and output coils (‚) (see example device usage for references) Devices numbered in: Decimal, i.e.
  • Page 76: Battery Backed/ Latched Auxiliary Relays

    FX Series Programmable Controllers Devices in Detail 4 4.3.2 Battery Backed/ Latched Auxiliary Relays There are a number of battery backed or latched relays whose status is retained in battery backed or EEPROM memory. If a power failure should occur all output and general purpose relays are switched off.
  • Page 77: Special Diagnostic Auxiliary Relays

    FX Series Programmable Controllers Devices in Detail 4 4.3.3 Special Diagnostic Auxiliary Relays A PLC has a number of special auxiliary relays. These relays all have specific functions and are classified into the following two types. a) Using contacts of special auxiliary relays - Coils are driven automatically by the PLC.
  • Page 78: State Relays

    FX Series Programmable Controllers Devices in Detail 4 State Relays Device Mnemonic: S Purpose: Internal programmable controller status flag Alias: State (coil/ relay/ contact/ flag) S (coil/ relay/ contact /flag) STL step (coil/ relay/ contact /flag) Annunciator flag Available forms: NO (À) and NC contacts and output coils (Á) (see example device usage for references) Devices numbered in: Decimal, i.e.
  • Page 79: Battery Backed/ Latched State Relays

    FX Series Programmable Controllers Devices in Detail 4 4.4.2 Battery Backed/ Latched State Relays There are a number of battery backed or latched relays whose status is retained in battery backed or EEPROM memory. If a power failure should occur all output and general purpose relays are switched off.
  • Page 80: Stl Step Relays

    FX Series Programmable Controllers Devices in Detail 4 4.4.3 STL Step Relays St a t e s ( S ) a r e v e r y i m p o r t a n t d e v i c e s w h e n programming step by step process control.
  • Page 81: Annunciator Flags

    FX Series Programmable Controllers Devices in Detail 4 4.4.4 Annunciator Flags Some state flags can be used as outputs for external diagnosis (called annunciation) when certain applied instructions are used. These instructions are; ANS function 46: Annunciator Set - see page 5-61 ANR function 47: Annunciator Reset - see page 5-61 When the annunciator function is used the controlled state flags are in the range S900 to S999 (100 points).
  • Page 82: Pointers

    FX Series Programmable Controllers Devices in Detail 4 Pointers Device Mnemonic: P Purpose: Program flow control Alias: Pointer Program Pointer Available forms: Label: appears on the left of the left hand bus bar when the program is viewed in ladder mode. Devices numbered in: Decimal, i.e.
  • Page 83: Interrupt Pointers

    FX Series Programmable Controllers Devices in Detail 4 Interrupt Pointers Device Mnemonic: I Purpose: Interrupt program marker Alias: Interrupt High speed interrupt Available forms: Label: appears on the left of the left hand bus bar when the program is viewed in ladder mode (see À...
  • Page 84: Input Interrupts

    FX Series Programmable Controllers Devices in Detail 4 4.6.1 Input Interrupts Identification of interrupt pointer number: I q 0 q 0: interrupt triggered on trailing/ falling edge of input signal 1: interrupt triggered on leading/ rising edge of input signal Input number;...
  • Page 85: Disabling Individual Interrupts

    FX Series Programmable Controllers Devices in Detail 4 4.6.3 Disabling Individual Interrupts Individual interrupt devices can be temporarily or permanently disabled by driving an associated special auxiliary relay. The relevant coils are identified in the tables of devices in chapter 6. However for all PLC types the head address is M8050, this will disable interrupt I0oo.
  • Page 86: Constant K

    FX Series Programmable Controllers Devices in Detail 4 Constant K Device Mnemonic: K Purpose: Identification of constant decimal values Alias: Constant K (value/ constant) Available forms: Numeric data value, when used for 16bit data, values can be selected from the range -32,768 to +32,767 For 32bit data, values from the range -2,147,483,648 to + 2,147,483,647 can be used.
  • Page 87: Timers

    FX Series Programmable Controllers Devices in Detail 4 Timers Device Mnemonic: T Purpose: Timed durations Alias: Timer(s) Available forms: A driven coil sets internal PLC contacts (NO and NC contacts available). Various timer resolutions are possible, from 1 to 100 msec, but availability and quantity vary from PLC to PLC.
  • Page 88: General Timer Operation

    FX Series Programmable Controllers Devices in Detail 4 4.9.1 General timer operation Timers operate by counting clock pulses (1, 10 and 100 msec). The timer output contact is activated when the count data reaches the value set by the constant K. The overall duration or elapsed time, for a timers operation cycle, is calculated by multiplying the present value by the timer resolution, i.e.
  • Page 89: Retentive Timers

    FX Series Programmable Controllers Devices in Detail 4 4.9.3 Retentive Timers A retentive timer has the ability to retain the currently reached present value even after the drive contact has been removed. This means that when the drive contact is re-established a retentive timer will continue from where it last reached.
  • Page 90: Timers Used In Interrupt And 'Call' Subroutines

    FX Series Programmable Controllers Devices in Detail 4 4.9.4 Timers Used in Interrupt and ‘CALL’ Subroutines If timers T192 to T199 and T246 to T249 are used in a CALL subroutine or an interruption routine, the timing action is updated at the point when an END instruction is executed. The output contact is activated when a coil instruction or an END instruction is processed once the timers current value has reached the preset (maximum duration) value.
  • Page 91: Counters

    FX Series Programmable Controllers Devices in Detail 4 4.10 Counters Device Mnemonic: C Purpose: Event driven delays Alias: Counter(s) Available forms: A driven coil sets internal PLC contacts (NO and NC contacts available). Various counter resolutions are possible including; General/latched 16bit up counters - see page 4-20 General/latched 32bit bi-directional counters - see page 4-21 (The availability and use of all these counters is PLC specific - please check availability before use)
  • Page 92: General/ Latched 16Bit Up Counters

    FX Series Programmable Controllers Devices in Detail 4 4.10.1 General/ Latched 16bit UP Counters The current value of the counter increases each time coil C0 is turned ON by X11. The output contact is activated when the coil is turned ON for the tenth time (see diagram). After this, the counter data remains unchanged when X11 is turned ON.
  • Page 93: General/ Latched 32Bit Bi-Directional Counters

    FX Series Programmable Controllers Devices in Detail 4 4.10.2 General/ Latched 32bit Bi-directional Counters The counter shown in the example below, activates when its coil is driven, i.e. the C200 coil is driven. On every occasion the input X14 is turned from OFF to ON the current value or current count of C200 is incremented.
  • Page 94: High Speed Counters

    FX Series Programmable Controllers Devices in Detail 4 4.11 High Speed Counters Device Mnemonic: C Purpose: High speed event driven delays Alias: Counter (s) High speed counter (s) Phase counters Available forms: A driven coil sets internal PLC contacts (NO and NC contacts available). There are various types of high speed counter available but the quantity and function vary from PLC to PLC.
  • Page 95: Basic High Speed Counter Operation

    FX Series Programmable Controllers Devices in Detail 4 4.11.1 Basic High Speed Counter Operation Although counters C235 to C255 (21 points) are all high speed counters, they share the same range of high speed inputs. Therefore, if an input is already being used by a high speed counter, it cannot be used for any other high speed counters or for any other purpose, i.e as an interrupt input.
  • Page 96: Availability Of High Speed Counters

    FX Series Programmable Controllers Devices in Detail 4 4.11.2 Availability of High Speed Counters The following device table outlines the range of available high speed counters. 1 Phase counter 1 Phase counter 2 Phase counter assigned A/B Phase counter user start/reset bi-directional start/reset X0 U/D...
  • Page 97 FX Series Programmable Controllers Devices in Detail 4 If any high speed comparison instructions (FNC’s 53, 54, 55) are used, X0 and X1 must resort to software counting. In this case, please see the table below: Function Max. Combined Unit Number Signal Frequency 53 or 54...
  • Page 98: Phase Counters - User Start And Reset (C235 - C240)

    FX Series Programmable Controllers Devices in Detail 4 4.11.3 1 Phase Counters - User Start and Reset (C235 - C240) These counters only use one input each. When direction flag M8235 is ON, counter C235 counts down. When it is OFF, C235 M8235 counts up.
  • Page 99: Phase Counters - Assigned Start And Reset (C241 To C245)

    FX Series Programmable Controllers Devices in Detail 4 4.11.4 1 Phase Counters - Assigned Start and Reset (C241 to C245) These counters have one countable input and 1 reset input each. Counters C244 and C245 also have a start input. M8245 When the direction flag M8245 is ON, C245 counts down.
  • Page 100: Phase Bi-Directional Counters (C246 To C250)

    FX Series Programmable Controllers Devices in Detail 4 4.11.5 2 Phase Bi-directional Counters (C246 to C250) These counters have one input for counting up and one input for counting down. Certain counters also have reset and start inputs as well. When X10 is ON, C246 resets in the same way as standard 32bit counters.
  • Page 101: A/B Phase Counters (C252 To C255)

    FX Series Programmable Controllers Devices in Detail 4 4.11.6 A/B Phase Counters (C252 to C255) With these counters only the input identified in the previous high speed counter tables can be used for counting. The counting performed by these devices is independent of the program cycle (scan) time.
  • Page 102: Data Registers

    FX Series Programmable Controllers Devices in Detail 4 4.12 Data Registers Device Mnemonic: D Purpose: A storage device capable of storing numeric data or 16/32bit patterns Alias: Data (register/ device/ word) D (register) Word Available forms: General use registers - see page 4-34 Battery backed/latched registers - see page 4-35 Special diagnostic registers - see page 4-35 File registers - see page 4-36...
  • Page 103: General Use Registers

    FX Series Programmable Controllers Devices in Detail 4 4.12.1 General Use Registers Data registers, as the name suggests, store data. The stored data can be interpreted as a numerical value or as a series of bits, being either ON or OFF. A single data register contains 16bits or one word.
  • Page 104: Battery Backed/ Latched Registers

    FX Series Programmable Controllers Devices in Detail 4 4.12.2 Battery Backed/ Latched Registers Once data is written to a battery backed register, it remains unchanged until it is overwritten. When the PLC’s status is changed from RUN to STOP, the data in these registers is retained. The range of devices that are battery backed can be changed by adjusting the parameters of the PLC.
  • Page 105: File Registers

    FX Series Programmable Controllers Devices in Detail 4 4.12.4 File Registers Program memory registers File registers can be secured in the program memory (EEPROM or EPROM) in units of 500 points. These registers can be accessed with a peripheral device. While the PLC is operating, data in the file registers can be read to the general-use/ battery backed/ latched registers by using the BMOV instruction.
  • Page 106: Externally Adjusted Registers

    FX Series Programmable Controllers Devices in Detail 4 4.12.5 Externally Adjusted Registers The FX and FX have built in “setting po ts ” w h ich a re us e d t o a d jus t t he Setting pot co n te n ts of ce r ta in d e d ic a te d da ta of an FX registers.
  • Page 107: Index Registers

    FX Series Programmable Controllers Devices in Detail 4 4.13 Index Registers Device Mnemonic: V,Z Purpose: To modify a specified device by stating an offset. Alias: (V/ Z) Register Index (register/ addressing/ modifier) Offset(s) (register/ addressing/ modifier) Indices Modifier Available forms: For 16bit data V or Z 16 Bit 16 Bit...
  • Page 108: Modifying A Constant

    FX Series Programmable Controllers Devices in Detail 4 4.13.1 Modifying a Constant Constants can be modified just as easily as data registers or bit devices. If, for example, the constant K20 was actually written K20V the final result would equal: K20 + the contents of V Example: (3276)
  • Page 109: Bits, Words, Bcd And Hexadecimal

    FX Series Programmable Controllers Devices in Detail 4 4.14 Bits, Words, BCD and Hexadecimal The following section details general topics relating to good device understanding. The section is split into several smaller parts with each covering one topic or small group of topics. Some of the covered topics are;...
  • Page 110 FX Series Programmable Controllers Devices in Detail 4 Assigning grouped bit devices: As already explained, bit devices can be grouped into 4 bit units. The “n” in KnM0 defines the number of groups of 4 bits to be combined for data operation. K1 to K4 are allowed for 16bit data operations but K1 to K8 are valid for 32bit operations.
  • Page 111: Interpreting Word Data

    FX Series Programmable Controllers Devices in Detail 4 4.14.2 Word Devices Word devices such as T, C, D, V and Z can store data about a particular event or action within the PLC. For the most part these devices are 16 bit registers. However, certain variations do have 32 bit capabilities, as can pairs of consecutive data registers or combined V and Z registers.
  • Page 112 FX Series Programmable Controllers Devices in Detail 4 The reason this is not -7797 is because a negative value is calculated using two’s compliment (described later) but can quickly be calculated in the following manner: Because this is a negative number, a base is set as -32768. This is the smallest number available with 16bit data.
  • Page 113 FX Series Programmable Controllers Devices in Detail 4 c) ABCD conversion Using the original bit pattern as a base but adding the following BCD headers allows the conversion of the binary data into a BCD format. Binary Coded Decimal value= ERROR!!!!! It will be noticed that this will produce an ERROR.
  • Page 114: Two's Compliment

    FX Series Programmable Controllers Devices in Detail 4 4.14.4 Two’s Compliment Programmable controllers, computers etc, use a format called 2’s compliment. This is a mathematical procedure which is more suited to the micro processors operational hardware requirements. It is used to represent negative numbers and to perform subtraction operations. The procedure is very simple, in the following example “15 - 7”...
  • Page 115: Floating Point And Scientific Notation

    FX Series Programmable Controllers Devices in Detail 4 4.15 Floating Point And Scientific Notation PLC’s can use many different systems and methods to store data. The most common have already been discussed in previous sections e.g. BCD, Binary, Decimal, Hex. These are what is known as ‘integer’ formats or ‘whole number formats’. As the titles suggest these formats use only whole numbers with no representation of fractional parts.
  • Page 116: Scientific Notation

    FX Series Programmable Controllers Devices in Detail 4 4.15.1 Scientific Notation This format could be called the step between the ‘integer’ formats and the full floating point formats. In basic terms Scientific Notation use two devices to store information about a number or value.
  • Page 117: Floating Point Format

    FX Series Programmable Controllers Devices in Detail 4 4.15.2 Floating Point Format Floating point format extends the abilities and ranges provided by Scientific Notation with the ability to represent fractional portions of whole numbers, for example; Performing and displaying the calculation of 22 divided by 7 would yield the following results: a) Normal FX operation using decimal (integers) numbers would equal 3 remainder 1 b) In floating point it would equal 3.14285 (approximately) c) In Scientific format this calculation would be equal to 3142 5 10...
  • Page 118: Summary Of The Scientific Notation And Floating Point Numbers

    FX Series Programmable Controllers Devices in Detail 4 4.15.3 Summary Of The Scientific Notation and Floating Point Numbers The instruction needed to convert between each number format are shown below in a diagrammatically format for quick and easy reference. Use to view the View as either integer of mantissa and hexadecimal...
  • Page 119: Applied Instructions

    FX Series Programmable Controllers Applied Instructions 5 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 120 FX Series Programmable Controllers Applied Instructions 5 Chapter Contents 5. Applied Instructions ................5-1 Program Flow-Functions00 to 09 ..................5-4 5.1.1 CJ (FNC 00) ............5-5 5.1.2 CALL (FNC 01).......... 5-7 5.1.3 SRET (FNC 02)............5-8 5.1.4 IRET, EI, DI (FNC 03, 04, 05)....5-9 5.1.5 FEND (FNC 06)............
  • Page 121: Applied Instructions

    FX Series Programmable Controllers Applied Instructions 5 Applied Instructions Applied Instructions are the ‘specialist’ instructions of the FX family of PLC’s. They allow the user to perform complex data manipulations, mathematical operations while still being very easy to program and monitor. Each applied instruction has unique mnemonics and special function numbers.
  • Page 122 FX Series Programmable Controlers Applied Instructions 5 • For instructions that operate continuously, i.e. on every scan of the program the instruction will operate and provide a new, different result, the following identification symbol will be used ‘ ’ to represent a high speed changing state. Typical instructions covered by this situation have a strong incremental, indexable element to their operation.
  • Page 123 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: " Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation...
  • Page 124: Program Flow-Functions 00 To 09

    FX Series Programmable Controlers Applied Instructions 5 Program Flow-Functions 00 to 09 Contents: Page CJ - Conditional jump FNC 00 CALL - Call Subroutine FNC 01 SRET - Subroutine Return FNC 02 IRET - Interrupt Return FNC 03 EI - Enable Interrupt FNC 04 DI -...
  • Page 125: Cj (Fnc 00)

    FX Series Programmable Controlers Applied Instructions 5 5.1.1 CJ (FNC 00) Operands Mnemonic Function Program steps Jumps to the Valid pointers from the range 0 to 63 CJ, CJP:3steps FNC 00 identified pointer Jump pointer (Conditional position P22: 1 step Jump) 16 BIT OPERATION 32 BIT OPERATION...
  • Page 126 FX Series Programmable Controlers Applied Instructions 5 e) A CJ instruction can be used to Jump forwards through a program, i.e. towards the END instruction OR it can jump backwards towards step 0. If a backwards jump is used care must be taken not to overrun the watchdog timer setting otherwise the P LC will en ter a n err or situ atio n.
  • Page 127: Call (Fnc 01)

    FX Series Programmable Controlers Applied Instructions 5 5.1.2 CALL (FNC 01) Operands Mnemonic Function Program steps CALL Executes the Valid pointers from the range 0 to 62 CALL, CALLP: FNC 01 subroutine 3 step all sub- program starting Nest levels: 5 including the initial CALL Subroutine pointer routine at the identified...
  • Page 128 FX Series Programmable Controlers Applied Instructions 5 Special subroutine timers: • Because of the chance of intermittent use of the subroutines, if timed functions are required the timers used must be selected from the range T192 to T199 and T246 to T249.
  • Page 129: Sret (Fnc 02)

    FX Series Programmable Controlers Applied Instructions 5 5.1.3 SRET (FNC 02) Operands Mnemonic Function Program steps SRET Returns operation SRET: FNC 02 from a subroutine Automatically returns to the step immediately 1 step program following the CALL instruction which activated Subroutine return) the subroutine.
  • Page 130: Iret, Ei, Di(Fnc 03, 04, 05)

    FX Series Programmable Controlers Applied Instructions 5 5.1.4 IRET, EI, DI (FNC 03, 04, 05) Operands Mnemonic Function Program steps IRET Forces the IRET: FNC 03 program to return Automatically returns to the main program step 1 step (Interrupt from the active which was being processed at the time of the return) interrupt routine...
  • Page 131 FX Series Programmable Controlers Applied Instructions 5 Controlling interrupt operations: The PLC has a default status of disabling interrupt operation. The EI instruction must be used to activate the interrupt facilities. All interrupts which physically occur during the program scan period from the EI instruction until the FEND or DI instructions will have their associated interrupt routines run.
  • Page 132: Fend (Fnc 06)

    FX Series Programmable Controlers Applied Instructions 5 5.1.5 FEND (FNC 06) Operands Mnemonic Function Program steps FEND Used to indicate FEND: FNC 06 the end of the Note: 1 step (First end) main program Can be used with CJ (FNC 00), CALL (FNC 01) block and interrupt routines Operation:...
  • Page 133: Wdt (Fnc 07)

    FX Series Programmable Controlers Applied Instructions 5 5.1.6 WDT (FNC 07) Operands Mnemonic Function Program steps Used to refresh WDT, WDTP: FNC 07 the watch dog Can be driven at any time within the main 1 step (Watch dog timer during a program body timer refresh) program scan...
  • Page 134: For, Next(Fnc 08, 09)

    FX Series Programmable Controlers Applied Instructions 5 5.1.7 FOR, NEXT (FNC 08, 09) Operands Mnemonic Function Program steps Identifies the start K, H, FOR: FNC 08 position and the KnX, KnY, KnM, KnS, 3 step (Start of a number of T, C, D, V, Z FOR-NEXT repeats for the...
  • Page 135 FX Series Programmable Controlers Applied Instructions 5 Nested FOR-NEXT loops: FOR-NEXT instructions can be nested for 5 levels. This means that 5 FOR-NEXT loops can be sequentially programmed within each other. In the example a 3 level nest has been programmed. As each new FOR-NEXT nest level is encountered the number of times that loop is repeated is increased by the multiplication of all of the surrounding/previous loops.
  • Page 136 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 " Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation...
  • Page 137: Move And Compare - Functions 10 To 19

    FX Series Programmable Controlers Applied Instructions 5 Move And Compare - Functions 10 to 19 Contents: Page CMP - Compare FNC 10 5-17 ZCP - Zone Compare FNC 11 5-17 MOV - Move FNC 12 5-18 SMOV - Shift Move FNC 13 5-18 CML -...
  • Page 138: Cmp (Fnc 10)

    FX Series Programmable Controlers Applied Instructions 5 5.2.1 CMP (FNC 10) Operands Mnemonic Function Program steps Compares two K, H, Y, M, S CMP, CMPP: FNC 10 data values - KnX, KnY, KnM, KnS, 7 steps (Compare) results of <, = and T, C, D, V, Z Note: >...
  • Page 139: Zcp (Fnc 11)

    FX Series Programmable Controlers Applied Instructions 5 5.2.2 ZCP (FNC 11) Operands Mnemonic Function Program steps Compares a data K, H, Y, M, S ZCP,Z CPP: FNC 11 KnX, KnY, KnM, KnS, Note: 9 steps value against a (Zone T, C, D, V, Z data range - compare) 3 consecutive...
  • Page 140: Mov (Fnc 12)

    FX Series Programmable Controlers Applied Instructions 5 5.2.3 MOV (FNC 12) Operands Mnemonic Function Program steps Moves data from K, H, KnY, KnM, KnS, MOV, MOVP: FNC 12 one storage area KnX, KnY, KnM, KnS, T, C, D, V, Z 5 steps (Move) to a new storage...
  • Page 141: Smov (Fnc 13)

    FX Series Programmable Controlers Applied Instructions 5 5.2.4 SMOV (FNC 13) Operands Mnemonic Function Program steps SMOV Takes elements of K, H K, H, K, H, SMOV, FNC 13 an existing 4 digit Note: available KnX, KnY, KnY, KnM, SMOVP: (Shift move) decimal number range 1 to 4.
  • Page 142: Cml (Fnc 14)

    FX Series Programmable Controlers Applied Instructions 5 5.2.5 CML (FNC 14) Operands Mnemonic Function Program steps Copies and K, H, CML,CMLP: FNC 14 inverts the source KnX, KnY, KnM, KnS, KnY, KnM, KnS, 5 steps (Compliment) bit pattern to a T, C, D, V, Z T, C, D, V, Z DCML,...
  • Page 143: Bmov (Fnc 15)

    FX Series Programmable Controlers Applied Instructions 5 5.2.6 BMOV (FNC 15) Operands Mnemonic Function Program steps BMOV Copies a specified KnX, KnY, KnY, KnM, K, H BMOV, FNC 15 block of multiple KnM, KnS, KnS, D (FX2C, BMOVP: (Block move) data elements to a T,C,D, V, Z T, C, D, V, Z...
  • Page 144: Fmov (Fnc 16)

    FX Series Programmable Controlers Applied Instructions 5 5.2.7 FMOV (FNC 16) Operands Mnemonic Function Program steps FMOV Copies a single KnX, KnY, KnY, KnM, K, H FMOV,FMOVP:7 FNC 16 data device to a KnM, KnS, KnS, steps (Fill move) range of T, C, D, V, Z T, C, D, V, Z DFMOV,DFMOVP...
  • Page 145: Xch (Fnc 17)

    FX Series Programmable Controlers Applied Instructions 5 5.2.8 XCH (FNC 17) Operands Mnemonic Function Program steps Data in the KnY, KnM, KnS, T, C, D, V, Z XCH,XCHP: FNC 17 designated Note: when using the byte XCH (i.e.M8160 is 5 steps (Exchange) devices is ON) D...
  • Page 146: Bcd (Fnc18)

    FX Series Programmable Controlers Applied Instructions 5 5.2.9 BCD (FNC18) Operands Mnemonic Function Program steps Converts binary KnX,KnY, KnM, KnS, KnY, KnM, KnS, BCD, BCDP: FNC 18 numbers to BCD T, C, D, V, Z T, C, D, V, Z 5 steps coded equivalents /...
  • Page 147: Bin (Fnc 19)

    FX Series Programmable Controlers Applied Instructions 5 5.2.10 BIN (FNC 19) Operands Mnemonic Function Program steps Converts BCD KnX, KnY, KnM, KnS, KnY, KnM, KnS, BIN, BINP: FNC 19 numbers to their T, C, D, V, Z T, C, D, V, Z 5 steps (Binary) binary equivalent /...
  • Page 148 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 " Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation...
  • Page 149: Arithmetic And Logical Operations -Functions 20 To 29

    FX Series Programmable Controlers Applied Instructions 5 Arithmetic And Logical Operations - Functions 20 to 29 Contents: Page ADD - Addition FNC 20 5-25 SUB - Subtraction FNC 21 5-26 MUL - Multiplication FNC 22 5-27 DIV - Division FNC 23 5-28 INC - Increment...
  • Page 150: Add (Fnc 20)

    FX Series Programmable Controlers Applied Instructions 5 5.3.1 ADD (FNC 20) Operands Mnemonic Function Program steps The value of the K, H, KnX, KnY, KnM, KnS, KnY, KnM, KnS, ADD, ADDP: FNC 20 two source T, C, D, V, Z T, C, D, V, Z 7 steps devices is added...
  • Page 151: Sub (Fnc 21)

    FX Series Programmable Controlers Applied Instructions 5 5.3.2 SUB (FNC 21) Operands Mnemonic Function Program steps One source K, H, KnX, KnY, KnM, KnS, KnY, KnM, KnS, SUB, SUBP: FNC 21 device T, C, D, V, Z T, C, D, V, Z 7steps (Subtract) is subtracted from...
  • Page 152: Mul (Fnc 22)

    FX Series Programmable Controlers Applied Instructions 5 5.3.3 MUL (FNC 22) Operands Mnemonic Function Program steps Multiplies the two K, H, KnX, KnY, KnM, KnS, KnY,KnM,KnS, MUL, MULP: FNC 22 source devices T, C, D, V, Z T, C, D, Z(V) 7steps (Multiplica together the result...
  • Page 153: Div (Fnc 23)

    FX Series Programmable Controlers Applied Instructions 5 5.3.4 DIV (FNC 23) Operands Mnemonic Function Program steps Divides one K, H, KnX, KnY, KnM, KnS,T, KnY, KnM, KnS, DIV,DIVP: FNC 23 source value by C, D, V, Z T, C, D, Z(V) 7steps (Division) another the result...
  • Page 154: Inc (Fnc 24)

    FX Series Programmable Controlers Applied Instructions 5 5.3.5 INC (FNC 24) Operands Mnemonic Function Program steps The designated KnY, KnM, KnS, INC,INCP: FNC 24 device is T, C, D, V, Z 3 steps incremented by 1 Standard V,Z rules apply for 32 bit operation Increment) on every DINC,...
  • Page 155: Dec (Fnc 24)

    FX Series Programmable Controlers Applied Instructions 5 5.3.6 DEC (FNC 24) Operands Mnemonic Function Program steps The designated KnY, KnM, KnS, DEC,DECP: FNC 25 device is T, C, D, V, Z 3 steps (Decrement) decremented by 1 Standard V,Z rules apply for 32 bit operation on every DDEC, execution of the...
  • Page 156: Wand (Fnc 26)

    FX Series Programmable Controlers Applied Instructions 5 5.3.7 WAND (FNC 26) Operands Mnemonic Function Program steps WAND A logical AND is K, H, KnY, KnM, KnS, WAND,WANDP: FNC 26 performed on the KnX, KnY, T, C, D, V, Z 7 steps source devices - KnM, KnS, DAND,...
  • Page 157: Wor (Fnc 27)

    FX Series Programmable Controlers Applied Instructions 5 5.3.8 WOR (FNC 27) Operands Mnemonic Function Program steps A logical OR is K,H, KnY, KnM, KnS, WOR,WORP: FNC 27 performed on the KnX,KnY, KnM, KnS, T, C, D, V, Z 7 steps source devices - T, C, D, V, Z DOR,...
  • Page 158: Wxor (Fnc 28)

    FX Series Programmable Controlers Applied Instructions 5 5.3.9 WXOR (FNC 28) Operands Mnemonic Function Program steps WXOR A logical XOR is K, H KnY, KnM, KnS, WXOR, FNC 28 performed on the KnX, KnY, KnM, KnS, T, C, D, V, Z WXORP: (Logical source devices -...
  • Page 159: Neg (Fnc 29)

    FX Series Programmable Controlers Applied Instructions 5 5.3.10 NEG (FNC 29) Operands Mnemonic Function Program steps Logically inverts KnY, KnM, KnS, NEG,NEGP: FNC 29 the contents of T, C, D, V, Z 3 steps (Negation) the designated DNEG, device DNEGP: 5 steps 16 BIT OPERATION 32 BIT OPERATION...
  • Page 160 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-40...
  • Page 161 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 " Rotation And Shift 5-34 FNC 30 - 39 Data Operation...
  • Page 162: Rotation And Shift - Functions 30 To 39

    FX Series Programmable Controlers Applied Instructions 5 Rotation And Shift - Functions 30 to 39 Contents: Page ROR - Rotation Right FNC 30 5-35 ROL - Rotation Left FNC 31 5-35 RCR - Rotation Right with Carry FNC 32 5-36 RCL - Rotation Left with Carry FNC 33...
  • Page 163: Ror (Fnc 30)

    FX Series Programmable Controlers Applied Instructions 5 5.4.1 ROR (FNC 30) Operands Mnemonic Function Program steps The bit pattern of KnY, KnM, KnS, K, H, ROR, RORP: FNC 30 the destination T, C, D, V, Z 5 steps (Rotation device is rotated Note: right) ‘n’...
  • Page 164: Rol (Fnc 31)

    FX Series Programmable Controlers Applied Instructions 5 5.4.2 ROL (FNC 31) Operands Mnemonic Function Program steps The bit pattern of KnY, KnM, KnS, K, H, ROL,ROLP: FNC 31 the destination T, C, D, V, Z 5 steps (Rotation device is rotated Note: left) ‘n’...
  • Page 165: Rcr (Fnc 32)

    FX Series Programmable Controlers Applied Instructions 5 5.4.3 RCR (FNC 32) Operands Mnemonic Function Program steps The contents of KnY, KnM, KnS, K, H, RCR,RCRP: FNC 32 the destination T, C, D, V, Z 5 steps device are rotated Note: Rotation right with right with 1 bit...
  • Page 166: Rcl (Fnc 33)

    FX Series Programmable Controlers Applied Instructions 5 5.4.4 RCL (FNC 33) Operands Mnemonic Function Program steps The contents of KnY, KnM, KnS, K, H, RCL, RCLP: FNC 33 the destination 5 steps T, C, D, V, Z (Rotation device are left with rotated DRCL,...
  • Page 167: Sftr (Fnc 34)

    FX Series Programmable Controlers Applied Instructions 5 5.4.5 SFTR (FNC 34) Operands Mnemonic Function Program steps SFTR The status of the X, Y, M, S Y, M, S K,H, SFTR,SFTRP: FNC 34 source devices are 9 steps right) copied to a Bit shift Note: controlled bit stack...
  • Page 168: Sftl (Fnc 35)

    FX Series Programmable Controlers Applied Instructions 5 5.4.6 SFTL (FNC 35) Operands Mnemonic Function Program steps SFTL The status of the X, Y, M, S Y, M, S K,H, SFTL,SFTLP: FNC 35 source devices are 9steps left) copied to a Bit shift Note: controlled bit stack...
  • Page 169: Wsfr (Fnc 36)

    FX Series Programmable Controlers Applied Instructions 5 5.4.7 WSFR (FNC 36) Operands Mnemonic Function Program steps WSFR The value of the KnX, KnY, KnY,KnM, K,H, WSFR, FNC 36 source devices are KnM,KnS, KnS, WSFRP: copied to a T, C, D T, C, D 9 steps Word...
  • Page 170: Wsfl (Fnc 37)

    FX Series Programmable Controlers Applied Instructions 5 5.4.8 WSFL (FNC 37) Operands Mnemonic Function Program steps WSFL The value of the KnX, KnY, KnY,KnM, K,H, WSFL, FNC 37 source devices are KnM,KnS, KnS, WSFLP: copied to a T, C, D T, C, D 9 steps Word...
  • Page 171: Sfwr (Fnc 38)

    FX Series Programmable Controlers Applied Instructions 5 5.4.9 SFWR (FNC 38) Operands Mnemonic Function Program steps SFWR This instruction K, H, KnY, KnM, K, H, SFWR, FNC 38 creates and builds KnX, KnY, KnS, SFWRP: register a FIFO stack n KnM,KnS, T, C, D, 7 steps...
  • Page 172: Sfrd (Fnc 39)

    FX Series Programmable Controlers Applied Instructions 5 5.4.10 SFRD (FNC 39) Operands Mnemonic Function Program steps SFRD This instruction KnY, KnM, KnY, KnM, K,H, SFRD, FNC 39 reads and KnS, KnS, SFRDP: (Shift reduces FIFO T, C, D, T, C, D, 7 steps Note: register read)
  • Page 173 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 "...
  • Page 174: Data Operation - Functions 40 To 49

    FX Series Programmable Controlers Applied Instructions 5 Data Operation - Functions 40 to 49 Contents: Page ZRST - Zone Reset FNC 40 5-43 DECO - Decode FNC 41 5-43 ENCO - Encode FNC 42 5-44 SUM - The Sum Of Active Bits FNC 43 5-45 BON -...
  • Page 175: Zrst (Fnc 40)

    FX Series Programmable Controlers Applied Instructions 5 5.5.1 ZRST (FNC 40) Operands Mnemonic Function Program steps ZRST Used to reset a Y, M,S, ZRST, T, C, D FNC 40 range of like ZRSTP: Note: devices in one 5 steps Zone must be less than or equal ( ≤...
  • Page 176: Deco (Fnc 41)

    FX Series Programmable Controlers Applied Instructions 5 5.5.2 DECO (FNC 41) Operands Mnemonic Function Program steps DECO Source data value K, H, Y, M, S, K, H, DECO, FNC 41 Q identifies the X, Y, M,S, T, C, D DECOP: (Decode) Qth bit of the T, C, D, V,...
  • Page 177: Enco (Fnc 42)

    FX Series Programmable Controlers Applied Instructions 5 5.5.3 ENCO (FNC 42) Operands Mnemonic Function Program steps ENCO Then location of X, Y, M, S, T, C, D, V, K, H, ENCO, FNC 42 the highest active T, C, D, V, ENCOP: (Encode) bit is stored as a...
  • Page 178: Sum (Fnc 43)

    FX Series Programmable Controlers Applied Instructions 5 5.5.4 SUM (FNC 43) Operands Mnemonic Function Program steps The number K, H, KnY, KnM, KnS, SUM,SUMP: FNC 43 (quantity) of KnX, KnY, KnM, KnS, T, C, D, V, Z 7 steps active bits in the T, C, D, V, Z Sum of active bits)
  • Page 179: Bon (Fnc 44)

    FX Series Programmable Controlers Applied Instructions 5 5.5.5 BON (FNC 44) Operands Mnemonic Function Program steps The status of the K, H, Y, M, S K,H, BON, BONP: FNC 44 specified bit in the KnX, KnY, 7steps source device is KnM, KnS, DBONP, Check...
  • Page 180: Mean (Fnc 45)

    FX Series Programmable Controlers Applied Instructions 5 5.5.6 MEAN (FNC 45) Operands Mnemonic Function Program steps MEAN Calculates the KnX, KnY, KnY, KnM, K,H, MEAN, FNC 45 mean of a range KnM, KnS, KnS, MEANP: (Mean) of devices T, C, D T, C, D, V, Z 7 steps Note:...
  • Page 181: Ans (Fnc 46)

    FX Series Programmable Controlers Applied Instructions 5 5.5.7 ANS (FNC 46) Operands Mnemonic Function Program steps This instruction ANS: FNC 46 starts a timer. Note: Note: 7 steps (Timed Once timed out available annunciator Note: annunciator the selected range range S900 to n range 1 to set) annunciator flag is...
  • Page 182: Anr (Fnc 47)

    FX Series Programmable Controlers Applied Instructions 5 5.5.8 ANR (FNC 47) Operands Program steps Mnemonic Function The lowest active ANR,ANRP: annunciator is 1step FNC 47 reset on every Annunciator operation of this reset) instruction 16 BIT OPERATION 32 BIT OPERATION PULSE-P Operation: Annunciators which have been activated are...
  • Page 183: Sqr (Fnc 48)

    FX Series Programmable Controlers Applied Instructions 5 5.5.9 SQR (FNC 48) Operands Mnemonic Function Program steps Performs a K,H,D SQR, SQRP: FNC 48 mathematical 5 steps When using M8023 in float mode, only (Square square root e.g.: DSQR, double word (32bit) data can be processed. root) DSQRP: See page 4- 46 for more details regarding float-...
  • Page 184: Flt (Fnc 49)

    FX Series Programmable Controlers Applied Instructions 5 5.5.10 FLT (FNC 49) Operands Mnemonic Function Program steps Used to convert FLT, FLTP: FNC 49 data to and from 5 steps M8023 = OFF data is converted from decimal floating point DFLT, Floating to floating point format point)
  • Page 185 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-65...
  • Page 186 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 187: High Speed Processing - Functions 50 To 59

    FX Series Programmable Controlers Applied Instructions 5 High Speed Processing - Functions 50 to 59 Contents: Page REF - Refresh FNC 50 5-53 REFF - Refresh and filter adjust FNC 51 5-53 MTR - Input matrix FNC 52 5-54 HSCS - High speed counter set FNC 53 5-55...
  • Page 188: Ref (Fnc 50)

    FX Series Programmable Controlers Applied Instructions 5 5.6.1 REF (FNC 50) Operands Mnemonic Function Program steps Forces an X, Y K, H REF, REFP: FNC 50 immediate update 5 steps of inputs or Refresh) Note: Note: outputs as D should always be a n should always be a specified multiple of 10, i.e.
  • Page 189: Reff (Fnc 51)

    FX Series Programmable Controlers Applied Instructions 5 5.6.2 REFF (FNC 51) Operands Mnemonic Function Program steps REFF Inputs are K, H, REFF, FNC 51 refreshed, and REFFP: (Refresh their input filters 3 steps Note: n= 0 to 60 msec (0 = 50µs) and filter are reset to the X000 to X007 (X000 to X017 for FX...
  • Page 190: Mtr (Fnc 52)

    FX Series Programmable Controlers Applied Instructions 5 5.6.3 MTR (FNC 52) Operands Mnemonic Function Program steps Multiplexes a Y, M, S K, H, MTR: 9 steps FNC 52 bank of inputs (Input into a number of Note: Note: matrix) sets of devices. n=2 to 8 These operands should always be Can only be used...
  • Page 191 FX Series Programmable Controlers Applied Instructions 5 f) Because this instruction uses a series of multiplexed signals it requires a certain amount of ‘hard wiring’ to operate. The example wiring diagram to the right depicts the circuit used if the previous example instruction was programmed.
  • Page 192: Hscs (Fnc 53)

    FX Series Programmable Controlers Applied Instructions 5 5.6.4 HSCS (FNC 53) Operands Mnemonic Function Program steps HSCS Sets the selected K, H, Y, M, S DHSCS: FNC 53 output when the KnX, KnY, Note: 13 steps speed specified high KnM, KnS, C = 235 to 254, Interrupt point- High...
  • Page 193 FX Series Programmable Controlers Applied Instructions 5 Points to note: a) It is recommended that the drive input used for the high speed counter functions; HSCS, HSCR, HSCZ is the special auxiliary RUN contact M8000. b) If more than one high speed counter function is used for a single counter the selected flag devices (D) should be kept within 1 group of 8 devices, i.e.
  • Page 194: Hscr (Fnc 54)

    FX Series Programmable Controlers Applied Instructions 5 5.6.5 HSCR (FNC 54) Operands Mnemonic Function Program steps HSCR Resets the K, H, Y, M, S DHSCR: FNC 54 selected output KnX, KnY, Note: 13 steps (High speed when the KnM, KnS, C = C235 to Note: counter...
  • Page 195: Hsz (Fnc 55)

    FX Series Programmable Controlers Applied Instructions 5 5.6.6 HSZ (FNC 55) Operands Mnemonic Function Program steps Operation 1: K, H, Y, M, S DHSZ: FNC 55 The current value KnX, KnY, Note: Note: 17 steps (High of a high speed KnM, KnS, C = 235 to 3 consecutive...
  • Page 196 FX Series Programmable Controlers Applied Instructions 5 The following points should be read while studying the example on the right of the page. Please note, all normal rules associated with high speed counters still apply. The data table is p rocessed on e ‘record Record Comparison Selected 'Y'...
  • Page 197 FX Series Programmable Controlers Applied Instructions 5 Operation 3 - Combined HSZ and PLSY Operation: (Applicable units: FX and FX Operation 3 allows the HSZ and PLSY instructions to be used together as a control loop. This operation is selected when the destination device (D) is assigned special M coil M8132. This then allows devices (S ) to be used to define a data table using (S ) as the head address...
  • Page 198: Spd (Fnc 56)

    FX Series Programmable Controlers Applied Instructions 5 5.6.7 SPD (FNC 56) Operands Mnemonic Function Program steps Detects the X0 to X5 K, H, T, C, D, Z (V) SPD: FNC 56 number of KnX, KnY, Note: 7 steps (Speed ‘encoder’ pulses KnM, KnS, 3 consecutive devices detection)
  • Page 199: Plsy (Fnc 57)

    FX Series Programmable Controlers Applied Instructions 5 5.6.8 PLSY (FNC 57) Operands Mnemonic Function Program steps PLSY Outputs a K, H, PLSY: FNC 57 specified number KnX, KnY, 7 steps Note: (Pulse Y of pulses at a set KnM, KnS, DPLSY: output) frequency...
  • Page 200: Pwm (Fnc 58)

    FX Series Programmable Controlers Applied Instructions 5 5.6.9 PWM (FNC 58) Operands Mnemonic Function Program steps Generates a K, H, PWM: FNC 58 pulse train with KnX, KnY, KnM, 7 steps width defined pulse KnS, Pulse Note: modulation) characteristics T, C, D, V, Z All units: Y000 or Y001 Note: only...
  • Page 201: Plsr (Fnc 59)

    FX Series Programmable Controlers Applied Instructions 5 5.6.10 PLSR (FNC 59) Operation 16 BIT OPERATION 32 BIT OPERATION PULSE-P Flags Complete M8029 Operands Mnemonic Function Program steps PLSR Outputs a K, H, PLSR: FNC 59 specified number KnX, KnY, KnM, KnS, 9 steps ramp) of pulses,...
  • Page 202 FX Series Programmable Controlers Applied Instructions 5 c) The acceleration time must conform to the limitations described below. d) The output device is limited to Y000 or Y001 only and should be transistor type. e) Two FNC 59 (PLSR) can be used at the same time in a program to output pulses to Y000 and Y001 respectively.
  • Page 203 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 204: Handy Instructions - Functions 60 To 69

    FX Series Programmable Controlers Applied Instructions 5 Handy Instructions - Functions 60 to 69 Contents: Page IST - Initial State FNC 60 5-67 SER - Search FNC 61 5-69 ABSD - Absolute Drum FNC 62 5-70 INCD - Incremental Drum FNC 63 5-71 TTMR -...
  • Page 205: Ist (Fnc 60)

    FX Series Programmable Controlers Applied Instructions 5 5.7.1 IST (FNC 60) Operands Mnemonic Function Program steps Automatically sets X, Y, M, S, IST: FNC 60 up a multi-mode Note: Note: 7 steps state) STL operating uses 8 users S20 to S63 Initial system consecutive devices...
  • Page 206 FX Series Programmable Controlers Applied Instructions 5 e) The available operating modes are split into two main groups, manual and automatic. There are sub-modes to these groups. Their operation is defined as: Manual Manual (selected by device S+0)- Power supply to individual loads is turned ON and OFF by using a separately provided means, often additional push buttons.
  • Page 207: Ser (Fnc 61)

    FX Series Programmable Controlers Applied Instructions 5 5.7.2 SER (FNC 61) Operands Mnemonic Function Program steps Generates a list KnX, KnY, KnX, KnY, KnY, KnM, K,H, D SER, SERP: FNC 61 of statistics KnM, KnS, KnM, KnS, 9 steps (Search a about a single T, C, D T, C, D...
  • Page 208: Absd (Fnc 62)

    FX Series Programmable Controlers Applied Instructions 5 5.7.3 ABSD (FNC 62) Operands Mnemonic Function Program steps ABSD Generates KnX, KnY, Y,M,S ABSD: FNC 62 multiple output KnM, KnS, 9 steps (Absolute patterns in (in groups Note: drum response to of 8) DABSD: Note: sequencer)
  • Page 209: Incd (Fnc 63)

    FX Series Programmable Controlers Applied Instructions 5 5.7.4 INCD (FNC 63) Operands Mnemonic Function Program steps INCD Generates a KnX, KnY, Y, M, S INCD: FNC 63 single output KnM, KnS, Uses 2 9 steps (Incremental sequence in (in groups of consecu- Note: drum...
  • Page 210: Ttmr (Fnc 64)

    FX Series Programmable Controlers Applied Instructions 5 5.7.5 TTMR (FNC 64) Operands Mnemonic Function Program steps TTMR Monitors the K, H TTMR: 5 steps FNC 64 duration of a (Teaching signal and places Note: Note: timer) the timed data 2 devices 16 bit words ) ×...
  • Page 211: Stmr (Fnc 65)

    FX Series Programmable Controlers Applied Instructions 5 5.7.6 STMR (FNC 65) Operands Mnemonic Function Program steps STMR Provides K, H Y, M, S STMR: FNC 65 dedicated Note: Note:uses 4 7 steps (Special off-delay, one Timers 0 to 199 consecutive Note: timer) shot and flash...
  • Page 212: Alt (Fnc 66)

    FX Series Programmable Controlers Applied Instructions 5 5.7.7 ALT (FNC 66) Operands Mnemonic Function Program steps Y, M, S ALT, ALTP: The status of the FNC 66 3 steps assigned device (Alternate is inverted on state) every operation of the instruction 16 BIT OPERATION 32 BIT OPERATION PULSE-P...
  • Page 213: Ramp (Fnc 67)

    FX Series Programmable Controlers Applied Instructions 5 5.7.8 RAMP (FNC 67) Operands Mnemonic Function Program steps K, H RAMP: Ramps a device RAMP 9 steps from one value to Note: FNC 67 another in the Device D uses two consecutive Note: (Ramp vari- specified number...
  • Page 214 FX Series Programmable Controlers Applied Instructions 5 means once the current value of D equals that of S2, the RAMP instruction will ‘freeze’ in this state. This means the M8029 will be set ON for as long as the instruction remains energized and the value of D will not reset until the instruction is re-initialized, i.e.
  • Page 215: Rotc (Fnc 68)

    FX Series Programmable Controlers Applied Instructions 5 5.7.9 ROTC (FNC 68) Operands Mnemonic Function Program steps ROTC Controls a rotary K, H K, H Y, M, S ROTC: FNC 68 tables movement Note: 9 steps (Rotary is response to a uses 3 Note: Note:...
  • Page 216 FX Series Programmable Controlers Applied Instructions 5 d) When the ‘zero point’ input (D+2) is received the contents of device S+0 is reset to ‘0’ (zero). Before starting any new operation it is advisable to ensure the rotary table is initialized by moving the ‘zero point’...
  • Page 217: Sort (Fnc 69)

    FX Series Programmable Controlers Applied Instructions 5 5.7.10 SORT (FNC 69) Operands Mnemonic Function Program steps SORT Data in a defined K, H K, H SORT: FNC 69 table can be 11 steps (SORT sorted on selected Note: Tabulated fields while m1= 1 to 32 Note: Data)
  • Page 218 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-98...
  • Page 219 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 220: External Fx I/O Devices - Functions 70 To 79

    FX Series Programmable Controlers Applied Instructions 5 External FX I/O Devices - Functions 70 to 79 Contents: Page TKY - Ten Key Input FNC 70 5-81 HKY - Hexadecimal Input FNC 71 5-82 DSW - Digital Switch (Thumbwheel input) FNC 72 5-83 SEGD - Seven Segment Decoder...
  • Page 221: Tky (Fnc 70)

    FX Series Programmable Controlers Applied Instructions 5 5.8.1 TKY (FNC 70) Operands Mnemonic Function Program steps Reads 10 devices X, Y, M, S KnY, KnM, Y, M, S TKY: FNC 70 with associated Note: uses 10 KnS, Note: uses 11 7 steps decimal values consecutive...
  • Page 222: Hky (Fnc 71)

    FX Series Programmable Controlers Applied Instructions 5 5.8.2 HKY (FNC 71) Operands Mnemonic Function Program steps Multiplexes inputs T, C, D, V, Z Y, M, S HKY: FNC 71 and outputs to Note: Note: Note: uses 2 Note: 9 steps (Hexadeci- create a numeric uses 4...
  • Page 223 FX Series Programmable Controlers Applied Instructions 5 e) The HKY instruction may only be used ONCE. f) Normal operation requires 8 scans to read the key inputs. To achieve a steady and repeatable performance, constant scan mode should be used, i.e.
  • Page 224: Dsw (Fnc 72)

    FX Series Programmable Controlers Applied Instructions 5 5.8.3 DSW (FNC 72) Operands Mnemonic Function Program steps Multiplexed T, C, D, V, Z K, H DSW: FNC 72 reading of n sets Note: Note: Note: If 9 steps (Digital of digital (BCD) If n=2 then uses 4 n=2 then 2...
  • Page 225 FX Series Programmable Controlers Applied Instructions 5 b) When n= 2, two sets of switches are read. This configuration requires 8 consecutive inputs taken from the head address specified in operand S. The data from the first set of switches, i.e.
  • Page 226: Segd (Fnc 73)

    FX Series Programmable Controlers Applied Instructions 5 5.8.4 SEGD (FNC 73) Operands Mnemonic Function Program steps SEGD Hex data is K, H KnY, KnM, KnS, SEGD, FNC 73 decoded into a KnX, KnY, KnM, KnS, T, C, D, V, Z SEGDP: (Seven format used to...
  • Page 227: Segl (Fnc 74)

    FX Series Programmable Controlers Applied Instructions 5 5.8.5 SEGL (FNC 74) Operands Mnemonic Function Program steps SEGL Writes data to K, H SEGL: K, H, FNC 74 multiplexed single KnX, KnY, Note: 7 steps Note: digit displays - 4 KnM, KnS n = 0 to 3, 8 Seven n= 0 to 3, 1 set...
  • Page 228 FX Series Programmable Controlers Applied Instructions 5 d) If the SEGL instruction is suspended during mid-operation, when it is restarted it will start from the beginning of its cycle and not from its last status achieved. e) The SEGL instruction may be used TWICE on FX &...
  • Page 229: Arws (Fnc 75)

    FX Series Programmable Controlers Applied Instructions 5 5.8.6 ARWS (FNC 75) Operands Mnemonic Function Program steps ARWS Creates a user X, Y, M, S T, C, D, V, Z K, H ARWS: FNC 75 defined, (4 key) Note: Note: data Note: 9 steps (Arrow...
  • Page 230: Asc (Fnc 76)

    FX Series Programmable Controlers Applied Instructions 5 5.8.7 ASC (FNC 76) Operands Mnemonic Function Program steps An entered Alphanumeric data e.g. T, C, D FNC 76 alphanumeric 0-9, A - Z and a - z etc. Note: : 7 steps code string can be Note: Only one, 8...
  • Page 231: Pr (Fnc 77)

    FX Series Programmable Controlers Applied Instructions 5 5.8.8 PR (FNC 77) Operands Mnemonic Function Program steps Outputs ASCII T, C, D FNC 77 data to items Note: 8 byte mode (M8027=OFF) Note: uses 5 steps uses 4 consecutive devices (Print) such as display 16 byte mode (M8027= ON) uses 8 units...
  • Page 232: From (Fnc 78)

    FX Series Programmable Controlers Applied Instructions 5 5.8.9 FROM (FNC 78) Operands Mnemonic Function Program steps FROM Read data from KnY, KnM, FROM, K, H K, H K, H FNC 78 the buffer KnS, T, C, FROMP: Note: Note: Note: (FROM) memories of D, V, Z...
  • Page 233 FX Series Programmable Controlers Applied Instructions 5 e) Users of all PLC models have the option of allowing interrupts to occur immediately, i.e. during the operation of the FROM/TO instructions or to wait until the completion of the current FROM/ TO instruction.
  • Page 234: To (Fnc 79)

    FX Series Programmable Controlers Applied Instructions 5 5.8.10 TO (FNC 79) Operands Mnemonic Function Program steps Writes data to the K,H, KnX, TO, TOP: K, H K, H K, H FNC 79 buffer memories KnY, KnM, 9 steps Note: Note: Note: (TO) of attached...
  • Page 235 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-115...
  • Page 236 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 237: External Fx Serial Devices - Functions 80 To 89

    FX Series Programmable Controlers Applied Instructions 5 External FX Serial Devices - Functions 80 to 89 Contents: Page RS - RS Communications FNC 80 5-95 PRUN - -40AP Parallel Run FNC 81 5-96 ASCI - Hexadecimal to ASCII FNC 82 5-98 HEX - ASCII to Hexadecimal...
  • Page 238: Rs (Fnc 80)

    FX Series Programmable Controlers Applied Instructions 5 5.9.1 RS (FNC 80) Operands Mnemonic Function Program steps Used to control K, H, K, H, RS: 9 steps FNC 80 serial (including (Serial Com- communications file munications from/to the registers) m = 1 to m = 1 to instruction) programmable...
  • Page 239: Run (Fnc 81)

    FX Series Programmable Controlers Applied Instructions 5 5.9.2 RUN (FNC 81) Operands Mnemonic Function Program steps PRUN Used to control KnX, KnM KnY, KnY PRUN, FNC 81 the FX parallel PRUNP: Note: (Parallel run) link adapters: 5 steps n = 1 to 8 FX2-40AW/AP DPRUN, For ease and convenience, the head address...
  • Page 240 FX Series Programmable Controlers Applied Instructions 5 c) The PRUN instruction enables data to be moved into the bit transmission area or out of the (bit) data received area. The PRUN instruction differs from the move statement in that it operates in octal.
  • Page 241: Asci (Fnc 82)

    FX Series Programmable Controlers Applied Instructions 5 5.9.3 ASCI (FNC 82) Operands Mnemonic Function Program steps ASCI Converts a data K, H, KnX, KnY, KnM, K, H ASCI, FNC 82 value from KnY, ASCIP: (Converts hexadecimal to KnM, KnS T, C, D Note: 7 steps HEX to...
  • Page 242: Hex (Fnc 83)

    FX Series Programmable Controlers Applied Instructions 5 5.9.4 HEX (FNC 83) Operands Mnemonic Function Program steps Converts a data K, H, KnX, KnY, KnY, KnM, KnS K, H HEX, FNC 83 value from ASCII KnM, KnS T, C, D, V, Z HEXP: (Converts in to a...
  • Page 243: Ccd (Fnc 84)

    FX Series Programmable Controlers Applied Instructions 5 5.9.5 CCD (FNC 84) Operands Mnemonic Function Program steps Checks the KnX, KnY, KnM, KnY, KnM, KnS K, H CCD, FNC 84 ‘vertical’ parity of T, C, D CCDP: (Check a data stack T, C, D Note: 7 steps...
  • Page 244: Vrrd (Fnc 85)

    FX Series Programmable Controlers Applied Instructions 5 5.9.6 VRRD (FNC 85) Operands Mnemonic Function Program steps VRRD Reads an analog K, H KnY, KnM, KnS VRRD, FNC 85 value from 1 of 8 Note: T, C, D, V, Z VRRDP: (Volume volume inputs on S= 0 to 7...
  • Page 245: Vrsd (Fnc 86)

    FX Series Programmable Controlers Applied Instructions 5 5.9.7 VRSD (FNC 86) Operands Mnemonic Function Program steps VRSC Reads the set K, H KnY, KnM, KnS VRSC, FNC 86 position value, 0 Note: T, C, D, V, Z VRSCP: (Volume to 10, from S= 0 to 7 5 steps scale)
  • Page 246: Pid (Fnc 88)

    FX Series Programmable Controlers Applied Instructions 5 5.9.8 PID (FNC 88) Operands Mnemonic Function Program steps Receives a data PID: FNC 88 input and 9 steps (PID calculates a Note: S and S Note: S Note: D control loop) corrective action use a single uses 25 uses a single...
  • Page 247 FX Series Programmable Controlers Applied Instructions 5 PID Equations Forward > SV ì ü ∆ MV í ý ----- - EV – – î þ – ⋅ ⋅ ------------------------------ - 2PV ------------------------------ - D – ⋅ ⋅ nf 1 – nf 2 –...
  • Page 248 FX Series Programmable Controlers Applied Instructions 5 PID setup parameters; S The PID setup parameters are contained in a 25 register data stack. Some of these devices require data input from the user, some are reserved for the internal operation and some return output data from the PID operation.
  • Page 249 FX Series Programmable Controlers Applied Instructions 5 Configuring the PID loop The PID loop can be configured to offer variations on PID control. These are as follows: Selection via setup registers Control Description method +3 (K + 4 (T + 6 (T User value Set to 0 (zero) Set to 0 (zero)
  • Page 250 FX Series Programmable Controlers Applied Instructions 5 α Effective use of the input filter To prevent the PID instruction from reacting immediately and wildly to any errors on the Current Value, there is a filtering mechanism which allows the PID instruction to observe and account for any significant fluctuations over three samples.
  • Page 251 FX Series Programmable Controlers Applied Instructions 5 Example PID Settings The partial program shown at below demonstrates which parameters must be set for the functioning of the FX2N. The first step sets the user values for S +0 to S +6.
  • Page 252 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-132...
  • Page 253 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 254: Floating Point 1 & 2 - Functions 110 To 129

    FX Series Programmable Controlers Applied Instructions 5 5.10 Floating Point 1 & 2 - Functions 110 to 129 Contents: Floating Point 1 Page ECMP - Float Compare FNC 110 5-111 EZCP - Float Zone Compare FNC 111 5-111 222 - Not Available FNC 112 to 117 EBCD -...
  • Page 255: Ecmp (Fnc 110)

    FX Series Programmable Controlers Applied Instructions 5 5.10.1 ECMP (FNC 110) Operands Mnemonic Function Program steps ECMP Compares two K, H - integer value automati- Y, M, S DECMP, FNC 110 floating point cally converted to floating point DECMPP: (Floating values - results of Note: 13 steps...
  • Page 256: Ezcp (Fnc 111)

    FX Series Programmable Controlers Applied Instructions 5 5.10.2 EZCP (FNC 111) Operands Mnemonic Function Program steps EZCP Compares a float K, H - integer value automatically Y, M, S DEZCP, FNC 111 range with a float converted to floating point DEZCPP: (Floating value - results of...
  • Page 257: Ebcd (Fnc 118)

    FX Series Programmable Controlers Applied Instructions 5 5.10.3 EBCD (FNC 118) Operands Mnemonic Function Program steps EBCD Converts floating D - must be in floating D - 2 consecutive DEBCD, FNC 118 point number point format (32 bits). devices are used DEBCDP: (Float to format to scientific...
  • Page 258: Ebin (Fnc 119)

    FX Series Programmable Controlers Applied Instructions 5 5.10.4 EBIN (FNC 119) Operands Mnemonic Function Program steps EBIN Converts scientific D - 2 consecutive D - a floating point DEBIN, FNC 119 number format to devices are used value DEBINP: (Scientific floating point (32 bits).
  • Page 259: Eadd (Fnc 120)

    FX Series Programmable Controlers Applied Instructions 5 5.10.5 EADD (FNC 120) Operands Mnemonic Function Program steps EADD Adds two floating K, H - integer value automatically D - a floating DEADD, FNC 120 point numbers converted to floating point point value DEADDP: (Floating together...
  • Page 260: Eaub (Fnc 121)

    FX Series Programmable Controlers Applied Instructions 5 5.10.6 EAUB (FNC 121) Operands Mnemonic Function Program steps ESUB Subtracts one K, H - integer value automati- D - a floating DESUB, FNC 121 floating point cally point value DESUBP: (Floating number from converted to floating point (32 bits).
  • Page 261: Emul (Fnc 122)

    FX Series Programmable Controlers Applied Instructions 5 5.10.7 EMUL (FNC 122) Operands Mnemonic Function Program steps EMUL Multiplies two K, H - integer value automati- D - a floating DEMUL, FNC 122 floating point cally point value DEMULP: (Floating numbers together converted to floating point (32 bits).
  • Page 262: Ediv (Fnc 123)

    FX Series Programmable Controlers Applied Instructions 5 5.10.8 EDIV (FNC 123) Operands Mnemonic Function Program steps EDIV Divides one K, H - integer value automati- D - a floating DEDIV, FNC 123 floating point cally point value DEDIVP: (Floating number by converted to floating point (32 bits).
  • Page 263: Esqr (Fnc 127)

    FX Series Programmable Controlers Applied Instructions 5 5.10.9 ESQR (FNC 127) Operands Mnemonic Function Program steps ESQR Calculates the K, H - integer value automati- D - a floating DESQR, FNC 127 square root of cally point value DESQRP: (Floating a floating point converted to floating point (32 bits).
  • Page 264: Int (Fnc 129)

    FX Series Programmable Controlers Applied Instructions 5 5.10.10 INT (FNC 129) Operands Mnemonic Function Program steps Converts a D - must be in floating D - decimal format INT, INTP: FNC 129 number from point number format 5 steps (Float to floating point (always 32 bits).
  • Page 265 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 266: Trigonometry - Fnc 130 To Fnc 139

    FX Series Programmable Controlers Applied Instructions 5 5.11 Trigonometry - FNC 130 to FNC 139 Contents: Floating point 3 Page SIN - Sine FNC 130 5-119 COS - Cosine FNC 131 5-120 TAN - Tangent FNC 132 5-120 Not Available FNC 133 to 139 Symbols list: D - Destination device.
  • Page 267: Sin (Fnc 130)

    FX Series Programmable Controlers Applied Instructions 5 5.11.1 SIN (FNC 130) Operands Mnemonic Function Program steps Calculates the D - must be in floating D - a floating point DSIN, FNC 130 sine of a floating point number format value DSINP: (Sine) point value...
  • Page 268: Cos (Fnc 131)

    FX Series Programmable Controlers Applied Instructions 5 5.11.2 COS (FNC 131) Operands Mnemonic Function Program steps Calculates the D - must be in floating D - a floating point DCOS, FNC 131 cosine of a point number format value DCOSP: (Cosine) floating point (32 bits).
  • Page 269: Tan (Fnc 132)

    FX Series Programmable Controlers Applied Instructions 5 5.11.3 TAN (FNC 132) Operands Mnemonic Function Program steps Calculates the D - must be in floating D - a floating point DTAN, FNC132 tangent of a point number format value DTANP: (Tangent) floating point (32 bits).
  • Page 270 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 271: Data Operations 2 - Fnc 140 To Fnc 149

    FX Series Programmable Controlers Applied Instructions 5 5.12 Data Operations 2 - FNC 140 to FNC 149 Contents: Page 222 - Not Available FNC 140 to 146 SWAP - Float to Scientific FNC 147 5-123 222 - Not Available FNC 148 to 149 Symbols list: D - Destination device.
  • Page 272: Swap (Fnc 147)

    FX Series Programmable Controlers Applied Instructions 5 5.12.1 SWAP (FNC 147) Operands Mnemonic Function Program steps SWAP The high and low KnY, KnM, KnS, T, C, D, V, Z SWAP,SWAPP FNC 147 byte of the : 5 steps (Byte designated DSWAP, Swap) devices are...
  • Page 273 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-153...
  • Page 274 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 275: Positioning Control - Fnc 150 To Fnc 159

    FX Series Programmable Controlers Applied Instructions 5 5.13 Positioning Control - FNC 150 to FNC 159 Contents: Page 222 - Not Available FNC 150 to 154 ABS - Absolute current value read FNC 155 5-127 ZRN - Zero return FNC 156 5-128 PLSV - Pulse V...
  • Page 276: Cautions When Using Positioning Instructions

    FX Series Programmable Controlers Applied Instructions 5 5.13.1 Cautions when using Positioning Instructions The following positioning instructions are application instructions that can be used many times in a program. When designing a program, make sure to follow the cautions outlined below with regard to instruction drive timing.
  • Page 277: Pulse Train Settings

    FX Series Programmable Controlers Applied Instructions 5 5.13.2 Pulse train settings When a positioning operation is executed from the PLC, the pulse output signal has the ‘Pulse train + Sign’ format during control, as shown in the figure below. Pulse output from Y000 Arbitrary output relay Y¨¨¨...
  • Page 278: Devices Related To Positioning

    FX Series Programmable Controlers Applied Instructions 5 5.13.3 Devices related to positioning Initial Data Device No. Description size value Operates as current value registers of positioning instruction output to Y000 D8140 Lower For FNC 157 (PLSV), FNC 158 (DRVI), FNC 159 (DRVA) instructions, current value increases or decreases in accordance 32 bit with direction of rotation.
  • Page 279: Servo Wiring Example

    FX Series Programmable Controlers Applied Instructions 5 5.13.4 Servo Wiring Example Example of connection to a Mitsubishi MR-J2-*A servo. Note. The PLC required for this connection is a SINK Transistor output type. 85V AC to 264V AC Regenerative Construct a sequence in...
  • Page 280: Example Program

    FX Series Programmable Controlers Applied Instructions 5 5.13.5 Example Program The following example program for forward/reverse operation uses the I/O assignment shown in section 5.13.4 Servo Wiring Example. During operation positioning is performed using the absolute position method shown below. 500000 500Hz Output pulse frequency...
  • Page 281 FX Series Programmable Controlers Applied Instructions 5 X001 Resets the zero point return completion flag. Return to Operation zero point being stopped Resets the normal rotation positioning completion flag. Resets the reverse rotation positioning completion flag. Drives the zero point return state (S0).
  • Page 282 FX Series Programmable Controlers Applied Instructions 5 Zero point return instruction FNC156 K50000 K5000 X006 Y000 Operates in the - direction. Return to zero point Zero point Creep Near point operation return speed signal (DOG) speed M8029 Zero point return completion flag Execution completion flag M8147...
  • Page 283 FX Series Programmable Controlers Applied Instructions 5 Moves to the absolute position FNC159 K500000 K100000 Y000 Y004 "500,000" using the absolute DRVA positioning instruction. (Y004 is ON.) Absolute Output pulse Pulse output Rotation position frequency destination direction signal specification output destination No.
  • Page 284: Abs (Fnc 155)

    This instruction reads the absolute position data DABS X000 Y004 D8140 when a Mitsubishi servo motor, MR-H or MR-J2, equipped with absolute positioning function is connected. [S] is the first of three inputs used for communication flags (see drawing below), [D ] is the first of three communication outputs and [D ] is the data destination register.
  • Page 285: Zrn (Fnc 156)

    FX Series Programmable Controlers Applied Instructions 5 5.13.7 ZRN (FNC 156) Operands Mnemonic Function Program steps Return to zero home K,H,KnX,KnY, X,Y, ZRN: FNC 156 point after machine KnM,KnS 9 steps Note: Zero return ON or initial setting. T,C,D,V,Z DZRN: Y000 or 17 steps Y001 only...
  • Page 286 M8147 : Y000 pulse output monitor (BUS/READY) M8148 : Y001 pulse output monitor (BUS/READY) g)When a Mitsubishi MR-H or MR-J2 servo amplifier equipped with absolute position detection function is used, the current position of the servo can be read by FNC 155 (ABS).
  • Page 287: Plsv(Fnc157)

    FX Series Programmable Controlers Applied Instructions 5 5.13.8 PLSV(FNC157) Operands Mnemonic Function Program steps PLSV Variable speed K,H, Y,M,S PLSV FNC 157 pulse output KnX,KnY, 9 steps Note: Pulse V KnM,KnS DPLSV Y000 or T,C,D,V,Z 17 steps Y001 only 16 BIT OPERATION 32 BIT OPERATION PULSE-P Operation:...
  • Page 288: Drvi (Fnc 158)

    FX Series Programmable Controlers Applied Instructions 5 5.13.9 DRVI (FNC 158) Operands Mnemonic Function Program steps DRVI Increment K,H, Y,M,S DRVI FNC 158 positioning KnX,KnY, 9 steps Note: Drive to KnM,KnS DDRVI Y000 or increment T,C,D,V,Z 17 steps Y001 only 16 BIT OPERATION 32 BIT OPERATION PULSE-P...
  • Page 289 FX Series Programmable Controlers Applied Instructions 5 f)Related device numbers. D8145 : Bias speed adopted when either FNC158, DRVI or FNC159, DRVA are executed D8147 (upper digit) & D8146 (lower digit) : Maximum speed when FNC156, FNC158 or FNC159 are executed 100~100,000Hz. D8148 : Acceleration/Deceleration time adopted when FNC156, FNC158 or FNC159 are executed.
  • Page 290: Drva Fnc

    FX Series Programmable Controlers Applied Instructions 5 5.13.10 DRVA(FNC 159) Operands Mnemonic Function Program steps DRVA Absolute K,H, Y,M,S DRVA FNC 159 positioning KnX,KnY, 9 steps Note: Drive to KnM,KnS DDRVA Y000 or absolute T,C,D,V,Z 17 steps Y001 only 16 BIT OPERATION 32 BIT OPERATION PULSE-P Operation:...
  • Page 291 FX Series Programmable Controlers Applied Instructions 5 f)Related device numbers. D8145 : Bias speed adopted when either FNC158, DRVI or FNC159, DRVA are executed D8147 (upper digit) & D8146 (lower digit) : Maximum speed when FNC156, FNC158 or FNC159 are executed 100~100,000Hz. D8148 : Acceleration/Deceleration time adopted when FNC156, FNC158 or FNC159 are executed.
  • Page 292 FX Series Programmable Controlers Applied Instructions 5 Memo 5-172...
  • Page 293 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 294: Real Time Clock Control - Fnc 160 To Fnc 169

    FX Series Programmable Controlers Applied Instructions 5 5.14 Real Time Clock Control - FNC 160 to FNC 169 Contents: Page TCMP - Time Compare FNC 160 5-137 TZCP - Time Zone Compare FNC 161 5-138 TADD - Time Add FNC 162 5-139 TSUB - Time Subtract...
  • Page 295: Tcmp (Fnc 160)

    FX Series Programmable Controlers Applied Instructions 5 5.14.1 TCMP (FNC 160) Operands Mnemonic Function Program steps TCMP Compares two K, H, T, C, D Y, M, S TCMP, FNC 160 times - results of KnX, KnY, KnM, KnS, TCMPP: Note: (Time <, = and >...
  • Page 296: Tzcp (Fnc 161)

    FX Series Programmable Controlers Applied Instructions 5 5.14.2 TZCP (FNC 161) Operands Mnemonic Function Program steps TZCP Compares a time T, C, D Y, M, S TZCP, FNC 161 to a specified time must be less than or equal to S TZCPP: (Time range - results of...
  • Page 297: Tadd (Fnc 162)

    FX Series Programmable Controlers Applied Instructions 5 5.14.3 TADD (FNC 162) Operands Mnemonic Function Program steps TADD Adds two time T, C, D TADD, FNC 162 values together to TADDP: (Time give a new time Note: 3 consecutive devices are used to represent 7 steps Addition) hours, minutes and seconds respectively.
  • Page 298: Tsub (Fnc 163)

    FX Series Programmable Controlers Applied Instructions 5 5.14.4 TSUB (FNC 163) Operands Mnemonic Function Program steps TSUB Subtracts one T, C, D TSUB, FNC 163 time value from TSUBP: (Time another to give a Note: 3 consecutive devices are used. 7 steps Subtrac- new time...
  • Page 299: Trd (Fnc 166)

    FX Series Programmable Controlers Applied Instructions 5 5.14.5 TRD (FNC 166) Operands Mnemonic Function Program steps Reads the current T, C, D TRD, TRDP: FNC 166 value of the real 5 steps (Time time clock to a Note: 7 consecutive devices are used. Read) group of registers 16 BIT OPERATION...
  • Page 300: Twr (Fnc 167)

    FX Series Programmable Controlers Applied Instructions 5 5.14.6 TWR (FNC 167) Operands Mnemonic Function Program steps Sets the real time T, C, D TWR, TWRP: FNC 167 clock to the value 5 steps (Time stored in a group Note: 7 consecutive devices are used. Write) of registers 16 BIT OPERATION...
  • Page 301: Hour (Fnc 169)

    FX Series Programmable Controlers Applied Instructions 5 5.14.7 Hour (FNC 169) Operands Mnemonic Function Program steps Hour Hour meter K,H, Z,Y, FNC 169 KnX, KnY, Note: Data Hour meter KnM, KnS, register should be battery T,C,D,V,Z backed 16 BIT OPERATION 32 BIT OPERATION PULSE-P Operation 1: 16 bit instruction...
  • Page 302 FX Series Programmable Controlers Applied Instructions 5 Memo 5-182...
  • Page 303 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 304: Gray Codes - Fnc 170 To Fnc 179

    FX Series Programmable Controlers Applied Instructions 5 5.15 Gray Codes - FNC 170 to FNC 179 Contents: Page GRY - Decimal to Gray Code FNC 170 5-147 GBIN - Gray Code to Decimal FNC 171 5-147 222 - Not Available FNC 172 to 175 RD3A - Read FX0N-3A...
  • Page 305: Gry (Fnc 170)

    FX Series Programmable Controlers Applied Instructions 5 5.15.1 GRY (FNC 170) Operands Mnemonic Function Program steps Calculates the K, H, KnY, KnM, KnS, GRY,GRYP: FNC 170 gray code value KnX, KnY, KnM, KnS, T, C, D, V, Z 5 steps (Gray of an integer T, C, D, V, Z...
  • Page 306: Gbin (Fnc 171)

    FX Series Programmable Controlers Applied Instructions 5 5.15.2 GBIN (FNC 171) Operands Mnemonic Function Program steps GBIN Calculates the K, H, KnY, KnM, KnS, GBIN,GBINP: FNC 171 integer value of a KnX, KnY, KnM, KnS, T, C, D, V, Z 5 steps (Gray gray code...
  • Page 307: Rd3A (Fnc 176)

    FX Series Programmable Controlers Applied Instructions 5 5.15.3 RD3A (FNC 176) Operands Mnemonic Function Program steps RD3A Analog block read for K,H. KnY, RD3A FNC 176 -3A, FX -2AD KnX, KnY,KnM,KnS, KnM,KnS 7 steps Read analog T,C,D,V,Z T.C,D,V,Z block 16 BIT OPERATION 32 BIT OPERATION PULSE-P Operation:...
  • Page 308: Wr3A (Fnc 177)

    FX Series Programmable Controlers Applied Instructions 5 5.15.4 WR3A (FNC 177) Operands Mnemonic Function Program steps WR3A Write data to analog K,H. KnY, WR3A FNC 177 block FX -3A, FX KnX, KnY,KnM,KnS, KnM,KnS 7 steps Write to Analog 2AD, FX -2DA T,C,D,V,Z T.C,D,V,Z...
  • Page 309 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 310: Additional Functions - Fnc 180 To Fnc 189

    FX Series Programmable Controlers Applied Instructions 5 5.16 Additional Functions - FNC 180 to FNC 189 Contents: Page EXTR - External ROM Function FNC 180 5-190 Symbols list: D - Destination device. S - Source device. m, n- Number of active devices, bits or an operational constant. Additional numeric suffixes will be attached if there are more than one operand with the same function e.g.
  • Page 311: Extr (Fnc 180)

    External ROM cassette functions 10 to 13 are for reading and writing data to/from an inverter using signal instructions. These functions are available when an FX -485-BD or FX 485ADP is attached to the PLC, for communication with a Mitsubishi Electric A500/E500/S500 series inverter. Function...
  • Page 312 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.1 Restrictions Six digit commands that are supported in the E500 and S500 series inverters are not supported by the EXTR function. 5.16.1.1.2 Settings in the PLC EXTR K10 to K13 use the FX -485-BD or FX -485ADP in the same way as the RS instruction (FNC 80).
  • Page 313 FX Series Programmable Controlers Applied Instructions 5 For GX Developer 1) Select “Parameters” 2) Select “PLC Parameter” 3) Select “PLC System (2)” and set as shown below. a) Set these parameters as show on the left. DO NOT select “Link” b) Select either 19200, 9600 or 4800.
  • Page 314 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.3 Inverter settings and PLC communication settings Inverter communication specification and application to PLC Inverter specifications Application to PLC Transmission standard RS-485 RS-485 Number of connected units 1:N (8 units maximum) 1:N (8 units maximum) 19200, 9600 or 4800 bps 19200, 9600 or 4800 bps Communication speed...
  • Page 315 FX Series Programmable Controlers Applied Instructions 5 A500 series settings Parameter Description Set value Contents Setting for comms to PLC number Corresponds to the station No. specified from the PU Align setting with station number Station No. 0~31 connector. in the sequence program If two or more inverters, set the station No.
  • Page 316 FX Series Programmable Controlers Applied Instructions 5 *A500 + A5NR settings Inverter Setting Parameter Name Setting range station Setting for comms to PLC number increment Align setting with station Inverter station 0~31 number in the sequence program Normally select 192. 3,6,12,24,48,9 Comms speed If high speed processing in...
  • Page 317 FX Series Programmable Controlers Applied Instructions 5 E500 series settings Parameter Description Set value Contents Setting for comms to PLC number Corresponds to the station No. specified from the PU Align setting with station number Station No. 0~31 connector. in the sequence program If two or more inverters, set the station No.
  • Page 318 FX Series Programmable Controlers Applied Instructions 5 S500 series settings Parameter Description Set value Contents Setting for comms to PLC number Corresponds to the station No. specified from the PU Align setting with station number Station No. 0~31 connector. in the sequence program If two or more inverters, set the station No.
  • Page 319 FX Series Programmable Controlers Applied Instructions 5 Example of transmission format when data is written from PLC to inverter Wait Inverter Command time Data = 1234 station 6 H30+H36+H38+H30+H30+H31+H32+H33+H34=H1C8 C=H43 8=H38 5.16.1.1.4 EXTR K10 - Monitoring operations (Inverter to PLC) ü...
  • Page 320 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.5 EXTR K11 - Control operations (PLC to Inverter) ü 16 Bit Operation EXTR û 32 Bit Operation û Pulse - P Parameter Device type Parameter range K11: function No. to control inverter operations KH, D Inverter station number (0 to 31) KH, D...
  • Page 321 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.6 Relationship between EXTR K10/K11 and A500/E500/S500 series The page below is taken from section 4.2.41, paragraph 5 “Instructions for the program” <setting items and set data> in the FR A500 series instruction manual, IB(NA)-66790-G The following example reads the Output Frequency from Inverter station #1 and stores this value to D100.
  • Page 322 FX Series Programmable Controlers Applied Instructions 5 The following example writes the Run Command parameters to Inverter Station #1. EXTR K2M64 For 2 seconds after the r e s e t i n s t r u c t i o n i s transmitted, the inverter d o e s n o t...
  • Page 323 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.7 EXTR K12 - Parameter read (Inverter to PLC) ü 16 Bit Operation û EXTR D100 32 Bit Operation û Pulse - P Parameter Device type Parameter range K12: function No. to read inverter parameters KH, D Inverter station number (0 to 31) KH, D...
  • Page 324 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.9 Relationship between EXTR K12/K13 and A500/E500/S500 series The following page is from the Data COD list of the FR A500 series instruction manual, IB(NA)- 66790-G. The following example displays how to read EXTR K(Station No.) K(Parameter No.) D****...
  • Page 325 FX Series Programmable Controlers Applied Instructions 5 No. Reading and Writing to parameters which require a second parameter Instruction Number of Item Description data digits code Read When setting the programmed operation (data code H3D to H5A, HBD to HDA) parameter Second H000: time...
  • Page 326 FX Series Programmable Controlers Applied Instructions 5 Setting the third parameter of EXTR K12/K13 during programmed operation in the A500 Parameter Operation frequency Rotation direction Name Time read/write read/write read/write Program set 1 1201 2201 Program set 1 1202 2202 Program set 1 1203 2203...
  • Page 327 FX Series Programmable Controlers Applied Instructions 5 Reading and writing the bias/gain in the A500/E500/S500 Analog Parameter Offset/gain Terminal analog Name read/write value read read/write Frequency setting voltage bias 1902 2902 Frequency setting voltage gain 1903 2903 Frequency setting current bias 1904 2904 Frequency setting current gain...
  • Page 328 FX Series Programmable Controlers Applied Instructions 5 • Definition of special D registers and special M coils Offers debugging function. Waiting time for a response from the M8154 D8154 inverter. M8155 ON during communication, and OFF D8155 Step No. of the instruction which is when communication is complete.
  • Page 329 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.10 Consistency with other instructions • STL instruction During communication, if the executed state is set to OFF, the communication port is not open. As a result, communication is disabled. • Branch instructions CJ and CJP During communication, if the EXTR instruction is skipped by a CJ or CJP instruction, the communication port is not open.
  • Page 330 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.11 Communication command error codes The table below shows values set to D8156 after EXTR K10 K13 are executed. D8155 Contents of error Inverter operation H0000 Communication is terminated normally (no error) H0001 The inverter does not give any response H0002 Timeout error interlocking with M8129.
  • Page 331 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.12 Example program 1 This program reads parameters 0 to 99 in the inverter at station No. 6, to D1000 to D1099 in the PLC. X010 EXTR D1000V M8029 > 5.16.1.1.13 Example program 2 This program reads parameters 0 to 99 in the inverters at station Nos.
  • Page 332 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.14 Example program 3 This program writes the speed parameter from PLC to inverter, performs forward rotation by input X1, and reverse rotation by input X2. By re-writing D10 in the peripheral equipment or the display unit, the frequency of the inverter can be changed.
  • Page 333 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.15 Example program 4 In the previous example, monitoring and write to the inverter are always driven. If the program changes the frequency or gives a forward/reverse rotation command, communication with the inverter may be delayed depending on the step executing communication. In the example below, when a request to write is generated, a request to read is interrupted, write is executed, then monitoring is continued again after write is completed.
  • Page 334 FX Series Programmable Controlers Applied Instructions 5 5.16.1.1.16 Example program 5 Example using the STL instruction M8000 D100 D101 D102 EXTR D100 D101 D102 M8156 S900 M8029 a) Specifies station No. 2 b) Instruction code for operation command c) Forward rotation command d) Transmits/receives a command to/from the inverter.
  • Page 335 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-215...
  • Page 336 FX Series Programmable Controlers Applied Instructions 5 Applied Instructions: Program Flow FNC 00 - 09 Move And Compare 5-16 FNC 10 - 19 Arithmetic And Logical Operations (+, -, ×, ÷) FNC 20 - 29 5-24 Rotation And Shift 5-34 FNC 30 - 39 Data Operation 5-42...
  • Page 337: Inline Comparisons - Fnc 220 To Fnc 249

    FX Series Programmable Controlers Applied Instructions 5 5.17 Inline Comparisons - FNC 220 to FNC 249 Contents: Page LoaD compare FNC 224 to 230 5-151 AND compare FNC 232 to 238 5-152 OR compare FNC 240 to 246 5-153 Symbols list: D - Destination device.
  • Page 338: Ld Compare (Fnc 224 To 230)

    FX Series Programmable Controlers Applied Instructions 5 5.17.1 LD compare (FNC 224 to 230) Operands Mnemonic Function Program steps Initial comparison K,H, KnX, KnY, KnM, K,H, KnX, KnY, KnM, LDr: (LoaD contact. KnS, T, C, D, V, Z KnS, T, C, D, V, Z 5 steps compare) Active when the...
  • Page 339: And Compare (Fnc 232 To 238)

    FX Series Programmable Controlers Applied Instructions 5 5.17.2 AND compare (FNC 232 to 238) Operands Mnemonic Function Program steps ANDr Serial comparison K,H, KnX, KnY, KnM, K,H, KnX, KnY, KnM, ANDr: (AND contact. KnS, T, C, D, V, Z KnS, T, C, D, V, Z 5 steps compare) Active when the...
  • Page 340: Or Compare (Fnc 240 To 246)

    FX Series Programmable Controlers Applied Instructions 5 5.17.3 OR compare (FNC 240 to 246) Operands Mnemonic Function Program steps Parallel K,H, KnX, KnY, KnM, K,H, KnX, KnY, KnM, ORr: comparison KnS, T, C, D, V, Z KnS, T, C, D, V, Z 5 steps compare) contact.
  • Page 341 FX Series Programmable Controlers Applied Instructions 5 MEMO 5-221...
  • Page 342 FX Series Programmable Controlers Applied Instructions 5 5-222...
  • Page 343: Diagnostic Devices

    FX Series Programmable Controllers Diagnostic Devices 6 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 344 FX Series Programmable Controllers Diagnostic Devices 6 Chapter Contents 6. Diagnostic Devices ................6-1 6.1 Device Lists ......................6-2 6.2 PLC Status ..........6-7 (M8000 to M8009 and D8000 to D8009) 6.3 Clock Devices .......... 6-8 (M8010 to M8019 and D8010 to D8019) 6.4 Operation Flags ....................
  • Page 345 FX Series Programmable Controller Diagnostic Devices 6 Diagnostic Devices The following special devices are used by the PLC to highlight the current operational status and identify any faults or errors that may be occurring. There are some variations in the application of these devices to members of the FX PLC family, these are noted where appropriate.
  • Page 346: Device Lists

    FX Series Programmable Controller Diagnostic Devices 6 Device Lists Device Device M8000 D8000 M8001 D8001 M8002 D8002 M8003 D8003 M8004 D8004 M8005 D8005 M8006 D8006 M8007 D8007 M8008 D8008 M8009 D8009 M8010 Reserved D8010 M8011 D8011 M8012 D8012 M8013 D8013 M8014 D8014 M8015...
  • Page 347 FX Series Programmable Controller Diagnostic Devices 6 Device Device M8050 D8050 M8051 D8051 M8052 D8052 M8053 D8053 M8054 D8054 Reserved M8055 D8055 M8056 D8056 M8057 D8057 M8058 D8058 M8059 D8059 M8060 D8060 M8061 D8061 M8062 D8062 M8063 D8063 M8064 D8064 M8065 D8065 M8066...
  • Page 348 FX Series Programmable Controller Diagnostic Devices 6 Device Device M8100 D8100 Reserved M8101 D8101 M8102 D8102 M8103 D8103 M8104 Reserved D8104 M8105 D8105 Reserved M8106 D8106 M8107 D8107 M8108 D8108 M8109 D8109 M8110 D8110 M8111 D8111 M8112 D8112 M8113 D8113 M8114 D8114 Reserved...
  • Page 349 FX Series Programmable Controller Diagnostic Devices 6 Device Device M8150 D8150 M8151 D8151 M8152 D8152 M8153 D8153 Reserved M8154 D8154 Reserved M8155 D8155 M8156 D8156 M8157 D8157 M8158 D8158 M8159 D8159 M8160 D8160 M8161 D8161 Reserved M8162 D8162 M8163 Reserved D8163 M8164 D8164...
  • Page 350 FX Series Programmable Controller Diagnostic Devices 6 Device Device M8200 D8200 Reserved M8201 D8201 D201 M8202 D8202 D202 M8203 D8203 D203 M8204 D8204 D204 M8205 D8205 D205 M8206 D8206 D206 M8207 D8207 D207 M8208 D8208 D208 M8209 D8209 D209 M8210 D8210 D210 M8211...
  • Page 351: Plc Status (M8000 To M8009 And D8000 To D8009)

    FX Series Programmable Controller Diagnostic Devices 6 PLC Status (M8000 to M8009 and D8000 to D8009) Diagnostic Diagnostic Operation Operation Device Device M8000 ( D8000 (-) , FX , FX , FX Watchdog 200ms RUN monitor timer See note 1 NO contact : 22 M8001 (...
  • Page 352: Clock Devices (M8010 To M8019 And D8010 To D8019)

    FX Series Programmable Controller Diagnostic Devices 6 Clock Devices (M8010 to M8019 and D8010 to D8019) Diagnostic Diagnostic Operation Operation Device Device Current operation cycle / scan D8010 (7) time in units of 0.1 msec M8010 Reserved Present scan (waiting time for constant scan time mode is included) Minimum cycle/ scan time in...
  • Page 353: Operation Flags (M8020 To M8029 And D8020 To D8029)

    FX Series Programmable Controller Diagnostic Devices 6 Operation Flags (M8020 to M8029 and D8020 to D8029) Diagnostic Diagnostic Operation Operation Device Device Set when the result of an Input filter setting for devices; M8020 ( ADD (FNC 20) or SUB (FNC X000 to X017 (FX Zero 21) is “0”...
  • Page 354: Plc Operation Mode (M8030 To M8039 And D8030 To D8039)

    FX Series Programmable Controller Diagnostic Devices 6 PLC Operation Mode (M8030 to M8039 and D8030 to D8039) Diagnostic Diagnostic Operation Operation Device Device M8030 (-) Battery voltage is low but Value read from first setting Battery LED D8030 ( BATT.V LED not lit “pot”...
  • Page 355: Step Ladder (Stl) Flags (M8040 To M8049 And D8040 To D8049)

    FX Series Programmable Controller Diagnostic Devices 6 Step Ladder (STL) Flags (M8040 to M8049 and D8040 to D8049) Diagnostic Diagnostic Operation Operation Device Device M8040 (-) D8040 ( When ON STL state transfer STL transfer Lowest active is disabled disable STL step When ON STL transfer from D8041 (...
  • Page 356: Interrupt Control Flags (M8050 To M8059 And D8050 To D8059)

    FX Series Programmable Controller Diagnostic Devices 6 Interrupt Control Flags (M8050 to M8059 and D8050 to D8059) Diagnostic Diagnostic Operation Operation Device Device M8050 (-) I00o disable M8051 (-) D8050 -D8059 Reserved I10o disable M8052 (-) When the EI (FNC 04) I20o disable instruction is driven in the M8053 (-)
  • Page 357: Error Detection Devices (M8060 To M8069 And D8060 To D6069)

    FX Series Programmable Controller Diagnostic Devices 6 Error Detection Devices (M8060 to M8069 and D8060 to D6069) Operation Diagnostic Diagnostic Detection Operation PROG.E Device Device STATUS Other M8060 ( The first I/O number of D8060 ( ü ü the unit or block causing configuration (Not FX , FX...
  • Page 358 FX Series Programmable Controller Diagnostic Devices 6 Note 6: •If the unit or block corresponding to a programmed I / O number is not actually loaded, M8060 is set to ON and the first device number of the erroneous block is written to D8060.
  • Page 359: Link And Special Operation Devices (M8070 To M8099 And D8070 To D8099)

    FX Series Programmable Controller Diagnostic Devices 6 Link and Special Operation Devices (M8070 to M8099 and D8070 to D8099) Diagnostic Diagnostic Operation Operation Device Device Driven when the PLC is a Parallel link watchdog time - M8070 (-R) master station in a parallel D8070 ( 500 msec link application...
  • Page 360: Miscellaneous Devices (M8100 To M8119 And D8100 To D8119)

    FX Series Programmable Controller Diagnostic Devices 6 6.10 Miscellaneous Devices (M8100 to M8119 and D8100 to D8119) Diagnostic Diagnostic Operation Operation Device Device 0002: 2K steps only) D8102 ( 0004: 4K steps , FX Memory 0008: 8K steps , FX , FX Capacity 0016: 16K steps...
  • Page 361: High Speed Zone Compare Table Comparison Flags (M8130 To M8148 And D8130 To D8148)

    FX Series Programmable Controller Diagnostic Devices 6 6.12 High Speed Zone Compare Table Comparison Flags (M8130 to M8148 and D8130 to D8148) Diagnostic Diagnostic Operation Operation Device Device Contains the number of the Selects comparison tables M8130 current record being D8130 ( )(-) to be used with the HSZ...
  • Page 362 FX Series Programmable Controller Diagnostic Devices 6 Diagnostic Diagnostic Operation Operation Device Device Contains the total number of pulses that have been output D8140 When ON, clears pulse to Y0 using the PLSY or PLSR M8140 ( )(-) D8141 output in FNC156(ZRN) instructions.
  • Page 363: Miscellaneous Devices (M8160 To M8199)

    FX Series Programmable Controller Diagnostic Devices 6 6.13 Miscellaneous Devices (M8160 to M8199) Diagnostic Diagnostic Operation Operation Device Device Selection of XCH operation M8160 (-) to swap bytes in a single (Not FX , FX data word Selection of 8 bit operations M8161 (-) for applied instructions ASC, RS, ASCI, HEX, CCD...
  • Page 364: Miscellaneous Devices (D8158 To D8164) And Index Registers (D8182 To D8199)

    FX Series Programmable Controller Diagnostic Devices 6 6.14 Miscellaneous devices (D8158 to D8164) and Index Registers (D8182 to D8199) Diagnostic Diagnostic Operation Operation Device Device Control device for D8158 (-) -5DM D8187 ( Value of V3 index register (Not FX , FX Default: k-1 Control device for...
  • Page 365: N:n Network Related Flags And Data Registers

    FX Series Programmable Controller Diagnostic Devices 6 6.15 N:N Network Related Flags and Data Registers Note: Functionality available for FX CPU Version 2.00 and above Diagnostic Diagnostic Operation Operation Device Device ON when communication error M8183 ( D8173 ( Station number in master station (For FX use M504)
  • Page 366: Up/Down Counter Control (M8200 To M8234 And D8219 To D8234)

    FX Series Programmable Controller Diagnostic Devices 6 6.16 Up/Down Counter Control (M8200 to M8234 and D8219 to D8234) Diagnostic Diagnostic Operation Operation Device Device When M8PPP is operated, counter CPPP functions as M8200 - a down counter. When D8219 -D8234 Reserved M8234 (-) M8PPP is not operated the associated counter operates...
  • Page 367: Error Code Tables

    FX Series Programmable Controller Diagnostic Devices 6 6.18 Error Code Tables Error Detection Stored Error Associated Meaning Action Device Number 0000 No error Check the cable 6101 RAM error connection between the 6102 Operation circuit error extension unit/block and D8061 6103 I/O bus error (M8069 = ON) the PLC...
  • Page 368 FX Series Programmable Controller Diagnostic Devices 6 Error Detection Stored Error Associated Meaning Action Device Number 0000 No error 6401 Program sum check error 6402 Memory capacity setting error STOP the PLC, check D8064 6403 Latched device area setting error parameter, if incorrect Parameter change to a suitable...
  • Page 369 FX Series Programmable Controller Diagnostic Devices 6 Error Detection Stored Error Associated Meaning Action Device Number 0000 No error LD and LDI is used continuously 9 or 6601 more times in succession 1)No LD/ LDI instruction. The use of LD/LDI or ANB/ORB instruction is incorrect.
  • Page 370 FX Series Programmable Controller Diagnostic Devices 6 Error Detection Stored Error Associated Meaning Action Device Number LD, LDI is used continuously 9 or more 6610 times in succession Number of LD/LDI instructions is more 6611 than ANB/ORB instructions Number of LD/LDI instructions is less 6612 than ANB/ORB instructions MPS is used continuously more than 12...
  • Page 371 FX Series Programmable Controller Diagnostic Devices 6 Error Detection Stored Error Associated Meaning Action Device Number 0000 No error 1)No jump destination (pointer) for CJ or CALL instructions These error occur during 2)(P)ointer is designated in a block that the execution of an 6701 comes after the END instruction operation.
  • Page 372 FX Series Programmable Controller Diagnostic Devices 6 6-28...
  • Page 373: Applied Instructions

    FX Series Programmable Controllers Instruction Execution Times 7 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 374: Instructions Which Are Not Suitable For Use With 110V Ac Input

    FX Series Programmable Controllers Instruction Execution Times 7 Chapter Contents 7. Execution Times And Instructional Hierarchy........7-1 7.1 Basic Instructions ....................7-1 7.2 Applied Instructions .................... 7-3 7.3 Hierarchical Relationships Of Basic Program Instructions ........ 7-11 7.4 Batch Processing....................7-13 7.5 Summary of Device Memory Allocations ............7-13 7.6 Limits Of Instruction Usage ................
  • Page 375 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Times And Instructional Hierarchy Basic Instructions Execution Time in µsec Object Mnemonic Steps Devices X,Y,M,S,T,C 0.08 0.08 and special M 0.65 43.2 43.2 ANDP X,Y,M,S,T,C 11.7 11.7 ANDF 37.4 37.4 0.55 Not applicable...
  • Page 376 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec Object Mnemonic Steps Devices Y, M 0.08 24.4 24.3 24.4 24.3 Special M 0.16 11.2 10.2 11.2 10.2 42.3 37.4 42.3 37.4 12.2 11.2 12.2 11.2 42.2 37.2 42.2...
  • Page 377: Applied Instructions

    FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Applied Instructions Execution Time in µsec 16/32 Mnemonic 4 29.0 29.0 4 32.2 32.2 CALL 21.2 21.2 SRET 18.1 18.1 IRET 55.8 55.8 18.5 18.5 FEND 4 26.3 26.3 27.6 27.6 NEXT 87.6...
  • Page 378 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec 16/32 Mnemonic 37.5 37.5 27.6 27.6 40.2 40.2 28.9 28.9 37.5 37.5 27.6 27.6 40.5 40.5 28.9 28.9 38.2 38.2 25.2 25.2 50.3 50.3 31.4 31.4 39.2 39.2 32.0...
  • Page 379 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec 16/32 Mnemonic 126+ 126+ WSFR 11.7n 11.7n Not Available 125+ 125+ WSFL 11.7n 11.7n 4 41.6 4 83.9 4 83.9 SFWR 41.6 4 52.3 4 80.2 4 80.2 SFRD 52.3...
  • Page 380 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec 16/32 Mnemonic 65.3+ 4 65.3+ REFF Not Available 1.7n 1.7n 22.6 22.6 39.1 23.6 39.1 23.6 HSCS 46.8 46.8 87.8 87.8 HSCR 46.8 46.8 88.6 88.6 Not Available 100.6 100.6...
  • Page 381 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec 16/32 Mnemonic 97.2 22.2 97.2 22.2 98.7 22.2 98.7 22.2 Not Available 92.2 27.4 92.2 27.4 65.0 65.0 95.0 92.6 95.0 92.6 92.2 27.4 92.2 27.4 4 65.0 Not Available 65.0...
  • Page 382 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec 16/32 Mnemonic 65.5 65.5 155.0 89.0 155.0 89.0 USER 4 104.4 104.4 ECMP Not Available 4 124.5 124.5 EZCP 4 106.9 106.9 EBCD 4 81.3 81.3 EBIN 4 117.4 117.4...
  • Page 383 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Execution Time in µsec 16/32 Mnemonic 36.1 36.1 Not Available SWAP 41.2 41.2 86.7 85.7 86.7 85.7 86.7 85.7 86.7 85.7 107.8 27.8 107.8 130.5 40.8 130.5 79.6 22.7 79.6 PLSV 97.8 33.5...
  • Page 384 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 • These instructions require NO preliminary contact devices such as LD, AND, OR etc. • Where “n” is referred to this identifies the quantity of registers to be manipulated. “n” can be equal or less than 512. •...
  • Page 385: Hierarchical Relationshipsof Basic Program Instructions

    FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Hierarchical Relationships Of Basic Program Instructions T h e f o ll o w in g ta b l e id e n t if i e s a n ' in c lu si v e relationship'.
  • Page 386 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 The following table identifies an 'overlapping relationship'. This means the secondary program construction starts within the complete operating boundaries of the primary program construction but finishes outside of the primary construction, e.g.: Secondary program construction Primary Program...
  • Page 387: Batch Processing

    FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Batch Processing This is the system used by all members of the FX family of PLC’s. The basic concept is that there are three stages to any program scan. In other words, every time the program is processed form start to end the following sequence of events occurs: Input processing: All of the current input statuses are read in to a...
  • Page 388 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 b) Data Memory This memory area contains, as the title suggests, all of the data values associated with: data registers (normal and special), Index registers, current timer values, retentive timer values (if available) and current counter values.
  • Page 389: Limits Of Instruction Usage

    FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 Limits Of Instruction Usage 7.6.1 Instructions Which Can Only Be Used Once In The Main Program Area The following instructions can only be used once in the main program area. For PLC applicability please check either the detailed explanations of the instructions or the instruction execution tables list earlier.
  • Page 390 FX Series Programmable Controllers Execution Times And Instructional Hierarchy 7 MEMO 7-16...
  • Page 391 FX Series Programmable Controllers PLC Device Tables 8 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 392 FX Series Programmable Controllers PLC Device Tables 8 Chapter Contents 8. PC Device Tables..................8-1 8.1 Performance Specification Of the FX .............. 8-1 8.2 Performance Specification Of The FX ............. 8-2 8.3 Performance Specification Of The FX and FX PLC’s ........ 8-4...
  • Page 393: Plc Device Tables 8

    FX Series Programmable Controllers PLC Device Tables 8 PLC Device Tables Performance Specification Of The FX Item Specification Remarks Operation control method Cyclic operation by stored program Batch processing method (when END I/O control method I/O refresh instruction is available instruction is executed) Basic instructions: 0.55 to 0.7 µs Operation processing time...
  • Page 394 FX Series Programmable Controllers PLC Device Tables 8 Item Specification Remarks D0 to D127 General 128 points Type:16 bit data storage register pair for 32 bit device D128 to D255 Latched 128 points (subset) Type:16 bit data storage register pair for 32 bit device Data D8013 or D8030 &...
  • Page 395 FX Series Programmable Controllers PLC Device Tables 8 Item Specification Remarks Latched 1000 points S0 to S999 State relays (S coils) Initial 10 points (subset) S0 to S9 Range: 0 to 3,276.7 sec 100 msec T0 to T199 200 points Range: 0 to 327.67 sec 10 msec T200 to T245...
  • Page 396: Performance Specification Of The Fx

    FX Series Programmable Controllers PLC Device Tables 8 Performance Specification Of The FX and the FX PLC’s Item Specification Remarks Operation control method Cyclic operation by stored program Batch processing method (when END I/O control method I/O refresh instruction is available instruction is executed) Basic instructions: 0.08 µs Operation processing time...
  • Page 397 FX Series Programmable Controllers PLC Device Tables 8 Item Specification Remarks C235 to C240 1 phase 6 points Range: -2,147,483,648 to +2,147,483,647 1 phase C241 to C245 counts c/w start 5 points High speed General rule: Select counter combinations stop input counters (C) with a combined counting frequency of C246 to C250...
  • Page 398 FX Series Programmable Controllers PLC Device Tables 8 Memo...
  • Page 399 FX Series Programmable Controllers Assigning System Devices 9 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 400 FX Series Programmable Controllers Assigning System Devices 9 Chapter Contents 9. Assigning System Devices ..............9-1 9.1 Addressing Extension Modules ................9-1 9.2 Real Time Clock Function ................... 9-2 9.2.1 Setting the real time clock ..................9-2...
  • Page 401: Assigning System Devices 9

    FX Series Programmable Controllers Assigning System Devices 9 Assigning System Devices Addressing Extension Modules Most of the FX family of PLC’s have the ability to connect additional discreet I/O and/or special function modules. To benefit from these additional units the user must address each block independently.
  • Page 402: Real Time Clock Function

    FX Series Programmable Controllers Assigning System Devices 9 Real Time Clock Function The time data of a RTC cassette or chip (built in to FX and FX ) is battery backed. This means when the PLC is turned OFF the time data and settings are not lost or corrupted. The duration or storage life of the timedatails dependent upon the condition of the battery.
  • Page 403 FX Series Programmable Controllers Assigning System Devices 9 These devices are used as shown in the program on the right. Note: The FX and FX has special instructions that simplify the setting and use of the RTC. See section 5.14 for more details.
  • Page 404: Analog Expansion Boards

    FX Series Programmable Controllers Assigning System Devices 9 Analog Expansion Boards The FX1N expansion boards can be installed on the FX1S/1N Series PLCs to provide extra analog I/O channels. Please see the respective expansion board User’s Manual for more information on configuration and hardware specifications. The expansion boards are not equipped with a Gain/Offset setting so that these values must be calculated in the PLC ladder program.
  • Page 405 FX Series Programmable Controllers Assigning System Devices 9 Example Application Program #1 Output an analog value in the range of 0 to 10 Volts when the digital value in the user program is 0 ~ 10000. M8001 Ch1 is set for the voltage input (0 to 10V). M8112 M8000 M8113...
  • Page 406 FX Series Programmable Controllers Assigning System Devices 9 Example Application Program #3 The desired analog output is from values A to B where 0 < A < B < 10 and the digital values range from 0 ~ 4000 in D20. Digital value Analog (D8114) for practical...
  • Page 407 FX Series Programmable Controllers Assigning System Devices 9 [(4000 - 0) / (B-A)] = D8114 / (D30 - A) D8114 = [4000 x D30 / (B - A)] - [(4000 x A) / (B - A)] If A = 500 and B = 5500, then D8114 = (4/5) X D30 - 400 M8001 M8114...
  • Page 408 FX Series Programmable Controllers Assigning System Devices 9 Example Application Program #6 In the Current Output Mode, the 1DA converts values from 0 ~ 2000 to the analog output of 4 ~ 20 mA. If using a digital range of 0 ~ 20000 in the program, the range must be converted to 0 ~ 2000 as shown in the programming example below.
  • Page 409 FX Series Programmable Controllers Assigning System Devices 9 Example Application Program #8 In Current Output mode, the user digital range of A ~ B is used to output a current of 4 - 20 mA. The range of A ~ B stored in D70 must be converted to a range of 0 ~ 2000 per the example program below.
  • Page 410 FX Series Programmable Controllers Assigning System Devices 9 [(125 x A - 500) x D - (125 x B -500) x C] / (D - C) If A = 5, B = 15, C = 5000, and D = 15000 = [125 x (15 - 5)] x D80 / (15000 - 5000) + 125 x [(5-4) x 15000 - (15-4) x 5000]/ (15000 - 5000) D8114 = (D80 / 8) - 500 M8000...
  • Page 411: Fx1N-2Ad-Bd

    FX Series Programmable Controllers Assigning System Devices 9 9.3.2 FX1N-2AD-BD This expansion board is used to convert up to two channels of analog input into digital values for use by the FX1S/1N Series PLCs. Voltage input (0 ~ 10 Volts) or Current input (4 to 20 mA) for analog to digital conversion can be set by switching the auxiliary relays assigned to each channel.
  • Page 412 FX Series Programmable Controllers Assigning System Devices 9 Basic Program 3 Ch1 is set to Current input, Ch2 is set to Voltage input, and the average converted digital value over a set time period is stored in D30 and D34, respectively. Example Application Programs Because the 2AD does not have Offset and Gain capabilities, if values are required outside the standard specification range, additional program commands are required to either multiply or...
  • Page 413 FX Series Programmable Controllers Assigning System Devices 9 D10 = 10 x D8112 / 4, (D8113 would be used for Ch2) The programming code for the Equation above is given below. M8001 M8112 M8000 FNC 22 D8112 FNC 23 Example Application Program #2 In Voltage input mode, the 2AD converts analog values from 0 ~ 10 Volts to a digital output of 0 ~ 4000.
  • Page 414 FX Series Programmable Controllers Assigning System Devices 9 If the digital range 0 ~ 4000 is desired in D30, please see the program below. D30 = 4000 x (D8112 or D8113) / (B’ - A’) - 4000 x A’ / (B’ - A’) A’...
  • Page 415 FX Series Programmable Controllers Assigning System Devices 9 Example Application Program #5 If using an analog range from 4 ~ 20mA to obtain an output range from A ~ B, the normal output range of 0 ~ 2000 must be converted to the new range. 2000 Digital value Digital value (D80)
  • Page 416 FX Series Programmable Controllers Assigning System Devices 9 D90 = 8 x (D8112 or D8113) + 4000 M8000 M8113 FNC 22 D8113 FNC 20 K4000 9-16...
  • Page 417 FX Series Programmable Controllers Points of Technique 10 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 418 FX Series Programmable Controllers Points of Technique 10 Chapter Contents 10.Points Of Technique................10-1 10.1 Advanced Programming Points ................. 10-1 10.2 Users of DC Powered FX Units ................. 10-1 10.3 Using The Forced RUN/STOP Flags..............10-2 10.3.1 A RUN/STOP push button configuration ..............10-2 10.3.2 Remote RUN/STOP control ..................
  • Page 419: Points Of Technique 10

    If some of these techniques are applied to user programs the user must ensure that they will perform the task or operation that they require. Mitsubishi Electric can take no responsibility for user programs containing any of the examples within this manual.
  • Page 420: Using The Forced Run/Stop Flags

    FX Series Programmable Controllers Points Of Technique 10 10.3 Using The Forced RUN/STOP Flags 10.3.1 A RUN/STOP push button configuration The FX programmable controller has a single RUN terminal. When power is applied to this terminal the PLC changes into a RUN state, i.e. the program contained is executed. Consequently when there is no power 'on' the RUN terminal the PLC is in a STOP state.
  • Page 421: Remote Run/Stop Control

    The FX family of programmable controllers can be controlled, i.e. switched into RUN or STOP modes and have devices monitored by use of intelligent external control devices. These includes such items as computers, the Mitsubishi FX data access units and Graphic Operator Terminals.
  • Page 422: Constant Scan Mode

    FX Series Programmable Controllers Points Of Technique 10 10.4 Constant Scan Mode Some times the timing of operations can be a problem, especially if some co-ordination is being attempted with a second control system. In cases like this it is very useful to fix the PLC’s scan time.
  • Page 423: Using Battery Backed Devices For Maximum Advantage

    FX Series Programmable Controllers Points Of Technique 10 10.6 Using Battery Backed Devices For Maximum Advantage Battery backed devices retain their status during a PLC power down. These devices can be used for maximum advantage by allowing the PLC to continue from its last operation status just before the power failure.
  • Page 424: Reading And Manipulating Thumbwheel Data

    FX Series Programmable Controllers Points Of Technique 10 10.8 Reading And Manipulating Thumbwheel Data Data can be easily read into a programmable controller through the use of the BIN instruction. When data is read from multiple sources the data is often stored at different locations. It may be required that certain data values are combined or mixed to produce a new value.
  • Page 425: A 0.1 Msec Timer Pulse Measurement

    FX Series Programmable Controllers Points Of Technique 10 10.9.2 A 0.1 msec timer pulse measurement This is a very accurate measuring process for pulse inputs. The use of a standard timer is not accurate enough in this case as the highest resolution is 1msec.
  • Page 426: Creating A User Defined Mtr Instruction

    FX Series Programmable Controllers Points Of Technique 10 10.11 Creating a User Defined MTR Instruction For users who want to have the benefits of the MTR instruction for FX users who want to specify more than one MTR area, this user defined MTR function will be very useful.
  • Page 427 FX Series Programmable Controllers Points Of Technique 10 3) The grip, now holding the product, is raised to its upper limit - output Y2: ON, input X2: ON, output Y2: OFF. 4) The robot arm traverses to its right most position - output Y3: ON, input X3: ON, output Y3: OFF.
  • Page 428 FX Series Programmable Controllers Points Of Technique 10 This example uses the IST instruction (FNC 60) to control the operation mode of the robot arm. The program shown opposite identifies how the IST instruction is written into the main program. When the IST instruction is used there are 5 selectable modes which access three separate p r o g r a m s .
  • Page 429 FX Series Programmable Controllers Points Of Technique 10 Zero Return Mode This mode fulfills an initialization function by Clamp is not activeand the return operation has been started returning the robot arm to a known position. Once 'Z Return' has been selected from the Ensure 'dowm' and 'clamp' mode selection screen the bit device M35 is RST Y1...
  • Page 430 FX Series Programmable Controllers Points Of Technique 10 In this example these three modes are selected by an external rotary switch. The rotary switch is not connected to the PLC but to the I/O bus on the rear of the DU unit. The use of the rotary switch means that the selected modes are mutually exclusive in their operation.
  • Page 431 FX Series Programmable Controllers Points Of Technique 10 Points of interest: a) Users of the IST instruction will be aware that only one of the operation modes should be active at one time. In this example program the isolation of 'Manual' and 'Zero return' modes by the use of separate DU control screens, and the use of a rotary switch to isolate the three automatic modes achieves this objective.
  • Page 432 FX Series Programmable Controllers Points Of Technique 10 Full program listing: 8043 8044 8000 8044 8043 8043 (RET)* 8041 8043 8044 (RET)* ↑ → This instruction returns the program flow to STL step S2. *: Instructions in ( ) are not necessary necessary Program options:...
  • Page 433: 10.13 Using The Pwm Instruction For Motor Control

    FX Series Programmable Controllers Points Of Technique 10 10.13 Using The PWM Instruction For Motor Control The PWM instruction may be used directly with an inverter to drive a motor. If this configuration is used the following ripple circuit will be required between the PLC’s PWM output and the inverters input terminals.
  • Page 434 FX Series Programmable Controllers Points Of Technique 10 The maximum output voltage (to the inverter) including ripple voltage, can be found by using the following equation: ≈ E Where: = Maximum output voltage E= pulse (square wave) output voltage (see circuit on the previous page) t = PWM pulse duration (see previous page for reference) = PWM cycle time for pulse (see previous page for reference) The average output voltage (to the inverter) including ripple voltage, can be found by using the...
  • Page 435 FX Series Programmable Controllers Points Of Technique 10 Tested load impedance The duration of the T , time base also affects the ripple voltage. This can be clearly seen in the next set of test data: PWM parameter setting Measured ripple voltage t / T 1.27V...
  • Page 436: 10.14 Communication Format

    FX Series Programmable Controllers Points Of Technique 10 10.14 Communication Format 10.14.1 Specification of the communication parameters: Items such as baud rates, stop bits and parities must be identically set between the two communicating devices. The communication parameters are selected by a bit pattern which is stored in data register D8120.
  • Page 437: Header And Terminator Characters

    FX Series Programmable Controllers Points Of Technique 10 10.14.2 Header and Terminator Characters The header and terminator characters can be changed by the user to suit their requirements. The default setting for the header stored in D8124 is 'STX' (or 02H)and the terminator default setting stored in D8125 is 'ETX' (or 03H).
  • Page 438: Timing Diagrams For Communications:

    FX Series Programmable Controllers Points Of Technique 10 10.14.3 Timing diagrams for communications: 1) No Handshaking D8120 (b12, b11, b10) = (0, 0, 0) below version 2.00 OFF ON instruction Send data Data 1 Data 4 SD (TXD) Send request M8122 Send wait flag M8121...
  • Page 439 FX Series Programmable Controllers Points Of Technique 10 3) Normal Mode 1 D8120 (b12, b11, b10) = (0, 1, 1) 1FX2N below V2.00. OFF ON instruction Send data SD Data 3 Data 1 (TXD) Send request M8122 Send wait flag M8121 ER(DTR) Receive data Data 2...
  • Page 440 FX Series Programmable Controllers Points Of Technique 10 FX2N (V2.00 or above) Communications In the FX2N V2.00 or above and FX2NC, full duplex communication is performed. 1) No Hardware Handshaking D8120 (B12, b11, b10) = (0,0,0) OFF ON instruction Send data Data 1 Data 3 Data 5...
  • Page 441: 10.14.4 8 Bit Or 16 Bit Communications

    FX Series Programmable Controllers Points Of Technique 10 4) Interlink Mode D8120 (b12, b11, b10) = (0, 1, 0) OFF ON instruction Send data Data 2 Data 4 Data 4 SD (TXD) Send request M8122 DR(DSR) Up to 30 characfers can be received *2 Receive data Data 3...
  • Page 442: 10.15 Pid Programming Techniques

    FX Series Programmable Controllers Points Of Technique 10 10.15 PID Programming Techniques 10.15.1 Keeping MV within a set range In the reserved registers of the PID data block S +18 and S +19 form a double word device that contains the previous MV x K100. The following program uses this to keep MV under control when it exceeds the operating limits.
  • Page 443: Using The Pid Alarm Signals

    FX Series Programmable Controllers Points Of Technique 10 10.15.3 Using the PID alarm signals Included as part of the data block there are four alarm values. These set the maximum positive and negative change that should occur to MV and PV. The PID alarm signals are used to warn of the system going out of control.
  • Page 444: 10.16 Additional Pid Functions

    FX Series Programmable Controllers Points Of Technique 10 10.16 Additional PID functions The following parameter table gives the additional parameters available with FX MPUs. 2N(C) These are: +1 bit 4: Pre-tuning operation flag. +1 bit 5: Output Value range limit flag. +22: Output Value upper limit.
  • Page 445: 10.17 Pre-Tuning Operation

    FX Series Programmable Controllers Points Of Technique 10 10.17 Pre-tuning operation 10.17.1 Variable Constants The Pre-tuning operation can be used to automatically set values for the following variables: - The direction of the process; Forward or Reverse (S +1, bit 0) - The proportional gain constant;...
  • Page 446: 10.18 Example Autotuning Program

    FX Series Programmable Controllers Points Of Technique 10 10.18 Example Autotuning Program The following programming code is an example of how to set up the Pre-Tuning function. X010 D500: SV = 500 FNC 12 K500 D500 FNC 12 D502: MV = 1800, initial value K1800 D502 D510: T...
  • Page 447: Outline Of Functions

    FX Series Programmable Controllers Points Of Technique 10 10.19 Using the FX -5DM Display module. The display module, FX -5DM (hereafter refered to as 5DM) can be mounted on an FX PLC, allowing devices to be monitored, and data settings changed. 10.19.1 Outline of functions.
  • Page 448: 3Display Screen Protect Function

    FX Series Programmable Controllers Points Of Technique 10 10.19.2 Control devices for 5DM When using the 5DM control functions, write the head device number of Data registers (D) and Auxiliary relays (M), to the special data registers D8158 and D8159 respectively. D8158 and 8159 are the control devices for the 5DM.
  • Page 449: 4Specified Device Monitor

    FX Series Programmable Controllers Points Of Technique 10 10.19.4 Specified device monitor It is possible to specify in the PLC, the devices to be displayed on the 5DM. When specifying a device to be displayed, write the correcponding number shown in the table below to D1.
  • Page 450: Specified Device Edit

    FX Series Programmable Controllers Points Of Technique 10 10.19.5 Specified device edit This function allows the operator to edit the devices displayed by the specified device monitor. The following devices are used to achieve this. Special D Control device Description Request to edit displayed device data D8159 Mo+1...
  • Page 451: Automatic Backlight Off

    FX Series Programmable Controllers Points Of Technique 10 10.19.6 Automatic Backlight OFF Using this function a set time until the backlight is switched OFF can be set, or it can be forced ON and OFF when necessary. Special D Control device Description D8158 Backlight OFF time...
  • Page 452 FX Series Programmable Controllers Points Of Technique 10 Memo 10-34...
  • Page 453: Index

    FX Series Programmable Logic Controllers Index 11 Introduction Basic Program Instructions STL Programming Devices in Detail Applied Instructions Diagnostic Devices Instruction Execution Times PLC Device Tables Assigning System Devices Points of Technique Index...
  • Page 454 FX Series Programmable Logic Controllers Index 11 Chapter contents 11.Index....................11-1 11.1 Index ........................11-1 11.2 ASCII Character Codes ..................11-9 11.3 Applied Instruction List ..................11-10...
  • Page 455 FX Series Programmable Controllers Index 11 Index 11.1 Index Absolute current value read, ABS instruction ................5-164 Absolute drum sequence, ABSD instruction ................5-88 Addition of data values, ADD instruction..................5-30 Addressing special function blocks ....................9-1 Advanced programming points Examples and tips ......................
  • Page 456 FX Series Programmable Controllers Index 11 C data devices See Counters Communication Parameters ....................10-18 Compare: And, ANDF instruction .................... 5-218 Compare: Load, LDF instruction ..................... 5-217 Compare: Or, ORF instruction....................5-219 Comparison of data to a range, ZCP instr' ................. 5-19 Comparison of single data values, CMP instr' ................
  • Page 457 FX Series Programmable Controllers Index 11 Encode data, ENCO instruction ....................5-57 END ............................2-23 End instruction .......................... 2-23 Error codes Circuit (D8066) ......................... 6-25, 6-26 Communication (D8062 - D8063) ...................... 6-23 Hardware (D8061) ..........................6-23 Operation (D8067) ..........................6-27 Parameter (D8064) ..........................
  • Page 458 FX Series Programmable Controllers Index 11 Gray code to Decimal, GBIN instruction .................. 5-185 Grouped bit devices ........................4-37 H value See Constants Hex to ASCII conversion using ASCI (FNC 82) ................ 5-121 Hexadecimal data words - reading ................... 4-40 Hexadecimal keypad, HKY instruction ..................
  • Page 459 FX Series Programmable Controllers Index 11 K value See Constants LD, LDI ............................2-3 LDP, LDF ............................2-8 Load, load inverse instructions ....................2-3 Load Pulse, load trailing Pulse instructions ................2-8 M bit device See Auxiliary relay Manipulating thumbwheel data (SMOV), example ..............10-6 Master control and master control reset ...................
  • Page 460 FX Series Programmable Controllers Index 11 P program pointer See Pointer P PLC operation - batch processing .................... 7-13 PID control Applied instruction 88 - PID..................... 5-126 Configuring the PID loop ....................5-129 Example program ......................10-28 PID Setup parameters ....................5-128 Program techniques ......................
  • Page 461 FX Series Programmable Controllers Index 11 S bit device See State relays Scientific Notation - a numerical format ..................4-44 Search, data search utility - SER instruction ................5-87 Set and reset instructions ......................2-17 See Also Zone reset, ZRST FNC 40 SET, RST ..........................
  • Page 462 FX Series Programmable Controllers Index 11 Basic timers ........................2-18 Device details and examples ..................... 4-15 General accuracy ....................... 4-18 General timer operation ..................... 4-16 Retentive timers ........................ 4-17 Selectable range timers ..................... 4-16 Timers used in interrupt and CALL subroutines ............... 4-18 Two's compliment - an explanation ...................
  • Page 463: Ascii Character Codes

    FX Series Programmable Controllers Index 11 11.2 ASCII Character Codes Table 11.1: Higher bit ASCII code table (HEX) (SP) “ & ‘ Lower accessible < > (SP) Note: (SP) = Space, = Carriage Return 11-9...
  • Page 464 FX Series Programmable Controllers Index 11 11.3 Applied Instruction List FX2N FX2N FX2NC FX2NC FX1N FX1N FX1S FX1S Memonic Page Memonic Page 5-127 5-31 ABSD 5-70 NEXT 5-13 5-25 O Orq 5-153 240-246 5-73 5-102 ANDq 5-152 PLSR 5-63 232-238 5-47 PLSV 5-129...
  • Page 466 PROGRAMMING MANUAL THE FX SERIES OF PROGRAMMABLE CONTROLLER , FX , FX HEAD OFFICE: MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100-8310 TELEX: J24532 CABLE MELCO TOKYO HIMEJI WORKS: 840, CHIYODA CHO, HIMEJI, JAPAN Effective Sep. 2001 Specification are subject JY992D88101C to change without notice.

This manual is also suitable for:

Fx1n seriesFx2nc seriesFx2n series

Table of Contents