Home
Mitsubishi Electronics FX1S User's Manual
Contents
1. x12 Up counting Up counting Down counting X13 TI x14 LL ul OUUU ul JI ou 8200 X13 Counters gl RST C200 present 9 4714 4 X14 value 12 2 be C200 KS 2 5 p Y1 4 i 4 If output is already K mj Y1 turned ON ee 7 8 The output coil of C200 is set ON when the current value increases from 6 to 5 However if the counters value decreases from 5 to 6 the counter coil will reset The counters current value increases or decreases independently of the output contact state ON OFF Yet if a counter counts beyond 2 147 483 647 the current value will automatically change to 2 147 483 648 Similarly counting below 2 147 483 648 will result in the current value changing to 2 147 483 647 This type of counting technique is typical for ring counters The current value of the active counter can be rest to 0 zero by forcibly resetting the counter coil in the example program by switching the input X13 ON which drives the RST instruction The counting direction is designated with special auxiliary relays M8200 to M8234 Battery backed latched counters e Counters which are battery backed latched are able to retain their status information even after the PLC has been powered dow
2. S 20 S 30 S 40 S 20 S 30 S 40 S 20 S 30 S 20 S 30 XO X1 x2 XO X1 gt XO T XO X1 x2 X3 X4 S 50 S 60 S 40 S 50 S 40 S 50 S 50 S 60 I Rewrite as Jl Rewriteas YI y l S 20 S 30 S 40 S 20 S 30 S 40 S 20 S 30 S 20 S 30 XO X1 X2 XO X1 XO XO S 100 Dummy state s 101 Dummy 5108 Dummy 15753 DUMMY state state state 101 8102 8100 S100 S103 S103 X3 X4 ate TT I xi x2 GE S 50 560 540 550 540 S50 In Instruction In Instruction de format format A gy STL S 20 STL S 20 STL S 20 STL S 20 LD xX 0 STL S 30 LD X 0 STL S 30 SET S 100 STL S 40 SET S 102 LD xX 0 STL S 30 LD X 0 STL S 30 SET S 103 LD X 1 SET S 101 LD x 1 STL S 103 SET S 100 STL S 101 SET S 102 LD S 103 STL S 40 LD S 101 STL S 102 AND X 1 LD xX 2 SET S 50 LD S 102 SET S 40 SET S 100 SET S 60 SET S 40 LD S 103 STL S 100 SET S 50 AND X 2 LD S 100 SET S 50 AND X 3 SET S 50 LD S 100 AND X 4 SET S 60 ata MITSUBISHI 3 14 FX Series Programmable Controllers STL Programming 3 3 10 Further recommended program changes S 20 S 20 Rewrite as XO X10
3. 2 16 Timer Counter Out amp Reset FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps oer 32 bit A gm pre counters Others 3 Resets timer and ee PER RST counter coils RST I 2 15 for other T C 2 Ge esotabl devices Program example 2 16 1Basic Timers Retentive Timers And XO Counters RSTI 1246 l E These devices can all be reset at any time by e driving the RST instruction with the number 1 of the device to be reset T246 On resetting all active contacts coils and K1234 current value registers are reset for the T246 selected device In the example T246 a 1msec retentive timer is activate while X1 is ON When the current value of T246 reaches X2 the preset K value i e 1234 the timer coil for M8200 T246 will be activated This drives the NO contact ON Hence YO is switched ON Turning ON XO will reset timer T246 in the X3 RSTI C200 manner described previously d Because the T246 contacts are reset the output YO will be turned OFF X4 C200 I Se y Retentive timers e For more information on retentive timers please see page 4 17 ata MITSUBISHI 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 progra
4. 2 15 Set and Reset FXis FX1n FX2n FX2nc Mnemonic Function Format Devices Program steps e Y M 1 SET Sets a bit device SET permanently ON AH_SET y LMS S special ds coils 2 Y M S D V Z RST An SEN see section D special D HRST I 2 16 for timers Jregisters V and Rener o and counters Z 3 T C Program example XO 0 LD X 0 Kg 1 SET Y 0 X1 2 LD xXx 1 RST YO pg 3 RST Y 0 X2 4 LD X 2 SETI MO Kr 5 SET M 0 X3 6 LD X 3 RST MO pg 7 RST MO XA 8 LD X 4 Es 9 SET S 0 Hi SETI 80 10 LD X 5 11 RST S 0 RST SO 12 LD e X6 Ree 13 RST D 0 RST DO Basic points to remember Turning ON X0 causes YO to turn ON YO remains ON even after XO turns OFF Turning ON X1 causes YO to turn OFF YO remains OFF even after X1 turns OFF x1 SET and RST instructions can be used for the same device as many times as YO necessary However the last instruction activated determines the current status XO Itis also possible to use the RST instruction to reset the contents of data devices such as data registers index registers etc The effect is similar to moving KO into the data device Resetting timers and counters 2 e Please see next page ata MITSUBISHI 2 17 FX Series Programmable Controllers Basic Program Instructions 2
5. MSB Most Significant Bit Data retention Data can be retained in the general use registers when the PLC is switched from RUN to STOP if special auxiliary relay M8033 is ON Data register updates e Writing a new data value to a data register will result in the data register being updated with the new data value at the end of the current program scan ata MITSUBISHI 431 FX Series Programmable Controllers Devices in Detail 4 4 12 2 4 12 3 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 Using the FX2 40AW AP e When using an FX with either the FX2 40AW or the FX2 40AP a proportion of the latched data registers are automatically assigned for communications use by the FX2 40AW AP module Communication between Master and Slave 100 points M800 to M899 10 points D490 to D499 Communication between Slave and Master 100 points M900 to M999 10 points D500 to D509 Special Diagnostic Registers Special registers are used to control or monitor various modes or devices inside the PLC Data written in these
6. Identification of normally closed contacts This example has used the line convention to identify normally closed contacts for further variations and different methods used to perform this task please see the information note page 3 3 ata MITSUBISHI 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 X12 v Y7 Y3 A y X1 p X5 y CM RER The sequence of physical events from initial power On are 1 The pickup arm is moved to its zero point when the start button X12 is pressed When the pickup arm reaches the zero point the zero point lamp Y7 is lit 2 The pickup arm is lowered YO until a ball is collected Y1 If the lower limit switch X2 is made a small ball bearing has been collected consequently no lower limit switch signal means a large ball bearing has been collected Note a proximity switch X0 within the source pool identifies the availability of ball bearings 3 Depending on the collected ball the pickup arm retracts output Y2 is operated until X3 is received and moves to the right Y3 where it will stop at the limit switch X4
7. There are many different methods to drive a state for example the initial state coils could Se v be pulsed SET or just included in an OUT S 22 K20 instruction However within Mitsubishi s STL TO rogramming language an STL coil which is TO SET hasa different Ge than one that is aie i SET S 27 included in an OUT instruction S E i E VM Note For normal STL operation it is recommended that the states are selected using the SET instruction To activate an STL step its state coil is SET ON ata MITSUBISHI 3 3 FX Series Programmable Controllers STL Programming 3 Initial Steps For an STL program which is to be activated A GS on the initial power up of the PLC a trigger pla SET 1 S005 similar to that shown opposite could be used STL x001 i e using M8002 to drive the setting of the JP Y000 initial state 5005 x000 The STL step started in this manner is often You1 referred to as the initial step Similarly the X012 step activated first for any STL sequence is ana also called the initial step AOIS 3 3 3 Terminating an STL Program Once an STL program has been started the programmable controllers CPU will process all fol lowing instructions as being part of that STL program This means that when a second pro gram scan is started the normal instructions at the beginning of the program are considered to be within the STL prog
8. 7 15 e PE Device FADE ami at rt esne 8 1 8 1 Performance Specification Of The FX1S rrrrnnrnnnnnrnnrnnnnnrrnrrnnnnnrnrrnnnenerrnnnenernnn 8 1 8 2 Performance Specification Of The FX1N aaa au nana anen aa eee z eve eee eee eee eee 8 2 8 3 Performance Specification Of The FX2N and the FX2NC Plein 8 4 9 Assigning System Devices aaa aaa ne eee eee e ve evente 9 1 9 1 Addressing Extension Modules gure onds kong heder re sd iii 9 1 9 2 Real Time Clock Function ed ds tintes 9 2 9 2 1 Setting the real time clock au aaa auaa aaa aaa seen sene ee vere nano cc nana 9 2 ata MITSUBISHI vi 10 Ponte Of LEE sr re n s Sri d hi eo T n n 10 1 10 1 Advanced Programming Points usos cli 10 1 10 2 Users of DC Powered FX UNIS 5 Seege dsd coli d h 10 1 10 3 Using The Forced NEE leese dt 10 2 10 3 1 A RUN STOP push button configuration aaa uaa aaa aaa nanen nenen never ee vere eee zere eee 10 2 10 3 2 Remote RUN STOP Control 10 3 10 4 Constant Scan Mode sa 10 4 10 5 Alternating ON OFF Siba ananasen ed 10 4 10 6 Using Battery Backed Devices For Maximum Advantage A 10 5 10 7 Indexing Through Multiple Display Data Values eeeneeeeeeeeeeeeeeereeeernn 10 5 10 8 Reading And Manipulating Thumbwheel Data 10 6 10 9 Measuring a High Speed Pulse Input 10 6 10 9 1 A 1 msec timer pulse measurement aaa ae nenene eseve eee ee veren eee eee tete 10 6 10 9 2 A 0 1 msec timer pulse measure Met ann eee ne e nenen ed
9. X1 T250 K345 T250 Y1 X2 RSTT250 kti pt2 ti 12 34 55 X1 Present value cc 1 Y1 l X2 l Using timers in interrupt or CALL subroutines Please see page 4 18 Available devices e Please see the information table on page 4 15 ata MITSUBISHI FX Series Programmable Controllers Devices in Detail 4 4 9 4 4 9 5 Timers Used in Interrupt and CALL Subroutines FX1s FXin 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 Timers other than those specified above cannot function correctly within the specified circumstances When an interrupt timer 1 msec resolution is used in an interrupt routine or within a CALL subroutine the output contact is activated when the first coil instruction of that timer is executed after the timer has reached its preset maximum duration value Timer Accuracy Timer accuracy can be affected by the program configuration That is to say if a timer contact is used before its associated coil then the timer accuracy is reduced The following formulas give maximum and minimum errors for certain
10. 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 By programming an external diagnosis circuit as shown below and monitoring special data register D8049 the lowest activated state from the annunciator range will be displayed Each of the states can be assigned to signify an error or fault condition As a fault occurs the associated state is driven ON If more than one fault occurs simultaneously the lowest fault number will be displayed When the active fault is cleared the next lowest fault will then be processed This means that for a correctly prioritized diagnostic system the most dangerous or damaging faults should activate the lowest state flags from the annunciator range All state flags used for the annunciator function fall in the range of battery backed latched state registers Monitoring is enabled by driving special auxiliary relay M8049 ON M8000 State 5900 is activated if input XO is not driven 18043 within one second after the output YO has been turned ON l l YO xo FNC46 State S901 is activated when both inputs X1 and ANS TO K10 15900 X2 are OFF f
11. X20 X20 CALLIPI CJ PO S d fl 3 FEND Po CO P1 gt SRET 1 Available devices e FXis PLC s have 64 pointers available from the range of PO to P63 e FXIiN FX2n and FX2nc PLC s have 128 pointers available from the range of PO to P127 Jumping to the end of the program e When using conditional jump instructions CJ function 00 the program end can be jumped to automatically by using the pointer P63 within the CJ instruction Labelling the END instruction with P63 is not required 2 Device availability For more information about device availability for individual PLC s please see chapter 8 ata MITSUBISHI 4 10 FX Series Programmable Controllers Devices in Detail 4 4 6 Interrupt Pointers FXis FXin 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 vvhen the program is vievved in ladder mode see Din the example device usage diagram Devices numberedin Special numbering system based on interrupt device used and input triggering method Further uses Input interrupts see page 4 12 Timer interrupts see page 4 12 Disabling interrupts see page 4 13 Counter interrupts see page 4 13 Example device usage FEND o IRET END
12. Coils are driven automatically by the PLC Only the contacts of these coils may be used by a user defined program Examples M8000 RUN monitor ON during run M8002 Initial pulse Turned ON momentarily when PLC starts M8012 100 msec clock pulse b Driving coils of special auxiliary relays APLC executes a predetermined specific operation when these coils are driven by the user Examples M8033 All output statuses are retained when PLC operation is stopped M8034 All outputs are disabled M8039 The PLC operates under constant scan mode Available devices e Not all PLC s share the same range quantity or operational meaning of diagnostic auxiliary relays Please check the availability and function before using any device PLC specific diagnostic ranges and meanings are available in chapter 6 4 3 4 Special Single Operation Pulse Relays FXis FXin FX2n FX2nc When used with the pulse contacts LDP LDF etc M devices in the range M2800 to M3072 have a special meaning With these devices only the next pulse contact instruction after the device coil is activated MO to M2799 M2800 to M3072 g og Qs og Turning ON XO causes MO to turn ON Turning ON X0 causes M2800 to turn ON e Contacts and are pulse con e Contact is a pulse contact and acti tacts and activate for 1 scan vates for 1 scan e Contact O is a normal LD contact and e Contacts and are pulse contac
13. ata MITSUBISHI 2 6 FX Series Programmable Controllers Basic Program Instructions 2 2 7 Or Or Inverse FX1s FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Parallel OR connection of NO OR normally open AMS contacts Parallel ORI connection of NC OR Inverse normally closed Jr AMS contacts Program example X4 GO 0 LD X 4 Ke 1 OR X 6 X6 pg 2 ORI M 102 OR 3 OUT Y 5 M102 4 LDI Y 5 5 AND X 7 or Kee 6 OR M 103 Y5 X7 X10 SEA O Ke 8 OR M110 VF 9 OUT M 103 M103 M110 Basic points to remember Use the OR and ORI instructions for parallel connection of contacts To connect a block that contains more than one contact connected in series to another circuit block in parallel use an ORB instruction Connect one side of the OR ORI instruction to the left hand bus bar Peripheral limitations e The PLC has no limit to the number of contacts connected in series or in parallel However some programming panels screens and printers will not be able to display or print the program if it exceeds the limit of the hardware It is preferable for each line or rung of ladder program to contain up to a maximum of 10 contacts and 1 coil Also keep number of follow on outputs to a maximum of 24 ata MITSUBISHI 2 7 FX Series Programmable Controllers Basi
14. 1x 1 9 Second Right Hand Block 1 x 4 1x 2 1x 1 7 Extreme Right Hand Block 1 x 4 1x 1 5 BCD data is read from left to right as a normal number would be read Therefore in this example the 9 would actually represent 9000 The second right hand block is actually 70 not 7 The units are provided by the extreme right hand block i e 5 The hundreds 100 s would have been provided by the second left hand block which is in error It is also important to note that there is no sign with BCD converted data The maximum number allowable for a single data word is 9999 and the minimum is 0000 Word Data Summary In each of the previous cases the original bit pattern had a further meaning To recap the three new readings and the original bit pattern Decimal k 24971 Hexadecimal 9E75 BCD E Error 9775 Each meaning is radically different from the next yet they are all different vvays of describing the same thing They are in fact all equal to each other ata MITSUBISHI 4 41 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 sub
15. Connect the LD and LDI instructions directly to the left hand bus bar Or use LD and LDI instructions to define a new block of program when using the ORB and ANB instructions see later sections The OUT instruction e For details of the OUT instruction including basic timer and counter variations please see over the following page ata MITSUBISHI 2 3 FX Series Programmable Controllers Basic Program Instructions 2 2 5 Out FX1s FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Y M 1 S special M Final logical a OUT coils 2 operation type coil Y M S T C OUT Bo yp A Ka 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 It is possible to connect multiple OUT instructions in parallel for example see the previous page M100 TO configuration 2 5 1 Timer and Counter Variations When configuring the OUT instruction for use as either a timer T or counter C a constant must also be entered The constant is identified by the letter K for example see previous page TO K19 In the case of a timer the constant K holds the duration data for the timer to operate i e ifa 100 msec timer has a constant of K100 it will be 1005 100 msec 10 seconds before the timer coil ac
16. What do You Need to Program a PLC A SIA A TERNE 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 FX1S FXAN FX2N FX2NC Opto isolated FX 20P CABO RS232 RS422 interface HPP FX 10P E FX 20P E Personal computer Melsec MEDOC Melsec Medoc Plus SW1PC FXGPEE FX PCS WIN E ata MITSUBISHI 1 2 Introduction 1 1 4 Special considerations for programming equipment 1 4 1 Current Generation CPU all versions 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 FXis FXin FX2n FX2nc However because of the downward compatibility of the current range it is not necessary to upgrade existing programming tools up to the equivalent functionality of last generation FX CPU ver 3 30 units Peripherals Table System software version with Description Model Number full support Hand held programmer HHP FX 10P E from V 3 00 HHP cassette FX 20P MFXA E from V 3 00 FX 10DU E from V 4 00 FX 20DU E Supports up to FX devices only FX 25DU E from V 2 00 FX 30DU E from V 3 00 Data access units FX 40DU E S Supp
17. pickup arm pickup arm OX3 Upper limit reached O X3 Upper limit reached X4 X5 s 24 YD s 27 HD oX4 Move to small ball bucket o X5 Mowe to large ball bucket S 30 Lower pickup arm OX2 Lower limit reached S31 DST Y1 Release ball K10 nt LC S 32 Ya Raise pickup arm OX3 Upper limit reached x1 S 33 Return to zero point OX1 Zero point reached ata MITSUBISHI 3 19 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 The IST instruction provides the user with a pre formatted way of creating a multi mode program The modes available are a Automatic Single step Single cycle Continuous b Manual Operator controlled Zero return More details on this instruction can be found on page 5 67 ata MITSUBISHI 3 20 FX Series Programmable Controllers Devices in Detail 4 10 freee TJ E Prem 7 Dirr Clene L Presents TJ leese P nie Sete bores 7 qe ata MITSUBISHI FX Series Programmable Controllers Devices in Detail 4 Chapter Contents A Devices IM Detail ao even ke dr e s benene 4 1 Gi El E
18. 3 4 1 Using SET to drive an STL coil SET is used to drive an STL state coil to make the step active Once the current STL step activates a second following step the source STL coil is reset Hence although SET is used to activate a state the resetting is automatic However if an STL state is driven by a series of standard ladder logic instructions X000 S040 i e not a preceding STL state then 5020 standard programming rules apply 5020 In the example shown opposite S20 is not GI 5030 reset even after S30 or S21 have been E driven In addition if S20 is turned OFF 530 will also stop operating This is RST 5022 because S20 has not been used as an STL state The first instruction involving the status of S20 is a standard LoaD instruction and NOT an STL instruction Note If a user wishes to forcibly reset an STL step using the RST or ZRST FNC X000 40 instructions would perform this task ul ZRSTI S21 528 E e SET is used to drive an immediately following STL step which typically will have a larger STL state number than the current step SET 5021 e SET is used to drive STL states which occur within the enclosed STL program flow i e SET is not used to activate a state which appears in an unconnected second STL flow diagram ata MITSUBISHI 3 5 FX Series Programmable Controllers STL Programming 3 3 42 U
19. 3 The total number of branches which can be programmed with the STL programming mode are limited to a maximum of 16 circuits for an STL flow Each branch point is limited to a maximum of 8 branching flows This means two branch points both of 8 branch flows would equal the restriction These restrictions are to ensure that the user can always view the STL flow diagram on the computer running the FX PCS AT EE software and that when it is needed the STL program flow can be printed out clearly ata MITSUBISHI 3 15 FX Series Programmable Controllers STL Programming 3 3 11 3 11 1 Programming Examples FXis FXin FX2n FX2nc A Simple STL Flow Loading hopper Y12 Y10 Start button X0 Ore truck x1 4 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 This activates a Zone ReSeT ZRST is applied instruction 40 instruction which ensures all of M8002 the operational STL states within the program f ZRST 5211 S25 E are reset The program example opposite shows an M8002 ZRST example The push button X0 acts as a start button and a mode selection button The STL state SO is initialized with the Z
20. 2 Basic Program Instructions iio decile 2 1 2 CMV ITAL IS PTO QAI A oi ke dd cual Sas 2 1 2 2 Outline of Basic Devices Used in Progorammimg 2 1 2 3 How to Read Ladder Logic EE 2 2 2 4 Load Load IN VET S E aaa aaa an aaa aaa anen eee aaa eee eee ate nete detet eee eee eee peten te tete ese te teke eee e tee eee ti 2 3 20 Ee eege de 2 4 2 5 1 Timer and Counter Variations ooooccccnonnccccnnonnooncnnnononnncnnnanonnnnnnnno nn nnnnnnn rannen ennnen 2 4 2 5 2 Double Coil Designation nano cnc nn cnn arrancan ranas 2 5 2 6 And And INvVersS A A A E 2 6 2 Or EE ENEE ee AER e 2 7 2 8 Load Pulse Load Trailing PUlse rnnrrnrnnnvvnvnnnnrrnnnnnnnnnvnnrnnnvnnnnnnnnvnnnnnnnnnnnnnnenn 2 8 2 9 And Pulse And Trailing Pulse up ANER dg 2 9 2 10 Or Pulse Or Trailing PUSS en got s b cr di r n kat te t EEES 2 10 211 OF BIOR s nt EE 2 11 2 12 Ana BlOCK rs dei sken n ev dd ara 2 12 2 13 MPS MRD and MPP a s kn jer de kd e died 2 13 2 14 Master Control and RESOt au EEN 2 15 215 Set Ad R segg h 2 17 2 16 Timer Counter Out amp ROSE v gene ai pd hd h sh ot Aalen 2 18 2 16 1 Basic Timers Retentive Timers And GOUN te IS aaa aaa anon nana nanen enen enen ever ever esen nenes enes 2 18 2 16 2 Normal 32 bit COUNTELS aaa aaa aaaann anes aR eee eee eee rene eee ev AER E a AA ete terenit 2 19 2 16 3 High Speed Counters acts niset tthe ined dt dai edha dt dt 2 19 2 17 Leading and Trailing Pulse ninia 2 20 NUI ee Zeie Eege
21. Additional applied instructions e Interrupts are made up of an interrupt device an interrupt pointer and various usage of three dedicated interrupt applied instructions IRET function 03 interrupt return see page 5 9 El function 04 enable interrupt see page 5 9 DI function 05 disable interrupt see page 5 9 Nested levels e While an interrupt is processing all other interrupts are disabled To achieve nested interrupts the El DI instruction must be programmed within an interrupt routine Interrupts can be nested for two levels Pointer position e Interrupt pointers may only be used after an FEND instruction first end instruction function 06 ata MITSUBISHI 4 11 FX Series Programmable Controllers Devices in Detail 4 4 6 1 Input Interrupts Identification of interrupt pointer number 1 UO 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 FXis has 4 points 0 to 3 which map to XO to X3 Other units have 6 points 0 to 5 which map to XO to X5 Example 1001 The sequence programmed after the label indicated by the 1001 pointer is executed on the leading or rising edge of the input signal XO The program sequence returns from the interruption program when an IRET instruction is encountered Rules of use e The following points must be followe
22. t15a Program sdu kand i aio 2 1 2 2 Outline of Basic Devices Used in Progorammimg 2 1 2 3 How to Read Ladder Logic uni ini ist v NEEN idad 2 2 2 4 LoadH Log NVOFSO EE 2 3 25 UM vent esh hd it n n 2 4 2 5 1 Timer and Counter Variations kana aaa ananas nenen ee ee vene eee vere eee eee rrene eter eee rei 2 4 2 5 2 Double Coil Designation aaa aaa aaa anes eee neve aaa eee see nenes eee eee tentene 2 5 216 A O ANIOS On nd Ke atit dat di 2 6 22s LOK O Ve SE REE 2 7 2 8 Load Pulse Load Trailing Pulse ss disi erter den dha add 2 8 2 9 And Pulse And Trailing TEE 2 9 2 10 Or Pulse Or Ree DU 2 10 E O o ee T EA A 2 11 2 12 And BlO EE 2 12 2182 MPS MRD and TEE 2 13 2 14 Master Control and Reset unnsamuivneuinaieskeinvskuinrraaneibiaistui 2 15 215 Set and RES iria 2 17 2 16 Timer Counter Qut amp RO SOT ca mune iia 2 18 2 16 1 Basic Timers Retentive Timers And Counters aaa aa aaa nana aaa nana nenen eee er er ere se nenes eseses 2 18 2 16 2 Normal 32 bit COUNTELS aaa aaa a a eren eee ever dere eee netet ete t n tete vene rete terenit 2 19 ST 2 19 2 17 Leading and Trailing Pulse sst ia iii 2 20 El 2 21 E WT EE 2 22 220 ENA RE 2 23 ata MITSUBISHI FX Series Programmable Controllers Basic Program Instructions 2 2 1 2 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 i
23. 9 ata MITSUBISHI 41 FX Series Programmable Controllers Devices in Detail 4 4 2 Outputs Device Mnemonic Y Purpose Representation of physical outputs from the programmable controller Alias O P Otp Out Y Output Y Output coil relayl contact Available forms NO and NC contacts and output coils see example device usage for references Devices numbered in Octal i e YO to Y7 Y10 to Y17 Further uses None Example device usage Available devices OK FXis FXin FX2n FX2nc XO X1 HV Y10 Y10 by Maximum number of Maximum number of Absolute total PLC s inputs outputs available UO FX1s 16 14 30 FXIN 128 128 128 FX2N 256 addressable in 256 addressable in 256 Total addressed in FX2NC software software software hardware e Please note these are all the absolute maximums which are available The values are subject to variations caused by unit selection For configuration details please see chapter 9 For more information about the device availability for individual PLC s please see chapter 8 ata MITSUBISHI 4 2 FX Series Programmable Controllers Devices in Detail 4 4 3 4 3 1 FXis FXan FX2n FX2nc Auxiliary Relays Device Mnemonic M Purpose Internal programmable controller status flag Alias Auxiliary coil relay
24. AG 2 21 219 No Oper ias 2 22 PEN 2 23 ata MITSUBISHI i A a aa aaa EAE a EE 3 1 3 1 What is STL SFC And IEC1131 Part 3 3 1 3 2 How STL Operates Jed 3 2 3 21 Eden stepis a program eaa EAN diana e ES 3 2 3 3 How To Start And End An STL Program 3 3 3 3 1 Embedded STL programs aa auna aaa nenen seen ee eee eve ee eee ee vere enet eee teren 3 3 33 2 ACLvaling NOV StAlOS ss sace n EE 3 3 3 3 3 Terminating an STL Program 3 4 3 4 Moving Between STL StepS ENEE 3 5 3 4 1 Using SET to drive an STL coil oo eee aaa anen nenen ee eee se vere enen eee tet n reze teren 3 5 3 4 2 Using OUT to drive an STL CO luciano ette green 3 6 3 5 Rules and Techniques For STL programs EE 3 7 3 5 1 Basic Notes On The Behavior Of STL program Sa ua aaa aaa aaa eee even ee 3 7 3 5 2 Single Signal Step Control 3 9 3 6 Restrictions Of Some Instructions When Used With ST 3 10 3 7 Using STL To Select The Most Appropriate Program rnrvrnnnnnnrrnnnnnnvrrnnnnnnnnnn 3 11 3 8 Using STL To Activate Multiple Flows Gimultaneously 3 12 3 9 General Rules For Successful STL Branching oooccococcconnnccccccnnnoccncncnanancnnnnnnnos 3 14 3 10 General Precautions When Using The FX PCS AT EE Software 3 15 3 11 Programming un e EE 3 16 FA Simple ST LAF OW e deira ansees 3 16 3 11 2 A Selective Branch First State Merge Example Program 3 18 312 Advanced STL USO sites EE 3 20 4 Devices lit Detalla aa 4 1 21 UPS veto vese s
25. COSI IS diss ber oxen cites teed ces e te i ta ariel a 5 120 TSN PNG A ince toca eat DS 5 120 5 12 Data Operations 2 FNC 140 to FNC 10 5 122 SS E e ek 5 123 5 13 FX1S 8 FX1N Positioning Control FNC 150 to FNC 0 5 126 A O a 5 127 5 13 2 ZRN FNC 156 EE 5 128 FSS PLSV FNGI EE 5 129 AS DRVI ENG WSO EE 5 130 ESS DIR VAIN NE 5 132 5 14 Real Time Clock Control FNC 160 to FNC 108 5 136 ST TCMP PING EE 5 137 514 2 AA a a ia nian 5 138 SIS TADO PMO 5 139 FITTE A th at ta dE 5 140 SST FNC EE rege 5 141 5 14 6 TWR FNC 167 A asad I 5 142 e Eet le EE 5 143 5 15 Gray Codes FNC 170 to FNC 179 nnnnnnonnnnnnnnvenennnnnvnnenannvnnnnnenenennrnnnnnenennnnnne 5 146 FAT GR NG Telet 5 147 a a A aa a E EAE 5 147 5 15 SADIA FNC 10 on A 5 148 5 15 4 WR3A FNC EE EE 5 148 5 16 Inline Comparisons FNC 220 to FNC 249 ua aaa nana n nene enen eee eee eee eee 9 150 5 16 1 LD compare FNC 224 to 2901 5 151 5 16 2 AND compare FNC 232 to 2201 5 152 5 16 3 OR compare FNC 240 to 246 ua aa aaa aaa nanen neve ee sene cnn nn reze veres terre vere 5 153 ata MITSUBISHI v 6 Ree EK 6 1 6 1 PLC Status M8000 to M8009 and D8000 to Dog 6 2 6 2 Clock Devices M8010 to M8019 and D8010 to D8019 rrrnrrrnnnannnrrrnnnnnnvnnnnnr 6 3 63 Opera NONA EE 6 4 6 4 PLC Operation Mode M8030 to M8039 and D8030 to D8039 eee 6 5 6 5 Step Ladder STL Flags M8040 to M8049 and D8040 to D8049 6 6 6 6 Interr
26. Open contact es xo 6 Normally Closed contact ex1 SR Common alternatives are a and b S 22 KC S 26 Y26 gt identifiers for Normally Open TO gt Normally Closed states or often a line oTo el drawn over the top of the Normally Closed contact name is used e g 5 27 D X000 oT7 Le K20 How To Start And End An STL Program Before any complex programming can be undertaken the basics of how to start and more importantly how to finish an STL program need to be examined Embedded STL programs An STL style program does not have to LD X000 entirely replace a standard ladder logic E Normal Ladder Program program In fact it might be very difficult to do SE er so Instead small or even large section of STL STL S009 program can be entered at any point in a OUT Yoto program Once the STL task has been Ger pe Embedaed STL Program completed the program must go back to RET E processing standard program instructions until LD X005 the next STL program block Therefore Ge SE identifying the start and end of an STL program is very important Activating new states Once an STL step has been selected how is it used and how is the program driven This is not so difficult if it is considered that for an STL step to be active its associated state coil must be ON Hence to start an STL sequence all that has to be done is to drive the relevant state ON
27. RST C250 instruction K1234 X13 must be ON to select C250 But start input X7 must be ON to allow C250 to actually count If X7 goes OFF counting ceases Counter C250 uses input X3 to count up and input X4 to count down Device size e All of these counters have 32bit operation Setting range e 2 147 483 648 to 2 147 483 647 Direction setting e The counting direction for 1 phase counters is dependent on their corresponding flag M kkk where vevevr is the number of the corresponding counter C241 to C245 When M8wwrw is ON the counter counts down When M8www is OFF the counter counts up ata MITSUBISHI 4 28 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 Depending on the counter used start reset and other associated inputs are automatically allocated The A phase B phase input signal not only provide the counted signals but their EES relationship to each other will also dictate the counted direction A phase While the wave form of the A phase is in the ON state and B oh the B phase moves from OFF to ON the PER coun
28. XO XO X10 X10 Ka X4 X11 X14 XI T X4 X11 X14 S21 S 23 S 25 S 27 S21 S 23 S25 S 27 x2 X5 X12 X15 x2 X5 X12 X15 S 22 S 24 S 26 S 28 S 22 S 24 S 26 S 28 X3 X6 X13 X16 X3 X6 X13 X16 X7 X17 X7 X7 X17 X17 S 29 S 29 Program violation Rewrite as xe x7 S29 STL S 20 STL S 22 LD X 0 STL S 24 SET S 21 LD X 6 SET S 23 SET S 29 LD x 1 STL S 26 SET S 25 STL S 28 SET S 27 LD X 7 SET S 29 General Precautions When Using The FX PCS AT EE Software SEN EDEN ene This software has the ability to program in SFC flow diagrams As part of this ability it can read and convert existing STL programs back into SFC flows even if they were never originally programmed using the FX PCS AT EE software As an aid to allowing this automatic SFC flow generation the following rules and points should be noted 1 When an STL flow is started it should be initialized with one of the state devices from the range SO to S9 2 Branch selection or merging should always be written sequentially moving from left to right This was demonstrated on page 3 11 i e on the selective branch S21 was specified before 31 which was specified before S41 The merge states were programmed in a similar manner S29 proceeded S39 which proceeded S49
29. be found for the remaining base 16 numbers i e 10 11 12 13 14 and 15 The first six characters from the alphabet are used as the replacement indices e g A to F respectively As a result of base 16 counting 4 binary bits are required to represent one base 16 or hexadecimal number Hence a 16 bit data word will have a 4 digit hexadecimal code There is actually a forth interpretation for this bit sequence This is a BCD or Binary Coded Decimal reading The following section converts the original bit pattern into a BCD format ata MITSUBISHI 4 40 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 O 0 1 1 1 O 1 0 1 a 1 O 0 1 1 1 1 ole 1 1 1 0 1 0 1 It will be noticed that this will produce an ERROR The conversion will not be correct This is because BCD numbers can only have values from 0 to 9 but the second block of 4 bit devices from the left would have a value of 14 Hence the error The conversion process is very similar to that of hexadecimal except for the mentioned limit on values of 0 to 9 If the other blocks were converted just as an example the following values would be found Extreme Left Hand Block 1x 8
30. chapter ata MITSUBISHI 2 1 FX Series Programmable Controllers Basic Program Instructions 2 2 3 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 These contacts are available in both normally open NO and normally closed NC configurations The term normallly refers to the status of the contacts when the coil is not energized Using a relay analogy when the coil is OFF a NO contact would have no current flow that is a load being supplied through a NO contact vvould not operate Hovvever a NC contact vvould allovv current to flow hence the connected load would be active Activating the coil reverses the contact status that is the current vvould flovv in a NO contact and a NC contact vvould inhibit the flovv Physical inputs to the PLC X devices have no programmable coil These devices may only be used in a contact format NO and NC types are available Example Because of the close relay association ladder logic programs can be read as current flovving from the left vertical line to the right vertical line This current must pass through a series of contact
31. comparison instructions FNC s 53 54 55 are used XO and X1 must resort to software counting In this case please see the table below Calculating the maximum combined counting speed on FX1S Unit Function Max Combined Number Signal Frequency 53 or 54 11 kHz FX2n amp FXanc 55 5 5 kHz FXis amp FX1N 53 or 54 30 kHz This is calculated as follows 2 phase counter speed x number of counted edges the sum of the speeds of the active 1 phase counters ata MITSUBISHI 4 25 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 X10 counts up When X11 is ON C235 resets to 0 zero All X11 contacts of the counter C235 are also reset AST C235 When X12 is ON C235 is selected From the X12 previous counter tables the corresponding C235 gt counted input for C235 is X0 C235 therefore K1234 counts the number of times XO switches from OFF to ON Device specification e Al of these counters are 32bit up down ring counters Their counting and contact operations are the same as normal 32bit up down counters described on page 4 21 When the counters current value reaches its maximum or setting value the counters associated contacts are set and held when the counter is counting upwards However when
32. data registers Devices numbered in FXis FXin there are two devices V and or Z For FX2n and FX2nc there are 16 devices VO V7 and ZO Z7 Further uses Can be used to modify the following devices under certain conditions X Y M S P T C D K H KnX Kny KnM KnS Example device usage The program shown right transfers data from D5V to D10Z If the data contained in register V is equal to 8 and the data in register Z is equal to 14 then V 8 D5V D5 8 13 9 D13 Z 14 D10Z D10 14 24 gt D24 Hence the actual devices used after the modifiers V and Z have been taken into account are D13 and D24 and not D5 and D10 respectively Use of Modifiers with Applied Instruction Parameters e All applied instruction parameters should be regarded as being able to use index regis ters to modify the operand except where stated otherwise ata MITSUBISHI 4 35 FX Series Programmable Controllers Devices in Detail 4 4 13 1 4 13 2 4 13 3 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 20 If V 3276 then K20V o V 8276 3296 Misuse of the Modifiers Modifying Kn devices when Kn forms part of a device description such as KnY is not possible i e while the following use of modifiers
33. dl ez N o N Q d oi XO U D U D UD U JU U AJA A X1 U D R R DID D BIB B X2 U D U D U D R R R R X3 U D R SIR U U A A X4 U D U D D D B B X5 U D R R R R R X6 S S S X7 S S S Key U up counter input D down counter input R reset counter input S start counter input A A phase counter input B B phase counter input C235 Counter is backed up latched Input assignment X6 and X7 are also high speed inputs but function only as start signals They cannot be used as the counted inputs for high speed counters e Different types of counters can be used at the same time but their inputs must not coincide For example if counter C247 is used then the following counters and instructions cannot be used C235 C236 C237 C241 C242 C244 C245 C246 C249 C251 C252 C254 OCL 100 1200 Counter Speeds e General counting frequencies Single phase and bi directional counters up to 10 kHz A B phase counters up to 5 kHz Maximum total counting frequency A B phase counter count twice FXis amp FXin 6OKHz FX2n FXanc 20kHZ For FXan FX2nc Inputs XO and X1 are equipped with special hardware that allows higher speed counting as follows Single phase or bi directional counting depending on unit with C235 C236 or C246 up to 60 kHz Two phase counting with C251 up to 30 kHz ata MITSUBISHI 4 24 FX Series Programmable Controllers Devices in Detail 4 If any high speed
34. e The mantissa and exponent are stored in consecutive data registers Each part is made up of 16 bits and can EXPONENT MANTISSA be assigned a positive or negative value Data Register D 1 Data Register D indicated by the value of the most Pl Pot se bo register for each number Voge bit MSB Sign bit MSB 1 Negative 1 Negative e The mantissa is stored as the first 4 0 Positive 0 Positive significant figures without any rounding of the number i e a floating point number of value 2 34567 X 103 would be stored as a mantissa of 2345 at data register D and an exponent of 0 zero at data register D 1 e The range of available mantissa values is 0 1000 to 9999 and 1000 to 9999 e The range of available exponent values is 35 through to 41 e Scientific format cannot be used directly in calculations but it does provide an ideal method of displaying the data on a monitoring interface ata MITSUBISHI 4 44 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
35. equally well on any other quantity of bits ata MITSUBISHI 4 42 FX Series Programmable Controllers Devices in Detail 4 4 15 FXin FX2n FX2nc FXis 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 However there are two further formats which are becoming increasingly important and they are a Floating point and b Scientific notation Both of these formats are in fact closely related They both lend themselves to creating very large or very small numbers which can describe both whole and fractional components General note Sometimes the words Format Mode and Notation are interchanged when descrip tions of these numerical processes are made However all of these words are providing the same descriptive value and as such users should be aware of their existence Some useful constants T 3 141 X 100 27 6 283 X 100 nja 7 853 X 101 n2 9 869 X 100 The speed of light 2 997 X 108 m s Gravity g 9 807 X 100 m s2 e 2 718 X 100 Fixed points Boiling point of liquid oxygen 1 8297 X 102 C Melting point of ice 0 00 X 100 C Triple
36. following page explain this idea further ata MITSUBISHI 4 37 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 KNMO 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 MO to M3 and M4 to M7 giving a total of 8 bit devices or 1 byte The diagram below identifies more examples of Knyr use X37 X36 X35 X34 X33 X32X31X30 X16X15X14X13X12X11X10 X7 X6 X5 X4 X3 X2 X1 XO olifofofolilo gt 2 ofofifilofifofolififofifijlo K1X6 K1X0 K3X0 K8X0 K1X0 XO to X3 gt 4 bit devices with a head address of X0 K1X6 X6 to X11 gt 4 bit devices with a head address of X6 K3X0 XO to X13 gt 12 bit devices with a head address of X0 K8X0 X0 to X37 gt 32 bit devices with a head address of X0 Moving grouped bit devices O e If adata move involves taking source data and moving it into a destination which is smaller than the original source then the overflowing source data is ignored For example If K3M20 is moved to K1MO then only M20 to M23 or K1M20 is actually moved The remaining data K2M24 or M24 to M31 is ignored Assigning l O e Any value take
37. input X2 If this is NOT ON then the second Y3 coil does NOT activate Therefore the status of the Y3 coil updates to reflect this new situation i e it turns OFF The final outputs are then Y3 OFF and Y4 ON Use of dual coils The last coil effect OOo e Always check programs for incidents of dual coiling If there are dual coils the program will not operate as expected possibly resulting in physical damage e Ina dual coil designation the coil operation designated last is the effective coil That is itis the status of the previous coil that dictates the behavior at the current point in the program O tL ESCH g Input durations The ON or OFF duration of the PLC inputs must be longer than the operation cycle time of the PLC Taking a 10 msec standard input filter response delay into account the ON OFF duration must be longer than 20 msec if the operation cycle scan time is 10 msec Therefore in this example input pulses of more than 25Hz 1sec 20msec ON 20msec OFF cannot be sensed Input ON state NOT recognized Input ON state recognized Input OFF state NOT recognized 1 program processing Input processing Output processing A full program scan operation cycle 09000000 There are applied instructions provided to handle such high speed input requests ata MITSUBISHI 2 5 FX Series Programmable Controllers Bas
38. maximum or setting value the counters associated contacts are set and held when the counter is counting upwards However when the counter is counting downwards the contacts are reset Setting range e 2 147 483 648 to 2 147 483 647 Direction setting The counting direction for 1 phase counters is dependent on their corresponding flag M8w vri where vevevr is the number of the corresponding counter C241 to C245 When M8wwrw is ON the counter counts down When M8www is OFF the counter counts up ata MITSUBISHI 4 27 FX Series Programmable Controllers 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 Devices in Detail 4 way as standard 32bit counters X10 Counter C246 uses inputs RST C246 XO to count up and X11 X1 to count down C246 For any counting to take place the drive input D2 X11 must be ON to set and reserve the assigned inputs for the attached counter i e C246 Note XO moving from OFF to ON will increment C246 by one X1 moving from ON to OFF will decrement C246 by one Bi directional counter C250 can be seen to have Xb as its reset input and X7 as its start input Therefore a reset operation can be N C250 made externally without the need forthe
39. me me l 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 Changing a LD LDI ANB or an ORB instruction with a NOP instruction will change the circuit considerably quite possibly resulting in an error being generated After the program all clear operation is executed all of the instructions currently in the program are over written with NOP s ata MITSUBISHI 2 22 FX Series Programmable Controllers Basic Program Instructions 2 2 20 End FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps END Forces the current END program scan to END N A 1 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 Inserting END instructions in the middle of the program helps program debugging as the section after the END instruction is disabled and isolated from the area that is being checked Remember to delete the END instructions from the blocks which have already been checked When the END instruction is processed the PLCs watchdog timer is automatically refreshed A progra
40. points to remember An ORB instruction is an independent instruction and is not associated with any device number Use the ORB instruction to connect multi contact circuits usually serial circuit blocks to the preceding circuit in parallel Serial circuit blocks are those in which more than one contact connects in series or the ANB instruction is used To declare the starting point of the circuit block use a LD or LDI instruction After completing the serial circuit block connect it to the preceding block in parallel using the ORB instruction Batch processing limitations e When using ORB instructions in a batch use no more than 8 LD and LDI instructions in the definition of the program blocks to be connected in parallel Ignoring this will result in a program error see the right most program listing Sequential processing limitations There are no limitations to the number of parallel circuits when using an ORB instruction in the sequential processing configuration see the left most program listing ata MITSUBISHI 2 11 FX Series Programmable Controllers Basic Program Instructions 2 2 12 And Block FXis FX1n FX2n FX2Nnc Mnemonic Function Format Devices Program steps Serial connection ANB i ANd Block of multiple l TJ N A 1 parallel circuits Program example LD Recommended sequential ANB i programming method
41. 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 There is no limit to the number of times it can be used Further uses K values can be used with timers counters and applied instructions Example device usage N A Constant H FXis FXin FX2n FX2nc Device Mnemonic H Purpose Identification of constant hexadecimal values Alias Constant H value constant Hex value constant H Available forms Alpha numeric data value i e 0 to 9 and A to F base 16 When used for 16bit data values can be selected from the range 0 to FFFF For 32bit data values from the range 0 to FFFFFFFF can be used Devices numbered in N A This device is a method of local instruction data entry There is no limit to the number of times it can be used Further uses Hex values can be used with applied instructions Example device usage N A ata MITSUBISHI 4 14 FX Series Programmable Controllers Devices in Detail 4 4 9 Timers FXis FXin 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 The following variations are also availa
42. registers are set to the default values when the power supply to the PLC is turned ON Note When the power is turned ON all registers are first cleared to 0 zero and then the default values are automatically written to the appropriate registers by the system software For example the watchdog timer data is written to D8000 by the system software To change the setting the user must write the required value over what is currently stored in D8000 Data stored in the special diagnostic registers will remain unchanged when the PLC is switched from STOP mode into RUN Use of diagnostic registers Onno account should unidentified devices be used If a device is used it should only be for the purpose identified in this manual Please see chapter 6 for tables containing data and descriptions of the available devices for each PLC ata MITSUBISHI 4 32 FX Series Programmable Controllers Devices in Detail 4 4 12 4 File Registers FX1s FXin 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 For every block of 500 file registers allocated and equivalent bloc
43. the counter is counting downwards the contacts are reset M8235 Setting range e 2 147 483 648 to 2 147 483 647 Direction setting The counting direction for 1 phase counters is dependent on their corresponding flag M kkk where vevevr is the number of the corresponding counter C235 to C240 When M8www is ON the counter counts down When M8wwriw is OFF the counter counts up Using the SPD instruction e Care should be taken when using the SPD applied instruction FNC 56 This instruction has both high speed counter and interrupt characteristics therefore input devices XO through X5 may be used as the source device for the SPD instruction In common with all high speed processes the selected source device of the SPD instruction must not coincide with any other high speed function which is operating i e high speed counters or interrupts using the same input When the SPD instruction is used it is considered by the system to be a 1 phase high speed counter This should be taken into account when summing the maximum com bined input signal frequencies see the previous section ata MITSUBISHI 4 26 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
44. the specific availability of these devices on the selected PLC before use For more information on high speed counters please see page 4 22 For PLC device ranges please see chapter 8 ata MITSUBISHI 2 19 FX Series Programmable Controllers Basic Program Instructions 2 2 17 Leading and Trailing Pulse FX1s FXin FX2n FX2nc Mnemonic Function Format Devices Program steps ha Y M PLS Rising edge I Pul Se pulse AHLPES y ee 2 coils allowed PLF Falling trailing PuLse Falling edge pulse Y M PLF no special M 2 coils allowed Program example Ns PLS MO 0 LD X 0 ti Ke 1 PLS M 0 SETI YO i M 4 SET Y 0 X1 5 LD X 1 PLF Mi Ke 6 PLF M 1 M1 8 LD M 1 RSTI YO 9 RST Y 0 Basic points to remember When a PLS instruction is executed object devices Y and M operate for one operation cycle after the drive X1 input signal has turned ON When a PLF instruction is executed object devices Y MI and M operate for one operation cycle after the drive input signal has turned OFF tmsec When the PLC status is changed from RUN to STOP and back to RUN with the input signals still ON PLS MO is operated again However if an M coil which is battery backed latched was used
45. the user to enter all relevant MPS MRD and MPP instructions as required ata MITSUBISHI 2 13 FX Series Programmable Controllers Basic Program Instructions 2 Multiple program examples XO XI HF 0 0 LD XO 12 ANB Ex 1 MPS 18 OUT Y 1 MPS 2 ID X1 14 MPP X3 X4 3 OR X 2 15 AND X 7 F ED 4 ANB 16 OUT Y 2 P KC 5 OUT Y 0 17 LD X 10 MRD 6 MRD 18 OR X11 ua 7 LD S 3 19 ANB 8 AND 20 OUT Y 3 E Y2 9 LD X5 X10 10 AND X 6 MPP Y3 11 ORB X11 mo nm om xo o wp ups s 1 MPS 10 AND X 4 MPP T 2 AND X 1 11 MPS MPS 3 MPS 12 AND X 5 x4 X5 4 AND X 2 13 OUT Y 2 2 5 OUT Y 0 14 MPP E E X6 6 MPP 15 AND X 6 MPP MPS Y3 7 AND X 3 16 OUT Y 3 pe 8 OUT Y 1 MPP XO XI X2 X3 X4 i F He Hed hd Co gt 0 LD xO 9 OUT Y 0 I 1 MPS 10 MPP Y1 2 AND X 1 11 OUT Y 1 ke KE 3 MPS 12 MPP NS 4 AND X 2 13 OUT Y 2 5 MPS 14 MPP 6 AND X 3 15 OUT Y 3 OCH 7 MPS 16 MPP 8 AND X 4 17 OUT Y 4 ya MPP ata MITSUBISHI 2 14 FX Series Programmable Controllers Basic Program Instructions 2 2 14 Master Control and Reset FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Y M no special MC Denotes the start M coils allowed Master of a master control H MICIN N denotes the 3 Control block nest level NO to N7 MCR Deno
46. this Manual At various times through out this manual certain symbols will be used to highlight points of information which are intended to ensure the users personal safety and protect the integrity of equipment Whenever any of the following symbols are encountered its associated note must be read and understood Each of the symbols used will now be listed with a brief description of its meaning Hardware Warnings 1 Indicates that the identified danger WILL cause physical and property damage 2 Indicates that the identified danger could POSSIBLY cause physical and property damage 3 Indicates a point of further interest or further explanation ODD 0 o D m 5 Q 0 4 Indicates special care must be taken when using this element of software 5 Indicates a special point which the user of the associate software element should be avvare of 6 Indicates a point of interest or further explanation OG ata MITSUBISHI v FX Series Programmable Controllers ata MITSUBISHI vi FX Series Programmable controllers Contents de Ta dee 0 CH ON EE ENET ARE 1 1 ETL DENON rane ee eske do grin 1 1 1 2 What is a Programmable Controller AAA 1 2 1 3 What do You Need to Program PLO una decad nnn i vehen bn k dd ide 1 2 1 4 Special considerations for programming equipment rerannvrnnnnnnnnrnnnrrrnrrnnnnrnnnnn 1 3 1 4 1 Current Generation CPU all versions 1 3 1 5 Associated ELE 1 4
47. you the reader to fill in your comments and fax them back to us We look for ward to hearing from you Please tick the box of your choice Fax numbers Your MAMA au aaa aaa aaa nene eee eee eee rene e eee eee nenen Mitsubishi Eech America 01 847 478 2253 Your Company EE Australia EN Fe Germany 0 21 02 4 86 1 12 A South Africa rr A E E United Kingdom 01707 278 695 What condition did the manual arrive in Good Minor damage HUnusable Will you be using a folder to store the manual OYes LINo What do you think to the manual presentation Tidy LIUn friendly Are the explanations understandable OYes LiNot too bad LUnusable Which explanation was most difficult to understand 0 cece nene ee even en bere reze vezeve ve vere er n Are there any diagrams vvhich are not clear2 Yes LINo ERA a EE dr What do you think to the manual layout Good Not too bad OUn helpful If there one thing you would like to see improved what lem Could you find the information you required easily using the index and or the contents if possi ble please identify your experience REENEN Thank you for taking the time to fill out this questionnaire We hope you found both the product and this manual easy to use ata MITSUBISHI i FX Series Programmable Controllers ata MITSUBISHI FX Series Programmable Controllers Guidelines for the Safety of the User and Protection of the Programmable Controller PLC This manual provides in
48. 00 occurrence because S50 is now pos inactive Thus control passes to the next step in the same manner teste cece ata MITSUBISHI 3 9 FX Series Programmable Controllers STL Programming 3 3 6 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 Basic Instructions LD LDI AND ANI OR ORI ANB ORB Operational State 5 P NOP OUT MPS MRD MC MCR SET RST MPP PLS PLF Pe STL A Initial and general at e v v x states d SETIS STL SE y utpu Sek Branch LO BETIS v Vv x ing and processing ES e merging states T rans er S r H H v x x processing SIL g SETIS Restrictions on using applied instructions OG Most applied instructions can be used within STL programs Attention must be paid to the way STL isolates each non active step It is recommended that when applied instructions are used their operation is completed before the active STL step transfers to the next step Other restrictions are as follows FOR NEXT structures can not contain STL program blocks Subroutines and interrupts can not contain STL program blocks STL program b
49. 36 4 13 3 Using Multiple Index Registers A 4 36 4 14 Bits Words BCD and Hexvadechmal 4 37 4 14 1 Bit Devices Individual and Groupe 4 37 4 14 2 Word Devices unike eda aa Friis 4 39 4 14 3 Interpreting Word Data acidin cet did 4 39 4 14 4 Two s CGomplmenmt non n cnn cc narran 4 42 4 15 Floating Point And Scientific Notation aaa uuaaaaa aaa aaannen eee ne nese ever eee ze vere eee 4 43 4 15 1 Scientific NOtatiON au uu aa aaaaao ananas even e eve e ee eee ee narrar crac 4 44 4 15 2 Flo ting Point FEO Matamala 4 45 4 15 3 Summary Of The Scientific Notation and Floating Point Number u 4 46 5 Applied Instructions due auvesios ondsass s ivesuets net sis ve sues kuer 5 1 51 Programi Flow Functions 0O to 09 grun vec vitit dik au rca 5 4 BA GENEE veset iri aan ht udh 5 5 51 27 GAL IN GJON meandere 5 7 5 13 SRET PNG 02 unnarennet e eh e 5 8 5 1 4 IRET El DI FNC 03 04 05 coocoonccccococccconccccnoncnnnnocononnnnnnnn nn cnn ncn naar nn nn nc cnn rca 5 9 5 1 5 FEND FNG 00 materie eee odat dr se 5 11 5 1 6 WDT ENG 07 nesen astra een use eee md 5 12 5 1 7 FOR NEXT ENG 08 09 Lunn danna lia ad 5 13 5 2 Move And Compare Functions 10 to 18 5 16 Br t GMP ENG EE tn v sh 5 17 b ZGPAENGJAN EE 5 17 523 MOV FENG A TE 5 18 5274 SMOV FNG 13 O 5 18 5 25 GM ENG vedit et ee t e ited 5 19 5 2 6 1BMOV ENG 15 knee 5 20 5 20 FMOV ENC 10 uante de lu der 5 21 5 2 8 XGH TENG IT aides cack seen ed E
50. 4 1 A 2 ale EE 4 2 43 Auxiliary EE 4 3 4 3 1 General Stable State Auxiliary Relays aa aua aaa aaa ananas enen ee vet ve ee eee eee 4 3 4 3 2 Battery Backed Latched Auxiliary ROlQYS aaa aaa ae eee enes e vene reze vere eee 4 4 4 3 3 Special Diagnostic Auxiliary Relays aa u aaaa aaa nana nenes eve ee sene eseve ee ever enet narran rca 4 5 4 3 4 Special Single Operation Pulse Relays oooonicccnnnnnnnnicccnnoconnnocccconccnnnancnnnnccnnnrnnnnna cnn 4 5 44 State EEE REE EE ET ET EE 4 6 4 4 1 General Stable State State Relays rmnannrnnnnrrnnnnnnvnnnrrrvnnnrnnnerrrnnnnrnnnenvenerrrnenrnnenennn 4 6 4 4 2 Battery Backed Latched State Relays sa uua aaa aaa ananas ene zene ee eee ever eee rere 4 7 ENEE 4 8 4 4 4 Annunciator el le EE 4 9 Me 4 10 4 6 Imterupt Ponte Re seica a a oe Bieta ion 4 11 461 Input MOTUR S sust s see aent ati 4 12 4 6 2 Timer Int rrupts O dot aes bakri b r ENEE 4 12 4 6 3 Disabling Individual Interrupts sauna ana aaanann neneve neve eventeve nene eee ve vene tere nenen e eee rete 4 13 4 6 4 Counter Interrupts suka aaa aaa nenen eee nn e eee seen nese eee venes eee nete eee nete eee eee 4 13 47 Consta 4 14 4 8 Gonsant E se rail lic n h 4 14 4 9 Ni 4 15 4 9 1 General timer operation aa uu u aaa aa aaa aaa enen eneve des ee eee eee see ere eter esen neser 4 16 4 9 2 Selectable TIMENS ica imac Eed SSES Eege dre 4 16 4 9 3 Retentive Timers rencie aa e aN laaa aA E 4 17 4 9 4 Timers Used in Interrupt
51. 53201 FX 232ADP Users guide JY992D48801 FXON 232ADP Users guide JY992D51301 FX2N 232BD Users guide JY992D66001 FX2N 422BD Users guide JY992D66101 FX2N 485BD Hardware manual JY992D73401 FX2N 232IF Hardware manual JY992D73501 FX Communication Users manual JY992D69901 FX2N CCL Users manual JY992D71801 FX2N 16LNK M Users manual JY992D73701 FXON 32NT DP Users manual JY992D61401 FX2N 32DP IF Hardware manual JY992D77101 FX2N 32DP IF Users manual JY992D79401 FX2N 32ASI M Users manual JY992D76901 aha MITSUBISHI 1 4 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 aha MITSUBISHI 15 Introduction 1 Memo ata MITSUBISHI 1 6 FX Series Programmable Controllers Basic Program Instructions 2 0 TJ 7 Perrera TJ Dirr lene E Claes leese E nie Sete bores 7 qe ata MITSUBISHI FX Series Programmable Controllers Basic Program Instructions 2 Chapter Contents 2 Basic Program Instructions au 2 1 21 Wh
52. ADVANCED AND EVER APvANNSMITSUBISHI ELECTRIC aa MITSUBISHI PROGRAMMABLE CONTROLLERS f K ger a FX Series Programmable Controllers FX Series Programmable Controllers Programming Manual Manual number JY992D88101 Manual revision A Date April 2000 Foreword e This manual contains text diagrams and explanations which will guide the reader in the correct programming and operation of the PLC e Before attempting to install or use the PLC this manual should be read and understood e If in doubt at any stage of the installation of the PLC always consult a professional electrical engineer who is qualified and trained to the local and national standards which apply to the installation site e If in doubt about the operation or use of the PLC please consult the nearest Mitsubishi Electric distributor S e This manual is subject to change without notice E ata MITSUBISHI i FX Series Programmable Controllers ata MITSUBISHI 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 This page has been designed for
53. C a flow chart style of STL program entry similar to SFC Examples of these programming methods can be seen on page 2 1 General note e 1EC1131 3 03 1993 Programmable controllers part 3 programming languages The above standard is technically identical to the Euro Norm EN61131 3 07 1993 ata MITSUBISHI 3 1 FX Series Programmable Controllers STL Programming 3 3 2 3 2 1 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 These numbers are taken from the state relay devices see page 4 6 for more details Each step is a program oM8002 SO OXO oxo ex GERS OX1 SE S 22 S26 OTO e X15 S27 oT7 Each state is completely isolated from all other states within the whole program A good way to envisage this is that each state is a separate program and the user puts each of those programs together in the order that they require to perform their task Immediately this means that states can be reused many times and in different orders This sav
54. PS result of the Y N A 4 Point Store internal PLC MES i operations Reads the current 7 MRD result of the T I Read internal PLC ee WA 1 operations Pops recalls and MPP removes the N A 1 PoP currently stored MPP result Basic points to remember Use these instructions to connect output coils to the left hand side of a contact Without these instructions connections can only be made to the right hand side of the last contact MPS stores the connection point of the ladder circuit so that further coil branches can recall the value later MRD recalls or reads the previously stored connection point data and forces the next contact to connect to it MPP pops recalls and removes the stored connection point First it connects the next contact then it removes the point from the temporary storage area For every MPS instruction there MUST be a corresponding MPP instruction The last contact or coil circuit must connect to an MPP instruction At any programming step the number of active MPS MPP pairs must be no greater than 11 MPS MRD and MPP usage e When writing a program in ladder format programming tools automatically add all MPS MRD and MPP instructions at the program conversion stage If the generated instruction program is viewed the MPS MRD and MPP instructions are present e When writing a program in instruction format it is entirely down to
55. R 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 In the example below states S29 S39 and S49 must all be active If the instruction list is viewed it can be seen that each of the states has its own operating processing instructions but that also additional STL instructions have been linked together in a similar concept as the basic AND instruction Before state S50 can be activated the trigger conditions must also be active in this example these are X10 X11 and X12 Once all states and input conditions are made the merging or joining state can be SET ON As is the general case all of the states used in the setting procedure are reset automatically STL S 29 s29 CYyto s39 Y1t s49 YID ouTY 10 gt 1 STL S 39 OUT Y 11 S 50 STL S 49 OUT Y 12 X10 X11 A X12 STL S 29 STL S 39 gt SH STL S 49 LD X 10 AND X 11 AND X 12 SET S 50 A Because more than one state is being simultaneously joined vvith further states some times described as a parallel merge a set of horizontal parallel lines are used to aid a quick visual recognition Limits on the number of branches e Please see page 3 14 for general notes on programming STL branches Notes on using the FX PCS AT EE software e Please see page 3 15 for
56. RST instruction The system waits until inputs XO and X2 are given and Y 13 is not active In the scenario this means the ore truck is positioned at the ore discharge point i e above the position sensor X2 The ore truck is not currently discharging its load i e the signal to open the trucks unloading doors Y13 is not active and the start button X0 has been given Once all of the points have been met the program steps on to state S21 On this state the ore cart is moved Y10 and positioned X1 at the loading hopper If the start button X0 is pressed during this stage the ore cart will be set into a repeat mode M2 is reset where the ore truck is immediately returned to the loading hopper after discharging its current load This repeat mode must be selected on every return to the loading station Once at the loading point the program steps onto state S22 This state opens the hoppers doors Y11 and fills the truck with ore After a timed duration state S23 is activated and the truck returns Y12 to the discharge point X2 ata MITSUBISHI 3 16 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 immedia
57. XO X2 X3 o akWNM Oo CO OO JO ko gt Z U Q lt x X XAXXXXX N 0 OUT 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 Parallel circuit blocks are those in which more than one contact connects in parallel or the ORB instruction is used To declare the starting point of the circuit block use a LD or LDI instruction After completing the parallel circuit block connect it to the preceding block in series using the ANB instruction Batch processing limitations e When using ANB instructions in a batch use no more than 8 LD and LDI instructions in the definition of the program blocks to be connected in parallel Ignoring this will result in a program error see ORB explanation for example Sequential processing limitations e Itis possible to use as many ANB instructions as necessary to connect a number of parallel circuit blocks to the preceding block in series see the program listing ata MITSUBISHI 2 12 FX Series Programmable Controllers Basic Program Instructions 2 2 13 MPS MRD and MPP FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Stores the current M
58. Xan 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 Once an event triggers it actuates in the outside world by switching ON or OFF electronic control gear or the physical actuation of devices A programmable controller will continually loop through its internal user defined program waiting for inputs and giving outputs at the programmed specific times Note on terminology The term programmable controller is a generic word used to bring all the elements making the control system under one descriptive name Sometimes engineers use the term Programmable Logic Controller PLC or programmable controller to describe the same control system The construction of a programmable controller can be broken down into component parts The element where the program is loaded stored and processed is often known as the Main Processing Unit or MPU Other terms commonly heard to describe this device are base unit controller and CPU The term CPU is a little misleading as todays more advanced products may contain local CPU devices A Main CPU or more correctly a Main Processing Unit controls these local CPUs through a communication network or bus
59. a MITSUBISHI 2 8 FX Series Programmable Controllers Basic Program Instructions 2 And Pulse And Trailing Pulse FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps ANP Serial connection N ANd Pulse of Rising edge X Y M S T C 2 pulse we Sergiemrvecton ANd Falling Kode X Y M S T C 2 trailing edge pulse pulse Program example M40 0 i Y MD o D M 40 K 2 ANP T 10 KI 4 OUT M 100 p fie 5 LDF X 0 ch EES X 0 i a Basic points to remember Use the ANDP and ANDF instructions for the serial connection of pulse contacts Usage is the same as for AND and ANI see earlier ANP is active for one program scan after the associated device switches from OFF to ON ANF is active for one program scan after the associated device switches from ON to OFF Single operation flags M2800 to M3071 e When used with flags M2800 to M3071 only the first instruction will activate For details see page 2 8 ata MITSUBISHI 2 9 FX Series Programmable Controllers Basic Program Instructions 2 2 10 Or Pulse Or Trailing Pulse FX1s FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Parallel ORP connection of OR Pulse Rising edge I GE pulse ORE Gen of OR Falling E JI X Y M S T C 2 Falling 1 trailing puls
60. al FXis FXin 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 Some of the covered topics are Bit devices individual and grouped see page 4 40 Word devices see page 4 42 Interpreting word data see page 4 42 Two s compliment see page 4 45 Available devices e For PLC specific available devices please see chapter 8 4 14 1 Bit Devices Individual and Grouped Devices such as X Y M and S are bit devices Bit devices are bi stable this means there are only two states ON and OFF or 1 and 0 Bit devices can be grouped together to form bigger representations of data for example 8 consecutive bit devices are some times referred to as a byte Further more 16 consecutive bit devices are referred to as a word and 32 consecutive bit devices are a double word The PLC identifies groups of bit devices which should be regarded as a single entity by looking for a range marker followed by a head address This is of the form KnP where P represents the head address of the bit devices to be used The Kn portion of the statement identifies the range of devices enclosed n can be a number from the range 0 to 8 Each n digit actual represents 4 bit devices i e K1 4 bit devices and K8 32 bit devices Hence all groups of bit devices are divisible by 4 The diagram and example on the
61. and CALL Subroutines ursrrnnanvvnrnrvrnnnnrnnnenrnnnnnrnnnrnnnnnn 4 18 4 9 5 Timer ACCUTACY EE 4 18 410 COUNTCUS eege EE 4 19 4 10 1 General Latched 16bit UP Counters aa a ua aaa aaa nanen nenen eee ere ver eee ente eee eee 4 20 4 10 2 General Latched 32bit Bi directional Coumters aaa nana n ae ene neser eseve rere 4 21 4 11 High Speed Kl 4 22 4 11 1 Basic High Speed Counter Operation 4 23 4 11 2 Availability of High Speed Counters c oooccccinccccnocccnnoncccnnoncnanoncconnn cnn non cnn ncn anna 4 24 4 11 3 1 Phase Counters User Start and Reset C235 340 4 26 4 11 4 1 Phase Counters Assigned Start and Reset C246 to C250 essees 4 27 4 11 5 2 Phase Bi directional Counters C246 to C250 urnrrrnannvvnrnrrnnnnnrnnnrnrnnnnnrrnnrnnnnnn 4 28 4 11 6 A B Phase Counters C252 to Cp 4 29 4 12 Data e EE 4 30 4 12 1 General Use Register 4 31 4 12 2 Battery Backed Latched Registers u uua aaa enenee even enen eee vene eee ner 4 32 4 12 3 Special Diagnostic Registers au uu aaa ananas even e ever e eee eseve eee ete zere enet nntu nnen nant 4 32 4 12 4 File beoteterg iii vi dhi ej di ea gje he red ee 4 33 4 12 5 Externally Adjusted Registers aaa nanne eee ee neteve e vene eee nn nana nese eren rete 4 34 4 13 ndex e 4 35 4 13 1 Modifying a Constant 4 36 419 2 Misuse of the Modifiers sana et stenosis ai 4 36 4 13 3 Using Multiple Index Registers A 4 36 4 14 Bits Words BCD and Hexvadechmal 4 37 4 14 1 Bi
62. ave to be included in the C236 program The input assignment is hardware D4 related and cannot be changed by the user When X20 is OFF coil C235 is turned OFF and coil C236 is turned ON Counter C236 has an assigned input of X1 again the input X20 is NOT the counted input The assignment of counters and input devices is dependent upon the PLC selected This is explained in the relevant later sections Driving high speed counter coils e The counted inputs are NOT used to drive the high speed counter coils xo This is because the counter coils C235 need to be continuously driven ON xi K4789 to reserve the associated high speed C236 inputs Da Therefore a normal non high speed drive contact should be used to drive the high speed counter coil Ideally the special auxiliary contact M8000 should be used However this is not compulsory ata MITSUBISHI 4 23 FX Series Programmable Controllers Devices in Detail 4 4 11 2 Availability of High Speed Counters FXis FX1n FX2n FX2nc The following device table outlines the range of available high speed counters l 1 Phase counter N or assigned 2 Asp A B Phase counter P start reset TERS RRRRRRRRBRRGEEREREERE T Hi Ki L Hi La DS d Ja A A d E DS al al ol Hu HA HA dl e N Oo N Q d
63. ble Selectable timer resolutions see page 4 16 Retentive timers see page 4 17 Timers used in interrupt and CALL subroutines see page 4 18 Devices numbered in Decimal i e TO to T9 T10 to T19 Further uses None XO 120 K123 Available devices Timer Resolution FX1s FX1N FX2N FX2NC Example device usage 100 msec GH TO 62 TO 199 10 msec e T32 62 T200 245 1 1 msec T63 N A 4 Retentive 1 msec N A T246 249 6 Retentive 100 msec N A T250 255 Selectable timers taken from the main range of 100 msec timers see page 4 16 Timer accuracy e See page 4 18 ata MITSUBISHI 4 15 FX Series Programmable Controllers Devices in Detail 4 4 9 1 4 9 2 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 567x 10 msec 567x 0 01 sec 5 67 seconds Timers can either be set directly by using the constant K to specify the maximum duration or indirectly by using the data stored in a data register ex D For the indirect setting data registers which are batte
64. c Program Instructions 2 2 8 Load Pulse Load Trailing Pulse FX1s FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Initial logical LDP operation M LoaDPulse Rising edge I KM TE 2 pulse eb Fallin e einen S H trailing edge M MS f pulse pulse Program example LDP Ai XO M100 Kei LDP X 0 gt 2 OR X 1 3 OUT M 100 e p 4 LDF X 0 LDF 6 OUT Y 0 4 1 0 Basic points to remember Connect the LDP and LDF instructions directly to the left hand bus bar Oruse LDP and LDF instructions to define a new block of program when using the ORB and ANB instructions see later sections LDP is active for one program scan after the associated device switches from OFF to ON LDF is active for one program scan after the associated device switches from ON to OFF Single Operation flags M2800 to M3071 The pulse operation instructions when used with auxiliary relays M2800 to M3071 only activate the first instruction encountered in the program scan after the point in the program where the device changes Any other pulse operation instructions will remain inactive e This is useful for use in STL programs see chapter 3 to perform single step operation using a single device Any other instructions LD AND OR etc will operate as expected For more details please see page 4 5 at
65. 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 MO to M9 M10 to M19 Further uses General stable state auxiliary relays see page 4 3 Battery backed latched auxiliary relays see page 4 4 Special diagnostic auxiliary relays see page 4 5 Example device usage Lt M5 o N lt al Sr Es General Stable State Auxiliary Relays e A number of auxiliary relays are used in the PLC The coils of these relays are driven by device contacts in the PLC in the same manner that the output relays are driven in the program All auxiliary relays have a number of electronic NO and NC contacts which can be used by the PLC as required Note that these contacts cannot directly drive an external load Only output relays can be used to do this Available devices PLC FX1S FXIN FX2N FX2NC General auxiliary 384 384 500 500 relays MO 383 MO 383 MO 499 MO 499 Battery backed 128 Tide D ESTE latched relays M384 511 weet e Gre y 1535 3071 3071 Total available 512 1536 3072 3072 For more information about device availability for individual PLC s please see chapter 8 ata MITSUBISHI 4 3 FX Series Programmable Controllers Devices in Detail 4 4 3 2 Battery Backed Latched Auxiliar
66. cted steps will be simultaneously active for one program scan This could be thought of as a hand over or handshaking period This means that if a user has two outputs contained in consecutive steps which must NOT be active simultaneously they must be interlocked A good example of this would be the drive signals to select a motors rotation direction In the example Y11 and Y10 are shown interlocked with each other ata MITSUBISHI 3 8 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 FXis FXin 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 The example shown below identifies the general program required for this method S30 is activated when MO is first pulsed ON The operation of M1 prevents the sequence O M0 from continuing because although MO is ON E the transfer requirements need MO to be ON S 30 PLS Mi and M1 to be OFF After one scan the pulsed MO and the lock Pl gt OMO device M1 are reset O M1 A On the next pulse of MO the STL st
67. ction of the program branch must be mutually exclusive This type of program construction is called Selective Branch Programming An example instruction program can be seen below this is the sub program for STL state S20 only notice how each branch is SET by a different contact m Gs ar 41 STL OUT LD SET LD SET LD SET 0 zz Oz OD 20 0 A 21 A programming construction to split the program flow between different branches is very useful but it would be more useful if it could be used with a method to rejoin a set of individual branches 529 Y10 39 QD S 49 CY12 X10 X11 gt gt X12 STL S 29 OUT Y 10 LD X 105 50 SET S STL S 39 OUT Y 11 LD Xx 1131 50 SET S STL S 49 OUT Y 12 LD X 12 4 50 SET S This type of STL program construction is called a First State Merge simply because the first state in the example S29 S39 or S49 to complete its operation will cause the merging state S50 to be activated It should be noticed how each of the final STL states on the different program branches call the same joining STL state ata MITSUBISHI FX Series Programmable Controllers STL Programming 3 Limits on the number of branches e Please see page 3 14 for general notes on programming STL branches N
68. d for an interrupt to operate Interrupt pointers cannot have the same number in the 100 s position i e 1100 and 1101 are not allowed The input used for the interrupt device must not coincide with inputs already allocated for use by other high speed instructions within the user program 4 6 2 Timer Interrupts FX1s FXin FX2n FX2nc Identification of interrupt pointer number IS WS WS 10 to 99 msec the interrupt is repeatedly triggered at intervals of the specified time Timer interrupt number 3 points 6 to 8 Example 1610 The sequence programmed after the label indicated by the 1610 pointer is executed at intervals of 10msec The program sequence returns from the interruption program when an IRET instruction is encountered Rules of use e The following points must be followed for an interrupt to operate Interrupt pointers cannot have the same number in the 100 s position i e 1610 and 1650 are not allowed ata MITSUBISHI 4 12 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 1000 Driving special auxiliary relays e Never drive a special auxiliary co
69. e edge pulse Program example M40 SET M50 eO M XI peri ORP X 1 3 SET M 50 Ty A LD X 0 SS 5 AND M 24 6 LD Y 7 T d va 7 ORF X 1 9 ORB Y7 X1 10 OUT Y A J Dore Basic points to remember Use the ORP and ORF instructions for the parallel connection of pulse contacts Usage is the same as for OR and ORI see earlier ORP is active for one program scan after the associated device switches from OFF to ON ORF is active for one program scan after the associated device switches from ON to OFF Single operation flags M2800 to M3071 e When used with flags M2800 to M3071 only the first instruction will activate For details see page 2 8 ata MITSUBISHI 2 10 FX Series Programmable Controllers Basic Program Instructions 2 2 11 Or Block FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Parallel connection ORB of multiple contact N A 1 OR Block circuits Program example Recommended sequential Non preferred batch programming method programming method XO XI 0 LD XO 0 LD XO Ye 1 AND X 1 1 AND X 1 2 LD X 2 2 LD X2 X2 X3 Y 3 AND X 3 3 AND X 3 ORB pa 4 ORB 4 LD X 4 5 LD X4 5 AND X 5 vu x5 6 AND X 5 6 ORB ORB Ks 7 ORB 7 ORB 8 OUT Y 6 8 OUT Y 6 Basic
70. e 5 21 5 2 9 BOD ENG 18 uran Seah a atts heated cin eae eon ce 5 22 2 VOABING ENG HE ee EE 5 22 5 3 Arithmetic And Logical Operations Functions 20 to 20 5 24 bord PADD ENG 20 Lane eee GE 5 25 5 3 2 SUB FNG 21 scr tits leia 5 26 5 33 MUL FNC 22 eessen v s r penn ariere L Se baret s est n s h n de eee 5 27 53 45 DIN EN GQ ne eet enn 5 28 PB 5 WING TENG 24 pre 5 29 5 3 6 DEG Ne ie 5 29 5 37 WAND FENG 26 e e deed Ee 5 30 5 3 8 WORMENG 27 udatert e 5 30 ata MITSUBISHI ji A hee 5 31 ENE NET 5 31 5 4 Rotation And Shift Functions 30 to 39 nicas rta diana 5 34 SAN ROR lee EEN 5 35 NT PR 5 35 e Ee da st e N EE 5 36 se EE 5 36 5405 SETT FN vn eee 5 37 E e Pn ee de PO 5 37 5 4 7 WSFR FNC 36 EE EE 5 38 Et EEGEN eege eeh eher 5 38 EN SPR NOE 5 39 5A TO SFRD FNG Negl 5 40 5 5 Data Operation Functions 40 to 49 aaa aaa aaaaanaanaana nana aa nene nene e eee eee eee nene eneve rene 5 42 BET ZAST FENG is op EE 5 43 Ge C10 Er 1 kan rm RE EE 5 43 55 3 ENCO FNC AS J ee e es duene 5 44 SE SERIES 5 45 55 5 BON PNG nske TG EA 5 45 5 5 6 MEAN FNC 45 ga RO 5 46 EST ANS ENG EE 5 47 ES DNR Ad 5 47 55 9 SQR FNO 48 pe lavada 5 48 PET ANG 5 49 5 6 High Speed Processing Functions 50 to 59 ooocccccnnnnonononcccnnnnncnonannnonnnnncnnnannns 5 52 564 REF FNO S0 eee 5 53 e E dit takten 5 53 EE MTR Ne 5 54 SAS Wem cS tO N OE ERE RE ME AN P aN eNom Lr 5 55 5 0 5 TSG FNG 54 enes 5 56 EEG
71. e es deti e e T 4 1 al CH 4 2 43 Auxillary ROS gedet 4 3 4 3 1 General Stable State Auxiliary Relays aa uua aaua aaa ne eenee seen e skene eee ereza e eneve 4 3 4 3 2 Battery Backed Latched Auxiliary Helavs aaa aaa even nese e vene reve nente eee rere 4 4 4 3 3 Special Diagnostic Auxiliary Relays aa aaaa aaaaa aaa nenes even kaset sive eee vetes enter ve rrene rca 4 5 4 3 4 Special Single Operation Pulse Relays sauna aaa aaa aaa vene eee eee eee enteve rene 4 5 4 4 State RELAYS Zeie eseu 4 6 4 4 1 General Stable State State Relays a uua aaa aaa nenen eee e eee tezet 4 6 4 4 2 Battery Backed Latched State Relays sauna aaa nanen even e eee eee eee enet ete 4 7 AA TL Step RAY St eee 4 8 4 4 4 Arinunciator Flags cat est shishe r esht ts nde drid 4 9 a 4 10 46 Mer i POE ote Genet 4 11 4 6 1 nputiinterrupis air ses o sh Pea en hh saa fan Oana sh she n od s k e rs sh dass 4 12 AGZ TimMer la EE 4 12 4 6 3 Disabling Individual Interrupts asnrornnnonnrrrnnnnonnrnnnnrnnnrnrnnnnnnrnnnnrnnnrnnnnrennnnnenrrrnnnnne 4 13 4 6 4 gt eeler 4 13 ES SR Ee 4 14 A A EN 4 14 ER Blue 4 15 4 9 1 General timer operation uu aaa aaa nanen enen sene sene eee esse nente eee nete eee eee 4 16 4 9 2 Selectable Timers na uua ah aaa aaa eese eee sene cnn rn 4 16 AS LLS 417 4 9 4 Timers Used in Interrupt and CALL Subroutines aa 0 0 a 0 nana ene nese e eseve r
72. e zene eee 10 7 10 10Using The Execution Complete Flag M8029 aaa aa uaaaaaaa aaa a nane eanene ever eee vene 10 7 10 11Creating a User Defined MTR Instruction aaa aaa nanen eneve nene ez even 10 8 10 12An Example System Application Using STL And IST Program Control 10 8 10 13Using The PWM Instruction For Motor Control 10 15 10 14Communication Ro Malasia 10 18 10 14 1Specification of the communication parameters aaa huan ananas ene e even 10 18 10 14 2Header and Terminator Characters aaa aaa aaa aa aan aa aanne sene eee ee ever e ee eee eee vereni 10 19 10 14 3Timing diagrams for COMMUNICATIONS 10 20 10 14 48 bit or 16 bit Communication 10 23 10 15PID Programming Techn GUR Sa da une dh kas eee hh oe sk tee 10 24 10 15 1Keeping MV within a set range aaa aaa aaa eneve eee zene v ene eee enen 10 24 10 15 2Manual Automatic change over 10 24 10 15 3Using the PID alarm SIGN AS aa aaa aaa eseve eee ee vene ne eee eve A E eee er n 10 25 10 15 4Other tips for PID programming 10 25 10 16Additenal PID TURCOS EE 10 26 10 16 10utput Value range control S3 1 D 10 26 10 47Pret ning operatio N RE 10 27 10 17 71 Variable Constants radi vedit sdu iia do jr 10 27 10 18Example Autotuning Program aa sasi and loe 10 28 10 19Using the FX1N 5DM Display module ananas enen 10 29 10 19 10utline of functions ku 10 29 10 19 2Control devices for SDM rrrnnnnrnnnnnnvnnnnvrnnnnnvnnnerrrnnnnrnnnnnrennnnrnennnnnnnenrressnnnnsennnee
73. ecutive data registers can be used to form a 32bit device more commonly known as a double word If the contents of the data register is being considered numerically then the Most Significant Bit MSB is used to indicate if the data has a positive or negative bias As bit devices can only be ON or OFF 1 or 0 the MSB convention used is 0 is equal to a positive number and 1 is equal to a negative number DO DE a L A MSB Most Significant Bit D1 gt DO E 1O The diagram above shows both single and double register configurations In the diagram at point it should be noted that the lower register DO no longer has a Most Significant Bit This is because it is now being considered as part of a 32bit double word The MSB will always be found in the higher 16 bits i e in this case D1 When specifying a 32 bit data register within a program instruction the lower device is always used e g if the above example was to be written as a 32bit instructional operand it would be identified as DO The second register D1 would automatically be associated Once the data is written to a general data register it remains unchanged until it is overwritten When the PLC is turned from RUN to STOP all of the general data registers have their current contents overwritten with a 0 zero rn OG
74. enet ee zere 3 6 3 5 Rules and Techniques For STL porogorams 3 7 3 5 1 Basic Notes On The Behavior Of STL Program Sa ua a nanes eee zene ne 3 7 3 5 2 Singl Signal Step Control Laser vrer ENEE Eed EEd t aei a aiaa dene 3 9 3 6 Restrictions Of Some Instructions When Used With GT 3 10 3 7 Using STL To Select The Most Appropriate Program rnrrvnnnnvnrrnnnnnnvrrnnnnnnnnnn 3 11 3 8 Using STL To Activate Multiple Flows Gimultaneously 3 12 3 9 General Rules For Successful STL Branching oooccnconcccnnnoccccccnonacccccnnnanninannnnos 3 14 3 10 General Precautions When Using The FX PCS AT EE Software 3 15 3 11 Programming Examples EE 3 16 STETA Simple STL Flow its sakene tenke are ads 3 16 3 11 2 A Selective Branch First State Merge Example Program 3 18 3 12 Advanced STL USE pasoi mali din re as 3 20 ata MITSUBISHI FX Series Programmable Controllers STL Programming 3 3 1 STL Programming FXis FXin 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 What is STL SFC And IEC1131 Part 3 The following explanation is
75. enn 10 30 10 19 3Display screen protect FUNCTION aaa ann ane enen eee v eee eee eee ne eee ere eee 10 30 10 19 4Specified device montor aaa aaa ana e eee ee eee senet ee terre vetite enet eee 10 31 10 19 5Specified device et 10 32 10 19 6Automatic Backlight OFF au u aaa aaa ana eee eee e eee eee eee rre nano e tee teren 10 33 10 19 7Error display enable disable aaa aaaaaa nana nenen eee vere eee e renien 10 33 TN e e e Q 11 1 el NR SEE EE e e ERA 11 1 1 2 ASCII Character Codes uc citas ee k ma ed dons rd faen maten nada 11 9 1 3 Applied Ifstueion Lists coi hd Shee 11 10 ata MITSUBISHI vi ata MITSUBISHI vii FX Series Programmable Controllers Introduction 1 0 precast TJ E Perm id Dirr lene Claes leese Claes qe ata MITSUBISHI FX Series Programmable Controllers Introduction 1 Chapter Contents sao ee dn 1 1 dale e OI dans Ke suse 1 1 1 2 Whatis a ProgrammableController AAA 1 2 1 3 What do You Need to Program a PC ANNE 1 2 1 4 Curent Generation CPU s All versions aaa aa aaaaaaaa nana ana aaa nene nanen sete eee teve vene teve eee teen 1 3 1 5 Associated Manuals suva e r n dh del tn e 1 4 ata MITSUBISHI Introduction 1 1 Introduction 1 1 Overview 1 Scope of this manual FXis FX1n FX2nN FX2nc This manual gives details on all aspects of operation and programming for FX1s FXIN FX2n and FX2nc programmable controllers PLCs For all inf
76. ep will transfer program control from S31 to the next step in a similar manner This time using M2 as Sal E N the lock device because dual coils in successive steps is not allowed O MO The reason for the use of the lock devices M1 O M2 and M2 is because of the handshaking period when both states involved in the transfer of program control are ON for 1 program scan Without the locks it would be possible to immediately skip through all of the STL states in one go Method 2 Special Single Pulse Flags FXis FXin FX2n FX2nc Using the pulse contacts LDP LDF ANP etc and a special range of M devices M2800 to M3071 the same result as method 1 can be achieved The special feature of these devices prevents run through of the states as only the first occurrence of the LDP instruction will activate The example program below shows the necessary instructions Assume S50 is already active X001 When X01 activates M2800 this in turn E OE M2800 step control activates the LDP M2800 instruction in See device in a S50 and the flow moves on to step ri pulse contact S51 within the main The LDP M2800 instruction in the program body transition part of S51 does not execute because this is the second occurrence M2800 of M2800 in a pulse contact M2800 4 When X01 next activates M2800 the S51 M2800 LDP instruction in S51 is the first M28
77. equal 3 14285 approximately c In Scientific format this calculation would be equal to 3142 X 10 3 So it can be seen that a greater degree of accuracy is provided by floating point numbers i e through the use of larger numerical ranges and the availability of more calculable digits Hence calculations using floating point data have some significant advantages Decimal data can be converted in to floating point by using the FLT float instruction FNC 49 When this same instruction is used with the float fag M8023 set ON floating point numbers can be converted back to decimal see page 5 49 for more details The following points should be remembered about the use of Floating Point within appropriate FX units e Floating point numbers no matter what numerical value will always occupy two consecu tive data registers or 32 bits e Floating point values cannot be directly monitored as they are stored in a special format recommended by the E E E Institute of Electrical and Electronic Engineers for personal and micro computer applications e Floating point numbers have both mantissa and exponents see Scientific Notation for an explanation of these terms In the case of floating point exponents only 8 bits are used Additionally there isa single sign bit e E AEE for the mantissa The remaining bits EE E a register a regi
78. es on programming time AND cuts down on the number of programming errors encountered Look Inside an STL On initial inspection the STL program looks as if it is a rather basic flow diagram But to find out what is really happening the STL state needs to be put under a microscope so to speak When a single state is examined in more detail the sub program can be viewed With the exception of the STL instruction it will be immediately seen that the STL sub program looks just like ordinary programming O The STL instruction is shown as a fat normally open contact All programming after an STL instruction is only active when the associated state coil is active The transition condition is also written using standard programming This idea re enforces the concept that STL is really a method of sequencing a series of events or as mentioned earlier of joining lots of smaller programs together ata MITSUBISHI 3 2 FX Series Programmable Controllers STL Programming 3 3 3 3 3 1 3 3 2 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 Identification of contact states e Please note the following convention o M8002 is used so Neo O Normally
79. est levels can be duplicated but when the nest level resets ALL occurrences of that level reset and not just the one specified in the local MC ata MITSUBISHI 2 15 FX Series Programmable Controllers Basic Program Instructions 2 XO A MC NO M100 NO M100 X1 YO B Xe MC N1 M101 Ni M101 X3 7 VI Sat 4 MC N2 M102 N2 M102 X5 I 2 vi MCRI N2 X6 Y3 ER MCRI Ni X7 i MCRI NO me A Y5 Nested MC program example Level NO Bus line B active when X0 is ON Level N1 Bus line C active when both X0 and X2 are ON Level N2 Bus line D active when X0 X2 and X4 are ON Level N1 MCRN2 executes and restores bus line C If the MCR had reset NO then the original bus bar A would now be active as all master controls below nest level 0 would reset Level NO MCRN1 executes and restores bus line B Initial state MCR NO executes and restores the initial bus line A Output Y5 turns ON OFF according to the ON OFF state of X10 regardless of the ON OFF status of inputs X0 X2 or X4 ata MITSUBISHI FX Series Programmable Controllers Basic Program Instructions 2
80. eze 4 18 4 9 5 ng Tee LEE 4 18 410 ee Ile 4 19 4 10 1 General Latched 16bit UP Counters mannrnnrnrrrnnnnrvnrrrrrnnnnvnnrnrennrrrrnnnnnnnrnrrrenennnnnnn 4 20 4 10 2 General Latched 32bit Bi directional Coumters 4 21 ata MITSUBISHI i 4 11 High Speed Keel 4 22 4 11 1 Basic High Speed Counter Operation 4 23 4 11 2 Availability of High Speed Counters aaa aa ana ne neve ee eee restore se eee r ee eee eee eee 4 24 4 11 3 1 Phase Counters User Start and Reset C235 340 4 26 4 11 4 1 Phase Counters Assigned Start and Reset C241 to C245 Lessee 4 27 4 11 5 2 Phase Bi directional Counters C246 to C250 urnrrnnnnnrnnnerrnnnnnrnnnerrnnnnnrnnnrnnnnnn 4 28 4 11 6 A B Phase Counters C252 to Cp 4 29 212 Data e E 4 30 4 12 1 General Use Registers saa uu aaaa aaa aaa neve e eve e senet e vere eee ee ete eee teen ere eee 4 31 4 12 2 Battery Backed Latched Registers aaa aaa eee enene even e ee eee vezen eee nene eee 4 32 4 12 3 Special Diagnostic Registers uu ananas ever e zere eee eee enter vere sene reze rere 4 32 4 12 4 File Registers uinnvidde ne ji kari 4 33 4 12 5 Externally Adjusted Registers rrrrnnnnnonnvnnnnnonnnvrnnnnrnnrrnnnnrnnnrrnnnrrnnrnnnrrrnnrnnnsrrrnnnnnn 4 34 2123 Index Registers uante seede 4 35 4 131 Modifying a Constant unger kakene dam ite et sd ants 4 36 4 13 2 Misuse of the Modifiers rrrnennnnnnnvnnnnnnnvnnnnnnnnnvnnevnnnnvnnnnnnnnnnnennnnnnnnerannnnnnnsennnnnnnsen 4
81. fic Notation 2 16 bit Floating Point Numbers 132 bit 4 46
82. formation 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 a Any engineer who is responsible for the planning design and construction of automatic equipment using the product associated with this manual should be of a competent nature trained and qualified to the local and national standards required to fulfill that role These engineers should be fully avvare of all aspects of safety vvith regards to automated equipment b Any commissioning or service engineer must be of a competent nature trained and qualified to the local and national standards required to fulfill that job These engineers should also be trained in the use and maintenance of the completed product This includes being completely familiar vvith all associated documentation for the said product All maintenance should be carried out in accordance with established safety practices QO lt All operators of the completed equipment should be trained to use that product in a safe and coordinated manner in compliance to established safety practices The operators should also be familiar with documentation which is connected with the actual operation of the completed equipment Note the term completed equipment refers to a third party constructed device which contains or uses the product associated with this manual Note s on the Symbols used in
83. formation point on page 4 7 Battery backed latched state relays or see the relevant tables for the selected PLC in chapter 8 ata MITSUBISHI 4 6 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 When operation is resumed the previous status of these relays is restored Available devices PLC FX1s FX1N FX2N FX2NC General state 500 relays WA NA SO 499 Battery backed 128 1000 500 latched relays S0 127 SO 999 S500 999 Total available 128 1000 1000 e For more information about device availability for individual PLC s see chapter 8 External loads e State relays are provided with countless number of NO contact points and NC contact points and are freely available for use through out a PLC program These contacts cannot be used to directly drive external loads All external loads should be driven through the use of direct ex Y outputs ata MITSUBISHI 47 FX Series Programmable Controllers Devices in Detail 4 4 4 3 STL Step Relays States S are very important devices when DEF S2 programming step by step process control They are used in c
84. g data stored in a data register ex D In an indirect setting the 211 UU designation of D10 for example which contains the value 123 has the same effect 8 as a setting of K123 e 6 If a value greater than the counter setting is vvritten to a current value register the counter counts up when the next input is turned ON This is true for all types of counters YO nm Generally the count input frequency should be around several cycles per second Battery backed latched counters e Counters which are battery backed latched are able to retain their status information even after the PLC has been powered down This means on re powering up the latched counters can immediately resume from where they were at the time of the original PLC power down 2 Available devices e Please see the information table on page 4 19 ata MITSUBISHI 4 20 FX Series Programmable Controllers Devices in Detail 4 4 10 2 General Latched 32bit Bi directional Counters FXis FXin 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
85. have a start input X13 When the direction flag M8245 is ON C245 M8245 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 E245 C245 can also be reset by input X3 This is DO assigned automatically vvhen counter C245 is used see previous counter tables Counter C245 also has an external start contact again automatically assigned This is actually input X7 Once again this data can be found on the previous counter tables When X7 is ON C245 starts counting conversely when X7 is OFF C245 stops counting The input X15 selects and reserves the assigned inputs for the selected counter i e in this case C245 The reason why these counters use assigned start X7 and reset X3 inputs is because they are not affected by the cycle scan time of the program This means their operation is immediate and direct In this example C245 actual counts the number of OFF to ON events of input X2 Note Because C245 is a 32bit counter its setting data specified here by a data register also has to be of a 32bit format This means that data registers D1 and DO are used as a pair to provide the 32bit data format required Device specification e Al of these counters are 32bit up down ring counters Their counting and contact operations are the same as normal 32bit up down counters described on page 4 21 When the counters current value reaches its
86. ic Program Instructions 2 2 6 And And Inverse FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps AND Serial connection of NO normally X Y M S T C 1 AND open contacts ANI Serial connection AND Inverse of NC normally H X Y M S T C 1 closed contacts Program example AND OUT AND x2 XO 0 LD X 2 Ya pg 1 AND X 0 2 OUT Y 3 Y3 x3 3 LD Y 3 oi 4 AN X3 5 OUT M101 6 T 1 7 Y 4 AND Basic points to remember Use the AND and ANI instructions for serial connection of contacts As many contacts as required can be connected in series see following point headed Peripheral limitations The output processing to a coil through a contact after writing the initial OUT instruction is called a follow on output for an example see the program above OUT Y4 Follow on outputs are permitted repeatedly as long as the output order is correct Peripheral limitations 1 e The PLC has no limit to the number of contacts connected in series or in parallel However some programming panels screens and printers will not be able to display or print the program if it exceeds the limit of the hardware It is preferable for each line or rung of ladder program to contain up to a maximum of 10 contacts and 1 coil Also keep the number of follovv on outputs to a maximum of 24
87. il without first checking its use Not all PLC s assign the same use to the same auxiliary coils Disabling high speed counter interrupts e These interrupts can only be disabled as a single group by driving M8059 ON Further details about counter interrupts can be found in the following section 4 6 4 Counter Interrupts FXis FXin FX2n FX2nc Identification of interrupt pointer number IO QO Counter interrupt number 6 points 1 to 6 Counter interrupts can be entered as the output devices for High Speed Counter Set HSCS FNC 53 To disable the Counter Interrupts Special Auxiliary Relay M8059 must be set ON Example The sequence programmed after the label 000 indicated by the 1030 pointer is executed once M8 Mi DHSCSI K100 C255 1030 the value of High Speed Counter C255 reaches equals the preset limit of K100 identified in the example HSCS Additional notes e Please see the following pages for more details on the HSSC applied instruction High Speed Counter Set HSCS FNC 53 see page 5 55 ata MITSUBISHI 4 13 FX Series Programmable Controllers Devices in Detail 4 4 7 4 8 Constant K FXis FXin FX2n JFX2nc 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
88. instead of MO it would not re activate For the battery backed device to be re pulsed its driving input ex X0 must be switched OFF during the RUN STOP RUN sequence before it will be pulsed once more ata MITSUBISHI 2 20 FX Series Programmable Controllers Basic Program Instructions 2 2 18 Inverse FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Invert the current INV result of the Inverse internal PLC MA operations Program example iy PLS MO 0 LD X 0 M Ke 1 PLS M 0 SETI Yo 3 LD M 0 4 SET Y 0 X1 5 LD X 1 PEE I MI Ke 6 PLF M 1 M1 8 LD M 1 RST YO 9 RST Y 0 Basic points to remember The INV instruction is used to change invert the logical state of the current ladder network at the inserted position Usage is the same as for AND and ANI see earlier Usages for INV e Use the invert instruction to quickly change the logic of a complex circuit It is also useful as an inverse operation for the pulse contact instructions LDP LDF ANP etc ata MITSUBISHI 2 21 FX Series Programmable Controllers Basic Program Instructions 2 2 19 No Operation FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps NOP No operation or No Operation null step
89. is permitted K3Z K1M10V Y20Z Statements of the form K4ZY30 are not acceptable e Modifiers cannot be used for parameters entered into any of the 20 basic instructions i e LD AND OR etc Using Multiple Index Registers The use of multiple index registers is sometimes necessary in larger programs or xo programs which handle large quantities of MOV Kio V data There is no problem from the PLC s point of view in using both V and Z registers X1 many times through out a program The point MOV K20 Z to be aware of is that it is sometimes confusing for the user or a maintenance x2 person reading such programs as it is not ADD D 5V D 15ZD40Z always clear what the current value of V or Z IS M8000 Example MOV KO V V 10 K10 X3 Z 20 K20 DADD D0 D2 D 4Z D5V D15 D5 V D5 10 D15 D15Z D35 D15 Z D15 20 D35 D40Z D60 D40 Z D40 20 D60 Both V and Z registers are initially set to K10 and K20 respectively The contents of D15 is added to that of D35 and store in D60 V is then reset to 0 zero and both V and Z are used in the double word addition DADD The contents of D1 DO are then added to D3 D2 and then finally stored in D25 D24 ata MITSUBISHI 4 36 FX Series Programmable Controllers Devices in Detail 4 4 14 Bits Words BCD and Hexadecim
90. k of 500 program steps are lost Note The device range for file registers in the FXin FX2n and FX2nc overlaps with the latched data registers The allocation of these devices as file registers ensures that the data is kept with the program Writing to file registers e Fis file register data can only be changed by a peripheral device such as a hand held programmer or a personal computer running the appropriate software For details of how to carry out the changes please reference the relevant operation manual for guidance e FXiN FXan and FXanc file register data can also be changed by the program using the BMOV instruction Special caution when using FXis No file registers can be modified during RUN 2 Available devices e Please refer to the table on page 4 33 or chapters 6 and 8 where further details of the availability of devices can be found ata MITSUBISHI 4 33 FX Series Programmable Controllers Devices in Detail 4 4 12 5 Externally Adjusted Registers The FXis and FXin have built in setting pots which are used to adjust the contents of certain dedicated data registers The contents of these registers can range from 0 to 255 This is a built in feature and requires no additional setup or programming The FXan and FX2nc do not have this feature however an additional special function unit is available which provides the same function The unitrequired is the FX2n 8AV BD For use this unit re
91. locks can not be written after an FEND instruction FOR NEXT instructions are allowed within an STL program with a nesting of up to 4 levels For more details please see the operational compatibility listed in the two tables on pages 7 12 7 13 Using jump operations with STL Although it is possible to use the program jump operations CJ instruction within STL program flows this causes additional and often unnecessary program flow complications To ensure easy maintenance and quick error finding it is recommended that users do not write jump instructions into their STL programs ata MITSUBISHI 3 10 FX Series Programmable Controllers STL Programming 3 3 7 Using STL To Select The Most ES SEE SET Appropriate Program 2 i N nS 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 For example certain machines require a selection of manual and automatic modes other machines may need the ability to select the operation or manufacturing processes required to produce products A B C or D STL achieves this by allowing multiple program branches to originate from one STL state Each branch is then programmed as an individual operating mode and because each operating mode should act individually i e there should be no other modes active the sele
92. m scan 2 A program scan is a single processing of the loaded program from start to finish This includes updating all inputs outputs and vvatchdog timers The time period for one such process to occur is called the scan time This vvill be dependent upon program length and complexity Immediately the current scan is completed the next scan begins The whole process is a continuous cycle Updating of inputs takes place at the beginning of each scan while all outputs are updated at the end of the scan ata MITSUBISHI 2 23 FX Series Programmable Controllers Basic Program Instructions 2 MEMO ata MITSUBISHI 2 24 FX Series Programmable Controllers STL Programming 3 0 euron E Ee Dirr Flen Claes leese Claes qe ata MITSUBISHI FX Series Programmable Controllers STL Programming 3 Chapter Contents 3 STL ROG AT 3 1 3 1 What is STL SFC And IEC1131 Part 3 3 1 32 How STE OP TATE Siene e ds 3 2 3 2 1 Each step is a Program eect pandana ere re bene rete rene re ee teper teren e en tee CLANKE AGATA KESA 3 2 33 How To Start And End An STL Program ae ta kand don t Gs 3 3 3 3 1 Embedded STL programs sua ana e ea enen ene ne ee eee eee ez eee eee enet 3 3 3 3 2 Activating new States A 3 3 3 3 3 Terminating an STL Program 3 4 3 4 Moving Between STL SOS save get ti uar ari 3 5 3 4 1 Using SET to drive an STL eo 3 5 3 4 2 Using OUT to drive an STL Coil aaa cece ee eee nese venes eee ee eee
93. m shown on the previous page C200 is being used to count the number of OFF ON cycles of input X4 The output contact is set or reset depending on the direction of the count upon reaching a value equal in this example to the contents of data registers D1 D0 32 bit setting data is required for a 32 bit counter The output contact is reset and the current value of the counter is reset to 0 when input X3 is turned ON 32 bit counters e For more information on 32 bit counters please see page 4 21 2 16 3 High Speed Counters High speed counters have selectable count directions The directions are selected by X10 driving the appropriate special auxiliary M coil The example shown to the right works RST Casa in the following manner when X10 is ON counting down takes place When X10 is OFF counting up takes place In the example the output contacts of counter CAAA and its associated current count values are reset to 0 when X11 is turned ON When X12 is turned ON the driven counter is enabled This means it will X12 be able to start counting its assigned input ant signal this will not be X12 high speed K D counters are assigned special input signals C AAA please see page 4 22 Ca Availability of devices e Not all devices identified here are available on all programmable controllers Ranges of active devices may vary from PLC to PLC Please check
94. n e For information on basic high speed counters please see page 4 23 ata MITSUBISHI 4 22 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 The selection of high speed counters are not free they are directly dependent on the type of counter required and which inputs are available Available counter types a 1 phase with user start reset C235 to C240 b 1 phase with assigned start reset C241 to C245 c 2 phase bi directional C246 to C250 d A B phase type C251 to C255 Please note ALL of these counters are 32bit devices High speed counters operate by the principle of interrupts This means they are event triggered and independent of cycle time The coil of the selected counter should be driven continuously to indicate that this counter and its associated inputs are reserved and that other high speed processes must not coincide with them Example When X20 is ON high speed counter C235 is selected The counter C235 corresponds to X20 C235 count input X0 X20 is NOT the counted signal This is the continuous drive mentioned X20 K4789 earlier XO does not h
95. n This means on re powering up the latched counters can immediately resume from where they were at the time of the original PLC power down 2 Available devices e Please see the information table on page 4 19 Selecting the counting direction e If M8rererr for Cyevrrr is turned ON the counter will be a down counter Conversely the counter is an up counter when M8revervie is OFF ata MITSUBISHI 421 FX Series Programmable Controllers Devices in Detail 4 4 11 High Speed Counters FX1s FX1iN FX2N FX2nc 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 Please check the following sections for device availability FXis and FXin see page 4 24 FX2N and FXanc see page 4 25 The following sections refer to counter types 1 phase counters user start and reset see page 4 29 1 phase counters assigned start and reset see page 4 30 2 phase bi directional counters see page 4 31 A B phase counters see page 4 32 Devices numbered in Decimal i e C235 to C255 Further uses None Example device usage For examples on each of the available forms please see the relevant sections 2 Basic high speed counter operatio
96. n EZA NORSE A EEE E E E E E EEE 5 57 SO SPRANG He ee 5 60 5 8 8 KANG EE EN tk 5 61 5 6 9 PWM FNC 58 eet eebe eege 5 62 56 10 PESR NNN 5 63 5 7 Handy Instructions Functions 60 to Gg 5 66 ETT STR OG 5 67 e ae A bal cat eta al hel 5 69 SES GNEIS A A a ria 5 70 NEE RE eee e 5 71 TS TIMR ENGE Sed id 5 72 ETE STR ENG Sa 5 72 A dra ed aT 5 73 E RAMPAENCION ees E eeneg 5 73 B79 ROTC ee 5 75 TSN 5 77 5 8 External FX I O Devices Functions 70 tO 8 5 80 FEL TENG ONE 5 81 5 8 2 HKY NT A a aA aaa 5 82 ADIN A ENO ZA EE 5 83 5 8 4 SED ING ut ee 5 84 5 8 5 SENG ee 5 85 5 8 6 ARWS FNC TS repeteres raket hehe beige 5 87 Sn 5 88 EN A A 5 89 5 8 9 ROMAN o de a tat 5 90 5 8 10 TO FNO SE SN 5 91 ata MITSUBISHI iv 5 9 External FX Serial Devices Functions g0iog0g 5 94 SN 5 95 BGO FUN A re 5 96 E A G gA a n A A I E 5 98 59A ME ENO en 5 99 JE EE EN o ida 5 100 5007 EE erer 5 101 E ET le EE aa 5 101 5 9 8 PID WING 88 ed 5 102 5 10 Floating Point 1 amp 2 Functions 110 to 129 Gassene aner 5 110 5 1014 ECMP FNO T10 bt 5 111 SNO ZC oN ENE EE ERR 5 111 5 10 39 EBCD FNC Ne eee 5 112 BOA IE BINGEN SL 5 112 510 5 BADD FNG 190 sa e NT 5 113 EE GE EEE EN OU wee eect 5 114 5 10 7 EMUL FNC PP aan eneeier 5 114 OSEN IA e an tatiana tate ta aera io petals 5 115 5409 ESOR ENG AOL ee caca Earls dad 5 115 SOON A cat otal ES 5 116 5 11 Trigonometry FNC 130 to FNC 139 nummer d noj dd madre 5 118 FT SNE BO Sneve ar 5 119 SI
97. n from the available range of devices can be used for the head address marker of a bit device group However it is recommended to use a 0 zero in the lowest digit place of X and Y devices X0 X10 X20 etc For M and S devices use of a multiple of 8 is the most device efficient However because the use of such numbers may lead to confusion in assigning device numbers it recommended to use a multiple of 10 This will allow good correlation to X and Y devices amp ata MITSUBISHI 4 38 FX Series Programmable Controllers Devices in Detail 4 4 14 2 4 14 3 Word Devices Word devices such as T C D V and Z can store data about a particular event or action within the PLG 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 This is not so strange when it is considered that the bit is the smallest unit of data within the PLC So by identifying every thing in bit format a common denomination is being used hence comparison etc is much easier Additional consequences of this bit interpretation is that the actual data can be interpreted differently The physical pattern of the active bits may be the important feature or perhaps the numerical interpretation of the bit pattern may be the key to the program It all comes down
98. nstruction ladder and SFC STL Not all programming tools can work in all programming forms Generally hand held programming panels only work with instruction format while most graphic programming tools will work with both instruction and ladder format Specialist programming software will also allow SFC style programming LD X10 OUT Y7 AND M38 Q SET S5 LD X21 OUT TO1 K40 D Instruction format Ladder Format SFC Format Outline of Basic Devices Used in Programming There are six basic programming devices Each device has its own unique use To enable quick and easy identification each device is assigned a single reference letter Xi This is used to identify all direct physical inputs to the PLC Y This is used to identify all direct physical outputs from the PLC Ti This is used to identify a timing device which is contained within the PLC Ci This is used to identify a counting device which is contained within the PLC Mand S These are used as internal operation flags within the PLC All of the devices mentioned above are known as bit devices This is a descriptive title telling the user that these devices only have two states ON or OFF 1 or 0 Detailed device information e Chapter 4 contains this information in detail However the above is all that is required for the rest of this
99. o 1 This means the data is negative The answer however is not 7797 ata MITSUBISHI 4 39 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 Remember this is now a decimal representation of the original 16 bit bit pattern If the original pattern was re assessed as a hexadecimal number the answer would be different b A hexadecimal view Taking the same original bit pattern used in point a and now adding a hexadecimal notation instead of the binary base 2 notation the bit patterns new meaning becomes Hexadecimal value 1 x 8 1 x 1 1x8 x4 1x 1x4 1x2 1x1 1x4 1x1 Hexadecimal value 9E75 jer E Two things become immediately obvious after a hexadecimal conversion The first is that there is sign bit as hexadecimal numbers are always positive The second is there is an E appearing in the calculated data This is actually acceptable as hexadecimal counts from 0 to 15 But as there are only ten digits 0 to 9 substitutes need to
100. o conflict between 8 30 MT dual coils The example opposite shows M111 used twice in a single STL flow Caution The same coil should NOT be programmed in steps S31 M112 that will be active at the same time as this will result in the same problem as other dual coils GP 2 ata MITSUBISHI 3 7 FX Series Programmable Controllers STL Programming 3 O 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 If the same timer is used in consecutive steps then it is possible that the timer coil is never deactivated and the contacts of the timer will not be reset leading to incorrect timer operation The example opposite identifies an unacceptable use of timer T001 When control passes from S30 to 31 T001 is not reset because its coil is still ON in the new step K20 T001 K50 Note As a step towards ensuring the correct operation of the dual timers they should not be used in consecutive STL steps Following this simple rule will ensure each timer will be reset correctly before its next operation As already mentioned during the transfer between steps the current and the sele
101. ombination with the basic instruction STL xo When all STL style programming is used certain states have a pre defined operation The step identified as S20 YO in the figure opposite is called an initial state All other state steps are then used to build up the full STL al function plan It should be remembered that even S21 vi though remaining state steps are used in an STL format they still retain their general or latched x2 operation status The range of available devices is as specified in the information point of the previous S22 Y2 section Se 1 Assigned states e When the applied instruction IST Initial STate function 60 is used the following state devices are automatically assigned operations which cannot be changed directly by a users program SO Manual operation initial state S1 Zero return initial state S2 Automatic operation initial state S10to S19 Allocated for the creation of the zero return program sequence 1 Monitoring STL programs To monitor the dynamic active states within an STL program special auxiliary relay M8047 must be driven ON STL SFC programming e For more information on STL SFC style programming please see chapter 3 IST instruction e For more information on the IST instruction please see page 5 67 ata MITSUBISHI 4 8 FX Series Programmable Controllers Devices in Detail 4 4 4 4 Annunciator Flags FXis FXin FX2n FX2nc
102. or X5 indicating the container required for storage 4 The program continues by lowering the pickup arm YO until the lower limit switch X2 is reached 5 The collected ball being is released Y1 is reset 6 The pickup arm is retracted Y2 once more 7 The pickup arm is traversed back Y4 to the zero point X1 Points to note e The Selective Branch is used to choose the delivery program for either small ball bearings or large ball bearings Once the destination has been reached i e step S24 or S27 has been executed the two independent program flows are rejoined at step 30 The example program shown works on a single cycle i e every time a ball is to be retrieved the start button X12 must be pressed to initiate the cycle ata MITSUBISHI 3 18 FX Series Programmable Controllers STL Programming 3 Full STL flow diagram program So This example uses the dot notation to identify normally open and normally closed contacts OX12 Start ov7 An i Normally open contacts Zero point arrival e Normally closed contacts S 21 CV Lower pickup arm I oTO OTO OX2 Lower limit small ball e X2 Lower limit large ball S 22 SETI Y1_ Collect ball S 25 SETI Y1 Collect 10 ball K10 S 23 Ya Raise S 26 2 Raise
103. or more than two seconds If the cycle time of the controlled machine is less XI xo FNC46 than ten seconds and input X3 stays ON state ANS TI K20 Son 902 will be set ON if X4 is not activated within this machine cycle time X3 X4 N FNC46 If any state from S900 to S999 is activated i e ANSI T2 K100 S902 ON special auxiliary relay M8048 is activated to turn on failure indicator output Y10 The states activated by the users error failure diagnosis detection program are turned OFF by M8048 activating input X5 Each time X5 is activated the active annunciator states are reset in ascending order of state numbers X5 FNC47 ANR P ata MITSUBISHI 4 9 FX Series Programmable Controllers Devices in Detail 4 4 5 Pointers FXis FXin 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 PO 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 Can be used with call statements see page 5 7 and item 9 on the example device usage diagram Example device usage
104. ormation relating to the PLC hardware and installation refer to the appropriate manual supplied with the unit N How to use this manual This manual covers all the functions of the highest specification Programmable Logic Controller PLC For this reason the following indicator is included in relevant section titles to show which PLCs that section applies to FXis FXan FX2n FX2nc FX1s All FX1s PLCs FXin All FXin PLCs Fan All FX2n PLCs FXenc All FXanc PLCs FX1s FX1N FX2N FX2nc Shaded boxes indicate the applicable PLC type If an indicator box is half shaded as shown to the left this means that not all the functions described in the current section apply to that PLC The text explains in further detail or makes an independent reference If there are no indicator boxes then assume the section applies to all PLC types unless otherwise stated 3 FX family 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 ata MITSUBISHI 1 1 Introduction 1 1 2 1 3 What is a Programmable Controller FX s FXin F
105. orts up to FX devices only FX 40DU TK ES from V 3 00 FX 50DU TK S E from V 2 10 F930GOT BWD All versions F940GOT SWD LWD E All versions ata MITSUBISHI 1 3 Introduction 1 Assocciated Manuals Manual name Number FX Base Unit Hardware FX1S Hardware manual JY992D83901 FXIN Hardware manual JY992D88201 FX2N Hardware manual JY992D66301 FX2NC Hardware manual JY992D 76401 FX Programming FXO FXOS FXON FX FX2C FX2N FX2NC Programming manual JY992D48301 FX1S FXIN FX2N FX2NC Programming manual I JY992D88101 FX Peripherals FX 10P E Operation manual JY992D33401 FX 20P E Operation manual JY992D19101 FX 10P 20P E Supplimentary manual JY992D66901 FX PCS WIN E Software manual JY992D66501 FX Special Function Blocks FXON 3A Users guide JY992D49001 FX 4AD Users guide JY992D52601 FX 2AD PT Users guide JY992D55701 FX 4AD TC Users guide JY992D55901 FX 2DA Users guide JY992D52801 FX2N 2AD Users manual JY992D74701 FX 4DA Users guide JY992D61001 FX2N 4AD Users guide JY992D65201 FX2N 4AD TC Users guide JY992D65501 FX2N 4AD PT Users guide JY992D65601 FX2N 4DA Users guide JY992D65901 FX2N 2DA Users manual JY992D 74901 FX2N 2LC Users guide JY992D85601 FX2N 2LC Users manual JY992D85801 FX 485PC IF Hardware manual JY992D81801 FX FXON 485ADP Users guide JY992D
106. otes on using the FX PCS AT EE software e Please see page 3 15 for precautions when using the FX PCS AT EE software 3 8 Using STL To Activate Multiple Flows Simultaneously FXis FXin FX2n FX2nc In the previous branching technique it was seen how a single flow could be selected from a group The following methods describe how a group of individual flows can be activated simultaneously Applications could include vending machines which have to perform several tasks at once e g boiling water adding different taste ingredients coffee tea milk sugar etc In the example below when state S20 is active and XO is then switched ON states S21 S31 and S41 are ALL SET ON as the next states Hence three separate individual branch flows are set in motion from a single branch point This programming technique is often called a Parallel Branch To aid a quick visual distinction parallel branches are marked with horizontal parallel lines STL S 20 s 20 CY0 OUT Y 0 LD X 0 xo IN SET S 21 SET S 31 d SET S 41 BA saj sa se ata MITSUBISHI 3 12 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 O
107. ounters is PLC specific please check availability before use Devices numbered in Decimal i e GO to C9 C10 to C19 Further uses None Example device usage X1 I K345 L I RSTI C12 Available devices Counter Resolution Fis FX1N FX2N FX2NC General 16bit up 16 16 100 counter CO 15 CO 15 CO 99 Latched 16bit up 16 184 100 counter C16 31 C16 199 C100 199 General 32bit N A 20 bi directional counter C200 219 Latched 32bit N A 15 bi directional counter C220 234 High speed counters e For high speed counters please see page 4 22 Setting ranges for counters e 16bit and 32bit up counters 1 to 32 767 e 32bit bi directionalcounters 2 147 483 648 to 2 147 483 647 aha MITSUBISHI 4 19 FX Series Programmable Controllers Devices in Detail 4 4 10 1 General Latched 16bit UP Counters The current value of the counter increases X10 each time coil CO is turned ON by X11 The DST CO output contact is activated when the coil is X11 turned ON for the tenth time see diagram CO After this the counter data remains unchanged CO a 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 The output contact YO is also reset at the same time X10 Counters can be set directly using constant K or indirectly by usin
108. point of water 1 00 X 10 2 C Boiling point of water 1 00 X 102 C ata MITSUBISHI 4 43 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 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 Hence Scientific Notation can accommodate values greater smaller than the normal 32 bit limits i e 2 147 483 648 to 2 147 483 647 where Scientific Notation limits are Maximums Minimums 9999 X 1035 9999 X 10 41 9999 X 1035 9999 X 10 41 Scientific Notation can be obtained by using the BCD or EBCD in FXan instruction FNC 18 or FNC 118 with the float flag M8023 set ON In this situation floating point format numbers are converted by the BCD instruction into Scientific Notation see page 5 22 for details When using the FX2N the INT instruction FNC 129 can be used Scientific Notation can be converted back to floating point format by using the BIN instruction FNC 19 with the float flag M8023 set ON see page 5 22 for details The following points should be remembered about the use of Scientific Notation within appropriate FX units
109. precautions when using the FX PCS AT EE software ata MITSUBISHI 3 13 FX Series Programmable Controllers STL Programming 3 3 9 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 If the programmable controllers program is read written using instruction or ladder formats the above rules are acceptable However users of the FX PCS AT EE programming package who are utilizing the STL programming feature are constrained by further restrictions to enable automatic STL program conversions please see page 3 15 for more details When using branches different types of branching merging cannot be mixed at the same branch point The item marked with a S are transfer condition which are not permitted The following branch configurations modifications are recommended
110. quires the applied instructions VRRD Setting of an F pot X15 function 85 Volume Read and VRSC function 86 Volume Scale FX1s FXIN FX2N FX2NC 2 points Number of setting pots plus 8 points Supplied by using the additional special function 8 points Supplied by using the additional special function board data registers the user when applied are used instructions VRRD and VRSC board FX2N 8AV BD FX2N 8AV BD 1 D8030 2 D8031 Number of T Selected by the user vvhen controlled FODOS points selsotad By applied instructions VRRD and VRSC are used Uses e This facility is often used to vary timer settings but it can be used in any application where a data register is normally found i e setting counters supplying raw data even selection operations could be carried out using this option ata MITSUBISHI 4 34 FX Series Programmable Controllers Devices in Detail 4 4 13 Index Registers FXis FXin FX2n FX2nc Device Mnemonic V Z Purpose To modify a specified device by stating an offset Alias VI Z Register Index register addressing modifier Offset s register addressing modifier Indices Modifier Available forms For 16bit data V or Z 2 devices lt 16 Bit gt 16 Bit gt For 32bit data V and Z combined V Z 1 device Z is specified Operation is similar to
111. ram This is obviously incorrect and the CPU will proceed to identify a programming error and disable the programmable controllers operation This scenario may seem a little strange but it does make sense when it is considered that the STL program must return control to the ladder program after STL operation is complete This means the last step in an STL program needs to be identified in some way Returning to Standard Ladder This is achieved by placing a RET or RETurn M8002 instruction as the last instruction in the last SET 8005 STL step of an STL program block STL X001 ni This instruction then returns programming con S005 X000 trol to the ladder sequence Y011 X012 Y014 X013 a RET Note The RET instruction can be used to separate STL programs into sections with stan dard ladder between each STL program For display of STL in SFC style format the RET instruction is used to indicate the end of a complete STL program ata MITSUBISHI 3 4 FX Series Programmable Controllers STL Programming 3 3 4 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
112. registers see page 4 35 Special diagnostic registers see page 4 35 File registers see page 4 36 RAM file registers see page 4 36 Externally adjusted registers see page 4 37 Devices numbered in Decimal i e DO to D9 D10 to D19 Further uses Can be used in the indirect setting of counters and timers Example device usage None Available devices FX1s FX1N FX2N FX2NC General use 128 128 200 200 registers DO 127 DO 127 DO 199 DO 199 Latched 128 7872 7800 7800 registers D128 255 D128 7999 D200 7999 D200 7999 Diagnostic 256 256 256 256 registers D8000 8255 D8000 8255 D8000 8255 D8000 8255 8 7000 7000 7000 File registers R ES D1000 7999 D1000 7999 D1000 7999 Adjustable 2 2 N A N A registers F D8030 8031 D8030 8031 R These devices are allocated by the user at the expense of available program steps On FXe2n and FX2nc these devices are a subset of the latched registers F These devices are also included under the count for diagnostic registers ata MITSUBISHI 4 30 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 However two cons
113. representations such as X0 and X1 in order to switch the output coil YO ON Therefore in the example shown switching XO ON causes the output YO to also switch ON If however the limit switch X1 is activates the output YO turns OFF This is because the connection between the left and the right vertical lines breaks so there is no current flow Motor Toggle switch Programmable Controller YO XO O gt l PC Program U de T P XO XI P O U y G AC X1 T pa AF SS COM __ Power YO Supply Limit switch DC Power Supply ata MITSUBISHI 2 2 FX Series Programmable Controllers Basic Program Instructions 2 2 4 Load Load Inverse FXis FXin FX2n FX2nc Mnemonic Function Format Devices Program steps Initial logical LD operation contact LoaD type NO A EMS EE 1 normally open Initial logical LDI operation contact LoaD Inverse type NC H NM T 1 normally closed Program example A A XO pa 0 LD X 0 YO 1 OUT Y 0 pe 2 LI X 1 X1 3 OUT M100 M100 4 OUT T 0 gt P K 19 7 LD T 0 Xin e i 8 OUT Y 1 TO KR K19 When using hand held ri Y programmers the space key I needs to be pressed to enable the constant to be entered Basic points to remember
114. ry backed latched are usually used this ensures no loss of data during power down situations If however the voltage of the battery used to perform the battery backed service reduces excessively timer malfunctions may occur Selectable Timers FXis FXin FXan FXanc On certain programmable controllers driving a special auxiliary coil redefines approximately half of the 100 msec timers as 10 msec resolution timers The following PLC s and timers are subject to this type of selection For FXis driving M8028 ON timers T32 to 62 31 points are changed to 10 msec resolution Driving special auxiliary coils e Please check the definition of special auxiliary coils before using them Not all PLC s associate the same action to the same device ata MITSUBISHI 4 16 FX Series Programmable Controllers Devices in Detail 4 4 9 3 Retentive Timers FXis FXin FX2n FX2nc 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 Non retentive timer operation XO T20 T20 K123 YO Retentive timer operation
115. sing 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 Partial SO S0 Program i e go back to a state which has already been repeat jump processed the OUT instruction would be used S 20 S 20 with the appropriate STL state number OUT Alternatively the user may wish to make a S 21 Za large jump forwards skipping a whole section of STL programmed states S 22 S 21 OUT A Ss 22 S 23 S 23 Out is used for distant jumps If a step in one STL program flow was required STL So STL 1 to trigger a step in a second separate STL flow 1 flow 2 program flow the OUT instruction would be S 20 S 40 used S 21 S 41 OUT Vou S 42 S 22 S 43 S 23 S 44 Note Although it is possible to use SET for jumps and loops use of OUT is needed for 2 display of STL in SFC like structured format ata MITSUBISHI 3 6 FX Series Programmable Controllers STL Programming 3 3 5 3 5 1 Rules and Techniques For STL programs It can be seen that
116. situations However an average expected error would be approximately 1 5 x The program scan time Condition 1 The timer contact appears after the timer coil n i TO TO l Y10 Maximum timing error 2x Scan time The input filter time Minimum timing error Input filter time The timer resolution Condition 2 The timer contact appears before the timer coil TO Y10 TO DJ Maximum timing error 3 x Scan time The input filter time Minimum timing error Input filter time The timer resolution Internal timer accuracy e The actual accuracy of the timing elements within the PLC hardware is 10 pulses per million pulses This means that if a 100 msec timer is used to time a sin gle day at the end of that day the timer will be within 0 8 seconds of the true 24 hours or 86 400 seconds The timer would have processed approximately 864 000 100 msec pulses ata MITSUBISHI 4 18 FX Series Programmable Controllers Devices in Detail 4 4 10 Counters Device Mnemonic C Purpose Event driven delays Alias Counter s FXas FXAN FX2N FX2nc 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 c
117. ster of the 32 bit value i e 23 bits are bis 16 bits bobis bits el used to describe the mantissa 1 Bennet VERE value J Gb 23 bits J Sign bit Floating Point Format Valid ranges for floating point numbers as used in FX Main Processing Units Exponent Mantissa bit pattern bit pattern 11111111111111111111111 11111110 11111111111111111111110 00000001 00000000000000000000001 00000000000000000000000 Zero 0 or 1 00000000 00000000000000000000000 All digits are 0 zero Description Sign Remark Largest number 3 403 X 1038 Accuracy 7 significant figures Smallest number 1 175 X 10 38 Normal Float 0 or 1 ata MITSUBISHI 4 45 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 View as either integer of hexadecimal Perform all mathematical operations as normal M8023 OFF Integers 16 or 32 bit Data registers ata MITSUBISHI Use to view the mantissa and exponent of a floating point number as integer values Perform all mathematical operations using the special floating point instructions using double word format DEADD DESUB DEMUL DEDIV DESQR etc Scienti
118. t Devices Individual and Groupe 4 37 4 14 2 Word Devices sunn used an rad dd gta ak ede h 4 39 4 14 3 Interpreting Word Data ooonnccccnnoninicccnnnnoccccnnnononnnnnnnnnnn cnn nn nnnnn cnn ran cnn rra 4 39 4 14 4 Two s CGomplment aaa e even eee nete ever esen rent s sete tee tere verte eee rete 4 42 4 15 Floating Point And Scientific Notation aa au uuaaaaa aaa nana enen eee enen ee ee ver eee ze eee eee eee 4 43 4 15 1 Scientific Notaio M aiii aaa nenen seen h s eee eee eee senet re eter esen testise eee eee tree ererat 4 44 4 15 2 Floating Point F rmate a ce sutu deve done pe ur eo etno lege vedaene ae 4 45 4 15 3 Summary Of The Scientific Notation and Floating Point Number u ic 4 46 ata MITSUBISHI FX Series Programmable Controllers Devices in Detail 4 4 Devices in Detail FXis FXIN FX2n FX2nc 4 1 Inputs Device Mnemonic X Purpose Representation of physical inputs to the programmable controller PLC Alias UP Inp X Input Input contact Available forms NO and NC 9 contacts only see example device usage for references Devices numbered in Octal i e XO to X7 X10 to X17 Further uses None Example device usage Y10 Oke 8 NET K Available devices e Please see the information point on page 4 2 Outputs Alternatively refer to the relevant tables for the selected PLC in chapter 8 Configuration details e Please see chapter
119. te refilling If M2 is not reset i e it is active the program cycles back to STL state SO where the ore truck will wait until the start push button is given This is a simple program and is by no means complete but it identifies the way a series of tasks have been mapped t o an STL flow 80 xo x2 Y13 7 S 21 Y10 en XO x1 RST M S 22 Y11 TI TO Ss 23 _ 12 x2 S 24 Y13 OO T2 M2 M2 S 25 SETI M2 M2 LD M8002 LD X 1 OUTT 2 SETS 0 SET S 22 K 50 ZRST 40 STL S22 LD T 2 S 21 OUTY 11 ANIM 2 S 25 OUTT 1 SETS 25 STL S 0 K 70 UD T2 LD X 0 LD T 1 ANDM 2 ANDX 2 SETS 23 OUTS 0 ANI Y 13 STL S 23 STL S 25 SETS 21 OUTY 12 SETM 2 STL S 214 LD X 2 LD M2 OUT Y 10 SET S 24 OUTS 21 LD X 0 STL S 24 RET RSTM 2 OUT Y 13 END M8002 SET SO ZRSTI S2118 25 STL XO X2 Y13 SETIS21 SO STL Y10 Ss 21 XO DST M2 X1 SET S 22 STL Y11 S 22 K70 TI TI SET S 23 STL TI Y12 S 23 X2 SET S 24 STL I Y13 S 24 K50 T2 T2 M2 SETI S 25 T2 M2 So STL SETI M2 525 M2 E S 21 RET END
120. ter will be counting up However if Down count the B phase moves from ON to OFF the counter will be in a down configuration A phase One count is registered after both A and B phase inputs have been given and released in the correct order B phase C251 counts the ON OFF events of input XO the A phase input and input X1 the B phase input while X11 is ON X10 C255 starts counting immediately when X7 is RST C251 turned ON while X13 is ON The counting x11 inputs are X3 A phase and X4 B phase C251 C255 is reset when X5 is turned ON It can X12 K1234 also be reset with X12 in the sequence RST C255 X13 C255 DO Device specification e A maximum of 2 points 2 phase 32bit up down counters can be used The operation of the output contact in relation to the counted data is the same as standard 32bit counters described in section 4 11 Setting range e 2 147 483 648 to 2 147 483 647 Direction setting e Check the corresponding special relay M8x Y to determine if the counter is counting up or down ata MITSUBISHI 4 29 FX Series Programmable Controllers Devices in Detail 4 4 12 Data Registers Device Mnemonic D FXis FXin FX2N FX2nc Purpose A storage device capable of storing numeric data or 16 32bit patterns Alias Data register device word D register D Word Available forms General use registers see page 4 34 Battery backed latched
121. tes the end of N denotes the Master a master control MCR IN nest level NO to 2 Control Reset block N7 to be reset Program example XO o MC NO M100 Ee l 0 LD x 0 M100 Kei MC No REE O EEE ENER SP M 100 x1 4 LD xX 1 Cp 5 OUT Y 0 X2 6 LD X 2 YI 7 OUT Y 1 Es 8 MCR N 0 Note SP space key MCR NO N nest level of MC NO to N7 Basic points to remember After the execution of an MC instruction the bus line LD LDI point shifts to a point after the MC instruction An MGR instruction returns this to the original bus line The MC instruction also includes a nest level pointer N Nest levels are from the range NO to N7 8 points The top nest level is 0 and the deepest is 7 The MCR instruction resets each nest level When a nest level is reset it also resets ALL deeper nest levels For example MCR N5 resets nest levels 5 to 7 When input XO ON all instructions between the MC and the MCR instruction execute When input XO OFF none of the instruction between the MC and MCR instruction execute this resets all devices except for retentive timers counters and devices driven by SET RST instructions The MC instruction can be used as many times as necessary by changing the device number Y and M Using the same device number twice is processed as a double coil see section 2 5 2 N
122. 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 Basic Notes On The Behavior Of STL programs e When an STL state becomes active its program is processed until the next step is triggered The contents of the program can contain all of the programming items and features of a standard ladder program i e LoaD AND OR OUT ReSeT etc as well as applied instructions e When writing the sub program of an STL state the first vertical bus bar after the STL instruction can be considered in a similar manner as the left hand bus bar of a standard ladder program Each STL step makes its own bus bar This means that a user cannot use an MPS ER instruction directly after the STL instruction STL D X001 i Y000 see i e There needs to be at least a S005 2600 single contact before the MPS instruction Yot1 Note Using out coils and even applied X012 instructions immediately after an STL Y014 instruction is permitted X013 RET In normal programming using dual coils is not an acceptable technique However repetition of a coil in separate STL program blocks is allowed This is because the user can take advantage of the STL s unique feature of isolating all STL steps except the active L STL steps This means in practice that there will be n
123. tivates With counters the constant identifies how many times the counter must be pulsed or triggered before the counter coil activates For example a counter with a constant of 8 must be triggered 8 times before the counter coil finally energizes The following table identifies some basic parameter data for various timers and counters Timer Counter Setting constant K Actual setting Program steps 1 msec Timer 0 001 to 32 767 sec 2 147 483 647 10 msec Timer 1 to 32 767 0 01 to 327 67 sec 3 100 msec Timer 0 1 to 3276 7 sec 16 bit Counter 1 to 32 767 1 to 32 767 32 bit Counter 2 147 483 648 to 2 147 483 648 to 5 2 147 483 647 ata MITSUBISHI 2 4 FX Series Programmable Controllers Basic Program Instructions 2 2 5 2 Double Coil Designation p Y3 Y3 i Cou X2 Ax I I 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 The first Y3 tuns ON because X1 is ON The contacts associated with Y3 also energize when the coil of output Y3 energizes Hence output Y4 turns ON 2 The last and most important line in this program looks at the status of
124. to how the information is read Interpreting Word Data As word data can be read in many ways the significance of certain parts of the word data can change PLC s can read the word data as A pure bit pattern A decimal number A hexadecimal number Oras a BCD Binary Coded Decimal number The following examples will show how the same piece of data can become many different things depending wholly on the way the information is read or interpreted a Considering a bit pattern The following bit pattern means nothing it is simply 16 devices which have two states Some of the devices are randomly set to one of the states However if the header notation base 2 is added to the 16 bit data the sum decimal total of the active bits can be calculated e g MSB 214 213 91291191099 98 97 n 95 n 93 92 91 90 mm 0 0 11111111101011111110 11 0 1 Decimal value 20 x 1 22x 1 24 x 1 29 x 1 2 x 1 29 x 1 21 x 1 211 x 1 272 x 1 Decimal value 7797 This is in fact incorrect There is one bit device which has been shaded in If its header notation is studied carefully it will be noted that it says MSB This is the Most Significant Bit This single bit device will determine if the data will be interpreted as a positive or negative number In this example the MSB is equal t
125. traction operations The procedure is very simple in the following example 15 7 is going to be solved Step1 Find the binary values this example uses 8 bits 15 00001111 7 00000111 Step2 Find the inversion of the value to be subtracted Procedure invert all 1 s to Ois and all Ois to 1 s 7 00000111 Inverted 7 11111000 Step3 Add 1 to the inverted number Procedure add 1 to the right hand most bit Remember this is binary addition hence when a value of 2 is obtained 1 is moved in to the next left hand position and the remainder is set to 0 zero Inverted7 11111000 Additional1 00000001 Answer 11111001 This result is actually the same as the negative value for 7 i e 7 Step4 Add the answer to the number the subtraction is being made from i e 15 Procedure Remember 1 1 0 carry 1 in base 2 binary Original value15 00001111 Answer found in step3 11111001 Solution 1 00001000 The 1 is a carried 1 and is ignored as this example is only dealing with 8 bits Step 5 Convert the answer back 00001000 8 The answer is positive because the MSB the most left hand bit is a 0 Zero If a quick mental check is made of the problem it is indeed found that 15 7 8 In fact no subtraction has taken place Each of the steps has either converted some data or performed an addition Yet the answer is correct 15 7 is 8 This example calculation was based on 8 bit numbers but it will work
126. ts activates while MO is ON of the same M device as contact Contact has already operated so contact and do not operate e Contact is a normal LD contact and activates while M2800 is ON ata MITSUBISHI 4 5 FX Series Programmable Controllers Devices in Detail 4 4 4 4 4 1 State Relays FXis FXin FX2n FX2nc Device Mnemonic S Purpose Internal programmable controller status flag Alias State coil relayl contact flag S coil relay contact flag STL step coil relay contact flag Annunciator flag Available forms NO O and NC contacts and output coils see example device usage for references Devices numbered in Decimal i e SO to S9 S10 to S19 Further uses General stable state state relays see page 4 6 Battery backed latched state relays see page 4 7 STL step relays see page 4 8 Annunciator flags see page 4 9 Example device usage a d E MR General Stable State State Relays A number of state relays are used in the PLC The coils of these relays are driven by device contacts in the PLC in the same manner that the output relays are driven in the program All state relays have a number of electronic NO and NC contacts which can be used by the PLC as required Note that these contacts cannot directly drive an external load Only output relays can be used to do this Available devices e Please see the in
127. upt Control Flags M8050 to M8059 and D8050 to D8059 6 7 6 7 Error Detection Devices M8060 to M8069 and D8060 to D6069 6 8 6 8 Link and Special Operation Devices M8070 to M8099 and D8070 to D8099 6 9 6 9 Miscellaneous Devices M8100 to M8119 and D8100 to D8119 6 10 6 10 Communication Adapter Devices i e 232ADP A9DADP 6 10 6 11 High Speed Zone Compare Table Comparison Flags eerren 6 11 6 12 Miscellaneous Devices M8160 to M8199 rrrnrrrnnnnrrnrnnnnnnnnnrvrrnvrnnnnennrrrnnnnnnnn 6 12 6 13 Index Registers D8180 to D8199 e cece ee sesseeeeneeeeeeeeeesseeeeeeeeseneeeeeeneeeee 6 13 6 14 Up Down Counter Control M8200 to M8234 and M8200 to D8234 6 14 6 15 High Speed Counter Control M8235 to M8255 and D8235 to D8255 6 14 6 16 Error Gode Tables Fe aak korenti nt bi ed dd ht etasjene 6 15 7 Execution Times And Instructional EE ee 7 1 PA BASICOS TUCASA cres 7 1 TA Applied e Ed elle 7 3 7 3 Hierarchical Relationships Of Basic Program Instructions errrnnnrrnnnrnnrrnnnnr 7 11 7 4 Batch PROCESSING Lasses sakene 7 13 7 5 Summary of Device Memory Allocations sesseesseeeeeennreserrnnerernrererneesrrrrsee 7 13 7 6 Limits Of Instruction Usage exis coito dh 7 14 7 6 1 Instructions Which Can Only Be Used Once In The Main Program Area 7 14 7 6 2 Instructions Which Are Not Suitable For Use With 110V AC Input Units
128. very brief but is designed to quickly outline the differences and similarities between STL SFC and IEC1131 part 3 In recent years Sequential Function Chart or SFC style programming including other similar styles such as Grafcet and Funktionplan have become very popular through out Europe and have prompted the creation of IEC1131 part 3 The IEC1131 SFC standard has been designed to become an interchangeable programming language The idea being that a program written to IEC1131 SFC standards on one manufacturers PLC can be easily transferred converted for use on a second manufacturers PLC STL programming is one of the basic programming instructions included in all FX PLC family members The abbreviation STL actually means STep Ladder programming STL programming is a very simple concept to understand yet can provide the user with one of the most powerful programming techniques possible The key to STL lies in its ability to allow the programmer to create an operational program which flows and works in almost exactly the same manner as 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 I Instruction a word mnemonic entry system II Ladder a graphical program construction method using a relay logic symbols III SF
129. y 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 XO is turned ON If XO is turned OFF after the activation of M507 the ON status of M507 is self retained i e the NO contact M507 drives the coil M507 However M507 is reset turned OFF when the input X1 is turned ON i e the NC contact is broken A SET and RST reset instruction can be used to retain the status of a relay being activated momentarily XO SET M507 RSTI M507 External loads e Auxiliary relays are provided with countless number of NO contact points and NC contact points These are freely available for use through out a PLC program These contacts cannot be used to directly drive external loads All external loads should be driven through the use of direct Y outputs ata MITSUBISHI 4 4 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
Download Pdf Manuals
Related Search
Related Contents
Polycom IP331 User Guide Owner`s Manual - Spanish KoolKani® KK-360R User`s Manual Rechargeable Multi No. 21 - Bitsavers.org User Manual (English) File INSTALLATION MANUAL Ficha Técnica Copyright © All rights reserved.
Failed to retrieve file