hit counter script
Mitsubishi Electric FX2N Beginners Manual
Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

MELSEC FX Family
Programmable Logic Controllers
Art. no.: 166388
15082013
Version E
Beginner´s Manual
FX
1S
FX
2N
FX
, FX
3G
FX
FX
3U
MITSUBISHI ELECTRIC
MITSUBISHI ELECTRIC
, FX
,
1N
, FX
,
2NC
, FX
3GC
3GE
,
3S
, FX
3UC
INDUSTRIAL AUTOMATION
,

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric FX2N

  • Page 1 MITSUBISHI ELECTRIC MELSEC FX Family Programmable Logic Controllers Beginner´s Manual , FX , FX , FX , FX , FX Art. no.: 166388 15082013 INDUSTRIAL AUTOMATION MITSUBISHI ELECTRIC Version E...
  • Page 3 You can find the latest information and answers to frequently asked questions on our website at www.mitsubishi-automation.com . MITSUBISHI ELECTRIC EUROPE BV reserves the right to make changes to this manual or the technical specifications of its products at any time without notice.
  • Page 5 Beginner’s Manual for the programmable logic controllers of the MELSEC FX family FX , FX , FX , FX , FX , FX , FX , FX , FX und FX Art. no.: 166388 Version Revisions / Additions / Corrections 01/2006 pdp-tr First edition...
  • Page 7 Only peripherals and expan- sion equipment specifically recommended and approved by Mitsubishi Electric may be used with the programmable logic controllers of the FX...
  • Page 8 Failure to observe the safety warnings identified with this symbol can result in health and injury hazards for the user. WARNING: Failure to observe the safety warnings identified with this symbol can result in damage to the equipment or other property. MITSUBISHI ELECTRIC...
  • Page 9 Safety Guidelines General safety information and precautions The following safety precautions are intended as a general guideline for using PLC systems together with other equipment. These precautions must always be observed in the design, installation and operation of all control systems. DANGER: b Observe all safety and accident prevention regulations applicable to your spe- cific application.
  • Page 10 Safety Guidelines MITSUBISHI ELECTRIC...
  • Page 11: Table Of Contents

    Contents Contents Introduction About this Manual ..........1-1 More Information .
  • Page 12 4.5.3 File registers ..........4-14 MITSUBISHI ELECTRIC...
  • Page 13 Contents Programming Tips for Timers and Counters ......4-15 4.6.1 Specifying timer and counter setpoints indirectly ....4-15 4.6.2 Switch-off delay .
  • Page 14 List of Analog Modules ..........7-5 Index VIII MITSUBISHI ELECTRIC...
  • Page 15: Introduction

    Introduction About this Manual Introduction About this Manual This manual will help you to familiarise yourself with the use of the MELSEC FX family of pro- grammable logic controllers. It is designed for users who do not yet have any experience with programming programmable logic controllers (PLCs).
  • Page 16 More Information Introduction 1 – 2 MITSUBISHI ELECTRIC...
  • Page 17: Programmable Logic Controllers

    Programmable Logic Controllers What is a PLC? Programmable Logic Controllers What is a PLC? In contrast to conventional controllers with functions determined by their physical wiring the functions of programmable logic controllers or PLCs are defined by a program. PLCs also have to be connected to the outside world with cables, but the contents of their program memory can be changed at any time to adapt their programs to different control tasks.
  • Page 18: How Plcs Process Programs

    Output signals Input process image At the beginning of each program cycle the system polls the signal states of the inputs and stores them in a buffer, creating a “process image” of the inputs. 2 – 2 MITSUBISHI ELECTRIC...
  • Page 19 Programmable Logic Controllers How PLCs Process Programs Program execution After this the program is executed, during which the PLC accesses the stored states of the inputs in the process image. This means that any subsequent changes in the input states will not be registered until the next program cycle! The program is executed from top to bottom, in the order in which the instructions were pro- grammed.
  • Page 20: The Melsec Fx Family

    (standard / step ladder / special function) 8 right 8 right 8 right 8 right 8 right Max. special function — 2 left modules connectable 4 left 4 left 2 left 10 left 6 left Not expandable 2 – 4 MITSUBISHI ELECTRIC...
  • Page 21: Selecting The Right Controller

    Programmable Logic Controllers Selecting the Right Controller Selecting the Right Controller The base units of the MELSEC FX family are available in a number of different versions with dif- ferent power supply options and output technologies. You can choose between units designed for power supplies of 100–240 V AC, 24 V DC or 12–24 V DC, and between relay and transistor outputs.
  • Page 22 What types of functions do you need to switch, and how many of them are there? b What power supply options are available? How high are the loads that the outputs need to switch? Choose relay outputs for switching high loads and transistor outputs for switching fast, trigger-free switching operations. 2 – 6 MITSUBISHI ELECTRIC...
  • Page 23: Controller Design

    Programmable Logic Controllers Controller Design Controller Design All the controllers in the series have the same basic design. The main functional elements and assemblies are described in the glossary in section 2.5.7. 2.5.1 Input and output circuits The input circuits use floating inputs. They are electrically isolated from the other circuits of the PLC with optical couplers.
  • Page 24: Layout Of The Melsec Fx 1N Base Units

    Memory battery Connection for extensions Connection for Protective cover des programming units Erweiterungsbusses LEDs for indicating RUN/STOP switch the output status Removable terminal Protective cover strip for digital outputs Housing cover 2 – 8 MITSUBISHI ELECTRIC...
  • Page 25: Layout Of The Melsec Fx 2Nc Base Units

    Programmable Logic Controllers Controller Design 2.5.5 Layout of the MELSEC FX base units Protective cover Memory battery Battery compartment Extension bus RUN/STOP switch (on side) Protective cover MITS UBISH I Operating status LEDs MELSE C POWER for expansion bus FX -16M R-T-D S BATT ERROR STOP...
  • Page 26: Layout Of The Melsec Fx 3Gc Base Units

    RJ45 connector LEDs for output status (10BASE-T/100BASE-TX) Terminals for digital Terminals for analog outputs output Shock protection Protective cover Cover for interfaces, Cover of the expansion potentiometer and slot and the optional RUN/STOP switch battery 2 – 10 MITSUBISHI ELECTRIC...
  • Page 27: Layout Of The Melsec Fx 3S Base Units

    Programmable Logic Controllers Controller Design 2.5.9 Layout of the MELSEC FX base units Protective cover Shock protection Terminals for digital inputs Power supply terminals 2 analog potentiometers Slot for memory cassette and RUN/STOP switch expansion adapter LEDs for input status LEDs for indicating USB Interface operating mode...
  • Page 28: U Base Units

    Protective cover for Memory cassette expansion bus (optional) Expansion bus (to the side) Cover of the adapter Connection for board terminal programming unit Terminals for Buffer battery digital outputs Terminals for Cover for battery digital inputs compartment 2 – 12 MITSUBISHI ELECTRIC...
  • Page 29: 12Plc Components Glossary

    Programmable Logic Controllers Controller Design 2.5.12 PLC components glossary The following table describes the meaning and functionality of the single components und parts of a Mitsubishi PLC. Component Description Optional expansion adapter boards can be connected to this interface. A variety of differ- Connection for ent adapters are available for all FX lines (except the FX and the FX...
  • Page 30 Controller Design Programmable Logic Controllers 2 – 14 MITSUBISHI ELECTRIC...
  • Page 31: An Introduction To Programming

    An Introduction to Programming Structure of a Program Instruction An Introduction to Programming A program consists of a sequence of program instructions. These instructions determine the functionality of the PLC and they are processed sequentially, in the order in which they were entered by the programmer.
  • Page 32: Bits, Bytes And Words

    “binary states” are stored in individual bits. When numbers need to be entered or displayed in other formats the programming software automatically converts the binary numbers into the other number systems. – Base: 2 – Digits: 0 and 1 3 – 2 MITSUBISHI ELECTRIC...
  • Page 33 An Introduction to Programming Number Systems When binary numbers are stored in a word (see above) the value of each digit (position) in the word is one power of 2 higher than that of the digit to its right. The principle is exactly the same as in decimal representation, but with increments of 2 instead of 10 (see graphic): Base 2 Notation Decimal Value...
  • Page 34 0000 0000 0000 1001 0000 0000 0000 1010 0000 0000 0000 1011 0000 0000 0000 1100 0000 0000 0000 1101 0000 0000 0000 1110 0000 0000 0000 1111 0000 0000 0001 0000 0000 0000 0110 0011 3 – 4 MITSUBISHI ELECTRIC...
  • Page 35: The Basic Instruction Set

    An Introduction to Programming The Basic Instruction Set The Basic Instruction Set The instructions of the PLCs of the MELSEC FX family can be divided into two basic catego- ries, basic instructions and applied instructions, which are sometimes referred to as “applica- tion instructions”.
  • Page 36: Starting Logic Operations

    These two instructions result in the following signal sequence: The condition of the LD instruction (poll for signal state “1”) is true so the result of the operation is also true (“1”) and the output is set. 3 – 6 MITSUBISHI ELECTRIC...
  • Page 37 An Introduction to Programming The Basic Instruction Set Example (LDI and OUT instructions) Ladder Diagram Instruction List X000 X000 Y000 Y000 The condition of the LDI instruction (poll for signal state “0”) is no longer true so the output is reset. Double assignment of relays or outputs Never assign the result of an operation to the same device in more than one place in the program!
  • Page 38: Using Switches And Sensors

    When the switch is operated the output is set (switched on). 24 V X000 LD X000 Y000 OUT Y000 Switch operated 24 V X000 LDI X000 Y000 OUT Y000 Switch operated 3 – 8 MITSUBISHI ELECTRIC...
  • Page 39: And Operations

    An Introduction to Programming The Basic Instruction Set 3.4.4 AND operations Instruction Function Symbol GX Works2 FX Logical AND (AND operation with poll for signal state “1” or ON) Logical AND NOT (AND operation with poll for signal state “0” or OFF) An AND operation is logically the same as a serial connection of two or more switches in an electrical circuit.
  • Page 40 Example of an ANI instruction Ladder Diagram Instruction List ANI instruction X000 X001 X000 Y000 X001 Y000 In the example output Y0 is only switched on when input X0 is on and input X1 is off: 3 – 10 MITSUBISHI ELECTRIC...
  • Page 41: Or Operations

    An Introduction to Programming The Basic Instruction Set 3.4.5 OR operations Instruction Function Symbol GX Works2 FX Logical OR (OR operation with poll for signal state “1” or ON) Logical OR NOT (OR operation with poll for signal state “0” or OFF) An OR operation is logically the same as the parallel connection of multiple switches in an electrical circuit.
  • Page 42: Instructions For Connecting Operation Blocks

    However, the maximum number of LD and LDI instructions is restricted to 8, which effec- tively also limits the number of ORB or ANB instructions you can use before an output instruc- tion to 8 as well. 3 – 12 MITSUBISHI ELECTRIC...
  • Page 43 An Introduction to Programming The Basic Instruction Set Example of an ANB instruction Ladder Diagram ANB instruction X000 X001 Y007 Instruction List 0 LD X000 1 ORI parallel connection (OR operation) 2 LDI X001 parallel connection (OR operation) 3 OR 4 ANB ANB instruction connecting both OR operations 5 OUT...
  • Page 44: Pulse-Triggered Execution Of Operations

    Most applied instructions can also be executed by pulse signals. For details see chapter . 5). Evaluating a rising signal pulse Instruction List Ladder Diagram X001 X001 Relay M0 is only switched on for the duration of a single program cycle 3 – 14 MITSUBISHI ELECTRIC...
  • Page 45: Setting And Resetting Devices

    An Introduction to Programming The Basic Instruction Set Evaluating a falling signal pulse Instruction List Ladder Diagram M235 M235 X010 ANDF X010 M374 M374 M235 M374 If X10 is off (0) and M235 is on (1) relay M374 is switched on for the duration of a single program cycle.
  • Page 46 OFF function. When the container is full a level sensor automatically switches the pump off. Instruction List Ladder Diagram X001 X001 SET Y000 Y000 Pump Pump X002 X003 Y000 X002 RST Y000 Pump Pump X003 Level sensor 3 – 16 MITSUBISHI ELECTRIC...
  • Page 47: Storing, Reading And Deleting Operation Results

    An Introduction to Programming The Basic Instruction Set 3.4.9 Storing, reading and deleting operation results Instruction Function Symbol GX Works2 FX Memory Point Store, stores the result of — — an operation Memory Read, reads a stored operation — — result Memory POP, reads a stored operation —...
  • Page 48: Generating Pulses

    In the case of device X1 the falling edge of the signal is the trigger. Relays M0 and M1 are only switched on for the duration of a single program cycle. 3 – 18 MITSUBISHI ELECTRIC...
  • Page 49: 11Master Control Function (Mc And Mcr Instructions)

    An Introduction to Programming The Basic Instruction Set 3.4.11 Master control function (MC and MCR instructions) Instruction Function Symbol GX Works2 FX Master Control, sets a master control condition, marking the beginning of a MC n program block Master Control Reset, resets a master control condition, marking the end of a MCR n program block...
  • Page 50: 12Inverting The Result Of An Operation

    The INV instruction can be used when you need to invert the result of a complex operation. It can be used in the same position as the AND and ANI instructions. The INV instruction cannot be used at the beginning of an operation (circuit) like an LD, LDI, LDP or LDF instruction. 3 – 20 MITSUBISHI ELECTRIC...
  • Page 51: Safety First

    An Introduction to Programming Safety First! Safety First! PLCs have many advantages over hard-wired controllers. However, when it comes to safety it is important to understand that you cannot trust a PLC blindly. Emergency STOP devices It is essential to ensure that errors in the control system or program cannot cause hazards for staff or machines.
  • Page 52 +24 V properly (for example if a motor is really turn- COM Y000 Y001 ing). Additional functions would be necessary to check this, for example a speed sensor or a voltage load monitor. 3 – 22 MITSUBISHI ELECTRIC...
  • Page 53: Programming Plc Applications

    An Introduction to Programming Programming PLC Applications Programming PLC Applications Programmable logic controllers provide an almost unlimited number of ways to link inputs with outputs. Your task is to choose the right instructions from the many supported by the control- lers of the MELSEC FX family to program a suitable solution for your application.
  • Page 54 In addition to this outputs Y003 through Y005 are used to indicate which alarm circuit triggered the alarm. Relay M1 and the corresponding alarm circuit output will remain set even when the alarm circuit is closed again. 3 – 24 MITSUBISHI ELECTRIC...
  • Page 55 An Introduction to Programming Programming PLC Applications b Alarm activation delay Ladder Diagram Instruction List K100 18 LD 19 OUT K100 22 LD K300 23 OUT K300 When an alarm is triggered (M1 switches to “1”) the 10s delay timer starts. After the 10 seconds T1 then starts timer T2, which is set to 30 seconds, and the siren activation time begins.
  • Page 56 When the alarm system is switched off with the key-operated switch all the outputs used by the program and the relay M1 are all reset. If an alarm was triggered the interrupted alarm circuit which was released until the system was switched off is displayed. 3 – 26 MITSUBISHI ELECTRIC...
  • Page 57 An Introduction to Programming Programming PLC Applications Connection of the PLC The sketch below shows how easy it is to implement this alarm system with a PLC of the FX family. The example shows a FX -14MR. S/S 0 V 100-240 0 1 2 3 4 5 6 7...
  • Page 58: A Rolling Shutter Gate

    – Two limit switches must be installed to stop the gate motor when the gate reaches the fully open (S3) and fully closed (S6) positions. 3 – 28 MITSUBISHI ELECTRIC...
  • Page 59 An Introduction to Programming Programming PLC Applications Assignment of the input and output signals The task description clearly defines the number of inputs and outputs needed. The gate drive motor is controlled with two outputs. The signals required are assigned to the PLC inputs and outputs as follows: Function Name...
  • Page 60 26 SET If an obstacle is registered by the photoelectric barrier while the gate is closing relay M2 is reset and the close operation is halted. After this relay M1 is set, opening the gate again. 3 – 30 MITSUBISHI ELECTRIC...
  • Page 61 An Introduction to Programming Programming PLC Applications b Switching the motor off with the limit switches Ladder Diagram Instruction List X003 27 LDI X003 28 RST X006 29 LDI X006 30 RST When the gate is open limit switch S3 is activated and input X3 is switched off. This resets relay M1, turning off the motor.
  • Page 62 24 V S/S 0 V 100-240 0 1 2 3 4 5 6 7 MITSUBISHI POWER ERROR FX -14MR 0 1 2 3 14MR COM0 COM1 COM2 -ES/UL Interlock by contactor Deactivation by limit switches 3 – 32 MITSUBISHI ELECTRIC...
  • Page 63: Devices In Detail

    Devices in Detail Inputs and Outputs Devices in Detail The devices in PLCs are used directly in control program instructions. Their signal states can be both read and changed by the PLC program. A device reference has two parts: – the device name and –...
  • Page 64 With expansion modules, the total number of inputs can be increased to max. 128 (X177) and the total number of outputs can be increased to max. 128 (Y177). However, the sum of all inputs and outputs cannot exceed 128. 4 – 2 MITSUBISHI ELECTRIC...
  • Page 65 Devices in Detail Inputs and Outputs Device Inputs Outputs 8 (X00–X07) 8 (Y00–Y07) 16 (X00–X07, X10–X17) 16 (Y00–Y07, Y10–Y17) 24 (X00–X07, X10–X17, X20–X27) 24 (Y00–Y07, Y10–Y17, Y20–Y27) 32 (X00–X07, X10–X17, X20–X27, 32 (Y00–Y07, Y10–Y17, Y20–Y27, X30–X37) Y30–Y37) 40 (X00–X07, X10–X17, X20–X27, 40 (Y00–Y07, Y10–Y17, Y20–Y27, Number of X30–X37, X40–X47)
  • Page 66: Relays

    You can also configure these relays as unlatched relays with the PLC parameters. If the optional battery is installed, the function of latched registers can be assigned to these registers in the PLC parameters. They are then buffered by the battery. 4 – 4 MITSUBISHI ELECTRIC...
  • Page 67: Special Relays

    Devices in Detail Relays 4.2.1 Special relays In addition to the relays that you can switch on and off with the PLC program there is also another class of relays known as special or diagnostic relays. These relays use the address range starting with M8000.
  • Page 68: Timers

    You can also specify the timer setpoint value indirectly with a decimal value stored in a data register. See section 4.6.1 for details. 4 – 6 MITSUBISHI ELECTRIC...
  • Page 69 Devices in Detail Timers Retentive timers In addition to the normal timers described above, all controllers covered in this manual except the FX series also have retentive timers that retain their current time counter value even if the device controlling them is switched off. The current timer counter value is stored in a memory that is retained even in the event of a power failure.
  • Page 70 These timers are only available when special relay M8028 is set ("1"). The total number of 100 ms timers is then reduced to 32 (T0–T31). When special relay M8028 is set ("1"), the timers T32 to T62 operate as 10 ms timers. 4 – 8 MITSUBISHI ELECTRIC...
  • Page 71: Counters

    Devices in Detail Counters Counters The programmers of the FX family also have internal counters that you can use for program- ming counting operations. Counters count signal pulses that are applied to their inputs by the program. The counter out- put is switched on when the current counter value reaches the setpoint value defined by the program.
  • Page 72 High-speed counters use an interrupt principle: The PLC program is interrupted and responds immediately to the counter signal. For a detailed description of high-speed counters please refer to the Programming Manual for the MELSEC FX family. 4 – 10 MITSUBISHI ELECTRIC...
  • Page 73 Devices in Detail Counters Counter overview Counter types Device Normal counters Retentive counters Device identifier Device type (for setting and polling) Bit device Possible device values (counter output) 0 or 1 Device address format Decimal As a decimal integer constant. The setpoint can be set either directly in the instruction or indi- Counter setpoint value entry rectly in a data register (two data registers for...
  • Page 74: Registers

    16-bit register. The more significant part of the 32-bit data is automatically written to the next consecutive register. For example, if you specify register D0 to store a 32-bit value D0 will con- tain bits 0 through 15 and D1 will contain bits 16 through 31. 4 – 12 MITSUBISHI ELECTRIC...
  • Page 75: Special Registers

    Devices in Detail Registers What happens when the PLC is switched off or stopped In addition to the normal registers whose contents are lost when the PLC is stopped or the power supply is turned off, the FX PLCs also have latched registers, whose contents are retained in these situations.
  • Page 76: File Registers

    7000 (D1000–D7999) A maximum of 14 blocks of 500 file registers each can be defined in the PLC parameters. For a detailed description of the file registers see the Programming Manual for the MELSEC FX family. 4 – 14 MITSUBISHI ELECTRIC...
  • Page 77: Programming Tips For Timers And Counters

    Devices in Detail Programming Tips for Timers and Counters Programming Tips for Timers and Counters 4.6.1 Specifying timer and counter setpoints indirectly The usual way to specify timer and counter setpoint values is directly, in an output instruction: Ladder Diagram Instruction List K500 K500...
  • Page 78 X001 X001 D8030 D8031 D8031 10 OUT Y000 Y000 In the program example above Y0 is switched on after the delay specified for timer T1, for the time specified for timer T2 (delayed pulse generation). 4 – 16 MITSUBISHI ELECTRIC...
  • Page 79 Devices in Detail Programming Tips for Timers and Counters Signal sequence [D8030] [D8031] FX Beginners Manual 4 – 17...
  • Page 80: Switch-Off Delay

    When X1 is switched on output Y0 is set (switched on). When X1 is switched off timer T0 is started. After the delay period T0 then resets output Y0. The resulting signal sequence is iden- tical with that produced by program version 1. 4 – 18 MITSUBISHI ELECTRIC...
  • Page 81: On- And Off-Delay

    Devices in Detail Programming Tips for Timers and Counters 4.6.3 ON- and OFF-Delay Sometimes you will want to switch an output on after a delay and then switch it off again after another delay. This is very easy to implement with the controller’s basic logical instructions. Ladder Diagram Instruction List X000...
  • Page 82: Clock Signal Generators

    T2 itself is also switched off. In effect this means that the duration of the on period is increased by the time that it takes to execute a program cycle. However, since the cycle is only a few milliseconds long it can usually be ignored. Signal sequence 4 – 20 MITSUBISHI ELECTRIC...
  • Page 83: More Advanced Programming

    More Advanced Programming Applied Instructions Reference More Advanced Programming The basic logic instructions listed in Chapter 3 can be used to emulate the functions of a hard-wired contactor controller with a programmable logic controller. However, this only scratches the surface of the capabilities of modern PLCs. Since every PLC is built around a microprocessor they can also easily perform operations like mathematical calculations, com- paring numbers, converting from one number system to another or processing analog values.
  • Page 84 © © © © MEAN Calculates mean values Timed annunciator set, starts a timer © © © interval © © © Annunciator reset © © Square root © © © © Floating point, converts data 5 – 2 MITSUBISHI ELECTRIC...
  • Page 85 More Advanced Programming Applied Instructions Reference Controller Instruc- Category Function tion © © © © © © Refresh inputs and outputs © © Refresh inputs and filter adjust REFF © © © © Input matrix, read a matrix (MTR) © ©...
  • Page 86 © © © © © © Output pulses with variable frequency PLSV © © © © © © DRVI Position to an incremental value © © © © © DRVA Position to an absolute value 5 – 4 MITSUBISHI ELECTRIC...
  • Page 87 More Advanced Programming Applied Instructions Reference Controller Instruc- Category Function tion © © © © © © TCMP Compare clock data Compare clock data with a zone © © © © © © TZCP (range) © © © © © ©...
  • Page 88 Instructions for extension file Read values from devices in extension © LOGR registers registers and extension file registers Write data from extension registers to © © RWER extension file registers © INITER Initialise extension file registers 5 – 6 MITSUBISHI ELECTRIC...
  • Page 89: Entering Applied Instructions

    More Advanced Programming Applied Instructions Reference Controller Instruc- Category Function tion FLCRT Create/check file Delete file/CF card format FLDEL Insructions for a CF memory card FLWR Write data to CF card © mounted in a FLRD Read data from CF card special adapter -CF-ADP -CF-ADP command...
  • Page 90: Instructions For Moving Data

    If you add a “P” to the MOV instruction (MOVP) it will only be executed once, on the rising edge of the signal pulse generated by the input condition. 5 – 8 MITSUBISHI ELECTRIC...
  • Page 91 More Advanced Programming Instructions for Moving Data In the example below the contents of D20 are written to data register D387 when the state of M110 changes from “0" to ”1". Ladder Diagram Instruction List M110 0 LD M110 MOVP D20 D387 1 MOVP D387 After this single operation has been performed copying to register D387 stops, even if the...
  • Page 92: Moving Groups Of Bit Devices

    Sign bit (0: positive, 1: negative) MOV D0 K2 M0 These relays will not be changed M12 M11 M10 M14 M13 MOV K2 M0 D1 Sign bit (0: positive, 1: negative) Bit 15 Bit 0 5 – 10 MITSUBISHI ELECTRIC...
  • Page 93: Moving Blocks Of Data With The Bmov Instruction

    More Advanced Programming Instructions for Moving Data 5.2.3 Moving blocks of data with the BMOV instruction The MOV instruction described in section 5.2.1 can only write single 16 or 32 bit values to a destination. If you want, you can program multiple sequences of MOV instructions to move contiguous blocks of data.
  • Page 94: Copying Source Devices To Multiple Destinations (Fmov)

    D 15 D 16 Here too, FMOV has a pulse-triggered version, FMOVP (see section 5.1.2 for details on pulse-triggered execution). You can also transfer 32-bit data by prefixing the instruction with “D” (DFMOV and DFMOVP). 5 – 12 MITSUBISHI ELECTRIC...
  • Page 95: Exchanging Data With Special Function Modules

    More Advanced Programming Instructions for Moving Data 5.2.5 Exchanging data with special function modules You can add expansion modules to increase the number of inputs and outputs available to all base units of the MELSEC FX series except the FX and the FX models.
  • Page 96 Units of data: 5 Units of data: 2 D100 Adr. 5 D100 Adr. 5 D101 Adr. 6 D101 Adr. 6 D102 Adr. 7 D102 Adr. 7 D103 Adr. 8 D103 Adr. 8 D104 Adr. 9 D104 Adr. 9 5 – 14 MITSUBISHI ELECTRIC...
  • Page 97 More Advanced Programming Instructions for Moving Data The value you can enter for the number of data units depends on the PLC model you are using and whether you are using the 16-bit or 32-bit version of the FROM instruction: Valid range for no.
  • Page 98: Compare Instructions

    1. Device 1: ON if Value 1 > Value 2 2. Device 2: ON if Value 1 = Value 2 3. Device 3: ON if Value 1 < Value 2 5 – 16 MITSUBISHI ELECTRIC...
  • Page 99 More Advanced Programming Compare Instructions In this example the CMP instruction controls relays M0, M1 and M2. M0 is “1” if the contents of D0 is greater than 100; M1 is “1” if the contents of D0 is precisely 100 and M2 is “1” if D0 is less than 100.
  • Page 100: Comparisons Within Logic Operations

    The output of the instruction is only set to "1" if the first value is greater than or equal to the second value. To compare 32-bit data prefix a D (for double word) to the compare condition: Ladder Diagram Instruction List D> D10 D250 0 LDD> D250 This "D" specifies 32-bit data 5 – 18 MITSUBISHI ELECTRIC...
  • Page 101 More Advanced Programming Compare Instructions The example above checks whether the contents of data registers D10 and D11 are greater than the contents of registers D250 and D251. More examples: Ladder Diagram Instruction List 0 LD>= >= C0 D20 5 OUT Relay M12 is set to "1"...
  • Page 102 The comparison options are the same as those described above for a comparison at the begin- ning of an operation. Here too, you can also compare 32-bit values with an OR operation: Ladder Diagram Instruction List 0 LD 1 ORD= C200 D= C200 D10 This "D" specifies 32-bit data 5 – 20 MITSUBISHI ELECTRIC...
  • Page 103: Math Instructions

    More Advanced Programming Math Instructions Math Instructions All the controllers of the MELSEC FX family can perform all four basic arithmetical operations and can add, subtract, multiply and divide integer numbers (i.e. non-floating-point numbers). These instructions are described in this section. The controller base units of the FX , FX , FX...
  • Page 104: Addition

    In the following example the constant value 27 is only added to the contents of D47 once, in the program cycle in which the signal state of relay M47 changes from "0" to "1": Ladder Diagram Instruction List 0 LD ADDP D47 K27 D51 1 ADDP 5 – 22 MITSUBISHI ELECTRIC...
  • Page 105: Subtraction

    More Advanced Programming Math Instructions 5.4.2 Subtraction The SUB instruction calculates the difference between two numerical values (contents of 16-bit or 32-bit devices or constants). The result of the subtraction is written to a third device. Ladder Diagram Instruction List 0 SUB SUB D0 D1 D2 ³...
  • Page 106: Multiplication

    The MUL instruction can also be executed in pulse-triggered mode by adding a "P" suffix to the MUL instructions (MULP, DMULP). The following multiplication is only executed when input X24 switches from "0" to "1": Ladder Diagram Instruction List 0 LD MULP D25 D300 D26 1 MULP D300 5 – 24 MITSUBISHI ELECTRIC...
  • Page 107: Division

    More Advanced Programming Math Instructions 5.4.4 Division The MELSEC FX family’s DIV instruction divides one number by another (contents of two 16-bit or 32-bit devices or constants). This is an integer operation and cannot process float- ing-point values. The result is always an integer and the remainder is stored separately. Ladder Diagram Instruction List 0 DIV...
  • Page 108: Combining Math Instructions

    D103. – If the sum of D101 through D103 does not exceed the permitted range it is multiplied by the factor 4 and the result is written to D104 and D105. 5 – 26 MITSUBISHI ELECTRIC...
  • Page 109: Expansion Options

    Expansion Options Introduction Expansion Options Introduction You can expand the base units of the MELSEC FX series with expansion modules and special function modules. These modules are divided into three categories: b Modules that that occupy digital inputs and outputs (installed on the right of the controller). These include the compact and modular digital expansion and special function modules.
  • Page 110: Communications Modules

    Expansion Options 6.2.3 Communications modules Mitsubishi Electric produces a range of interface modules and adapters with serial ports (RS-232, RS-422 and RS-485) for connecting peripherals or other controllers. A number of special communications modules are available for integrating the MELSEC FX...
  • Page 111: Processing Analog Values

    Processing Analog Values Analog Modules Processing Analog Values Analog Modules When you automate processes you will frequently need to acquire or control analog values such as temperatures, pressures and filling levels. With the exception of the FX *, without additional modules the base units of the MELSEC FX family can only process digital input and output signals (i.e.
  • Page 112 The example on the next page shows an analog signal being used as a setpoint value for a fre- quency inverter drive. In this application the current or voltage signal from the PLC adjusts the speed of the motor connected to the frequency inverter. 7 – 2 MITSUBISHI ELECTRIC...
  • Page 113: Criteria For Selecting Analog Modules

    Processing Analog Values Analog Modules Inverter Base unit of Analog output FX family module Voltage or Digital value current Digital/Analog conversion e. g. 2000 z. B. 5 V oder 12 mA The level of the current or vol- tage signal from the PLC con- trols the speed of the connected motor.
  • Page 114: Adapter Boards, Special Adapters And Special Function Modules

    PLC base unit is carried out via the memory buffer of the special function module with the help of FROM and TO instructions (see section 5.2.5). FX -4 AD -T C A / D 7 – 4 MITSUBISHI ELECTRIC...
  • Page 115: List Of Analog Modules

    Processing Analog Values List of Analog Modules List of Analog Modules Designa- No. of Modul Type Range Resolution tion channels Voltage: 2.5 mV (12 bits) 0 V to 10 V DC -2AD- Current: 8 µA (11 bits) 4 mA to 20 mA DC Adapter Board Voltage:...
  • Page 116 Thermocouple type K: 0.4 gC -100 gC to 1200 gC -4AD- Thermocouple type J: 0.3 gC -100 gC to 600 gC The special function block FX -8AD is able to measure voltage, current and temperature. 7 – 6 MITSUBISHI ELECTRIC...
  • Page 117 Processing Analog Values List of Analog Modules Designa- No. of Modul Type Range Resolution tion channels For example with a ther- mocouple type K: 0.1 gC or 1 gC -100 gC to 1300 gC -2LC (depends on tempera- Pt100 resistance Temperature ture probe used) thermometer:...
  • Page 118 List of Analog Modules Processing Analog Values 7 – 8 MITSUBISHI ELECTRIC...
  • Page 119: Index

    Index Index ADD instruction · · · · · · · · · · · · · · · · 5-22 EEPROM · · · · · · · · · · · · · · · · · · · 2-13 ANB instruction ·...
  • Page 120 Octal numbers · · · · · · · · · · · · · · · · · 3-4 Optical couplers· · · · · · · · · · · · · · · · · 2-7 MITSUBISHI ELECTRIC...
  • Page 122 Goštautų g. 3 LT-48324 Kaunas Phone: +370 37 262707 Fax: +370 37 455605 Mitsubishi Electric Europe B.V. / FA - European Business Group / Gothaer Straße 8 / D-40880 Ratingen / Germany / Tel.: +49(0)2102-4860 / Fax: +49(0)2102-4861120 / info@mitsubishi-automation.com / www.mitsubishi-automation.com...
  • Page 123 Fax: +36 (0)1 / 431-9727 Fax: +380 (0)44 / 494-33-66 Fax: +1 (847) 478-0328 Mitsubishi Electric Europe B.V. / FA - European Business Group / Gothaer Straße 8 / D-40880 Ratingen / Germany / Tel.: +49(0)2102-4860 / Fax: +49(0)2102-4861120 / info@mitsubishi-automation.com / www.mitsubishi-automation.com...

Table of Contents