Home

Q Corresponding Intelligent Communication Module User`s Manual

image

Contents

1. _ SDA Driver 4 Send Data 1 The Output Control Input also called the send a gate of the driver Send portion in the figure at Output Control Input 1 P RDAN Receiver left decides whether data from SDA or SDB are Receive Data output to an external device or not output RD 2 RS 422 485 Interface Operation In the above figure when the Output Control Input is in the ON state it enters the low impedance state the state in which data can be sent Also when the Output Control Input is in the OFF state it enters the high impedance state the state in which data are not being sent QD51 R24 send start timing and send processing end timing Send start timing When data is sent the high impedance status started by the operation described in above 1 2 is terminated then a mark of several bits is output and the actual data is output Send processing end timing After sending of data is completed several us are necessary for the Hardware gate OFF time until the send processing is ended changed to the high impedance state Output Control Input Opposite Device Side Data QD51 R24 Side Data Output Control Input o Mark of several bits is output Data sending time range gt Hardware Gate OFF time Output Control Input Output Control Input ON time range OFF time range Low impedance state High impedance state lt 4 i The QD51 R24 is in the data The QD
2. w 10 11 10 10 12 mean 13 1212 14 13013 15 14 14 M End Cancel Display contents Set each switch setting value in combination with 16 bit binary data setting the mode console etc Switch No Switch 1 Setting switch Access possible time setting after Y reset Refer to 1 setting Flash ROM write protection setting Debugger setting Not used Set 0000n 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 1 Setting switches b7 b6 b5 b4 b3 b2 bl bO Da 2 Channel setting Refer to a bi Console b3 Notused Fixed on OFF Cea consae aaga n be Notussa o S Fixed on OFF a Console Channel setting oF ON Wihconsoechi O on oF wihconsoech2 on on setngimpossie Bit position b8 Notusea FredonoFF bg Flash ROM write protection setting Without Not used Fixed on OFF Channel setting Refer to b Debugger Fixed on OFF bF bE bD bC bB bA b9 b8 b Debugger Channel setting Bit position Contents w e Without a debugger With debugger CH1 With debugger CH2 Setting impossible 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION 1 MELSEC Q Console Sets whether a console will be used or not which channel CH1 CH2 will be used and whether software is to be used or not e Channel setting Sets which channel the console will be connected to Cannot be connected t
3. Source Station 1 QCPU No 1 2 QCPU No 2 3 QCPU No 3 4 QCPU No 4 1 Module used for routing controlled by QCPU No 1 1 QD51 R24 controlled by QCPU No 1 2 Module used for routing controlled by QCPU No 2 The modules used for the routing are MELSECNET H network modules x1 When accessing other stations available relay modules are as follows e MELSECNET H and MELSECNET 10 network modules Q series C24 e Ethernet interface modules 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 2 4 For Use with Redundant CPUs This section describes the use of the QD51 R24 with the Redundant CPUs 1 Dedicated instructions The dedicated instructions are not applicable 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 2 5 For Use at MELSECNET H Remote I O Station This section describes the use of the QD51 R24 on a MELSECNET H remote I O station When using the QD51 R24 with a QCPU it is not necessary to read this section 1 System Configuration Example Remote Master Station Remote I O Station QJ71 QCPU LP21 25 Remote I O Station 2 Available functions The functions which can be used when the QD51 R24 is installed in a MELSECNET H remote I O station are shown below Availabilty Communications by BASIC program 1 O Can be used x Cannot be used 1 Availab
4. a Writing Reading of data by the special variable W in a BASIC program With the special variable W the expansion register is designated by EDO to ED1023 The designation is in 1 word units QD51 R24 Expansion Dane b15 to EDO ED1 W ED2 Reading of data ED3 ED4 BASIC program ED1021 w ED1022 Writing of data ED1023 Program example The following shows a program where 123 is written into the QD51 R24 s expansion register EDO 150 W ED 0 123 QD51 R24 Expansion Register Register 1C004 EDO oe NST BASIC 1C01H ED1 g Program 1C024 1 word units 1C03H to 1FFCH ED1020 1FFDH ED1021 1FFEn ED1022 1FFFH ED1023 3 SPECIFICATIONS b MELSEC Q Writing Reading data by the PUTMEM GETMEM command in a BASIC program With the PUTMEM GETMEM command data can be written to or read from the extension register An address can be specified by EDO to ED1023 in units of 1 byte QD51 R24 Expansion Register b7 to bO Lower order EDO Higher order Lower order ED1 Higher order Lower order EDZ Higher order to Lower order ED1022 Higher order amp p1023 LOWer order Higher order GETMEM H Reading of data PUTMEM qee WE Writing of data BASIC program Program example In the following program data 4 bytes in A 1 and A 2 of the QD51 R24 are written into ED4 and ED5 20
5. cccccecseceeeeeeeteteteteeeeeeenes 3 20 C Commercially Available Compilation SOPMWANEC ceeccccecceeecceeeeeeeeeneeseaeeseeeseeneessnees 2 3 COMMON MCMOLSY ecceeceeteeteteteteeeeeeeees 3 23 Communications with a Console 4 2 4 3 Communications with a Terminal 4 2 4 6 Communications with External Device 4 14 Communications with the programmable controller CPU ceee leari e aet naet 4 16 Comparison of Functions with Previous Modules 2 cceecceeeteeetees App 1 Compiletn or ee ae en bees A 14 Connection to a Console c cceeee 5 4 Connection to a Debugger 5 4 Connection with the External Device 5 5 Consoles aia a aaar A 14 D Data Communications Between Tasks 4 23 Data Communications with Buffer Memory E I AAE A A E teal 4 21 Debugger varie titi ei leeeeiteeess A 14 E LED are eee ory rer EA 3 26 3 31 Event Control ccceseeceeeeeeeeseeeeeseeeeeaees 3 65 Exclusive Commands c ccceeeeeeees 6 1 Expansion Register cceseeeeeeereeieees 3 26 Expansion Relay iseeneses 3 35 External Dimensions cceeceeees App 6 G General INput ccceceeeeeeeeeeeeeeteeeeees 3 45 General Output ceccceseceeseeeeeteeteees 3 49 H Handling Precautions ceceeeeeeeeeeeeee 5 1 Index 1 I V O Assignment Settings cece 5 11 I O Module Intelligent Functio
6. If there are errors when changing data changing a program or in status control it could result in system malfunction or cause mechanical damage or accidents Disposal Precautions CAUTION e When disposing of this product treat it as industrial waste e CONDITIONS OF USE FOR THE PRODUCT e 1 Mitsubishi programmable controller the PRODUCT shall be used in conditions x i where any problem fault or failure occurring in the PRODUCT if any shall not lead to any major or serious accident and ii where the backup and fail safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem fault or failure occurring in the PRODUCT The PRODUCT has been designed and manufactured for the purpose of being used in general industries MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY INCLUDING BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT WARRANTY TORT PRODUCT LIABILITY FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS PRECAUTIONS OR WARNING CONTAINED IN MITSUBISHI S USER INSTRUCTION AND OR SAFETY MANUALS TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT Prohibited Application Prohibited Applications include but not limited to the use of the PRODUCT in e Nuclear Power Plants and any other power plan
7. Module fixing screw normally not required 0 36 to 0 48N M3 screw 1 S 1 The module can be easily fixed onto the base unit using the hook at the top of the module However it is recommended to secure the module with the module fixing screw if the module is subject to significant vibration RS 232 cable connector screw M2 6 screw 0 20 to 0 39 Nem 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 2 Settings and Procedures Up Until Operation A brief list of procedures up until operation of this module is shown below Check the functions used and the Connect the console and the module with cables specifications Connect the console debugger Refer to Section 5 4 of this manual Connect the external device and the module with a cable Connect the QD51 R24 and the external device Refer to Section 5 5 of this manual Connect the GX Developer and QCPU with a cable Set the QD51 R24 s Input Output assignment Carry out QD51 R24 mode setting programming mode and set operation Refer to Section 5 6 of this manual Perform all the settings with GX Developer Carry out programming Carry out debugging Carry out QD51 R24 s mode setting Run mode Multitask Debug mode Set the run mode by the GX Developer and set operation Refer to Section 5 6 of this manual Commands and functions Refer to the programming manual C
8. c cecceeceeeceeeeeseeeeeeeseeeseneseeeseeeseneeeneeeneeenetenes A 12 MEANINGS OF TERMS AND THEIR CONTENTS ceccecceeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeesaeeeateeaeeeaeesaeeeas A 14 PRODUCT GONFIGURATION esis Anant ha dete india ent eddie idan A 14 1 1 Operation Overview for QD51 R24 0 eeeeceeceeeeeeeeeeteeeeeeeeesaeeseeeeesaeeseeseeseesieesieeseesieesieeneetieeeeees 1 2 1 2 Features of QD51 R24 aer irsi eena enaa i e aa aaa aea ani RAE aaa ap SNEITT EE NATA ANAA E aeia Kran a E aaan 1 4 1 3 About the Function Added Changed to the Function Version B ccccecceceeeeseeeeeeeeeeeeeteeeeneeeneeeaes 1 9 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS 2 1 to 2 12 2 1 Application SYSteMs cccccceeecceeeneeeeeeeeeeeeeeaeeeeeaeeceaeeseaeescaeeecaaeeseaeeseaeescaeeseaeeesaaeeseaeseaeeseaeessaeessaseesaes 2 1 2 2 Combining Programmable Controller CPU s with Other Device s ee eeeeeeeeeeeeeeeeeeeteeeeeeeeeeeeeenes 2 5 2 3 For Use in Multiple CPU System ceccceceeeceeeeeeeeeeeeeeeeeeeeeaeesaeeseesaeesaeeseesieeseesieesieesieesieeneesieesieetines 2 7 2 4 For Use with Redundant CPUS cccccececceceeeeeeeeeeeeeeeeneeseneeecaeeeeaeeseaceesaeeseneeseaeeesceeseneeseresseeseieeess 2 8 2 5 For Use at MELSECNET H Remote I O Station ccccccecesceeeseeeeeceeeeceeseaeeeeaeeeceeeeeceeseneeseeessieeeenees 2 9 2 6 Checking the Serial Number and Function Version cccceccseceseeeeeeeeeeeeeeeseeeeeees
9. MELSEC Q Communications specifications Data bit and stop bit settings differ Correct the BASIC program a 1H 53 A1SD51S QD51 R24 Data bit 5 6 7 8 5 6 7 8 Stop bit 1 1 5 2 1 1 5 2 Common memory backup Common memory backup is as shown below pst A1SD51S QD51 R24 Backed up Backed up Not backed up In the QD51 R24 common memory is not backed up by a battery If backup is necessary use the programmable controller CPU s file register R In that case change the part for accessing the common memory with the GETMEM and PUTMEM commands to the part for accessing the file register R with the PCRD and PCWT commands Task start signal Y19 When the Task start signal Y19 has been used to start a task add the YCHECK instruction in the sequence program In the A1SD51S or AD51H S3 a task starts as an interrupt to the module when the task start signal Y19 turns ON As the QD51 R24 monitors the task start signal Y19 at 10ms intervals to start tasks the start timing is different between the QD51 R24 and the A1SD515S or AD51H S3 By executing the YCHECK command as shown below the task can be started at the same timing as the A1SD5158 SeT DY Specify Task 1 SET DY19 Specify Task start App 3 ZP YCHECK vo D0 Execute Y check App 3 APPENDICE MELSEC Q 5 Maximum number of tasks The maximum number of tasks that can be run simultaneously is as shown below ol
10. 3 10 1 In the case of the programming mode This section explains the case in which the QD51 R24 is set to the Programming mode by GX Developer When it is turned ON or reset and after the program to be run is read from the flash ROM to the QD51 R24 s program area Refer to Section 3 5 1 the mode is switched to the System mode Power turned on Power turned on Y 100 V AC 200 V AC o q Power supply module rogrammable controller CPU o Initialization processing Reading of the program to be run v The program to be run is read from the flash ROM and loaded in the QD51 R24 s QD51 R24 program area However for a program with Program a task which has the multitask setting to be run turned ON the program is not read and Z Flash ROM loaded in the QD51 R24 s program area System mode Console operation is enabled in the system command reception state Console Display S gt PECIFICATION eS A ae MELSEC Q 3 10 2 In the case of the multitask debug mode This section explains the case in which the QD51 R24 is set to the Multitask debug mode by GX Developer When it is turned ON or reset and after the program to be run is read from the flash ROM to the QD51 R24 s program area Refer to Section 3 5 1 the mode is switched to the Multitask debug mode Power turned on Power turned on Aon 100 V AC 200 V AC o q Programmable contro
11. Commands 5 QD51 R24 Operating Status Signal XOE a This shows the QD51 R24 s operating state b It goes OFF during Power OFF or during Reset processing 3 SPECIFICATIONS MELSEC Q 3 8 2 Output Y detailed explanation Here QD51 R24 outputs Y are explained The output No Yn used in this section is the number as viewed from the programmable controller CPU 1 General Output YOO to Y10 Y13 to Y18 23 points The general output signals can be used to send ON OFF data from the programmable controller CPU to the QD51 R24 The programmable controller CPU can turn ON and OFF by a sequence programs or GX Developer s device test function etc In the QD51 R24 reading of general output ON OFF data is accomplished by the special variable B Programmable controller CPU QD51 R24 m amp H00 YOO H Reading by the B command By ON 2 Start Task No Designation Signal Y11 Y12 2 points a b These are signals which designate tasks to start by an interrupt from the programmable controller CPU and there is one point for each task Tasks with IT start by an interrupt from the programmable controller CPU set in the multitask setting are subject to the start task No designation signal Y11 Y12 The device No for a task for which the multitask setting is not set on IT is treated the same as a general output Multitask Setting Device No Start by an i
12. In a console and terminal the procedure for screen display and input from the keyboard differ as shown below In the case of a console In the case of a terminal Opening of the interface and setting of communications parameters etc for the console terminal Output to the screen screen control e Key input from the keyboard Setting of the channel No Refer to Section 5 6 2 for setting of a console by GX Developer intelligent function module switch settings 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 2 1 Communications with a console 1 Display of data on a console screen Here the way of thinking in the case of display of data on a console screen is explained Console In the case of a PC AT personal computer N En ual sB SB louz Data output Display of data to the screen CH 1 Procedure for displaying data to a console screen Carry out display of data to a console screen by the following procedure Set the data IA leas Set the data output destination in the console channel output destination by the ZODV command Output data to the console iata Output data to the console by the PRINT command etc Display data in the console End Commands and functions used The commands and functions used to display data on a console screen are shown below Command Function Name Processing Contents
13. R24 and is used to display the screen and input characters from the keyboard Interpreter This is BASIC in a format which processes while executing commands one by one Compiler This compiles programs created with the interpreter It registers the compiled files and executes them Compared to the interpreter its execution speed is on the average 2 or 3 times faster Multitasking This executes multiple programs by time slicing executing them so that it seems that they are being executed simultaneously Run Mode This is the mode used when the console is disconnected and the QD51 R24 is being operated independently It is actually used when this device is being run as a system Programming Mode Multitask Debug Mode This mode is used to connect to the console and carry out programming This mode changes the contents of variables and traces them while executing a program and carries out tracing PRODUCT CONFIGURATION Model Name QD51 The QD51 R24 product configuration is as shown below Product Name Quantity Model QD51 Intelligent Communications Module QD51 R24 Model QD51 R24 Intelligent Communications Module Terminal Resistor 330 Q 1 4 W For RS 422 communications Terminal Resistor 110 Q 1 2 W For RS 485 communications 1 OVERVIEW MELSEC Q 1 OVERVIEW This manual explains the system configuration performance specifications and functions of the
14. R24 is in a mode other than the Run mode it remains OFF and does not change b This signal goes ON when an error is detected in a BASIC program during multitask execution At this time the ERR LED turns on the special register number ED9000 or later buffer memory address 2400 or later stores the error line number and error code 1 and the module is placed in the system mode Correct the BASIC program where the error occurred c If the multitask execution interrupt signal XOC goes ON the multitask execution start signal XOB goes OFF BASIC ON Error detection xoc OFF d xoB ON OFF x1 For the error code refer to the Programming Manual Commands 3 SPECIFICATIONS MELSEC Q 4 QD51 R24 System Down Signal XOD a When the QD51 R24 s mode setting switch is set in the Run Mode 0 or 1 this signal is enabled it carries out ON OFF control If the QD51 R24 is in a mode other than the Run mode it remains OFF and does not change b This signal goes ON when the system goes down during multitask execution and an error is detected At this time the ERR LED turns on and the special register number ED9000 or later buffer memory address 2400 or later stores the error code 1 c If the QD51 R24 system down signal XOD goes ON the multitask execution start signal XOB will go OFF ON QD51 Down XOD OFF X0B ON OFF x1 For the error code refer to the Programming Manual
15. ZCNTL Sets the communications parameters in the currently open interface and reads the interface status ZSEND Sends the data from the designated interface ZCLOSE Closes the interface x1 A console terminal and printer are excluded Communications with a console or terminal Refer to Section 4 2 Printout from a printer Refer to Section 4 3 2 Refer to the Programming Manual Commands for details concerning commands and functions 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS ierte 4 4 2 lf data are received Here the way of thinking in the case of receiving data sent to the QD51 R24 from a device other than a console or terminal is explained If data are received the procedure is as follows 1 Open the interface 2 Data are received 3 The received data are saved to variables by the ZRECEIVE Command INPUTS function 4 Close the interface QD51 R24 ee ee User Program Receive Buffer BASIC Data reception PSSO INPUTS cere I I ZRECEIVE aeRECEVE l Commands and functions used The commands and functions used in receiving data sent to the QD51 R24 from a device other than a console or terminal are shown below Command Function Name Processing Contents ZOPEN Opens the interface and makes preparations for communications with the external device ZCLOSE Closes the interface ZCNTL Sets the communications parameters in the currently open interface and re
16. x2 If data DO is written from the programmable controller CPU to the QD51 R24 s buffer memory address 0 Write Instruction X0OB Sp y TO HO KO DO K1 H EEr command execution enable disable interlock 1 Refer to Section 5 6 2 for details of the mode setting switch x2 When the QD51 R24 is reset by the reset request signal Y1A execution of the FROM TO command within the access enabled time after the Y reset will not cause an error Resetting the QD51 R24 turns OFF the multitask execution start signal XOB The access enabled time after Y reset can be set in the intelligent function module switch setting of the GX Developer Refer to Section 5 6 2 3 SPECIFICATIONS MELSEC Q c Inthe QD51 R24 s Run mode it is OFF in the cases shown below 1 When the reset request signal Y1A of the QD51 R24 is turned on and reset is performed It goes ON again if the QD51 R24 s reset processing is completed and the multitask execution enabled state is restored 2 When a BASIC error is detected Multitask execution interrupt signal XOC goes ON BASIC ON on detection wie on xop ON 3 When the QD51 R24 system is down QD51 R24 fen down ha XOD goes ON QD51 sere down XOD X0B ON 3 Multitask Execution Interrupt Signal XOC a When the QD51 R24 s mode setting switch is set in the Run Mode 0 or 1 this signal is enabled it carries out ON OFF control If the QD51
17. 2 2 4 Dec 2003 SH NA 080089 C Correction Section 2 1 6 2 Oct 2004 SH NA 080089 D Correction SAFETY PRECAUTIONS About Manuals Conformation to the EMC Directive and Low Voltage Instruction About the Generic Terms and Abbreviations Chapter 1 Section 2 1 2 3 2 4 2 5 Section 3 1 3 2 1 3 3 2 2 3 8 1 Section5 1 5 5 1 Term change Before change After change GPPW GX Developer MELSECNET 10H MELSECNET H Feb 2006 SH NA 080089 E SAFETY PRECAUTIONS About Manuals Conformation to the EMC Directive and Low Voltage Instruction How to read this manual and Configuration Section 1 1 to 1 3 Section 2 1 2 5 Section 3 1 3 2 1 3 3 1 3 3 3 3 4 3 5 3 5 1 to 3 5 7 3 6 to 3 8 3 8 1 3 8 2 3 9 3 10 3 10 1 to 3 10 3 3 11 3 11 1 to 3 11 4 3 12 1 3 13 1 3 13 2 Section 4 1 4 2 4 2 1 4 2 2 4 3 4 3 2 4 4 1 4 4 5 4 5 4 5 3 4 5 4 4 8 2 Section 5 2 to 5 5 5 5 2 5 6 1 5 6 2 Section 6 1 6 2 Appendix 1 Appendix 2 Appendix 2 1 Appendix 3 Appendix 2 2 incorporated into Appendix 2 1 Oct 2006 SH NA 080089 F Correction SAFETY PRECAUTIONS Section 2 1 Aug 2008 SH NA 080089 G Change of a term PLC was changed to programmable controller Correction SAFETY PRECAUTIONS Compliance with the EMC and Low Voltage Directives About The Generic Terms and Abbreviations Section 1 2 2 1 2 3 2 4 2 6 3 1 to 3 3 5 1 5 3 to 5 5 5 6 2 5 7 6 2 Appendix 3 Aug 2012
18. 2 Errors that occur in BASIC naiinis a a aaa a a A aaa a aa a a aaa 7 3 APPENDICES App 1 to App 7 Appendix 1 Comparison of Functions with Previous Modules 2 ccsccceeeeeeeeeeeeeeeeeeeeeeeeeeeseeetseeees App 1 Appendix 2 About Use of Programs from Previous Modules c cceseceeeeeeeeeneeeeeeeeeeeseneeeeeeesneeees App 2 Appendix 2 1 About use of A1SD51S AD51H S3 programs ccecceeeeceeeceeeeeeeseeeeeeeeeeneeessneessaees App 2 Appendix 3 External Dimensions ccccceccceeseeeeeeeeeeeeeeeceeeaeecaeeecaeeecaneesaeeseaeeseaeeesineeseaeeseaeeeeeteieeess App 6 Appendix 4 RS 232 interfaces used for the QD51 R24 eeccecccececceeeneeeeeeeeeeeeneeseaeeseaeeeeaeeeseneessaees App 7 INDEX Index 1 to Index 2 ABOUT MANUALS The following manuals are also related to this product In necessary order them by quoting the details in the tables below Related Manuals Manual Name Man al No Model Name Code AD51H BASIC Programming Manual Command Corresponds to the QD51 QD51 R24 A1SD51S AD51H S3 SH 080090 Explains the commands how to use the functions and the specifications of AD51H BASIC 13JF63 Sold separately AD51H BASIC Programming Manual Debug and Compile Corresponds to the QD51 QD51 R24 A1SD51S AD51H S3 SH 080091 Explains concerning debugging of AD51H BASIC multitasking settings and compilation 13JF64 methods Sold separately COMPLIANCE WITH THE EMC AN
19. 5 App 5 APPENDICES MELSEC Q Appendix 3 External Dimensions EA e ee OS ON eR 4 PRG P RUN cH C ap dena Outside cable diameter x 4 10 O CHA o 5 N RS 232 Pi S 3 Oo O _ O CH2 o gt N RS 232 S o lt _ o m p O E A ast D HH z 90 4 5 27 4 e r pemn a Io o COE RE ERR t PRG P RUN cHAL a SD Jens sal fell s D ARI Ld De U 90 4 5 m m Units mm R1 Bending radius near the terminal block Outside cable diameter X 4 R2 Bending radius near the connector Outside cable diameter X 4 r1 Bending radius near crimp contact Connectable as long as not bended extremely App 6 App 6 APPENDICES MELSEC Q Appendix 4 RS 232 interfaces used for the QD51 R24 The connectors listed below are used as RS 232 interface connectors First 6 digits of the Module model Manufacturer Model serial number aD51 140117 or earlier DDK Ltd 17L 10090 27 D9AC FA 140118 or later HIROSE Electric Co Ltd RDED 9SE LN 55 QD51 R24 140111 or earlier DDK Ltd 17L 10090 27 D9AC FA 140112 or later HIROSE Electric Co Ltd RDED 9SE LN 55 App 7 App 7 INDEX A Application SyStem ccccseessseeeteeeees 2 1 B BOOTE rert ena te ieee tee tetas 3 61 Buffer Memory
20. B X Y amp HO00 to X Y amp H1F Procedure 2 Start the task Turn Y19 ON by a sequence program 3 Turn the Start Task No designation signal Y11 Task Start Signal Y19 OFF Pee Turn X amp H11 ON by a BASIC program Programmable controller CPU QD51 R24 Task 1 Start Instruction Output PLS MO H p Set Task No 1 Lene SET DY11 TEAR age amp H19 SET DYISR 2 Start task Ji Start task No 1 SET M1 e B X amp H11 1 DX11 RST DY11 4 RST DY19 3 Turn the Task No designation sign Y11 Reset RST M1 e Task Start Signal Y19 instruction ON 1 Setthe task No Turn Y11 ON by a sequence program PERET IER BER EEA BEE ERAEN BA EE E PECIFICATION eS A ae MELSEC Q 3 Task Start Signal Y19 a This is a signal that starts the task designated by the start task No designation signal Y11 Y12 The task start signal Y19 cannot be used as a general output even in cases where there is no task that is started by an interrupt from the sequencer CPU Also if the task is compiled BASIC it cannot be started by an interrupt from the programmable controller CPU b The task start signal Y19 is enabled only while the multitask execution start signal XOB is ON c The designated task 1 is started when the task start signal Y19 rises
21. BOOT If the start condition is ON Start request from Start request from another BASIC program another BASIC program BASIC Program BASIC program is read from the user FD HD END BASIC Program stops Start request BASIC Program is reset e BASIC Program stops e Start request is reset b Fora task that is started by a start request from another BASIC program write it so that an END command is run at the end of the BASIC program If an END command is run the start request is reset and it is made possible for the next interrupt to be received 3 SPECIFICATIONS MELSEC Q 3 12 Running a BASIC Program by Multitask Processing Here the method of running a QD51 R24 BASIC program etc is explained 3 12 1 Multitask processing The QD51 R24 us a unit which operates by BASIC programs created by the user The QD51 R24 has one main CPU central processing unit Multitasking accomplishes parallel operations by successively switching the execution between multiple BASIC programs up to 2 tasks Processing in the case of two tasks Shows the order of Task Task 2 1 main CPU processing P Z 1 BED w i Yess z A 4 We i baa ee E i 6 In QD51 R24 multitask processing switching of BASIC program execution is done when the conditions shown below occur When Task schedule time 50 ms has passed When a data input output data send rec
22. Carries out key input of data e Character code control codes 0x to 1FH and 7FH cannot be handled as data INKEY e Carries out key input of data INPUT e Character code control codes 0n 03h 13H 80H and FDH to FFn cannot be handled as data 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS ierte 4 2 2 Communications with a terminal 1 Displaying data on a terminal screen Here the way of thinking in the case of displaying data on the terminal screen is explained Terminal Helo ka Screen display Data output Display of data to the screen CH 1 Procedure for displaying data on a terminal screen The procedure for displaying data on a terminal screen is as shown below Open the channel to the terminal where the data are to be displayed ak Open the channel which the terminal is connected to using the ZOPEN command Set the data output destination ohn Set the data output destination in the channel the terminal is connected to using the ZODV command Output data to the terminal Jo Output data to the terminal by the PRINT command etc Display the data in the terminal y Close the terminal channel End 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS vetea Command and functions used The commands and functions used to display data on the terminal screen are as shown below Command Function Name Processin
23. General input Section 3 8 1 1 Y05 X06 Y06 X07 Y07 X08 Y08 General Output Section 3 8 2 1 X09 Yo9 YOA X0B 1 Multitask execution start signal Section 3 8 1 2 YOB Multitask execution interrupt signal Section 3 8 1 3 YOC QD51 R24 system down signal Section 3 8 1 4 YOD QD51 R24 operating status signal Section 3 8 1 5 YOE XoF Use prohibited Yo Y10 X11 Y11 General output BASIC Task 1 Start Task No Designation Section 3 8 2 2 signal BASIC Task 2 xia X12 X13 X14 ed eee maa eneral inpu ection 3 8 1 1 Y18 X1A X1C X1D General Output Section 3 8 2 1 X19 Y19 Task Start Signal Section 3 8 2 3 xa Y1A _ Reset Request Signal Section 3 8 2 4 X1B xic xp Use Prohibited xE xiF_ Useprohibited o ooo o o x1 The multitask execution start signal XOB is a signal that announces whether access to the QD51 R24 by the programmable controller CPU is possible or not Use itas the system program interlock signal It goes ON when a BASIC program is run x2 Ifthe QD51 R24 system down signal XOD goes ON start up the programmable controller CPU again Power supply reset CPU module QD51 reset PECIFICATION ee ee MELSEC Q Important Do not output turn ON the Use Prohibited signal which is one of the input output signals related to the programmable controller CPU If an output is activated for the Use Prohibited signal there is danger that
24. However it is necessary that the console be connected at all times lt Sequential Files gt These are files in which data can be read and written sequentially and which enable efficient use of memory They are used mainly for operating instruction data files and results files etc lt Random Files gt These are files where reading starts from the necessary portion only and only the necessary portion is written This type of file is appropriate for large volume inventory files instruction data for operator interfaces master files etc When reading or writing is done one time the maximum data size is 256 bytes Offline programming with a text editor is possible A BASIC program can be created offline using a text editor and the BASIC program can then be registered In offline programming the edited program cannot be run 1 VERVIEW z MELSEC Q 6 Online programming is possible By connecting the QD51 R24 to a PC AT personal computer and carrying out settings at a console a BASIC program can be edited and debugged In the case of programming with a PC AT personal computer RS 232 Cable QD51 R24 User s FD x KE 7 Multitask debugging is possible By connecting the QD51 R24 to a PC AT personal computer and setting a debugger debugging can be performed while performing multitask processing In the case of programming with a PC AT person
25. Name Processing Contents DATE Writes the calendar to and reads the calendar from the programmable controller CPU s clock element TIMES Writes the time to and reads the time from the programmable controller CPU s clock element The Q Series programmable controllers set the year in the clock data with 4 digits Effective years are 1990 to 2079 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS Mereeen 4 8 Data Communications Between Tasks During multitask processing the content of variables or arrays in each task etc can only be referred to in each respective BASIC program For exchange of data between BASIC programs during multitask processing use the following 1 Expansion Relay EM ON OFF Data 2 Expansion Register ED Data 3 Common Memory Data 4 8 1 ON OFF data communications by expansion relay EM The QD51 R24 s expansion relay EM is a device which can perform ON OFF control and read the ON OFF status from all tasks For details of the expansion relay refer to Section 3 5 6 Reading of the ON OFF control Expansion relay ON OFF state EMO to EM1023 e of the ON OFF ON OFF state control Program 1 Program 2 The expansion relays that can be used by the QD51 R24 are EMO to EM1023 1024 points Commands and functions used Commands and functions that perform ON OFF data communications by the expansion relay are shown bel
26. PUTMEM TO W ED 2 4 FROM A 2 4 A Expansion register 3 SPECIFICATIONS MELSEC Q c Writing Reading data by the FROM TO command in a sequence program With the FROM TO command designate the expansion register by the address The designation address is 1COOH to 1FFFu in 1 word units QD51 R24 Expansion Register b15 to bO 1C00H EDO TO 10014 ED1 Writing of data 1C024 ED2 1C03H ED3 Sequence 10044 ED4 Program to to FROM 1FFDH ED1021 Reading of data 1FFE ED1022 1FFFH ED1023 Program example The following shows a program where 123 is written into the expansion register address 1C00 when the multitask execution start signal XOB is ON To write data from the programmable controller CPU to the expansion register or to read data from the expansion register use the multitask execution start signal XOB as an interlock Write Command X0B k To HO H1C00 K123 K1 Interlock that enables or disables FROM TO execution QD51 R24 Expansion Register Sequence TO gt 1C00H EDO Program Writing of data 4 94 ED1 1 word units 1002H ED2 1C03H ED3 to to 1FFCu ED1020 1FFDuH ED1021 1FFEn ED1022 1FFFH ED1023 3 SPECIFICATIONS MELSEC Q 2 During execution of a BASIC program by multitasking data can be written or read from either task Expansion Register ED EDO Reading of data E Writing of data D 3 Number of Expansion Register Points T
27. R24 consists of 4 k words 8 k bytes of memory space Commands and functions used The commands and functions used to carry out data communications by the common memory are shown below Command Function Name Processing Contents GETMEM Performs reading of data in common memory PUTMEM Performs storage of data in common memory 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION Here the procedures and setting methods up to the point where operation can begin in a system where the QD51 R24 is used are explained When the QD51 R24 is used be sure to read the Safety Precautions provided in the front of this Manual Packaging and the installation environment for the QD51 R24 are the same as for the programmable controller CPU Refer to the User s Manual for the programmable controller CPU you are using concerning the module s packaging and installation 5 1 Handling Precautions Here the precautions to be observed when handling the QD51 R24 module are explained 1 The QD51 R24 s case is made of resin so be sure not to drop it or subject it to strong impacts 2 Tighten the screws such as module fixing screws within the following ranges Tightening t Screw location neti eae Remarks range RS 422 485 terminal block terminal screw 0 42 to 0 58N M3 screw i m Screw hole depth L 3 2mm or less Internal length from the surface
28. SH NA 080089 H Addition Appendix 4 Correction SAFETY PRECAUTIONS Section 3 2 1 3 3 3 Japanese Manual Version SH 080092 I This manual confers no industrial property rights or any rights of any other kind nor 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 manual 2000 MITSUBISHI ELECTRIC CORPORATION INTRODUCTION Thank you for purchasing the MELSEC Q series programmable controller Before using the equipment please read this manual carefully to develop full familiarity with the functions and performance of the Q series programmable controller you have purchased so as to ensure correct use CONTENTS SAFETY PRECAUTIONS tssteeescicict state anit Laer aie nde e fh de dee eda A 1 CONDITIONS OF USE FOR THE PRODUCT 0 0 eecececeeceeeceeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeesaeeeaeeeaeesaeesaeesreseeeaeesas A 5 REVISIONS aeicivatiguhhaiiauehel E E E ei daa thay A 6 CONTIEN Desist ages sie tedt eects Deceit a A Gaede ledet enna ie ades ends adda A 7 ABOUT MANUALS wun cdettit E E EE E bead dian E EA A 10 COMPLIANCE WITH THE EMC AND LOW VOLTAGE DIRECTIVES 1 eceeceeceeeeeeeeeeeneeeneeenteereereeas A 10 HOW TO READ THIS MANUAL AND CONFIGURATION ecceeceeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeenas A 11 ABOUT THE GENERIC TERMS AND ABBREVIATIONS
29. W LED Information gt HAW SW Information PRG 0001 MTSE 0000 Stop monitor Close 7 TROUBLESHOOTIN ceases MELSEC Q Display contents 1 H WLED information package Displays the display status of the QD51 R24 s ERR LED PRG LED and RUN LED b8 b7 b6 b5 b4 b3 b2 51 o o i pepee For System PRG RUN 2 H W LED information parameters Displays the QD51 R24 s A1SD51S compatible LED status b15 b14 b13 to b7 b6 bS b4 b3 b2 bi bO 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 zx rN For System fc PRG MTSE P1 RUN P1 ERR P2 RUN P2 ERR S ERR 3 H W SW information parameters The QD51 R24 s switch information is displayed No 1 to 5 correspond to switches 1 to 5 shown in Section 5 6 2 7 1 2 Errors that occur in BASIC For errors that might occur while a BASIC program is running refer to the Programming Manual Commands APPENDICES MELSEC Q APPENDICES Appendix 1 Comparison of Functions with Previous Modules A comparison of the QD51 R24 s functions with the functions of previous modules is shown AD51H S3 A1SD51S aD51 QD51 R24 Cpu element 80C186 15 MHz V53A 20 MHz Arithmetic element Programming language AD51H BASIC Interpreter compiler Number of tasks Go e ee e Start at power on e Start by interrupt from the programmable controller CPU Impossible when compiled programs Task start conditio
30. ZODV Switches the data output destination PRINT Displays data in the console screen PRINT USING Displays data in the console screen The format can be specified LOCATE Specifies the data display position in a console screen CLS Clears the console screen 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 2 Inputting data from a console keyboard Here the way of thinking in the case of inputting of data from a console keyboard is explained Console In the case of a PC AT personal computer QD51 RUN ERR PRG P RUN ESPES cnaf 8 Jonz Data input Input data from keyboard Keyboard Procedure for inputting data from a console keyboard Carry out inputting of data from a console keyboard by the following procedure Set the data input destination trees The data input destination is set in the console channel by the ZIDV command Wait for key input ane Execution of an INPUT command etc from the keyboard Key input from the keyboard End 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS erten Commands and functions used The commands and functions used to input data from the console keyboard are as shown below Command Function Name Processing Contents ZIDV Switches the data input destination INPUT Carries out key input of data e Character code control codes 0H to 1FH commas 2Cu and 7Fx cannot be handled as data LINE INPUT
31. and Writing Data from to the Buffer Memory of Another Intelligent Function Module Special Function Mod le i Trma at ett hada a a aeda aeaa aaae eataa cba tei ally 4 21 4 7 Reading and Writing Clock Data eeccecceeceeeeeeeeeeeeeseeeeneeeaeesaeesaeesaeesaeeseesieeseesieesieesieesieeteesieesieeeinees 4 22 4 8 Data Communications Between Tasks ccecceeceeeeeeeeeeeeeeeeeseeeseeeeesaeesaeeseeseesieesieesieesieesieesieeeeeeeness 4 23 4 8 1 ON OFF data communications by expansion relay EM cesceeeeeseeeeeeeeeeeeeeeeeeeeseeaeeeateeateas 4 23 A 8 A 8 4 8 2 Data communications by expansion register ED cceeceeeeeeeeeeeseeeeeeeeeeeeeeaeeeeeseesaeeeaeeeaeesas 4 24 4 8 3 Data communications by COMMON MEMOLSY cecceeceeeceeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeetaeeeaeesaeeeaeeeeesaeenas 4 24 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION 5 1 to 5 17 5 1 Handling Precautions icceciie siete delete ale ani diaa ai aian 5 1 5 2 Settings and Procedures Up Until Operation ccecccececcceenececeeeeeeeeceeeeeeneeseaeeseaeeeceeesseeeseaeeseeseaees 5 2 5 3 Names of Parts and Functions d005 20 200 See aaaea aea a Eaa aai EaD a Eiaa K aSa a 5 3 5 4 Connection with a Console Debugger ssessessesresresresnesnesnesnsensrnetnesnstnetncennactntnetnnnacennenennenaeenetneeneane 5 4 5 5 Connection with the External DeViCe cccccccecceceeeceeeeeeeeeeeaeeeceneeeeaeeseaeeecaeeesneeseaeessaeeseeeseeeese
32. cable specifications The following shows the RS 422 485 cable specifications 1 Use an RS 422 485 cable cable connected to the QD51 R24 terminal block which satisfies the following specifications with a length of 1200 m or less 2 Also when connecting multiple devices at 1 n n 1 or m n keep the total cable length within 1200 m The RS 422 485 cable specifications are shown below Cable Type Shielded Cable Number of Pairs Conductor Resistance 20 C 88 0 Q km or less Voltage Resistance 500 VDC 1 minute Recommended Cables SPEV SB MPC 0 2 x 3P Manufactured by Mitsubishi Electric Wire Co Ltd SPEV SB 0 2 X 3P Manufactured by Mitsubishi Electric Wire Co Ltd The electrical characteristics of the recommended cables SPEV SB MPC 0 2 x 3P and SPEV SB 0 2 X 3P are equivalent but they differ somewhat in their external dimensions and internal wire colors PECIFICATION eee alee MELSEC Q 3 3 3 Cautions during data communications with a RS 422 485 line Caution is necessary in the following points when carrying out data communications with the opposite device via the QD51 R24 s RS 422 485 interface As for the opposite device please send and receive data with consideration of the following points 1 Countermeasure for data error reception on the external device side when connected to the RS 422 485 When data containing errors are received by the external device install a
33. module cannot create the MELSECNET H remote I O network 2 Support of the multiple CPU system When using the QD51 R24 in a multiple CPU system refer to the QCPU User s Manual Multiple CPU System first a Compatible QD51 R24 If using the QD51 R24 on a multiple CPU system use function version B of the QD51 R24 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 3 Applicable Software Package The following software package supports the QD51 R24 a Console debugger software package essential Product Name Model Name AD51H BASIC Software Package SW1IVD AD51HP E For PC AT Personal Computers To use SW1IVD AD51HP E on Microsoft Windows 95 Operating System or Microsoft Windows 98 Operating System operate it in the MS DOS mode Do not operate on the MS DOS prompt screen of Windows 95 Windows 98 It will not run correctly b Software package for programmable controllers Essential GX Developer GX Works2 Single CPU system Version 7 or later Q00J Q00 Q001 CPU Multiple CPU system Version 8 or later Version 1 15R or later Q02 Q02H Q06H Q12H Single CPU system Version 4 or later Q25HCPU A CPU system Version 6 or later Single CPU system CPU system Q02PH QO6PHCPU Version 8 68W or later Multiple CPU system ee aa CPU system Version 1 87R or later Q12PH Q25PHCPU Version 7 10L or later Multiple CPU system CPU system Q12PRH Q25PRHCPU Redundant system Version 8 45X or later 0
34. not used which channel CH1 CH2 will be used and whether software will be used or not used e Channel setting Sets which channel the debugger is connected to Cannot be connected to CH3 e Software Used PC AT personal computer that uses SW1IVD AD51HP E Not used VT 382 VG 620 However these have already gone out of production 2 Mode setting switch sl boon Mode for executing the BASIC program H 00024 Mode for debugging by connecting a wo casas debug mode ooon sid debugger Mode for programmimg by connecting a 0004H Programming mode console 0005H to OOOFH Setting prohibited 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 6 3 Intelligent function module interrupt point settings Here the interrupt pointer settings in GX Developer for sending and receiving data with a BASIC program by an interrupt program are explained Purpose of settings Intelligent function module interrupt pointer settings set information for starting a programmable controller CPU interrupt program from a BASIC program By carrying out these settings it becomes possible to start an interrupt program from a BASIC program and transfer data to the programmable controller CPU Start procedure PC Parameter PC System Settings gt Interrupt Pointer Settings For the screen display method refer to the GX Developer Operating Manual Setting screen Intelligent function module interrupt pointer sett
35. or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fires or abnormal voltages and Failure caused by force majeure such as earthquakes lightning wind and water damage 6 Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi 7 Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after production is discontinued 3 Overseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ 4 Exclusion of loss in opportunity and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation of damages caused by any cause found not to be
36. pull up or pull down resistor in the external device By installing a pull up or pull down resistor the criterion for the resistance value is approximately 4 7 kQ 1 4 W it is possible to prevent reception of data containing errors Rpa 4 7kQ1 4W Terminal Resistor 4 7kQ1 4W Receiving Data Opposite Device PONT _ If there is a pull up or pull down resistor in the opposite device there will be no errors in the data which are received Here we will explain concerning cases where a pull up or pull down resistor is not installed in the opposite device When no station is sending data the send line is in the high impedance state In such a case transmission may be unstable due to noise etc and thereby erroneous data may be received on the opposite device At such a time it is possible that parity errors or framing errors etc could occur so when an error occurs skip over the data that are sent at such a time 3 SPECIFICATIONS MELSEC Q 2 Sending receiving data to from RS 422 485 interfaces Enable high impedance control in the processing code 48 of the ZCNTL instruction Specifying high impedance control Doing so allows the QD51 R24 to control Output Control Input refer to 1 to 3 below 1 RS 422 485 Interface Configuration In the case of the RS 422 485 interface the configuration of the QD51 R24 driver Send and receiver Receive are as shown in the following figure
37. refer to the Programming Manual Commands 7 1 About QD51 R24 Status Checks 7 1 1 Checking the LED lighting status communications error status and QD51 R24 switch setting status Here the method used to check the communications status between the QD51 R24 and an external device and the QD51 R24 s switch setting status is explained When checking an error state due to the occurrence of trouble etc carry out the check by one of the following methods 1 If you are checking the module status and error code in the module detailed information screen of the GX Developer diagnostic function Start procedure GX Developer Diagnostics gt System Monitor gt Module Detailed Information Module s Detailed Information xi r Module Module Name QD51 Product information 030920000000000 B 1 0 Address 0 Implementation Position Main Base OSlot m Module Information Module access Possible 140 Clear Hold Settings Status of External Power Supply Noise Filter Setting Fuse Status Input Type Status of 1 0 Address Verify Agree Remote password setting status rm Error Display Display format _ No ErorCode Present Eror OF20 1 OF20 HEX f DEC Error History The display sequence of the error history is from the oldest error The latest error is displayed in the line as under Error contents Disposal Contents a Dispo
38. system set the QCPU that controls the QD51 R24 called the control CPU with the GX Developer It is also possible to install the Function Version A QD51 R24 in a multiple CPU system and only the control CPU No 1 can be accessed Peripheral Device QD51 R24 s Control CPU Setting from GX Developer 1 QCPU No 1 2 QCPU No 2 3 QCPU No 3 4 QCPU No 4 1 Module controlled by QCPU No 1 2 Module controlled by QCPU No 2 b If the Function Version B QD51 R24 is used in a multiple CPU system sending the following types of data to and receiving them from the QD51 R24 can be done 1 Itis possible for the control CPU to read data from and write them to the buffer memory It is possible to use the I O signals as the output to contact and output signal 2 Itis possible for a non control CPU to read the data from the buffer memory Input output signals can be used as contact points Non control CPU Control CPU QD51 R24 FROM TO Command Buffer Memory Dedicated Command FROM Command Input Output Signal used as a contact point Output to an output signal Input Output Signal used as a contact point 1 VERVIEW z MELSEC Q 3 Itis possible to access the Control CPU Non Control CPU from the QD51 R24 by a BASIC program Non Control CPU Control CPU QD51 R24 BASIC Program Read Write 03E0u to 03E3H O3FFuH The access destinatio
39. the QD51 R24 Do not short circuit the connection cable FG signal side signal and the SG signal When the FG signal in the external device side is connected to the SG signal do not connect the FG signal on the QD51 R24 side Connect to the FG terminal of the external device side or the connector body of the QD51 R24 Connection cable shield b If data communications cannot be done normally due to external noise make connections as shown below 1 Connect the external device side s FG terminal with the QD51 R24 side by the connection cable s shield 2 Connect each of the signals other than SG with the SG signal in twisted pairs To the QD51 R24 Side Shield External Device Side connector 1 er body Sas S iB x lt DSR 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 2 Connection example a Example of connection to an external device with a CD DCD signal pin 1 that can be turned ON and OFF QD51 R24 Side Signal Name Pin No CD RD RXD SD TXD DTR ER SG DSR DR RS RTS CS CTS External Device Side Signal Name DSR DR RS RTS CS CTS NIDJI BR op gt With the above wiring it is possible to carry out DTR DSR control and DC code control b Example of connection to an external device with a CD DCD signal pin 1 that cannot be turned ON and OFF 1 Connection example 1
40. the QD51 R24 when installed to a MELSECNET H remote I O station Parameter Setting Item Setting 1 0 Assignment Sets the module installation information Refer to Section 5 6 1 Sets the transmission specifications and communications protocol for with other Refer to Section 5 6 2 devices etc Switch setting for I O and intelligent function modules 1 Connect GX Developer to the MELSECNET H remote I O station and set the parameters 2 After changing the settings reset the MELSECNET H remote I O station 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 2 6 Checking the Serial Number and Function Version The serial No and function version of the Q series C24 can be confirmed on the rating plate and GX Developer s system monitor a Confirming the serial number on the rated plate The rating plate is situated on the side face of the Q series C24 MELSEC Q MITSU MODEL Serial No first 5 digits Function version Relevant regulation standards wa MITSUBISHI ELECTRIC MADE IN JAPAN b Checking on the front of the module The serial No on the rating plate is also indicated on the front of the module lower part RUN ERR PRG PRUN sD RD RD J cHe CHA RS 232 0209200000000006 Function version I 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q c Confirming the serial number on the system monitor P
41. the responsibility of Mitsubishi loss in opportunity lost profits incurred to the user by Failures of Mitsubishi products special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products replacement by the user maintenance of on site equipment start up test run and other tasks 5 Changes in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice Microsoft Windows Windows NT and Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries Pentium is a trademark of Intel Corporation in the United States and other countries Ethernet is a trademark of Xerox Corporation All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies SH NA 080089 H SH NA 080089 H 1208 MEE MODEL QD51 U SHOSAI E MODEL CODE 13JR16 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
42. 2U Q03UD Q04UDH Single CPU system S p 2 EEA u Version 8 48A or later QO6UDHCPU Multiple CPU system CPU system Tain SUE CPU system Q13UDH Q26UDHCPU Version 8 62Q or later Multiple CPU system CPU system Q03UDE Q04UDEH QO06UDEH nae ea CPU system Version 1 15R or later Version 8 68W or later Q13UDEH Q26UDEHCPU Multiple CPU system CPU system QO0UJ Q00U Q01U Q10UDH Single CPU system G20 DEIGIOUREN Version 8 76E or later Q20UDEHCPU Multiple CPU system TRE a aca CPU system Q50UDEH Q100UDEHCPU Cannot be used Version 1 31H or later Multiple CPU system CPU system When installing to a MELSECNET H remote I O station Version 6 or later Version 1 40S or later c Commercially available compilation software package necessary only for compilation When using a PC AT personal computer Purchase the product Turdo Assembler 5 0 For Turbo Assembler contact Borland Software Corporation Product Name Model Name Turbo Assembler Turbo Assembler Ver 5 0 IBM PC AT English Version 4 Connection Cable for Console Debugger Refer to Section 5 4 for connection to a console 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 2 2 Combining Programmable Controller CPU s with Other Device s This section shows the system configurations and functions which are available when the QD51 R24 is used 1 System Configurations The following shows the system configurations combinations for data communications
43. 4 s general output Y 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS ierte 4 5 2 Reading and writing data from to buffer memory 16 bit data communications can be carried out between the QD51 R24 and the programmable controller CPU using the QD51 R24 s buffer memory Programmable controller CPU QD51 R24 pi j Por 3 Sequence Program i Reading of i l ETO W i 16 bit data i l Writing of data i i l i i Buffer BASIC rogram FROM l i Memory Writing of prog i j Reading of data 16 bit data j i i i i pr i EE E ET j e ene A ee j 1 In the case of programmable controller CPU gt QD51 R24 16 bit data written to the QD51 R24 s buffer memory by the programmable controller CPU s sequence program TO command are read using a BASIC program 2 Inthe case of QD51 R24 Programmable controller CPU 16 bit data written to the QD51 R24 s buffer memory by a BASIC program are read by the programmable controller CPU s sequence program FROM command Commands and functions used Commands and functions used to read write 16 bit data from to the QD51 R24 s buffer memory are shown below Command Function Name Processing Contents GETMEM Reads the contents of the QD51 R24 s buffer memory PUTMEM i Writes 16 bit data to the QD51 R24 s buffer memory 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS werecece 4 5 3 Reading and
44. 51 R24 is in the data sending reception enabled reception enabled state state lt 4 3 8 PECIFICATION ae MELSEC Q When connecting each device s send signal line in system configuration of n 1 or m n communication Turning ON Output Control Input at 2 or more locations means that data are output sent from the devices simultaneously For normal data communications the following settings are required on the external device e Set the Output Control Input so that it is in the ON state only when sending data e Set the Output Control Input so that it is in the OFF state when data are not being sent To automatically control Output Control Input enable high impedance control in the processing code 48 of the ZCNTL instruction Specifying high impedance control on the QD51 R24 QD51 R24 SDA Send Data SDB Output Control Input RDA Receive Data RDB Send Data Output Control Input Opposite Device RDA Receive RDB Data Send Data Output Control Input Opposite Device RDA Receive Data In the above wiring sending and receiving are connected the data sent by yourself is being received by yourself Be sure to carry out programming so that such data are discarded by the BASIC program PECIFICATION Sasa MELSEC Q 3 4 List of Commands and Functions in AD51H BASIC The commands in AD51H BASIC which can be used by the QD51 R24 are shown in the f
45. 9 MITSUBISHI ELECTRIC Mitsubishi Programmable Controller MELSEG Led cries Q Corresponding Intelligent Communication Module User s Manual QD51 QD51 R24 e SAFETY PRECAUTIONS e Always read these instructions before using this equipment Before using this product please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly The instructions given in this manual are concerned with this product For the safety instructions of the programmable controller system please read the CPU module user s manual In this manual the safety precautions are ranked as WARNING and CAUTION I Indicates that incorrect handling may cause hazardous conditions I N WARNING resulting in death or severe injury l wa Indicates that incorrect handling may cause hazardous conditions A CAUTION resulting in minor or moderate injury or property damage eee i i i i i i _ Note that the CAUTION level may lead to a serious consequence according to the circumstances Always follow the instructions of both levels because they are important to personal safety Please save this manual to make it accessible when required and always forward it to the end user Disposal Precautions A WARNING e Please refer to the manual for each station concerning the operating status of each station when communications errors occur i
46. B SDB RDA q RDA RDA RDB RDB CR RpB SG H sG H SG d t 4 l FG Jy V Zr FG GL oe tice Zt FG RS 422 485 RS 422 485 RS 422 485 Cable Cable Cable LR Terminal Resistor d If connecting m n multiple drop External Device QD51 R24 QD51 R24 1 External Device 1 QD51 R24 m External Device n SDA SDB RDA T RDB 7 sG H FG V RS 422 485 RS 422 485 Cable Cable RS 422 485 Cable LR Terminal Resistor 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 6 Setting from the GX Developer Here the various settings from the GX Developer which are necessary in order to carry out data communications with an external device from the QD51 R24 are explained 5 6 1 I O assignment settings Setting purpose I O assignment settings are used to set the type of each module installed in the base module to set the input output signal ranges and to set the QD51 R24 switches Start procedure GX Developer gt PC Parameters gt I O Assignment Setting Refer to the Operating Manual for the GX Developer concerning screen display methods Setting screen x PLC name Puc system Puc file PLc RAS Device Program Boot file SFC r120 Assignment Switch setting Detailed setting Intelli Assigning the 1 0 address is not necessary as the CPU does it automatically Leaving this setting
47. C GPPW EV and SWnD5C GPPW EVA n means version 4 or later A and V mean volume license product and version upgrade product respectively MELSECNET 10 MELSECNET 10 network system MELSECNET H MELSECNET H network system RS 232 Interface RS 232 compatible interface RS 422 485 Interface RS 422 and RS 485 compatible interface YCHECK Abbreviation for Z YCHECK or ZP _YCHECK User s Manual Hardware or Hardware Manual Q Corresponding Intelligent Communications Module User s Manual Hardware Programming Manual Commands or Command Manual AD51H BASIC Programming Manual Commands Programming Manual Debug and Compile or Debug and Compile Manual AD51H BASIC Programming Manual Debug and Compile MEANINGS OF TERMS AND THEIR CONTENTS The meanings of terms used in this manual and their contents are shown below Term Contents This is a device which connects to the QD51 R24 and is used to perform programming and multitasking settings A PC AT personal computer with the software package installed becomes a console Depending on the settings the console becomes the debugger Debugger This device connects to the QD51 R24 and performs debugging A PC AT personal computer with the software package installed becomes the debugger The debugger can check variable values and can edit the program while it is being run Terminal This connects to the QD51
48. CHECK a Z YCHECK Un S1 1 ii a we veieck fo ZP _YCHECK UE S1 1 If the originating station is a Basic model QCPU function version B or later or Universal model QCPU double quotation of the first argument can be omitted Setting data Module Header Input Output Signal String BIN16 bit S1 Dummy Device name The file register for each local device and program cannot be used as setting data Function 1 After turning ON QD51 R24 task start signal Y19 designated at Un execute YCHECK instruction to start the BASIC program immediately 2 The YCHECK instruction is executed each scan if execution upon ON is selected and the instruction is ON It is executed only once immediately after the command changes from OFF to ON if rising edge execution is selected Error 1 When a calculation error occurs the error flag SMO goes ON and the error code is stored in SDO Refer to the QCPU User s Manual check the error content and take the appropriate corrective measures Program Example Program to start the Task 1 BASIC program If the QD51 R24 s input output signal is X Y00 to X Y1F oH SET DY11 Task 1 designated SET DY19 Program start signal turned ON ZP YCHECK uo DO YCHECK executed 7 TROUBLESHOOTIN EAAS MELSEC Q 7 TROUBLESHOOTING Here the methods for checking the contents of errors that occur in the QD51 R24 are explained For error contents
49. D LOW VOLTAGE DIRECTIVES 1 For programmable controller system To ensure that Mitsubishi programmable controllers maintain EMC and Low Voltage Directives when incorporated into other machinery or equipment certain measures may be necessary Please refer to one of the following manuals e QCPU User s Manual Hardware Design Maintenance and Inspection e Safety Guidelines This manual is included with the CPU module or base unit The CE mark indicating compliance with the EMC and Low Voltage Directives is printed on the rating plate of the programmable controller 2 For the product No additional measures are necessary for the compliance of this product with the EMC and Low Voltage Directives HOW TO READ THIS MANUAL AND CONFIGURATION How to use this manual We will explain concerning the QD51 R24 for each purpose of use Use this manual for reference for the following contents 1 When desiring to know the features functions and component parts a When desiring to know the features and functions e The features of the QD51 R24 are described in Chapter 1 e The common specifications and functions etc of the QD51 R24 are described in Chapter 3 b When desiring to know the package contents and system component parts e The items included in the package when the QD51 R24 is purchased are described in Product Configuration before Chapter 1 The user should procure parts and materials not included in the pac
50. D sub female screw type mating screw M2 6 are used as RS 232 interface connectors for the QD51 R24 For the relevant models refer to Appendix 4 Use the following as a connector shell for the connection cable of the QD51 R24 side e DDK Ltd Plug shell 17JE 23090 02 D8A CG 3 2 2 RS 232 cable specifications e Use an RS 232 cable which complies with the RS 232 standard and which has a length of 15 m or less Recommended cable e Oki Electric Cable Co Ltd 7 0 127 OP HRV SV O Specify the number of pairs For 13 pairs 7 0 127 13P HRV SV PECIFICATION eee alee MELSEC Q 3 3 RS 422 485 Interface Specifications This section describes the RS 422 485 interface specifications 3 3 1 RS 422 485 terminal block specifications The following shows the RS 422 485 terminal block specifications for connection to the target device Signal direction Signal abbreviation Signal name QD51 gt External R24 device se s Send Daia C ENO soe sens baa 9 gt ros O E e e a SO a a SG Signal Ground PFs Frame Ground Fe Frame Grune ei 1 Each signal is explained below 1 SDA and SDB signals Signals for sending data to the target device from the QD51 R24 2 RDAand RDB signals Signals for the QD51 R24 to receive data from the target device 2 Terminal resistor Connect terminal resistors in accordance with Section 5 5 2 PECIFICATION elas iL ah MELSEC Q 3 3 2 RS 422 485
51. ED1023 oo ee eeceeceeeeeseeeeeeeeeeeeeeeeeeeseeseeseeeseeeseeeseeeseeeseaeseneseaeeaeeaaes 3 26 3 5 5 Special register ED9000 to ED9127 nrerin a a RAAR EAE EREA RARS 3 31 3 5 6 Expansion relay EMO to EM1023 aro kenana eai ARKE A EEA E KERE TARORA 3 35 3 5 7 Special relay EM9000 to EM9 T27 ernnimiinanien anuai a ar 3 38 36 Recevre BUNE aaien Aa A a ATEA E AA S A EE A A 3 41 3 7 List of GX Developer Setting Items for the QD51 R24 sssssssesiesrserssrsrsrstrsrnstrsrnsrnstnstnstnstnsnsene 3 42 3 8 List of Input Output Signals From To the Programmable controller CPU ccceeeeseeeeeeeeeeeeeeeenreees 3 43 3 8 1 Input X detailed explanation 2 0 ee cecceccseceeeeeceeeceeeseeeeeeeseeeteeeseeeseeeseaeseeeseeeseeeseeeseaeseaesaeseneseneeaes 3 45 3 8 2 Output Y detailed explana Ona A A E E R 3 49 3 9 Relationship between the QD51 R24 Start Condition and the Flash ROM Execution Program Area iin ciasiitiiaii este isa ithia india a d a ibid aiia 3 53 3 10 QD51 R24 Operation when the Power is Turned ON ceeeeeceeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeas 3 54 3 10 1 In the case of the programming MOdE ecceeceeceeeteeeeteeeteeeteeeteeeseeeseeeseeeseeeseneseeeseaeseneteneeeneaaes 3 54 3 10 2 In the case of the multitask debug MOE 0 0 ce eecceeeeeteeeeeteeeeeeeteeeteeeteneseeseeeseneseeeeeaeseneteneteatenes 3 55 3 10 3 In the case of the run MOG eeeeceesteeeceeeceeseeeeneeeeeeeneeeeeqeneeaeeeaneeaeeqaneeaeenaneeae
52. EHCPU QO6UDEHCPU Q10UDEHCPU Q13UDEHCPU Q20UDEHCPU Q26UDEHCPU Q50UDEHCPU Q100UDEHCPU Safety CPU QS001CPU QO6CCPU V QO6CCPU V B Q12DCCPU V Basic model QCPU Process CPU Redundant CPU Universal model QCPU O Applicable xX N A x1 Limited within the range of I O points for the CPU module 2 Can be installed to any I O slot of a base unit 3 Connection of extension base units is not available with any safety CPU 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q b Mounting to a MELSECNET H remote I O station The table below shows the network modules and base units applicable to the QD51 R24 and quantities for each network module model Depending on the combination with other modules or the number of mounted modules power supply capacity may be insufficient Pay attention to the power supply capacity before mounting modules and if the power supply capacity is insufficient change the combination of the modules No of modules Main base unit of Extension base unit of remote l O station remote I O station Applicable network module QJ72LP25 25 QJ72LP25G Up to 64 QJ72LP25GE QJ72BR15 Applicable x N A 1 Limited within the range of I O points for the network module 2 Can be installed to any I O slot of a base unit The Basic model QCPU module or C Controller
53. EM991 EM992 to EM1007 EM1008 to EM1023 Program example The following shows a program where 1 is written into the expansion relay address 23804 when the multitask execution start signal XOB is ON To write data from the programmable controller CPU to the expansion relay or to read data from the expansion relay use the multitask execution start signal XOB as an interlock Write Command X0B RS To HO H2380 K1 K1 bS Interlock that enables or disables FROM TO execution 1 word units QD51 R24 Expansion Relay to bO b15 Sequence TO EM Program Writing of data 23801175 EM 1 EM EMO to EM15 EM16 to EM31 to EM 1006 EM 1022 EM 993 EM 992 EM992 to EM1007 EM1008 to EM1023 3 SPECIFICATIONS MELSEC Q 3 5 7 Special relay EM9000 to EM9127 Buffer Memory Address as viewed from the CPU amp H2500 bit 0 amp H2501 bit 4 Special Relay No EM9000 EM9020 The special relays are relays whose use is determined internally in the QD51 R24 ON OFF control is performed by the QD51 R24 OS so in each BASIC program read the ON OFF status using the special variable B to use these relays Related Content Detailed Contents Special Registers Goes ON when one of the following occurs rror ON An error is registered e Warning Error ED9000 to Registration s OFF No error is registered e Error Mess
54. Ina BASIC program data are read from or written to common memory using the GETMEM PUTMEM command Program example The following shows a program where data from A 0 to A 9 equivalent to 20 bytes are written into the common memory area addressed 18004 to 18134 using the PUTMEM command 100 PUTMEM TO amp H1800 0 FROM A 0 20 QD51 R24 Common Memory o AR E E al 18014 18024 C00 CO1H PUTMEM BASIC to gt Writing of data Program 1 byte units C08H CO9H PECIFICATION eS ae MELSEC Q b In a sequence program data are read from or written to common memory using the FROM TO command Program example The following shows a program where values in DO to D9 are written into the common memory area addressed OCO0 to OCO9 when the multitask execution start signal XOB is ON To write data from the programmable controller CPU to the common memory or to read data from the common memory use the multitask execution start signal XOB as an interlock Write Command X0B k T HO HOC00 DO K10 Interlock that enables or disables FROM TO execution QD51 R24 Common Memory Cb 18004 A a ega 18014 co1 18024 O A 18034 Sequence i Program L pees units Writing of data Os to 1810H iT 18111 18121 Ce po R 18131 2 Common Memory Capacity In the QD51 R24 the size of common memory is 8 k bytes 3 Common Memory Configuration One address in comm
55. OFF gt ON Even if the start task No designation signal Y11 Y12 goes ON while the task start signal Y19 is ON it is disregarded Raa EXAM Plea a 1 The example shows a program in the case where task 1 is started from the programmable controller CPU Conditions IT started by an interrupt from the programmable controller CPU is set with only task 1 set for multitasking ON Task start signal Y19 OFF h Task 1 start signal Y11 OFF Task 1 starts General output i treatment Y12 OFF END Task 1 executed 1 1 Since itis treated as a general output starting of the task is not carried out 2 2 Since the task start signal is not changing from OFF ON starting of task 1 is not carried out Sequence Program Task 1 setting designation P lt Y 11 Task start command PY 19 d Inthe case of the task designated by the start task No designation signal Y11 Y12 being in the process of starting task start is disregarded Operation of the currently executing task is continued e If the exclusive command YCHECK is used the task s starting time can be shortened Refer to Chapter 6 concerning the YCHECK command 3 SPECIFICATIONS MELSEC Q x1 This is a task that corresponds to the device No of the device designated by Y11 Y12 that is turned ON However a device No that does not have IT started by an interrupt from the programmable controller CPU set for the multitask setting is disregarde
56. PECIFICATION eS A ae MELSEC Q 3 5 QD51 R24 Internal Memory The following memory can be used by the user in the QD51 R24 1 Memory where programs for execution can be stored Program Area Se Refer to Section 3 5 1 This is memory where BASIC programs which run the QD51 R24 are stored The program area can execute a maximum of two tasks and it has a maximum capacity of 64 k bytes 2 Memory for communications Programmable Refi Content controller CPU BASIC Program N Section GETMEM PUTMEM Special Variable FROM TO command command B W Communications with Buffer memory 00004 to OBFFy 00004 to 17FFy Section the programmable 3 5 2 controller CPU Communications Common memory OC00 to 1BFFH ene i ed between tasks Section 3 5 3 ED0000 to ED1023 Section 3 5 4 EM0000 to EM1023 Section 3 5 6 Special register 2400 to 247F 4 Zoo ED9000 to ED9127 Section 3 5 5 Reading writing Expansion register 1C004 to 1FFFy ON OFF data System Area Expansion relay 23804 to 23BF EM9000 to EM9127 Section 3 5 7 Special relay 25004 to 25074 System Area PECIFICATION see RSA ae MELSEC Q CAUTION Internal memory is not backed up by a battery If the QD51 R24 s power is turned OFF the BASIC program written to it and the data in the buffer memory etc are erased Therefore observe the following 1 and 2 1 Save the created BASIC programs in a flash ROM before turning the power off The following f
57. QD51 QD51 R24 Intelligent Communications Module When applying the following program examples to the actual system make sure to examine the applicability and confirm that it will not cause system control problems The QD51 R24 has the following functions 1 BASIC Program Based Functions Sub CPU Function Complex numerical calculations and functional calculations can be made with a BASIC program Monitor Display Function It can display production conditions the operating status details of a breakdown etc Key Input Function The production schedule production volume operation setting data etc can be input Printer Function Production plans performances daily reports breakdown details planning data inspection results and test performance etc can be printed out Data Input Function Data can be input from a bar code reader or magnetic card reader etc External Device Connection Function A computer etc can be connected to the RS 232 RS 422 485 interfaces and data can be sent and received through a BASIC program Clock Function Clock data of the programmable controller CPU can be read and written 2 Offline Programming Function BASIC programs can be created corrected stored to user FD and printed out independently by peripheral devices 3 Online Programming Function BASIC programs can be created run and corrected from the console 4 Multitasking Debugging Function BASIC programs can be debugg
58. QD51 R24 Side Signal Name Pin No CD RD RXD SD TXD DTR ER SG DSR DR RS RTS CS CTS External Device Side Signal Name DSR DR RS RTS CS CTS NOOO BR os mM x With the above wiring it is possible to carry out DTR DSR control and DC code control 2 Connection example 2 QD51 R24 Side Signal Name Pin No External Device Side Signal Name SD TXD DTR ER SG DSR DR RS RTS CS CTS 8 NID On R o rm With the above wiring it is possible to carry out DC code control When it is absolutely impossible to transmit data between the programmable controller CPU and an external device together with a connection test try data communications with the wiring connections shown in the above connection example 2 When data communications are possible with the wiring connections shown in connection example 2 correct the wiring connections after confirming the external device s interface specifications 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 5 2 Connecting to the RS 422 485 interface Here connection precautions and an example of connection when using the QD51 R24 s RS 422 485 interface are shown 1 Precautions when connecting a When the QD51 R24 s SG signal and FG signal are connected to the external device make connections in accor
59. QnACPU AnUSCPUs Converts a character string which was converted from an AD51H BASIC double precision real number by the MKD function into the internal representation of an IEEE double precision number _ G i Q VS Q VD Converts integer type numbers to character strings Converts single precision type numbers to character strings Converts double precision type numbers to character strings Converts floating point real number data in internal representation IEEE single MKSMBF precision representation used in QCPU AnA AnU QnACPU AnUSCPUs into a character string that can be changed into a numeric by the CVS function Converts IEEE double precision data in internal representation into a character string that can be changed into a numeric by the CVD function Defines a user function and names it Defines variables that start with the specified characters as integer types Defines variables that start with the specified characters as single precision real number types Defines variables that start with the specified characters as double precision real number types Defines variables that start with the specified characters as character types MKI MKS MKD MKDMBF DEF FN DEFINT DEFSNG DEFDBL DEFSTR A Defines a character string to each of the console s function keys Specifies the size of an array variable and allocates a necessary memory area Deletes the array defined by the DIM instruction from the mem
60. S Area 1 k byte BASIC Program Area L One Task No Area 16 k bytes 32 k bytes 48 k bytes and 64 k bytes Random File Buffer Area Variable Area 3 SPECIFICATIONS MELSEC Q A program for running the flash ROM is read to the QD51 R24 s program area when the module is powered ON or is reset However for an area where the multitask setting is set ON reading to the QD51 R24 is not done QD51 R24 Program for running flash ROM Program Area BASIC Task 1 Area START pe Eden Task 1 Area BASIC Task 2 Area ON xX Task 2 Area 3 SPECIFICATIONS MELSEC Q 3 5 2 Buffer memory Buffer memory is memory for carry out sending and receiving of data between the QD51 R24 and the programmable controller CPU Data from the programmable controller CPU that are written to buffer memory can be read from multiple tasks Data written to buffer memory from multiple tasks can be read from the programmable controller CPU 1 Reading Writing of Data a Data from the programmable controller CPU are read from or written to the buffer memory by the FROM TO command Program example The following shows a program where values in DO to D9 are written into the buffer memory area addressed 0p to 94 when the multitask execution start signal XOB is ON To write data from the programmable controller CPU to the buffer memory or to read data from the buffer memory use the multitask execution start signal XOB as a
61. a 1 1 system configuration b n 1 system configuration 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q c 1 n system configuration d m n system configuration 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 2 3 For Use in Multiple CPU System This section describes the use of the QD51 R24 in a multiple CPU system 1 Making access from a BASIC program to a non control CPU When making access from a BASIC program to a non control CPU use the QD51 R24 of function version B Multiple CPU syst em QD51 R24 of function version B 2 When other stations to be accessed belong to a multiple CPU system When accessing a CPU that is not controlling a replay module on the access target station use function version B or later for the following modules e QD51 R24 on local station e Relay modules 1 and QCPUs on local station relay station and accessed station Example Whether the control CPU of the relay module is the same or different itis possible to access the other station
62. ads the interface status INPUT Stores the data received from the interface in the designated variable e Character code control codes 0n 03H 13H 80H and FDu to FFH cannot be handled as data ZRECEIVE Stores the data received from the interface in the designated variable Refer to the Programming Manual Commands concerning details of commands and functions 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 5 Communications with the Programmable controller CPU Data can be written to the programmable controller CPU and read from the programmable controller CPU by the QD51 R24 using a BASIC program The data which can be written to and read from the programmable controller CPU are shown below No Data Name Write Read 1 Device Memory E 2 Programmable controller CPU Model Name x O 3 Programmable controller CPU remote RUN STOP O x 4 Interrupts to the programmable controller CPU x 5 Intelligent function module Special function module buffer O O memory O Can be run X Cannot be run Data can also be written to and read from the buffer memory of another intelligent function module special function module using a BASIC program The way of thinking in the case where data are written to and read from the buffer memory in a device memory or an intelligent function module a special function module is explained below 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS jete 4 5 1 ON OFF data communications by g
63. aeeseesaeesieesieesanesieeteees 2 11 3 SPECIFICATIONS 3 1 to 3 66 3 1 Performance Specifications cccccccccceecceeeceeeeeceeceeeneeceneeceaeeceaeeesaneesaeeseaeeseaeessaneesaesneeeesseeeseneeeans 3 1 3 2 RS 232 Interface Specifications sssi ra aE aa e a aana a EE ae aA EnEn SETAA aa EATE 3 3 321 RS2232 c nMector specif at ONS 4 seis Gan a ee eee a aed 3 3 3 2 2 RS 232 cable Specifications cecccceecceeecceeeceeceeeeceneeeeaeeeeaeeeseaeeceaeeseaeeeeaeeesaeeseaeeesaeeeaeeeessaeeeeaees 3 4 3 3 RS 422 485 Interface Specifications ceccccecccceecceceeeeeeeeeeeeeeceeneeeeneeseaeecsaeeeeaneesneeseaeeeeeeeeeeseneesaes 3 5 3 3 1 RS 422 485 terminal block specifications eecceeecceeeeeeeeeeeeeeeeeeeeeceaeeceaeeeeaeeeeaaeeteneeteaeetsieeeeneess 3 5 3 3 2 RS 422 485 cable Specifications cccescceeecceeecceeeceeeeaeeeeaeeecaeeeeaceeseaeeseaeeecaeeesceeseaeesseseeeteieeess 3 6 3 3 3 Cautions during data communications with a RS 422 485 line 0 ee eeeeeeeeeeeeeeeeteeteeteneeeeeeaes 3 7 3 4 List of Commands and Functions in AD51H BASIC cccccccecceeeeeeeeeeeeeeeeeeeeeeeeeeeeeneeseaeeeseeeseneessaeeees 3 10 3 5 QD51 ER24 Internal MEMO y oaee ei eaa a Ae AAEE aea LEKER Er RR EARRAN RA ARA AEE AKARKEN AE 3 16 3 571 PrO INE a a N NT A N A ET A 3 18 3 59 2 Buffer Memo enrii A A RA A A i i Aa 3 20 20o GOMMMOM MEn anea R A cea ea ee ae ea deed 3 23 A 7 A 7 3 5 4 Expansion register EDO to
64. age ED9016 e System Down Error Message Goes ON when the QD51 R24 is executing multitasks Goes OFF when the QD51 R24 is executing a task other than multitasks ON Multitask execution in progress OFF Task other than multitask 1 Reading of Special Relay ON OFF Data ON OFF data are read from the special relay by the following methods e Using the special variable B of the BASIC program e Using the FROM command in the sequence program The special relays designation method differs as shown below for the special variable B and the FROM command PECIFICATION Bes allie MELSEC Q a Reading data by the special variable B in BASIC program With the special variable B the special relays are designated by EM9000 to EM9127 Designation is in 1 bit units QD51 R24 Special Relay EM9000 EM9001 EM9002 EM9003 EM9004 Reading of data BASIC program EM9125 1 0 EM9126 1 0 EM9127 1 0 Program example The following shows a program where data are read from the QD51 R24 s special relay EM9000 150 A B EM 9000 Special variable B Reading of data BASIC Program Special melay 1 bit units o QD51 R24 EM 9015 EM 9031 2500H 25014 to to 25064 EM EM to EM9096 to EM9111 25074 EME alao EM9112 to EM9127 4 PECIFICATION seine Ali MELSEC Q b Reading data by the FROM command in a seq
65. al computer RS 232 Cable QD51 R24 User s FD Multitask debugging is performed by inputting the Debug command from the debugger By executing the Debug command the following can be done The BASIC program for the specified task No area can be run and terminated e The variable values specified in the BASIC program for the specified task No area can be read and written e Data can be read from and written to the QD51 R24 s internal memory e Common events and message port use status displays etc can be shared between BASIC programs 8 Both interpreter BASIC and compiled BASIC can be used By compiling a BASIC program created in interpreter BASIC with the BASIC compiler the BASIC processing speed can be markedly increased Interpreter BASIC BASIC in an execution format where the QD51 R24 converts the program to machine language during execution Compiled BASIC BASIC in the format where the program is compiled the commands are converted to machine language at the stage when the program is completed and the QD51 R24 runs it in machine language directly 1 VERVIEW 2 MELSEC Q 9 Multiple CPU system compatible functions a If access to a QCPU in a multiple CPU system is done by a BASIC program the access destination QCPU is specified then reading writing of device data is executed If the QD51 R24 is used in a multiple CPU
66. amming Mode 3 SPECIFICATIONS Buffer Memory Related Address as Special Related Name Content Details of Contents Special seen from the Register No Special Relay CPU Register e The status of BASIC tasks 1 and 2 is stored as shown below b15 to b8 b7 to bO 0 0 10 1 0 1 No lt x nn OO Ee OO nH lt lt 0 ao BASIC task in 0 BASIC task in the rest state the rest state The BASIC program is not being run BASIC task 1 3 amp H2416 ED9022 oie 1 BASIC task in the run state x status BASIC task in The BASIC program is being run the run BASIC task in the stopped state stopped or None of the BASIC programs are being wait state run BASIC task in the wait state Waiting for execution of the PRINT command or other command to be completed or a run interrupt command was executed e Ifa BASIC task is started by a ZSTART command do so when the designated task is on bit 0 This sets the timeout time of the PCRD and PCRD PCWT commands amp H2432 ED9050 PCWT 0 to 32767 Setting units 100 ms timeout time e 0 Unlimited wait 1 to 32767 x 100 ms is the wait time 3 SPECIFICATIONS MELSEC Q 1 Reading data in the special register Data are read from the special register by the following methods e Using the special variable W of the BASIC program e Using the FROM command in the sequence program The method of designating the special register differs in the special variabl
67. an entire line 255 characters into the character string variable area without any breaks Left aligns and moves data to the random file buffer for execution of the PUT instruction Right aligns and moves data to the random file buffer for execution of the PUT instruction Writes 1 record data from the buffer to a random file Reads 1 record data from a random file into the buffer Continued from the previous page 3 SPECIFICATIONS MELSEC Q F i Command Classification i Operation Function File information _ i File information functions Character string gt Number File Data Number gt Character string Definition oaks Definitions declarations Data operations Number character string Substituting for variables Returns 1 if the end of a sequential file is detected Returns the file size as the number of sectors OC Returns the current logical location within a file VI Converts a character string converted by the MKI function back to an integer Converts a character string converted by the MKS function back to a single precision real number Converts a character string converted by the MKD function back to a double precision real number Converts a character string which was converted from an AD51H BASIC single precision real number by the MKS function into the internal representation of a floating point real number IEEE single precision representation used in QCPU AnA AnU
68. anged by the ZCNTL command The receive buffer stores the data sent from an external device When the data receive command is executed the receive buffer data are stored in the area shown by the designated variable The following lists the available data receive commands Command Function Name Processing Contents INPUT e Carries out key input of data e Character code control codes 04 to 1F commas 2Cy and 7Fu cannot be handled as data INKEY e Stores the data received from the interface in the designated variable INPUT e Character code control codes 04 034 134 804 and FD to FFy cannot be handled as data LINE INPUT e Carries out key input of data e Character code control codes 04 to 1F and 7F cannot be handled as data ZRECEIVE e Stores the data received from the interface in the designated variable Refer to the Programming Manual Commands for the data receive commands and the send receive processing etc executed Data reception For CH3 1024 Bytes QD51 R24 External Device pEseesepe eee Ao ee eee j a i User Program i i PRINT LPRINT command etc executed i Data transmission i i Console i terminal i BASIC i printer Program INPUT INKEY Receive Buffer i personal i command computer j etc i f i i i i i 3 SPECIFICATIONS 3 7 List of GX Developer Setting Items for the QD51 R24 I O Allocation Setting Interru
69. any However if repairs are required onsite at domestic or overseas location expenses to send an engineer will be solely at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the following cases 1 Failure occurring from inappropriate storage or handling carelessness or negligence by the user Failure caused by the user s hardware or software design 2 Failure caused by unapproved modifications etc to the product by the user 3 When the Mitsubishi product is assembled into a user s device Failure that could have been avoided if functions
70. ated 1 Run once only 2 Runall the time a If itis run once only A program is run once only if the END command is written at the end of the BASIC program The task starts when the power is turned on or when there is a Reset and operation stops at the point when the END command is run 2 V BASIC Program Task with START set in the start condition BASIC program stops 3 SPECIFICATIONS b MELSEC Q If the program runs all the time The program runs all the time if an END command is not used at the end of the BASIC program but instead a GOTO command is used to cause it to jump to a specific line The task starts when the power is turned on or when there is a Reset then runs until the GOTO command then since it jumps to the specified line it runs repeatedly between the specified line and the GOTO command BASIC Program ok K BASIC Task with START set Program in the start condition GOTO xx 3 SPECIFICATIONS MELSEC Q 3 11 3 Starting by an interrupt from the programmable controller CPU Start Condition IT This is the case where the start condition in the multitask settings is set on IT Starting of a task is done if the Run Permission Conditions listed in Section 3 11 1 are established and when there is a start request from the programmable controller CPU A start request from the programmable controller CPU is ex
71. blank will not cause an error to occur L r Base setting r Base mode Auto C Detail 8 Slot Default 12 Slot Detaut Base model name Power model name Extension cable l PoR a CREME Import Multiple CPU Parameter Read PLC data Acknowledge XY assignment Multiple CPU settings Default Check End Cancel Display contents ltem Setting Contents Sets Intelligent Sets the model name of the installed module QD51 or QD51 R24 Number of points Sets 32 points I O assignment Refer to QCPU User s Manual Multiple CPU system 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 6 2 Switch setting for I O and intelligent function module Setting purpose The I O module and intelligent function module switch settings set the specifications for data transfers with external devices communications protocols etc Start procedure GX Developer PC Parameters gt I O Assignment Settings gt Switch Settings Refer to the Operating Manual for the GX Developer concerning screen display methods Setting screen Switch setting for 1 0 and intelligent function module Input format Slot Type Model name Switch 1f Switch 2f Switch 3f Switch 4 Switch 5 lt io a PI POD FON ff foo ro 2 2lS 2 9 2 s1Nl2 s 2 Fa a E Fa aa a a a Res Reed Re Rez Keg ed ede feed Keel a a oO Intelli QD51 0025 0004 0000 0000 0000
72. cluded Generic Term Abbreviation Content of Generic terms and Abbreviations ACPU AnNCPU AnACPU AnUCPU A2ACPU A2ZACPU S1 AZACPUP21 R21 AZACPUP21 R21 S1 A3ACPU A3ACPUP21 R21 A1NCPU A1NCPUP21 R21 A2NCPU A2ZNCPU S1 A2NCPUP21 R21 A2NCPUP21 R21 S1 A3NCPU ASNCPUP21 R21 AnUCPU A2UCPU A2UCPU S1 A2USCPU S1 AZUSHCPU S1 ASUCPU A4UCPU AnA AnU QnACPU AnACPU AnUCPU QnACPU AnU QnACPU AnUCPU QnACPU QD51 Shows only the QD51 QD51 R24 Shows only the QD51 R24 QD51 R24 Shows both the AD51 and QD51 R24 QOOJCPU QO0CPU Q01CPU Q02CPU QO2HCPU QO6HCPU Q12HCPU Q25HCPU QO2PHCPU QO6PHCPU Q12PHCPU Q25PHCPU Q12PRHCPU Q25PRHCPU QO2UCPU QO3UDCPU Q04UDHCPU QO6UDHCPU Q10UDHCPU Q13UDHCPU Q20UDHCPU Q26UDHCPU QO03UDECPU QO04UDEHCPU QO6UDEHCPU Q10UDEHCPU Q13UDEHCPU Q20UDEHCPU Q26UDEHCPU Q50UDEHCPU Q100UDEHCPU QCPU A QO2CPU A QO2HCPU A QO6HCPU A Q2ACPU Q2ACPU S1 Q2ASCPU Q2ASCPU S1 Q2ASHCPU Q2ASHCPU S1 Q3ACPU Q4ACPU Q4ARCPU Q QnACPU QCPU QnACPU QnACPU 2 Other Generic terms and Abbreviations In this manual intelligent communications module data communications devices etc are explained using the following generic terms and abbreviations When it is necessary to indicate clearly what the object of the explanation is the name model name of that item is included Generic Term Abbreviation Content of Generic terms and Abbreviations Opposite device external d
73. colors are different each other Recommended cables RS 422 485 3 SPECIFICATIONS MELSEC Q 3 2 RS 232 Interface Specifications This section describes the RS 232 interface specifications 3 2 1 RS 232 connector specifications The connector specifications for the RS 232 used to connect with another device are shown below Pin No Abbreviation Signal name Direction QD51 lt External R24 device 1 CD DCD _ Data carrier detect lt M 2 RD RXD Received data 3 SD TXD Transmitted data 4 ER DTR _ Data terminal ready 5 SG Signal ground gt 6 DR DSR Data set ready e 7 RS RTS _ Request to send e 8 CS CTS Clear to send 9 a 5 1 Each control signal is explained below The connector pin No is shown in parentheses CD DCD Signal 1 e Nothing is being controlled in the QD51 R24 e The signal status can be read by a BASIC program RD RXD Signal 2 This is the signal for data reception SD TXD Signal 3 This is the signal for data sending ER DTR Signal 4 1 If DTR DSR control is being exercised the QD51 R24 turns ON or OFF depending on the size of the empty space in the OS area for reception data storage It is ON when it is ready to receive data When the ER DTR Signal is OFF reception data have been stored in the OS area so read out the reception data from a BASIC program If DTR DSR contro
74. commands used for printing from a printer connected to an interface that is not set in the console is as shown below Command Function Name Processing Contents ZOPEN Opens the interface and prepares for communications with an external device ZCLOSE Closes the interface ZCNTL Sets the communications parameters in the currently open interface and reads the interface status ZLDV Switches the channel No of the interface where the printer is connected LPRINT Outputs data to the designated printer LPRINT USING Outputs data to the designated printer The format can be specified LLIST Outputs the program list to the designated printer 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 3 2 Printing from a printer connected to the console CH 1 Here the way of thinking in the case of printing out by a printer that is connected to a PC AT personal computer which is set as a console and connected to the interface is explained Console in the case of a PC AT personal computer ee Data output Data output Printer Printout procedure The procedure for printing out from a printer connected to the console is shown below Set the data output destination pet Sets the data output destination by the ZLDV command Output the data to the printer U7 Outputs data to the printer by the LPRINT command etc Commands and functions used The commands and functions used to print out by a printer connected t
75. d 4 Reset Request Signal Y1A a This is a signal that resets the QD51 R24 module only Reset is executed after the access enabled time following the Y reset set by the GX Developer intelligent function module switch ON Reset request Y1A OFF z X0E cle Operating Wait for reset Resetting Reset after access enabled time 200 2000 ms following the Y reset set by GX Developer During reset set up an interlock with the QD51 R24 operating status signal XOE so that there will be no access from a sequence program PECIFICATION eS A ae MELSEC Q 3 9 Relationship between the QD51 R24 Start Condition and the Flash ROM Execution Program Area The start condition for each task is set BOOT as default To set to any other than BOOT change it using the system command SET The BASIC program s storage state in the program area differs as follows depending on the set start conditions Start Condition Area where the BASIC program to be ae Reference j BASIC Program Read Timing Multitask Setting Symbol run is stored Section Starting by turning the Flash ROM run program area START Section 3 11 2 power on or by reset Designated BASIC task No area 7 e In the System mode when the power Starting by an interrupt from A Flash ROM run program area is turned on or during a Rest f the programmable Section 3 11 3 Designated BASIC task No area In the Run M
76. dance with the external device s specifications b Connect the shield of the connection cable to the FG terminal of either one of the devices being connected If data communications cannot be done normally due to external noise even when wiring connections are done as shown above make wiring connections as shown below 1 Connect the FG terminals of both sides with the connection cable s shield However make the connection on the external device side in accordance with the external device s instruction manual 2 Connect the QD51 R24 s FG to the FG terminal of the power supply module in the station where the QD51 R24 is installed or connect it to the FG terminal on the control panel where the QD51 R24 station s programmable controller is installed 3 Connect the nnA and nnB of each signal in the connection cable in pairs QD51 R24 Side External Device Side a DE a oe SDB c __ RDB RDA a SDA RDB i SEE er es eee SDB SG SG es ca oe io FG hale gc ie Shield Correspondence between the RS 422 485 terminal block and signal positions 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q c Itis necessary to set or connect a terminal resistor in both terminals when wiring On the QD51 R24 side connect a terminal resistor packed together with the QD51 R24 in accordance with this section to match the external device s specifications As for the external device side conn
77. dules Doing so could cause trouble erroneous operation injury or fire e Completely turn off the externally supplied power used in the system before mounting or removing the module Not doing so could result in damage to the product e Do not install remove the module to from the base unit or the terminal block to from the module more than 50 times after the first use of the product IEC 61131 2 compliant Failure to do so may cause malfunction e Do not touch the terminals while power is on Doing so could cause shock or erroneous operation e Switch off all phases of the externally supplied power used in the system when cleaning the module or retightening the terminal or module fixing screws Not doing so could result in electric shock Undertightening of terminal screws can cause a short circuit or malfunction Overtightening of screws can cause damages to the screws and or the module resulting in fallout short circuits or malfunction e Before touching the module always touch grounded metal etc to discharge static electricity from human body etc Not doing so can cause the module to fail or malfunction Operating Precautions CAUTION e When performing control in particular changing data changing a program or changing the operation status status control of the programmable controller during operation using a BASIC program do so only after reading the user s manual thoroughly and taking adequate safety precautions
78. e W and the FROM command as shown below a Reading of data by the special variable W in a BASIC program With the special variable W the special register is designated by ED9000 to ED9127 The designation is in 1 word units QD51 R24 Special Register b15 to bO Reading of data BASIC program ED9125 ED9126 ED9127 Program example The following shows a program where data are read from the QD51 R24 s special register ED9000 100 A W ED 9000 QD51 R24 Special Register Special variable W BASIC 24004 ED9000 Reading of data 24014 ED9001 g Toan EH D3002 1 word units 2403H ED9003 to to 247CH ED9124 247Dx ED9125 247EH ED9126 247F ED9127 PECIFICATION seine Ali MELSEC Q b Reading of data by the FROM command in a sequence program The special register is designated using the FROM command by the address The designated address is 2400H to 247Fu in 1 word units QD51 R24 Special Register b15 to bO 24001 ED9000 2401H ED9001 FROM 24024 ED9002 Reading of data 24034 ED9003 2404H ED9004 Sequence program to gt to 247Du ED9125 247Ex ED9126 247Fu ED9127 Program example The following shows a program where a value in the special register address 2400 is read into DO when the multitask execution start signal XOB is ON To read data from the special register to the programmable controller CPU use the multitask execution start signal XOB as an in
79. ect or set a terminal resistor in accordance with the external device s user s manual Terminal resistors connected to the QD51 R24 side Connect a 3309 1 4 W terminal resistor when communicating using the RS 422 interface Connect a 110Q 1 2 W terminal resistor when communicating using the RS 485 interface Distinguishing terminal resistors 3309 1100 Orange Orange Brown Brown Brown Brown Including 1 n n 1 and m n connections it is necessary that the device connecting to the QD51 R24 s RS 422 485 interface have a matching RS 422 or RS 485 interface 2 Connection examples a If connecting 1 1 QD51 R24 Side External Device Side Signal Name Terminal Resistor Terminal tarts cert CRI Resistor Signal Name LR Terminal Resistor 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION b If connecting 1 n multiple drop QD51 R24 External Device 1 External Device 2 External Device n 7 r o a a a Naan IA 1 fT SDA SDA 7 1 _____ SDA SDB SDB 4 SDB i RDA 4 RDA m RDA RDB F Rs 422 485 RDB Pr at coe SG Cable SG SG FG FG Vi et FG Jy RS 422 485 RS 422 485 Cable Cable LR Terminal Resistor c If connecting n 1 multiple drop QD51 R24 1 QD51 R24 2 QD51 R24 n External Device 1 ba wie sto 1 eae wipe Ae a 4 k LA SDA SDA L SDA SDB SD
80. ecuted by 1 Start task No designation signal Y11 Y12 2 Task start signal Y19 For details concerning the start task No designation signal Y11 Y12 and the task start signal Y19 refer to Section 3 8 2 1 Processing when powered on or reset When the power is turned on or there is a reset the program to be run which is stored in Flash ROM is read and loaded into the QD51 R24 s internal memory The loaded BASIC program is then run when there is a start request from the programmable controller CPU 2 Running a task a When the power is turned on or there is a reset the Basic program that is read from the Flash ROM is started by a task start signal Y19 from the programmable controller CPU to the QD51 R24 When the task start signal Y19 rises the task with the start task No designation signal Y11 Y12 ON is started Start request from programmable controller CPU BASIC Program END Task with IT set in the start condition u BASIC program stops b Fora task that is started by an interrupt from the programmable controller CPU write it so that an END command is run at the end of the BASIC program If an END command is run the interrupt from the programmable controller CPU is reset and it is made possible for the next interrupt to be received 3 SPECIFICATIONS MELSEC Q 3 11 4 Starting by a start request from another task Start condition BOOT ON This is the case whe
81. ed and that none of the screws is loose When maintaining and checking the QD51 R24 refer to the Safety Precautions included in the front of this manual EXCLUSIVE COMMAND ieee i MELSEC Q 6 EXCLUSIVE COMMANDS Exclusive commands are commands which make programming easier when using the functions of the intelligent function module In this chapter the QD51 R24 commands which are exclusive QCPU Q Mode commands described in this manual are explained 6 1 Exclusive Command List and Available Devices 1 Exclusive command list The exclusive commands explained in this chapter are listed below Exclusive Command Function Outline Explanation Section Checks the rise of the task start signal For checking the rise of the Task Y19 and shortens the start time of a Section 6 2 Start Signal Y19 BASIC program 2 Available devices The following devices are available for the exclusive commands Internal ee File register Constant Www o tsncqow Rz _ EXCLUSIVE COMMAND eee MELSEC Q 6 2 Z P YCHECK This checks the rise of the task start signal Y19 and shortens the BASIC program start time Usable Device Internal Device 7 ESES Link direct device JEJ HI Intelligent Sering Data Gysen veen function Index Register Constant ow Register l Other voe d Word module device Zn 2p or eyes UNG KH S en a lt a I a Command Symbol Execution Condition Command Z Y
82. ed internally in the QD51 R24 and 1 word data can be sent and received between tasks and between the QD51 R24 and the programmable controller CPU 2 QD51 R24 Expansion Register Reading of data W GETMEM Reading of data W PUTMEM jee el Writing of data BASIC program x1 The data in the expansion register are not backed up by a battery so if the programmable controller s power is turned OFF or it is reset the data written to the register are erased If the data need to be held even after the programmable controller is powered OFF or reset save the expansion register data in the following devices e File register of the programmable controller CPU e Latched device of the programmable controller CPU x2 When data are sent and received between devices in 1 word units the buffer memory Refer to Section 3 5 2 and common memory Refer to Section 3 5 3 can also be used 1 Writing data to and reading data from the expansion register Data are written to or read from the expansion register by the following methods e Using the special variable W of the BASIC program e Using the GETMEM PUTMEM command in the BASIC program e Using the FROM TO command in the sequence program The method of designating the expansion register differs in the special variable W the GETMEM PUTMEM command and the FROM TO command as shown below PECIFICATION seine Ali MELSEC Q
83. ed while they are being run 1 OVERVIEW 1 1 Operation Overview for QD51 R24 Programmable controller The QD51 R24 operates by BASIC programs created by the user The BASIC version that can be used by the QD51 R24 is AD51H BASIC which is capable of multitasking processing of up to 2 tasks MELSEC Q Besides the various calculations that can be carried out by a BASIC program created by the user e Data can be sent to and received from an external device e Data can be sent to and received from the programmable controller CPU The operation in the QD51 R24 when data are sent to or received from an external device or the programmable controller CPU is as shown below Data Sending Reception e Expansion Relay Buffer Memory Internal Memory Data reading Data writing e Data reading e Task start request BASIC Program Task No 1 Area Task No 2 Area e Interrupt request Data Writing Data reading RS 485 RS 422 _ i Sending i External l Device Reception i Data writing 1 In the case of the QD51 RS 232 In the case of the RS 232 RS 422 485 2 Channels QD51 R24 1 Channel 1 Channel 1 OVERVIEW MELSEC Q 1 Sending Data to and Receiving Data from an External Device The QD51 R24 is equipped with the following interfaces QD51 2 RS 232 channels e QD51 R24 1 RS 232 channel 1 RS 422 485 chan
84. eeaneeeeeeeneenenenensnee 3 56 3 11 Running a Task a created Program eeceeceeeeeeeeeneeeeeeeeeeeaeeeaeseaeeeaeeeaeeeaeseaeeeaeeeaeeeaeecaeeeaeseeeaeeeaeeeas 3 57 3 11 1 Conditions for permitting running of a task and start CONILIONS eee eeeeeeeeeeeteteteteteeeeeeeees 3 57 3 11 2 Starting by turning the power on or by reset start condition START ecceeeeeeeeeeeeeeeeeeeeees 3 58 3 11 3 Starting by an interrupt from the programmable controller CPU Start Condition IT 3 60 3 11 4 Starting by a start request from another task Start condition BOOT ON 3 61 3 12 Running a BASIC Program by Multitask ProCeSSing cecceecceeeseeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeatenas 3 63 3 12 11 MultitaSk processing civic eaaa ea cence ar EAE Sae a AT aa a AE a 3 63 3 13 BASIC Program Priority Order Priority ecceeceseeeeeeeeeeneeeeeeeeeeaeeeaeeeaeseaeseaeeeaeseaeeeaeeeaeeeaeeaeeeaeeeas 3 64 3 13 1 Synchronizing execution between BASIC programs Event Control seseeseeeeeeeeeeeerereeseen 3 65 3 13 2 Sharing equipment Resources by multitasking sseessssseeseesreensererrstrstrstnstnstnstnstnstnnrnntnsennn 3 66 4 ABOUT QD51 R24 FUNCTIONS 4 1 to 4 24 AT Leto FUMCHONS aeaa E E ies ned A ENA 4 1 4 2 Communications with a Console Terminal cccccccseceseeeeeeeeeeeeeeseeeeeeesaeeseeseeseesieesieesieesieesieeneeeeess 4 2 4 2 1 Communications with a console 0 0 eceeeeeneeeeeeeeeeeeeeeeeaeeeaeeaeeeaeeea
85. eeeaeeeaeeeaeeeaeeeaeeeaeecaeeeaeeeatesaeeeas 4 3 4 2 2 Communications with a terminal ce cecceeseeeeeeeeseeeeeeeeeaeeeaeeeaeseaeeeaeseaeeeaeeaeseaeeeaeeeaeeeaeeeaeeeaeeeatenas 4 6 4 3 Printing by a Printers 2h dasten ein eingetivnkin wana ivan el ativaud ls atlas tian 4 10 4 3 1 Printing from a printer connected to an interface that is not set in the console eeeeeeeee 4 11 4 3 2 Printing from a printer connected to the console 0 0 eeeeceeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeesaeetaeeeaeeeateeaeeas 4 13 4 4 Communications with the External DeVICC e ee eeceeceeeeeeeeeeeeeeeeeeeeeeeeaeesaeesaeeseeseetieesieesieesietieesnee 4 14 4 4 1 If data are being Sentun ioiii ari aiiai aiaa 4 14 4 4 2 If data are reCeiVed nn ececcceceessececeesceeeeeeeeecneeneceeeeseecaeeseeseaeessessaeeseeseaeesnedeaesaedeaesaeseaesnaeteaetaetees 4 15 4 5 Communications with the Programmable controller CPU 0 eeeeceeeseeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeesas 4 16 4 5 1 ON OFF data communications by general output X Y oo eee eeceeeeeteeeeeeeeeeeeeeeeeeeaeeeaeetaeeeaneaeeeaeeeas 4 17 4 5 2 Reading and writing data from to buffer MEMOTY cceecceeeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeesaeeeaeeeeeeaeeeaeens 4 18 4 5 3 Reading and writing data from to the programmable controller CPU 0 0 eeeeeeeeeeeeeteeeeeeneeeneeees 4 19 4 5 4 Reading and writing data from to the programmable controller CPU s expansion file register 4 20 4 6 Reading
86. eeesaes 5 5 5 5 1 Connecting to the RS 232 interface eaea eaa EAA REE A AERE ERA AEREI A ERARE RAAR 5 6 5 5 2 Connecting to the RS 422 485 interface 0 ce ecceceeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeseeeseeeseeeseeeseaeseaeeeneeeaes 5 8 5 6 Setting from the GX Devel p fa serisi aaa a ai aeaii 5 11 5 6 1 I O assignment Settings cceesesseeeseeeeeeeeeeeeeesneceeeaneeccedeneeaeeeaneeaneeaneeaeeeanecnedaneeaeeeneesneeenedeneeaeee 5 11 5 6 2 Switch setting for I O and intelligent function module 0 0 ee eeceeeeeeeeeeeeeteeeteeeteeeteeeteaeeeneeeeeteneeaes 5 12 5 6 3 Intelligent function module interrupt point settings 2 0 eee eeeeeeee eee eeeeeeeeteeeeeeeteeeteeeteaeseeeseneeentaes 5 16 5 7 Maintenance CHECKS ai os ceciic ca deceds ca sesdavcacenndecs dvaanisaceundecaavadaicasiundeaaadouacebivaadvasavsuadehWaadvaadetavenavcasvantesai ea 5 17 6 EXCLUSIVE COMMANDS 6 1to6 2 6 1 Exclusive Command List and Available Devices ccccccceccceeeceeeeeeecceeeeneeeeaeeseaeeseaeeesneeseaeesseeeaees 6 1 6 2 Z P YCHECK sii E EE ued ae estas ends dex ceed astendoce ute eae E ae ade cae tasted oe ed eae E 6 2 7 TROUBLESHOOTING 7 1to7 3 7 1 About QD51 R24 Status CHECKS 0 ee eeeeeeeeeeeneeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeesaeeeaeesaeesaeeeaeeereeaeeeatesas 7 1 7 1 1 Checking the LED lighting status communications error status and QD51 R24 switch setting StaR evs coe Serves r ATE EAE OEE E EEA E S O O 7 1 71
87. eive command is run with respect to a screen keyboard disk peripheral device or external device When a command is run which carries out control of interrupts stops ends BASIC program execution When a command is run which carries out multitask control synchronizes execution starts or changes the priority etc When a program execution interrupt state is canceled input output is completed the specified time has passed etc Refer to the Programming Manual Commands concerning details of multitask processing and commands which switch the execution of programs 3 SPECIFICATIONS MELSEC Q 3 13 BASIC Program Priority Order Priority In the QD51 R24 a priority order priority can be assigned to BASIC programs that are created When BASIC programs are started all BASIC programs are set at the same priority order Therefore the BASIC programs created by the user are run equally The priority order can be changed by the ZURGENCY command If the priority order is changed as long as a program execution switch command is not run only the BASIC program with the highest priority is run without any scheduling being done by the OS BASIC programs with a low priority are not run PECIFICATION ees alee MELSEC Q 3 13 1 Synchronizing execution between BASIC programs Event control In multitask processing each BASIC program is process independently for this reason if data are shared between BASIC programs
88. eneral output X Y Using the QD51 R24 s general purpose input output ON OFF data can be communicated between the QD51 R24 and the programmable controller CPU Programmable controller CPU QD51 R24 pr i i a eS B Sequence Program Internal Memory Reading of i i i ON OFF ON OFF data General data i gt output j a BASIC i l i i Reading of i program l i ue ON OFF Input i General data X ON OFF data output ON OFF I ae a ae en me J a NE a en J 1 In the case of programmable controller CPU gt QD51 R24 Sending of ON OFF data from the programmable controller CPU to the QD51 R24 is carried out by general output Y The QD51 R24 uses the special variable B in a BASIC program to read the general output turned ON OFF by the programmable controller CPU 2 Inthe case of QD51 R24 Programmable controller CPU Sending of ON OFF data from the QD51 R24 to the programmable controller CPU is carried out by general input X The programmable controller CPU uses a sequence program to read the general input turned ON OFF by a QD51 R24 BASIC program Special variables used The special variables used to read ON OFF data from general input X and general output Y are shown below Special Variable Processing Contents B X Formula Turns the QD51 R24 s general input X ON and OFF B Y Formula Reads ON OFF data from the QD51 R2
89. ension registers ED or special registers a up the time data Hr Min Sec of a programmable controller CPU and reads it PUTMEM TIME Clock functions DATES Sets up the date data Yr Mon Day Day of Week of a programmable controller CPU and reads it out Continued from the previous page 3 SPECIFICATIONS MELSEC Q Ree Command Classification Operation Function Real time Real time Real time control Real time control Real time control ZEVENT Enables or disables event generation Defines an event for synchronizing execution between programs DEF ZEVENT Defines an event to be triggered according to the QD51 R24 s extension relay EM ZRELEASE Allows other programs to use a resource to which a resource number is assigned ZRESERVE Prohibits other programs from using a resource to which a resource number is assigned ZSIGNAL Generates the specified event from the program ZSTART Starts the specified program ZURGENCY Changes the priority of a program ZWAIT DELAY Pauses program execution until the specified time has elapsed ZWAIT EVENT Pauses program execution until the specified event is generated ZMESSAGE Defines a message port ZMESSAGE Closes a message port CLOSE ZMESSAGE Reads message from a message port GET ZMESSAGE Deletes a defined message port KILL ZMESSAGE Opens a message port OPEN ZMESSAGE PUT Writes the following messages to the message port
90. ent Lights up Blinks Indicates normal operation Abnormal reset Indicates whether or not there is an error 1 Occurrence of an Normal error Run Multitask PRG Indicates the Mode Programming mode S i debug mode BASIC i Basi i P RUN Indicates that a BASIC program is running a eae 2 sD Indicates the send state of each channel Data are being sent Not sending Data are bein Indicates the receive state of each channel Not receiving received Lights up when a QD51 R24 hardware error occurs or when a program s execution is abnormal 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 4 Connection with a Console Debugger This section explains the connection methods of a personal computer with a console 1 Connection method a Connection with a PC AT personal computer Cables need to be produced by the users to make a connection 2 Cable wiring The wiring of the user created cable is show below QD51 R24 side Cable connection and signal direction Console side Signal name Pin number Connection example of full or half duplex Signal name communication CD RD RXD SD TXD A jo hy gt NO OO DSR DR RS RTS CS CTS CS CTS DTR ER o The pin arrangement on the console side differs depending on the personal computer If the cable is made by the user be sure to make the cables only after confirming the interface specifications for the personal c
91. evice Computer display measuring instrument ID module bar code reader adjuster or other intelligent communications module UC 24 etc connected to this intelligent communications module for data communications Intelligent Function Module Intelligent Function Module Device Special Function Module Q series programmable controller module which runs according to commands from the programmable controller CPU Equivalent to a special function module of the A series programmable controller Examples e CC Link Interface Module A D D A Conversion Module e Ethernet Interface Module e Serial Communications Module Buffer memory of the intelligent function module for storing data sent to and received from the programmable controller CPU setting values monitor values etc A QnA series programmable controller modules operated by commands from the programmable controller CPU Equivalent to Q series programmable controller intelligent function modules Examples e CC Link Interface Module A D D A Conversion Module e High Speed Counter Module e Ethernet Interface Module e Computer Link Module Serial Communications Module Buffer Memory Buffer memory of the intelligent function module for storing data sent to and received from the programmable controller CPU setting values monitor values etc I F GX Developer Interface Channel Generic product name for SWnD5C GPPW E SWnD5C GPPW EA SWnD5
92. g Contents ZOPEN Opens the interface and prepares for communications with an external device ZCLOSE Closes the interface ZCNTL Sets the communications parameters in the currently open interface and reads the interface status ZODV Switches the data output destination PRINT Displays the data on the terminal screen PRINT USING Displays the data on the terminal screen The format can be designated LOCATE Specifies the data display position on the terminal screen CLS Clears the terminal screen 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS ieren 2 Input from the terminal keyboard Here the way of thinking when data are input from the terminal keyboard is explained Terminal Keyboard Data input CH 1 Input data from keyboard Input procedure from the terminal keyboard The input procedure for input of data from the terminal keyboard is shown below Open the channel of the terminal used for key input p Open the channel connecting to the terminal using the ZOPEN command Set the data input crete Sows enone Set the data input destination in the console channel destination using the ZIDV command The QD51 R24 waits for key input s Execute the INPUT command etc from the keyboard Data are input using the keys of the keyboard Close the terminal channel mpk Close the channel which the terminal is connected to using the ZOPEN co
93. h vibration tighten the module with a screw e Tighten the screw in the specified torque range Undertightening can cause a drop short circuit or malfunction Overtightening can cause a drop short circuit or malfunction due to damage to the screw or module e Completely turn off the externally supplied power used in the system before mounting or removing the module Not doing so could result in damage to the product e Do not directly touch the conductive area or electronic components of the module Doing so may cause malfunction or failure in the module Wiring Precautions A CAUTION e When turning on the power supply or operating the module after installation or wiring work be sure that the module s terminal covers are correctly attached Not attaching the terminal cover could result in electric shock External connections shall be crimped or pressure welded with the specified tools or correctly soldered Imperfect connections could result in short circuit fires or erroneous operation Securely insatll the connector to the module Be sure to fix communication cables leading from the module by placing them in the duct or clamping them Cables not placed in the duct or without clamping may hang or shift allowing them to be accidentally pulled which may cause a module malfunction and cable damage e When connecting cables be sure to do so correctly after confirming the type of interface you are connecting to If connec
94. he FROM TO command in the sequence program The expansion relay designation method differs as follows in the special variable B and the FROM TO command a Writing ON OFF data and reading them using special variable B in a BASIC program With special variable B the expansion relay is designated by EMO to EM1023 Designation is in 1 bit units QD51 R24 Expansion Relay EMO EM2 Reading of data EM4 BASIC program EM1021 EM1022 Writing of data EM1023 Program example The following shows a program where 1 is written into the QD51 R24 s expansion relay EMO 150 B EM 0 1 Special variable B BASIC Writi f dat QD51 R24 Writing of data Program Expansion Relay 1 bit units t bO EMO to EM15 EM16 to EM31 10071006 to 993 gga EM992 to EM1007 EM1008 to EM1023 1023 1022 to 1009 1008 3 SPECIFICATIONS b MELSEC Q In the FROM TO command for writing or reading data in accordance with the FROM TO command of a sequence program an expansion relay is designated in the address The designated address is in 1 word units from QD51 R24 2380H to 23BFH b15 2380H TO 2381H Writing of data 23824 2383H Sequence 23841 program fo Z FROM Reading of data 23BDu 23BEu 23BFu to Expansion Relay bO EMO to EM15 EM16 to EM31 EM32 to EM47 EM48 to EM63 EM64 to EM79 to EM976 to
95. he expansion register in the QD51 R24 is 1024 points from EDO to ED1023 The expansion register No in EDO to ED1023 is expressed in decimal notation PECIFICATION eS A ae MELSEC Q 3 5 5 Special register ED9000 to ED9127 The special register is a register which has its use determined by the QD51 R24 Data are stored by the QD51 R24 s OS so in a BASIC program use the special variable W to read and use the stored data Buffer Memory F Related Address as Special Related j i Name Content Details of Contents j Special seen from the Register No Special Relay Register i Number of The number of errors registered in the ED9001 to amp H2400 ED9000 EMg9000 QD51 R24 is stored ED9008 Error codes are stored in order in ED9001 to ED9008 0 Normal amp H2401 to ED9001 to If more than 8 error occur the error codes Error Code Other than 0 EM9000 ED9000 amp H2408 ED9008 are not stored Error Code e For error codes refer to the Programming Manual Commands e The line No of errors detected by BASIC are stored Correspondence between the error code and the special register for storing the line numbers is as shown below 0 Storage Storage amp H240910 ED9009t0 No Line No EMoo09 22001 to amp H2410 ED9016 1 to FFFF ED9008 eee The setting number of the mode setting switch is stored amp H2414 ED9020 Run Mode 0 to 4 e 0 1 Run Mode e 2 3 Multitask Debug Mode 4 Progr
96. he specified value and returns the shifted value Searches for the specified value from the elements of a given array variable and Number search SEARCH ai eRe eT the location of the element ICDBL sd Converts an integer or Converts an integer or single precision real number into a double precision real number precision real number into a double precision real number CSNG Converts an integer or double precision real number into a single precision real number Format conversion CINT Converts a single or double precision real number into an integer functions CIDB Converts a 2 word 32 bit integer used in programmable controller CPUs into a double precision real number Converts a 2 word 32 bit integer used in programmable controller CPUs into a single precision real number Programmable Programmable ca a Writes various data to a programmable controller CPU controller access PCWT zov Specifies where the data is to be input by INPUT or any other instruction commands Specifies where the data is to be output by PRINT or any other instruction GETMEM Reads data from the QD51 R24 s buffer memory common memory or extension Buffer memory registers ED Writes data to the QD51 R24 s buffer memory common memory or extension registers ED B Reads or writes bit information in the extension relays EM special relays EM Buffer memory and general purpose inputs X and outputs Y Reads or writes word information in the ext
97. ications 3 3 RS 422 485 Cable Specifications 3 6 RS 422 485 Interface Specifications 3 5 RS 422 485 Terminal Block Specifications 3 5 RUM Modein nie agin A 14 RUNNING amp TASK escronan onari 3 57 S Sending of Data ee eeceeeeeeeeeeeeeneeeees 4 14 Setting from the GX Developer 6 5 11 Settings and Procedures Up Until Operaatio 9 areae tiai iaai 5 1 5 2 Sharing of ReESouUrceS eeeeeeeeeee 3 66 Special Register ceceeceeeeeeeeeeeeeneeeees 3 31 Special Relay 4 cccsceessedeeeeesedeeeeeedeees 3 38 START ea te a eee 3 58 Start Conditions cccceeeeeeeeeeeeetetees 3 57 Start Task No Designation eee 3 49 System Down Signal 3 48 T Task Start Signal ccceeeeseseeeeees 3 51 Terminals eeen ea eee a aa A 14 TrOUDICSNOOTING ceeeeeeeteeeeeeeetteeteeeteeetteees 7 1 U Use of Programs from Previous Modules eR aT ee a is eee A ge era App 2 Y YCHECK Command cccceceeeeteeeeees 6 2 Index 2 Index 2 WARRANTY Please confirm the following product warranty details before using this product 1 Gratis Warranty Term and Gratis Warranty Range If any faults or defects hereinafter Failure found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term the product shall be repaired at no cost via the sales representative or Mitsubishi Service Comp
98. ications with external devices lt Data communications with external devices gt Non procedural data communications can be carried out with external devices connected to the RS 232 and RS 422 485 interfaces lt Data communications with a console or terminal gt The following data communications can be performed with a console or terminal connected to the RS232 or RS 422 485 interface e Data display to a console or terminal e Data input to a console or terminal lt Printout on a Printer gt Data can be printed out on a printer connected to the RS 232 interface Robot bar code reader thermostat etc PC AT personal computer etc 1 OVERVIEW 3 MELSEC Q Data communications with the programmable controller are possible Data can be sent to or received from a programmable controller CPU installed with the QD51 R24 or the one on the MELSECNET H or MELSECNET 10 network The types of data which can be sent to and received from a programmable controller CPU are shown below 1 Device writing and reading in the programmable controller CPU Max 960 words 1 time 2 Writing to and reading from the buffer memory in the intelligent function module Max 960 words 1 time 3 Remote RUN STOP of the programmable controller CPU 4 Interrupts to the programmable controller CPU File control is possible Using the console s FD or HD hard disk sequential files and random files can be handled
99. ing PlCside ss oe E module side Interrupt pointer Interrupt pointer eT Ha B of medie Eo 120 No Start SI No 0 0000 es hs Cancel Display contents 1 CPU Side Interrupt Pointer Header No This sets the header No 50 to 255 of the interrupt pointer lxx used by the sequence program 2 CPU Side Interrupt Pointer Count This sets the number 1 of interrupt pointers 1 used in the sequence program 3 Intelligent Function Module Side Header I O No Sets the QD51 R24 s header I O No 4 Intelligent Function Module Side Header SI No 1 Creates a correspondence between the QD51 R24 s control No SI and the interrupt pointer Ixx used in the sequence program 2 Sets the header SI No 0 of the interrupt control No 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 7 Maintenance Checks Except for the following confirmation items there are no check items in particular for the QD51 R24 Other than the following points in order to be able to use the system in its optimum state at all times please carry out maintenance in accordance with the check items listed in the programmable controller CPU User s Manual QD51 R24 Check Items 1 Make sure there are no faulty contacts in the terminal resistors and connection cables 2 Make sure that the module fixing screws and the terminal block installation screws are fully tighten
100. it is necessary that the receiving side read the data after confirming that the sending side has sent the data Event control is used to synchronize the execution of the data sending side BASIC program and the data receiving side BASIC program In event control the BASIC program that is on the data receiving side is set in the signal wait WAIT state then after the sending side finishes sending the data it gives a signal event and the receiving side BASIC program reads the data For this reason the data sent by the sending side can be read precisely by the receiving side BASIC program In event control the following commands are executed e DEF ZEVENT Definition of the event e ZEVENT ENABLE Enabling generation of the event e ZWAIT EVENT Waiting for the event e ZSIGNAL Generating the event Task 1 Task 2 Program Program D amp i 3 Waiting for i DEF ZEVENT the event Defines the event W to occur i ZEVENT ENABLE ZWAIT EVENT Enables the Waiting for the event to occur event to occur Executing ZSIGNAL The event occurs Executing Program execution status Program execution status Refer to the Programming Manual Commands concerning details on event control and the commands used 3 SPECIFICATIONS MELSEC Q 3 13 2 Sharing equipment Resources by multitasking If use of resources is shared by BASIC programs the same resources cannot be used b
101. iting them AD51H BASIC system Programming Manual the Control CPU Non Control CPU Compatibility 229259 e oniro eas PCRD PCWT Command specified by the user to a multiple CPU system it is possible to Refer to Section 2 6 concerning the method for checking the function version 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS This shows system configurations and the functions that can be used 2 1 Application Systems This section describes the applicable systems 1 Applicable modules and base units and No of modules a When mounted with a CPU module The table below shows the CPU modules and base units applicable to the QD51 R24 and quantities for each CPU model Depending on the combination with other modules or the number of mounted modules power supply capacity may be insufficient Pay attention to the power supply capacity before mounting modules and if the power supply capacity is insufficient change the combination of the modules 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q ok Base unit Applicable CPU module 4 No of modules CPU type CPU model Main base unit Extension base unit QOO0JCPU QOOCPU Q01CPU Q02CPU 2 High Q02HCPU Performance QO6HCPU model QCPU Q12HCPU Q25HCPU QO02PHCPU QO6PHCPU Q12PHCPU Q25PHCPU Q12PRHCPU Q25PRHCPU QO2UCPU QO3UDCPU QO4UDHCPU QO6UDHCPU Q10UDHCPU Q13UDHCPU Q20UDHCPU Q26UDHCPU QO3UDECPU QO4UD
102. kage contents separately 2 When desiring to Know the processing necessary to get the QD51 R24 started a When desiring to know the startup procedure e An abbreviated sequence of the procedures up to the point when the QD51 R24 is operated is described in Section 5 2 b When desiring to know about connections with the console debugger e The connection method is described in Section 5 4 c When desiring to know about connection with the opposite party s device e The connection method for each type of interface is described in Section 5 5 d When desiring to know the processing necessary before the QD51 R24 is started up Setting of the parameters used in the QD51 R24 using GX Developer is explained in Section 5 6 3 When desiring to know about program application When desiring to know about application of the program from the A1SD51S or AD51H S3 e Program application is described in Appendix 2 1 ABOUT THE GENERIC TERMS AND ABBREVIATIONS In this manual unless specially clarified explanation of the Intelligent Communications Module using the general names and abbreviated names shown below 1 Generic terms and Abbreviations of Affected Modules In this manual programmable controller CPUs etc related to the Intelligent Communications Module are displayed with the following generic terms and abbreviations When it is necessary to clarify the relevant model name the affected module s model name is in
103. l AD51H S3 A1SD51S QD51 R24 Maximum number of tasks In the QD51 R24 a maximum of 2 BASIC programs can be run at a time 6 PCRD PCWT command The processing codes shown below cannot be executed with respect to the Q QnA CPU Replace those codes which can be replaced a PCRD commands Processing codes used in the A1SD51S AD51H S3 Processing codes for the QD51 R24 Processing Processing Desetpton Description eseipton Code Code Monitoring of the device monitor 2 amp H2 register by the PCWT command 515 amp H203 4 amp H4 Reading of expansion file register data Monitoring the expansion file register monitor registered by the PCWT command Reading of Q QnA series device memory Reading of continuous address designation data in the expansion file register 8 amp H8 Reading of sequence programs E 9 amp H9 Reading of microcomputer programs 10 amp HA Reading of comment data 11 amp HB Reading of expansion comment data Reading of the special function module Reading of Q QnA series intelligent 12 amp HC 533 amp H215 buffer memory function module buffer memory Reading of Q QnA series 513 amp H201 programmable controller CPU model Not available for the Q QnA series Reading of programmable controller 13 amp HD CPU model name Reading of parameter data 14 amp HE Reading of MELSECNET 10 parameters Not available for the Q QnA series 21 amp H15 Reading of netw
104. l is not being exercised it is normally ON DR DSR Signal 6 If DTR DSR control is being exercised when this signal is OFF data are not sent to the target device from the QD51 R24 When the target device is in the ready to receive state set it so that it is normally ON If DTR DSR control is not being exercised the DR DSR Signal s status is disregarded 3 SPECIFICATIONS MELSEC Q 6 RS RTS Signal 7 If RS CS control is being exercised the QD51 R24 is turned ON or OFF according to the size of the empty space in the OS area for reception data storage It is ON when it is ready to receive data When the RS RTS Signal is OFF reception data have been stored in the OS area so read out the reception data from a BASIC program If RS CS control are not being exercised it is normally ON 7 CS CTS Signal 8 When OFF data are not sent to the target device from the QD51 R24 e When the target device is in the ready to receive state set it so that it is normally ON During data communications the status of each control signal DTR DSR RS and CD can be checked with the ZCTRL command processing code 33 Refer to the Programming Manual Commands for the ZCTRL command 2 The ON and OFF states of each signal represent the following conditions Output Side Input Side ON 5VDCto15VDC 3 V DC to 15 V DC OFF 15 V DC to 5 V DC 15 V DC to 3 V DC 3 Interface connector Connectors of 9 pin
105. le communications with MELSECNET H remote I O stations by BASIC program are as follows Available Function i Batch read batch write Reading from and writing to device memory Random read test random write Reading from and writing to intelligent function Reading from and writing to the specified intelligent module buffer memory function module s buffer memory The device range of a MELSECNET H remote I O station which can be accessed by reading from and writing to the device memory is as follows The same range as the default QCPU settings For MELSECNET H remote I O station devices and access device ranges refer to the AD51H BASIC Programming Manual Device Symbol Device Name Device Symbol Special Register M D Output Relay Y Link Special Relay SB Internal Relay M Link Special Register SW 2 SYSTEM CONFIGURATION AND USABLE FUNCTIONS MELSEC Q For QnA A Series MELSECNET 10 remote I O stations only reading from and writing to the intelligent function module s buffer memory can be done 3 Setting from GX Developer In the case of mounting the QD51 R24 on a MELSECNET H remote I O station set the following parameters in GX Developer Each setting method is the same as the parameter setting for the QD51 R24 installed to the QCPU station Refer to Section 5 6 and subsequent sections For the method for displaying each setting screen refer to the GX Developer Operating Manual Parameter setting sections for
106. ller CPU Power supply module o Initialization processing Reading of the program to be run The program to be run is read from the flash ROM and loaded in the QD51 R24 s QD51 R24 program area However for a program with Program a task which has the multitask setting to be run turned ON the program is not read and Program loaded in the QD51 R24 s program area caren Flash ROM in the QD51 R24 s prog Multitask debug mode It ig possible to carry out multitask i debugging by the debugger while in the Console Display Debug command reception state Run the program read from the Flash ROM in D gt accordance with the multitask setting contents Start by turning on the power or by a Reset Start by an interrupt from the programmable controller CPU e Start by a start request from another BASIC program 3 SPECIFICATIONS 3 10 3 In the case of the run mode MELSEC Q This section explains the case in which the QD51 R24 is set to the Run mode by GX Developer When it is turned ON or reset and after the program to be run is read from the flash ROM to the QD51 R24 s program area Refer to Section 3 5 1 the multitask processing is executed Power turned on Power turned on B Es QD51 100 V AC 2 58 R24 200 V AC 2c 8 O Qa Initialization processing Reading of the program to be run QD51 R24 Inte
107. m a communication port of the QD51 R24 Enables disables or stops interrupts from communication lines Defines the starting line of the processing routine to which the operation branches upon interrupt from a communication line the first line of the error handling program Generates an error of the specified error code Returns a detected error code Returns the number of the line where an error was detected Stops the control of the BASIC interpreter and returns to the QD51 R24 s system mode Stops offline programming and returns to the main menu LOAD Reads programs on an FD or HD into the program area Input Output of BASIC programs SAVE File Operation Commands File maintenance KILL MERGE Merges a program in the program area with another on an FD or HD Saves programs to an FD or HD FILES Displays the names of the files stored on an FD or HD Deletes files from an FD or HD Deletes system names in an FD or HD NAME Renames a program or data file on an FD or HD File bugger assignment OPEN CLOSE Opens a file and enables its I O processing Terminates I O processing of a file PRINT Writes data to a sequential file F PRINT USING Writes data to a sequential file using the specified format Sequential file input INPUT Reads data from a sequential file output Input Output LINE INPUT Commands to Files FELD LSET Random file input output RSET Reads out
108. mmand End 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS veie Command functions used The commands and functions used to input data from a terminal keyboard are as shown below Command Function Name Processing Contents ZOPEN Opens the interface and prepares for communications with an external device ZCLOSE Closes the interface ZCNTL Sets the communications parameters in the currently open interface and reads the interface status ZIDV Switches the data input destination INPUT Carries out key input of data e Character code control codes 0H to 1FH commas 2Cx and 7Fx cannot be handled as data LINE INPUT Carries out key input of data Character code control codes On to 1Fx and 7Fx cannot be handled as data INKEY e Carries out key input of data INPUT e Character code control codes 0n 03H 13H 80H and FDu to FFH cannot be handled as data 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 3 Printing by a Printer Data can be printed out from a printer connected to the QD51 R24 s RS 232 interface A printer can also be connected to a PC AT personal computer which is being used as a console and can be used to print out data The procedure for printing out data differs in the following two cases 1 Printer connected to an interface other than a console 2 Printer connected to a console PC AT personal computer In the case of a printer connected f the case of a Hes to an i
109. munication cables with the main circuit or power wires or install them close to each other They should be installed 100mm 3 94 in or more away from each other Not doing so could result in noise that would cause erroneous operation e Ifa BASIC program is registered in the flash ROM in the module do not power OFF or reset the programmable controller CPU at the station where the module is installed during registration If it is performed during registration the data contents in the flash ROM will be erratic and it will be necessary to reset the setting values etc in the buffer memory and register them again in the flash ROM It could also cause the module to break down or malfunction Installation Precautions A CAUTION e Use the programmable controller in an environment that meets the general specifications contained in the user s manual of the CPU module to use Using this programmable controller in an environment outside the range of the general specifications could result in electric shock fire erroneous operation and damage to or deterioration of the product e While pressing the installation lever located at the bottom of module insert the module fixing tab into the fixing hole in the base unit until it stops Then securely mount the module with the fixing hole as a supporting point Incorrect loading of the module can cause a malfunction failure or drop When using the programmable controller in the environment of muc
110. n Module Switch Setting ee eeeeeeeeeeee 5 12 Input Output Signals ccceeeeeeeeeees 3 43 Intelligent Function Module Interrupt POINT SOUNO urera E 5 16 Internal Memory assaseessessessesreenesrenesneenenens 3 16 Interpreter ecccceecceeeseeeeeeeeeeeeeteeeeeeeetns A 14 Wisin paced na Pe aac Se ee hr ee es 3 60 L List of commands and Functions 3 10 List of F NCtUONS a aee Goi ta dee 4 1 M Maintenance Checks cccsssssseeeeeees 5 17 Multitasken a A 14 Multitask Debug Mode ceeeeeeeeeee A 14 Multitask Execution Interrupt Signal 3 47 Multitask Execution Start Signal 3 46 Multitask Processing ceeeeeeeeeeeeteee 3 63 N Names of Parts and Functions 08 5 3 O ON n ae a e E A 3 61 Operating State ce ceeeeseeeeseeteeeeeeeeeees 3 48 Operation when the Power is Turned On 3 54 P Performance Specifications 0 008 3 1 PAO Yas irea RAA 3 64 Priority Ordaresncrcnndenananiorariaiianiis 3 64 Program Aroa a o a 3 18 Programming Mode n A 14 R Reading and Writing Clock Data 4 22 Receive Buffer eeeeeeeeeseeseeeeeeereeneeees 3 41 Receiving Of Data 4 15 Reset Request Signal ec ceeeeeeeeeeneee 3 52 Index 1 RS 232 Cable Specifications 0 000 3 4 RS 232 Connector Specifications 3 3 RS 232 Interface Specif
111. n at a 1 QCPU is specified by the T i i i i i i i i I 1 1 i 7 1 z 1 I i i 1 i i i i i i 11 requesting module s I O No Device Memory etc i If accessing another station by a BASIC program even if the relay station or the access station is a multiple CPU system the Control CPU and Non Control CPU of the access station can be accessed Example Whether the control CPU of the relay module is the same or different itis possible to access the other station Peripheral Device Source Station Setting from GX Developer MELSECNET H 1 QCPU No 1 Relay Station 2 QCPU No 2 3 QCPU No 3 4 QCPU No 4 1 Relay module controlled by QCPU No 1 1 QD51 R24 controlled Access Station __ by QCPU No 1 2 Relay module controlled by QCPU No 2 Relay Module MELSECNET H Network Module The relay module s object during other station access is as follows e MELSECNET H MELSECNET 10 Network Module e Q Series C24 e Ethernet Interface Module If a Function Version A module is included in the relay modules only the control CPU can be accessed 1 VERVIEW 2 MELSEC Q 1 3 About the Function Added Changed to the Function Version B This shows the functions that have been added to or changed in the Function Version B QD51 R24 Explanatory section Multiple CPU When reading device data from or wr
112. n interlock Write Command X0B It It TO HO HO DO K10 oe Interlock that enables or disables FROM TO execution QD51 R24 Buffer Memory Sequence Program Writing of data 1 word units to PECIFICATION Bes allie MELSEC Q b Inthe QD51 R24 reading of data from or writing of data to buffer memory is done using the GETMEM PUTMEM command in the BASIC program QD51 R24 TO GETMEM Programmable Writing of data Reading of data BASIC controller CPU FROM PUTMEM progiem Reading of data Writing of data Program example The following shows a program where data from A 0 to A 9 equivalent to 20 bytes are written into the buffer memory area addressed 0 to 134 using the PUTMEM command 100 PUTMEM TO 0 0 FROM A 0 20 QD51 R24 Buffer Memory Ou 1H PUTMEM BASIC Writing of data Program f 10u 1 byte units 2 114 2 Buffer Memory Capacity The capacity of the QD51 R24 s buffer memory is 3 k words 6 k bytes 3 Buffer Memory Configuration One address of the buffer memory is composed by 16 bits The entire area can be used as desired by the user Refer to the Programming Manual Commands concerning the GETMEM and PUTMEM commands 3 SPECIFICATIONS MELSEC Q 4 Buffer Memory Addresses Addresses in buffer memory differ depending on whether they are designated by the programmable co
113. n the station There is danger of accidents due to wrong outputs or wrong operations e When connecting a peripheral device to the CPU module or performing control of a programmable controller which is being run through a BASIC program configure an interlock circuit in the sequence program so that the system overall is operating on the safe side at all times Also before exercising other control program change operating status change status control on the running programmable controller read the manual carefully and fully confirm safety Especially for the above control on the remote programmable controller from an immediate action may not be taken for programmable controller trouble due to a data communication fault In addition to configuring up the interlock circuit in the sequence program corrective and other actions to be taken as a system for the occurrence of a data communication fault should be predetermined between and programmable controller CPU Do not write data to the System Area in the intelligent function module s buffer memory Also do not turn ON the Use Prohibited output signals among the output signals from the programmable controller CPU to the intelligent function module If data are written to the System Area or output in response to Use Prohibited signals there is danger that the programmable controller system will malfunction Disposal Precautions A CAUTION e Do not bunch the control wires or com
114. nel Production instructions production results and other data can be sent to or received from a personal computer or other external device connected to the RS 232 or RS 422 485 interface or the console non procedurally Data such as production results can also be printed out on a printer connected to the RS 232 interface 2 Sending Data to and Receiving Data from the Programmable Controller CPU Through the execution of programmable controller access commands PCRD PCWT the programmable controller CPU device data can be read and written With the programmable controller access commands data can also be written to and read from the buffer memory of a special function module or an intelligent function module 1 OVERVIEW MELSEC Q 1 2 Features of QD51 R24 Systems which use the QD51 R24 have the features shown below 1 External device printer Simultaneous execution of up to two BASIC programs tasks Since multitask processing is possible BASIC programs can be created by dividing the control tasks to be done by the QD51 R24 The necessary task is started depending on the control level and the system can be controlled while exchanging data and synchronizing executions between tasks 5 pivided bY b control tyP It is possible to create Controls 3 or more BASIC programs executed gt However a maximum of 2 tasks BASIC programs ee ee can be run simultaneously J in the QD51 Data commun
115. ns are run e Start by start request from another task 384 k bytes Max 64 k bytes 16 32 48 64 k bytes 16 32 48 64 k bytes selectable for one task selectable for one task 8 k bytes 6 k bytes Expansion relay EM 1024 points Expansion register ED 1024 points Input 27 points Input 27 points Output 17 points Output 23 points General input output 8 points For start from 2 points For task start Input 26 points Output 23 points 2 points For task start from the programmable the programmable from the programmable controller CPU controller CPU controller CPU Yes Yes Memory protection Memory card write EEP ROM write Yes Flash ROM write protectable protectable protectable RS 232 RS 422 485 P tchannet CK thane Interfaces Parallel 1 channel Clock function None Power failure protection Impossible User program in ROM Possible However EEP ROM is internal Impossible However Flash ROM is internal A7PHP A7HGP A7LMS Console e VG 620 VT 382 PC AT personal computer PC AT personal computer Multitask debugging Possible when a debugger is used 48 points The first 16 points are l o point share 32 points open and the last 32 points are special Slot share App 1 App 1 APPENDICE MELSEC Q Appendix 2 About Use of Programs from Previous Modules Here use of programs created for A1SE51S or AD51H S3 is explained In the QD51 R24 the
116. nterface other than a connected to a console console Open the interface and set the communications parameters etc Set the No of the channel the Set the No of the channel the printer is connected to printer is connected to Output data to the printer Output data to the printer y Close the interface End End ION 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 3 1 Printing from a printer connected to an interface that is not set in the console Here the way of thinking in the case of printing from a printer connected to an interface that is not set in the console is explained QD51 Printer Printout procedure The procedure for printing from a printer connected to an interface that is not set in the console is shown below Open the channel of the terminal where Open the channel which the terminal is connected to using the data are to be the ZOPEN command displayed Set the data output destination Set the data output destination in the channel the terminal is connected to using the ZLDVcommand Output data to the eres OT O TEN AR Output data to the terminal by the LPRINT command etc terminal Close the terminal i ahs i channel Close the channel which the terminal is connected to using the ZCLOSE command 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS vetea Commands and functions used The
117. nterrupt from the programmable Other than at left controller a TaskNo 1 General Output Start task No setting Task No 2 Impossible to start each task c Turn the start task No designation signal Y11 Y12 corresponding to the task you are starting ON At the time the task start signal Y19 rises the start task No designation signal Y11 Y12 thus designated to be turned ON will be started However if a task that is currently being executed is designated it is disregarded PECIFICATION eS A ae MELSEC Q d Toturn OFF the signal designated by the start task No that was turned ON do so only after confirming that the designate task has been executed To check if the designated task has started use the method of turning the general input X allocated to the Reset OFF instruction by the BASIC program as shown in the example on the next page r e a r r a a a a This example shows the procedure in the case where a task is started and for turning the start task No designated signal Y11 task start signal Y19 OFF Conditions 1 Start Task No 1 2 Start task No designation signal Task start signal reset instruction X11 Task start instruction M Yo 1 2 Slot No Power Program Supply Mable QD51 module controller R24 CPU 4 Task start completed Input Output No as seen from the programmable controller CPU X Y00 to X Y1F Value designated by
118. ntroller CPU or by a BASIC program and are as follows a If designated from the programmable controller CPU If designated by the programmable controller CPU addresses are in 1 word units Also buffer memory addresses are designated from OH to BFFu in hexadecimal notation b If designated by a BASIC program If designated by a BASIC program addresses are in 1 byte units Also buffer memory addresses are designated from OH to 17FFH in hexadecimal notation Designated from the Address designated by programmable Buffer Memory GETMEM PUTMEM controller CPU using Lowerorder bibite lOu in a BASIC program a FROM TO command On H 1 byte units 1 word units Higher order 8 bits 1H Lower order 8 bits 2H Higher order 8 bits 3H Lower order 8 bits 17FCu BFE SEN Higher order 8 bits 17FDu Lower order 8 bits 17F E BFFu ag Higher order 8 bits 17FFH PECIFICATION eS A ae MELSEC Q 3 5 3 Common memory Common memory is memory that can be used to send and receive data between the QD51 R24 internally and each task Data from the programmable controller CPU can also be read and written using this memory 1 Writing data to and reading data from common memory QD51 R24 TO GETMEM Programmable Writing of data Common Reading of data Basic controller memory Program PUTMEM Writing of data Reading of data a
119. o CH3 e Software Used PC AT personal computer that uses SW1IVD AD51HP E Not used VT 382 VG 620 However these have already gone out of production Console debugger type This sets the type of console and debugger VT PC AT personal computer that uses SW 1IVD AD51HP E VT 382 However this model is already out of production e VG VG 620 However this model is already out or production Ctrl C setting This sets whether the Ctrl C key input from the console during multitask execution in the run mode is enabled or disabled e Enabled At the point when the Ctrl C keys are input multitask operation is stopped and the system switches to the System mode e Disabled Multitask execution continues even if the Ctrl C key input occurs from the console Access possible time setting after Y reset This sets the length of time from the point when the Reset request signal Y1A goes ON until the QD51 R24 enters the reset operation During the set time interval from the point when the Reset request signal Y1A goes ON until the QD51 R24 enters the Reset operation the FROM TO command can be executed Flash ROM write protection setting Sets whether write protection of the Flash ROM is enabled or disabled e With Sets write protection e Without Cancels write protection 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 6 Debugger This sets whether the debugger will be used or
120. o the console are shown below Command Function Name Processing Contents ZLDV Switches the output destination to the printer connected to the console LPRINT Outputs data to the designated printer LPRINT USING Outputs data to the designated printer The format can be specified LLIST Outputs the program list to the designated printer 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 4 Communications with the External Device An external device 1 can be connected to the QD51 R24 s RS 232 interface or RS 422 485 interface and communications carried out between them 4 4 1 If data are being sent Here the way of thinking in the case of sending data from the QD51 R24 to a device other than a console terminal or printer If data are being sent the procedure is as follows 1 Open the interface 2 Prepare the data to be sent 3 Specify the sent data byte count and time out time 4 Send data by a ZSEND command oa Close the interface QD51 R24 Pe 1 User Program Sending of data Interface ta program i i i l BASIC ZSEND i i i I i i i i Eora ea a a a a Commands and functions used The commands and functions used to send data from the QD51 R24 to a device other than a console terminal or printer are shown below 2 Command Function Name Processing Contents ZOPEN Opens the interface and prepares for communications with the external device
121. of measured values test data This connects with a computer etc to the RS 232 or RS External Device i N 422 485 interface of the QD51 R24 and sends and receives Section 4 4 Connection Function data through a BASIC program This writes and reads programmable controller CPU clock data Clock Function year month day hour minute second day of week for Section 4 7 programmable controller CPU s with the clock function This creates executes and corrects BASIC programs through system commands by connecting a console to the QD51 R24 It also records programs run by system commands in Flash ROM and reads them This carries out debugging while running BASIC programs by Multitask Debugging Function multitasking by connecting a console and debugger to the QD51 R24 Refer to the Programming Manual Commands Refer to the AD51H BASIC Programming Manual Debug and Compile Online Programming Function 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS ierte 4 2 Communications with a Console Terminal Data can be displayed on the screen and can be input from the keyboard of a console terminal connected to the QD51 R24 A console is a device PC AT personal computer connected to a channel that is set as a console by the GX Developer intelligent function module switch settings in the QD51 R24 A terminal is a device connected to a channel which is not set as a console in the QD51 R24
122. ollowing table For details concerning each command and function refer to the Programming Manual Commands 7 Command Classification Operation Function i Deletes programs in the program area and initializes all the variables Program creation AUTO Automatically displays line numbers at the beginning of each line preparations CLEAR Initializes all variables and sets up the memory area DELETE Deletes the specified range of a program RENUM Reassigns line numbers of a program Program editing LIST Displays all or a part of programs in the program area Returns the number of the BASIC task area in which the program currently being created or executed resides ZBAS Reading of the Returns the size of the unused program area in bytes memory capacity Starts execution of the program in the program area Reads a program from a memory card or the FD or HD and executes it RUN i Resumes the program execution that was stopped by CTRL C or BREAK key Program execution CONT Resumes the program execution that was stopped by the STOP or END instructions Resumes the program execution after error handling by the ON ERROR GOTO RESUME f instruction CHAIN Deletes all or a part of the currently executing program and reads and executes the specified program FOR to NEXT Repeatedly executes a series of commands the specified number of times STOP In the programming mode pauses program execution to wai
123. ommands End The transmission rate and data format are set using the BASIC program ZOPEN commands For details refer to the Programming Manual Commands 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 3 Names of Parts and Functions QD51 QD51 R24 RUN ERR RUN ERR PRG P RUN PRG P RUN SD SD m SD sD cH C eS pp _lct2 lt 1 cHAL 3o pp _c 3 e 1 CH 1 I lt 2 QD51 RS 232 RUNC CO ERR CH1 PRG 1 PRUN RS 232 sD O Csi H1 cH 2 2 Lp Co R e a EEN oaaae i QD51 R24 RUNCO CO ER SDA 1 PRGCO CO PRUN sc spl C1844 2 cuT Ro iro SDB 3 CH2 roA RS 232 4 4 lq lt _ 3 RDA 5 a nme onm SSS S S Indicator LED Indicator LED Refer to 1 for the indication contents CH1 side RS 232 interface D Sub 9 pin for serial CH1 side RS 232 communications with external devices and for connection of a Interface console debugger CH2 side RS 232 interface D Sub 9 pin for serial communications with external devices and for connection of a console debugger CH3 side RS 422 485 interface two piece terminal block for making serial communication with the target device console debugger cannot be connected CH2 side RS 232 Interface CH3 side RS 422 485 Interface 1 List of indicator LED s Indication cont
124. omputer you are using 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 5 Connection with the External Device Here the wiring between the QD51 R24 and the external device is explained As a precaution when connecting cables and as a condition for achieving a highly reliable system in which the full potential of the QD51 R24 s functions is realized it is necessary to carry out wiring so that the influence of noise will be minimized 1 Ground the shield at one point 2 When connecting to the external device by a RS 232 line use the connector shell shown in Section 3 2 1 for the connector on the QD51 R24 side 3 M3 screws are used for the terminal screws on the RS 422 485 interface terminal block Use compression terminals which are appropriate for these terminals 4 For connections to the external device side make connections after confirming the specifications for the external device 5 Refer to Appendix 3 concerning the bending radius of connection cables 5 SETTINGS AND PROCEDURES UP UNTIL OPERATION MELSEC Q 5 5 1 Connecting to the RS 232 interface Here connection precautions and an example of connection when carrying out full duplex communications using the QD51 R24 s RS 232 interface are shown 1 Precautions when connecting a Connect the FG signal and shield of the connection cable as shown below ee ee Connection method Connection cable FG Connect to the connector body on
125. on memory has a 1 byte 8 bits configuration The entire area can be used as desired by the user 3 SPECIFICATIONS 4 Common Memory Addresses Addresses in common memory differ depending on whether they are designated by the programmable controller CPU or by a BASIC program and are as follows a If designated from the programmable controller CPU MELSEC Q If designated by the programmable controller CPU addresses are in 1 word units Also common memory addresses are designated from COOH to 1BFFu in hexadecimal notation b If designated by a BASIC program If designated by a BASIC program addresses are in 1 byte units Also common memory addresses are designated from 1800H to 37FEH in hexadecimal notation Designated from the programmable controller CPU using a FROM TO command 1 word units COT a ELE D 1BFEH 7 1BF FH COOH Common Memory Lower order 8 bits Higher order 8 bits ee a Sa ree Lower order 8 bits Higher order 8 bits Address designated by GETMEM PUTMEM in a BASIC program 1 byte units Refer to the Programming Manual Commands concerning the GETMEM and PUTMEM commands 3 SPECIFICATIONS 3 5 4 Expansion register EDO to ED1023 MELSEC Q The expansion register is internal memory where 1 word 16 bit data can be stored 1 If the expansion register is used data can be stor
126. ork information 22 amp H16 Reading of routing parameters App 4 App 4 APPENDICES MELSEC Q b PCWT command Processing codes used in the A1SD51S AD51H S3 Processing codes for the QD51 R24 Processing 7 Processing wh Description Description Code Code 2 amp H2 Device memory monitor registration 3 amp H3 Random writing to device memory 4 amp H4 Writing to expansion file register Expansion file register monitor 5 amp H5 registration 515 amp H203 Writing to Q QnA series device memory Random writing to expansion file register writing to expansion file register Writing to special function module buffer Writing to Q QnA series intelligent 12 amp HC 533 amp H215 memory function module buffer memory Writing of parameter data Writing of MELSECNET 10 parameters 15 amp HF Analysis of parameter data 7 Year of DATES The year setting of DATE varies Eee A1SD51S AD51H S3 QD51 R24 Reading Reads only the last two digits of the year Reads the four digit Modify the program to If the last two digits are 90 or more the year as itis use four digit year first two digits are 19 If the last two digits processing Not available for the Q QnA series Not available for the Q QnA series are less than 90 the first two digits are 20 Writing Writes only the last two digits of the year Writes the four digit Designate the year as year as itis four digits correctly App
127. ory EM Provides comments remarks in the program Sets variables etc used for transition to the program to be executed by the CHAIN m i io m P3 COMMON F instruction Specifies numeric values or character strings to be read by the READ instruction Reads values defined by the DATA instruction and assigns them to variables Specifies the first line number of the DATA instruction data that are to be read by READ Assigns the expression value to a variable m T WD DI O E 4 OJ gt O po m T SWAP Swaps the values of two variables ZMOVE Transfers data between variables BSWAP Swaps two values in byte units Replacement of A MID Part1 Replaces a part of a character string with another character string character strings Continued from the previous page PECIFICATION ss a MELSEC Q Command Classification Operation Function e ee cos Retums the trigonometric cosine value i O Exe fRetums the exponential function vale ofbase e ________ Returns an integer value for the expression od eaS I I I I I RND _ Retumsarandom number o Y O Arithmetic functions Far ea a ese ISCN o Returns the sign of a value SN oo Returns the trigonometric sine value Returns the square root value Returns the trigonometric tangent value Arithmetically shifts the memory contents of the specified value and returns the shifted value SHT Logically shifts the memory contents of t
128. ow Command Function Name Processing Contents B Performs expansion relay ON OFF control and reading of the ON OFF status 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 8 2 Data communications by expansion register ED The QD51 R24 s expansion register ED is a device which can store data from all tasks and perform reading of data For details of the expansion relay refer to Section 3 5 4 Data storage Expansion register EDO to ED1023 ee of data Storing of data Program 1 Program 2 Reading of data The expansion registers that can be used by the QD51 R24 are EDO to ED1023 1024 points Commands and functions used The commands and functions used to carry out data communications by the expansion registers are shown below Command Function Name Processing Contents Ww Performs storage of data in the expansion register and reading of data GETMEM i Performs reading of expansion register data PUTMEM Performs storage of data in the expansion register 4 8 3 Data communications by common memory Buffer memory in the QD51 R24 is common memory which can be used to carry out storage and reading of data from all tasks For details of the common memory refer to Section 3 5 3 Data storage Common memory y Reading of data Storing of data Program 1 Program 2 Reading of data The common memory that can be used in the QD51
129. pt Pointer Settings MELSEC Q The following table shows a list of parameter setting items set using GX Developer Parameter Setting Item Parameter Contents Setting Contents Explanation Section Allocates O in the QD51 R24 and enables the following switch Number of points settings Detailed settings Switch 1 Setting switch Switch 2 Mode setting switch Not used Set 00001 Interrupt pointer header No CPU Side Carries out settings in order to Number of interrupt pointers execute an interrupt program Intelligent Header I O No module Side Header SI No Section 5 6 1 Section 5 6 2 Section 5 6 3 Set when using a Multiple CPU Refer to QCPU User s Manual Multiple CPU Settings Number of CPU s etc system Multiple CPU System PECIFICATION elas iL ah MELSEC Q 3 8 List of Input Output Signals From To the Programmable controller CPU The QD51 R24 s input output signals are explained The following I O signal assignment is based on the case where the start I O No of the QD51 R24 is 0000 installed to slot O of the main base unit Device X is an input signal from the QD51 R24 to a programmable controller CPU Device Y is an output signal from the programmable controller CPU to the QD51 R24 The input output signal list for the programmable controller CPU is shown in the following table Reference Section Device No Signal Content X00 Yoo X01 Y01 X02 Y02 X03 Y03 X04 Y04 X05
130. r Compiler INumberoftasks ooo oe SO Number of tasks e Start by power is turned on e Start by an interrupt from the programmable controller CPU Task start conditions 4 Not possible when compiled BASIC is used e Start by a start request from another task Internal memory 1024 points General Input Output Input 26 points Output 23 points Memory protection Yes Flash ROM write protectable 1 RS 232 compatible D sub 9p RS 232 compatible D sub 9p RS 232 compatible D sub 9p Cd Interfaces CH 3 RS 422 485 Two piece terminal block Full duplex communications 300 600 1200 2400 4800 14 400 19 200 28 800 38 400 bps Transmission rate Itis possible to use the 2 interfaces with a total transmission rate within 38 400 bps Start bit Data bits Data format 2 Parity bit Even Odd None Stop bit DTR DSR ER DR control RS 232 only can be used RS 422 485 cannot be used RS CS control Transmission control CD DCD Signal control DC1 DC3 Xon Xoff control DC2 DC4 control Power failure maintenance The program area only can be stored in Flash ROM Continued to the next page 1 For details refer to Section 5 6 2 2 The transmission rate and data format are set using the BASIC program ZOPEN command For details refer to the Programming Manual Commands PECIFICATION Bes ee als MELSEC Q Specification QD51 QD51 R24 PC AT personal computer Mul
131. ray variable Reading from the f Reads 1 bit data from the specified bit of an integer array variable designated bit Character lt ASCII Returns a character code corresponding to the head of a string expression conversion ICHR o Returns a character whose code is an integer expression value Number conversion VAL Returns a numerical value that is represented by a character string Number gt Character string Character string functions MID Second Extracts a partial string starting from the specified position in the original character string Character sampling RIGHT Extracts the specified number of characters from the right of a character string STRING Returns the specified number of the specified characters SPACE Returns a null string of the specified length Searches for the specified character string in the entire source string and returns Character search INSTR nS the position of the first match Character string Returns the number of characters composing a character string length search Format control spc Retums the specified number of spaces Format control function TAB Moves the currently displayed character position to the specified position CONSOLE Specifies the number of items to be displayed on the console screen Screen control es O Clears the screen display LOCATE Specifies the display position on the console screen ZOPEN Opens a communication channel port in preparation for pe
132. re are no switches for mode settings or console and other settings as in the previous modules A1SD515 etc When the QD51 R24 is used be sure to set the mode settings and console and other settings in the GX Developer parameter setting screen shown below e Intelligent Function Module Switch Settings Screen Appendix 2 1 About use of A1SD51S AD51H S3 programs Here use of programs created for the A1SD51 or the AD51H S3 and incorporation of the QD51 R24 in existing systems is explained Programs created in A1SD51S or the AD51H S3 can be read as is However the points shown below differ slightly so exercise caution 1 Usable channels Usable channels are as shown below sornpst s3 atsp515 QD51 QD51 R24 CH 4 RS 232 ae a es eee ee CH 2 RS 232 oe i E Channel CH 3 RS 42zRs a85 o o x dT CH 4 Parallel fiom eee ee O Can be used X Cannot be used a Use in the QD51 If used in the QD51 there is no CH 3 RS 422 485 or CH 4 interface in the QD51 so they cannot be used As for CH 3 RS 422 485 correct the BASIC program to another channel A or use the QD51 R24 CH 4 Parallel cannot be used b Use in the QD51 R24 If used in the QD51 there is no CH 2 RS 232 or CH 4 interface in the QD51 so they cannot be used As for CH 2 RS 232 correct the BASIC program to another channel or use the QD51 CH 4 Parallel cannot be used App 2 App 2 APPENDICES 2
133. re the start condition in the multitask settings is set to BOOT or ON A task is started when the Run Permission Conditions are satisfied and when the start is requested by the ZSTART command from another BASIC program Refer to Section 3 11 1 for the Run Permission Conditions For details of the ZSTART command refer to the Programming Manual Commands 1 Processing when powered on or reset a When the start condition is BOOT When the module is turned ON or reset the program to be run is loaded from the flash ROM to the internal memory of the QD51 R24 The loaded BASIC program runs when a start is requested from another task b When the start condition is ON When the module is turned ON or reset the program to be run is not loaded from the flash ROM to the internal memory of the QD51 R24 When a start is requested from another task the designated BASIC program is read from the file area of the user FD HD to run 3 SPECIFICATIONS MELSEC Q 2 Running a task a Starting a task A task starts when it is designated by the ZSTART command from another BASIC program The designation method of the ZSTART command varies depending on the start condition BOOT Designated by lt number gt of the task No area ON Designated by lt number gt of the task No area and by lt drive No gt lt system name gt lt file name gt of the BASIC program to be read If the start condition is
134. rforming communications with an external device Port assignment HET T ZCLOSE Closes the communication channel port used for communications with external devices Input Output Control Printer output Commands Output to screen Continued from the previous page 3 SPECIFICATIONS MELSEC Q Command Classification i Operation Function Input from Input Output keyboard LINE INPUT Control Commands INPUT Used to input data from the keyboard Stores an entire key input line 255 characters or less into the character string variable area without any breaks Input from port ZRECEIVE Receives data from a communication port Changing of port ZCNTL Used to set communication data to the currently open communication port or to settings read out the communication port status Returns a character input from the keyboard or a blank string input if nothing is Inputs from the Input Functions keyboard COM Dent toniel ON OFF STOP ON ERROR Error control GOTO ERROR Error RR Error Information Port Control Functions Error Control Functions Information Functions Recursive Commands to the Programming Mode Recursion to the programming mode Reads a character string of the specified length from the console keyboard and returns it Reads a character string of the specified length from a sequential file and returns it Reads a character string of the specified length fro
135. rnal memory Program to be run lt Flash ROM Multitask processing serene The program to be run is read from the flash ROM and loaded in the QD51 R24 s program area However for a program with a task which has the multitask setting turned ON the program is not read and loaded in the QD51 R24 s program area Run the program read from the Flash ROM in accordance with the multitask setting contents e Start by turning on the power or by a Reset e Start by an interrupt from the programmable controller CPU e Start by a start request from another BASIC program 3 SPECIFICATIONS MELSEC Q 3 11 Running a Task a created program Here running a task when the QD51 R24 is in the Run Mode and in the Multitask Debug Mode is explained 3 11 1 Conditions for permitting running of a task and start conditions In the QD51 R24 a task is permitted to be run when it satisfies all the conditions shown below 1 Actual starting of a task depends on the start conditions designated in the multitask setting 1 Task Run Permission Conditions Task start conditions are shown below a b a The start conditions Refer to Section 3 9 are set in the multitask setting b The GX Developer intelligent function module switch settings Refer to Section 5 6 is set on Run Mode 0 1 or Multitask Debug Mode 2 3 QD51 RUN PRG PRUN ont FP SOVcH 2 P
136. roduct Information List To display the system monitor select Diagnostics System Monitor gt Product Inf List of GX Developer Function version Serial No Product No Product Information List a x slot Type series Model name Points EZA No Master ruc Serial No ver Product No Q S s 090920000000000 B 091013092955015 B 0 0 Intelli Q QDS1 32pt 0000 030920000000000 B 0 1 None 7 0 2 None 0 None Qs None 1 Production number display Since the QD51 R24 does not support the production number display is displayed The serial No displayed in the Product Information List of GX Developer may be different from the one on the rating plate and the front of the module e The serial No on the raging plate and the front of the module indicates the management information on the product The serial No in the Product Information List of GX Developer indicates the functional information on the product which is updated when a new function is added PECIFICATION ses ee al MELSEC Q 3 SPECIFICATIONS The following shows the performance specifications of the QD51 R24 For general specifications refer to the QCPU User s Manual Hardware Design Maintenance and Inspection 3 1 Performance Specifications The performance specifications of the QD51 R24 are shown below Specification Item QD51 QD51 R24 Programming language AD51H BASIC Interprete
137. rogram Stored in Flash ROM GX Developer Mode Setting cH RS 232 Task start conditions 0 1 Run Mode already set 2 3 Multitask Debug Mode CH 2 RS 232 QD51 2 Task Start Conditions Each task is run in accordance with the set start conditions The start conditions that can be set by the QD51 R24 are following three types Start Condition Symbol Reference Section Starting by turning the power on or by reset START Section 3 11 2 Section 3 11 3 Starting by an interrupt from the programmable controller CPU Starting by a start request from another task BOOT ON Section 3 11 4 PECIFICATION ees alee MELSEC Q 3 11 2 Starting by turning the power on or by reset start condition START This is the case where the start condition in the multitask setting is set on START Starting of a task is done if the Run Permission Conditions listed in Section 3 11 1 are established 1 Processing when powered on or reset When the power is turned on or there is a Reset after the program to be run which is stored in the Flash ROM is read and loaded to the QD51 R24 s program area the designated task is run Flash ROM QD51 R24 BASIC Task No Area Start Condition BASIC Program Program Area START Task No 1 Area START Task No 2 Area 2 Running a Task A task that is started by the power being turned on or by a Reset is run as follows in accordance with the BASIC program that is cre
138. sal a Start monitor H Information Stop monitor Close 7 TROUBLESHOOTING MELSEC Q Display contents e Module The following information is displayed Model name Installed module model name Header I O No Relevant module s header Input Output signal No Installation position The slot position where the module is installed Product information Product information The last character of the product information indicates the function version of the module Example If the last character is B it means that the module is of function version B Module access If the QD51 R24 System Down signal XOD is OFF and the QD51 R24 operating status signal XOE is ON then Accessible is displayed I O address verification status This displays whether the module the user has set the parameters for matches the module that is installed or not Latest error code Displays the error code for the most recent error that has occurred Error display Displays the error codes for the error that have occurred with all the used functions as the object 2 If you are checking by the hardware information screen in the GX Developer diagnostic function Start Procedure GX Developer Diagnostics gt System Monitor gt Module Detailed Information Hardware Information F Module Display format Module Name QD51 Product information 030920000000000 B Q HEX DEC m H
139. sion file register data only when accessing an A series programmable controller via network A CPU QD51 R24 Memory Cassette I i Sequence i program I l I File register Block No 0 i program Expansion Writing of data file register BASIC I a ssa ec nee i lS See eo eee Sa EE j Commands and functions used Commands and functions used to write data to and read data from the programmable controller CPU s expansion file register are shown below Command Function Name Processing Contents PCRD Reads data from the programmable controller CPU PCWT Writes data to the programmable controller CPU 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS werecee 4 6 Reading and Writing Data from to the Buffer Memory of Another Intelligent Function Module Special Function Module Data can be written to and read from the buffer memory of another intelligent function module or special function module by a QD51 R24 BASIC program Programmable controller CPU QD51 R24 Reading of data BASIC rogram Writing of data eee PENEN ere Ae i i j l i Sequence i program i i l i I i j j ies Oe 26 aes Seo ee err ERTAN UA P AAA E ESEE AEE EEE E J I I i I li i Buffer memory i I I I l I I Intelligent Function Module Special F
140. t for command input In the run mode stops program execution and puts the module into an idle state Program control In the programming mode terminates program execution to wait for command input END r In the run mode terminates program execution and puts the module into an idle state Repeatedly executes a group of commands between WHILE and WEND while the WHILE to WEND i specified conditions are met GOTO Changes the program flow to move to the specified line unconditionally GOSUB to RETURN Program branching ON GOTO Branches to one of the lines specified with line numbers according to the value ON GOSUB Branches to one of the lines specified with the line numbers according to the value IF GOTO ELSE Selects the branch destination according to the result of the formula calculation IF THEN ELSE TRON Starts program tracing TROFF Resets the program tracing set by TRON CDBI Converts a double precision real number to a 2 word 32 bit integer for programmable controller CPUs Converts a single precision real number to a 2 word 32 bit integer for programmable controller CPUs Branches to a subroutine and returns to the line of the specified line number Format conversion CSNI Continued from the previous page 3 10 3 10 PECIFICATION eS A ae MELSEC Q Command i Classification i Operation Function Writing to the designated bit Writes 0 or 1 to the specified bit of an integer ar
141. terlock Read Command X0B FROM HO H2400 DO K1 Sequence Program 1 word units Reading of data QD51 R24 Expansion Register e 247CH ED9124 247DuH ED9125 247 EH ED9126 247Fu ED9127 ED9000 ED9001 ED9002 ED9003 to LS Interlock that enables or disables FROM execution PECIFICATION ee MELSEC Q 3 5 6 Expansion relay EMO to EM1023 The expansion relay is a relay that can be used to send and receive ON OFF data between tasks internally in the QD51 R24 1 Turning the expansion relay ON and OFF and reading ON OFF data a The special variable B can be used in a BASIC program to turn the expansion relay ON and OFF and to read ON OFF data QD51 R24 B BASIC B program Writing ON OFF data Reading of data b During BASIC program execution by multitasking either task can read the ON OFF data and this register can be used by either task through a BASIC program Expansion Relay EM EMO ON OFF ON OFF Reading of data 2 Number of Expansion Relay Points The QD51 R24 expansion relay has 1024 points For details on special variable B refer to the Programming Manual Commands 3 SPECIFICATIONS MELSEC Q 3 Writing Reading of Expansion Relay ON OFF Data ON OFF data are written to or read from the expansion relay by the following methods e Using the special variable B of the BASIC program Using t
142. the programmable controller system could malfunction 3 SPECIFICATIONS MELSEC Q 3 8 1 Input X detailed explanation Here the input X for the QD51 R24 is explained The input No Xn used in this section is the No as viewed from the programmable controller CPU 1 General Input X00 to XOA X10 to X1E 26 points The general input can be used freely by the user and can be used to send ON OFF data from the QD51 R24 to the programmable controller CPU Turning the general input ON and OFF is accomplished by the special variable B Programmable controller CPU QD51 R24 General Input _ x00 lt Y100 gt B X amp H00 1 PECIFICATION eS eA ae MELSEC Q 2 Multitask Execution Start Signal XOB a When the QD51 R24 s mode setting switch 1 1 is set in the Run Mode 0 or 1 this signal is enabled it carries out ON OFF control If the QD51 R24 is in a mode other than the Run mode it remains OFF and does not change b Ifthe QD51 R24 is in the Run mode after the power is turned on or after a Reset if multitask execution is enabled this signal goes ON In a sequence program use it as an interlock for enabling or disabling the FROM TO command When the QD51 R24 is not in the multitask execution enabled state an attempt to execute the FROM TO command will result in a SP UNIT DOWN error and the programmable controller CPU will stop its operation
143. tion is made to a different interface or if wiring is faulty it could cause the module or external device to break down Tighten the terminal screws with the specified torque If the terminal screws are loose it could result in short circuits fire or erroneous operation Tightening the terminal screws too far may cause damages to the screws and or the module resulting in fallout short circuits or malfunction e When disconnecting the communications cable or power cable that is connected to the module do not disconnect it by grasping the cable with your hand and pulling it Disconnect cables with connectors attached by taking hold of the connector at the connection with the module and pulling the connector For cables connected to a terminal block remove the cable after loosening the terminal block screws If the cable is pulled while it is connected to the module it could cause malfunction or damage the module or the cable Be sure there are no foreign substances such as sawdust or wiring debris inside the module Such debris could cause fires damage or erroneous operation The module has an ingress prevention label on its top to prevent foreign matter such as wire offcuts from entering the module during wiring Do not peel this label during wiring Before starting system operation be sure to peel this label because of heat dissipation Startup and Maintenance precautions A CAUTION e Do not disassemble or modify the mo
144. tions possessed by the QD51 R24 are explained 4 1 List of Functions A list of QD51 R24 functions is shown below Complex numerical calculations and function calculations which would lengthen the programmable controller CPU s scan time Sub CPU Function can be calculated by a BASIC program Collection analysis and correction of measurement data e Function calculations such as Sine Log and square roots etc i This displays the operating status production conditions running Monitor Display gt Function status breakdown contents etc in a console or terminal Section 4 2 uncti connected to the QD51 R24 This carries out input of production schedules production Key Input Function quantity operations setting data etc from the keyboard of a Section 4 2 console or terminal connected to the QD51 R24 This prints out production plans results daily reports Functions by BASIC Printer Function breakdown contents planning data inspection results test Section 4 3 results charts etc with a printer connected to the QD51 R24 programs This enables input of data from a bar code reader or magnetic card reader etc that is connected to the QD51 R24 Since sending and receiving can be done in a free format Data Input Function through a BASIC program it is possible for the QD51 R24 to match the protocols of the opposite device Input of production lot No product name quantity etc Collection
145. titask debugging Possible when the debugger is used Line configuration RS 422 485 1 1 1 n n 1 min Transmission distance RS 232 Max 15 m Total cable length RS 422 485 i el Max 1200 m Total cable length Number of writes to flash ROM Maximum 100 000 times to the same area Number of occupied I O points 32 points per slot I O assignment Intelli 32 points x 3 RS 232 7 0 127 O P HRV SV External diameter 8 5 mm or greater Manufactured by Oki Electric Wire Corp The number of pairs is shown in the O part SPEV SB MPC 0 2 x 3P External diameter approx 6 5 mm Manufactured by Mitsubishi Electric Wire Co Ltd SPEV SB 0 2 x 3P External diameter approx 7 5 mm Manufactured by Mitsubishi Electric Wire Co Ltd 5 5 V DC internal current consumption 0 26A 0 31A External dimensions 98 3 86 in H X 27 4 1 08 in W x 90 3 54 in D mm Weight 0 20kg 0 44Ib x3 This shows combinations when the external device s and programmable controller CPU s are connected External device side Programmable controller CPU side The value n or the total of m n becomes a maximum of 32 4 To use the QD51 R24 switch settings must be configured by GX Developer Refer to Section 5 6 for the switch settings of GX Developer 5 The electrical characteristics of the recommended cables SPEV SB MPC 0 2 X 3P and SPEV SB 0 2 X 3P are equivalent however their external dimensions and internal wire
146. ts operated by Power companies and or any other cases in which the public could be affected if any problem or fault occurs in the PRODUCT e Railway companies or Public service purposes and or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User e Aircraft or Aerospace Medical applications Train equipment transport equipment such as Elevator and Escalator Incineration and Fuel devices Vehicles Manned transportation Equipment for Recreation and Amusement and Safety devices handling of Nuclear or Hazardous Materials or Chemicals Mining and Drilling and or other applications where there is a significant risk of injury to the public or property Notwithstanding the above restrictions Mitsubishi may in its sole discretion authorize use of the PRODUCT in one or more of the Prohibited Applications provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail safe redundant or other safety features which exceed the general specifications of the PRODUCTs are required For details please contact the Mitsubishi representative in your region REVISIONS x The manual number is given on the bottom left of the back cover Print Date_ Manual Number Apr 2000 SH NA 080089 A First printing Sep 2000 SH NA 080089 B Addition Section 1 3 Section 2 3 2 3 1 2 3
147. uence program With the FROM command special relays are designated by addresses Designation addresses are 2500H to 2507n in 1 word units QD51 R24 Special Relay b15 to bO 25004 EM9000 to EM9015 FROM Reading of data 25011 EM9016 to EM9031 Sequence 25024 EM9032 to EM9047 program 2503H EM9048 to EM9063 2504H EM9064 to EM9079 2505H EM9080 to EM9095 2506H EM9096 to EM9111 25071 EM9112 to EM9127 Program example The following shows a program where a value in the special relay address 2500 is read into DO when the multitask execution start signal XOB is ON To read data from the special relay to the programmable controller CPU use the multitask execution start signal XOB as an interlock Read Command X0B FROM HO H2500 DO K1 pS Interlock that enables or disables FROM execution QD51 R24 Special Relay b15 to bO equence FROM EM EM EM EM ge ie etree rete I Program 4 Reading of datayl oo g01519014 Jgoo1 g000 M9000 te EM9015 1 word units 25011 EM9016 to EM9031 to to 2506H EM9096 to EM9111 25074 EM9112 to EM9127 3 SPECIFICATIONS MELSEC Q 3 6 Receive Buffer The receive buffer is a memory buffer used for sending and receiving data between the QD51 R24 s RS 232 interface and RS 422 485 interface and an external device connected to them The receive buffer for each respective interface is 1024 bytes The receive buffer size can be ch
148. ultitask debug mode during multitask execution e Flash ROM run program area p Section 3 11 4 Designated BASIC task No area Starting by a start request When run by the ZSTART command User FD or HD file area for the i i from another task The BASIC program with the file peripheral device Save the BASIC Section 3 11 4 name designated by the ZSTART controller CPU program as a file command is read Since there is no multitask setting No multitask setting reading of a BASIC program is not done The difference between the start condition BOOT and ON is as follows BOOT The program to be run is stored in the designated BASIC task No area in the main memory s program area ON Only the memory capacity of the designated BASIC task No area in flash ROM is set in the program area of the main memory The program to be run is not stored in the BASIC task No area Refer to the AD51H BASIC programming manual Debug and Compile concerning the system commands MSAVE and SET 3 SPECIFICATIONS MELSEC Q 3 10 QD51 R24 Operation when the Power is Turned On The QD51 R24 operates in the mode set by the intelligent function module switch Mode Setting in GX Developer when the power is turned on Operation differs depending on the mode 1 Programming Mode 2 Multitask Debug Mode 3 Run Mode Here the operation of the QD51 R24 when the power is turned on is explained for each mode
149. unction Module Commands and functions used Commands and functions used to write data to and read data from the buffer memory of another intelligent function module or special function module are shown below Command Function Name Processing Contents PCRD Reads data from the programmable controller CPU PCWT Writes data to the programmable controller CPU Refer to the Programming Manual Commands concerning details of the above commands and functions 4 ABOUT QD51 R24 FUNCTIONS MELSEC Q 4 7 Reading and Writing Clock Data The QD51 R24 does not include a clock function If a clock function is used with the QD51 R24 read the calendar Year Month Day Day of Week or time Hour Minute Second from a programmable controller CPU with a clock function using a BASIC program Refer to the User s Manual for each programmable controller CPU to confirm which programmable controller CPU has a clock function If you are using a programmable controller CPU with a clock function it is necessary to write the calendar date and time to the clock element Programmable controller CPU QD51 R24 Sequence program l i Reading the calendar time l i Writing the calendar time BASIC program Clock element Commands and functions used Commands and functions used to write the calendar and time to and read them from the programmable controller CPU are shown below Command Function
150. unctions stop during a flash ROM update e Communications with external devices e Communications with the programmable controller CPU e Execution of the BASIC program Time measurement of the timeout processing It is recommended to update the flash ROM before any of these operations and do not update during the operations It may take one to two minutes to update the flash ROM Transmit data of the buffer memories etc to a latched device in the programmable controller or to a file register 3 SPECIFICATIONS MELSEC Q 3 5 1 Program area Following programs can be stored in the program area e BASIC programs created at the console Programs for execution read from the flash ROM 1 Memory Capacity The program area s maximum capacity is 64 k bytes This 64 k bytes is divided so it can be used for a maximum of 2 BASIC programs Task 1 to Task 2 Task No 1 Area Max 64 k bytes Maximum 64 k bytes total for 2 tasks Task No 2 Area Max 64 k bytes 2 Capacity for 1 BASIC program The capacity for one BASIC program can be selected from 16 k bytes 32 k bytes 48 k bytes and 64 k bytes CAUTION If compiled BASIC is used approximately 2 times as much capacity is required as with interpreter BASIC 3 Configuration for each Task No Area Besides the area for the BASIC program an OS area an area for the variables used in that task and a random file buffer area are included in each Task No Area O
151. writing data from to the programmable controller CPU Data can be written to and read from the programmable controller CPU s device memory directly by a QD51 R24 BASIC program Word device T C D W R etc Writing of data Programmable controller CPU QD51 R24 or nn SESE 3 i Sequence Program Device Memory i F Bit device Reading of data l nm e Y M L S i B F T etc BASIC j program i j i i H i i i l i f Refer to the Programming Manual Commands for the details of the device memories to and from which data can be written and read by the BASIC program Commands and functions used The commands and functions used to write data to and read data from the programmable controller CPU s device memory are shown below Command Function Name Processing Contents PCRD Reads data from the programmable controller CPU PCWT Writes data to the programmable controller CPU 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS verten 4 5 4 Reading and writing data from to the programmable controller CPU s expansion file register Data can be written to and read from the programmable controller CPU s expansion file register file registers after block No 1 directly by a QD51 R24 BASIC program Refer to Section 4 5 3 concerning writing of data to and reading data from a file register block No 0 The QD51 R24 can read or write the expan
152. y multiple BASIC programs at the same time Exclusive control of resources is a way of making it impossible for another BASIC program to use resources while one BASIC program is using them This exclusive control of resources must in the end be decided and implemented by fellow programmers If this problem is not decided by the fellow program creators and therefore not provided for exclusive control of resources cannot be implemented Exclusive control of resources is accomplished by the following commands e ZRESERVE Requests exclusive control of a resource e ZRELEASE Ends exclusive control of a resource Task1 Task2 Program Resource Program Executing Stop for using resources Not used Executing ZRESERVE Requests mutual exclusive control of the resource ZRELEASE Finishes mutual exclusive control of the resource ZRESERVE Requests mutual exclusive control of the resource ZRELEASE Finishes mutual Used by D exclusive control Task 2 S of the resource econ 4 i Not used Program execution status i Resources usage status S Program execution status Resources are said to be all the hardware and software that can be used by a BASIC program For example the screen printer files disks or memory etc 4 ABOUT QD51 R24 FUNCTION OUT QD51 R24 FUNCTIONS eten 4 ABOUT QD51 R24 FUNCTIONS Here the func

Download Pdf Manuals

image

Related Search

Related Contents

Get cached  Design  Sony ICF-C743 User's Manual  Emerson PD3811BL Owner's Manual  Refer to Quick Step Guide and or Installation & Service Manual for  NEX-3/5/5C/C3 NEX-VG10/VG10E  SANTA`S EXPRESS Manual SP&ENG&GM&FR  User Manual - Dirac Research  Texto completo  Les indicateurs financiers du développement durable  

Copyright © All rights reserved.
Failed to retrieve file