Home
Q-series basic Course(for GX Developer)
Contents
1. Instruction Execution Processing details a symbol condition Number of basic steps App 27 Category Instruction symbol Symbol Bit tests S1 S2 D S1 S2 D S1 S2 D 5 Execution Processing details conditiori Data processing instructions Execution Processing details conditioni D Match No D 1 No of matches S2 R a 1 S 1 S 5 2 D Data searches 2 D S S S S S D Decode Encode n n n n D D D D n D n n n D Match No D 1 No of matches Decode of 8 to 256 s D S Decode y a a Decode of 256 to 8 Encode ie bits App 28 Number of basic steps Number of basic steps Instruction Category ike NUNIP WTOB WTOBP BTOW BTOWP
2. 1 The conditions under which character string comparisons can be made are as shown below e Match All characters in the strings must match e Larger string If character strings are different determines the string with the largest number of character codes If the lengths of the character strings are different determines the longest character string e Smaller string If the character strings are different determines the string with the smallest number of character codes If the lengths of the character strings are different determines the shortest character string App 11 Category Instruction symbol Symbol BKCMP BKCMP BKCMP lt gt BKCMP lt gt BKCMP gt BKCMP gt BKCMP lt BKCMP lt BKCMP lt BKCMP lt BKCMP gt BKCMP gt BKCMP P BKCMP P BKCMP lt gt P BKCMP lt gt P BKCMP gt P BKCMP gt P aa BKCMP lt P BKCMP lt P BKCMP lt P BKCMP lt P BKCMP gt P BKCMP gt P Execution Processing details condition Compares n points of data from S1 with n points of data from S2 in 1 word units and stores the results of the comparison at n points from the bit device designated by D App 12 Num
3. I x0 co 0 m MO gt During operation 1 Mo l a 1 MO Y71 l 4 Y70 gt Buzzer i MO K30 1 fit TO gt 3 sec timer l TO 12 k 1al YTT gt Operating the conveyor belt 1 x1 K6 e S a CO gt Counter for counting the number Y71 of packages l 19 t C RST co H 1 I I Operating Procedure 1 Create a new project 1 Click DJ on the tool bar P MELSOFT series GX Developer Unset Project Edit Find Replace View Online rs k5 2 The dialog box for creating a new project appears Confirm that the PLC series is QCPU and the PLC type is QO2H Then click the button New Project PLC series JQCPU Gmode PLC Type A noz Click Program type p Label setting Ladder Do not use label C SFC I MELSAP L C Use label CsT Select when using ST program FB and structures I Device memory data which is the same as program data s name is created r Setup project name J Setup project name Drive Path C MELSEC GPPW Project name a Bee Title e a 3 If the project in preparation exists the dialog box appears asking if you want to save the product Click the button 4 The screen shifts to the new project creation mode 2 Create a program Using the keyboard F5 x o J snie Fs c lo a r mj lo 5 4 ap J Using the tool buttons
4. 1 Functions supported by the logic test function GX Simulator The functions supported by the logic test function GX Simulator include functions executed from the logic test function GX Simulator menu and functions executed from the GX Developer menu For functions from the GX Developer menu it is necessary to use them together with the logic test function GX Simulator Ladder monitor f Monitors the operation status of the logic test function GX Simulator Device monitor Forcibly rewrites device values of the logic test function GX Simulator Device test S during monitoring i Writes parameter files and program files to the logic test function GX Write to PLC Functions Simulator executed from PLC diagnostics Checks the logic test function GX Simulator status and errors the GX Skips does not execute program execution in the range between two Skip execution Developer menu designated steps Partial execution Executes the part of the program in a designated step or pointer range Step execution Executes the sequence program one step at a time Remote operation Operates the logic test function GX Simulator execution status ccs Monitors the program execution status and number of executions as a Program monitor list oe table and starts and stops the program execution in the table Conducts testing by monitoring the device memory status forcing the Monitor test g
5. Gal alte fa PSI Cd SI ESOS BSCS Anooe gt SJoSJofeys ono mmoles mmole MITSUBISHI E v A CPU module I O modules Figure 1 3 MELSEC Q Module Configuration Power supply module Main base unit Extension base unit With three I O Q 9 modules e A ddns samod A ddns samog With five I O modules A ddns samod A ddns samodg With eight I O modules A ddns samodg Aiddns Jamod With 12 I O modules Aiddns amog Aiddns amod Q312B e The main roles of the base unit are to attach the power supply module CPU module and I O modules securely to supply 5VDC power from the power supply module to the CPU module and I O modules and to transmit the control signals to each module e QOOJCPU which is all in one power supply base is available for the basic model CPU Power Supply Module Output Module model 100V 120V AC 5V DC 6A Q61P A1 200 240V AC 5V DC 6A Q61P A2 100V 120V AC 5V DC 3A 24V DC 0 6A Q62P 24V DC 5V DC 6A Q63P CPU Module Module connected to the PLC Maximum processing speed 28 K steps QO2HCPU 4096 points 60 K steps QO6HCPU 124 K steps Q12HCPU 256 K steps Q25HCPU 256 points 8 K steps QOOJCPU 14 K steps 160ns QOOCPU 1024 points 14 K steps
6. PswaPP s1 s2 DH SiDin SiDin App 48 Category Instruction symbol Processing details Execution condition e Writes the device data of the host station to the shared memory area of the host station CPU module e Reads device data from the CPU shared memory area of another station CPU module to the host station e Performs the automatic refresh of the intelligent function module general data processing and the automatic refresh of the CPU shared memory App 49 Number of basic steps Appendix 3 Special Relay List Special relays SM are internal relays whose applications are fixed in the PLC For this reason they cannot be used by sequence programs in the same way as the normal internal relays However they can be turned ON or OFF as needed in order to control the CPU and remote I O modules The headings in the list that follows have the following meanings e Indicates whether the relay is set by the system or user and when setting is performed if it is set by the system lt Set by gt S Set by system U Set by user in sequence program or test operation at a peripheral device S U Set by both system and user Set by lt When set gt indicated only if setting is done by system When set Each END Set during each END pr
7. 0100 1010 1001 1101 0000 0000 1001 1101 0000 0000 0000 0000 0000 0000 0000 0000 Numbers in D3 Numbers in D2 Path name A SCHOOL QEX7 Program name MAIN Ladder Example Create the following ladder with the GX Developer and write it to the CPU of the demonstration machine to check if the MOV instruction works properly Fr MOV DO D1 e E RST D1 Operating Procedure See Section 4 4 Operating Procedure for the detailed procedure of the following operations x lt uw wu uo ou 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder How to alter the Follow the procedure given below to alter the transfer instruction transfer instruction Example Change the transfer data K200 of MOV K200 DO to K100 1 Double click the instruction to be changed 2 A ladder input window appears fan symbol EA afo ieam oK Ent feel 3 Move the cursor to 2 of MOV K200 DO and write 1 over the 2 4 Click the button on the ladder input window All data exist in 4 can be changed using the above method Be sure to make the changes in overwrite mode If Insert is displayed in the lower right portion of the screen press the key to change it to overwrite Ovrwrte 5 When finished click 2 on the toolbar Operation Practice Check that 200 is displayed under both DO and D1 on the monitor screen when XO on the
8. 1 Click al Alt F10 on the tool bar 1 Click tol dh EA aF5 caF5 cafil i y i 2 Drag the mouse from the start position to the a 2 Drag end position i A vertical line will be created to the left of the m cursor i 3 A line will be created when the left button of the mouse is released Continued on the next page Continued from the previous page Enter symbol ao da o 4 Click B then enter Y73 6 The ladder will appear The ladder will appear 4 Click S on the tool bar and enter Y73 5 Click the button 6 The ladder lt Y73 _ you entered will appear 2 Deleting lines if A ladder program to be created 3 A line will be removed 4 Press Delete r I L L Perform the following steps to delete the line from the ladder shown on the left 1 Click S at F9 on the tool bar 2 Drag the mouse from the start position to the end position that you want to delete 3 The line will be deleted when the left button of the mouse is released The line drawn for End instruction cannot be removed 4 Press the key to delete C Y73 2 8 3 Inserting Deleting rows A ladder program to be modified 1 Inserting rows oN lt
9. 10 Click Clear PLC memory Format PLO memory Arrange PLC memory Create title Transfer setup Total free space volume Bytes Transfer Setup lo i JE Be Serial NETO NET CG Lik Etheret USE Board board board board COM COM1 Transmission speed 115 2Kbps PLC side I F PLO MNET 10 H MNETWD module module CC Link module mod jule fred No specification Other station Single network Time out Sec fia Retry times p 11 Click Connection channel list PLC direct coupled setting Connection test Ji L zi C24 NETAO H NETWD CC Link Ethemet Multiple CPU setting 3333 te 1 024 NET 10 H Accessing host station NETOD CC Link Ethernet Detail System image Line Connected Q ABTELC24 es Write to PLC PLC Connection Network No f Station No Host PLC type Q02 H1 Target memory Program memory Device memoy v Title File selection Device data Program Common Local 13 The target CPU switches nemory Device memory Param Prog Select all Cancel all sel Parameter EA PLCNetwork Remote Clear PLC memory Format PLC memory Arrange PLC memory Create title Total free space volume Bytes 9 Set the RUN STOP switch of the second PLC CPU to STOP 10 Click the Transfer se
10. S1 1 81 V S2 1 S2 gt D 1 D 1 The number of steps may vary depending on the device and type of CPU module being used Number of Steps QCPU QnACPU e Word device Internal device except for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K8 and which use no index modification A e Constant No limitations Devices other than above 2 The subset is effective only with QCPU App 24 Instruction Execution Processing details condition DJS gt D Number of basic steps DXOR DXORP DXOR S1 1 S1 4 S2 1 S2 gt D 1 D S S S S S1 4 S2 D D 1 D 4 S 1 S gt D 1 D ime s 03 1 S2 D S D S D 1 S2 D D n D n S D S D 1 S2 D 1 S2 D S pxwr__ sijs2 o H S1 1 S1 4 S2 1 S2 gt D 1 D 1 The number of steps may vary depending on the device and type of CPU module being used Device Number of Steps QCPU QnACPU e Word device Internal device except for file register
11. The most significant bit indicates the sign If the bit is 1 the bits contain a negative number in two s complement form Binary Coded Decimal BCD Binary BIN Hexadecimal H 00000000 00000000 00000000 00000000 00000000 00000001 00000000 00000001 00000000 00000010 00000000 00000010 00000000 00000011 00000000 00000011 00000000 00000100 00000000 00000100 00000000 00000101 00000000 00000101 00000000 00000110 00000000 00000110 00000000 00000111 00000000 00000111 00000000 00001000 00000000 00001000 00000000 00001001 00000000 00001001 00000000 00010000 00000000 00001010 00000000 00010001 00000000 00001011 00000000 00010010 00000000 00001100 00000000 00010011 00000000 00001101 00000000 00010100 00000000 00001110 00000000 00010101 00000000 00001111 00000000 00010110 00000000 00010000 00000000 00010111 00000000 00010001 00000000 00011000 00000000 00010010 00000000 00011001 00000000 00010011 00000000 00100000 00000000 00010100 00000000 00100001 00000000 00010101 00000000 00100010 00000000 00010110 00000000 00100011 00000000 00010111 ON OORA WD 00000001 00000000 00000000 01100100 00000001 00100111 00000000 01111111 00000010 01010101 00000000 11111111 00010000 00000000 00000011 11101000 00100000 01000111 00000111 11111111 01000000 10010101 00001111 11111111 00100111 00010000 01111111 11111111 11111111 11111111 11111111 11111110 10000000 00000000 CPU module Output Module Power Supply Input mo
12. 3 For extensions refer to REMARK at Appendix 66 App 66 Special Register List Continued Corresponding Corresponding Name Meaning Explanation ACPU CPU DOCO Number SD5 SD6 Continued 3 Time value set Number Contents SD8 SD5 Time In 1 u s units 0 to 999 p s SD9 SD6 Time In 1 ms units 0 to 65535 ms SD10 SD7 SD8 SD11 SD9 SD12 SD10 SD13 SD11 Vacancy SD12 SD14 SD13 SD15 SD14 SD15 4 Program error location Number Contents D5 S Error New O Rem D6 File name D7 ASCII code 8 characters D8 D9 Extension 3 2EH D10 ASCII code 3 characters D11 Pattern 4 D12 Block No D13 Step No Transition No D14 Sequence step No L D15 Sequence step No H Error Error 4 Contents of pattern data common common 1514 to 4 3 2 1 0 Bit No information information olo to 0 0 Not used Ls block designated 1 not designated 0 SFC step designated 1 not designated 0 SFC transition designated 1 not designated 0 5 Switch cause Number Contents D5 Switching factor 0 Auto 1 Manual D6 Switching direction 0 Standby to control 1 Control to standby D7 Tracking flag 6 D8 D9 D10 D11 Vacancy D12 D13 D14 S Error New Q4AR D15 6 Tracking flag contents Shows whether or not the tracking data is valid 1514 to 4 3 2 1 0 BitNo 0 0 to
13. DATE DATE DATE P DATE P S1 D SECOND D Sec lower S Sec upper SECONDP SECONDP S D S 1 S2 Min DATE P DATE P S1 S2 Sec 1 S2 S2 D D S S DATE D S2 Hour D D D HOUR s D S Sec lower Sec upper HOURP D App 42 16 Peripheral device instructions Instruction Category symbol Processing details Stores message designated by S at QnACPU This message is displayed at the peripheral device e Data input from the peripheral device is stored at device designated by D 17 Program control instructions Instruction Category symbol Symbol Processing details PSTOP L PSTOP__ Program nameH Places designated program in standby status POFF pore Program name Turns OUT instruction coil of designated program OFF and places program in POFFP POFFP Program name standby status PSCAN e Registers designated program as scan execution type PLOW e Registers designated program as low speed execution type PLOWP PLOWP Program name i Execution condition Execution condition Number of basic steps Number of basi
14. C Always ON C Push Button 6 The set contents are displayed r Note that this can be set by directly typing MO ON on a keyboard To next page From previous page a Timing Chart Format Edit Timing Chart Format i moi e Timing Chart Format Input File PHI Edit Scan Enter S i Pas p 2 Q Device Entry Device Name 9 Set 2 Device Numba iaki z fien 10 Click p 11 Click Initial Value gt j F C Device Edit Scan 18 139 20 7 2 3 24 25 28 vec _ 45 Clickt Jent E Cancel To next page 7 Click the Edit Timing Chart Format button The Timing Chart Format Input dialog box appears 8 Click Device and then click Enter Device 9 Set Device Name X and Device Number 1 10 Click the OFF radio button 11 Click the button X1 is registered 12 Follow the procedures 9 to 11 again to register XO default OFF 13 Click the button 14 The registered device is displayed 15 Click the gt button to display 20th scan 16 Click 20th scan of the XO line to specify it 17 Click H or click Edit Bit Device and Device ON sequentially From previous page Timing Chart Format Input 18 The timing at which XO turns on is set File Device Edit Scan z Timing Chart Format Input Ee 19 Click the gt
15. END H lt lt Signal timing gt gt toca L XO R ttt xX1 _ gt _ a ee re 0 100 200 300 400 500 600 700 800 900 1000 f Time unit 10ms lt lt Operations to simulate gt gt 1 The lamp Y71 on the demonstration machine lights when MO turns on during the device test by GX Developer 2 An exterior person confirms the lamp Y71 lighting turns on XO and then turns it off T 200 T 400 3 Confirm that the self maintaining ladder in the sequence program is in operation and then turn on X1 to reset the maintaining status After that turn off X1 again T 600 T 800 4 Turn off MO T 1000 In the example operation below settings listed in the following table are made Setting method Device value input XO X1 Timing chart input 8 3 1 Push Button Device value input In the example operation below a simulation where MO turns off 10 s after MO turns on is set LADDER LOGIC TEST TOOL f Sea Tools Help Device Manager Always ON To next page 1 Click Start and then I O System Settings in the window of the logic test function GX Simulator 2 Double click Device Value Input No 1 No 25 in the I O System Settings tree 3 Click the upper M button in the No 1 area 4 Set Device Name M Device Number 0 and Select ON
16. S Status change 2 ERROR 3 USER 4 BAT ALARM Bit pattern of LED that is turned off SD202 LED off 6 CARD A memory card 7 CARD B memory card 8 Vacant Stores bit patterns of LEDs turned off Only USER and BOOT enabled e Turned off at 1 not turned off at 0 App 71 Special Register List Continued Corresponding Meaning Explanation Whereget nel Corresponding CPU e The operating status of the remote I O module is stored in the following format B15 i B4B3 e The CPU operating state is stored as indicated in the following figure B15 _ B12B1441 B8B7 S Every END i ple processing Operating Operating lt state of CPU state of CPU 1 Operating status of CPU RUN STEP RUN D9015 Hra format 2 STOP PAUSE cause Key switch change Remote contact Peripheral computer link or operation from some other remote source Internal program instruction Note Priority is earliest first Error 0 Test not yet e Set when the device test mode is executed on GX executed D Device test 1 During X eveloper execution ty S Request New Remote type device test 3 During X Y device test When error is generated the LED display flicker is made Priorities 1 according to the error number setting priorities a e The setting areas for priorities are as follows D9038 ce B15 _B12B11 B8 B7 B4 B3 BO SD207 4th priority 3rd priority 12nd priority 1st priority
17. Enor operation mode at the stop of PLC I All CPUs can read all inputs F savory apenas PLE I ACPO on eadal oaa 4 Click the button Refresh settings C3 Change screens Setting v I Setstarting devices for each PLC te Send range for each PLC PLC The auto refresh area Caution Point Start End iy No 1 No 2 0l No 3 No 4 Caution set HEX from starting add Refer to the user s manual of aaa apy a same when The applicable device of head device is BMY DWHZR The unit of points that send range for each PLC is woi Import Multiple CPU Parameter Check Cen Cancel 2 Writing to CPU sr 1 Suppose that the ladder program sequence O v program has been created with GX Developer amp to proceed to the next step BAT soor aeh 2 Set the RUN STOP switch on the CPU to 2 2 Set the switch to STOP STOP 3 D 3 Click E on the tool bar or click Online iew Online Diagnostics Tools Writ to PLC menu alale ale aies il iga 3 Click x meumeu t 9 0 sF sF8 aF aF8 aff Continued on the next page Continued from the previous page 4 From the File selection tab click to select the Se 4 Select a program to be lt gt fPIC module 5 Click program and parameter that you want to write PLC written by clicking on data E fo
18. lt gt Continued on the next page Continued from the previous page 9 The symbol will appear J 10 Click then enter Y70 11 Click 14 Click then enter X3 17 Click 8 then enter Y71 18 Click o 9 The symbol you entered C Y70 will appear 10 Click on the tool bar and enter Y70 11 Click the button 12 The symbol you entered gy will appear 13 Move the cursor to the ladder under die 14 Click on the tool bar and enter X3 15 Click the button 16 The symbol you entered qf will appear 17 Click on the tool bar and enter Y71 18 Click the button 19 The symbol you entered C Y71 gt will appear 20 This is the end of the procedure 2 5 Converting the Program 1 Activate and select the window that displays ZZ OJ G E 1 Activate the window the ladder you want to convert a aF5 dsl al 2 Click on the tool bar or select the convert gt convert menu F4 1 If an error occurs while converting the cursor will automatically move to the defective point of the ladder program Check the point and correct the program as necessary 2 6 Writing to the PLC CPU 1 Parameter setting for Multiple CPUs if only one CPU
19. 1 Read data from FD Read the project data stored in FD e Click B on the tool bar MELSOFT series GX Developer Project Edit Find Replace Conve Click beside Project drive and select a to display SCHOOL and the path name Double click on SCHOOL z Click to display the pull down menu Open project Select a B BB Project drive After selecting the project drive double click on SCHOOL Drive Path JAN Project name e Double click on QEX10 Once QEX10 is displayed on the project name box click the button Open project Project drive After setting the project name click the button Drive Path A amp S school Projectname GEX10 Cancel The following procedures are the same as the Operating Procedure in Section 4 4 2 Write to the PLC 3 Monitor the ladder Operation Practice e Turn XO ON and make sure that the program works properly Practice Question 8 Related Practice Question 5 4 Arithmetic Operations Instruction AASCHOOL aB 16 MAIN 5 4 1 BIN 16 bit data addition BIN 16 bit data subtraction 13 The device content specified as is added the device content specified as and the result is stored in device every time the input condition is turned ON 0 DoL___ 6 gt pol Input condition First ON O A
20. DBCD DO K8Y40 H Outputs a positive number CIRCUIT END App 107 Appendix 5 19 Program showing divided value of 4 digit BIN value to 4 places of decimals 1 Example 1 Two digital switches are provided one of which contains a dividend and the other of which contains a divisor The results of operation using this dividend and divisor are displayed in its 4 integral parts and 4 decimal parts Digital display Digital switch X2F to X20 _ 0 XO QX 42 Import dividend and dividor Division Clear index register ZO Z1 data register D10 m FOR Set display address after the decimal point Vv Multiply the remainder with 10 divide the result and take a quotient of lower 1 digit d Display a quotient Display lower 1 digit 4 obtained YES D Count the number of times register Z1 EN App 1 08 INC 21 QY 42P LLU LL Y5F to Y50 Y4F to Y40 Dividend Digital switch X30 to X3F DO Divisor Digital switch X20 to X2F D1 DO D1 D2 D3 Quotient Remainder 4x Z1 D10 HC D10 Z0 isttime 4x0 0 HC KO HC 2nd time 4x1 gt 4 HC K4 H8 3rd time 4x2 8 HC K8 H4 4th time 4x3 12 HC K12 HO D3 x10 D3 D3 D1 D2 D3 Y4C Y48 Y44 Y40 to to to to 4F 4B 47 43 Last 1st 2nd 3rd 4th digit The sequence program of example 1 The FOR NEXT in
21. Enter after clicking Bl Enter after Enter after clicking g x H sF lel SEG Fo Fv sto F5 F6 F 1 Click on the toolbar to open the ladder input window 2 Enter X0 with the keyboard and click the button 3 Click on the toolbar to open the ladder input window 4 Enter CO with the keyboard and click the button 5 Click El on the toolbar to open the ladder input window 6 Enter MO with the keyboard and click the button 7 When creating the circuit is finished click 2 on the toolbar 3 Write to the PLC As the demonstration machine has two CPUs setting parameters for Multiple CPU is required The setting is not necessary only for one CPU machine Refer to Section 3 2 Parameters for the Multiple CPU setting procedure PRESS SraSre snes Click Ea on the tool bar The dialog box for writing to the PLC appears et project LD Editmode M pw Online Diagnostics Tools Window 2 Click the button Checkboxes for the program of the write data and the parameter displayed in the window are automatically marked 3 Click the button Write to PLC Click this button after the program name MAIN and Connecting interface ale lt gt PLC module PLC parameter appear and their checkboxes are marked fi Station No Host PLC type Title
22. Number of basic steps 10 10 11 Instruction Category oe Processing details Execution condition Number of basic steps JP ZNFR Reads data from the special function modules at remote I O stations GP ZNFR__ Un S1 S2 D1 JP ZNTO Writes data from the special function modules at remote I O stations GP ZNTO Writes the data of host station to the word device of other stations Jn n1 lon a n2 lea Reads the word device data of another station to host station JP ZNRD App 46 Instruction Category symbol Processing details Execution condition instruction Reading data from Reads data from the special function modules at remote I O stations GP RFRP instruction Writing data to Writes data from the special function modules at remote I O stations GP RTOP Z RTREAD n RTREAD zerweire SH fetes routing data to the area designated by RTWRITE Z D Reads data set at routing parameters ZP RTREAD n D 4 Z n s S SZ7PRTWRITE n routing parameters App 47 Number of basic steps Appendix 2 5 QCPU instructions Instruction
23. e For refresh from link to CPU module B W etc designate whether to read from the link module MELSECNET 10 module 3 information OFF Operative network ON Standby network OFF Reads ON Does not read OFF Writes ON Does not write MELSECNET 10 module 4 information CC Link error OFF Normal ON Error e For refresh from CPU module to link B W etc designate whether to uU write to the link module Goes ON when a CC Link error is detected in any of the installed New N e Goes ON when a CC Link error is detected in any of the installed S Status New QCPU QJ61QBT11 Goes OFF when normal operation is restored change remote New A 1S J61QBT11 Stays ON even after normal operation is restored SFC programs not U S Error occurrence Presence absence used of SFC program SFC programs used e Turns ON when an SFC program is registered OFF when an SFC program is not registered e Initial value is set at the same value as SM320 Goes ON automatically if SFC program is present e Turn this relay OFF before the SFC program processing to suspend SFC programs Start stop SFC stop program SFC programs status of continuous block Continuous transition prevention flag Output mode at block stop step execution n n n n n n n n n n n n n n n n n n s s a a a a a a a a N N NINJ N N N N Np N N N N N J opi oan 2 fo
24. 2 Perform I O assignment on the slot 4 4 on which Q62DA is installed Type Intelli required Model name Q62DA Points 46points StartXY 90 Hexadecimal 3 Click the button The Switch setting for I O and intelligent function module dialog box appears 4 The following is an example of the intelligent function module switch settings of Q62DA The default value of each switch is 0 Description of Switch Set Value Item setting Output range CH1 0 to 5V Do not input HOLD CLEAR Default value Synchronous asynchronou 4 Do not input Sy y Default value mode selection Do not input fixed to 0 Default value 5 Click the button 6 Click the button on the Qn H Parameter dialog box to terminate the intelligent function module switch settings 7 6 4 Setting with GX Configurator LD Read mode MAIN 65 Step IEA Window Help Check program Merge data Check parameter Transfer ROM gt Delete unused comments Clear all parameters IC memory card Start ladder logic test Set TEL data Intelligent Function utility Customize keys Change display color Options Create start up setting file Intelligent function module utility C MELSEC GPPWAOA 1 E BX Intelligent function module parameter Online Tools Help r Intelligent function module parameter setting module select Start 1 0 No Module type
25. A O A N o to binary code Taa E e a EO e As each of the word devices D data register T timer current value and C counter current value consist of 16 bits 1 word transferring the data is performed in units of device e Using 16 bit devices such as X Y and M allows you to handle 16 bit data To do that the numbers allocated to the 16 bit devices must be in consecutive order e Four bit devices allow you to handle data in units of 4 bits E E E 1 2 3 4 Place digit EE E 8 4 2 0 8 4 1 8 4 8 2 1 K4 X20 w W Q O m lt o wo v Al o N N N N N N N N N N N N N N N I f S S JHE a SI S 3 alg t First Number Specify to read K2X28 K1X20 ne gt Read digit data 4 two digit data 12 X2F to X28 X23 to X20 ead one digit data K2X20 at X27 to X20 Read two digit data 34 K3X20 gt Read three digit data 234 X2B to X20 ead three digit data Se gt Read four digit data 1234 X2F to X20 As long as four bit devices to read 4 digit data are in consecutive order any bit device can be the first one e Other bit devices can be used in the same way as described above M M M M M M M M M M M M M MIM Internal relay M 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 k K2M6 lt K1Mo0 i KN i RE oe Nz z ozs A sample program that performs data input
26. B 5 S S i E SD260 to Information of e Configuration is identical to that for the first module 2nd module SD264 SD265 to enero of Configuration is identical to that for the first module e Configuration is identical to that for the first module SD269 D270 App 73 Information of to SD274 4th module Set by Corresponding Number Name Meaning Explanation When ee set Pai Error detection status B15 Special Register List Continued When Xn0 of the mounted CC Link module turns ON the bit of the corresponding station turns to 1 ON 2 When either Xn1 or XnF of the mounted CC Link module turns OFF the bit of corresponding station turns to 1 ON 3 Turns to 1 ON when communication between the mounted CC Link module and CPU module cannot be made Information of 3 Information of 2 Information of 1 lt gt lt gt lt gt B12 B11 B8 B7 B4 B3 BO Vacancy 1st module 3rd module 4th module he head I O The above module Nos n are in order of numbers However the one where parameter setting has not been made is not counted 2nd module ee QCPU remote S Error 1 When Xn0 of the mounted CC Link module turns ON the bit of the corresponding station turns to 1 ON 2 When either Xn1 or XnF of the mounted CC Link module turns OFF the bit of corresponding station tur
27. BCD Code Digital Switch How to Convert Decimal to Binary micas 0 A decimal number 157 for example is converted to binary as shown below 1 Quotient Remainder 157 ae 78 4 39 a 19 2 0 1 1 m4 0 0 A decimal number 157 for example is converted to hex as shown below 1 16 157 9 Valid Numbers for Q series PLC e 8 bits is usually called 1 byte and 16 bits 2 bytes is called 1 word 0 0 0 0 1 word 2 bytes gt e Each register of word devices in the MELSEC Q PLC consists of 16 bits e Data register D e Current timer T value DO oo S E o ice st N Se ce N st N foe vt N wm e Current counter C value o o o 2 3 A SF BN O oor e File register R Og Xe Binary digit value e Link register W etc e The following two ranges of numbers can be processed using 16 bits 1 word 1 0 to 65535 2 32768 to 32767 The MELSEC Q PLC uses the 2 range The negative numbers adopt two s complement to positive numbers 1 0 32767 e In the two s complement each binary bit is inverted and then 1 is added to the lower bits Example Negative 1 is represented as shown below using two s complement 1 0 0 0 0 0 0 0 0 0o O 0 O o 0 O 1 J Invert all the bits Add 1 to the least significant bit
28. Close Password setup Epe Program m Related functions MA MAIN Si ka Device comment Transfer setup C COMMENT n E 8 Parameter M PLC Network Remote Remote operation Redundant operation Clear PLC memory Format PLC memory Arrange PLC memory Total fres space volume 4 If the parameters have been already written the dialog box appears asking if you want to overwrite them Click the button MELSOFT Series GX Developer 5 The progress bar dialog box appears to show how much the PLC parameter is written 6 If the program has already been written the dialog box appears asking if you want to overwrite it Click the button MELSOFT Series GX Developer P 7 The progress bar dialog box appears to show how much the program MAIN is written Write to PLC 8 Click the button MELSOFT series GX Developer x LL Gd 4 Monitor the ladder PER HR H S e e o e H H H S e o H e H H S e o e e H s S e e e e a EOE afal al Monitor status EJ 0 300ms RUN Local device monitor not executed Operation Practice 1 Turn the push button switch X0 ON Y70 becomes ON and TO starts at the same time 2 When the timer TO counts three seconds time is up Y70 goes OFF and at the same time Y71 becomes ON 3 Turn the push button switch X1 ON and OFF The counter CO counts the num
29. Import Earlier Version of I O System File Exit I O System Settings 32 Enter a file name ior P Edidi J eade A SCHOOL LLT LLT LIM is entered here School as an example 32 Enter a file name __33 Click 33 Click the button l Filename AASCHOOLUTLTUM Save as type fizo System setting file LIM x Cancel 8 3 3 Executing the I O system settings t 40 SYSTEM SETTINGS eleia ele ciel Aaa acc MELSOFT Series GX Simulator QB MELSOFT Series GX Simulator A ad mode MAIN 35 Ste To next page 1 Click on the icon line of the O SYSTEM SETTINGS dialog box or click File and Execute I O System Settings sequentially 2 Click the button 3 Click the button 4 Click the EJ button in the GX Developer window From previous page Fi Word device buffer memory 8 Click Buffer memory Module start 1 0 Hex Address pex Setting value Joec x 16 bit integer v r Program Label reference program z Execution history Device Setting condition Force ON pai a Force ON 7 H Force ON Force ON Clear 1 Turns on 2 seconds after MO turned on Turns off 4 seconds after MO turned on Bit device output HO 5 Self maintaining circuit 2 Turns on 6 seconds after MO turned on Turns off 8
30. Monitor Function YO System Settings Serial Communication Function Device Manager j TRAP RUN ERROR USER r SWITCH sToP 1 Click RUN HESE C STEP RUN 1 0 SYSTEM Transfer setup Host Station C Other Statio Device Memory Monitor Menu Online Device Batch Butter Memory Entry Device PEDC4 B A968 76 5443210 Al a sanen Monitor format BitsvVord Display 16bit integer Data format DEC Lalla Lal be Bit order F 0 GX Simulator Host station To next page 1 On the logic test function GX Simulator window click Start Monitor Function Device Memory Monitor menu 2 Check the Host Station and click the button on the Transfer setup window 3 Set CO in the Device column on the Device Memory Monitor window 4 Click the Start monitor button From previous page 5 Monitor screen for C current value is displayed gt s Device Memory Monitor Menu Online Device Batch Butter Memory Entry Device er i 6 Double click Bitaword Monitor format Display Data format 16bit integer DEC Bit order GX Simulator Host station Device write Bit device cl Force ON cree Force OFF Toggle force Device Word
31. i Category Sa Processing details ah e Reads the module information stored in the Reading area starting from the I O No designated by module n by the points designated by n2 and information Number of basic steps T UNIRDP stores it in the area starting from the device designated by d n1 D n2 Stores the trace data set with peripheral device by the number of times set when Trace set TRACE TRACE H SM800 SM801and SM802 turn on to the sampling trace file in the IC memory card Trace TRACER TRACER e Resets the data set by TRACE instruction rese sp rwrite Uo so b0 s1 s2 01 Writes data to the designated file SP FREAD e Reads data from the designated file e Transfers the program stored in a memory card or standard memory other than drive PLOADP 0 to drive 0 and places the program in standby status e Deletes the standby program stored in standard memory drive 0 PUNLOADP e Deletes standby program stored in standard memory drive 0 designated by S1 Then transfers the program stored in a memory card or standard memory other than drive 0 designated by S2 to drive 0 and places it in standby status e Transfers n points of 16 bit data from the device designated by S to the location starting from the device designated by D
32. o S S41 eo D D Real number data Transfers character string designated by S to device designated by D onward o oj o allo ojlo o is b15 to b8b7 to b0 8 bits 8 bits b15 to b8b7 to bO 8 bits 8 bits App 20 Execution condition Number of basic steps 1 The number of steps may vary depending on the device and type of CPU module being used i Number of Steps Device QCPU QnACPU e Word device Devices other than above 3 Internal device except for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K4 and which use no index 3 modification No limitations 2 The subset is effective only with QCPU App 21 5 Program branch instructions Instruction f Execution Category symbol Processing details conditio Number of basic steps spc Jumps to Pn when input conditions are met to Jumps to Pn when input conditions are met when input conditions are met cane e Jumps unconditionally to Pn
33. setting Intelli 16points Ei 4 al a lt 7 Assigning the 1 0 address is not necessary as the CPU does it automatically Leaving this setting blank will not cause an error to occur 3 Click Switch setting for 1 0 and intelligent function module Input format HEX Type Model name Switch 1 Switch 2 Switch 3 Switch 4 Switch 5 PLC No 1 PLE No 2 Intelli 4 Enter 5 Click I Qn H Parameter Cancel PLC name PLC system PLC file PLORAS Device Program Bootfile SFC i7 1 0 Assignment I PLC No 1 PLC No 2 Switch setting Detailed setting Intelli 16points Assigning the 0 address is not necessary as the CPU does it automatically Leaving this setting blank will not cause an error to occur Base settingl p Base mode 6 Click Auto Detail 8 Slot Default 12 Slot Default Settings should be set as same when CPU using multiple Import Multiple CPU Paramet Read PLC data Acknowledge XY assignment Multiple CPU settings Defaut Check End Cancel 1 Click the I O assignment tab in the PLC parameter settings
34. 5 51 Dif Prace QUESTION x vrs sacesnaistcesadesdeesnctssdenncgadensed eatensac aa A T 5 53 5 7 1 NL Aver ernie me eV or eee river rer nr centr ete wer rr re 5 53 5 7 2 BIN BCD COnVErSION cccccccecsesseseteeeessneeseeeeesenecaanecseseesesenecsaneesenans 5 54 5 7 3 FMOV csc caus bee a ca ld fe mete te ea 5 55 5 7 4 Comparison INStrUCTION ccccccccscteeecteteceteceeeeecsetecsetecessenecseeeseseeeenes 5 56 575 a ca Beda aah ide E 5 57 5 7 6 es AS EEEE E A TA AE 5 58 5 7 7 Di D nanona aea a a a RE tient 5 59 CHAPTER6 USING OTHER FUNCTIONS 6 1 to 6 26 6 1 Clock FUNGI area aS ei ERRE RERE E aie R nie T R e 6 1 6 2 Test Function at Online ainiin N AAN NASA A A EE reaa 6 3 6 2 1 Turning device Y ON OFF forcibly eceeeceeeeeseeeeeeeeneeeeeeeeeeaeeeaeesaeeeaeesaeeeaeeeaeesaeesaeeeaeesaeesaeeaeeeaeesas 6 4 6 2 2 Setting and resetting deViCe MM o s cccceecceeccuecceecceecceeccteceeecdteceneccueceeecdueceuecdtecceeeduecenecdueceneedtecetecdies 6 5 6 2 3 Changing a current value Of device YT oo eee eeceeeeeeeeeeeeeeeeeeeeaeeeaeeeaeesaeecaeeeaeeeaeesaeeeaeesaeeseesaeeaeeeatesas 6 6 6 2 4 Reading emor StOPS 2 ccccccsedenccetadenecebacceecabedehecabecdescabadehscabadcescabedchadabedsecabecchsdabedendeabedchacesdabedenscebedeeees 6 7 6 2 5 Remote RUN STOP nardan Aa R A A A TA ASEEN AI SEAS AIAT AERAR EAE 6 8 6 3 Forced I O Assignment by Parameter Settings ecceecceeceseeeseeeeeeeseeeseeeseeeeeeeseeeeeeeseeeseaese
35. App 74 Time reserved Time reserved for for U END communication processing processing communication processing Ethernet information 2 5 D O E oz a a pa e c 2 E 2 Number Ethernet information D341 SD342 SD343 SD344 ape Ethernet 0346 information SD347 SD 48 D354 pee D361 pees D368 Ethernet instruction reception status SD381 SD382 SD383 Software version Multi CPU SD395 niu mber arte when Set 1 second 2n second D414 clock setting 2nms clock Sp4ts Scan Low speed scan counter ree Information from 2nd module Information of 3rd module Information of 4th module Number of modules mounted VO No Network Station No IP address Information of 2nd module Information of 1st Information of 3rd module Information of 4th module Instruction reception status of 1st module Instruction reception status of 2nd module Instruction reception status of 3rd module Instruction reception status of 4th module Internal system software version Multi CPU number Special Register List Continued Corresponding Serby AEL Sel When set QCPU S Initial rants i S Initial New QnA S Initial D9060 QCPU S Error function Confguatonsidenicalto that forie istmodue is identical to that for the first module Confguraton is idena to that forie fi
36. D21 6 gt D31 D30 D33 D32 Quotient Remainder D30 K8Y50 Displays quotient by multiplying 1 000 times BCD D32 K3Y44 Displays remainder by multiplying 1 000 times REMARK QCPU has instructions that can handle actual floating point operation data for highly accurate operations As long as you use the instructions you don t have to pay careful attention concerning the place of the decimal point as shown above 5 5 Index Register File Register 5 5 1 How to use index register Z e The index register Zn is used to indirectly specify the device number The result of an addition of data in the index register and the directly specified device number can be specified as the device number DOZO Can be interpreted as D 0 Z0 Device number For example if ZO is 0 the device number becomes DO if ZO is 50 the device number becomes D50 e ZO to Z15 can be used as the index register e The index register Zn is a word device that consists of 16 bits The allowable data size range is 32768 to 32767 e Index modification can be applied to the following devices Bit device X Y M L S B F Jn X Jn Y Jn B Jn SB e g K4Y40Z Word device T C D R W Jn W Jn SW Jn G e g DOZ Constant K H e g K100Z Pointer P CAUTION The index register cannot be used for indirectly specifying the timer or the counter coi
37. File register Register for the extensive use of data registers which uses user One word consists of 16 9 memory area bits Special register Register that stores the CPU conditions Can be specified by Link data register 022 register for data link that stores the communication status entering 9 and failure information 0 to F hexadecimal Register for the exchange data between the subroutine call Function register source and the subroutine program Registers for modification to the devices X Y M L B F T C Ind t ndex register D W R K H and P N Nesting Shows the nesting nested structure of the master control P Pointer CALL and JMP pointer interruption when an interruption occurs SFC block Device that checks if the SFC program designated block is SFC transition Device to check if the designated transition condition of SFC program designated block is specified as forced transition or not Network No i Used when designating Network No by the instructions of data designation link device 1 0 No i Used when designating I O No by the instructions for the designation intelligent function module device Decimal Used when designating the followings timer counter set value ecima pointer number interruption pointer number number of digits of constant f i eee bit device and basic application instruction values H Hexadecimal Used when designating the bas
38. The day of the week is stored as BCD code at SD213 as shown below Bo e g Friday H0005 Time data areik s u SD213 Time data day of ay wee D9028 QnA Request week O must be set D222 SD223 D224 data SD225 SD226 LED display D220 15th character from right 16th character from right D221 13th character from right 14th character from right LED display D222 11th character from right 12th character from right data D223 9th character from right 10th character from right D224 7th character from right 8th character from right D225 5th character from right 6th character from right SD226 3rd character from right 4th character from right S When changed SD227 SD220 e LED display ASCII data 16 characters stored here New SD221 B15 to B8 B7 to BO New SD226 1st character from right 2nd character from right 0 Automatic mode 1 Detail mode 0 Main only 1to7 SD240 Base mode The base mode is stored No of extension bases Stores the maximum number of the extension bases S Initial extension installed S Initial bases Fixed to 0 aa gt Main base installed A gt 1st extension S Initial New 1 Q B is 2nd extension Fixed to 0 installed Q to if no extension d mede 7th extension mode B15 B12B11 B8B7 B4B3 B0 S Initial
39. When turned OFF or reset goes from OFF to start x Note that the ON OFF status changes when the designated time has elapsed during the execution of the program Alternates between ON and OFF at intervals of seconds specified in SD414 Alternates between ON and OFF at intervals of the time unit ms specified in SD415 e Relay repeats ON OFF switching at fixed scan intervals When turned ON or reset goes from OFF to start The ON OFF intervals are set with the DUTY instruction DUTY n1 n2 SM420H For use with SM420 to SM424 low speed programs App 54 Set by When set S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing S Status change S Status change S Status change S Status change S Every END processing S Every END processing V a A Corresponding ACPU Corresponding CPU 4 Scan information Set by Meaning Explanation When set ve Corresponding ACPU D gt Q O D kei fe O N fo Q OFF Completed or not Low speed program executed Goes ON when low speed execution type program is S Every END execution flag ON Execution under executed processing way When this relay goes from OFF to ON the module service interval designated by SD550 is read to SD551 through 552 Reads module service OFF Ignored O
40. nn Names Application Names Application Closes windows stops execution opens closes instruction selection Selects menus windows Inputs TAB codes moves a cursor eon Deletes a character before a cursor fast g Enables various operation in combination with alphanumerical Inputs a carriage return keys or function keys __ Selects characters at the shift Shift i position Shift Switches alphabet characters Caps Lock between upper and lower case Special Goes up in a displayed page such keys as ladders HELP etc rin Captures a screen shot scrolls 1 screen in direction Goes down in a displayed page such as ladders HELP etc Disables scroll up and scroll down scrolls 1 screen in direction Switches between overwrite and an Makes the ten keys function only for nse oc insert in ladder screens aa inputting numbers Deletes a character after a cursor Delete clears all set contents Moves a cursor to the home Home ke position Moves a cursor or scrolls a line in screens such as ladders lists ec T ICL App 132 Function keys in ladder mode meee e None wre Monitor come y aie Ga H Eee f Ladder Monitor Border Border list switchi stop delete write Horizontal Vertical Comment Statement Note Pie ai ies stripe stripe Copy Paste Ispla Ispla I pax pe pay delete delete Conversion Monitor Device all program stop all name me being dis
41. rocessing time fin 100 E units Constant scan wait time In 1ms units Constant scan wait time In 100 us units execution time for low speed programs In ms units execution time for low a rograms In Oo Execution time for low speed programs In Ims units Execution time for low speed programs In 100 us units The current scan time is stored In 100 Hs units e Range from 000 to 900 Example When the current scan time is 23 6ms the following values are stored D520 23 D521 600 Stores the scan time of an initial execution type program In 1 ms units e Range from 0 to 65535 Stores the scan time of an initial execution type program In 100 Us units e Range from 000 to 900 Stores the minimum value of the scan time In 1 ms units ange from 0 to 65535 Stores the minimum value of the scan time an 100 us units e Range from 000 to 900 Stores the maximum value of the scan time except that of 1st scan In 1 ms units Range from 0 to 65535 Stores the maximum value of the scan time except that of 1st scan an 100 us units e Range from 000 to 900 Stores the current scan time of a low speed program In 1 ms units e Stores the current scan time of a low speed program w 100 Hs units e Range from 000 to 900 e Stores the minimum value of the scan time of a low speed program In 1 ms units Range from 0 to 65535 e Stores the minimum value of the
42. xo T i 13 Y70 gt Automatic start 1 Y70 i CMC N1 M12 H 1 I N1 M12 Need no key input i Y70 M72 1 19 1 Ht lt M71 gt Instruction for auto low speed H M71 K30 m lt TO gt I TO j 27 M72 gt Instruction for auto high speed 1 M72 K100 j l lt T1 gt 1 I 34 MCR NO H M71 i 35 Y71 gt Low speed operation 1 et l i M72 1 38 Y72 gt High speed operation M82 1 s I i I I I Operating Procedure See Section 4 4 Operating Procedure for the detailed procedure of the following operations 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice e The manual operation is selected by turning the X7 switch OFF When the X2 switch is turned ON Y71 lights and the low speed operation is performed To perform the high speed operation turn the X3 switch ON Y72 lights and the high speed operation starts e Automatic operation is selected by turning the X7 switch ON When the XO switch is turned ON Y70 lights and indicates that it being automatically operated Y71 also lights at the same instant and stays on for three seconds indicating the system is in low speed mode After the three seconds elapsed Y72 lights and stays on for 10 s indicating in high speed mode Then the operation is stopped Y70 Y71 and Y72 have stopped lighting at the end For the MCR instructions in one nested program block all master controls in the prog
43. 2 Word device Shows the current value 2 8 Editing Ladder Program 2 8 1 Making partial correction to the ladder program goal A ladder program Perform the following steps to make partial to be created correction to the ladder as shown on the left X2 i OUT Y71 OUT Y72 Br COP Y70 Make sure that the write mode is active before making changes to the ladder program boe a elec cece 1 Confirm that Overwrite is shown in the lower right portion of the screen If Insert is shown on the screen press the key to change the display to Overwrite If Insert is shown on the screen contacts or coils you enter will be added to the diagram r gt 1 Check lt When correcting from X2 to X5 gt r w Added Ovrwrte NUM 2 Double click the point you want to correct 2 Double click Continued on the next page Continued from the previous page 3 The Enter symbol screen will appear 3 A diagram creation window will appear Eee nter symbol 4 Click the edit box and enter Y72 Enter symbol 5 Click the button to accept the change 6 The modified ladder program will appear v0 6 A diagram will be modified 2 8 2 Drawing Deleting lines 1 Drawing lines Perform the following steps to add a line to the EA aa f ladder as shown on the left
44. 30 D A Conversion Module Module model name z A 2 Set Initial setting r Module information Module type D A Conversion Module Start 1 0 No 0090 Module model name Q64DA Setting item Setting value CH1 D A conversion enable disable setting Enable CH1 Sampling process averaging process setting 3 Set Initial setting Auto refresh r Module information Module type D A Conversion Module Start 1 0 No 0090 Module model name Q64DA Module side Module side Buffer size Transfer word count Setting item CH Digital output value CH2 Digital output value CH3 Digital output value CH4 Digital output value CH1 Maximum value Make text file End setup Cancel To next page 1 Activate GX Developer and click Tools Intelligent function utility and Start sequentially 2 Set D A conversion module as follows Start I O No 90 Module type D A Conversion Module Module model name Q62DA After the settings are completed click the Initial setting button 3 In the following example CH1 D A conversion enable disable setting is set to Enable this means using only CH1 After the setting is completed click the button 4 Click the Auto refresh button in GX Configurator 5 Set D30 in the PLC side Device area on the CH1 Digital output value
45. 50 99 CLS EZ rS e E ETE ES 50 50 50 99 25 15 70 65 Corresponding CPU Number D1301 SD1309 to SD1330 D1331 Fuse blown module External power D1350 supply to disconnecte D1381 d module For future extension SD1409 to D1430 D1431 VO module verification error 8 Fuse blown module Meaning Bit pattern in units of 16 points indicating the modules whose fuses have blown 0 No blown fuse 1 Fuse blown present Bit pattern in units of 16 points indicating the modules whose external power supply has been disconnected 0 External power supply disconnected 1 External power supply not disconnected Explanation e The numbers of output modules whose fuses have blown are input as a bit pattern in units of 16 points If the module numbers are set by parameter the parameter set numbers are stored e Also detects blown fuse state at remote station output modules B15 14 13 12 11 10 9 0 0 3 Indicates fuse flown status e Not cleared even if the blown fuse is replaced with a new one This flag is cleared by error resetting operation The module number in units of 16 points whose external power supply has been disconnected is input as a bit pattern If the module numbers are set by parameter the parameter se
46. ATESTO Program name MAIN 5 7 2 Practice Question 2 BIN BCD conversion Show the number of times that X1 is turned ON on the display connected to Y40 to Y4F in BCD The counter CO set value should be input with the digital switch X20 to X2F after XO is turned ON Fill in the blank square of the program below create a program with GX Developer and check to see if it works properly with the demonstration machine I I I I I I I I i 0 1 iT C DODUN LL FIL 1 j SM40141 a a i i 13 CO tA 4 i i X2 i 1 13 RST TO 1 I I 1 1 CPU BCD value BIN value ojala a OILILL Bn oloja BCD digital switch X20 to X2F K4X20 Set value BCD value o o co BCD X1 ON OFF BIN value BCD digital display 7 Y40 to Y4F K4Y40 1 2 3 4 ANSCHOOL ATEST Program name MAIN 5 7 3 Practice Question 3 FMOV Create a program that works as follows 1 64 outputs Y40 to Y7F turn ON when XO is turned ON 2 64 outputs Y40 to Y7F turn OFF when XO is turned OFF Fill in the blank square of the program below create a program with GX Developer and check to see if it works properly with the demonstration machine Oe ke ei ieee ret 1 0 1 CFMOV K255 1 i 2 1 J 1 Po a E a A aR L i XO pels Gas I 1 5 FMOV _3 _ K2Y40 K8 J 1 I I L I Hint CPU The constant should be output from the CPU in binary form 255 Output cards gt Y40 Out
47. L riz Do a2 D H oi its cst aa ji DBCD 6 K8Y40 H XA L p roc UR ky4o HI 1 2 3 4 5 6 7 Answers for the practice questions in Chapter 5 eee ase ao pa Revo o w n oe a oe 6 D14 CHAPTER 6 USING OTHER FUNCTIONS 6 1 ans 2005 Clock Function With the clock function the following items can be set in the clock elements incorporated in the CPU year month day hour minute second day of the week To enable the clock function use GX Developer or a program To set or read the clock data use GX Developer f orire Diagnostics Tools Window Help Transfer setup Read from PLC Write to PLC Verify with PLC EIR H write to PLC Flash ROM gt al Delete PLC data ziz E PLC user data gt it J F Monitor gt M d Debug g a Trace gt Remote operation Alt 6 FEJ Password setup Clear PLC memory 1 Click Format PLC memory Set time Connection target information Connection jnterface OM lt PlCmodue Tareet Pic 2 Enter Station no Host PLC type Q02 H Clock setup Specify execution target MM DD fo fo Hr Min Sec Day fez fat fs Saturday 1 Click Online and then Set time to display the Set time dialog box 2 Input year month day hour minute and second and select the day of the week in the Set time dialog box 3 Click the button Referen
48. SM243 Extension 3 Extension 2 Extension 1 Main S Request END module that is removed replaced in the online status U D9094 Default value 1004 RS422 baud RS422 baud Stores the baud rate of RS422 S When New QnA rate rate 0 9600bps 1 19 2kbps 2 38 4kbps changed NET 10 Number of modules Indicates the number of mounted NET 10 modules S Initial New mounted 1 0 No e Indicates I O No of the 1st NET 10 module mounted Network Indicates network No of the 1st NET 10 module mounted e Indicates group No of the 1st NET 10 module mounted Station e Indicates station No of the 1st NET 10 module mounted SD259 Standby e In the case of standby stations the module number of the information information standby station is stored 1 to 4 Number of New Base type differentiation QCPU remote A Q base 90242 differentiation SD243 No of base slots No of base slots Loaded No Head I O No Head I O No D251 for for replacement replacement SM244 Extension 7 Extension 6 Extension 5 Extension 4 D244 e As shown above each area stores the number of slots being installed When SM250 goes from OFF to ON the upper 2 digits of the final I O number plus 1 of the modules loaded are stored as BIN values SD250 Stores the upper two digits of the head I O number of an I O SD253 SD254 SD255 SD256 SD257 SD258 2 3 So
49. X2 K30000 0 H CO STO 3000 0 s T9 K20000 5 RF S D A O 2000 0 s T10 11 H Y72 Turns on after the CIRCUIT END timer goes time limit T9 normally open T10 normally open Y72 X2 Lo Lo 3000 s 2000 s me 5000 s 4 2 Necessary time is obtained by using timers and counters Timer time limit X Counter s set value Long time timer note that accuracy of timers are accumulated Path name A SCHOOL Program name MAIN X2 M56 Y73 K9000 cam at lt T14 H Turns on after the timer goes time limit I lt N oo lt Ni oo Y 12 1 lt C7 H lt M56 gt H C7 18 RST C7 CIRCUIT END x2 ail 1 scan T14 coil LI T14 normally m open M56 F C7 Y73 900 s x4 3600s 1 hour 1 gt Note Sufficient time is obtained with the counter C7 which counts the number of time outs of the timer T14 With M56 T14 is reset after it goes time out With C7 the output Y73 is self energized while count up is in progress With Y73 T14 is reset and following time limit actions are stopped App 93 Appendix 5 4 Off delay timer MELSEC Q PLCs do not provide off delay timers Make it as follows 1 T6 starts operating at the timing when X5 is turned OFF Y70 X5 K8 0 E T6 X5 T6 6 1H lt Y70 Lye CIRCUIT END X5 za E T6 coil T L T6 normally Tn e close Set ti
50. _ shift Ins menu 4 The new row will be inserted above the selected row 5 Click on the tool bar to open the Enter Symbol screen Enter X7 6 Click the button to confirm the entry Continued from the previous page 8 Click FB 7 The symbol will appear Enter symbol then enter LL 9 clicks e 77 7 The symbol df you entered will appear 8 Click El on the tool bar and input Y77 9 Click the button 10 The symbol lt Y77 gt you entered will appear 2 Deleting rows A Perform the following steps to remove the row x A ladder program 7 from the ladder shown on the left 7 to be modified C vr gt x r 1 Click on any point of the row to be deleted 1 Click to move cursor go i rie 2 Click the right button of the mouse on any point ar ore on the ladder window except on the rows to v0 display the menu 6 it 2 X isl EE Cut Ctrl x lt 1 H Copy Ctrl C Insert line Shift Ins Delete line Shift Del Insert row Ctrl Ins Delete row Ctrl Del Draw line F10 Delete line Alt F9 gt 2 The Hah Find device Ctrl F will appear Find instruction Find step no Find character string Find contact or coil Alt Ctrl F7 Cross reference
51. button to display 40th scan File Device Edit Scan fale ala 15 la 38 39 40 4 42 43 4 45 48 20 Click 40th scan of the XO line to specify it 21 Click or click Edit Bit Device and Device OFF sequentially X1 21 Click s Timing Chart Format Input 22 The timing at which XO turns off is set ile Device Edit Scan 23 Click 60th scan of the X1 line to specify it 62 63 64 65 66 68 59 60 61 xo GO a ee ce ye Click oe 3 22 Click 24 Click A or click Edit Bit Device and Device ON sequentially to set the timing at which X1 turns ON mi i OK Cancel To next page From previous page Timing Chart Format Input e 25 Click the gt button to display 80th scan File Device Edit Sean 78 79 80 61 82 83 84 85 8 26 Click 80th scan of the X1 line to specify it 7 Click E or click Edit Bit Device and Device OFF sequentially to set the timing at which X1 turns off 28 Click the button 29 The set timing chart is displayed in green O i 30 Click the Enable checkbox to enable the 29 Displayed in green ji settings 31 After the settings are complete click File and then Save as to save the I O system New Ctrl N Open Ctri O settings Save Ctrl4 S ave As Execute I O System Settings s Cancel I O System Settings 31 Click
52. 30 2000 60000 e Turn X3 ON S 2 oa a 2000 600 200 3 Remainder Quotient Applicable device MELSECNET 10 H Intelligent Internal device Index function system user register module Q Q D Q a 5 av p 2 3 S E O E 2 7 a nstueion_ S 63 The basic number of steps for multiplication instruction is three or four steps and that for division instruction is four steps The multiplication instruction varies depending on the device to be used e How to monitor 32 bit integral number data If the operation result of the multiplication instruction is out of the range from 0 to 32 767 the result cannot be displayed properly when the number is handled as 16 bit integral number and the contents of the lower register are monitored in ladder To monitor those numbers correctly follow the steps below device registration monitor operation e Select Online Monitor Entry data monitor Diagnostics Tools Window Help Transfer setup Read from PLC Write to PLC verify with PLC Write to PLC Flash ROM gt Delete PLC data fm PLC user data d Debug gt Monitor Write mode Shift F3 Trace gt Start monitor All windows Ctrl F3 Remote operation Alt 6 Stop monitor All windows Ctrl Alt F3 Password setup Clear PLC memory Format PLC memory Arrange PLC memory Local device monitor Set time
53. 57 H MOV C5 DOZO H BCD Z0 K2Y58 H BCD D0ZO YK440 H CBCD C6 K4Y60 H CMOV C6 D33 H X6 WE e a RST C5 H 79 ad RST C5 H RST C6 H FMOV KO DO K32 H FMOV KO K4Y40 K3 H CIRCUIT END r KO SM410 X2 K4X20 ___LLY _ L MOV K32760 1f 0 1s clock C5 F F App 119 Project name QA 7 Program name MAIN D35 H D35 C5 Digital switch When X20 to 2F are 0 gt writes 32760 to D35 and counts products manufactured Inputs a production command Inputs date Y70 flashes indicating an error if date exceeding 31 is set Indirectly designates date Stores the number of products manufactured to data register Displays the manufacture date to exterior Displays the manufactured number on the current day Displays the manufactured number in one month manufactured number anytime on the day if necessary Clears the daily Clears all at the end of month Ko po K32 Simultaneously transfers data 0 to DO to D31 K4Y40 Simultaneously transfers data 0 to DO to D31 Appendix 5 24 Application example of FIFO instruction Manual coating work and its working time can be stored and duplicated by machinery later lt gt Conveyor system MELSEC Q ay ae to oe aN ae Steps Teaching panel X Coating bath Position is detected
54. AL DSTR H DSTRP S I 2 2 2 2 1 S 1 1 S S S S S V D1 D2 VALP S D1 D2 S D1 D2 1 D2 DVAL DVALP SiD Processing details e Converts a 4 digit decimal ASCII value designated by S to 1 word BCD value and stores it at a word device number designated by D e Converts an 8 digit decimal ASCII value designated by S to 2 word BCD value and stores it at a word device number designated by D e Stores comment from device designated by S at a device designated by D Stores data length number of characters in character string designated by S ata device designated by D e Converts a 1 word BIN value designated by S2 to a decimal character string with the total number of digits and the number of decimal fraction digits designated by S1 and stores them at a device designated by D e Converts a 2 word BIN value designated by S2 to a decimal character string with the total number of digits and the number of decimal fraction digits designated by S1 and stores them at a device designated by D e Converts a character string including decimal point designated by S to a 1 word BIN value and the number of decimal fraction digits and stores them into devices designated by
55. App 81 7 Ato Q QnA conversion ACPU special registers D9000 to D9255 correspond to Q QnA special registers SD1000 to SD1255 after A to Q QnA conversion These special registers are all set by the system and cannot be turned ON or OFF by the user program To set data by the user program correct the program for use of the Q QnACPU special registers However some of SD1200 to SD1255 corresponding to D9200 to 9255 before conversion can be set by the user program if they could be set by the user program before conversion For details on the ACPU special registers refer to the user s manual for the corresponding CPU and MELSECNET or MELSECNET B Data Link System Reference Manuals Supplemental explanation on Special Register for Modification column 1 For the device numbers for which a special register for modification is specified modify it to the special register for Q QnNACPU 2 For the device numbers for which is specified special register after conversion can be used 3 Device numbers for which lt is specified do not function for Q QnACPU Special Register List ACPU Special Special Special Register after Register for Meaning Explanation Register Conversion Modification When fuse blown modules are detected the first I O number of the lowest number of the detected modules is stored in hexadecimal Number of Example When fuses of Y50 to 6F output modules have blown SD1000 module 50 is stored in hexade
56. Destination e The current TO value is stored in the register in binary form and transferred to the data register DO without changing the form Tojo 0 0 0 0 0 0 OfJ0 01 O 1 1 0 1 45 128 64 62 16 8 4 2 po o o o 0f0000 0010 1104 128 64 62 16 8 4 2 O 23 When the input condition goes active the decimal number 157 is transferred to the data register D2 and stored in the register binary form The decimal number K is automatically converted to binary before it is transferred y p2 o0 o o oloo 0 o0o 1001 1101 2864 32 OOH 2 O MOV 33 When the input condition goes active the 4A9D is transferred to the data register D3 4 A N Z 9 D Hex numbers 00111101 st N oO N 4 Binary bit O 0 e weight w wo 32768 16384 gt 8192 4096 2048 gt 1024 512 gt 256 128 gt Difference Between MOV amp MOVP The P of MOVP stands for a pulse Input condition Performs data transfer at every scan MOV while the input condition is active Performs data transfer only for one scan after MOVP the input condition goes active Executes only one time Executes only one time e Use the instruction when the target data is changing and needs to be read frequently To read the fixed data such as setting data or data required to identify the cause of abnormal condition use the instruction The following bo
57. Displaying on a screen Starting first step in progress x x Arm S m Conveyer aa oe Error occurrence 00070 MS Sees So eee ce MELSEC Q supports a wide variety of GOTs Graphic Operation Terminals In addition to the error display function GOTs feature a lot of useful functions such as the graphic monitoring ladder monitoring device monitoring touch panel switch and printing function Refer to the catalogs for details APPENDIX Appendix 1 I O Control Mode The CPU supports two types of I O control modes the direct mode and refresh mode Appendix 1 1 Direct mode In the direct mode input signals are imported to a PLC every time they are input and treated it as input information The operation results of a program are output to the output data memory and the output modules The following diagram shows the flow of I O data in the direct mode CPU module CPU Operation processing Data memory for inputs X 2 Input O Test operation using GX Developer module O Rink refresh of MELSECNET H O Write from serial communication modules etc XO i 4 Data memory for outputs Y M a Y75 2 H lt Y70 gt O Executes the OUT instruction in the sequence Output module program O Test operation using GX Developer O Writes from the serial communication modules etc e When the input contact instruction is performed An OR opera
58. Earlier device pene _ as Earlier device and input Y70 in the list box fro yy in ext New devi ine Pane ae ra ee 3 na New device and input Y50 in the list No of substitute points Replace an i ce 4 Click No of substitute points and set 48 in i oration in E the spin box Find direction 9 Ate eae 5 After the setting is completed click the From cursor to bottom Replace button Specified range Before change After change f aa S oE X o Y70 X4 M10 K150Q TO BCD TO K4Y50 x6 T1 13 Y74 Y74 Y74 X6 K30 G aa lt T1 gt es 6 Confirm that the target device numbers have been properly replaced 6 5 2 Batch switching of specified devices between normally open and normally close Follow the procedure below to switch specified devices all at once between normally open and normally close ies GX Developer Unset project LD Edit mode 1 Click Find Replace Change open close Find Replace Convert view Online Diagnostics To contact to select Find device Ctrl F Find instruction Find step no Find character string Find contact or coil Alt Ctrl F7 Replace device CtrltH Device block replacement Replace instruction Change openjclose contact Repiace character string Change module start address Replace statem 1 Click Cross reference window display Cross reference list List of used de
59. Es 11 joto jnen A 13 1204 rat 5 Click eu End Cancel Qn H Parameter PLC name PLC system PLC fie PLCRAS Device Program Bost file SFC 1 0 assignment 120 Assignment T PLCNo1 v PLCNo2 x Detailed setting Intel T points Assigning the I D address is nat necessary as the CPU does it automatically Leaving this setting blank will not cause an error to occur Base setting p Base mode Auto C Detail Power model name Extension cable Slots FI Click 8 Slot Default 12 Slot Default Settings should be set as same when PU using multiple CPU Import Multiple CPU Paramel Read PLC data 1 Click the I O assignment tab in the PLC parameter settings 2 Perform I O assignment on the slot 3 3 where Q64AD is installed Type Intelli required Model name Q64AD Points 41 6points StartXY 80 Hexadecimal 3 Click the button The Switch setting for I O and intelligent function module dialog box appears 4 The following is an example of the intelligent function module switch settings of Q64AD The default value of each switch is 0 Switch Set Value Item Description of setting Input range CH1 0 to 5V Do not input Input range Default value Drift compensation mode 4 Do not input Default value selection 5 Click the button
60. IP DO D1 D20 6 3 0 BCDP D20 K4Y50 BCDP D21 K4Y40 END DO x D1 D10 6x3 18 As the operation result of this example is in the range from 0 to 32767 the result is displayed properly even though the number is handled and monitored as 16 bit integral number Related Practice Question Practice Question 10 Practice Question 11 5 4 3 32 bit data instructions and their necessity e The data memory of Q series PLC which consists of 16 bit is a memory of 1 word unit The memory generally processes transfer comparison and arithmetic operations in 1 word unit e Q series PLC also supports 2 word 32 bit unit In this case add D at the head of each instruction to indicate that the instruction is handled as 2 word The following shows the examples e 32 bit gt MOV P DMOV P Transfer BIN P DBIN P BCD P DBCD P SES ey D lt D gt D lt Comparison Four arithmetic Available range of 32768 0 2147483648 numbers to to to 32767 9999 2147483647 Numbers in parentheses are for 0 BIN P BCD P instructions to 99999999 Numbers in parentheses are for BIN P DBCD P instructions Available range of an K1 to K4 K1 to K8 digits e The bit value of the 32 bit configuration is as follows 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4194304 2097152 1048576 524288 262144 131072 65536 32768 16384 As
61. In normal operation 2 ERROR LED Flicker Switch settings error occurred Values other than 0 has been set to the switch 5 on an intelligent function module 7 5 2 A D conversion characteristics 1 A D conversion characteristics on voltage inputs when in a standard resolution mode with analog input range set to 10 to 10V oO 3 oO gt z j Qa 2 3 fo D Q gt Digital output 5 0025V 0 Analog input voltage Figure 7 12 A D conversion characteristics voltage input put voltage Analog digital conversion modules convert analog values input from other devices to digital quantity so that CPUs can operate those values On voltage inputs for example they convert 10V to digital quantity of 4000 and 10V to 4000 This means that the modules convert input voltage of 2 5mV to digital quantity of 1 and abandon values smaller than 2 5mV 2 A D conversion characteristics on current inputs when in a standard resolution mode with analog input range set to 0 to 20mA Digital output value Digital output nput current 0 Analog input current Figure 7 13 A D conversion characteristics current input The modules convert current input of OmA to 0 for output and 20mA to 4000 This means that the modules convert input current of 5pA to digital quantity of 1 and abandon values smaller than 5pA REMARK A voltage current valu
62. MAXP MINP Search DMAXP DMIN DMINP n n Zz o 0 5 is Execution Processing details gondition b3 to b0 S e Separates 16 bit data designated by S into 4 bit units and stores at the lower 4 bits of n points from D n lt 4 e Links the lower 4 bits of n points from the device designated by S and stores at the device designated by D n lt 4 Separates the data at the devices below that designated by S1 into bits designated below S2 and stores in sequence from the device designated by D e Links the data at the devices below that designated by S1 in the bits designated below S2 and stores in sequence from the device designated by D e Breaks n points of 16 bit data from the device designated by S into 8 bit units and stores in sequence at the device designated by D e Links the lower 8 bits of 16 bit data of n points from the device designated by S into 16 bit units and stores in sequence at the device designated by D e Searches the data of n points from the device designated by S in 16 bit units and stores the maximum value at the device designated by D e Searches the data of n points from the device designated by S in
63. OFF Normal which fuse has been blown and remains ON if the condition M9000 SM1000 Fuse blown ON Module with blown is restored to normal thereafter fuse Output modules of remote I O stations are also checked fore fuse condition Turned on if the status of I O module is different form entered status when power is turned on and remains ON if the O module condition is restored to normal thereafter M9002 SM1002 verification OFF Normal I O module verification is also performed for remote I O error ON Error station modules ae is enabled only when special registers SD1116 to SD1123 are reset Corresponding OFF Normal Goes ON if MINI S3 link error is detected at even one of the M9004 SM1004 MINI link error P installed MELSECNET MINI S3 master modules and ON Error z een remains ON if the condition is restored to normal thereafter e Turns ON if an instantaneous power failure of within 20ms occurs during use of the AC power supply module Reset when power is switched OFF then ON AC DOWN OFF AC DOWN not e Turns ON if an instantaneous power failure of within 10ms M9005 SM1005 detection detected occurs during use of the DC power supply module Reset ON AC DOWN detected when power is switched OFF then ON urns ON if an instantaneous power failure of within 1ms occurs during use of the DC power supply module Reset when power is switched OFF then ON OFF Normal e Turns ON when the battery voltage drops to or below th
64. Within access Goes ON when access is made to area outside the range of range file register R of memory card B Set within END ON Outside access processing range e Reset at user program Memory card B file SM673 register access range flag 6 Instruction related special relays Set by i SM700 Carry flag a a 2a Carry flag Cary fag used in application instruction in application instruction Carry fag used in application instruction Sins OFF Outputs until NUL When SM701 is OFF output conducted until NUL 00H Number of output code is encountered ON 16 characters characters selection output e When SM701 is OFF 16 characters of ASCII code are output Corresponding ACPU Me Corresponding SM703 Sort order OFF Fecending order The sort instruction is used to designate whether data ON Descending order should be sorted in ascending order or in descending order SM704 Block comparisons OFF Non match found Goes ON when all data conditions have been met for the S Instruction New P ON All match BKCMP instruction execution e When SM707 is OFF real number instructions are OFF Speed oriented processed at high speed ON Accuracy oriented When it is ON real number instructions are processed with high accuracy SM710 CHK instruction priority OFF Conditions priority Remains as originally set when OFF S Instruction ranking flag ON Pattern priority e CHK priorities updated wh
65. Y Timer starts when X2 is turned ON K4Y60 H Outputs current value of timer gt Turns on if the current value is 50 s or more gt Turns on if the current value is 12 s or less Outputs current value of timer gt Turns on if the current value is 30 s or less gt Turns on if the current value is from 30 to 31 9s Turns on if the current value is from 32 to 33 9s gt Turns on if the current value is 34 s or more gt 4 Turns on if the current value is 60 s or more gt 4 Turns on if the current value is 80 s or more Appendix 5 13 Retentive timer Input X2 switches between on and off continuously The time of X2 being on is accumulated and Y72 turns on according to this accumulated value n 1 When using a ladder that accumulates value without a retentive timer Path name A SCHOOL Project name QA 21 Program name MAIN 0 MO gt Timer starts when X2 is turned on MO 2 C PLS M1 H K600 T195 H 9 M1 MOV D7 T195 Writes D7 to timer when X2 is turned on MO 12 MOV T195 D7 Save the current value of the timer to D7 T195 15 4H MOV KO D7 Clears D7 when the timer goes time out H E Y72 H Y72 turns on when the timer goes time out CIRCUIT END 2 When retentive timers are allocated in the device settings of PLC parameters Retentive timer ST 224 points STO to ST223 0 re 98 Timer starts when X2 is turned on ie Y72 Cannot be cleared by tur
66. subroutine program Terminates a mainroutine program List of Instructions Not Described in this Chapter Part 1 Introduction PLC Course covers the instructions shown below The conventional A series also support them Refer to QCPU Q mode QnACPU Programming Manual Common Instructions for more details Instruction symbol Name Functions Starts logical operation Starts to operate normally Load inverse Starts logical inverse operation Starts to operate normally Logical AND operation normally open series connection And inverse Logical AND inverse operation normally close series connection Logical OR operation normally open parallel connection Logical OR inverse operation normally close Or inverse parallel connection AND operation ANB And block between logical blocks Series connection between blocks OR operation ORB Or block between logical blocks Parallel connection between blocks Starts to cause a branch Drawing devices to be used Designates bit for bit devices and word devices Designates bit for bit devices and word devices Designates bit for bit devices and word devices Designates bit for bit devices and word devices Designates bit for bit devices and word devices Designates bit for bit devices and word devices Instruction symbol Name Functions Intermediate branching Terminates branching
67. the operation becomes as follows FMOV instruction_ DO K2Y40 K4 Input condition L FMov DO Example when the content is 365 with two digit numbers these data are ignored i D is specified 4 devices K4 e Among the device from Y40 to Y5F the devices specified as 1 are output first e Programming as shown below allows you to turn ON the output of Y40 to YSF all at once by activating the input condition 1 or to turn OFF the output of Y40 to Y5F at a time by activating the input condition 2 Input condition FMOV K255 k2v40 K4 Input condition K255 bit pattern l o olo ol olol olol111 111111111 1 4 FMOV KO K2Y40 K4 e When turning off bit devices in units of 4 bits 16 bit devices or less L gt MOV instruction e g MOV K4M0 32 bit devices or less C gt DMOV instruction e g DMOV K8M0 More than 32 bit devices gt FMOV instruction e g FMOV K4M0 l Turns OFF 64 bit device BMOV instruction Input condition BMOV DO K2v40 K4 As D is specified with two digit numbers eae these data are ignored ooo z a a e EEA z Y4F to Y48 Y47 to Y40 a eee 4 pieces K4 y 5F to Y58 Y57 to Y50 ype T T 3 0 5 5 5 5 5 6 e The product codes hexadecimal numbers are stored in the devices from DO to D3 as shown above The instruction
68. 0O 0 Se Not used Initial work data Disable 0 Enable 1 System data SFC active step data Disable 0 Enable 1 Switching factor Disable 0 Enable 1 sD10 en s012 S013 So14 S S S S S S S S S S S S S S S S Sl Sl Sl Sl Sl 3 For extensions refer to REMARK at Appendix 66 App 67 Special Register List Continued in Corresponding Correspondin Number Name Meaning Explanatio ACPU i g DOCO SD16 e Individual information corresponding to error codes SDO is stored SD17 here SD18 The following six types of information are stored here SD19 1 File name Drive name e g File name Number Contents ABCDEFGH IJK SD16 Drive B15 to B8_B7 to BO SD17 42H B 41H A SD18 File name 44H D 43H C SD19 ASCII code 8 characters 46H F 45H E SD20 48H H 47H G SD21 Extension l 2Ex 49H I _ 2DH SD22 ___ ASCII code 3 characters 4Bx K 4Ax B S S S S ojojo a DIM DIN n a n DIN a ovj njajn 2 SD26 D23 D24 Vacanc ape y D26 2 Time value actual
69. 1 S 1 S D 1 D Cos S 1 S D 1 D Tan S 1 S gt D 1 D S 1 S gt D 1D Conversion from angles to radians S 1 S gt D 1 D Conversion from radians to angles S 1 S gt D 1 D e S 18 __ D 1 D Log e S 1 S gt D 1 D e Generates a random number from 0 to less than 32767 and stores it at the device designated by D e Updates random number series according to the 16 bit BIN data stored in the device designated by S App 39 Execution condition Number of basic steps Instruction F 3 Execution Processing details a symbol condition Number of basic steps Integral part Decimal fraction BDSQR Integral part BDSQRP Decimal fraction Sign Integral part Decimal fraction Sign Integral part Decimal fraction Sign Integral part Decimal fraction Sign Integral part BASINP BASINP Decimal fraction BACOS BACOS S D i Sign Integral part BACOSP BACOSP S D Decimal fraction BATAN BATAN S D Tan1 S gt D 0 sign 1 Integral pa
70. 16 bit units and stores the minimum value at the device designated by D e Searches the data of 2 xn points from the device designated by S in 32 bit units and stores the maximum value at the device designated by D e Searches the data of 2 xn points from the device designated by S in 32 bit units and stores the minimum value at the device designated by D App 29 Number of basic steps Category Total value calculations Instruction symbol st n s2 p1 2 S2 Number of comparisons made during one run D1 Device to turn ON when sort is completed D2 For system use psort s1 n s2 p1 p2 S2 Number of comparisons made during one run D1 Device to turn ON when sort is completed D2 For system use DWSUMP Processing details e Sorts data of n points from device designated by S1 in 16 bit units nx n 1 2 scans required e Sorts data of 2 lt n points from device designated by S1 in 32 bit units n X n 1 2 scans required e Adds 16 bit BIN data of n points from the device designated by S and stores it in the device designated by D Adds 32 bit BIN data of n points from the device designated by S and stores it in the device designated by D App 30 Execution condition Number of basic steps Subset 6 Structure creation instructions Instruction Execution Ca
71. 3 11 1 2 until the RST instruction is Current value of counter performed e Perfoming the RST instruction C20contact Y72 coil before the count returns the counter to zero e The allowable range of the counter setting is between KO and K32767 KO turns ON Count up by the execution of the instruction O X7contact Input of the RST instruction In addition to the direct designation using K indirect designation using D Data register is available e The counter C30 counts when the number of rising edges on the input signal XO becomes A Setting value the same as the number e g xo D10 24 specified by the data 0 C30 register D10 l a e This indirect designation is useful for applying a value I C30 specified with an external 5 digital switch to the counter Digital switch The indirect designation using data register D is also available for the timer A SCHOOL QEX1 Program name MAIN Ladder Example When the conveyor belt operation start switch X0 is turned ON the buzzer Y70 beeps for three seconds and then the conveyor belt Y71 starts to operate The conveyor belt automatically stops when the sensor X1 detects that six packages have passed through Sensor Control panel Operating panel Operation Buzzer Dam O X0 Y70 J L Y71 Create the following ladder and check if it works properly
72. 31 BCD C10 K4Y50 e This program is saved in the text FD as Read it to GX Developer and write it to the PLC to see if it works Operating Procedure The step 1 of the following procedure is the same as that of Operating Procedure described in Section 5 3 The steps 2 to 4 of the following procedure are the same as that of Operating Procedure described in Section 4 4 1 Read data in FD 2 Create a program 3 Write to the PLC 4 Monitor the ladder na a Operation Practice 1 External setting of the timer set value and display of the current value Set the timer set value in the digital switch X20 to 2F and turn the XO switch ON When the X4 switch is turned ON Y70 turns ON after the set time specified with the digital switch elapses e g Y70 turns ON after 123 4 s elapsed if you entered 12B 4 The digital display Y40 to 4F shows the current value of the timer T10 2 External setting of the counter set value and display of the current value Set the counter set value for the digital switch X30 to 3F and turn the X1 switch ON Turn the X5 switch ON and OFF repeatedly Y71 turns ON when the number of times that X5 is turned ON reaches the number specified with the digital twiatigital display Y50 to 5F shows the current value of the timer C10 the number of the times that X5 is turned on Turning the X6 switch on clears the
73. ANSCHOOL Project name ee Title DOO O The following dialogue box will appear depending on the condition when another project has been open MELSOFT series GX Developer A Do you want to save the project Click on the tool bar or select the Project Open project menu ctrl o 2 Specify the location where the project you want to open is stored 3 Click on the project 4 GX Developer starts to read the specified project Yes will terminate the project will keep the project activated will terminate the project without converting the project will keep the project activated Continue editing the ladder program will save the project before terminating it will terminate the project without saving it will keep the project activated CHAPTER 3 PLC DEVICES AND PARAMETERS 3 1 Devices The devices are imaginary elements for programming in the PLC s CPU as well as the components such as contacts and coils that compose a program t pevce No o symbol Transmits instructions or data to the PLC through the external X Input devices such as the push buttons selector switches limit switches and digital switches y Output Outputs to the solenoids electromagnetic switches signal lights P or digital indicators as a result of control Auxiliary relay inside the PLC that cannot output directly to the M Internal relay ane A yy y external devices Uninterrupt
74. Alias 5 Click the button to display a r70 External display of flicker z ip A comment list In this list the input device is shown at the top accompanied below by its following devices 4 Click Device and input Y70 in the list box 6 Click a desired comment area and input desired character strings as shown on the left 7F 7 Enter 8 Click 7 Click Device and input M1 in the list box Device namel m1 z Display 8 Click the button to display a mo pesme _ Ae comment list In this list the input device is A shown at the top accompanied below by its e following devices me UU eC A 9 Click a desired comment area and input Eo desired character strings as shown on the left mo m2 m3 M14 M16 G To next page From previous page 10 Enter 11 Click Device nama TO a i Display Comment 11 Click the button to display a comment list In this list the input device is shown at the top accompanied below by its following devices 10 Click Device and input TO in the list box Timer 0 6S No 1 0 3S timer 12 Click a desired comment area and input desired character strings as shown on the left 13 Enter IL 14 Click 13 Click Device and input C2 in the list box Y y Device rand C2 Display 15
75. COS 6 0 35 1 0 1 0 2 0 5 1 2 5 10 gt Switching current unit A Figure 9 3 Life characteristics of output relay s contact 9 4 9 5 Spare Products Alternative products are easily purchased through the Mitsubishi service centers or local Mitsubishi representatives in Japan So the purchasing documents can be prepared even after an accident Note however that for foreign related products such as exported products it is necessary to send alternative products beforehand To ease maintenance refer to the following tips at design work 1 5 Module type easily replaced The building block type modules feature easy replacement Their structures make it possible to replace just the faulty module to complete the replacement Memory type To use the standard RAMs or SRAM memory cards the backup battery is required The standard ROMs Flash cards and ATA cards do not require the battery for use and besides they prevent unintentional program changes due to human related mistakes They are recommended to be employed especially in products for export Reducing the number of module types Reducing the number of module types is an efficient way for reducing the umber of spare product types Reserving some I O points By not using all the I O points on 16 32 and 64 point I O modules but reserving 10 to 20 of them it is possible to just make changes on wiring and programs I O signals instead of replacing
76. D1 and D2 e Converts a character string including decimal point designated by S to a 2 word BIN value and the number of decimal fraction digits and stores them into devices designated by D1 and D2 App 36 Execution condition Instruction Execution Category symbol Processing details condition e Converts floating decimal point data designated by S1 to character string and stores them in a device designated by D e Converts character string designated by S1 to floating decimal point data and stores them in a device designated by D Converts 1 word BIN values of the device number and later designated by S to ASCII and stores only n characters of them at the device number designated by D e Converts only n ASCII characters of the device number and later designated by S to BIN values and stores them at the device number designated by D App 37 Category Character string processing Instruction symbol Symbol S D SID SID S1 n n ag n 1 D S2 Execution Processing details condition e Stores n characters from the end of a character string designated by S at the device designated by D e Stores n characters from the beginning of a cha
77. Device batch Entry data monitor Buffer memory batch Program monitor list Interrupt program monitor list Entry ladder monitor e Click to show the device registration dialogue box T C setting value Device on OFF Corrent Local label Reference program MAIN Ed Start monitor Register devices Register device Delete the device Display format the device registration dialogue box Value DEC Click this button to display Display 16bit integer x Cancel Continued on the next page Continued from the previous page e Enter D10 in the device edit box on the device registration dialogue box e Click ha on the display edit box and select 32 bit integral number Click the button The items are displayed on the device registration monitor dialogue box e When complete click the button to close the window Register device Device p10 1 Enter D10 Display format Value DEC 3 After entering the device and setting the display click Register 2 Click the button Display and select 32 bit integral number lebt integer Cancel 4 When complete from the pull down menu click Cancel 32bit integer ASCII character 5 Click the Start monitor button Thus 2 words of the operation result stored in D10 and D11 can be monitored T C setting value 7 F 7 F Local label Device SHLAOFE DuEEEnt
78. H Clears DO and D1 1 2 Reference Complement Deny transfer M1 D1 DO KO DO 7 i 2i ei reer b31 b30 b18 b17 b16 b15 b14 b2 b1 bO efore executing ID P K1 D8 negative value Taf 1 0 1 1 0 0 1 0 D9 D8 A The absolute value is determined f by calculating two s complement After executing DCML 0 0 Oo 1 0 0 1 1 0 1 of DO and D2 32 bit data D9 D8 A A oy After executing both D P absolute value of o 0 1 0 0 1 1 1 0 If 16 bit data is a negative number it is changed to the absolute value using NEG two s complement instruction REMARK The CML instruction inverts bit pattern and transfers it to when the input condition is turned ON Input condition z ANSCHOOL GTESTIO Program name MAIN 5 7 6 Practice Question 6 The multiplication division data can be set by turning XO ON When X2 is turned ON the BIN multiplication of the value specified with the digital switch X20 to X27 and X30 to X37 is performed and a division is performed when X3 is turned ON The result of the multiplication or the quotient of the division is displayed on the BCD display of Y40 to Y4F and the remainder is displayed on the BCD display of Y60 to Y67 X30 to X37 x X20 to X27 gt v40 to Y4F X30 to X37 X20 to X27 _ gt 40 to Y4F Y60 to Y67 Fill in the blank square of the program below create a program with GX Developer and check to see i
79. Ignored Terminates a program END processing Stops operation 1 bit shift for devices 1 bit shift for devices pulsing operation Ignored Inserts a page break when printing Ignored Recognized as zero step of n page Drawing devices to be used For a space or deleting a program Must be used as an end of a program mes Designates bit for bit devices and word devices Designates bit for bit devices and word devices List of Instructions Not Described in this Chapter Part 2 The instructions listed below are intended for the Q series and not supported by the A series Some of them are explained in Q Programming Practice Course Refer to QCPU Q mode QnACPU Programming Manual Common Instructions for more details Instruction Instruction symbol Functions Drawing devices to be used symbol Functions Drawing devices to be used Name Name Starts to tH Converts the operate results into a rising pulse Designates bit for bit falling pulse Designates bit device and devices and word devices word device 7 k E Inverts the Starts to start f s operation a falling pulse Designates bit for bit results Designates bit device and devices and word devices word device Converts the Vn Series results into a connection of rising pulse rising pulse Designates bit for bit _ Memorized by Designates bit device and devices and word devices V
80. LED display SD208 8th priority 7th priority 6th priority 5th priority D3039 priority Priorities 5 SD209 110th priority 9th priority U AS ranking to8 Default value SD207 H4321 hanoe D208 H8765 9 SD209 HOOA9 Priorities 9 e No display is made if 0 is set f However even if 0 has been set information concerning New to 10 CPU module operation stop including parameter settings errors will be indicated by the LEDs without conditions e The year last two digits and month are stored as BCD code at SD210 as shown below Time data e g July 1993 Time data year H9307 D9025 month e The day and hour are stored as BCD code at SD211 as shown below Time data BO e g 31st 10 o clock Time dat D9026 Rem ime data dey hour H3110 O The minutes and seconds after the hour are stored as BCD code at SD212 as shown below Time data B0 e g 35 48 Time data minute S U Request D9027 second The day of the week is stored as BCD code at SD213 as shown below B12B11 B0 e g Friday aai ea H0005 Time data ee ed Ler Higher QCPU D213 Time data digits of Day of week D9028 remote year day of Later 2 digits of year 0 to 99 week App 72 Special Register List Continued Set by Corresponding Corresponding Number Name Meaning Explanation ACPU When set DEO CPU
81. MCR program is nested under the MC to MCR program It is called nested structure To do that 1 Assign the nesting number N of MC instructions in ascending order 2 For the MCR nesting number N assign the numbers used for the MC in descending order 25 The MC to MCR program is independent from the program The nesting numbers N used in the program can be used for the program e The internal relay number M must be changed by MC 3 3 As shown in the program the internal relay number M contact ANSCHOOL QEX3 Program name MAIN Ladder Example A program for switching between manual and automatic operations can be made using the MC and MCR instructions e When selecting manual operation by turning X7 OFF 1 The system goes into low speed operation mode when X2 is turned ON 2 The system goes into high speed mode when X3 is turned ON e When selecting automatic operation by turning X7 ON the system operates in low speed mode for 3 s after XO is turned ON for 10 s and stops Then it operates in high speed mode High speed Low Speed 3s 10s l i Manual i X7 1 0 t C MC NO M10 H 1 I NO M10 Need no key input i X2 M82 i M81 gt Instruction for manual low speed X3 M81 l 6 1 cs lt M82 gt Instruction for manual high speed I I 9 Automatic C MCR No 4 f 10 CMC NO M11 H f NO M11 Need no key input
82. Module Figure 7 5 Buffer memory 1 QCPUs can read and write buffer memory Also note that some modules can write data to buffer memory from peripheral devices via an interface 2 In buffer memory space of one word 16 bits is reserved for each intelligent function module s unique address The smallest address is 0 and these addresses are used to specify a target module to read or write The minimum unit is one word 17 to 32 bit data is treated as 2 word 32 bit data B15B14B13B12B11B10 B9 B8 B7 B6 BS B4 B3 B2 B1 BO RERATECECOCEGEREOH e Sign bit Data part 1 Negative Indicated here is 276 0 Positive Negative digital values are represented in complement of 2 Figure 7 6 Example image of buffer memory content D A conversion module The buffer memory on Figure 7 6 shows an address of a D A conversion module in 16 bits The number is obtained from digital quantity that a QCPU wrote to the buffer memory Digital values ranging from 2048 to 2047 can be set in signed binary 16 bits long 3 Buffer memory is a RAM 7 3 Communicating with Intelligent Function Modules 7 3 1 Communication methods with intelligent function modules QCPUs provide the following methods for communicating with intelligent function modules Table 7 2 Type of communication with intelligent function modules Communication f Functions Setting method method Initial setting Performs initial settings and automatic refresh sett
83. O devices 1 10 2 I O numbers of the main base unit The I O numbers of the I O modules that are attached to the main base unit are assigned as follows This concept applies both to the I O modules and to the intelligent function module Main base unit Q33B Q35B Q38B Q312B 11 Slot numbers dO 9 00 db 9 OL AZ 9 02 ajnpow Ajddns samod dv 0 Op dG 0 0S I O numbers dZ 9 02 d6 0 06 dV 9 0V dg 9 0g Base unit with three slots Q33B Q35B Base unit with five slots Q38B gt Base unit with eight slots 4 Base unit with 12 slots Q312B gt e The I O numbers of one slot one module is assigned in ascending order in units of 16 points O to Fy The status that 16 point module is attached to each slot is considered as a standard For example the I O numbers when 32 point module is attached to the fifth slot is as shown below Main base unit Va 6 7 Y Slot numbers The I O numbers of the slot next to the one with 32 point modules are changed The numbers are assigned in order from lower numbers ajnpow Ajddns Jamog AO 9 00 db 0 OL Az 9 02 J 0 0 dv 9 0v 49 0 09 AS OF 0S dZ 9 OL d8 9 08 e The vacant slot The slot with no I O modules installed is also assigned with the I O numbers For example if the third slot i
84. ON Error bob AST CO A occurrence I O module verification is also performed for remote I O station modules M62 Goes ON if even one annunciator F goes ON Instruction detection ON Detected execution OFF Not detected Goes ON if error is detected by CHK instruction S Instruction Meo e Remains ON if the condition AN to normal thereafter ae M9108 M9109 Pee of Corresponds to SD93_ M93 aE baal Wee ei Corresponds to SD93_ Goes ON when measurement of step M9111 SM94 P 9 Corresponds to SD94 transition watchdog timer is commenced M9112 M9110 transition reset og x SM95 Enabled only ON Started watchdog Corresponds to SD95_ Resets step transition watchdog timer when M9113 W M96_ when SEC timer started Corresponds to SD96 it goes OFF M9114 SM97 program exists Corresponds to SD97 New SM98 Corresponds to SD98 New e e g SM99 Corresponds to SD99 N W OFF Normal e Goes ON when at least one module is in the status where the Detection of ON There is a module external power supply is OFF Remains ON even after return to S Error QCPU SM120 external power whose external normal occurrence New r mote supply OFF power supply is Applicable only for Q series module OFF For future use App 51 Special Relay List 2 System information p w LED OFF f e When this relay goes from OFF to ON the LEDs corresponding to the DEF e ON EEDOFF individual bits at SD202 go off u SM203 STOP
85. Program Example Process When the destination 0 is a word device X3 X2 X1 X0 e vobi H prow kre o H S Become 0 J Source Source device b4 b3 b2 b1 bO e Destination Destination device DO 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 When the source S is a word device Hro o faro K2M100 1 ofo No change When the source S is a constant 3 4 1 2 H mov m1234 evo H aa 0 0 0 1 0 1 0 o o 4 ek ola When the source S is a bit device MOV K1MO pomoj No change Os are Data of M3 transferred to MO are transferred A SCHOOL QB 14 Program name MAIN 5 2 5 FMOV P FMOV Batch transfer of the same data BMOV P BMOV Batch transfer of the block data m 0 m FMOVP K365 DO K8 x4 5e FmovP K7000 D8 K16 i 10 BMOVP DO D32 K16 X6 15 FMOVP KO DO K48 Operation Practice Input condition D FMOVP K365 DO K8 e When the input condition is activated the FMOV instruction starts to transfer the data specified in to the specified number of devices starting from the device specified in The FMOV instruction performs the following operation when X3 is turned ON 8 devices K8 K365 e FMOV instruction is useful when clearing many data all at once Exampl
86. Sating aha i i ra ana Enable X this means using only CH1 CH1 Sampling process averaging process setting Sampina 5 Click the End setup button CH1 Time number of times specifying Number of times m CH1 Average time average number of times setting 4 Setting range Time 2 to 5000 ms Number of times 4 to 62500 times CH2 A D conversion enable disable setting Disable CH2 Sampling process averaging process setting ampling E s Details m Sele 5 Click Make text file 6 Click 6 Click the Auto refresh button in GX Configurator Initial setting Auto refresh To next page From previous page 7 Set D10 in the PLC side Device area on the CH1 Digital output values row of Setting item 8 Click the button D10 8 Click 7 Set on module PPWAQ 9 Confirm that Available is set in the Initial setting and Auto refresh column of Q64AD 0080 A D Conversion Module Q644D 9 Confirm FAC eta MiTiae Reco OeNeM led 10 After the setting is completed click Intelligent function Intelligent Function module parameter is module parameter and then click Save parameter Open parameter Ctrl O Close parameter K 11 Click the button narameter 10 Click psrameter Exit Intelligent function module parameter C onl Available Available M 7 5 5 Exercise with the demonstration machine 1 Sequence program The sequence prog
87. Station no Host PLC type 0020 ienn Noi E Target PLC Vetwe Target memory Program memory Device memory Format Type Do not create a user setting system area the necessary system area only C Create a user setting system area High speed monitor area fram other etatior Host PLC type 0020 PLC Nat 1 2 Click the Online Format PLC memory menu The dialogue box as shown on the left will appear Select Program memory Device memory from the Target memory drop down menu Click the button Click the button to begin format When format is complete the dialogue box shown left will appear Click the button Click the button to close the dialog box 5 Clear all the device memory from the CPU Clears the device memory from the QCPU Inset project LD Edit mode MAIN 35 View fein Diagnostics Tools Window Help Transfer setup Read from PLC Write to PLC Bejg Verify with PLC Ee DAM Arrange PLC memory Set time 1 Click Clear PLC memory Connection target information Connection Toes EI lt gt PLC module Target PLO Network no fO Station PLC No 1 2 Confirm that the box I Clear device s whole memory is checked MELSOFT series GX Developer lt 4 Click MELSOFT series GX Developer x Completed Clear PLG memory Connection target information Gom
88. Terminates Menu bar Most frequently used item when operating GX Developer Click the menu bar to select a variety of functions from the drop down menu under the menu bar Tool bar Equips buttons to easily access the commonly used functions This enables quicker and speedier operation Point the cursor to the tool button to show the function of each button Project data list A ladder program creation screen or dialogue boxes can be read out from the list This list shows the project data sorted in classified categories Edit screen Displays a ladder program creation screen or a comment creation screen Various screens are displayed so that you can edit ladder diagrams comments or parameters Status bar Shows the status information of the GX Developer Scroll Lock Shows the state of Shows the current mode l Q02 H te station j cfm Fe a I a Shows the state of Caps Lock Shows the Shows the CPU type connected CPU Shows the state of Num Lock 2 1 2 Project A project consists of programs device comments parameters device memory and device default Project Program Program Device comment Device comment Parameter Device memory Device default A sequential program that is required to operate the PLC CPU A comment for the sequential
89. When always inputting and storing a set value of the digital switch to D10 of the PLC Digital switch Input module CPU Data J register BIN conversion D10 Wrong SM400 Always ON configuration H BIN K4X20 D10 In the above program changing a value of the digital switch with the PLC in RUN mode may cause codes other than 0 to 9 to occur at the timing of the change This generates OPERATION ERROR of the CPU To avoid this write a program as follows Example 1 When 4 digits of X20 to X2F are used 0 E lt KO K1X20 H gt K9 K1X20 MOV K1X20 K1M20 H lt KO K1X24 H gt K9 K1X24 MOV K1X24 K1M24 H lt KO K1X28 H gt K9 K1X28 _ MOV K1X28 K1M28 H i lt KO K1X2C gt K9 K1X2C MOV K1X2C K1M32 H H BIN K4M20 D10 Example 2 When 8 digits of X20 to X3F are used SM400 0 s RST ZO H a D FOR K8 H E K4 Zo H N A 31 CNEXT H SM400 32 1k CDBIN K8M100 D10 H C DBCD D10 K8Y40 H CIRCUIT END App 127 Appendix 5 29 Displaying number of faults with fault numbers using fault detection program The following program sequentially displays the number of turned on bit devices X M F etc among many bit devices being used continuously together with their device numbers Application example When M or F is used as an output device of a fault detection pr
90. by sensors of X20 to 25 K2X20 FIFO table Pointer D10 6 K2Y72 D30 6 Read using FIFRP Step1 11 1 gt 1 31 1 Step2 12 2 32 2 aaa es aaa i gt Coating Step3 13 g Data is backed up when X03 is turned on 33 8 bath pattern Step4 14 4 34 4 acess 2 Seca egaine oaea bey Step5 15 16 Backed up data is read when X05 is turned on 35 16 Step6 16 32 36 32 z 37 0 K2X20 32 Write using FIFWP 38 0 FIFO table 39 0 Pointer D20 D1 timer constant of T1 49 6 Read using FIFRP Step1 21 gt 135 41 135 Step2 22 42 150 EEE E ER eases caste eet gt Washing Step3 23 Data is backed up when X03 is turned on 43 120 time Step4 24 44 100 Mg LAE eae aa e A Step5 25 Backed up data is read when X05 is turned on 45 20 Step6 26 46 135 Current value of TO 0 DO Write using FIFWP 0 App 120 Project name QA 9 Program name MAIN X0 0 H Y70 gt Moves in right direction M1 m X1 3 H Y71 gt Moves in left direction M2 X2 6 M3 gt Washes K32000 TO gt CMOV TO DO H X2 14 H C PLS M10 H M10 17 i lt D10 K6 FIFWP K2X20 D10 Stores the pattern of coating bath s position C FIFWP DO D20 H Stores washing time X3 27 4 BMOVD10 D30 K20 H Backs up stored data X5 32 BMOVD30 D10 K20 H Reads backed up data X6 i 37 4 lt Ki D10 E o FIFRP K2Y72 D10 J Reads the position pattern M6 of the washing bath FIFRP D1 D20 H Reads washing time 48 lt K2X20 K2Y72 SS M1 gt
91. chart Start X0 a PX3 x4 LL a e Pressure switch PX2 X3 7 Ee PX1 X2 L A Y70 boo ae Compressor B Y71 Eee Oe ee C Y72 Pressure shortage Compressor Major Minor Minor Medium Major Minor Minor Minor Medium A B C B C AC ABC A B C AC App 114 13 19 23 26 29 31 36 45 48 50 Project name QA 11 Program name MAIN xo x1 I lt MO e aa x4 t WO 73 X4 X3 X4 Y76 Y75 r H Hh lt Y74 Y74 Pressure shortage Minor is indicated when i the pressure switch X4 turns off X3 X2 X4 Y7 ci HH lt Y75 Y75 Pressure shortage Medium is indicated when the pressure switch X3 Medium turns off X2 X4 Y76 Y76 Pressure shortage Major is indicated when the pressure switch X2 Minor turns off MO a LA S M1 Y74 a Ff PLS M2 Mi CSET M9 MO a p E VS Omg Eo ka EAEAEAEAEAEA YFRT a Eo Pr Rest ott Be Lr RST o M2 i Hre _ FST m3 1l SFT M12 1l SFT M11 L SFT M10 M10 5 mess RST M13 MO y M13 i Py pr seT Mo X4 MO M10 r a Y70 Y75 M11 H HH xis M11 4 A Y75 M12 H HH Y76 M12 4 a_OAST NTH_YN 7yHNWATHWHH LWHSYTWL WS NYT Y75 M10 M HHH YG CIRCUIT END App 115 gt RUN gt Indicates pressure status gt Pressure shortage Major gt Pressure sh
92. compatibility setting m File register Sets H PLC File Setting H Comment file used in instructions Sets m Device initial value Local device file Sets he QCPU label name and purpose he comment of QCPU label Sets either the low speed high speed timer Sets contact that controls QCPU RUN PAUSE its Prohibits the remote reset operations from GX Developer he output Y status after switching from STOP to RUN he execution of computing floating decimal point data in double accuracy he following items Interruption pointer assignment 150 to 1255 I O No and head SI No of intelligent function module he head No of the pointer used as a common pointer he number of vacant slots for the basic expanded bases Sets execution interval for head No of interruption counters and interruption pointers 128 to 131 he execution of interruption program at high speeds he synchronization of the start up of QCPU with that of intelligent jon module Sets whether or not to use the special relay register for MELSEC A series he file of the file register used throughout the program he file of the comment used throughout the program Sets file of the device initial value used for QCPU he local device file used throughout the program he QCPU watchdog timer he QCPUs operation mode in the error status he detection of specified errors Sets constant s
93. control panel of the demonstration machine is turned ON MOV K200 DO 200 0 oO a ee ee oe a END When XO turns ON the values of DO and D1 become 200 Related Practice Question Practice Question 5 ANSCHOOL B 12 Program name MAIN 5 2 2 BIN P BCD gt BIN data conversion instruction Operations to read and write data from 35 steps onward K50 X7 TO K1500 i i F xo Cm i 30 _ BIN K4x20 D5 x0 34 _ MOV K4X20 D6 Soca the difference between BIN and MOV instructions e When the input condition is activated the data in the device designated as is automatically judged as a BCD code and converted into binary to be transferred to the device designated as D 60004000 20004000 600 400 200 00 60 40 20 0 4 2 o wom Dole Tele p fet pep Thousand digits Hundred digits Ten digits Unit digits Converted to binary 2211638481924096 2048024 612 56 128 64 32 16 4 ee el Becomes 0 e As the ordinary digital switches generate BCD codes the BIN instruction can be used to write data of the digital switches to the PLC 4096 512 Digital switch 32 16 4 7660 K4X20 ye D6 o 0 0 1 0 0 1 o O O 1 1 0 1 O0 Of When the BCD code is input 3 9 8 g N Q 8 2 a without conversion 1024 oo Y amp S 128 a 64 D5 E 0 0 0 0 0 4 0 0 1 1 O 1 0 O 1 0 When the BCD is converted
94. counter C10 to 0 If the contact C10 is already turned on the contact is released ANSCHOOL QTESTS Program name MAIN 5 7 Practice Question 5 7 1 Practice Question 1 MOV Temporarily send the eight input conditions XO to X7 to DO and then output them toY70 to Y77 e g Y70 turns ON when XO is turned ON X0 Y70 X1 gt Y71 X2 gt Y72 X3 Y73 X4 Y74 X5 Y75 X6 Y76 X7 Y77 Fill in the blank square of the program below create a program with GX Developer and check to see if it works properly with the demonstration machine 1 l SM40141 a l i 0 MOV 1 DO i 1 l i CMOV DO CJi 1 l 1 l Hint CPU Input module Output module 1 xo on 0 1 Y70 2 X1 0 1 0 1 Y71 X2 0 1 Y72 X3 l l 0 1 Y73 K2X04 x4 OT l o v74 K2 70 X5 0 1 Y75 X6 0 1 Y76 X7 0 1 0 1 Y77 MOV gt i MOV CPU takes in the input signal as 1 when the signal is ON and imports as 0 when it is OFF The output module turns ON upon outputting 1 and turns OFF upon outputting 0 Comparison The program created by the sequence instruction without MOV instruction is shown on the next page XO 1k lt Y70 X1 a 71 X2 ti WOT 72 X3 r AA X4 7 oo F N O X5 10 k te YS X6 12 f Y76 X7 14 AYT Y Y Y Y Y Y Y Y ANSCHOOL
95. data BMOV Batch transfer of the block data ssssssssssseessessseeesneeesneeesneeesneeenneeeees 5 22 5 3 Comparison Operation INStruction ccccccccccecesceeeeceeeeeeeeeneeeeneeeeaeeceaceceaneeseneeseaeeseaeessanesseneeneeseeneesenees 5 27 5 4 Arithmetic Operations Instruction cceeeceeeeeeeeeeeeeeceeeeceeceneeseaeeeeaeeecaeeesaceeseaeeseaeeecaeescaeeesnesiseeseaeeseaees 5 32 5 4 1 P _ P BIN 16 bit data addition subtraction cscccsesesssetesssseesssesessneeeesseeeesneeeesseess 5 32 5 4 2 ef P BIN 16 bit triiltippl Ceti ona AI VISIO MN coesat oe sos ACh fed al hahaa Re Ae 5 36 5 4 3 32 bit data instructions and their necessity ee eecceeeeeeeeeeeeeeeeeeeeeeeaeeeeesaeesaeeseeseesieesieesieteesieee 5 42 5 4 4 Calculation examples of multiplication division that include decimal points in the case where an arithmetic operation x or iS used ccecceeeceeeeeeeeeeeeeeeeeeeeeeeteaeeteeeees 5 44 5 5 Index Register FIERESO csccessctecceesesecceeeaecesedecceseaseecunecnseceneasaeaenteducdeneadaceeeesaeaendenstsaedentedueeenes 5 45 5 5 1 How to use index register Z cccccecceesceecceecceecceedeneccnceneccnsdeneccnecensadenseensaeneeeesdeneeeneaenecceatenenedeneeetes 5 45 5 5 2 How to use file register Ranet iana ie A AAAA EAA ENA NEEE AAE ES NEAR AAE AEA ANARAN 5 47 5 6 External Setting of the Timer Counter Set Value and the External Display of the Current Value
96. demonstration machine oO lt R 4 8 4 PO P10 ANSCHOOL ATESTA Program name MAIN Practice Question 4 CJ CALL RET FEND Y70 and Y71 flicker for 0 5 s alternately when X7 is OFF and when X7 is ON Y72 and Y73 flicker for 1 0 s alternately Turning XO ON resets the currently flickering Y70 to Y73 Create the following program filling in the blanks the demonstration machine TO K9999 130 FF TF FFF TO T200 K9999 4a4d4 HWHJ_ _Y_ SHWY __ WTNWNNTN HX F200 X7 teaei ao a B OS tA SM401 T11 K5 et aM TF T0 T10 K5 T11 Flip flop ladder lt Y70 KOR O aaa tf C12 P10 St SM401 T20 K10 w lt T21 T21 tf lt T20 Flip flop ladder Y72 T21 A 73 XO eee ES T Ci4 i P10 eee SM401 Hf CRST Y70 CRST Y71 START ot N Y70 amp Y71 0 5 s flickering Y lt CJ PO gt Y72 amp Y73 1 s flickering Reset Y70 to Y73 Subroutine program lt FEND gt A END lt FEND gt olal Alo N gt Asd Rae Need Rae Rae Nae Chapter 4 Practice Question Answers Question Answers No 2 x fs n Se opem a sro e astm m ro apf es af e of eo CHAPTER 5 BASIC INSTRUCTION Part 2 5 1 Notation of Numbers Data The PLC CPU converts all the input signals into ON or OFF signals logical 1 or 0 respectively to store and process them and per
97. device Buffer memory p Device C 7 5 is set e start iO HEX O Foo Address 16bit integer s Setting value 5 5 Status of bit device C current value is displayed Monitor the status of C current value in this window Note that the change on the value of CO is visibly recognizable in the logic test function GX Simulator window and ladder monitoring screen 6 Double click the device No to change its device value In this example CO is double clicked 7 Enter a value in the Setting value column of the Word device Buffer memory column on the Device write window 8 Click the button 9 The result of the device value being set to 5 is reflected on the ladder monitoring display 8 3 I O System Settings Function The I O system settings function allows GX Simulator to simulate how external devices behave The following two setting methods are available for performing I O system settings e Device value input Specifies a device value that is to be set the set time after the conditions are fulfilled e Timing chart input Sets a timing chart that is followed once the conditions are fulfilled Use the following example for exercise lt lt Example program gt gt Project name QLLT XO X1 0 Ht lt Y70 gt Y70 Mo A yr SM412 K9999 6 lt c0 gt SM400 11 H E MOV co K4Y80 H 1
98. does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this textbook 2006 MITSUBISHI ELECTRIC CORPORATION CONTENTS CHAPTER 1 BASICS OF PLC 1 1 to 1 14 Mel POCA detects z ee ccxct E T E AE A AE E E S 1 1 1 2 Program Processing Procedure nen enaie n n a A RA E A E 1 4 1 3 MELSEC Q Module Configuration ccceccecceeeseneeeneeeneeeeeeaeeeaeceaeeeaeseaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeeeatesas 1 5 1 4 External I O Signals and I O NUMDESS ceceeceeeeeeeeeeeeeeeeeeeeeeaeeseeeaeesaeeseesaeeseesieesieesieesieesieesieeieeseess 1 10 1 5 System Configuration and I O Numbers of Demonstration Machine cccecceceeeeeeeeeeeeteneteeeeeeeaes 1 13 CHAPTER 2 OPERATING GX DEVELOPER 2 1 to 2 40 2 1 Basic Knowledge Required for Operating GX Develope cccccceceeeeeeeeeeeeeeeeeeeceeseneeeeaeeseneeeeneeetans 2 1 2 1 1 GX Developer Screen ccccccceccecenceeesceessceeceneeeneeeaeeesaneseaneesaneeseaeescaeeseacesseneesaneessaeeseeessaeeesuneesans 2 1 2 12 Project cian teens ei es eee ee eee ee eee eee 2 3 2 2 Operation Before Creating Ladder Programs cecceeceeeceeeeeeeeeeeeeeeeeeeesaeeeaeeeaeeeaeeeaeesaeeseeeaeeeaeeeeeeaeeeas 2 5 2 2 1 Starting up the GX Developer 2 2 2 2 ecccccecceeecceeeeeeeeeeeeceeeeeaceeeeaeeceneeseaeeseaeescaneeseaeeseaeescaee
99. e Jumps to END instruction when input Pie i condition is met 6 Program execution control instructions Instruction Execution Processing details Be symbol condition Disable ae Prohibits the running of an interrupt program 1 interrupts Enable EI Ate e Resets interrupt program execution i interrupts prohibition e Prohibits or permits interrupts for each IMASK IMASK SE 2 interrupt program e Returns to sequence program following an Return IRET iret HY a a 3 1 interrupt program 7 I O refresh instructions Instruction Execution Category symbol Processing details condition Category Number of basic steps Number of basic steps A hh e Refreshes the relevant I O area during scan refresh App 22 Instruction symbol 8 Other convenient instructions UDCNT1 UDCNT2 2 D gs H U l i Yn Q o Execution Processing details condition sro UU UU UU UU UU UU Ue set Ue Domn up Cn currentvalue 0 1234156765432 10 1 2 3 2 10 Cn contact so SL LILI LIAS LL LL st FIFA ALF LAL Vivi viviviy Cncurrentvalueo 1 2 B 4 5 4 3 2 1 0 1
100. executed Request Set only when there is a user request through SM etc e Indicates corresponding special register in ACPU When the contents are changed the special register is represented as changed e New indicates the special register newly added to the QnACPU or Q series CPU module Corresponding ACPU D9000 For details on the following items refer to the following manuals e Networks Q Corresponding MELSECNET H Network System Reference Manual PLC to PLC network e Q Corresponding MELSECNET H QnA Q4AR MELSECNET 10 Network System Reference Manual e SFC gt QCPU Q Mode QnACPU Programming Manual SFC 1 SD1200 to SD1255 are used for QnACPU These relays are vacant with QCPU 2 SM1500 or later is exclusively used for Q4ARCPU App 64 Diagnostic errors Clock time for diagnosis error occurrence Error information categories 1 Diagnostic information Meaning Diagnosis error code Clock time for diagnosis error occurrence Error information category code Corresponding Explanation ACPU DID Corresponding CPU e Error codes for errors found by diagnosis are stored as BIN data e Contents identical to latest fault history information e Year last two digits and month that SDO data is updated is stored as BCD 2 digit code B15 to B8 _ B7 to BO e g Oct 1995 Year 0 to 99 Month 1 10 12 H9510 The day and hour that SDO is updated is stored as BCD 2 digit
101. installed Operation Example Changing Multiple CPU Setting The number of CPUs of Multiple CPU setting is one by default Change the value to two If only one CPU is installed omit this step 1 Double click PLC parameter on the GX Unset project fe Program Developer project list 5 Device comment Parameter E PLC parameter 2 The Qn H parameter setting dialogue box appears Click the Multiple CPU settings Qn H Parameter button 2 Click Multiple CPU settings Defaut End Cancel Multiple CPU settings K 3 Enter 2 in lt Number of PLC gt box in the No of PLC Online module change ie i wanc al fe wel 3 Select 2 Jeene multiple CPU setting dialogue box Operating made 1 0 sharing when using Multiple CPUs T Error operation mode at the stop of PLC IT All CPUs can read all inputs a netop by stop x T AlI CPUs can read all outputs 4 Click the button Refresh settings Change screens Setting v J Set starting devices for each PLC 4 Send range for each PLC The auto reftesh area Caution Point J Start End ol Caution Oitet HEX from starting addred 4 Click efer to the user s manual of the Settings should be set as same when using multiple CPU The applicable device of head device is B M Y D W AIER The unit of points that send range for each
102. is installed omit this step The Q series Multiple CPU version demonstration machines are equipped with two CPUs Those machines are not dealt with in this textbook however it is required to set the PLC parameters of each CPU for the reason mentioned below Each CPU should be informed where in the main base slot the I O numbers begin lt When two CPUs are installed gt yun yndu yun yndjno F fo g n kej Ss lt I O numbers start from this slot Follow the steps below to set the parameters For details on parameters refer to 3 2 Parameters ry 1 Double click PLC parameter on the GX ft Program Developer project list 5 Device comment f Paramete oy parameter Network param 4 Remote pass 1 Double click Continued on the next page Continued from the previous page 2 The Qn H parameter setting dialogue box will Qn H Parameter appear Click the Multiple CPU settings PLC system PLC file PLCRAS Device Program Boot fle SFC 1 0 assignment button 2 Click Acknowledge XY assignment Multiple CPU settings Defaut Check End Cancel Multiple CPU settings Ei 3 Select 2 in lt Number of CPU gt box in the No of PLC 1 Online module change Mooc 2 3 Select 2 Peet hone Multiple CPU settings dialogue box Operating mode 170 sharing when using Multiple CPUs
103. is useful for displaying and monitoring the last two digits that represent their types ANSCHOOL EXO Program name MAIN Ladder Example Create the ladder chart shown below using GX Developer write the chart into the demonstration machine and confirm if the FMOV instruction is correctly performed I o i FMOV K200 DO K5 4 i x1 Li I 1 FMOV KO DO K5 4 Operating Procedure The following procedures are the same as the Operating Procedure described in Section 4 4 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Make sure that the contents of the devices from DO to D4 become 200s on the batch monitor screen by turning XO ON on the control panel of the demonstration machine The data in the devices are cleared by turning X1 ON a o a o a o a o a o 0 o 0 o poo oo ooo Change the setting of the device batch monitor as shown below to display the numbers in decimal hexadecimal or binary numbers Numeric value decimal displays the numbers in decimal Numeric value hexadecimal displays the numbers in hexadecimal Monitor type bit 2 displays the numbers in binary Related Practice Question Practice Question 7 ANSCHOOL 8 15 Program name MAIN 5 3 Comparison Operation Instruction Size rere gt lt lt lt gt X3 SM413 2 s c
104. or D A conversion module to convert analog signals digital data that are input with the volume or digital switch on the demonstration machine D A conversion module A D conversion module QX QY Q64 Q62 Q61P QCPU QCPU 42 42P AD DA A1 No 1 No 2 64 64 16 16 points points points points X0 Y40 X Y80 X Y90 to to to to X3F Y7F X Y8F X Y9F tH Channel 1 Channel 1 Vv Vv Not used in this document A D conversion value Value to be D A converted Keep them at stop Input D A output value is displayed is displayed I O panel Digital display i Digital display Y5F to Y50 Y4F to Y40 4 TWA o U N m VJ U Digital switch X2F to X20 l o Voltmeter for Voltmeter for input voltage output voltage a Input volume 7 5 Q64AD Analog Digital Conversion Module 7 5 1 Names of parts Part names of Q64AD are given below together with descriptions For details refer to the User s Manual Q64AD W Name and DOE No Descriptions appearance Indicates operation status of an A D conversion module ON In normal operation 1 RUN LED Flicker In offset gain setting mode OFF 5V power failure or watchdog timer error occurred Indicates errors and status of an A D conversion module ON Error occurred OFF
105. processing are executed used when the scan time exceeds 200 ms s OFF Trace not in progress o SM1046 SM802 Sampling trace ON Trace in progress Switched on during sampling trace OFF Sampling trace SM1047 SM801 Sampling trace suspended Sampling trace is not executed unless SM801 is turned ON preparations ON Sampling trace Sampling trace is suspended when SM801 goes OFF started Selection of OFF Output until NUL e When SM701 is OFF characters up to NULL 00H code are number of output SM1049 characters i encountered When SM701 is ON ASCII codes of 16 characters are ON 16 characters output output outpu e Switched ON to disable the CHG instruction kemution ON Disable Switched ON when program transfer is requested disable e Automatically switched OFF when transfer is complete Be SEG OFF 7SEG segment e When SM1052 is ON the SEG instruction is executed as an reset M9046 M9047 M9049 instruction OFF Enabled M9051 SM1051 M9052 SM1052 M9054 M9055 M9056 M9057 SM1057 M9058 SM105 y A M9059 P F z I O partial refresh instruction instruction display imosa Shion ore run FORE SIER RUNON Sahod on when the RUN key switch is in STEP RUN ag ON STEP RUN in effect Position Main side P set being requested OFF Other than when P complete during run Automatically switched off when P SM1059 OFF Other than when P M9060 requested for
106. program device which is classified into two types One is common comment that is common to all the Device comment projects and the other is comment by program which varies by projects Used for specifying the range of various settings such as the network Parameter related setting and device spectrum i Displays the current device capacity The device capacity can be Device memory changed by entering numeric value Device default Sets the device default for the PLC CPU 1 One project per GX Developer One GX Developer can edit only one project unit To edit two or more projects at a time run as many GX Developers as the number of projects 2 Device Comments The device comments of GX Developer are categorized into common comment and comments by program A device comment that is common to all the Common comment 1 ne f programs within the project A device comment that is set by each program The name of the comment must be the same as of the program Comments by Equals the number of program the programs If the contents of the two device comments overlap with one another select Tools Option By program to set priorities of them 2 2 Operation Before Creating Ladder Programs 2 2 1 Starting up the GX Developer po remonstrance 1 Click the button n Windows Media Player Tour Windows XP 3 p renen 2 Select the All Programs menu a Windows Movie Maker Al Programs
107. seconds after MO turned on Bit device output o Oma 5 Self maintaining circuit xO x1 o go E Bit device output r 5 3 Turns off 10 seconds after MO turned on REFERENCE 7 Enter MO 8 Click the FORCE ON button 9 Click the button 10 The simulation set in the I O system settings starts To do this refer to lt lt Signal timing gt gt at the beginning of Section 8 3 1 XO turns on 2 s after MO turned ON XO turns off 4 s after MO turned ON While XO is ON the self maintaining ladder operates and Y70 stays ON 2 X1 turns ON 6 s after MO turned on X1 turns OFF 8 s after MO turned on While X1 is ON Y70 in the self maintaining ladder stays OFF 3 MO turns OFF 5 s after it turned ON The logic test function GX Simulator takes 100ms to execute one scan Time taken for one scan is the set time for constant scan Default is set to 100ms This is designed to operate user created sequence programs equally regardless of the performance of personal computers To change the default time of 100ms configure the parameter setting in GX Developer and set any value as time for constant scan QCPU must be operating to do this CHAPTER 9 MAINTENANCE 9 1 Typical Troubles The following bar graph shows the ratio of faulty parts and causes of PLC errors Source Inspection made by JEMA The Japan Electrical Manufacture s Association Figure 9 1 Fault
108. sls MELSOFT series GX Developer 3 The Caution ears Read through the reeel has changed Make sure everything is safe then execute again message and cl ick the button if you The write destination is the program in the program memory agree with it Don t write to the same program from a plurality of place at the same time Ensure the PLC program and the program to be converted match p It will not operate properly when there is some Rise instruction Fall instruction SCJ instruction in the program OK Write destination program MAIN 4 The message saying RUN write processing has completed appears Click the MELSOFT series GX Developer i RUN write processing has completed There are 500 RUN write maintenance stp 4 Click button Note that to execute the write during RUN operation the PLC CPU and GX Developer must share an identical program before the modification So if it is not for sure that those two programs are identical verify them before modifying with GX Developer and executing write during RUN 6 7 Registering Devices Various devices including ones in separate locations on the ladder can be monitored all together in one screen Diagnostics Tools Window Help 1 Click Online Monitor and Entry data Transfer setup Read from PLC monitor sequentially Write to PLC Verify with PLC pe Wri
109. stored in D5 is calculated to its square root and the result is stored in D6 and D7 XO 0 i C MOVP K4X20 D5 CBSQR D5 D6 C MOVP D7 K4Y50 C MOVP D6 K4Y60 CIRCUIT END Results of square root operation are stored as follows Square root Square root integral part decimal part nedal part eama pa uIP A value in 5th decimal pace is D5 D6 D7 rounded off Therefore a value in 4th 0to 9999 0to9999 Oto 9999 decimal place has error of 1 BCD value BCD value BCD value REMARK Sets data Calculates the square root Square root integral part Square root decimal part CPUs provide square root operation instructions for data in a real number floating point format App 125 Project name QA 15 Program name MAIN Appendix 5 27 Example of operation program calculating n th power of data A value stored in D10 is calculated to its n th power n is a value stored in D14 and the result is stored in D10 x1 0 FMOVP KO D10 K10 Clears data BINP K4X30 D10 Sets data MOVP D10 D15 BINP K2X20 D14 set n K1 D14 SCJ PO x1 18 H CCJ PO FOR D14 7 x1 CD D10 D15 D10 gt Multiplies the value n times NEXT J x1 D D10 K10000 D16 c DBCD D16 K6Y50 gt BCD outputs a value in 10 digits to exterior DBCD D18 K4Y40 J CIRCUIT END An operation error occurs if a value in D10 exceeds 2147483647 App 126 Appendix 5 28 Program using digital switch to input data
110. the faulty module with a spare module This is efficient when there are no spare modules Creating a document The fact that PLC programs are easily modified may lead to inconsistency between an operating program and documents i e ladder diagram program list Keep updating the document To do this using a printer is efficient Being experienced in peripheral devices Being experienced in DOS V personal computers PUs printers etc helps quick recovery from an accident 7 Spare products Table 9 3 Spare products Product Quantity Remark name Storage lives of lithium batteries are about 5 years So it is recommended not to keep the stock all the time but to 1 Battery One or two purchase them when needed However keep stock of 1 or 2 for accidental situation Floppy disk Backup FDs for the startup software and FDs for user Note that I O modules tend to have an error during test One per operation I O module module type Also note that the contacts of relay output modules are subject to consumption in long term use CPU One used CPU modules and memory cards are the core parts of a module model PLC This means that an error on them causes the 4 M O d 5 RT Boge system to go down card model Same as above As power supply modules are highly One used subject to temperature rise their service lives tend to be model shorter than supposed in a high ambient temperature environment Peripheral A PU
111. to confirm the entry 16 The symbol you entered Py will appear 17 Press the F7 key and enter Y71 16 The symbol will appear 18 Press to confirm the entry symbol x END 19 The symbol you entered C Y71 gt will appear 19 The symbol will appear 20 This is the end of the procedure Continued on the next page 2 4 2 Creating a ladder program using the tool buttons Follow the steps below to create the ladder wilh ladder program to be created program as shown on the left x2 X0 i a NM eae a cere XJ i Make sure that the write mode is active before Y70 creating the ladder program 1 Click on the tool bar to open the Enter symbol screen Enter X2 0 Ew If you clicked other key s by mistake press Emer symbol the button 2 Click the button to confirm the entry 1 click RJ ci then enter X2 3 The symbol you entered ane will appear 3 The symbol will appear 4 Click on the tool bar and enter X0 E 0 Sifu bo OK Pet Herf END T 5 Click the button then enter X0 5 Click 4 click E ipe 6 The symbol you entered E will appear 7 Click on the tool bar and enter Y70 8 Click the OK button then enter Y70 7 click BI 8 Click
112. to gray code S gt D BIN 32768 to 32767 o o ojo l o S l o o olj o Conversion to gray code S 1 S gt D D Real number 2147483648 to 2147483647 02 App 18 Instruction symbol Execution Category condition Symbol Processing details Number of basic steps GBIN n ojj o Conversion to gray code D Gray code 32768 to 32767 GBINP l DGBIN Conversion to gray code S 1 S gt D 1 D DGBINP DGBINP Gray code 2147483648 to 2147483647 oe BIN data DNEG D 1 D _ gt D 1 D BIN data n oo o NEG NEGP is DNEGP o ENEG iw O 1 D _____ gt D 1 D i Real number data ENEGP iw BKBCD e Batch converts BIN data n points from S to BCD data and stores the result from D onward BKBCDP BKBCDP BKBIN BKBIN e Batch converts BCD data n points from S to BIN data and stores the result from D BKBINP BKBINP onward App 19 4 Data conversion instructions Instruction Category Processing details o n olo o o S 1 8 gt D 1 D is
113. to the instruction list described below Repeat operation a Ladder diagram b Instruction list program list Figure 1 2 Program e The program consists of a large number of instruction words and I O numbers I O numbers include not only the input X and output Y but all the contacts and the factor numbers of the coils such as a timer T that make up a ladder diagram Those numbers are also called device numbers The instructions which contain instruction words and I O numbers are added numbers that represent the order of operations Those numbers are called step numbers Instruction words are sometimes referred to as instructions e The number of steps varies depending on the types of instructions or the setting method for the numbers to be used for the I O numbers and operations The more complicated the operations become the more numbers are added to the instructions e The instructions repeat from Step number 0 to Instruction words end endlessly This is called repeat operation cyclic operation or scanning Amount of time required to take once through is called operation cycle scan time The number of the programming steps from step number 0 to the END instruction defines the length or the size of the program e The program is stored in the program memory within the CPU The operation is performed in one ladder block unit One ladder block ranges from the operation START inst
114. value if status latch is executed in a main sequence program Stores the block number and the step number if status latch is executed in a SFC program Block No Step No BIN BIN le Higher 8 bits Lower 8 bits Stores the software version of internal system in ASCII code Inconsistent value in high byte High byte Low byte Stored in low byte 41H is stored when using version A Note The software version of the initial system may differ from the version indicated by the version information printed on the rear of the case In the self loopback test of the serial communication module the serial communication module writes reads data automatically to make communication checks Stores the number of empty blocks in the communication request registration area to the remote terminal module connected to the MELSECNET MINI S3 master unit A2CCPU or A52GCPU Corresponding CPU QnA QnA Special Register List Continued ACPU Special Special Register after Register Conversion Special Register 4 Corresponding for Modification Meaning Explanation SPU Sets the time check time of the data link instructions ZNRD ZNWR for the MELSECNET 10 SD1085 for setting 1S to 65535S Setting range 1 s to 65535 s 1 to 65535 time check e Setting unit S value Default value 10 s If 0 has been set default 10 sis applied Head device No in data See each micro aes area of For details refer to the
115. word device read instruction execution is complete e Used as a condition contact for resetting SM1202 and SM1203 after the ZNRD instruction is complete e Use the RST instruction to reset App 63 Corresponding CPU Appendix 4 Special Register List Special registers SD are internal relays with fixed applications in the PLC For this reason it is not possible to use these registers in sequence programs in the same way that normal registers are used Data stored in the special registers are stored as BIN values if no special designation has been made to the contrary Data stored in the special registers are stored as BIN values if no special designation has been made to the contrary The heading descriptions in the following special register lists are shown in the following table e Indicates whether the relay is set by the system or user and if it is set by the system when setting is performed lt Set by gt S Set by system U Set by user Sequence program or test operations at a peripheral device S U Set by both system and user lt When set gt indicated only for registers set by system Each END Set during each END processing Initial Set only during initial processing when power supply is turned ON or when going from STOP to RUN Status change Set only when there is a change in status Error Set when error occurs Set by When set Instruction execution Set when instruction is
116. xo i 0 I cr P10 1 X1 1 3H ESCJ P10 1 xo x1 1 6 Hh lt Y70 i P10 X3 9 Y71 I I Operating Procedure See Section 4 4 Operating Procedure for the detailed procedure of the following operations 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice 1 When XO and X1 are OFF the CJ and SCJ instructions are not executed Therefore Y70 is ON Before executing CJ and SCJ P10 XO k _CJP10 l1 X1 1H I SCJ P10 XO X1 aA ep 70 gt _l amp WhMAR O 9 X3 P10 2 When XO is turned ON the CJ instruction is executed jumping to P10 Therefore Y70 remains ON Executing CJ First scan and subsequent scans XO CJ P10 1k SCJ P10 e 3 The SCJ instruction is executed when X0 is turned OFF and X1 is turned ON The instruction is executed jumping to P10 from the next scan Therefore Y70 becomes OFF Executing SCJ First scan First scan Fb Y71 st P10 Executing SCJ Second scan and subsequent scans X0 Second x0 khl CJ P10 So eet 1 CJP10 Xi times X1 p a ESTAA P10 Pe ooo SCJP10 1 xo x1 T xox Dai e 77 e Sa y N x3 x3 lt Y71 4 Y71 is turned ON OFF by X3 regardless of the CJ or SCJ instructions e The following lists explain the difference between the CJ and SCJ instructions CJ LD
117. 0 0 eeeeceeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeesaeeeaeeeaeesaeeeateneeeas 7 5 7 3 3 Data created by GX Configurator ee eeceeceeeeeeeeeeeeeeeeeeeeaeeeaeeeaeesaeesaeesaeesaeeeaeesaeesaeeeaeeseesaeeateeaeesas 7 6 7 4 Exercise System of Intelligent Function Module 1 0 eee eceeceeeeeeeeeeeeeteeeeeeeteeeeeeeseeeeeneseeeseaeseeeseaeseneeaeeaaes 7 7 7 5 Q64AD Analog Digital Conversion Module cccecceeceeeeeeeeeeeeeeeeeteeeseeeseeeseeeseeeseaeeeeeseeeseeeseaesenesenteneeaaes 7 8 FBV NAMES Of Parts 058 sssh cts ett od oh Peck gab has ek Sake bd aot dng Oa be Lae Paks ade a dente Oh ae Lh Pee ata dk 7 8 1 5 2 AlD Conversion Characteristics nni zaceisquxcsgancqetiesagueeticcceetiaes qededucaqeeblasteneedacacest nesendedacaqueddnadeaveincaeuesa 7 9 7 5 3 Intelligent function Module switch settings cee eecceeeeeeeeeeeeeeeeeeeeseeeeeseeseeseeseeseesieesieesieeieeseee 7 10 7 5 4 Setting with GX Configurator nsore iae aaan AAA AE A A EE AAE A EAA 7 12 7 5 5 Exercise with the demonstration machine cccccceeeceeeeceeeeeeeceeeeeeeeeecaeeesneeseaeeseaeeecieeesiseeteneeaes 7 14 7 6 Q62DA Digital Analog Conversion MOUle cccceeceeeceeeeeeeeeseeeeeeeeeesaeesaeesaeeeeesaeeeaeesaeesaeenaeesaeenteeatenas 7 15 TEIN Elaa e EE E A AA EAA EAA E A A ie Det ea 7 15 7 6 2 D A conversion characteristics ccccceeecceeeceeeeeeeeeeeeeeeeeecaeeeceaeeseaeeseaeeecaeeeseaeeseaeeseaeeseieeeieeesieeeeaes 7 16 7 6 3 Intelligent functi
118. 0 2 s or longer Therefore this is used instead of XO when writing a program App 96 Appendix 5 8 Ladders with a common line The following ladder cannot be operated by PLC programs To make such ladders controllable use master control instructions MC MCR in a program Manual Auto Y71 Relay ladder X2 H Y71 A sequence program with master controls xo xX o Himen e 0 M1 NO M1 x2 C a i M10 x6 X7 6 v lt M11 i O NO x1 Xo 10 H EMC NO M2 NO M2 X4 X C S x7 Y79 17 4 4A vt 20 Wf cR NO Mo Y71 21 4 4040 A M20 re M11 X2 25 H lt Y71 M21 n i a Y71 CIRCUIT END App 97 A SCHOOL QA 1 MAIN gt gt Manual circuit gt gt Auto circuit gt gt Common circuit Appendix 5 9 Time control program With the time control program time value is set in the two digits of a digital switch according to which the outputs Y70 to Y72 turn on after the set time limit has elapsed Currently elapsed time is displayed on Y40 to Y47 This operation is repeated Digital switch for setting time Display for current time 519 0 1 s units PLC 26 0 1 s units l X20 to X27 Y40toY47 Pushbutton for X3 reading time Turns on if the current value is less than 2 s Switch for timer X4 Turns on if the current value is just 3 s Switch for operation XS TT Turns on if the current value is 4 1 s or more Pa
119. 0 is ON and turns on if Y70 is OFF This flip flop operation is repeated Path name A SCHOOL X2 T1 K5 0 1 H lt TO gt TO K5 6 T1 lt Y70 TO 12 Y71 CIRCUIT END TO contact T1 contact LJ Le Y70 Y71 App 90 3 The flip flop operation starts when X2 is turn ed on In this operation Y70 turns on if the timer TO is on and Y71 turns on if the timer T1 is on Cycle 10 s Path name A SCHOOL 26 C RST TO H CIRCUIT END X2 a 70 contact Fal VEE EEN EE T1 contact feel N wo T LIL 7 Y71 L Loo App 91 Appendix 5 2 One shot ladder 1 Output starts and continues for a certain time after input X1 is turned on Time for the input being on must be longer than the set time limit X1 0 f lt T15 gt T15 Y75 CIRCUIT END x o L T15 i normally i close Y75 a Set time limit 7s 2 When the input XO is turned on momentarily Y76 turns on for a certain time XO T16 K100 Y76 Y76 CIRCUIT END 3 Output starts and continues for a certain time when the input XO is switched from on to off x0 o i CPLF M1 M1 T16 K100 3 T16 Y76 Y76 CIRCUIT END X0 Set time limit jet tie nit Pulse width 10s App 92 Appendix 5 3 Long time timer 1 Necessary time is obtained by connecting timers in serial
120. 1 D0 D1 1 2 3 4 ANSCHOOL GTESTS Program name MAIN 5 7 5 Practice Question 5 When XO turns ON create a program that imports the value specified by the digital switch X20 to X2F into D3 and D2 32 bit data adds them to D1 and DO and shows the result on the display Y40 to Y5F Also when X1 turns ON the program should import the value specified by the digital switch X20 to X2F into D5 and D4 subtract them from D1 and DO and show the result on the display If the result becomes a negative number the program should turn Y77 ON and show the absolute value on the display in two s complement form Fill in the blank square of the program below and check to see if it works properly with the demonstration machine X0 0 1H C DBIN K4X20 D2 H SSON Adds the external set value to DO fi 1 D2 DO H Only displayed 9 E KO DO J DBCD DO K8Y40 H when the result is a positive number 17 1 I CS DBIN K4X20 D4 H Subtracts the external set value 3577 D4 DO H from DO X0 H I I I I I I I I I I I I I I i I 26 PLS M1 x1 1 H I I I I I I I I I I I I I I I M1 30 C D gt KO DO DCML DO D8 H If the result is a negative number it is converted and displayed E D P K1 D8 H as a positive number determines L DBCD D8 KsY40 1H the negative absolute value ER Y77 Pal Outputs that the number is a negative X7 50 m A a B DMOV_ KO DO
121. 100ns Q01CPU C O Module Module 240V AC ME Be a 24V DC Plus common 24V DC High speed input 24V DC Minus Common Input module Connection output Connection output Independent contact one o aera eae E Tarsos oo Wome o o o o Output module Memory Card QCPU equips a built in memory as a standard to store the parameters and the program so that a program can normally execute without a memory card High Performance model QCPU is compatible with the memory cards However the Basic model QCPU does not support the memory cards The memory cards are required when using the following functions SRAM card Can be written changed within the amount of the memory lt Example of the usage gt e During boot operation e When using the file register that exceeds 32 K points 128 K points in volume e For storing the sampling trace data e For storing the SFC trace data e For storing the failure history data Flash card ATA card Memory Card gt Writes the contents of the program memory or the specified file in one pass The newly written data replaces all the original data Can only be read by using the sequence program lt Example of the usage gt e During boot operation When no change will be made to the data Can be written changed within the amount of the program Using the file access order such as FWRITE instruction in the sequence program accesses the P
122. 2 3 Changing the assignment of the function keys 1 Click Tooles Customize keys menu Diagnostics Window Help neck parameters Transfer ROM Delete unused con ear a ame IC memory card sette 1 Click Intelligent Function utility 2 Click on the desirable key type to select it As an example the window on the left shows the case when GPPA type is selected 2 Select the desirabl Custor a raat e desirable x 3 Click the button C GPPQ format MEDOC format REFERENCE Display of the tool bar changes depending on the selected key type Assignment of the shortcut keys alters accordingly GPPA format YA gt e X te LHI HTH HLH T j cF9 0 sF sFS SF sF8 F5 caF5 coAl0 sFi0 aF9 SPPA oma ceo 3a ate ara ars aslo MEDOC format 2 3 Preparations for Starting Up CPU Setting up switches and formatting the built in memory are required in advance to writing a program to the CPU Connect or set up the connectors and the switches indicated as 1 to 3 shown below The figures below are illustrations of QO2HCPU The locations of the switches and connectors are the same with other CPUs a 2 v 2 i geass SELI 1 Connect a battery Connect the bat
123. 3 Y z aa A i 70 1 Click to move cursor rears Em Y b 4 Cut Copy Insert line Delete line Insert row Delete row Draw line Delete line Find device Find instruction Find step no Find character string Find contact or coil Cross reference window display Cross reference list List of used devices Ctrl x Ctrl C Shift Ins Shift Del Ctrl Ins Ctrl Del F10 Alt F9 Ctrl F Alt Ctrl F7 gt 2 The menu will appear J Continued on the next page r L I I L Perform the following steps to insert a row to the ladder shown on the left 1 Click on any point of the row The new row will be inserted above the row selected with the cursor 2 Click the right button of the mouse on any point on the ladder window except on the rows to display the menu Continued from the previous page Ctrl Z Unde 3 Click Cut Copy Ctrl x Ctrl C tri Insert line Shift Ins Detete tine Insert row Delete row Draw line Shift Det Ctrl Ins Ctrl Del Alt F10 Ie LY 4 New line will be inserted Enter symbol E3 S e afefe then enter X7 s ciick B Cec A Continued on the next page 3 Click the Insert line
124. 30 si lt M3 L K4 D30 si lt M4 H K5 Do RRs H K6 Do m lt me L K7 D30 lt M7 L K8 D30 7 lt M8 Y70 mm K1 D31 m lt m LL It K2 D31 9 lt M12 H K3 D31 RR M H H K4 D31 RR M H t K5 D31 RR M5 H t K6 D1 RR lt me H K7 D1 RR 7 t K8 D31 9 lt M18 Y70 mmr K1 D32 I 21 H H K2 D322 RR rr H H K3 D322 Mz H t K4 D32 Rr H K5 D32 Rr L K6 D32 9 lt M26 L K7 D32 lt M27 L K8 D32 lt M28 App 123 gt RUN Imports a code number Shifts a code number gt Machinery A gt Machinery B gt Machinery C Y70 135 E Ho L Y70 176 rl Y70 217 m CIRCUIT END K1 K3 K4 K5 K6 K7 K8 K1 K3 K4 K5 K6 K7 K8 K1 K3 K4 K5 K6 K7 K8 D33 D33 D33 D33 D33 D33 D33 D33 D34 D34 D34 D34 D34 D34 D34 D34 D35 D35 D35 D35 D35 D35 D35 D35 taf M1 lt M32 Li LJ M33 NTTSHSHSSH HX M34 LI M35 to M86 t M7 M38 Ld H M41 M42 ui ui M43 a M4 M45 to M46 M47 Lu Lu lt M48 M51 Lu HH M52 Pt M3 ui M54 tH M5 M56 uj t M57 t lt lt M88 App 124 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y y I Y Y Y Y Y Y Y Y A gt Machinery D A gt Machinery E gt Machinery F Project name QA 14 Program name MAIN Appendix 5 26 Example of operation program calculating square root of data The data
125. 38 B D Use a keyboard to input the above program or read it from a FD 1 Flowchart of creating comments Set the range of devices on which comments are attached J v a Read out a device on which comments are attached j v Create comments j J To attach comments to other devices Write the project to a floppy disk i y Read out the circuit with the comments and confirm it j v Printout the circuit with comments and devices for which contacts are seo J The above procedure must be taken to designate the device comment range and write it to a CPU 2 Creating comments E 1 Double click J If Device comment r4 DRE Parameter E Device memor E Device init 1 Double click Device comment in the project list 2 COMMENT and MAIN appear Double click 2 Double click 5 Program a Device comm Parameter E Device init COMMENT E Device memory ent Ly 3 Enter a comment Device name ko Device nam Comment Activates trigger P Display erforms reset To next page COMMENT to display the COMMENT screen 3 Click a desired comment area and input desired character strings as shown on the left From previous page EAA Device name Y70 Sil Display i Device name Coment
126. 4 Click the Start monitor button re cee opoe eepo ves A Click o 5 Status of bit device X0 is displayed Monitor sis MANI AEIEERIEN E T the status of X0 in this window xBO 0000 0000 0000 0000 xco 6000 0000 0000 0000 Monitor format Bit amp vvord bal xno 0000 0000 0000 0000 xEO 0000 0000 0000 0000 Display 16bit integer xro ooo0oo 0000 0000 0000 Data format IDEC 5 Monitor screen for XO stoner fo an is displayed Ca To next page From previous page Device Memory Monitor mag 6 Double click a device No you wish to turn on off forcibly In this example XO is double clicked 6 Double click o000 0000 0000 0000 0000 0000 9000 0000 0000 9000 0000 0000 o0o00 0000 0000 o0o00 0000 0000 Device write Ed 7 Set X0 in the Device column of the Bit device column on the Device write window _ m err 8 Click the button Toe torce 9 Reflected mmm 9 The result of the device being turned on is nht 5 Se reflected on the ladder monitoring display Click the Force OFF button on the Device write window to turn the device off 2 Changing word device values In the example operation below word device C current value is monitored and CO is changed to 5 it LADDER LOGIC TEST TOOL Sites Tools Help
127. 4 Y60 6F PB Setting signal X0 moO PB Setting error Start x j i ON duri PB uring Reset or stop x1_J RUN O O Turns on at Co htp l DC12V 100 before oun pu se x3_ Current value display the set value li BCD x 4 digits Turns on at 50 before DC24V the set value Turns on at counter stop Setting value le Maximum setting value 9999 gt i e Set error range Start Turn on X5 Y71 turns on Y74 turns on at the set value Y73 turns on at 50 before the set value Y72 turns on at 100 before the set value App 104 Path name Project name Program name MAIN Xo o 41 SET MO x1 2 ki RST MO Mo 4 BIN K4X20 DO gt K100 DO J Y70 MO Y70 12 Hf MOV DO D1 pr K100 D1 c rMo Do D2 C K50 D2 x5 CO 24 i i lt Y71 yn Y71 28 LI MC NO M3 NO M3 x3 DO 31 co D1 C1 D2 C2 44 EMCR NO x1 45 i Co RST C1 C2 Mo 58 mkm rD co K4Y60 C1 62 m iA C2 64 i lt Y73 co 66 RK 3Q_tP__ v74 CIRCUIT END App 105 H XH H Setting Reading the set value Outputs an error if 100 or less Set value 100 100 before the set value Set value 50 50 before the set value ON during RUN Counter that turns on at stop Counter that turns on at 100 before the set value Counter that turns on at 50 before the set value Counter is rese
128. 6 Click the button on the Qn H Parameter dialog box to terminate the intelligent function switch settings 7 5 4 Setting with GX Configurator LD fiead mode MAIN 65 Step 1 Activate GX Developer and click Tools Intelligent ied Window Hel function utility and Start sequentially Check program Merge data Check parameter Transfer ROM Delete unused comments 1 Click gt Clear all parameters _____ IC memory card Start ladder logic test Set TEL data Customize keys Change display color Options Create start up setting file 2 GX Configurator starts up action rca ocean eb Perform the settings of the A D conversion module as Intelligent function module parameter setting module select follows Start 1 0 No Module type Start I O No 80 onversion Module EA n k k aol Module type A D Conversion Module piae Module model name Q64AD assan zl 3 Click the Initial setting button 2 Set Parameter setting module Intelligent function module parameter Start 1 0 No Module model name Initial setting Auto refresh lt 4 The Initial setting screen appears r Module information reef rps Seales A J In the following example A D conversion enable disable eee 4 Set i settings from CH2 to CH4 are set to Disable Setting iter
129. 8 12 10010 19101 4 0100 1010 1001 1101 iit jo agio 1001 Ln Su A l einen ee Digit number A Ge ee ic i 16 Hexadecimal 4 x16 A x16 9 x16 D x16 4x4096 10x256 9x16 131 19101 e One hex digit is equivalent to 4 bits of binary The Q series PLC uses a symbol H when it expresses numbers in hex notation e The hex system is used to represent the specific numbers of the following devices e Input and output X Y e Input and output of function FX FY e Link relay B e Link register W e Special relay for link SM e Special register for link SW e Link direct devices Jn X Jn Y Jn B Jn SB Jn W Jn SW Binary Coded Decimal BCD e The binary coded decimal is a code in which a string of four binary digits represents a decimal number A decimal number 157 for example is expressed as shown below in BCD 2 1 0 lt Digit number 1 i 5 i 7 Decimal 100 10 1 lt Place digit 0001 0101 0111 BCD 842m 82D 89AM Values allocated o each digit In BCD decimal numbers 0 to the biggest 4 digit number 9999 can be represented by 16 bits The diagram below shows the bit values allocated to each digit of BCD Thousand digits Hundred digits e The BCD is used for the following signals 1 Output signals of digital switches 2 Signals of seven element display digital display
130. 8PUJ OFF Read time not e Turned ON to shorten the search time in the ASUPU A8PUJ required shortened In this case the scan time is extended by 10 Ea search time ON Read time shortened A8UPU and A8PUJ are not used with QCPU QnACPU App 61 Divided Ork Divided Processing Turned on when canvas screen transfer to AD57 S1 AD58 is SM1065 SM711 execution y done by divided processing and turned off at completion of M9066 M9070 SM1070 RTA AA Special Relay List Continued ACPU Special Special Special Relay after Relay for Meaning Details Relay Conversion Modification OFF Empty spaces in communication Communication request registration e Indication of communication enable disable to remote M9081 SM1081 SM714 request eg l terminal modules connected to the MELSECNET MINI S3 registration area ON No empty spaces in master module A2C or A52G BUSY signal communication i i request registration area It is set whether the error checks below are performed or not when the END instruction is processed to set the END OFF Error check executed instruction processing time M3084 SM10834 lt r check ON No error check e Check for ai eae of ee Collation check of I O module e Check of battery bl ti OFF N Turns ON when the detail factor of the operation error is M9091 SM1091 ees P Gror stored into SD1091 Remains ON if the condition is restored ee flag ON Error to normal thereafter The I O module ca
131. 9126 D9127 D9128 D9129 D9130 D9132 Special Register after Conversion D1124 D1131 D1132 Special Register for Modification Special Register List Continued Meaning Annunciat Annunciator detection quantity or detection quantity Annunciator detection numbers Annunciat or detection number App 88 Explanation e When one of FO to 2047 is turned on by SETF J 1 is added to the contents of SD63 When or instruction is executed 1 is subtracted from the contents of SD63 If the INDICATOR RESET switch is provided to the CPU module pressing the switch can execute the same processing Quantity which has been turned on by is stored up to 8 When any of FO to 2047 is turned on by LSETF the annunciator numbers F numbers that are turned on in order are registered into D9125 to D9132 The F number turned off by is erased from any of D9125 to D9132 and the F numbers stored after the erased F number are shifted to the preceding registers By executing instruction the contents of SD64 to SD71 are shifted upward by one If the INDICATOR RESET switch is provided to the CPU module pressing the switch can execute the same processing When there are 8 annunciator detections the 9th one is not stored into SD64 to SD71 even if detected SET SET SET RST SET SET SET SET SET SET SET F50 F25 F99 F25 F15 F70 F65 F38 F110 F151 F210 LEDR 50 50 50 50 50 50 50 50 50 50
132. 9y g i y ng devices ON OFF and changing present values Aa I O system settings Simulates the operation of external devices by simple settings unctions Saves and reads the device memory and buffer memory executed from jhe logic test Function equivalent to Issues a WDT error if a Sequence program is written in such a way that it WDT runs an infinite loop function GX ala Error detail display Simulator menu Displays detailed error information at occurrence of an error function Unsupported instruction Lists the instructions which are not supported by the logic test function list display function GX Simulator if they are included in a sequence program 8 1 Operating Procedure of Logic Test Function GX Simulator This section describes how to use the logic test function GX Simulator for debugging Exercise this function with the program Project name QLLT 1 Confirm that the project is open and then click the m button ax LADDER LOGIC TEST TOOL E 2 The logic test function GX Simulator starts up Start Tools Help Once the logic test function GX Simulator has 2 The logic ee function Started up the parameter and program is l RUN ERROR US GX Simulator starts up i i i i l m P automatically written to the logic test function GX SWITCH Simulator C STOP This is equivalent to the write to PLC fun
133. AAN EAT EEEE eke EAEE AS EETA 4 19 4 7 CJ SCI CALL RET FEND J ssessssssiiiiiissssssssririirrssssssettrrrrrssssssnntrnrrrrssnsestrrrnnrnss 4 23 4 7 1 EA ETEA E Mh te i A IE AE AE ew ae 4 23 4 7 2 CALL P Cal RET RENIN eeen a a eaa Aa aaa e a EE aa Ee iE 4 27 4 7 31 FEND VE EN a i a E e A E EE A E 4 31 ANo Practice QUESTIONS 2 2055 EE E E E A E E E E E E E E A 4 34 4 8 1 Practice Question 1 cA cmt ote less ate cote weet lee ae ete ate eee ae Sees 4 34 4 8 2 Practice Question 2 seta ide ptot ssi touted cewil fated omeitieg tome tbeled nail lee talcased 4 35 4 8 3 Practice Question 3 deacons ielate esate eladthee tae te we ead ten tt ieaasd 4 37 4 8 4 Practice Question 4 sci icassesesseslsenisse bani cee deedi on aslicteieysSnaid stata gemacdienentae bans seetastonts 4 38 CHAPTER 5 BASIC INSTRUCTION Part 2 5 1 to 5 60 5 1 Notation of Numbers Data iseis arserireiiirinian aia iiia iaiia 5 1 5 2 Transfer IMStruction Terana i Tar a D aR E AA E ERA AT NAN AEAEE AT a 5 9 5 2 1 16bit datatransfer urpera a a N eerie 5 9 5 2 2 BCD BIN data conversion iNStrUCtiOn ccccccccsccsseecsetecsetececteeecsetecseecseenscseneees 5 16 5 2 3 BIN BCD data Conversion instruction cccccccccsete cesses etetecetecseteeecsenecseecseteeeeney 5 18 5 2 4 Example of specifying digit for bit devices and data transfer eccecceceeeeeeeeeeneeeeeeeeeeeeeeeeneeenes 5 21 5 2 5 FMOV Batch transfer of the same
134. BIN or DBIN instruction App 56 Corresponding ACPU VS OOO OFF Request for communication wit intelligent device station enabled Request for communication wit intelligent device station disabled PKEY instruction z inetuctioninot ON when PKEY instruction is being executed 5 executed S Instruction Corresponding CPU BUSY signal for CCLink SM730 communication request registration area e Used for determination whether to enable or disable the communication request for the intelligent device station connected with A 1S J61QBT11 S Instruction execution M736 execution in progress x Goes OFF when CR is input or when input character string z Instruction execution flag reaches 32 characters execution Keyboard input execution reception disabled ork S S OFF Instruction not S MSG instruction executed Goes ON when MSG instruction is executed SNe ructiorn New S S instruction Keyboard input NA DE Goes ON when keyboard input is being conducted S Instruction M737 reception flag for PKEY A P Goes OFF when keyboard input has been stored at the reception flag ON Instruction execution execution M738 PID bumpless ORF Forces match Specify whether the set value SV will be matched with the M774 A ON Does not force gt U New processing process value PV in the manual mode match 776 M775 processing during COM ON Performs no link not when only general data is proce
135. CJ LD SCJ LDI ANI OUT P10 LD OUT END XO P10 X1 P10 XO X1 Y70 X3 Y71 Related Practice Question After X1 becomes ON SCJ First scan only LD CJ LD SCJ LDI ANI OUT P10 LD OUT END XO P10 X1 P10 XO x1 Y70 X3 Y71 Practice Question 4 Second scan amp subsequent times 4 7 2 CALL P Call Return Executes a subroutine program MO 0e CALL P10 M5 X2 i 50 a CALL P10 Sequence program P10 Fenn 4 i y 1s7 Fal e The above program is a basic style to execute the subroutine program using the CALL and RET instructions Keep this structure otherwise an error occurs and PLC stops 1 3 A subroutine program consists of the ladders for executing the same data many times in one program Subroutine program 23 0 to 4095 can be used as the Pointer P number Same as the pointer numbers used for the CJ and SCJ instructions e The subroutine program is executed as shown in the following diagrams When not executing CALL P10 When executing CALL P10 0 0 Sequence program Input Condition CALL P10 T CALL P10 Next step after CALL Sequence program FEND P10 Y P10 Subroutine program Sequence program l i f Execution of subroutine program END About Nesting e The CALL P instructions can be nested up to 16 levels Subroutine Subro
136. CPU manufactured by CONTEC CO LTD is applicable e The real number trigonometric function character string and PID control operation are available e The memory cards are compatible e The ROM operation is available by using the CPU built in standard ROM For the use for a small scale system QOOJCPU QO0CPU Q01CPU Features Number of I O device points 2 048 including the devices for remote I O e Number of I O points excluding the I Os for remote 1 0 256 Q00J 1 024 Q00 Q01 e All in one power supply base is available Q00J e Built in serial communication ready for service Q00 Q01 e The ROM operation is available by using the CPU built in standard ROM 2 Q mode CPU and A mode CPU QCPU series has two models the one is Q mode CPU models that utilize the Q series original functions and performance The other is A mode CPU models that especially improve CPU processing ability by using the program hardware of the conventional AnS series This textbook deals with the Q mode models 3 Basic configuration of the PLC system The actual configuration of the PCL is explained below using the building block type MELSEC Q25HCPU QX10 Qx10 Qx10 Qx10 QX41 QX41 o o POWER Q61P A1 MODE RUN ERR I I USER BAT BOOT lt IPULL
137. Cn contact ___J ON time of TTMR n gt D n 0 1 n 1 10 n 2 100 e The 4 points from the bit device designated by D operate as shown below depending on the ON OFF status of the input conditions for the STMR instruction D 0 Off delay timer output D 1 One shot after off timer output D 2 One shot after on timer output D 3 On delay timer output e Rotates a rotary table with n1 divisions from the stop position to the position designated by S 1 by the nearest path e Counts the pulse input from the device designated by S for the duration of time designated by n and stores the count in the device designated by D n1 Hz gt D Output n2 times pu n2 Store 16 times of n lows in the device specified by S to the device specified by D2 in sequence App 23 Number of basic steps Appendix 2 3 Application instructions 1 Logical operation instruction Instruction Processing details symbol Execution condition Category Number of basic steps D A S 0 1 A S2 gt D D 1 D A S 1 S gt D 1 D S1 1 81 A S2 1 2 gt D 1 D DNV S gt D 1 V S2 gt D D 1 D V S 1 S gt D 1 D
138. D fih MELSOFT Anpication 3 Select the MELSOFT Application menu To MELFANSweb Homepage 2 Select p 3 Select EN coer O Put a mouse cursor over the items to select the start 4 Click menu lick Clicking or double clicking the mouse is not required 4 Click the GX Developer menu WELSOFT series GX Developer 5 GX Developer will start up ala a See ot a S 7 Salle Jale FIE ziz aa a ez Ha sl Elezea Jalala taj 30 l mm 2 2 2 Creating a new project oe 1 Click Oj on the tool bar or select Project New Project menu ctn N 2 Click the button with an inverted delta symbol on the PLC series column 3 Click on QCPU Qmode to select it from the drop down menu SFC J MELSAP L CST Select when using ST program FB and structures New Project x 4 Click the button with an inverted delta symbol PLC series on the PLC Type column QCPU Qmode 5 Click on Q02 H to select it from the drop down menu J Setup project name Drive Path JEAMELSEC GPPW Project name Browse Title A Continue on the next page Continued from the previous page 6 Click the button New Project TEE x 7 New project window will open Pom AO A ofe slab lalale ata tel ctl al 2
139. Device memory E Device init To next page ble click 1 Double click Parameter in the project list 2 PLC parameter Network param and Remote pass are displayed Double click PLC parameter From previous page OP ee EEA Ea a K __ s Ma Mend ae a aoe an coro iment ax n er TT mani x O 3 The Qn H Parameter dialog box appears Click the I O assignment tab 4 Click Dev point in the Retentive timer row and input 32 in there 5 After the setting is completed click the button 6 5 Batch Replacement of Devices 6 5 1 Batch replacement of device numbers In the example operation below Y70 to Y9F 48 in total are replaced with Y50 to Y7F 48 in total in batch ies GX Developer Unset project LD Edit mode 1 Click Find Replace cay Replace device Find Replace Convert View Online Diagnostics Tq Find device Ctrl F Find instruction Find step no Find character string Find contact or coil Alt Ctrl F7 Replace instruction Replace character string Change module start address Replace statement note type PET EEN Cross reference window display Cross reference list List of used devices moa Replacedevice eS 2 The Replace device dialog box appears Click
140. E ALES CL OIE The instructions should be handled as 32 bit when programming using the calculation result of the P instruction e g DMOV instruction DBCD instruction 23 The device content specified by is divided by the device content specified by 2 when the input condition is turned on and the result is stored in the device specified by S 2 K600 D20 D21 DO 2000 600 3 200 Quotient Quotient goes to D20 specified by the program next device number Remainder goes to D21 which is the Digits after the decimal point of the operation result are ignored If a bit device is specified as the quotient is stored however the remainder is not saved e Examples when handling negative values are explained below 5 3 1 remainder 2 5 3 1 remainder 2 e Examples when dividing a number by 0 or dividing 0 by a number are explained below E l n Error OPERATION ERROR 0 1 Both quotient and remainder are 0 Operation Practice e Write the program to the CPU and run the program e Turn XO ON and store 2000 BIN value into DO e Turn X2 ON The following operation is performed If the 60000 operation result of and D10 is handles as 16 bit integral number and only D10 is monitored 5536 is displayed To avoid this follow the procedures on the following pages S 2 k30 x bdo D1 D10
141. Ea h 1 1 0 0 4 o 0 1 0 0 1 0 o o 4 F F gg oneee 47 Fpl ae Mabe tk hil ab he F 48 33 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 1 ou r Added by a P instruction 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 F ee ey FF 64 5049 i D10 Number of turned on inputs among X20 to 5B 7 2 Searching ON devices shifting 32 bit data to left DROR DO K1 F F FFFF moe aE SEFA A 1 eral eee Lelo T Dmov keF33 Do D1 DO 16 bits 16 bits DRDR Do K1 D1 DO b31 b30 b29 b28b27 b17b16b15b14b13 b5 b4 b3 b2 b1 bO penean in a taa eea Contents of To b31 BO before Carry flag execution SM700 After loft af afols execution To b31 1 When X0 is turned on the above shift data DO D1 is set After that the data is shifted in right direction by 1 bit at each scan until a turned on bit is detected When a turned on bit is detected shifting stops in that scan SM700 turns on and the accumulated number of shifts equivalent to a device number is displayed 2 Detecting the next turned on bit takes place each time X1 is turned on and the detected device number is displayed in the same manner At the same time 1 is subtracted from the number of turned on bits which was obtained in advance to display the remaining number of turned on bits App 131 APPENDIX 6 Keys of GX Developer The following table lists keys used in GX Developer with their applications 1 Names and applications of keys
142. Enter rece 14 Click the button to display a a Count number of products comment list In this list the input device is Eee shown at the top accompanied below by its following devices Device name Comment 15 Click a desired comment area and input desired character strings as shown on the left C17 3 Saving comments P MELSOFT series GX Vaaa Unset p 1 Click Project Save as menu New LER A Ctrl N Open project 1 Click Jctri o Close project Ctrl S Delete project Verify Copy Edit Data Change PLC type Import file Export file Macro Function Block Printer setup Print Ctrl P Newest file Start new GX Developer session Exit GX Developer Save the project with anew name 2 The Save the project with a new name dialog box appears Click the button 4 Displaying a ladder with comments in GX Developer screens Display de Macro tep synchronization 12 14 Starts Operation M1 0 9S Flicker z y BCD K6 TO Timer 0 6S NO 1 K3 Ti p 0 3S Timer M1 E 0 9S Flicker M2 Counts number of products G2 K4Y 60 Counts number of products 1 Click View Comment menu 2 Comments appear in the ladder screen In addition to device comments a ladder screen can be displayed with
143. Error code 50 OPERATION ERROR e When you want to display the current timer value that exceeds 9 999 use the DBCD instruction The instruction allows you to handle 8 digit data up to 99 999 999 PLC Output Module MELSECNET 10 H Intelligent Internal device Index Direct function system user register module Un G Q Q D Q a 5 av s A 8 S E O Q 7 a A SCHOOL QEX8 Program name MAIN Ladder Example Create the following ladder with GX Developer and write it to the CPU of the demonstration machine to check if the BCD instruction works properly i xO K10 ji 0 E ae co i I I i CBCD CO k2Y40 Ht I I x1 8 ii ERST CO A I i i I Operating Procedure Refer to Section 4 4 Operating Procedure for the detailed procedure of the following operations 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice Check that the current value of CO is displayed on the Y40 to Y47 BCD digital displays when the XO on the control panel is turned ON several times The CO is reset by turning the X1 ON Y5F to YSC Y5B toY58 Y57 to Y54 Y53 to Y50 Y4F to Y4C Y4B to Y48 Y47 to Y44 Y43 to Y40 0 10 Displays the value of CO BCD Didital Display Related Practice Question Practice Question 6 5 2 4 Example of specifying digit for bit devices and data transfer
144. I a R w N t o N oO a o SFC program start OFF Presence absence transition for entire Continuous transition not Continuous transition effective Initial Start Continue e Turns this relay off to clear execution status of SFC program when SFC program is stopped The block which received a start request ON is valid only when Continue is specified in the parameter starts from its initial step e Turn this relay on to make the execution block restart from the e SM902 is not automatically latch specified during continuous transition or when continuous transition is not When no transition ON Preserves SFC device clear OFF Clear device mode ON Preserves device Output during end OFF OFF e Turn this relay off to make all the blocks take 1 step per 1 scan e Turn this relay on to make all the blocks take steps continuously at 1 e For specifying blocks the continuous transition bit takes priority Specification is checked when a block is started When transition is OFF during operation in the continuous transition mode and ON executed e Always ON during operation in the no continuous transition mode Selects the operational outputs of the active steps at the time of a block step execution All coil outputs go OFF when this relay is OFF Coil outputs are preserved when this relay is ON All coil outputs go OFF when this relay is OFF e Coil outputs are preserved when t
145. LC user data of the ATA card in the CSV type binary type lt Example of the usage gt e During boot operation e When used by PLC user data general purpose data e The memory cards are required when the wore amount of the built in program memory NES standard RAM and standard ROM are not BOOT enough for storing the data e The memory cards should be selected according to the size of the program or the type of the data to be stored e The SRAM type RAM card must install the supplied batteries upon purchase The SRAM card data cannot be duplicated unless those batteries are installed e Format the memory card before using it first The Flash card is writable 100 000 times The ATA card is writable 1 000 000 times ARON e I I STOP RUN RESETL CLR lt Reference QCPU System Configuration gt The memory of QCPU consists of the following block configurations Drive numbers of the target memory accessed CPU module __ by peripheral devices Program memory Drive number 0 Standard RAM Drive number 3 Standard ROM Drive number 4 e Program memory e Standard RAM e Standard ROM e Memory card RAM e Memory card ROM Memory card RAM Drive number 1 Memory card ROM Drive number 2 Stores the program that is used by QCPU for operation The prog
146. M700 M500 80 SET M200 RST M600 MOV KO ZO CDMOV K8F1 DO 95 M600 CDMOVP K8F33 DO App 129 l BCP D10 K4Y40 P4 pal gt gt gt gt gt gt gt gt gt gt gt gt H H H H H H H H H H H 7 gt Faulty circuit gt Searches ON devices Designates the head number of a faulty circuit F1 to 0 M100M200 i 103 ksss DROR DO SM700 1H C SET CINC CBCD ZO X1 M700 120 MSR YS PLS M300 125 H RST LK K1 D10 144 H K32 z e rT 150 H K50 Zo J RST C MOVP KO PLS M800 164 4 RST CIRCUIT END 1 Searching ON devices Da Do K1 H M100 Zo H K4Y60 H M300 H M100 H D10 H K4Y40 M600 M200 H K4Y60 H M800 H M400 H 32 bits Searches ON devices shifting 32 bit data to right Searches next ON device Resets when search is finished Free 3231 4321 S before execution kaF1 1 1 1 0 0 1 o 0 0 o 1 o 0 o 1 1 o o oJo 1 1 1 4 1 o olof AO after execution 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ll The total number of bits with 1 is stored in BIN 16 in this example When X2 is turned on the number of turned on bits among F1 to F64 is stored to D10 and displayed App 130 F F Transferred by a MOVP instruction o o oo 4 4 4 1 4 0 o 0 4 g
147. MITSUBISHI TPF Mitsubishi Programmable Logic Controller Training Manual Q series basic course for GX Developer e SAFETY PRECAUTIONS e Always read these instructions before using the exercise When designing the system always read the relevant manuals and give sufficient consideration to safety During the exercise pay full attention to the following points and handle the product correctly EXERCISE PRECAUTIONS lt gt WARNING e Do not touch the terminals while the power is on to prevent electric shock e When opening the safety cover turn off the power or conduct a sufficient check of safety before operation N Caution e Follow the instructor s direction during the exercise e Do not remove the module of the demonstration machine or change wirings without permission Doing so may cause failures malfunctions personal injuries and or a fire e Turn off the power before installing or removing the module Failure to do so may result in malfunctions of the module or electric shock e When the demonstration machine X Y table etc emits abnormal odor sound press Power switch or Emergency switch to turn off e When a problem occurs notify the instructor as soon as possible REVISIONS The textbook number is given on the bottom left of this textbook Jan 2006 SH 080617ENG A Firstediion This textbook confers no industrial property rights or any rights of any other kind nor
148. Moves in right direction 52 gt K2X20 K2Y7242HJ7 H__TYJ1 _T__Y__W_H__ __ _ X m2 gt Moves in left direction M1 M2 56 PLS M4 Starts washing if the patters M4 match 60 m SET M5 H M5 D1 62 T1 gt Washes T1 67 1k C RST M5 H C PLS M6 3 Reads the next washing bath SM400 when current washing completes MOV T1 D3 H CIRCUIT END App 121 Appendix 5 25 Application example of data shift Working materials are conveyed along with their code numbers and the data register of the processing machinery is analyzed to machine the work material according to its code number XO e u Start O O _ x1 aN RUN Stop Q__Q _ Input Output eS Ar K1X20_ module module X2 H SRE fae o Code Code Code Code Code Code Machinery Data register A code number is stored in the data register and the M corresponding to the stored number is activated to perform machining Machinery A Machinery B Machinery C Machinery D Machinery E Machinery F 631 082 35 ox N J v A code number shifts when X2 is turned on A code number is input by K1X20 App 122 53 94 Project name QA 12 Program name MAIN xo x1 ji Yt lt Y70 70 m SM400 Always ON m MOV K1X20 D30 x2 C DSFLP D30 K6 Y70 K1 D30 lt M1 L K2 D30 J lt M2 L K3 D
149. N Read 5 Memory cards Set by When set Corresponding ACPU VS OOO Corresponding CPU Memory card usable OFF Not available sabes ON _ Available flag SM601 Memory card protect NOFF NO protect Goes ON when memory card protect switch is ON S Initial New flag ON Protect SM602 Drive 1 flag OFF Ne diver e Turns ON when the mounted memory card is RAM S Initial ON _ Drive 1 OFF No drive 2 3 SM603 Drive 2 flag ON Drive 2 e Turns ON when the mounted memory card is ROM S Initial SM604 Memory kain tise OR FaNotused Goes ON when memory card is in use S Initial flag ON _Inuse N N i N Memory card OFF Remove insert SM605 remove insert prohibit enabled Goes ON when memory card cannot be inserted or U N fla ON Remove insert removed g prohibited Remove insert e Turned ON by user to enable the removal insertion of Memon card disabled memory card M609 a cnabi Remove insert Turned OFF by the system after the memory card is ve N g enabled removed i N N N N ON when memory card is ready for use by user S Initial New S e Always ON S Initial QCPU SM620 e e e e e i e Memory card B usable OFF Not available Available ON when memory card B is ready for use by user S Initial e e Always ON S Initial e QCPU SM621 e e e e Memory card B protect OFF No protect Protect Goes ON when memory card B protect switch is ON S Initial WwW wW WwW W
150. NSCHOOL 8 19 Program name MAIN 5 4 4 Calculation examples of multiplication division that include decimal points in the case where an arithmetic operation instruction x or is used Example 1 Calculation example to determine a circle s perimeter Numeric value of the digital switch x 3 14 K4X30 Circle ratio Displays integral part and Displays decimal fraction part K8Y50 K2Y48 e Programming method Specify the circle ratio as 314 3 14 x 100 and divide the result by 100 afterward Example 2 Calculation example to handle decimal places division example Numeric value of the digital switch 0 006 K4X30 Displays quotient and Displays remainder K8Y50 K4Y40 e Programming method In order to deal with 0 006 as an integer 6 both the dividend and divisor have to be multiplied 1 000 times XO Xt Orgering Example BINP K4X30 DO hH Digital switch set value is taken into DO calculation P DO K314 D1 H DO x314 gt DZ DI D P D1 K100 D10 D2 D1 100 D11 D10 D13 D12 Quotient Remainder decimal fraction part DBCD D10 K8Y50 Displays integral part quotient BCD D12 K2Y48 Displays decimal fraction part remainder MOV KO K2Y40 x1 xo Ordering Example 2 reering K4x30 D20 Digital switch set value is taken into D20 D21 D20 x 1000 gt D22 D21 D22
151. New a Remote pass E Device init New Copy Delete Rename ange pro lt P Continued on the next page Continued from the previous page Data type Device memory ve r Program type Ladder C SFC CST I MELSAP Data name MAIN Title m MELSOFT series GX Developer i jn 9 Enter RO and click i 3 4 5 6 7 Character strin E a a a a o o a 0 DS 0 0 0 0 0 0 0 0 E a a o o o o a o D24 0 0 0 0 0 0 0 0 D32 o o a a o o 0 of Da0 a a a a o o a al Das a a a o o o a al D56 a a a o o o o of D64 a a a o o o a of D72 o o o o o o a oj p80 0 0 0 0 0 0 0 0 p88 0 0 0 0 o 0 0 0 D96 0 0 ol a o o 0 0 D104 0 0 ol ol o o 0 oj D112 o 0 o o o o o oj D120 a a a a o 0 0 0 Device nane 0 4 A A a i 0 0 Continued on the next page 7 Click the button 8 Click the button 9 The device memory main screen appears Enter RO in the device edit box and click the button 10 Check to see that the device name is changed to R Enter 100 200 300 and 400 in R1 R2 R3 and R4 columns respectively To clear enter 0 Continued from the previous page UT _UTT_TTTTTTTf RJDOOIMC rr 11 Select Online Write to PLC to display the Connecting interface pom lt gt pre mo
152. No 3 CPU is during a stop error Me 4 CPU error OFF No 4 CPU normal Goes OFF when the No 4 CPU is normal including a continuati ON No 4 CPU during error stop error Comes ON when the No 4 CPU is during a stop error M250 Max loaded I O OFF Ignored e When this relay goes from OFF to ON maximum loaded I O number is U New Ot read ON Read read to SD250 Rem By turning this relay ON after setting the head I O number of the replaced I O module to SD251 the I O module can be replaced online with power on Only one module can be replaced for each setting OFF No replacement Turn this relay ON in the test mode of the program or peripheral device SM251 O change flag ON Replacement for an I O module change during RUN or in the test mode of the peripheral device for an I O change during STOP Corresponding ACPU vo O0 Corresponding CPU Do not execute a RUN STOP mode change until I O module change is finished OFF Replacement M252 I O change OK prohibited Goes ON when I O replacement is OK S END Replacement enabled Refresh arrival All stations refresh station command Refresh all stations Effective for the batch refresh also effective for the low speed cyclic U Every Designate whether to receive arrival stations only or to receive all slave END stations processing SM240 SM241 SM242 SM243 SM244 SM245 SM246 SM247 SM254 App 52 Spe
153. OFF Normal change A ON Errors e Switches ON if error occurs during execution of sampling S Status Sampling trace error trace change SM827 Status latch error OFF Normal e Switches ON if error occurs during execution of status S Status ON Errors latch change Swi i i i S Stat 828 Program trace error OFF Normal Switches ON if error occurs during execution of program Status ON Errors trace change 8 Latch area F Set by T T BH n n z fo wo I 3 a D 3 g D fa to a a D 3 S 77 v ior ae oa n n io N are n a ne gq o O o n a 5 3 n N wo gt oO s n gQ oO no a E S Q oO me I Qa Q oO ba OFF Is not after all triggers ON Is after all triggers SM824 After step trace trigger n n n Ss SM93900 Power cut file OFF OFF No power cut file Goes ON if a file being accessed is present when power is S U Status ON Power cut file present disconnected change OFF Keyboard input not registered Goes ON at registration of keyboard input S Instruction Keyboard input OFF if keyboard input is not registered execution registered SM910 RKEY registration flag ON App 58 Corresponding ACPU vo OOO Corresponding CPU M9182 format change Corresponding Corresponding CPU 9 Ato Q QnA conversion correspondences Special relays SM1000 to SM1255 are the relays which corres
154. OFF ON 5 Click the button From previous page amme EES 6 Set content i is displayed Device Number To Ahen specifying the range 10 Click 11 Click OK Cancel 6 The set contents are displayed Note that this can be set by directly typing MO ON on a keyboard a ia a a ee ie ic a a a i ces srl i a i i 7 Enter 1000 10 s in the text box of Time 8 Click the upper F button in the Input No area 9 Set Device Name M and Device Number 0 10 Click the button 11 Click the button 12 The set contents are displayed Note that this can be set by directly typing MO on a keyboard 13 Click the OFF radio button 14 Click the Enable checkbox to enable the settings 8 3 2 Timing chart value input In the example operation below the following simulation is set MO turns ON X0 turns ON 2 s later and turns OFF 4 s later X1 turns ON 6 s later and turns OFF 8 s later ia LADDER LOGIC TEST TOOL E 1 Click Start and then I O System Settings in Geis Tools Help the window of the logic test function GX Monito nction IO System Settings Simulator 2 Double click Timing Chart Input in the I O System Settings tree 3 Click the upper M button in the No area 4 Set Device Name M Device Number 0 and Select ON OFF ON 5 Click the button
155. OUT Device output 2 ser pH sete OOOO aa 2 a et e Generates 1 cycle program pulse at leading edge of input signal Number of basic steps SET RST 4 D D D D e Generates 1 cycle program pulse at trailing edge of input signal e Reversal of device output SET RST PLS PLF FF D D DELTA DELTAP D e Pulse conversion of direct output 1 1 The number of steps may vary depending on the device being used For details of the number of steps refer to a page having the explanation of each instruction 2 2 The execution condition applies only when an annunciator F is in use 4 Shift instructions Instruction Processing details Execution symbol condition oda 52 go E 9 52 Z8 e 1 bit shift of device App 6 Instruction symbol Instruction symbol Program FEND Instruction symbol 5 Master control instructions Processing details Starts master control e Resets master control 6 Termination instructions 7 Other Instructions Processing details e Termination of main program e Termination of sequence program Processing details e Terminates sequence operation after input condition has been met e Sequen
156. PLC is word Import Multiple CPU Parameter Check 5 Click 5 Click the button in the Qn H parameter setting dialogue box The setting is completed CHAPTER 4 SEQUENCE amp BASIC INSTRUCTIONS Part 1 4 1 Instruction symbol Name Master control MCR Master control reset Set Reset PLS Pulse PLF Pulf List of Instructions Described in this Chapter The table below shows the sequence and basic instructions described in this chapter Functions Coil output Starts master control Terminates master control Sets devices Resets devices Pulse Generates tha pulses for one program cycle during an input J Pulf Generates the pulses for one program cycle during an L input J Instruction Drawing devices to be used Designates bit for bit devices and word devices Designates bit for bit devices and word devices n 0 to 14 nesting n 0to 14 nesting Designates bit for bit devices and word devices Designates bit for bit devices and word devices Designates bit for bit devices and word devices Designates bit for bit devices and word devices symbol Name Functions Drawing devices to be used Conditional jump non delay Conditional jump Jumps after one scan Calls a subroutine program Calls a subroutine program pulsing operation n 0 to 4095 pointer number Returns from a
157. PU User s Manual Function Explanation Program Fundamentals ainpow jddns semog d8 9 08 d6 9 06 AV 9 OV dd 9 0g dd 9 09 dd 9 0A dA 9 03 dd 9 04 mj foe o N oO With two extension base units AOL 0 OOL ALL 0 OLL AZL 0 OZ dEl 0 OEL dyl 0 Opl ajnpow Ajddns Jamog Extension base unit Q68B 21 22 23 24 25 With three extension base units ainpow Ajddns semog AGL 0 OSL AQL 0 O9L ALL 0 OLL A8b 0 OSL AGL 0 O6L AVL 9 OVI ddl 9 0g ADL 9 094 The slots of the extension base unit are also assigned in ascending order in units of 16 points e The head I O numbers of the extension bases follow the last number of the main base or the one of the previous extension base e It is possible to assign 0 as the I O number to the vacant slot or to the area with no slot The number of the extension base units that can be extended is as follows CPU type Number of stages Including the ones connected via GOT bus High Perormancemedsl SSCS Basio model QO0JCPU GUOCPU QOIGPU 1 12 1 5 System Configuration and I O Numbers of Demonstration Machine CPU module Output module Trl Base unit Q30B Q61P A1 RS 232 cable acPu QCPU ax ay a64 One Two 42 42P AD station station 64 64 16 points Peripheral d
158. QCPU Q mode or QnA series gt Monitor status x 0300ms RUN 1 2 3 1 Scan time Shows the maximum scan time of the monitored PLC CPU The Q series device will display the scan time in 0 1 ms increments 2 PLC CPU condition Shows the operating condition of the PLC CPU 3 Monitor execution status Flashes while the monitoring is active 2 The statuses of ladder are indicated as shown below 1 Display of contacts when X0 OFF Itoo Normally open Normally close Not conducting Conducting Display of contacts when X0 ON XO XO Normally open Normally close Conducting Not conducting 2 Display of coil output instruction contact equivalent comparison instruction and coil equivalent instruction Not executed conditions not established a gt Executed conditions established d D Available contact equivalent comparison and coil equivalent instructions are SET RST PLS PLF SFT SFTP MC FF DELTA and DELTAP The monitor of RST instruction shows on off status of the device to be reset The device to be resetis off E JF The device to be reset is on By alternating to list mode the ladder program can be displayed in list form In list mode on off status is shown as described below 1 Bit device Shows the device name and the monitor status under the row where the list instruction is displayed Off XO OFF On X0 ON
159. S14 1 S1 S2 1 S2 Quotient D 1 D Remainder D 3 D 2 App 15 Processing details e D 1 D S 1 S D 1 D e S1 1 81 S2 1 S2 gt D 1 D e D 1 D S 1 S D 1 D e S1 1 S1 S2 1 S2 D 1 D e S1 1 51 S2 1 S2 gt D 1 D Execution condition Number of basic steps e 1 1 S1 S2 1 S2 Quotient D 1 D e Links character string designated with S to character string designated with D and stores the result from D onward e Links character string designated with S2 to character string designated with S1 and stores the result from D onward e Adds data of n points from S1 and data of n points from S2 in batch e Subtracts data of n points from S1 and data of n points from S2 in batch App 16 Instruction F Execution Processing details a symbol condition Category Number of basic steps D 1 D 1 D 1 D e D 1 D 1 D 1 D 1 The number of steps may vary depending on the device and type of CPU module being used Number of Steps QCPU QnACPU e Word device Internal device e
160. Section 6 3 or in Chapter 7 In the case where two CPUs are installed lt Reasons gt 1 Only the CPU No 1 drives the CPU program 2 No changes are made to the parameter items that correspond to the multiple CPU system The number of CPUs refresh I O assignment setting 2 7 Monitoring the Condition of the Ladder Program 1 Suppose that the ladder program sequence program has been written into the PLC to proceed to the next step 2 Reset with the RESET L CLR switch on the 2 Set the switch to RUN CPU and set the RUN STOP switch to RUN 3 Click on the tool bar or click the Online SEY HIA 4H Of Monitor Monitor mode menu FS sF5 F sF6 F F 4 Selecting another menu ends the monitor i al mode Operation Practice 1 Confirm that the LED indicator Y70 lights up by turning the snap switch X2 on and that the indicator remains lit after the snap switch is turned off 2 Confirm that the LED indicator Y70 turns off by pressing push button XO and that the indicator does not light up when releasing the button 3 Turn the snap switch X3 on to turn on LED indicator Y71 1 In monitor mode the monitor status dialogue box shown below will appear regardless of whether the monitoring is activated or not lt
161. Setting value Connect Coil Device comment Reference program MAIN Re Click this button to show the Serre operation result of D10 and D11 Stop monitor Register devices Delete the device Delete all devices Device test Close ANSCHOOL QEX12 Program name MAIN Ladder Example Create the ladder chart shown below with GX Developer write it to the demonstration machine and make sure that instructions can be performed 0 1 C BINP K4X30 DO 1 BINP K4X20 D1 PP DO D1 D10 orf DBCDP D10 K8Y 40 I I I I I I I I I l I x1 13 pp Bi K4Xx30 DO I I I I I I I I I I I I I L BINP K4X20 D1 C P DO D1 D20 C BCDP D20 K4Y50 OOOOO BCP D21 K4Y40 Operating Procedure The following procedures are the same as the Operating Procedure described in Section 4 4 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice 1 When XO is turned ON the data of X20 to 2F is multiplied by that of X30 to 3F and the result is output to Y40 to 5F 2 The data of X20 to 2F is divided by that of X30 to 3F when X1 is turned ON Its quotient is output to Y50 to 5F and the remainder is output to Y40 to 4F 0 BINP K4X30 DO BINP K4xX20 D1 F Y P DO D1 6 DBCDP D10 x1 i 13H BINP K4x30 DO ec BINP K4xX20 D1 7 L 3
162. TELLIGENT FUNCTION MODULES 7 1 Intelligent Function Module 1 Intelligent function module type On PLC CPUs hereinafter referred to as QCPUs some functions are not supported or are limited in use Intelligent function modules support those functions instead of QCPUs Therefore users need to select an intelligent function module that is appropriate for the purpose involved QCPUs are compatible with QCPU compatible intelligent function modules and AnS compatible special function modules The following list shows examples of the intelligent function modules Table 7 1 Example of intelligent function module Number of VO occupied points Input module that converts Analog digital conversion 0 to 20mA 0 to 4000 in standard module 16 points resolution mode Q64AD 0 to 10V 0 to 4000 in standard resolution mode Module Functions current consumption Output module that converts Digital analog conversion 0 to 4000 00 to 20mA in standard module 16 points resolution mode Q62DA 0 to 4000 0 to 10V in standard resolution mode 2 Using with CPUs An intelligent function module can be installed on any I O slots on a main base unit and extension base unit Intelligent function module Used No Power 16 points of X Y80 to 8F 16 points of X Y90 to 9F supply To use AnS series I O modules or special function modules install them on QA1S65B or QA168B extension base unit Main base unit QA1S6 OB Extens
163. V devices S Initial Stores the number of points currently set for S devices e Stores the number of points currently set for T devices Stores the number of points currently set for ST devices Stores the number of points currently set for G devices Stores the number of points currently set for D devices e Stores the number of points currently set for W devices e Stores the number of points currently set for SW devices Reserves the designated time for communication processing with GX Developer or other units The greater the value is designated the shorter the response time for communication with other devices GX Developer serial communication units becomes Setting range 1 to 100 ms If the designated value is out of the range above it is assumed to no setting The scan time becomes longer by the designated time New QCPU remote Number of modules Numerot modules mounted on hemst of modules mounted Numerot modules mounted on hemst Ethernet S Initial New mounted 1 0 No e Indicates Ethernet I O No of the 1st module mounted Indicates Ethernet network No of the 1st module mounted e Indicates Ethernet group No of the 1st module mounted e Indicates Ethernet station No of the 1st module mounted e Vacant Vacant With QCPU the Ethernet IP address of the 1st module is Cored in buffer memor e Vacant Vacant With QCPU the Ethernet error code of the ist module is ad with the ERRORRD instruction
164. Year Month D9026 D9027 D9028 D9035 D9036 D9037 D9038 D9039 Time Time i data Extensio SD1035 SD1036 for designati on of device SD1037 number SD1038 SD1039 n file register Extensio n file register LED display priority ranking Time data day hour Time data minute second Time data day of week Use block No Device number when individual devices from extension file register are directly accessed Priorities 1 to 4 Priorities 5 to 7 Stores the day and hour in BCD B15 eee B12 B11 B8 B7 B4B3 Bo 9 31st 10 o clock _ __ OY vw Day Hour Stores the minute and second in BCD B15 B12B11 B8 B7 B4 B3 Bo g 35 48 or Min Stores the day of the week in BCD Sec e g Friday B15 B12B11 0005 B8 B7 B4 B3 BO Day of week 0 must be set Stores the block No of the extension file register being used in BCD code e Designate the device number for the extension file register for direct read and write in 2 words at SD1036 and SD1037 in BIN data Use consecutive numbers beginning with RO of block No 1 to designate device numbers Extension file register 0 to Block No 1 area 16383 16384 Block No 2 areaa D1036 SD1037 Device No BIN Sets priority of ERROR LEDs which illuminate or flicker to indicate errors with error code number
165. ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K8 and which use no index 4 modification Constant No limitations 2 The subset is effective only with QCPU App 25 2 Rotation instructions Instruction Execution Catego Processing details tal gory 9 condition Number of basic steps bO SM700 bO SM700 gt l Rotates n bits to the right SM700 b15 D bO 4 A Rotates n bits to the left SM700 b15 D bO 4 a Rotates n bits to the left D 1 D b31 to b16 b15to b0 SM700 Ht Rotates n bits to the right D 1 D b31 to b16 b15tob0 SM700 gt Rotates n bits to the right D 1 D SM700 b31 to b16 b15 to bO Rotates n bits to the left D 1 D SM700 b31 to b16 b15 to bO 4 a Rotates n bits to the left App 26 3 Shift instructions Category instueden Processing details Execution symbol 9 condition Number of basic steps
166. aeseaeseaeeaeeeaes 6 9 6 4 Using Retentive Timers aineensa inai ia A AR AR AAAA 6 11 6 5 Batch Replacement of DeVICES cecccceecceeeeceeeeeeeseeeeeeeeceneeseaeeceaeeseaeeesaceeseaeeseaeeecaeescaeeesaaesseeeeeaeeteaees 6 13 6 5 1 Batch replacement of device NUMDETS cccecceeeeeceeeeeeseceeseneeseaeeecaeeecaeeesneeseaeeteaeeesueeesieeesenenaas 6 13 6 5 2 Batch switching of specified devices between normally open and normally close ceeeeee 6 14 6 6 Write During RUN nune nier R A A r a ar a ae 6 15 6 7 Registering Devi eS so einiino iadi a aiei aia ieii eiai aii 6 16 6 9 Creating Comnena soatni a a aan a AAE AA E AA a A 6 18 CHAPTER 7 PROGRAMMING INTELLIGENT FUNCTION MODULES 7 1 to 7 22 Ailntelligent Function Module s it i c ceived nie fhe an iia edie aes 7 1 7 2 Data Communication between Intelligent Function Modules and CPUS ccecceceeeeeceeeeeeeeeeeeeeneeaes 7 2 E21 VOsignals to CPUS 2 fhich desing ange sdehidenicdhdeviedashenicchadeviahdevindial dad oa endidvisin RENE 7 2 7 2 2 Data communication with intelligent function modules 0 ee eee eee cece eeeeteeeteeeteeeteetaeetieeteetieetaeees 7 3 7 3 Communicating with Intelligent Function Modules 0 0 00 ececeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeseeeeeeeseeeseaeseneeeaeeeneeaes 7 4 7 3 1 Communication methods with intelligent function MOCUIES ee eee eeeeeeeeeteeeeeeteeeteeeteeetieeteetaeees 7 4 7 3 2 Using GX Configurator for COMMUNICATION
167. arts trailing edge pulse operation e Leading edge pulse series connection e Trailing edge pulse series connection e Leading edge pulse parallel connection e Trailing edge pulse parallel connection 1 1 The number of steps may vary depending on the device being used 2 2 The number of steps may vary depending on the device and type of CPU module being used Device Number of Steps vi QCPU QnACPU Internal device file register RO to R32767 Direct access input DX Devices other than above 3 3 The subset is effective only with QCPU App 4 2 Connection instructions Instruction Execution Processing details H symbol condition Number of basic steps AND between logical blocks Series connection between logical blocks e OR between logical blocks Series connection between logical blocks e Memory storage of operation results e Read of operation results stored with MPS instruction Read and reset of operation results stored with MPS instruction MEP e Conversion of operation result to leading edge pulse e Conversion of operation result to trailing edge Connection pulse e Conversion of operation result to leading edge pulse Stored at Vn e Conversion of operation result to trailing edge pulse Stored at Vn App 5 3 Output instructions neueton Symbol Processing details Execution symbol condition
168. atus Always 1 STOP e The CPU switch status is stored in the following format B15 B12 B11 B8 B7 i B4 B3 Eee 3 Vacant 2 1 CPU switch status 0 RUN 1 STOP 2 L CLR 2 Memory card Always OFF switch 3 DIP switch B8 through BC correspond to SW1 through SW5 of system setting switch 1 SD200 Status of Status of 0 OFF 1 ON switch CPU switch BD through BF are vacant The CPU switch status is stored in the following format B15 B12B11 B8 B7 B4 B3 lt gt lt pera 3 Vacant 2 1 CPU switch key 0 RUN status 1 STOP 2 L CLR 2 Memory card B4 corresponds to card A switch and B5 corresponds to card B 0 OFF 1 ON 3 DIP switch B8 through B12 correspond to SW1 through SW5 of system setting switch 1 B14 through B15 correspond to SW1 through SW2 of system setting switch 2 0 OFF 1 ON S Every END processing S Every END processing e The following bit patterns are used to store the statuses of the LEDs on the CPU module O is off 1 is on and 2 is flicker Bip__B12811___B6BY S Status 5 BOOT change 6 Vacant 7 Vacant 8 MODE Mode bit patter 0 OFF 1 Green 2 Orange e The following bit patterns are used to store the statuses of the LEDs on the CPU module O is off 1 is on and 2 is flicker 15 B12B11 B8 B7 B4 B3 L L i L gt 4 gt 4 gt 4 gt 4 gt 4 8 7 5 4 3 2 1 RUN 5 BOOT Status of LED Status CPU LED
169. ber of ON to turn Y71 OFF after counting ON for six times 4 5 Pulse Turns the specified device ON for one scan at rising edge of an input condition Pulf Turns the specified device ON for one scan at falling edge of an input condition Path name A SCHOOL Project name QB 5 Program name MAIN XO fs 0 7 PLS M5 x1 Via 3 j PLF MO z 13 The PLS instruction turns the specified device ON only for one scan at rising edge of the PLS command Timing Chart f Loo M5 D A he One scan h One scan 23 The PLF instruction turns the specified device ON only for one scan at falling edge of the PLF command Timing Chart a MO One scan one scan Application e The instructions can be used in the standby program that waits for the operation condition Operation Trigger XO H PLS MO o MO _ SET M5 Timing Chart X0 Trigger MO M5 Y70 Operation Ps _ Time to wait for the condition Operation Condition Applicable Device Intelligent Internal Device File MELSECNET 10 f Index function system user register H Direct Jn register module Un G Constant Basic number of steps Word e The instructions can be used for the detection program that detects passage of moving objects After detecting the passage of a produc
170. ber of basic steps 2 Arithmetic operation instruction Execution condition Instruction Category symbol Processing details Number of basic steps e D S gt D is e S1 S2 D is iw iw e S1 S2 D e D 1 D S 1 S gt D 1 D o e S1 1 51 S52 1 52 gt D 1 D iw o e D 1 D S 1 S D 1 D e S1 1 S1 S2 1 S2 D 1 D iw iw S1 2 gt D 1 D o o S1 S2 Quotient D Remainder D 1 iw iw S141 81 x S2 1 S2 D 3 D 2 D 1 D iw iw e S1 1 S1 S2 1 S2 o U iw iw ejejeoe jeoejo jojo ojo jojoj o Quotient D 1 D Remainder D 3 D 2 App 13 1 1 The number of steps may vary depending on the device and type of CPU module being used Number of Steps Device P QCPU QnACPU e Word device Internal device except for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K8 and which use no index 3 modification No limitations Devices other than above 3 2 2 The number of steps may vary depending on the device and type of CPU modu
171. but provide faster processing speed App 9 Instruction Category symbol E gt Real number data E gt comparisons Processing details e Conductive status when S1 1 S1 S2 1 S2 e Non conductive status when S1 1 S1 S2 1 S2 e Conductive status when S1 1 S1 S2 1 S2 e Non conductive status when S1 1 S1 S2 1 S2 e Conductive status when S1 1 S1 gt S2 1 S2 e Non conductive status when S1 1 S1 lt S2 1 S2 e Conductive status when S1 1 S1 lt S2 1 S2 e Non conductive status when S1 1 S1 gt S2 1 S2 e Conductive status when S1 1 S1 lt S2 1 S2 e Non conductive status when S1 1 S1 2 S2 1 S2 e Conductive status when S1 1 S1 2 S2 1 S2 e Non conductive status when S1 1 S1 lt S2 1 S2 App 10 Execution condition sdajs oiseq Jo JOqUNN Instruction Execution Processing details H symbol condition Category Number of basic steps Compares character string S1 and character string S2 one character at a time e Conductive status when character string S1 character string S2 e Non Conductive status
172. by S to a 4 digit hexadecimal ASCII value and stores it at word devices following the word device number designated by D e Converts 2 word BIN value designated by S to a 8 digit hexadecimal ASCII value and stores it at word devices following the word device number designated by D e Converts 1 word BCD value designated by S to a 4 digit decimal ASCII value and stores it at word devices following the word device number designated by D e Converts 2 word BCD value designated by S to an 8 digit decimal ASCII value and stores it at word devices following the word device number designated by D e Converts a 5 digit decimal ASCII value designated by S to 1 word BIN value and stores it at a word device number designated by D e Converts a 10 digit decimal ASCII value designated by S to 2 word BIN value and stores it at a word device number designated by D e Converts a 4 digit hexadecimal ASCII value designated by S to 1 word BIN value and stores it at a word device number designated by D e Converts an 8 digit hexadecimal ASCII value designated by S to 2 word BIN value and stores it at a word device number designated by D App 35 Number of basic steps Instruction symbol DABCD S D DABCDP S D S D DDABCD Category DDABCDP D COMRD S D COMRDP D LENP D D D D D LEN S S S
173. by digital switches is provided in Appendix 85 Applicable Device MELSECNET 10 H Intelligent Internal device Index Direct function system user register module Constant Basic number of steps Bt Word R Bt Word CET CECEO A SCHOOL QB 13 Program name MAIN 5 2 3 BCD P BIN BCD data conversion instruction e When the input condition is activated data in the device designated as is automatically judged as a BIN code and converted into BCD to be transferred to the device designated as 77 31638481924096 20484024 612 256 128 64 32 16 ORORO E cl ae a gt Must be set to 0 Ji BCD conversion 60004000 20004000 600 400 200 00 60 40 20 0 8 4 2 iD ene DOOR Oooo Thousand digits Hundred digits Ten digits Unit digits e As the ordinary digital displays display numbers using BCD code the BCD instruction can be used to display data of the PLC current timer and counter values operation results 4 p z stt 8 S B N Net m 1024 r AOE S COL OOOO 128 32 0 0 16 8 4 1 1213 lt 8 4 1 8 42 8 4 Q cy m m H l H Digital display lt gt lt gt lt 2 Allowable Range with BCD Instruction _ e The allowable range of data to be displayed by the BCD instruction to be converted from BIN to BCD is between 0 and 9999 Any data that falls outside the range cause an error
174. c steps n number of file name characters 2 indicates a step decimal fraction is rounded up App 43 Category WDT reset Timing clock Instruction symbol WDT w 4 U DUTY TE a rs J O ez w 18 Other instructions WDTP DUTY n1 n2 D ZRRDB n D ZRRDBP n D nis ZRWRB ZRWRBP ADRSET ADRSETP m m N N N N D a U U T U O 2 O O S op V U I 5 v 5 I ZRWRBP n S ADRSET S D ADRSETP S D KEY s n D1 D2 H EROMWR EROMWRP S D1 n D2 Execution Processing details fonciion e Resets watchdog timer during sequence program D Loo P P n1 scan n2 scan Pit SM420 to SM424 SM430 to SM434 Lower 8 bits Higher 8 bits Lower 8 bits Higher 8 bits 8 bits Lower 8 bits Higher 8 bits Lower 8 bits 8 bits D Indirect address of designated device Device name e Takes in ASCII data for 8 points of input module designated by S converts to hexadecimal value following device number designated by D1 and stores e Saves the contents of index registers Z0 to Z15 to a location starting from the device designated by D e Reads the data stored in the
175. can time he execution time for each scanning of the low speed program he area to store the QCPUs failure history he number of devices according to the systems he latch range starting last No of devices cleared by the latch key or remote latch clear operation he latch range starting last No of devices cleared by the latch key or remote latch clear operation he device range starting last No of devices used at local device he file name and execution type execution condition of the program when writing multiple programs for QCPU Sets whether or not to clear the program memory at boot he type data name and transfer from drive of the program file that operate at boot he execution of automatic refresh on the standard ROM he start mode condition of the SFC program when the program is in use and sets the output mode when the block is at a stop M WOT setting ceeeeeceeeeeseeeeeeeeeeee Sets PLC t Operation mode in error condition Sets ErrorichecKivno eats one Sets Parameter PLC RAS Setting t Constant scan seseseeseeeeeeeseeeseees Low speed program execution time Sets L Failure history cceeeeseeeeseereeeeees Sets m No of devices m Latch 1 start las 7 7 clear Device Setting Latch 2 start last Sets clear Local device start last Sets Prograrm Sottni i 2 2 c03 cscohpeces ae ccs A AN EAEAN RA Sets Boot Option 0 ececeeeeeeee
176. ce The following shows an example of using the clock function with a program Projectname OEXI3 e Writing clock data o mi C MOVP H0104 SD210 H 2004 04 April eu M al MOVP H0110 SD211 Date st Hour 110 o clock De AA EMA w N C MOVP H4020 SD212 Minute 40 Second 20 Tn eee p a a teas E MOVP H2000 SD213 H Year 2001 0 is Sunday etl a PLS SM210 Clock data set request pawmi Settable items are items ini _ Set time a few minutes ahead of actual time and then write it to the PLC When actual time has reached the set time turn on the input switch X7 Then the clock is activated e Reading clock data X7 11 Wt lt SM213 Clock data read request SM400 MOV SD212 K4Y40 Minute and second Turn off X07 to read time 6 2 Test Function at Online Exercise this function with the program Projectname QEX14 As preparation follow the procedure below BCD TO IT far ya Y74 X6 E i 23 Y70 K1500 TO 0 K4Y50 H 0 Y74 Y 7 K30 T1 yy 0 END H For details on the operation method refer to Chapter 2 i ee E A a aAa ee Ne en eee ee 7 1 I I I 1 Read the project from the user floppy disk FD using GX Developer 2 Write the parameter and program of the read project to the CPU PLC The CPU must be at stop to do this 3 Set GX Developer to the monitor mode 4 Confirm a program displayed in t
177. ce program is executed by placing the RUN STOP key switch back in the RUN position Ignored For program deletion or space e Ignored To change pages during Ignored printouts e Ignored Subsequent programs will be controlled from step 0 of page n App 7 Execution condition Execution condition Execution condition Number of basic steps Number of basic steps Number of basic steps Appendix 2 2 Basic instructions 1 Comparison operation instruction Instruction Execution Category symbol Processing details condition Number of basic steps e Conductive status when S1 S2 e Non conductive status when S1 S2 e Conductive status when S1 S2 e Non conductive status when S1 S2 e Conductive status when S1 gt S2 e Non conductive status when S1 lt S2 16 bit data comparisons e Conductive status when S1 lt S2 e Non conductive status when S1 gt S2 e Conductive status when S1 lt S2 e Non conductive status when S1 2 S2 e Conductive status when S1 2 S2 e Non conductive status when S1 lt S2 App 8 Instruction Processing details Execution Category symbol conditi
178. cial M all OFF change PI t Slag M812 ae ances wey si S ON when program trace execution is underway Program trace trigger goes ON when this goes from OFF sis tat OFF gt ON Start to ON eae Identical to PTRA instruction execution status change Aft ti i S Stat M814 Cine ene Sees aner trigger Goes ON after program trace trigger Status trigger ON After trigger change Program trace OFF Not completed S Status ON End Goes ON at completion of program trace change y OFF Not ready x 7 M820 Step trace preparation ON READY Goes ON after step trace is registered and ready OFF Suspend When this goes ON step trace is started S Status ON Start e Suspended when OFF Related special M all OFF change Step trace execution OFF Suspend Goes ON when step trace execution is underway S Status M822 A underway ON Stari Goes OFF at completion or suspension change OFF Not after trigger Goes ON if even 1 block within the step trace being S Status a F executed is triggered ON Isane firsttrigger j Goes OFF when step trace is started change Goes ON if all blocks within the step trace being executed S Status are triggered h Goes OFF when step trace is started change OFF Not completed Goes ON at step trace completion S Status M825 SIRE Hace completed ON End e Goes OFF when step trace is started change S Stat Trace error Switches ON if error occurs during execution of trace Staus
179. cial Relay List Continued Explanation Goes ON for standby network If no designation has been made concerning active or standby active S Initial New is assumed U New Corresponding ACPU vel Corresponding CPU SM255 MELSECNET 10 Zz 9 M256 module 1 OFF Reads e For refresh from link to CPU module B W etc designate whether to information ON Does not read read from the link module OFF Writes e For refresh from CPU module to link B W etc designate whether to SM257 U write to the link module Goes ON for standby network New OFF Operative network 3 A 7 ON Standby network If no designation has been made concerning active or standby active S Initial New is assumed i e For refresh from link to CPU module B W etc designate whether to U New ON Does not read read from the link module OFF Writes e For refresh from CPU module to link B W etc designate whether to 5 4 U New write to the link module ON Does not write MELSECNET 10 module 2 information ON Does not write INA S Initial New network concerning active or standby active is assumed OFF Reads For refresh from link to CPU module B W etc designate whether to ON Does not read read from the link module ON Does not write write to the link module Goes ON for standby network If no designation has been made concerning active or standby active S Initial New is assumed
180. cimal To monitor the number by peripheral with blown devices perform monitor operation given in hexadecimal fuse Cleared when all contents of SD1100 to SD1107 are reset to 0 e Fuse blow check is executed also to the output modules of Corresponding CPU remote I O stations e Stores the module numbers corresponding to setting switch numbers or base slot numbers when fuse blow occurred A0J2 I O module Extension base unit Slot No Setting Peas Stored i of base switch data Numter of module in a Dg with blown fuse ee For the remote I O station the value of module I O No 10H 1 is stored App 82 Special Register List Continued ACPU Special Special Special Register after Register for Meaning Explanation Register Conversion Modification D9002 SD1002 D9004 SD1004 D9005 SD1005 Corresponding CPU If I O modules of which data are different from data entered are detected when the power is turned on the first O number of the vO VO module lowest number unit among the detected units is stored in verification hexadecimal Storing method is the same as that of SD1000 To error monitor the number by peripheral devices perform monitor module operation given in hexadecimal NEMO number Cleared when all contents of SD1116 to SD1123 are reset to 0 VO module verify check is executed also to the modules of remote I O stations Error status of the MINI S3 link detected on loaded MELSECNET MINI S3 master mod
181. ck ladder cccccceeecceeeeeeeeeeeeeeeeececeeeeaeeceaeeecaeeseacesseaeeseaeesaaeescaeeesaeeseaeeseaeeeeessieeees App 99 Appendix 5 11 Starting stardelta operation of electrical MAChINETY ccccceeeeeeeeeeeeeeeeeeeeeeeteaees App 100 Appendix 5 12 Displaying elapsed time and outputting before time limit c ceeeceeeeeeeeeeeeetees App 101 Appendix 5 13 Retentive timer rsa cne a a a a a a a a ARRE App 102 Appendix 5 14 Switching timer set value externally ccc ccceccceeeceeeeeeeeeeeeeeaeeeeaeeeseneeteneeesneeseneeetans App 103 Appendix 5 15 Setting counters externally cc ccccccceseeceeeeeeeeeeeeeeeeeeeceeseneeseneeseaeeseaeeesneeseeesseetaees App 104 Appendix 5 16 Measuring operation time ccccececeeeeeceeeeeeeeeeeeeaeeeeeeeeseaeesaeeecaeessaeeesaceeseaeesseeteaes App 106 Appendix 5 17 Measuring Cycle time cccecccceseceeeceeeeceeeeneeeaeeecaeeeeaeeesaceeseaeeseaeeseasesseeeseaeesseenaees App 106 Appendix 5 18 Application example of D CML P ccesccceeceeeeeeeseeeeeeeeeeeaeeeeaeeesaeeseaeeeseeesneeetans App 107 Appendix 5 19 Program showing divided value of 4 digit BIN value to 4 places of decimals App 108 Appendix 5 20 Carriage line control ccccccceceeeeeeeeeceeeeceeteneeeaeeeeaeeeeaceeseaeeseaeeecaeeeseeesaeeeeeaeesseeesaees App 111 Appendix 5 21 Starting compressors in order using ring COUNTELS ccceeceeeeeeeeeeeeeeeeeeeeeten
182. code B15 to B8 _ B7 to BO e g 25th 10 o clock Day 1 to 31 Hour 0 to 23 H2510 e The minute and second that SDO data was updated is stored as BCD 2 digit code B15 to B8 _ B7 to BO e g 35 48 Min 1 to 59 Sec 0 to 59 H3548 Category codes which help indicate what type of error information is being stored in the common information areas SD5 through SD15 and the individual information areas SD16 through SD26 are stored here B15 to B8 B7 to BO Individual info category code Common info category code The common information category codes store the following codes 0 No error 1 Unit module No PLC No 2 File name Drive name 3 Time value set 4 Program error location 5 Switch cause for Q4AR only For a multiple CPU system the module number or PLC number is stored depending on the error that occurred Refer to the corresponding error code for which number has been stored PLC No 1 1 PLC No 2 2 PLC No 3 3 PLC No 4 4 e The individual information category codes store the following codes 0 No error Vacancy File name Drive name Time value actually measured Program error location Parameter number Annunciator F number CHK instruction malfunction number App 65 Special Register List Continued sn F Corresponding Corresponding Number Meaning Explanation ACPU CPU DOCO Common information corresponding to the error code
183. code D9008 D1008 When one of FO to 2047 is turned on by or SETF the F number which has been detected earliest among the F numbers which have turned on is stored in BIN code SD62 can be cleared by or instruction If F number another F number has been detected clearing of SD62 causes Annuncia at which the next number to be stored in SD62 D9009 SD1009 tor external When _one of FO to 2047 is turned on by or detection failure has SETF the F number which has been detected earliest occurred among the F numbers which have turned on is stored in BIN code SD62 can be cleared by executing RSTF or LEDR instruction or moving INDICATOR RESET switch on CPU module front to ON position If another F number has been detected clearing of SD62 causes the next number to be stored in SD62 nee Sepe at When operation error has occurred during execution of D9010 SD1010 which application instruction the step number at which the error has operation occurred is stored in BIN code Thereafter each time operation FN error has error occurs the contents of SD1010 are renewed occurred Step When operation error has occurred during execution of number at application instruction the step number at which the error has SD1011 which l occurred is stored in BIN code Since the step number is stored operation into SD1011 when SM1011 turns from OFF to ON the data of error has D1011 is not updated unless SM1011 is cleared by a user occur
184. contact STOP status Goes ON at STOP status psa SM204 PAUSE contact PAUSE status Goes ON at PAUSE status ay 20s STEP RUN contact STEP RUN status Goes ON at STEP RUN status e PAUSE enable coil OFF PAUSE disabled _ e If this relay is ON when the remote PAUSE contact goes ON the ON PAUSE enabled PAUSE state is entered S208 Device test request OFT Davee testnotyet t a t executed Comes ON when the device test mode is executed on GX Developer R t remote acceptance status oN Device test executed Ses i e When this relay goes from OFF to ON and after END instruction faa los data set OFF Ignored execution of subsequent scan clock data stored in SD210 to SD213 U M9025 suero os ON Set request are written to the CPU module OFF No error ON when error is generated in clock data SD210 to SD213 value ee ees cal error and OFF if no error is detected M9026 OFF Ignored Displays clock data as month day hour minute and second at the ocr ote SM212 Time data display ON 3 oe la LED display at front of CPU module Enabled only for Q3ACPU and U M9027 Q4A eine Q4ACPU ocr ote Clock data read OFF Ignored e When this relay is ON clock data is read to SD210 through SD213 as Ort SM213 U M9028 request ON Read request BCD values Rem OFF No 1 CPU reset Goes OFF when reset of the No 1 CPU is canceled No 1 CPU rese cancel e Comes ON when the No 1 CPU is resetting including the case where flag ON No 1 CPU he PLC is r
185. cters are allowed for the title If space s is included in the project path or the project name GX Developer will not start up properly by double clicking GPPW gpj gps on the Explorer To open such project start GX Developer first and open the project by selecting the Project Open project menu 2 9 2 Saving a project under another name E Edit Find Replace Convert wiew Online Diagnostics Tools New project Ctrl N alel gla elg Open projet Ctrl O Close project raf BSI f zaj Save Ctr HS K H HHH Ye 0 F sF8 aF aF SI P T Delete project N z F G a 1 Click Edt Data ie Change PLC type Save the project with a new name QU2H 2 Specify the location to store the project 1 Click Project Save as on the menu bar 2 Specify the location to store the project 3 Name the project 4 Set a title as necessary 5 Click the button to confirm your entry 6 Click the button The project will be stored under the new name 2 10 Reading the Saved Project O Project Edit Find Replace Convert Yiew Online Open project Project drive fa gt Q02 H 05 10 28 11 38 Q02 H 05 10 28 11 38 Q02 H 05 10 28 11 38 Q02 H 05 10 28 11 38 3 Click 02 H 05 10 28 11 38 ji Drive Path
186. ction ai ce i it i d Se si a eS oi Ve Se ie i fe evi er a erm ia i a RUN peg C STEPRUN 1 0 SYSTEM Pun B EE 3 Click the window of GX Developer to activate it 3 Click to activate select it The selected screen in Windows switches from GX Simulator to GX Developer ded ea be a ee Ee To next page From previous page srp 15 4 Ladder monitoring is executed without a PLC connected with a PLC in an offline state Slaleie eee 5 Use the logic test function GX Simulator to monitor devices change device values freely ar LADDER LOGIC TEST TOOL fa SEA Tools Help Device Memory Monitor 1O System Settings Timing Chart Display simulate how I O modules and special modules Serial Communication Function Device Manager j TRAP behave etc RUN paj gait pa 5 Use the logic testTunction ee eee oer eee ee eee eee GX Simulator Note that if you changed a sequence program ISF according to debug results and intend to use the r 1 I I 1 1 1 I RUN RESET C STEPRUN logic test function GX Simulator to do another Ee m10 SYSTEM Run E GX Simulator first a
187. d The batch processing of the data communication requests ON Batch processing can be turned on and off during running conducted The default is OFF processed one at a time for each END processing in the order in which data communication requests are accepted M9031 SM1031 02seeor onsje T forse f 0 1 second 0 2 second 1 second and 2 second clocks are clock generated Not turned on or off per scan but turned on and off even M9032 SM1032 1 second clock during scan if corresponding time has elapsed e Starts with off when power supply is turned on or CPU M9033 SM1033 2 second clock tee te sec 1 sec module reset is performed M9036 SM1036 aac Always ON Used as dummy contacts of initialization and application instruction in sequence program SM1038 and SM1037 are turned on and off without regard to M9037 SM1037 Aways OFF P position of key switch on CPU module front SM1038 and SM1039 are under the same condition as RUN status except M9038 SM1038 ON for 1 scan es iscan sai when the key switch is at STOP position and turned off and only after RUN ae on Switched off if the key switch is in STOP position RUN flag After SM1038 is on for one scan only and SM10339 is off for one M9039 SM1039 RUN OFF for ef Iscan scan scan only if the key switch is not in STOP position 1 scan only m9040 SM1040 SM206 PAUSE nan OFF PAUSE disabled When RUN key switch is at PAUSE position or
188. dule Module Base Unit Q308 QCPUIQCPU QX QY Q64 Q62 Q6IPAT No 1 No 2 42 42P AD DA 64 64 16 16 points points points poi Keep it in off state X0 Y40 to to X3F Y7F RS 232Cable Peripheral device 1 0 Panel Demonstration Machine Configuration amp Input Output No Not used for the practices instructed in this text book Y6F lt Y60 YO Y 6_Y 5_ Y4 Y3 Y 2_ YN YO Y5F lt Y50 Y4F lt Y40 OODODOOOO Y F_ Y E Y D_Y C_Y B_Y A_Y79 Y78 cb C3 OODDOODOO X3F X30 X7 X6 X5 X4 X3 X2 X1 XO G S6G8GgeGHG oes HEEL XF GOA9SOOHOPDDO XE XD XC XB XA X9 X8 X2F X20 A D INPUT MELSEC Q D A OUTPUT 5 2 Transfer Instruction RASCHOOL 8 1 MAIN 5 2 1 MOV P 16 bit data transfer K50 X7 TO 0 if TO K1500 OOR x1 13 _ c RST c10 Sie Vag 18 _ MOV TO DO X3 21 4 move c10 D1 x4 fi 24 MOVP K157 D2 X Js 274 _ MOVP H4A9D D3 13 As soon as the input condition goes active the current value of timer TO is transferred to the data register DO S Source 0
189. dule Write to PLC dialog ue box and select eeii Ueto O Batan u WON ai parameter on the File selection tab Target memory Program memory Device memory z _ Tite f File selection Device data Program Common Local Eramos EEE CE a 12 Click the Execute button to start writing Password setup f Program i l H EPen _11 Click 12 Click J f e 1 M a Seer if As the demonstration machine has two CPUs Y Device comment COMMENT installed it is necessary to write the parameter after setting the parameter for the Multiple CPU This I RSE 1 Remote operation 1 I I I procedure is not required when only one CPU is i I I I I I I I 1 I I 1 REOS __Redindent operation 1 Clear PLC memory 1 I I 1 I 1 I I Format PLC memory Arrange PLO memory 7 Create title installed Total free space gt Total fes sp ae For details on the setting procedure refer to Multiple CPU setting of the parameter in Section 3 2 13 Select memory card RAM for target memory on the Write to PLC dialogue box Write to PLC 13 Click a 14 Click the MAIN box under the file register on Target memory Memory card RAM the Fil lecti tab File selection Device data Program Common Local e rile selection tab Param Prog S
190. e M2 Completion flag CIRCUIT END Start buttonX0 Switch LS work present X1 Switch LS forward limit x2 7 i Switch LS backward limit X3 77 f Switch LS open complete X4 Loo To RUN indicator Y70 __ i Carriage moves forward Y71 Carriage moves back Y72 _ i i Push Y73 _ i 7 i Push back Y74 mm 3sec e App 112 Appendix 5 21 Starting compressors in order using ring counters This system provides pressure control using three compressors Pressure shortage is detected by the three pressure switches The less pressure is provided the more compressors are activated To equal the number of usages of each compressor compressors are activated according to the set order System configuration of compressor control MELSEC Q Compressor c Pressure Ley I PX1 PX2 Control panel Pressure shortage Major Sufficient Pressure shortage Medium pressure Pressure shortage Minor Start button Stop button MELSEC Q Start Input PBO o O X0 Compressor A Stop PB1 o o X1 Pressure switch Compressor B Compressor C Sufficient pressure Pressure shortage Major Pressure shortage Medium Pressure shortage Minor App 113 Operation explanation 1 The pressure switches X2 X3 X4 are initially off In this state turning on the start sw
191. e Input condition Equal Input condition i 4 FMOV KO DO K8 K gt e c RST DO 4 Only one FMOV instruction can be substituted for many RST instructions as shown above Input condition D BMOVP DO D32 K16 e When the input condition goes active the BMOV instruction performs the batch transfer of the data stored in the specified number n of devices starting from the device specified in to the specified number of devices starting from the device specified in The BMOV instruction performs the following operation when X5 is turned on bo 365 365 032 D7 365 365 D39 D15 7000 _ 7000 e BMOV instruction is useful in the following situations e When filing a logging data e For saving important data e g data for auto driving or measured data into the latch area This allows you to avoid data loss in the event of a power failure Using the instruction set to transfer the important data to data registers which have been set to live after the shut down Available device MELSECNET 10 H Intelligent Direct function Jn module art Note Note Note OJO Note Not available in BMOV instruction Internal device Index Constant system user register 172 Q 2 n i Re gt c 2 12 ian Operation Practice e Write the program on the previous page to the CPU and ru
192. e M9006 SM1006 Battery low a specified and turns OFF when the battery voltage returns to ON Battery low normal thereafter e Turns ON when the battery voltage drops to or below the M9007 SM1007 Battery low OFF Normal specified and remains ON if the battery voltage returns to latch ON Battery low normal thereafter moo08 SM1008 SM1 Self diagnostic OFF oer Turned on when error is found as a result of self diagnosis error ON Error App 59 Special Relay List Continued ACPU Special Special Special Relay after Relay for Name Meaning Details Relay Conversion Modification Corresponding CPU OFF No F number i ioni Annunciator Turned on when OUT F of SET F instruction is executed M9009 SM1009 SM62 detected i detection Switched off when SD1124 data is zeroed F number Detected Turns on when operation error occurs during execution of Operation error OFF No error application instruction and remains ON even if the condition M9011 SM1011 SM56 flag ON Error is restored to normal thereafter OFF Carry OFF Ea WoR M9012 SM1012 SM700 1 flag ON Carry ON Carry flag used in application instruction Clears the data memory including the latch range other than special relays and special registers in remote run mode from computer etc when SM1016 is on Clears the unlatched data memory other than special relays and special registers in remote run mode from comput
193. e loose Solderless terminals must be positioned at proper intervals Screws must not be loose Preventive maintenance Operation must meet the specifications The two programs must be identical Rotation must be without sounds or clogging The value must be identical with the specifications design value Remove and clean Retighten the terminal screws Correct Retighten the connector fixing screws Even if the lowering of a battery capacity is not shown replace the battery with a new one if a specified service life of the battery is exceeded Use the normal product on the actual PLC as a spare product Correct if there are differences Exchange and clean if any abnormality is found Correct if there are differences 1 When AnS Series Module is included in the system the judgment criteria will be from 10 to 90 RH 9 3 Consumable Products Backup batteries on PLCs are consumable products 9 4 Service Life of Output Relay The relays of modules relaying on contacts to output are subject to consumption due to the switching operation When a relay that is directly mounted on the print board of an output module is consumed it is necessary to replace the output module itself 1000 500 200 100 50 20 gt Limit number of switching unit 10 000 10 5 DC100V t 7ms AC100V COS 6 0 7 AC200V COS 6 0 7 AC100V COS 0 35 2 AC200V
194. e max resolution that becomes digital value of 1 through A D conversion differs depending on the settings of the resolution mode 1 4000 1 20000 1 60000 or the output range 7 5 3 Intelligent function module switch settings Q series uses the I O assignment settings of GX Developer to configure the switch settings for intelligent function modules The intelligent function module switch settings provide switch 1 to 5 and use 16 bitdata When the intelligent function module switch settings are not configured values of switch 1 to 5 are set to which is 0 1 Setting items for module switches Setting items Input range setting Analog output range Setting value for output range 0 to 5V Input range setting 10 to 10V a User range setting CH8 CH7 CH6 CH5 Vacant Temperature drift compensation No temperature drift compensation Standard resolution mode High resolution mode Standard mode A D conversion 1 FH Offset gain setting mode fixed to 0 REMARK The settings for the offset gain setting mode differ between the function version A and function version B Explanations in this section are made based on the function version B For details refer to the User s Manual 2 Setting module switches The demonstration machine incorporates two CPUs so it is necessary to perform the parameter settings for multi CPU system if there is only one CPU incorporated the parameter se
195. e CPU module is used Refer to the following school textbook for the exercises when the multiple CPU system is used Q Programming School Textbook Practice eeeeteeneees SH 080045 D or later The related manuals are shown below 1 QCPU User s Manual Hardware Design Maintenance and Inspection SH NA 080483ENG Explains the hardware 2 QCPU User s Manual Function Explanation Program Fundamentals eecee SH NA 080484ENG Explains the functions and programming method 3 QCPU Q Mode QnACPU Programming Manual COMMON INStrUCtIONS a SH NA 080039 Explains details of each instruction 4 GX Developer Version 8 Operating Manual Startup ecesesecseseceeeeeeeeeeeseeeeeeeeeseeterseeeateneanees SH NA 080372E 5 Ladder Logic Test Function software for Windows SW5D5C LLT E Operation Manual SH NA 080064 6 GX Developer Version 8 Operating Manual cecececceceeeeceeeeeseeeeeeeseeeeeeeseseeteeseseeteeseteatensateas SH NA 080373E Explains the operating method In this textbook the following CPUs are generically named QCPU Q mode i l e Q02CPU e Q12HCPU i l e Q02HCPU e Q25HCPU i l e QO6HCPU i CHAPTER 1 BASICS OF PLC 1 1 Program Taking PLC as a control ladder PLC can be described by an input ladder output ladder and internal sequential operation wea Output relay i Electro magnetic valve i ac Magnet contactor Contact
196. e Section 4 7 3 for explanation on the FEND 0 Sequence program A When Not executing CJ When executing CJ Sequence Input Condition Step 0 Step 0 program A CJ PEI e CJP Sequence program B i FEND FEND Pazi Sequence program C END Input condition is ON Sequence program B Sequence program C e The status of ladders skipped by the CJ instruction remains unchanged Before executing CJ During executing CJ XO 1100 1k CJ P10 1100 X2 Because X0 is ON all instructions within this area are not executed Hence Y72 remains ON even after X2 is turned OFF 4103 472 1103 l l pio x1 P10 1330 PLS M1 1330 e Once the coil of the timer is energized the timer updates even if the coil is skipped by the CJ or SCJ instruction When time is up the contact becomes ON This is because the timer updates and turns the contact ON OFF after each END Applicable Device i Intelligent Internal Device File MELSECNET 10 Index function system user register H Direct Jn register module Constant Basic number of steps Un G Word ANSCHOOL QEXa Program name MAIN Ladder Example Create the following ladder with GX Developer and write it on the CPU of the demonstration machine Then check the difference between CJ and SCJ instructions
197. e in ladder pattern being checked by CHK instruction Executes status latch status latch a status latch to enable at re execution Applies trigger to sampling trace trigger Applies trigger to sampling trace sampling trace e Resets sampling trace to enable a STRAR STRAR re execution Applies trigger to program trace trigger Applies trigger to program trace program trace e Resets program trace to enable Sa PTRAR PTRAR re execution PTRAEXE o PTRA O PRH Executes program trace App 34 Number of basic steps 11 Character string processing instructions Instruction Category symbol Symbol S S S DBINDAP DBINDAP S BINHA BINHA S S BCDDA BCDDAP D D D D D D D D D D D D D D D D D D D DHABINP DHABINP S Execution Processing details conditi e Converts 1 word BIN value designated by S to a 5 digit decimal ASCII value and stores it at the word device designated by D e Converts 2 word BIN value designated by S to a 10 digit decimal ASCII value and stores it at word devices following the word device number designated by D e Converts 1 word BIN value designated
198. e line control The following is an example of sequence control using a carriage to convey works materials Series of operations performed in one cycle is as follows A work is set on the carriage the carriage moves forward the carriage stops at forward limit the pushing arm pushes the work to the other conveyer side and the carriage moves back to the backward limit Container for work LS open complete X4 LS work present X1 LS backward limit X3 Le Carriage Carriage moves forward Y71 a Carriage moves back Y72 Control panel LS forward limit X2 RUN indicator Y70 Start button X0 MELSEC Q Input Output Start button 5 _o o X0 Y70 gt RUN indicator Switch LS work present 1 N _o oO X1 Y71 cm Carriage moves forward Switch LS forward limit _oO O X2 Y72 Carriage moves back Switch LS backward limit oO x3 Y73 Push Switch LS open complete o o x4 Y74 A Push back App 111 Project name QA 10 Program name MAIN XO M2 0 H Y70 RUN indicator Y70 X1 X3 i f C PLS M1 M1 C SET Y71 Carriage moves forward Y71 X2 E C RST Y71 LL PO SET Y73 Push Y73 K30 H eael T0 TO C RST Y73 C SET Y74 Push back Y74 X4 f C RST Y74 Se SET Y72 Carriage moves back Y72 X3 Be eee a
199. eaning Explanation When set CPU Error SD50 Error reset number that Stores error number that performs error reset U performs error reset DILL All corresponding bits go 1 ON when battery voltage drops e Subsequently these remain 1 ON even after battery voltage has been returned to normal Bit pattern B4 B3 B2 B1B0 indicating Battery low where gt CPU error latch battery Memory card A alarm S Error New voltage drop Memory card A error occurred Memory card B alarm gt Memory card B error When the QCPU is used the memory card B is standard and therefore the corresponding bits always remain OFF Pi panem Same configuration as SD51 above where 9 Turns to 0 OFF when the battery voltage returns to normal SD52 Battery low batte thereafter S Error New SA dfo When the QCPU is used the memory card B is standard and en P therefore the corresponding bits always remain OFF Number of e Every time the input voltage falls to or below 85 AC AC DOWN time for AC power 65 DC power of the rating during operation of the detection DOWN CPU module the value is incremented by 1 and stored in S Error D9005 O Rem detection BIN code 1 When any of X n 0 X n 20 X n 6 X n 26 X n 7 X n 27 and X n 8 X n 28 of the mounted MINI S3 turns ON the bit of the corresponding station turns to 1 ON Error 2 Turns to 1 ON when communication between the mounted D9004 MINI link MINI S3 a
200. ectin em interface COM Keay PESTS Tareet PLO Network no fO Station no Host PLC type 0020 PLO Nod IZ Clear device s whole memory 7 Include latch IT Clear all file registers Memory card RAM m 1 Click the Online Clear PLC memory menu The dialogue box as shown on the left will appear Confirm that the Clear devices whole memory checkbox is checked Check the Include latch checkbox Click the button Click the button to clear the latch device When completed the dialogue box as shown on the left will appear Click the button Click the button to close the dialog box 6 Clear the fault history in the CPU Clear the fault history data stored in the QCPU ct LD Edit mode MAIN 35 Step 1 Click the Diagnostics PLC diagnostics menu diagnostias Ethernet diagnostics CC Link CC Link LT diagnosticg System monitor PLC diagnostics _ 2 The dialogue box as shown on the left will ieee ee STOP Uninstalled Blrk appear Click the Clear log button m Monitor run stop 2005 10 29 202711 3 The dialogue box for confirmation will appear Click the button Error Jump 4 Click the button to close the dialogue box Stop monitor 4 Click 2 4 Creating a Ladder Program 2 4 1 Creating a ladder program using the function keys pe A ladder program Follow the steps below to c
201. ecurely engage the must be engaged and unit fixing hook Or installed securely tighten with the screw Check for distance between solderless terminals Correct Retighten the connector fixing screws Check the connector Connections should no part of the cable be loose The LED must be ON Abnormal if the LED is OFF The LED must be ON Abnormal if the LED is OFF The LED must be Off Abnormal if the LED is ON or flickering The LED must be Off Abnormal if the LED is ON The LED must be ON when the input power is turned ON The LED must be extinguished when the input power is turned OFF Abnormal if the LED does not turn ON or turn OFF as indicated above The LED must be ON when the input power is turned ON The LED must be extinguished when the input power is turned OFF Abnormal if the LED does not turn ON or turn OFF as indicated above Check that the LED is ON Check that the LED is ON in RUN status Check that the LED is OFF Check that the LED is OFF Refer to QCPU Q Check that the LED mode User s Manual turns ON and OFF Check that the LED turns ON and OFF 2 Periodic inspection The items that must be inspected one or two times every 6 months to 1 year are listed below Also perform this inspection when following changes are made the equipment is moved or modified layout of the wiring is changed the power supply module is changed etc Tab
202. eeeeeieeesineetaas 2 5 2 2 2 Creating a NEW PrOjeCl ee cecceecceeeeeeeeeeeeeeeeeeeceeceeseesaeeseesaeeseeseesieesieesieeseesieesieesieeteesieesieesinesieees 2 6 2 2 3 Changing the assignment of the function KEYS 00 2 eeceeeceeeeeeeeteeeeee eee taeesaeesaeesaeesieeseeseeseeseeeees 2 8 2 3 Preparations for Starting Up CPU ceccccceccececceeeeeeceeeeeeaeeseaeeeseaeeseaeeeeaeescaeeesacessaeeseaeeseaeesaeessieeeeaseeeans 2 9 2 4 Creating a Ladder Program tosina lpia a a a e aS aaa 2 13 2 4 1 Creating a ladder program using the function Keys sssesssssessreersrsrrsersrnstrstrstnstrstnstnstnstnstnstnstnnn 2 13 2 4 2 Creating a ladder program using the tool buttonS sssseesesseeereeneersrserstrstnstnstnstnstnstnstnstnntnstnnenn 2 15 2 5 Converting the Program cecccecceeceeeceeeeeeeeeceeeeeeeceeeseeseeeceeseeesaeeseesaeseaeseeeseeeseeeseeeseeeseeteaeseaeteeeeeeneeats 2 17 2 6 Writing to the PLO CPW iners niiina a a iiaiai 2 17 2 7 Monitoring the Condition of the Ladder Program c ceccceccseceeeeeeeeeeeeeeeeeeneesieesieeseesieesieesieesieesneeneeteees 2 22 2 8 Editing Ladder Program i 22 20 dscca dened cence RAAR ii 2 25 2 8 1 Making partial correction to the ladder program ecceeccseceeeceeeeeeeeeeeeeeeeeseeeseeeseeeseeeseaeeeaeeeaeeeatenes 2 25 2 8 2 Drawing Deleting line 00 0 6 sceceseesseeeteecneeeneesneceneeateceneeanecaceeatecanecanedaneeatecaneednedeneednesheceneediecnendies 2 27 2 8 3 Insert
203. eetenees App 113 Appendix 5 22 Application example of positioning COntrol ccc cccecceeeeeceeeeeeeeeeeeeeeeeeaeeeseeeeeneeetans App 117 Appendix 5 23 Application example USING indeX Z ccescceeecceeeeeeeeeeeeeeeeeeeeeeeaeeesaeeesaeeseneeeeieetsneeetaes App 118 Appendix 5 24 Application example of FIFO instruction c ccccccceeeceeeeeeeeeeeeeeeeeseneeseaeeesieeeeneeeeans App 120 Appendix 5 25 Application example of data Shift cecccccecceeeeceeeeeeeeeeeeeeceeeeaeeecaeeseeeeeseeeteaeesseeeeaes App 122 Appendix 5 26 Example of operation program calculating square root of data ccsceeeeees App 125 Appendix 5 27 Example of operation program calculating n th power of data ccceeeeees App 126 Appendix 5 28 Program using digital switch to input data eecceeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeseeeenneetens App 127 Appendix 5 29 Displaying number of faults with fault numbers using fault detection program App 128 Appendix 6 Keys of GX Develope 2 cc cccsecceeeeeeeeeeeeeeceeeaeeeceaeeceaeeccaeeecaeeesaaeeseneescaeeseaeeesneessaeteneeseaees App 132 INTRODUCTION This textbook describes the PLC the program editing methods the sequence instructions and the application instructions to help you understand the MELSEC Q series programming The multiple CPU system is available for the MELSEC Q series with multiple CPU modules but this textbook explains the case in which on
204. elect all Cancel all selections Click the button to start writing Connecting interface PLC Connection r E ka Program Bi C MAIN 5 Device comment C COMMENT E Parameter C PLO Network Remote of File regi a i as 14 Click e Check that 100 to 400 are written in the R1 to R4 columns by using the device batch monitor The operating procedure is the same as the one described in Section 5 2 1 e To write or clear the data of the file register with the program write the program below For the operating procedure refer to Section 4 4 riting starts when XO is turned on and the data is cleared when X1 is turned on The file register data of the SRAM card is retained with the battery Resetting or turning off the power does not clear the data To clear write 0 5 6 External Setting of the Timer Counter Set Value and the External Display of the Current Value The timer and the counter can be specified either by K decimal constant directly or by D data register indirectly Programming as described below allows the set value to be changed with the external digital switch X0 Digital switch 0 BINP K4X20 D5 X2F to X20 s D5 18 2H 384 i a SA y 0 D5 1234 x1 ONS 15 BINP K4x30 D6 Digital display Y4F to Y40 D6 e 4 U O 8 5 19 Displays the current value of T10 C10 at Sp 4 x6 26 RST C10 SM400
205. emoved from the base resetting The other PLCs are also put in reset status OFF No 2 CPU reset Goes OFF when reset of the No 2 CPU is canceled No 2 CPU rese cancel Comes ON when the No 2 CPU is resetting including the case where flag ON No 2 CPU he PLC is removed from the base resetting The other PLCs result in MULTI CPU DOWN error code 7000 OFF No 3 CPU reset Goes OFF when reset of the No 3 CPU is canceled No 3 CPU rese cancel Comes ON when the No 3 CPU is resetting including the case where flag ON No 3 CPU he PLC is removed from the base i The other PLCs result in MULTI CPU DOWN error code 7000 OFF No 4 CPU reset Goes OFF when reset of the No 4 CPU is canceled No 4 CPU rese Comes ON when the No 4 CPU is resetting including the case where S Status flag he PLC is removed from the base change The other PLCs result in MULTI CPU DOWN error code 7000 Me 1 CPU error OFF No 1 CPU normal Goes OFF when the No 1 CPU is normal including a continuati ON No 1 CPU during error stop error Comes ON when the No 1 CPU is during a stop error i 2 CPU error OFF No 2 CPU normal Goes OFF when the No 2 CPU is normal including a continuati ON No 2 CPU during error stop error Comes ON when the No 2 CPU is during a stop error X 3 CPU error OFF No 3 CPU normal Goes OFF when the No 3 CPU is normal including a continuati ON No 3 CPU during error stop error Comes ON when the
206. en ON peat OFF Other than during Divided transmission divided In processing of AD57 S1 goes ON when canvas screen is Instruction processing divided for transfer and goes OFF when split processing is a status fe execution ON During divided completed processing SM712 Transmission oe Pateh ace In processing of AD57 S1 goes ON when canvas screen is S Instruction M9066 processing selection processing divided for transfer pits request to remote Selection of real SM707 number instructions processing type OFF Communication Communication request pea module Used to determine whether communications requests to S Instruction SM714 registration area BUSY A E remote terminal modules connected to the AJ71PT32 S3 ON Communication execution signal can be executed or not request to remote terminal module disabled SM715 El flag i aun B ON when El instruction is being executed ea OFF Comment read Comment read not completed Turns on only during one scan when the processing of the S Status completion flag ON Comment read COMRD or PRC instruction is completed change completed OFF File not accessed 3 SM721 File being accessed ON File being Switches ON while a file is being accessed by the S Status S FWRITE S FREAD COMRD PRC or LEDC instruction change accessed SM722 BIN DBIN instruction OFF Error OK Turned ON when OPERATION ERROR is suppressed for error disabling flag ON Error NG
207. er etc when SM1017 is on M9020 SM1020 User timing e Relay which repeats on off at intervals of predetermined clock No 0 scan M9021 SM1021 eee t a pied Bi turned on or reset is per formed the clock GO o n2 scan n2 scan j M9022 SM1022 ra Noa of oof e Set the intervals of on off by DUTY instruction M9023 SM1023 Pera nidscan DUTY M9020 User timing M9024 SM1024 clock No 4 NS A nata memory OFF Ignored SM1016 clear flag ON Output cleared Datamemory OFF Ignored SM1017 clear flag ON Output cleared Clock data set OFF Ignored e Writes the clock data stored in SD1025 to SD1028 to the M9025 SM1025 t ON Set request present CPU module after the END instruction is executed in the ee used scan in which SM1025 turned from OFF to ON Clock data OFF No error Switched ON by clock data SD1025 to SD1028 error and Time data OFF Ignored Clock data is read from D1025 to D1028 and month day M9027 SM1027 display ON Display hour minute and minute are indicated on the CPU module i front LED display Clock data OFF Ignored Reads clock data to SD1025 to SD1028 in BCD when 9028 eMldee ON Read request D1028 is on O The SM1029 relay is turned on using a sequence program to Batch processing of M9029 SM1029 data communication s requests process all data communication requests accepted during OFF Batch processing not one scan in the END processing of that scan conducte
208. es the total of the number of arguments used in the sub routine program and the number of program name steps The number of program name steps is calculated as number of characters in the program 2 decimal fraction is rounded up N ahlo rE sae a ae a a T a a Fg em ee a App 31 7 Data table operation instructions Instruction Execution Processing details i symbol condition Category Number of basic steps S D Pointer _ Pointer 1 Device of _ pointer 1 Pointer__ Pointer 1 D Pointer Data table processing Pointer i D Designate using n App 32 8 Buffer memory access instructions Instruction symbol Data read Execution Processing details Sondition Number of basic steps e Reads data in 16 bit units from special function module e Reads data in 32 bit units from special function module e Writes data in 16 bit units to special function module e Writes data in 32 bit units
209. ese flashes continue until the value reaches the set device value 2 Outputting to Y70 and Y74 with X6 turned on does not m t ake the LEDs of Y70 and Y74 flash I O numbers before forced assignment Slot 0 Slot 1 Address 0 Address 4 Address 1 Address 5 o dd tains 16 point Address 2 Address 6 ne address contains 16 points Address 3 Address 7 Modules with 64 points take 4 addresses QX42 QY42P K Digital display Address 0 Address 47 gt Q61P A1 Q024 a02H 1 Power CPU CPU Address 1 Address 5 2 supply BCD TO K4Y50 module Address 2 Address 6 LYSF to Y50 Name plate Address 3 Address 1 Y77 Y76 Y75 Y74 Y73 Y72 Y71 Y70 Name plate I O numbers after forced assignment X is set to 32 points Therefore another 32 points cannot be used This makes each of following addresses smaller by 2 Address 07 Address 4 Address 6 Address 1 __ Address 5 Address 7 Digital display 4 I I zal QX42 QY42P Address 0 Address 2 Q61P A1 P Q02H Q02H ower CPU CPU Address 1 Address 3 Supply Y5F t Y50 module Address 4 2 Name plate Address 5 4 Y77 Y76 Y75 Y74 Y73 Y72 Y71 Y70 Name plate e Note that address 7 has been replaced with address 5 This means that a current value of the timer TO is output to the newly assigned address 5 and LEDs
210. evice Y40 to points points points Q62 DA 16 I O panel Not used in this textbook Leave itin STOP status F Y60 OOODOQDOOO P AF 4 y40 Y7F Y7E Y7D Y7C Y7B Y7A Y79 Y78 C3 Mm OOODOQDODOO g amp g k x X3E X30 X XO ON o ogg A D INPUT ti fi 6 6 6 k v k fj B wo 4 E e Fe pe m MELSEC Q D A OUTPUT 1 13 MEMO CHAPTER 2 OPERATING GX DEVELOPER 2 1 Basic Knowledge Required for Operating GX Developer 2 1 1 GX Developer Screen 1 Title bar 2 Menu bar gt 3 Tool bar lol x a MAIN a al a Geers 5 Edit screen 4 a Ei Parameter Edit mode el E E ojx 5 Network param 1 Title bar Shows the name of the active project Resizes Terminates GX Developer Zooms GX Developer J wt P MELSOFT series GX Developer 4 SCHOOL QEX15 TEST s xi l Shows the explanation of the point where the mouse curso is placed 2 the path of the project Developer GX Developer Displays the name and Minimizes GX
211. evices Device test Close TE sneva Device OM0FF Currene setting value fomen ved 7 Show local label MAIN 7 The Monitor status dialog box appears and the ON OFF Current value of the device is m displayed Delete the device Monitor status E Stop monitor Oms RUN MAIN z Delete all devices Device test Close REMARK To remove registered devices click the Delete the device button 6 8 Creating Comments RASCHOOL QEX15 MAIN The following is an example of a printed out ladder with comments and devices for which contacts are used TO a contact is in step 5 and 27 b contact is in step 30 Ti KB o TO 0 38 Timer Timer 0 6 Fe S NO 1 TO K3 5 Ti Timer 0 6 0 3S Timer S NO 1 a Hi 0 9S Flicker H2 KF E m ee A Starts Operation Mi K1000 14 C2 0 9S Counts number of products Flicker BCD c2 K4Y60 Counts number of products G2 pl s LAL cz Counts number of products Counts number v prvuucts Ta 27 Timer 0 6 External display of flicker SNO 1 Y7 Ta 30 2 Timer 0 6 S NO 1 73 T2060 H K30000 33 T200 DBCD T200 K5Y40 xo 41 te Activates trigger xi 43 s icer Performs reset 45l END TO AS 5 27 B D 30 11 B D i B D Mi A S i4 AS G2 ASS 19 22 B D 23 B D 23 K4y 60 B D 19 oo D AS 18 22 B D 23 7200 A S 38 B D 7200 A S 38 B D 33 K5Y40 B D
212. example subprogram when main program is being run is switch ON I O partial refresh When SM1052 is OFF the SEG instruction is executed as a 7 SEG display instruction Status latch OFF Not completed Turned on when status latch is completed SM10953 SM808 completion flag ON Completed Turned off by reset instruction OFF Other than when P SM1056 A set request ON P set being Provides P set request after transfer of the other program requested for example subprogram when main program is being run is Sub side P set being requested setting is complete set request ON P I set being Main side P I Momentarily ON at P set sei reques completion Turned ON once when the P I set has been completed and ai ae Momentarily ON at P set then turned OFF again completion completion SM1060 T Sub program 2 set being requested T P I set request ON P I set being Provides P set request after transfer of the other program OFF Other than when P complete during run Automatically switched off when P Sub program 3 set being requested setting is complete P set request ON P set being requested PZ or Ed ae Uae So M9061 SM1061 M9065 detection ON During divided divided processing processing Divided 3 R smioee SM712 processing OFF Batch processing Turned on when canvas screen transfer to AD57 S1 AD58 is ON Divided processing done by divided processing request flag oe A8UPU A
213. f empty blocks in communic ations request registration area register Error code generated by SFC program Block number where error occurred Step number where error occurred Transition condition number where error occurred Sequence step number where error occurred Status latch step Software version of internal system Serial communication module data check App 86 which cannot be expansion file register No 1 is used or if SM320 is OFF Stores error code of errors occurred in the SFC program in BIN code 0 No error 80 SFC program parameter error 81 SFC code error 82 Number of steps of simultaneous execution exceeded 83 Block start error 84 SFC program operation error Stores the block number in which an error occurred in the SFC program in BIN code In the case of error 83 the starting block number is stored Stores the step number where error code 84 occurred in an SFC program in BIN code Stores 0 when error code 80 81 or 82 occurred Stores the block stating step number when error code 83 occurs Stores the transition condition number where error code 84 occurred in an SFC program in BIN code Stores 0 when error code 80 81 82 or 82 Stores the sequence step number of transfer condition and operation output in which error 84 occurred in the SFC program in BIN code Stores the step number when status latch is executed Stores the step number in a binary
214. f it works properly with the demonstration machine I i ee I i H C2 i K2X20 D1 x2 gt C i 7 mek r Do A D2 X3 X2 i 12 Hek ri Do D1 D2 SM40141 ee ee I F 6 D3 K2Y60 a tee hte ee eee ere DO D1 D3 D2 BIN multiplication BIN value x BIN value gt 0 BIN value DO D1 D2 D3 1 g B Mh O 5 7 7 AASCHOOL ATESTI VAIN Practice Question 7 D D Create a program that performs the BIN multiplication of the value specified with the 5 digit digital switch X20 to X33 by 1100 when X2 is turned ON If the result is less than 99999999 show the result on the 8 digit display Y40 to Y5F The program should perform the BIN division of the value specified with the 8 digit digital switch X20 to X3F by 40000 when X3 is turned ON If X4 is ON show the quotient of the result on the 8 digit display Y40 to Y5F If X4 is OFF show the remainder on the same display X20 to X33 x1100 O gt Y40 to YSF 7 Quotient Y40to Y5F X4 ON aniseed Remainder Y40 to YSF X4 OFF Fill in the blank square of the program below create a program with GX Developer and check to see if it works properly with the demonstration machine X2 X3 I o Rp DBP K5X20 DO y EEANN Ko 2 4 I 72 1 Do D2 D4 Ho I LtD lt K99999999 D4 R77 gt Y77 i L yp BC DP D K8Y40 H 1 x3 X2 i 24 A H c3 K8X20 DIO H i I I EATI K40000 D12 i I
215. fe of Output Rolay eru renea aE EAE E A EE EA EEA EE ENE 9 4 9 opare ProdUCiS Aa sanaa a a a a a ee a tea eee at 9 5 9 6 Using Maintenance Supporters ccccccceecceeecceeeceeceaeeceaeeeeaeeeeaceeseaeesaaeeecaeeesaceesaeeseaeessaeeesaeesieeeseaeessaees 9 7 Appendix 1 O Control MOd a a aa a zeke ek ade hase tee deb E a aa aaea aa aag App 1 Appendix 11 Directimode zat E A E E A AEA EEO EEI EE E EE a at eee fe ttn ee App 1 Appendix 1 2 Refresh Me cccsccccscceeeceeeeeeeeeneeeeaeeeeaceseaeeeceaeecaeeeaeeseaeessaceeseaeeseaeeseaeeseaeeeiseesiseesaas App 2 Appendix 1 3 Comparisons between the direct mode and refresh Mode ccscceeceeteeeeeeeeteeetees App 3 Appendix 2 Instruction Table isss aaa aaa a aeaa teed Eara a a nes App 4 Appendix 2 1 Sequence instructions cccecceeecceeeeceeeececeeeeeeeneeeneeseneeseaeeseaceeeaneeeaneeseaeessaeeesieeeseeeans App 4 Appendix 2 2 Basic instructions cccccccecceeecceeeeeeeeeeeeeeeeceaeeeseaeeseaeeceaeeseaeeesaceesaeeseaeeseaeeeeaeeeaseesineesans App 8 Appendix 2 3 Application instructions seient anea ae aae a a a aea iaa aaraa iaaa App 24 Appendix 2 4 Instructions for data link ccecccceecceeeceeeeceeceeeeeceeeeeaeeceeneesaeeseaeeecaeeesneeseaeessaeeteessaeeess App 45 Appendix 2 5 OCPWiInStruGtOns re a a eit aia a a a a Bea Ma App 48 Appendix 3 Special Relay LiStz ssisiinna a aaaea aaau a a a aeaaeae App 50 Appendix 4 Special Register List
216. formation Set by Meaning Explanation When set Corresponding ACPU MeL Corresponding CPU ON if diagnosis results show error occurrence Includes the annunciator being ON and detecting an error by CHK instruction e Stays ON subsequently even if normal operations restored J Comes ON when an error occurs as a result of self diagnosis No self diagnosis gt A f Self diagnostic ernog excludes the annunciator being ON and detecting an error by CHK S Error error Self diagnosis instruction occurrence g e Remains ON if the condition is restored to normal thereafter S Error occurrence No error Error No error common Error common information informati Error common information No error common Error individual information informati Error common information M50 ON if battery voltage at CPU module or memory card drops below OFF Normal rated value S Error ON Battery Remains ON if the battery voltage returns to normal thereafter occurrence e Synchronizes with the BAT ALARM BAT LED OFF Normal e Same as SM51 but goes OFF subsequently when battery voltage S Error ON Battery returns to normal occurrence e Turns ON if an instantaneous power failure of within 20ms occurs during use of the AC power supply module Reset when power is switched OFF then ON AC DOWN OFE Pr not e Turns ON if an instantaneous power failure of within 10ms occurs S Error M9005 QCPU S Error When SM0 i
217. forms the numeric operation using the numeric value stored with the logical 1 or 0 binary numbers BIN In our everyday life on the other hand a decimal system is most commonly used because it is easier to understand Therefore decimal to binary conversion or the reverse is required whenever you write read monitor numbers to from the PLC The programming system and some instructions have the function of performing the conversion This section explains how numbers data are expressed in decimal binary hexadecimal and binary coded decimal notation BCD and how the conversion is made A decimal number system consists of ten single digit numbers 0 1 2 3 4 5 6 7 8 and 9 which represent the order and size amount The number after 9 is 10 The number after 19 is 20 and so forth Additional powers of 10 require the addition of another positional digit e The following shows how a base ten number in this case 153 is represented 153 100 50 3 1x100 5x10 3x1 1x 10 5 x 101 3 x 10 Decimal 0 to 9 symbol Base number 10 raised to the power of digit number Miish Digit number 0 1 2 10 Decimal number The Q series PLC uses a symbol K when it expresses numbers in decimal notation Binary BIN e The binary number is a base 2 method of counting in which only the digits 0 and 1 are used When 1 is reached counting begins at 0 again with the digit to the left being incremented The two digits 0 a
218. ge 0 rae 2 The PLC diagnostics dialog box appears Click the button to jump to the sequence program step number where the highlighted error occurred l An error number is displayed if an error was found e No error is displayed if no error was found 6 2 5 Remote RUN STOP er Unset project LD Read mode MAIN vert View eld Transfer setup Read From PLC Write to PLC Verify with PLC Write to PLC Flash ROM Delete PLC data Change PLC data attributes PLC user data Monitor Debug Remote operation undant opera Password se z l Clear PLC ma 1 Click Format PLC memory Arrange PLC memory Set time Remote operation Connection target information 3 Diagnostics Tools Window Help Connection interface COMI lt gt PI module Target PLO Station no Host PLC type Q02 H PLC status 2 Se lect Operation Specify execution destination _ Currently specified station C All stations s Di group Allow removing the memory card Close z MELSOFT series GX Developer Activate the CPU before proceeding with the procedure below i 1 Click Online Remote operation 2 The Remote operation dialog box appears Select STOP in the list box in the Operation area 3 After the setting is completed click the button 4 The message saying E
219. gram Sequence program END END b When using the subroutine and interrupt programs a When operating in each program block by CJ instruction Caution e There is no limit to the number of FEND instructions in a sequence program however it cannot be used in the subroutine and interrupt programs e The FEND instruction cannot be used to terminate the main or sub sequence program Make sure to use an END instruction for the end of a whole program REFERENCE The interrupt program allows you to stop the current process and processes an interrupt upon receiving an interrupt request in the middle of processing a normal program ANSCHOOL OEX6 Program name MAIN Ladder Example Create the following ladder with the GX Developer and write it to the CPU of the demonstration machine to check if the FEND instruction work properly X3 0 CJ P10 1 X4 i 3 lt Y70 i I 5 FEND P10 x5 6 lt Y72 i I Operating Procedure Refer to Section 4 4 Operating Procedure for the detailed procedure of the following operations 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice Verify the operation of the ladder which was created with the GX Developer and written to the CPU of the demonstration machine by monitoring the ladder on the screen 1 When X3 i
220. he value is newly stored at each END Namely the D9017 D1017 time oe ns minimum value of scan time is stored into SD520 in BIN In 10 ms units ade D9018 SD1018 SD524 gt Scan time At every END the scan time is stored in BIN code and In 10 ms units always rewritten e If scan time is larger than the content of SD526 the Maximum scan D9019 SD1019 time value is newly stored at each END Namely the maximum value of scan time is stored into SD526 in BIN In 10 ms units code Sets the interval between consecutive program starts in Constant scan multiples of 10 ms D9020 SD1020 time User sets in 0 No setting 10 ms units 1to200 Set Program is executed at intervals of set value x 10 ms D9021 SD1021 7 cae Scan time l e At every END the scan time is stored in BIN code and time In 1 ms units always rewritten App 84 ACPU Special Register Special Register List Continued Special Register after Conversion Special Register for Modification Meaning Explanation When the PLC CPU starts running it starts counting 1 1 Count in units of every second D9022 SD1022 D412 second is e It starts counting up from 0 to 32767 then down to counter 32768 and then again up to 0 Counting repeats this routine Stores the year 2 lower digits and month in BCD i BAB 0 B12B11 B8 B7 wee BA B3 Bo e g July 1987 D9025 D1025 _ Time Time data H8707 data year month 2n
221. he digital display Y50 to Y5F 7 6 Q62DA Digital Analog Conversion Module 7 6 1 Names of parts Part names of Q62DA are given below together with descriptions For details refer to the User s Manual Q62DA H mnAnAAAnnRnARA_A Indicates operation status of a D A conversion module ON In normal operation 1 RUNLED Flicker In offset gain setting mode OFF 5V power failure or watchdog timer error occurred Indicates errors and status of an D A conversion module ON Error occurred OFF In normal operation 2 ERROR LED i Flicker Switch settings error occurred Values other than 0 has been set to the switch 5 on an intelligent function module External power supply A terminal for connecting 24VDC external power supply terminal 7 6 2 D A conversion characteristics 1 D A conversion characteristics on voltage outputs when in a standard resolution mode with analog output range set to 10 to 10V 5 0025V D e gt ne J 2 e D gt D 2 o S lt x 2 5 0000V 1 1 1 2000 2001 2002 2003 2004 Analog output voltage 0 Digital input value Figure 7 14 D A conversion characteristics current output Digital input Digital analog conversion modules convert digital quantity that is input from a QCPU to analog values and then output it to exterior For example the modules convert digital quantity of 4000 to analog quanti
222. he following file Corresponding v Corresponding X memory memory File name File name Capacity K points 1K 1018K points Comment file used in a command File for local device Not used Notused C Use the same file name as the program C Use the following file Corresponding Corresponding Ls memory memory C Use the following file i Corresponding E File name memory File name Acknowledge XY assignment Multiple CPU settings Default Check End Cancel e Al 4 Check the box beside Use the same file name PLC name PLC system FLC file PLCRAS Device Program Bootfie SFC 1 0 assignment as the program of the file register field and as MEA select Memory card RAM for the Not used Use the same file name as the program Use the same file name as the program corres po n d In g m e m ory Corresponding Memory cardRAM x Co memory Memory card RAM C Use the following emion Can eee 5 When complete click the button memory tenane Capacity K points 1K 1018K points r Comment file used in a command r File for local device Not used Notused C Use the same file name as the program C Use the following file Corresponding Lal Corresponding as z memory memory Use the following file a Corresponding File name mees 5 Click en po ie 6 Right click on the Device memory from the project data list and click
223. he screen 6 2 1 Turning device Y ON OFF forcibly AEA Read mode MAIN 36 i Stop the CPU before proceeding with the ics Tools Window Help procedure below is b Fae 1 Click the EJ button on the toolbar Tl iJ aF5 caF5 cafil 2 The Device test dialog box appears Click Device and input Y70 in the list box Word 3 Click the FORCE ON FORCE OFF button to forcibly turn Y70 on off C Buffer memory Module start 1 0 z Hex Address JHEX Setting value Program Execution history DEC 16 bitinteger Set Label reference program Device Setting condition Check Using Demonstration Machine 1 Confirm that the content displayed on the execution history area switches between ON and OFF according to clicks of the FORCE ON FORCE OFF button Also confirm Y70 s LED on the demonstration machine switches between on and off according to the same operation If the CPU is in a RUN state operation results of programs are given priority For this reason stop the CPU first to make confirmation with the demonstration machine To execute setting resetting of contacts changing a current value of word devices and forced outputs it is also possible to use the test function while GX Developer is monitoring ladders In the ladder monitoring screen of GX Developer double click the contact or press key while hold
224. his relay is ON Selects the device status when the stopped CPU restarts running after the sequence program or SFC program has been modified when the SFC program exists Selects operation output of held steps when terminating a block by end App 53 S Initial M9100 S Initial SFC program U start e Turn this relay from OFF to ON to start program execution e Turn this relay from ON to OFF to stop program execution e Initial value can be ON or OFF by setting the parameter Aa M9102 F S Initial format i change execution step that was suspended when SFC program was stopped effective scan M9103 S Instruction M9104 executed execution OFF OFF stop S Initial M9196 ES i 5 S Initial U New Pa i Special Relay List Continued T Operation mode for low OFF Asynchronous e Asynchronous mode Mode in which the operation of the low speed execution type program is performed continuously within the excess time Set by When set ve Corresponding ACPU Corresponding CPU SM330 speed execution type mode e Synchronous mode U END New O program ON Synchronous mode Mode in which the operation of the low speed execution type program is not performed continuously and operation is performed from the next scan even if there is excess time The status of the intelligent function module access ON indicates completion instruction executed immediately before is stored S Sta
225. ible auxiliary relay inside the PLC that cannot output L Latch relay i pi AE i jes pr directly to the external devices Auxiliary relay inside the PLC that cannot output directly to the s Sigpielay uxiliary yi i utput di y external devices Internal relay for data link that cannot output directly to the Link relay external devices The area not assigned by initial link information Bit device setting can be used as the internal relay Mainly deals with the Used for failure detection Create the failure detection program on off signals F Annunciator beforehand and turn on the program while the PLC is running to store the numerical values in the special register D V Edoe rela Internal relay that stores the operation result on off information 9 y from the top of the circuit block Special relay _ Internal relay that stores the CPU conditions Pe Internal relay for data link that indicates the communication SB Special link relay status and errors Internal relay that captures the on off data specified by the Function input subroutine call instructions with arguments in the subroutine program Internal relay that transmits the operation result on off data in Function output the subroutine program to the subroutine program call source TST Timer Accumulative timers of four types low speed timer high speed timer low speed integrator and high speed integrator program and the counters for interruption sequence program
226. ic application instruction values constant E Real constant Used when specifying real numbers as instructions Character Character string Used when specifying character strings as instructions string constant Bit device Mainly deals with the on off signals Link direct Device that can access directly to the link device of the network device module Word device Mainly deals with a data One word consists of 16 bits Establish the refresh parameter beforehand Intelligent gt J Device that can access directly to the buffer memory of the function module intelligent function module device 3 2 Parameters The parameters are basic settings applied to the PLC in order to control the object as pla nned The parameters are divided into the PLC parameter network parameter and remote password as shown below 4 PLC Name Setting H PLC System Setting Comment m Timer interval setting RUN PAUSE contact m Remote reset STOP RUN output mode t Computation on floating decimal point data t Intelligent function module setting Perm Sets Sets t Sets head Common pointer un eeseeeeee 111111111111 DELS M Number of vacant slots Sets M System interruption setting Interruption program Fixed cycle program setting Unit synchronization setting functi A series CPU
227. ied as and the result is stored in device when the input condition is turned ON S 62 D e a e Input condition ON 970 50 A 920 Assumption D2 contents are not changed Applicable device j Intelligent Internal device Index function system user register H direct Jn register module Constant Basic number of steps Un G gt z rfe substracl 6 instruction Add substract 62 7 L eG 26 20 26 02 TE cH Ka The basic number of steps becomes four steps rf TO TORIO AO type ANSCHOOL EXT Program name MAIN Ladder Example Create the ladder diagram shown below with GX Developer write it to the demonstration machine and confirm if instructions work properly H rp DO D1 20 gt D1 KO DBCD D1 K5Y40 D1 KO 4 lt Y70 Po DMOV KO K5Y40 Operating Procedure The following procedures are the same as Operating Procedure described in Section 4 4 1 Create a new project xo o HI CBINP K4X30 DO i I PP A BINP KA D1 I A rTP bo D1 i x1 10 i CBINP K4X30 DO I F BINP KA D1 I I I I I I L I I I I I I 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice 1 When XO is turned ON the addition of data in X30 to 3F and data in X20 to 2F is performed and the result is output to Y40 to Y53 2 When X1 is turned ON the subtract
228. in 4 digit decimal numbers OP Forward rotation gt Reverse rotation Motor brake Pulse generator MELSEC Q X2 Start PERRET ee o gt X0 Y70 Y71 x1 Y72 Command value setting switch i X20 to X23 Y4C to Y4F X24 to X27 Y48 to Y4B X28 to X2B Y44 to Y47 X1000 X2C to X2F Y40 to Y43 Path name A SCHO 0 1 H lt MO gt RUN MO HH Y72 gt Releases the brake post BINP K4X20 D15 H Reads the command value XO M2 L lt D15 D16 Y70 gt Forward rotation gt D15 D16 YT gt Reverse rotation MO X1 Y70 20 KH rR P K1 D16 H 1 during forward rotation Y71 1 P K1 D16 H 1 during reverse rotation Checks consistency with x2 the command value 38 a _ MOV KO D16 H Clears OPR SM400 Always ON pce 41 MIB D16 K4Y40 H Displays the current value to exterior CIRCUIT END C D15 D16 M2 H App 117 Appendix 5 23 Application example using index Z 1 Counts the number of manufactured products every day in one month cycle and stores the resulting number to the corresponding register of the date D1 to D31 2 Inputs the planed number of products to manufacture using the external digital switch Production stops when this number is accomplished 3 Inputs the date using the external digital switch 4 Displays to exterior how many products have been manufactured in the cur
229. in the case of handling 16 bit data the PLC handles a 32 bit negative value in two s complement form Therefore the leftmost bit B15 for 16 bit is regarded as a sign bit Allowable range 2147483648 to 0 to 2147483647 Top bit ae If the bit is 0 the number is interpreted as a positive number Sign bit If the bit is 1 the number is interpreted as a negative number e Determine if the data should be handled in 2 word 32 bit unit or not depending on the data size In the following conditions 2 word instructions must be used 1 When the data size exceeds the range 32768 to 32767 that can be dealt with by 1 word DMOV K50000 DO D1 DO _ Stored in the two 50000 50000 contiguous devices Transferred 2 When transferring the result of 16 bit multiplication instruction 1 word instruction amp DO D1 D10 DO D1 D11 D10 The result of the x multiplication is stored in Il the two contiguous devices a DBCD D10 K8Y40 a 8 digit Display 0 to 99999999 D10 O 8 8 8 8 8 8 8 e BCD conversion The result of the 32 bit data multiplication will be 64 bits 3 When utilizing the result of 32 bit division instruction to D20 D30 D40 D21 D20 D31 D30 1 I A e Remainder DBCD D40 Displays quotient Displays remainder A
230. ina iin eao aiaa aai aa deed aed dee ete a a a a aa aani App 64 Appendix 5 Application Program Examples ccccccccscceeeceeeeeeeeeeeeeeeeeecneeseneeseaeescaeeesceeseneeseeeseueeeaneess App 90 Appendix 5 1 Flip flop ladder eccceeecceceeceeeeeeeeeeececeeeeaeeceaeescaeeecaceeseaeeseaeeeeaeeecaeeesieeeseaeeeeeseseseeeess App 90 Appendix 5 2 One Shot ladder ececccecceceeceeeeeeeeeececeeeneeseaeeseaeeseacecseceesaeeseaeeecaeeesaeeseaeeseeeeaeessieetes App 92 Appendix 5 lt 3 Long time Umer r ri cetaces cetd eed haadbe cel Latha dacea ek aa a a aaaea aae aaa a aaaea App 93 Appendix 5 4 Off delay timer ccccceecceeeeceeeeeeeeeeeececeeeeaeeceaeeseaeeeeacessaneeseaeeseaeeeeaeeesaeeseaeeteaeseaeeseneeess App 94 Appendix 5 5 On delay timer momentary input cccecceeeeeeeeeeeeeeeeceeeeeceeeeeeneeseaeescaeeeeieeeseaeessaees App 95 Appendix 5 6 ON OFF repeat ladder ccccccceecceeeceeeeceeceneeeeeeeeeaeeeseaeeseneeecaeeeeaeeesaeeseaeeseaeeeeieeeaneess App 96 Appendix 5 7 Preventing chattering input cccccceeeeceeeeeeeeeeeeeeeeeeceeseaeeeeaeeecaeeesaneeseaeeseaeeseeeeeeeess App 96 Appendix 5 8 Ladders with a COMMON line cccecceeeeeeeeeeeeeeeeeeeeeeaeeseaeeseaeeecaeeesaaeeseaeeseaeeseieeeeaeees App 97 Appendix 5 9 Time Control program ccccecceeeceececeeeeeeeeeaeeseaeeseaeeeseceeseaeeecaeeecaeeesaneeseaeeseaeeteieeeseess App 98 Appendix 5 10 Clo
231. ing Deleting TOWS iia raaa E as PEREA E SETE ATRE AAE PARA 2 30 2 8 4 Cutting Copying ladder Program ccecceeceeceeeceeeeeeeeeceeeteeeeeeeseeeeeeseeesaeseeeseaeseeeseeeseneseaeseaaeaeseneeeaes 2 35 2 9 Saving Ladder Progra nunanmanta iea ieia en 2 38 2 9 1 Saving newly created or overwritten projects ee ee ceceeceeeeeeeeeeeeeeeeeeeeeseeeseeeseeeseeeseeeseaeseneeeaeeeneees 2 38 2 9 2 Saving a project under another NAME eeeeceeeceeeeeeeeeteeeeeeeeeeeeeeeseneseeeseeeseeeseeeseeeseeeseaeseneseateneteaes 2 39 2 10 Reading the Saved Project cceccsececscesseceeeeeeeeeeeseesaeesaeesaeesseesaeeseesaeesaeesaeeseeseeseesieesiesieesieesieeeeees 2 40 CHAPTER 3 PLC DEVICES AND PARAMETERS 3 1 to 3 4 S21 DeVICGS n ae hie eee Re ea nt ete ee ale 3 1 3 2 PALAIMGLCNS a2 EE EE E Wachee a bata EE E estat hates E E A A A E 3 3 CHAPTER 4 SEQUENCE amp BASIC INSTRUCTIONS Part 1 4 1 to 4 40 4 1 List of Instructions Described in this Chapter cc ccccccececeeeeeeeeeseeeeeeeeeeeeecaeeesaeeseaeeseaeeeseeeaeeeseneetaes 4 1 4 2 Differences between and e SET RST ieia e a mata ated 4 4 A S MEASUPING TIME inrer a a A O E E EEE cet 4 5 4 4 Counting by the Counter ceceeceeeceeeeeeeeeeneeeeeeeeeeaeesaeesaeeeaeesaeeeaeesaeesaeesaeesaeeeaeesaeesaeeseesaeeaeeeaeeeaeesreeatesas 4 6 4 5 PLS Pulse PUE Pula ss ise fees tree ioe tebe Roce faces eee tae ees dala tesew Paes ace eet a a Tae hee fa 4 13 A 6i MOH IMORS E AEEA AEEA
232. ing the key This forcibly switches the contact between closed and open To display the dialog box for changing current values double click the word device or press key while holding the key in the ladder monitoring screen of GX Developer 6 2 2 Setting and resetting device M Activate the CPU before proceeding with the procedure below 1 Click the button on the toolbar 2 The Device test dialog box appears Click Device and input M10 in the list box 3 Click the FORCE ON FORCE OFF button to set or reset M10 Buffer memory Module start 1 0 Hex Address E Setting value DEC gt 16bitinteger v Set Program 7 Label reference program pea Execution history Device Setting condition f Check Using Demonstration Machine Turn X4 off and check the following items 1 When M10 is set ye is de energized and the current value of the timer i x4 M10 K1500 TO is cleared to 0 B Confirm that the value on the digital display Y50 Y5F stops changing BCD TO Y5 2 When M10 is reset ye is energized and the timer TO starts counting from j 0 This count value increases by 10 at a second Monitoring screen with M10 set Confirm that the value on the display Y50 Y5F increases by 10 at a second With the same procedure bit devices other than internal relays M can also be set and reset forcibly 6 2 3 Changi
233. ings of intelligent function Automatic refresh modules setting These settings allow writing reading data to from intelligent function modules regardless of communication program creation or buffer memory address Ex When A D conversion module Q64AD is used elnitial setting A D conversion enable disable setting Sampling averaging processing designation Time average number of times average designation Average time average number of times designation Set data in initial settings is stored to the intelligent function module Automatic refresh setting Set a device on a QCPU to store the following data to Digital output from Q64AD Max min value of Q64AD Error code Set data in automatic refresh settings is stored to the intelligent function module parameter on a QCPU Device initial value Writes set data in device initial settings of intelligent function modules to the intelligent function modules at the following timings At power on of a QCPU ae intelligent function module At reset devices U GL At switch from STOP to RUN evices U L GL FROM TO Executes data read write to buffer memory on an intelligent function module Use this instruction in a instruction sequence program Intelligent function Directly treats buffer memory on an intelligent function module as a device of module device a QCPU Specify as a device in a U C GL Unlike FROM TO instruction this requires only one instruction for
234. ion base unit Use this extension base unit for mounting AnS series power supply modules I O modules and special function modules 7 2 Data Communication between Intelligent Function Modules and CPUs An intelligent function module and a CPU exchange mainly two formats of data Bit data Signals that use input Xs and output Ys Word data 16 bit data or 32 bit data QCPU Internal configuration of intelligent function module PLC CPU Function Input X CPU ii Output Y Bit data External I F Buffer memory Read data Device memory Y M T C D etc Write data Word data Figure 7 2 Internal configuration of intelligent function module 7 2 1 W O signals to CPUs For exchanging signals of 1 bit between a QCPU and an intelligent function module input Xs and output Ys are used X Y here does not mean external I Os but symbols that are used in a sequence program to exclusively represent I O signals of intelligent function modules Also note that I O numbers are assigned according to the slot where the intelligent function module is installed X Intelligent Xs in a sequence program represent signals function module that are input to a QCPU by an intelligent X IReapy signal function module These signals are MSE generated on an intelligent function module exe Note that the Xs are used as contacts in a X l program The followings are examples
235. ion of data of X30 to 3F and data of X20 to 2F is performed and the result is output to Y40 to 53 When the result is negative value Y70 is turned ON while Y40 to 53 are cleared to 0 o BINP K4X30 DO 0 BINP K4x20 D1 Y 400 P DO Dm F 300 400 x1 T 10 BINP K4X30 DO ae BINP K4X20 D1 Y 400 P DO D1 7 300 4007 20 P D1 ko ff DBCD D1 K5Y40 400 400 26lf lt D1 KO CY70 H Abe l C D DO D1 l D1 D0 gt Dp1 100 300 400 Related Practice Question Practice Question 9 5 4 2 BIN 16 bit multiplication BIN 16 bit division X0 0 MOVP K2000 DO x2 3 e P K30 DO D10 x3 7 IP DO K600 D20 ANSCHOOL 8 18 Program name MAIN fap 13 The device content specified by is multiplied by the device content specified by 62 and the result is stored in the device specified by when the input condition is turned ON 62 K30 DO D11 D10 30 x 2000 60000 16 bit 1 word is not enough for storing the result of 16 bit data x 16 bit data This device is handled as 32 bit register to hold the result Left most bit of D10 b15 is Thus D10 that is specified by the program nota sign bit and D11 which is the next device number It is handled as a part of the data work as the holder of the result RDO BENS BRE
236. is recommended as a spare of DOS V personal As required devices computer 9 6 Using Maintenance Supporters The following shows examples of maintenance supporters which are devices that automatically notify an operator or maintenance person faults or operation status of PLC used systems or devices 1 Error indication by commercial lamp Connect an error LED lamp to the output module of a PLC so that the lamp flashes at an error occurrence Lamp flicker Output module Y50 to Y6F Error indication lamp O O Control panel f SM1 SM412 A x Y50 Lamp Y50 flashes Error detection 1 second clock when an error is detected 2 Displaying an error code on a commercial digital display Connect the digital display to the output module of a PLC so that the error code number of the detected error is indicated on the digital display Display in numerical values Error Code Output module Y70 to Y8F Error indication lamp OOO error code error code o o 3 2 ooogo00 Control panel Jf BCD SD0 k2yY70 Error detection error code on the digital display i Display an error code number when an error is detected 3 Displaying the description of a detected error on the screen The details of an error occurred on a PLC can be displayed on an external CRT screen plasma screen liquid crystal screen etc
237. isplayed on the digital display Y40 to Y4F e Make sure that the devices Y70 to Y76 turn ON as follows The range that Y70 to Y76 turns ON 012345 10 15 20 25 30 35 40 45750 0 Count the current value of counter C10 Difference between and gt The counter is designed to be reset every 200 s e In this way the comparison instruction not only compares one data but also specifies the range This function is commonly used for the program that judges the passing status of products etc gt k50 c10 equals 50 Applicable device MELSECNET 10 H Intelligent direct function Internal device system user Jn module Un G Bt Word R Bt Word z kfafe a elokelo ot o o Jooel Ix instruction to Mee ee ee ee le Constant Basic number of steps ANSCHOOL QEXTO Program name MAIN Ladder Example Read the following ladder diagram from FD write it to the demonstration machine and make sure that gt lt instructions are correctly performed Os lt TO lt 3s Y70 ON 2 7 s lt TO lt 3 3 s Y71 ON 3s lt T0 lt 6s Y72 ON lt K27 TO H gt K33 TO Y71 gt gt K30 TO 4 lt Y70 gt gt lt K30 TO I YTA gt BCD TO K2Y40 H RST MO H Operating Procedure
238. itch X0 activates the three compressors all together and when sufficient pressure is obtained X2 X3 and X4 turn on the three compressors stop This is the basic operation of this system If all compressors are at stop with sufficient pressure provided and the pressure shortage Minor is detected X4 turns off one compressor is activated and supplies pressure until sufficient pressure is obtained The compressor activated as such is decided in order from A to C each time compressors are reactivated in reaction to pressure shortage Note that the stop switch X1 is available for stopping compressors at any time 2 If one compressor could not supply sufficient pressure the pressure shortage level goes up to Medium X3 turns off and the second compressor is activated to support the first compressor This second compressor will be compressor C if compressor A has been in operation A if B has been in operation and B if C has been in operation 3 If two compressors could not supply sufficient pressure pressure shortage level goes up to Major X2 turns off and the last compressor is activated When only one compressor is in operation and pressure shortage level goes from Minor to Major directly the rest two compressors are activated at once 4 When two or three compressors are in operation they continue operating together until sufficient pressure is obtained and stop together when obtained X4 turns on Timing
239. l Example K100 TOZ 4 K50 Coz Application Example e The data is written to the data register whose number is specified with the digital switch K3000 e Perform the device batch monitoring while conducting a check The operating procedure is the same as the one explained in Section 5 2 1 Enter any two digit number in the digital switch column X27 to X20 and turn XO ON Device DO Oo Oo 0 Oo Oo Oo DB 0 0 0 0 0 o 0 o 5 D16 0 0 o o o o o o aa D24 0 o o o o o o o o D32 0 0 0 o o o o o DOZO D50 D40 0 0 0 0 0 0 0 0 D48 0 0 o o o o o D56 0 0 5 0 o o o o TF a Pn A a A z The current value of T2 is transferred to D50 column 5 5 2 How to use file register R e The file register R is a register that consists of 16 bits as well as the data register D e The file register applies to the standard RAM of the QCPU and the memory cards SRAM card Flash card Stores the parameter program device comment Program memory and device default value File register cannot be stored Standard RAM Stores the file register from 1K to 32K Stores the parameter program device comment and device default value File register cannot be stored Stores the file register from 1K to 1018K Memory card The maximum number of the file register to be stored varies depending on the memory card in use e The data in the file register remains af
240. le 9 2 Periodic Inspection Ambient i temperature haa s a d ermometer and a Ambient humidity hygrometer Ambience Measure corrosive gas Power voltage iz oO E fa gt oO Measure a voltage across the terminals of 100 200VAC and 24VDC Move the module to 0 to 55 C 5 to 95 RH Corrosive gas must not be present 85 to 132VAC 170 to 264VAC When the sequencer is used in the board the ambient temperature in the board becomes the ambient temperature Change the power supply Retighten the screws 5 Looseness The module must be If the CPU I O or S 5 check for looseness rattling f installed fixedly power supply module is 3 and rattling Se eae s loose fix it with screws Adhesion of dirt Dirt and foreign matter and foreign matter Check visually Try to further tighten screws with a screwdriver Looseness of terminal screws Proximity of solderless terminals to each other Check visually Connection Looseness of Check visually connectors Check on the monitor mode of the GX Developer that M51 or SM52 is turned OFF Install the product on and the actual PLC Spare product Check on stored program Compare the stored program with the running program Rotational status Rotational sound Clogging Fan heat exchanger filter Analog I O Check the offset gain value must not be present Screws must not b
241. le being used paves Number of Steps vi QCPU QnACPU e Word device Internal device except for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K8 and which use no index 4 modification e Constant No limitations Devices other than above 3 3 The number of steps may vary depending on the device and type of CPU module being used Device Number of Steps QCPU QnACPU e Word device Internal device except for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K4 and which use no index 3 4 modification e Constant No limitations Devices other than above App 14 Instruction Category symbol 4 digit addition and subtraction operations Processing details D S gt D e S1 S2 D e S1 S2 D e D 1 D S 1 S D 1 D Execution condition Number of basic steps e S1 1 S1 S2 1 S2 gt D 1 D e D 1 D S 1 S gt D 1 D e S1 1 S1 S2 1 S2 D 1 D e S1 x S2 gt D 1 D S1 S2 Quotient D Remainder D 1 S141 S1 x S2 1 S2 D 3 D 2 D 1 D e
242. llowing figure to know in which operation each data file is needed QCPU Q25HCPU MODE O RUN ERR USER C 3 Write DER AS ae Personal computer USB A Shows intelligent function module RS 232 parameters B Shows data stored at text file creation lt Parameter of intelligent function module gt a This parameter data is created in the auto refresh settings and stored to the intelligent function module parameter file in a GX Developer created project Project Program Parameter PLC parameter Network parameter Intelligent function module parameter b For how to perform 1 to 3 on the above figure refer to the followings 1 Use GX Developer as follows Project Open project Save Save as 2 Open the GX Configurators screen for selecting a module on which parameter settings are to be made File Open file Save as 3 Use GX Developer as follows Online Read from PLC Write to PLC Intelligent function module parameters Or open the GX Configurator s screen for selecting a module on which parameter settings are to be made Online Read from PLC Write to PLC lt Text files gt a These files are text format files created using Text file creation operation in the initial settings auto refresh settings and the monitor test screen Use these files to create user s documents 74 Exercise System of Intelligent Function Module Use an A D
243. location starting from the device designated by D to index registers Z0 toZ15 Writes a batch of data to E7PROM file register App 44 Number of basic steps Appendix 2 4 Instructions for data link Instruction symbol Category Network refresh READ SREAD WRITE SWRITE vs 2 m m O Zz lt 0 REQ J ZCOM J n rs si oni 4 Jn S1 2 D1 Jn S1 S2 D1 JP READ D1 GP READ D1 J SREAD D2 G SREAD D2 JP SREAD D2 GP SREAD D2 J WRITE D1 G WRITE D1 JP WRITE D1 GP WRITE D1 J SWRITE D2 G SWRITE D2 JP SWRITE D2 GP SWRITE D2 S2 S2 JP SEND S2 GP SEND S2 S2 S2 JP RECV S2 GP RECV S2 D1 D1 D1 D1 Processing details Refreshes the designated network Reads the word device data of another station to host station Writes the data of host station to the word device of other stations Sends data message to other stations Receives data message sent to the host station Sends a transient request to other stations and executes it App 45 Execution condition qaja
244. lock K100 Hapen E X4 6 BCD C10 k4v40 SM400 ON at all times 62 10 gt K10 c10 V704 15 lt K10 cio rh 19 K20 mo 23 lt gt K30 C10 Y73 27 gt K20 C10 Krh lt K40 C10 34 41 lt K25 C10 H k35 c10 78 4 lt K10 C10 H gt K20 C10 lt K40 C10 H gt K50 C10 55 K100 C10 x0 The comparison operation instruction compares the data of source 1 67 and source 2 2 and brings the devices into conduction if the conditions are met e The instruction can be considered as one normally open 4 as they are only conducted when the conditions are met e 6 amp Becomes conducted when source 1 and source 2 agree e lt 6 6 amp Becomes conducted when source 1 is smaller than source 2 e gt 6 amp Becomes conducted when source 1 is larger than source 2 e lt 6 6 amp 2 Becomes conducted when source 1 and source 2 agree or when source 1 is smaller than source 2 gt 6 6 amp 2 Becomes conducted when source 1 and source 2 agree or when source 1 is larger than source 2 lt gt 6 6 amp 8 Becomes conducted when source 1 and source 2 do not agree Operation Practice e Write the program to the CPU e Turn ON both X3 and X4 e C10 starts to count one count every two seconds The current counted value is d
245. ly measured Number Contents D16 Time In 1 us units 0 to 999 us D17 Time In 1 ms units 0 to 65535 ms D18 D19 D20 D21 D22 Vacancy D23 D24 D25 D26 3 Program error location Number Contents Error Error D16 individual individual D17 File name S Error New O Rem i K D18 ASCII code 8 characters information information Bis D20 Extension s 2EH D21 ASCII code 3 characters D22 Pattern 4 D23 Block No D24 Step No Transition No D25 Sequence step No L D26 Sequence step No H 4 Contents of pattern data 1514 to 4 3 2 1 0 BitNo ojo to O O0 7 L Not used SFC block designated 1 not designated 0 SFC step designated 1 not designated 0 SFC transition designated 1 not designated 0 4 Parameter No 5 Annunciator number 6 Intelligent function CHK instruction module malfunction parameter error number for QCPU only Number Contents Number Contents Number Contents SD16 Parameter No SD16 No SD16 Parameter No SD17 SD17 SD17 Error code of intelligent SD18 SD18 function module SD19 SD19 D18 SD20 SD20 SD19 SD21 SD21 SD20 H Vacancy Vacancy SD22 SD22 SD21 y 5D23 023 022 Seabee SD24 SD24 SD23 SD25 SD25 SD24 SD26 SD26 SD25 SD26 1 For details of the parameter numbers refer to the user s manual of the CPU used 3 For extensions refer to REMARK at Appendix 66 App 68 Special Register List Continued Corresponding l A Set by Corresponding ACPU Number Name M
246. manual of each Register i computer a microcomp microcomputer package uter sub package routine INPUT Instructi Detailed D9091 SD1091 Stores the detail code of cause of an instruction error error code Head I O Head I O Stores the first two digits of the head I O number of number of j D9094 SD1094 SD251 VO module number of I O ne I O module which al be dismounted mounted to be module to be online with power on in BIN value Example Input replaced replaced module X2FO H2F D9100 SD1100 Output module numbers in units of 16 points of which fuses have blown are entered in bit pattern D9101 D1101 Preset output module numbers when parameter setting has been performed D9102 D1102 Bit pattern in 15 14 13 12 1110 9 8 7 6 5 4 3 D9103 SD1103 units of 16 D1100 0 o roo ojojo a 0 0 o0 0 D9104 SD1104 points sD1101 0 ofolo ojo lojojojoljo indicating the y D9105 SD1105 modules whose D1107 0 0 0 kajojojolojo o o Wx fuses have t D9106 SD1106 blown Indicates fuse flown status Fuse blow check is executed also to the output modules of remote I O stations D9107 SD1107 If normal status is restored clear is not performed Therefore it is required to perform clear by user program Set the set value of the step transition watchdog timer D9198 3D1109 and the annunciator number F number that will turn on when the watchdog timer times out D9109 SD1109 B15 to B8 B7 to BO D9110 SD1110 Step Ti
247. mat Bit amp Word Display 16bit integer Value DEC T C set value Reference program F Bi F abii Bit 32bit integer C HEX Man z C Word C Real number C ASCII character Click after entering the device number Device tP ED C 4B A90 t2 6 5 e t92 L 0 L Device test _Devie tea Close Current values of timer DO ll and counter They changes oo ol 157 A decimal number 157 is stored ol oo A decimal number equivalent to a 4A9Du C z T Indicates ON OFF state of each bit in the word devices Binary digit 0 Binary digit 1 AIE AIAJ F 8 OO s O Bnaybit m B o weight T Sign bit 19101 e Change the displayed decimal numbers into hex Select hex in the device batch monitoring dialog box Value DEC HEX Device Batch Monitor Window Device F EDC AQS 7654 43210 DO oo00 o000 0000 1111 0000F Dl 0000 o000 0011 0100 0034 D2 o0o00 0000 1001 1101 009D D3 0100 1010 1001 1101 449D D4 oo0o0 o000 oo00 o0oo0o0o0 0000 M f c M E a f M ee a t mm M N a am 7 R a AAAA e Change the display format to the corresponding binary codes Select Bit in the device batch monitoring dialog box Monitor format Bit amp Word C Word Device Batch Monitor Window Numbers in D1 Numbers in DO FEDC BASS 7654 3210 O FEDC BASS 7654 3210 0000 0000 0011 0100 0000 0000 0000 1111
248. me limit 0 8 s 2 Turn on X5 momentarily After that the timer T8 starts operating at the timing when X6 is momentarily turned ON X5 T8 0 H lt Y71 gt Y71 X6 Y71 K41 Taw Lo y y M45 Le M45 CIRCUIT END X5 Al X6 es o T8 coil M45 T L T8 normally close U e _ O O O L 6 e Set time limit 41s Note The above ladder behaves as an off delay ladder by momentarily turning ON input X5 and X6 M45 is equivalent to a momentary contact of T8 App 94 Appendix 5 5 On delay timer momentary input PLC s timers operate with the on delay system which allows easy continuous inputs but requires relays M for momentary inputs K62 The timer starts 0 M50 T4 after X1 turns ON and continue M50 self energized 8 Y70 Turn ON 6 2 s later T4 10 r n lt Y71 Turn OFF 6 2 s later CIRCUIT END a AL X2 T4 M50 _ a Y70 m Y71 Set time limit A 6 2s Note The above ladder behaves as an on delay ladder by momentarily turning on input X1 and X2 App 95 Appendix 5 6 ON OFF repeat ladder In an ON OFF repeat ladder Y70 turns ON when XO is turned ON and turns OFF when XO is turned ON again X1 0 A FF Y70 j CIRCUIT END Appendix 5 7 Preventing chattering input The timer is set so that it starts output when the input keeps being on for 0 2 s XO K2 0 T1 T1 5 M1 CIRCUIT END M1 turns ON when XO keeps being ON for
249. me setting transfer o D9111 SD1111 Monita value and the F Set time limit of timer 0 to 255 ti number at time 1 to 255 sec In 1 sec units imer D9112 SD1112 f out osne setting Set F number D9113 SD1113 By turning on any of MS1108 to SM1114 the monitoring timer starts If the transfer condition following a step which corresponds to the timer is not D9114 D1114 established within set time set annunciator F is tuned on D9116 D1116 When I O modules of which data are different from those entered at power on have been detected the D9117 SD1117 1 0 module numbers in units of 16 points are entered in bit pattern Preset I O module numbers set in parameters when D9118 D1118 Bit pattern in parameter setting has been performed units of 16 B15 14 13 12 1110 9 8 7 6 5 4 3 D9119 D1119 I O module points SD1116 0o o 0 0 0 verification indicating the SD1117 o o o o o D9120 D1120 error modules with wa v vw verification D1123 o ojo o 0 D9121 D1121 errors osz sonar t Indicates 1 O module verification error O module verify check is executed also to the D9122 SD1122 modules of remote O stations If normal status is restored clear is not performed Therefore it is D9123 SD1123 required to perform clear by user program App 87 ACPU Special Register D9124 D9125 D
250. ming Chart X5contact e The timer contact operates when a given delay time elapses after the coil is energized TO coil Ondelay timer aos 2 The allowable range of timer setting is between K1 to K32767 Low speed 100 ms timer 0 1 to 3276 7 s 7 High speed 10 ms timer 0 01 to 327 67 s When the timer setting value is TONormally open Y70 coil TONormally closeY71 coil set to zero it turns ON Time out by the execution of the instruction The following four types of timer are available Timer No Type Default The number of each type of Low speed timer timer can be changed in units of Cie TO to T2047 2048 aoe Counts time in increments of 100 ms 16 using parameters High speed timer e Change the output instruction Counts time in increments of 10 ms OUT to OUTH to select the Low speed retentive timer high speed timer or high speed Accumulates time in increments of 100ms retentive timer High speed retentive timer Accumulates time in increments of 10ms Refer to Section 6 4 for explanation on the retentive timers 4 4 Counting by the Counter RASCHOOL MAIN OUT Cis a 4 step instruction Timing Chart Counts when an input signal rises eX1contact e After the count the subsequent input signals are not counted Once the counter counts the contact status and the current C20 coil fe counter value do not change 1 2
251. mory card ei Set b Number Name Meaning Explanation Say ee When set Indicates memory card A model installed B8 B7 B4 B3 i io pr S Initial rive Does not exist RAM type 1 SRAM and card New QCPU removal 0 Does not exist Drive 2 1 SRAM ROM type 2 Memory type 2 ATA FRASH Memory card A 3 FLASH ROM card A models e Indicates memory card A model installed B8 B7 B4 B3 BO oh _ Drive 1 0 Does not exist RAM type 1 SRAM models S Initial and card removal 0 Does not exist ___ Drive 2 ROM type 2 EEPROM 3 FLASH ROM S Initial Drive 1 and card Standard Dri Hyi 5 removal RAM Drive 1 capacity Drive 1 capacity is stored in 1 K byte units S initial capacity and card removal S Initial Drive 2 and card Standard Dri PEP removal ROM Drive 2 capacity Drive 2 capacity is stored in 1 K byte units S Initial capacity and card removal e The use conditions for memory card A are stored as bit patterns In use when ON e The significance of there bit patterns is indicated below BO Boot operation QBT B8 B1 Parameters QPA B9 CPU fault history S Status B2 Device comments QFD change QCD BA SFC trace QTS B3 Device initial value QDI BB Local device QDL B4 File register R QDR BC B5 Trace QTS B6 B7 Memory Memory card A cardA use use conditions e The use co
252. n Boot designation Stores the drive number where the boot designation file S Initial Ne file drive number QBT is being stored Stores the file name of the boot designation file QBT Boot y B15 to B8 B7 to BO operation File name of SD661 2nd character ist character designation boot designation SD662 4th character 3rd character S Initial New file SD663 6th character 5th character file SD664 8th character 7th character SD665 1st character of extension 2EH SD666 3rd character of extension 2nd character of extension 6 Instruction related special registers Corresponding Set b Number Name Meaning Explanation ie ACPU a When set DOO SD705 During block operations turning SM705 ON makes it Mask Mask pattern possible to use the mask pattern being stored at SD705 or U New pattern P at SD705 and SD706 if double words are being used to SD706 operate on all data in the block with the masked values Number of vacant icati Stores the number of vacant blocks in the communications S Duri SD714 SORGA request area for remote terminal modules connected to the ps D9081 QnA on request AJ71PT32 S3 execution registration areas Patterns masked by use of the IMASK instruction are stored SD715 in the following manner IMASK B15 SD716 instruction Mask pattem sp715 15 S During New mask execution SD716 131 SD717 pattern SD717 147 D718 sore Accumulator Accumulator For use as replacement for accumulat
253. n Number of basic steps Store value of S1 at D Store value of S3 at D Store value of S2 at D S3 S1 gt D S3 S2 gt D S2 1 S2 0 D 1 D When S3 0 S3 S2 gt D When S3 lt 0 S3 S1 gt D When S3 1 S3 0 When S3 1 3 gt 0 0 D 1 D When S3 1 S3 lt 0 faba fa fal aS App 41 14 Switching instructions Category ineivedon Processing details Execution symbol 9 condition Number of basic steps e Converts extension file register block number to number designated by S QDRSET Fi e Sets file names used as file registers QDRSETP Fi QCDSET QCDSET File name Sets file names used as file registers QCDSETP QCDSETP File name in number of file name characters 2 indicates a step decimal fraction is rounded up File set 15 Clock instructions Instructi j Category era Symbol Processing details paar Clock element D 0 Year DATERD 1 Month 2 Day 3 Hour 4 Min DATERDP DATERDP 5 Sec 6 Day of week n Year Clock element DATEWR Month Day Hour Min DATEWRP Sec Day of week Number of basic steps
254. n word device Converts the Vn Series l results into a connection of falling pulse falling pulse Designates bit for bit Memorized by Designates bit device and devices and word devices Vn word device Parallel peri H Inverts a connection of Be device output Designates bit device and rising pulse Designates bit for bit 9 ore S word device devices and word devices Parallel Converts a DELTA connection of Delta direct output to falling pulse Designates bit for bit a pulse devices and word devices Converts the operation f DELTAP Converts a j g Delta P direct output to pertaP results intoa Designates bit device and DY S a pulse rising pulse word device 4 2 Differences between and e RISGHOOL MAIN x0 E Y OUT Instruction Eng The OUT instruction turns the specified device ON when receiving the input condition and turns the device OFF when the condition becomes OFF Timing Chart XO Y70 RASCHOOL MAIN SET RST instruction lt 3 gt The SET instruction turns the specified device ON when receiving the input condition and maintains the device ON status even if the condition becomes OFF To turn the device OFF use the RST instruction Timing Chart oe M X1 Y70 4 3 Measuring Timer ANSCHOOL K30 fi A Timer setting value Time limit 3 s TO 5 Y70 OUT T is a 4 step instruction Ti
255. n be changed online with power on when SM251 is turned ON after the head I O number of the I O module is set to SD251 One module only is allowed to be changed by one setting OFF Replacement To be switched on in the program or peripheral device test M3094 SM10934 Ouest VO change flag ON No replacement mode to change the mod le durae CPU RUN To be switched on in peripheral device test mode to change the module during CPU STOP RUN STOP mode must not be changed until I O module change is complete Presence OFF SFC programs not p PE M9100 SM11400 SM320 absence of ane g Tamed on if the SFC program is registered Turned off if it is SFC program ON SFC programs used Turned on by user to start SFC program M9101 sm1to1 SM321 Start stop SFC OFF SFC programs stop Turned OFF to stop SFC program by disabling operational program ON SFC programs start f outputs of execution steps Selects a start step of restarting SFC program with SM322 ON Makes the execution block restart from the execution step that was suspended when SFC program was stopped ats OFF Clears execution status of SFC program when SFC M9102 sm1102 SM322 SFC program OFF Initial Start program is stopped The block 0 starts from its initial start status ON Continue step Once turned on this relay remains on even if power supply is cut by latch with system To start with the initial step of blocks at power on turn this relay off with the
256. n output when block stop is executed ON Retains the ON OFF status of the coil being used by using operation output of the step being executed at block stop OFF All coil outputs are turned off Operation output by the SET instruction is retained regardless of the ON OFF status of M9196 Operation output at block stop OFF Coil output OFF ON Coil output ON SM SM 1 0 ne 1197 1198 displayed OFF Sibi eal aio reo Switches I O numbers in the fuse blow module storage OFF registers SD1100 to SD1107 and I O module verify error fuse and I O wos a et z verification storage registers SD1116 to SD1123 according to the combination of ON OFF of the SM1197 and SM1198 error display ON 1600 to a feo to 1FFO Data recovery OFF of online e Recovers the setting data stored in the CPU module at restart when sampling trace status latch is executed sampling SM1199 should be ON to execute again Data recovery H trace status Unnecessary when writing the data again from peripheral enabled i latch devices ZNRD instruction Depends on whether or not the ZNRD word device read LRDP Not accepted instruction has been received instruction for Accepted e Used in the program as an interlock for the ZNRD instruction ACPU e Use the RST instruction to reset completion ZNRD instruction LRDP Not completed instruction for End ACPU completion Data recovery disabled Depends on whether or not the ZNRD
257. n the CPU e Follow the following steps to perform device batch monitoring The contents from DO to D47 can be monitored After writing to PLC o gt Select Online Monitor Device batch Enter the device DO in the device batch monitor dialogue box Select Word for the monitor type Click the Start monitor button Enter DO Select Word Monitor format Bit amp WwWard Display 16bit integer Value DEC T C set value Reference program C Bit 32bit integer HEX MAIN Gio After setting the device and the monitor type ASCII character click this button Monitor screen 1 Turn X3 ON The numeric value 365 is sent to eight registers starting from DO to D7 all at once 2 Turn X4 ON The numeric value 7000 is sent to 16 registers starting from D8 to D23 all at once 3 Turn X5 ON 356 356 The contents of the 16 7000 7000 saod 7000 registers starting from DO to o o D15 are sent to the 16 356 356 7000 7000 registers starting from D32 to D47 all at once 4 Turn X6 ON 0 is sent to the all 48 registers starting from DO to D47 all at once In other words all the 48 registers are cleared to 0 at a time 27 0 90 0 0 0 0 0 2 0 0 0 0 0 0 o 2 0 0 0 0jojojo 3 0 0 0 0 0 0 0 210 0101019 1 0 0 3 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0O 310 0 0 0 0 0 0 Reference If a bit device is specified as 6
258. n the toolbar The Write to PLC dialog box opens Click the button and then click the button to write to a CPU After that activate a CPU and confirm the following items Write only the parameter settings to a second CPU in the same way i This is not necessary if there is only one CPU incorporated For how to write pa an o aea T E E esera 1 Turn on X2 to enable D A CH1 outputs 2 Convert digital values set in the digital switches X20 to X2F to analog values Whenever the set value of the digital switch is outside the range of 0 lt X lt 4000 4000 is D A converted to be output The digital value to be converted to an analog value appears on the digital display Y40 to 4F 3 The D A OUTPUT voltmeter displays the voltage value that the D A conversion module outputs MEMO CHAPTER 8 USING THE LOGIC TEST FUNCTION GX SIMULATOR Offline debugging is possible by adding the logic test function GX Simulator to a computer in which GX Developer is installed With the logic test function GX Simulator which allows sequence programs to be developed and debugged on a single computer checking a modified sequence program is easier and quicker Device Batch Butter Nemary Entry Device 0700005 With the logic test function GX Simulator substituting a PLC CPU ladder monitoring device tests etc can be performed without a PLC CPU
259. n time skipped by the MC to MCR hardly changes i The status of the devices which exist in the skipped area becomes as follows All the devices are turned OFF by the OUT instruction The SET RST and SFT instructions make no change and values of the counter and retentive timer remain unchanged The 100ms timer and 10ms timer are reset to zero You do not need to write contacts for the master ee INO M98 H control when creating the ladder NOE Mog Anier creating the ladder convert it F4 and amtar into the read mode The contacts are automatically inserted Application e The instructions can be used to create the program for switching between manual and automatic operations Refer to the Ladder Example Applicable Device f Intelligent Internal Device File MELSECNET 10 function system user register H Direct Jn register module Un G enter Oo ee ee mai The basic number of steps of the MC instruction is two and that of the MCR instruction is one Index Basic number of steps SC a 4 19 Nested MC to MCR Program Example The MC and MCR instructions can be nested as shown below A SCHOOL Program name MAIN X5 0 1H an x2 ey peene 2 6i C MC NO M6 NO M6 K5 X6 54i co x3 eee 10 4 C MC N1 M7 Looe oe X0 22 e C SET Y72 X4 24 MC NO M8 No M8 X1 pE EA 13 The MC to
260. nd 1 are referred to as bits Decimal oO 110 111 1000 ONO OB ON e Let s look at how the binary number shown below is converted to decimal 10011101 The diagram below depicts the binary number with the powers of two written beneath it The same incrementing pattern as the decimal system goes for the binary system except for the difference of the radix Since the binary method uses only 0 and 1 ies it has more carries than the decimal method lt Bit number Tepe TTT Pop Ero z 2 2 2 2 2 2 2 lt Base number 2 raised to the power of digit number 128 64 32 16 8 4 2 1 From the diagram we see that the binary number can be broken down as 1x128 0x64 0x32 1x16 1x8 1x4 0x2 1x1 Bit value So the equivalent decimal number is 128 16 8 4 1 157 The decimal equivalent of a binary number can be calculated by adding together each digit 1 multiplied by its power of 2 Hexadecimal e The hexadecimal often called hex for short is a numeral system with a radix of 16 usually written using the symbols 0 9 and A F The A F represent 10 15 respectively as shown in the table below When F is reached counting begins at 0 again with the digit to the left being incremented just like the decimal and binary system oO oO oO 1 1 1 2 2 10 3 3 11 4 4 100 5 5 101 6 6 110 7 7 111 EEEE aE Sa EEE 9 9 1001 10 A 1010 11 B 1011 12 C 1100 13 D 1101 14 E 1110 15 F 1111 cent a a 77 GRE GERA 17 11 10001 1
261. nd CPU module cannot be made detection S Error format QnA ae status B15 B9 B8 BO change 8th 1st 8th 1st module module module pe gt Information of 2 Information of 1 Number of Number of A e Val tored h the t station 1 0 ber of th sD60 module with module with Bee ee ee E A E E ER S Error D9000 blown fuse fuse blown module with the blown fuse VO modul I O module O Rem mogu e verification The lowest I O number of the module where the I O module SD61 verification dul i S Error D9002 error number pel ule verification error took place number Annunciator Annunciator e The first annunciator number F number to be detected is S Instruction SD62 i D9009 number number stored here execution SD63 N mber of Number of Stores the number of annunciators searched Instruction D9124 annunciators annunciators execution Extensions are shown below SD10 SD1 PPE Higher 8 Lower 8 Higher 8 ceils File type bits bits bits sm am aon __ Device intial value sm am s QDR__ Fieregster o App 69 Special Register List Continued Corresponding gt Set b 2 2 ae then cet or oR DILL lanation sp64 When F goes ON due to OUTF or SETF j the F numbers which go progressively ON from SD64 through SD79 SD65 are registered The F numbers turned OFF by RST F are deleted from SD66 SD64 SD79 and the F numbers stored after the deleted F
262. nd click the E button and then write the sequence program again debug you need to stop the logic test function i 6 After the debug is completed click the a button to terminate the logic test function GX Simulator When monitoring is in operation terminate the monitor mode before terminating the logic test function GX Simulator 8 2 Monitoring Device Status and Testing Devices This section describes how to monitor device status turn bit devices on off forcibly change word device values etc Exercise this function with the program Project name QLLT 1 Turning bit devices on or off forcibly In the example operation below bit device X is monitored and X0 is forcibly turned on st LADDER LOGIC TEST TOOL 1 On the logic test function GX Simulator Egg Tools Help window click Start Monitor Function Device Memory Monitor menu IO System Settings Serial Communication Function __ Device Manager TRAP 1 Click RUN ERROR USER gt SWITCH e STOP RUN NEGET C STEPRUN 1 0 SYSTEM RUN B Transfer setup Ed 2 Check the Host Station and click the button on the Transfer setup window Host Station Other Statio Device Memory Monitor I 3 Set XO in the Device column on the Device Menu Online a Sah BARE ESS Memory Monitor window fo Gielen eis TO EEE
263. nditions for memory card A are stored as bit conditions patterns In use when ON e The significance of there bit patterns is indicated below BO Boot operation QBT BB Simulation data B1 Parameters QPA Device comments Q B9 CPU fault history S Status QFD B10 SFC trace QTS change B4 File R QDR B11 Local device QDL B5 Sampling trace QTS B13 QCD B3 Device initial value QDI B6 Status latch QTL B7 Program trace QTP B14 B15 Indicates memory card B model installed B8 B7 B4 B3 ao __f _ Drive 3 0 Does not exist Memory ard B RAM type 1 SRAM S Initial New QCPU models 0 Does not exist ___ Drive 4 1 SRAM ROM type 2 E2PROM 3 FLASH ROM Drive 4 is fixed for 3 since it incorporates a flash ROM App 78 Special Register List Continued Corresponding A Set b Number Name Meaning Explanation iN or eu vee Indicates memory card B model installed B15 B8 B7 B4 B3 BO 0 lt gt 0 lt gt Q2A S1 Memory card B Drive 1 0 Does not exist S Initial Q3A models RAM type _ 1 SRAM Q4A i 0 Does not exist Q4AR Drive 2 2 EEPROM ROM type 3 FLASH ROM Drive 3 capacity is stored in 1 K byte units Sonita QCPU Drive 3 Fixed for 64 since Drive 3 incorporates 64 K bytes RAM Standard isi i Q2A S1 RAM rive 3 capacity Q3A Drive 3 capacity is stored in 1 K byte
264. ng a current value of device T ss nt hk shh Tk Tn si lt I ead mode MAIN 38 Activate the CPU before proceeding with the procedure below BeISmUVReOS LR LL Le 1 Click the Fal button on the toolbar Device test 2 The Device test dialog box appears Click eu Device in Word device buffer memory area and input TO in the list box Hide history FEON 2 Click to set 2 Word device buffer memory 3 Click Setting value and input 1000 in the list Device fto zl box Buffer memory Module start 1 0 z Hex 3 Click to set H 4 Click Te 4 After the setting is completed click the E DEC 6bititeor Seti button to forcibly change the current value of Pega TO to 1000 Label reference program X Execution history Device Setting condition Check Using Demonstration Machine 1 Confirm that the value on the digital display Y50 Y5F changes to 1000 by pressing L3 With the same procedure word devices other than timers T can also be changed in their current values 6 2 4 Reading error steps project LD Read mode MAIN 38 Step Activate the CPU before proceeding with the Inline Diagnostics pols C procedure below 1 Click Diagnostics gt PLC diagnostics a net hasar ink CC Link LT diagnostics System monitor Online moa ie chan
265. ning off 7 x C RST T195 Can be cleared by turning on X1 CIRCUIT END App 102 Appendix 5 14 Switching timer set value externally 1 With an external switch a value to be set in one timer can be selected from three patterns 1s 10s and 100s A timer is activated and reset by a pushbutton switch OL Indicates the timer is in operation RL Indicates the timer has gone time out PB_ _ Starts the timer x3 Load PB Resets the timer o o X4 to Input power supply Load power supply Path name A SCHO Project name QA 22 Program name XO 0 1k MOV K10 DO H Set value 1 s X1 3 r s Mov K100 DO H Set value 10 s X2 6 m masss Mov K1000 DO H Set value 100 s X3 3 a a SET MO H Starts the timer X4 4 RST MO H Stops the timer MO DO 12 lt T8 gt be be yT gt ON while the timer is T8 in operation 19 lt Y71 gt Turns ON when the timer goes time out 72 Pal CIRCUIT END App 103 Appendix 5 15 Setting counters externally With an external digital switch having 4 digits counters can be set remotely and their current values are displayed in 4 digits In addition to every count up the timer outputs data when it reaches a value of 100 and 50 before the set limit Note that a setting error is indicated if the set limit of counters is less than 100 I O UNIT1 Digital switch BCD x 4 digits e e E DC12V X20 2F I O I O 1 0 UNITO UNIT3 UNIT
266. ns to 1 ON 3 Turns to 1 ON when communication between the mounted CC Link module and CPU module cannot be made Information of 3 Information of 2 Information of 1 lt gt lt gt lt gt B15 _B12B11 Siero Vacancy B8 B7 B4 B3 BO 1st module 2nd module 3rd module SD280 CC Link error Device Ot Rem 4th module Number of points allocated for X Number of points allocated for Y Number of points allocated for M Number of points allocated for L Number of points allocated for B Number of points allocated for F Number of points allocated for SB Number of points allocated for V Number of points allocated for S Number of points allocated for T Number of points allocated for ST Number of points allocated for G Number of points allocated for D Number of points allocated for W Number of points allocated for SW Stores the number of points currently set for X devices Stores the number of points currently set for Y devices e Stores the number of points currently set for M devices Stores the number of points currently set for L devices Stores the number of points currently set for B devices e Stores the number of points currently set for F devices Stores the number of points currently set for SB devices allocation Same as parameter contents Stores the number of points currently set for
267. nsition B15 B8 B7 BO SD93 Corresponds to SM93 D9111 eae F number for t timer setting SD94 value timer set Corresponds to SM94 Set F number Set time limit of timer D9112 Enabled value and 0 to 255 1 to 255 sec U SD95 time over Corresponds to SM95 In 1 sec units D9113 only when Sitor Turning ON any of SM90 to SM99 SD96 SFC Corresponds to SM96 during an active step starts the D9114 program timer and if the transition SD97 exists Corresponds to SM97 condition next to the corresponding step is not met SD98 C ds to SM98 within the timer time limit the set SD99 Corresponds to SM99 annunciator F turns ON Stores the xCH1 preset transmission transmission K3 300bps K6 600bps K24 2400bps K48 4800bps D105 speed speed when K96 9600bps K192 19 2kbps K384 38 4kbps setting GX K576 57 6kbps K1152 115 2kbps RS232 Developer is used Module No New New New ew N QCPU remote E No fi NE which has Stores the lowest head No of the module whose external external S Error external power supply is OFF a ower Applicable only for Q series modules For future use oecurren e supply OFF p supply error App 70 Special Register List 2 System information Corresponding Set by ACPU When set Corresponding Meaning CPU Explanation e The switch status of the remote I O module is stored in the following format B15 lt Vacant 1 Remote I O module switch st
268. numbers are shifted to the preceding registers Execution of the instruction shifts the contents of SD64 to SD79 SD68 up by one This can also be done by using the INDICATOR RESET switch on the Q3A Q4ACPU After 16 annunciators SD69 have been detected detection of the 17th will not be stored from SD64 through SD79 SET SET SET RET SET SET SET SETSET SET SET Table of F50 F25 F99 F25 F15 F70 F65 F38 F110 F151 F210LEDR Annunciator AA A A A A A A A A A AA g detected 50 50 50 50 50 50 50 50 50 50 99 Detected No S Instruction detection annunciator 2 3l2l3l4ls5slel7lalols execution SD72 numbers No of detected numbers annunciators 50 50 50 50 50 50 99 99 99 99 15 15 15 70 0 70 70 65 38 SD67 SD70 SD71 a e a e a e SD73 N a ce SD74 SD75 SD76 Detected No SD77 SD78 New jaj lo o jojojolojojojojojojolglalas o jo jojoj ojo jojoj o ojojojojo o jojojojojojojojo ojojojojo SD79 New ew SD80 CHK e Error codes detected by the CHK instruction are stored as S Instruction N number BCD code execution SD90 Corresponds to SM90 F number that will be turned ON D9108 when the step transition watchdog SD91 Corresponds to SM91 9 D9109 timer setting or watchdog timer SD92 Step Corresponds to SM92 time limit error occurs D9110 tra
269. o copy 5 Drag the mouse cursor over the ladder to m specify the area The selected area will be highlighted A 4 END proc ccf eee eee ee eee ee ee ee ee ee ee ee ee ee I I Click the step numbers and drag the mouse cursor vertically to specify the area in ladder block units 6 Click on the tool bar or select Edit gt G copy ctri c to copy the specified area i 6 Click H tro 7 Click any ladder block to move the cursor to ae ee ee the ladder The copied ladder will be pasted N i j The ladder will be pasted above this block right above the row with a cursor n Click to move urson Continued on the next page Continued from the previous page 8 Click on the tool bar or select the Edit gt paste menu Ctrl v to paste the specified area ind Replace Convert View f 9 The copied ladder will be pasted 9 Complete pa i END 2 9 Saving Ladder Program 2 9 1 Saving newly created or overwritten projects 1 Click on the tool bar or select the Project i MELSOFT series GX Developer Unset project LD Edit mo Proj Edit Find Replace Convert Yiew Online Diagnostics Too gt Overwrit
270. ocessing Initial Set only during initial processing when power supply is turned ON or when going from STOP to RUN Status change Set only when there is a change in status Error occurrence Set when error is generated Instruction execution Set when instruction is executed Request Set only when there is request from a user through SM etc Correspondi Indicates special relay M90 corresponding to the ACPU ng ACPU Indicates as Change when there has been a change in contents M9LLT 1 e Items indicated as New have been newly added for Q QnACPU Indicates the applicable CPU type name O Rem Indicates all the CPU and MELSECNET H remote I O modules Indicates all types of CPU Indicates the Q series CPU Indicates the QnA series and Q2ASCPU Indicates the MELSECNET H remote I O modules Each CPU type name Indicates the relevant specific CPU module Example Q4ARCPU Q3ACPU Applicable CPU For details on the following items refer to these manuals e Networks Q corresponding MELSECNET H Network System Reference Manual PLC to PLC network e Q Corresponding MELSECNET H Network System Reference Manual Remote I O network e For QnA Q4AR MELSECNET 10 Network System Reference Manual e SFC QCPU Q Mode QnACPU Programming Manual SFC 1 SD1200 to SD1255 are used for QNACPU These relays are vacant with QCPU 2 SM1500 or later is exclusively used for Q4AARCPU App 50 Special Relay List 1 Diagnostic in
271. of Y70 to Y77 flash as they are connected to the address 5 e Results of outputting to Y70 or Y74 cannot be confirmed on any displays as address 7 for output modules no longer exists To display normally change the device number from K4Y50 to K4Y30 and from Y70 Y77 to Y50 Y57 6 4 Using Retentive Timers When an input condition is turned on the coil is energized Then the value of a retentive timer starts increasing Once a current value has reached the set value a retentive timer goes time out and its contact turns on If the input condition is turned off during that increase the coil is de energized but the current value is kept To restart the increase which means to accumulate values turn input conditions on again to re energize the coil K50 ST1 Before using as a retentive timer specify the number of points in parameters X6 contact ST1 coil A ST1 a contact X7 contact to input RST instructions ST1 current value 0 30 30 50 50 An RTS instruction must be used to turn off the contact and clear the current value after the retentive timer goes time out In the example operation below the retentive timer is set to STO to ST31 Unset project G e comm arameter EL Device memory E Device init 1 Double click Unset project Program Device commen Parameter i Network param a Remote pass EL
272. of the signals 1 READY signal This signal notifies a QCPU that an intelligent function module started up Figure 7 3 X from intelligent function normally at power on and is ready for module operation 2 Comparison result This signal is used by high speed counter modules The modules compare an input count value with the set value to notify a QCPU the results of the comparison larger gt smaller lt or match Y Intelligent function module SETs RSTs or OUT Ys represent output signals transmitted from a QCPU to an intelligent function module These signals are generated on a QCPU Note that they are used as coils or contacts in a program Output enable Write to user range Ex D A conversion modules output an enable instruction output enable wal before outputting analog values that Figure 7 4 Y from CPU were converted from digital values Channel change 7 2 2 Data communication with intelligent function modules Data is transmitted or received in 16 bit or 32 bit units Intelligent function modules have buffer memory to store those data Intelligent function module Buffer memory address D A conversion enable disable CH 1 Digital value CH 2 Digital value Readable and writable by QCPU System area Not used CH 1 Set value check code CH 2 Set value check code Example of memory map Q62DA Digital Analog Conversion
273. ogram use the following program to know how many faults were occurred and fault code numbers of the faults occurred Sequence program flow Operating procedure Fault detection ladder Device F is used in the program example X2 ONOFF Display B Display A 1 Search fault ON devices Displays the number of i oe ik Ser Ai 2 Display the number faulty devices on display A Y50 to Y5F Y40 to Y4F of faulty devices Display C Y60 to Y6F Condition of program The total number of XO ON OFF Displays the first fault number Displays the fault number on display C faulty circuits are set to 50 x4 ON OFF Displays the number of remaining faulty devices This number includes the next fault number and currently displayed fault number Displays the number of remaining faulty devices on display A Displays the next fault number on display C Displays the last fault number App 128 12 16 20 24 28 32 36 40 44 48 Project name QA 31 Program name MAIN X20 S FB X24 ea SSSA X28 AT lt F8 X2C npea X30 S F833 X34 a F895 X38 lt F37 X3C lt F39 x4 _ FA X5 He F X6 miea S A X7 eee X2 M200 r THT 1 f DSUMP K8F1 DO C MOVP DO D10 Ef DSUMP K8F 33 D0 S DO D10 C SET M400 S HH RST M700 X000 M200M400 SET
274. on Number of basic steps e Conductive status when S1 1 S1 S2 1 S2 e Non conductive status when S1 1 S1 S2 1 S2 LDD lt gt e Conductive status when S1 1 S1 S2 1 S2 e Non conductive status when S1 1 S1 S2 1 S2 ANDD lt gt e Conductive status when S1 1 S1 gt S2 1 S2 e Non conductive status when S1 1 S1 lt S2 1 S2 32 bit data comparisons e Conductive status when S1 1 S1 lt S2 1 S2 e Non conductive status when S1 1 S1 gt S2 1 S2 e Conductive status when S1 1 S1 lt S2 1 S2 e Non conductive status when S1 1 S1 2 S2 1 S2 e Conductive status when S1 1 S1 2 S2 1 S2 e Non conductive status when S1 1 S1 lt S2 1 S2 1 The number of steps may vary depending on the device and type of CPU module being used Device Number of Steps VI QCPU QnACPU e Word device Internal device except for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K8 and which use no index 5 3 modification e Constant No limitations Devices other than above QCPUs need the increased number of steps
275. on module switch settings ee eeceeeeeeeeeeeeeeeeeeeeeeeeeeaeeseesaeeseeseeseesieesieesieteesieee 7 17 7 6 4 Setting with GX Configurator aerei iaei AER A ii E RARA Eiai 7 19 7 6 5 Exercise with the demonstration machine cccecceeeceeeeeeeeeeeeceeeeeeaeeeeaeeesaeeseaeeteaeeeceeesieeeseeenaes 7 21 CHAPTER 8 USING THE LOGIC TEST FUNCTION GX SIMULATOR 8 1 to 8 16 8 1 Operating Procedure of Logic Test Function GX Simulator ssessessssrssresreersrsrstrsrnstnstnsrnsrnsrnsrnsrnnt 8 2 8 2 Monitoring Device Status and Testing Devices 00 0 eceeceeceeeeeeeeeeeeeteeeseeeseneeeeeseeeseeeseeeseeeseaeseneseaeeaeeaaes 8 4 8 3 I O System Settings FUNCtON ee cecceeeeneceeeeeeeeeeeeeeeeaeeeaeeeaeeeaeseaeeeaeeeaeeeaeeeaeecaeeeaeeeaeeeaeeeaeeeateeeeeatesas 8 8 8 3 1 Device value input cece ceeccceeceeeeceeeeeeeceeeeeeaeeceeneeceneeeaeesaceseaneceaneesaeeseaeeseaceeseceeteneeeeaeeseeeesineeeans 8 9 8 3 2 Timing Chart value input ee eeceeeeeceeeeeeeeeeeeeesaeeeaeesaeesaeesaeesaeesaeesaeesaeesaeeseesieesieesieesieeseetieesieeseee 8 11 8 3 3 Executing the I O system SettingS ceeccecceeeeeeeeeeeeteeeeeeeseesaeesaeesaeeseesaeeseesieesieesieesieesieeneesineseees 8 15 9 1 Lypicall Troubles s ai vencyte te E ele teeta ene ile et ae etn ile etn a eae 9 1 9 2 Maintenance E E E A E E T T E E E E 9 2 9 3 Consumable Produetsiisf i4 pickle at eeanceklataleniatbee ddd ae a aa aa a ae a ea a abelian 9 3 9 4 Service Li
276. oper and written to the CPU of the demonstration machine by monitoring the ladder on the screen 1 When X2 is OFF Computation when X2 is OFF 1 Operates from 0 to FEND alas 2 Y70 turns ON OFF when turning X3 1 CALL P10 ON OFF ai xX 3 Y71 remains unchanged even when al out Yo y turning X4 ON OFF 5 FEND r 6 P10 2 When X2 is ON 71 LD x4 1 After executing P10 subroutine 8l OUT Y71 operate from Step 4 to FEND 9 RET 2 Y70 turns ON OFF when turning X3 a ON OFF Operation when X2 is ON 3 Y71 turns ON OFF when turning X4 ON OFF Related Practice Question Practice Question 4 4 7 3 FEND F end FEND FEND isa one step instruction e Use the FEND instruction as the END instruction under the following conditions 1 When a sequence program must be executed and terminated in each program block For example use this instruction with CJ and SCJ instructions 2 When using the subroutine programs CALL and RET instructions 3 When using an interrupt program e After each execution of the FEND the PLC processes the current value of the timer and counter and makes self diagnostic check and then re operates from 0 step 0 oH CALL Operation Sequence program when not Sequence program executing CJ Jump by CJ Hoe ki w Sequence program Operation d Subroutine program when executing CJ E p Interrupt pro
277. ors used in A series s u New programs SD719 Program P No No PERN Es Stores the program number of the program to be loaded by SD720 designation OAD the PLOAD instruction when designated U New QCPU for PLOAD i Range 1 to 124 instruction instruction Number of vacant CC Link Stores the number of vacant registration area for the request S During communicati for communication with the intelligent device station New QnA on request connected to A 1S J61QBT 11 execution registration areas Special register that temporarily stores keyboard data input S During 9736 PKEY Input PKEY Input by means of the PKEY instruction execution New App 80 Special Register List Continued Corresponding Set b Number Name Meaning Explanation rod ACPU ee When set bano Stores the message designated by the MSG instruction B15 to B8 B7 to BO D738 2nd character 1st character D739 4th character 3rd character D740 6th character 5th character D741 8th character 7th character D742 10th character 9th character D743 12th character 11th character D744 14th character 13th character D745 16th character 15th character D746 18th character 17th character D747 20th character 19th character D748 22th character 21th character D749 24th character 23th character D750 26th cha
278. ortage Medium gt Pressure shortage Minor H Turns on M9 at startup H Shifts by pressure shortage Minor Reset when X1 stop turns on H H H H 4 H Shift register H H H H Returns shift to M10 gt Compressor A gt Compressor B gt Compressor C After the basic operation one compressor is activated in reaction to pressure shortage detected To use the three compressors equally there is ordering control available This control is enabled by the 3 stage ring counter ring shaped shift registers M10 to M12 A shift signal is generated when pressure shortage is detected X04 switches from on to off Compressor gt gt B Cc A M12 Shift operation x4 00a TTT M10 M11 App 116 Appendix 5 22 Application example of positioning control The following is an example of a positioning system with a pulse generator that outputs pulses per motor brake and unit of distance In this system a command value is set with the digital switch and this set command value is compared with the current value at start up to decide in which way forward or reverse the motor rotates The current value in the register D16 is subtracted by 1 when in forward direction and incremented by 1 when in reverse direction Positioning completes when the command value matches the current value The current value is converted to a BCD value so that current position is represented
279. pause contact coil ON PAUSE enabled PAUSE status OFF PAUSE notin effect has turned on and if SM204 is on PAUSE mode is set and M9041 SM1041 SM204 ON PAUSE in effect SM206 is turned on App 60 Special Relay List Continued ACPU Special Special Special Relay after Relay for Name Meaning Details Relay Conversion Modification STOP status OFF STOP not in effect 3 A aS a M9042 SM1042 SM203 ON STOP in effect Switched on when the RUN key switch is in STOP position OFF Sampling trace in Turned on upon completion of sampling trace performed the i number of times preset by parameter after STRA M9043 SM1043 smeos Sampling trace progress Rae p yp completed ON Sampling trace instruction is executed completed Reset when STRAR instruction is executed e Turning on off SM803 can execute STRAR instruction SM803 is forcibly turned on off by a peripheral OFF ON Same as device execution STRA i A Sioa sma03 Sampling trace ONOFF Same as When switched from OFF to ON LSTRA instruction M30 STRAR When switched from ON to OFF STRAR instruction execution The value stored in SD1044 is used as the condition for the sampling trace At scanning at time Time 10 ms unit The SM1045 relay is turned on to reset the WDT when the Roe Watchdog 4 oes M9045 SM1045 timer WDT OFF Does not reset WDT ZCOM instruction and data communication request batch ON Resets WDT
280. pl windows ispla edited play 1 Press function key F2 write Shift F2 read or monitor to switch between os mode To convert press conversion key 2 Edit ladders using C copy Ctrl Vv paste and X cut 3 Press to convert Press to perform write during RUN Press Alt Ctrl F4 to perform write during RUN to all programs currently being edited App 133 Mitsubishi Programmable Logic Controller Training Manual Q series basic course for GX Developer MODEL SCHOOL Q BASIC WIN E MODEL 13JW50 SH NA 080617ENG A 0601 MEE afa MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice
281. pond to ACPU special relays M9000 to M9255 after A to Q QnA conversion These special relays are all set by the system and cannot be set by the user program To turn them ON OFF by the user program change the special relays in the program into those of QCPU QnACPU However some of SM1084 and SM1200 to SM1255 corresponding to M9084 and M9200 to M9255 before conversion can be turned ON OFF by the user program if they could be turned ON OFF by the user program before conversion For details on the ACPU special relays see the user s manuals for the individual CPUs and MELSECNET or MELSECNET B Data Link System Reference Manuals he processing time may be longer when converted special relays are used with the CPU Uncheck A series CPU compatibility setting within the PC system setting in GX Developer parameters when converted special relays are not used The following are additional explanations about the Special Relay for Modification column 1 When a special relay for modification is provided the device number should be changed to the provided QCPU QnACPU special relay 2 When is provided the converted special relay can be used for the device number 3 When X is provided the device number does not work with QCPU QnACPU Special Relay List ACPU Special Special Special Relay after Relay for Name Meaning Details Relay Conversion Modification Turned on when there is one or more output modules of
282. put module 5 e Input refresh Input data in the input module is batch read 1 before the execution of 0 step and stored to the data memory for input X e Output refresh Data 2 in the data memory for output Y is batch output to the output module before the execution of 0 step e When the input contact instruction is performed Input data is read from the input X data memory 3 and a sequence program is performed e When the output contact instruction has been performed Output data 4 is read from the output Y data memory and a sequence program is performed e When the output OUT instruction is performed The sequence program operation result 5 is stored in the output Y data memory App 2 Appendix 1 3 Comparisons between the direct mode and refresh mode In the example ladder given below input XO turning on leads to output Y70 turning on Direct mode Refresh mode 1 Ladder example Program is performed Program is performed Input instruction LD DX0 Input instruction LD X0 Output instruction OUT Y70 m Output instruction OUT Y70 0 I Minimum delay a i Minimum delay 2 Response lag Xo from when input Internal input i Y70 is changed to Execution time of the instruction when output is changed Maximum delay Maximum delay accordingly amp xo Delay Ss 1 scan Me day 2 scans e The delay time ranges from 0
283. putting 255 from Y40 for example A T 1 mO ao So 2 i aa 2 1 m 5 1 O O Q O 128 64 32 16 8 4 2 1 E E 1 111 11 E 1 2 4 38 16 32 64 128 255 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40 7 Y43 lt Y44 7 Y45 The question deals with 64 point Y40 to Y7F outputs oe ar y46 How many blocks are required for 255 on an output unit basis O Y47 The program created by the sequence instruction without FMOV instruction is shown below The number of steps used is 130 XO 0o Y40 gt H Y4 H lt Y42 gt H A gt 5 7 4 ANSCHOOL ATEST Program name MAIN Practice Question 4 Comparison instruction Use the two BCD digital switches perform A B operation and show the result on the BCD digital display Y40 to Y4F Jagg EEE Gleeie X3F to X30 X2F to X20 Y4F to Y40 Display the result of A B calculation on the BCD display of Y40 to Y4F If the result is a negative number however make sure that the display turns to 0 and the LED of Y70 turns on Fill in the blank square of the program below and check to see if it works properly with the demonstration machine K4X20 DO I K4X30 D1 DO D1 _3 _ KO D1 a a a Y70 MOV KO K4Y40 D1 K4Y40 The constant should be output from the CPU in binary form DO D1 D
284. r Relay for Relay Conversion Modification M9112 SM1112 M9113 SM1113 M9114 SM1114 SM96 M9180 SM1180 SM825 M9181 SM1181 SM822 M9182 SM1182 SM821 M9196 SM1196 SM325 M9197 SM1197 Mere M9198 SM1198 Re M9199 SM1199 Q M9200 SM1200 M9201 SM1201 Special Relay List Continued Meaning Details Step transition watchdog timer start equivalent of SD94 Step transition watchdog timer OFF Watchdog timer reset start ON Watchdog timer reset equivalent of start SD95 Step transition watchdog timer start equivalent of SD96 ee age OFF Trace start Set when sampling trace of all specified blocks is completed ping ON Trace completed Reset when sampling trace is started completion flag OFF Trace not being Turns ON when the measurement of the step transition watchdog timer is started Turning this relay OFF resets the step transition watchdog timer AEN Sep So executed e Set when sampling trace is being executed Reset when ping ON Trace execution sampling trace is completed or suspended execution flag underway Selects sampling trace execution enable disable Active step OFF Trace ON Sampling trace execution is enabled sampling trace disable suspend OFF Sampling trace execution is disabled permission ON Trace enable Sampling trace execution is disabled If turned off during sampling trace execution trace is suspended Selects the operatio
285. racter 25th character D751 28th character 27th character Message Message D752 30th character 29th character S During New O storage storage D753 32th character 31th character execution D754 34th character 33th character D755 36th characte 35th character D756 38th character 37th character D757 40th character 39th character D758 42th character 41th character D759 44th character 43th character D760 46th character 45th character D761 48th character 47th character D762 50th character 49th characte D763 52th character 51th character D764 54th character 53th character D765 56th character 55th character D766 58th characte 57th character D767 60th character 59th character D768 62th character 61th character D769 64th character 63th characte AN NAADAAARHAAHAARHAHAADARHARHAAHAHAHRARHAHRAHRAYH DA Designate the limit for each PID loop as follows B15 B1 SD774 Loop 16 to Loop 2 PID Limit 0 Limit set setting 1 Limit not set SD775 Loop 32 to Loop 18 Remaining No of simultaneou s execution of CC Link dedicated instruction Stores the remaining number of simultaneous execution of the CC Link dedicated instructions Stores the mask patterns masked by the IMASK instruction as follows B15 B11 BO IMASK 163 159 instruction Mask pattern 179 165 gt During mask execution pattern
286. racter string designated by S at the device designated by D Stores the designated number of characters in the character string designated by S1 from the position designated by S2 at the device designated by D Stores the designated number of characters in the character string designated by S1 from the position designated by S2 at the device designated by D Number of basic steps MIDWP MIDWP S INSTR INSTR 1 S2 D n e Searches character string S1 from the nth character of character string S2 and stores matched positions at D Converts floating decimal point data S1 to BCD data with number of decimal fraction digits designated by S2 and stores at device designated by D e Converts BCD data S1 to floating decimal point data with the number of decimal fraction digits designated by S2 and stores at device designated by D App 38 Instruction Category symbol 02 ee Z v Q Q O 02 U o TANP ASIN ASINP ACOSP ATANP Ju 02 2 p3 U n n vs vs vs Z Z Z iw is iw U 12 Special function instructions Processing details Sin S 1 S gt D 1 D Cos S 1 S gt D 1 D Tan S 1 S D 1 D Sin
287. ram No Low speed SD510 program No SD520 Current scan time SD522 SD523 Initial scan time Minimum SD524 scan time Curren scan for low speed program Minimum scan time for low speed program Maximum scan time for low speed program END _ rocessing ime Constant scan wait time Cumulative execution time for low speed programs Execution time for low speed programs 4 Scan information Program No in execution Low speed program in execution Current scan time In 1 ms units e Program number of program currently being executed is stored as BIN value Program number of low speed execution type program No currently being executed is stored as BIN value e Enabled only when SM510 is ON e The current scan time is stored In 1 ms units e Range from 0 to 65535 Corresponding ACPU D S St Status New change S Every END processing S Every END processing Current scan time In 100 us units Initial scan time In 1 ms units Initial scan time In 100 us units Minimum scan time In 1 ms units units Maximum scan time In 1 ms units Maximum scan time In 100 us units Current scan ime In 1 ms units Current scan Minimum scan time f In 1 ms units Minimum scan time In 100 us units Maximum scan time In 1 ms units Maximum scan time In 100 us units END processing time In 1ms units END
288. ram can be terminated with the lowest nesting N number only 4 7 es sc Je CALL e RET LFEND AASCHOOL 8 10 MAIN 4 7 1 Conditional jump instataneous execution condition jump S conditional jump execution condition jump after one scan x1 l 3 e a SCI P10 xo Xi 6 X3 9 e _4 a3 The CJ instruction instantaneously executes a program with jumping it to the designated jump address pointer number when the input condition is ON When the condition is OFF the program is not jumped Pointer P10 23 gt The SCJ instruction executes a program without jumping for the scan when the input condition is ON From next scan the instruction executes a program with jumping it to the designated jump address pointer number When the input condition is OFF the program is not executed e The SCJ instruction is used when some operations must be executed before jumping the program For example when the output needs to be ON or reset in advance Timing Chart amp Input Condition X0 X1 Executes at Executes at CJ every scan every scan y Executes at N Executes at SCJ every scan every scan gt it gt gt One scan One scan C Caution _ The pointer numbers available for both CJ and SCJ are PO to P4095 e Use the FEND instruction as shown below when a program using the CJ and SCJ must be concluded in each program block Se
289. ram performs a sampling processing on analog voltages input to Q64AD from CH1 and then converts the analog values to digital values Q54A0 Program name AD module READY AD conversion complete flag X3 X80 X8E n l o HHA gt D10 ko 4 rfBco Dio K4Y50 H Displaysdigital conversion value of CH2 on LED a C END X80 Module READY signal X8E A D conversion complete flag At power on or reset of a PLC CPU this flag turns on if A D conversion is ready to be executed A D conversion is executed once this flag turned on 2 Operation of the demonstration machine Stop the CPU and click on the toolbar The Write to PLC dialog box opens Click the button and then click the button to write to a CPU After that activate a CPU and confirm the following items Write only the parameter settings to a second CPU in the same way i This is not necessary if there is only one CPU incorporated For how to how to write parameters 0 a second CPU rafer to Saton tassel hcepelciespk 1 Turn on X3 and change input voltages for an A D conversion module by the volume on the demonstration machine Analog values that were input to channel 1 CH1 on Q64AD are stored to buffer memory in digital value With the automatic refresh settings a QCPU reads the stored digital values and stores them in its data register D10 2 Whenever an analog value is smaller than 1 0 is set 3 Analog to digital converted values appear on t
290. rams stored in the standard ROM or in the memory card are read into the program memory before execution Stores the data of the file register and the local device Stores the data of the parameters and the program when the QCPU is operated with ROM Stores the local device debug data SFC trace data and failure history data as well as the parameters and program The Flash card stores the parameters program and the file register The ATA card stores the parameters program and the PLC user data general purpose file 1 4 External I O Signals and I O Numbers 1 Wiring of I O devices The signals from external input devices are substituted by the input numbers which is determined by the fixing points and port numbers of the connected input module and are dealt with in the program The operation result output coil uses the output numbers that are determined by the fixing points and port numbers of the output module that is connected to the external output devices 4 lt _ Slot numbers Power CPU supply IN Base unit Ps Output numbers Input numbers are hexadecimal numbers that start with 0 I O numbers share the same numbers X at the beginning of the number represents Input and Y indicates Output Maximum number of the QCPU Q mode I O number is 4 096 Output module Input module Figure 1 4 Wiring of I
291. reate the ladder to be created program as shown on the left X2 Xo m Y70 Y70 j Make sure that the write mode is active before a y71 creating the ladder program m 1 Press the F5 key to open the Enter symbol screen Enter X2 If you pressed other key s by mistake press and retype 2 Press to confirm the entry 2 Press Enter r You can also use the OK or Cancel button to confirm or cancel your entry 3 The symbol you entered G D will appear 3 The symbol will appear m 4 Press the F5 keys and enter XO Enter symbol x CS ICC 5 Press Enter 5 Press to confirm the entry 4 Enter X0 6 The symbol you entered aya will appear CHA 6 The symbol will appear 7 Press the key and enter Y70 Enter symbol x So irk tH 8 Press to confirm the entry 8 Press Continued on the next page Continued from the previous page appear 9 The symbol you entered C Y70 gt will Enter symbol x 10 Press the F6 key and enter Y70 11 Press to confirm the entry 10 Enter Y70 11 Press Enter Y70 12 The symbol you entered J L will appear 13 Move the cursor to the ladder under T 1 14 Enter X3 m 14 Press the F5 key and enter X3 Enter symbol ae A e 15 Press Enter 15 Press
292. red program The I O control mode set is returned in any of the following hea V0 1 0 control numbers D1014 control mode 0 Both input and output in direct mode mode number 1 Input in refresh mode output in direct mode 3 Both input and output in refresh mode App 83 Special Register List Continued ACPU Special Special Special Register after Register for Meaning Explanation Register Conversion Modification Corresponding CPU e The operation status of CPU as shown below are stored in SD203 B15 B12 B11 B8 B7 Remote RUN STOP Key switch of CPU by computer o nc o 1 STOP peratin o STOP perating state PAUSE 1 D1015 g state f CPU PAUSE 1 an o STEP RUN Cannot be changed by remote RUN STOP Status in program Remote RUN STOP 0 Joner tran towing by parameter er than following o RUN instruction execution 1 When the CPU module is in RUN mode and SM1040 is off the CPU module remains in RUN mode if changed to PAUSE mode Main program ROM Main program RAM Subprogram 1 RAM Subprogram 2 RAM Subprogram 3 RAM Subprogram 1 Program ROM e Indicates which sequence program is run presently One D3018 9SD41018 number Subprogram 2 value of 0 to B is stored in BIN code ROM Subprogram 3 ROM Main program E2PROM Subprogram 1 E2PROM Subprogram 2 E2PROM B Subprogram 3 E2PROM Kinin scan If scan time is smaller than the content of SD520 t
293. rent month as well as the number manufactured on the current day K2X20 K2Y58 Date gt 310 Date Planed K4X30 Input Output K4Y40 Manufactured number 1 8 0 module module 0 1 8 0 number on the of products current day Count value aa mM pare 3 7 8 2 Accumulated number How many products manufactured on the current day is counted with C5 Accumulated number of products manufactured is counted with C6 The date is entered in the index Z to indirectly designate the data register corresponding to the date using DOZO When Z0 is 30 DOZO becomes 0 Z designating D30 D 0 0 D 8 124 D 16 263 D 24 170 D 32 0 D 1 159 D 9 129 D 17 241 D 25 194 ID 33 3782 e Accumulated number D 2 145 D 10 169 D 18 181 D 26 219 D 34 0 D 3 168 D 11 119 D 19 179 D 27 o D 365 igge aoe of products D 4 144 D 12 247 D 20 0 D 28 0 D 36 30 Date D 5 130 D 13 oD 21 0 D 29 213 D 37 0 D 6 o D 14 o D 22 163 D 30 180 D 38 0 D 7 0 D 15 124 D 23 129 D 31 0 D 39 0 Manufacturing results of each day ranging from 1 to 31 are stored in D1 to D31 being available as production data App 118 K32760 Tentative count p vege is set C6 gt 16 4 lt gt KO K4X20 ____________ __ BIN K4X20 D35 H BIN K2X30 D36 H K32 D36 IL SET M2 H lt K1 D36 RST M2 H PLS M3 H M2 SM411 43 imna YOTO YF M3 46 mm lt gt D36 C RST C5 H CMOV D36 ZO H SM400 Always ON
294. ribed below 1 When the sensor turns on the coil of input relay X6 is energized 2 Energizing the coil of input relay X6 conducts the normally open X6 and energizes the coil of output relay Y74 As the timer is not energized at this moment the normally close remains conducted 3 Once the coil of output relay Y74 is energized the external connection Y74 is conducted allowing the magnet contactor MC to be turned on 4 Turning off the sensor demagnetizes the coil of input relay X6 and ceases the conduction of normally open X6 As self maintaining the normally open Y74 is conducted the coil remains energized Self maintaining operation 5 When the coil of output relay Y74 is energized with the normally open Y74 conducted turning off the sensor with normally close X6 conducted energizes the coil of the timer T1 so that the timer starts measuring the time After a lapse of three seconds K30 indicates 3 0 seconds the normally open of the timer becomes conducted and the normally close is brought non conductive 6 As a result the coil of output relay Y74 demagnetizes and the load magnet contactor drops The output relay self maintenance is also released A time chart that explains the input output relays and timer operations is shown below Input Output Y74 Timer Timer T1 Contact The internal sequential operation can be described as a program of PLC The program is saved in the program memory as close
295. rocessing S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing S Every END processing D9018 format change D9019 format change New New New New New New New ew Corresponding CPU Special Register List Continued Corresponding Set b Number Name Meaning Explanation rod a ee When set Stores the execution time of a scan program during one Scan program scan SD548 execution time In 1 ms units Scan In 1 ms units e Range from 0 to 65535 S Every program e Stored every scan l END aa a execution Stores the execution time of a scan program during one time Scan program scan processing SD549 execution time In 100 ys units In 100 Us units Range from 000 to 900 Stored every scan Service interval measureme Unit module No Sets I O number for module that measures service interval nt module Module service When SM551 is ON stores service interval for module interval In 1 ms designated by SD550 In 1 ms units units e Range from 0 to 65535 Service interval S Request Module service e When SM551 is ON stores service interval for module interval In 100 designated by SD550 in 100 xs units us units Range from 000 to 900 time App 77 Special Register List 5 Me
296. row of Setting item After the setting is completed click the End setup button From previous page 0 D A Conversion Module 6 Confirm Intelligent function module parameter mame e Ir e A Available Available M 6 Confirm that Available is set in the Initial setting and Auto refresh column of Q62DA 7 After the setting is completed click Intelligent function module parameter and then click Save parameter 8 Click the button 7 6 5 Exercise with the demonstration machine 1 Sequence program The sequence program converts values of the digital switches to analog signals 620A Program name X2 fp p_ le va gt D A CH1 output enable gt K4X20 H4000 cr mov k4000 p30 y Set values exceeding 4 000 are treated as 4 000 o X90 2 DA M module lt K4X20 H4000 H gt K4X20 HO JH BIN K4X20 D30 H Read the digital switch value D30 READY Displays D30 value m BCD D30 K4Y40H 1 on the digital display Y40 to Y4F 23 C END H X90 Module READY signal At power on or reset of a PLC CPU this signal turns on if D A conversion is ready to be executed D A conversion is executed once this signal turned on Y91 CH 1 output enable disable flag Turning this flag on or off selects on each channel whether to output D A converted values or offset values ON D A converted value OFF Offset value 2 Operation of the demonstration machine Stop the CPU and click o
297. rt BATANP BATANP SID 2 Decimal fraction App 40 13 Data control instructions Instruction Category symbol DLIMIT DLIMITP DBANDP DZONE e When S3 lt S1 e When S1 lt S2 lt S3 e When S2 lt S3 When S3 1 S3 lt S1 1 S1 Store value of S1 1 S1 at D 1 D e When S1 1 S1 lt S3 1 S3 lt S2 1 S2 Store value of S3 1 S3 at D 1 D When S2 S2 1 lt S3 S3 1 Store value of S2 1 S2 at D 1 D When S1 lt S3 lt S2 0 gt D When S3 lt S1 When S2 lt S3 e When S1 1 S1 lt S3 1 S3 lt e When S3 1 S3 lt S1 1 S1 S3 1 S3 S1 1 S1 gt D 1 D e When S2 1 S2 lt S3 1 S3 S3 1 S3 S2 1 S2 gt D 1 D ZONE i When S3 gt 0 S1 S2 S3 D ZONEP ZONEP S1 S2 S3 D DZONE S1 S2 S3 D DZONEP DZONEP S1 S2 S3 D H S3 1 S3 S2 1 S2 D 1 D S3 1 S3 S1 1 S1 D 1 D Execution Processing details conditio
298. ruction LD LDI to the OUT instruction including the DATA instruction 1 2 Program Processing Procedure The operation process is performed serially from the start step of the program memory left to right then top to bottom in the order corresponding to 1 2 17 in ladder block unit as shown below 1 2 3 xo x1 o f _ 4 5 7 x xX 3 _ vw 6 x4 4 8 9 10 13 14 eH 15 16 17 X9 XA 17 _ 1 3 MELSEC Q Module Configuration 1 High Performance model and Basic model Q series CPU has two models High Performance model and Basic model As a High Performance model CPU Q mode is used as the demonstration in this course QCPU means High Performance model CPU Q mode in this textbook unless otherwise specified Model CPU See Q series data book L08029E for details Description High Performance model Basic model Target For the use of focusing on high speed processing and system extension QO02CPU Q02HCPU QO6HCPU Q12HCPU Q25HCPU Features e High speed processing e Large capacity memory the number of programs 252 Q25H file register 128 K Q12H Q25H built in e Number of I O device points 8 192 including devices for remote 1 0 e Number of I O points 4 096 excluding the I Os for remote I O e The SFC program is available e The Multiple CPU system is configurable e The Motion CPU is mountable e The personal computer
299. s Configuration of the priority setting areas is as shown below B15 to B12B11 to B8 B7 to B4 B3 to BO sD207 4th priority 3rd priority 2nd priority 1st priority 0208 7th priority 6th priority 1 5th priority e For details refer to the applicable CPUs User s Manual and the ACPU Programming manual Fundamentals SH 3435 version or later App 85 Corresponding CPU Special Register List Continued hae Special Special Register Special Register aner for Modification Name Meaning Explanation Register Conversion Turned on off with a peripheral device When or STRAR is executed the value For Step or time stored in SD1044 is used as the sampling trace D9044 SD1044 sampling during condition trance sampling trace Atscanning 0 At time Time In 10 ms units The value is stored into SD1044 in BIN code Stores the block number of the expansion file register Words Block number pl is used as pe work te for the execution of a program in a binary value D9049 SD1049 for SFC or exienSionfile Stores 0 if an empty area of 16K bytes or smaller D9050 D9051 D9052 D9053 D9054 D9055 D9060 D9072 D9081 oppo aT PIET E XXX SD1050 SD1051 SD1052 SD1053 SD1054 SD1055 SD1060 SD1072 SD1081 SD392 SD714 SFC program error number Error block Error transition Error sequence step Software version PLC communic ation check Number o
300. s SDO is SD6 stored here SD7 The following four types of information are stored here 8 1 Unit module No 9 Number Contents SD5 Slot No PLC No SD10 SD6 O No SD11 SD7 D12 SD8 SD9 SD13 SD10 SD14 SD11 Vacancy SD12 SD13 SD14 SD15 no o olalajojonlajnlonlnjojojz 090 90 09 0 09 9 9 09 9 9 3 gt gt gt oloINNIol onje ajA oo Nh a oO 2 no g 4 For a multiple CPU system the slot number or PLC number is stored depending on the error that occurred Slot 0 in the multiple CPU system is the one on the slot on the right of the rightmost CPU module Refer to the corresponding error code for which number has been stored PLC No 1 1 PLC No 2 2 PLC No 3 3 PLC No 4 4 2 If a fuse blown or I O verify error occurred in the module loaded in the MELSECNET H remote I O station the network number is stored into the upper 8 bits and the station number into the lower 8 bits SD15 Use the I O No to check the module where the fuse blown or I O verify error occurred S Error New Ot Rem 2 File name Drive name e g File name Contents ABCDEFGH IJK Drive B15 to B8 B7 to BO 42H B 41H A File name 441 D 434 C ASCII code 8 characters 46H F 45H E 48H H 47H G Extension 2Ex 49H I 2DH ASCII code 3 characters 4Bu K 4AH B Vacancy
301. s OFF 1 Operates from 0 to FEND 2 Y70 turns ON OFF when turning X4 ON OFF 3 Y72 remains unchanged even when turning X5 ON OFF 2 When X3 is ON 1 Jumps to P10 pointer by the CJ instruction 2 Y70 remains unchanged when turning X4 ON OFF 3 Y72 turns ON OFF when turning X5 ON OFF Related Practice Question Operation when X3 is OFF o LD X4 LD X3 CJ P10 OUT Y70 P10 FEND LD X5 oAnAN DON FR O END OUT Y72 Jump by CJ Operation when X3 is ON Practice Question 4 ANSCHOOL ATESTI Program name MAIN 4 8 Practice Questions 4 8 1 Practice Question 1 LD to NOP When XO turns ON Y70 is self maintained and Y74 and Y77 flicker alternately every 0 5s When X1 turns ON Y70 turns OFF and flickering of Y74 and Y77 also stops Timing Chart XO Y70 TO t Y74 T1 amp Y77 1 X1 0 5s 0 5s I I i xo 2 _ i i Ve Y70 gt 1 11 3 1 i Pee ees i 1 4 Y70 3 oi To 5 N 1 i Aa i i 4 3 K5 i i 10 Hi T1 gt l i Coo a gt i i L5 i Y70 i i 16 Y i I I I I ANSCHOOL aTEST2 Program name MAIN 4 8 2 Practice Question 2 SET RST When turning XO ON Y70 starts to flicker at one second intervals and stops the flickering for five seconds after flickering 10 times then restart flickering The flickering of Y70 can be stopped by turning X1 ON Create the following program wi
302. s ON ON if there is error common information occurrence S Error When SM0 is ON ON if there is error individual information occurrence M52 Battery detection ON AC DOWN during use of the DC power supply module Reset when power is occurrence detected switched OFF then ON e Turns ON if an instantaneous power failure of within 1ms occurs during use of the DC power supply module Reset when power is QnA switched OFF then ON e Goes ON if MINI S3 link error is detected at even one of the Be ile installed MELSECNET MINI S3 master modules S Error Mgo04 ana Toe Remains ON if the condition is restored to normal thereafter gecurrence Operation OFF Normal ON when operation error is generated S Error M9011 errors ON Operation error e Remains ON if the condition is restored to normal thereafter occurrence Comes ON even if there is only one output module with a fuse blown OFF Normal Fuse blown ON Module with fuse and remains ON even after return to normal S Error detection e Fuse blown state is checked even for remote I O station output occurrence blown modules Comes ON if there is a discrepancy between the actual I O modules ca VO module OFF Normal and the registered information when the power is turned on and S Error ee a KR zZ x 0 3 a M SM16 SM51 SM53 SM60 SM61 SM90 SM91 SM92 M9000 remains ON even after return to normal verification error
303. s Y71 l 1 Y71 l i i i 1 i 1 i Timing Chart X2 Y70 XO X3 M1 X1 REFERENCE The following is a timing chart of a lockup ladder programmed using OUT instructions Compare this with the lockup ladder created using the PLS instructions XO Operating Procedure See Section 4 4 Operating Procedure for the procedure of the following operations 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice e Turning X2 switch ON makes Y70 turn ON and Y70 switch OFF when XO turns ON Even when X2 stays ON Y70 is turned OFF when X0 turns ON e Turning X3 switch OFF makes Y71 turn ON and Y71 switch OFF when X1 turns ON Related Exercise Exercise 3 REMARK Input pulse processing is not required for the QCPU as it uses a derivative contact t4 A AnSCPU case i wh e SET M5 e QCPU case Supported instructions are LDP LDF ANDP ANDF ORP and ORF 4 6 Master control Start Master control reset End Path name A SCHOOL Project name QB 8 MAIN X7 o m wc no mos NO M98 X2 TDN 36 Y70 Z X3 LA 7 NO M98 is displayed in the read mode e The above programs is a basic one il indicated as MC to MCR hereafter The allowable este N numbers for the MC to MCR are between NO and N14 e The sca
304. s for external outputs Input relay virtual coil Output module Input circuit Internal sequential operation Output circuit Input module f Ld Turns on off the Activates the Transmits the on off Activates the input relay with internal sequential operations of the external loading external signal operation by the output relay contact of the input relay Figure 1 1 PLC Configuration The PLC is an assembly of relays and timers counters as well as an electronic device centered around a microprocessor As in figure 1 1 internal sequential operation is performed by turning on off the coil by connecting the normally open and normally close serially or in parallel Relay which is also called an electromagnetic relay is a switch that passes on signals Also it is a key component that makes up a logic ladder 1 Energizing the coil Excitation Coil off Coil on e Closes the normally open all times in operation Conducted Normally e Opens the normally close open Not conducted Conducted Not conducted Common J i 2 De energizing the coil Normally O gt Demagnetization A close Conducted Not condcuted e Opens the normally open t Not conducted B contact e Closes the normally close Conducted Internal Sequential Operation The signal flow of figure 1 1 internal sequential operation is desc
305. s vacant the I O numbers are assigned as described below Default The number of assigned point is changeable depending on the setting Main base unit d0 9 00 db 9 OL AZ 9 02 ainpow Ajddns samod JE 01 0 jojs jueoe dv 0 OV ds 0 0S d9 9 09 7 Slot numbers dZ 0 OL As for the multiple CPU configuration Two to four CPUs the I O numbers are assigned from the slot next to the one to which a CPU is attached 3 I O numbers of the extension base unit Connect the extension base unit when the required number of the slots exceeds the number of the slots of the main base unit The I O numbers are assigned as follows by default This concept applies both to the I O modules and to the intelligent function module Main base unit Q38B 7 Slot numbers Extension cable ainpow Ajddns semog d0 9 00 dl O OL AZ 9 02 de 9 0 dv 9 Op dG 9 0S d9 9 09 dZ 02 Extension base unit Q68B a a a KR With one extension base units As for the number of the slots setting the number different from the actual number is possible For example setting the base unit for 12 slots as for three slots is possible and Extension base unit Q65B vice versa This is in order to handle the future extension and to prevent the gap of I O numbers which is likely to happen when making the transition from the conventional system to the new one For details refer to QC
306. scan only execution time of the instruction to 1 scan e The delay time ranges from 1 scan to 2 scans e The delay can be anywhere from 0 to 1 scan e The delay 1 to 2 scans 3 Execution time Longer time than the refresh mode is needed as Generally only short time is needed as a PLC of the I O a PLC accesses I O modules in the direct accesses data memory instructions mode The longer of the execution time of the I O The shorter of the execution time of the I O instruction is the longer the scan time is instruction is the shorter the scan time is 4 Scan time Sane 0 naa e The actual scan time is the time of program e The actual scan time is the total time of program execution execution input transfer and output transfer App 3 Appendix 2 Instruction Table For SFC related instructions refer to QCPU Q Mode QnACPU Programming Manual SFC SH 080023 Appendix 2 1 Sequence instructions 1 Contact instruction Instruction z Execution Processing details i symbol condition Number of basic steps e Starts logic operation Starts a contact logic operation e Starts logical NOT operation Starts b contact logic operation e Logical product a contact series connection e Logical product NOT b contact series connection e Logical sum a contact parallel connection e Logical sum NOT b contact parallel connection e Starts leading edge pulse operation e St
307. scan time of a low speed program In 100 Us units e Range from 000 to 900 Stores the maximum value of the scan time except that of 1st scan of a low speed program In 1 ms units e Range from 0 to 65535 Stores the maximum value of the scan time except that of 1st scan of a low speed program In 100 us units e Range from 000 to 900 e Stores the time from the end of a scan program to the start of the next scan In 1 ms units e Range from 0 to 65535 e Stores the time from the end of a scan program to the start of the next scan In 100 us units Range from 000 to 900 Stores the wait time for constant scan setting In 1 ms units Range from 0 to 65535 Stores the wait time for constant scan setting In 100 us units e Range from 000 to 900 e Stores the cumulative execution time of a low speed program In 1 ms units e Range from 0 to 65535 Cleared to 0 after the end of one low speed scan Stores the cumulative execution time of a low speed program In 100 yus units e Range from 000 to 900 e Cleared to 0 after the end of one low speed scan Stores the execution time of a low speed program during one scan In 1 ms units e Range from 0 to 65535 Stored every scan Stores the execution time of a low speed program during one scan In 100 xs units e Range from 000 to 900 e Stored every scan App 76 S Every END processing S Every END processing S Every END p
308. sequence block F gi Set whether continuous transition will be performed in 1 scan Presence OFF Continuous transition a vs fr absence ot not effective for all the steps on which transition conditions are met M9103 SM1103 SM323 vs ON Transits continuously continuous transition enabled continuous ON Continuous transition i EA 3s OFF Transits 1 step at 1 scan continuous transition transition effective disabled ON when continuous transition is not executed during Continuous x Ven operation in the continuous transition mode and OFF when transition ORR When transition is transition of 1 step is completed M9104 SM1104 SM324 f completed oe ae vas Of suspension ON When no transition By writing AND condition as the transition condition of flag SM324 continuous transition can be prevented from being performed on the corresponding step Step transition watchdog timer M9108 SM1108 SM90 start equivalent of SD90 Step transition watchdog timer M9109 SM1109 SM91 start equivalent of e Turns ON when the measurement of the step transition SD91 aar a mer isen watchdog timer is started Step transition i start Turning this relay OFF resets the step transition watchdog watchdog timer timer M9110 SM1110 SM92 start equivalent of SD92 Step transition watchdog timer M9111 SM1111 SM93 start equivalent of SD93 Corresponding CPU App 62 ACPU Special Special Special Relay afte
309. sequence program processing data that is read from an intelligent function module Use GX Configurator compatible with the intelligent function module Use GX Developer to specify the range for Intelligent function module dedicated Dedicated instructions used to simplify programming for using the functions of Use this instruction in a intelligent function modules sequence program instruction 7 3 2 Using GX Configurator for communication This section describes the procedure of using GX Configurator for communication with intelligent function modules In the example operation below Q64AD module SWLID5C QADU is used ee er Install a module Install an A D conversion module on a specified slot aS ee Wiring Connect external devices to an A D conversion module Switch settings for intelligent function module Use GX Developer for this setting Use the default setting range Use the user range settings Use the user range Offset gain setting Offset gain settings are necessary to use the user range settings Use GX Configurator Initial setting automatic refresh setting Use GX Configurator to simplify programs ee a Programming debug Create and check sequence programs 7 3 3 Data created by GX Configurator The following data files can be created with the GX Configurator package and also used in GX Developer Refer to the fo
310. ssed at the execution of instruction execution the COM instruction refresh OFF Local device 7 p Enable disable local disabled Set whether the local device of the subroutine program U Status Selection of link refresh OER a ints Select whether link refresh processing will be performed or device at CALL ON Local device called at execution of the CALL instruction is valid or change enabled invalid OFF Local device disabled Set whether the local device at execution of the interrupt U Status ON Local device program is valid or invalid change enabled OFF CC Link dedicated instruction CC Link dedicated executable instruction executable ON CC Link dedicated instruction not executable r a Set by n r SM80 SM80 Enable disable local SM777 device in interrupt program e Switches ON when the number of the CC Link dedicated instructions that can be executed simultaneously reaches 32 Switches OFF when the number goes below 32 U Status change Corresponding ACPU VS a Corresponding CPU A OFF Not ready e Switches ON when the trace preparation is completed pean Sampling trace ON READY e Switches ON when the sampling trace preparation is S Status preparation completed change e Trace started when this goes ON U SM801 OFF Suspend e Suspended when OFF Related special M all OFF ON Start Sampling trace started when this goes ON e Suspended when OFF Related special M all OFF 2 e Switches ON d
311. ssumption 5 5 Second ON 5 5 10 Third ON 10 5 gt 15 L D0 contents are changed 237 The device content specified by amp is added the device content specified by and the result is stored in device when the input condition is turned ON S 82 Dol 100 gt pE Input condition ON 15 Assumption 100 gt 115 f DO contents are not changed CAUTION or should always be used for add subtract instructions e When or is used for the instructions add subtract operation is performed upon every scanning To use or _ for the instructions operands must have been converted to pulse beforehand X2 P k5 DO REFERENCE e The following two instructions work on the same principle in add subtract operation aon a CTT H DO uoracton L FETTER Hie ANSCHOOL 8 17 Program name MAIN x4 0 c mowr K1000 D2 we 3 e ccc P K10 D2 Saa x6 0 7 P D2 K50 D3 ET EEJ The device content specified as is subtracted from the device content specified as D and the result is stored in device every time the input condition is turned ON 0 D2 J o oo OA gt S ipa Input condition First ON 1000 10 gt 990 Assumption 10 980 Second ON 990 10 gt 970 Third ON 980 o D2 contents are changed 43 The device content specified as 2 is subtracted from the device content specif
312. st PLC type BOA PiCNoi tte to the CPU Or click Param Prog to select ile selection Dap data Program Common Local them d lt a all canes z sectors ces al poe rfosam mem a assword setup 3 7 se 5 Click Execute to accept the selection aa EI MAN Related functions F Device comment Transtor setup COMMENT Keyword setup Parameter FA PLC Network Remote Remote operations Clear PLC memory Format PLG memory Arrange PLC memory Create title Write to PLC Total free space m bel Bytes HIELSUFT Jariss Got Uo yaluyos 6 If the parameter or program has already been A These parameters already exist Overwrite written to the CPU the confirmation appears asking if you want to overwrite the parameter program Click Yes Yes all A Write to PLC 7 The progress bar will appear Writing Parameter iT 8 The completion pop up window will appear MELSOFT series GX Developer x when writing is complete Click OK YD Completed Continued on the next page When two CPUs are installed perform the procedure from step 9 to step 15 explained in the dotted lines on the next page in order to write a parameter into the CPU No 2 When only one CPU is installed go on to step 17 on page 2 21 Continued from the previous page Password setup Related functions
313. st module is Confguraton is idena to that forie frst module to that for the first module Configuration is identical to that for the first module Number of modules installed on Ethernet of modules installed Number of modules installed on Ethernet Ethernet e Indicates Ethernet I O No of the 1st module mounted Indicates Ethernet network No of the 1st module mounted e Indicates Ethernet group No of the 1st module mounted e Indicates Ethernet station No of the 1st module mounted Indicates Ethernet station No of the 1st module mounted Indicates error code of the 1st module mounted e Configuration is identical to that for the first module e Configuration is identical to that for the first module e Configuration is identical to that for the first module B15 B8 B7 B6 B5 B4 B3 B2 Bi BO 0 0 Not used Reception status of channel 1 Reception status o Reception status o Reception status o Reception status o Reception status o Reception status o Reception status o channel 2 channel 3 channel 4 channel 5 channel 6 channel 7 channel 8 ON Received channel in OFF Not received channel use not in use e Configuration is identical to that for the first module e Configuration is identical to that for the first module e Configuration is identical to that for the first module e Stores the internal system soft
314. statements comments on ladder blocks and notes comments on outputs or instructions Statement 4 1 0 9S Flicker Counts number of products e Creating statements Click i and then double click a ladder block where comments are to be attached The Enter line statements dialog box appears Enter desired character strings and then click the button Ml Ht Embeddec Separate e Creating notes Click El and then double click an output or instruction where comments are to be attached The Enter Note dialog box appears Enter desired character strings and then click the button Embeddec Separate 5 Exit e There are two types of statements and notes Embedded and Separate Embedded The data of statements and notes is stored as a part of a program so it is stored in a CPU used in a factory as well Note however that this takes a lot of space in program memory of PLC CPUs Separate The data of statements and notes is stored not as a part of a program but separately in the peripheral device personal computer In this way a program needs only one extra step at a location This requires less space in program memory on PLC CPUs Note however that after taking this way changing programs at an FA site breaks consistency between programs of GX Developer on the peripheral device personal computer and PLC CPUs MEMO 26 CHAPTER 7 PROGRAMMING IN
315. struction is issued to divide each decimal place individually and display 4 decimal places in K4Y40 Project name QA 5 Program name MAIN XO 0 1 C BINP K4X30 DO H Reads data ll BINP K4X20 D1 H _T1_T 1_ 1_ 1 _ P DO D1 D2 H Division BCDP D2 K4Y50 H BCD outputs a quotient o DMOV P KO ZO Clears the index ZO CCC MOve KO D10 H Clears D10 C PLS MO H 22 aaau FOR K4 H MO 24 1a K4 Z1 D10 H b gt HOC D10 ZO H S D3 K10 D3 H Repeats 4 times S A D3 D1 D2 H BCD D2 K1Y40Z0 C INC Z1 H 45 NEXT H MIM CIRCUIT END The value of Z1 is added one every instruction App 109 2 Example 2 DO is divided by D1 to obtain D5 in 4 decimal places The dividend DO is multiplied with 10 000 The result of dividing calculation using this multiplied value is converted to a BCD value and output to an external digital display K4Y50 K4Y40 s Cee D6 Integral number D5 Decimal number in 4 digits in 4 digits K4Y60 n E D7 Remainder of a decimal number XO CIRCUIT END App 110 BINP K4X30 DO H BINP K4X20 D1 H C MOVP KO D2 H Clears D2 DO K10000 D3 H 10000 fold D3 D1 D5 H DBCDP D5 D5 H DBCDP D7 D7 H MOVP D6 K4Y50 H Integral part C MOVP D5 K4Y40 H Decimal fraction MOVP D7 K4Y60 H Decimal number remainder Appendix 5 20 Carriag
316. t K400 T200 L SET Y70 Cycle time run out K32760 14H lt K300 T200 H gt K400 T200 C10 Number of cycle times of x7 3 01 to 4 00s 24 RST Y70 Clears the time out display and accumulated counts C RST C10 CIRCUIT END App 106 Complement Appendix 5 18 Application example of D CML P Obtain absolute values of negative values 32768 or smaller to 2147483648 32 bit data D1 DO B B BBB B Lice BB 16 14 ce 1 0 1514 1 Before Talo 1h Jolt fofofo 4 691 To o i o pcm do n20 DO D20 DCML execution L U Negative number D a K1 D20 D21 D20 After 7 vem execution 2 t o ofS 1 0 4 4 ofof So 1 fol 4 u D21 D20 After D execution 0 1 0 TSE o 1 1l1 0 off Jo 1 1 1 0 Absolute value Example 999 is subtracted from a set value each time X1 is turned on and the resulting value is displayed When the resulting value goes down below zero the output Y70 turns on and the absolute value of the resulting value is displayed Read the set value Turn on X0 YES Y70 setting y DCML execution kaa y Results display 0 po Ct DBIN K4X20 DO Input data 4 LA D P K999 DO H Subtract 999 D gt KO DO SET Y70 H Turn Y70 on if negative a fia y number obtained eal CDCML DO D20 Amant or Sic aken bo poe pa kt Bap a eve a poate number L DBCD D30 K8Y40 H Output an absolute value 31 DRE
317. t the next process for the product is started Product Sensor Sensor Detection of input from X0 Conveyor belt Timing Chart X0 MO A OOO Y70 Other Useful Ways of PLS amp PLF Part 1 e They can be used to create the program that performs the output operation for a given period of time when the input signal changes ON to OFF Timing Chart Input X0 Output Y76 Given period of time Pulse duration 10s Program example Path name A SCHOOL MAIN Xo 0 i M1 T16 Y76 lt Other Useful Ways of PLS amp PLF Part 2 e The program for the repeated operation such as switching ON OFF status alternately by pressing the push button switch can be made using the instructions If you use the PLS for the above program the rising edge caused when the push button switch is pressed triggers the program If you use the PLF the falling edge caused when the switch is released becomes the trigger Timing Chart XO Y70 Y71 Program Example RASCHOOL MAIN 0 1 C PLS MO H Le PO PLF M1 H MO Y70 r g Y70 gt MO Y70 eH M1 Y71 11 Y71 gt M1 Y71 r ANSCHOOL QEX2 Program name MAIN Ladder Example Create the following ladder and check if it works properly 1 i 0 PLS MO H f 1 MO XO 1 3 Y70 1 Y70 1 1 x3 i i 7 PLF M1 1 M1 X1 1 i 10 r
318. t by turning on X1 Display counted values to exterior Turns on at 100 before the set value Turns on at 50 before the set value Turns on at a the set value Appendix 5 16 Measuring operation time Setting operation time to a control target is useful for judging when to replace its components do lubrication to it etc The timer ST and data register D must have back up power source so that they can continue operating at power failure With the contents of D31 in one hour units displayed externally it can work as an operation timer Path name A SCHOOL Prjectname oaa Program name Man X2 K3600 04S ST 250 gt 6 minutes timer 1250 oa C RST T250 H K1 D30 H 1 hour timer C K10 D30 E MOV KO D30 H K1 D31 Measures in 1 hour units SM400 Always ON e 21 4b CCSS BCD D1 K4Y60 H Output operation time to exterior 25 H lt K1000 D31 TS __WTT_ 1_ X Y70 gt Indicates when to replace CIRCUIT END 100 hours is set as the management time Appendix 5 17 Measuring cycle time By measuring operation time of a control target from its start to end it is possible to display cycle time out control time lag etc The following ladder can indicate cycle time out To measure time lag use the lt gt and instructions to judge the state of T200 and turn on a counter XO X1 0 M56 In a cycle M56 M56 T200 K32760 4 r T2000 Measures cycle time 10 l
319. t numbers are used B15 14 13 12 11 10 9 8 7 6 5 4 3 D1350 0 0 O 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Indicates fuse flown status 9 O module verification Meaning Bit pattern in units of 16 points indicating the modules with eh reification errors 1 I O verification error present Explanation e When the I O modules whose I O module information differs from that registered at power on are detected the numbers of those I O modules in units of 16 points are entered in bit pattern If the I O numbers are set by parameter the parameter set numbers are stored Also detects I O module information of remote station B15 14 13 12 11 10 9 8 7 1 0jojojojojojo CY 1 0 00 o yxy 0 0 RAC EAA 0 0 0 0 0 Indicates I O module verification error e Not cleared even if the blown fuse is replaced with a new one This flag is cleared by error resetting operation App 89 C di Set by gta ny Corresponding hi t CPU When set Dg S Error QCPU S Error pacts Set by When set S Error Appendix 5 Application Program Examples Appendix 5 1 Flip flop ladder 1 Y70 turns ON when X00 is turned ON and turns OFF when X01 is turned ON XO 0 SET Y70 4 ie 21 CRST Y7O J CIRCUIT END 2 When X02 is turned ON Y71 turns OFF if Y7
320. tarting L Aoperation of electrical machinery By turning the start switch on machinery starts operation After operation time has elapsed the machinery enters an arc interlock state and then A operation mode Path name A SCHOOL Program name T5 XO X1 i d os Y70 gt RUN K20 Y70 2 lt 15 gt A period timer Y70 T5 Y72 F Y71 gt A operation K5 T6 gt Arc interlock T6 Y70 Y71 18 Y72 CIRCUIT END Y72 gt A operation N Start X0 Stop X01 Operation Y70 operation A YT71 AY72 A operation T6 0 5 s Arc interlock App 100 Appendix 5 12 Displaying elapsed time and outputting before time limit X2 With the following ladder time elapsed in the timer is displayed on the LED and output is performed before the set time limit has been reached This system can also be applied to counters O O X2 Starts when turned on Stops when turned off Elapsed time display 4 digits of BCD Output module 4 123 Y6C to 6F X Y68 to 6B x Y64 to 67 x Y60 to 63 x K6000 0 ten te C BCD K500 gt K120 tH Ho 77 K3000 gt Timer starts when X2 is turned on CIRCUIT END ol 22 eo 0 p eT Ho gt K300 T4 3 lt Y70 H lt K299 T4 H gt K320 T4 Iy H lt K319 T4 H gt K340 T4 4 Y72 H lt K339 T4 m 73 HE lt K600 14 a 4 LE lt K800 T4 S 75 CIRCUIT END App 101 K4Y60 H
321. te to PLC Flash ROM gt 10 aF9 Delete PLC data z m ri daa lool Leelee Debug gt Monitor Write mode Shift F3 Trace Start monitor All windows Ctrl F3 Remote operation Alt 6 Stop monitor All windows Ctrl Alt F3 Password setup Clear PLC memory i ied Eormat PLC memory 1 Click Arrange PLC memory Local device monitor Set time 7 perce batt 0 7 5 Entry data monitor Program monitor list Interrupt program monitor list Entry ladder monitor mana 2 The monitor screen for device registration Device ON OFF Current Setting value Connect Coil Device comment Local label Reference program a appears Click the Register devices button Delete the device 2 Click Delete al devices Device test Close a 3 The Register device dialog box appears Click Device and input Y74 in the list box Register device 3 Set 4 After the setting is completed click the button 5 Click the button to close the dialog box Display format Value t_ _ DEC Display 16bit integer z 5 Click Cancel To next page From previous page 3 me AAE SETS CoE CHT DETTE ecitte 6 Click the Start monitor button Y74 MAIN z Me click Click o C Register devices Delete the device Delete all d
322. teeeeeeeees Boot File Setting Boot file setting ccccceeteceteeees Sets Standard ROM automatic refresh Sets SFC Setting Sets 0 i I ASEE TT assignmen Sts 1O Assignment M Basic setting eeeeeeeeeeseeeeeeees Sets t i modul M Switch setting Detailed setting Sets MELSECNET Network Ethernet Setting ccceecceeeeeeseseeeeeeeeeeeeeeaceeeateeeeeeetieeeaeens Sets t Parameter CC Link Setting Remote Password he type model occupation numbers and start input output numbers of the installed module he basic base module in use expanded base module power supply le model of expanded cable and the number of the slot of the base module Sets various switches of the intelligent function module he operations at an error and the response time of the input module he network parameters for MELSECNET H and Ethernet E E EEE A ETATE Sets the parameters for CC Link Sets the password that limits the access via the Ethernet or serial communication modules When GX Developer starts it employs the preset values as the parameters These values are called the default initial values PLC can run with those values unchanged however modify them within a specified range as necessary The second CPU is installed on the demonstration machine for making up a Multiple CPU structure In MELSEC Q series multiple CPU setting for the parameters is required if two to four CPUs are
323. tegory symbol Processing details condition Number of basic steps e Executes n times between and FoR ah BREAK e Forcibly ends the execution of the to NEXT cycle and jumps O RI FOR CALL J CALL Pilsena Executes sub routine program Pn when input condition is met S1 to Sn are arguments sent to CALLP CALLP _ Pn StoSn subroutine program 0 lt n lt 5 FCALL e Performs non execution processing of sub routine program Pn if input FCALLP conditions have not been met ECALL Pn S1tosn H Executes sub routine program Pn from ECALL ant Program mal designated program name when input conditions have not been met ECALLP x S1 to Sn ECALLP S1 to 2n are arguments sent to Program name subroutine program 0 lt n lt 5 EFCALL x S1 to Sn EFCALL e Performs non execution processing of Program name sub routine program Pn from within Fania pen designated program name if input EFCALLP conditions have not been met Program name e Performs link refresh and general data i processing e Conducts index modification for individual devices used in device IXEND modification ladder IXDEV IXDEV e Stores modification value used for index modification performed between L and IXEND in the device below that IXSEI designated by D Modification value designation 1 n indicates number of arguments for sub routine program 2 n indicat
324. ten Project menu Ctrl s 0 sja elel alale 2 2 ell Pong Al A fa e ARa x mefa ue tnt nse m hE F F9 F10 cF9 aF aF8 ziz zlel 4 He 212 miali a x J Unset project oFIO sF7 sF8 1 Click xO 5 fa Program ite MAIN F Device comment Y70 Saving newly created project 2 Specify the area to store the new project Save the project with a new name eie cee A 3 Name the project i 7 j Heading i 3 Name the project Directory 4 Set a title as necessary BFT QU2tHY 05710728 11 38 B 10 f p 2 2 Specify the location 5 Click the Save button to confirm your entry 83 to store the project 5 Click B 4 A gt Cancel 4 Set a title as necessary 6 Click the button The new project will be stored Reference The following characters cannot be used for the project name gt lt ha Cand can only be used to specify a drive Do not place a period at the end of the name Eight or more characters can be used for the project name when operating with GX Developer SW8D5 GPPW or later however only the first seven characters will be displayed if the project is read in GX Developer SW2D5 GPPW or older Maximum 150 characters are allowed for the project path project name Maximum 32 chara
325. ter the reset operation or after the power is turned off To clear the data write O to the file register by using the MOV P instruction as such or write with GX Developer e Use Write to PLC of GX Developer or a sequence program to write to the standard RAM or to the SRAM card e Use Write to PLC Flash ROM of GX Developer to write to the Flash card e Specify the area of the file register in 1K point 1 024 point unit using the parameter Application Example e Set 32 K points of the file register RO to R32767 and use them with the program e Follow the steps below to register the parameter Standard ROM 1 Double click Parameter on the project list Unset project i Program 1 Double click Device memory E Device init Unset project 2 PLC parameter Network param and Program 2 Double click Remote pass appear Double click PLC Device comment parameter Parameter PLC parameter a Network param i Remote pass Device memory E Device init Continued on the next page Continued from the previous page hanes K 3 The Qn H Parameter dialogue box appears PLC name PLC syst 4 Click the lt PLC file gt tab on the box p File register _ Initial Device value Notused Not used C Use the same file name as the program Corresponding memory Use the following file C Use t
326. tery connector to the CPU as it is not connected with shipment 2 Set up the switches Set up the DIP switches for the system setting and the RUN STOP switch 1 Setting the DIP switches for the system setting Set all the switches to Off Set switch 1 to Off to remove its write and control protection restrictions 2 Setting the RUN STOP switch Move the switch to the STOP position 3 Setting the RESET L CLR switch Move the switch to the central position 3 Connect the RS 232 cable 4 Format the built in memory of the CPU The program memory of the QCPU is formatted in the following procedure Inset project LD Edit mode MAIN 35 View Sie Diagnostics Tools Window Help Transfer setup Read From PLC Write to PLC Verify with PLC Write to PLC Flash ROM Ellis Format PLC memory eP Set time 1 Click Format PLC memory Connection target information Connection interface COMI lt PLC module P Station no Target PLO Network no 2 Select the target memory Target memory Program memory Device memory Format Type Do not create a user setting system area the necessary system area only C Create a user setting system area MELSOFT series GX Developer kt 4 Click MELSOFT series GX Developer x Ll Completed Format PLC memory Connection target information PLC module Connection interface COMI i
327. th name A SCHOOL Project name QA 2 X3 0 1H PLS M5 J M5 i Reading the set time 3 aaa BIN K2X20 D1 J st T3 K10 2 digits in 0 1 s units 16 i T4 Flicker for 7 X4 TA lt gt KO D1 J T3 D1 repeating the timer 21 BCD T3 K2Y40 H Output time value to exterior Turns on when a current value gt K20 T3 J lt Y70 of T3 is from 0 1 to 1 9 s Turns on when a current value K30 T3 p lt Y71 of T3 is 3 0 Turns on when a current value lt K40 T3 J lt Y72 of T3 is 4 1 s or more CIRCUIT END App 98 Appendix 5 10 Clock ladder With a clock ladder the clock data such as hour minute and second is output to a digital display Path name A SCHOOL Program name MAIN TO K5 5 t lt T1 gt T1 K5 0 5 s flicker 0 H lt TO gt T1 K60 10 RX C11 gt Count seconds C11 15 1 C RST C11 H K60 C12 gt Count minutes C12 24 1 C RST C12 H K99 C13 gt Count hours C13 33 C RST C13 H SM400 38 BCD C11 K2Y40 H BCD C12 K2Y48 H BCD C13 K2Y50 H CIRCUIT END 0o _Ones 1 O l ones__ seconds digt 2 digit hours O30 K2Y40 K2Y50 O40 Tens O 5 Tens digt 6 digit O70 O80 __ Ones O 9 O minutes digt O A O BO K2Y48 eco Tens J O DO digt O E O OFO Tens digit Ones digit Tens digit Ones digit Tens digit Ones digit K2Y50 hour Output K2Y48 minute Output K2Y40 second Output App 99 Appendix 5 11 S
328. th of programs function the same x4 x4 MOVP K157 M1 Applicable Device Intelligent Internal device File MELSECNET 10 Index function i system user register H Direct Jn register module e woa R e wa S 2 e Ny s E T E Remi omer rem esas Constant Basic number of Un G oTo LS fototototototototT ttt yt The number of steps varies by the device used Check Operation The CPU is in RUN Input X2 X3 X4 X5 and X7 is ON e Monitor the data stored in the data register DO to D3 e After writing the data to the PLC select Online Monitor Device batch The Device batch monitor dialog box appears Diagnostics Tools Window Help Transfer setup Read from PLC Write to PLC Verify with PLC A 1 write to PLC Flash ROM Lei Delete PLC data f 22 m N at jt PLC user data m s 5 E E ip E i Debug gt Monitor Write mode Shift F3 J Trace gt Start monitor All windows Ctrl F3 Remote operation Alt 6 Stop monitor All windows Ctrlt Alt F3 Password setup gt Clear PLC memory Ji nt va itor a Format PLC memory ie l nonit Arrange PLC memory Local device monitor Set time H Device batch Entry data monitor Buffer memory batch cea e Enter DO in the Device batch monitor dialog box and click the Start monitor button Enter DO Monitor for
329. th the GX Developer filling in the blanks verify the operation using the demonstration machine x ra E ota A is l be Bis N A on oO v v wy y yv y y yy 1 5 2 6 3 7 4 1 The following shows the timing chart of the program X0 MO i x1 A Restart TO contact i f was lt _ gt 3 3 3 i y l T1 contact 1s 3 3 1s Y70 E 1s 1s C0 contact a CO counter 1 P EE 10 i ae 2 The following shows the basic flickering ladder and its timing chart Ladder Timing Chart T1 peg To Cro contact T0 K10 T1 contact REFERENCE The flickering ladder can be created using the special relay that generates clock as shown below Other than the SM413 2 s clock the following SM413 2 s clock can be used tik a I SM409 0 01 s clock SM410 0 1 s clock SM411 0 2 s clock Timing Chart SM412 1 s clock SM414 2n s clock 1s 1s 1s SM415 2 nms clock Starts from OFF when the PLC is reset or the Y70 power is turned ON RASCHOOL GESTS 4 8 3 Practice Question 3 PLS PLF Y70 starts to switch between ON and OFF alternately upon detecting a rising edge of XO signal and a falling edge of the signal triggers Y71 to do the same operation as Y70 does Timing Chart X0 Y70 Y71 Create the following program with the GX Developer filling in the blanks verify the operation using the
330. tion is performed in the input information 1 from the input module and input information 2 in the data memory Then this data is used as input information 3 at Sequence program execution e When the output contact instruction is performed Output information 4 is read from the output Y data memory and a sequence program is executed e When the OUT instruction is performed The sequence program s operation result 5 is output to the output module and is stored in the output Y data memory e When the QCPU performs I O in the direct mode a sequence program uses DX for inputs and DY for outputs App 1 Appendix 1 2 Refresh mode In the refresh mode all changes occurred to an input module are imported to the input data memory in a PLC CPU at a time before each time a scan is performed The data memory is used when performing the operation The operation results made in a program for output Y are stored to the output data memory each time the operation is made All the data stored in the output data memory is batch output to the output module after the execution of the END instruction The following diagram shows the flow of I O data in the refresh mode CPU module CPU i Operation processing When inputs 3 i freshed 1 Data memory are retreshe Input 5 for input X 1 module XO 4 When outputs are refreshed 2 Y75 k Y70 gt Data memory for output Y Out
331. to special function module 9 Display instructions Instruction ASCII print LEDC PRC Execution Processing details condition Number of basic steps e Outputs ASCII code of 8 points 16 characters from device designated by S to output module e Outputs ASCII code from device designated by S to OOH to output module e Converts comments from device designated by S to ASCII code and outputs to output module e Displays ASCII code of 8 points 16 characters from the device designated by S at the LED display device on the front of the CPU module e Displays the comments from the device designated by S at the LED display device on the front of the CPU module e Resets annunciator and display unit display Emma App 33 Status latch 10 Debugging and failu Instruction symbol Check condition CHKCIR CHKCIR CHKEND CHKEND re diagnosis instructions Processing details e CHK instruction is executed when CHKST is executable e Jumps to the step following the CHK instruction when CHKST is ina non executable status e During normal conditions gt SM80 OFF e During abnormal conditions gt SM80 ON SD80 Failure No Execution condition e Starts update in ladder pattern being checked by CHK instruction e Ends updat
332. ttings mentioned is not required For how to perform the parameter setting refer to the multi CPU setting of parameters in Section 3 2 Q Paramete PLC name PLC system PLC file PLC RAS Device Program Boot file SFC 1 0 Assignment PLCNo 1 O a PLC PLCNo 2 v X j i Be 1 Click 3 2 2 Ei X BE z z 5 aca z E 55 x z 66 a z z Assigning the 1 0 address is not necessary as the CPU does it automatically Leaving this setting blank wil not cause an error to occur Base setting Base mode G Auto C Detail 8 Slot Default 12 Slot Default Rehas suid be sstassame when impart Multiple CPU Parameter _ Read PLC data Acknowledge XY assignment Multiple CPU setings Defaut Check End Cancel 1 0 Assignment Slot T PLC PLCNol PLC PLCNo 2 v Points Starx lt 2 Set Switch setting Tr Detailedsetting 1 2 3 E 4 aea intel Q64AD TBpoints 0080 a aia le X 6 x Zz B z X x Assigning the 0 address is not necessary as the CPU does it automatically 3 Cl i ick Leaving this setting blank will not cause an error to occur Input format ME Model name Switch 1 Switch 2 Switch 3 Switch 4 Switch 5 1 2 F 0003 MER Fl ahe 4 Enter
333. tup button on the Write to PLC dialogue box 11 The Transfer Setup dialog box will appear Click 2 in the Multiple CPU setting column 12 Click the button 13 The target CPU will switch to the second CPU 14 Mark the checkbox for PLC Network Remote placed below the Parameter 15 Click the button to start writing the parameter to the CPU No 2 16 When the writing is complete follow the steps from 9 through 12 to select the first CPU again At Step 11 select 1 in the Multiple CPU setting column Continued from the previous page Write to PLC E17 Click the button to close the dialog box Connecting interface OMT lt gt pic module PLC Connection N j Station No Host PLC type OZH 5 Click Target memory Program memory Device memory File selection Device data Program Common Local z _Tte Select all Cancel all selections Password setup fra Program a EA MAIN Device comment COMMENT W Parameter EA PLC Network Remote Related functions Transfer setup Remote operation Clear PLO memory Format PLO memory FER Arrange PLO memory L Create title Free space volume Total free space volume Bytes IMPORTANT If you practice the operation by following the procedures described in this textbook resetting rewriting the parameter for the CPU No 2 is required only in
334. tus SM390 Access execution flag of intelligent function This data is overwritten when the intelligent function change New QCPU module access module access instruction is executed again e Used by the user in a program as a completion bit 3 System clocks counters ON WW SM400 Always ON e Always ON ON SM401 Always OFF Always OFF ON After RUN ON for 1 1 scan scan only OFF lt gt OFF for 1 scan only after RUN ON for 1 scan only after low speed execution type program RUN OFF for 1 scan only after low speed execution type program RUN 0 005 sec 0 005 sec SM409 0 01 second clock M410 0 1 second clock 0 2 second clock i Es 0 5 sec SM414 2n second clock M415 2n ms clock BY ms n2 scan n2 scan a n1 scan After RUN ON for 1 scan only This connection can be used for scan execution type programs only e After RUN OFF for 1 scan only e This connection can be used for scan execution type programs only After RUN ON for 1 scan only This connection can be used for low speed execution type programs only e After RUN OFF for 1 scan only This connection can be used for low speed execution type programs only e Repeatedly changes between ON and OFF at 5 ms interval When turned OFF or reset goes from OFF to start e Repeatedly changes between ON and OFF at each designated time interval
335. ty of 10V and 4000 to 10V before output This means that the modules convert the digital input value of 1 to analog quantity of 2 5mA and abandon digital input values in decimal places 2 D A conversion characteristics on current outputs when in a standard resolution mode with analog output range set to 0 to 20mA N is 3 gt 10 005mA Analog output current 10 000mA i l 2000 2001 2002 2003 Analog output current 0 Digital input value Figure 7 15 D A conversion characteristics current output Input For current outputs the modules convert O to OmA and 4 000 to 20mA This means that the modules convert the digital input value of 1 to analog quantity of 5yA and abandon digital input values in decimal places REMARK A voltage current value max resolution that becomes digital value of 1 through D A conversion differs depending on the settings of the resolution mode 1 4000 1 20000 1 60000 or the output range 7 6 3 Intelligent function module switch settings 1 Setting items for module switches stings Analog output range Setting value for output range BEREG 4 to 20MA OH CH4 CH3 CH2 CH1 0 to 20mA 1 to 5V Input range setting 0 to 5V 10 to 10V H User range setting CH8 CH7 CH6 CH5 Input range setting CH4 CH3 CH2 CH1 HOLD CLEAR function setting OH CLEAR 1 to FH HOLD Standard mode Asynchronous 01 FFH Synchrono
336. ule is stored B5 SSBB BTS _ B80 8th 7th 6th 5th 4th 3rd 2nd Ast 8th 7th 6th Sth 4th 3rd 2nd 1st module module module module module module module module module modue module module module moduie module module Error NIMI link A x detection error status On the PLC CPU and A 1S J71PT32 S3 The corresponding bit turns on when sides the bit corresponding to A 1S J71PT32 S3 s following signals turn on A 1S J71PT32 S3 Hardware error X0 X20 with communication error turns on MINI 83 link error detected X6 X26 MINI S3 link communication error X7 X27 module verificatio When the AC power supply module is used 1 is added at occurrence of an instantaneous power failure of within 20ms The value is stored in BIN code It is reset when power is switched from OFF to ON AC Number of When the DC power supply module is used 1 is added at occurrence of an instantaneous power failure of within 10ms The value is stored in BIN code It is reset when power is switched from OFF to ON When the DC power supply module is used 1 is added at occurrence of an instantaneous power failure of within 1ms The value is stored in BIN code It is reset when power is switched from OFF to ON DOWN time for AC counter DOWN Self diag Self diag nostic nosis error error number When error is found as a result of self diagnosis error number is stored in BIN
337. units S Initia capacity Q4A Drive 4 Drive 4 capacity is stored in 1 K byte units S Initial Q2A S1 Gtandard Drive 4 capacit Q3A ROM parny Drive 4 capacity is stored in 1 K byte units S Initia ein capacit pacity Q4AR The use conditions for drive 3 4 are stored as bit patterns In use when ON The significance of there bit patterns is indicated below B8 Drive 3 4 Boot operation QBT B9 CPU fault history rive Parameters QPA FD s Drive 3 4 use Device comments QCD B10 SFC trace QTS S Status A conditions Device initial value QDI B11 Local device change conditions File R QDR QDL Trace QTS B12 B13 B14 B15 SD624 e The use conditions for memory card B are stored as bit patterns ON when in use e The significance of there bit patterns is indicated below B8 Simulation data Boot operation QBT QDS Q2A S1 Memory Meri ry dard B Parameters QP A B9 CPU fault history S Status Q3A card B use s QFD New congitions 197 ee Bence Evai api B19 SFC trace OTS enenge A Device initial value File R QDR BI Local device QDL Q4AR Sampling trace QTS B13 Status latch QTL B14 Program trace QTP B15 File register S Stat SD640 3 Drive number Stores drive number being used by file register Status New drive change SD641 A i Stores file register file name with extension selected at SD642 parameters or by
338. uring execution of trace S Status 2 progress OFF Suspend change ON et e Switches ON during execution of sampling trace Sens execution in progress change e Trace is triggered when this relay switches from OFF to Trace trigger ON U SM803 OFF LON Start Identical to TRACE instruction execution Status Sampling trace is triggered when this relay switches from Sampling trace trigger OFF to ON U Identical to STRA instruction execution status OFF Not after trigger e Switches After trace is triggered ay ON After trigger et 7 PIA S Status witches After sampling trace is triggered trigger change App 57 Set by a S Stat Trace completed e Switches ON at completion of trace Status SM805 OFF Not completed change Sampling trace ON End S Status Switches ON at completion of sampling trace completed change Status latch OFF Not ready S Status SM806 ON READY Goes ON when status latch is ready change SM807 Status latch command OFF ON Latch e Runs status latch command Status latch i S Stat is OF Es ute ayy Goes ON when program trace is ready as completion ON Ready change SM809 Status latch clear OFF ON Clear e Enable next status latch Program trace OFF Not ready A S Status M810 ON READY Goes ON when program trace is ready changa OFF Suspend Program trace started when this goes ON S Status Ma1 Star program face ON Start Suspended when OFF Related spe
339. us output mode Standard resolution mode 1 FH High resolution mode Standard mode D A conversion Offset gain setting mode Fixed to 0 REMARK The settings for the offset gain setting mode differ between the function version A and function version B Explanations in this section are made based on the function version B For details refer to the User s Manual Qn H Parameter 2 Setting module switches I I The demonstration machine incorporates two CPUs so it is necessary to perform the parameter settings for multi CPU system if there is only one CPU incorporated the parameter settings mentioned is not required For how to perform the parameter setting refer to the multi CPU setting of parameters in ection 3 2 PLC No 1 PLC No 2 Click Base setting Assigning the 1 0 address is not necessary as the CPU does it automatically _ Leaving this setting blank will not cause an error to occur Base mode Auto Detail 8 Slot Defaut 12 Slot Default Settings should be set as same when using multiple CPU Import Multiple CPU Parameter Read PLC data Acknowledge XY assignment Multiple CPU setings Defaut Check End Cance 170 Assignment PLCNo 2 w E 4 y ojac fcn A 2 Set Points Starec C h 300 Swich setting E
340. use of QDRSET Instruction as ASCII code B15 to B8 B7 to BO SD643 File register File register file SD641 2nd character 1st character S Status file name name SD642 4th character 3rd character change SD644 SD643 6th character 5th character SD644 8th character 7th character SD645 SD645 1st character of extension 2EH SD646 3rd character of extension 2nd character of extension SD646 D647 File register File register Stores the data capacity of the currently selected file register S Status capacity capacity in 1 k word units change File register File register S Status SD648 block g Stores the currently selected file register block number block number change number SD650 Comment Comment drive Stores the comment drive number selected at the S Status New drive number parameters or by the QCDSET Instruction in ASCII code change App 79 Special Register List Continued Corresponding Set b Number Name Meaning Explanation wie a ACPU ae D9000 e Stores file register file name with extension selected at the parameters or by use of QDRSET Instruction as ASCII code to B8 B7 to BO Comment Comment file SD651 2nd character 1st character S Status file name name SD652 4th character 3rd character change SD653 6th character 5th character SD654 8th character 7th character SD655 1st character of extension 2EH SD656 3rd character of extension 2nd character of extensio
341. utine Subroutine Subroutine Subroutine Da program a i aa ae eae er a yal Pod ae 7 7 I CALL P3 The following ladder circuit shows the above nested program CALL Sequence program s 7 m zZ is CALL P1 subroutine program D y m OB BO X CALL P2 subroutine program A d m P ha U K y P3 subroutine program CAL U A P3 m 4 U oa CALL P4 subroutine program U oa OR m 4 i P5 subroutine program vy m 4 Applicable Device Intelligent Internal Device Fie MELSECNET 10 Index f function system user register H Direct Jn register module Un G Basic number of steps z k a a A E Ly RET a a a a ee oe E E The basic number of steps of CALL P is 2 tn and that of RET is one n is a argument passed to the subroutine ANSCHOOL QEXS Program name MAIN Ladder Example Create the following ladder with the GX Developer and write it on the CPU of the demonstration machine to check if the CALL and RET instructions work properly P10 x4 Operating Procedure Refer to Section 4 4 Operating Procedure for the detailed procedure of the following operations 1 Create a new project 2 Create a program 3 Write to the PLC 4 Monitor the ladder Operation Practice Verify the operation of the ladder which was created with the GX Devel
342. vices eo 2 The Change open close connect appears Click Device and input X4 in the list box 3 After the setting is completed click the m Number of substitutes Replace all button 3 Click Find direction From top to bottom From cursor to bottom C Specified range z Before change After change X6 X oH 4 X70 X M10 K150 X4 M10 K150 4 TO pa 4h Barr y BCD TO K4Y50 H BCD TO K4Y50 H T1 T1 4 Confirm that normally open have been switched to B contacts and vice versa X6 13 H Y74 gt Hi Y74 gt Y74 hs Y74 K30 K30 hie lt T1 gt f T gt Before exercising the contents in Section 6 6 after this section be sure to store the program in a personal computer to a CPU For how to write to a CPU refer to Section 2 5 6 6 Write During RUN This function allows programs to be written to CPUs that are currently running Activate the CPU before proceeding with the procedure below 1 Change the circuit 1 Change the ladder In the example here X1 is changed to X0 M10 ies GX Developer Unset project LD Edit mode MAIN 35 Step 2 After the change is made click Convert Find Replace iviae View Online Diagnostics Tools Window Help ii M ji glee er F4 Convert Online change Convert All programs being edited Alt Ctrl F4 KAEA ass H lt 91 g
343. wW wW wW wW WwW wW W wW i e Always ON S Initial QCPU OFF No drive 4 ON Drive4 Goes ON when drive 4 card 2 ROM area is present S Initial ew SM623 Drive 4 flag SM624 Memon cord B tne OF Es Nob used Goes ON when memory card B is in use S Initial flag ON Inuse lew Memory ard B OFF Remove insert y a enabled Goes ON when memory card B cannot be inserted or SM625 remove insert prohibit f U ew fla ON Remove insert removed g prohibited App 55 N N e Always ON S Initial N QCPU M622 Drive 3 flag E ae i Goes ON when drive 3 card 2 RAM area is present S Initial N N N i E A D amp 25 on no ot Q O Corresponding CPU Set by r OFF File register not S Status SM640 File register use used e Goes ON when file register is in use A a x 5 change ON File register in use OFF Comment not S Status O SM650 Comment use used Goes ON when comment file is in use change ON Comment in use OFF Internal memory execution Goes ON while boot operation is in process S Status ON Boot operation in Goes OFF if boot designation switch is OFF change progress OFF Within access Goes ON when access is made to area outside the range of range file register R of memory card A Set within END ON Outside access processing range e Reset at user program New SM660 Boot operation Memory card A file SM672 register access range flag OFF
344. ware version in ASCII code Stored in low byte High byte Low byte Inconsistent value in high byte 41H is stored when using version A Note The internal system software version may differ from the version indicated by the version symbol printed on the case e In a multiple CPU system configuration the CPU number of the host CPU is stored PLC No 1 1 PLC No 2 2 PLC No 3 3 PLC No 4 4 Ver B 3 System clocks counters Number of counts in 1 second units 2n second clock units 2nms clock units Number of counts in each scan Number of counts in each scan Corresponding pec Corresponding CPU S Sg acu PU e Incremented by 1 for each second execution after the CPU module is set to RUN e Count repeats from 0 to 32767 to 32768 to 0 Stores value n of 2n second clock Default is 30 Setting can be made between 1 and 32767 e Stores value n of 2nms clock Default is 30 e Setting can be made between 1 and 32767 e Incremented by 1 for each scan execution after the CPU module is set to RUN e Count repeats from 0 to 32767 to 32768 to 0 e Incremented by 1 for each scan execution after the CPU module is set to RUN e Count repeats from 0 to 32767 to 32768 to 0 e Used only for low speed execution type Counting is not executed for scans by initial execution type program S freeing S Every END processing App 75 Pega When Set Execution SD500 prog
345. when character string S1 character string S2 e Compares character string S1 and character string S2 one character at a time e Conductive status when character string 1 character string S2 e Non Conductive status when character string S1 character string S2 e Compares character string S1 and character string S2 one character at a time e Conductive status when character string 1 gt character string S2 e Non Conductive status when character string S1 lt character string S2 e Compares character string S1 and character string S2 one character at a time e Conductive status when character string 1 lt character string S2 e Non Conductive status when character string S1 gt character string S2 e Compares character string S1 and character string S2 one character at a time e Conductive status when character string 1 lt character string S2 e Non Conductive status when character string S1 2 character string S2 e Compares character string S1 and character string S2 one character at a time x e Conductive status when character string 1 2 character string S2 e Non Conductive status when character string S1 lt character string S2 Character string data comparisons
346. window display Cross reference list List of used devices Continued on the next page Continued from the previous page 3 Click the Delete line Shift Del menu Cut 7 Ctrl x c 3 Click Colic Insert line Shift Ins Delete line Shift Del Insert row Ctril Ins Delete row Ctrl Del Draw line F10 jo if cen 4 The selected row will be deleted 2 4 H H x70 m 4 The row will be removed 2 8 4 Cutting Copying ladder program tl X7 A ladder program Follow the steps below to cut and copy the ladder to be modified program shown on the left c Y77 gt X2 X0 Y70 1 Click on the start point of the ladder program you want to cut 2 Drag the mouse cursor over the ladder to specify the area The selected area will be highlighted Click the step numbers and drag the mouse cursor vertically to specify the area in ladder block units L 3 Click 1 on the tool bar or select Edit cut Ctrl x to cut the specified area 3 Click to cut A i END Continued on the next page wee a Continued from the previous page j 4 Click the start point of the ladder program you l want t
347. xcept for file register ZR e Bit device Devices whose device Nos are multiples of 16 whose digit designation is K8 and which use no index 3 2 modification e Constant No limitations Devices other than above App 17 3 Data conversion instructions Instruction Execution Category symbol Processing details condition Number of basic steps BCD conversion S D BIN O to 9999 n w O J U wW QO S v ojo NaI o BCD conversion S 1 S gt D 1 D BIN 0 to 99999999 conversion l BIN conversion S D t BCD 0 to 9999 BIN conversion 8 1 S gt D D BCD 0 to 99999999 ojj o Lj o S Conversion to floating point S 1 S D BIN 32768 to 32767 on ojj o Conversion to floating point S 1 S gt D 1 D l o S Real number 2147483648 to 2147483647 BIN conversion S 1 S _ gt D Real number 32768 to 32767 l o ojj o BIN conversion S 1 S aAa At D Real number 2147483648 to 2147483647 Conversion S gt D 1 BIN 32768 to 32767 o olj o l on ojj o Conversion 1 9 gt D BIN 32768 to 32767 Conversion
348. xecute appears Click the button 5 Select RUN in step 2 and perform step 2 to 4 again The CPU which was set to STOP in the above procedure enters a RUN state again 6 3 Forced I O Assignment by Parameter Settings F 1 Double click Parameter in the project list ble click 54 Device memory S Device init 2 PLC parameter Network param and uble click Remote pass are displayed Double click PLC parameter re Program Device comment a Remote pass El Device memory E Device init Qn Parameter E 3 The Qn H Parameter dialog box appears Click the I O assignment tab 3 Click Assigning the 1 0 address is not necessary as the CPU does it automaticaly Leaving this setting blank will not cause an error to occur Base settingl Base model name Power model name Extension cable Slots p Base mode Auto Detail 8 Slot Default 12 Slot Default eee me CPU ee Import Multiple CPU Parameter_ _ Read PLC data Acknowledge XY assignment Multiple CPU setings Defaut Check End f Cancel Sot Docent 4 Select Empty in the list box of Type column PLC name PLC s
349. y parts on PLCs multiple answers allowed 73 1 Collected from 223 factories 1 0 Power CPU Peripheral Commu Memory Other No supply devices nication answer Figure 9 2 Causes of PLC faults multiple answers allowed 50r Collected from 223 factories 40 4 40 30 26 0 24 7 24 2 20 19 3 12 6 12 1 10 6 3 1 3 a Unknown Noise Short of Manufacture Other Vibration No cause load Poor Incorrect shock answer connection programming 9 2 Maintenance To keep PLCs in the best operating condition conduct the following daily inspection and periodic inspection 1 Daily inspection The items that must be inspected daily are listed in table 9 1 Table 9 1 Daily inspection Spacon fem Judgment omer Installation of base unit Installation of I O module Connecting conditions Module indication LED Power supply module POWER LED 1 CPU module RUN LED CPU ERROR LED CPU module BAT ARM LED Input LED Output LED Check that fixing screws are not loose and the cover is not dislocated Check that the module is not dislocated and the unit fixing hook is engaged securely Check for loose Screws should not be Retighten the terminal terminal screws loose screws The proper clearance should be provided between Solderless terminals The module fixing hook must be engaged and Retighten the screws installed securely The module fixing hook S
350. ystem PLG file PLC RAS Device Prosram Boot file SFO 1O assienment 5 Input QX42 i the Model name col nin VO Assignment a Seed 6 Select 32points in the list box of Points erm i om B Denera column 7 Input 0000 in the StartXY column omenenal 6 Select iz 8 After the setting is completed click the 5 Enter emm 7 Enter Seal button 8 Click After this exercise is finished initialize the settings by Wet es should be set as same when Import Multiple CPU P Read PLC data the following procedure Acknowledge XY assignment Multiple CPU settings Default Cancel 1 Click the button in the Qn H Parameter dialog box to initialize the parameter settings 2 Click E4 on the toolbar to open the Write to PLC dialog box and then write only the parameters to Check Using Demonstration Machine Stop the CPU and click on the toolbar The Write to PLC dialog box opens Click the parameter of the target data and then click the button button sequentially to write only the parameter to the CPU After that activate the CPU and confirm the following Perform the same parameter settings to second CPU This is not necessary if there is only one CPU incorporated it Gr sr i nr na rt iran Se rv iG ti ln Gert a En nt ata nt ra a i aa 1 A current value of the timer TO disappears from the screen of the digital display Y50 to Y5F Instead the LEDs of Y70 to Y77 start flashing Th
Download Pdf Manuals
Related Search
Related Contents
User Manual FSG_880 MultiFlo OIPM Bedienungsanleitung zum Samsung HT-Z320 Uporabniški priročnik Weatherfax on the cheap KEIHIN PE24 Carburetor Kit Instruction Manual Copyright © All rights reserved.
Failed to retrieve file