PROGRAMMING MANUAL II THE FX SERIES OF PROGRAMMABLE CONTROLLER (FX1S, FX1N, FX2N, FX2NC)
FX Series Programmable Controllers FX Series Programmable Controllers Programming Manual Manual number : JY992D88101 Manual revision : A Date : April 2000 Foreword • This manual contains text, diagrams and explanations which will guide the reader in the correct programming and operation of the PLC. • Before attempting to install or use the PLC this manual should be read and understood.
FX Series Programmable Controllers ii
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. However,to continue this process of improvement, the comments of the Mitsubishi users are always welcomed.
FX Series Programmable Controllers iv
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.
FX Series Programmable Controllers vi
FX Series Programmable controllers Contents 1. Introduction............................................................................................1-1 1.1 1.2 1.3 1.4 Overview.............................................................................................................. 1-1 What is a Programmable Controller? .................................................................. 1-2 What do You Need to Program a PLC? ..............................................................
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 .............
4.11 High Speed Counters ........................................................................................ 4-22 4.11.1 4.11.2 4.11.3 4.11.4 4.11.5 4.11.6 Basic High Speed Counter Operation ..................................................................... 4-23 Availability of High Speed Counters ....................................................................... 4-24 1 Phase Counters - User Start and Reset (C235 - C240) .......................................
5.3.9 WXOR (FNC 28) ..................................................................................................... 5-31 5.3.10 NEG (FNC 29) ........................................................................................................ 5-31 5.4 Rotation And Shift - Functions 30 to 39 ............................................................. 5-34 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 5.4.7 5.4.8 5.4.9 5.4.10 ROR (FNC 30).....................................................................
5.9 External FX Serial Devices - Functions 80 to 89 ............................................... 5-94 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 RS (FNC 80)............................................................................................................ 5-95 RUN (FNC 81) ......................................................................................................... 5-96 ASCI (FNC 82) ...............................................................................................
6. Diagnostic Devices ................................................................................6-1 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 6.16 PLC Status (M8000 to M8009 and D8000 to D8009) .......................................... 6-2 Clock Devices (M8010 to M8019 and D8010 to D8019) .................................... 6-3 Operation Flags ...................................................................................................
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 ..................................
viii
FX Series Programmable Controllers 1 Introduction 2 Basic Program Instructions 3 STL Programming 4 Devices in Detail 5 Applied Instructions 6 Diagnostic Devices 7 Instruction Execution Times 8 PLC Device Tables 9 Assigning System Devices 10 Points of Technique 11 Index Introduction 1
FX Series Programmable Controllers Introduction 1 Chapter Contents 1. Introduction............................................................................................1-1 1.1 1.2 1.3 1.4 1.5 Overview.............................................................................................................. 1-1 What is a ProgrammableController? ................................................................... 1-2 What do You Need to Program a PC? ................................................
Introduction 1 FX1S 1. Introduction 1.1 Overview FX1N FX2N FX2NC 1) Scope of this manual This manual gives details on all aspects of operation and programming for FX 1S , FX1N, FX2N and FX2NC programmable controllers (PLCs). For all information relating to the PLC hardware and installation, refer to the appropriate manual supplied with the unit. 2) How to use this manual This manual covers all the functions of the highest specification Programmable (Logic) Controller (PLC).
Introduction 1 1.2 FX1S What is a Programmable Controller? FX1N FX2N FX2NC A Programmable Logic Controller (PLC or programmable controller) is a device that a user can program to perform a series or sequence of events. These events are triggered by stimuli (usually called inputs) received at the PLC or through delayed actions such as time delays or counted occur-rences.
Introduction 1 1.4 Special considerations for programming equipment 1.4.1 Current Generation CPU all versions FX1S FX1N FX2N FX2NC The introduction of this 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.
Introduction 1 1.
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 FX2N-20GM Users guide JY992D77601 FX2N-10/20GM Hardware/Programming manual JY992D77801 FX-PCS-VPS/WIN-E Software manual JY992D86801 1-5
Introduction 1 Memo 1-6
FX Series Programmable Controllers 1 Introduction 2 Basic Program Instructions 3 STL Programming 4 Devices in Detail 5 Applied Instructions 6 Diagnostic Devices 7 Instruction Execution Times 8 PLC Device Tables 9 Assigning System Devices 10 Points of Technique 11 Index Basic Program Instructions 2
FX Series Programmable Controllers Basic Program Instructions 2 Chapter Contents 2. Basic Program Instructions ...................................................................2-1 2.1 2.2 2.3 2.4 2.5 What is a Program? ............................................................................................. 2-1 Outline of Basic Devices Used in Programming .................................................. 2-1 How to Read Ladder Logic .................................................................
FX Series Programmable Controllers Basic Program Instructions 2 2. Basic Program Instructions 2.1 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.
FX Series Programmable Controllers 2.3 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. A coil drives direct outputs of the PLC (ex. a Y device) or drives internal timers, counters or flags (ex. T, C, M and S devices). Each coil has associated contacts.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.5 Basic Program Instructions 2 FX1S Out Mnemonic OUT (OUT) Function Format FX1N FX2N FX2NC Devices Final logical operation type coil drive Y, M, S, T, C Program steps Y, M:1 S, special M coils: 2 T:3 C (16 bit): 3 C (32 bit): 5 Basic points to remember: - Connect the OUT instruction directly to the right hand bus bar. - It is not possible to use the OUT instruction to drive ‘X’ type input devices.
FX Series Programmable Controllers 2.5.2 Basic Program Instructions 2 Double Coil Designation Double or dual coiling is not a recommended practice. Using multiple output coils of the same device can cause the program operation to become unreliable. The example program shown opposite identifies a double coil situation; there are two Y3 outputs. The following sequence of events will occur when inputs X1 = ON and X2 = OFF; 1. X1 Y3 Y3 Y4 2. 1.The first Y3 tuns ON because X1 is ON.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers Basic Program Instructions 2 Multiple program examples: X0 X1 Y0 X2 MPS X3 X4 Y1 X5 X6 MRD X7 Y2 X10 Y3 MPP X 0 0 1 2 3 4 5 6 7 8 9 10 11 LD MPS LD OR ANB OUT MRD LD AND LD AND ORB 0 1 2 3 4 5 6 7 8 LD MPS AND MPS AND OUT MPP AND OUT X 0 0 1 2 3 4 5 6 7 8 LD MPS AND MPS AND MPS AND MPS AND X 0 X 1 X 2 Y 0 X X X X 3 4 5 6 12 13 14 15 16 17 18 19 20 ANB OUT MPP AND OUT LD OR ANB OUT 9 10 11 12 13 14 15 16 MPP AND MPS AND OUT MPP AND OUT 9 10 11 12 1
FX Series Programmable Controllers 2.14 Basic Program Instructions 2 FX1S Master Control and Reset Mnemonic Function MC (Master Control) Denotes the start of a master control block MCR (Master Control Reset) Denotes the end of a master control block FX1N FX2N FX2NC Format Devices Program steps MC N Y, M (no special M coils allowed) N denotes the nest level (N0 to N7) 3 MCR N N denotes the nest level (N0 to N7) to be reset.
FX Series Programmable Controllers Basic Program Instructions 2 Nested MC program example: A N0 X0 MC N0 M100 Level N0: Bus line (B) active when X0 is ON. M100 X1 Y0 B X2 MC N1 N1 M101 Level N1: Bus line (C) active when both X0 and X2 are ON. M101 X3 Y1 C X4 MC N2 N2 M102 Level N2: Bus line (D) active when X0,X2 and X4 are ON. M102 X5 Y2 D MCR N2 X6 Y3 C Level N1: MCRN2 executes and restores bus line (C).
FX Series Programmable Controllers 2.15 Basic Program Instructions 2 FX1S Set and Reset Mnemonic Function Format SET (SET) Sets a bit device permanently ON RST (ReSeT) Resets a bit device permanently OFF FX1N FX2N FX2NC Devices Program steps SET Y, M, S Y,M:1 S, special M coils:2 RST Y, M, S, D, V, Z (see section 2.
FX Series Programmable Controllers 2.16 Basic Program Instructions 2 FX1S Timer, Counter (Out & Reset) Mnemonic Function Format FX1N FX2N FX2NC Devices Program steps OUT (OUT) Driving timer or counter coils T, C 32 bit counters:5 Others: 3 RST (ReSeT) Resets timer and counter, coils contacts and current values T, C (see section 2.15 for other resetable devices) T, C:2 RST Program example: 2.16.
FX Series Programmable Controllers 2.16.2 Basic Program Instructions 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.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.
FX Series Programmable Controllers 2.19 Basic Program Instructions 2 FX1S No Operation Mnemonic Function NOP No operation or (No Operation) null step FX1N FX2N FX2NC Format Devices Program steps N/A N/A 1 Basic points to remember: - Writing NOP instructions in the middle of a program minimizes step number changes when changing or editing a program. - It is possible to change the operation of a circuit by replacing programmed instructions with NOP instructions.
FX Series Programmable Controllers 2.20 Basic Program Instructions 2 FX1S End Mnemonic END (END) Function Forces the current program scan to end Format END FX1N FX2N FX2NC Devices Program steps N/A 1 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.
FX Series Programmable Controllers Basic Program Instructions 2 MEMO 2-24
FX Series Programmable Controllers 1 Introduction 2 Basic Program Instructions 3 STL Programming 4 Devices in Detail 5 Applied Instructions 6 Diagnostic Devices 7 Instruction Execution Times 8 PLC Device Tables 9 Assigning System Devices 10 Points of Technique 11 Index STL Programming 3
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 ................................................................................
FX Series Programmable Controllers 3. STL Programming STL Programming 3 FX1S FX1N FX2N FX2NC This chapter differs from the rest of the contents in this manual as it has been written with a training aspect in mind. STL/SFC programming, although having been available for many years, is still misunderstood and misrepresented. We at Mitsubishi would like to take this opportunity to try to correct this oversight as we see STL/SFC programming becoming as important as ladder style programming. 3.
FX Series Programmable Controllers 3.2 STL Programming 3 How STL Operates As previously mentioned, STL is a system which allows the user to write a program which functions in much the same way as a flow chart, this can be seen in the diagram opposite. STL derives its strength by organizing a larger program into smaller more manageable parts. Each of these parts can be referred to as either a state or a step. To help identify the states, each is given a unique identification number.
FX Series Programmable Controllers STL Programming 3 Combined SFC Ladder representation Sometimes STL programs will be written in hard copy as a combination of both flow diagram and internal sub-program. (example shown below).
FX Series Programmable Controllers STL Programming 3 Initial Steps For an STL program which is to be activated on the initial power up of the PLC, a trigger similar to that shown opposite could be used, i.e. using M8002 to drive the setting of the initial state. The STL step started in this manner is often referred to as the initial step. Similarly, the step activated first for any STL sequence is also called the initial step. 3.3.
FX Series Programmable Controllers 3.4 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. These difference will now be explained: 3.4.
FX Series Programmable Controllers 3.4.2 STL Programming 3 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’ back up a program, i.e. go back to a state which has already been processed, the OUT instruction would be used with the appropriate STL state number.
FX Series Programmable Controllers 3.5 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. 3.5.1 Basic Notes On The Behavior Of STL programs • When an STL state becomes active its program is processed until the next step is triggered.
FX Series Programmable Controllers • 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. If timers are dual coiled care must be taken to ensure that the timer operation is completed during the active STL step.
FX Series Programmable Controllers 3.5.2 STL Programming 3 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. FX1S Method 1 - Using locking devices FX1N FX2N FX2NC In this example it is necessary to program separate locking devices, and the controlling signal must only pulse ON. This is to prevent the STL programs from running through.
FX Series Programmable Controllers 3.6 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.
FX Series Programmable Controllers 3.7 STL Programming 3 Using STL To Select The Most Appropriate Program FX1S FX1N FX2N FX2NC 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.
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. 3.8 Using STL To Activate Multiple Flows Simultaneously FX1S FX1N FX2N FX2NC In the previous branching technique, it was seen how a single flow could be selected from a group.
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. This is called a ‘Multiple State Merge”. An explanation of Multiple State Merge now follows below.
FX Series Programmable Controllers 3.9 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 number 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. If the programmable controllers program is read/written using instruction or ladder formats the above rules are acceptable.
FX Series Programmable Controllers STL Programming 3 Further recommended program changes: S 20 S 20 Rewrite as... X0 X10 X4 X1 S 21 X2 X11 S 23 X5 S 22 X3 X12 S 24 X6 X7 S 25 S 26 X13 X14 X0 X0 X10 X10 X1 X4 X11 X14 S 27 X15 S 21 S 23 X2 S 28 X16 X17 X5 S 22 S 25 X12 S 24 S 27 X15 S 26 S 28 X3 X6 X13 X16 X7 X7 X17 X17 S 29 S 29 Program violation! Rewrite as...
FX Series Programmable Controllers STL Programming 3 3.11 Programming Examples 3.11.1 A Simple STL Flow FX1S FX1N FX2N FX2NC Loading hopper Y10 Y12 Start button X0 Y11 Ore truck Y13 X2 X1 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. This is achieved by using the special auxiliary relay M8002.
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. M2 is reset. If M2 was reset (in state S21) the program ‘jumps’ to step S21 and the ore truck is returned for immediate refilling. If M2 is not reset, i.e.
FX Series Programmable Controllers 3.11.2 STL Programming 3 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.
FX Series Programmable Controllers STL Programming 3 Full STL flow diagram/program. S0 X12 Y7 S 21 This example uses the dot notation to identify normally open and normally closed contacts.
FX Series Programmable Controllers 3.12 STL Programming 3 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. The IST instruction provides the user with a pre-formatted way of creating a multi-mode program.
FX Series Programmable Controllers 1 Introduction 2 Basic Program Instructions 3 STL Programming 4 Devices in Detail 5 Applied Instructions 6 Diagnostic Devices 7 Instruction Execution Times 8 PLC Device Tables 9 Assigning System Devices 10 Points of Technique 11 Index Devices in Detail 4
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 .................................................
FX Series Programmable Controllers 4. Devices in Detail 4.1 Inputs Devices in Detail 4 FX1S FX1N FX2N FX2NC Device Mnemonic: X Purpose: Representation of physical inputs to the programmable controller (PLC) Alias: I/P Inp (X) Input Input contact Available forms: NO ( ) and NC ( ) contacts only (see example device usage for references) Devices numbered in: Octal, i.e.
FX Series Programmable Controllers 4.2 Devices in Detail 4 FX1S Outputs FX1N FX2N FX2NC Device Mnemonic: Y Purpose: Representation of physical outputs from the programmable controller Alias: O/P Otp 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.
FX Series Programmable Controllers 4.3 Devices in Detail 4 FX1S Auxiliary Relays FX1N FX2N FX2NC 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.
FX Series Programmable Controllers 4.3.2 Devices in Detail 4 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. When operation is resumed the previous status of these relays is restored. The circuit shown on page 4-3 is an example of a self retaining circuit. Relay M507 is activated when X0 is turned ON.
FX Series Programmable Controllers 4.3.3 Devices in Detail 4 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. Only the contacts of these coils may be used by a user defined program.
FX Series Programmable Controllers 4.4 Devices in Detail 4 FX1S State Relays FX1N FX2N FX2NC 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.
FX Series Programmable Controllers 4.4.2 Devices in Detail 4 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. When operation is resumed the previous status of these relays is restored.
FX Series Programmable Controllers 4.4.3 Devices in Detail 4 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. They are used in combination with the basic instruction STL. When all STL style programming is used certain states have a pre-defined operation. The step identified as ➀ in the figure opposite is called an ‘initial state’. All other state steps are then used to build up the full STL function plan.
FX Series Programmable Controllers 4.4.4 Devices in Detail 4 FX1S Annunciator Flags FX1N FX2N FX2NC 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-47 ANR function 47: ANnunciator Reset - see page 5-47 When the annunciator function is used the controlled state flags are in the range S900 to S999 (100 points).
FX Series Programmable Controllers 4.5 Devices in Detail 4 FX1S Pointers FX1N FX2N FX2NC Device Mnemonic: P Purpose: Program flow control Alias: Pointer Program pointer P 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. P0 to P9, P10 to P19 Further uses: Can be used with conditional jump statements (CJ function 00) - see page 5-5 and item ➀ on the example device usage diagram.
FX Series Programmable Controllers 4.6 Devices in Detail 4 FX1S Interrupt Pointers FX1N FX2N FX2NC Device Mnemonic: I Purpose: Interrupt program marker Alias: Interrupt High speed interrupt I Available forms: Label: appears on the left of the left hand bus bar when the program is viewed in ladder mode (see ➀ in the example device usage diagram).
FX Series Programmable Controllers 4.6.1 Devices in Detail 4 Input Interrupts Identification of interrupt pointer number: I 0 0: interrupt triggered on trailing/ falling edge of input signal 1: interrupt triggered on leading/ rising edge of input signal Input number; each input number can only be used once.
FX Series Programmable Controllers 4.6.3 Devices in Detail 4 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 I0❏❏. Driving special auxiliary relays: • Never drive a special auxiliary coil without first checking its use.
FX Series Programmable Controllers 4.7 Constant K Devices in Detail 4 FX1S FX1N FX2N FX2NC Device Mnemonic: K Purpose: Identification of constant decimal values Alias: Constant K (value/ constant) K 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. Devices numbered in: N/A. This device is a method of local instruction data entry.
FX Series Programmable Controllers 4.9 Devices in Detail 4 FX1S Timers FX1N FX2N FX2NC Device Mnemonic: T Purpose: Timed durations Alias: Timer(s) T 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.
FX Series Programmable Controllers 4.9.1 Devices in Detail 4 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. A 10 msec timer with a present value of 567 has actually been operating for: 567× 10 msec 567× 0.01 sec = 5.
FX Series Programmable Controllers 4.9.3 Devices in Detail 4 FX1N FX2N FX2NC FX1S 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. Because the retentive timer is not reset when the drive contact is removed, a forced reset must be used. The following diagram shows this in a graphical format.
FX Series Programmable Controllers 4.9.4 Devices in Detail 4 FX1S Timers Used in Interrupt and ‘CALL’ Subroutines FX1N FX2N FX2NC 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.
FX Series Programmable Controllers 4.10 Devices in Detail 4 FX1S Counters FX1N FX2N FX2NC Device Mnemonic: C Purpose: Event driven delays Alias: Counter(s) C Available forms: A driven coil sets internal PLC contacts (NO and NC contacts available).
FX Series Programmable Controllers 4.10.1 Devices in Detail 4 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. The counter current value is reset to ‘0’ (zero) when the RST instruction is executed by turning ON X10 in the example.
FX Series Programmable Controllers 4.10.2 Devices in Detail 4 FX1S General/ Latched 32bit Bi-directional Counters FX1N FX2N FX2NC 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.
FX Series Programmable Controllers 4.11 Devices in Detail 4 High Speed Counters FX1S FX1N FX2N FX2NC Device Mnemonic: C Purpose: High speed event driven delays Alias: Counter (s) C 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.
FX Series Programmable Controllers 4.11.1 Devices in Detail 4 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.
FX Series Programmable Controllers 4.11.
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: Unit FX2N & FX2NC FX1S & FX1N Function Number Max. Combined Signal Frequency 53 or 54 11 kHz 55 5.
FX Series Programmable Controllers 4.11.3 Devices in Detail 4 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 counts up. When X11 is ON, C235 resets to 0 (zero). All contacts of the counter C235 are also reset. When X12 is ON, C235 is selected. From the previous counter tables, the corresponding counted input for C235 is X0.
FX Series Programmable Controllers 4.11.4 Devices in Detail 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. X13 M8245 When the direction flag M8245 is ON, C245 counts down. When it is OFF C245 will count X14 up. RST C245 When X14 is ON, C245 resets in the same X15 manner as normal internal 32bit counters, but C245 C245 can also be reset by input X3.
FX Series Programmable Controllers 4.11.5 Devices in Detail 4 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.
FX Series Programmable Controllers 4.11.6 Devices in Detail 4 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. Depending on the counter used, start, reset and other associated inputs are automatically allocated.
FX Series Programmable Controllers 4.
FX Series Programmable Controllers 4.12.1 Devices in Detail 4 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. However, two consecutive data registers can be used to form a 32bit device more commonly known as a double word.
FX Series Programmable Controllers 4.12.2 Devices in Detail 4 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. For details of how to do this please refer to the appropriate programming tools manual.
FX Series Programmable Controllers 4.12.4 File Registers Devices in Detail 4 FX1S FX1N FX2N FX2NC 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. File registers are actually setup in the parameter area of the PLC.
FX Series Programmable Controllers 4.12.5 Devices in Detail 4 Externally Adjusted Registers The FX1S and FX1N 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 registers. The contents of these registers of an FX1S can range from 0 to 255. This is a built in feature and requires no additional setup or programming.
FX Series Programmable Controllers 4.13 Devices in Detail 4 FX1S Index Registers FX1N FX2N FX2NC 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 (2 devices) For 32bit data V and Z combined (1 device - Z is specified) Operation is similar to data registers.
FX Series Programmable Controllers 4.13.1 Devices in Detail 4 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: K If V = 3276 then K20V ➭ V 20 (3276) 3296 4.13.2 Misuse of the Modifiers Modifying Kn devices when Kn forms part of a device description such as KnY is not possible, i.e.
FX Series Programmable Controllers 4.14 Devices in Detail 4 Bits, Words, BCD and Hexadecimal FX1S FX1N FX2N FX2NC 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.
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. K2M0, for example identifies 2 groups of 4 bits; M0 to M3 and M4 to M7, giving a total of 8 bit devices or 1 byte. The diagram below identifies more examples of Kn✰ use.
FX Series Programmable Controllers 4.14.2 Devices in Detail 4 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. It may seem strange to quote the size of a word device in bits.
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. To this the positive sum of the active bits is added, i.e. -32768 + 7797. The correct answer is therefore -24971.
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. 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 Binary Coded Decimal value= ERROR!!!!! It will be noticed that this will produce an ERROR. The conversion will not be correct.
FX Series Programmable Controllers 4.14.4 Devices in Detail 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.
FX Series Programmable Controllers 4.15 Devices in Detail 4 Floating Point And Scientific Notation FX1S FX1N FX2N FX2NC 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.
FX Series Programmable Controllers 4.15.1 Devices in Detail 4 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. One device contains a data string of the actual characters in the number (called the mantissa), while the second device contains information about the number of decimal places used in the number (called the exponent).
FX Series Programmable Controllers 4.15.2 Devices in Detail 4 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.
FX Series Programmable Controllers 4.15.3 Devices in Detail 4 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.