Home

MELSEC-Q/L Serial Communication Module User`s Manual

image

Contents

1. 17 24 TET OPPO TE crient Re a rti t cii e a d e Aue EDU ee 17 28 14 0 ZPLUINI iuter ete e ute iiu ti eee 17 32 APPENDIX App 1to App 2 Appendix 1 Specification Comparisons between the Q Series C24 and L series C24 INDEX Index 1 to Index 3 WARRANTY RELEVANT MANUALS The specifications and usage of special functions can be checked in this manual In addition use the following manuals according to their intended use Manual number Manual name Model code Q Corresponding Serial Communication Module User s Manual Basic Overview of the module applicable system configuration specifications procedures prior to operations SH 080006 basic methods for communicating with the external device maintenance and inspection and 13JL86 troubleshooting of the Q series serial communication module Sold separately MELSEC L Serial Communication Module User s Manual Basic Overview of the module applicable system configuration specifications procedures prior to operations SH 080894ENG basic methods for communicating with the external device maintenance and inspection and 13J240 troubleshooting of the MELSEC L serial communication module Sold separately MELSEC Q L MELSEC Communication Protocol Reference Manual SH 080008 Information on how the external device reads data from and writes data to the programmable controller 13JF89 CPU through communication using the MC protocol
2. User frame User frame User frame User frame User frame User frame 1st 2nd n 1 th n th First frame Arbitrary data Last frame Register Register code code Calculation range when transmitting data Calculation range when receiving data When transmitting Calculation includes everything from the data following the first frame first one frame only when multiple user frames have been specified to the one immediately before the register code Except the additional code data of the transparent code designation shown in Chapter 12 When receiving Calculation includes everything from the data following the first frame to the one immediately before the register code Except the additional code data of the transparent code designation shown in Chapter 12 When transmitting receiving Calculation includes everything from the head of the message to the one immediately before the register code Except the additional code data of the transparent code designation shown in Chapter 12 When transmitting Calculation includes everything from the data following the first frame user frame 1st when multiple frames have been specified to the frame preceding the last one user frame n th when there are multiple frames specified Except the additional code data of the transparent code designation shown in Chapter 12 When receiving Calculation includes everything from the data foll
3. o o o Le sert 8 Instruction code Executing Instruction format condition ZP CSET 6g ZP CSET Un 51 52 01 02 H 1 If the host station is a Basic model QCPU function version B or later Universal model QCPU or LCPU double quotation of the first argument can be omitted Setting data Setting data Description Set by Data type Un Un Start I O signal of the module Nace String 00 to FE The 2 upper digits of an input output signal expressed in 3 digit BIN 16 bit Channel No for sending the monitoring result 1 1 Channel 1 CH1 side User BIN 16 bit 2 Channel 2 CH2 side S2 Head number of the devices that store control data User System 01 Dummy Bevice name D1 Head bit device number of the local station that turns ON for one scan upon instruction D2 completion System Bit D2 1 also turns ON if the instruction execution completes abnormally The file registers of each of the local device and the program cannot be used as the setting data Control data Device Item Setting data Setting range Set by S2 0 Execution type Designate 0 0 Stores the result of execution upon completion of an instruction S2 1 Completion status 0 Normal System Other than 0 Error code Designate the units of transmission reception data count Word byte units 0 Current setting value designation 1 Word
4. sene 15 8 15 4 1 Mode switching procedure 2 Eee ceeded betel t Editt expe qt Erat 15 8 15 4 2 Mode switching sample program ssssesseseeeeneneennenneneen een rennen rennen nnne 15 9 15 5 Switching the Mode from an External Device ssssseeeeeeennnen nennen ener 15 10 15 5 1 Mode switching procedure ssssssssessseseeeeenennenee nennen nennen rennen 15 10 15 5 2 Mode switching sample program sese nnne 15 11 16 1 Communication Data Monitoring Function sess 16 1 16 11 OVOrVIOW c enm Ren au ut a ree este 16 1 17 17 16 1 2 Communication data monitoring operation esssseeeeemenem menn 16 2 16 2 Communication Data Monitoring Function Settings ssseenennn 16 4 16 3 Communication Data Monitoring nennen 16 8 17 1 Dedicated Instruction List and Available 17 1 17 2 Z BUPRGVS iu iii pe ea bn La TR e E ALERT ER HE oe A EA ER ete 17 3 17 3 ZP CSET Programmable Controller CPU Monitoring 17 7 11 4 ZP CSET Initial Settings t Ee PE epo metiri 17 16 155 GOP GETE pao en mo paene pod pepe eiae 17 21 JS CRIAM
5. O Dataregister o O p owon Link register O w Be Ott p dec ve 0 to 8191 Internal user 0 to 2047 Retentive timer C6H Currentvaue O SN contact ce Counter co O cse otto lcurrentvaue O CN Link specialretay O se am link specialregister sw 8 7 stepreay ___ 1 1 O d ss o Otsi9 Dretimpt O x am owim Dretoupt of w Aw Indexregister O z cw Ree emm _ m cm 1 Designating a non existent device code will result in an error 2 When the device range in the parameter setting has been changed the new device range can be set as the programmable controller CPU s monitoring target 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 2 3 Timing for programmable controller CPU monitoring The following explains the timing for programmable controller CPU monitoring when the programmable controller CPU monitoring function is executed 1 Programmable controller CPU monitoring using the Q series C24 is performed continuously at cycle time intervals registered by the user 2 Values from 1 to 65535 unit 100ms s min can be registered as the cycle time Use the following expressions as a reference when registering the cycle time a When sending de
6. 1 This program example gives the registered contents of the user frame No specified as the first frame No and the last frame No EMBED User frame No Registered code Registered data contents none 419 4 First frame No Last frame No 11 32 11 32 When STX is handled as transparent code Head data 11 DATA COMMUNICATIONS USING USER FRAMES d using Format 0 Additional code Removed by the Q series C24 Transparent code D L E xAn When receiving using arbitrary data and last frame combination reception Receive data count Word units Receive byte count excluding frame and additional code 12 2 6 f C Li E Byte units B C Pao Receive byte count excluding frame and Fi oT additional code 12 External device 12348 bes The illustration below is for word units 0 31 32 33 02 41 42 43 34 1 2HODHOAHSBHO4H FY User frame use control A k Programmable Arbitrary data area Last frame 2H designation controller CPU Corresponds to register AE None First frame No designation No 419u H 0 151 T JE R tion dat d z eception data 3rd i None Programmable i 1 controller CPU 4th B2 Last frame No designation
7. nennen nennen 11 34 11 4 1 5 data eire eU eee ette e e t eo eL t e e oe t ea o e nee 11 34 11 4 2 Transmission etre pacem D DI rena penat qme ee 11 36 11 4 3 Settings for transmission user frames sssssssssssseeeeeeeeneeneneenenennnnnnnnns 11 37 11 5 Transmission Program s ici eee tate ig E rect ida ideae 11 41 12 1 Handling the Transparent Code and Additional Code 12 1 12 2 Registering Transparent Codes and Additional Codes sse 12 2 12 3 Handling Transparent Codes and Additional Codes during Non Procedure Protocol Data GomminicatlOm etii eor bot t miti b iui iei etin oet 12 3 12 4 Example of Data Communication Using the Non Procedure Protocol 12 8 12 4 1 Example of data reception ssssssssssssssssessseeeneeeee enne nnne nnns 12 9 A 16 A 16 12 4 2 Example of data tranSMiSSion cccsccccscceeeeceeeceeeeceeeeneeeeaeescaeeecaeessaaeeseaeeseaeeseaeeseaeessiseeaseetans 12 11 12 5 Handling Transparent Codes and Additional Codes During Bidirectional Protocol Data Communication Lan cH bes EL OL ELEC LE Lee e Ios 12 13 12 6 Example of Data Communication Using the Bidirectional Protocol 12 16 12 6 1 Example of da
8. registration 0 When deleti Registration data Ed A 1 to 78 Number of bytes the registration data 1 8142 byte number Only for the initialization command designation section Registration ARV dat d by th i h No 801F4 User controlled ny 2 processing 8143 registration data manufacturer code control data not required number etc 1FDO to 8144 to 8182 Initialization Data code for the initialization command for 1FF6u command registration 3 The contents of the data to be written into the designated area that corresponds to registration numbers 8001H to 801FH are the same as those for the Flash ROM 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 The following shows an example of a sequence program used to write the initialization data registration Example of writing the initialization data to the area having registration number 8001H XIE XIF i no X X3 1 _O i ni mo 7 MIO H WV K30 00 v 01 1 MOV ATE1QOV1 amp C18D28H 02 J 500 181086285050 1 D10 Item name Number of registration data bytes DO User control data D1 D2 Initialization command to D13 30 Data register nitialization command X1E Q series C24 ready signal X1F WDT error signal Turns the ready flag ON Data registration for initialization instruction Sets the number of reg
9. Eight characters of data in the transmission area are sent in two characters per byte through ASCII BIN conversion Data transmission area Programmable 5 arbitrary data section controller CPU side 3 411 21 B 5 6 343443140324 1H420354364 1 1 1 X50 Transmission instruction Programmable controller CPU OUTPUT Completion device Mo 1 LON menu 4 Abnormal Status display device completion at completion M1 T 1 Normal completion 1 gt scan 121 rd ASCII BIN conversion designation H 400 Transmission area B 00H 02H Designation of no of data sent 12344 401 Transmission data 124 348 56 402 ABH Buffer memory Transmission instruction 0004 in byteunits x50 1234 010 Sets the arbitrary transmission data for D11 to D12 Mov H5648 011 wove Dt Sets CH1 to the transmission channel wove D4 Sets the number of data sent to 2 GP OUTPUT us Di 010 Mo Execute the transmission wo 100 Sets normal completion flag wiol Sets abnormal completion flag 13 8 13 8 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 2 Example of transmission by user frame External device side s S8 6 E a 9 T ao 2 C24 Total number En iri 8 Eight characters of data Programmable xi 12915 1
10. 2 Abbreviations for dedicated instructions BIDIN BIDOUT BUFRCVS PRR Abbreviation for PRROrGPPRR o O 3 Generic terms and abbreviations for the manuals Generic term abbreviation Corresponding Serial Communication Module User s Manual Basic User s Manual Basic MA MELSEC L Serial Communication Module User s Manual Basic Operating Manual GX Configurator SC Version 2 Operating Manual Protocol FB support function Protocol FB support function Operating Manual Pre defined protocol support GX Configurator SC Version 2 Operating Manual Pre defined protocol support function function 4 Others Data communication function Generic term for MC protocol pre defined protocol nonprocedural protocol bidirectional protocol QCPU station Generic term for the programmable controller installed QCPU LCPU station Generic term for the programmable controller installed LCPU TERMS The following table lists the definitions and descriptions of terminology used in this manual Terminology One of the message formats for the serial communication modules which is used to perform ASCII data communication by MC protocol This is the same message format as the one used when communicating using the protocol for the A series computer link modules Device memory read write operations for the QCPU are allowed within the device range of the AnACPU A communication procedure for the serial communication mo
11. CS Send Possible 5 CD Receive Carrier Detect The Q series C24 stores the receive data RD Receive Data The contents of steps 4 and 5 below are different from those of item a 1 When transmitting data check the RS signal If the RS signal is OFF turn ON the CD signal If the RS signal is ON wait until it is turned OFF then turn ON the CD signal 2 After the CD signal is turned ON transmit the data 3 After data transmission is complete turn OFF the CD signal 4 The external device will continue to transmit data to the Q series C24 even if the RS signal is turned ON during data transmission Simultaneous transmission generated 5 After transmission from the external device is complete data is transmitted from the Q series C24 to the external device See 2 When using the DTR DSR transmission control function described in Chapter 7 transmit data from the external device to the Q series C24 as shown below in both cases a and b above When the series C24 signal is turned OFF terminate data transmission When the Q series C24 signal is turned ON after data transmission was terminated restart data transmission transmit from the terminated data 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 2 Timing when data is transmitted from the Q series C24 The Q series C24 RS signal is controlled and data is transmitted accordi
12. CSET instruction Instruction execution Completion device i Completion device 1 i i At abnormal completion Programmable controller CPU 1 Stores the data for programmable controller CPU monitoring registration in the device that designates the control data for the CSET instruction 2 Executes the CSET instruction At the end of the scan in which the CSET instruction was completed the completion device MO designated by D2 turns ON and then tums OFF at the next END processing 3 When there is an error D2 1 turns ON and the error code in stored in the completion status S2 1 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION a Example of a program for performing programmable controller CPU monitoring registration This example shows a program that registers programmable controller CPU monitoring for the CH1 side interface This registration is for transmitting the contents of MO to M15 and D100 to D109 to the external device using constant cycle transmission cycle time is 3 min M32 4 Uo KI DO 0200 wo M SET nt st M30 Converts registration command to pulses Sets execution type Sets request type programmable controller CPU monitoring registration Sets cycle time unit to minutes Sets cycle time to 3 min Sets the monitoring function to constant cycle transmission Sets the mean
13. External device E Arbitrary data Reception data E Arbitrary data side g p Ww Ww mm gt mm EDIT Equaling exclusive format 1 Equaling exclusive format 1 Hel received data count Ignored received data count Pattern No 1 E vw vw 5 5 External device Reception data v Reception start timing side 2 2 Receive complete timin read timing Programmable When exclusive format 1 controller CPU Ignored received data count is 0 side When data is received using Format 1 the Q series C24 checks again whether the first frame has been received after receiving data equaling the exclusive format 1 received data count Reception data during that time is ignored 11 12 11 12 11 DATA COMMUNICATIONS USING USER FRAMES Combination without the first frame Timing patterns for reception start and receive complete read Pattern No 2 A 1 Pattern No 2 A 2 Y v Y v o o 5 E External device Arbitrary data Arbitrary data side E 1 _ _ Programmene Equaling the received side data count Pattern No 2 A 3 Pattern No 2 A 4 wv v wv 2 5 2 External device Arbitrary data Arbitrary data eS side 5 2 6 2 S S t Programm us Arbitrary data Equaling the received Arbitrary data side data count Pattern No 2 B Y Reception start timing iB Receive complete timi
14. ON ON DTR signal Ready to receive OFF Not ready to receive Receive preparations complete Q series C24 Q series C24 OS area OS area Data storage 8448 Data storage 8448 bytes bytes 263 bytes 64 Vacant area Vacant area i ytes or more dA default default leas read complete from sequence program 7 2 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL b Specification of free OS area The limit of free OS area for data reception under the DTR DSR ER DR signal control is specified in GX Configurator SC s Transmission control and others system setting When it reaches the limit this status is notified to disable data reception The set values must satisfy the following condition Transmission control start free area Transmission control end free area 1 Transmission control start free area specification Address 2012 2112 Specifies available capacity in the OS area so that the full status is notified to disable the data reception DTR signal is OFF Transmission control start free area 64 to 4095 Default 64 2 Transmission control end free area specification Address 2013 2113 Specifies an available capacity in the OS area so that data reception is enabled by notification DTR signal is ON Transmission control end free area 263 to 4096 Default 263 Receive data clear described
15. Receive user frame designation First frame No designation OH No designation Receive user frame designation Last frame No designation User frame receive format Format 0 Format 0 designation Format 0 Format 0 OH No designation 1H or higher There is a designation In this setting only three combinations become valid Everything is set to Format 0 since the first frame is not designated Exclusive format 1 received data count designation Setting value for Format 1 This setting is not required since everything is set to Format 0 11 20 11 DATA COMMUNICATIONS USING USER FRAMES 11 3 Receive Program This section shows examples of the sequence program to read the reception data stored in the Q series C24 buffer memory to the programmable controller CPU when data including the user frame is received 11 3 1 Sequence program example In the program examples provided in this section data reception by the user frame are indicated based on the following 1 I O signals of Q series C24 Install series C24 in the position where the I O signal with QCPU is X YO0 to XIY1F 2 Interface for Q series C24 used for data communications with external device Use an RS 232 interface on the CH1 side of Q series C24 3 Intelligent function module switch settings Switch No Description Set value T value Evenoddparty
16. 8 INPUT Uo D160 061 SET M160 M161 RET D160 K2 D163 M160 N93 060 C61 M93 Ly Set the connection request signal _ With the initialization completed signal ON and the connected signal ON reset the request signal With the initialization connection abnormally completed signal ON _ read the error code and reset the request signal Set the transmission data Set the transmission channel on CH1 Set the transmission data count Execute the transmission request Transmission normally completed Transmission abnormally completed Set the data reception channel on CH1 Execute reading of receive data Reading of receive data normally completed Reading of receive data abnormally completed P 3 COMMUNICATIONS BY THE MODEM FUNCTION Line disconnection processing M72 4 Peis M74 4 Jp _ er 12 x10 X12 14 Ht Ht FROMP H21 0105 oU M73 X14 RT X14 RST Pg M74 Y12 M73 Y12 Modem disconnection request signal is set When the modem disconnection completion signal is ON the error code is read When the normal completion signal is ON the line disconnection completion flag is set Modem disconnection request signal is reset 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 Sample program for a connection receiving station side QJ71C24 R2 2 After the connection in progress signal
17. Fax 45 0 46 75 56 26 Fax 421 0 33 7735 144 8 12 1 chome Harumi Chuo Ku d Tokyo 104 6212 Beijer Electronics Eesti OU ESTONIA INEA SLOVENIA Phone 81 3 622 160 60 P rnu mnt 160i Stegne 11 Fax 813 622 160 75 m 1317 Lire 51 1000 Ljubljana Phone 372 0 6 518140 Phone 386 0 1 513 8100 MITSUBISHI ELECTRIC AUTOMATION Inc USA 372 967518149 Fax 386 0 1 5138170 500 Corporate Woods Parkway Vernon Hills IL 60061 Beijer Electronics OY FINLAND Beijer Electronics AB SWEDEN Phone 1 847 478 21 00 Jaakonkatu 2 Box 426 Fax 1 847 478 2253 FIN 01620 Vantaa SE 20124 Malm Phone 358 0 207 463 500 Phone 46 0 40 35 86 00 Fax 358 0 207 463 501 Fax 46 0 40 35 86 02 UTECO A B E E GREECE Omni Ray AG SWITZERLAND 5 Mavrogenous Str Im Sch rli 5 GR 18542 Piraeus CH 8600 D bendorf Phone 30 211 1206 900 Phone 41 0 44 802 28 80 Fax 30 211 1206 999 Fax 41 0 44 802 28 28 MELTRADE Ltd HUNGARY GTS TURKEY Fert utca 14 Bayraktar Bulvari Nutuk Sok No 5 HU 1107 Budapest TR 34775 Yukari Dudullu Umraniye ISTANBUL Phone 36 0 1 431 9726 Phone 90 0 216 526 39 90 Fax 36 0 1 431 9727 Fax 90 0 216 526 3995 Beijer Electronics SIA LATVIA CSC Automation Ltd UKRAINE Vestienas iela 2 4 B M Raskovoyi St 1V 1035 Riga UA 02660 Kiev Phone 371 0 784 2280 Phone 380 0 44 494 33 55 Fax 371 0 784 2281 Fax 380 0 44 494 33 66 Beijer Electronics UAB LITHUANIA MIT
18. HU H L Transmission data count c E Data section Send 0002 Receive data p ee count 0212 Ec c o 02 212 Transmission data receive Receive BCH data Communication of response massage Send K result reception result At normal completion 0000s At abnormal completion 1234 Q Conversion S P Receive 13 11 13 11 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 6 Example of Data Communication Using the Bidirectional Protocol 13 12 This section shows examples of data communication using the bidirectional protocol when the following settings and registrations are made 1 Settings via GX Developer Perform the following settings on the Intelligent function module switch setting screen Setting item Setting value Switch 1 CH1 Transmission ae ee el Set according to the CH1 Communication rate Communication rate setting external device Switch 2 CH1 Communication protocol setting 00071 Bidirectional protocol CH2 Transmission ae LS 0000 Switch 3 CH2 Communication rate CH2 Communication rate setting Switch 4 CH2 Communication protocol setting 0000 Station number of Switch 5 Station No setting 0000 senes C24 1 2 Settings via GX Configurator SC Register the following items on the
19. Sets CH1 to the reception channel Sets the allowable number MP K6 D3 of receive data to 6 G INPUT us 00 BIO MO Executes reception Sets the normal completion flag SET M100 Mt SET M101 When the receive transparent code designation is set to Enable and the ASCII BIN conversion is set to Disable the codes for receivable data and those for receive data that is stored in the buffer memory s reception area as follows Sets the abnormal completion flag Codes stored in the Receivable codes reception area Receive transparent code Additional code 01H to FFH Delete designation section Transparent code 00H to FFH OOH to FFH Arbitrary data section including complete code 00H to FFH 00H to FFH 12 9 12 9 12 TRANSPARENT CODES AND ADDITIONAL CODES 2 Receiving based on the completed data count Additional code 10H DLE transparent code 02H STX Completed data count Six words or 12 bytes Additional code Q series C24 deletes Head data Transparent code For word unit i 10 8 Ci L 0 1 2 U A E Received byte count excluding additional code 12 2 6 rEiX Li i RIF For byte unit External device side f Li 112344 Received byte count excluding additional code 12 30H 31 132 33H 10H 02H 00414 42 34 12H ODHOAHI 1 1 1 l Programmable controller CPU side Reception data read request Received data Pr
20. 1 When changing the no reception monitoring time timer 0 Find the result using the following expression and set the number of bytes or greater for the no reception monitoring time timer 0 Td x Vbps 12000 Round up fractions below decimal point No reception monitoring time timer 0 1 Td Maximum delay time for external device output processing ms Vbps Transmission rate bps Example Calculation of no reception monitoring time timer 0 Transmission rate Vbps 9600bps Maximum delay time for external device output processing Td 50ms 50 x 9600 No reception monitoring time timer 0 1 42000 41 bytes In this case actual monitoring time is as follows 41 bytes X 12 9600 x 1000 51 25ms 1 Number of transmit bits per byte Fixed 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2 When exchanging data with the external device through the Q series C24 RS 422 485 interface and changing the no reception monitoring time timer 0 Td T1 x Vbps 12000 Round up fractions below decimal point No reception monitoring time timer 0 1 Td Maximum delay time for external device output processing ms T1 External device side H W gate OFF time ms Vbps Transmission rate bps 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 2 Response Monitoring Time timer 1 Setting The response monitoring time timer 1 clears the receive wait state of the device tha
21. Manual Number 282 1999 SH Dec 1999 SH NA 080007 A Firstedition OO 080007 A First edition Oct 2000 SH NA 080007 B Add the contents of the function version B Put Windows base software products together from Mitsubishi Programmable Controller MELSEC series to Mitsubishi integrated FA software MELSOFT series Standardize the name from software package GPP function to product name GX Developer Correction Entire manual change MELSECNET 10H to MELSECNET H Contents About the Manuals About the Generic Terms and Abbreviations Section 1 1 1 2 POINT Section 2 1 2 2 1 2 2 3 2 2 5 22 6 2 3 1 2 3 2 Section 3 1 1 3 2 3 3 2 4 3 3 1 3 3 4 3 3 5 3 3 6 3 4 entire Section 4 3 Chapter 9 entire Chapter 11 entire Section 12 2 12 3 12 4 entire 12 6 entire Section 13 3 13 4 13 6 entire Section 15 3 Section 16 2 entire to 16 7 Section 2 4 9 Section 3 2 3 POINT Jun 2001 SH NA 080007 C Standardize the name from utility package QSCU to product name GX Configurator SC Correction About the Manuals The Manual s Use and Structure About the Generic Terms and Abbreviations Program example Section 9 4 1 9 4 2 9 4 3 Section 11 5 1 2 Section 16 5 16 6 16 7 Section 1 1 2 diagram 1 2 Chapter 3 entire Section 4 1 2 Section 9 1 1 4 5 Section 11 3 2 3 11 3 3 3 Section 13 6 1 diagram Addition Section 3 3 4 3 3 6
22. Not specified 1 to FFFFa Notification accumulated number count 8195 to 8198 TT 2003 to 20064 Use prohibited System area 3199 20071 Auto modem initialization specification n 0 No auto initialization 1 Auto initialization 8200 2008s Modem nttialigation time DR DSR signal gesignation 0 DR signal is not ignored 1 DR signal is ignored For modem Complete signal handling designation for modem function 8201 20094 function 0 Does not turn ON OFF from X13 to X16 designation 2 1 Turns ON OFF from X13 to X16 Wait time of notification No waiting time 8202 200A D 1 to FFFFu Wait time of notification Notification interval time Unit s 8203 2008 Use prohibited System area Remote password mismatch notification count designation 8204 200 No designation 1 to FFFFa Count for notification password Um 3 function Remote password mismatch notification accumulated count designation 8205 2000 No designation 1 to FFFFa Accumulated count for notification F d 8206 200Ex Circuit disconnect wait time programmable controller CPU watch use 0000 to FFF Wait time Unit s designation 3 3 COMMUNICATIONS BY THE MODEM FUNCTION Address Dec Hex Application Name Default Correspondence protocol value MC Non Bi 8207 200 Use prohibited System area 8449 to 8458 For callback Data No for callback designation 1 to 10 RW 21
23. User frame use enable disable designation Always specify Enable Receive user frame designation First frame No designation Receive user frame designation Last frame No designation Ou No designation 1 or higher There is a designation In this setting only three combinations become valid Format 0 The received data count becomes valid User frame receive format Format 1 designation Format 1 Exclusive format 1 received data count becomes valid Format 0 Exclusive format 1 received data count designation 2H For Format 1 11 19 11 DATA COMMUNICATIONS USING USER FRAMES b When the first frame is not specified In the example the following three combinations are registered for the receive user frame Setting conditions User frame 1st combination Last frame only 2nd Last frame only combination 3rd um Last frame only combination Setting value Setting item Received data count designation User frame receive format designation Format 0 Setting value Exclusive format 1 Remarks received data count The received data count becomes valid Remarks For Format 0 Receive complete code designation Designate any received complete code User frame use enable disable designation Always specify Enable
24. When changing the RS ER signals When signal changes are detected during the periodic processing Operation interval 1 to 19 ms as well as for the above timing Monitoring is not performed during the periodic processing 3 Monitor stop Monitoring stops if any of the following conditions are satisfied a Monitor stop by user instructions Monitoring stops if 0000 is written in the communication data monitoring specification area of the buffer memory Set by user b Monitor stop by the system when the monitor data area is full 1 The full stop specification bit 0 of the monitor option specification area of the buffer memory is set to ON 2 When the monitor data area is full monitor buffer size monitoring is automatically stopped and 1002 is written in the communication data monitoring specification area Q series C24 is set c Monitor stop by the system when the timer 0 error occurs 1 The timer 0 error stop specification bit 2 of the monitor option specification area of the buffer memory is set to ON 2 When the timer 0 error error code 7F40u occurs monitoring is automatically stopped and 10024 is written in the communication data monitoring specification area Q series C24 is set 1 Part of the data immediately after the occurrence of a timer 0 error may be entered in the monitor data area 16 3 16 USING COMMUNICATION DATA MONITORING FUNCTION 16 2 Communication Data Monit
25. output designation area 11 39 CSET instruction initial settings 17 16 CSET instruction programmable controller CPU monitoring register cancel 17 7 Cycle time sss 2 23 Cycle time units 2 23 Data communication using user frames 11 1 Delet eree 9 22 Readius A 9 21 Registering 9 20 Registration status storage area 9 19 Storage 9 19 inn i c 9 17 Data No for Callback designation 3 44 Data number for connection designation 3 38 Data number for initialization designation Data registration for modem connection 3 63 Index 1 Data registration for modem initialization 3 58 DC code transmission control 7 1 DC1 DQG3 ipee ere des 7 4 DC2 DGA 5 austell eee aie 7 5 Dedicated instruction list 17 1 Default registration frame 9 9 DTR DSR ER DR signal control 7 2 Exclusive format 1 received data count designation zen 11 18 F Format 0 and Format 1 reception method 11 9 Full duplex communications 8 1 G instruction 17 21 GX Developer connection 3 9 3 50 GX Developer
26. rbirary data section x in the transmission area i 0 8 t5 1 o S controller CPU side E 25 012DH 13 414 2 B 5 6 are sent in two characters 10 pog per byte through 02 51 OAH 00H 3BH54H4FH54H41H4CH3BH 2Du 01 33 34 31 32 41 42935 ATH ASCII BIN conversion A T A ae A A A Register No of Corresponds to 3F2u Corresponds to Corresponds to 80014 80004 Corresponds to 41 corresponding user frame for first designated frame for second designated for third designated for fourth designated for fifth designated frame frame frame frame Transmission instruction X50 User frame No being transmitted Do not send CRI Programmable R LF output designation controller CPU 181 Output head pointer designation Completion device MO ON I a Output count designation 4 Abnormal 5H tatus display device i at 1 cor BAH Transmission frame no designation 1st Normal completion BB 2nd NEM Dom One scan BC 3rd 4th BDH 80001 5th BEH he 121 Convert 1 ASCII BIN conversion designation 400 FFA Transmission area 00H 02H Designation of no of data sent 12344 401 124 4 Transmission data 56 56H ABH Buffer memory 402u 00044 in byte units Transmission instruction x9 move Di
27. ylz Ve we Wi FROMP H221 D105 KI completion signal is ON the error code is read J _ Line disconnection completion flag 2 Ko ptos SE is set upon normal completion Performs error handling when D105 is SE N72 other than 0 error code is s T Modem disconnection request signal RS Yi2 is reset X14 RS Lr RST M72 RS N79 X12 Line disconnection processing PLF M76 Line disconnection from external device M76 12 RS Y10 Various request signals are reset RST Yu When any connection signal or n completion signal is ON the modem disconnection request signal is set M77 When the modem disconnection Y12 completion signal is ON the request signal is reset w7 When the modem disconnection completion signal is OFF the line disconnection request signal is reset 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 5 Sample Programs This section shows sample programs to test the connection with the remote station s programmable controller CPU to which Q series C24 is installed Each program contains a minimum set of processing necessary for performing a exchange test Modify the data for initialization and data for connection to match each system environment When adding error handling procedures add them separately by seeing the explanation in this chapter The uses of major devices that are used in these sample programs are listed below Application of device comment list Application Applicat
28. 2 Switch 1 i Matched with the Gmwunsonraessing 180088 switch2 Communication protocol setting Nonprocedural protocol 00061 Switch 3 ee ees Station number setting No 0 station 0000H 4 Buffer memory settings for the examples For other than below default values are used Example 1 shows the GX Configurator SC setting For settings refer to Section 11 2 4 shows the setting by a sequence program H ADu User frame use enable disable designation 14 Enable a Example 1 3E8x 174 AEn First frame No designation 1 Example 2 8001 Example 1 9 nd 1 175 AFH First frame No designation 2 Example 2 80228 2 80029 176 BOx First frame No designation 3 177 1 First frame No designation 4 E 1 41 st 1 178 2 Last frame No designation 1 Example 2 8081 2 80051 179 Last frame No designation 2 OrNoe None 180 4 Last frame No designation 3 181 B5u Last frame No designation 4 Continued to the next page 11 21 11 21 11 DATA COMMUNICATIONS USING USER FRAMES 8224 20201 User frame receive format designation 1 Format 0 8225 2021 User frame receive format designation 2 1 Format 1 8226 2022 User frame receive format designation 3 1H Format 1 8227 2023 User frame receive format designation 4 1H Format 1 8229 2025 Exclusive form
29. 3 Registration using the programmable controller CPU CSET instruction Detailed explanation is found in Chapter 17 2 When this function is used with the modem function and data is transmitted or a notification message is notified as a programmable controller CPU monitoring result register the connection data for the modem function on the PLC CPU monitoring system setting screen of the GX Configurator SC 3 registering the data for using the above programmable controller CPU monitoring function the Q series C24 begins monitoring the programmable controller CPU 2 2 2 Programmable controller CPU monitoring information This section explains the monitoring target information used to execute the programmable controller CPU monitoring function 1 The following information can be registered as the target of the programmable controller CPU monitoring function 1 Device monitoring for the local station s programmable controller CPU Monitoring of the numeric values stored in the word device Monitoring of the bit device ON OFF status 2 Monitoring of the local station s programmable controller CPU status 2 In monitoring word and bit devices a maximum total device point value of 960 equivalent to a maximum of 15360 bits for only bit devices or a total of 10 blocks when any continuous device range comprises one block can be registered Since monitoring of the local station s programmable controller CPU status will al
30. 48 30s Number of connection retries designation 1 to 5 Number of retries 49 31 Connection retry interval designation 90 to 300 Connection retry interval unit s 2 E 99 EE Initialization connection timeout designation 1 to 60 Time out unit s Number of initialization retries designation 1 to 5 Number of retries 50 w N ES 51 334 Data number for initialization designation Sends initialization data designated by the transmission user frame designation area A 7D01 to 801 Data No for initialization designation 1 Data number for connection designation to 801 Data number for connection When using Q series C24 GX Developer connection designation 52 34 For modem 53 35x 0 Does not connect 1 Connects When using L series C24 MELSOFT connection designation 0 Does not connect 1 Connects No communication interval time designation 0 Waits infinitely 1 to 120 Non communication interval time Line disconnection wait time Unit min RS CS control yes no designation 0 Does not control 1 Controls 3 COMMUNICATIONS BY THE MODEM FUNCTION Address Dec Hex T Default Correspondence Application Name value protocol mc Non Bi 57 to 127 39uto 7F 4 Use prohibited System area For programmable controller CPU information clear Programmable controller CPU information clear request 0000 No request 128 80 Ck 1
31. External line dialing 2 Line types 2 Open 20 Wait time for Message transmission 2 Message 30 Message length 2 Open 2 Data name number of bytes 3 COMMUNICATIONS BY THE MODEM FUNCTION Data for connection area 44 bytes Designated stored value and contents Number of bytes Data type Whether or not notification is performed and the notification target module are designated Pager receiver 0 No notification 3 Notification performed In the case of 3 above the wait time for message transmission in the notification message must be designated The other party s phone number used to establish line connection when communicating data or performing notification is designated When phone number is less than 18 characters a space code 20 must be entered for the remainder The external line access number on Q series C24 side when performing data communication notification to the partner device is External line dialing number 10 External line access number on series C24 side 11 255 No external line access number required on the series C24 side The line type used to perform data communication notification with the partner device is designated Line type 0 Pulse 1 Tone 2 ISDN Open Designate 0 Notifying message area 36 bytes Designated when performing notification Designated stored value and conten
32. For synchronous setting For details of the CHL transmission specifications setting CHL communication protocol setting and station No setting refer to User s Manual Basic 17 34 17 34 17 DEDICATED INSTRUCTIONS 1 For information about errors caused by incorrect data designated by the user see the description in Errors on the next page 2 The Set by column indicates the following e User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction Functions 1 This instruction changes the transmission specifications communication protocol and host station No of each channel of the Q series C24 specified by Un 2 Execution of the UINI instruction changes the following buffer memory settings to enable communication with the new settings When module is When UINI instruction When mode by Decimal iene eee Application mode switching request signal started up is executed Y2 Y9 Refer to Chapter 15 GX Developer set value Set value changed by 591 24 Station No instruction setting UINI instruction NU GX Developer set values Communication protocol status 592 2504 608 2604 GX Developer set switch setting Vales GX Developer set Transmission setting status values 593 2511 609 2614 switch setting 512 200 Sta
33. H t i 419 1st Completion device MO None JON ____ 4 Abnormal 3 EL k completion i v 2nd Status display device 1 Y E None at completion wat S 4 Normal completion 1 i 4th 1 scan a 420 YES Receive transparent o de designati 1002 code designation 5 121 Disable ASCII BIN conversion User frame receive 0 designation 2020 format designation 25 Receive ud frame g DO On 1st Format 0 ul Cith 600 Receive dat t3 2021H On 2nd Format 0 00H 06H evens ata count To 53 1 0 Receive data 601 arbitrary data 2022 3rd Format 1 i 1 _ 30H E T 4 2 To D10 6024 On 4th Format 1 334 32H or after Exclusive Format 1 603 A STX 2024 received data count 41u 02H m 604u C B 2025H On 2nd 43u 42H 12344 605 2026 n 12H 34H LF CR 2027H th 6061 J Buff Reception data read request Buffer memory ne x83 m FROMP H8 H258 DO 1 bisce iM of user frames MOVP Ki DI Sets CH1 to the reception channel Sets the allowable number of reception MovP K6 04 data to 6 G INPUT us 01 010 MO Executes reception Ml M100 Sets the normal completion flag ul M101 Sets the abnormal completion flag 11 33 11 33 11 DATA COMMUNICATIONS USING USER FRAMES 11 4 Data Transmission This section e
34. e Modem disconnection request signal is set e When the modem disconnection completion signal is ON the error code is read e When the normal completion signal is ON the line disconnection completion flag is set Modem disconnection request signal is reset Subroutine resetting various request signals and completion signals Various request signals are reset e When any completion signal is ON the modem disconnection request signal is set When the initialization complete signal is OFF and the modem disconnection completion signal is ON the request signal is reset When the related signals are OFF the flag is reset 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Sample program on the connection reception station side The modem initialization and data communication by the non procedure protocol are executed by commands from the user Before executing this program perform the following settings changing the default values on the GX Configurator SC s Modem function system setting screen and register them in the Q series C24 Settings other than the items shown below are not required Settings on the GX Configurator SC s Modem function system setting registration screen Setting item E value Modem connection channel designation No communication interval time designation Data No for initialization designation om 3 COMMUNICATIONS BY THE MODEM FUNCTION MO Accessible flag is turne
35. y Data communications with programmable controller CPU Slave station p 4 external device m 1 Data communications with programmable controller CPU The following uses an example to describe the procedure when external devices communicate data with the programmable controller CPU In this example after the start of data communications between external devices and the programmable controller CPU the external devices perform a maximum data communications time time out check Slave station external devices that are not communicating data with the programmable controller CPU check if the external device that completed data communications with the programmable controller CPU transmitted a communications complete report In the following descriptions the external device with the lowest station No 1Bu is assumed to be the master station and the other external devices are assumed to be slave stations External device that obtained the line usage right Master station Before 2 after 2 External device External device External device External device Station No 1Bu Station No 1Cu Station No 1Dx Station No 1Ex 1 Station No 1H Station No 2u Station No 15u CPU CPU ES E C24 Q series C24 QC24 N UC24 14 9 14 9 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 1 A slave station
36. 0 1 a Completion device Turns on at the END processing of the scan where the PRR instruction is completed and turns off at the next END processing b Status display device at completion Turns on and off depending on the completion status of the PRR instruction Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the PRR instruction is completed and turns off at the next END processing 17 25 Errors 17 26 17 DEDICATED INSTRUCTIONS Operation when the PRR instruction is being executed completion END END END END Sequence processing processing processing processing program PRR instruction Completion of transmission execution PAR by the PRR instruction PRR instruction j OFF T 1 Abnormal Status display OFF device at completion Normal completion When the dedicated instruction is completed with an error the status display device at completion D 1 turns on and the error code is stored in the control data transmission result S1 1 See the following manuals regarding the error code and check the errors and take corrective actions Error codes 4FFFHorless User s manual hardware design maintenance and inspection for the CPU used 7000 or higher User s Manual Basic 17 26 Program example 17 DEDICATED INSTRUCTIONS A p
37. 0163 M91 M160 M103 M165 M166 M166 M165 M91 M56 RET Y10 Y12 M83 Y12 K1M3 M7 M32 K1M100 M83 M82 RET 3 102 Data reception processing subroutine Sets the data reception channel to CH1 Sets the data setting completion flag for reading the receive data Executes the receive data reading Receive data read execution flag is set Receive data normal completion Receive data abnormal completion Resets subroutine of various request Signal and complete signal Various request signal is reset When any complete signal ON the modem disconnection request signal is set When the initialization complete signal OFF and the modem disconnection complete signal ON the request signal is reset When the relation various signal OFF the flag is reset 3 102 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 5 3 Sample program for notification 3 103 Modem initialization and notification are executed by commands from the user Before executing this program perform the following settings changing the default values on the GX Configurator SC s Modem function system setting screen and register them in the Q series C24 Settings other than the items shown below are not required Settings on the GX Configurator SC s Modem function system setting registration Screen Setting item Setting value Modem connection channel designation Notification exe
38. 100 ms units truncated Under the following conditions the transmission monitoring time timer 2 is set to 300 ms Transmission rate 9600 bps Number of transmit bits byte 11 start bit 1 data bits 8 stop bits 2 Maximum processing delay time 200 ms Transmit byte count 3 bytes 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 4 Message Wait Time Setting The message wait time is used during data communications using a MC protocol It is the time for an external device that cannot receive the data immediately after it has been transmitted When the Q series C24 transmits a response message in reply to a command message received from the external device transmission of the response message is delayed by the message wait time or longer The following explains the message wait time operation for data communications using QnA compatible 2C 3C 4C frame For A compatible 1C frames the message wait time is designated in the command message External device message Programmable Response controller CPU Message wait time 1 Q series C24 operation by message wait time 1 When message wait time is 0 ms If a response message can be transmitted the Q series C24 immediately transmits the response message A transmission wait time is not set 2 When the message wait time is 10 ms or longer If a response message can be transmitted and the message wait time after reception of the command mess
39. 15 4 Switching the Mode from the Programmable Controller CPU This section shows how the Q series C24 mode is switched from the programmable controller CPU 15 4 1 Mode switching procedure The following explains the procedure for switching the Q series C24 mode from the programmable controller CPU x1 Mode switching request 2 9 Mode switching in progress X6 XD gt Approx 400 ms pem ERR communication error XE XF Q series C24 ready X1E Mode switching area address 90 to 91 130 to 1314 Switch setting error mode switching error storage area address 2034 Buffer memory special applications area Data communications initialization setting areas described in User s Manual Basic Addresses 93h to 1214 133u to 1 1 Data communications possible Default value change Performed only when necessary 3 Data communications possible Data communications impossible 1 Inform in advance all the connected device that data communications by mode switching cannot be performed 2 When XE and were turned on check the error contents as described in the User s Manual Basic and take the corresponding action Checking of mode switching designation contents for buffer memory mode switching area and writing of mode switching designation contents within the range that can be designated Re execution of mode switching 3 After ch
40. 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 4 Compatibility with the callback function The following describes the Q Series C24 callback function that can be used when accessing the QCPU from the GX Developer connected to the Q Series C24 1 About the Callback function a What is the Callback function The callback function is a function that makes it possible to access the QCPU from the GX Developer by reconnection callback of the line from the Q Series C24 Transmission costs after line connection from the Q Series C24 side are borne by the Q Series C24 side b Settings in order to use the callback function The callback function can be used by setting it through the GX Configurator SC then registering it in the Q Series C24 See 4 c Selecting the callback destination GX Developer The GX Developer that can be called back in accordance with the settings in the Q Series C24 can be selected as shown below 1 Ifthe callback destination GX Developer is fixed 1 module Callback connection during fixed Connection can be made to only the fixed GX Developer 1 module registered in the Q Series C24 2 Ifit is being made possible to change the callback destination GX Developer Callback connection during designated number It is possible to connect to the GX Developer when the callback destination telephone number Call number is specified 3 Ifthe maximum number of callback destination GX Developers is limited to 1
41. ABH 12H 03H 0132H _ 2 are transmitted and received beginning from 3 In the case of the example Range 2 H L 02H OOH 41H 31H ABH 12H 03H 016 Register code Data contents transmitted and received arrangement FFH F4H 01H and 6FH are transmitted and received beginning from 6FH FFH F6H 6FH is transmitted and received FFH F7H 6 and F are transmitted and received beginning from 6 FFH F9H F is transmitted and received 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 6 Transmission reception data corresponding to register code FFH E5H The sum check code resulted from the calculation of the transmission reception data message codes except the first one frame and last one frame is expressed as the ASCII code data and transmitted or received How to calculate the sum check code Lower one byte of the sum check value calculated is converted into 2 digit ASCII code data and used for data transfer Example Arrangement of data when received User frame First frame User frame Last frame Arbitrary data User frame register dde 2 03H 5 1 E Sum T check Station x40 Read data Transmission gt reception data code Calculation range i 30 31 31 37 37 30 130 7 Transmission reception d
42. However simultaneous execution is available when channels to be used are not the same x e Dedicated instructions simultaneous execution error 7FFOu occurs in the dedicated instruction attempted later Available X Not available 17 18 17 DEDICATED INSTRUCTIONS 4 Whether the CSET instruction is being executed or has been completed normally abnormally can be checked with the completion device D2 designated by the setting data a Completion device D2 0 Turns on at the END processing of the scan where the CSET instruction is completed and turns off at the next END processing b Completion device D2 1 Turns on and off depending on the completion status of the CSET instruction Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the CSET instruction is completed and turns off at the next END processing Operation when the CSET instruction is being executed END END END Sequence program Scan processing Scan processing Scan processing 1 1 Instruction execution CSET instruction Completion device Completion device fI icq eae ge ees a as c Abnormal completion Q series C24 2 a s Q n o Errors When the dedicated instruction is completed abnormally the error flag SMO turns on and the error code is stored in SDO See the following manuals regarding the
43. MITSUBISHI ELECTRIC MELSEC Q L series Programmable Controller User s Manual Serial Communication Module QJ71C24 N R2 R4 LJ71C24 R2 Art no 130025 01012010 A MITSUBISHI ELECTRIC INDUSTRIAL AUTOMATION SH NA 080007 Version M e SAFETY PRECAUTIONS e Read these precautions before using this product Before using this product please read this manual and the relevant manuals 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 user s manual of the CPU module to use In this manual the safety precautions are classified into two levels N WARNING and IN CAUTION i gt age A WARNING Indicates that incorrect handling may cause hazardous conditions resulting in death or severe injury A CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in minor or moderate injury or property damage i i a i a ff a a a a Se as s s ee es ts a ee Under some circumstances failure to observe the precautions given under CAUTION may lead to serious consequences Observe the precautions of both levels because they are important for personal and system safety Make sure that the end users read this manual and then keep the manual in a safe place for future reference N 1 When using the MELSEC
44. Notification X15 OFF normal completion Notification X16 abnormal completion Notification S Te Y14 amp issued request RS 232 CD terminal OFF Dial H Dial H Dial H Dial Dialing Retry In the case of three times Retry processing is conducted according to the values for the connection retry number to initialization connection timeout registered in the initial setting for GX Configurator SC 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 Precautions for performing data communication and notification a When communicating data with the external device 1 When setting the no communication interval time to infinite wait set value 0 in the initial setting of Q series C24 be sure to perform line disconnection after the completion of data communication 2 Only the no procedure protocol bidirectional protocol data communication can be performed in the programmable controller CPU with Q series C24 installed 3 The Q series C24 automatically performs line disconnection processing if no data exchange is performed during the no communication interval time The connection in progress signals X12 and initialization complete signals X10 turn off b When notifying to pager receivers 1 Turn on the notification issued request signal Y14 before the Q series C24 modem TA initialization is completed 2 Notification processing is conducted when the notification
45. There are two transmission methods for transmitting and notifying the monitoring results of the local station programmable controller CPU to the external device These include constant cycle transmission and condition agreement transmission One of these methods must be selected by the user during programmable controller CPU monitoring registration 1 Constant cycle transmission The monitoring results are transmitted and notified each time monitoring information is read from the programmable controller CPU Timing to transmit data Monitoring information One block portion gt External device One block portion AS A S ES D END END END END 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 Condition agreement transmission a For device monitoring the monitoring conditions registered by the user conditions for sending monitoring results the monitoring condition values and the monitoring information read from the programmable controller CPU are compared The monitoring results are sent or notified when there is a block where the monitoring conditions match For programmable controller CPU status monitoring the monitoring results are sent or notified only once when an error is detected for the first time from the status information read from the programmable controller CPU This corresponds to the edge triggered transmission noted below b Two transmission methods o
46. disconnected completion Notification normal Indicates the normal completion when performing the notification processing to the completion destination 1 Indicates abnormal completion when the notification processing is performed with Notification abnormal the destination completion 2 Check the cause of the abnormal completion in the modem error code storage area address 2214 and remove the cause ii Section 3 4 7 1 Indicates the initialization request to the modem connected to the local station Q series C24 request standby MEN e Section 3 4 5 request 2 Turn on the initialization request signal after designating the initialization data to the u buffer memory when it is not set with GX Configurator SC Modem initialization 1 Indicates the connection request dialing to enable data communication with the destination 2 Turn on the connection request signal after designating the data for connection to Connection request the buffer memory when it is not set with GX Configurator SC Section 3 4 6 3 If the modem TA connected to the local station is not initialized the Q series C24 side modem is initialized as well prior to dialing according to the initialization data designated Modem Indicates line disconnection request from the partner side upon completion of data disconnection mM Section 3 4 8 communication request 1 Indicates the notification request to the partner side 2 T
47. n 11th 1 4001 Transmission area 6 00H 04H transmission data count designation 5 12th 1234 8004 401 42u 34u transmission data 7 4 I C6 13th aan 66ABn 418 56 Se 14th B 1 0002 for word unit Buffer memory Transmission instruction X50 PLS N50 M50 X9E X9F A v DO H1234 D1 Sets arbitrary transmission data in D1 to D2 H56AB 2 Sets arbitrary transmission data in the transmission area H400 Do K3 Sets CH1 to the transmission channel Mov Ki 11 H1 14 Sets the output head pointer s H5 D15 Sets the output head count G PRR Ug 11 MO Executes transmission Mi Mt SET M100 Sets normal completion flag SET M101 Sets abnormal completion flag 11 42 11 42 Transmission instruction X50 11 DATA COMMUNICATIONS USING USER FRAMES 2 Example of a sequence program when setting is not done using the GX Configurator SC The following is the method of data transmission without performing the transmission frame No designation using the GX Configurator SC For further details on the PRR instruction see Chapter 17 of this manual PLS M50 M50 X9E X9F pp iy bo 1 fo H1234 D1 Sets arbitrary transmission data H56AB D2 1 ro H8 H400 DO K3 1
48. number of bytes is stored when byte is designated and the number of words is stored when word is designated 1 For information about errors caused by incorrect data designated by the user refer to Errors described later When a reception error occurs the error code can be read from the data reception result storage area address 258 268 in the buffer memory 2 The Set by column indicates the following e User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction 17 3 17 3 Functions Errors 17 4 17 DEDICATED INSTRUCTIONS 1 This instruction stores data received from an external device to a designated device 2 This instruction can identify the address of the reception area in the buffer memory and read relevant receive data 3 When this instruction is executed reception is completed and the reception data read request signal X3 XA or the reception abnormal detection signal X4 XB is turned off automatically It is not necessary to turn on the reception data read completion signal 1 8 when receive data is read by this instruction 4 The BUFRCVS instruction is used by an interrupt program and its processing is completed in one scan Operation when the BUFRCVS instruction is being executed Ie Scan _ Sequenceprogam processing Interrup
49. then make line connection When the Series C24 callback processing is completed normally the line connection signal X12 is in the ON state See the GX Developer s Operating Manual for details of the line connection screen from the GX Developer when using the callback function 3 Cautions during data communications a Setthe GX Developer side modem which the Q Series C24 is to reconnect to callback on with Auto Reception With Auto Reception This setting enables line connection from the external device b When a request is issued for a line connection from another GX Developer during a temporary line disconnection from the GX Developer side by callback processing the Q Series C24 executes a callback operation for the latter connection request The Q Series C24 terminates callback processing to the GX Developer that it received a connection request from earlier c If you are making a line connection to the GX Developer by the following connection system select callback reception waiting as the connection system for the GX Developer that the Q Series C24 is reconnecting to callback and make the connection Callback request during fixed during designated number Example In the case of line connections with Callback request during designated number as the connection system Setting of callback function designation settings by the GX Configurator SC Select Callback request
50. 1 1 y w 070 4 0 110 0 210 0 0 3 M 0 0 000j 0 00 1 1 1353 0 i i 57 2 30H 30H 31H 30H 34H 30H 30H 31H1 308 32H 130H 40 2 30H 30H 30H 0 30H 30H 30H 30H 31H 33H 30H 31H 31H W100 W101 W102 w103 i ee 1 1 3 0 0 o 1 1 o ojo o o o o 1 0 0 O 1 MMMMMMMMMMMMMMMM 1111110000000000 5432109876543210 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 3 Notification to the interface side using the modem function a The notification message text string data contained in the user registered data for connecting the modem function is conveyed using the modem function The device information and the CPU status information read from the programmable controller CPU are not sent to the external device in the notification message Include the device information and the CPU status information by which the programmable controller CPU status can be checked in the preregistered notification message b The method for message notification is functionally the same as the notification using the modem function described in Chapter 3 The difference is that notification is performed with Y14 OFF when using the modem whereas for notification using programmable controller CPU monitoring notification is performed for whenever th
51. 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 2 User Frame Types and Registration Data communications using user frames can be performed by registering the user frames to the Q series C24 from an external device and the programmable controller CPU Chapter 9 explains the types of user frames and the data that can be used To register a user frame from the programmable controller CPU refer to Chapter 9 To register a user frame from an external device first refer to Chapter 9 and check the precautions etc then register the user frame with the function described in the MELSEC Q L MELSEC Communication Protocol Reference Manual 10 3 User Frame On Demand Data Transmission and Buffer Memory Used This section describes user frame on demand data transmission processing and the on demand data list by user frame setting to the Q series C24 buffer memory 1 Transmission of on demand data using user frames The following describes the transmission of on demand data using user frames 1 Programmable controller CPU processing Before issuing a transmission request to the series C24 set the No of the user frame registered in the Q series C24 to the buffer memory shown in the table below Except for the above the programmable controller CPU execution procedure and control procedure are the same as transmitting on demand data without user frames described in the MELSEC Q L MELSEC Communication Protocol Reference Manual 2 Ex
52. 32 33 34 31 32 30 44 30 41 02 04 1 L I L 1 1 1 L L 1 I 1 I 1 p a Programmable controller CPU side Exclude the additional code and set to an even byte Two bytes of receive data are read to the programmable controller CPU as one byte data Reception data read excluding the additional code request X83 Data length No of receive data Excluding additional code For word unit Byte count after ASCII BIN conversion 8 2 4 For byte unit Programmable controller CPU Completion device MO ON Abnormal Byte count after ASCII BIN conversion 4 kc i Status display device M1 Completion at completion Normal The following diagram is for word unit i completion One scan Data length 8004 03 6014 ga D10 02 602 424 41H i 42 41H Data section gt 6034 aay D 2 424 604 013 oA Buffer memory Sequence program device memory Transmission instruction 83 Sets 1 to the reception channel Sets the allowable number of receive data to 6 G BIDIN Di 010 Executes reception SET M100 Sets the normal completion flag Mt 101 Sets the abnormal completion flag 1 When the receive transparent code designation is set to Enable and the ASCII BIN conversion is set to Enable the codes for receivable arbitrary data section and th
53. 922 1824 French Branch Phone 32 0 2 717 64 30 Phone 31 0 180 46 6004 Fax 972 0 3 924 0761 25 Boulevard des Bouvets Fax 32 0 2 717 6431 Fax 31 0 180 44 23 55 TEXEL ELECTRONICS Lid ISRAEL F 92741 Nanterre Cedex Koning amp Hartman b v BELGIUM Koning amp Hartman b v NETHERLANDS 9113 ymanut P 0 B 6272 Phone 33 0 1 55 68 55 68 Woluwelaan 31 Haarlerbergweg 21 23 11 42160 Netanya Fax 33 0 1 55 68 5757 BE 1800 Vilvoorde NL 1101 CH Amsterdam Phone 972 0 9 863 39 80 MITSUBISHI ELECTRIC EUROPE B V IRELAND Phone 32 0 2 257 02 40 Phone 31 0 20 587 76 00 Fax 4972 0 9 885 2430 Irish Branch Fax 32 0 2 2570249 Fax 31 020 587 7605 CEG INTERNATIONAL LEBANON Westgate aa Ballymount d o o BOSNIA AND HERZEGOVINA Beijer Electronics AS NORWAY Center Block A Autostrade DORA Phone 353 0 1 4198800 Aleja Lipa 56 Postboks 487 Lebanon Beirut Fax 353 0 1 4198890 BA 71000 Sarajevo N0 3002 Drammen Phone 961 0 1 240 430 Phone 4 387 0 33 921 164 Phone 47 0 32 24 30 00 Fax 961 0 1 240 438 MITSUBISHI ELECTRIC EUROPE B V ITALY Fax 387 0 33 524 539 Fax 47 0 32 84 85 77 eue AKHNATON BULGARIA Sirius Trading amp Services srl ROMANIA 200 Me Brianza MB 4 Andrej Ljapchev Blvd Pb 21 Aleea Lacul Morii Nr 3 Phone ki 039 6053 1 BG 1756 Sofia R0 060841 Bucuresti Sector 6 AFRICAN REPRESENTATIVE Phone 359 0 2 817 6004 Phone 40 0 21 430 40 06
54. Basic 17 1 Dedicated Instruction List and Available Devices 1 Dedicated instruction list The following table lists the dedicated instructions explained in this chapter T Dedicated Reference Application Functional description instruction section Receives data by an interrupt program during data BUFRCVS 2 communication via the non procedure protocol or Section 17 2 m A bidirectional protocol Data transmission reception Employs user frames to perform data communication via the non procedure protocol according to the contents Section 17 6 defined in the transmission user frame designation area Setting the units of Sets the units word byte of transmission reception data Section 17 4 communication data count count CSET Registers cancels programmable controller CPU monitoring in order to use the programmable controller Section 17 3 CPU monitoring functions Registration reading of user Registers a user frame Section 17 7 Mod itchi UINI Changes the mode transmission specifications and host Section 17 8 station No of the Q series C24 The user should not change data control data request data etc designated by dedicated instruction until the execution of that instruction is completed The programmable controller CPU monitoring function 1 To change the following values preset in the buffer memory for use of dedicated instructions u
55. Data reception during communication using the bidirectional protocol This chapter explains a case in which data reception using the following data communication functions is performed with an interrupt program External device transmission Q series C24 Programmable Interrupt program controller CPU execution SM400 BuFRcvs Receiving data with an interrupt program expedites data reception by the programmable controller CPU 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4 1 Settings for Receiving Data Using an Interrupt Program The following explains the settings for performing data reception with an interrupt program during communication using the non procedure protocol or bidirectional protocol 1 Setting by GX Developer The following settings are performed with the interrupt pointer No of module screen The interrupt pointer number and quantity quantity is fixed at 2 for the programmable controller CPU used for the Q series C24 Assigning correspondence between the programmable controller CPU interrupt pointer number and the Q series C24 control number fixed at 0 Setting by GX Configurator SC Perform the following settings in the transmission control and other system setting screens Specify Interrupt issued in Receive interrupt issued designation To start the interrupt program the settings of the Interrupt pointer No of module in GX Developer and the System settin
56. Error ON completion Status indication OFF device at 7 Normal completion completion Onescan Mode switching OFF signal X6 XD Q series C24 Setting processing Communication disabled 1 1 i 1 T 1 1 1 i 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Errors When the dedicated instruction is completed with an error the status display device at completion D 1 turns on and the error code is stored in the control data transmission result S1 1 See the following manuals regarding the error code and check the errors and take corrective actions Error codes 4FFFHorless User s manual hardware design maintenance and inspection for the CPU used 7000 or higher User s Manual Basic 17 36 17 36 17 DEDICATED INSTRUCTIONS Program example The settings of the series C24 installed in the position of I O No X YOO to X Y1F are changed as indicated below when X20 is turned on Device Bi Description Set value Position Specified value Operation setting Independent Data bit 8 bits Parity bit specifications Stop bit 1 bit 07E6n setting Sum check code Yes Write during RUN Allowed Setting modifications Allowed Communication speed b8 to b15 19200bps setting S 4 a CH1 communication protocol setting Synchronous setting 0008 Operation setting iat ae EE Data bit Parity bit sjon Everodd parity O S 5 specif
57. Example Arrangement of data transmitted and received with the register code 17 one first frame and one last frame User frame Arbitrary data first frame User frame last frame User frame register code 02 FFx 0143Bu T S Station No 1 2 3 4 Transmission reception 31413241334 344 data code 00x 0341 17 00 E C d wo s complement sum check code DoF 1 0341464 36 0 0 Calculation range How to calculate the two s complement sum check code The lower 1 byte of the value obtained by adding the subject data as binary data is converted to a two s complement then converted to a hexadecimal ASCII code In the case of the example 02 00 3 31 32 33 34 03 10 Data in the subject range are added as binary data hexadecimal 00001010 The lower 1 byte of the above numeric value is expressed as a binary number 11110110 Reversed then converted to a two s complement T Rue Converted to a hexadecimal ASCII code E 6 46 36 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 5 Transmission reception data corresponding to register codes to FFH F9H The sum check code that calculates the subject range for transmission reception data message is expressed as the binary code ASCII code data shown below then transmitte
58. Fax 39 039 60 53 312 Fax 359 0 2 97 44061 Fax 40 0 21 430 40 02 CBI Ltd SOUTH AFRICA EUROPE B V POLAND INEA CR d o o CROATIA Craft Con amp Engineering d o o SERBIA private bag 2016 Dane Pone Losinjska 4a Bulevar Svetog Cara Konstantina 80 86 Krakowska 50 HR 10000 Zagreb SER 18106 Nis Phone 27 0 11 977 0770 Pie TIT Phone 385 0 1 36940 01 02 03 Phone 381 0 18 292 24 4 5 Fax 27 011 977 0761 m mcs CZECH REPUBLIC ien SERBIA utoCont C S s r o 0 0 Hbri ee EUROPE B V SPAIN Technologick 374 6 Izletnicka 10 N Ri 76 80 2 708 00 Ostrava Pustkovec SER 113000 Smederevo E 08190 Sant Cugat del Vall s Barcelona Phone 420 595 691 150 Phone 381 0 26 617 163 Phone 902 131121 34935653131 Fax 420 595 691 199 Fax 381 0 26 617 163 Fax 34935891579 B ELECTRIC s r o CZECH REPUBLIC AutoCont Control s r o SLOVAKIA Mladoboleslavsk 812 Radlinsk ho 47 uM ELECTRIC EUROPE B V UK 2 197 00 Praha 19 Kbely SK 02601 Dolny Kubin TravellersLan Phone 420 286 850 848 420 724 317 975 Phone 421 0 43 5868210 UK Hatfield Herts 110 8XB far 420 286830 850 Fax 421 0 43 5868210 Phone 44 0 1707 27 61 00 Beijer Electronics A S DENMARK MTrade Slovensko s r o SLOVAKIA Fax 44 0 1707 27 86 95 d 1 Vajanskeho 58 DK 4000 Roskilde SK 92101 Piestany MITSUBISHI ELECTRIC CORPORATION Phones 45 046 75 76 66 Phone 421 0 33 7742 760
59. H0A0D1234 014 bi Sets CH1 to the transmission channel Sets the allowable number of transmitting data to 6 K6 D3 Dt D10 MO Executes transmission SET M100 Sets normal completion flag 1 Saanaa E M101 Sets abnormal completion flag 12 11 12 11 12 TRANSPARENT CODES AND ADDITIONAL CODES 2 Additional code 10H DLE transparent code 02H STX 1st group Additional code 10H DLE transparent code 03H ETX 2nd group Additional Additional code code 1st group 2nd group External device side Transparent Transparent Head data code code 1st group l 1st group T T T T T F T T T T T T DIS DKE For word unit P bl 0 1 2 3 L T U a Received byte count excluding additional code 12 2 6 Ptole CPU id 1 Li For byte unit ARESE TP tp den Received byte count excluding additional code 12 i i E bod 30H 31H132H 33H 10H02H 00 41 42 110 0 OOH ODHOAH ei pou A iil ope ve og 2 Programmable controller CPU Completion device Status display device at completion Transmission instruction x50 SET 100 woi 12 12 x X50 OUTPUT Transmission MO data count Abnormal k ey tee 1 completion M1 7 T The following diagram is for word unit i Normal completion One scan 06
60. Number of modules for which the remote password check can be set A maximum of eight modules can be registered with remote passwords in the QCPU 1 To set the remote password in a module use the GX Developer remote password setting screen 1 The remote password modules as follows Q series C24 Q series Ethernet module Built in CPU of Ethernet port 10 Callback Function a When the number of callback processing denials exceeds callback denial notification accumulated count buffer memory address 8194 20024 the following processing is executed each time the Q Series C24 issues another refusal An error code 7 9 is stored in the buffer memory s modem function error code storage area address 545 221 The CHn side error occurrence signal XE XF turns ON and the ERR LED lights up b When the number of callback processing refusals exceeds callback denial notification accumulated count after performing the following checks and clearing processing make the line connection again from the GX Developer Check the setting contents of the callback function set in the Q Series C24 Check the setting contents of the callback function set in the GX Developer The user should clear the accumulated counts stored in the following buffer memory areas Affected buffer memory Callback denial accumulated count Address 8945 22F 1H Clearing method The user should clear this area by either of the following
61. S2 will be used QCPU Q series C24 b15 to b8b7 to bO User frame S2 0 Register Registered byte length 3 When deleting a user frame a When deleting a user frame set 3 to the device for S1 0 The user frames of the frame numbers designated by S1 2 will be deleted b The registered byte number designated by S1 3 and registered data storage device designated by S2 are not used by the PUTE instruction but they are necessary for formatting it Designate 1 to 80 for S1 3 and a dummy device for S2 17 29 17 29 17 30 17 DEDICATED INSTRUCTIONS 4 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the PUTE instruction or executing the PUTE instruction during execution of another instruction in the same channel Availability of Instruction simultaneous Handling of simultaneous execution execution ONDEMAND OUTPUT BIDOUT BIDIN CSET been completed occurs in the dedicated instruction attempted later o UFRCVS e Dedicated instructions simultaneous execution error 7FFOu occurs in the dedicated instruction attempted later Available Not available 5 Whether the PUTE instruction was completed normally or abnormally can be checked with the completion device D or status display device at completion 0 1 a Completion
62. Switch 5 Station No setting ussdin fhe user rane usedi 4 Data to be registered on the GX Configurator SC s Transmission control and others system setting screen and the Non procedure system settings screen for data communication via user frames Change the default values for the items listed in the table below Use default settings for other items In example 2 the transmission frame No is not registered using the GX Configurator SC It is registered using a sequence program Buffer memory address to store registration value Word byte units designation Byte Additional code 104 DLE Transparent code 02h STX Set contents Remarks Send transparent code designation No ASCII BIN conversion designation Disable Transmission frame No designation 1st 2 Transmission frame No designation 2nd Transmission frame No designation 3rd 80014 Transmission frame No designation 4th 80004 Transmission frame No designation 5th 41 Refer to the illustration provided in 1 of this section 11 41 11 41 11 DATA COMMUNICATIONS USING USER FRAMES 1 Example of a sequence program when setting is done using the GX Configurator SC See Chapter 17 of this manual for details on the PRR command External device side Total number issi iE Sg 1021 A L i Transmission area data 2 8 Four byte
63. Transmission control and others system setting screen For items other than those noted below the default values are used Setting item Setting value Send transparent code designation 1004 Not used Receive transparent code designation 1004 ASCII BIN conversion designation 13 12 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 6 1 Example of data reception The following shows an example of data reception when ASCII BIN conversion is enabled When the receive transparent code designation is set to Enable and ASCII BIN conversion is set to Enable Additional code 10H DLE transparent code 04u EOT T T T T T T T T T T T T T T Data section External device side Programmable Y controller CPU side Set to even byte except for additional code Two bytes of reception data is read to the programmable Reception data read controller CPU as one byte data excluding additional code request X83 Programmable controller CPU BIDIN Data length Number of data received Excluding additional code Number of bytes after ASCII BIN conversion 8 2 4 when word units are used Mo Completion device ON 8 when byte units are used 4 Abnormal Status display device M1 completion at completion Normal This diagram is for when word i completion units are used T One scan Data length 00H 04H 34H 12H 34H 12H BCu 5 BCH
64. When removing the cable with a connector hold the connector on the side that is connected to the module When removing the cable connected to the terminal block first loosen the screws on the part that is connected to the terminal block Pulling the cable that is still connected to the module may cause malfunction or damage to the module or cable e Be careful not to let foreign matters such as sawdust or wire chips get inside the module They may cause fires failure or malfunction e The top surface of the module is covered with protective film to prevent foreign objects such as cable offcuts from entering the module when wiring Do not remove this film until the wiring is complete Before operating the system be sure to remove the film to provide adequate heat ventilation When using the MELSEC Q series serial communication module Starting and Maintenance Precautions N CAUTION e Do not disassemble or modify each module Doing so could cause failure malfunction injury or fire e Before mounting dismounting the module be sure to shut off all phases of external power supply used by the system Failure to do so may cause module failure or malfunctions 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 connector while the power is on D
65. disconnect by the modem disconnection request signal Y12 5 If the modem TA is initialized by a sequence program a I O signals used in initialization The initialization request signal Y10 initialization complete signal X10 and initialization connection abnormal complete signal X13 are used Example When initializing the modem connected to CH1 of the Q series C24 using two set of data for initialization registration numbers 8001 and 80024 that are registered in the buffer memory Designated Address Buffer memory value Bess amen io 0 B7u CR LF output designation 0 B8u Output head pointer eles 0 es Out of the transmission frame numbers from which one the transmission Ldesignation gt will be initiated is designated 9 Number of outputs 2 ee Out of the transmission frame numbers the number of units to be transmitted is designated 1st unit BBu 2nd unit BCH Transmission ord unit 80014 o oces Data for initialization registration number is designated frame 4th unit number Sth unit BFu 6th unit Must be designated prior to the modem initialization request Initialization request Y10 SR Initialization completion X10 am Normal completion Initialization connection abnormal io imoa eonia completion X13 i i E After the designated number of initialization retries n have been executed Registration 8002 Q
66. line connections to the GX Developer are possible by the connection system shown below The correspondence between the GX Configurator SC Callback function designation setting items and the GX Developer connection system setting items is shown GX Developer connection system 1 Setting 3 Auto Callback connection during max number is 10 Setting 4 Callback connection during fixed 4 Callback connection during fixed tting 6 Callback connection during max designated number is 10 O Connection possible 1 This shows the GX Developer connection system See the GX Developer Operating Manual for details about line connection from the GX Developer 1 Auto 6 Callback request during fixed 2 Auto callback during fixed 7 Callback request during 3 Auto callback during designated designated number number 8 Callback reception waiting 4 Callback connection during fixed 9 Manual 5 Callback connection during designated number 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 5 List of I O signals for the modem function The I O signals with the programmable controller CPU for the modem function are described Refer to the User s Manual Basic for the other I O signals 1 I O signal list Use prohibited a Use prohibited Modem initializati t standb t ON Ri ti Modem initialization completion ON Initialization completed Puget request Stoney request ET X11 Dial
67. n Number of data registrations for connection storage area address 547 Registration status of data for connection number 8 3000 Registration status of data for connection number BC7 3015 Registration status of data for connection number BD5u 3029 Registration status of data for connection number 8 3016 22 1 2 3H Stores in Flash ROM the number of registered data for connection used by the Q series C24 for the connection processing with the partner device in order to perform data communication notification The number of registrations is the number of data for connection registered to the Flash ROM by the user The registration of data for connection is described in Section 3 4 4 Data registration status for connection storage area address 548 to 549 224 to 225 1 2 Buffer memory address 548 224 Stores in Flash ROM registration status of data for connection used by the Q series C24 in the connection processing with the partner device in order to perform data communication notification The registration status of each data for connection with registration numbers of No BB8H to 5 3000 to 3029 is indicated in the corresponding bit in the range shown in the figure below 615 614 b13 b12 to b2 bi 00 549 225 0 TY setae 0 OFF No registration 1 ON Registration exists p Number of data regi
68. programmable CPU monitoring information controller CPU monitoring information is transmitted to the external device Chapter 2 through combined use of via a modem the modem function When accessing the QCPU from a remote location for the following data communication using the Q series C24 modem function data communication is enabled after the unlock processing to a remote password set in the QCPU is completed normally from the external device Communication using MC protocol Communication using the GX Developer Remote password check Automatic initialization for Chapter 3 Initializes the modem automatically when Q Series C24 starts up modem After line connection from the GX Developer access to the QCPU from the GX Developer is made possible through line reconnection from the Q Series C24 callback Transmission costs after line connection from the Q Series C24 side are borne by the Q Series C24 side Addition of non reception This function allows messages to be received in the non reception protocol monitoring time format in by time out in non reception monitoring time timer 0 if the received Chapter 6 non procedure protocol complete code and received data count have been not determined Transmission control This function allows the designation of the available capacity of the OS start end free area area that notifies the data reception failure at the time of transmission Chapter 7 designation control DTR DSR signal control
69. receive data count is the storage byte count when the arbitrary data area is converted to binary code and stored to the receive area Word units Receive data count Number of bytes stored to receive area 2 Fractions are truncated Byte units Receive data count Number of bytes stored to receive area 00u is stored to the upper byte of the last data storage location of the receive area 2 When ASCII BIN conversion enabled make the arbitrary data area of the receive data an even number of bytes excluding the additional code 11 4 11 5 11 DATA COMMUNICATIONS USING USER FRAMES 1 Reception with the first frame combination 1 A to C reception using Format O a Reception of combination 1 A 1 2 3 4 5 In this method any data section of the reception message that can be handled by the programmable controller CPU side is enclosed by the first frame and the last frame and transmitted from the external device Any reception data prior to the first frame will be ignored The Q series C24 will begin reception processing when data of the same arrangement as the first frame is received When data of the same arrangement as the last frame is received arbitrary data is stored in the reception area of the buffer memory and a read request is performed to the programmable controller CPU The received data count initially set in the Q series C24 should be a data count that exceeds the size of the arbitrary data t
70. registered in the Q series C24 flash ROM For details on the GETE instruction see Section 17 5 When the series C24 I O signals are X Y80 to X Y9F X51 M60 nov mov FNOV 6 GETE U8 M KO DO PLS K80 04 D4 0 E 2 41 MI nal M60 D2 D3 K40 MO M100 M101 Read request Sets the frame No to be read Sets the allowable number of data to be read Clears the device in which to store the read user frame data Executes user frame reading Normal completion Abnormal completion 1 When an unregistered user frame number is designated the operation will complete abnormally 2 When the total bytes of data registered in the frame to be read is unknown read 40 words 80 bytes by the dedicated instruction 3 The SPBUSY instruction can be used to read the communication status by the dedicated instruction 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 4 3 Deleting user frames The following shows an example of a sequence program when deleting user frames registered in the Q series C24 flash ROM For details on the PUTE instruction see Section 17 7 When the series C24 I O signals are X Y80 to X Y9F X52 M70 Deletes request M70 K3 DO Y Sets the delete request D2 Sets the No of the user frame to be deleted D3 1 Sets
71. 0 frame 1 3 Specified data exists When ASCII BIN conversion is set to Disable Codes stored to be received receive area Codes that can Codes stored to be received receive area 00u to FFH Not stored 30H to 9 Au to 46n to 9 to 1 User frames for reception 1 The user frame for data reception can set up to a maximum of four combinations of the first frame and the last frame regardless of whether there is a specification 2 For a combination that specifies the first frame with the first frame it is necessary to specify the first frame even in other combinations 3 Fora combination that does not specify the first frame without the first frame the first frame cannot be specified even in other combinations 4 A combination with the first frame and a combination without the first frame cannot be combined 11 3 11 3 11 4 11 DATA COMMUNICATIONS USING USER FRAMES 2 If data of other than 30H to 39H and 41H to 46H are received as the data code of the arbitrary data area including the transparent code data the Q series C24 ASCII BIN conversion will generate an error 3 Receive data arbitrary data area 1 When the arbitrary data area is stored to the receive area and the storage byte count is an odd number of bytes the receive data count shown below is stored to the receive data count storage area When ASCII BIN conversion is enabled
72. 0010 0001 0011 010010 0011 0001 0011 0100 0100 00201 0011 0100 0101 0001 0011 0100 01160 0001 0011 0100 0111 0001 0011 0100 1000 0001 0011 00020 1101 0001 0011 goood 1010 up op tay al n past 0100 eE Oldest data in the 0001 0011 io 0110 monitor data area f Monitor data size area Address according to the monitor buffer head address setting Default 2601 3301 The number of monitor data stored in the monitor data area is stored to monitor buffer size specification Default 0000 2 Number of monitor data 16 6 16 6 9 16 USING COMMUNICATION DATA MONITORING FUNCTION The monitor data area Default addresses 2602H to 32FFH 3302H to The monitor data are stored in one word units as shown in the configuration below See Section 16 3 for an example of the communication data monitoring b11 b10 b9 b8 b15 b14 b13 b12 06 b5 b4 b2 bi bO Received data When receiving data Transmitted data 0 RS DTR When transmitting data When the RS DTR signal is changed When a reception error occurs i 1 When detecting a CD to DSR signal change Data classification b12 to b15 0 When receiving data 1 When transmitting data 2 When the RS DTR signal is changed 3 When a reception error occurs 4 When detecting a CD to DSR signal change System area 16 7 Signal condition b8 to b11 x1 FE
73. 124 344 12H 34H LF CR LF CR 604 OAH ODH Buffer memory Sequence program device memory Reception data read request 3 Kl Di Sets CH1 to the reception channel Sets the allowable number of MOVP K6 D4 receive data to 6 G BIDIN us Di 010 MO Executes reception wo 1 SET M100 Sets the normal completion flag RR tt M101 Sets the abnormal completion flag 1 When the receive transparent code designation is set to Enable and ASCII BIN conversion is set to Disable the codes for receivable arbitrary data sections and those for receive data that is stored in the buffer memory s reception area are as follows Codes stored in the Receivable codes reception area Receive transparent code designation section aii 2 When the data length used is in byte units and the data length is an odd byte OOH will be stored in the upper byte of the last data storage position in the reception area 12 17 12 17 12 TRANSPARENT CODES AND ADDITIONAL CODES 2 When the receive transparent code designation is set to Enable and the ASCII BIN conversion is set to Enable Additional code 10H DLE transparent code 02H STX T f T T Data length Data section Sum E N 0004 External device side Q code i i i i i i i i LH LOS i f f f f f 0 4 0 0 0 2 1 114 1 4 2 3 4 1 2 0 30 34 30 30 30 32 31 31 34 31 34
74. 129 to 143 811 to 8 Use prohibited 144 904 304 1304 For modem 145 914 305 1314 switching Signal setting 146 924 306 1324 1 679 343 1572 185 9 345 159 Transmission 4 43 Requested System area Switching mode number designation Transmission specification designation after switching RS and DTR signal status designation CR LF output designation Output head pointer designation Output count designation user frame 186 10 285 pun ii Transmission frame No designation A maximum of 100 frames can be 4 3D designated 544 2204 Flash ROM Flash ROM system parameters write result 0 RW Modem function error code 545 221 0 Normal completion 0 RW 546 222 For modem function 547 2234 confirmation 548 to 549 2244 to 2259 550 2264 551 to 552 2271 to 2289 553 2294 554 22 555 to 557 22 to 22D confirmation ea 570 23 571 to 573 23 to 230 Notification status 1 or more Abnormal completion error code Modem function sequence status 0 Idle status Waiting for initialization Initializing modem 7 Modem disconnection 8 Callback Request reception waiting 9 Callback Modem disconnect waiting 10 Callback Delay time waiting 11 Callback Reconnecting 12 Callback Rechecking password Standby in progress Checking password Communication in progress Notification in progress
75. 1FH range not set to the Q series C24 on the programmable controller CPU side as the external device No in the Station No and Local station No items in the message Select and designate the external device numbers The designation method is described in Contents of the data designation items of each frame in the MELSEC Q L MELSEC Communication Protocol Reference Manual Station No cen Designates the number of the transmission destination external device e Local station No 7 Designates the number of the transmission source external device Does not have to be designated when A compatible frame 1C is used Example When m n configuration is 5 27 The values in are the external device and the Q series C24 station numbers decimal hexadecimal 27 1 28 1 31 1 External External External device device device 1 2 5 2 024 3 03x 26 1 C24 C24 CPU C24 CP C24 p dx C24 Q series C24 QC24 N UC24 QnA Compatible 3C frame format 1 No 5 5 wi S I Sor A T 14 4 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 2 When message structure different from that of control procedure format frames can be used 1 Change the head data of each message to other arbitrary data When selecting ASCII code format 1 format 2 or format 4 change ENQ 05r 2 Arbitra
76. 2 4 For byte unit Byte count before ASCII BIN conversion 8 Programmable controller CPU Completion device MO D eec Abnormal Status display device M i completion at completion Normal The following diagram is for word unit completion 9 Address One scan D3 400 00H 04 D10 401H 11u 024 D11 402 Transmission gt gt 42H 41H D12 403 H 034 D13 404 OAH Sequence program Buffer memory device memory Transmission instruction X50 L wove K1 00 Sets CH1 to the transmission channel ove K4 D2 1 Sets transmission data count to 4 Hove H1102 D10 Sets the transmission data in D10 to D13 241 011 wvP 012 wovP HOAOD D13 aP BI DOUT us 00 D10 Mo Executes transmission MO Mi a J 446 SET M100 Sets normal completion flag 1 SET M101 J Sets abnormal completion flag One word of data designated from the programmable controller CPU is converted to four byte data O to 9 A to F and is then transmitted 12 20 12 20 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION This chapter explains the binary to ASCII conversion called ASCII BIN conversion in order to send receive data in ASCII format to from an external device 13 1 ASCII BIN Conversion ASCII BIN conversion is a data conversion function that conv
77. 4 3 4 5 4 Jan 2003 SH NA 080007 D Additional model QJ71C24N QJ71C24N R2 QJ71C24N R4 Correction SAFETY PRECAUTIONS About the Manuals The Manual s Use and Structure About the Generic Terms and Abbreviations Section 1 2 Section 2 2 4 2 c Section 3 3 1 3 3 5 3 3 6 3 4 2 3 4 3 3 4 7 3 4 8 3 3 5 Section 6 1 Section 7 1 7 2 Section 9 1 1 4 Section 10 4 1 2 1 Section 11 24 2 y 11 43 a 11 5 Section 15 1 15 2 15 3 15 4 2 Section 17 1 17 3 17 4 Addition Section 4 4 2 6 Chapter 16 entire Dec 2003 SH NA 080007 E Correction About the Generic Terms and Abbreviations Section 3 4 6 4 Section 6 1 6 3 1 b Section 9 1 1 4 Section 11 2 4 2 Jun 2004 SH NA 080007 F Correction About the Generic Terms and Abbreviations Section 3 3 4 4 3 4 3 6 3 4 4 5 Section 8 2 2 Section 11 3 1 Section 16 2 1 The manual number is given on the bottom left of the back cover Print Date Manual Number Revision Sep 2004 SH NA 080007 G Correction Section 1 2 Section 6 1 Section 9 1 1 Addition Section 17 8 eb 2005 SH NA 080007 H Correction Section 3 4 2 3 4 4 Chapter 17 Simultaneous execution of dedicated instructions ar 2006 SH NA 080007 I Correction SAFETY PRECAUTIONS Section 6 1 Section 17 1 un 2007 SH NA 080007 J Change of a term PLC was c
78. 4 5 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS WORD BYTES UNITS SETTING 5 1to5 2 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 1 to 6 13 6 1 No reception Monitoring Time timer 0 Setting cece eeeeneeeeeeneeeeeeeeeeaeeeaeeeaeeeaeeeaeecaeeeaeeeaeesaeeatenas 6 2 6 2 Response Monitoring Time timer 1 Setting eee een eeneeeeeeeeeeaeeeaeeeaeseaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeatenas 6 7 6 3 Transmission Monitoring Time timer 2 Setting oe eee ceeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeseaeeeaeeeaeeeaeeeaeeeaneateeas 6 10 6 4 Message Wait Time Setting ceccceeseeseececeeeeeeeeeeeeeeeneeeeeeseeeeeeeneeseeesneeseeeneeseeeseeeseeseeeseeeeeeeseeeneeteaetsee 6 13 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7 1t0 7 8 7 1 Control Contents of DTR DSR ER DR Signal Control seen 7 2 7 2 Control Contents of DC Code Control sse nennen nennen menn 7 4 7 3 Precautions when Using the Transmission Control 7 T 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 8 1t08 8 8 1 Half duplex Communications eese eene t enne 8 1 8 2 Data Transmission and Reception Timing sssseeeeeneeenen eene 8 2 8 3 Changing the Communication System essen rennen rennen ener 8 6 8 4 Connector Connections for Half duplex Communications sse 8 7 8 5 Half duplex Communicati
79. 5 Line connection program example An example of a line connection program is shown below Example of initiating line connection from the series C24 side following the initialization completion When the data for connection has been registered from GX Configurator SC or from the programmable controller CPU X10 Initialization complete signal X1E Ready signal X1F WDT error signal MO Accessible flag M2 Data registration complete flag for connection See Section 3 4 4 M3 Initialization complete flag M40 Connectable flag XIE XIF Turns the ready flag ON MO M2 M3 X10 X12 X13 6 4 KF FR 4 te Turns the line connectable flag ON Data for initialization registration See Section 3 4 3 Data for connection registration See Section 3 4 4 initialization See Section 3 4 5 Peer DIE eae 4 X21 PLS M1 Line connection command M41 M40 E SET Yit Sets connection request signals SET M49 Yi x12 SET M4 When the connection in progress signal ON normal completion RST vn sets the connection complete flag X13 Mo EM irRow H221 0101 KI Reads the error code at connection abnormal completion RST Yit X27 RST M49 Resets the flag with the clear command RST M4 3 COMMUNICATIONS BY THE MODEM FUNCTION Example of simultaneous execution of initialization and line connection from the Q series C24 side W
80. 5AH Data section FOH DEH FOH DEH OAH ODH OAH ODH Buffer memory Sequence program device memory Reception data read request X8 Di Sets CH1 to the reception channel K6 D4 Sets the allowable number of receive data to 6 G BIDIN Us Di 010 Executes reception SET M100 Sets the normal completion flag Mt Re Iser M101 Sets the abnormal completion flag When the receive transparent code designation is set to Enable and ASCII BIN conversion is set to Enable the codes of receivable arbitrary data sections and the codes of receive data that is stored in the reception area of the buffer memory are as follows Receivable Codes stored in the ee transparent code designation is enabled Transparent code Transparent code code to 39H Ou to 2 Data length data section 13 13 13 13 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 6 2 Example of data transmission The following shows an example of data transmission when ASCII BIN conversion is enabled When the send transparent code designation is set to Enable and ASCII BIN conversion is set to Enable Additional code 10H DLE transparent code 04d EOT External device side E Datalength Data section Programmable controller CPU side Transmission instruction X50 Programmable BIDOUT controller CPU Data length Number of data received Excluding additional code Number of bytes after ASCI
81. 618 25AH 26An The CHn side error occurrence signal XE XF turns ON and the ERR LED lights up When communicating using the GX Developer An error code 7 8 is stored in the buffer memory s modem function error code storage area address 545 221 The CHn side error occurrence signal XE XF turns ON and the ERR LED lights up 3 The accumulated number of times up to the present a remote password mismatch occurred accumulated count value in the Q series C24 can be checked in the area where the accumulated count of unlock process abnormal completion is stored address 8956 22FCn 4 The user should clear the accumulated number of times up to the present a remote password mismatch occurred using one of the following methods Setthe accumulated count of unlock processing abnormal completion to 0 on the GX Configurator SC s modem function monitor test Screen Write O in the buffer memory area where the accumulated count of unlock process abnormal completion is stored address 8956 22FCn If the CHn side ERR occurrence signal XE XF for the Q series C24 turns ON and the ERR LED lights up this could indicate improper access from the external device See also an example of measures taken on the programmable controller CPU side described in 12 Refer to User s Manual Basic for the method for turning off the Q Series C24 s ERR LED when it lights up 3 COMMUNICATIONS BY THE MODEM FUNCTION 9
82. Basic and take the corresponding action Checking of mode switching designation contents for buffer memory mode switching area and writing of mode switching designation contents within the range that can be designated Re execution of mode switching 3 When the mode was switched from an external device after mode switching is complete read and write the buffer memory special applications area shown below from the programmable controller CPU Switch setting error mode switching error storage area address 203 Data communications initialization setting areas addresses 93H to 121H 133H to 1C 1 described in the User s Manual Basic 4 After checking that mode switching was completed normally inform all the connected devices that data communications are possible and restart data communications 15 10 15 10 15 SWITCHING THE MODE AFTER STARTING To check the Q series C24 mode communication protocol transmission specifications after switching read the buffer memory addresses 252H to 253p 262H to 263 described in User s Manual Basic To check the external device read the buffer memory with the MC protocol buffer memory read function 15 5 2 Mode switching sample program The following shows a programmable controller CPU sample sequence program that switches the CH1 interface mode from an external device The series C24 I O signals X YOO to X Y1F x6 Reads the mode switching error FROM H203
83. CH1 ERR occurred e CH2 ERR signal nm Turned ON when the CH2 ERR occurred 2 Buffer memory Address Pre Setting value Stored value 00014 MC protocol Format 1 to Switchi de No designati VEC aon nae ID 00074 Bidirectional protocol See a For specifying mode 00091 Pre defined protocol 144 90H 304 130 a OOFFu GX Developer connection Transmission specification setting 145 305 m after switching See b Normal F fi d Switch setti d itchi 515 203 St confiring mode Ma Ru MECC SNIEN ia than 0 Switch setting error mode switching error switching and switch setting error condition See User s Manual Basic 00004 Matched to the settings at the GX Developer 8000 to 8FFFu Matched to the settings of this area a Switching mode No designation area addresses 90H 130 Write the desired mode No 00014 to 0007H O0FFH b15 to bO Buffer memory address 90 130 Default 0000 0001 MC protocol Format 1 0002 MC protocol Format 2 0003 MC protocol Format 3 00044 MC protocol Format 4 0005 MC protocol Format 5 00064 Non procedure protocol 00074 Bidirectional protocol 00094 Pre defined protocol GX Developer connection 1 The communication protocol is specified as 00 when the GX Developer connection mode is set using the GX Developer switch setting 15 5 15 5 15 SW
84. CL T a ET ut UN NO eh UNE He i i pog Ed EE ik 36 y 2608821000 i We Cru 1 iv i i h wes MEE p gi i i i i i Ae Transmission 024 00 3B4 3141 324 33H 3440341 O74 0 0 Transmission 02 00 3B 3441 32H 33x 3440341304 7 reception reception data code Calculation data code Calculation range range 9 5 9 5 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION How to calculate the horizontal parity code This is a numeric value obtained by calculating the XOR for the subject data and then converting it to ASCII code In the case of the example 4 314 0011 0001 XOR 2 32H 0011 0010 0000 0011 XOR 3 33H 0011 0011 0011 0000 XOR 4 341 0011 0100 0000 0100 ETX 034 XOR 0000 0011 0000 0111 ASCII code 0 30H 374 4 Transmission reception data corresponding to register codes FFH 11H and FFH 17H The two s complement sum check code that calculates the subject range for transmission reception data message is expressed as two character data in ASCII code then transmitted and received from the upper digit The difference between FFH 11H and FFH 17x is the difference between the calculation ranges An example of the contents arrangement of the transmission and reception of the two s complement sum check code is shown below
85. Chapter 10 reception UI LM rt Data communication using the Data communication using the transparent code code X Chapter 12 12 em e e owe conversion ames own a multi drop connection m n connection Changing the interface mode after starting data communication Changes to communication protocol Chapter 15 and transmission specifications Available X Not available 1 OVERVIEW 1 2 Functions Added Changed by Function Version B in QJ71C24N R2 R4 and QJ71C24 R2 Of the special functions for the Q series C24 described in this manual the functions added changed in the Q series C24 of the function version B and whether communication functions can be used for each of them are listed below 1 The added changed functions shown in this section include those added in the first products of function version B or later For the function version serial No and software version of QJ71C24N R2 R4 and QJ71C24 R2 and related products CPU module GX Developer and GX Configurator SC refer to the Q Corresponding Serial Communication Module User s Manual Basic Refer to the Q Corresponding Serial Communication Module User s Manual Basic for function comparison in function versions between QJ71C24N R2 R4 and QJ71C24 R2 N P Explanati Function Description of function TUN Bigrsetional ad oe i Transmission of programmable controller In the programmable controller CPU monitoring function
86. Configurator SC after debugging is completed Start data communications Transmission Reception E Read receive data Designate user frame No to transmission user frame designation area address 7 to 11Du 157u to 1BDu of the Q series C24 buffer memory Designate transmission data gt e Refer to Section 11 4 arbitrary data area in transmit message to transmit area of the Q series C24 buffer memory Data transmission 11 2 eee Refer to the User s Manual Basic Refer to Chapter 9 eee Refer to the User s Manual Basic Refer to Chapter 9 eee Refer to Section 11 2 4 e e Refer to Section 11 2 1 11 2 2 11 2 11 DATA COMMUNICATIONS USING USER FRAMES 11 2 Data Reception In data reception using the user frame the reception method on the Q series C24 side includes format 0 and format 1 This section explains data reception for each format 11 2 1 About reception data In reception using the user frame data arranged as indicated below can be received User frame User frame first frame Arbitrary data last frame Reception v User frame User frame Explanation ic method Combination first frame Arbitrary data last frame seclion Remarks Format 0 This section With the first 1 For data frame 1 reception This section mixed settings 2 are possible Without the first This section Format
87. Connection request when the connection could not be made to the partner device by the notification request connection request 2 The default value is recommended to use for the connection retry interval e Initialization connection timeout time designation area address 50 32 1 The following wait times are designated Wait time until the modem TA initialization is complete Wait time per wait when the connection could not be made to the destination by the notification connection request 2 The default value is recommended to use for the initialization connection retry timeout Shown below is the relationship of the number of connection retries designation connection retry interval designation and the time for initialization connection timeout time designation used for the notification connection request to the partner device Number of connection retries 3 times Connection retry interval 180s Initialization connection retry timeout 60 s 1st retry 2nd retry 3rd retry Notification Notification A Notification Notification amp Pit gt 60s 180s 60s 180s 60s 180s 60s f Number of initialization retries designation area address 51 33 The number of retries when the initialization per the initialization request to the modem on to the Q series C24 side has failed 3 COMMUNICATIONS BY THE MODEM FUNCTION
88. Convert the connection command into Tranemission dais pulse Initialization request Data communication enabled peo Number of reception data Connection request Transmission enabled Reception data C rt the t issi d int Modem disconnection request D100 initialization error code C rt the notificati d int oe pulse series C24 accessible Line disconnection enabled D102 Notification error code Convert the line disconnection Y61 Initialization data registration completion M71 D103 Data transmission error code command into pulse Data registration completion for connection Line disconnection request occurrence D104 Data reception error code Initialization completion Reception processing in progress flag D105 Line disconnection error code Lo 5 5 ransmission processingin progressfag ooo 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 5 1 Sample program for data communication 1 1 Sample program system configuration The configuration of a system using this sample program is shown below 1 Line connection 2 Communications by the non procedure protocol 3 Line disconnection QJ71C24 R2 2 QJ71C24 R2 1 2 Connection request station side QJ71C24 R2 1 sample program The modem connected to the CH1 side interface is initialized the line is connected data are transmitted by the non procedure protocol and the line is disconnected through commands from the user Perform
89. D2 Ki contents 02 SET M50 Mode switching complete M0 ee ee ation of setting value of buffer memory Remodification of setting value of buffer memory to the communication specification Mode switching complete reset 15 11 15 11 16 USING COMMUNICATION DATA MONITORING FUNCTION 16 USING COMMUNICATION DATA MONITORING FUNCTION The following describes the QJ71C24N R2 R4 and LJ71C24 R2 communication data monitoring functions 16 1 Communication Data Monitoring Function 16 1 1 Overview 16 1 Communication data monitoring function is a function to monitor communication data between QJ71C24N R2 R4 or LJ71C24 R2 an external device on communication lines The system startup time can be reduced by analyzing the communication data on the communication lines when debugging the system The following two methods are for the communication data monitoring 1 Communication data monitoring by the sequence program Explained in this section Monitoring is performed by the monitor start instruction written in the communication data monitoring specification area of the buffer memory 2 Communication data monitoring by GX Configurator SC The debugging support function of the GX Configurator SC protocol FB support in used for monitoring circuit trace See the Operating Manual Protocol FB support function for the debugging support function of the GX Configurator SC protocol FB sup
90. Developer switch settings a reception data read is requested of the programmable controller CPU upon reception of the sum check code External device Q series C24 Transparent code designation Sum check code setting ASCII BIN conversion designation No No No Data Arbitrary data section only reception P Deleting Deleting transmission Calculation and check of ASCII BIN conversion of ede pono enge ENG id isi transmission Buffer memory Reception area Adding transmission es m Yes contmi oda ASCII BIN conversion Yes ACK NAK Error code section only No Reception result storage area b Sending 1 The transmission control code data is added to the transmission data designated by the programmable controller CPU arbitrary data section of the transmission message and that transmission data is transmitted If ASCII BIN conversion is designated the transmission data is sent after itis converted to ASCII code data 2 Ifthe sum check code is set to Enable in the transmission setting via GX Developer switch settings the code will be calculated from the transmission message and added to the transmission message 12 14 12 14 External device 12 TRANSPARENT CODES AND ADDITIONAL CODES 3 Ifa send transparent code is designated additional code data is added preceding the transparent code additional code data for the arbitrary data section and is
91. Ethernet function is disconnected D o 3 Even if the Ethernet module that transmits a communication 2 Access request to other Ethernet is set as a module subject to the remote password check unlock and lock processing is not necessary Ethernet module Access station 1 The remote password unlock and lock processing can be performed only for the Q series C24 of the local station directly connected to the external device The remote password unlock and lock processing cannot be performed for the Ethernet module of the other stations relay station and access station 2 The remote password unlock processing from the external device is performed using dedicated commands for MC protocol communication 3 See Section 3 3 7 8 for what to do when the remote password unlock processing is completed abnormally 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Remote password check processing performed by the Q series C24 a Communication in which a remote password check is performed 1 When the following parameters are set for the Q series C24 installed in the QCPU station the Q series C24 performs a remote password check for communication requests listed below When a remote password is set in the QCPU When the Q series C24 that is communicating data with the external device has been set as a module subject to the remote password check 2 The Q series C24 performs a remote password check with respect to a co
92. Framing error OVR Overrun error PE Parity error 16 7 16 USING COMMUNICATION DATA MONITORING FUNCTION 16 3 Communication Data Monitoring Example The following is an example of the data monitoring of nonprocedural protocol communication 1 System configuration The system configuration for the sample program is as shown below The CH used for operation of this sample program is CH1 only GX Developer QJ71C24N R2 2 Program condition This is a program to monitor transmitted data from CH1 of the QJ71C24N R2 with user instructions a b 16 8 GX Developer switch setting Switch number Setting value Switch 1 07C2 Switch 2 0006 Switch 3 07C2 Switch 4 0006 Switch 5 0000 Devices used by the user Monitor start instruction signal 7 X20 Monitor option specification signal X21 Monitor stop instruction signal X22 During monitor start instructions M20 During monitoring mmm M21 During monitor stop instructions 7 M22 Communication data monitoring specification area storage condition D300 Monitor option specification area storage condition 0301 CH1 Transmission channel CH2 Reception channel 16 8 16 USING COMMUNICATION DATA MONITORING FUNCTION c Sample program 5400 Uo WV 68216 300s UON lt Monitor start X20 is gt Uo 68216 RST N20
93. Function Control Procedure During User Frame Use 10 4 10 4 1 Data communication using the ASCII code ssseeeeeenenmen enne 10 4 10 4 2 Data communications using the binary code 10 6 10 5 Example of an On Demand Data Transmission Program Using User Frames 10 8 11 DATA COMMUNICATIONS USING USER FRAMES 11 1to 11 43 11 1 Overview of Data Communication Procedure emen 11 2 12 Data Reception a cete beet diee thin aa laedi eee ee 11 3 11 2 1 About reception dala a a a A a a a a ea a ae ai e inttr nnns 11 3 11 2 2 Timing for start completion of data reception 11 10 11 2 3 Receive procedure one ced erede eere ern tape eap kia c eu egeo evade 11 14 11 2 4 User frame setting for reception 11 15 13 3 Receive Program zi ie fea id fete dined pet b e A e eR d e ie eoa 11 21 11 3 1 Sequence program example ennt nre 11 21 11 3 2 Application example for data reception using a combination that specifies the first frame 11 26 11 3 3 Application example for data reception using a combination that does not specify the 11 32 11 4 Data Transmission
94. LIL HHL HiL HiL H i 1 1 w ofo 4 olo 10 0102 010 3 0 0 1 1 i i 1 57H 2AH 30n 30H 30H 31H 30H 30H 30H 30H 30H 34H 30H 30H 30H 30H 31H 30H 30H 30H j 32H 30H J 30H 30H J 33H j 30H 30H 4 2 W100 W101 W102 W103 1 0 1 2 28 5g E 4 8 5g 8 2 BS 3 1 8 9 ES 8 MMMMMMMMMMMMMMMM 5 25 3 0000000011111100 3 7854321054321098 gt 8 Llu ele H 30H 30H 30H 31H 30H 30H 30H 30H Number of Monitoring registered points head device Device code Monitoring head device Device data Device code Device data 1 57H 2AH 30n 30H 30H 31H 30H 30H 30H 30H 30H 34H 30H 30H 30 30 30 304 30H 31H 1 30H 30H 30H 32H 1 30H 30H 30H 33H 4 2 I 1 1 v DA v v w100 w101 w102 w103 device Number of registered points Device code Device data Monitoring head 30H 30H 30H 31H 30H 30H 30H 30H 2 16 2 16 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 5 When user frame No B082u is designated Information on the monitoring results for the condition agreement blocks are sent for each block Results are sent in the following order The programmable controller CPU
95. M92 E A AR errr ouTPUT Uo D150 051 M150 M151 SET RST M151 SET RST RST RST SET 3 101 00 Di 02 010 K17 Mi RET Y10 M100 M3 Y10 M32 RET D51 D56 D150 D151 D152 M92 M150 M155 M156 M156 M155 M92 M53 M102 RET Data registration processing for initialization subroutine Sets the number of bytes of the registration data Sets the user control data control number Sets the initialization command Write the data for initialization Data No 80014 Registration to buffer memory Data registration complete flag for initialization is set Modem initialization processing subroutine Initialization request signal is set Initialization request execution flag is set When the initialization complete signal ON the initialization complete flag is set and the request signal is reset When the initialization connection abnormal complete signal ON the error code is read and the request signal is reset Data communication processing subroutine Non procedure protocol transmission Set the transmission data Sets the number of transmission data words Transmission request execution flag is set Transmission request execution Transmission request normal completion Transmission request abnormal completion 3 101 P52 P8 3 COMMUNICATIONS BY THE MODEM FUNCTION 0160 K2
96. Modem function system setting Screen Example If line connections are being made with Callback connection during designated number as the connection system Input the telephone No 1 for the callback destination telephone No and make line Setting of callback function connections designation settings by the Line Connection GX Configurator SC Callback connection GX Developer X during designated number telephone No 1 Callback Input the telephone No n for the callback destination telephone No and make line connections Line Connection Callback connection during designated number Z Registration in the Q Series C24 Callback data No 1 Telephone No 1 Callback data No 2 Telephone No 2 Callback Modem allback data No GX Developer telephone No n Callback data No Telephone No 3 Not used to to Callback data No 10 Telephone No 10 Set the Callback function designation by the GX Configurator SC Check the received telephone No If it is registered make the line connection 27 Registration in the Series C24 Callback data No 1 Callback data No 2 Telephone No 1 Telephone No 2 Callback data No 3 to Telephone No 3 to Callback data No 10 Telephone No 10 3 COMMUNICATIONS BY THE MODEM FUNCTION If the maximu
97. Monitor setting error 100FH M21 UG FMOVP HO 69730 HocrE Monitor data area is cleared to 0 Uo wove 88216 7 SET N20 Monitor start being instructed M20 Uo 80216 LM N20 1 SET M21 1 Monitoring 0002 lt Monitor option X21 is ON gt i M21 UO H5 8821 J Uo ate Hi002 RST N21 During monitor stop 10024 Monitor stop X22 is ON X22 M21 UO wove Ho 88216 SET N22 Monitor stop being instructed N22 UO 88216 RST N22 1 RST M21 1 Monitor stop 00001 16 9 16 9 16 USING COMMUNICATION DATA MONITORING FUNCTION 3 Confirming monitor data by GX Developer The monitor data area for CH1 Address 2602H to 32FFH is monitored on the buffer memory batch monitoring screen of the GX Developer See Section 16 2 2 g for the data configuration of the monitor data area Example The following data are sent from CH1 using non procedure protocol Transmitted data ABCDEFGH ODOAn five word Imi Buffer memory batch monitor 1 ib x Module start address oo Hex Buffer memory address 2600 DEC HEX Monitor format Bit amp word Display 16bit integer Value C DEC Bi C 32bit i Bit 32bit integer E C Word C Real number C ASCII character address F EDC mass 7654 zio Option setup 2600 goood 0000 0000 0000 0000 2601 002020 00020 0000 1011 000B 0010 0011 00020 0011 2303 Devic
98. No when sending data without No of the use frame to be sent adding the additional code specified by the send transparent code designation 1H to 3E7H ito 999 40014 to 43 7 16385 17383 3E8uto 4 1000to 1199 43 8 to 44AFu 17384 17583 8000 to 801FH 32768 to 32737 000 to CO1FH 16384 to 16353 12 4 12 4 12 TRANSPARENT CODES AND ADDITIONAL CODES 3 The following describes the processing steps taken by the Q series C24 when performing communication with the transparent code designation and the ASCII BIN conversion enabled a Communication using arbitrary format 1 Receiving If a receive transparent code is designated the additional code designation data is deleted removed The arbitrary data section is stored in the reception area of the buffer memory If the ASCII BIN conversion is designated the data section is stored in the buffer memory after it has been converted to binary code data During reception of an arbitrary data section if the reception complete code data or the entire count of receive data has been stored a reception data read is requested of the programmable controller CPU 2 Sending The transmission data designated from the programmable controller CPU arbitrary data section of the transmission message is sent If the ASCII BIN conversion is designated the transmission data section is sent after it has been converted to binary code data If a
99. Q series C24 Ignored by Stored to Q series C24 buffer memory or OS area the Q series C24 buffer memory or OS area 3 Once DC2 is received subsequent DC2 are ignored and are removed from the receive data 1 MC protocol A compatible 1C frame External format 1 device 2 21 8 8 c S E D S o E c p 2 E S 3 o D gt 3 The transmission control method and changing the DC code Switching between DC code control method and DTR DSR control as well as changing of the DC code are registered on the GX Configurator SC s Transmission control and others system setting screen 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7 3 Precautions when Using the Transmission Control Functions The following describes the precautions to be observed when using the Q series C24 transmission control functions 1 Agreement between external device and programmable controller 2 5 CPU The external device and programmable controller CPU must agree to the following 1 Whether or not a transmission control function is to be used If a control function is used which control is to be used for data communications 2 Control timing 3 DC1 to DC4 codes when DC control is performed The DC1 to DC4 codes used can be arbitrarily changed Transmission control function usage conditions 1 DTR DSR control and DC code control cannot be used at the same time Select one of them using the G
100. Q series C24 non procedure protocol using a user frame User frame Data ue transmission e Arbitrary data Arbitrary data Data Opposite device such as a bar code reader Q series C24 transmissio or ID controller personal computer User frame For more details on the Transparent code and ASCII BIN conversion used in the explanations of this chapter see the chapters listed below When using transparent codes or performing data communication using ASCII BIN conversion please read the following chapters as well When using transparent codes See Chapter 12 When performing data communication using ASCII BIN conversion See Chapter 13 11 1 11 1 11 DATA COMMUNICATIONS USING USER FRAMES 11 1 Overview of Data Communication Procedure 11 The following is an overview of the procedure when performing data communication between the opposite device and programmable controller CPU using a user frame Switch setting by GX Developer Initial setting by GX Configurator SC When only default registration frame used When registering user frames Register to the series C24 Flash ROM Register to the Q series C24 buffer memory When receiving data Set user frame No etc to receive user frame designation area addresses ADH to 5 14Du to 155 2020 to 2027 2120 to 21274 of the Q series C24 buffer memory Must be set by GX
101. R4 A1SJ71QC24 and A1SJ71QC24 R2 QC24N Generic term for AJ71QC24N AJ71QC24N R2 AJ71QC24N R4 A1SJ71QC24N1 A1SJ71QC24N1 R2 A1SJ71QC24N and A1SJ71QC24N R2 IQC24N Generic term for QC24 and QC24N Generic term for the modules below QJ71C24N QJ71C24N R2 QU71C24N R4 QJ71C24 QJ71C24 R2 Serial communication LJ71C24 LJ71C24 R2 module AJ71QC24 AJ71QC24 R2 AJ71QC24 R4 A1SJ71QC24 A1SJ71QC24 R2 AJ71QC24N QnA series AJ71QC24N R2 AJ71QC24N R4 A1SJ71QC24N1 A1SJ71QC24N1 R2 A1SJ71QC24N A18J71QC24N R2 UC24 A series computer link module Generic term for AJ71UC24 A1SJ71UC24 R2 A1SJ71UC24 R4 A1SJ71UC24 PRF A1SJ71C24 R2 15 71 24 A1SJ71C24 PRF 2 24 and A2CCPUC24 PRF Generic term for QO0JCPU Q01CPU Q02CPU Q02HCPU QO6HCPU Q12HCPU Q25HCPU QO2PHCPU Q06PHCPU Q12PHCPU Q25PHCPU Q12PRHCPU Q25PRHCPU Q00UJCPU QOO0UCPU QO1UCPU Q02UCPU QO3UDCPU Q04UDHCPU Q0GUDHCPU Q10UDHCPU Q13UDHCPU Q20UDHCPU Q26UDHCPU QO3UDECPU Q04UDEHCPU QO6UDEHCPU Q10UDEHCPU Q13UDEHCPU Q20UDEHCPU and Q26UDEHCPU eeu sid Generic term for LO2CPU and L26CPU BT QnACPU Generic term for Q2ACPU Q2ACPU S1 Q2ASCPU Q2ASCPU S1 Q2ASHCPU Q2ASHCPU S1 Q3ACPU Marina Q4ARCPU QQnACPU Generic term for Generic term for QCPU and QnACPU S and QnACPU Ethernet module Generic term for QJ71E71 100 QJ71E71 B5 and QJ71E71 B2 Ethernet interface modules Q series E71 E71 Indicated as E71 in diagrams
102. Sets CH1 to the transmission channel Movp D10 Sets the number of data sent to 2 wovP 1234 J Sets the arbitrary transmission data for 011 to D12 MovP 56 D12 Top HB H400 010 K3 Sets the arbitrary transmission data for transmission buffer laP PRR 08 D1 0 1 Executes user frame transmission Ls Mi ets normal completion flag HH sT M100 J Set letion fl M 4 set M101 J Sets abnormal completion flag 13 9 13 9 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 5 Performing ASCII BIN Conversion for Data Communicated via the Bidirectional Protocol This section explains the ASCII BIN conversion of data to be communicated using the bidirectional protocol 1 The following shows the range of transmission reception data for which ASCII BIN conversion can be performed Applicable data range at transmission reception a SEES a 1 Arbitrary data section Message at data transmission 1 Sum check code reception Q Data length Data section Applicable data range at transmission reception gt A N Response message K Error code A When sending or receiving data the Q series C24 processes data as follows 1 Range of ASCII BIN conversion The Q series C24 performs the ASCII BIN conversion for any data section data length and data section and error code in a message 2 Conversion of data length At trans
103. Switch 5 Station number setting Oth station 0000 2 Initial settings by GX Configurator SC set in the setting screen for modem function system a Perform initial settings on the interface side that use the modem function as described in Section 3 3 6 The following table shows the default settings in the Modem function System setting screen and whether setting is possible or impossible in each type of communications Data communications GX Developer Buffer memory MC non procedure Notification For connection to address bidirectional MELSOFT products Modem function system setting screen setting item Modem connection channel designation Notification execution designation Number of connection retries Connection retry interval designation unit s Initialization connection timeout time designation Unit s Number of initialization retries designation Data No for initialization designation 1 Data No for connection designation 1 GX Developer connection designation 2 RS CS control yes no designation communication interval time designation 2 3 46 2Ex 47 2F 48 304 49 314 50 329 51 339 52 349 53 35x 54 36x 55 379 56 38x 8200 20084 Modem initialization time DR signal valid invalid designation Wait time of notification Unit s 8202 200 Circuit disconnect wait time PLC CPU watch use Unit s 8206 200 Remot
104. The following shows the user frame designation on demand data list On demand data A User frame User frame Send data User frame User frame First frame 1st 1 Only the on demand data list combinations shown below can be used Transmitted when last frame 2nd designated Transmitted when last frame 1st designated On demand instruction transmitted when send data designated in buffer memory Transmitted when first frame 2nd designated O Designation data Data name First frame First frame Last frame Last frame oe Send data Combination 1st 2nd 1st 2nd as aaa oc a See Chapter 9 for a detailed description of user frame Contents of send data ASCII mode Codes registered from 00x to Transmit the data of the code registered the Q series C24 FEH No conversion User frame First frame 1st Last frame Last frame User frame First frame 2nd Last frame Other than last frame Send data Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual for details 10 3 Combination of codes registered in FFx and 0 to FFu Codes registered from 00 to Combination of codes registered in FF and 0 to FFu 2 The send data for on demand data transmission by user frame is outlined below Transmit the data according to the user designated contents code and byte count Converts the data cod
105. The received data count is 0 First frame ACK Last frame CR LF Reception start timing Receive complete timing read timing 11 5 11 6 11 DATA COMMUNICATIONS USING USER FRAMES c Reception of combination 1 C 1 Reception data Ignored In this method start of data transmission from the external device to the programmable controller CPU side is notified by the first frame after which arbitrary data of a fixed length is repeatedly transmitted from the external device Any reception data prior to the first frame will be ignored After the first frame is received all later reception data is treated as arbitrary data The Q series C24 will begin reception processing when data of the same arrangement as the first frame is received A read request will be repeatedly performed to the programmable controller CPU when arbitrary data equaling the received data count initially set in the Q series C24 is received The received data count initially set in the Q series C24 should be a data count for arbitrary data fixed length transmitted from the external device Reception processing via the receive complete code initially set in the Q series C24 will not be performed The reception data for the receive complete code will be treated as arbitrary data Y vv vy Arbitrary data lt gt Equaling the received Equaling the received data count data count Receptio
106. Transmission data 10 2 3 A B C receive data BCH _ Conversion med No of data in word units 13 2 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION Even if ASCII BIN conversion is enabled it is possible to transmit data without converting the data in any user frame portion or buffer memory transmission area When sending data without ASCII BIN conversion specify the user frame No using the following method Specify the number obtained by adding 4000H to the registered user frame No b15b14b13 to bO Number of frames 0 Conversion enabled 1 Conversion disabled 0 Frame registered in Flash ROM 1 Frame registered in buffer memory When sending data in the sections designated in 4001H to 44AFH COO0u to 1 the additional codes by transmission transparent code designation will not be added See Section 12 3 Designated No when transmitting without ASCII BIN conversion 1H to 3E7H 1 to 999 4001 to 43 7 16385 17383 3R8H to 4AFH 1000to 1199 43 8 44AFH 17384 to 17583 User frame No to be sent 8000 to 801 32768 to 32737 000 to 1 16384 16353 2 The processing steps taken by the series C24 when communicating with ASCII BIN conversion and transparent code designation enabled are explained in Section 12 3 Transmission reception in arbitrary formats Transmission reception u
107. User designation Register 1 Delete 3 The registration deletion result by the PUTE instruction is stored S1 1 Register delete result 0 Normal System Other than 0 Error code S1 2 Designate the user frame No 1000 to 1199 193 Registered bytes 1 to 80 Number of bytes of the user frame to be registered 1o 80 U 51 count Designate 1 to 80 as dummy when deleting Q Ser 1 For information about errors caused by incorrect data designated by the user see the description in Errors 2 The Set by column indicates the following User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction 17 28 17 28 17 DEDICATED INSTRUCTIONS Functions 1 This instruction registers or deletes the user frame for the Q series C24 as designated by Un 2 When registering a user frame a When registering a user frame set 1 to the device for S1 0 Data in the device designated by S2 and after will be registered according to the control data b The registered data should be stored in the device designated by S2 and after as described below Thus at least registered data number 2 devices will be necessary to store the registered data and they should be assigned beginning with the device designated by 52 For example when registering 6 bytes of data 3 devices beginning with the device designated by
108. When the initialization connection abnormal complete signal ON the error code is read and request signal is reset Data communication processing subroutine Non procedure protocol transmission Set the transmission data Sets the transmission channel to CH1 Set the number of transmission data Sets the transmitting flag Executes the transmission request Transmission request execution flag is set Transmission normal completion Transmission abnormal completion Data reception processing subroutine Sets the data reception channel to CH1 Reception data read execution flag is set Executes the reception data reading P P8 M160 M161 3 COMMUNICATIONS BY THE MODEM FUNCTION M165 M166 M166 M165 M91 vn SET Y12 vi2 x10 x12 x14 NO 1 1 FROMP HO H221 0105 Ko TstT M7 SET M73 N73 X14 RST Y12 x14 At RST M7 RST N73 RST M72 RET 80 Y12 T RST Y10 W81 RST x10 1 SET 12 X14 E SET N93 Y12 x10 x12 x14 e a RST Y12 Y12 X10 xi x12 x13 x14 ME Mt W M ov o KIN3 RST RST N32 RST M2 RST M72 c o o K1M100 s M83 RST N82 RET Received data read normally completed Received data read abnormally completed Line disconnection processing subroutine Line disconnection from local station
109. When using the MELSEC Q series serial communication module Wiring Precautions N CAUTION e When turning on the power and operating the module after installation and wiring are completed always attach the terminal cover that comes with the product There is a risk of electric shock if the terminal cover is not attached e Perform correct pressure displacement crimp contact or soldering for external wire connections using the tools specified by the manufactures Incorrect connection may cause short circuits fire or malfunction e Attach connectors to the module securely e Be sure to fix communication cables or power supply 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 Before connecting the cables check the type of interface to be connected Connecting or erroneous wiring to the wrong interface may cause failure to the module and external devices e Tighten the terminal screws within the range of specified torque If the terminal screws are loose it may result in short circuits or malfunction If the screws are tightened too much it may cause damage to the screw and or the module resulting in fallout short circuits or malfunction e When removing the communication cable or power supply cable from the module do not pull the cable
110. X10 X12 M50 M92 1 X3 X4 Y12 M92 N93 M2 P4 M52 M53 P51 M55 P52 M80 M72 P7 FEND Access possible Modem initialization line connection possible Data communications possible Data transmission possible Line disconnect possible Conversion of modem initialization line connection commands to pulses Modem initialization line connection processing to sub routine Conversion of data communications transmission commands to pulses To the data transmission processing sub routine Setting of the receive data reading request To the data reception processing rub routine Conversion of line disconnect commands to pulses Conversion of turning connected signals OFF to pulses To the line disconnect processing sub routine P4 P51 P52 Modem initialization line connection processing 3 COMMUNICATIONS BY THE MODEM FUNCTION 1 YU x10 x12 _ RST X13 RST YU X13 FROMP HO H221 Di0l Yul M2 Data transmission processing N52 NOI TO NO2 HOAOD KO Lo K6 s ourPUT 0150 051 SET M150 M151 Hoe M151 inc RST 51 56 150 151 152 M150 92 050 C51 2 M53 Data reception processing N55 move NAA mew 0 0161 J jwwP
111. a SET Y10 Modem initialization processing subroutine Initialization request signal is set SET M100 Initialization request execution flag is set Yio X10 ____ When the initialization complete signal ON the initialization complete flag is hn FRONP H221 D100 1 set and the request signal is reset When the initialization connection 110 x10 abnormal complete signal ON the RST Y10 error code is read and the request X13 signal is reset RST M81 RET M60 M40 TOT P6 RST Y14 Notification processing subroutine Notification issued request signal is reset Issue request SET M101 Notification execution flag is set Y14 X15 P j FM MM SET M6 When the notification normal complete Signal ON the notification complete flag is X16 set and the request signal is set Initial status H 4 aeaa MT FROM 21 0102 E When the notification abnormal complete Y14 X15 signal ON the error code is read and the SET Yi4 request signal is set Initial status X16 RST M61 RET 3 105 3 105 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM In data communication between the Q series C24 and the external device an interrupt program can be used to receive data for the following data communication functions Data reception during communication using the non procedure protocol
112. a cellular phone and a modem Transmission rate 9600 bps is set For the details see the manual of the modem used Setting example for the initialization command of the registration No 7D3 ATQOV1E1X1 amp H1 amp R2 amp A3 amp D0S80 71 amp N6 Setting example for the initialization command of the registration 704 ATQOV1E1X1 J0 Q2 N3 amp D0 MS 9600 96008071 3 COMMUNICATIONS BY THE MODEM FUNCTION 6 Procedures for register read delete of the initialization data a For the Flash ROM in the Q series C24 Register read delete operations are executed on the GX Configurator SC s Data registration for modem initialization screen The factory setting of initialization data stored in the Flash ROM of the Q series C24 cannot be deleted Registration example Data for user modem initialization BBE 0001 1 1 amp 1 amp 02 amp 1 amp 10 amp 2 amp 505 ool Use code to specify a field to register if GX Configurator SC is used for data for modem initialization Example To register the Q2 of data Q2 3 COMMUNICATIONS BY THE MODEM FUNCTION b For the buffer memory of the series C24 1 The initialization data write registration and read operations are performed by designating an applicable area that corresponds to registration numbers 8001H to 801F for the user frame registration area addresses 1BO0H to 1FF6x When deleting the initialization data write to
113. a dummy number for the allowable number of deletions T0 H8 H2000 Set the flash ROM write allow 6 PUTE U8 D4 MO Executes user frame deletion SET M100 1 Normal completion 1 SET MIOT Abnormal completion 1 When an unregistered user frame number is designated the operation will complete abnormally 2 The SPBUSY instruction can be used to read the communication status by the dedicated instruction 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES During communications between external device and programmable controller CPU using the MC protocol on demand data can be transmitted from the programmable controller CPU to the external device by on demand function using user frames This chapter explains the transmission of the data specified by the programmable controller CPU using a message format other than the message formats A compatible 1C frame formats 1 to 4 QnA compatible 4C frame format 5 described in the MELSEC Q L MELSEC Communication Protocol Reference Manual 10 1 User Frame Data Communications Function 10 1 The user frame data communications transmits and receives the first and last parts of a message in the format selected by the user during data communications between programmable controller CPU and external device via the Q series C24 By using the function described in this chapter on demand data shown below can b
114. a user frame are as follows 1 The Q series C24 I O signal The Q series C24 is installed at QCPU I O signal addresses X Y80 to X Y9F 2 Q series C24 interface used in data communications with the external device The Q series C24 CH1 side RS 232 interface is used 3 Data to be registered on the GX Configurator SC Transmission control and other system settings screen and Non procedure system settings screen used for data communication using a user frame Change default values for the items listed in the table below Use default values for other items Buffer memory address to store Item Set contents Remarks registration value Word byte units designation Word byte 96H Set to either one according to the example When Yes Receive transparent code designation Yes No Additional code 10 DLE Transparent code 02 STX ASCII BIN conversion designation Do not convert Select Do not convert in the example Received data count 6 to 511 A4H Set according to the example Receive complete code None A5H User frame use control designation ADH First frame No designation i Y to 5 Last frame No designation 1 iii 2 Refer to the illustrations provided in User frame receive format designation Format 0 Format 1 2020 to 2023H a to e in this section Exclusive format 1 received data count designation to FFFFH 2024 to 2027H 1 This program example gives the register
115. adn JESTE Calculated by the Q series C24 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION REMARKS With a multidrop link the user frame includes data that identifies which station transmitted the message to the external device to facilitate generation of arbitrary send data to the external device External device a Data that identifies the transmitting station C L When message transmitted from the station R No 1 Q series C24 ABC 122 Data designated to the station 123 gt gt lt gt B Arbitrary data No 1 Q series C24 send data User frame designation area CPU C24 5 Station No S S S Data when transmitting T O A TJA T 5 A a frame written to each X X X Q series C24 for transmission C L BIE RIF RIF C24 Q series C24 QC24 N 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 2 Recepti on a When setting for reception by user frame is performed and the first frame is set the Q series C24 receives the message when it receives data with the same contents as the designated first frame If the last frame is set when the Q series C24 receives data with the same contents as the designated last frame it sends a reception data read request to the p
116. and L series C24 ie Q series C24 function version B L series C24 Notification function Supported Not supported When applying the program used in the system of the Q series to the L series refer to precautions for applying a program in the following manual MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals App App 1 App 1 APPENDIX MEMO App App 2 App 2 INDEX A Action for buffer full 16 5 Additional codes 12 1 ASCII BIN conversion 13 1 Auto modem initialization designation 3 42 Block monitoring device 2 22 Buffer memory for modem 3 33 for on demand data transmission 10 2 for user 9 18 BUFROVS 17 3 designation ect 3 44 Callback function 3 22 Callback function designation 3 44 Circuit disconnect wait time programmable controller CPU watch 3 43 Communication data monitoring 16 1 Condition agreement transmission 2 7 Constant cycle transmission 2 6 CPU abnormal monitoring 2 23
117. confirm the following items between the external device and the programmable controller CPU 1 Whether or not half duplex communications can be performed by Q series C24 RS signal and CD signal 2 Qseries C24 RS signal and CD signal ON OFF timing 3 series C24 and external device data transmission timing 4 RS 232 cable connection method 3 Transmission control When the transmission control functions described in Chapter 7 are used DC code control DC1 DC3 transmission control and DC1 DC3 reception control cannot be used with half duplex communications Therefore do not designate them 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION User frames are used to register some or all of the messages exchanged between an external device and the Q series C24 in advance and use them to check the send data or receive data The following functions can use Q series C24 user frames to transmit and receive data MC protocol on demand function See Chapter 10 Non procedure protocol data transmit and receive functions See Chapter 11 Data can be transmitted and received by registering the corresponding user frames to the Q series C24 in advance to match the data contents that are transmitted and received between the external device and the Q series C24 This chapter explains the data that can be registered the data contents that are transmi
118. control If the user data transmitted from the programmable controller CPU includes a DC code it is sent unchanged 6 Handling of DTR and DSR signals when DTR DSR control is not used When the DTR DSR control function is not used the Q series C24 handles the DTR and DSR signals as described below 1 Leaves the DTR signal ON 2 Ignores the DSR signal ON OFF state 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS For data communications between the Q series C24 and an external device using the RS 232 interface it is set so that the Q series C24 and the external device do not transmit data at the same time The QJ71C24 N R2 can be set for each interface When the Q series C24 is started full duplex communications is set The user can change the communications method to match the specifications of the external device Since half duplex communications does not have to be set in the following cases you do not have to read this section 1 When data is only transmitted or receive during non procedure protocol data communications 2 When it is designated in the external device that no data transmission is performed from the external device to the Q series C24 unless so directed by the Q series C24 8 1 Half duplex Communications The following describes the differences between full duplex communications and half duplex communications Since the Q series C
119. controller CPU information clear Refer to User s Manual Basic 1 Q series C24 operation by no reception monitoring time timer 0 Monitors the receive interval in byte units and returns the elapsed time to 0 each time one byte is received At time out the Q series C24 performs the following processing a Data communication using MC protocol Stores the error code to the MC protocol transmission error code storage area buffer memory addresses 25 26An for the target interface Transmits a NAK message to the external device and enters the command message receive wait state 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES b Data communications using non procedure protocol Format 0 1 Data communications not using user frames Passes the receive data up to time out to the Q series C24 Stores the error code to the data receive result storage area buffer memory addresses 258 2684 for the target interface and turns on the reception abnormal detection signal X4 XB and waits to receive the next data Example Receiving according to the received complete code Received complete code CR LF 000 When the LF is not received within the set time for timer 0 after reception of the CR the abnormal reception detection signal to the programmable controller CPU turns ON and the received data at the CR is stored in the received data storage area of the buffer memory Timer 0 Set time External d
120. conversion are added together and the lowest two bytes of the resulting binary code data are treated as a sum check code At transmission The Q series C24 calculates a sum check code using the data length and data section after ASCII BIN conversion then adds it to the transmission message At reception The Q series C24 calculates a sum check code using the received data length and data section prior to ASCII BIN conversion then checks the received head of the sum check code using the code as a lower byte Buffer memory When word units are used Message x1 E T H L at Data length Data section Sum Transmission data N i check count Receive data Q 0002 code _00 _ 024 count Lo OH LiH 34H 12 WLB el Transmission data 30 3241308 301314 32 33 34 135 41 142 431 87H 021 BCH 5 receive data 1 1 L L 1 i I ASCII BIN conversion 1 Calculation of sum check code 30H 324 30H 30H 31H 32H 33H 344 35H 41 424 43H 02871 H L 2 Section 12 5 explains how Q series C24 processes data communicated when ASCII BIN conversion and transparent code designation are both enabled Example External device Q series C24 Head data Data Arbitrary data section Buffer memory transmission area reception area A x
121. data area Setting range 0003H to 1A00H Default 0000 e Monitor data pointer storage area Address according to monitor buffer head address setting Default 2600 3300 1 The oldest data position of the monitor data area is stored using the offset value from the head address of the monitor data area to monitor buffer size specification Default ODOOH 3 oldest data position 2 When the monitoring data exceeds the monitor buffer size the new data is written over the oldest data Ring buffer type The oldest data position of the monitor data area can be confirmed from this area Example 2611H becomes the oldest data when is the monitor data pointer using 2602H as the head address of the monitor data area E Buffer memory batch monitor 2 Module start address 00 Buffer memory address 2600 DEC HEX Monitor format Bit amp word Display 16bitinteger Value C DEC C Bit C 32bit integer HEX z Stop monitor C Word C Real number C ASCII character Address F EDC 358a358 7654 43z210 _Uptionsetup 2600 00020 00020 00020 l111 000 Monitor data pointer 1 Ooo 1100 1111 1110 occrel storage area 0001 0011 0100 0110 1346 z 00201 0011 0100 Q lil _Device test_ Monitor data size 0001 0011 0100 1000 storage aga 00201 0011 002020 1101 00201 0011 002020 10160 Close 0001 0011 0100 0001 0001 0011 0100
122. device Abnormal Status display device 3 completion at completion Normal completion 1 Designates the data of the user frame number to send x2 Programmable controller CPU processing Before issuing a send request to the Q series C24 designate write the following data Transmission user frame designation area User frame No transmission method and transmission order registered in the Q series C24 Transmission area Buffer memory User data corresponding to transmit message arbitrary data area When a transmission data count error or data transmission error is generated the Q series C24 stores the error code to the data transmission result storage area and turns on the transmission abnormal end signal Xn1 11 36 11 36 11 DATA COMMUNICATIONS USING USER FRAMES 11 4 3 Settings for transmission user frames 11 37 These settings are required for sending data to an external device via user frames and the non procedure protocol These settings are made from the GX Configurator SC or the programmable controller CPU 1 Settings via the GX Configurator SC Perform settings on the following screen to send data using user frames Non procedure system settings screen Transmission user frame No designation system settings screen For setting contents on each screen see 2 2 Settings via the programmable controller CPU a How to designate and write transmission data when transmitting via user
123. explanation ist byte 2nd byte iiid Transmission Transmits the data code 00H NUL data 1 byte 10 Reception Skips the given part 1 byte of the receive user frame Skips the check and performs receive 1 Calculation Detailed 00 processing Transmits and receives the station No set in the GX Developer switch setting as 1 byte binary code data 00H to 1FH 044 k 1 Transmi 054 1 Transmi 1 1 Transmi 11 ro Transmits and receives the two s complement sum check code in the calculation range H 1 E 4 1 Range2 E51 1 R 3 6 Transmits and receives the sum check code in the calculation range 2 Except the last one frame H EE Range 1 lacie ata Transmits and receives the sum check code in the calculation range 2 5 piace Range 2 9 Transmits and receives the register code FFH data 1 byte ae 1 For usage of the register code there are restrictions on versions of QJ71C24N R2 R4 and QJ71C24 R2 Refer to Q Corersponding Serial Communication Module User s Manual Basic for how to check the version 2 During data communication using a user frame that handles the last frame the contents of the sum check code set in the transmission setting using the GX Developer switch setting will be ignored 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 3 Calculation ranges for the register codes
124. external device m Transmission to transfer the line usage right Response Station No 1C external device _ Data communications with the programmable controller CPU iii Station No m 1 external device _ The following uses an example to describe the procedure when external devices communicate data with the programmable controller CPU External device that obtained the line usage right 1 External device When communicating Station 1 data with the station No 1 programmable controller CPU External device External device External device Station No 1Cu Station No 1Du IL Station No 1Eu Station No 0x Station No 1u Station No 2u Station No 15u CPU C24 CPU C24 CPU C24 24 C24 series C24 QC24 UC24 1 When the system starts the external device with the lowest station No 1BH is given the line usage right 2 The external device that obtained the line usage right a When communicating data with the programmable controller CPU begins processing from 4 after communicating data with the programmable controller CPU within the maximum data communications time from among all the external devices b When not communicating data with the programmable controller CPU immediately begins processing from 4 3 The external dev
125. file Execute test Close Setting items Setting items Setting values Item details Send Receive data No monitoring Monitor stop Select monitor start for constant monitoring monitoring designation Monitor start Action for buffer full Continue Stop Select stop to stop monitoring when the monitor data area is full Stop by Timer 0 error Continue Stop Select stop to stop monitoring when a timer error occurs Enter a value to change the monitor buffer address Default address 26004 33004 Enter a value the monitor buffer size Monitor buffer size 0003 to 1A00H Default 0000 Monitor buffer head address 0400 to 1AFDu 2600 to 3FFDa 16 4 16 4 16 USING COMMUNICATION DATA MONITORING FUNCTION 2 Buffer memory for communication data monitoring function a Communication data monitoring specification area Address 2018 2118 Set start stop of the communication data monitoring See Section 16 1 2 for communication data monitoring setting operation b15 to bO Buffer memory address 2018 2118 Default 0000 Set the monitor start stop 0000 No monitor Monitor stop 00014 Monitor start 0002 Monitoring Set by Q series C24 1002u Monitor stop Set by Q series C24 100 Monitor setting error Set by series C24 b Monitor option specification area Address 2019 2119 Specify the options of the communication data monitoring function b15 to b3 b2
126. for connection buffer memory 52 10 Registered word blocks count Designate the number of blocks of a word device to be monitored Oto 10 52 11 Registered bit blocks count Designate the number of blocks of a bit device to be monitored 0 to 10 Programmable controller CPU Designate whether or not to execute abnormal monitoring for 82912 abnormal monitoring the programmable controller CPU 0 4 Programmable controller CPU 0 Do not monitor 1 Monitor status monitoring 0 to 5 8001 to 801FH 17 8 17 8 17 DEDICATED INSTRUCTIONS Setting data Designate the code of a device to be monitored 0 Do not monitor device Other than 0 Device code See Section Sele 2 2 2 4 Designate the head number of the monitoring device in this S2 15 block Designate the registration points read points for this block S2 16 0 Do not monitor device 1 or more Registration points 0 10r more For a bit device designate the points word units Designate the monitoring condition for this block S2 17 fd 0 No designation at constant cycle transmission 1 or more Monitoring condition See Section 0 or more Designate the monitoring condition value for this block 2 2 2 2 S2 18 iti 0 or more Monitoring condition Designate for constant cycle transmission Designate the head pointer of the table designating the user frame number for condition agreement transmission for this 82 19 frs
127. frames For arbitrary data section when sending a combination of user frames and arbitrary data section the transmission data count and transmission data are written in the transmission area the same as when sending them in an arbitrary format User frames are registered using the GX Configurator SC Or the user frame registration number to be sent is written from the programmable controller CPU to the transmission user frame designation area of the buffer memory as shown in the diagram below After executing registration write the Q series C24 transmits the designated data in the designated order upon execution of the PRR instruction 11 37 11 DATA COMMUNICATIONS USING USER FRAMES Example Sending data in the following sequence Sending RON Contents of sent registered Transmission data type User frame No sequence data User frame 2H 2 02H STX User frame 3E82H 1000 00H station No Arbitrary data 8000H 32768 41H 42H 43H 44H ABCD 03H FFu ODH OAH 4 User frame 400H 1024 ETX Sum check CR LF Address Buffer memory Transmission user frame designation area 0 or the following frame designation No eeeeeUser frame being transmitted designation No area 7 eeeeeCR LF output designation area B8u Output head pointer designation area 9 eeeeeOutput head pointer designation area 8 2nd To the BCH 80004 3rd 1 2 external de
128. functions Initial setting of Q series C24 See User s Manual Basic Initial setting Registration of the data for initialization See Section 3 4 3 User s Manual Basic of Q series C24 Setting with Registration of connection data See Section 3 4 4 User s Manual Basic tL For data 3 For notification 4 Access from GX Developer communication to QCPU 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Procedure when executing data communications Line Connection Waiting side Q Series C24 Perform the processing up to the modem TA initialization by the procedure in 1 Modem initialization Line connection wait state Modem initialization completed signal X10 ON Line connection completed Line connect signal X12 ON Execute data communications J Line disconnection completed Line connect signal X12 OFF Line connection wait state Modem initialization completed signal X10 ON If data communications is to be executed again carry out communications after line connection from the external device E Shows the value stored for the modem function indicates processing performed by the user Line Connection Side Q Series C24 or Modem External Device Modem Perform the processing up to the modem TA initialization by the procedure in 1 Modem initialization Modem initialization Modem initialization completed si
129. g Data number for initialization designation area address 52 34 1 The registration number for the initialization data transmitted with the initialization request to the modem on the Q series C24 side is designated The registration number for the Q series C24 is used 2 For details on the designation using GX Configurator SC refer to Q Corresponding Serial Communication Module User s Manual Basic An example of designations using the program is shown in Section 3 4 5 h Data number for connection designation area address 53 35H 1 Designates the registration number of the data for connection used by the Q series C24 for the connection processing to the partner device in order to perform data communication notification The registration number for the Q series C24 is used 2 For details on the designation using GX Configurator SC refer to Q Corresponding Serial Communication Module User s Manual Basic An example of designations using the program is shown in Section 3 4 6 i GX Developer connection designation area address 54 36u 1 Whether to access the programmable controller from GX Developer by connecting the Q series C24 and GX Developer using the Q series C24 modem function is designated 2 When connecting the series C24 and GX Developer using the series C24 modem function select personal computer side interface via telephone line connection Q A6TEL C24 When connecting direct shown in Sect
130. has received a communication request prohibits access to the specified station See 2 All data communication before the unlock processing is performed will be processed as an error The Q series C24 of the QCPU station for which a remote password is set will be indicated 2 Access processing Normal completion of the remote password unlock processing allows the specified station to be accessed Perform communication using MC protocol Perform on line operation when the GX Developer is connected 3 Access prohibition processing lock processing When the specified station access is completed the process for disconnecting the line for the modem function is performed in order to disable further access When line disconnection is completed the remote password lock processing is performed automatically 3 COMMUNICATIONS BY THE MODEM FUNCTION When accessing the local station QCPU A station 3 A station 1 Modem Modem r Remote Remote password te Password o pios check 5 3 Local station Ethernet QCPU module Ethernet x1 Unlock and lock processing for the local station oO t1 remote password is possible Remote password unlock and lock processing for Ethernet Ethernet Relay station the relay station and access station cannot be performed module module 2 Lock processing is performed when a line for the modem
131. i i 1 1 1 1 1 OOH 01H OOH 4 044 OOH 00 OOH 014 OOH O2H OOH 03H OOH 004 0 OOH 90 01H 00H 30H 11 OOH OOH OOH 1 O14 OOH OOH 0 1 eer ere W100 W101 W102 W103 i When the word byte unit designation is word rT TT T 7 OT 1 1 8 3 2 528 38 2 8 99 2 9 96 23 98 89 g o9 Jal 22 g g S 2 2 S Ev 2 8 Ev E gt o gt gt 2 2 5 25 8 S 3l 25 E b 5 E z 8 gt d z i 1 H L H H L H L LH L IH UH L He lt b H H i w 1 1 1 1 i i 1 00 015 OOH 4 044 OOH OOH 0 OOH O14 1 OOH 02h 1004 OOH OOH 004 904 01 OOH 11 30H OOH OOH OOH 1 1 OOH OOH OOH Se eee ee W100 W101 W102 W103 i 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION When ASCII BIN conversion is performed The total number of bytes for the device data section is the number of device points X 4 When the word byte unit designation is byte o 2g 58 S o 2g 62 E 8 BB 8 E ii 38 E gt zo Te 2 2 Zo 59 538 g E Sg 58 2 E g 1 1 1 1 1
132. in User s Manual Basic clears the data stored in the OS area The receive area in the buffer memory is not cleared f more data is received when the OS area mentioned above are 0 bytes an SIO error is generated and the data received until the OS area becomes vacant is ignored At this time the SIO signal is turned on Refer to User s Manual Basic 2 Q series C24 DSR control The Q series C24 uses the DSR signal to detect whether or not the external device is ready to receive data and to control data transmission to the external device as shown below depending on whether the DSR is on off 1 Ifthe DSR signal is ON and there is send data the Q series C24 transmits it to the external device 2 Ifthe DSR signal is OFF even if there is send data the Q series C24 does not transmit it to the external device When the DSR signal is turned on the Q series C24 transmits the send data to the external device 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7 2 Control Contents of DC Code Control This control uses the Q series C24 transmission control data to inform the external device whether or not local station is ready to receive data and the valid range of the send and receive data The four kinds of Q series C24 DC code control shown below are available These control functions can be used simultaneously 1 DC1 DC3 transmission control DC1 DC3 reception control The Q series C24 informs the external device w
133. infinite wait set value 0 be sure to perform line disconnection processing after the data has been communicated If the line is left connected for long periods of time without performing line disconnection after data has been communicated not only will telephone bills be applied but it may violate electronic communication business laws 3 The Modem initialization time DR signal valid invalid designation designates whether the status of the DR signal output is valid or invalid at the startup of the Q series C24 When the DR signal ON is output from the modem register valid for this item When the DR signal ON is not output from the modem register invalid for this item b All transmissions using the modem function are transmitted in full duplex Leave the following initial settings for the interface side that uses the modem function as default Default value 1 CD terminal check Not checked 2 Communication system Full duplex communication c The processes that correspond to the following output signals may not be aborted Output signal Requesting process name Y10 Initialization request standby request Y11 Connection request It is recommended to leave the following initial settings for the modem functions as default Upon error it will end due to time out Default value 1 Number of connection retries 3 times 2 Connection retry intervals 180s 3 Initialization connection tim
134. initialization data SET Y10 1 for No automatic receive is specified and initialization requested SET M204 J The modem initialization data setting flag is set RST M203 M204 Y10 X10 E QNI SET M205 4 The modem initialization normal completion flag is set RST Y10 The modem initialization request signal is reset RST M204 X13 Mo y FROMP HO H221 D100 Ki j Error code is read if the modem initialization completes abnormally lt gt 0100 SET M206 The modem initialization ERR occurrence flag is set tT Y10 The modem initialization request signal is reset RST M204 M205 X10 Yo At HO H22FB K2 The unlock processing accumulated count is cleared SET M207 The modem initialization processing normal completion flag is set RST M205 X27 4 RST M206 JAn instruction from the user resets the flag RST M207 1 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 Start up of the Modem Function This section explains the start up procedures processing methods and programming when the modem function of the Q series C24 is to be used 3 4 1 Start up procedures when communicating data with external devices This section shows the procedure for starting the modem function and up to the point when data communications is started 1 Procedure up to initialization of the Q Series C24 s modem TA This initializes the modem TA connected to the Q Series C24 in orde
135. it waits to receive the next command message without sending a response message NAK message to the external device During on demand data transmission the Q series C24 stores the error code to the on demand execution result storage area buffer memory addresses 256 266 for the target interface If transmission was terminated midway in either of the cases above the Q series C24 does not transmit the remaining data 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2 Data communications using non procedure protocol or bidirectional protocol While waiting for the end of transmission of a message the series C24 stores the error code to the data transmission result storage area buffer memory addresses 257 267 for the target interface and performs transmission processing abnormal completion If message transmission was terminated midway the Q series C24 does not transmit the remaining data If waiting for the end of transmission of a response message the series C24 stores the error code to the data receive result storage area buffer memory addresses 2584 268 for the target device and turns on the reception abnormal detection signal X4 XB 1 When the receive data read complete the Q series C24 turns off the reception abnormal detection signal X4 XB and waits to receive the next command If transmission of the response message was terminated midway the Q series C24 does not transmit the remaining da
136. methods Setthe accumulated count value in the GX Configurator SC s modem function monitoring test screen to O Write O to the affected storage area in the buffer memory Refer to User s Manual Basic for the method for turning off the Q Series C24 s ERR LED when it lights up 3 COMMUNICATIONS BY THE MODEM FUNCTION 11 Preventing a line disconnect when the GX Developer is connected Perform the following settings and operations to prevent a line to the modem from disconnecting even if communication between the GX Developer and programmable controller is interrupted a Initial setting using the GX Configurator SC 1 Setting screen Modem function system setting screen 2 Setting item No communication interval time designation 3 Setting value 0 infinite wait b Operation using the GX Developer Always perform the line disconnect operation when the GX Developer on line operation is completed after the line to the Q series C24 side is connected 12 An example of what to do on the programmable controller CPU side for improper access from the external device The following is an example of performing on the programmable controller CPU side the line disconnect processing with respect to the opposite device and prohibiting receive via a modem when the number of remote password mismatch detected by the Q series C24 remote password check function exceeds the number set by the user 1 The user should determine the cou
137. modem of the Q series C24 side and external device side is performed at each device sides 2 The line is connected from the external device 3 The external device performs the remote password unlock release processing for the QCPU of the station where the Q series C24 is installed using dedicated commands for MC protocol communication The unlock processing cannot be performed for the QCPU of other station See Section 3 3 7 8 for what to do when the remote password unlock processing is completed abnormally 4 Data communication is performed from the external device using MC protocol 5 When data communication using MC protocol is completed a line for the modem is disconnected from the external device When line disconnection is completed the remote password lock processing is performed automatically 1 Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual for the unlock processing command for the remote password 2 When accessing the programmable controller from the GX Developer connected to the Q series C24 the remote password unlock processing is performed when on line operation begins 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 How to set the remote password On the screen below for setting parameters remote password using the GX Developer set the remote password in the QCPU and specify the Q series C24 that performs the check Set the remote password as the following instructions Star
138. protocol Programmable controller access using the GX Developer 2 Initialization of a modem or TA line connection dialing and line disconnection are performed by the programmable controller CPU 3 When a remote password is set in the QCPU with the GX Developer the following access from the external device to QCPU using the Q series C24 modem function can be performed by executing the unlock processing to the remote password Data communication using MC protocol Accessing the programmable controller using the GX Developer The remote password function is a QCPU function designed to prevent improper access to the QCPU by users The QCPU remote password function can be used by setting a remote password in the QCPU with the GX Developer Q series C24 Modem TA 1 Eat EM Modem TA 1 External device Pager receiver x1 TA is an abbreviation for Terminal Adapter 1 OVERVIEW 3 Receiving data with an interrupt program detailed explanation in Chapter 4 1 In data communication between the Q series C24 and the external device data can be received using an interrupt program with the following data communication functions Data reception during communication using the non procedure protocol Data reception during communication using the bidirectional protocol 2 Receiving data using an interrupt program expedites data reception by the programmable controller CPU Data Q series C2
139. read this chapter when using a system configuration other than m n to communicate data This section describes the case when data is communicated between external devices and the programmable controller CPU by connecting multiple external devices m stations and multiple Q series C24 n stations over a multidrop link The total number of m and n is up to 32 stations With this m n multidrop link only MC protocol data communications by command transmission from the external devices can be performed 14 1 Data Communications Precautions 14 1 1 When communicating data by using an m n system configuration multiple external devices cannot communicate data with the programmable controller CPU at the same time Interlock the external devices so that the external device can communicate with the programmable controller CPU in a 1 1 configuration See Sections 14 2 and 14 3 for the items to be agreed upon and the interlock method to interlock the external devices 2 Communicate data between external devices and the programmable controller CPU by the following methods only Full duplex data communications m n data communications is impossible with half duplex data communications Data communications by command transmission from external device using an MC protocol excluding the format 3 and format 5 control procedure Data communications using the format 3 and format 5 control program and data transmission from sequence p
140. reception designation 1st to 4th gt 0 MOV H8001 6174 0 wov H8002 6175 0 MOV H6 G176 UOV MoV H15 0177 lt Last frame No for reception designation 1st to 4th gt 0 MOV H8005 G178 lt lt Wait until data communications are enabled gt gt Mi 0 H a3 0 MOV HO 6179 0 HO 6180 0 MOV HO G181 lt Reception format designation 2 to 3 format 1 specified gt 0 MOV K 68225 0 _User frame setting for reception Mov K 68226 See Section 11 2 4 0 K 68227 lt Format 1 received data count designation 2 to 3 gt 0 Mov K12 G8229 0 wov 68230 0 MOV K2 68231 lt Set to enable user frame gt ON MOV K1 6173 SET RST lt Reception is ready gt SET M2 E 2 lt lt Start communications after M2 turns ON gt gt lt Reads combination No gt X3 UO wovp 6603 po Reads combination of received user frames x4 MOVP DI Sets to CH1 for reception channel MOVP K20 D4 Sets to 20 for No of allowable reception data lt Reads reception data gt G INPUT UO DI D10 M3 Executes reception M3 M4 SET M100 Sets normal completion flag M SET M101 Sets abnormal completion flag 11 25 11 25 11 DATA COMMUNICATIONS USING USER FRAMES 11 3 2 Application example for data reception using a combination that specifies the first frame In the description of this program example conditions for data reception using
141. reception area Arbitrary data section ry ae Transmission data Send 2 E 8 a 00024 count Receive data lt S O04 024 count ao _ _ Transmission data ECE ret se receive data Receive 9 5 _ The data count is in word units Transparent code For 414 Additional code For 104 1 12 15 12 15 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 6 Example of Data Communication Using the Bidirectional Protocol This section shows examples of the bidirectional protocol data communication when the following settings and registrations are made 1 Settings via GX Developer Perform the following settings on the Switch setting screen Setting item Setting value Transmission setting Set according to the Switch 1 CH1 Communication rate ICH1 Communication rate setting external device CH1 Communication protocol boven ci Switch 2 ti 0007H Bidirectional protocol se MT CH2 Transmission ICH2 Transmission setting Switch 3 0000 CH2 Communication rate setting Not used n CH2 Communication protocol Switch 4 ww setting 7 Q series C24 station Switch 5 Station No setting 0000H number 2 Settings via GX Configurator SC Register the following settings on the Transmission control and others system setting screen For items other than those listed below the default values are used Registration screen Setting item Setting v
142. reception using first frame and last frame combination station No Sum check External device User frame use control ADH designation First frame No designation H Programmable First frame Last frame 3E8H 1st controller CPU Correspond to register Late Nos 3E8x and 41 9 2 BO Reception data read X83 15H 4th Last frame No designation Programmable 2 41Bu ist controller CPU None 0 2 Completion device MO 2 TS 2nd ON 1 tt mms B e Status display device y completion 9 None A 1 1 S B5 atcompletion Normal completion 5 4th D Receive transparent i i 5 120 YES NO code designation u 1002 1 scan 2 Disable ASCII BIN conversion 121 Qu designation i 2 25Bu Receive user frame to DO 1H ith 3 Receive data count 600 to D3 00H B User frame receive 2020 format designation 1st Format 0 2021 Ou 2nd Format 0 2022 1 3rd Format 1 1 4th Format 1 Exclusive format 1 2024 Qu received data count 1st 2025 On 2nd 2026 2027 2 4th Buffer memory Reception data read request x83 ss gs FROMP H8 H25B DO KI of user frames MOVP KI 01 Sets CH1 to the reception channel Sets the allowable number of reception MovP K6 D4 data to 6 G INPUT us 01 010 MO Executes reception y SET M100 Sets the normal compl
143. regardless of whether the communication uses the non procedure protocol or bidirectional protocol For more details on the BUFROVS instruction see Section 17 2 Create a program that enables disables interrupts during execution of the main program in order to start the interrupt program Use the El DI and IMASK instructions 4 4 2 Precautions when receiving data with an interrupt program The following shows the precautionary notes when receiving data with an interrupt program 1 Create an interrupt program for data reception for each interface 2 Use GX Configurator SC to set whether or not the interrupt program is started Whether or not the interrupt program is started can also be set with direct writing to the buffer memory However if it is specified during data reception the interrupt program will not start 3 Do not use the INPUT and BIDIN instructions during execution of the interrupt program Always use the BUFRCVS instruction to receive data 4 Do not turn the reception data read completion signal Y1 Y8 ON OFF during execution of the interrupt program 5 Use always ON SM400 or direct input signal DX3 DX4 as the contact signal when executing the BUFRCVS instruction Refer to Section 17 2 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 6 After the power supply turns from OFF to ON or the programmable controller CPU is reset data cannot be received because the interrupt program is invalidated during
144. series C24 at both station A and station B 2 Perform modem TA initialization in station B 3 Perform modem TA initialization and line connection in station A 4 Communicate data using the non procedure protocol bidirectional protocol 5 In order to end the communication disconnect line from station A that initiated the line connection Station A connection request side Connection Communication Disconnection Connection 11 xi request 3 1 Initialization xo completion Pa Connection in i 7 progress j j Disconnection 1 request Disconnection X14 completion RS 232 CD terminal a Station B connection reception side i Initialization ON completion i i Connection in x12 A ay Disconnection OFF request A Disconnection x14 i OFF RS 232 CD te rminal It is possible to disconnect line from Station B as well 3 COMMUNICATIONS BY THE MODEM FUNCTION b When notifying to pager receiver 1 Initial setting by GX Configurator SC Register the data number registration area for connection below in the Modem function system setting screen BB8n to BD5x 3000 to 3029 Data registered to the Flash ROM by the user 8001 to 801FH 32767 to 32737 Data registered to the buffer memory by
145. status information the device information registered in the word block and then the device information registered in the bit block Example Number of registered word blocks 2 DO to D3 4 points W100 to W103 4 points Number of registered bit blocks 1 MO to M15 1 point When the condition satisfied monitoring device is W100 0 and MO ON When ASCII BIN conversion is not performed The total number of bytes the device data section is the number of device points X 2 When the word byte unit designation is byte 00H device Monitoring head 01H 00H For W100 to W103 block data Device code 4 registered points r 04 I 00 00 00 01 OOH 024 OOH 00H For to M15 block data Device data device Device code Number of registered points Device data Monitoring head I AN A 2 Y vY Y Y W100 W101 W102 W103 When the word byte unit designation is word 00H device Monitoring head 014 004 For W100 to W103 block data Device code 4 Number of registered points r 04 I 00 00 OOH 0 014 1 0 024 00H 03x For MO to M15 block data Device data Monitoring head device Device code Number of registered points Device data Y Y Y W100 W101 W102 W103 2 USING
146. system settings Received data count designation 0006H 12 8 12 8 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 4 1 Example of data reception The following shows an example of storing receive data in the data register 1 Receiving based on the receive complete code Additional code 10H DLE transparent code 02H STX complete code ODOAH CR LF Additional code Q series C24 deletes Head data Transparent code For word unit Received byte count excluding additional code 12 2 6 For byte unit External device side Received byte count excluding additional code 12 30H 316324 338108024 004414 420 348 12 00 1 1 1 i L L 1 1 y Programmable controller CPU side Reception data read request X83 Received data Programmable count is stored controller CPU The following diagram is for word unit i SECO 4 Abnormal Pd completion Completion device MO Status display device M1 at completign Normal 800 001 06s completion 601 1 0 0 0 5 1 30H e 9 0 3 0 33H 32 33H 32H 603 NULL STX NULL STX 024 0 024 6044 dtu 425 41 12344 12344 094 124 34n 606 LF CR LF CR 0A 0D Buffer memory Sequence program device memory Reception data read request x83 i WWP KI
147. that wants to communicate data with the programmable controller CPU sends a communications request to the master station to obtain the line usage right A message structure example is shown in 2 2 The master station transmits a permission granted response to the slave station that issued the communications request Massage of 1 4 1 Command ZX is a communications request command for description purpose The user should select the command that requests communications External device of slave station that wants to obtain the line usage right 1 destination station No Sum check e 2 E 9 c g E Transmission station No Massage wait source station No Permission granted permission not granted Master station external device 1 destination station No Transmission Transmission 1B 1 31 424 344 43x Massage of 2 as 2 5 External device that obtained the line usage right Mater station X Before 6 After 6 External device Station No 1Cu External device External device Station No 1Du Station No 1Ex Station No 15u C24 Q series C24 QC24 N UC24 3 After communicating data with the programmable controller CPU within the maximum data communications time from among the external devices the slave station that received the permission granted response goes to ste
148. the connection in progress signal X12 turns ON after the completion of Q series C24 modem TA initialization For an example of the modem TA program for initialization see Section 3 4 7 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 7 Data communication and notification This section explains the cautions for data communication with the partner device using modem function and procedures for notification to pager receivers 1 Requirements for data communication and notification a When communicating data with external devices Perform the appropriate processing up to line connection or modem TA initialization depending on whether or not the line connection is initiated from the Q series C24 side After line connection data communication can be performed using an MC protocol non procedure protocol bidirectional protocol in full duplex communication 1 When line connecting from the Q series C24 side Processing up to line connection as shown in Section 3 4 6 2 When line connecting from the external device Processing up to the initialization of the modem TA as shown in Section 3 4 5 b When notifying to pager receivers Perform processing up to the initialization of the modem TA as shown in Section 3 4 5 In notification to pager receiver since the line connection is performed during notification processing line connection processing is unnecessary However be sure to register data for connection 2 Buffer memory used
149. the Flash ROM may be checked in data registration for modem initialization screen for GX Configurator SC or the buffer memory address 226 to 228 550 to 552 When newly registering register by designating an unregistered number 3 COMMUNICATIONS BY THE MODEM FUNCTION When designating a registration number that has already been registered first delete the registration data in the preoccupied registration number prior to registration 4 When connecting the Q series C24 to an external device using a cellular phone and a modem set the transmission rate supported by the cellular communication module on the modem side 5 Registration contents at shipment 1 The data for initialization registered in the Flash ROM of the Q series C24 are shown below Registration number M Initialization command Hexadecimal Decimal 2012 2 If initialization commands other than listed above are needed the data for initialization needs to be registered to the Flash ROM or the buffer memory of the Q series C24 Perform the following setting in respect to the modem TA connected to the series C24 side For settings other than listed below perform the setting as designated by the modem TA The following shows an specification example of the transmission rate supported by the cellular communication module using the modem initialization command when connecting the Q series C24 to an external device using
150. the initial processing of the programmable controller CPU For asynchronous data communication with the Q series C24 from the external device without communication procedure setting read the data as shown in the following program series C24 I O signals are from X YOO to X Y1F rel SM402 x3 MOVP X4 D3 INPUT UO 00 010 After RUN 1 scan only INPUT instruction execution MO mue im 1 Mt Normal completion processing 5 XOE m_e CH1 error information is initialized FEND 150 SM400 z BUFRCVS Uo 0200 Received interrupt program execution IRET 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS WORD BYTES UNITS SETTING 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS WORD BYTES UNITS SETTING 5 Name of buffer memory related to Data communications function Reference manual data length units Address CH1 CH2 MC protocol Non procedure protocol Bidirectional protocol The word units are used for the data length count of the amount of data sent received using the following data communication functions in data communication between the Q series C24 and the external device This chapter explains how to change the units word to byte byte to word of the data length count sent received with the following data communication functions The data length units can be set for each Q seri
151. the programmable controller CPU monitoring function is used 3 When transmission stops by DTR DSR control Both the constant cycle transmission and the condition agreement transmission cannot be designated together for the same interface Only the local station s programmable controller CPU can be the target for the programmable controller CPU monitoring function A new programmable controller CPU monitoring registration cannot be performed while the programmable controller CPU monitoring function is in operation In this case 1 Perform the new programmable controller CPU monitoring registration after canceling the programmable controller CPU monitoring 2 If the new programmable controller CPU monitoring registration is performed without canceling the programmable controller CPU monitoring an error will occur Also for programmable controller CPU monitoring registration using GX Configurator SC perform the registration after placing the programmable controller CPU in the STOP status and then restart QCPU While the programmable controller CPU monitoring function is in operation even if an error occurs with transmission notification of the programmable controller CPU monitoring results or reading of data from the programmable controller CPU the programmable controller CPU monitoring function operation will not stop The programmable controller CPU monitoring function can only be used when the system configuration is 1 1 2 US
152. then sent Q series C24 Transparent code designation Sum check code setting ASCII BIN conversion designation No No No Buffer memory Yes Transmission Arbitrary data section only area Data transmission ASCII BIN conversion of transmission data count and transmission data Calculation and check of sum check code Adding transmission control code ENQ Response reception Yes Error code section only No 1 Transmission Yes ASCII BIN conversion result storage Of error code i area No Example The following example shows the data arrangement when data is sent and received The communication section of the response message is omitted When the ASCII BIN conversion is not performed Deleting transmission control code ACK NAK External device Q series C24 Head dat Buffer memory transmission area reception area D Arbitrary data section i Er Transmission data Send Eon 00028 ___ count Receive data 02 count 5 i 02124 I M _ _ Transmission data receive data Eo BCh Receive 239 ee A The data count is in word units Additional code For 104 Transparent code For 024 When the ASCII BIN conversion is performed External device Q series C24 Buffer memory transmission area
153. to infinity or the following time or longer Response monitoring time Maximum number of scans required to process the command used X communications time When setting the default value to infinity check the external device response wait time and initialize the Q series C24 transmission sequence when time out is generated Refer to the section describing Contents of data designation item of each frame in the MELSEC Q L MELSEC Communication Protocol Reference Manual Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual for the maximum number of scans and the communication time required by processing 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2 Data communications using bidirectional protocol Set the default value to the following time or longer Sequence scan time X 2 100 ms 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 3 Transmission Monitoring Time timer 2 Setting The transmission monitoring time timer 2 clears the wait state when the Q series C24 that is to transmit a message or response message result has entered the transmission end wait state due to trouble in the external device When the Q series C24 transmits a message it monitors the wait time up to the end of transmission of the message When the Q series C24 received a message from the external device it monitors the wait time up to the end of transmission of the response message The following expla
154. to the present after the line connection b Remote password mismatch notification accumulated count designation address 8205 2000 1 Use 0 to FFFFu to designate the accumulated count that will be the notification timing to the QCPU when a remote password mismatch occurs during the user external device unlock processing after the Q series C24 has been started up 2 The accumulated number of times up to the present a remote password mismatch occurred accumulated count value in the Q series C24 after starting up can be checked in the area where the accumulated count of unlock process abnormal completion is stored address 8956 22FCx c Storage area for accumulated count of unlock process normal completion address 8955 22 The accumulated number of times the remote password unlock process has been completed normally is stored d Storage area for accumulated count of unlock process abnormal completion address 8956 22FCu The accumulated number of times the remote password unlock process has been completed abnormally is stored e Storage area for accumulated count of lock process based on circuit line disconnection address 8959 22FFu The accumulated number of times the Q series C24 has automatically performed the lock process due to a modem line disconnection is stored Each of the accumulated count values stored in c to e above are further explained below 1 The user can clear the values using either o
155. transmission Transmission notification when the information read from the programmable controller CPU agrees with conditions set by the user Condition agreement transmission b The programmable controller CPU monitoring function can be used in communication using MC protocol or non procedure protocol c Using the programmable controller CPU monitoring function makes it possible to do the following Sends device data without using a sequence program Simplifies the device monitor procedure Sends the programmable controller CPU error information WELSEC SEE External device POWER Eu lc Jee cc CHE TO soo m CPU error Monitoring information device information n E 4nd HE E USB s Abnormal detection RS 232 MITSUBISHI P L Error occurrence 1 OVERVIEW 2 Communicating with the external device at a remote location via a modem detailed explanation in Chapter 3 1 Connecting a modem or TA terminal adapter to the RS 232 interface facilitates communication via a public line private line digital line ISDN such as data communication with a device at a remote location listed below and calling a pager device Data communication using the MC protocol Data sending and receiving using the non procedure protocol Data communication using the bidirectional
156. turn off the initialization complete signal X10 In the case of series C24 when the line is disconnected from the external device the initialization complete signal X10 at the local station is not turned OFF 3 COMMUNICATIONS BY THE MODEM FUNCTION 1 Line disconnection processing can be conducted from either device as long as the connection is in progress 2 The line disconnection processing disconnects the line connection with the external device as well as the connection with the Q series C24 modem 3 Even when an error occurs during the line disconnection the disconnection processing will be forced 4 If data communication is to be resumed after line disconnection either one of the following processing will be initiated depending on the initialization complete signal X10 1 Ifthe initialization complete signal is OFF Start from the initialization of the modem TA 2 Ifthe initialization complete signal is ON Start from the line connection with the external device There is no buffer memory for line disconnection processing 2 Precautions during the line disconnection 1 Prior to data communication with external devices determine when and which station will perform the line connection dialing and line disconnection processing to the external device 2 Ifthe line is disconnected during data transmission transmission processing will be performed depending on the signal status of the Q series C24 RS 2
157. unlock processing with respect to the Q series C24 of the directly connected station local station after line connection for the modem function it can access the local station QCPU 2 When accessing the programmable controller of another station via the Ethernet module of a relay station or access station the following settings determine whether access is allowed prohibited To prohibit access to other station from an external device using the CC Link IE controller network MELSECNET H or MELSECNET 10 relay communication function of the Ethernet module place a check mark at the following setting items in the remote password setting for the relay station or access station GX Developer communication port UDP IP dedicated commands CC IE Control MNET 10 H relay communication port Set on the GX Developer remote password setting screen If a check mark is not placed at the above setting items access to other station will be allowed 3 See the user s manual Basic for the Ethernet module for stations that can be accessed when accessing other station programmable controllers via the Ethernet module When reading the manual substitute the Q series C24 with the station connected to the external device 3 Data communication procedure This section explains the procedure when the external device performs data communication via the Q series C24 in which the remote password check is performed 1 Initialization of the
158. when using the L series C24 IMPORTANT Do not write data in the system area of the buffer memory If data is written in the system area the programmable controller system may 9728 to 16383 26001 to 3FFFi operate abnormally There is also a partial system area in the user s area Be careful when reading and writing from and to the buffer memory 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Details of the buffer memory for modern function Notification abnormal completion signal Notification issued request signal Q series C24 ready xtE signal X16 X14 a Modem connection channel designation area address 46 2 The interface on the series C24 side to which a modem TA is connected is designated b Notification execution designation area address 47 2 Whether or not to perform notification message transmission to the pager receiver during the fall of the notification issued request signal Y14 is designated c Number of connection retries designation area address 48 30 1 Designates the number of retries for the notification connection request when the connection could not be made to the partner device by the notification request connection request 2 The default value is recommended to use for the number of connection retries d Connection retry interval designation area address 49 31 1 Designates the interval time of the retry processing for the notification
159. with the programmable controller CPU is complete During this time the slave stations do not communicate data with the master station until master station data communications is complete Example 1 1 Station No for all external devices EPHE EE general report 2 28 2 Commands ZX and ZY are commands External device of ESS E S 9 for d ipti H 5 master station that 2952 S AE purposes i 1 E E The user should select the command obtained the line gt usage right 1 ar 1B 0 when the master station communicates 3B 31 464 31 42 5 58 306 data with slave stations 1 2 External device of 5 8 3585 F 38 master station that 225205 E Etzz5 x 5 SIE transmits g 48 communications E gt complete report o 18 zv 0 08 1B 3B 31 464 31 42 5A 59 30 30 38x 14 11 15 SWITCHING THE MODE AFTER STARTING 15 SWITCHING THE MODE AFTER STARTING This function forcefully switches the current communication protocol and transmission specifications of the designated interface from an external device and the programmable controller CPU after the Q series C24 starts When the Q series C24 starts it begins operation with the setting values of the GX Developer switch setting The mode switching function is used to change the communication protocol of the specif
160. x12 ON data communications are carried out by the non procedure protocol through a command from the user Perform the following settings before running this program a GX Developer switch settings See Section 3 4 2 Switch No Setting value Switch 1 07 2 Switch 2 0006 Switch 5 0000 b Settings by the GX Configurator SC See Section 3 4 2 Perform the following settings in each setting screen Use the default settings in screens and setting items other than those shown below 1 Modem function system settings Modem function system setting screen AA Setting value setting items Modem connection channel designation O Data No for initialization designation 07D5 Auto modem initialization designation Auto initialize lt Status confirmation gt 3 COMMUNICATIONS BY THE MODEM FUNCTION XIE XIF CHO Access possible NO X10 X12 N92 o 1 PAS M51 j Data transmission possible Data transmission processing non procedure protocol X22 4 E M52 N52 M51 u 1 NO2 TO NO1 51 Set the transmission data HOAOD 56 NOV 150 1 Set the transmission channel on CH1 Tov KO 151 K6 152 1 Set the transmission data count G OUTPUT 0150 Dbi 50 Execute transmission request SET M92 1 M150 151 FING c50 4 Transmission normally 2 completed 151 FING 051 1 Transmissio
161. y completion at completion M1 1 Normal The following diagram is for word unit completion 4 Address One scan D3 04 400 04y 1102u 11021 D10 024 401 tty 024 B A B A DU 41 4024 41 a fm jm es 0 03H 00H 03H LF CR LF CR D 3 4044 Sequence program Buffer memory device memory Transmission instruction X50 m VP DO Sets CH1 to the transmission channel MVP K4 02 Sets transmission data count to 4 vove H1102 D10 Sets the transmission data in D10 to D13 MVP H4241 pit MVP 012 MOVP HOAOD 013 aP BIDOUT Do D10 Executes transmission Mo Mt SET M100 Sets the normal completion flag SET M101 Sets the abnormal completion flag 12 19 12 19 12 TRANSPARENT CODES AND ADDITIONAL CODES 2 When the send transparent code designation is set to Enabled and the ASCII BIN conversion is set to Enabled Additional code 10H DLE transparent code 02H STX 1st group Additional cede 10H DLE transparent code 03H ETX 2nd group External device side Programmable controller CPU side Lr Bo 1 i 0 4 0 0 0 2 1 1 4 05 30 34 30 30 30 32 31 31 34 3 Roa 1 1 41 143 Transmission command X50 Data length No of transmission data Excluding additional code For word unit Byte count before ASCII BIN conversion 8
162. 0 modules Callback connection during max designated number is 10 Connection is possible with only those GX Developers max 10 modules with a callback destination telephone No registered in the Q Series C24 A description of the callback operation in 1 to 3 is shown in 4 b 1 Line Connection Selection of the Setting of callback function P 2 Temporary line disconnection connection system designation settings by the E R E and line connections GX Configurator SC f 3 Line connection gt NJ 4 Access to the QCPU x 5 Line disconnection 4 NS GX Developer QS eries C24 Processing for GX Developer to access the QCPU Briss Processing by the callback function 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Data communications procedure Here the procedure for data communications when using the callback function is shown C24 side procedure Carry out procedure of starting the modem function and data communications in accordance with Section 3 4 1 1 Set the callback function by the GX Configurator SC See 4 2 Initialize the Series C24 side modem See Section 3 4 3 The modem s initialization completed signal X10 goes On when modem initialization is completed Wait for the line connection from the GX Developer Select the connection system connect way from the GX Developer
163. 010 to 011 HOV H5678 D11 RST M100 Resets the normal completion flag RST 101 Resets the abnormal completion flag SET M51 Sets ine transmission preparation completion flag M51 a ONDEMAND UO DIO Mo Executes on demand transmission MO M1 SET M100 Normal completion Wi tN cer M101 Abnormal completion Resets the transmission preparation RST w51 completion flag 1 The SPBUSY instruction can be used to read the communication status by the dedicated instruction 2 For details on the dedicated instructions refer to User s Manual Basic 3 Designate the storage capacity for transmission data stored in D10 to D11 in the above program example and data length stored in D2 in the above program example so that they do not exceed the range of buffer memory assigned by the user for the on demand function 10 9 10 9 11 DATA COMMUNICATIONS USING USER FRAMES 11 DATA COMMUNICATIONS USING USER FRAMES Registering the fixed format portion of the message transmitted received by the opposite device and the Q series C24 as a user frame beforehand allows data transmission reception using a user frame The use of the user frame to perform data transmission reception facilitates the creation of transmission data on the programmable controller CPU side and a simplified sequence program for checking the reception data This Chapter explains the data transmission reception method and procedure when performing data communication with the
164. 014 to 210 Function OBB8 to OBD5a 80014 to 801 Data number for callback 8944 22F0 Callback permit accumulated count 0 or more Accumulated count 8945 22F tu Callback denial accumulated count 0 or more Accumulated count 8946 2221 For Auto callback connection permit accumulated count function 0 or more Accumulated count 8947 22F3x Auto callback connection denial accumulated count 0 or more Accumulated count Accumulated count of callback receive procedure cancel 8978 22F4 0 or Accumulated count 8949 to 8954 22F5 22 Use prohibited System area H 8955 22FB ETE Accumulated count of unlock process normal meet 0 or greater Accumulated count of normal completion 8956 22FC Accumulated count of unlock process abnormal completion 0 or greater Accumulated count of abnormal completion 8957 to 8958 22FD 22FEx Use prohibited System area For remote Accumulated count of lock process based on circuit line disconnection 8959 22FFu password 0 or greater Accumulated count of lock process based on circuit line function disconnection 9216 2400 Use prohibited System area User free area 2 6656 words For user 1 Communication data monitoring function default buffer Usage is determined by the user 1 Only the QJ71C24N R2 R4 are usable System area when using QJ71C24 R2 2 Only the Q series C24 is usable System area
165. 1 9 g 4 1 3 If it is being made possible to change the callback destination GX Developer Setting 2 Setting 5 34 Callback connection during designated number 4 Ifthe maximum number of callback destination GX Developers is limited to 10 modules Setting 3 Fi Setting 6 7 Callback connection during max designated number is HS en Sting S Zn 10 1 If the callback function is not used Auto Default Value Select this if the callback function is not being used Data communications becomes possible after line connection from the GX Developer 2 Ifthe callback destination GX Developer is fixed 1 module Setting 1 9H or setting 4 1H Select this if the Q Series C24 fixes the telephone No 1 module of the GX Developer side that is being called back The Q Series C24 executes callback to the GX Developer side using connection data set in the following data No 1 for callback shown below At this time the external line dialing line types and telephone number in the connection data become valid Set callback data number 1 in the Modem function system settings screen Example If line connections are being made with Callback connection during fixed as the connection system 1 Line Connection Callback connection during fixed i Selection of the connection system and line connections Setting of callback function designation settings by the GX Configur
166. 1 The initialization data or data for connection can be stored into the buffer memory as well as the Q series C24 s Flash ROM Data type Registration destination Registration number Decimal Hex EN Flash ROM Data registered by the OS 2000 to 2013 7DOH to 7DDH Initialization data User registered data 2500 to 2529 9C4H to 9E1H All registered by user 32767 to 32737 80014 to 801FH 2 Flash ROM All registered by user 3000 to 3029 BB8H to BD5H Data for connection All registered by user 32767 to 32737 8001 to 801FH A registration number for the initialization data or data for connection to the buffer memory is in the range of 32767 to 32737 8001 to 801 and determined by the used area 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 In this area the number of bytes for the initialization data or data for connection for 1 data to be registered to the buffer memory is designated 3 The registration of data for initialization is described in Section 3 4 3 The registration of data for connection is described in Section 3 4 4 b15 to bO Buffer memory address 6912 1 00 0 to 78 80 8142 1 0 to 78 80 Number of bytes 0 No registration data 1 to 78 Registration data exists for initialization 80 Registration data exists for connection u For user frame registration User frame designation area address 6913 to 6952 6954 to 6993 1 01 to 1B28H 1 2 to 1
167. 21 D102 Reads the error code at notification completion SET 14 RST M6 Resets the flag with the clear command RST M69 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 8 Line disconnection This section explains the line disconnection upon communication completion when communicating data with the external device using the modem functions In case of notification to pager receivers since the line will be disconnected at the end of the notification processing the disconnection processing such as I O signal disconnection request Y12 is unnecessary 1 I O signal used Uses modem disconnection request signal Y12 and modem disconnection complete signal Y14 1 Host station Communication Disconnection Initialization completion X10 Connection in progress x12 T Modem Y12 disconnection request i Modem disconnection BEI completion X14 Li External station series C24 es aes Initialization x10 E EN completion NE WON LED E EE E 1 4 1 Connection in EN RE ie i Io a progress x12 nt 7 7 uk 1 E Modem Y12 E OFF E E disconnection request 1 D t T 1 1 1 TAOS uc pome Modem disconnection Myr OFF A S y if completion x14 This is the procedure to take in order to
168. 24 uses the communications method designated by the user to control programmable controller CPU communications control by sequence program is unnecessary 1 Full duplex communications This communication method uses telephone conversation format image to communicate data with the external device The Q series C24 can receive data while transmitting data to the external device It can also transmit data while receiving data from the external device External device Data A 1 Data A 2 Programmable Data B 1 Data B 2 controller CPU 2 Half duplex communications This communications method uses transceiver conversation format image to communicate data with the external device If the Q series C24 receives data from the external device while transmitting data to the external device it controls data transmission and reception according to Simultaneous transmission priority non priority designation The Q series C24 does not transmit data while it is receiving data from the external device External device Data A 1 Data A 2 Programmable Data B 1 Data B 2 controller CPU 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 8 2 Data Transmission and Reception Timing Half duplex communications uses the Q series C24 RS 232 interface CD and RS signals to control communications If the external device can transmit and receive data according to ON OFF of the Q series C24 RS and CD signals as shown below half duplex communications i
169. 3 2 2 3 Timing for programmable controller CPU monitoring eene 2 5 2 2 4 Timings of transmission and notification of monitoring results to the external device 2 6 2 2 5 Transmission methods of monitoring results and transmission data to the external device 2 9 2 2 6 Execution sequence for using the programmable controller CPU monitoring function 2 20 2 3 Settings for Using the Programmable Controller CPU Monitoring 2 21 2 3 1 System setting items for the programmable controller CPU monitoring function 2 21 2 3 2 How to register and cancel the programmable controller CPU monitoring function 2 26 2 4 Precautionary Notes for Using the Programmable Controller CPU Monitoring Function 2 28 owe 3 1 Sbe Foa S tse es t 3 2 3 4 2 Eunctuon list neret deter aUe aed Lee neret 3 5 3 1 3 Comparisons with related devices cccccceccecesceeeeceeeeneeceneeceneeceaeeeseneeceaeeseaeeseaneeeeneeseaeeteeeseeess 3 6 3 2 System ConfIguration en n Een E ere o op e ERE Fe HE OF e D Re edi ia 3 7 3 2 1 System configuration when performing data communication with an external device 3 7 3 2 2 System configuration when u
170. 32 interface 3 Ifthe line is disconnected during data reception data reception will be disabled This may cause an error occurrence such as a reception time out 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 Program example for line disconnection A program example for line disconnection is shown below X0 Normal transmission completion signal X1 Abnormal transmission completion signal X3 Reception data read request signal X4 Abnormal reception detection signal X10 Initialization complete signal X12 Connection signal X1E Ready signal X1F WDT error signal Transmission request signal 1 Reception data read complete signal MO Accessible flag M50 Data communication enable flag M70 Line disconnection enable flag e Registration of data for initialization Registration of data for connection e Modem TA initialization Line connection Data communication i See Section 3 4 3 See Section 3 4 4 See Section 3 4 5 i See Section 3 4 6 See Section 3 4 7 XIE XIF mo Ready flag is ON X10 X12 ata communication enable flag is 1 i50 Dat icati ble flag is ON M50 xo X3 X4 YO Yi Y12 T f e line disconnection enable flag is PAS HF M A uno The line di ti ble flag i ON X23 N71 Line disconnection command M71 M70 RST 7 SET y1 Modem disconnection request signal is set SET M79 When the modem disconnection
171. 3rd Last frame No designation 4th Following user frame receive format designation is valid above function version B User frame receive format designation 1st Format Userframe receive format designation 2nd Format Userframe receive format designation 3rd Format 1 User frame receive format designation 4th Format 1 User frame receive format designation is valid only in case of Format 1 Exclusive format received data count 1st Exclusive format received data count 2nd Exclusive format 1 received data count 3rd Exclusive format received data count 4th GX Configurator SC setting items Description of setting values Non procedure system setting screen Format 0 Format 1 Designates the data count that exceeds The specified value is invalid Exclusive the size of the arbitrary data to be Received data count designation format 1 received data count becomes received or the data count of the alid valid received data size Reception of combination with the first frame The specified value is invalid Receive complete code designation Reception of combination without the first frame Designates the code for the last data in the reception message for performing a read request to the programmable controller CPU User frame use enable disable designation Designates Enable First frame No designation 1st to 4th Designates the user frame No Designate
172. 4 No communication interval time designation ALCO PER 3 38 No reception monitoring time format specification in non procedure protocol 6 5 No reception monitoring time timer O 6 2 Notification function 2 19 Number of registered bit blocks 2 23 Number of registered word blocks 2 23 On demand buffer memory head address designation see 10 8 On demand data communication user frame 10 1 On demand data length designation 10 8 On demand data 10 2 On demand function control procedure ASCIN Code etd neret ments 10 4 On demand function control procedure binary 10 6 On demand user frame designation 10 2 Output count designation area 11 40 Output head pointer designation area 11 39 PLC CPU abnormal monitoring designation be Ee urb eL Ee deeds 2 21 Programmable controller CPU monitoring FUNCION n eaves hist ne ae eee cd 2 1 instruction pen 17 24 PUTE 17 28 Index 2 R S T Receive format designation 11 18 Receive interrupt issued designation 4 2 Receive procedure user frame 11 14 Receiving data with an interrupt program 4 1 Reception control met
173. 4 transmission gt Interrupt issued jd Programmable Interrupt controller CPU program executed SM400 BUFRCVS 4 Controlling data communication in accordance with the external device detailed explanation in Chapter 7 1 The Q series C24 controls data communication with the external device by turning ON OFF the DTR DSR signal and sending receiving the DC code 2 DTR DSR signal control Using the DTR ER and DSR DR signals the external device is notified of whether or not data communication can be performed 3 DC code control By sending receiving the DC1 and DC3 code data the external device is notified of whether or not data can be received By enclosing the user data with the DC2 and DC4 code data the external device is notified of the valid transmission data range Interruption Restart From the succeeding data A Data 1 2 External device side Programmable controller CPU side Restart From the succeeding data DTR signal DSR signal External device side Programmable controller CPU side Restart From the succeeding data Interruption 1 OVERVIEW 5 Converting binary code data to ASCII code data to communicate with the external device specification detailed explanation in Chapter 13 1 Binary code data that is processed by the programmable controller CPU can be converted to ASCII code data for communicatio
174. 4 4004 061 Z 1 0 1 0 0101 344 304 40TH 3 2 3 2 E DIT 334 2 4024 324 E i E NULL STX NULL STX 012 oo 024 4034 024 D13 424 4044 NULL ETX NULL ETX 014 405 00H 03H LF CR LF CR OAu ODH 4064 Sequence program device memory Buffer memory H33323130 pio Sets transmission data in D10 to D15 H42410002 D12 HOA0D0003 014 bi Sets CH1 to the transmission channel MOVP 03 Sets the number of transmitting data to 6 Dt 010 Executes transmission Sets normal completion flag Sets abnormal completion flag 12 12 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 5 Handling Transparent Codes and Additional Codes During Bidirectional Protocol Data Communication The following explains the handling of transparent codes and additional codes during data communication using the bidirectional protocol 1 The additional code designation data will be added to or deleted from the data that is sent or received 2 Communication data for which transmission reception processing of transparent codes and additional codes is performed includes the message data length data section and error code Such processing is not performed for the head code ENQ ACK NAK and sum check code of a message Example gt E Tran
175. 51 1 When registering the initialization data or data for connection to the buffer memory the number of registration data bytes for 1 data is designated 2 The registration of data for initialization is described in Section 3 4 3 The registration of data for connection is described in Section 3 4 4 b15 to bO Buffer memory address 6913 1 01 for initialization or data for connection to 6952 18284 Area for registration number 8001 to 8143 1FCFx for initialization or data for connection to Area for registration number 801 8182 1FF6n v Auto modem initialization designation area Address 8199 2007 1 This designates whether the Q Series C24 side modem is initialized automatically or not 2 Registration of this area is done through the GX Configurator SC The modem is initialized automatically when the Q Series C24 starts up after the QCPU restarts w DR DSR signal valid invalid designation area during modem initialization address 8200 2008 Set this setting to DR signal valid This setting is used to designate how the DR signal is treated when only modem initialization is performed Following the completion of modem initialization data is sent according to the status of the DR signal x Modem function completed signal handling designation area address 8201 2009 Set this setting to turn ON OFF X13 to X16 default value y Wait ti
176. Arbitrary data area Last frame 2 designation corresponds to register No 3E8 corresponds to register AE First frame No designation 41 3E8H 1st ARH 9 2nd Reception data X83 read request 6 i Programmable 1 controller CPU 15 4th 2 41B Last frame No designation H Completion device Mo 1st Ab B3H None PEER OH 2rd Status display device y Completion 2 None at completion Normal 4 3rd completion 9 1 c 5 OH 4th 1 scan 1204 YES NO Receive transparent _1002 code designation ps Disable ASCII BIN conversion i 121 designati User frame receive l 19 d 5 20201 format designation _ 25 Receive user frame 2 DO 0 1st Format 0 1 Li th 1 3 2021 600 Receive data count gt to D3 b 0 2nd Format 0 00 1 0 Receive data 601u arbitrary data 20228 1 8rd Format 1 31H 30H Crn y 4 i 3 2 to D10 2023H i 4th Format 1 gt 6024 K d raftet Exclusive format 1 A STX gt 2024 On received data count 603 Mu 02H 1st C B 604 2029 0 2nd 424 1234 605 20261 0 3rd 42H LF CR 606 2027 2 4th OAn R Buffer memory Reception data read request Buffer memory Xe FROMP H8 H25B DO Ki of user frames MOVP KI 01 Sets to CH1 th
177. CONTROLLER CPU MONITORING FUNCTION c Inthe condition agreement transmission for device monitoring the head device for each block is the monitoring target for condition monitoring of each block device For the condition agreement transmission the monitoring conditions that can be designated for the device to be registered by the user and the registration values when designating the monitoring condition are shown in the table below Register the monitoring conditions for the head device of each block using the following table Valid designated Registration value pene Monitoring condition item to be judged For edge triggered For level triggered Tai ME Bit Word transmissions transmissions Device value or status device monitoring condition value or status 0001 0101 Device value or status device monitoring condition value or status 0002 0102 Monitoring device lt monitoring condition value 0003 0103 Monitoring device lt monitoring condition value 0004 0104 Monitoring device gt monitoring condition value 0005 0105 Monitoring device gt monitoring condition value 0006 Monitoring device lt monitoring condition value 0007 Ot Sioned Monitoring device lt monitoring condition value 0008 0108 i Monitoring device gt monitoring condition value 0009 0109 Monitoring device gt monitoring condition value 000 010 d In device monitoring register th
178. Dial in progress Connection in progress Initialization connection abnormal completion Y11 Y10 X11 X12 OFF X13 i ONE RS 232 CD terminal OFF i Modem initialization See section 3 4 5 Dial H Dial H Dial Dial eee Retry In case of three times Connection channel and retry operation are performed using the buffer memory setting 3 74 3 74 3 COMMUNICATIONS BY THE MODEM FUNCTION Example When initiating the line connection from the partner device after the completion of initialization Buffer memory for connection Address 5 53 Connection request Y11 Initialization completion Y10 Dial progress x44 Connection in X12 OFF ON OFF Normal connection LERNEN progress Normal connection RS 232 CD terminal A Set Display a result code using the AT command in the local station side modem Unlock processing for Result code Reception the remote password receive x 4 4 j Password RER onse Remote i for system password Response Y ue hnnan Communication only when connected with GX Developer Communication using MC protocol When connecting to the GX Developer 1 The connection channel on the Q series C24 side is set in the nodem function system setting screen of GX Configurator SC 2 Abnormal processi
179. Format 1 Specify a size within the size of the storage area for the reception data in the buffer memory The unit for the setting value depends on the setting value given in the word byte units designation b15 to bO Default On Buffer memory address 20241 2124 Setting for the first combination Setting for the second combination Exclusive format 1 Setting for the third combination received data count 20274 21274 Setting for the fourth combination L Write to FFFFu to 11 18 11 18 11 DATA COMMUNICATIONS USING USER FRAMES 3 Examples of registering a receive user frame The following are examples of pre registering a receive user frame on the CH1 side with the GX Configurator SC a When the first frame is specified In the example the following three combinations are registered for the receive user frame Setting conditions User frame 1st combination First frame last frame User frame receive format designation Format 0 Exclusive format 1 Remarks received data count The received data count becomes valid 2nd combination 3rd combination First frame only First frame only Setting value Setting item Received data count designation Format 1 Format 1 Setting value Exclusive format 1 received data count becomes valid Remarks For Format 0 Receive complete code designation Set to No receive complete code
180. Fu Ou Use the current setting value 2600 to 3FFFH 400 to 1AFFu 2600 to 3FFFx Head address Designate the size word number of the reception area used with the non procedure bidirectional protocol Use the current setting value 52 9 area size 1H to 1A00u Size 1H to 1A00H The head reception area 1 word is used as a reception data count storage area S2 10 to For system S2 111 Use prohibited Other uses such as uses in programs are also prohibited 1 For information about errors caused by incorrect designated by the user refer to Errors described later in this section 2 The Set by column indicates the following User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction 17 17 17 17 Functions 17 18 17 DEDICATED INSTRUCTIONS 1 This instruction changes the current values of the settings below to transmit receive data using the following communication protocols Data count unit word byte of the data to be transmitted received Transmission area in the buffer memory used by the on demand function of the MC protocol Transmission and reception areas in the buffer memory used with the non procedure protocol Transmission and reception areas in the buffer memory used with the bidirectional protocol 2 To change the
181. I BIN conversion 8 2 4 when word units are used Completion device MO ON 8 when byte units are used pL 4 Abnormal Status display device completion at completion M1 This diagram is for when word Normal i completion units are used i 4 6 34h 12 FOH DEH Transmission data ODH Sequence program Buffer memory device memory iw S I o c P 2 E E c S E Transmission instruction P KI DO Sets CH1 to the transmission channel MOVP K4 D2 Sets the number of data sent to 4 MOVP H3412 010 Sets the arbitrary transmission data to 010 to 013 MOVP HOBCSA D11 MOVP HOFODE 012 Move HOAOD 013 GP BIDOUT us 00 D10 wo Executes transmission Mo Mi SET M100 Sets normal completion flag Mi o E M101 Sets abnormal completion flag Data for one address one word in the buffer memory s transmission area is converted into four byte ASCII code data 0 to 9 and A to F and is then transmitted 13 14 13 14 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION Always read this chapter when communicating data by using a multidrop link to connect the external devices and programmable controller CPU in an m n system configuration You do not have to
182. ING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 7 The following describes how the Q series C24 operates when the programmable controller CPU monitoring result information cannot be sent to the external device due to line disconnection or other reason Even if an error occurs while the programmable controller CPU monitoring function is in operation the ERR LED does not light up This is the same as when using the on demand function of the MC protocol a When the setting for the transmission monitoring time designation timer 2 is an infinite wait 1 Reading of monitoring data from the programmable controller CPU stops until the transmission of monitoring data completes 2 When transmission resumes reading of monitoring data from the programmable controller CPU resumes and monitoring data and information are transmitted b When the setting for the transmission monitoring time designation timer 2 is other than an infinite wait 1 Atransmission timeout error occurs monitoring information read from the programmable controller CPU and transmission of monitoring information resumes 2 The error code is stored in the programmable controller CPU monitoring function error code storage area address 2205 8 When device data for the programmable controller CPU cannot be read because of a programmable controller CPU error hardware failure etc the error code is stored in the programmable controller CP
183. ITCHING THE MODE AFTER STARTING b Switching transmission specifications designation area address 91H 131 1 Designates the transmission specifications after mode switching 2 When the transmission specifications are returned to the contents set in GX Developer 00009 is written to this area 3 When setting arbitrary transmission specifications other than the contents set in GX Developer the value corresponding to ON OFF of the relevant bit in the table shown below is written Relevant bit 1 ON O OFF is designated the same as transmission setting of GX Developer For the Q series C24 b15 to b8 b7 b6 b5 b4 b3 b2 b1 bO 80 T T Jo cut side swtsr cra side EcL meses erre one bo Operation setting Independent to OFE O set the CH1 side Data bit 7 8 Parity bit is not included Parity bit Vertical parity Stop bit o 01 2 c Sumcheckcoe NO Ye b6 Write during RUN Prohibited Allowed b7 Setting modifications Prohibited Allowed b8 Communication 80u to 8 Refer to 2 speed 1 All items in the table should be set to OFF for the interface which GX Developer connection is set in the Switching mode number designation The Q series C24 operates with the values set in GX Developer See below Transmission setting GX Developer side setting Operation setting Independent Data bit po Pa
184. NTROLLER CPU M N CONFIGURATION 14 1to 14 11 14 1 Data Communications Precautions ssssssssesseeeeeeeenenenen nennen nennen neret 14 1 14 2 External Devices Interlock Conditions enemies 14 3 14 2 1 Maximum communications time per external device station 14 3 14 2 2 Message structure when communicating data between external devices 14 4 14 3 Examples of Procedure for Data Communications with the Programmable Controller CPU 14 6 14 3 1 Sequential data communications between external devices and the programmable controller CPU iit m aem bea ui eb tbid 14 6 14 3 2 Data communications between programmable controller CPU and external devices by designating a master station and slave stations sessssssseee 14 9 15 1 Mode Switching Operation and Contents that be 15 2 15 1 1 Settings that can be changed with mode switching seen 15 2 15 1 2 Operation for mode switching essen 15 2 15 2 Mode Switching Precautions 15 3 15 3 I O Signals for Handshake with Programmable Controller CPU and Buffer 15 5 15 4 Switching the Mode from the Programmable Controller CPU
185. OLLER CPU MONITORING FUNCTION 2 3 Settings for Using the Programmable Controller CPU Monitoring Function This section describes system settings required for constant cycle transmission and condition agreement transmission 2 3 1 System setting items for the programmable controller CPU monitoring function The following explains system setting items for the programmable controller CPU monitoring function 1 Register transmission user frames by GX Configurator SC after checking the specifications and setting methods explained in Chapters 9 to 11 of this manual 2 Register connection data for the modem function by GX Configurator SC after checking the specifications described in Section 3 4 4 of this manual 1 Setting items and requirement when performing communication using the MC protocol n Condition agreement Constant cycle transmission ee Setting item Transmission Reference section Data uS Data PACEM CIS SERA Notification T Notification transmission transmission Cycle time units OB 2 of this section Constant cycle transmission Transmission pointer ELT L this section eee count Section 11 4 2 Section 2 2 5 Number of word blocks 3 e of this section Number of bit blocks PLC CPU abnormal peer 3 f of this section f of this section No n block SS device n block monitoring device Monitoring device sd device HeaddeiceNo device No C g C
186. ON 17 38 17 38 Precautions 17 39 17 DEDICATED INSTRUCTIONS 1 Execute the UINI instruction after stopping all data communications with the other device Otherwise the following will occur a When the UINI instruction is executed during receive processing The receive processing is stopped and the reception data accumulated until then are all discarded b When the UINI instruction is executed during transmission processing The transmission processing is stopped upon acceptance of the UINI instruction 2 When a modem is connected execute the UINI instruction after cutting off the line with the other device The line is cut off when the UINI instruction is executed 3 If the communication protocol and or transmission specifications are changed with the UINI instruction also change those of the other device according to the new settings Also if the station No setting host station No is changed correct the station No in the other device side request message to the new station No 4 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the UINI instruction or executing the UINI instruction during execution of another instruction in the same channel Availability of Instruction simultaneous Handling of simultaneous execution execution ONDEMAND OUTPUT NPUT IDOUT e Dedicated instructions simultaneous e
187. Q Series C24 side 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 1 3 Comparisons with related devices The following shows a comparison with the related products which supports data communication with the programmable controller using the modem and public line etc similarly to the communication performed via the modem function QJ71C24N R2 R4 QJ71C24 R2 QC24N Q6TEL A6TEL function version modem function for QnACPU ACPU for ACPU e a Modem TA initialization GX Configurator SC Line connection dialing EE on the external device side Communication between MC protocol same products such as Non procedure protocol 24 24 Bidirectional protocol o Communication between series C24 and other products Remote communication from GX Developer Callback function EIE Remote communication from peripheral device for GPPQ e GPPA Notification Remote password check Performed on the external device side i am Sequence program o x x GX Developer d a ee 0 Data for modem initialization on Lx x x O Data for connection GxConfgurato sc ET Number of connectable modems TAs 1 Transmission type Pulse tone Analog 2linemethod O oO O Digtaiine qson o o _ o x Communication function name O enable X disable 1 Modem initialization is ex
188. Q series serial communication module When using the MELSEC Q series serial communication module Design Precautions N WARNING e For the operation status of each station at communication error in each station refer to the respective manual for each station The communication error may result in an accident due to incorrect output or malfunction e When using the notification function the pager receiver may not be contacted due to the frequency transmission status from the system setup environment and error on the receiver side To ensure the safety of the programmable controller system install a call circuit with a lamp display or buzzer sound e When performing the control of the programmable controller in operation changing data by connecting a peripheral devices to the CPU module or personal computer etc to the intelligent device module configure an interlock circuit in a sequence program so the safety of the overall System is always maintained Also when performing other controls of the programmable controller in operation changing program and operation status status control read this manual carefully and confirm if the overall safety is maintained Especially when this control is performed to a remote programmable controller from an external device troubles that have occurred on the programmable controller side may not be able to immediately be handled if there is a data communication error Define a troubleshooting a
189. S 6 Set the CH2 side communication protocol Refer to 2 protocol setting 5 7 Station No setting Set the host station No 0 to 31 17 32 17 32 17 DEDICATED INSTRUCTIONS 1 S 3 CH1 transmission specifications setting and S 5 CH2 transmission specifications setting b15 to b8 b7 b6 b5 b4 b3 b2 b1 bO _ 0 E T ELT TT e side Erat ss Lt Osea mee um Eden nene b2 Parity bit Vertical parity em E 7 Stopbit 1 2 OC b5 Sumcheckcode NO Yes b6 Write during RUN Prohibited Allowed o7 Setting modifications Prohibited Allowed EXE C REENNCT NENNEN REN pee didici K1 All items in the table should be set to OFF for the interfaces which GX Developer connection is set in the communication protocol setting The Q series C24 operates with the values set in GX Developer See below Transmission setting Operation setting Daabt Parity bit Eveniodd party Odd a Communication speed setting 2 3 4 m Communication Speed isba it positi Communication speed post Remarks bt5tob8 b8 b15 to b8 50bps 14400bps Slow down the 300bps 19200bps communication speed when 2 Transmission speed of 230400 bps is available for only CH1 K3 When connecting external
190. S FOR DATA COMMUNICATION 9 4 Register Read Delete User Frames The following explains registering reading and deleting user frames in the Q series C24 flash ROM or buffer memory When registering reading and deleting the user frames in the flash ROM try to register them using the utility package GX Configurator SC of the Q series C24 This section explains how to register read or delete user frames from the programmable controller CPU 1 Type of user frames Type UserfameNo Registration destination Default registration 1 to 3E7H ROM for series C24 OS Read enabled frames 1 to 999 Data 8 to 4 2 communication 100 to 1199 series C24 flash function User frame Register read delete enabled 8001 to 801FH Q series C24 buffer memory 32767 to 32737 Addresses 1 00 to 1 User frame for the programmable 001 to BOOAn 061 controller CPU monitoring function B080 to B082 ROM for the Q series C24 OS Register read delete disabled itoring functi H H 1 Data contained in user frames used for registering and reading is arranged in the same way as data in user frames used for registering in or reading to the flash ROM Use the arrangement described in this section as a reference and register and read user frames User frames can also be registered in the buffer memory but the user frame for the fixed format section should be registered in the
191. S signal is OFF turn on the CD signal If the RS signal is ON wait until it is turned OFF then turn ON the CD signal Transmit data after the CD signal is turned ON After data transmission is complete turn off the CD signal Ifthe RS signal was turned ON during data transmission terminate data transmission and turn OFF the CD signal and perform data transmission processing Simultaneous transmission generated 5 After transmission from the Q series C24 is complete retransmit all the data terminated at step 4 SON Take the following measures between the communicating devices as a countermeasure against ignoring of the receive data by the Q series C24 Transmit and receive a response message in reply to data transmission Retransmit the data due to response message time out check or generation of a time out error external device side 8 2 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS b When Q series C24 is designated non priority Continue data ee transmission External device Data A Data B Programmable Data C 1 Data 2 controller CPU Since the Q series C24 Retransmission it terminates transmission contents Ht Data c 2 does not have priority when ey the CD signal is turned ON See 2 for the transmission Data C 1 SD Send Data 1 RS Send Request 4
192. SUBISHI ELECTRIC Savanoriu Pr 187 LT 02300 Vilnius Phone 370 0 5 232 3101 Fax 370 0 5 232 2980 Mitsubishi Electric Europe B V FA European Business Group Gothaer Stra e 8 D 40880 Ratingen Germany FACTORY AUTOMATION Tel 49 0 2102 4860 Fax 49 0 2102 4861 120 info mitsubishi automation com www mitsubishi automation com
193. Series C24 the Q Series C24 disconnects the line Data for checking the callback destination telephone No by the Q Series C24 are registered in callback Data No 1 to 10 Set the data registered in callback data No 1 to 10 in the Modem function system setting screen Example If line connections are being made with Auto Callback during designated number as the connection system 1 Line Connection Auto callback during designated number Selection of the connection system and line connections Setting of callback function 2 Tem ras line disconnection designation settings by the 4 M GX Configurator SC 3 Lines on ection 4 Access to the QCPU 5 Line disconnection GX Developer A telephone No 1 Registration in the Q Series C24 Callback data No 1 Telephone No 1 Callback data No 2 Telephone No 2 Callback data No 3 Telephone No 3 Processing for the GX Developer Callback data No 10 Telephone No 40 77 Processing by the callback function Q Series C24 Side Callback function specification Au m 1 Auto Callback connection during fixed Setting 2 Auto Callback connection during designated number Sel Sel tting 5 Callback connection during designated number 3 COMMUNICATIONS BY THE MODEM FUNCTION If the GX Configurator SC s Callback function designation setting is performed in the Q Series C24
194. Sets the number of transmitted data pos nov H3F2 D5 1 Sets the transmission user frames D5 to D9 06 1 H8001 07 1 mov H8000 D8 1 H41B D9 7 D10 To H8 HOBA D5 K6 1 Sets transmission frame No in the buffer memory M50 Ree tov K1 D11 1 Sets CH1 to the transmission channel KO D12 Clears the device in which transmission results are stored HO D13 Sets to no CR LF output Mov H1 D14 Sets the output head pointer mov H5 D15 1 Sets the output counter us D11 MO Executes user frame transmission Mi SET M100 ets normal completion flag t S letion fl SET M101 1 Sets abnormal completion flag Normal end Abnormal end DO Send data count Send data count D1 Send data Send data D2 D5 Transmission frame No 03F2u Transmission frame No 03F2u D6 D7 D8 D9 D10 D11 Interface No Interface No D12 Transmission result Transmission result other than 0000 D13 CR LF output output D14 Output head pointer Output head pointer 00014 D15 Output counter Output counter 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 TRANSPARENT CODES AND ADDITIONAL CODES Transparent codes and additional codes are used during data communication with an external device to send receive one byte data for transmission control on the external device side as user data Transparent codes and additional codes a
195. THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION When ASCII BIN conversion is performed The total number of bytes for the device data section is the number of device points X 4 When the word byte unit designation is byte For W100 to W103 block data For MO to M15 block data T ToT T TT TT La Fol she Tole Ti toh eal T ToT T T T TT T TT T 8 28 58 8 E 38 HE E 8 23 5s 9 8 2 BS 8 p Ey 8 8 29 53 8 3 t 28 E i E 28 E a t 2 El e 3 p E P H H L H L L HIL HT Hi Es ma He db B SS t 1 1 w 0 4 1 O10 2 3 00 M 0 0 0 00 1 3 O0 1 1 i 57 2 30H 30H 31H 30H 30H 34H 30H 30H 31H 308130 32 30H 30H 33H 30H l4DH 2 30H 30H 30H 30H 30H 30H 30H 31H 33H 30H 31 31 w100 w101 w102 w103 a 1 1 1 1 MMMMMMMMMMMMMMMM 0000000011111100 7654321054321098 When the word byte unit designation is word For W100 to W103 block data For MO to M15 block data To Pats eb lt ot Toe hi hehe Pot ale T 8 28 58 8 i3 HE E 8 28 88 8 2 ge 8 ge E 8 8 p 8 E E 58 2 2 E 58 H 5 2 3 5 25 a t 5 t 5 2 3 p Bom Se i ee L He SS eS NAS es Ho b
196. The specification of modems TAs that can be connected to the Q series C24 side when using the modem function is shown below 1 Specification and precautions for the connectable modems a Modem specification Specification Item When using the subscriber s telephone When using a manual line Remarks line office telephone system connection cellular phone Modem to modem communication specification communication specification Analog 2 line 8 Initialization Hayes AT command compatible See Section 3 4 3 See Section 3 2 4 di Telephone line A line compatible with NTT communication protocol eS 86 on the restrictions Communication standard ea 0 0 202A109 Error correction Pu Data compression 1 JANS ORG mode swith Mode switching required Q series C24 side connector RS 232 DR signal control Only the DR DSR signal must be able to turn on 2 See Section 3 3 1 User Other Compatible with the Q series C24 specification dr A ache Manual Basic 1 The following are the functions of the modem itself that become available by issuing the AT commands to the modem See the modem manual for details 9 pin female D sub User s Manual Basic 1 Error correction 1 When a noise occurs on the line scrambled data may appear due to interrupted communication data The error correction function is intended to suppress effects from such noises 2 If an error such as scram
197. U monitoring function error code storage area and the Q series C24 performs the monitoring processing based on previously read data 9 When transmitting the monitoring information as data using the modem function a modem connection error will occur if a modem connection is requested for the following reasons A connection request by Y 11 A notification issued request by Y14 If possible provide a dedicated Q series C24 for using the programmable controller CPU monitoring function When using both the programmable controller CPU monitoring function and data communication function with a single Q series C24 and one of the above modem connection errors occurs re execute a connection request in consideration of the transmission timing set by the user for the programmable controller CPU monitoring function 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 1 Overview This chapter explains the overview and how to use the modem function which can be used for data communication with remote external devices and paging pager terminals The overview of the modem function is described below 1 The modem function easily performs data transmission reception to remote devices via public lines office telephone systems digital lines ISDN by connecting a modem or TA terminal adapter to the series C24 s RS 232 interface 1 Communicating arbitrary data with an external device 2 Call pager recei
198. Valid for Q series C24 only not for L series C24 Number of data registrations for connection 0 No registration 1 or more Number of registration Data registration status for connection for conformation of registration No 0 No registration 1 Registered Bits for registration number are 0 ON 1 OFF The values Registration number BB8x 3000 Address 2241 60 to vary Registration number BD5a 3029 Address 2254 613 depending Number of data registrations for initialization on the 0 No registration 1 to 30 The number of registrations registration Data registration status for initialization status 0 No registration 1 Registered Bits for registration number are 0 ON 1 OFF Registration number 9 4 2500 Address 227 b0 to Registration number 9E 1u 2529 Address 2284 613 Number of notification executions 0 Not executed 1 or more Number of executions Notification execution data number 0 No notification execution Data storage 8 or more Notification executed Notification executions area 1 number System area Use prohibited Notification execution data number 0 No notification execution Data storage 8 or more Notification executed Notification execution area 5 number System area Use prohibited 3 COMMUNICATIONS BY THE MODEM FUNCTION Address Dec Hex Application Name Default Correspondence protocol value MC Non Bi cerae vemm 3072 to 6911 For user User free ar
199. When ASCII BIN conversion is performed The total number of bytes for the device data section is the number of device points 4 When the word byte unit designation is byte TLTTTT rT rT s 12 58 8 8 o oo E o oc 2a 2 A i t 38 3 3 S Q 5 a a 3 8 L H L H L L H Lo 9 M 0 0 0 0 1 0 0 0 0 A 3 0 1 1 1 2 3 4 40 2 30H 30H 30H 30H 314 30H 30H 30H 30H 414 334 30H 31H 31H 314 32H 33H 34h ovz o 011 0 0 0 0 MMMMMMM 22 1111 21 9876 z o ooz o 100 MMM 222 876 i M 2 0 When the word byte unit designation is word device Number of Device data Device code registered points Device data Monitoring head Ho 9 4 T 2 40 2 30H 30H 30H 30H 31H 304 30H 30H 414 31 31 33H 34H 314 32H 22g e 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 When user frame No B061H is designated Programmable controller CPU status information for one block is sent as the following data when communicating when communicating Remarks with ASCII code with binary code Device code Number of registered points 0001 0001 Monitoring he
200. X Configurator SC registration 2 When using DTR DSR control connect the Q series C24 DTR and DSR signals to the external device Transmission control function setting Set a transmission control function that can control the target interface If a function that cannot control the target interface is set the set contents are invalid Setting of transmission control function during linked operation When the two Q series C24 interfaces are linked refer to User s Manual Basic set the transmission control function of only the interface that must be controlled Set the other interface to Do not use transmission control function set value when directly set to the buffer memory 0001 DC code control 1 DC1 DC3 transmission control and DC1 DC3 reception control are possible when full duplex communications is used to communicate data between the Q series C24 and external devices Do not use DC1 DC3 control with half duplex communications 2 The same data as the DC1 to DC4 codes cannot be included in the user data To handle the same data as a DC code as user data do the following Use DTR DSR control Change the DC code Do not use the transmission control functions 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL If the user data received from the external device includes the relevant DC code when DC1 DC3 reception control and DC2 DC4 reception control are used the Q series C24 uses the corresponding DC code
201. X4 n E mot The following shows a program example for receiving data using an interrupt program Program condition Interrupt pointer No of module set by GX Developer PLC side Interrupt pointer Start No 50 Interrupt pointer No of module 2 fixed CH1 side interrupt pointer 150 CH2 side interrupt pointer 151 Intelli module side Start I O No 0 Start SI No 0 fixed Setting for whether the interrupt program is started by GX Configurator SC CH1 side Issues interrupt Communication is performed using the non procedure protocol CH2 side Does not issue interrupt Program example When the series C24 I O signals are X YOO to X Y1F Interrupt program enabled EI For CH1 side Normal reception gt Sets the flag for confirming X3 RR sET M100 normal reception abnormal reception in the main program Abnormal reception Resets by the main program lt Reception interrupt program executed M400 a A BUFRGVS uo Ki 0200 Receives data and stores it in D200 and succeeding addresses IRET D200 No of receive data From D201 Receive data 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM Data register Buffer memory D200 D201 Reception area No of receive data Receive data D2nn 1 When data reception is performed with an interrupt program the dedicated BUFRCVS instruction is used
202. abled r T T T T T Data designated by sequence program xam B 12 to 89 E 41H 42H 314 32H ABH 89H 03H ODH i OAH fecal 2 Register data codes 00 to FFH 2 byte data register part The Q series C24 transmission is based on the variable data corresponding to the combination of the register codes FFH and OOH to FFH For example if sum check code is registered the Q series C24 will calculate and transmit the sum check code If the Q series C24 station No is registered the station No set in the Q series C24 is transmitted Example Register the data codes 03H FFn FOH ODH OAH as user frame No 3E9H When user frame No 9 is designated during data transmission the Q series C24 calculates the sum check code as the send data of the given user registration frame part If ASCII BIN conversion is disabled the series C24 transmits the calculated sum check code as the send data of that user frame part If ASCII BIN conversion is enabled the Q series C24 converts the calculated sum check code to 2 characters byte ASCII code data and transmits Part that designated user frame j No 9 Added by the Q series C24 When ASCII BIN conversion disabled T T T Data designated by sequence E Sum T heck program Mrs MEME RAF A B 1 2 to 89 41 42H 314 32H 89 03H 1 12 0 0 eo rs penn
203. above setting values from the programmable controller CPU execute the CSET instruction The CSET instruction must be executed before starting any data communication execute it before the first scan Once data communication begins the CSET instructions cannot be executed the setting values cannot be changed More than one CSET instruction cannot be executed simultaneously to perform the initial settings 3 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the CSET instruction or executing the CSET instruction during execution of another instruction in the same channel Availability of Instruction simultaneous Handling of simultaneous execution execution ONDEMAND e Dedicated instructions simultaneous execution error 7FFOu OUTPUT PRR x occurs in the dedicated instruction attempted later However simultaneous execution is available when channels to be used are not the same When instructions are executed in order of INPUT gt CSET e Dedicated instructions simultaneous execution error 7FFOu occurs in the CSET instruction the right column However simultaneous execution is available when channels to be used are not the same When instructions are executed in order of CSET INPUT e Simultaneous execution are available e The next instruction will be ignored until the active instruction has been completed
204. ack function designation Auto In the case of no callback Auto In the case of callback Settingl Setting6 In the case of callback Settingl Auto Callback connection during fixed Setting2 Auto Callback connection during designated number Setting3 Auto Callback connection during max designated number is 10 Setting4 Callback connection during fixed Setting5 Callback connection during designated number Setting6 Callback connection during max designated number is 10 Callback denial notification accumulated 1 Flash ROM setting Details Write to module File save File read Select input Make text file Execute test Setting Setting Item Setting value possible Description impossible B ify C t wh i GX Developer connection designation Connect En dap Rl the callback function Callback function designation Settings 1 to 6 See b e Select according to the callback operation Callback denial notification 0 to 65535 Specify the accumulated count value accumulated count designation informed to the user Specify the connection data No See Data No for Callback d tion 1 t a S MOS Rest elfe Mrs HONO BB8 4 to 801 m Section 3 4 4 for setting values Must be set Set as necessary 2 Monitoring Testing through the modem function monitor test screen This shows the callback function monitoring and testing See Section 3 3 6 for monitor
205. ad device 000000 All fixed value Device data When ASCII BIN conversion is not performed The total number of bytes for the device data section is the number of device points X 2 When the word byte unit designation is byte When the word byte unit designation is word g 88 8 g 88 8 8 2 55 8 8 23 55 3 2a g Do ea 8 Eo S c Es amp 5 226 5 28 3 aj aj 2 3 2 3 L H L H L L H L H H L OOH OOH OOH 01Hy OOH 01H OOH 01H OOH OOH OOH 01H OOH OOH 01H When ASCII BIN conversion is performed The total number of bytes for the device data section is the number of device points X 4 When the word byte unit designation is byte When the word byte unit designation is word ls leas Wes al iii bl ok pn 3E E E E 25 E E Br R a ee e Ih LHH Ee A ee 0 1 0 00 0 0 0 0 00 E 1 0 0 0 1 0 0 0 07 0 00 14 0 0 0 1 30H 31H 30H 30H 30H 30H 30H 30H 31u 30H 34 30H 30H 31H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 31H 3 When user frame No B0804 is designated The transmission block count will be sent as follows Example Number of registered word blocks 2 DO to D3 4 points W100 to W107 8 points Number of registered bit blocks 1 MO to M31 2 points When ASCII BIN conversion is not perform
206. ag is reset To the line disconnection processing subroutine Convert the connection in progress signal OFF into pulse Line disconnection from partner side 3 COMMUNICATIONS BY THE MODEM FUNCTION Mi P1 MOV K30 MOV Ki ATEIQOVI amp CI amp D28H MOV I amp IOER2 amp SOSO I MO H1B00 DO SET 2 2 MOV K80 FMOV 01 MOV nnnnnnnnnn P MOV HO MOV KI MO TO HO H1B29 SET M31 P3 SET SET Y10 X10 tO EBT X13 H221 D100 vio X10 RST X13 RST M81 M82 P8 K2Y80 FEND DO 01 02 010 K17 RET DO K40 DI D2 D7 D11 012 K41 M2 RET Y10 M100 K1 Y10 M32 RET Convert the reset command of various requestb signal into pulse To the various request signal and the complete signal OFF subroutine Output the various complete flag status LED display Data registration processing for initialization subroutine Set the number of bytes of the registration data Set the user control data control number Setthe initialization command Write the data for initialization Data No 80014 Registration to buffer memory Data registration complete flag for initialization is set Data registration processing for connection subroutine Set the number of bytes of the registration data Clear the data storage device for connecti
207. age has elapsed the Q series C24 transmits the response message 2 Changing the transmission wait time The transmission wait time is registered on the GX Configurator SC s MC protocol system setting screen 1 If the external device that must wait a certain time before it can receive a response message after a command message was transmitted set the message wait time as explained above Especially for data communications with an external device connected to the Q series C24 RS 422 485 interface set the message wait time to the external device hardware gate OFF time or longer 2 The message wait time described here is the time for data communications using QnA compatible 2C 3C 4C frame 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL The transmission control function controls termination restart the transmission and reception of data between the Q series C24 and external device by turning transmission control signals on and off or by transmitting and receiving DC codes DC1 DC2 DC3 DC4 or informs the range of validity for the data to the external device The transmission control function can be set for each Q series C24 interface The Q series C24 uses the transmission control function set by the user to control data communications with external devices Set the transmission control function to match the specifications of the external device The
208. age with the registered content is received Arbitrary data CR LF m z o Password Destination Self station number station number Yy First frame Last frame Before sending data the Q series C24 adds the first frame and last frame to arbitrary data When data is received the arbitrary data section is stored in the buffer memory as receive data 3 User frames and various setting values for data communication with the external device can be preregistered to the Q series C24 flash ROM 1 OVERVIEW The following table shows which special functions are available for the main data communication functions of the Q series C24 Main data communication functions Non MC Bidirectional Special functions procedure defined protocol protocol section protocol protocol the programmable controller CPU monitoring function ae 5s s fame modem function Reading received data using an interrupt program EGER oOo x Chapter 4 Ch th it of the data length fi ti i aii ee ae ade Changing the monitoring time for data communication the monitoring time for data communication Chapter6 6 Transmission control for data communication DC code control Including Xon Xoff control Chapter 7 DTR DSR EVER control Chapter 8 Data communication using user M frames Transmission O x
209. alue Remarks Send transparent code 1002 Transparent code 02H STX H designation 1st combination Additional code 10H DLE Transmission control and other Transparent code 03H ETX system settings designation 2nd combination Additional code 10H DLE Transparent code 02u STX designation 1st combination Additional code 10H DLE 12 16 12 16 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 6 1 Example of data reception The following shows an example of storing receive data in the data register 1 When the receive transparent code designation is set to Enable and the ASCII BIN conversion is set to Disable Additional code 10H DLE transparent code 02H STX Additional code the Q series C24 deletes Transparent code Data section External device side 2 11 41 42 34 12 0 7 Programmable controller CPU side Reception data read X83 request Data length receive data count Excluding additional codes Programmable For word unit 00044 controller CPU BIDIN Completion device ON Abnormal k ee completion The following diagram is for word unit Status display device 1 at completion 1 Normal completion r Data length 9 i 00H 04H One scan 601 11024 11024 118 028 11H 024 6024 B A Data section gt 42H 414 42H 41H 603n 12949 12344
210. ame No designation 1st Receive user frame designation 9 First frame No designation 2nd Non procedure system setting screen Receive user frame designation 041 Last frame No designation 1st Receive user frame designation 041 Last frame No designation 2nd Transmission user frame designation 0001 Output head pointer designation Transmission user frame designation 0005 Output count designation Transmission frame No designation 1st 43F2H Transmission frame No designation 2nd 4 Transmission user frame No designation system m m Transmission frame No designation 3rd 001 setting screen Transmission frame No designation 4th 8000 Transmission frame No designation 5th 441 Transmission control and others system setting XM ASCII BIN conversion designation Enable 13 4 13 4 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 4 1 Example of data reception The following shows an example of data reception 1 Reception using the receive complete code Complete code 9H the code after ASCII BIN conversion Head data Data corresponding Number of bytes after Two bytes of receive data is read to to complete code ASCII BIN conversion the programmable controller CPU as 6 2 3 when word one byte data units are used Send data from the external device so 6 when byte that the converted complete code data Externa
211. an be registered or cancelled Applicable device Link direct device Intelligent function Setting data device File JOO module device si woa 97 wa unen Instruction code Executing Instruction format condition ZP CSET ZP CSET Un 51 82 01 52 x1 1 If the host station is a Basic model QCPU function version or later Universal model QCPU or LCPU double quotation of the first argument can be omitted Setting data Setting data Setby Data type Un Un Start I O signal of the module String 00 to FE The 2 upper digits of an input output signal expressed in 3 digit BIN 16 bit Channel No for sending the monitoring result 1 Channel 1 CH1 side User BIN 16 bit 2 Channel 2 CH2 side 1 Dummy Device name Head bit device number of the local station that turns ON for one scan upon instruction completion D2 1 also turns ON if the instruction execution completes abnormally The file registers of each of the local device and the program cannot be used as the setting data Control data 1 Registering the programmable controller CPU monitoring Setting data Setting range Set by S2 0 Execution type Designate 0 ue Stores the result of execution upon completion of an instruction Completion status 0 Normal System Other than 0 Error code Designate the request content S2 2 Request type T 2 2 Regis
212. and DC code control Registration etc of the following codes can be executed as the Adding changeable user changeable data of user frames for data communication frame data Horizontal parity code Sum check code of two s complement number When specifying the first frame and executing data reception a message comprised of the first frame and arbitrary data can be received Adding the receive function For each combination of receiving user frame that the user has set any Chapter using user frames data length can be specified for the arbitrary data 11 Setting the data length for the arbitrary data to 0 makes it possible to receive 1 byte only such as ACK NAK When executing data transmission using the following protocol it is Multiple designations of possible to designate a maximum of 10 types of sending transparent codes Chapter for each interface send transparent codes Non procedure protocol 12 Bidirectional protocol Callback Chapter 9 Switching to the GX Developer connection This functions allows the GX Developer connection mode to be switched Chapter mode by switching the by an external device or the programmable controller CPU 15 mode Communication data This function allows the monitoring of communication data transmitted on Chapter monitoring function the communication network of the Q series C24 and an external device 16 The UINI instruction allows change of the mode transmission Chapter speci
213. and I O signals a When communicating data with the external device Only buffer memory and I O signals the user uses for data communication MC protocol non procedure protocol bidirectional protocol Communicate data using the connection in progress signal X12 ON as the interlock signal There is no I O signal or buffer memory for modem functions used in data communication Initializati nitialization v10 n request Initialization 7 X10 completion 7 i Connection Y11 request Connection in x12 i A ON progress 7 7 m RS 232 CD terminal i ON Set Display a result code A Result code ir ANE using the AT command in Initialization Dial receive x Data communication is possible gt the local station side modem J Q25HCPU 3 COMMUNICATIONS BY THE MODEM FUNCTION This section explains the general procedure for non procedure protocol bidirectional protocol executed in full duplex communication data communication using the modem function between the programmable controller CPU with Q series C24 installed Station B Station A QJTIC24 RZ lon L Joe Q25HCPU Move 1 RUN O ERR C1 NODE RUN 3 ERR D Public line General Procedure completion 1 Perform initial setting for Q
214. ansmission 2 Data transmission to the external device while performing communication using the non procedure protocol a The device information and CPU information are sent by the word byte unit designations When the communication data ASCII BIN conversion is designated it is converted to ASCII code data and sent Examples are shown in f 1 When the word byte unit designation is word unit the device information a and CPU information are each sent in one word segments in a H L sequence When the word byte unit designation is byte the device information and CPU information are each sent in one word segments in a L H sequence When the interface that is to use the modem function is set in the non procedure protocol connection processing and disconnection processing to the modem are performed when the programmable controller CPU monitoring results are transmitted 29 Example Data transmission by non procedure protocol with modem function condition agreement transmission Monitoring information Discon 1 block eee 1 block Ea A Cycle time External device Sequence program conditions matched not matched 2 END END Matched Not matched Matched b When sending monitoring results as data during constant cycle transmission the device information of two or more user frame No and programmable controller CPU status information that have been currently designated for
215. ansmitting the monitoring results through data transmission notification messages using the modem function perform the following settings in order to use the modem function Setting item Explanation section Initial setting using the GX Configurator SC Section 3 4 2 Registration of data No for initialization and data No for connection Sections 3 4 3 and 3 4 4 Initialization of the Q series C24 modem TA Section 3 4 5 2 Register programmable controller CPU monitoring for the Q series C24 using one of the methods described in Section 2 2 1 3 By registering programmable controller CPU monitoring the Q series C24 monitors the local station s programmable controller CPU regardless of the RUN STOP status and sends the monitoring information to the external device 4 When reregistering programmable controller CPU monitoring in order to change the registration data for the programmable controller CPU monitoring reregister after canceling the programmable controller CPU monitoring 1 When registering with communication using the MC protocol Detailed explanation is found in the MELSEC Q L MELSEC Communication Protocol Reference Manual 2 When registering with the programmable controller CPU s CSET instruction detailed explanation found in Chapter 17 To cancel when using GX Configurator SC change the programmable controller CPU to the STOP status redo the settings and then restart the QCPU 2 USING THE PROGRAMMABLE CONTR
216. 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 the responsibility o
217. at 1 received data count 2 12 words 8230 2026 Exclusive format 1 received data count 3 8231 2027 Exclusive format 1 received data count 4 1 Indicates the settings of the user frame No to which the first and last frame Nos are specified in the programs Registration code Registered data 8 8001 02H 51H 20H OAH 3BH STX SP Station No of external device 9 8002 02 41 STX A 41 8005 FFH FOH ETX Sum check code 11 22 11 22 X X 11 DATA COMMUNICATIONS USING USER FRAMES 1 Sequence program example when using GX Configurator SC For details on the INPUT instruction refer to User s Manual Basic Reads combination No UO r nove 6603 00 4 K1 DI wovP K20 D4 lt Reads reception data INPUT UO Di 010 M3 M100 11 23 Reads combinations of user frames received Sets the reception channel to CH1 Sets the allowable number of reception data to 20 Executes reception Sets the normal completion flag Receive user frame Data receive result Receive data count SET M101 Sets the abnormal completion flag Q series C24 Address Buffer memory ADH User frame use control designation Sequence program AEH 1st Sets the receive user frame First frame 777777777777 istration No See Section 11 2 4 t0 No
218. ata corresponding to register code The sum check code resulted from the calculation of the transmission reception data message codes including the first one frame and excluding the last one frame is expressed as the ASCII code data and transmitted or received How to calculate the sum check code Lower one byte of the sum check value calculated is converted into 2 digit ASCII code data and used for data transfer Example Arrangement of data when received User frame First frame User frame Arbit dat CTA Last frame User frame regi gister gt code E Sum Station T check X code Transmission reception data code Calculation range 02 30 31 31 37 37 30 132 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 1 2 Default registration frame read only This frame is registered to the Q series C24 in advance and can be used in the same way as the other user frames 1 Overview The default registration frame is registered in the OS ROM of the Q series C24 The following table lists one byte data codes 01H to FEH to a maximum of five byte data which is registered in the frames and can be used for read only frame numbers 1 to 7 Each of these frames is treated as an user frame 2 Default registration frame write data and data contents that are transmitted and received The following shows the codes of the registe
219. ata set for the program example are as follows Setting item Setting data Registration data O byi Binary _ 46H 39H 30H 30H 30H 30H 46H 46H 30H 30H LL asc reooorro ASCII F90000FF00 When the Q series C24 I O signals are X Y80 to X Y9F X50 IM b K 5 M50 Registration request M50 E Kl DO Sets the registration request H3E8 D2 Sets the frame number to be registered K10 D3 Sets the number of registration data bytes H3946 D4 Sets the registration data for the frame to be registered in D4 to D8 H3030 05 H3030 D6 H4646 D7 H3030 D8 K1 Sets the flash ROM write allow 6 PUTE U8 DO D4 Executes user frame registration MO M100 Normal completion _ LSET M101 Abnormal completion 1 When registering a user frame in the flash ROM to designate an user frame number that has already been registered delete the previously registered number and then reregister 2 The user should manage the number of total bytes for registered data 3 To check unregistered user frames read the buffer memory addresses 205H to 210 indicated in Section 9 4 3 4 The SPBUSY instruction can be used to read the communication status by the dedicated instruction 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 4 2 Reading user frames The following shows an example of a sequence program when reading user frames
220. ation data sseeneeeneenn 3 58 3 4 4 Register read delete of the data for connection ssssssssssseeeenenenenenns 3 63 3 4 5 Initialization of modem TA terminal adapter eeeneeenenennennne 3 68 3 4 6 Eine CODPIection a ive o one en pea eg ep ten ag p aha we aia ati eatem agendi 3 72 3 4 7 Data communication and notification sesssssseeeeeeneenenneneenennne nennen 3 78 3 4 8 dISCOnnectlon uc te ust gt up te f ut go use t tg ad ase 3 84 35 Sample Prodam s a e eu unum i 3 87 3 5 1 Sample program for data communication 1 essssssssssssssssseeee eene 3 88 3 5 2 Sample program for data communication 2 sssssssssssssssesseeeeeereeneee nennen 3 94 3 5 3 Sample program for notification sse nennen 3 103 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4 1to4 6 4 1 Settings for Receiving Data Using an Interrupt Program eeennnn 4 2 4 2 Interrupt Program Startup Timing ssssssssseeeeeneeneneennneeneneee nennen nnne 4 2 4 3 Reception Control Method Using an Interrupt Program sesseseeeeemenem nnns 4 3 2 4 Programimilgzos eos Eee 4 4 4 41 Program example etre era Itera era rhe eri ke a Era deca curd EH RA doce Ra cera sun dere 4 4 4 4 2 Precautions when receiving data with an interrupt program ssseeeeee
221. ator SC 2 Temporary line disconnection wo Sa nS uam ARMEN NI 4A Access to the QCPU 5 Line disconnection Modem Modem Registration in the ae GX Developer Q Series 24 Processing for the GX Developer Callback data No 1 Telephone No 1 to access the QCPU Callback data No 2 TelephoneNo 2 77 Processing by the callback function Callback data No 3 Telephone No 3 Not used Callback data No 10 Telephone No 10 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 If it is being made possible to change the callback destination GX Developer Setting 2 BH or Setting 5 Select the callback destination telephone No if it is being specified at the time when line connections are being made from the initial GX Developer side The Q Series C24 calls back the GX Developer with the callback destination telephone No received from the GX Developer side At this time the external line dialing line types and the connection data set in the following callback data No 1 are used If the callback destination is not specified when line connections are made from the initial GX Developer side the connection data set in the following callback data No 1 are used to call back the GX Developer side At this time the external line dialing line types and telephone number in the connection data become valid Set callback data No 1 in the
222. aximum of four combinations of first and last frames can be set for the non procedure protocol See Section 11 2 1 Of the maximum four combinations to be set if there is a combination that specifies the first frame specify the first frame for all other combinations In addition set in the following order starting from the first buffer memory AEH to B5u 14En to 155p When specifying the first frame i Each frame No for combinations that specify the first frame and the last frame ii Each frame No for combinations that specify the first frame but not the last frame Ofthe maximum four combinations to be set if there is a combination that specifies the last frame only without specifying the first frame the first frame cannot be specified in any of the combinations Set the number of the last frame to be used in order starting from the first area of the buffer memory AEn to 5 14 to 1554 3 When setting more than one combination the first frame having the registered data in the same arrangement or the same frame number cannot be designated However the last frame can be designated 4 Use the user frame numbers of the following user frames to set the receive user frames See Section 9 1 1 Default registration frame numbers 1H to 3E7H 2 User frame numbers registered in the series C24 flash 3E8H to 4AFH 3 User frame numbers registered in the Q series C24 buffer memory 8001H to 801FH 5 Do no
223. aximum size of data received from the external device is not secured the data following the storage device will be overwritten 17 5 17 5 17 DEDICATED INSTRUCTIONS Program example An interrupt program that reads receive data Setting Interrupt pointer setting with GX Developer PLC side Interrupt pointer Start No 50 Interrupt pointer No of module 2 fixed CH1 side interrupt pointer 150 CH2 side interrupt pointer 151 Intelli module side Start I O No 0 Start SI No 0 fixed Interrupt program start enable disable setting with GX Configurator SC CH1 side Issues interrupt performs communication via the non procedure protocol CH2 side Does not issue interrupt When the input output signals of the Q series C24 are X YOO to X Y1F lt Interrupt program enabled gt El In case of CH1 side Frm 150 i lt Normal reception gt SET M100 Sets the checking flag for normal lt Abnormal reception gt reception abnormal reception via the 0 4 H str wi01 Resets the main program side 3400 Reception interrupt program execution E 2 revs uo KI D200 Receives data and stores in D200 and later Rer D200 Receive data count D201 and later Receive data 17 6 17 6 17 DEDICATED INSTRUCTIONS 17 3 ZP CSET Programmable Controller CPU Monitoring Register Cancel With this instruction monitoring of the programmable controller CPU c
224. ay occur as a result of using the contents noted in this manual 1999 MITSUBISHI ELECTRIC CORPORATION INTRODUCTION Thank you for purchasing the MELSEC Q L series programmable controller This manual explains the functions and programming required to use the serial communication module Before using this product please read this manual and the related manuals carefully to develop full familiarity with the functions and performance of the MELSEC Q L series programmable controller to handle the product correctly 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 Please always forward this manual to the end user IMPORTANT To use LJ71C24 and LJ71C24 R2 serial communication modules When reading the manual substitute the contents in the table with the following descriptions in the explanations Description in manual After substitution Q series C24 gt L series C24 QCPU LCPU QCPU station station Q QnACPU Q L QnACPU The specifications of MELSEC L series and MELSEC Q series are partially different Before using the equipment please refer to the following to gain familiarity with the different in specifications Appendix 1 Specification Comparisons between the Q Series C24 and L Series C24 The program examples shown in this manual are the examples in which the serial communication module is assi
225. b1 bO Buffer memory address 20194 21194 0 1 0 0 1 0 Default 00001 16 5 Action for buffer full OFF 1H ON Stop by timer 0 error Ou OFF 1H ON 1 Action for buffer full bit When action for buffer full is OFF When the monitoring data exceeds the capacity of the monitor data area monitoring continues by writing the new data over the oldest data When action for buffer full is ON When the monitor data area is full monitor buffer size monitoring is automatically stopped and 10024 is written in the communication data monitoring specification area set by Q series C24 2 Stop by timer O error bit 2 When the stop by timer 0 error is OFF Monitoring continues even if the timer 0 error error code 7F40n occurs When the stop by timer 0 error is ON When the timer error error code 7F40H occurs monitoring is automatically stopped and 10024 is written in the communication data monitoring specification area set by Q series C24 c Monitor buffer head address specification area Address 201 211 Specify the head address of the storage area monitor data area for the monitor data within the range of the user s free area of the buffer memory Setting range 0400 to 1AFDnu 2600 to 3FFDH Default 2600 3300 16 5 16 USING COMMUNICATION DATA MONITORING FUNCTION d Monitor buffer size specification area Address 201 211 Set the size of the monitor
226. bled data is detected by the error correction the modem retries the transmission When the number of retries has exceeded the modem s limit the modem determines that communication cannot be performed in that environment and disconnects the line 3 Both modems must support the MNP4 or V 42 protocol 2 Data compression 1 This function compresses data to be sent prior to transmission and inflates the compressed data upon reception then forwards to the terminal 2 The data compression is effective for the execution speed at a maximum of 200 for the MNP5 and 300 for the V 42bis 3 Both modems must support the MNP5 or V 42bis protocol 3 Flow control RS CS control When communication between a modem and terminal is faster than between two modems the flow control is performed in the following order 3 13 3 COMMUNICATIONS BY THE MODEM FUNCTION 1 The modem transmits data to the partner by storing the data from the terminal in the modem buffer 2 When the buffer in the modem becomes almost full the modem outputs a data transmission temporary stop request CS signal OFF to the terminal The terminal then stops data transmission to the modem when the data transmission temporary stop request CS signal OFF is received Even while the terminal pauses data transmission the modem continues to send data to the partner 3 When a free space is present the modem buffer the modem outputs the data tran
227. buffer memory receive user frame designation area the set No Lith of the user frame received from the external device is stored to the receive user frame storage area 3 If receive transparent code is designated the data of the additional code included in the arbitrary data area is removed immediately after reception before conversion when the receive data is converted from ASCII code to binary code 11 8 11 DATA COMMUNICATIONS USING USER FRAMES The following shows the difference in how reception data for each reception method Format 0 and Format 1 is treated when data is received using the combination of first frame arbitrary data 1 When data is received using Format O0 combination 1 C 1 The Q series C24 regards all arbitrary data after the first frame as valid data and stores it sequentially in the reception area 2 A read request is performed to the programmable controller CPU each time arbitrary data equaling the received data count is received and this process is repeated V wv wv Reception data First frame Arbitrary data S i gt Equaling the received Equaling the received N data count data count 25 Reception start timing Ignored Receive complete timing Stored in the Stored in the read timing reception area reception area 2 When data is received using Format 1 combination 1 D 1 E 1 After the first frame is received the Q series C24 re
228. buffer memory when the initialization data number 0 is designated Used buffer memory The number of data for initialization used and buffer memory designated value Address CH1 CH2 When number used 1 When number used 2 or more 7DO to 801 Data number for initialization Data for initialization registration number designation User frame being transmitted 6 156 180898 82 338 During initialization the data registration number number currently being sent is stored fame 0 default value Unused 7001 t 801 TI H tO Data for initialization registration number designation 1 1 The data for initialization registration number to be used is designated 7DOH to 7DDu 2000 to 2013 Data registered by the OS 9C4H to 9E1H 2500 to 2529 Data registered in the Flash ROM by the user 8001 to 801FH 32767 to 32737 Data registered in the buffer memory by the user 1 Output head pointer designation area address 184 344 B8H 158n Designate the location of the head position n th unit in the transmission frame number designation area to which the registration number of the data for initialization to be sent is written 1 Transmitted form the first unit to 100 Transmitted from the 100th unit 4 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Output count designation area address 185 345 B9u 159u The number of data for initialization units to be transmitted starting from
229. by utilizing the C24 E71 Sold separately GX Configurator SC Version 2 Operating Manual Protocol FB support function Features and usage of the protocol FB support function that supports creation of the data communication 13JU46 program of the module and how to set parameters Sold separately SH 080393E GX Configurator SC Version 2 Operating Manual Pre defined protocol support function Th 1 SH 080850ENG e pre defined protocol support function and usage and the protocol setting method 13JU66 Sold separately The Manual s Use and Structure How to use this manual This manual describes the use of special functions for the Q series C24 QJ71C24N QJ71C24N R2 QJ71C24N R4 QJ71C24 QJ71C24 R2 with each chapter covering a specific function Please read this manual and use the contents below as a reference 1 2 To read an overview of special functions An overview of the major special functions is described in Chapter 1 To use the function that monitors errors in the programmable controller CPU Chapter 2 describes the programmable controller CPU monitoring function which monitors the programmable controller CPU status and devices and automatically sends status information to the other communicating device upon occurrence of an error For how to register cancel the programmable controller CPU monitoring from the external device using the MC protocol refer to the MELSEC Q L MELSEC Communication Proto
230. bytes Messages can be set to a maximum of 256 bytes 2 If registered from the programmable controller CPU sequence program Comments cannot be set Telephone numbers can be set to a maximum of 18 bytes Messages can be set to a maximum of 30 bytes Programmable controller CPU monitoring function See Section 2 4 for precautions when transmitting monitoring results using the modem function Remote password check a How to unlock the remote password 1 When the Q series C24 has been set as a module subject to the remote password check with the QCPU parameter a remote password unlock processing must be performed from the external device after line connection before starting data communication 2 The unlock processing for the QCPU remote password is performed as follows When communicating using MC protocol Perform the unlock processing from the external device using dedicated commands When accessing the programmable controller from the GX Developer Perform the unlock processing on the GX Developer screen when access begins b When the remote password unlock processing is completed abnormally 1 Repeat the unlock processing after checking the remote password set in the QCPU 2 Start with the line connect processing again if the Q series C24 line connect signal X12 turns OFF due to the unlock processing abnormal completion 3 The user should clear the accumulated count stored in the following buffer memory before rep
231. cation required required X Write Read R tration dat 1 00 6912 0 When deleting i Registration y 80 Number of registration data bytes Read designation 8001 processing 1 01 to 6913 to 6952 Connection data Nouficaton message for connection data to be not required 1828 registered and connection data Registration dat 1B29 6953 es bi dh 0 When deleting Registration yie ded d 80 Number of registration data bytes designation SEDE 8002 em P m processing H to 6954 to 6993 Connection data oti ication message or connection data to be not required 1 51 registered and connection data Registration data 9 0 When deleting 1 8142 byte number Registration 80 Number of registration data bytes designation No 801Fu n dE processing H to otification message for connection data to be i 8143 to 8182 Connection data ee not required 1 6 registered and connection data 3 The following shows the data arrangement of the connection area data area corresponding to registration numbers 8001H to 801 in the buffer memory that is used for the register read and delete operations of the connection data as well as the designated values and stored values Data for connection A H m Message area for notification 36 bytes Connection data area 44 bytes m receiver designation 2 Telephone number 18
232. ceiving data used by the user frame Until 2 is written in the user frame use enable disable designation area data transmission is also not available b First frame No designation area and last frame No designation area addresses AEH to B5u 14En to 155 From among the user frames registered in the Q series C24 designate the frame numbers of the user frames you wish to use in the combination and order of priority as described in 1 b15 to bO Default All Buffer memory address 14 First frame 1st to to to First 1 151 First frame 4th combination 2 152 Last frame 1st Fourth to to to combination 5 155 Last frame 4th Write to 801 0 No designation 1H to 3E7H 1 to 999 Designate the default registration frame for OS ROM registration 3E8H to 4AFH 1000 to 1199 Designate the user frame for flash ROM registration 8001 to 801FH 32767 to 32737 Designate the user frame for buffer memory registration 11 16 11 DATA COMMUNICATIONS USING USER FRAMES How to specify the first frame No and the last frame No Set the frame numbers using the following setting method 1 For the receive user frames the first frame and last frame are set as a pair regardless of whether the external device transmits these frames If the external device does not transmit either one of the frames the unsent frame No is set to 0 no setting 2 Am
233. cessing of the Q series C24 modem TA is completed and turn it off after the initialization complete signal X10 is turned ON notification request 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 Program for notification example An example of program for notification is shown below When the initialization and connection data have been registered from the GX Configurator SC or from the programmable controller CPU X10 Initialization complete signal X1E Ready signal X1F WDT error signal MO Accessible flag M2 Data registration complete flag for connection See Section 3 4 4 Initialization complete flag M40 Notification enable flag XIF Turns the ready flag M2 M3 X10 M12 X13 Yit tei KF _ Turns the notification enable flag ON By en oan a er et Rat etn pees meg eee REUS g See Section 3 4 3 See Section 3 4 4 Data for initialization registration Data for connection registration BR tt Y14 Sets the notification issued request signal Modem TA initialization See Section 3 4 5 1 1 I Tes M61 Notification command M40 RST Yi4 Resets the notification issued request signal notification issued SET M69 Sets the notification issued xis request flag SET M6 Sets the flag at notification normal completion SET Y14 X16 MO s L HO H2
234. cessing via the receive complete code is not performed when the same data as the receive complete code has been registered in the last frame 2 The data reception interval is not monitored with the no reception monitoring time timer O when only the last frame is set When a receive error is detected the Q series C24 stores arbitrary data of the reception data received immediately before the error in the reception area of the buffer memory then turns the reception error detection signal X4 ON 11 11 11 DATA COMMUNICATIONS USING USER FRAMES Combination with the first frame Timing patterns for reception start and receive complete read For data reception with format O Pattern No 1 A 1 Pattern No 1 A 2 wv wv wv v i External device Arbitrary data E E Arbitrary data E side p 0 p Ww J LL Oe Programmable Equaling the Equaling the controller CPU received data received data side count count Pattern No 1 B Y External device side S E o iL Last frame Programmable controller CPU side Pattern No 1 C 1 Pattern No 1 C 2 Y Y External device E Arbitrary data E Arbitrary data side D iL iL Programmable Equaling the Equaling the Equaling the controller CPU received data received data received data side count count count For data reception with format 1 Pattern No 1 D Y v Y v
235. cks to 1 pit Sets the number of registered bit blocks to 1 Registers the devices for 015 D100 to D109 as the first block 016 D22 023 Registers the devices for MO to M15 as the second block M32 Sets data setting complete flag 2 yat M32 m ILA U cccHim ocsEr W 0 Executes programmable controller CPU monitoring registration M I SET was Normal completion NI AR ET Abnormal completion nsT W32 2 A program that cancels the programmable controller CPU monitoring This following example shows how to cancel the programmable controller CPU monitoring for the interface on CH1 side When the input output signals of the Q series C24 are X YOO to X Y1F X25 Pis M37 Instruction pulse set N37 M35 t 1 wv 00 1 D2 J ze 5 vo bo 0200 ii 1 Execute canceling the programmable controller CPU monitoring MI t LAS SET M35 1 Normal completion MI m ser M36 1 Abnormal completion 17 15 17 15 17 DEDICATED INSTRUCTIONS 17 4 ZP CSET Initial Settings With this instruction the unit of transmission reception data word byte and data communication areas can be set Applicable device Link direct device Intelligent function Index Setting data Internal device File Constant unto JOO module device register PS Others cen Zn
236. col Reference Manual To use the data communication function for the exchange of data with an external device at a remote location Chapter 3 describes the specifications procedures and other items regarding communication using the modem function in order to exchange of data with an external device at a remote location To use the function for reading received data from the external device using an interrupt program in order to reduce the scan time Chapter 4 describes the programming for execution of a receiving program only when data from the external device is received To use the function for monitoring the data communication time with the external device Chapter 6 describes the function that monitors the data communication time with the external device along with the reception interval time and the response reception time for transmission To use the transmission control function to control data transmission reception with the external device Chapter 7 describes the DTR DSR control and the DC code function to control the data communication with the external device To use the function for simplifying the data communication program with the registration data when preregistering the fixed format section of the communication message Chapters 9 to 11 describe the data transmission reception function with user frames in which the fixed format section of the communication message has been preregistered 8 To use the f
237. communication Applicable device Link direct device Intelligent function Setting data device File M JOO module device Index register Constant 5t woa uoco a Cee e Instruction code Executing Instruction format TL Z BUFRCVS TL Z BUFRCVS Un x1 1 If the host station is a Basic model QCPU function version B or later Universal model QCPU or LCPU double quotation of the first argument can be omitted Setting data Setting data data Description Setting range Set by Data type Start I O signal of the module String Un Un 0 to User 00 to FE The 2 upper digits of an input output signal expressed in 3 digit BIN 16 bit Reception channel number 1 Channel 1 CH1 side 2 Channel 2 CH2 side name D Head number of the devices that store receive data Receive data is read from the reception area of the buffer memory The file registers of each of the local device and the program cannot be used as the setting data Device Receive data Setting data Setting range Setby Stores the number of data read from the receive data count storage D 0 Receive data length 3 System area 0 or more Stores data read from the receive data count storage area in D 1 to D n Receive data System sequence starting from the lowest numbered address 1 According to the Word byte units designation by GX Configurator SC the
238. connection designation 3 38 GX Developer connection designation area T 3 38 H Half duplex communications 8 1 1 I O signals for handshake for mode switching 15 5 I O signals with the programmable controller CPU modem function 3 31 Improper 3 16 3 48 Information to be transmitted 2 11 Initialization commands for modem 3 58 Initialization connection timeout time designation 3 56 Initialization of modem terminal adapter 3 68 Interrupt program example 4 4 Interrupt program startup timing 4 2 M MUERE 14 1 Message wait time 6 13 Mode switching 15 1 Index 1 N Modem connection channel designation 3 56 Modem function 1 3 5 Modem initialization time DR signal valid invalid designation eene 3 57 Modern function system setting 3 56 Monitor buffer head address specification area 16 5 Monitor buffer size specification area 16 6 Monitoring condition 2 8 Monitoring target device 2
239. controller CPU Make the following setting for the external device and the programmable controller CPU so that mode switching is not performed during data communications a Which side is to switch the mode the programmable controller CPU or external device b Timing for each mode switching pattern For mode switching patterns see Chapter 15 Section 1 2 c Interlocking of all connected devices in the case of mode switching 1 Method and message structure when all the connected stations are informed of the mode switching execution 2 Method and message structure when all the connected stations are informed of the mode switching completion 3 Device No and meaning of the value when a programmable controller CPU word device is used 15 3 15 3 15 4 15 SWITCHING THE MODE AFTER STARTING 2 Mode switching from external device a Once the mode has been changed to a mode other than MC protocol Formats 1 to 5 it cannot be changed from the external device In this case change the mode on the programmable controller CPU b Only the series C24 including multidrop link stations connected to an external device is available for mode switching from the external device Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual It is not available for other Q series C24 stations connected over a network system It is recommended to switch the mode on the programmable controller CPU side 3 Data c
240. ction Frame No direction Register read delete result storage Write data byte count designation See 1 User frame See 2 Number of registered user frame storage User frame registration status storage See 3 For registration No check Register data byte count designation User frame storage 40 words Register data byte count designation User frame storage 40 words User frame storage 40 words One or higher Abnormal completion error code Al 0 Delete 1 to 80 1H to Register data byte count Data code of frame to be registered deleted 0 Not registered to Flash ROM He 1 to 200 1H to Number registered to Flash ROM Read write from programmable controller CPU O Always performed Performed as required X Unnecessary Stored value 0 No request 1 Register request 2 Read request 3 Delete request 0 No frame No 1000 to 1199 3E8H to 4AFH Register read delete frame No 0 Normal completion 0 Given range not registered One or higher Registration status Register data byte count designation See 1 1 to 80 1H to C8H Register data byte count User frame storage See 2 Register frame data code Register area for 31 frames 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 1 Registration data byte count designation area Addresses 5 1 00 1829 TFCEH Indicates t
241. ction attempted later x e The next instruction will be ignored until the active instruction has been completed a Completion device Turns on at the END processing of the scan where the GETE instruction is completed and turns off at the next END processing b Status display device at completion Turns on and off depending on the completion status of the GETE instruction Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the GETE instruction is completed and turns off at the next END processing 17 22 Errors 17 DEDICATED INSTRUCTIONS Operation when the GETE instruction is being executed END END END END Sequence processing processing processing processing program GETE instruction Completion of reading user j execution frames by the GETE instruction GETE instruction ON ON completion 1 4 Completion OFF Abnormal Status display OFF i device at completion Normal completion Onescan When the dedicated instruction is completed with an error the complete status display device at completion D 1 turns on and the error code is stored in the control data read result S1 1 See the following manuals regarding the error code and check the errors and take corrective actions lt Error codes gt 4FFFH or less the user s manual hardware design maintenance and inspecti
242. cution designation Perform notification No communication interval time destination 2 min Data No for initialization designation 8001 Data No for connection designation Registration of the modem s initialization data and line connection data modem initialization line connection and notifications are all performed by the sequence program 3 103 3 COMMUNICATIONS BY THE MODEM FUNCTION XIE XIF NO NO N3 X19 x12 x13 Y10 W30 2 N3 x10 x12 X13 CALL M1 CALL P2 x20 PLS N80 M80 M30 Mv KIM3 RST w SET W81 A c X24 wo Ris M60 M60 RST N6 SET M61 Mel br x27 RST 00 RST 101 S400 E T jww K2Y60 FEND Wi P1 K30 00 pt WOV ATEIQOVI amp CIAD2RH 2 WOV 1 amp IOSR28SOSO 1 010 wo TO H1B00 SET wt RET 3 104 Accessible flag is turned ON Modem initialization enabled flag is turned ON Line connectable flag with the remote station is turned ON To the data registration processing for initialization subroutine To the data registration processing for connection subroutine Converts the initialization command into pulse Various complete flags after the modem initialization processing is reset To the modem initialization processing subroutine Converts the notification command into pulse To the notifica
243. d ON M30 Modem initialization enabled flag is turned ON M50 Exchangeable flag with the partner station is turned ON M51 Data transmission enabled flag to the partner station turned ON CALL P1 To the data registration processing for initialization subroutine M31 Convert the initialization command into pulse K1M3 Various complete flags after the modem initialization processing is reset M7 M32 P3 To the modem initialization processing subroutine M52 Convert the data communication transmission command into pulse M53 P51 To the data transmission processing subroutine M55 Convert the reception data read request into pulse M56 To the reception data read processing P52 subroutine Convert the connection in progress M80 J signal OFF into pulse Line disconnection from partner side M81 Convert the reset command of various request signal into pulse M82 M82 be crt To the various request signal and the SM400 complete signal reset subroutine HK ov K2M0 K2Y80 Output the various complete flag status LED display 3 100 3 100 3 COMMUNICATIONS BY THE MODEM FUNCTION T Pi M K30 M MOV 7 1 00 1 amp 1 amp 02 amp MOV 18108825050 1 TO HIBOO 00 SET M31 P3 SET SET Y10 X10 x13 NO e Pmm M irRWP H221 D100 Y10 x10 RST x13 RST M52 M92 P51 MOV N02 N01 MOV HOAOD MOV MOV MOV
244. d and received Data contents transmitted and received FFH EEH or F4H The lower 2 bytes of the calculated sum check code are transmitted and received as 2 byte binary code data FFH FOH or FFH F6u The lower byte of the calculated sum check code is transmitted and received as 1 byte binary code data The lower byte of the calculated sum check code is converted to 2 REA rer EE RIH digit ASCII code then transmitted and received The lower 4 bits of the calculated sum check code is converted to 1 Lo EC SORE ARES digit ASCII code then transmitted and received An example of the contents arrangement of the transmission and reception of the sum check code is given below Example Arrangement of data transmitted and received one first frame and one last frame User frame last frame User frame Arbitrary data first frame User frame register code gt 02 FF 0143B S Station 031 1 0 0 E i Sum C L Ti No 11 12AB check xX Xi cde F p A ad EIN 1 1 1 A 1 I I 1 1 1 1 1 Transmission reception _ lo oo Sp 416 344 124 0341324 014 0D 0A data code How to calculate the sum check code and data contents transmitted and received This is a numeric value obtained by adding data in the above range as binary data In the case of the example Range 1 L 41H 31H
245. data can be handled as part of a user frame Sum check code whose objective is an arbitrary range in the transmit and receive messages Horizontal parity code whose objective is a determined range in the transmit and receive messages Two s complement sum check code whose objective is a determined range in the transmit and receive messages Q series C24 station No One byte data in data transmission NULL Code 00H One byte of arbitrary data in data reception Used to handle an arbitrary byte of data as part of the user frame during receiving check by the Q series C24 a Variable data designation method Variable data is designated by combining write code and the data codes shown in the table below The sum check code Q series C24 station No and other variable data can be handled according to FFH of the first byte and 00H to FFH of the second byte 1st byte b Variable data designation contents data contents transmitted and received and handling by the Q series C24 The table below shows the register codes FFu 00n to FFH FFH combinations for handling variable data the data contents that are transmitted and received and how the Q series C24 handles the data Combinations other than those shown in the table cannot be registered 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION Changeable data register code Data contents transmitted and received Q series C24 handling range 3
246. data read request signal to the programmable controller CPU turns ON 4 M Timer 0 Set time External device series C24 Receive data read request signal X3 XA d Data communications using bidirectional protocol Ignores deletes the receive data from the start of reception of the current message to time out Stores the error code to the data receive result storage area buffer memory addresses 258 268 for the target interface When the receive data complete transmits a NAK message to the external device and waits to receive the next data 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2 Changing the no reception monitoring time timer 0 a Changing the no reception monitoring time timer 0 The no reception monitoring time timer 0 is designated by the number of transmitted characters byte count corresponding to the data communication rate set in the interface and then it is registered on the GX Configurator SC s Transmission control and others system setting screen Adjust or set the value based on the specifications of the external device b No reception monitoring time format specification in non procedure protocol Format 0 Format 1 The no reception monitoring time format in non procedure protocol is specified to use the no reception monitoring time timer 0 by the non procedure protocol and is registered on the Non procedure system setting screen
247. designated by S and succeeding devices as well as the transmission user frame designation area of the Q series C24 2 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the PRR instruction or executing the PRR instruction during execution of another instruction in the same channel Availability of Instruction 1 simultaneous Handling of simultaneous execution execution e The next instruction will be ignored until the active instruction has been completed However simultaneous execution is available when channels to be used are not the same e Dedicated instructions simultaneous execution error 7FFOu occurs in the dedicated instruction attempted later However simultaneous execution is available when channels to be used are not the same k Is EE occurs in the dedicated instruction attempted later Available Not available Since the dedicated instructions shown below use a different communication protocol from that for the PRR instruction they are not used in the same channel e ONDEMAND BIDOUT BIDIN e CPRTCL If the dedicated instructions shown above are used in the same channel with the PRR instruction the communication protocol setting error 7FF2n occurs 3 Whether the PRR instruction was completed normally or abnormally can be checked with the completion device D or status display device at completion
248. designation 2 4 Tstset registration No See Section 11 2 4 Blu E 9 4th l 2 1st Lastframe 77 77 7771 4th set B5u No designation 27 1 258 Data reception result 25 Receive user frame 1 th set 600H Receive data count storage 601H Receive area 2 to Receive data storage 7FFH 2020 User frame receive to 1 Sequence program to format 1st set Setting the user frame LU 2023 designation I receive format eic 20244 Exclusive 15 Refer to Section 11 2 4 format 1 F 4 i 1 4th set to lreceiveddata ______ _____ 2027 count designation 11 DATA COMMUNICATIONS USING USER FRAMES 2 Sequence program example when not using GX Configurator SC For details on the INPUT instruction refer to User s Manual Basic lt lt User frame reception setting gt gt 11 24 X1E PLS lt Frame No 8001H setting MO K5 5102 MOV HOA20 Mov H3B MOV MOV MOV MOV MOV MOV lt Frame No 8002H setting K3 H4102 H3B Frame No 8005H setting K3 HOFFO3 HOFO M U G 0 0 6912 QV 6913 UO 6914 0 6915 0 6953 6954 0 6955 0 7076 0 7071 U G 0 7078 1 gt User frame registration See Chapter 9 11 24 11 DATA COMMUNICATIONS USING USER FRAMES lt First frame No for
249. determined Priority of data communication and notification After line connection is established the data transmission reception processing with the partner device is performed in the order of the processing request occurrence At the same time when the line disconnect processing or data transmission reception including data transmission processing reception processing and Flash ROM access processing occurs the line disconnect processing has the priority Data communication time The data transmission reception time after line connection has been established with the partner device is the total time of the transmission time between the Q series C24 and modem TA between modem and TA and between modem TA and partner device When communicating via the MC protocol the transmission time such as TO and T3 indicated in the MELSEC Q L MELSEC Communication Protocol Reference Manual must include the transmission time between the Q series C24 side modem TA and the destination device 6 7 8 3 COMMUNICATIONS BY THE MODEM FUNCTION Initial Settings The connection data used for modem functions can be registered as follows using setting procedures Set the telephone number and message within the permissible number of registration characters for modem TA 1 If registered using GX Configurator SC Comments can be set to a maximum of 256 bytes These are not used for control Telephone numbers can be set to a maximum of 64
250. device Turns on at the END processing of the scan where the PUTE instruction is completed and turns off at the next END processing b Status display device at completion Turns on and off depending on the completion status of the PUTE instruction Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the PUTE instruction is completed and turns off at the next END processing Operation when the PUTE instruction is being executed END END END END Sequence processing processing processing processing PUTE instruction Completion of reading user execution frames by the instruction PUTE instruction Registration OFF deletion request Completion OFF device i Abnormal Pe eee Status display OFF device at completion ON completion Normal completidn Onescan 4 gt 17 30 Errors Program example M50 17 DEDICATED INSTRUCTIONS When the dedicated instruction is completed with an error the status display device at completion D 1 turns on and the error code is stored in the control data registration deletion result S1 1 See the following manuals regarding the error code and check the errors and take corrective actions lt Error codes gt 4FFFuH less User s manual hardware design maintenance and inspection for the CPU module us
251. devices to both of two interfaces the total of the communication speed should be 230400 bps of less When connecting an external device to either of two interfaces the maximum of 115200 bps is available for the interface a maximum of 230400 bps if using CH1 side In this case set 300 bps for the other interface to which no external device is connected K4 Set 00v to the interface for which GX Developer connection is set in the communication protocol setting Serial communication module will operate at the communication speed set on the GX Developer 17 33 17 33 17 DEDICATED INSTRUCTIONS 2 S 4 CH1 communication protocol setting and S 6 CH2 communication protocol setting Setting No Description GX Developer connection GX Developer communication rate and For connection to MELSOFT ie transmission specifications are automatically set Fomati communication with ASCII code in the specified form of an A compatible 1C frame or Essa compatible 2C 3C 4C frame Genio communication with binary code in a QnA Format 5 comedi 4C frame Non procedure protocol For communication using non For communication using non procedure protocol protocol Bidirectional protocol For communication using bidirectional protocol Set to the CH1 side when CH1 and CH2 interfaces are used in linked operation operated with the communication protocol of the CH2 side Pre defined protocol For communication using pre defined protocol
252. dress 553 229u 1 Stores the number of execution of the Q series C24 notification message transmission processing for the pager receiver 2 The storage value when the number of notification execution exceeds 32767 remains at 32767 3 The value for this area can be changed by the user in the range of 0 to 32767 When the storage value is changed by the user the number of execution is stored according to the changed value s For notification execution data storage Notification execution data number storage area address 554 558 22 22 1 Stores the registration number of the data for connection used in the Q series C24 notification message transmission processing to the pager receiver as log information 2 The latest five data is stored in order at the corresponding areas data 1 data 2 The latest information is stored in the data 1 notification execution data number storage area The old notification execution data number other than the latest five are deleted in order b15 to bO Buffer memory address 554 22 to 5 8001 to 801 Data 1 570 23 BB8x to BD5n 8001 to 801 Data 1 C 0 Notification not executed BB8u more Notification executed execution number 8 to BD5u 3000 to 3029 t For user registration frame registration Number of bytes in registration data designation area address 6912 6953 1 00 1B29n
253. dules and a communication method for accessing a programmable controller CPU from an external device This is called the MC protocol in this manual There are two communication types one uses ASCII code data and the other uses binary code data This function registers character data messages to be sent to external devices mainly printers to the serial communication module as a user frame in advance and sends the registered data for multiple user frames using the non procedure protocol A name of the connection when multiple external devices or other C24s are connected on a 1 n or m n basis Multidrop connection NES using the serial communication module s RS 422 485 interface MX Component Active X control library for serial communication MELSOFT product A compatible 1C frame Formats 1 to 4 Bidirectional protocol Buffer memory Independent operation MELSEC communication protocol MC protocol Message send function Printer function A communication procedure and one of the data communication functions for communicating any data between the programmable controller CPU and the other device Data string used for communication using pre defined protocol with external devices One of the data communication functions available for the QJ71C24N R2 R4 and LJ71C24 R2 In data communication between the QJ71C24N R2 R4 or LJ71C24 R2 and an external device data can be sent or received by using a protocol for th
254. dules with which any data communication is available between the programmable controller CPU and the other device Memory of the intelligent function modules special function modules which is used for storing data sent to or received from the programmable controller CPU setting values monitor values etc Device gt memory of the programmable controller CPU used for storing data GX Configurator SC Setting and monitoring tool for the serial communication module MELSOFT product GX Developer A programming tool for designing debugging and maintenance MELSOFT product Operation of each of the two interfaces on the serial communication module when data communication is performed with other devices using the specified protocols respectively MELSEC Q L series modules with functions other than I O functions such as A D and D A conversion Intelligent function module MEER Operation of each of the two interfaces the serial communication module that are connected to external devices and linked one another in order to communicate data to from the external devices Linked operation The two interfaces communicate data using the identical data communication function MC protocol identical format or non procedure protocol and the identical transmission specifications Linked operation using the pre defined protocol or the bidirectional protocol is not allowed A communication procedure for the Q series C24 or the Ethernet interface mo
255. during designation number input the telephone No 2 and make the line connection Callback request during designated number GX Developer Telephone No 1 Registration in the Series C24 Callback data No 1 Telephone No 1 Callback data No 2 Telephone No 2 Line connection GX Developer Callback data No 3 Telephone No 3 Telephone No 2 to to Callback data No 10 Telephone No 10 ER udine 3 COMMUNICATIONS BY THE MODEM FUNCTION d If callback processing was not executed normally an error message screen is displayed on the GX Developer side Perform the processing operation reconnection operation etc corresponding to the displayed message The operating state on the Series C24 side can be confirmed by the following items in the GX Configurator SC monitor test screen GX Configurator SC are Buffer memory a Monitor item Description Monitor test screen address X monitor test X10 Modem initialization completion Section 3 3 5 X12 Connection in progress Modem function Modem function sequence status 222H Section 3 3 6 monitor test e Set the settings related to the callback function in the following areas of the GX Developer Starting Procedure GX Developer gt Tools Options 1 Line callback cancel wait time Setting range 1 to 180 s Default 90 s This specifies the wai
256. e Transmits data code registered in the Q series registered in the series C24 C24 to ASCII data and transmits Converts data of the contents code and byte count designated by the user to ASCII data and transmits Converts the designated send data to ASCII data and transmits For 10h data transmits 10H 10 Transmits the data of the contents code and byte count designated by the user For 10h data transmits 10H 10 Transmits the designated data unchanged No conversion For 10h data transmits 10H 10 10 3 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 4 On Demand Function Control Procedure During User Frame Use The following uses examples to explain the control procedure when using the on demand function to frame to transmit on demand data to an external device by user frame 10 4 1 Data communication using the ASCII code The following shows the control procedure when performing switch settings via GX Developer and registration via GX Configurator SC 1 Switch settings via GX Developer 1 Set the Communication protocol setting to any one of the MC protocol formats 1 to 4 2 Setthe Station number to 0 2 Registration via GX Configurator SC Register as follows when transmitting a user frame user selected transmission data 1 or a combination of user frames 1 User frame registration screen User frame Contents of user frame User frame No c
257. e transmitted from the Q series C24 to an external device Transmitting in QnA compatible 3C frame format 1 On demand data As shown in the left the user can sort the data except for the Send data portion cation No Station No Network No 1 o o E S Local station No Sum check code character Transmitted by user frame 1 User frame data communications can be carried out by registering registered by the data code the message format to be transmitted by the external device and the message format to be received by the external device according to the specifications of the external device to the Q series C24 as user frames For the illustration above the Q series C24 transmits the on demand data as described below User frame sum check code Calculates the sum check code according to the contents registered in advance by the user and transmits the result as ASCII code or binary code data Other than user frame sum check code Transmits data of the code registered in advance by the user No conversion Send data character area B This is the data that the sequence program requested for a transmission with on demand instruction The same contents and list as when transmitted without using a user frame described in the MELSEC Q L MELSEC Communication Protocol Reference Manual are transmitted by communication protocol by GX Developer switch setting and word byte designation 10 1
258. e communication specification Mode switching complete reset Mode switching request clear by clear command 15 9 15 SWITCHING THE MODE AFTER STARTING 15 5 Switching the Mode from an External Device This section shows how the Q series C24 mode is switched from an external device 15 5 1 Mode switching procedure The following explains the procedure for switching the Q series C24 mode from an external device Mode switching External device command 1 For the message format refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual message Mode switching Programmable response controller CPU message Normal end e Approx 400 ms Mode switching in progress X6 XD CHL ERR communication error XE XF Q series C24 ready Switch setting error mode switching error storage area address 203 Only when normal Buffer memory special applications area 3 Data communications initialization setting area described in b default value modification User s Manual Basic Performed only when necessary Addresses 93 to 121 133 to 1 1 Data communications 4 Data communications possible Data communications impossible possible 1 Inform in advance all the connected devices that data communications by mode switching cannot be performed 2 When XE and were turned on check the error contents as described in the User s Manual
259. e either a decimal or hexadecimal device No The read points registration points are designated as hexadecimal However if this is done by either MC protocol communication form 1 to 4 or non procedure protocol communication when ASCII BIN conversion of the communication data has been designated the head device No for all devices to be sent to external devices as the monitoring results will be converted to hexadecimal ASCII data and sent h Monitoring condition When condition agreement transmission is designated with the programmable controller CPU monitoring function c designate the conditions for transmitting information for the monitoring condition value i i Monitoring condition value When condition agreement transmission is designated with the programmable controller CPU monitoring function c this item designates the status numeric value of the monitoring condition h When the monitoring device is a word device Designate the monitoring condition value with a numeric value When the monitoring device is a bit device Designate the monitoring condition with a numeric value 1 0 corresponding to ON OFF 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 4 Setting items for sending monitoring results The following is an example of setting items and data transmission when sending the monitoring results of the programmable controller CPU monitoring function execution to the external device using
260. e external device This must be set in GX Configurator SC Pre defined protocol support function This function can be used in GX Configurator SC Pre defined protocol support function The functional overview of the pre defined protocol support function is indicated below Protocol setting according to the opposite device The writing and reading of protocol setting data to QJ71C24N R2 R4 and LJ71C24 R2 flash ROM Debugging support function Non procedure protocol Pre defined protocol Pre defined protocol support function Terminology One of the message formats for the serial communication modules which is used to perform ASCII data communication by MC protocol QnA compatible 2C frame This is the same message format as the communication frame using the protocol for the QnA series serial Formats 1 to 4 communication modules QnA compatible 2C frame Formats 1 to 4 QnA simplified frame Formats 1 to 4 One of the message formats for the serial communication modules which is used to perform ASCII data QnA compatible 3C frame communication by MC protocol Formats 1 to 4 This is the same message format as the communication frame using the protocol for the QnA series serial QnA compatible 4C frame communication modules Formats 1 to 4 QnA compatible frame Formats 1 to 4 QnA frame Formats 1 to 4 QnA compatible 4C frame Formats 1 to 4 QnA extension frame Formats 1 to 4 One of the message fo
261. e for callbacks which the Q Series C24 did not executed due to callback error detection is stored here f Auto callback connection permit accumulated count storage area Address 8946 22F2n The accumulated count value for normal line connections from the GX Developer by the connection system shown below is stored here 1 Auto callback during fixed 2 Auto callback during designated number g Auto callback connection denial accumulated count storage area Address 8947 22F3H The accumulated count value for line connections from the GX Developer by the connection system shown below that were not connected normally is stored here 1 Auto callback during fixed 2 Auto callback during designated number h Accumulated count of callback receive procedure cancel storage area Address 8948 22 4 The accumulated count value for the number of callback procedures that were terminated from the initial GX Developer by the Q Series C24 when a line connection request by another GX Developer was executed during temporary line disconnect from the GX Developer side through callback specification is stored here The Series C24 performs the callback operation with respect to the latest connection request Each of the accumulated count values stored in d to h above are further explained below 1 The user can clear the values using either of the following Set the accumulated count to 0 using the GX Configurator SC
262. e monitoring condition value or status when the Q series C24 judges that the numeric value status of the monitoring device for condition agreement transmission head device of each block agrees with the condition using the registration values shown below Type of monitoring device Monitoring condition value or status Registration value 0000H Bit device 0001H 0000H to FFFFH Example 1 When MO ON is the condition agreement Monitoring condition registration value 0001H Registration value for the monitoring condition value or status 0001H Example 2 When DO gt 100 signed is the condition agreement Monitoring condition registration value 000AH Registration value for the monitoring condition value or status 100 64 In status monitoring for the programmable controller CPU the monitoring conditions and condition values for condition agreement transmission are not registered Instead it is registered as whether or not programmable controller CPU status monitoring will be performed Monitoring results in condition agreement transmission are sent or notified only once when an error is detected by the status information read from the programmable controller CPU for the first time 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 2 5 Transmission methods of monitoring results and transmission data to the external device The following explain the method of transmitting the programmable controller CPU monitorin
263. e out 60s Also perform the settings for a remote password check described in Section 3 3 5 3 a and b when a remote password check is executed with respect to the remote password set in the QCPU 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 3 Register read delete of the initialization data The section explains the register read delete of the data for initialization such as initialization commands for the modem TA connected to the Q series C24 side for data communication with the external device pager receiver notification and accessing from GX Developer using the modem functions 1 Registration destination of the data for initialization 1 The data for initialization may be used by registering to the Q series C24 Flash ROM or buffer memory 2 The buffer memory may register the data for connection shown in Section 3 4 4 and will register the data for initialization or data for connection in the designated area 3 Itis recommended that the data for initialization during the debug process is stored in the buffer memory The registration data in the buffer memory will be erased after starting up the Q series C24 loading station again It is necessary to register the data for initialization in the buffer memory after each start up of the Q series C24 4 Itis recommended to store the data for initialization to the Flash ROM after completing the debug process By registering it to the Flash ROM the registration process o
264. e output ON If any of the Use prohibited signals is output the programmable controller system may malfunction 2 When the modem function is not used or the QJ71C24N RA4 is used X10 to X16 are used for the system and Y10 to Y16 cannot be used 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Function and description of each I O signal I O signal Function description x10 Modem initialization Indicates normal completion of the series C24 s initialization of the modem TA Section 3 4 5 i 4 completion connected to itself according to the initialization data designated m Indicates that the Q series C24 is dialing connection processing the partner side X11 Dial in progress according to the data for connection designated 1 Indicates normal completion of the line connection processing from or to the partner Connection in side progress 2 When this signal is on data communication with the destination is possible notification is not possible Section 3 4 6 Initialization 1 Indicates abnormal completion of the modem TA initialization or line connection nitialization processing dialing to the destination connection abnormal 2 Check the cause of the abnormal completion in the modem error code storage area completion Section 3 4 5 address 221 and remove the cause Modem Sa ET Indicates that the line for data communication with the destination has been disconnection 5 Section 3 4 8
265. e password mismatch notification count designation 8204 200 Remote password mismatch notification accumulated count designation x o 8205 200Dx Auto modem initialization designation 0o o 0o aeo Callback function designation x 8193 200 Callback denial notification accumulated count designation ule ubl E le 8194 20024 x 8449 to 8458 Data No for Callback designation 1 to 10 x 2101 to 210 Required item Setting possible X Setting not required __ eee d o x eoe o x x Ee eee 1 For details on how to register the data No for initialization see Section 3 4 3 For details on how to register the data No for connection see Section 3 4 4 2 Even if the programmable controller CPU on the series C24 loading station local station becomes STOP status under the following circumstances the line telephone with the partner devices will be left connected In order to prevent the line from being left connected when the line is not in use be sure to make the appropriate settings 3 COMMUNICATIONS BY THE MODEM FUNCTION 1 When the programmable controller CPU is stopped when the connected signal X12 is at the ON status This occurs because the program write after remote stop is enabled 2 When the programmable controller CPU performs an error stop during self diagnosis etc When setting the No communication interval time as
266. e programmable controller CPU error is detected or the designated device status is matched with the monitoring conditions see Section 2 2 4 c During constant cycle transmission a notification message for one connection data registered for notifying constant cycle transmission is sent d During condition agreement transmission a notification message for connection data registered in the block where the monitoring conditions match is sent in block units When there are multiple blocks where the monitoring conditions match notification is performed at the Wait time of notification interval notification interval set by the user for use with the modem function The programmable controller CPU monitoring stops until notification has been performed to all blocks where the monitoring conditions match 1 When performing message notification using the programmable controller CPU monitoring function set the corresponding interface side as the target of the modem function 2 When setting data for the programmable controller CPU monitoring function with GX Configurator SC programmable controller CPU monitoring begins immediately when the Q series C24 starts up 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 2 6 Execution sequence for using the programmable controller CPU monitoring function The following explains the execution sequence for using the programmable controller CPU monitoring function 1 When tr
267. e reception channel WOVP K6 DA as allowable number of reception G INPUT u8 01 010 MO Executes reception M100 Sets the normal completion flag ul M101 Sets the abnormal completion flag 11 27 11 27 11 DATA COMMUNICATIONS USING USER FRAMES b When receiving with a combination of the first frame and arbitrary data reception using Format 0 Additional code Removed by Qseries C24 Transparent code When STX handled E as transparent code E X Receive data count Word units On 02H Receive byte count excluding frame and Head data additional code 12 2 6 Byte units Receive byte count excluding frame and additional code 12 External device The figure shown below is for word units 2 33 02 41 42 43 34 12 0 Receive data count Proaimmable ADu User frame use control conta CPU First flame Arbitrary data are Received data count 2 designation corresponds to register AEn First frame No designation 9 8 1st DEEP te tee Reception data read request X83 1 6H 1 Programmable Bix 4th controller CPU i B2 Last frame No designation 41BH 1st Completion device MO None EON AM 4 Abnormal 3 2nd 1 completion Status display device 1 Y 54 None dui at completion Normal H 3rd 1 1 comple
268. e test 0001 0011 0100 00201 1341 VIEDNE 0 ol 0011 0100 0010 ooo oc 0 0 0 0 Ff FP fF FP 98 k I i RFP FF FF EF aia ooo Ff b15 614 b13 612 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 1 When transmitting data 111 X System area CD CS DSR Data transmission 16 10 16 10 17 DEDICATED INSTRUCTIONS 17 DEDICATED INSTRUCTIONS Dedicated instructions are used to simplify programming when using the intelligent functional module functions Among the dedicated instructions for the QJ71C24N R2 R4 and QJ71C24 R2 explained in this manual this chapter focuses on the instructions that can be used for QCPU There are restrictions on the function version and the serial number of the QJ71C24N R2 R4 and QJ71C24 R2 that can use the dedicated instructions For details refer to the Q Corresponding Serial Communication Module User s Manual
269. e wait 30 code Sum check 1 Station No for all external devices general report 2 See 1 of 5 above b The other external devices check if all external devices general report data was received If the data was received the external device performs step 3 If the data was not received the next external device transmits all external devices general report data and obtains the line usage right and performs step 2 The other external devices perform b of this item 14 8 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 3 2 Data communications between programmable controller CPU and external devices by designating a master station and slave stations One of the external devices is made the master station and the other external devices communicate data with the programmable controller CPU after obtaining permission from the master station Example Time gt Master station Permission H 1 external device granted A A A A response General report to start and end data Communications Communications Communications ia request Communications request complete report station and 4 complete report Communications Permission Slave station y request poe ieee granted Response external device 1 p HK Response Permission granted Slave station response Start v v v v external device 2
270. ea 3840 words C004 to 1AFFH Application is determined by the user 6912 to 6952 User registration area Registration No 8001 to 801 1 00 to 1B28x The user registration area has the following combined uses with data written For registration No by the user according to the purpose of use by the TO instruction etc 80014 See each explanation item concerning the configuration of each area the data written etc RW registration rks 3 0 1 If data communications is being carried out by user registration frame 8142 to 8182 User registration frame See Chapter 9 1 to 1FF64 SMS 2 If data communications is being carried out by the modem function pcs ESSE Initialization Data See Section 3 4 3 Connection Data See Section 3 4 4 8183 to 8191 4FF7 to 1 Use prohibited System area H H 8192 2000s System Flash ROM writing allow prohibit designation H designation 0 Write prohibited 1 Write allowed Callback function designation Auto Callback connection during fixed Callback connection during designated number 8193 20014 Callback connection during max designated number is 10 For callback Auto Callback connection during fixed function Auto Callback connection during designated number Auto Callback connection during max designated number is 10 Callback denial notification accumulated count designation 8194 20024
271. ead 1 1 T 57H 2 30H 30H 30 31H 30H 30H 30x 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 304 32 30H 30 30H 33 Y Y Y Y W100 W101 W102 W103 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION When data for bit device M16 to M175 10 point is sent When the word device unit designation is word unit the device data will be sent in a gt L sequence The number of registered points is the number of points in word units When ASCII BIN conversion is not performed The total number of bytes for the device data section is the number of device points X 2 When the word byte unit designation is byte When the word byte unit designation is word ey TE r1 2g 2 92 S S 28 gj se g 8 8 55 8 8 ss 85 58 8 E 55 8 Es 8 8 ES 8 8 38 Is 28 3 3 5 258 E 2 B8 8 2 42 Es cms L H 5 E cH E H H L M M 104 00H 00 90H 0 30H 11 por 12H 4 10 00x 00 90 00H 11H 12H 3 0 1 1 1 1 3 0 i EE 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 00 0 1 0 0 1 1 0 0 0 O MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM 2222111133222222 3322222222221111 3210987610987654 1098765432109876
272. eating the line connect processing if the Q series C24 CHn side ERR occurrence signal XE XF turns ON and the ERR LED lights up due to the unlock processing abnormal completion Applicable buffer memory Storage area for accumulated count of unlock process abnormal completion accumulated Address 8756 22FCu How to clear Cleared by the user using one of the following Set the accumulated count to 0 on the GX Configurator SC modem function monitor test screen Write to the applicable area of the buffer memory 3 COMMUNICATIONS BY THE MODEM FUNCTION c When the number of times remote password mismatch occurs is large 1 When the number of times notification of a remote password mismatch is received exceeds the number of times specified in buffer memory address 8204 200 the Series C24 disconnects the line automatically The connection signal X12 turns OFF After confirming the remote password registered in the QCPU and the remote password specified in the external device execute line connection again 2 When the number of times notification of a remote password mismatch is received exceeds the accumulated count value buffer memory address 8205 2000 the Q Series C24 executes the following processing The line and modem are not disconnected when communicating using MC protocol An error code 7FE8u is stored in the buffer memory s MC protocol transmission error code storage area address 602
273. eception data prior to the last frame are all treated as arbitrary data 3 The Q series C24 will begin reception processing when arbitrary data is received When data of the same arrangement as the last frame is received arbitrary data is stored in the reception area of the buffer memory and a read request is performed to the programmable controller CPU 4 The received data count initially set in the Q series C24 is a data count that exceeds the size of the arbitrary data to be received 5 The Q series C24 performs the following processing with respect to the reception data that is the same as the receive complete code initially set in the Q series C24 When the reception data is included in the arbitrary data Reception is processed via the receive complete code When the reception data is included in the last frame Reception is not processed via the receive complete code Example By registering ETX CR LF as the last frame a read request is performed to the programmable controller CPU when the end of the reception data receives a message of ETX CR LF Arbitrary data Last frame ETX CR LF v Reception start timing Receive complete timing Stored in the reception area read timing 11 7 11 8 11 DATA COMMUNICATIONS USING USER FRAMES b Reception of combination 2 B 1 In this method a user frame is used as the last frame in place of the non procedure protocol data receive complete code and
274. ecking that mode switching was completed normally inform all the connected devices that data communications are possible and restart data communications To check the Q series C24 mode communication protocol transmission specifications after switching read the buffer memories addresses 252 to 253H 262H to 263 described in the User s Manual Basic 15 8 15 8 15 SWITCHING THE MODE AFTER STARTING 15 4 2 Mode switching sample program The following shows a sample sequence program that switches the CH1 interface mode The series C24 I O signals X YOO to X Y1F X60 M11 M12 X3 X4 M50 bo Mode Reception Transmission Reception Abnormal switching processing processing read reception instruction request detection c o H8580 D1 HO H90 0 K2 SET Y2 X6 LRST Y2 FROM HO H203 2 Ki D2 Ko es it M50 Wan Modification of the setting values of the buffer memory special applications area RST N50 XOE epe ce DE ee I X52 RST Y2 L O M50 15 9 Changes the operation mode to MC protocol format 1 Sets the transmission specifications Writes the mode switching designation contents to the buffer memory Sets the mode switching request Resets the mode switching error signal Reads the mode switching request contents Mode switching complete Changes the setting value of the communication protocol according to th
275. ecuted automatically when the Q Series C24 starts up x2 Prior to data communication the series C24 checks whether the remote password specified by the user and the remote password set in the QCPU agree or not If they agree it allows access to the specified station 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 2 System Configuration This section describes system configurations when the modem function is used to call a pager receiver or to perform data communication with an external device via public lines 3 2 1 System configuration when performing data communication with an external device The following describes the system configuration examples used when performing data communication between the external device and programmable controller using the Q series C24 s MC protocol non procedure protocol bidirectional protocol 1 Connection example with an external device External device Public line REG Modem CT cable Modem RS 232 cable Q25HCPU ooo000 2 Connection example with a Q series C24 Q25HCPU z 8 o00000 Public line l o RS 232 3 Connection example with a Q series C24 via cellular phone QI71C24 R2 QJ71C24 R2 MODE CH2 won jew B RUN Public line Cellular phone connection adapter The public lines
276. ed 7000 or higher User s Manual Basic The following shows an example of a sequence program when registering user frames Data set for the program example are as follows Setting item Setting data Registalion dala Binary _ 46H 39H 30H 30 30H 30H 46H 46H 30H 30H ASCII F90000FF00 When the input output signals of the series C24 are X Y80 to X Y9F X50 s E M50 Registration request mov DO Sets the registration request H3E8 D2 Sets the frame number to be registered K10 D3 Sets the number of registration data bytes H3946 D4 Sets the registration data for the frame to be registered in D4 to D8 H3030 05 H3030 D6 H4646 07 H3030 D8 Sets the flash ROM write allow 6 PUTE U8 DO D4 Executes user frame registration A M100 Normal completion _ LSET M101 Abnormal completion 17 31 17 31 17 DEDICATED INSTRUCTIONS 17 8 ZP UINI This instruction can change the mode transmission specifications and station number of the Q series C24 It is applicable to the QJ71C24N R2 R4 and LJ71C24 R2 Applicable device Link direct device Intelligent function Index Setting data device f Te module device register Constant Others register ef ee et wea uoco Instruction code Executing condition Command ZP UINI f ZP UINI Un 1 If the host station is a Basic model QCPU functi
277. ed When ASCII BIN conversion is performed Number of registered word blocks Number of registered bit blocks CPU abnormal monitoring Number of registered word blocks Number of registered bit blocks CPU abnormal monitoring S T S I 00H 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 4 When user frame No B081H is designated Information on monitoring results for all blocks are sent as follows Results are sent in the following order the device information registered in the word block the device information registered in the bit block and then programmable controller CPU status information Example Number of registered word blocks 1 W100 to W103 4 points Number of registered bit blocks 1 MO to M15 1 point Perform CPU status monitoring 1 1 point When ASCII BIN conversion is not performed The total number of bytes for the device data section is the number of device points X 2 When the word byte unit designation is byte Lob bcp 3k db m p 1 8 52 S 5 2 S 9 g 55 3 os Z fe E os g ss 5 co gs c go S DO g Do E n Do 8 2 S 2 2 9 5 8 Ev 2g gt I 5 oj 2 2 5 5 Sl 25 2 e a 5 t o 2 gt g 2 g gt g i 1 Le dH L iL H IL H tL L eo L H i 1 W M
278. ed contents of the user frame No specified as the first frame No and the last frame No When receiving with a combination that specifies the first frame User frame No Registered code Registered data contents STX Q SP 02 51r 204 MER External device station First frame No 024 414 6n 064 ACK 15 15 41 034 FFu FOH ETX Sum check code Last frame No 11 26 11 26 11 DATA COMMUNICATIONS USING USER FRAMES a When receiving with a combination of the first frame arbitrary data and last frame reception using Format O Additional code Removed by Q series C24 Transparent code When STX handled ub as transparent code E X 02 Receive data count Word units Head 4 n Receive byte count excluding frame and i 7 additional code 12 2 6 s 8 iS C L E unts ines tor l f est eceive byte count excluding frame an SZ 1510 12 Ti 8o additional code 12 Xi i uto 1 1 X I I Fi X 6B External device 10 0 g8 ro BH i 12344 MEE s us 5 9 qoi po The figure shown below is for word units 02u51420 OAH 8BH30H31H32H33H02H41H42H43H34H12HODHOAHO3H EEH ADu User frame use control First frame
279. ed data count initially set in the Q series C24 Data reception using exclusive format 1 received data count Setting the user When using format 0 When using Format 1 frame for reception See 2 for each timing See 2 for each timing With the first frame When the first frame is received Without the first When the first data of arbitrary data is frame received When the factor of receive complete timing of reception data reading to the programmable controller CPU is one of the following Depends on prior settings See 2 When the last frame is received When exclusive format 1 received data When data of the receive complete code count is specified as 0 and the first is received In the case of a frame is received combination without the first frame When exclusive format 1 received data When data equaling the received data count is specified as 1 or more and data count is received equaling this count is received When a receive error time out for the When a receive error time out for the no reception monitoring time timer O no reception monitoring time timer O occurs occurs All arbitrary data received up to the point when one of the above occurs or a receive error is generated is stored in the reception area 11 10 11 10 Combination with the first frame 11 DATA COMMUNICATIONS USING USER FRAMES 2 Timing chart for reception processing using the Q series C24 The followin
280. en a mode Switching request was issued that processing is terminated 1 Data communications using an MC protocol Command message receive processing and response message or on demand data transmission processing are all terminated The transmission complete end signal for an on demand data transmission request is not turned on 15 2 15 2 15 SWITCHING THE MODE AFTER STARTING 2 Data communications using non procedure bidirectional or pre defined protocol Data and response message transmit and receive processing are all terminated All the input signals from the programmable controller CPU related to transmit and receive processing are turned off If the receive data from the external device was being stored to the Q series C24 the receive data up to that point is ignored and the data is processed with the current receive data count as 0 2 Modification of buffer memory stored value a Special applications area addresses 252H to 253H 262 to 263 The communication protocol status and transmission specifications after mode switching is complete are stored The values stored to areas other than the above are not changed The contents before switching are preserved b User free area addresses 400H to 1AFFH 2600 to 3FFFH The stored values are not changed The contents before mode switching are preserved 15 2 Mode Switching Precautions 1 Set up between the external device and the programmable
281. ep 4 from the external device to the Q series C24 1 Do the following between the communicating devices as a countermeasure against ignoring of the receive data by the Q series C24 Transmit and receive a response message in reply to data transmission Time out check of the response message and data transmission due to time out error external device side 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS b When Q series C24 is designated non priority External device Data C Programmable Data A Data B Data B controller CPU UKN 5 Since the Q series C24 Time for Send does not have priority when 2 transmitting request the CD signal is turned ON a l 2 characters it terminates transmission f 3 Data A Data Data SD Send Data 3 RS Send Request CS Send Possible CDcheck 5 CD check CD check CD check CD Receive Carrier Detect d E gt Transmission wait time 1 RD Receive Data M c The Q series C24 stores the receive data The contents of steps 4 and 5 below are different from those of item a 1 When transmitting data check the Q series C24 CD signal If the CD signal is off turn on the Q series C24 RS signal If the CD signal is on wait until it is turned off then turn on the RS signal 2 After the RS signal is turned on t
282. equires the most time to communicate data with the programmable controller CPU 2 After system starting complete data communications from the external device that obtained line ownership and the programmable controller CPU within the maximum communications time If data communications cannot be completed within this time initialize the series C24 transmission sequence by transmitting the EOT CL code to the objective programmable controller CPU within the maximum communications time Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual Data designation item description for each frame 3 While an external device and the programmable controller CPU are communicating data have the other external devices check for timeout so that they do not transmit data during this time 14 3 14 3 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 2 2 Message structure when communicating data between external devices 14 4 The message structure when communicating data between external devices is determined by any of the following This condition is determined to provide interlocks between the external devices so that each of them can exchange data with the programmable controller CPU in a 1 1 configuration 1 When making the message structure the same as that of each control procedure format frame 1 0 00x PU Use a number within the 0 to 31 OOH to
283. eration status of each station at communication error in each station refer to the respective manual for each station The communication error may result in an accident due to incorrect output or malfunction e When changing data of a running programmable controller from a peripheral connected to the CPU module or from an external device such as a personal computer connected to an intelligent function module configure an interlock circuit in the program to ensure that the entire system will always operate safely For other controls to a running programmable controller such as program modification or operating status change read relevant manuals carefully and ensure the safety before the operation Especially in the case of a control from an external device to a remote programmable controller immediate action cannot be taken for a problem on the programmable controller due to a communication failure To prevent this configure an interlock circuit in the program and determine corrective actions to be taken between the external device and CPU module in case of a communication failure e Do not write data into the system area of the buffer memory of intelligent function modules Also do not use any use prohibited signals as an output signal to an intelligent function module from the CPU module Writing data into the system area or outputting a signal for use prohibited may cause a programmable controller system malfunction Desi
284. erforms the following processing during data transmission and reception a When an additional code set for reception is detected during data reception the additional code data is removed and the immediately succeeding one byte data is processed for reception as part of the receive data b When transparent code additional code data set for transmission is detected during data transmission the additional code designation data is added immediately before and is then transmitted During data transmission using user frames even if a transparent code or additional code has been specified in the send transparent code designation area it is possible to transmit data without adding the additional code data to the user frame portion or arbitrary data When sending data without adding the additional code data specified by the send transparent code designation specify the user frame No using the following method Specify the number obtained by adding 4000n to the registered user frame No b15b14b13 to bO Frame No 0 Conversion enable 1 Conversion disable 0 Frame registered in flash ROM 1 Frame registered in the buffer memory 12 3 12 TRANSPARENT CODES AND ADDITIONAL CODES When sending the data for the section designated by 4001 to 44AFH and 000 to CO1Fu data will be sent without conversion even if Enable has been specified in the ASCII BIN conversion designation area See Section 13 3 Designation
285. error code and check the errors and take corrective actions lt Error codes gt 4FFFH less the user s manual hardware design maintenance and inspection for the CPU module used 70004 or higher User s Manual Basic 17 19 17 19 Program example 17 20 17 DEDICATED INSTRUCTIONS A program that changes the transmission buffer area for interface on CH1 side Set the transmission buffer to COOH to FFFu Set the reception buffer to 600 to 7FFH When the input output signals of the series C24 are X YOO to X Y1F M5 FMOVP MOVP MOVP MOVP MOVP MOVP MOVP MOVP ZP CSET UO K1 DO wo Ki H400 H400 H600 H200 D200 SET M 1 K111 s D2 D3 D4 05 D D7 D8 D9 M100 M101 Clears DO to D111 Sets the execution type Sets the request type Sets the word byte units to word units Sets the on demand head address Sets the on demand buffer size Sets the transmission buffer head address Sets the transmission buffer size Sets the reception buffer head address Sets the reception buffer size Executes the initial setting 17 20 17 DEDICATED INSTRUCTIONS 17 5 G P GETE This instruction reads out a user frame Applicable device Link direct device Intelligent function Index Setting data device device ee module device register Co
286. erts all data communicated between the series C24 and an external device to ASCII code data The ASCII BIN conversion of communication data is performed by the Q series C24 13 according to the user settings Programmable controller CPU Q series C24 External device Q25HCPU QJ71C24 With ASCII BIN conversion perm Jere ERR g USER O BAT 2944 3 4 m 5678 13 2 Settings for ASCII BIN Conversion In order to convert data to be sent received via the non procedure protocol and bidirectional protocol from binary code to ASCII code it is necessary to make specific settings for the Q series C24 before performing data communication The following describes the settings for the ASCII BIN conversion 1 The ASCII BIN conversion settings can be designated for each interface 2 The ASCII BIN conversion settings are registered in the Transmission control and others system setting screen of GX Configurator SC 13 1 13 1 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 3 Performing ASCII BIN Conversion for Data Communicated via Non Procedure Protocol This section explains the ASCII BIN conversion of data to be communicated using the non procedure protocol 1 The following shows the range of send receive data for which ASCII BIN conversion can be performed Message at transmission reception in arbitrary format Message at transmission reception usin
287. es C24 interface The Q series C24 controls the number of data to be transmitted to the external unit and the number of data when it requests the programmable controller CPU to read the data received from the external device according to the units set by the user 1 Data communication functions and buffer memory related to data length units The following shows the data communications functions and buffer memory related to the data length units The buffer memory addresses in the table are the default value On demand data length designation area MELSEC Q L MELSEC On demand function 1 1414 Communication Protocol Reference Manual Send data count storage area Data transmit function 400 800 Received data count designation area User s manual Basic 4 144 Receive data count storage area 600H 00 Send data count storage area Data transmit function 400 800 User s manual Basic Receive data count storage area Data receive function 600H 00 2 How to change the units of the data length count The units of the data length count can be changed using one of the following procedures Data receive function 1 Changing via GX Configurator SC The units can be changed on the GX Configurator SC s system setting screen 2 Changing via the programmable controller CPU The units can be changed with the CSET instruction Change the units of the data length count accord
288. es C24 will not treat the immediately succeeding one byte data as the following control data Data received as the first frame and last frame of the user frames Therefore do not set the following The code of the data described above cannot be designated as additional codes for data reception 1 A receive user frame that contains additional code data for data reception 2 The same reception complete code as the additional code data for data reception 12 2 12 2 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 3 Handling Transparent Codes and Additional Codes during Non Procedure Protocol Data Communication 12 3 The following explains the handling of transparent codes and additional codes during non procedure protocol data communication 1 2 The data designated by the additional code will be added to or deleted from the data to be transmitted or received The following shows the range of communication data for which processing of transparent codes and additional codes is performed Applicable range during transmission 4 gt Message during communication using Arbitrary data section arbitrary format Applicable range during reception Applicable range during transmission Uh TFOFOFORE NOOO nm Message during Tr Arbitrary ee communication using Ser Tame data ser rame first frame last frame user frames section lt gt Applicable range during reception The Q series C24 p
289. ete code after conversion should be used 13 5 13 5 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 2 Reception based on the received data count Head data Two bytes of reception data is read to d Number of bytes after the programmable controller CPU as T T T T T T ASCII BIN conversion one byte data 0 112 3 4 5 A BIC D E 9 6 2 3 when word units are used External device side 6 when byte units are used 80431 H32H33H34H35H41 42 43 44 45 39 SS FY Programmable Set to even byte controller CPU side Reception data read request X83 Store data Programmable received count controller CPU The diagram below is for when word units are used 2 8004 02 8018 010 3 6020 45 ES Dii AB 45H 034 D121 Buffer memory Sequence program device memory Completion device MO Status display device 5 M1 at completion Reception data read request X83 1 wv J Sets CH1 to the reception channel wove p3 Sets the allowable number of receiving data to 6 6 INPUT U8 Do D10 Executes reception Ho 1 H PAS M100 J Sets the normal completion flag M M101 J Sets the abnormal completion flag When the receive transparent code designation is set to Disable and ASCII BIN conversion is enabled
290. etion flag ul M101 Sets the abnormal completion flag 11 29 11 29 11 DATA COMMUNICATIONS USING USER FRAMES d When receiving with first frame only reception using Format 1 Head data Since it is designated to system 1 received data count 0 the receive data count is 0 External device LJ First frame Correspond to register No 6 Programmable controller CPU Reception data read request X83 Programmable controller CPU Completion device MO Abnormal completion Each 3rd designated frame Status display device at completion Mi Normal completion Reception data read request x83 FROMP H8 H25B 00 K6 G INPUT us 01 010 1 Ml T i SET 11 30 ADH AEH AFH 4 5 120 121 25Bu gt 600u 2020 2021 2022 2023 2024 2025 2026 2027 M100 M101 2H 3E9H None 15H None 0 YES 1002u Disable 00H 00H 0 1 1 2 Buffer memory The illustration below is for byte unit User frame use control designation First frame No designation 1st 2nd 3rd 4th Last frame No designation 2nd 4th Receive transparent code designation ASCII BIN conversion designa
291. etting screen is required The following explains setting items for changing the communication system 1 2 3 RS 232 communication system designation Designate either full duplex or half duplex communication Simultaneous transmission priority non priority designation When the Q series C24 and the external device start data transmission simultaneously in half duplex mode designate whether to continue priority or stop non priority transmission from the Q series C24 Designated values 1 to 255 for setting non priority will be the transmission wait time that elapses from when the resumption of data transmission becomes available until data is actually sent Retransmission time transmission method designation When half duplex communication and non priority are set as indicated above this setting becomes valid When the Q series C24 and the external device begin transmission simultaneously if the Q series C24 stops and then restarts transmitting designate whether the stopped message will be transmitted from the beginning resend or whether transmission will continue after the stopped message not resend RS 232 CD terminal check designation When using half duplex communication set the CD terminal check designation to on 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 8 4 Connector Connections for Half duplex Communications The following explains the functions of the connector that connect
292. eveloper switch setting as 1 byte binary data See the first frame part shown in the illustration in item 3 for an example 3 Transmission reception data corresponding to register codes FFH 04u FFH 05H FFH OAR and FFH OBH For FFH 04H and FFH OAH The horizontal parity code that calculates the range for the transmission reception data message is expressed as 1 byte of binary data and then transmitted and received The difference between FFH 04H and FFH is the difference in the calculation range For FFH 5 and OBH The horizontal parity code that calculates the range for the transmission reception data message is expressed as 2 byte ASCII code data and then transmitted and received from the upper digit The difference between FFH 05H and FFH OBH is the difference in the calculation range Examples of the transmission and reception data arrangement of the horizontal parity codes are shown below One first frame and one last frame each Example 2 For register code FFH 05H User frame Arbitrary data User frame User frame Arbitrary data User frame first frame last frame first frame last frame User frame gt 02 01 3 04 00 User frame gt 026 01 3 05 00 i T T T T T T T T T T register code S Station EP Et Boo CUL register code S Staon m E Horizontal
293. evice Q series C24 Abnormal reception detection signal X4 XB 1 CR is treated as 1 byte of data included in the message 2 Data communications using user frames When designating the last frame an arbitrary part of data in the area starting from the start of the reception of the current message until time out is read into the Q series C24 and the data in the last frame area is ignored deleted Stores the error code to the data receive result storage area buffer memory addresses 258 2684 for the target interface and turns on the reception abnormal detection signal X4 XB and waits to receive the next data 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES c Data communication using non procedure protocol Format 1 The reception monitoring format 1 of the no reception monitoring time timer 0 is used for receiving a message for which the receive complete code and receive data count has not been preset This occurs when the no reception monitoring time timer 0 runs out on the non procedure protocol Data is received by the series C24 until the time is out the receive data read request signal X3 XA turns ON and the following data reception waiting condition occurs Example When receiving using the receive data count Receive data count 4 bytes After 3 bytes of data is received the 3 byte data is stored in the received data storage area of the buffer memory by the time out timer 0 and the receive
294. f 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 080007 M MELSEC Q L Serial Communication Module User s Manual Application MODEL QJ71C24 U OU E MODEL 13JL87 SH NA 080007 M 1001 MEE s MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPA When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications s
295. f the data for initialization will be unnecessary thereafter 2 Types of data for initialization 1 There are data for initialization that are registered in the Flash ROM of the Q series C24 upon shipping and data for initialization that are set by the user 2 The number of times registered number of possible registrations are shown in the chart below 3 Data for initialization registration number 1 The registration numbers shown in the table below are used from the memory of the registration destination 2 The registration number of the data for initialization is determined by the area of registration Registration data Registration destination Registration number Decimal hexadecimal Number of registrations mom Data registered by the OS 2000 to 2013 700 to 7DDH Data for initialization Data registered by the user 2500 to 2529 9C4H to 9E1H All set by the user 32767 to 32737 8001H to 801 o 3 4 Precautions during the registration of data for initialization 1 The maximum size of the initialization commands that may be registered as one data for initialization is 78 bytes 2 Do not include CR LF data code ODu OAu in the data for initialization to be registered to the Q series C24 The CR LF is output at the end of the AT command by the Q series C24 when processing initialization automatically added 3 The registration status of the data for initialization stored in
296. f the following Set the accumulated count to 0 using the GX Configurator SC modem function monitor test screen Write 0 to the applicable area of the buffer memory 2 The accumulated count will be stored as OH 1 2H FFFFH 1H 4 Details 3 COMMUNICATIONS BY THE MODEM FUNCTION of buffer memory for the callback function The areas shown below are valid if the Q Series C24 uses the callback function a Callback function designation area Address 8193 2001 1 2 3 If communications are done by connecting to the GX Developer via a modem specify whether the callback function is to be used or not Also specify the callback operation in the case that the callback function is used This specification becomes valid if Connection is entered in the GX Developer connection designation area Address 54 36h Show the setting value the value stored in this area in the GX Configurator SC and show the corresponding Q Series C24 s callback operation This becomes invalid if any setting values other than those shown below are specified and the callback function does not operate When the callback function is not to be used Auto 0H When the callback function is to be used Setting 1 9H to setting 6 7H Setting 1 9H Auto Callback connection during fixed Setting 2 Auto Callback connection during designation number Setting Auto Callback connection during max desi
297. f the monitoring results are available for the condition agreement transmission for device monitoring These include edge triggered transmission and level triggered transmission 1 Edge triggered transmission The monitoring conditions registered by the user conditions for sending monitoring results the monitoring condition values and the monitoring information read from the programmable controller CPU are compared The monitoring results are sent or notified only once when an agreement of the monitoring conditions is detected for the first time After that when the monitoring information read from the programmable controller CPU does not match the monitoring conditions and then it matches the monitoring conditions once again the monitoring results are sent or notified 2 Level triggered transmission The monitoring conditions registered by the user conditions for sending monitoring results the monitoring condition values and the monitoring information read from the programmable controller CPU are compared While the monitoring conditions agree the monitoring results are sent or notified at each cycle time Timing to transmit data Monitoring information Condition agreement One block One block transmission portion portion RISE ZN Cycle time External device Sequence program conditions matched not matched A j Matched Matched END Not matched END END 2 USING THE PROGRAMMABLE
298. fer memory Sets the connection data registration completion flag Buffer memory Area for registration No 8002 80 Connection data Data for notification 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 5 Initialization of modem TA terminal adapter This section explains the initialization of the modem TA connected to the Q series C24 used for communicating data with the external device performing notifications to pager receivers and accessing from GX Developer using the modem function 1 Requirements for initialization Perform the following setting and registration 1 The Q series C24 initial settings as shown in Section 3 4 2 2 The data for initialization registration shown in Section 3 4 3 when initializing the modem TA with the data for initialization set by the user It is possible to initialize and connect at the same time by performing the connection process by designating the data for initialization and data for connection See Section 3 4 6 2 Registering initialization data using GX Configurator SC Settings on the modem function system setting screen The number of the initialization data used to initialize the modem connected to the Q series C24 is registered on the GX Configurator SC s Modem function system setting screen The following explains the number designated by the Initialization data number item on the GX Configurator SC s modem function system setting screen and the related
299. fications and host station No of the Q series C24 17 UINI instruction be used Cannot be used 1 6 1 6 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION This chapter explains the programmable controller CPU monitoring function with which the Q series C24 monitors the programmable controller CPU based on the monitoring information reregistered by the user 2 1 Overview The following explains an overview of the programmable controller CPU monitoring function 1 Transmission without using a sequence program 1 The programmable controller CPU monitoring function enables the Q series C24 to monitor the local station s programmable controller CPU at time intervals set by the user by reregistering data to be used for the programmable controller CPU monitoring function Data transmission and notification to the external device is possible by communication using the MC or non procedure protocol without using a sequence program 2 The following monitoring information selected by the user can be sent or notified to the external device as the programmable controller CPU monitoring results Without the Combined use of the Monitoring result modem modem function function modem communication Numeric value stored in a word device ON OFF status for a bit device Local station programmable controller CPU device i
300. fixed format data is transmitted from the external device 2 Anyreception data prior to the last frame are all treated as arbitrary data 3 When data of the same arrangement as the last frame is received the Q series C24 performs a read request to the programmable controller CPU 4 Upon the reception of data from this combination that contains no arbitrary data the reception data count will be 0 when a read request is performed to the programmable controller CPU 5 The received data count initially set in the Q series C24 uses the default value 6 The Q series C24 performs the following processing with respect to the reception data that is the same as the receive complete code initially set in the Q series C24 When included in the last frame Reception is not processed via the receive complete code Example By registering ACK CR LF as the last frame a read request is performed to the programmable controller CPU when the end of the reception data receives a message of ACK CR LF Last frame ACK CR LF v Reception start timing Receive complete timing Stored in the reception area read timing The received data count is 0 Handling of the Q series C24 receive data 1 When an user frame first frame last frame of a code registered in the Q series C24 is received receive processing by user frame is performed 2 Ofthe first frame No and last frame No maximum 4 sets initialized by the user at the
301. flash ROM whenever possible 2 A user frame cannot be overwritten for registration To reregister a user frame having the same number first delete the current user frame and then reregister 3 Check the registration status of the user frame number from GX Configurator SC 2 Devices that can register read delete user frames Device that can register read delete Programmable controller Type User frame No CPU External device GX Configurator SC ee a aa 8001 to 801FH FROM TO B001 to BOOAn 061 080 to 082 User frame for programmable controller CPU monitoring function 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION Conduct registering reading and deletion of the user frame from the sequence program when data communication is not being conducted with external device 3 Buffer memory to use Address Hexadecimal decimal Flash ROM access 204 516 205 517 to 210 541 21 542 Number of registered default registration frames n Registration count storage OS ROM See Section 9 1 2 1 00 6912 1 01 6913 to 1B28H 6952 1B29H 6953 1 2 6954 to 1B51H 6993 1B52H 6994 Registration No 8001H Registration No 8002H to to 1FCDu 8141 Register data byte count designation 1 8142 1 8143 to 1FF6u 8182 Registration No 80F 1H Register read delete dire
302. frame No to the buffer memory and write 1 to buffer memory user frame use enable disable designation area addresses 140 3 After the value of the buffer memory user frame use enable disable designation area changes to 2 start receiving data 4 Check if the data from the external device was received normally If the Q series C24 receives additional code data while receiving data with the non procedure protocol it does not assume that the last byte of data is the following control data Data received as user frame first frame last frame See Sections 9 1 and 9 2 Receive complete code data Therefore do not set a user frame containing data receive additional code data as a non procedure protocol receive user frame The arbitrary data area of a message received from an external device cannot include data with the same contents same code as the last frame Example User frame Arbitrary User frame first frame dat area last frame In the following cases set the data bit length of the transmission specification to 8 bits It is set in the transmission setting of switch setting by GX Developer on the Q series C24 side 1 When transmitting and receiving the sum check code of the variable data as binary data Write code FFH FOH FFH FAu FFH F6H 2 When transmitting and receiving a user frame containing data codes 80H to FFH 9 CONTENTS AND REGISTRATION OF THE USER FRAME
303. g Programmable controller CPU monitoring function Designates the timing constant cycle transmission or condition agreement transmission when sending notifying information on the programmable controller CPU monitoring results device information CPU status information to the external device The time interval designated in data items a and b above for reading information from the programmable controller CPU can also be used as the transmission time interval for constant cycle communication The conditions for condition agreement transmission are designated using data items h and i below Programmable controller CPU monitoring transmission measure Designates the means by which the programmable controller CPU monitoring results are conveyed to the external device Data transmission The device information and the programmable controller CPU status information are sent as the monitoring results Notification Notification message is sent as the monitoring results Number of registered word blocks number of registered bit blocks Designates the number of word device blocks number of registered word blocks and the number of bit device blocks number of registered bit blocks registered in the Q series C24 as the target when performing device data monitoring or transmission CPU abnormal monitoring Designates whether or not the Q series C24 monitors abnormality of the local station programmable controller CPU status monito
304. g in GX Configurator SC are required 4 2 Interrupt Program Startup Timing The following explains the startup timing for interrupt program when performing data reception with an interrupt program during communication using the non procedure protocol or bidirectional protocol 1 The startup timing is the same for communication using either the non procedure protocol or bidirectional protocol Receive data from the external device is stored in the reception area of the buffer memory When the next input signal rises the interrupt program is started Input signal name CH1 side CH2 side CHn reception data read request signal CHn reception abnormal detection signal amu ADS 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4 3 Reception Control Method Using an Interrupt Program 150 The following explains the reception control method when receiving data with an interrupt program during communication using the non procedure protocol or bidirectional protocol Data reception using the dedicated instruction BUFRCVS instruction interrupt program gt SM400 FEND ZBUFRCVS v D200 H Control data 0200 Word count for stored receive data D201 Receive data Main program execution Interrupt program execution BUFRCVS instruction Reception data read request signal IRET Reception abnormal Os pint ape os CET detectio
305. g is a timing chart for the reception processing when data reception is performed using the user frame which includes the reception processing using the received data count The numbers in the table indicate the timing of a reception data read request to the programmable controller CPU see next page Timing pattern number see next page Combi nation Reception data Amount of reception data of arbitrary data Reception data count Received data count Reception data count 2 Received data count Reception data count 0 Reception data count lt Received data count Reception data count gt Received data count Reception data count exclusive format 1 received data count gt 0 Reception data count exclusive format 1 received data count 0 Reception data prior to the reception of the first frame Deleted Combination without the first frame 11 11 Reception data count lt Received data count Reception data count 2 Received data count data Reception data count 0 When receiving the first frame Reception start When receiving arbitrary data in the reception message When receiving the last frame When receiving the complete code 35 Data of the complete code is treated as part of arbitrary data Reception start Data of the complete code is treated as part of arbitrary data x1 The reception pro
306. g results and data to the external device 1 Data transmission to the external device while performing communication using the MC protocol a The same format as for the messages sent with the on demand function is used to transmit data except that the on demand data section is replaced with the device information and programmable controller CPU status information The data is sent as explained in c and d below Detailed explanation is found in the MELSEC Q L MELSEC Communication Protocol Reference Manual When the interface that is to use the modem function is set in the MC protocol connection processing and disconnection processing to the modem are performed when the programmable controller CPU monitoring results are transmitted Example Data transmission by MC protocol with modem function condition agreement transmission Registration information Dial for programmable controller CPU monitoring A Cycle time External device Sequence program conditions matched not match END END END Matched Not matched Matched b When the transmission of on demand data using user frames is designated the same format as for sending on demand data using user frames is used to transmit data except that the on demand data section is replaced with the device information and programmable controller CPU status information The data is sent as explained in c and d below See the following explanatory items for data
307. g user frames Applicable data range at transmission lt gt Arbitrary data section 1 3 Applicable data range at reception Applicable data range at transmission Arbitrary data section User frame last frame User frame first frame lt gt Applicable data range at reception When sending or receiving data the Q series C24 processes data as follows 1 Out of the data in the applicable data range shown above the Q series C24 sends and receives data whose data code is in the range of 30H to 39H 0 to 9 and 41H to 46H A to F During data reception the Q series C24 regards the arbitrary data section as ASCII code data converting it to binary code data for storage in the buffer memory The user frame section is received in the data format corresponding to the registration contents in the Q series C24 During data transmission the Q series C24 regards data designated by the programmable controller CPU an arbitrary data section in the transmission message and user frame sections as binary code data converting them into ASCII code data and transmitting them External device When communicated in an arbitrary format Head data 1 2 31H 3241300 3201334 41 42 434 Receive 13 2 Arbitrary data section Buffer memory transmission area reception area ES H L 00024 ___ Transmission data count 00H 02H Receive data count Send
308. gards all arbitrary data equaling exclusive format 1 received data count specified for the received first frame combination as valid data and stores it in the reception area It then performs a read request to the programmable controller CPU 2 After data equaling exclusive format 1 received data count is received any data until the next first frame will be ignored Data will not be stored in the reception area Vv Vv v i 4 First fi Arbit dat i lt First frame Arbitrary data as irst frame rbitrary data Gata y gt 4 4 Equaling exclusive format 1 Equaling exclusive format 1 received data count received data count _ Yo Ignored Stored in the reception area Ignored Stored in the reception area v Reception start timing Receive complete timing read timing 11 9 11 9 11 DATA COMMUNICATIONS USING USER FRAMES 11 2 2 Timing for start completion of data reception This section explains the reading of reception data based on the user frame and other factors such as the receive complete code and received data count during data reception using a user frame 1 Timing for start completion of data reception The following describes the timing for start completion of the data reception processing with the Q series C24 Data reception using a user frame Data reception using the receive complete code and receiv
309. ge right transmits a response message to the external device that passed it the line usage right Example Message of 4 above x n n 1 Command ZZ is command for description purposes The user should select the command that transfers accepts the line usage right code External device that transfers line usage right 1Bu Transmissioi destinatio station No Transmission station No Command Message wait Sum check Source station No External device passed line usage right 1 destination station No Transmission Transmission A Message of 5 6 The external device that accepted the line usage right by transmitting a response message performs processing beginning from 2 14 7 14 7 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 8 7 When line usage time of the external device that currently has the line usage right exceeds the maximum data communications time a The external device of the next station No transmits all external devices general report data and obtains the line usage right and performs step 2 Example External device that obtains the line usage right 1 1 N 3B station No designation Transmission Transmission p LE ro iol g source station No 1C 31 43 Command 5 5 Messag
310. gn Precautions N CAUTION e Do not install the control lines or communication cables together with the main circuit lines or power cables Keep a distance of 100mm between them Failure to do so may result in malfunction due to noise Installation Precautions N WARNING e Shut off the external power supply for the system in all phases before mounting or removing the module Failure to do so may result in electric shock or cause the module to fail or malfunction When using the MELSEC L series serial communication module Installation Precautions N CAUTION e Use the programmable controller in an environment that meets the general specifications described in this manual Failure to do so may result in electric shock fire malfunction or damage to or deterioration of the product e To interconnect modules engage the respective connectors and securely lock the module joint lever Incorrect interconnection may cause malfunction failure and drop e Do not directly touch any conductive parts and electronic components of the module Doing so can cause malfunction or failure of the module Wiring Precautions N WARNING e Shut off the external power supply for the system in all phases before wiring Failure to do so may result in electric shock or cause the module to fail or malfunction e After installation and wiring attach the included terminal cover to the product before turning it on for operation Fai
311. gnal X10 ON Execute line connection Line connection request signal Y11 ON Line Connection See Section 3 4 6 Line connection completed Line connect signal X12 ON Execute data communications If MC protocol communications are carried out with the external device when a remote password is set in the QCPU unlock the remote password ata communications See Section 3 4 7 AU The line is disconnected after data communications are completed Line disconnection See Section 3 4 8 Line disconnect request signal Y12 ON Line disconnection completed Line disconnect signal X14 ON Line connect signal X12 OFF Modem initialization completed signal X10 OFF By completing the line disconnection lock processing of the remote password is executed automatically If data communications are to be executed again start the procedure from the modem initialization sequence status Address 546 2214 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 If notification is made indicates processing performed by the user Pager receiver Modem Series C24 Line connection side Line connection 1 Perform the processing up to the point where the modem TA is initialized by the procedure in 1 Modem initialization Modem initialization completion signal X10 ON Make notification Line connection e EI normall
312. gnation number is 10 Setting 4 1H Callback connection during fixed Setting 5 3H Callback connection during designation number Setting 6 7H Callback connection during max designation number is 10 b Callback denial notification accumulated count designation area Address 8194 2002 1 2 Use 0 to FFFFu to designate the accumulated count that will be the notification timing to the QCPU when a denial of the callback occurs during access from the GX Developer after the Q series C24 has been started up The accumulated number of times up to the present a denial of the callback occurred accumulated count value in the Q series C24 after starting up can be checked in the area where the accumulated count of denial of the callback is stored address 8945 22F 1n c Data No for Callback designation area Addresses 8449 to 8458 2101H to 210 1 This specifies the connection data registration No where the callback destination GX Developer side s telephone No is registered Connection data are data that have been registered in the Q Series C24 s flash ROM or buffer memory See Section 3 4 4 for connection data registration 2 Inthe following case the connection data telephone No specified in callback data No 1 becomes the callback destination If the callback destination GX Developer is fixed 1 module The external line dialing line types and telephone number in the connection data beco
313. gned to the I O No 00 to X Y1F unless otherwise specified For the assignment of I O No refer to the user s manual function explanation program fundamentals for the CPU module used This manual explains operations by using GX Configurator SC CONTENTS SAFETY PREGAU TIONS tnt deo debebit etc A 1 CONDITIONS OF USE FOR THE PRODUCT ener nennen nennen nennen A 10 REVISIONS 1x d dn Hd m ttt e ae de be d e de e ete d dt e edo dat A 11 INTRODUCTION ge iii erbe eerte d irudieumedinenceide A 13 RELEVANT MANUALS ine tee mae ameet aee aetates A 19 The Manual s Use and Structure 20 Generic Terms and 22 TERMS decente geom o cen Lei Ont GM tecti urs A 24 1 OVERVIEW 1 1to 1 6 MM 1 1 1 2 Functions Added Changed by Function Version B in QJ71C24N R2 R4 and QJ71C24 R2 1 6 251 OVOLVIOW epe qun nq 2 1 2 2 About the Programmable Controller CPU Monitoring Function 2 3 2 2 1 Data registration for using the programmable controller CPU monitoring function 2 3 2 2 2 Programmable controller CPU monitoring information seeeenne 2
314. greement between external devices and the programmable controller CPU for data communication error occurrences as well as construct an interlock circuit in the sequence program When using the MELSEC Q series serial communication module Design Precautions N WARNING e Do not write data into the system area of the buffer memory of intelligent function modules Also do not use any use prohibited signals as an output signal to an intelligent function module from the programmable controller CPU Writing data into the system area or outputting a signal for use prohibited may cause a programmable controller system malfunction N CAUTION e Do not bunch the control wires or communication cables with the main circuit or power wires or install them close to each other They should be installed 100mm 3 9inch or more from each other Not doing so could result in noise that may cause malfunction e When using the module while values such as buffer memory set values are registered in the Flash ROM do not turn off the power supply for the module loading station nor reset the programmable controller CPU If the power supply for the module loading station is turned off or the programmable controller CPU is reset while any values are registered the data contents in the Flash ROM become inconsistent and as a result the values must be set again in the buffer memory etc and reregistered to the Flash ROM Also this may cause fai
315. hanged to programmable controller Correction About The Generic Terms and Abbreviations Section 2 3 1 4 Section 3 4 5 Section 11 4 3 11 5 Section 12 3 Section 13 4 Section 15 3 Section 17 2 17 3 17 4 17 5 17 6 17 7 17 8 F M J Aug 2008 SH NA 080007 K SAFETY PRECAUTIONS About The Generic Terms and Abbreviations Section 3 1 1 3 3 3 3 3 6 3 3 7 Section 7 1 Section 9 1 2 Section 17 2 to17 4 17 8 Jun 2009 SH NA 080007 L Partial correction About The Generic Terms and Abbreviations Sections 1 1 1 2 3 3 1 3 3 5 9 1 2 9 4 1 Chapter 15 Sections 15 1 2 15 3 17 2 17 3 17 4 17 5 17 6 17 7 17 8 Additional model LJ71C24 LJ71C24 R2 Partial correction SAFETY PRECAUTIONS INTRODUCTION Related Manuals The Manual s Use and Structure About The Generic Terms and Abbreviations Definitions and Descriptions of Terminology Section 1 2 2 3 1 2 3 2 3 1 1 3 1 3 3 2 4 3 3 1 3 3 5 3 3 6 3 3 7 8 3 9 1 2 9 4 1 15 3 15 4 1 15 5 1 16 1 1 17 2 17 3 17 4 17 7 17 8 Jan 2010 SH NA 080007 M Partial addition Product application APPENDIXES This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent Japanese Manual Version SH 080002 R licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which m
316. hat turns ON for one scan upon instruction Pu gd completion System Bit D 1 also turns on if the execution completes abnormally The file registers of each of the local device and the program cannot be used as setting data Control data Designate the transmission channel EMEN Transmission channel 1 Channel 1 CH1 side 1 2 User 2 Channel 2 CH2 side The transmission completion result by the PRR instruction is stored EIL Transmission result 0 Normal System Other than 0 Error code Designate whether or not to add CR LF to the transmission data CRLF addition 0 Do not add CR LF User designation 1 Add CRILF Transmission user frame designation area designates from which Transmission pointer 1 to 100 User the frame number data may be transmitted Ss4 Output count Designate the number of user frames to be transmitted 1 to 100 1 For information about errors caused by incorrect data designated by the user see the description in Errors on the next page 2 The Set by column indicates the following User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction 17 24 17 24 Functions 17 25 17 DEDICATED INSTRUCTIONS 1 This instruction transmits the user frame data using the non procedure protocol of the Q series C24 as designated by Un according to the control data stored in the device
317. he non procedure protocol and line disconnection are all performed by the sequence program 3 COMMUNICATIONS BY THE MODEM FUNCTION MO M30 Mo 0 x12 tits M51 M70 P2 N31 KiM3 M7 M32 P3 M1 M42 P4 M52 M53 51 55 M56 P52 Mn M7 72 P M80 Accessible flag is turned ON Modem initialization enabled flag is turned ON Line connectable flag with the remote station is turned ON Exchangeable flag with the partner station is turned ON Data transmission enabled flag to the partner station turned ON Line disconnection enabled flag with the partner station is turned ON To the data registration processing for initialization subroutine To the data registration processing for connection subroutine Convert the initialization command into pulse Various complete flags after the modem initialization processing is reset To the modem initialization processing subroutine Convert the line connection command into pulse Various complete flags after the line connection processing is reset To the line connection processing subroutine Convert the data communication transmission command into pulse To the data transmission processing subroutine Convert the reception data read request into pulse To the reception data read processing subroutine Convert the line disconnection command into pulse Line disconnection from local station Line disconnection complete fl
318. he total number of bytes of register data of the user frame to be registered read Flash ROM access During the register operation the user registers the total number of bytes of register data During the read operation the total number of bytes of registered data is stored Buffer memory access During the register operation the user registers the total number of bytes of register data 2 User frame storage area Addresses to 2Du 1B01H to 1 28 1 2 to 1B51H 1FCFH to 1FF6H During the register operation the user sequentially stores the register data of the user frame to be registered in L H order beginning from the head area of the given area range During the read operation the register data of the registered user frame is stored with the same contents as when registering Example Contents stored to user frame storage area when a user frame to transmit and receive ETX sum check code CR and LF register codes 03H FFH F1H is registered to the Flash ROM Buffer memory Address H L Head data 6 FFu to 03H 7 to 1 Last data 8 00x to Part corresponding to write frame above Data contents transmitted and received User frame Arbitrary data User frame first frame last frame User frame register code 02H FFH 01H 03H FFH F1H 0Du OAH 1 1 1 1 1 ission 1 1 E Sum C L ransmission recepti
319. hen the initialization and connection data have been registered from the GX Configurator SC or from the programmable controller CPU XIE 0 M2 M3 X10 X12 X13 Y10 Y11 Data for initialization registration i Data for connection registration Mee Ch dod ede o oe e deed Edid enc ehe d Ed ied era eid empeiduird e E ich Qo ui dide oce edel io Edna eid 4 x21 PLS M1 Mi N40 4 SET Yn SET M49 x12 SET M RST Yu X13 H221 RST Yu X27 RST wag RST RST X10 Initialization complete signal X1E Ready signal X1F WDT error signal MO Accessible flag M1 Data registration complete flag for initialization M2 Data registration complete flag for connection See Section 3 4 4 M3 Initialization complete flag M40 Connectable flag Turns the ready flag ON Turns the line connectable flag ON See Section 3 4 3 See Section 3 4 4 Line connection command Sets connection request signals When the connection in progress signal ON normal completion sets the connection complete flag Reads the error code at connection abnormal completion Resets the flag with the clear command When the line connection is initiated from the partner device neither registration setting nor connection processing is necessary As shown in example 3 of this section s 3 data communication is possible if
320. hether or not local station is ready to receive data by transmitting the DC1 and DC3 signals and checks whether or not the external device is ready to receive data by receiving the DC1 and DC3 signals DC1 Control data that informs the external device that the Q series C24 is ready to receive data DC3 Control data that informs the external device that the Q series C24 is not ready to receive data Example Terminate Restart Continue External device Programmable controller CPU Data 2 2 Terminate Restart Continue a Q Series C24 DC1 DC3 transmission control and free OS area specification The control is performed in the same as those described in Section 7 1 1 DTR control and the free OS area specification are the same as those described in Section 7 1 1 b The Q series C24 transmits DC1 or DC3 to the external device instead of turning the DTR signal on off For the DC1 and DC3 transmit timing replace DTR signal ON OFF as shown below DTR control DC1 DC3 transmission control signal OFF transmit Transmitted when the vacant OS area drops to 64 bytes default or less signal ON DC1 transmit Transmitted when the vacant OS area reaches 263 bytes default or more External device Programmable controller CPU 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL Receive data clear described in User s Manual Basic clears the data stored i
321. hod interrupt program MEME 4 3 Reception method Format 0 and Format 1 tasti don a HUE 11 9 Register read delete of the data for connection for modem see 3 63 Registration data byte count designation area DEDE 9 19 Remote password check 3 4 3 16 3 47 Remote password mismatch notification accumulated count designation 3 43 Remote password mismatch notification count 3 43 Response monitoring time timer 1 6 7 Retransmission time transmission method 810 8 6 5 5 control for modem 3 38 RS CS control yes no designation 3 38 RS 232 CD terminal check designation 8 6 RS 232 communication system designation Preparer ee Creer eee rere 8 6 Sample program mode switching 15 9 Sample programs for modem function 3 88 Send data list user frame 11 34 Setting for transmission user frames 11 37 Simultaneous transmission priority non priority designation 8 6 Start up of the modem function 3 52 Stop by timer 0 16 5 Timing for programmable controller CPU monitoring terne teer tnn dnd 2 5 Timing of transmission of monitori
322. ialization stored in the Flash ROM can be checked in data registration for modem connection screen for GX Configurator SC or the buffer memory address 223H to 225 547 to 549 When newly registering register by designating an unregistered number When designating a number which is already registered delete the registered data for that number first then perform the registration 3 COMMUNICATIONS BY THE MODEM FUNCTION 5 Procedures for register read delete of the data for connection a For the flash ROM in the Q series C24 Register read delete operations are executed on the GX Configurator SC s Data for modem connection screen Set the required items with the table below m GX Developer Data communication Data for modem connection screen setting item Notification For connection to MELSOFT products Pager receiver designation __ 1 O Telephone number Pw for catback External ine dialing Po for catback Data for modem connection 1 to 30 MC non procedure bidirections Line types 0 oo o O for callback Wait time for message transmission unit s Comment EOC Required item Setting possible X Setting not required Registration example Setting example to perform data communication Data for modem connection BE Module information Module type Serial Communications Module Start 1 0 No 0000 Module model name QJ71C24N Setting item Set
323. ications Sp 07 7 mc on Sum check code Write during RUN Allowed Setting modifications Allowed EE c Communication speed b8 to b15 19200bps setting SE 6 dr cem CH2 communication protocol setting MC protocol format 5 0005 Ser __ Station No setting Station 1 00019 17 37 17 37 Y2 Ya X6 XOD ME FMOV H 00 13 CH1 mode CH2 mode CH1 mode CH2 mode instruction switching switching switching switching _ command request request HO 0 MOV H 1 HO 2 MOV H7E6 3 MOV H8 4 MOV H7E 5 MOV HS 6 MOV HI 7 P UINI ud 00 SET M100 MI Gia ee eee Hu Ef ee eer i Processing for normal completion tel m E ee mm meee oo E E ESE See eee eee MI Poe ee ee ccc MEE communication 17 DEDICATED INSTRUCTIONS Clears the control data Always sets 0 Clears the execution result to 0 Sets the execution type to 0 Sets the CH1 transmission specifications Sets the CH1 communication protocol Sets the CH2 transmission specifications Sets the CH2 communication protocol Sets the host station No Executes the UINI instruction Turns ON the interlock signal for communication stop 1 Turns OFF the interlock signal for communication stop 1 x1 Perform programming so that data communication processing is not executed while the interlock signal for communication stop M100 is
324. ice o HeaddeiceNo device No 3 g of this section Read po Readpon ee condition E M s condition value 3 i of this section i of this section Transmission o 4 of this section Fata No forconnection No for connection Section 2 2 5 5 Section 3 4 4 T 4 of this section Section 11 4 2 Section 2 2 5 3 O Setting required X Setting not required PLC CPU abnormal monitoring designation Condition agreement transmission Transmission pointer Output count Fats No for connection No for connection While using the notification function the device information and the CPU status information cannot be transmitted 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 3 Contents of setting items The data items to be set by the GX Configurator SC in order to use the programmable controller CPU monitoring function and the setting contents are explained below a Cycle time units b c Designates the unit for b cycle time below for reading information from the programmable controller CPU using the programmable controller CPU monitoring function The cycle time units and the cycle time designated using this unit can also be used as the transmission time interval for constant cycle communication Cycle time Designates the time for one cycle when reading information from the programmable controller CPU in order to perform programmable controller CPU monitorin
325. ices that have not obtained the line usage right check the line usage time of the external device that obtained the line usage right and ignore the receive data not addressed to their own station When the line usage time exceeds the maximum data communications time each external device performs the processing of 7 14 6 14 6 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION External device that obtained the line usage right Before 5 Before 5 External device External device External device Station No 1Bu Station No 1Dx External device Station 1 Data communica tions with arbitrary Num programmable controller CPU Station No 2u Station 15 C24 Q series C24 QC24 N UC24 4 External devices that communicated data with the programmable controller CPU or external devices that do not have to communicate data with the programmable controller CPU transmit the data for transferring the line usage right to the external device of the next station No A message structure example is shown in 5 When a response message see 5 is not received from the next external device to which the line usage right was passed data transmission for transferring the line usage right to the external device of the next station No is repeated until the line usage right is accepted 5 The external device that accepts the line usa
326. ich only ACK 064 is registered as the first frame and also exclusive format 1 received data count for arbitrary data as 0 bytes a read request will be performed to the programmable controller CPU upon the reception of a 1 byte ACK 11 6 11 DATA COMMUNICATIONS USING USER FRAMES Example 2 By specifying a user frame in which only 154 is registered as the first frame and also specifying exclusive format 1 received data count for arbitrary data as 2 bytes a read request will be performed to the programmable controller CPU upon the reception of NAK 2 byte data Reception data First frame NAK Equaling exclusive format 1 receive data count Reception start timing Receive complete timing read timing Ignored Stored in the reception area 1 The data length for arbitrary data can be specified as a word byte count of 0 or greater the unit depends on word byte units designation for each combination of the first frame and the last frame specifying format 1 The received data count for data reception using format 1 is referred to as exclusive format 1 received data count 3 Reception without the first frame combination 2 A 2 B reception using Format O a Reception of combination 2 A 1 In this method a user frame is used as the last frame in place of the non procedure protocol data receive complete code and is transmitted from the external device together with arbitrary data 2 Anyr
327. ied interface and transmission specifications and continue data communications without restarting the QCPU When using the dedicated instruction UINI instruction for mode switching refer to Section 17 8 1 Mode switching from external device If the communication protocol of the interface connecting the external device is MC protocol mode switching can be performed b The communication protocol can be changed from the MC protocol as shown below Format switching MC protocol Formats 1 to 5 1 5 Non procedure protocol Bidirectional protocol GX Developer connection Pre defined protocol c The transmission specifications set by the GX Developer switch setting can be changed 2 Mode switching from programmable controller CPU a Regardless of the current communication protocol of the connected interface the external device can perform mode switching from the sequence program b The communication protocol can be changed from the sequence program as shown below Format switching MC protocol Formats 1 to 5 Non procedure protocol Bidirectional protocol GX Developer connection Pre defined protocol c The transmission specifications set by the GX Developer switch setting can be changed When using the mode switching function set the setting change of the communication setting to enable in the GX Developer swi
328. ignal is therefore unnecessary The data for connection indicated in this section should be set to perform the notification processing 1 Requirements for connection 2 Complete the following settings and registrations in advance 1 The initial settings for the Q series C24 as shown in Section 3 4 2 2 The registration of the data for initialization as shown in Section 3 4 3 3 The registration of the data for connection as shown in Section 3 4 4 4 The initialization of the modem TA connected to the Q series C24 side as shown in Section 3 4 5 In addition both the initialization and line connection can be conducted simultaneously by designating the data for initialization and data for connection to perform connection processing For the data setting for initialization to perform initialization and line connection simultaneously see Section 3 4 2 3 4 5 Explanation on the above mentioned setting is omitted in this section Registering the data for connection using GX Configurator SC Settings on the modem function system setting screen The number of the data for connection that is used for line connection in order to perform data communication with the external device is registered on the GX Configurator SC s Modem function system setting screen The following explains the number designated by the Connection data number item on the GX Configurator SC s Modem function system setting screen The addresses shown
329. in parentheses below indicate the addresses of the buffer memory where the setting values for this item on the Modem function System setting screen are stored 1 When line connecting from the Q series C24 side Data number for connection designation area address 35H 53 The data for connection registration number is designated BB8H to BD5x 3000 to 3029 Data registered to the Flash ROM by the user 8001 to 801FH 32767 to 32737 Data registered to the buffer memory by the user 2 When line connecting from the external device Since the line connection processing is not necessary on the Q series C24 Side connecting data registration for line connection and data number setting for connection are not needed 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 I O signals used in line connection Connection request signal Y 11 dial in progress signal X11 connection in progress signal X12 and initialization connection abnormal completion signal X13 are used Example1 When performing the line connection from the Q series C24 side only following the completion of initialization Buffer memory for connection 0 n 3000 Address 5 53 Normal completion Connection request Y11 y a PH gt Initialization ON UT completion i 1 Dial in progress x44 y d Connection in i progress X12 us RS 232 CD terminal Set Display a result code usi
330. inal block loosen the terminal block screws Failure to do so may result in malfunction and damage to the module or cable e Prevent foreign matter such as dust or wire chips from entering the module Such foreign matter can cause a fire failure or malfunction e A protective film is attached to the top of the module to prevent foreign matter such as wire chips from entering the module during wiring Do not remove the film during wiring Remove it for heat dissipation before system operation Startup Maintenance Precautions N WARNING e Do not touch any terminal while power is on Doing so will cause electric shock or malfunction e Shut off the external power supply for the system in all phases before cleaning the module or retightening the terminal block screw Failure to do so may result in electric shock When using the MELSEC L series serial communication module Startup Maintenance Precautions N CAUTION e Do not disassemble or modify the modules Doing so may cause failure malfunction injury or a fire e Shut off the external power supply for the system in all phases before connecting or disconnecting the module Failure to do so may cause the module to fail or malfunction e Tighten the terminal block screw within the specified torque range Undertightening can cause drop of the component or wire short circuit or malfunction Overtightening can damage the screw and or module resulting in drop short circui
331. indicated in 1 to 3 above are compatible with the office telephone system as well In the system configurations shown in 1 and 2 above the digital line ISDN can replace the public line When connecting via a digital line a TA terminal adapter and a DSU digital service module are used instead of a modem 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 2 2 System configuration when using the notification function The following describes the system configuration example when calling the pager receiver by the notification function Public line Modem CU RS 232 Pager receiver The public line indicated above is compatible with the office telephone system as well 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 2 3 System configuration when connecting GX Developer The following describes the system configuration when GX Developer performs data communication with a remote station programmable controller via Q series C24 Q25HCPU QJT1C24 R2 cul Jor cable Public line RS 232 ae GX Developer RS 232 cable UTE The above public lines is compatible with the office telephone system as well The following settings are performed in the items below when setting the connection destination using the GX Developer See the GX Developer manual for details Personal computer side interface Serial Programmable controller side interface C24 Telephone line connec
332. ine connections GX Developer 7 8 telephone No 2 3 COMMUNICATIONS BY THE MODEM FUNCTION 5 If line connections from the GX Developer are made with Auto Callback during fixed Callback during designated number as the connection system Setting 1 9H to Setting When accessing the QCPU from the GX Developer select whether to use the callback function to make line connections or to make line connections without using the callback function If the following is selected for the GX Developer connection system and line connections made it is possible to access the QCPU from the GX Developer by that method only on that occasion Auto Callback during fixed Auto Callback during designated number The procedure is the same as when accessing the QCPU by selecting Auto for the connection system and making line connections If line connections are made with the callback destination GX Developer limited to a maximum of 10 modules set setting 3 select Auto Callback during designated number as the connection System and specify the telephone No The Q Series C24 checks the telephone No received from the GX Developer side and if it is registered in the Q Series C24 the line connection status is held and it becomes possible to access the QCPU from the GX Developer If a telephone No is received from the GX Developer that is not registered in the Q
333. ing ON Dial in progress Connection request ON Requesting connection ion i Modem disconnection request ON Requesting disconnection X12 Connection ON Connection in progress i i i Use prohibited Notification issued request OFF Requesting notification issuance Use prohibited 1 Initialization connection abnormal completion ON Initialization connection abnormal completed X14 1 Modem disconnection completion ON Disconnection completed 6 ificati ificati 7 X15 A N Y13 14 2 eh m Notification normal completion ON Normal completion Y 1 Y15 Y16 vs vic X16 eh gx Notification abnormal completion ON Abnormal completion X17 17__ Flash ROM read request ON Requesting X18 lash ROM write completion ON Completed Y18 Flash ROM write request ON Requesting X19 ash ROM system setting write completion ON Completed Y19 XIA tas X1C Y1C setting default request ON Requesting x10 XIE Watchdog timer error WDT error Use prohibited ON Module error occurred OFF Module being normally operated 7 25 The signals shown with the I O signals for the modem function 1 Cannot be used for the QJ71C24N R4 Signal for the modem function 2 Cannot be used for the LJ71C24 R2 IMPORTANT 1 Ofthe input output signals to the programmable controller CPU the signals marked with Use prohibited must not b
334. ing and testing of the modem function including the following items Callback function monitoring test items Buffer memory address Callback permit accumulated count 8944 22 0 Callback denial accumulated count 8945 22 1 Auto callback connection permit accumulated count 8946 22 2 Auto callback connection denial accumulated count 8947 22F34 Accumulated count of callback receive procedure cancel 8948 22F 41 3 COMMUNICATIONS BY THE MODEM FUNCTION b Callback function designation and callback operation outline Here the setting values for Callback function designation items in the Modem function system setting screen and an outline of the corresponding Q Series C24 callback operation are explained Values in parentheses are values when the set values are stored in buffer memory Address 20014 If the connection system is set on Auto Callback during fixed Callback during designated number and line connection is executed Setting 1 to Setting 3 are explained in 5 Setting values for Callback function designation items Function If you desire to set the connection system on If you set the connection system on auto auto and carry out line connection and do not carry out line connection 1 Ifthe callback function is not used Auto Se ee 2 Ifthe callback destination GX Developer is fixed 1 module Setting 1 9s Setting 4 16 Callback connection during fixed etting
335. ing to the explanation in Section 17 4 of this manual 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS WORD BYTES UNITS SETTING MEMO 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES The monitoring times are timers used by the Q series C24 to monitor the receiving interval time between each byte when receiving data from the external device the programmable controller CPU processing time and the time it takes to transmit to the external device The monitoring times can be set for each interface The Q series C24 uses the monitoring time set by the user to control data transmission to and reception from the external device Set the monitoring times to match the specifications of the external device The Q series C24 monitoring times are shown below Q series C24 Protocol that can monitor the time Monitoring time dela vallis Non Bi procedure directional Infinite wait Transmission time for the set number of bytes depends on the transmission rate Response monitoring time For bidirectional protocol this is 5 O timer 1 valid for transmission only Transmission monitoring time timer 2 Command message First data Last data External y device EM P First data Last data Programmable controller CPU Q series C24 ready to receive data state Y Response message 1 i ERI gt Timer 0 monitori
336. ins the transmission monitoring time timer 2 operation External esponse device Message message Programmable Response controller CPU i c Monitoring Monitoring time time A Elapsed time reset If on demand data is transmitted before a response message during data communications using an MC protocol each time is monitored External ommand device Programmable On demand data ee controller CPU M ro Monitoring time Monitoring time Elapsed time reset 1 series C24 operation by transmission monitoring time timer 2 a When transmission monitoring time timer 2 is set to Oms The time until transmission of the message or response message is not monitored If the Q series C24 cannot transmit it waits infinitely b When transmission monitoring time timer 2 is set to 100 ms or longer Monitors the time from completion of message or response message transmission preparations to the end of transmission and returns the elapsed time to 0 at the end of transmission At time out the Q series C24 performs the following processing 1 Data communications using MC protocol While waiting for the end of transmission of the response message the Q Series C24 stores the error code to the data transmission result storage area buffer memory addresses 257 267 for the target interface The Q series C24 enters the state in which
337. ion using user frames in Chapter 11 e For instructing to transmit the device information and programmable controller CPU status information when sending monitoring results as data use the following dedicated user frame numbers Validfunction function Frame number Information to be transmitted Constant cycle Condition agreement transmission transmission BOO1H B002H BOOSH Device information for the block registered in CPU abnormal monitoring data 2 Monitoring resutinformation for blocks satisfying the conditons lt 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION f Device information and programmable controller CPU status information are sent using the data arrangement shown below The ASCII BIN conversion designation is designated in buffer memory address 121H 1C1H Note that when the user frame has been designated by setting to on the value for bit 14 which indicates the user frame No there will be ASCII BIN conversion of corresponding send data It will be sent as binary data See Section 13 3 1 When user frame numbers 001 to BOOAH are designated example of a one block portion When word device data W100 to W103 4 points is sent When the word byte unit designation is word unit the device data will be sent in a gt L sequence The number of registered points is the number of points in word units When ASCII BIN con
338. ion 3 2 3 When this GX Developer designation is performed designate 1 in this area on the Q series C24 side j No communication interval time designation area address 55 37 1 Designates the wait time until the line is closed when the data communication has ceased with the destination device after the line connection 2 The series C24 automatically performs the line disconnection processing when no data communication is performed with the destination device for a designated time The connection in progress signals X12 and initialization complete signals X10 turn off RS CS control yes no designation area address 56 38 1 Designates whether to use the RS CS signals for controls to notify local station side data reception capability to the partner side during data transmission between the Q series C24 and modem TA 2 This setting is for the interface designated by the modem connection channel indicated in a The control of the other interface that does not use the modem function is performed by the settings in the buffer memory DTR DSR and DC control designation area address 93 133 3 COMMUNICATIONS BY THE MODEM FUNCTION The overview of the RS CS controls are described 1 When transmission data 1 The Q series C24 detects the modem TA data reception capability from on off of the CS signal 2 When the CS signal is on data transmission from the Q series C24 starts or continue
339. ion Application Reception data read request Line connection completion M100 _ Initialization request execution Connection request execution X4 Reception abnormal detection Y66 Notification completion M101 Notification execution Initialization completion Line disconnection completion M102 Transmission execution in progress Dial in progress eee EY M103 peret e nM data read execution in progress Connection in progress en Q series C24 accessible Initialization connection abnormal Initialization data registration completion SM400 Always ON completion Data registration completion for pu Mis c rae oe Lees LL connection E Notification normal completion Initialization completion Number of registration data bytes Control ber d ti Notification abnormal completion M4 Line connection completion D1 hd is nem 181 o R Receiver designation Initialization command telephone X1E Q series C24 ready Notification completion D2 WDT error _ Line disconnection completion pti External line dialing number etc Convert the registration command into Initialization command 2 9 Line type etc Convert the registration command into Data communication command M30 TER enable Convert the initialization command into Line disconnection command ES ow Message length Notification command M40 Connectable pso Number of transmission data M41
340. ion in the buffer memory after each start up of the Q series C24 4 Itis recommended to store the data for connection to the Flash ROM after completing the debug process By registering it to the Flash ROM the registration process of the data for connection will be unnecessary thereafter 2 Types of data for connection 1 All data for connection are registered and used as defined by the user 2 The number of possible registrations are shown in the table below 3 Data for connection registration number 1 The registration numbers shown in the table below are used by the memory of the registration destination 2 The registration number of the data for connection is determined by the area of registration Registration data Registration destination Registration number Decimal hexadecimal Number of registrations ROM 3000 to 3029 BB8H to BD5x Data for connection All are set by user Bufermemory memory 32767 to 32737 8001H to 801FH 4 Precautions during the registration of data for connection 1 The maximum size of data that can be registered as one data for connection is 80 bytes Do not deviate from the following data sizes for the following items Message area for notification 36 bytes data for connection area 44 bytes 2 Designate the messages for notification accordingly with the display designation of the partner devices 3 The registration status of the data for init
341. irs 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 or structures judged
342. is chapter provides an overview of these special functions The primary special functions of the Q series C24 and a functional overview are indicated below 1 Monitoring the programmable controller CPU detailed explanation in Chapter 2 a The local station programmable controller CPU can be monitored at time intervals set by the user without a sequence program 1 The following information can be registered as items to be monitored Monitoring a device for the local station programmable controller CPU Anumeric value stored in a word device The ON OFF status of a bit device Monitoring the status of the local station programmable controller CPU Monitoring the status of the local station programmable controller CPU 2 For the results of the programmable controller CPU monitoring the following monitored information can be transmitted notified Transmission of information on the device to be monitored and status of the programmable controller CPU Monitoring information obtained through combined use of the modem function can also be transmitted Notification of notification messages character string data registered for connecting the modem function when using with the modem function together 3 The user can select one of the following as transmission timing for the programmable controller CPU monitoring results to the external device Transmission notification each time the programmable controller CPU is monitored Constant cycle
343. issued request signal Y14 turns from ON to OFF after the completion of modem TA initialization Therefore notification processing is conducted when the programmable controller CPU of the station with Q series C24 installed is in stop status or the programmable controller CPU stops due to error since the notification issued request signal Y14 is turned off in either case Write the data number for connection in the initial setting for GX Configurator SC 3 When the notification issued request signal Y14 is turned OFF from ON before initialization of the series C24 modem TA the processing will end abnormally 4 When the notification issued request signal Y14 is turned OFF from ON during initialization of the Q series C24 modem TA notification processing will be conducted after the completion of the modem TA initialization 5 Notification processing is completed in the order of line connection message transmission and line disconnection from Q series C24 for the transmission station of the radio wave to the notification destination Therefore even if the power to the notification destination equipment is off the notification processing will end normally as long as the above processing is completed 6 When the notification issued request signal Y142ON is turned ON before notification processing is complete some messages may not be sent Turn on the notification issued request signal Y14 before the initialization pro
344. istration data bytes Sets the user control data control number Sets the AT command for initialization Sets the AT command for HO HIBOO DO K17 initialization to the buffer memory SET M Sets the initialization completed flag Address Buffer memory Area for registration No 8001 3 30 1B01H 1 DONE ata for 1 02 RORIS 9 initialization to command to 1B28H 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 4 Register read delete of the data for connection This section explains the registration reading deletion of data for connection such as the telephone number of the partner device and notification messages that are used for communicating data with external devices notify pager receivers and accessing from GX Developer using the modem functions 1 Registration destination of data for connection 1 The data for connection can be used by registering to the Q series C24 s Flash ROM or buffer memory 2 The buffer memory can register the data for initialization shown in Section 3 4 3 The data for initialization or data for connection will be registered in the applicable area 3 It is recommended to store the data for connection during the debug process in the buffer memory The registration data in the buffer memory will be erased after the starting up the Q series C24 loading station again Itis necessary to register the data for connect
345. itrary data section 2138 31 324 30 3241334 1041 414 424 43n Receive Transparent code Additional code For 414 For 10x i e Transmission data gol 0002 _ _count Receive data S8 00 02 count 5 bg TES xt Lj _ Transmission data o SL receive data 8 lt n em ee The data count is in word units 12 6 External device Data transmission Q series C24 12 TRANSPARENT CODES AND ADDITIONAL CODES b Communication using user frames 1 Receiving Reception check of user frames first frame last frame is performed If a receive transparent code is designated the additional code designation data is deleted removed from the arbitrary data section If a sum check code is designated in a user frame last frame the sum check code is calculated The arbitrary data section is stored in the reception area of the buffer memory If the ASCII BIN conversion is designated the data section is stored in the buffer memory after it is converted to binary code data During reception of an arbitrary data section if the reception complete code or the entire count of received data has been stored or when a user frame last frame has been received a receive data read is requested of the programmable controller CPU 2 Sending The transmission data designated by a user frame or the programmable controller CPU arbi
346. its infinitely After transmitting a message the Q series C24 does not monitor the time up to the start of reception of the response message from the external device but waits infinitely b When response monitoring time timer 1 is set to 100 ms or longer After receiving a message the Q series C24 monitors the time up to the start of transmission of a response message to the external device and returns the elapsed time to 0 at the start of transmission After transmitting a message the Q series C24 monitors the time up to the start of reception of the response message from the external device and returns the elapsed time to 0 at the start of reception At time out the Q series C24 performs the following processing 1 Data communications using a MC protocol Stores the error code to the MC protocol transmit error code storage area buffer memory addresses 25AH 26AH for the target interface Transmits a response message message to the external device and waits to receive the next command message 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2 Data communications using bidirectional protocol Stores the error code to the data transmission result storage area buffer memory addresses 257 267 for the target interface and performs transmission processing abnormal completion While waiting to transmit a response message the Q series C24 does not check the response monitoring time 2 Changing the respo
347. l device enclosed in the DC2 and DC4 codes as valid data DC2 Control data that informs the external device that the data following it is the start of the valid data DCA Control data that informs the external device that the data immediately preceding it is the end of the valid data Example External device DC2 Data DC4 DC2 Data Programmable Data 0 4 controller CPU 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL a Q series C24 DC2 DC4 transmission control contents When transmitting data to an external device the Q series C24 adds the DC2 code to the head of the send data and the DC4 code to the end of the send data External device Programmable 5 controller CPU D D o 6 5 2 Data 2 o 2 4 3 A 2 O Transmit order Transmit order Non procedure protocol Bidirectional protocol The DC2 and DC4 code are also added when MC protocol is used b Q series C24 DC2 DC4 reception control contents 1 When the Q series C24 receives DC2 from the external device it processes the receive data up to DC4 as valid data The sequence program cannot read the received DC2 code 2 When the Q series C24 receives DC4 it ignores the receive data up to immediately before DC2 as invalid data The sequence program cannot read the received DC4 code Non procedure protocol 1 Arbitrary data External device Programmable controller CPU Stored to
348. l device side is arranged with data having an even units are used byte number go 31 H32H33H34H35H41 42 43 44 4 5 9 Programmable Set to even byte controller CPU side Reception data read request X83 Store data received count Programmable controller CPU The diagram below is for when Completion device MO word units are used ON Status display device at M1 completion Normal completion One scan Buffer memory Sequence program device memory Reception data read request X83 1 Nove Ki Sets CH1 to the reception channel vove D3 Sets the allowable number of receive data to 6 G INPUT U8 Do 010 Mo Executes reception NO Mi _ 1 SET M100 J Sets the normal completion flag SET M101 Sets the abnormal completion flag 1 When ASCII BIN conversion is enabled the codes of receivable data and the codes of receive data that is stored in the reception area of the buffer memory are as follows rell Receivable codes Codes stored in the reception area Arbitrary data section 30n to 39u 41H to 46H to 9 to including complete code section If data codes other than 30H to 39H and 41H to 46H are received for an arbitrary data section an error occurs after ASCII BIN conversion processing by the Q series C24 2 To perform ASCII BIN conversion the compl
349. le controller CPU during transmission in byte units is an odd number of bytes the data of the lower byte of the last send data storage location of the send data storage area are transmitted 2 When ASCII BIN conversion is enabled the data to be transmitted is transmitted as 2 characters byte 11 34 11 34 11 DATA COMMUNICATIONS USING USER FRAMES Handling of the Q series C24 send data 1 The data of the user frame and the data of the transmission area designated from the programmable controller CPU are transmitted in the contents and order set in the buffer memory send user frame designation area For the user frame section and arbitrary data section the data can be sent as ASCII code using the ASCII BIN conversion For more details on the ASCII BIN conversion see Chapter 13 If send transparent code is designated the additional code data is added in front of the transparent code additional code in the data of the designated area during transmission and transmitted 11 35 11 35 11 DATA COMMUNICATIONS USING USER FRAMES 11 4 2 Transmission procedure The following describes the transmission procedure when transmitting a message containing user frames to the external device Procedure External device Arbitrary Programmable User frame User frame data area User frame User frame controller CPU 1 1st nth Transmission mth 4th area data Programmable controller CPU Completion
350. le of Data Communication Using the Non Procedure Protocol This section shows examples of data communication using the non procedure protocol when the following settings and registrations are made 1 Settings via GX Developer Perform the following settings on the Intelligent functional module switch setting screen Setting item Setting value Tel Transmission setting Set according to the Switch 1 CH1 Communication rate ICH1 Communication rate setting external device CH1 Communication protocol Non procedure Switch 2 0006 setting protocol CH2 Transmission Switch 3 0000H CH2 Communication rate ICH2 Communication rate setting Not used CH2 Communication protocol Switch 4 0000H setting 3 Q series C24 station Switch 5 Station No setting 0000H number 2 Settings via GX Configurator SC Register the following on the Transmission control and others system setting screen and the Non procedure system settings screen For items other than those noted below the default values are used Registration screen Setting item Setting value Send transparent code 1002 Transparent code 02u STX H designation 1st combination Additional code 10H DLE Transmission control and other Transparent code 03H ETX System settings designation 2nd combination Additional code 10H DLE Transparent code 02H STX designation 1st combination Additional code 10H DLE m Non procedure
351. lete repot o s qo ev co 1 31 421319 43 59 32 43 43 Master station external device Transmission destination station No Transmission source station No 1 Q 1 31 42 1 43 Massage of 6 7 After completion of 6 above or when the line usage time of the slave station that obtained the line usage right exceeds the maximum data communications time a The master station waits for a communications request from a slave station When the master station receives a communication request it performs processing from step 2 b The slave stations do not communicate data with the master station until data communications with the programmable controller CPU is necessary When data communications with the programmable controller CPU becomes necessary that slave station performs processing from step 1 When the master station itself wants to exchange data with the programmable controller CPU and a slave stations does not have the line usage right it transmits all external devices except programmable controller CPU a general report data and obtains the line usage right before communicating data with the programmable controller CPU After data communications with the programmable controller CPU is complete the master station transmits all external devices general report data to inform the slave stations that data communications
352. ling and message transmission according to the user designated connection data when the output signal from programmable controller CPU is turned from ON to OFF 2 Because Q series C24 notification processing is performed while the output signals from programmable controller CPU are turned OFF from ON dedicated notification can be performed when the programmable controller CPU enters the STOP state due to an error etc QUTICZ4 RZ Q25HCPU MODE D ee D Notification om Modem C USB PTA RS 232 Out of material detection Notification issued request Y14 Notification execution direction Data number for connection 5 Communication from the GX Developer 1 Access from the GX Developer to the remote programmable controller CPU can be made read and write from to the device data and sequence program 2 The QCPU can be accessed after reconnection from the Q Series C24 side using the callback function Public line Modem RS 232 Modem cable RS 232 cable GX Developer Transmission costs after line connection by callback from the Q Series C24 side are borne by the Q Series C24 side 6 Remote password check 3 COMMUNICATIONS BY THE MODEM FUNCTION If the remote password check has been set for the Q series C24 installed in the QCPU the Q series C24 executes a remote password check when the programmable controller is acces
353. lure and malfunction of the module Installation Precautions N CAUTION e Use the programmable controller in an environment that meets the general specifications contained in the user s manual for the CPU module to use Using this programmable controller in an environment outside the range of the general specifications may cause electric shock fire malfunction 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 If the module is not installed properly it may cause the module to malfunction fail or fall off Secure the module with screws especially when it is used in an environment where constant vibrations may occur e Tighten the screws within the range of specified torque If the screws are loose it may cause the module to fallout short circuits or malfunction If the screws are tightened too much it may cause damage to the screw and or the module resulting in fallout short circuits or malfunction e Before mounting dismounting the module be sure to shut off all phases of external power supply used by the system Failure to do so may cause product damage e Do not directly touch the conductive area or electronic components of the module Doing so may cause malfunction or failure in the module
354. lure to do so may result in electric shock When using the MELSEC L series serial communication module Wiring Precautions N CAUTION e Use applicable solderless terminals and tighten them within the specified torque range If any spade solderless terminal is used it may be disconnected when a screw on the terminal block comes loose resulting in failure e Connectors for external device connection must be crimped or pressed with the tool specified by the manufacturer or must be correctly soldered Incomplete connections could result in short circuit fire or malfunction e Connect the connector to the module securely e Place the cables in a duct or clamp them If not dangling cables may swing or inadvertently be pulled resulting in damage to the module or cables or malfunction due to poor connection e Confirm the interface type in advance and connect the cable correctly Connecting a cable to a different interface or incorrect wiring will cause failure of the module and the external device e Tighten the terminal block screw within the specified torque range Undertightening can cause short circuit fire or malfunction Overtightening can damage the screw and or module resulting in drop short circuit fire or malfunction e When disconnecting the cable from the module do not pull the cable by the cable part For the cable with connector hold the connector by hand and pull it out For the cable connected to the term
355. m number of callback destination GX Developer is limited to 10 modules Setting 3 FH or Setting 6 7H Select the GX Developer to be called back if the Q Series C24 limits the callback destination to a maximum of 10 modules Specify the callback destination telephone No when making line connection from the initial GX Developer side If the Q Series C24 checks the callback destination telephone No received from the GX Developer side and it is a telephone No that is registered in the Q Series C24 callback is executed If a telephone No that is not registered in the Q Series C24 is received from the GX Developer side the Q Series C24 disconnects the line and does not execute callback Data for checking the callback destination telephone No by the Q Series C24 are registered in callback Data No 1 to 10 Set the data registered in callback data No 1 to 10 in the Modem function system setting screen Example If line connections are being made with Callback connection during designated number as the connection system Input the telephone No 1 for the callback destination telephone No and make line connections Line Connection Callback connection during designated number Callback Line Connection Callback connection during designated number Callback GX Developer telephone No 1 Input the telephone No 2 for the callback destination telephone No and make l
356. me of notification designation area address 8202 200 1 Designates the waiting time from the moment the present notification is executed until the next notification is executed Unit s when performing more than one notification continuously 2 Designates wait time of notification after checking the time required during debugging 3 COMMUNICATIONS BY THE MODEM FUNCTION z Circuit disconnect wait time designation area programmable controller CPU watch use address 8206 200 1 When sending data using the programmable controller CPU monitoring function designates the time it takes to complete data transmission from the local station side modem to the external device after data transmission from the Q series C24 wait time until the circuit is disconnected 2 Specify the circuit disconnect wait time to match the specifications of the modem that is being used 3 Details of buffer memory for the remote password function Each of the areas described below is valid when the Q series C24 performs the remote password check a Remote password mismatch notification count designation area address 8204 200 1 Use 0 to FFFFu to designate the count that will be the notification timing to the QCPU when a remote password mismatch occurs during the user external device unlock processing after the modem line has been connected 2 It cannot confirm the accumulated number of times a remote password mismatch occurred up
357. me valid In the following cases when the callback destination telephone No from the GX Developer is specified and connection made callback is performed using the external line dialing and line types in the connection data for the registration No specified in callback data No 1 If it is being made possible to change the callback destination GX Developer If the maximum number of callback destination GX Developer is limited to 10 modules 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 If the callback destination GX Developer is limited to a maximum of 10 modules specify the connection data registration No that specify the callback destination telephone No for a maximum of 10 modules The external line dialing line types and telephone number in callback data No 1 become valid The telephone No only becomes valid in callback data No 2 to 10 The external line dialing and line types in the connection data for callback data No 1 are used for these 5 If Ou is specified in this specification the callback data No after that become unspecified Example If callback data No 4 is specified as the callback data No 4 to 10 registrations become invalid d Callback permit accumulated count storage area Address 8944 22F0n The accumulated count value when the Q Series C24 executed callback is stored here e Callback denial accumulated count storage area Address 8945 22F 1h The accumulated count valu
358. mission The Q series C24 converts a transmission data count to 4 digit ASCII code data hexadecimal then sends it beginning with the lowest byte L At reception The Q series C24 converts a received data length 4 digit ASCII code data hexadecimal to 2 byte binary code data and stores it in the reception data count storage area 3 Conversion of data section At transmission The Q series C24 converts transmission data for one address to 4 digit ASCII code data hexadecimal then sends it beginning with the lowest byte L At reception The Q series C24 converts each two characters of a received data section 2 digit ASCII code data hexadecimal to 1 byte binary code data and stores it in the reception data storage area 4 Conversion of error code At transmission The Q series C24 converts an error code for a detected error to 4 digit ASCII code data hexadecimal then sends it beginning with the lowest byte L For 34124 it is converted to 3412 and sent beginning with 12 At reception The Q series C24 converts the first 2 digits of a received error code 4 digit ASCII code data hexadecimal to 2 byte binary code data as the lower byte and stores it in the transmission result storage area For 1234 is received it is converted to 3412 and stored 13 10 13 10 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 5 Treatment of sum check code The data length and the data section after ASCII BIN
359. mission and notification error information can be sent to the external device without a sequence program whenever a programmable controller CPU error occurs MELSEC Q25HCPU ERR USERE eat QJ71C24 IRS 23 rows uci 1 i Jo CPU error information Monitoring device information PULL MITSUBISHI External device co NN Abnormal detection 2 2 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 2 About the Programmable Controller CPU Monitoring Function This section explains the programmable controller CPU monitoring function 2 2 1 Data registration for using the programmable controller CPU monitoring function The following explains the data registration by the user to use the programmable controller CPU monitoring function 1 Programmable controller CPU monitor registration for the Q series C24 that is required to use the programmable controller CPU monitoring function is described in the following sections The registration can be performed using one of the following methods 1 Registration using the Q series C24 dedicated utility package GX Configurator SC 2 Registration using the programmable controller CPU monitoring registration command 0630 for communication with the MC protocol Detailed explanation is found in the MELSEC Q L MELSEC Communication Protocol Reference Manual
360. mission frame No designation 56th User frame number Transmission frame No designation 57th User frame number Data sent when the condition D 0 is satisfied o E Device Device Device Device 8 E T data data data data FE Ei 8 T X D3 D2 D1 D0 288 8 55 X 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 3 2 How to register and cancel the programmable controller CPU monitoring function The following describes the method for registering and canceling the programmable controller CPU monitoring function from the programmable controller CPU 1 For details on the method for registering and canceling the programmable controller CPU monitoring function with the GX Configurator SC refer to the Q Corresponding Serial Communication Module User s Manual Basic 2 For details on the method for registering or canceling the programmable controller CPU monitoring with a command of MC protocol refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual When registering or canceling from the programmable controller CPU For details on the CSET command see Section 17 3 Registering programmable controller CPU monitoring Create control code data from DO 4 wo MO M1 H Processing for normal completion M1 Processing for abnormal completion processing processing processing
361. mission rate setting Set according to modem TA on local station 1 bps Station number setting 00 to 31 x1 When the first five digits of the serial No are 03042 or earlier the transmission speed cannot be set to 115200 bps for connection between the Q series C24 and the GX Developer via a modem This gives an example of the switch setting when the modem function is used to connect the GX Developer to the series C24 1 side and the programmable controller is accessed Perform the switch setting similar to this example also when performing data communication or notification Start procedure GX Developer gt PLC parameter I O assignment Switch setting Setting example slot Type Modelname Switch 1 Switch 2 Switch 3 Switch 4 Switch 5 i ofpe es Li oro _ QJriC24R2 0005 0000 0000 0000 3 COMMUNICATIONS BY THE MODEM FUNCTION Switch number Description Setting value Position Specified value bO OFF Operation setting Independent b1 ON Data bit 8 bits b2 OFF Parity bit No b3 OFF CH1 transmission Odd even parity Odd Switch 1 b4 OFF setting Stop bit 1 bit 07E2 b5 ON Sum check code Yes b6 ON Write during RUN Allowed b7 ON Setting modification Enable b8 to b15 CH1 communication rate setting 19200 bps Switch 2 CH1 communication protocol setting 5 0005
362. mmable controller CPU and reading of the receive data 2 below 1 Reads which of the user frames set in the receiver user frame designation area was received from the receive user frame storage area address 25 2 Reads the arbitrary data area of the receive message from the receive area default addresses 600H to 7FFH 11 14 11 14 11 DATA COMMUNICATIONS USING USER FRAMES 11 2 4 User frame setting for reception 1 About user frame setting for reception This setting is to receive data from the opposite device using non procedure protocol through the use of a user frame Everything is set on the GX Configurator SC Non procedure system setting screen The setting items are listed below Setting screen Non procedure system setting screen Received data count designation Receive complete code designation designated receive complete code HOd0a CR LF H0000 H00ff Receive complete code Receive user frame designation User frame use enable disable designation Input following eight items within the following range 0 Not designated H0001 H03e Default frame H03e8 HO04af Flash ROM user frame H8001 H801f Buffer memory user frame Receive user frame designation First frame No designation 1st First frame No designation 2nd First frame No designation 3rd First frame No designation 4th Last frame No designation 1st Last frame No designation 2nd Last frame No designation
363. mmunication request to the local station other station received from the external device 3 The Q series C24 does not perform a remote password check for the following communication requests Transmission request from the local station QCPU such as transmission using non procedure protocol Communication request from the external device including the GX Developer connected to the local station QCPU transmitted to other station upon request from the QCPU QCPU C24 Path for items subject eem E 1 to remote password check NUMEN o Path for items not subject to remote password check Other station GX Developer Ethernet module 1 In the above diagram a communication request from the external device cannot be received since the remote password check setting has been executed If the remote password check setting has not been executed a communication request can be received and data communication from the external device is possible b Selecting modules subject to the remote password check The user can select any Q series C24 to perform the remote password check and set this using QCPU parameters This is set on the GX Developer remote password setting screen 3 COMMUNICATIONS BY THE MODEM FUNCTION c Stations that can be accessed when the remote password check is performed 1 If the external device performs the remote password
364. modem function monitor test screen Write O to the applicable area of the buffer memory 2 The accumulated count will be stored as OH gt 1H gt 2H FFFFH gt gt 1 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 7 Precautions when using the modem function Precautions when using the modem function to perform data communication with an external device via public line or call to the pager receiver are described 1 5 Line connection and disconnection When performing data communication with an external device it must be predetermined which station is to perform the line connection dialing and disconnection processing with the partner device as well as the timings Reception data before connection completion Before the connection processing to the modem is completed the reception data other than modem commands is ignored read and disposed at the interface that uses the modem function Example The Q series C24 will ignore the data even when an MC protocol command message is received Transmission control Delays may occur in transmission controls to notify the data reception capability at the local station to the partner device In order not to have a state in which the partner device cannot receive the transmission data the amount of transmission reception data and intervals should be determined beforehand When transmission reception data in the non procedure protocol the procedure must also be pre
365. n 2 ASCII BIN conversion is performed by the Q series C24 according to user settings External Q series C24 device e Head data T I Buffer memory H L 1234 12 344 z k Does not convert L H 5 LL aoaaa i 331 341 31H 32H Converts 6 Sending receiving data in a message format tailored to the external device detailed explanation in Chapters 9 to 11 1 By preregistering the data arrangement user frames of the messages to be sent and received by the external device to the Q series C24 the following data communications can be performed using registered frames MC protocol Data transmission from the programmable controller CPU to the external device using the on demand function Non procedure protocol Data communication between the programmable controller CPU and the external device 2 For example multiple first frames and last frames called user frames with the definition shown in the diagram below can be preregistered in the Q series C24 When sending data to the external device the data that is arranged as shown in the diagram below can be sent by designating the preregistered user frame numbers and arbitrary data When receiving data from the external device by setting the preregistered user frame numbers for reception at the startup of the Q series C24 the arbitrary data section can be read to the programmable controller CPU when the mess
366. n abnormality is detected 5 See the modem TA manual regarding the connection from a modem to public line office telephone system or from a TA terminal adapter to a digital line 7 Communication system Communication via the modem function is performed using full duplex communication Connections cannot be made devices designed for half duplex communication 8 Data communication and notification to external devices 1 Data communication with external devices and notification to a pager receiver are performed using the public line or electric wave transmitted from the electric wave transmission base There might occur a condition in which correct data communication or notification cannot be carried out due to an error from the system s setup environment electric wave transmission status error in the partner device etc Perform a connection test beforehand and confirm that connection is possible 2 In notification processing via electric wave transmission errors from the pager receiver cannot be detected Setup a separate call circuit with a lamp display or buzzer to ensure the safety of the programmable controller system 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 Specifications This section explains the transmission specification on the Q series C24 side connectable modems TA s terminal adapter I O signals related to the modem function and buffer memory for the usage of the modem function 3 3 1 Transmission s
367. n the OS area f more data is received when the vacant OS area mentioned above is 0 bytes an SIO error is generated and the data received until the OS area becomes vacant is ignored At this time the SIO LED is turned on Refer to User s Manual Basic b Q series C24 DC1 DC3 reception control contents 1 When the Q series C24 receives DC3 from the external device it terminates data transmission The sequence program cannot read the received DC3 signal 2 When the Q series C24 receives DC1 from the external device it restarts data transmission The Q series C24 resumes transmission from the data terminated on DC3 reception The sequence program cannot read the received DC1 signal External device Q series C24 3 Once DC is received subsequent DC1 are ignored and are removed from the receive data 1 In the DC1 DC3 transmission reception control the state of the Q series C24 is as follows at the time of power on reset or mode switching of the CPU or the UINI instruction execution DC1 is not transmitted to the external device This is the same state as when DC1 was transmitted The same state as when DC1 was received even if DC1 is not received from the external device 2 DC2 DCA transmission control DC2 DC4 reception control The Q series C24 encloses the send data from the local station in the DC2 and DC4 codes and transmits it to the external device and processes the data received from an externa
368. n abnormally 7 completed lt Data reception processing non procedure protocol gt RST 2 1 x3 i Do Ki Dico 1 Set the data reception channel on CH1 X4 Pf 0161 K2 MP K10 D3 7 8 INPUT Uo 0160 061 m60 Execute reading of receive data dis M161 rine 060 1 Reading of receive data 7 normally completed n r ING 061 1 Reading of receive data 7 abnormally completed 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 5 2 Sample program for data communication 2 1 Sample program on the connection request station side Initialization for the modem connected to CH1 interface line connection data communication by the non procedure protocol and line disconnection are executed by commands from the user Before executing this program perform the following settings changing the default values on the GX Configurator SC s Modem function system setting registration screen and register them in the Q series C24 Settings other than the items shown below are not required Settings on the GX Configurator SC s Modem function system setting screen Setting item Setting value Modem connection channel designation No communication interval time designation Data No for initialization designation 8001H Data No for connection designation 8002H Registration of the modem s initialization data and line connection data modem initialization line connection data communications by t
369. n be used for connection between the Q series C24 and modem TA 2 Forthe RS 232 interface of the Q series C24 a D sub 9 pin connector female is used For the connection cable of the Q series C24 side refer to User s Manual Basic 5 Modem TA installation 1 Install the modem TA according to the modem TA manual When installed in an area in which a lot of noises exists malfunctions may occur 2 In order to prevent the effects of noise and power surges do not connect near or tie the cable together with a main circuit line high voltage line or load line other than for the programmable controller with the modem TA connection cable 3 COMMUNICATIONS BY THE MODEM FUNCTION 6 Connectable lines 1 The connections can be made with the following lines Perform connection tests beforehand and confirm that connection is possible Public line or office telephone system of analog two line method Digital line ISDN 2 Itis not possible to connect to call waiting lines in order to avoid data errors or automatic line disconnection due to the call waiting interrupt tone 3 Avoid connections with party line telephones to avoid interrupted calls during communication 4 Ifan alert sound is sent at fixed intervals from the communication machine to prevent long term calls data may experience errors It is recommended to check the normality abnormality of data reception between devices and perform transmission retry processing when a
370. n 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 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 The manual number is given on the bottom left of the back cover Print Date
371. n signal Y Buffer memory reception area Reception using bidirectional protocol Data reception Response transmission When data is received from the external device the receive data is stored in the buffer memory and the reception data read request signal turns ON The main program stops executing and the interrupt program starts The data reception dedicated instruction BUFRCVS for the interrupt program is executed and data is received 7 1 When execution of the BUFRCVS instruction is complete the reception data read request signal turns OFF When execution of the interrupt program is finished execution of the main program restarts When the reading of receive data using the BUFRCVS instruction is finished the following processes are performed At normal completion Programmable controller CPU error flag SMO turns OFF At abnormal completion Programmable controller CPU error flag SMO turns ON The error code is stored in the programmable controller CPU error code SDO For more details on the programmable controller CPU error flag SMO and error codes 500 see the programmable controller CPU Manual 4 3 4 4 Programming 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM This section explains the programming when data reception is performed with an interrupt program during communication using the non procedure protocol or bidirectional protocol 4 4 1 Program example 150 E D D
372. n start timing Receive complete timing Stored in the Stored in the read timing reception area reception area 2 Reception with the first frame combination 1 D 1 E reception using Format 1 1 In this method arbitrary data of exclusive format 1 received data count initially set in the Q series C24 is transmitted from the external device together with the first frame The data length for the arbitrary data the reception message that can be handled by the programmable controller CPU side 1 be specified for each data reception frame combination up to four combinations Any reception data prior to the first frame will be ignored The Q series C24 will begin reception processing when data of the same arrangement as the first frame is received When arbitrary data equaling the exclusive format 1 received data count is received the arbitrary data is stored in the reception area of the buffer memory and a read request is performed to the programmable controller CPU Exclusive format 1 received data count initially set in the Q series C24 should be a data count for arbitrary data to be received The received data count initially set in the Q series C24 is not used Reception processing via the receive complete code initially set in the Q series C24 will not be performed The reception data for the receive complete code will be treated as arbitrary data Example 1 By specifying a user frame in wh
373. n to designate the transmission data to two words 1234 5678 10 6 10 6 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES Control procedure Added by Q series C24 External device First frame 1st Last frame 1st 1 4 0 User frame Send data User frame Data name Example O2HFFHO1HSBH o3HFFH FOHODHOAH t i pope pee User frame registration code slo J Programmable controller CPU 128 1 i r Send data corresponding to o 3 b x x gqxg Tt registration code lj l lg Tw Li ME i 1 2 6 17 Send data code ONDEMAND command ONDEMAND command complete bit l 1 ONDEMAND command abnormal completion bit 1 scan 1 Buffer memory Word units 96H 0 First address AOH 00 Data length 1 2 1st first frame No AQH 2nd first frame No AAH 1st last frame No 402 2nd last frame No ACH When transmission error is generated Result of execution 256 0 other than 0 is stored Send data COOH 1234H L Sequentially transmits the data in 4 bit units beginning 01 5678 from the most significant bit CH1 side na 10 7 10 7 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 5 Example of an On Demand Data Transmission Program U
374. nate the word device blocks for the registered word blocks then designate the bit device blocks for the registered bit blocks Before sending the programmable controller CPU monitoring results to the external device the user frame and user frame number should be registered with GX Configurator SC in advance To register the programmable controller CPU monitoring once again cancel the programmable controller CPU monitoring before registration Whether the CSET instruction is being executed or has been completed normally abnormally can be checked by the completion device D2 designated as a setting data a Completion device D2 0 Turns on at the END processing of the scan where the CSET instruction is completed and turns off at the next END processing b Completion device D2 1 Turns on and off depending on the completion status of the CSET instruction Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the CSET instruction is completed and turns off at the next END processing When the programmable controller CPU monitoring registration is performed the corresponding interface data communication protocol setting is only designated when non procedure protocol is used for the following data for designation in the control data User frame output head pointer for constant cycle sending batch conditions sending User frame transmission count for cons
375. nformation Data on the device to be monitored transmission Status of modules of the local station programmable controller CPU Notification message registered in data for connection character string data Notification 3 Two separate timings constant cycle transmission and condition agreement transmission are used to transmit and notify the programmable controller CPU monitoring results to the external device In the constant cycle transmission transmission and notification are performed each time the programmable controller CPU is monitored In the condition agreement transmission transmission and notification are performed when the information read from the programmable controller CPU satisfies the user defined conditions and an error is detected in the programmable controller CPU 2 Simplifying the device monitoring procedure When device monitoring is performed by communication using the MC protocol the external device must repeatedly perform monitor request transmission and monitor data reception processing after it executes monitor registration By designating the constant cycle transmission for the programmable controller CPU monitoring function the device data can be monitored without performing the monitor request reception processing 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 3 Notification of an error in the programmable controller CPU In the condition agreement trans
376. ng the AT command in the local station side modem Result code receive Dial Abnormal completion Connection Y11 F x request Initialization Y40 ON i completion i l Dial in progress X11 pL a 2 Connection in progress 412 ED 1 Initialization T m connection X13 l abnormal completion 1 RS 232 CD terminal OFF 4 Dial E Dial Dial Z Dial n TLLA Retry In case of three times Dialing Connection channel and retry operation are performed using the buffer memory setting Buffer memory for initialization 3 COMMUNICATIONS BY THE MODEM FUNCTION Example2 When performing the initialization and the line connection from the Q series C24 side simultaneously See Section 3 4 5 Buffer memory for connection Address 5 53 0 q 3000 Normal completion Connection N request Yt es p gt Initialization 7 completion Y10 X i Dial in progress x44 T IN i E Connection in b p 1 i gt progress X12 RS 232 CD terminal Set Display a result code ES f si 4 using the AT command in Modem the local station side modem initialization Abnormal completion See section 3 4 5 Connection request Initialization completion
377. ng xternal device bel imi E read timin side 9 9 E Programmable controller CPU side 11 13 11 13 11 DATA COMMUNICATIONS USING USER FRAMES 11 2 3 Receive procedure The following shows the receive procedure when a message including data with the same arrangement as the specified user frame is received and the arbitrary data is read to the programmable controller CPU When the CH1 side interface of the Q series C24 receives data Reception data with the user frame 1 YO External device User frame Arbitrary User frame side first frame data area last frame Programmable controller CPU side 2 2 Reception data x3 read request signal Programmable controller CPU side Completion device Abnormal ON completion Status display device at completion Normal completion 1 See Sections 11 2 1 and 11 2 2 regarding the reading of reception data using a user frame and the timing of reception data reading to the programmable controller CPU Sets the receive user frame registration No etc in the non procedure system setting screen for GX Configurator SC During debugging the initial setting value for data reception shall be set prior to data receiving but after debugging is completed it shall be set when the Q series C24 starts up See Section 11 2 4 Reading 1 below for checking which user frame was received by the Q series C24 from the progra
378. ng results cR T MUT M 2 6 Transmission 7 1 Transmission control end free area specification inna Dali aladdin pina lupa nid 7 3 Transmission control start free area specification din 7 3 Index 2 U V IW Transmission data arrangement On demand data 10 3 Non procedure protocol 11 34 Transmission frame No designation area Transmission monitoring time timer 2 6 10 Transmission procedure User frames 11 36 Transmission program user frames 11 41 Transmission specification 3 12 Transparent codes 12 1 instruction eene 17 32 User frame cerent des 9 1 User frame setting for reception 11 15 Variable data User frame 9 2 Word bytes units setting 5 1 Index 3 Index 3 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 Company However if repa
379. ng time H Timer 0 elapsed time reset Timer 1 monitoring time Timer 2 monitoring time H W gate OFF time Message wait time Timer 2 elapsed time reset Timer 1 elapsed time reset a eek 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 1 No reception Monitoring Time timer 0 Setting The no reception monitoring time timer 0 is the time for clearing the Q series C24 state when the Q series C24 is placed into the data receive wait state by trouble in the external device The Q series C24 monitors the reception interval in byte units at the start of data reception from the external device and ends monitoring when the preset last data is received and repeats this operation The following explains the no reception monitoring time timer 0 operation 4 1 byte External device Data 1 Data2 Data n 1 Data n Programmable Data receive interval controller CPU depends on the transmission rate etc Monitoring time Elapsed time reset One byte is always handled as 12 bits in the no reception monitoring time timer 0 regardless of the transmission setting If the non reception monitoring time timer 0 was changed in the sequence program execute any of the following to enable the changed value Mode switching Refer to Chapter 15 UINI instruction Refer to Chapter 17 Programmable
380. ng to the simultaneous transmission priority non priority value registered in Transmission control and others system setting screen of the GX Configurator SC a When Q series C24 is designated priority Terminate data X transmission Retransmission External device Data C 1 Data C Programmable controller CPU Data B Since the Q series C24 has priority it continues to transmit even if the CD signal is turned Store this data at the ON external device Time for transmitting 2 characters 4 SD Send data Data B RS Send Request CS Send Possible CD check CD check CD check gt CD Receive Carrier Detect RD Receive Data Data C 1 The series C24 ignores The series C24 the receive data 1 stores the receive data 1 When transmitting data check the Q series C24 CD signal If the CD signal is OFF turn on the Q series C24 RS signal If the CD signal is ON wait until it is turned OFF then turn ON the RS signal 2 After the RS signal is turned ON transmit the data 3 After data transmission is complete turn off the RS signal 4 Ifthe CD signal is turned ON during data transmission the Q series C24 continues to transmit data to the external device Simultaneous transmission generated 5 After transmission from the Q series C24 is complete transmit all the data terminated at st
381. ng when the partner device initiate the line connection is left entirely to the partner device There is no method on the Q series C24 side to check a line connection error occurrence at the partner device When a remote password check is performed for the QCPU normal completion of the unlock processing allows access to data communication programmable controller thereafter 4 Precautions during the line connection 1 Prior to data communication with external devices determine when and which station will perform the line connection dialing and line disconnection processing to the external device 2 Use the following method to perform the unlock processing for the QCPU remote password from the opposite device During communication using MC protocol transmit the dedicated command to the Q series C24 side When accessing the programmable controller using the GX Developer perform the unlock processing on the GX Developer screen when access begins See Section 3 3 7 8 for what to do when the unlock processing is completed abnormally 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 When reconnecting the line after disconnection allow several seconds for the modem before turning on the Connection request Y11 If it Y11 is turned on immediately after line disconnection the modem may not accept the first connection request resulting in connection failure and the user may be forced to wait for the retry time to elapse
382. nnection request signal Y12 7 After the above line disconnect processing is completed specify the modem initialization command for which No automatic receive has been specified and perform modem initialization only See Section 3 4 7 8 Describe the above occurrence to the system manager and take necessary measures 3 COMMUNICATIONS BY THE MODEM FUNCTION Example When the number of times a remote password mismatch occurred exceeds the notification accumulated count setting value during the remote password unlock processing in communication using MC protocol with the series C24 CH1 side interface used XIE XIE 1 dF wo J Access enabled flag is turned ON ww D200 J Register initialization data for No automatic receive to the buffer memory move K5 D201 sMOvP ATSO 0 0202 T ne 0200 K5 1 XOE PLs M201 J CH1 side ERR occurrence is detected M201 Mo FROM HO H25A 0250 K1 J Read the CH1 side error code L H7FE8 0250 SET M203 F If the error code indicates that the accumulated count of remote password mismatch is exceeded ser Yi2 the modem disconnect request signal is set M203 NO Y12 X10 X12 X14 1 4 RH e Y12 1 Modem disconnection completed Yi2 X10 Xi2 X14 VE Yt Mt IF HO H34 H8005 K1 J When the modem disconnection completed signal turns OFF the No for the modem
383. nse monitoring time timer 1 The response monitoring time timer 1 is registered on the GX Configurator SC s Transmission control and others system setting screen For data communication using the MC protocol set the response monitoring time so that it is longer than the message wait time 1 1 The message wait time is designated at the following locations A compatible 1C frame Designate in a command message QnA compatible 2C 3C AC frame GX Configurator SC MC protocol System setting screen When changing the response monitoring time timer 1 default value 5 s observe the following precautions 1 Data communications using an MC protocol In any of the following cases make the default value the message wait time described in Section 6 4 or longer a When designating the monitor conditions with the following functions set the maximum time matched to system operation Word units random read Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual Device memory monitor Refer to the MELSEC Q L MELSEC Communication Protocol Reference Manual b Access other than a above 1 When accessing a station connected including multidrop link to an external device set the following value or longer Response monitoring time Maximum number of scans required to process the command used connected station scan time 2 When accessing another station over a network system set the default value
384. nstant Others Bi Word Bi word ULTGLI Zn eo o 56 o om dol o Instruction code Executing condition Command G GETE c S1 52 GP GETE GP GETE 51 52 Setting data Setting data Description Set by Data type Start I O signal of the module 00 to FE The 2 upper digits of an input output signal expressed in 3 digit User BIN 16 bit 1 Head number of the devices that store control data Head number of the devices storing the registered data that has been read Head bit device number of the local station that turns ON for one scan upon instruction D completion System Bit D 1 also turns on if the execution completes abnormally The file registers of each of the local device and the program cannot be used as setting data Control data Setting data Setting range _ Setby Dummy _ The result of reading via the instruction is stored S1 1 Read result 0 Normal System Other than 0 Error code S1 2 Directed frame No Designate the user frame No 1000 to 1199 Allowable number of Designate the maximum bytes of the user frame s registered data 1 to 80 User read bytes that can be stored in S2 S1 3 The number of bytes of the user frame s registered data that has Registered bytes been read is stored System court 1 to 80 Number of bytes of registered data 1 For informati
385. nt and accumulated count of notification given when a remote password mismatch occurs during the unlock processing from the external device with respect to the remote password set in the QCPU See Section 3 3 6 3 a and b 2 In the GX Configurator SC system settings in order for the Q series C24 to operate set the count determined above in the following item on the Modem function system setting screen and register this to the Q series C24 Setin the item Remote password mismatch notification count Setin the item Remote password mismatch notification accumulated count 3 In addition to initialization commands used in normal modem initialization specify No automatic receive and additionally register the modem initialization command for this step to the Q series C24 No automatic receive This is the setting to prohibit line connection from the opposite device Use the Modem function initialization data screen to set 4 Constantly monitor the rise OFF ON of the ERR occurrence signal XE or XF when connecting the line to the opposite device using the modem function after the system begins operating 5 Monitor the following buffer memory when the ERR occurrence signal turns ON Storage area for MC protocol transmission error codes address 602 25 6 Perform the line disconnect processing with respect to the opposite device when the error code stored in the above buffer memory is 7FE8u Use the modem disco
386. nvalid during modem function system settings with GX Configurator SC TA to TA communication specification Q series C24 to TA communication specification 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 Specification and precautions for the connectable TA s terminal adapters a TA specification Specification ISDN INS net 64 equivalent Connection line DSU and TA are required mE 1p o digital dedicated line Initialization Hayes AT command compatible AT command compatible See Section 3 4 3 Section 3 4 3 B channel line exchange V 110 Communication standard D channel E m exchange Electrical condition condition V 28 V28complant Circuit definition V 24 compliant Q series C24 side connector 9 pin female D sub User s Manual Basic REDE 232 DR IDRsignalcontrol control Only the DR DSR signal must be able to turn on See Section 3 3 1 User s Other Compatible with the Q series C24 specification Manual Basic 1 TA s that turn on the CD signal simultaneously cannot be used Use a TA capable of flow control as described in 1 a in this section also for the communication between the TA and terminal control is a function of the TA itself that becomes available by issuing the AT commands to the modem See the TA manual for details b Precautions for selecting a TA 1 Set the TA on the series C24 side as shown below Setting item Setting range De
387. o 1stlast frame No AB 4014 2nd last frame No Result of execution 256 0 1234 Send data 00 1 5678 CH1 side 10 5 from the most significant bit 10 5 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 4 2 Data communications using the binary code The following shows the control procedure when performing switch settings via GX Developer and registration via GX Configurator SC 1 Switch settings via GX Developer 1 Set the Communication protocol setting to MC protocol format 5 2 Setthe Station number to 0 2 Registration via GX Configurator SC Register as follows when transmitting a user frame user selected transmission data 1 or a combination of user frames 1 User frame registration screen User frame User frame No User frame registration contents Registration code 3ECH 1004 02h FF 014 STX Q series C24 station No ETX sum check code CR LF 402u 1026 03d FFH FOH ODx OAH Sum check code is designated by a 1 byte binary code 2 Transmission control and others system setting screen MC protocol system setting screen Set the Word byte units designation to word units Set the On demand user frame designation items to the following First frame No 1st 3ECH First frame No 2nd OH No designation Last frame No 1st 402H Last frame No 2nd No designation 1 Use the ONDEMAND instructio
388. o be received Reception processing via the receive complete code initially set in the Q series C24 will not be performed The reception data for the receive complete code will be treated as arbitrary data Example When data transmitted from a bar code reader is received STX will be registered in the first frame and ETX registered in the last frame according to the message format of the bar code reader Data format transmitted from the bar code reader First frame STX Reception data Last frame ETX Reception start timing Receive complete timing Ignored Stored in the reception area read timing b Reception of combination 1 B 1 2 3 4 5 In this method messages to be received by the programmable controller CPU side are all transmitted from the external device as fixed format data Any reception data prior to the first frame will be ignored The Q series C24 will begin reception processing when data of the same arrangement as the first frame is received When data of the same arrangement as the last frame is received a read request is performed to the programmable controller CPU Since there is no arbitrary data the reception data count will be 0 when a read request is performed to the programmable controller CPU The received data count initially set in the Q series C24 uses the default value Reception data v Ignored Stored in the reception area
389. o receive data The Q series C24 uses the DTR ER signal to inform the external device whether or not the local station is ready to receive data and uses the DSR DR signal to check if the external device is ready to receive data Example External device Data 1 1 4 4 Data 1 2 Terminate Restart Continue Programmable controller CPU DTR signal DSR signal Data 2 2 Restart Continue Data 1 2 Terminate 1 Q series C24 control a Q series C24 DTR control The Q series C24 uses the DTR signal to inform the external device whether or not it is ready to receive data The data transmitted from the external device by non procedure protocol is stored to the buffer memory receive data storage area through the OS area Refer to User s Manual Basic For the following conditions the receive data is temporarily stored to the OS area and is transferred to the receive data storage area when the present receive data read processing is complete 1 Receive data size exceeds the size of the buffer memory area when receive data storage area lt receive data length data was received 7 2 The data was received before the sequence program read the previously received data The Q series C24 turns the DTR signal on off as shown below depending on the size of the vacant OS area e Vacant area 64 bytes default or less OFF Vacant area 263 bytes default or more ON
390. ode registration Ou ti CLT to host station No data code 2 matched to QnA compatible 3 3EBx 1003 9 00H 00H FFH FFH 00H frame format 1 QnA compatible 3C frame format 401H 1025 03H FFH F1H 1 corresponding ETX sum check code data code 2 Transmission control and others system setting screen MC protocol system setting screen Set the Word byte units designation to word units Setthe On demand user frame designation items to the following First frame No 1st 02H First frame No 2nd 3EBH Last frame No 1st 401H Last frame No 2nd No specification 1 Use the ONDEMAND instruction to designate the transmission data to two words 1234 5678n 10 4 10 4 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES Control procedure First frame 1st External device pes First frame 2nd User frame Data name Programmable controller CPU Sp Example Added by Q series C24 Last frame 1st Send data corresponding to registration code ONDEMAND command ONDEMAND command complete bit ONDEMAND command abnormal 1 scan N When a transmission error is generated other than 0 is stored Sequentially transmits the data in 4 bit units beginning complete bit Buffer memory Word units 96H 0 First address AOH C00u Data length 1 2 1st first frame No 9 02 2nd first frame N
391. odem s initialization processing is completed abnormally the Series C24 executes the following processing The initialization connection abnormal completion signal X13 does not go ON An error code is stored in the buffer memory s modem function error code storage area Address 545 221 Modem initialization is retried automatically using the initialization connection timeout time stored in the buffer memory address 50 32H and is repeated until initialization is completed normally When modem initialization is not completed normally the user should perform the following and restart the station where the Q Series C24 is installed Check the set initialization data No Check the registered contents of the initialization data corresponding to the set initialization data No If they are abnormal correct them and register them again Check if the modem s power is turned on 3 COMMUNICATIONS BY THE MODEM FUNCTION 2 When the line is disconnected from the Q Series C24 side using Y12 the initialization completion signal X10 goes off together with the connection in progress signal X12 When connecting to the line again do so after first initializing the modem When the line to the Q Series C24 is disconnected from the external device side the Q Series C24 s initialization completion signal X10 does not go OFF When desiring to disable reception by the Q Series C24 side s modem execute line
392. ogrammable count is stored controller CPU The following diagram is for word unit Completion device 195 NONAS J Abnormal Status display device yy y completion at completion Normal 00 004 064 completion 601 1 0 0 0 l H 314 30H 31H 304 Ons scan 9 3 0 32H 33H 32H 603 NULL STX NULL STX H 02H 00x 024 B A B A 424 41 12344 12344 094 424 124 34 606 LF CR LF CR OAw 0D OD Buffer memory Sequence program device memory Reception data read request X83 uw d 5 Sets CH1 to the reception channel e ou Sets the allowable number of receive data to 6 G INPUT us 00 D10 Executes reception SET M100 Sets the normal completion flag ee M101 Sets the abnormal completion flag When the receive transparent code designation is set to Enable and the ASCII BIN conversion is set to Disable the codes for receivable data and those for receive data that is stored in the buffer memory s reception area as follows Codes stored in the Receivable codes reception area Receive transparent code Additional code 01H to FFH Delete designation section Transparent code OOH to FFH 00H to FFH Arbitrary data section including complete code OOH to FFH 00H to FFH 12 10 12 10 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 4 2 Example of data tran
393. oing so may cause malfunction e Before cleaning up and retightening terminal screws and module fixing screws be sure to shut off all phases of external power supply used by the system Not doing so may cause failure or malfunction of the module If the screws are loose it may cause the module to fallout short circuits or malfunction If the screws are tightened too much it may cause damages to the screws and or the module resulting in the module falling out short circuits or malfunction e Always make sure to touch the grounded metal to discharge the electricity charged in the body etc before touching the module Failure to do so may cause a failure or malfunctions of the module Operation Precautions N CAUTION e When performing the control of the programmable controller in operation especially changing data program and operation status status control by connecting a personal computer etc to the intelligent function module read this manual carefully and confirm if the overall safety is maintained Failure to perform correct operation s to change data program or the status may result in system malfunction machine damage or an accident Disposal Precautions N CAUTION e When disposing of this product treat it as industrial waste When using the MELSEC L series serial communication module When using the MELSEC L series serial communication module Design Precautions N WARNING e For the op
394. oller CPU monitoring S2 3 Use prohibited to For system System 52 111 including for any other purposes such as for programs 1 For information about errors caused by incorrect data designated by the user see the description in Errors 2 The Set by column indicates the following e User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction 17 11 17 11 Functions 17 12 4 5 17 DEDICATED INSTRUCTIONS To register the programmable controller CPU monitoring this instruction registers data necessary for the Q series C24 to execute the programmable controller CPU monitoring function When the data registration to execute the programmable controller CPU monitoring function is completed normally the Q series C24 begins monitoring the programmable controller CPU and transmitting monitoring results to an external device To cancel the programmable controller CPU monitoring this instruction ends the Q series C24 s monitoring operation of the programmable controller CPU When canceling of the programmable controller CPU monitoring is completed normally the Q series C24 terminates the operation of the programmable controller CPU monitoring function A maximum of 10 blocks can be designated for a word device or bit device to monitor the device memory To register the device memory to monitor desig
395. ommunications after mode switching 4 The Q series C24 requires approximately 400 ms as processing time of mode switching only While the mode switching is being executed the setting values cannot be stored into the buffer memory special applications area and data cannot be transmitted between the Q series C24 and the external device Je Approx 400 ms gt j processing Mode switching signal X6 XD Linked operation mode switching Do not switch the mode when two interfaces of the Q series C24 are in linked operation Also do not switch the mode for linked operation 15 4 15 SWITCHING THE MODE AFTER STARTING 15 3 I O Signals for Handshake with Programmable Controller CPU and Buffer Memory This section describes the I O signals for handshake and the buffer memories used when mode switching is performed 1 I O signals for handshake with programmable controller CPU signal Device turned ON OFF Signal name Complete Mode switching in progress n Mode switching request REMARKS The following signals can also be used as I O signals in addition to the above Refer to User s Manual Basic for the programmable controller CPU I O signals series C24 ready signal X1E Turned ON when the Q series C24 can be accessed from the programmable controller CPU Watchdog timer error signal X1F Turned ON when the series C24 does not operate normally e CH1 ERR signal XE 75008 Turned ON when the
396. on data corresponding to T Station i 12 che register code X X 1 1 1 t 1 T 1 1 1 1 1 1 1 1 1 f 1 1 1 f 1 ij i 1 ar x 1 1 1 1 1 1 l 1 Transmission reception y 0241 00H 3 41 31 12 03 32 01 0 0 data code Sum check code The Q series C24 calculates the calculation range programmable controller CPU checksum 3 User frame registration status storage area Addresses 205 to 210 The registration status of user frames to the Flash ROM is stored as the values shown below The contents of each area that indicates the registration status are shown below The contents of the area are indicated in one user frame No 1 bit form Example User frame No 1015 3F94 registration status User frame No 1000 8 registration st atus i H Buffer memory L i Address b15 to b8b7 to bO 0 Not registered 2054 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 1 to 030Fu 1 Registered 2064 010 01010 011 1 010 0 010 0 111 to 03034 2114 010 0 010 0 0 0 010 0 01010 0 0 to 00004 User frame No 1199 4 registration status Subsequent bits are spares 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 4 1 Registering user frames The following shows an example of a sequence program when registering user frames in the Q series C24 flash ROM For details on the PUTE instruction see Section 17 7 D
397. on Set the pager receiver designation Notification is not executed Set the telephone number Setthe space to the remainder of the telephone number designation area Set the rxternal line dialing number 0 Set the line type tone Write the data for connection Data No 80024 Registration to buffer memory Data registration complete flag for connection set Modem initialization processing subroutine Set the initialization request signal Initialization request execution flag is set When the initialization complete signal ON the initialization complete flag is set and the request signal is reset When the initialization connection abnormal complete signal ON the error code is read and the request signal is reset 3 COMMUNICATIONS BY THE MODEM FUNCTION M41 M40 P4 RX SET Yt SET M101 Yit x12 istT 4 x13 NO H0 H221 Y11 X12 RST Yu X13 RST M42 RET P51 SMOV TO N02 D51 D56 D150 D151 0152 M92 MO I 4 OUTPUT M150 M102 M150 151 M155 M156 M156 M155 M92 M53 RET D160 K2 D163 M91 G INPUT M160 M103 Line connection processing subroutine Connection request signal is set Connection request execution flag is set When the connection in progress signal ON the connection complete flag is set and the request signal is reset
398. on for the CPU module used 7000 or higher User s Manual Basic Program example X51 A program that reads registered data of the user frame having registration number 3E8H to devices D4 and later When the input output signals of the series C24 are X Y80 to X Y9F PLS M60 Read request M60 mov KO 17 H3E8 D2 1 Sets the frame No to be read mov K80 D3 Sets the allowable number of data to be read FHOV KO D4 K40 q Clears the device in which to store the read userframe data 6 GETE U8 DO D4 MO Executes user frame reading Mo e a E M100 1 Normal completion MI ser M101 Abnormal completion 23 17 23 17 DEDICATED INSTRUCTIONS 17 6 G P PRR In non procedure protocol communication this instruction transmits data using a user frame according to the data specified in the transmission user frame designation area Applicable device Link direct device Intelligent function Index JOO module device register Constant Others woa wos uoco Zn Lose ee Setting data device File Instruction code Executing condition Command G PRR zt Jh Setting data Setting data Setby Data type Start I O signal of the module U BIN 16 bit 00 to FE The 2 upper digits of an input output signal expressed in 3 digit Ser e pes bit device number of the local station t
399. on No nth number 2 output designation area addresses B7u 157u When sending a user frame or arbitrary data that does not contain a CR LF designate whether a CR LF will be sent each time a user frame or arbitrary data is sent Buffer memory address 7 157H CH1 side CH2 side 0 Do not send 1 Send 3 Output head pointer designation area addresses B8H 158 Write the head position nth number in the transmission frame No designation area for writing the registration number of the user frame to be sent b15 to bO Buffer memory address 8 O to 100 CH1 side 158 0 to 100 CH2 side 0 No designation 1 Send from the first to to 100 Send from the 100th Transmission using a user frame cannot be performed when the value of the output head pointer designation area is 0 11 39 11 39 11 DATA COMMUNICATIONS USING USER FRAMES 4 Output count designation area addresses 9 159 Write the output count of the user frames to be sent from the position designate in the output head pointer designation area b15 to bO Buffer memory address 9 O to 100 CH1 side 159 0 to 100 CH2 side 0 No designation 1 Transmit 1 frame to to 100 Transmit 100 frames The operation is completed normally without data transmission if the value for the output count designation area is 0 5 Transmission frame No designation area addresses BAH to 110 15 to 1BDu Wri
400. on about errors caused by incorrect data designated by the user see the description in Errors on the next page 2 The Set by column indicates the following e User Data set by the user before executing the dedicated instruction System The programmable controller CPU stores execution results of the dedicated instruction 17 21 17 21 Functions 17 22 17 DEDICATED INSTRUCTIONS 1 This instruction reads data from the user frame in the Q series C24 as designated by Un QCPU Q series C24 b15 to b8b7 to User frame 2 0 B lt B 2 F C D Read byte length E F 2 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the GETE instruction or executing the GETE instruction during execution of another instruction in the same channel Availability of Instruction simultaneous Handling of simultaneous execution execution GETE BUFRCVS SPBUSY UINI 3 Whether the GETE instruction was completed normally abnormally can be checked by the completion device D or status display device at completion 0 1 e Dedicated instructions simultaneous execution error 7FFOu occurs in the dedicated instruction attempted later Available Not available 3 e Dedicated instructions simultaneous execution error 7FFOu occurs in the dedicated instru
401. on version B or later Universal model QCPU or LCPU double quotation of the first argument can be omitted Setting data Setting data data Description Set by Data type Un Un Start I O signal of the module U String 00 to FE The 2 ioe digits of an input output signal expressed in 3 digit Sor BIN 16 bit 5 Head number of the devices that store control data number of the devices that store control data Head bit device number of the local station that turns ON for one scan upon instruction completion System Bit D 1 also turns on if the execution completes abnormally The file registers of each of the local device and the program cannot be used as setting data Control data Setting data Setting range Set by Spo For system Always specify this to 0 0 user The execution result of the UINI instruction is stored Execution result 0 Normal System Other than 0 Error code Specify the execution type Execution type 0 Switch the settings by those indicated in S 3 and later 0 1 1 Return the settings to the GX Developer switch settings GET rarismission Set the CH1 side transmission specifications Refer to 1 specifications setting S 4 Hs communication Set the CH1 side communication protocol Refer to 2 protocol setting CH2 transmission MOS User S 5 EN Set the CH2 side transmission specifications Refer to 1 specifications setting CH2 communication ir
402. onitoring transmission User frame Designate the user frame transmission output count in 11th condition agreement transmission for this block 52 110 x 44th block Tus 0 No designation at constant cycle transmission 0 1 to 100 and notification 1 to 100 Transmission count Designate the data No for connecting the modem function when sending notifications in condition agreement transmission for this block 52 111 connection 0 No designation at data transmission and BB8x to 5 data No constant cycle transmission 80014 to 801FH BB8 to BD5u Data No for connection flash ROM 8001 to 801 Data No for connection buffer memory 1 For the LJ71C24 R2 notification function cannot be used 2 For the LJ71C24 R2 use the modem function to designate the data No for connecting when executing the constant cycle transmission 3 For the LJ71C24 R2 use this block to designate the data No for connecting when executing the condition agreement transmission 17 10 17 10 17 DEDICATED INSTRUCTIONS Canceling the programmable controller CPU monitoring Set by Device Item Setting data Setting range 1 S2 0 Designate o Use Stores the result of execution upon completion of an instruction Completion status System 0 Normal Other than 0 Error code Designate the request content S2 2 Request type User 3 Cancels the programmable contr
403. ons Precautions sss 8 8 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 1 to 9 22 9 1 User Frame Types and Contents During COMMUNICATION 9 1 9 1 1 User frames to be registered and used by the user ssssssssssseeeeenene 9 1 9 1 2 Default registration frame read only sse nennen 9 9 9 2 Transmission Reception Processing Using User Frame Register Data 9 11 9 3 Precautions when Registering Reading Deleting and Using User Frames 9 15 9 4 Register Read Delete User Frames sse nennen rennen 9 17 9 4 1 Registering user frames A TA 9 20 9 4 2 Reading user 9 21 9 4 3 Deleting user frames 2 iiie tede detiene dee due 9 22 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 1to 10 9 10 1 User Frame Data Communications Function eese nemen 10 1 10 2 User Frame Types and Registration sssssssssssesseeeeeeeennene nennen nnns 10 2 10 3 User Frame On Demand Data Transmission and Buffer Memory 10 2 10 4 On Demand
404. onversion during transmission and data immediately before the conversion during reception Example When communicating using an arbitrary format of the non procedure protocol i Head data Send Arbitrary data section Buffer memory transmission area reception area H L Transmission data count Receive data erm count 1 1 4 23 0 2 3 E A Bc l Conversion 314 324 30 324 33 10 141414241434 Receive 1 1 1 1 1 1 12 1 For 41 Transparent code Additional code For 104 Delete Additional _ Transmission data receive data The data count is word units 12 1 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 2 Registering Transparent Codes and Additional Codes To control transparent codes and additional codes for data to be sent received with the non procedure or bidirectional protocol it is necessary to perform settings in the Q series C24 prior to data communication The following explains the registration of transparent and additional codes 1 For each interface 10 combinations and one combination of transparent codes and additional codes can be set for transmission and reception respectively 2 Transparent and additional codes are registered on the GX Configurator SC s Transmission control and others system setting screen If additional data code is received during data reception the Q seri
405. oring Function Settings Settings for the communication data monitoring function can be made on the Transmission control and other system setting screen of the GX Configurator SC or by the sequence program 1 GX Configurator SC setting for the communication data monitoring function The setting items for the communication data monitoring function are shown below See 2 for setting details Transmission control and other system setting screen CH1 Transmission control and others system setting C x r Module information Module type Serial Communications Module Start 1 0 No 0000 Module model name QJ71C24N Setting item Setting value Send Recv data monitoring designation INo monitor Monitor stop Action for buffer full Continue Stop by Timer 0 error Continue Monitor buffer head address Monitor buffer size The following items are effective for non procedure bidirectional protocol Transmission buffer memory head address designation Buffer memory length designation Receive buffer memory head address designation Buffer memory length designation Transmission transparent code designation 1st HO0000 No transparent code Others bO b7 Transparent code value HOO HIf b8 bf Additional code value HO1 Hff r Flash ROM setting Details Write to File save pim Select input No monitor Monitor stop Monitor start Read from i GE File read Make text
406. ose for receive data that is stored in the buffer memory s reception area as follows Codes stored in the Receivable codes reception area Receive transparent code Additional code 01H to FFH Delete designation section Transparent code 30H to 39H OH to 9H Data length data section 41H to 46H AH to FH 12 18 12 18 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 6 2 Example of data transmission The following shows an example of data transmission 1 When the send transparent code designation is set to Enable and the ASCII BIN conversion is set to Disable Additional code 10H DLE transparent code 02H STX 1st group Additional code 10H DLE transparent code 03H ETX 2nd group Transparent code 2nd group External device side Additional code 2nd group Data i Data section N Jlength Q 00044 1 i Programmable controller CPU side 101 C L 1 1 1 11024 B E 0003H R F 05H04H00H10H02H1 1H41H42H10H03H00HODHOAHB4HOOH 1 1 I 1 1 1 1 D L E Transparent code 1st group Additional code 1st group Transmission command x50 Programmable controller CPU BIDOUT Data length transmission data count Excluding additional codes For word unit 0004 Completion device Mo fn M j Abnormal For byte unit 0008 Status display device
407. owing the first frame to the frame preceding the last one Except the additional code data of the transparent code designation shown in Chapter 12 When transmitting receiving Calculation include everything from the head of the message to the frame preceding the last one Except the additional code data of the transparent code designation shown in Chapter 12 Example 1 For register code FFH 04H 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 1 Q series C24 processing corresponding to register codes FFH and 00H The following uses an example to describe the processing performed by the Q series C24 when it receives a user frame part corresponding to register codes FFH 00 Assume that a user frame containing the data codes 02H FFH 00H and 3BH was set as receive user frame No When the Q series C24 receives the 3 bytes of data STX arbitrary data 1 byte it processes them as if user frame No 3EAH was received The Q series C24 does not check the 2 bytes described above Receive data code 02H 31H 3BH 41H 42H Check If the 02H and data parts match they are processed as if user frame No mentioned above was received 2 Transmission reception data corresponding to register codes FFH and 01H The Q series C24 transmits and receives the user frame part corresponding to register codes FFH and 01H by representing the station No set in the GX D
408. p 5 4 The master station that transmitted the permission granted response and the slave stations that did not obtain line usage right check the line usage time of the slave station that obtained the line usage right and ignore receive data other than that addressed to their local station If the line usage time exceeds the maximum communications time the external devices perform the processing of step 7 5 After data communications are complete the slave station that exchanged data with the programmable controller CPU transmits a communications complete report to the master station A message structure example is shown in 6 Slave stations that do not communicate data with the programmable controller CPU check if a communications complete report was transmitted and do not communicate data with the master station during that time 14 10 14 10 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 11 6 The master station that received the communications complete report transmits a response to the slave station that transmitted the communications complete report Example Massage of5 1 External device of 55185 lal x2 1 Command ZY is a communications H o slave station to 985 222 28 complete report command for description eSoleas perform the 2999 8 purpose The user should select the communications EU ee 8 T communications complete report command comp
409. pecifications The transmission specifications on the Q series C24 side for use of the modem function are as shown below The transmission specifications between series C24 and a modem TA local station Q series C24 that are not provided in this table are shown in User s Manual Basic QJ71C24N QJ71C24N R2 QJ71C24 QJ71C24 R2 QJ71C24N R4 LJ71C24 LJ71C24 R2 Modem function Available Not available Interface that can use the modem function RS 232 Linked operation between CH1 and CH2 of the Q 7 Not available series C24 Communication method Full duplex communication Synchronization method Asynchronous method 1200 2400 4800 9600 14400 19200 28800 Transmission speed Unit bps 38400 57600 115200 selectable Start bi pono x Wn a c Data bit Data format BERT Oo bit 1 On 0 Off Stop bit Parity check On odd even selectable Off Error detection Sum check code On Off RS CS control not control selectable No procedure protocol Available UN Bidirectional protocol Available Data communication MC protocol Available Pre defined protocol Not available Line connection Q series C24 modem 1 When the first five digits of the serial No are 03042 or earlier the transmission speed cannot be set to 115200 bps for connection between the Q series C24 and the GX Developer via a modem 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 2 Specification of connectable modems TAs terminal adapters
410. pecifications and line status Modem connection and disconnection time Depends on the modem specifications line specifications and line status Modem initialization time Depends on the modem specifications 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 3 To monitor the programmable controller CPU the series C24 reads monitoring information device information programmable controller CPU status information from the programmable controller CPU at time intervals set by the user 1 Since the Q series C24 reads the monitoring information device data programmable controller CPU status at the time of the next programmable controller CPU END process after the cycle time elapses make the cycle time as long as possible The following should be considered if the cycle time is short The scan time of the programmable controller CPU is longer and the number of scan cycles has increased The increase in the processing time of the Q Series C24 programmable controller CPU monitoring function has increased causing an increase in the processing time of other data communication functions The load on the external device has increased 2 2 4 Timings of transmission and notification of monitoring results to the external device Constant cycle transmission Cycle time Sequence program The following explains the timings for the transmission and notification of the programmable controller CPU monitoring results
411. pends on the TA in use Hayes AT command SI SO control None Communication method Bas T EE bit Data format bit Match series C24 1 2 Parity bit bit 1 Some TAs may transmit one character as 10 bits Check the TA specifications when setting the Q series C24 transmission specifications 2 Some TAs may switch the communication rate following the start of data communication Since the Q series C24 cannot switch the communication rate set the TA side so that its communication rate does not switch 2 When using a TA whose DR terminal signal is set by a switch set the DR terminal TA output switch level to high When using a TA whose DR terminal is set by a software write the command that turns on the DR terminal into the data for initialization Set the Modem initialization time DR signal valid invalid designation to Invalid during modem function system settings with GX Configurator SC 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 3 Compatibility with the QCPU remote password function This section explains the Q series C24 data communication for the QCPU remote password function Refer to Section 3 1 1 for an overview of the Q series C24 check function for the QCPU remote password The remote password function is a function that has been added to the QCPU as a means of preventing improper access such as destroying a program or data from an external device However this function canno
412. port Object module Sendpacket HEX Mill v 30 31 31 30 31 30 31 30 30 30 31 30 30 31 1F 45 ASCI 0 0 0 1 0 0 a SIE TFT TTE ASCI 0 2 a d RS signal ER signal DR signal CS signal CD signal Reception error SS s lt gt Error Display Ovenun error The project name for matching ja Communication test Parity error z Framing error Transmission receive packet details display Transmission receive packet list display This section describes the communication data monitoring by the sequence program 16 1 16 USING COMMUNICATION DATA MONITORING FUNCTION 16 1 2 Communication data monitoring operation The following describes the communication data monitoring operation When using the communication data monitoring function the total 1 2 transmission speed of the two interfaces should not exceed 115200 bps The communication data monitoring function is effective when the communication protocol is assigned to OH to 9 1 Monitor start 16 2 a b c 1 Monitor data area Default address 2602 to 32FFH 3302H to 3FFFH is not cleared to 0 During monitoring a b Monitor start instruction 0001H is written in the communication data monitoring specification area Address 2018u 2118u Set by user By the monitor start instruction the monitor da
413. r the PRODUCT shall be used in conditions 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 Nuclear Power Plants and any other power plants 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 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 Aircraft or Aerospace Medical applications Trai
414. r data and the data contents that are transmitted and received Dat tents that are t itted and Default registration frame No Register data code Register byte Frame byte elis tst nt ived Hexadecimal decimal 1st byte to nth byte count count data contents Data codes shown at the BE m ETE ra For variable data designation 100 089 1 w Ef 101 257 i Data codes shown at the left Data codes shown at the Data codes shown at the left 1034 259 10H 02H 1044 260 10H 03H 1054 261 004 FEH 2 1064 262 004 004 FEH 3 3 5 DLE STX DLE ETX 2 Data codes shown at the left 3 Data codes shown at the left 2 ETX sum check code 1 4 ETX sum check code CR LF 1 2 2 108 264 F11 OAH 1094 265 03x 1 FFu FOH FFu F1H Ears Sum check code 1 FFu 4 FF FFu 7 FFu FFH Register code FFu data 1byte None 3E74 999 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION data sum check code Q series C24 station No etc as part of the user frame The data contents that are transmitted and received and the byte count depend on the code combined with register code FFu See Section 9 1 1 4 for the
415. r each 25 600 601 602 603 K1 D1 D4 2H 8 9 No designation 41 41 No designation No designation Designate No designation 1002u Convert 1 1 00H 03H 2 01H BCH 5 F9u DEH Buffer memory receive data excluding frames and additional codes 6 2 3 When word units are used 6 When byte units are used The diagram below is for when word units are used User frame enable disable designation First frame No designation 1st 2nd 3rd 4th Last frame No designation 1st 2nd 3rd 4th Receive transparent code designation ASCII BIN conversion designation Receive user frame 7 th Number of data received gt To D3 Number of receive data arbitrary data section D10 to D12 To 00 Reads combination of received user frames Sets CH1 to the reception channel Sets the allowable number of receive data to 6 INPUT U8 Di D10 MO Executes reception SET M100 Sets the normal completion flag SET M101 Sets the abnormal completion flag 13 7 13 7 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 4 2 Example of data transmission The following shows an example of data transmission 1 Example of arbitrary data transmission External device side
416. r the user frame No and the unit of the length of data to be transmitted which have been registered on the User frame registration screen Transmission control and others system setting screen MC protocol system setting screen gt nt Setting Registration screen Setting item Remarks value Transmission control and others system setting screen Word byte units designation 0000 On demand buffer memory head address 0400 designation On demand data length designation 0000H user frame Last frame No designation 1st 0401 designation Last frame No designation 2nd 0000 No designation Message wait time designation 0000 2 First frame No designation 1st 0002 MC protocol system setting screen On demand _ First frame No designation 2nd 10 8 10 8 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 3 Program example The following program example shows the transmission of on demand data using the on demand function Designate two words of transmission data with the ONDEMAND instruction The data for the user frame section of on demand data to be sent is the registered data for the user frame No that was registered with GX Configurator X53 Be is M50 On demand transmission instruction M50 DO Sets the transmission channel to the CH1 side MOV KO Dt MOV K2 D2 Sets the transmission data count to two words MOV H1234 010 Sets the transmitting data in
417. r to use the modem function It becomes possible to carry out all kinds of communications when the modem TA is initialized Start Determine the configuration of the system See Section 3 2 and 3 3 Verify the series C24 specifications See User s Manual Basic Y Installation to the base unit Suppling power to the Q series C24 loading station Unit test of Q series C24 See User s Manual Basic After the unit test turn off the power supply to the Q series C24 loading station GX Configuration SC Y Initialization of the modem TA modem function system setting See Section 3 4 5 User s Manual Basic y Connecting the Q series C24 and modem TA After setting the modem TA switch connect it with the included RS 232 cable or any designated cables Y Suppling power to the modem TA Supplying power to the series C24 loading Supply power from the modem TA side station y MVA Setting and registration with GX Developer Transmission setting Parameter setting Switch setting of Q series C24 PATE d RS OFF should be set of the Q series C24 Ing om to QCPU Communication protocol setting set accordingly Station number setting 0 to 31 Registration to QCPU Write to PLC See User s Manual Basic Initial setting series z Mie See Section 3 4 2 for setting the modem
418. ransmission result other than 0000 CR LF output 00004 CR LF output 00004 Output head pointer 00011 Output head pointer 00014 Output counter 00054 Output counter 00054 17 DEDICATED INSTRUCTIONS 17 7 G P PUTE This instruction registers a user frame Applicable device Link direct device Intelligent function Index JOO module device register Constant Others 5i woa OE woa voeo Zn 6 sg o ce Setting data intemal device device File Instruction code Executing condition G PUTE Command GP PUTE f GP PUTE Setting data Setting data data Description Set by Data type Start I O signal of the module U BIN 16 bit 00 to FE The 2 upper digits of an input output signal expressed in 3 digit icd S Head number of the devices that store control data User puse System Povie rame Dovie rame name S2 Head number of the devices that store registered data Head bit device number of the local station that turns ON for one scan upon instruction D completion D 1 also turns on if the execution completes abnormally Command System The file registers of each of the local device and the program cannot be used as setting data Control data Setting data Setting range Setby Designate whether to register or delete the user frame having the Register delete number designated by S1 2 RUM 1 3
419. ransmit the data 3 After data transmission is complete turn off the RS signal 4 Ifthe CD signal is turned on during data transmission terminate data transmission and turn off the RS signal and perform the data receive processing Simultaneous transmission generated 5 After transmission from the external device is complete transmit the data terminated at step 4 from the beginning or from the last data transmitted 2 The data size set to Simultaneous transmission priority non priority by GX Configurator SC is not transmitted 2 Transmit from the beginning or from the data transmitted immediately before transmission was terminated according to the contents set to Retransmission time transmission method by GX Configurator SC When using the DTR DSR transmission control function described in Chapter 7 transmit data from the Q series C24 to the external device as shown below in both cases a and b above When the series C24 DSR signal is turned OFF terminate data transmission When the Q series C24 DSR signal is turned on after data transmission was terminated restart data transmission transmit from the terminated data 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 8 3 Changing the Communication System To change the data communication mode from full duplex communication to half duplex communication registration on the GX Configurator SC s Transmission control and others system s
420. rary data area User frame receive format designation 1st Format 0 2nd Format 0 3rd Format 1 4th Format 1 Exclusive format 1 received data count 1st 2nd 3rd 4th Reads combinations of user frames received Sets CH1 to the reception channel Sets the allowable number of reception data to 6 Executes reception Sets the normal completion flag The illustration below is for byte unit Arbitrary data area First frame Correspond to register No 15x X83 1 eo i E i S 2 MO EE Abnormal 5 4 1 amp l completion E MM Yr B5 1 o H Normal completion 8 MEME i YES NO R 120H 40024 1 scan 1214 Disable 600 024 00221 6018 00H 224 2020 2021 2022 2023 1 2024 2025 2026 2027 2 Buffer memory FROMP H8 25 Do Ki MOVP Ki Di MOVP K6 D4 G INPUT us 01 010 MO Ml SET M100 ul M101 Sets the abnormal completion flag 11 31 11 DATA COMMUNICATIONS USING USER FRAMES 11 3 3 Application example for data reception using a combination that does not specify the first frame In the description of this program example conditions for data reception using a user frame are as follows 1 The Q serie
421. re handled in data communication using the non procedure or bidirectional protocol Transparent code One byte data for transmission control Additional code During transmission one byte data added preceding the transparent code and additional code data During reception one byte data deleted the immediately succeeding one byte data is processed for reception 12 1 Handling the Transparent Code and Additional Code Data External device side The following explains how the Q series C24 handles transparent codes and additional codes during data communication using the non procedure or bidirectional protocol The range of additional code data that is added or deleted is explained in Sections 12 3 and 12 5 1 During data transmission Additional code data is added immediately before the transparent code and additional code data set for transmission Example Transparent Buffer memory code Transparent code Additional code Send During data reception When additional code data set for reception is detected the additional code data is removed and the immediately succeeding one byte data is processed for reception Example Arbitrary Buff uffer memory Additional code Arbitrary Receive code During data communication using the ASCII BIN conversion The handling of transparent codes and additional codes is done for data after ASCII BIN c
422. reception by the external device side Device information programmable controller CPU status information arrangement MELSEC Q L MELSEC Communication Protocol Reference Manual Arrangement of data in the user frame section to be sent Chapter 10 c When sending the monitoring results as data during constant cycle transmission the entire block portion of the monitoring target device information and programmable controller CPU status information is transmitted in batch mode 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION d When sending the monitoring results as data during condition agreement transmission head data header and end data footer for the on demand function are added to the device information for a block with matched monitoring conditions and the programmable controller CPU status information upon the occurrence of an error The header and footer are added to each clock and then the monitoring result data is transmitted Transmission is performed in the following order the programmable controller CPU status information then the device information registered in the word block and then the device information registered in the bit block When there is communication using the MC protocol form 1 to 4 all of the device monitoring head device number will be converted to hexadecimal ASCII data and sent The same conversion is performed during either constant cycle transmission or condition agreement tr
423. register code combinations that can be handled as variable data and the data contents that are transmitted and received 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 2 Transmission Reception Processing Using User Frame Register Data The following explains how the Q series C24 transmits and receives using user frame register data The Q series C24 checks the transmission reception of following data using registered data 1 Transmission If user frame transmission is designated the user frame is converted or not converted from ASCII to BIN data and transmitted depending on the data communications protocol ASCII BIN conversion designation and user frame No designation based on the following data as the send data of the given part 1 Register code 01H to 1 byte data register part Q series C24 transmission is based on the register code 01H to FEH data a Example Register the data codes 03H OD and OAH as user frame No 3E8H When user frame No 3E8 is designated during data transmission if ASCII BIN conversion is disabled the Q series C24 transmits the data codes 03u ODu OAH ETX CR LF as the send data of the given user frame part If ASCII BIN conversion is enabled the Q series C24 converts each of the data above to 2 character ASCII code data and transmits Part that designated user frame f No 3E8x Added by the Q series C24 When ASII BIN conversion dis
424. ries C24 QC24 N 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 3 Precautions when Registering Reading Deleting and Using User Frames The following shows the precautions which should be observed when registering user frames and using registered user frames to transmit data to and receive data correctly from the external device 1 Precautions when registering reading or deleting user frames a User frames can be registered using one of the following methods However an user frame to be registered to the flash ROM could be registered by the utility package GX Configurator SC dedicated to the Q series C24 as much as possible 1 2 3 Registering via the utility package GX Configurator SC for the Q series C24 Registering with the dedicated instruction PUTE from the programmable controller CPU Registering from an external device with command 1610 through communication using the MC protocol The following settings are required when registering or deleting user frames 1 2 Switch setting via GX Developer Set the setting modification to Enable in the transmission setting Setting via GX Configurator SC Set the flash ROM write allow prohibit setting to Allow on the monitor test screen To set from the programmable controller CPU write 1 in the following buffer memory at the startup of the Q series C24 when the ready signal rises Flash ROM write allow prohibit designa
425. rily list the data following the head data of each message according to the user specifications Example Head data Arbitrary contents A o o o source station No External device 1 station No 1 RE 4 o m o E 3 o Transmission destination station No Transmission Message wait S a d 1 43 1 42H 5 32 43 444 source station No External device 2 station No 1 Transmission destination station No Transmission RM SIT Arbitrary contents Head data Correspond the message structure for general reporting to all the other external devices except programmable controller CPU stations using unused station numbers or a message structure different from the Q series C24 control procedure format 14 5 14 5 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 3 Examples of Procedure for Data Communications with the Programmable Controller CPU The following uses examples to describe the procedure when communicating data with a programmable controller CPU by interlocking the external devices 14 3 1 Sequential data communications between external devices and the programmable controller CPU The external devices sequentially obtain the line usage right and communicate data with the programmable controller CPU based on their station No Example Time gt Station No 1
426. ring in the programmable controller CPU monitoring 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION g Monitoring device head device No read point Number of registered points When performing device data monitoring or transmission designate the device range for each block for the number of blocks designated by setting item e number of registered word blocks and number of registered bit blocks The target of device data monitoring for condition agreement transmission is the head device for each block Word device designated block Head word device for one word Bit device designated block Head bit device for one bit 1 The monitored device is the item that indicates the target device of the corresponding block and designated with the codes listed in Section 2 2 2 4 2 The head device is the data that designates the head of the target device range for the corresponding block 3 The read point is the item that indicates the target device range for the corresponding block which designate points from the head device No The bit device designates points in word units 1 point 16 bits 4 The methods for designating these data are the same as the designation methods used when reading from or writing to the device memory which are described in the MELSEC Q L MELSEC Communication Protocol Reference Manual When the user performs the programmable controller CPU monitoring registration the device will designat
427. ring data registered from the Q series C24 is not sent after the CSET instruction is completed normally and the designated cycle time elapses check the programmable controller CPU monitoring function execution result buffer memory 2205 2305 to check the errors and take corrective actions 17 14 17 DEDICATED INSTRUCTIONS Program example 1 A program that registers the programmable controller CPU monitoring The following example shows how to register the programmable controller CPU monitoring and send the monitoring results from the interface on the CH1 side The following registration is done to send the contents of MO to M15 and D100 to D109 to the external device on a constant cycle cycle time is 3 min When the input output signals of the Q series C24 are X YOO to X Y1F X24 P PLS Converts registration command to pulses 00 Sets execution type Sets request type programmable controller Hoy pe CPU monitoring registration K2 03 Sets cycle time unit to minutes nov ka 04 Sets cycle time to 3 minutes dw D5 Sets the monitoring function to constant cycle transmission yov 06 Sets the means of transmission to data transmission 07 Sets the output head pointer Kz D8 Sets the transmission count of the user frame SET M31 Sets data set complete flag 1 010 Sets the number of registered word blo
428. rity bit Even odd parity Stop bit Sum check code Write during RUN Allowed Setting modifications Allowed Prohibited 15 6 15 6 15 SWITCHING THE MODE AFTER STARTING K2 The setting value of the communication speed m Communication i it positi Communication speed post b i5tob8 b8 b15 to b8 Transmission speed of 230400 bps is available for only CH1 of the QJ71C24N R2 R4 and LJ71C24 R2 When connecting external devices to both of two interfaces the total of the communication speed should be 115200 bps of less 230400 bps or less the QJ71C24N R2 R4 When connecting an external device to either of two interfaces the maximum of 115200 bps is available for the interface a maximum of 230400 bps for the QJ71C24N R2 R4 or LJ71C24 R2 In this case set 300 bps for the other interface to which no external device is connected Remarks Set to the interface for which GX Developer connection is set in the switching mode number designation The communication speed set on the GX Developer is applied The programmable controller CPU must also be aware of the following I O signals for handshake and buffer memories when the mode is switched from an external device Mode switching in progress signal X6 XD Switch setting error mode switching error storage area address 203H 15 7 15 7 15 SWITCHING THE MODE AFTER STARTING
429. rmats for the serial communication modules which is used to perform ASCII data communication by MC protocol QnA compatible 4C frame Format 5 This is the same message format as the communication frame using the protocol for the QnA series serial communication modules QnA compatible 4C frame Format 5 QnA extension frame Format 5 MELSEC QnA A series modules with functions other than I O functions such as A D and D A conversion Special function module Data name when the fixed format portion of messages to be sent or received between serial communication module and an external device is registered in the module and used for sending and receiving data The contents of a user frame data should conform to the specifications of the external device User frame The data array of the head and tail sections of a message transmission control code serial communication module station No sum check fixed data etc to be sent and received is registered in the serial communication module before use User frame is used in MC protocol on demand functions and data communication functions which use the non procedure protocol MEMO 1 OVERVIEW 1 OVERVIEW 1 1 Overview 1 This manual explains special functions of the MELSEC Q L series C24 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 Th
430. rogram that sends arbitrary data and the first to fifth user frames registered in the transmission frame setting When the input output signals of the series C24 are X Y80 to X Y9F Transmission instruction X50 HAAN ris N50 1 M50 X9E X9F H3F2 D5 1 1 H3F3 06 1 1 1 1 013 1 jwv Hi 014 1 Sets the output head pointer Sets to no CR LF output K4 Do 1 H1234 D1 1 Sets arbitrary transmission data H56AB D2 1 DO K3 Sets the number of transmitted data Sets the transmission user frames in D5 to D9 H8001 D7 H8000 D8 H41B 09 HO D10 1 5 K6 Sets transmission frame No in the buffer memory vov K1 D11 Sets CH1 to the transmission channel KO D12 Clears the device in which transmission results are stored H5 D15 Sets the output counter G U8 011 MO 1 Executes user frame transmission 1 t SET M100 1 Sets normal completion flag 1 DO D1 D2 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 17 27 M101 1 Sets abnormal completion flag Normal end Abnormal end Send data count 00044 Send data count 00044 Send data 1855 Send data Hos 1856 Transmission frame No O3F2u Transmission frame No 03F2u 03F3x 03F3x 80014 80014 80004 80004 041Bu 041 0000 0000 Interface No 00014 Interface No 00014 Transmission result 00004 T
431. rogram using the on demand function cannot be performed 3 The data transmitted by one external device is received by all the other external devices including the external device that transmitted the data The send data from a programmable controller CPU is also received by all the external devices Therefore it may be necessary for devices that received data not addressed to them judged by station No in the message to ignore the receive data At the programmable controller CPU Q series C24 also ignores the receive data other than that addressed to it 4 Connect to multiple external devices and connect the terminating resistor as described in User s Manual Basic 14 1 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 2 5 When communicating data by using an m n system configuration designate the following station number at the Station No and Local station No items in the command message to be transmitted from an external device 1 When accessing the programmable controller CPU 9 Communications using Communications using QnA compatible 2C 3C 4C frame A compatible 1C frame Station No of Q series C24 to be passed through Station No described in Station No Contents of the data designation items of each frame in the MELSEC Q L MELSEC Communication Protocol Reference Manual Local station Station No of access source Designation unnecessary No e
432. rogrammable controller CPU b The following describes the Q series C24 receive processing using register data 1 Programmable controller CPU Reception data read request 2 c The Register data code 01H to 1 byte data register part The Q series C24 receives and checks if the received data is data of the same code 01H to as the registered code Example Register the data codes 03H OAH as user frame No 3E8H When user frame No 3E8u is set as data receive the Q series C24 receives and checks data codes 03H ODu OAH ETX CR LF as the receive data of that user frame part Arbitrary data area Q series C24 A B 41H 42H 1 2 31H 32H 3 33H 4 34H 12341 89 34H 12H ABH 89H Buffer memory When the Q series C24 receives Receive data the data it performs a Reception storage area data read request to the programmable controller CPU 1 Register data code FFH 00H to FFH 2 byte data register part The Q series C24 receives and checks if the received data is variable data corresponding to the combination of the register codes FFH and OOH to FFH For example if a sum check code is registered the Q series C24 calculates the sum check code from the receive data and checks if it is the same as the received sum check code If the two codes are not the same the Q series C24 performs error processing If the Q
433. s When the CS signal is off data transmission from the Q series C24 is interrupted 2 When reception data 1 The Q series C24 side reception capability is notified to the modem TA by the on off of the RS signal 2 When the RS signal is on the Q series C24 can receive data Start continue data transmission from the modem TA to the Q series C24 When the RS signal is off the Q series C24 cannot receive data Cancel data transmission from the modem TA to the Q series C24 3 The on off of the RS signal is controlled by the following conditions of the Q series C24 ON OFF control of the RS signal Performed when the OS area for reception data storage in the Q series C24 becomes 64 bytes default or less OFF ON control of the RS signal Performed when the OS area for reception data storage in the Q series C24 becomes 263 bytes default or more Modem function error code storage area address 545 221 1 Stores the error code when an error occurs during the modem function or abnormal signal such as the initialization connection abnormal completion signal X13 turns on 2 Refer to User s Manual Basic for the error codes m Modem function sequence status storage area address 546 222 1 The current status during use of the modem function is stored as a number 2 See Section 3 4 1 for storage values for the modem function sequence status when using the modem 3 COMMUNICATIONS BY THE MODEM FUNCTION
434. s possible RS 51 Turned ON OFF by the Q series C24 as shown below When data is transmitted from the Q series C24 this signal is turned ON When transmission is complete turn this signal OFF CD signal Turned ON OFF by at the external device as shown below When data is transmitted from the external device this signal is turned ON When transmission is complete turn this signal OFF The following describes the half duplex communications data transmission and reception timings by Q series C24 CD signal and RS signal 1 Timing when transmitting data from external device Transmit data by controlling the Q series C24 CD signal according to the simultaneous transmission priority non priority designation registered in Transmission control and others system setting screen of the GX Configurator SC a When Q series C24 is designated priority Terminate data Retransmission D LI transmission External device Data A ata Data B Programmable controller CPU Since the Q series C24 has priority it continues to transmit even if the DC signal is turned ON Store this data at the external device SD Send Data RS Send Request CS Send possible gt CD Receive Carrier Detect The Q series C24 ignores the receive data 1 gt RD Receive Data 1 When transmit data check the RS signal If the R
435. s C24 I O signal The series C24 is installed at QCPU I O signal addresses X Y80 to X Y9F 2 Q series C24 interface used in data communications with the external device The Q series C24 CH1 side RS 232 interface is used 3 Data to be registered on the GX Configurator SC Transmission control and other System settings screen and Non procedure system settings screen used for data communication using a user frame Change default values for the items listed in the table below Use default values for other items Buffi dd to sti Set contents suelen uo etus Remarks registration value Word byte units designation Word byte The unit is set to Word in the example Specify as follows Receive transparent code designation Yes Additional code 10 DLE Transparent code 02 STX ASCII BIN conversion designation Do not convert Select Do not convert in the example Received data count 6 to 511 Set according to the example Receive complete code User frame use control designation ADH AEu to 1 Refer to the illustration provided in a of this section First frame No designation 1 Last frame No designation 1 2 to 5 User frame receive format designation Format 0 2020H to 2023H Refer to the illustration provided in a of this section 2024u to 2027H Specify Format 0 for a combination that does not specify the first frame Exclusive format 1 received data count designation
436. s of data in the 8 25 E arbitrary data section 9 t 2 Programmable aS 58 i ransmission area controller CPU side 5 ig tt 012 1234 66ABH sent as is Wc Fog 1 i 1 bog TT OAH 1 Olh 3BH 54H 4Fui 54H 414 404 3BH 20 O1H 34H 12H ABH 56H 03H 37H 4 byte units in the left 9 ee 1 1 1 1 i i diagram A N t A A E d Redstr tlon No ofthe 2 8001 8000 41 9 First specification Second specification Third specification Fourth specification Fifth specification corresponding user frame Not transmitted T B6u Sending User frame No being transmitted Transmission instruction OwOther than 9 Do not transmit i Programmable B7H Qu CRILF output designation controller CPU 1st 1 Output head pointer designation H Completion device ON 9 Output count designation 4 Abnormal 5H Status display device y Completion BAH Transmission frame No designation 1st at completion i Normal 2 completion 2nd P 3F34 2nd OP 1 One scan BCi 3rd 8001 BD 4th 8000 4th 418 5th 6th 6th 3F4n 7th C1 8th 80024 8th 2 9th 11 Yes No Send transparent code designation 1002H C3u 10th i 8003 121 No ON ASCII BIN conversion designation
437. s of transmission to data transmission Sets the output head pointer Sets the transmission count of the user frame Sets data set complete flag 1 Sets the number of registered word blocks to 1 Sets the number of registered bit blocks to 1 f Registers the devices for D100 to D109 as the first block 2 0 Registers the devices for MO to M15 as the second block 4 Sets data setting complete flag 2 Executes programmable controller CPU monitoring registration Normal completion Abnormal completion b Example of a program for executing programmable controller CPU monitoring cancellation This example shows a program that cancels programmable controller CPU monitoring for the CH1 side interface 1 zP CSET Uo 1 00 0200 i y seT tt 5 2 27 M37 02 35 M36 J Sets pulse command Executes programmable controller CPU monitoring registration reset j Normal completion 1 Abnormal completion 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 4 Precautionary Notes for Using the Programmable Controller CPU Monitoring Function 1 The cycle time will be affected by the following factors Keep these in mind when setting the cycle time 1 When the programmable controller CPU is accessed by a module other than the Q series C24 2 When a data communication function other than
438. s the Q series C24 and external device when half duplex communications is used Connect the Q series C24 and external device based on 1 and 2 below 1 Connect the Q series C24 RS signal to one of the external device half duplex communications signals CS DSR or CD signal 2 Connect the Q series C24 CD signal to one of the external device half duplex communications signals RS or DTR signal 3 The half duplex communications described in this section cannot be performed when an RS 232 and RS 422 converter is used Connection example Q series C24 Cable connection and External device Signal name signal direction Signal name RD RXD RD RXD SD TXD SD TXD DTR ER DTR ER RS RTS RS RTS CD SG SG DSR DR DSR DR CS CTS CS CTS RI CI 8 DATA COMMUNICATIONS USING HALF DUPLEX COMMUNICATIONS 8 5 Half duplex Communications Precautions The following describes the precautions to be observed when using half duplex communications 1 Half duplex communications system configuration and functions Half duplex communications is possible only with a system that connects the programmable controller CPU and external device in a 1 1 configuration Half duplex communications Half duplex communications can be designated cannot be designated External device RS 232 2 Agreement and confirmation between external device and programmable controller CPU Agree and
439. s the user frame No 0 or 1 or higher 1 or higher Last frame No designation 1st to 4th Designates the user frame No 0 or 1 or higher Designates Ou for everything User frame receive format designation Designates Format 0 Designates Format 1 1st to 4th Exclusive format 1 received data count P Designates the data count for the The specified value is invalid 1st to 4th arbitrary data to be received 11 15 11 15 11 16 11 DATA COMMUNICATIONS USING USER FRAMES 2 Initial settings via GX Configurator SC Non procedure system setting screen This section explains the buffer memory when setting various setting data for data reception using a user frame in a Sequence program Numbers in the parentheses indicate the buffer memory address a User frame use enable disable designation addresses ADu 14Du Designate Enable when using user frames to receive data b15 to bO Buffer memory address ADu 14Du Default Write 1H 0 Do not use 1 Use 2 Data communication enable Q series C24 is set 1 1 is written in the user frame use enable disable designation area 2 After the preparation for the data reception using the user frames is completed 2 is written in the user frame use enable disable designation area Q series C24 is set 3 After the value in the user frame use enable disable designation area is changed from 1 to 2 start re
440. sage Transparent code Buffer memory Data length Data section Additional code 10x Transmission data count Transparent code 021 Receive data count Transmission data receive data E 1 1 1 1 05H 10H 02H 00H 124 108024 01 A 2 t 12 13 12 13 12 TRANSPARENT CODES AND ADDITIONAL CODES 3 The following shows the processing steps taken by the Q series C24 when performing communication with the transparent code designation and ASCII BIN conversion enabled Explained above is how the Q series C24 processes communication data when enabling and disabling the ASCII BIN conversion function and or transparent code designation communication function When communicating data to an external device use this information as a reference in the selection of a communication method a Receiving 1 If a receive transparent code is designated the additional code designation data is deleted removed from the arbitrary data section 2 The arbitrary data section is stored in the reception area of the buffer memory If the ASCII BIN conversion is designated the data section is stored in the buffer memory after it is converted to binary code data 3 When the data section of the designated data length is received a receive data read is requested of the programmable controller CPU If the sum check code is set to Enable in the transmission setting via GX
441. se GX Configurator SC or execute the CSET instruction Initial setting before starting data exchange Refer to Section 17 4 Word byte units designation address 96 136 Transmission buffer memory head address designation address A2u 142u Transmission buffer memory length designation address A3H 143n Receive buffer memory head address designation address A6u 146u Receive buffer memory length designation address 7 147 The dedicated instructions are executed based on the values preset in the buffer memory at module startup or those that have been changed by the CSET instruction Initial setting 17 1 17 1 17 DEDICATED INSTRUCTIONS 2 Available devices The following devices are available for the dedicated instructions Internal devices 2 1 File register Constant XY MLFVB TST C DW x1 Word device bit designation can be used as bit data Word device bit designation is done by designating Word device Bit No Designation of bit numbers is done in hexadecimal For example bit 10 of DO is designated as DO A However there can be no bit designation for timers T retentive timers ST and counters C x2 Available devices are given in each of the Constant field 17 17 2 17 2 17 DEDICATED INSTRUCTIONS 17 2 Z BUFRCVS This instruction is used to receive data by an interrupt program through non procedure or bidirectional protocol
442. sed from an external device using the Q series C24 modem function The following is an overview of the QCPU remote password function See Section 3 3 3 for more details a Remote password function The remote password function allows prohibits access to the QCPU from an external device via the following modules Q series C24 Ethernet module Built in CPU of Ethernet port n the case of the Ethernet module the remote password function can be used for data communications connections with an external device For details see the User s Manual Basic for the Ethernet module b Station where the remote password and remote password check are set 1 In the case of a programmable controller system with one QCPU station GX Developer parameter setting Remote password Module subject to the remote password check Q series C24 Remote password 1 1 a fs ee 4 1 1 1 1 External device access source Communication executing the remote password check Communication using MC protocol Communication using the GX Developer 2 Inthe case of a programmable controller system consisted of multiple QCPU stations Set in the QCPU station which is the entrance of the programmable controller system as viewed from the external device the local station QCPU in the diagram below Set in the local station to allow prohibit access to the network System 1 from the external de
443. send transparent code is designated additional code data is added preceding the transparent code additional code data and is then transmitted External device Q series C24 Transparent code designation ASCII BIN conversion designation Buffer memory Data transmission Adding ASCII BIN additional conversion of code transmission data Transmission area data ASCII BIN conversion of arbitrary data section Check receive complete code and received data count Delete Data to be stored Yes iti gt additional in the reception area code 12 5 12 5 1 2 TRANSPARENT CODES AND ADDITIONAL CODES Example When ASCII BIN conversion is not performed Q series C24 Buffer memory transmission area reception area S3 H L js o Transmission data 9 00024 _ _ count Receive data 00 02 count Transmission data receive data device 12 6 Head data Send Delete Additional Addition The data count is in word units External device Communicating in an arbitrary format Head data Send lt 1 l 02s 3An IBC Receive Transparent code For 024 Additional code For 104 Example When ASCII BIN conversion is performed External Communicating in an arbitrary format Q series C24 Buffer memory transmission area reception area 1 Arb
444. series C24 N Registration No 8001H Modem 3 COMMUNICATIONS BY THE MODEM FUNCTION b Modem TA initialization program example An example of the modem TA initialization program on the Q series C24 side by the programmable controller CPU is shown below When the initialization data has been registered from GX Configurator SC or from the programmable controller CPU X12 Connection in progress signal X1E Ready signal X1F WDT error signal MO Accessible flag M1 Data registration complete flag for initialization M30 Initialization enabled flag XIE XIF NO Turns the ready flag ON M1 M3 X10 X12 X13 Y10 F 3 ao Turns the modem initialization x20 enabled flag ON PLS N31 Modem initialization command M31 M30 SET Y10 Sets the initialization request signal M39 Sets the initialization request flag Y10 M3 Sets the initialization completed flag Y10 hooo o H221 D100 KI Reads the error code at initialization abnormal completion RST 10 X27 RST M39 Resets the flag with the clear command RST M3 3 4 6 Line connection 3 COMMUNICATIONS BY THE MODEM FUNCTION This section explains the connection dialing with the partner devices for the purpose of data communication with external devices using the modem functions In case of notification to a pager receiver the line is connected while the notification is being processed The connection processing such as a connection request Y11 to I O s
445. series C24 station No is registered the Q series C24 checks if the received station No is the same as the station No set in the Q series C24 If the station Nos are not the same the Q series C24 processes the data as if normal data was received instead of an user frame Example Register the data codes 03H FFu FOH ODH OAH as user frame No 3E9H When user frame No 9 is set as a data receive frame the Q series C24 calculates receives and checks the sum check code as the receive data of that user frame part Q series C24 removes the user frame data from the received message The programmable controller CPU cannot read this data 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION With a multidrop link if the receive user frame inherent to each Q series C24 is connected to the link in advance the Q series C24 of a given station will store only the arbitrary data area of the message transmitted by the external device to the receive data storage area External device Arbitrary data area JR L F Data used by the external device to indicate the transmission destination Received by the station No 5 Q series C24 CPU C24 1 frame is received at each Q series C24 Last frame S S Data when a receive First frame T e Ar X X C L IRF 5 Station No C24 Q se
446. sh ROM in multiple sets e Modem TA initialization data AT command User setup 30 sets 78 bytes set default value 13 sets Connection data User setup 30 sets 80 bytes set Telephone number of the connection destination and display message to the pager receiver 2 By registering the above data to the Q series C24 ahead of time the modem TA terminal adapter initialization line connection dialing and line disconnection can be performed with ease 3 When the no communication interval time 1 min to 120 min is set the Q series C24 disconnects the line when a no communication condition has occurred for the set period of time following the line connection 3 Communication between a remote external device and programmable controller CPU 1 Data communication can be performed via full duplex communication 2 From the external device to the programmable controller CPU communication using the MC protocol non procedure protocol and bidirectional protocol can be performed 3 From the programmable controller CPU to the external device communication using the MC protocol transmission by the on demand dedicated protocol function only the non procedure protocol and bidirectional protocol can be performed 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 Notification to the pager receiver 1 In order to notify to the pager receiver of the programmable controller system maintenance information the Q series C24 performs cal
447. sing User Frames The following shows an example of a sequence program when sending on demand data including user frames Perform the following settings via GX Developer and registration using GX Configurator SC in advance The sequence program for sending on demand data when performing the following settings by GX Developer and the following registration by GX Configurator SC is the same as the sequence program indicated in the MELSEC Q L MELSEC Communication Protocol Reference Manual The series C24 I O signals are to X Y1F and are sent from the CH1 side interface 1 Switch settings via GX Developer Set the following setting values on the intelligent functional module switch setting screen Setting item Setting value Switch 1 CH1 Transmission setting Set according to the CH1 Communication rate setting external device Switch 2 CH1 Communication protocol setting 00011 MC protocol format 1 CH2 Transmission setting 0000H Switch 3 CH2 Communication rate setting 0000H Not used Switch 4 CH2 Communication protocol setting 0001 Switch 5 Station No setting 0000H Q series C24 station No 2 Registration via GX Configurator SC 1 Registering the user frame to be transmitted To register the user frame data to be transmitted on the User frame registration screen refer to Chapter 9 in this manual 2 Registering the user frame No to be transmitted and the unit of the data length Using the screens listed below registe
448. sing the MC protocol non procedure protocol or bidirectional protocol mW Communication method Performs communication with the partner Q series C24 installed P j full duplex communication Data communication station by modem TA connection using non procedure protocol or aa BS ae Synchronization method bidirectional protocol Station to station communication start stop synchronous Enables the communication between GX Developer and system asynchronous programmable controller via Q series C24 Notification Calls and transmits messages to the pager receiver Line disconnection Forcefully disconnects the line from the connected destination device Flash ROM reading Reads writes registers and deletes the initialization data AT command and data for writing registration and connection from to the Flash ROM in the series C24 according to the request from deletion programmable controller CPU Allows the Q series C24 to execute the remote password check set in the QCPU when there is Remote password check communication from the external device to the Q series C24 using MC protocol or the programmable controller is accessed using the GX Developer After line connection from the GX Developer access to the QCPU from the GX Developer is Callback made possible through line reconnection from the Q Series C24 callback Transmission costs after line connection from the Q Series C24 side are borne by the
449. sing the notification function eeeee 3 8 3 2 3 System configuration when connecting GX 3 9 3 2 4 Precautions for system configurations esssssseseeeeeeeenneneeneenenen nennen 3 10 3 39 opecifICatlons e enema tudin leet ut re a teftc 3 12 3 3 1 Transmission specifications isen on n e bee dt t de e eto rts 3 12 3 3 2 Specification of connectable modems TAs terminal 3 13 3 3 3 Compatibility with the QCPU remote password function ssssssssssseee 3 16 3 3 4 Compatibility with the callback 3 22 3 3 5 List of I O signals for the modem function ssenenenenenenenn 3 31 3 3 6 Buffer iemoby s ii emet eden eo edtleg ad ep ole atn 3 33 3 3 7 Precautions when using the modem function esssseseeeneeeeenen nennen 3 46 3 4 Start up of the Modem Function ccceccecesceeeneeeeeeeeeceeseneeceaeeseaeeseaeeesaceeseaeeseaeeesaeessacessiaeeaeeeseaeessaees 3 52 3 4 1 Start up procedures when communicating data with external 3 52 3 4 2 Initial settings of the serial communication module ssseeen 3 55 3 4 3 Register read delete of the initializ
450. sing user frames 13 3 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 4 Example of Data Communication Using the Non Procedure Protocol This section shows examples of data communication using the non procedure protocol when the following settings registrations are made 1 Settings via GX Developer Perform the following settings on the Intelligent function module switch setting screen Setting item Setting value Switch 1 CH1 Transmission ae ee el Set according to the CH1 Communication rate Communication rate setting external device Switch 2 CH1 Communication protocol setting 00061 Non procedure protocol CH2 Transmission ae LS Switch 3 0000 CH2 Communication rate CH2 Communication rate setting Not used Switch 4 CH2 Communication protocol setting 0000 Station number of the Switch 5 Station No setting 0000 kees C24 1 2 Settings via GX Configurator SC Register the following items on the Transmission control and others system setting Non procedure system setting and Transmission user frame No designation system setting screens For items other than those noted below the default values are used Registration screen Setting item Setting value Received data count designation 0003 Receive complete code designation 0009 Receive user frame designation Enable User frame use enable disable designation Receive user frame designation 8 First fr
451. smission The following shows an example of data transmission 1 Additional code 10H DLE transparent code 02H STX External device side Additional code Q series C24 deletes Head data 1 Transparent code T 41 1 4 34 1015 Nj pe kl For word unit Programmable 0 1 2 3 L T U A p Received byte count excluding additional code 12 2 6 controller CPU side Li RIF For byte unit pog E 1234 Received byte count excluding additional code 12 304 31 32 33 10 02 00 41 42 34 12H ODHOAH 1 1 1 1 1 1 1 1 1 1 1 1 hh Transmission command X60 Programmable controller CPU OUTPUT Transmission Completion device MO data count QN Abnormal Status display device completion at completion M1 1 1 The following diagram is for word unit Normal i completion One scan D3 400 00s 06 l 010 401 1 0 31H 30H 9 0 4 3 0 a 33H 32H 33H 32H 5 12 NULL STX 4034 NULL STX E 004 024 004 024 013 404 42H 41H 424 414 1234 1234 014 405 129 4 120 344 015 LF CR 406H LF CR C ODH 0 Sequence program Buffer memory device memory Transmission instruction x50 DMOVP 33323130 D10 Sets transmission data in D10 to D15 DMOVP H42 4 10002 D12
452. smission resume request CS signal ON to the terminal The terminal then resumes data transmission to the modem when the data transmission resume request CS signal ON is received x2 Modems that turn on the CD signal simultaneously cannot be used b Precautions for selecting a modem 1 When using a cellular phone A modem with the error correction function of MNP class 10 is recommended However note that communication may not be established depending on the line condition 2 Modem setting Set the modem on the Q series C24 side as shown below Modem command Hayes AT command SI SO control None Data format Match the Q series C24 2 gt 3 1 When using different modems the slower communication rate will be in effect 2 Some modems may transmit one character as 10 bits Check the modem specifications when setting the Q series C24 transmission specifications 3 Some modems may switch the communication rate following the start of data communication Since the Q series C24 cannot switch the communication rate set the modem side so that its communication rate does not switch When using a modem whose DR terminal signal is set by a switch set the DR terminal modem output switch level to high When using a modem whose DR terminal is set by a software write the command that turns on the DR terminal into the data for initialization Set the Modem initialization time DR signal valid invalid designation to I
453. smission sequence N Error When code abnormal L H Applicable data range External device side Programmable controller CPU side 1 Data section length Designated transmission data 1 1 The Q series C24 performs the following processing during data transmission reception a When an additional code set for reception is detected during data reception the additional code data is removed and the immediately succeeding one byte data is processed for reception as part of the receive data When transparent code additional code data set for transmission is detected during transmission of a message in response to data reception the additional code designation data is added immediately before and is then transmitted b When transparent code additional code data set for transmission is detected during data transmission the additional code designation data is added immediately before and is then transmitted When an additional code set for reception is detected while a message is being received in response to data transmission the additional code data is removed and the immediately succeeding one byte data is processed for reception as part of the receive data c Data having an additional code that is added or deleted cannot be included in the data length nor will it be used for the sum check code Example When not using the ASCII BIN conversion Additional code Mes
454. so be registered as a one block portion up to 11 blocks can be registered 11 gt Number of word device blocks registered number of bit device blocks registered CPU status monitoring 1 block 960 points gt Total number of all word device block points total number of all bit device block points 1 point 1 word 1 point 16 bits 3 With device monitoring of the blocks for which the word and bit devices are registered the head device of each block becomes the monitoring target 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION Example1 For a block in which 10 points of word devices from D100 to D109 are registered Monitoring target Numeric value stored in D100 Data transmitted Numeric values stored in D100 to D109 Example2 For a block in which two points of bit devices from M100 to M131 are registered Monitoring target ON OFF status of M100 Data transmitted ON OFF status of M100 to M131 4 The word and bit devices that can be designated as the monitoring targets and the device codes that are used to register the monitoring devices are shown in the table below Register the devices using the device ranges existing in the programmable controller CPU Default Specialreley J O erase eee E TUUS pt O x 9 oO meii LE I Latch relay ac Toe O __
455. sponse When setting the remote password in the QCPU the remote password input dialog box is displayed Access to the QCPU Execute line disconnect Line Disconnect Line disconnect processing by the line disconnect screen Line disconnect response L Shows the value stored for the modem function sequence status address 546 221 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 4 2 Initial settings of the serial communication module This section explains the initial settings of the Q series C24 when data communicating with external device remotely notifying a pager receiver and accessing from GX Developer using the modem function 1 Switch settings by GX Developer Data GX Developer access Switch setting by GX Developer Notification For connection to Remarks communication MELSOFT products Set both CH1 and CH2 OFF Communication protocol setting 1to7 1to7 Operation setting OFF Independent operation 5 Data bit setting Parity non parity setting Set according to modem Even odd parity setting TA on local station Transmission Stop bit setting OFF 1 bit ON 2 bits specification Sum check enable disable OFF ON ON OFF Disabled ON Enabled communication setting Set according rate setting Write during RUN enable to system OFF ON OFF Disabled ON Enabled specification Setting modification enable OFF ON OFF ON OFF Disabled ON Enabled Trans
456. strations for initialization storage area address 550 q Registration status of the data for initialization number 9C4u 2500 Registration status of the data for initialization number 903 2515 Registration status of the data for initialization number 9 1 2529 Registration status of the data for connection number 9D4u 2516 226H 1 Stores in Flash ROM the number of data registrations for initialization sent to the modem on the Q series C24 side with the initialization request The number of registrations indicates the number of data for initialization registered to the Flash ROM by the user Data registration status for initialization storage area address 551 to 552 227H to 228 1 2 3 b15 b14 b13 b12 to b2 b1 bO Buffer memory address 551 2274 to 552 2284 0 0 to Stores in Flash ROM registration status for initialization of data for initialization transmitted with the initialization request to the modem on the Q series C24 side The registration status of each data for initialization with registration numbers of 9 4 to 9E1H 2500 to 2529 is indicated in the corresponding bit in the range shown in the figure below The registration of data for initialization is described in Section 3 4 3 E OFF No registration 1 ON Registration exists 3 COMMUNICATIONS BY THE MODEM FUNCTION Number of notification execution storage area ad
457. t PES 0 1 to 100 0 No designation at constant cycle transmission and Condition notification agreement 1 to 100 Head pointer trans Designate the user frame transmission output count in mission User frame agreement transmission for this block 2 20 transmission 0 No designation at constant cycle transmission and 0 1 to 100 notification 1 to 100 Transmission count Designate the data No for connecting the modem function when sending notifications in condition agreement transmission for this block 3 0 No designation at data transmission and BB8u to BD5x constant cycle transmission 8001 to 801 BB8 to 0 5 Data No for connection flash ROM 80014 to 801 Data No for connection buffer memory 17 9 17 9 17 DEDICATED INSTRUCTIONS Setting data Programmable controller CPU monitoring setting The same arrangement as the first programmable controller 2nd to 10th CPU monitoring setting item 2nd to 10th block S2 22 to S2 102 Designate the fixed value when the CPU status monitoring 1 1 5 1 Designate the head pointer of the table designating the user frame number for condition agreement transmission for this User frame S2 109 CPU status c tguthiesd ee MN 0 1 to 100 monitoring 0 No designation at constant cycle transmission User setting Condition and notification Abnormal 1 to 100 Head pointer m
458. t or malfunction e After the first use of the module including a display unit the number of module connections disconnections is limited to 50 times Exceeding the limit in accordance with IEC 61131 2 may cause malfunction e Before handling the module touch a conducting object such as a grounded metal to discharge the static electricity from the human body Failure to do so may cause the module to fail or malfunction Operation Precautions N CAUTION e When controlling a running programmable controller especially changing data program modification and operation status change from an external device such as a personal computer connected to an intelligent function module read the relevant user s manual carefully and ensure the safety before the operation Incorrect data change program modification and status control may cause malfunction of the system mechanical damage or accidents e While set values in the buffer memory are being registered to the flash ROM in the module do not turn off the power to the module and do not reset the CPU module Doing so will affect the flash ROM data and setting to the buffer memory and registration to the flash ROM need to be performed again Also it may cause failure or malfunction of the module Disposal Precautions N CAUTION e When disposing of this product treat it as industrial waste e CONDITIONS OF USE FOR THE PRODUCT e 1 Mitsubishi programmable controlle
459. t receives the response message when trouble in the device that received the message does not return a response message result to the external device When the Q series C24 receives a message from the external device it monitors the programmable controller CPU processing time up to the start of transmission of the response message to the external device When a message was received it monitors the external device processing time up to the start of reception of the response message from the external device The following describes the response monitoring time timer 1 operation lt 1 byte External device Data 1 Data2 Data n 1 Data Programmable i t controller CPU Data receive interval gt depends on the transmission rate etc Monitoring time E Elapsed time reset If on demand data is transmitted before a response message during data communications using a MC protocol the time up to the start of transmission of the on demand data is monitored External Command device message Programmable On demand data Response controller CPU i message Monitoring time 1 1 t Elapsed time reset 1 Q series C24 operation by response monitoring time timer 1 a When response monitoring time timer 1 set to Oms After receiving a message the Q series C24 does not monitor the time up to the start of transmission of a response message to the external device but wa
460. t completely prevent improper access The user should incorporate his her own safeguards when it is necessary to protect the security of the programmable controller system from improper access from an external device The company cannot assume any responsibility for any problems that may arise from system troubles caused by improper access An example of a safeguard on the programmable controller CPU with respect to improper access One example is shown in Section 3 3 6 in which the programmable controller CPU disconnects a line to the external device when the number of times a remote password mismatch is detected exceeds the number set by the user with regard to the Q series C24 remote password check explained in this section 1 Data communication during remote password setting This section explains the use and setting of the QCPU remote password function and data communication between the external device and the QCPU when a remote password has been set a Allowing prohibiting access to the programmable controller from the external device 1 Access allow processing unlock processing To access the specified QCPU the external device performs the remote password unlock processing with respect to the Q series C24 of the directly connected station local station after line connection for the modem function If the unlock processing has not been performed the remote password check performed by the series C24 that
461. t procedure GX Developer Remote password Remote password setting screen Setting screen Remote password settings x Password settings Characters that can be used in password Password 4 characters Numbers 2 2 Special characters r Password active module settings Model name QJ71C24 CM0 0000 raa Necessary setting Mo setting Z Alreadyset Setting completion Cancel Setting item Item name Set data Setting range choices Password settings Enter the remote password to be set in the QCPU 1 4 bytes Select the type of module that checks the remote Model name _ password set in the QCPU module settings Start XY Set the head address of the module that checks the 0000 to OFEOH remote password Conditions No setting required QJ71C24 CMO 1 Consider the following when setting the remote password Avoid using a character string of simple numbers or letters only Mix numbers letters and special characters amp 96 etc Avoid using a character string that represents the user s name or date of birth 1 When using the Q series C24 in a multiple CPU system write the remote password setting in the control CPU of the Q series C24 2 After setting the remote password in the QCPU reboot the QCPU CPU No 1 in a multiple CPU system Reset power reset using the RESET L CLR switch By rebooting the QCPU
462. t program Instruction execution Receive data storage BUFRCVS instruction Data reception 1 When the dedicated instruction is completed abnormally the error flag SMO turns on and the error code is stored in SDO See the following manuals regarding the error code and check the errors and take corrective actions Error codes 4FFFHorless the user s manual hardware design maintenance and inspection for the CPU module used 70004 or higher User s Manual Basic 17 4 17 DEDICATED INSTRUCTIONS Precaution when using the BUFRCVS instruction 1 Use the BUFRCVS instruction when receiving data via an interrupt program 2 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the BUFRCVS instruction or executing the BUFRCVS instruction during execution of another instruction in the same channel Availability of Instruction simultaneous Handling of simultaneous execution execution Available Not available 1 Since the dedicated instructions shown below use a different communication protocol from that for the BUFRCVS instruction they are not used in the same channel e ONDEMAND e CPRTCL 3 The device storing data received via the BUFRCVS instruction must have an area that is large enough to store the maximum size of data received from the external device If an area large enough to store the m
463. t specify set the frame No of a user frame that includes the receive transparent code designation additional code data shown in Chapter 12 as a user frame for data reception using non procedure protocol 11 17 11 17 11 DATA COMMUNICATIONS USING USER FRAMES c User frame receive format designation address 2020H to 2023H 2120H to 2123 In data reception using a user frame specify the reception method for each combination of receive user frames This setting is valid in a setting shown in 2 b when it is set using a combination that specifies a user frame b15 to bO Default On Setting for the first combination t Setting for the second combination o Setting for the third combination 2023u 21234 Setting for the fourth combination Buffer memory address 20204 2120u Format 0 1u Format 1 Specify the reception method For combinations other than those with the first frame only data reception is performed using Format 0 even if Format 1 is specified through the above reception method setting d Exclusive format 1 received data count designation address 2024 to 2027 2124 to 2127 For a combination specifying Format 1 in the user frame receive format designation specify the arbitrary data word byte count size for performing a reception data read request to the programmable controller CPU when the applicable first frame is received Specify this for each combination specifying
464. ta 1 When communicating using bidirectional protocol it stores the error code in the data receive result storage area for the target interface The reception abnormal detection signal does not turn on 2 Changing the transmission monitoring time timer 2 The transmission monitoring time timer 2 is registered on the GX Configurator SC s Transmission control and others system setting screen The transmission monitoring time timer 2 monitors the transmission termination time when the following states are generated When DTR DSR signal control is used and the DSR signal is turned off See Section 7 1 When DC1 DC3 receive control is used and DC3 is received See Section 7 2 When the RS 232 interface CS signal is turned off Refer to User s Manual Basic 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES Criteria when changing the transmission monitoring time time 2 setting Find the transmission monitoring time timer 2 time from the maximum delay time of external device message receive processing or response message transmission processing and the transmission time byte t and change the set value Number of bytes transmitted second Transmission rate number of transmit bits byte Transmission time byte t 1000 ms number of bytes transmitted s n Transmission monitoring time timer 2 Maximum external device processing delay time transmission time byte t X transmit byte count
465. ta can be registered as 1 user frame c User frames can include data for handling the variable data sum check code Q series C24 station No etc shown in 4 as a part of user frames 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION d User frames can be overwritten to the Q series C24 buffer memory The old contents are destroyed e The registration destination for the user frame can be divided into the following usage After data communication has started register the user frames without changes to buffer memory and use Frame No 8 to 4AFn After data communication has started register the user frames with changes to buffer memory and use Frame No 8001H to 801FH 3 Data that can be registered as user frame Up to 80 bytes of data can be registered by combining 1 byte of register code 01H to FEn data and 2 bytes of register code FFH 00H to FFH FFH data a One byte of register code 01H to data This is the register code for transmitting and receiving the register code 01H to FEn data b Two bytes of register code FFH 00H to FFH FFH data This is the register code for transmitting and receiving the variable data Sum check code Q series C24 station No etc shown in 4 as part of the user frame is the register code of the first byte for handling variable data 4 Variable data Variable data is the generic term for the following data These variable
466. ta pointer monitor data size area are cleared to 0 and 00024 is written in the communication data monitoring specification area which starts monitoring 1 Q series C24 is set When a monitor setting error occurs 100FH is written in the communication data monitoring specification area Q series C24 is set Check the monitor buffer head address and the monitor buffer size setting range and perform monitoring again After monitoring starts data of reception transmission receiving error and signal change are stored from the head address of the monitor data area in the order of occurrence When the monitoring data exceeds the capacity of the monitor data area monitoring is continued by writing new data over the oldest data However monitoring may automatically stop according to the settings of the monitor option area Address 2019H 2119H See Section 16 2 2 b CH1 Buffer memory 26001 00034 26014 2602 2603 2604 2605 Oldestdata 2 260000 Monitor data pointer storage area Monitor data size storage area gt Monitor data area 32FFH Default value 16 2 16 3 16 USING COMMUNICATION DATA MONITORING FUNCTION c Each data is stored in the monitor data area using the following timing Data classification Data storage timing Received data When receiving data Transmitted data When transmitting data Receiving error data When detecting receiving errors
467. ta reception een ene eogaenolueee detienen emi 12 17 12 6 2 Example of data nennen nennen 12 19 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 13 1to 13 14 13 1 ASCII BIN Conversion a aaia 13 1 13 2 Settings for ASCII BIN Conversion nennen nnns 13 1 13 3 Performing ASCII BIN Conversion for Data Communicated via Non Procedure Protocol 13 2 13 4 Example of Data Communication Using the Non Procedure Protocol 13 4 13 4 1 Example of data reception cccccccceeeecceeeeceeeeeeeeeeeeceeeneeceaeeccaeeecaeeecaaeesaeeseaeessaeeseieeeeeeeeineesans 13 5 13 4 2 Example of data 13 8 13 5 Performing ASCII BIN Conversion for Data Communicated via the Bidirectional Protocol 13 10 13 6 Example of Data Communication Using the Bidirectional 13 12 13 6 1 Example of data reception sse eene ennt entere 13 13 13 6 2 Example of data transmission sssssssssssssssssseeeee eene nnns 13 14 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CO
468. table below shows the Q series C24 transmission control functions Interface that can 5 Protocol that can be controlled Transmission be controlled Kind of control control function Non TTE 232 422 485 MC Bidirectional procedure Cannot be used meme control PERDOR signal simultaneously with control Ignored DC control DSR control One is selected RS CS signal control o o Normal control The cable wiring depends on whether CD signal control or not control is used With half duplex communications control is necessary DC1 DC3 transmission control c d DC1 DC3 reception A simultaneously with DC code control control 1 DTR DSR signal DC2 DC4 transmission e control EODD One is selected DC2 DC4 reception control O Possible transmission control used Invalid 1 When using full duplex communications with bidirectional protocol data communications refer to User s Manual Basic 2 Refer to User s Manual Basic and check series C24 operation according to the RS and CS signal control contents and CD terminal check designation When the Q series C24 is started DTR DSR signal control and RS CS signal control are enabled 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7 1 Control Contents of DTR DSR ER DR Signal Control This control uses the RS 232 interface DTR DSR signals to inform the external device whether or not the local station is ready t
469. tant cycle sending batch conditions sending When the communication protocol setting for the corresponding interface is MC protocol there is no need to designate the user frame output head pointer and the user frame transmission count It is ignored when being designated 17 12 17 DEDICATED INSTRUCTIONS 8 Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the CSET instruction or executing the CSET instruction during execution of another instruction in the same channel Availability of Instruction y Handling of simultaneous execution simultaneous execution ae e Dedicated instructions simultaneous execution error 7FFOn occurs the dedicated LEM instruction attempted later However simultaneous execution is available when channels to be used are not the same When instructions are executed in order of INPUT gt CSET e Dedicated instructions simultaneous execution error 7FFOu occurs in the CSET instruction the right column However simultaneous execution is available when channels to be used are not the same When instructions are executed in order of CSET INPUT e Simultaneous execution is available CSET x e The next instruction will be ignored until the active instruction has been completed However simultaneous execution is available when channels to be used are not the same e Dedicated instruc
470. tch setting See the User s Manual Basic Section 4 5 2 15 1 15 1 15 SWITCHING THE MODE AFTER STARTING 15 1 Mode Switching Operation and Contents that can be Changed This section describes the set contents that can be changed with mode switching and the operation of Q series C24 after mode switching 15 1 1 Settings that can be changed with mode switching The following describes the settings that can be changed with mode switching 1 Switching the communication protocol a The communication protocol setting of each interface can be switched b The communication protocol after the mode switching is specified by the switching mode No designation area of the buffer memory address 90n 130 2 Changing the transmission specifications a The transmission setting of each interface can be switched b The transmission setting after the mode switching is specified by the transmission specification after switching designation area of the buffer memory address 91H 131 Mode switching allows the user to change the settings corresponding to communication protocol and transmission switch settings of the GX developer 15 1 2 Operation for mode switching The following describes the Q series C24 operation for mode switching 1 Processing currently in execution a If there is a mode switching request mode switching immediately starts b If one of the following processings was being performed wh
471. te the user frame No to be sent in the order in which they are output from the position designated in the output head pointer designation area When sending data that is written in the transmission area use 8000H as a temporary user frame number By designating user frame number 8000n series C24 transmits the data of the transmission data designation area for the data count designated in the transmission data count designation area Buffer memory address to 801Fu 1st to to gt CH1 side 110 to 801 100th 15 to 801FH 1st to to t CH2 side 1BDu to 801 100th 2 Specifies the following user frame No for the data to be sent Note that the No on the right side of the user frame No below is the No used for transmission without ASCII BIN conversion for only the data of any frame section when transmission data is converted into ASCll binary data and transmitted See Chapters 12 and 13 for details No transmission designation No additional transmission is allowed 1 to 7 4001 to 43 7 Transmits the default frame having the designated number 3E8xH to 4AFH 43E8x to 44AFu Transmits the user frame having the designated number For flash ROM registration 8000 000 Transmits data in the transmission area of the buffer memory 8001 to 801 001 to CO1Fu Transmits the user frame having the designated number For buffer memory regis
472. ternal device processing When the external device receives the user frame transmitted by the Q series C24 as the first frame receive it as on demand data 2 Buffer memory used and on demand data list 1 Buffer memory used During on demand data transmission by user frame the user frame to be transmitted is designated in the buffer memories shown below 42 Designates the No of the user frame that is transmitted as 9 169 149 329 the first frame Do not transmit First frame No a x 1 Others Transmit designation Other than 0 is always designated for the 1st frame When designating the 1st frame the 2nd frame can also be designated frame designation Designates the No of the user frame to be transmitted as 171 14BH 331 the last frame Last frame No OH Do not transmit 4 0 designation Others Transmit P 170 14 330 On demand user ACH 172 14C4 332 When designating the 1st frame the 2nd frame can also be designated 1 Designates the registration No shown below of the user frame to be transmitted from among the user frames registered in the Q series C24 1 to 3E7H 1 to 999 Default registration frame 3E8uto 4AFH 1000 to 1199 User frame registered in flash ROM 8001 to 801FH 32767 to 32737 User frame registered in buffer memory 10 2 10 2 10 ON DEMAND DATA COMMUNICATIONS USING USER FRAMES 2 On demand data list
473. ters programmable controller CPU monitoring Designate the unit of i time S2 Cycle time units 0to2 0 100 ms 2 min Designate the cycle time User S2 4 Cycle time 1H to FFFFH 1 to FFFFu Cycle time Programmable Designate the monitoring function controller CPU 1 Constant cycle transmission monitoring function 2 Condition agreement transmission 17 7 17 7 17 DEDICATED INSTRUCTIONS Setting data Designate the transmission measure Programmable controller CPU 0 Data transmission device data CPU abnormal monitoring transmission measure information 1 Notification Designate the head pointer of the table setting the user frame numbers for constant cycle transmission 0 No designation at condition agreement 0 1 to 100 transmission and notification 1 to 100 Head pointer User frame output head pointer Designate the user frame transmission output counts for constant cycle transmission User frame Constant cycle 0 No designation at condition agreement 0 1 to 100 ue transmission count transmission transmission and notification 1 to 100 Transmission count Designate the data No for connecting the modem function when sending notifications in constant cycle transmission Modem connection 0 No designation at data transmission and data No condition agreement transmission to 0 5 Data No for connection flash ROM 80014 to 801 Data No
474. the constant cycle transmission by the Q series C24 2 10 2 10 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION c When sending the monitoring results as data during condition agreement transmission the device information of two or more user frame No and programmable controller CPU status information that have been currently designated by the Q series C24 for the condition agreement transmission of the block where the monitoring conditions match are transmitted in batch mode When the monitoring conditions of two or more block match the device information and programmable controller CPU status information are transmitted for each block When there is an ASCII BIN conversion of communication data using non procedure protocol all of the device monitoring head device number will be converted to hexadecimal ASCII data and sent The same conversion is performed during either constant cycle transmission or condition agreement transmission d The user frame numbers that can be designated for data transmission of programmable controller CPU monitoring results are listed below 1H to 3E7H Default registration frame numbers to 4AFH Frame numbers registered by the user in the flash ROM 8001H to 801FH Frame numbers registered by the user in the buffer memory 001 to BO1FH Dedicated frame numbers for this function listed e below For details on how to designate user frame numbers see Transmiss
475. the location set by the output head pointer designation area is designated here 1 1 data will be transmitted to 100 100 data will be transmitted Precautions during modem TA initialization If the DSR signal from the modem TA goes OFF when modem TA initialization is completed X10 goes ON the Q Series C24 executes initialization processing automatically in accordance with the following 1 If the auto modem initialization is specified Modem TA initialization processing is executed in the initialization connection timeout time interval while the DSR signal is OFF without relation to the ON OFF status of the modem initialization request signal Y10 2 Ifthe auto modem initialization is not specified The modem TA initialization processing is executed when the DSR signal restarts without relation to the ON OFF status of the modem initialization request signal Y10 If modem TA initialization is executed automatically Set by the GX Configurator SC By having the GX Configurator SC perform the settings for automatic modem initialization modem initialization is executed automatically when the Q Series C24 starts up The modem initialization completion signal X10 goes On a Settings for auto initialization of the modem TA Select auto initialize for the auto modem initialization designation in the GX Configurator SC s Modem function system setting screen b Cautions when initializing the modem TA automatically 1 Ifthe m
476. the codes of receivable data and the codes of receive data that is stored in the reception area of the buffer memory are as follows Receivable codes Codes stored in the reception area Arbitrary data section 30H to 394 41H to 46H 9 to f data codes other than 30H to 39H and 41H to 46H are received for an arbitrary data section an error occurs after ASCII BIN conversion by the Q series C24 13 6 13 6 13 COMMUNICATING WITH ASCII CODE ASCII BIN CONVERSION 3 Example of reception using user frames Head data External device side Programmable controller CPU side Reception data read request Programmable controller CPU Completion device Status display device at completion 10 1 2 5 A B CD 9 xam Sum check code Station No of Q series C24 Station No of external device 3Bu30u 31 32 46 35 41 42 43 44 45 46 9 DEH v a Arbitrary data section Last frame i corresponds to register number 41 o 2 First frame corresponds to register number 8 X83 MO 1 Abnormal completion fe en Normal completion scan Reception data read request X83 FrorP H25B move K Number of receive data Number of bytes after ASCII BIN conversion of ADH AEn AFH 1 2 B3H 4 5 120 121 Tre first designated frame fo
477. the following settings before running this program a GX Developer switch settings See Section 3 4 2 Switch No Setting value Switch 1 07E2 Switch 2 0006 Switch 5 0000 b Settings by the GX Configurator SC See Section 3 4 2 Perform the following settings in each setting screen Use the default settings in screens and setting items other than those shown below 1 Modem function system settings Modem function system setting OP Setting value Screen setting items Modem connection channel designation Data No for initialization designation 07D5 Data No for connection designation OBB8 2 Modem connection data registration Data for modem connection D Setting value Screen setting items Data for modem connection 1 Telephone No 1 0123456789 HOBB8 1 Specify the external party s telephone No lt Status confirmation gt 3 COMMUNICATIONS BY THE MODEM FUNCTION lt Modem initialization line connection processing X21 _ LPLS MT MO r SET M2 LCALL lt Data transmission processing non procedure protocol gt X22 _ LPLS M52 M51 LSET 3 _ CALL lt Data reception processing non procedure protocol gt X3 2 SET X4 r3 Line disconnect processing N55 4 X23 PL x12 PLF M70 _ SET M80 N72 CALL XIE XIF HO MO X10 X12 X13 Y10 Yii E rae ME AE ME Mo
478. the non procedure protocol Example This example shows a case in which the DO to D3 device information and user frame data are sent by the edge trigger method using a condition of DO 0 Perform the settings on the PLC CPU monitoring system setting screen and the screen of GX Configurator SC 1 PLC CPU monitoring system setting Number ofregisteredbitblocks o PLC CPU abnormal monitoring CL Settings other than 1 block monitoring device Monitoringdevice those listed at let _ are not required Condition agreement transmission S m Edge Monitoring condition Monitoring condition value 9 Output count 2 Setting the transmission user frames Transmission frame No designation 46th User frame number Transmission frame No designation 47th User frame number Transmission frame No designation 48th User frame number Transmission frame No designation 49th User frame number 024 Set the user frame data STX Transmission frame No designation 50th User frame number B0014 Set the first block from DO to D3 Transmission frame No designation 51st User frame number 034 Set the user frame data ETX Transmission frame No designation 52nd User frame number Transmission frame No designation 53rd User frame number Transmission frame No designation 54th User frame number Transmission frame No designation 55th User frame number Trans
479. the number of registration data bytes designation area 2 The table below shows an overview of the buffer memory used in the write read and delete operations of the initialization data as well as the designated values for each area 5 more details see Chapter 9 Use the table by replacing the user frame with the initialization data Address Specification required O not required Address Name Designatad stored value pecification required O not required X Write Read When deleting to 78 Number of bytes in the registration data Only for the initialization command section Registration data byte number designation x Registration pem d byih i ih Read No 80014 Wastconivotied ny a used by the user to manage the processing 1 01 6913 registration data manufacturer code control amp data not required number etc 1B02 to 6914 to 6952 Initialization Data code for the initialization command for 1 28 When deleting Registration data to 78 Number of bytes in the registration data 1B29u 6953 byte number A cone Only for the initialization command designation 7 section Registration i h No 80024 User controlled ny ii Uy Heer processing 1 2 6954 registration data manufacturer code control data not required number etc 1B2B to 6955 to 6993 Initialization Data code for the initialization command for 1 51
480. the remote password becomes valid 3 The password supported by the QCPU function version A is used to prohibit reading writing of file data in the QCPU using the GX Developer Dual access control can be provided by using the remote password described in this section and password for file access 3 COMMUNICATIONS BY THE MODEM FUNCTION 5 Setting from the GX Configurator SC When the Q series C24 performs a remote password check for the remote password set in the QCPU the remote password check setting as well as the present check results can be monitored with respect to the screen items listed in GX Configurator SC setting monitor screen Modem function system setting screen the table below See Section 3 3 6 for an explanation of each area Setting monitor items for the remote password check Remote password mismatch notification count designation Buffer memory address 8204 200 Remote password mismatch notification accumulated count designation 8205 2000 Modem function monitor test screen Remote password mismatch notification count designation 8204 200CH Remote password mismatch notification accumulated count designation 8205 2000 Accumulated count of unlock process normal completion 8955 22 Accumulated count of unlock process abnormal completion 8956 22FCH Accumulated count of lock process based on circuit disconnection 8959 22
481. the user 2 I O signal Use notification issued request signal Y14 notification normal complete signal X15 notification abnormal complete signal X16 Example 1 When normal completion Buffer memory for Q series C24 initial setting Notification execution cs __ 7 designation area Address 2 47 Buffer memory for notification Data number for 0 3000 connection designation area x Address 5 53 Modem function error code storage area Address 221 545 Notification execution data storage area xX 3000 Address 22 554 Initialization x10 ON completion Connection x12 progress Notification X15 normal completion Notification X16 abnormal completion Notification Neue Y14 S issued request x RS 232 CD terminal OFF i 3 COMMUNICATIONS BY THE MODEM FUNCTION Example 2 When abnormal completion Buffer memory for Q series C24 initial setting Notification execution designation area 0 X Address 2 47 Buffer memory for notification Data number designation area for connection X Address 5 53 3000 Modem function error code 1 storage area 0 Error code Address 221 545 Notification execution data storage area 0 l Address 22 554 i Initialization x10 ON completion l Connection in X12 OFF progress
482. this section Read Readpont Condition hzc transmission 0 of tris section h of this section pr condition I _ condition value 3 i of this section i of this section Transmission A 4 of this section err count Section 11 4 2 Section 2 2 5 3 rn CPU abnormal monitoring designation Condition agreement transmission x x 4 of this section Transmission EE Section 11 4 2 count Section 2 2 5 3 Setting required Setting not required 1 Cannot be used for the LJ71C24 R2 While using the notification function the device information and the CPU status information cannot be transmitted 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 Setting items and requirement when performing communication using the non procedure protocol LI Condition agreement Constant cycle transmission SM transmission Setting item Reference section Data TM Data Mr Notification Mun Notification transmission transmission Cycle time units T T of this section SI E this section Constant cycle transmission Transmission pointer ECT L this section Output count Section 11 4 2 Section 2 2 5 mo Number of registered word blocks ofthis section e ofthis section this Section Number of registered bit blocks PLC CPU abnormal monitoring 3 f of this section f of this section No n block aaa device Monitoring dev
483. ting time after sending a response to a callback request from the Q Series C24 until the line is disconnected from the GX Developer If the line is not disconnected from the GX Developer within the specified time in this area the Q Series C24 forcibly disconnects the line terminating callback processing 2 Callback delay time Setting range 1 to 999 s Default 20 s This specifies the time from the temporary line disconnect on the GX Developer side until the Q Series C24 reconnects callback Refer to the troubleshooting section of the Q Corresponding Serial Communication Module User s Manual Basic for the symptoms causes and actions of problems that may occur during access from GX Developer to the QCPU when using the callback function 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 Setting and monitoring by the GX Configurator SC for use of the callback function a Setting monitoring test items Carry out setting monitoring and testing of the callback function using the following GX Configurator SC screen 1 Setting items through the modem function system setting screen This shows the callback function setting items See Section 3 3 6 for the modem function setting items including the following items Modem function system setting j x r Module information Module type Serial Communications Module Start 1 0 No 0000 Module model QJ71C24N Setting item Setting value Callb
484. ting value a Data for modem connection 1 8 No notification Pager receiver designation Telephone number External line dialing No external line dialing Line types Pulse Y Wait time for message transmission units sec Message Comment Data for modem connection 2 H bb3 No notification Pager receiver designation Telephone number External line dialing No external line dialing lt Line types Pulse X Details Flash ROM setting Write to module Read from File read module File save Select input No notification Notification Make text file Execute test Close 3 COMMUNICATIONS BY THE MODEM FUNCTION b For the buffer memory of the Q series C24 1 The connection data write registration and read operations are performed by designating an applicable area that corresponds to registration numbers 8001H to 801F for the user frame registration area addresses 1 00 to 1FF6u When deleting the connection data write to the number of registration data bytes designation area 2 The table below shows an overview of the buffer memory used in the write read and delete operations of the connection data as well as the designated values for each area are For more details see Chapter 9 Use the table by replacing the user frame with the connection data Specificati ired not ired Address Name Designated stored value pecifi
485. tion user frame to DO 3 Receive data count gt to D3 User frame receive format designation 1st Format 0 2nd Format 0 3rd Format 1 4th Format 1 Exclusive format 1 received data count 1st 2nd 3rd 4th Reads combinations of user frames received Sets CH1 to the reception channel Sets the allowable number of reception data to 6 Executes reception Sets the normal completion flag Sets the abnormal completion flag 11 30 External device Programmable controller CPU Reception data read request Programmable controller CPU Completion device Status display device at completion 11 DATA COMMUNICATIONS USING USER FRAMES e When receiving with a combination of the first frame and arbitrary data Exclusive format 1 dedicated received data count reception using Format 1 Head data Reception data read request X83 11 31 Receive data count Word units Receive byte count excluding frame and additional code 2 2 1 Byte units Receive byte count excluding frame and additional code 2 User frame use control designation First frame No designation 1st 2nd 3rd 4th Last frame No designation 1st 2nd 3rd 4th Receive transparent code designation ASCII BIN conversion designation 2 user frame to DO Receive data count 3 gt to D3 4 Receive data to D10 arbit
486. tion S B5H None 4rth Bn 1 scan 5 1204 YES NO Receive transparent 3 1002 On code designation 4219 Disable ASCII BIN conversion 5 designation User frame receive a Receive user frame 2 format designation i 25 77 th gt to DO 2020 o 1st Format 0 r 3 LH 600 Receive data count gt to D3 2021 P 0 2nd Format 0 601 Receive data arbitrary data 4 2022 1 1 3rd Format 1 UE 3 to D10 gt 602 or after 2023 i 1n 4th Format 1 ens A STX Exclusive format 1 received 414 02H 2024 Qu data Heb designation T T 42 i 0n 2nd ae 12344 m 12u 34H 0 LF CR 606H L OAH J 2 4th BU Reception data read request x83 Buffer memory mE FROMP H8 H25B DO KI of user frames Ki DI Sets CH1 to the reception channel Sets the allowable number of reception MovP D4 data to 6 G INPUT u8 DI D10 Executes reception n SET M100 Sets the normal completion flag Mt i Ett M101 Sets the abnormal completion flag 11 28 11 28 11 DATA COMMUNICATIONS USING USER FRAMES c When receiving with user frame only reception using Format 0 Head data For reception using first frame and last frame combination Since there is no arbitrary data area the receive data count is 0 code The illustration below is for
487. tion Q A6TEL C24 Data for line connection For other items settings are performed according to the access destination station When the GX Developer is connected perform the settings and operations described in Section 3 3 7 to prevent a line to the modem from disconnecting even if communication between the GX Developer and programmable controller is interrupted 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 2 4 Precautions for system configurations The following describes the precautionary items when configuring the system to perform data communication with an external device or call a pager receiver via public line an office telephone system or digital line ISDN using the Q series C24 modem function 1 Usable Q series C24 interface 1 The modem function can be used for the RS 232 interface only 2 For the QJ71C24 N R2 and LJ71C24 R2 the modem function can only be used for only one of the two RS 232 interfaces 3 Interactive data communication via two interface of Q series C24 linked operation is not possible 2 Connectable modem TA Only the modems TA indicated in Section 3 3 2 can be used for the series C24 RS 232 interface using the modem function 3 Number of connectable modems TA s Only one modem TA can be connected to the series C24 RS 232 interface that uses the modem function 4 Modem TA connection cables 1 The RS 232 cable supplied with the modem TA or the designated modem TA cable ca
488. tion No Staton No ote etna setting Communication protocol status 594 252 610 262u current Set values changed values changed by mode u 2 NE by UINI instruction switchin 595 253 611 263 Transmission status current The UINI instruction can change the following settings that cannot be changed by mode switching that uses the mode switching request signal Y2 Y9 Station No setting change Switching to synchronous operation or switching from synchronous operation to the other mode independent operation 3 Whether the UINI instruction was completed normally or abnormally can be checked with the completion device D or status display device at completion 0 1 a Completion device Turns on at the END processing of the scan where the UINI instruction is completed and turns off at the next END processing b Status display device at completion Turns on and off depending on the completion status of the UINI instruction Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the UINI instruction is completed and turns off at the next END processing 17 35 17 35 17 DEDICATED INSTRUCTIONS Operation when the UINI instruction is executed END END END END Sequence processing processing processing processing program UINI instruction execution UINI instruction ON Completion OFF device
489. tion area address 2000p c Toregister read or delete user frames from the programmable controller CPU perform the operation while there is no data communication in progress with the external device d An user frame having only a sum check code as changeable data cannot be registered To register a sum check code add arbitrary data f Register a receive user frame in the Q series C24 flash ROM The changeable data 05H to 9 can be specified at only one place in the last frame 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 2 Precautions when using user frames a To send receive data using the user frames it is necessary to set the user frame number to be used in the buffer memory prior to data transmission reception receive user frames must be set at the startup of the series C24 The user frame number to be used can be set from the programmable controller CPU However please try to register frames using the utility package GX Configurator SC of the Q series C24 Set the receive user frame number by the programmable controller CPU to show the procedure to receive data Receive user frame data by performing the following operations sequentially chapter 11 explains steps 2 and 3 1 If an user frame used in data reception was registered from programmable controller CPU restart programmable controller CPU 2 When starting the Q series C24 set the receive user
490. tion processing subroutine When the reset command the complete flag is reset Output the various complete flag status LED display Data registration processing for initialization subroutine Sets the number of bytes of the registration data Sets the user control data control number Sets the initialization command Write the data for initialization Data No 80014 Registration to buffer memory Data registration complete flag for initialization is set 3 104 3 COMMUNICATIONS BY THE MODEM FUNCTION Data registration processing for connection subroutine 2 x MOV Set the number of bytes of the registration data FMOV KO D1 K40 Clear the data storage device for connection MOV K3 Set the pager receiver designation Notification is executed MOV nnnnonnnnn 2 Set the telephone number MOV ad 07 Set the space to the remainder of the telephone number designation area MOV HO Set the external line dialing number 0 MOV K1 012 Set the line type tone W2 Set the waiting time for the message Mov K60 p23 transmission MOV 1234587890123456 024 Set the message MOV K16 039 Set the message length uo Write the data for connection TO HO H1B29 DO 41 Data No 8002 Registration to buffer memory SET 2 Data registration complete flag for connection is set SET Yi4 Notification issued request signal is set Initial status RET M80 Tires
491. tions simultaneous execution error 7FFOu occurs the dedicated instruction attempted later Available Not available 1 Since the dedicated instructions shown below use a different communication protocol from that for the CSET instruction programmable controller CPU Monitoring Register Cancel they are not used in the same channel e BIDOUT BIDIN e CPRTCL If the dedicated instructions shown above are used in the same channel with the CSET instruction the communication protocol setting error 7 2 occurs Operation when a CSET instruction is being executed ND END END Sequence program Tossa Scan processing Scan processing CSET instruction Completion device Completion device 1 Q series C24 Setting processing 17 13 17 13 Errors 17 14 17 DEDICATED INSTRUCTIONS 1 When the dedicated instruction is completed abnormally the error flag SMO turns on and the error code is stored in SDO See the following manuals regarding the error code and check the errors and take corrective actions lt Error codes gt 4FFFHorless the user s manual hardware design maintenance and inspection for the CPU module used 7000H or higher User s Manual Basic 2 The programmable controller CPU monitoring setting control data S2 13 to 52 102 is not checked when the CSET instruction is executed but when the designated cycle time elapses In the case the monito
492. trary data section of the transmission message is sent in the order designated by the user If the ASCII BIN conversion is designated the applicable range of data is sent after data is converted to ASCII code data Also if a send transparent code is designated the applicable range of data is sent after adding additional code data before the transparent code additional code data Transparent code designation Sum check code designation ASCII BIN conversion designation Adding Calculating sum ASCII BIN Data reception 12 7 Check and delete user frames additional check code using code user frames Buffer memory Data designated in the transmission frame No designation area conversion of transmission data For Output count designation No ASCII BIN Check reception complete code and received data count Delete Calculate and check Data stored in the additional sum check code Yes gt reception area code using user frames Explained above is how the Q series C24 processes communication data when enabling and disabling the communication via the user frame function ASCII BIN conversion function and or transparent code designation communication function When communicating data to an external device use this information as a reference in the selection of a communication method 12 7 12 TRANSPARENT CODES AND ADDITIONAL CODES 12 4 Examp
493. tration The following transmission can be performed by adding 4000 to the registered user frame No and specifying this number When ASCII BIN conversion is designated a specified frame can be sent without the conversion See Section 13 3 A specified frame can be transmitted without adding the additional code for the send transparent code designation See Section 12 3 11 40 11 40 11 DATA COMMUNICATIONS USING USER FRAMES 11 5 Transmission Program The following are examples of a sequence program when the user frame four and transmission area data are transmitted In the description of the sample programs data transmission using user frames is described for the following conditions case 1 The Q series C24 I O signals The series C24 installed at QCPU I O signal addresses X Y80 to X Y9F 2 The Q series C24 interface used in data communications with the external device The Q series C24 CH1 RS 232 interface 3 Switch setting using the GX Developer Set the following setting values on the intelligent functional module switch setting screen Setting item Setting value Remarks Switch 1 CH1 Transmission setting Set according to the CH1 Communication rate setting external device Switch 2 CH1 Communication protocol setting 0006H Non procedure protocol CH2 Transmission setting Switch 3 CH2 Communication rate setting Not used Switch 4 CH2 Communication protocol setting y Q series C24 station number
494. ts Number of bytes Data type 2 The wait time after line connection until message transmission is Wait time for designated Unit s message 2 d 0 to 255 Wait time transmission E 20 Valid when the pager receiver designation in data connection is 3 Designate the notification message according to the display Message i 30 specification the other party s device The number of designated message bytes shown above is designated 2 Binary 0 No message designation 1 to 30 Number of message bytes Open Designate 0 3 COMMUNICATIONS BY THE MODEM FUNCTION 4 An example of a sequence program used for writing registering of data for connection is shown below Example of writing data for connection to the registration number 8002H area Item name Number of registration data bytes Data for connection DO D1 to D22 D23 to D40 Data register 80 Connection data Data for notification Address X1E ready signal X1F WDT error signal Turns the ready flag ON Connection data registration command Set the number of registration data bytes Clear the data storage device for connection Set the pager receiver designation Notification is not executed Set the telephone number to be connected Set the external line dialing number 0 Sets the line type to tone Writes the connection data in the buf
495. tted and received and registering to the Q series C24 of user frames that can be used in data communications with the external device See Chapters 10 and 11 for a description of how each data communications function uses the user frames 9 1 User Frame Types and Contents During Communication This section explains the kinds of user frames handled by the Q series C24 and the data contents that are transmitted and received The following two kinds of user frames are available Either kind can be used User frame Frame described in Section 9 1 1 User frame Generic term Default registration frame Frame described in Section 9 1 2 9 1 1 User frames to be registered and used by the user The following explains the registered data data contents that are transmitted and received and how the Q series C24 handles user frames registered the Q series C24 Flash ROM or buffer memory by the user 1 General description User frames registered by the user are frames that contain arbitrary data that matches the specifications of the external device The data contents are selected by the user 2 User frame registering a Up to 231 user frames can be registered read and deleted at the Q series C24 1 Q series C24 Flash ROM number that can be registered Maximum 200 frame No 3E8H to 4 2 Q series C24 buffer memory number that can be registered Maximum 31 frame No 8001 to 801 b Up to 80 bytes 80 en characters of da
496. ubject to change without notice MITSUBISHI ELECTRIC HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EURASIAN REPRESENTATIVES MITSUBISHI ELECTRIC EUROPE B V EUROPE AUSTRIA ALFATRADE Ltd MALTA Kazpromautomatics Ltd KAZAKHSTAN German Branch Wiener StraBe 89 99 Paola Hill Mustafina Str 7 2 Gothaer Stra e 8 AT 2500 Baden Malta Paola PLA 1702 KAZ 470046 Karaganda D 40880 Ratingen Phone 43 0 2252 85 55 20 Phone 356 0 21 697 816 Phone 7 7212 50 1150 Phone 49 0 2102 486 0 Fax 43 0 2252 488 60 Fax 356 0 21 697 817 Fax 7 7212 50 11 50 Fax 49 0 2102 486 1120 TEHNIKON BELARUS INTEHSIS srl MOLDOVA MITSUBISHI ELECTRIC EUROPE B V CZECH REPUBLIC Oktyabrskaya 16 5 Off 703 711 bld Traian 23 1 Czech Branch BY 220030 Minsk MD 2060 Kishinev Avenir Business Park Radlick 714 113a Phone 375 0 17 210 46 26 Phone 373 0 22 66 4242 MIDDLE EAST REPRESENTATIVES 71 158 00 Praha 5 Fax 375 0 17 210 46 26 Fax 373 0 22 66 4280 Phone 420 251551 470 ILAN amp GAVISH Ltd ISRAEL ESCO DRIVES amp AUTOMATION BELGIUM HIFLEX AUTOM TECHNIEK B V NETHERLANDS shenkar St Kiryat Arie Culliganlaan 3 Wolweverstraat 22 11 49001 Petah Tiqva MITSUBISHI ELECTRIC EUROPE B V FRANCE BE 1831Diegem NL 2984 CD Ridderkerk Phone 972 0 3
497. unction that performs the data communication in ASCII code with the external device Chapter 13 describes the handling of binary code on the programmable controller CPU and ASCII BIN conversion function for communicating ASCII code data for an external device 9 To use dedicated instructions Chapter 17 describes the dedicated instructions that are used to execute the functions explained in this manual Structure of this manual This manual describes how to perform the initial settings to execute special functions by using GX Developer and the utility package for the Q series C24 GX Configurator SC For details on the usage of GX Developer and GX Configurator SC refer to the Q Corresponding Serial Communication Module User s Manual Basic Generic Terms and Abbreviations In this manual the following generic terms and abbreviations are used to explain the serial communication module and data communication devices unless otherwise specified Specific names or model names are provided when it is necessary to explicitly identify the model being discussed 1 Generic terms and abbreviations for modules Generic Son Description term abbreviation Generic term for QJ71C24N QJ71C24N R2 QU71C24N R4 QJ71C24 and QJ71C24 R2 serial communication Q series C24 C24 modules Indicated as C24 in diagrams series C24 Generic term for LJ71C24 and LJ71C24 R2 aca Generic term for AJ71QC24 AJ71QC24 R2 AJ71QC24
498. units 2 Byte units Designate the request content S2 2 Request type 1 Setting of word byte units and buffer memory assignment change User 17 16 17 16 17 DEDICATED INSTRUCTIONS Setting data Setting range Designate the head address of the buffer memory used with 0 On demand function buffer the on demand function S294 400 to 1AFFn memory head address Ou Use the current setting value 2600 to 400 to 1AFFu 2600 to 3FFFH Head address Designate the size word number of the buffer memory used 52 5 On demand function buffer with the on demand function On memory size Ou Use the current setting value 1 to 1A00H 1 to 1A004 Size Designate the head address of the transmission area used 0 Transmission area head with the non procedure bidirectional protocol d S2 6 400 to 1AFFu address Ou Use the current setting value 2600 to 400 to 1AFFxH 2600 to 3FFFu Head address Designate the size word number of the transmission area used with the non procedure bidirectional protocol Ou Use the current setting value S2 7 area size 3 1 to 1 00 Size 1 to 1A00H The head transmission area 1 word is used as a transmission data count designation area Designate the head address of the reception area used with 0 the non procedure bidirectional protocol S2 8 area head address 400 to 1AF
499. urns on before completing the Q series C24 side modem TA initialization is complete Section 3 4 7 3 Turns off the notification issued request signal after designating the data for Notification issued request connection in the buffer memory when it is not set with GX Configurator SC The descriptions hereafter show an example in which I O numbers of the Q series C24 are assigned to X YOO to X Y1F 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 3 6 Buffer memory The buffer memory area shown with that can be used with the modem function is described Refer to the User s Manual Basic for the buffer memory not related to the modem function The writing and reading of setting values to and from the buffer memory are performed using the special utility package GX Configurator SC of the Q series C24 This section provides supplementary explanations on setting values used to perform settings and monitoring with GX Configurator SC 1 Buffer memory list DI oom e Application Name value protocol cH mc Non Bi communication RW 2 2 Register read delete directions 3 3 For PASKOM Frame No direction or Flas 4 4 Register read delete result storage access 5 5 Number of data bytes registration designation 6 to 45 6x to 2D 46 2 Modem connection channel directions 0 None 1 CH1 2 CH2 47 2 Notification execution designation 2 0 Does not execute 1 Execute
500. ver beeper to notify the programmable controller system maintenance information 2 Initialization of the modem or TA line connection dialing and line disconnection are performed using the programmable controller CPU 3 Once the line is connected data communication with the external device via public line office telephone system digital line or a call to pager receiver can be made Q series C24 nzpsupeesecesn Modem TA 1 vet a A Sui External device Modem TA 1 Pager receiver 1 TA terminal adapter 3 1 1 Features 3 COMMUNICATIONS BY THE MODEM FUNCTION The following explains the features of the modem function 1 Interface that can use the modem function 1 The modem function can be used with the Q series C24 using an RS 232 interface 2 For the QJ71C24 N R2 and LJ71C24 R2 the modem function can be used for only one of the two RS 232 interfaces Through the other interface of the Q series C24 direct data communication with an external device can be performed using MC protocol non procedure protocol or bidirectional protocol independent operation QU71C24 R2 Communication using the modem function Communication without using the modem function 2 Initialization line connection and disconnection of the modem or TA 1 The following set values for line connection can be used by storing to the Q series C24 Fla
501. version is not performed The total number of bytes for the device data section is the number of device points X 2 When the word byte unit designation is byte When the word byte unit designation is word Palle oa g 52 8 52 E 5 5 2 f y 1 2 1 1 Loss ce E H A n E HB Lb L 2H L L HOL 1 L w w 004 01H 00H 4 4 00H 0044011 OO 02 004103400 01H 00H B4x 04H OOH 004 00H t OOH 015 OOH 02 00 03H W100 W101 w102 W103 w100 W101 W102 W103 When ASCII BIN conversion is performed The total number of bytes for the device data section is the number of device points X 4 When the word byte unit designation is byte r1 r1 device Number of registered points Device data Device code Monitoring head eg I e 1 L H L HEL HiL H 1 1 wx 0 o 4 0 1 0 2 3 0 0 1 1 1 1 57H 2 0 30H 30H 31H 30H 30H 30H 30H 30H 30H 30H 1304 31H 30H 30H 32H 304 30 30H 33 30H 30 A T Y Y Y W100 W101 W102 W103 When the word byte unit designations word r1 r1 device Number of Device data Device code registered points Monitoring h
502. vice Remote Remote password t password Local station check _ Ethernet QCPU module Q series C24 Ethernet Relay gcpylEthernet Ethernet gcpy Ethernet Access station module module module station Ethernet r Not set in the relay station or access station x Network System 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 Public line External device access source When set in a station other than the QCPU which is the entrance of the programmable controller system relay station or access station in the above diagram access to other stations beyond the set station is prohibited 3 4 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 1 2 Function list The following describes the overview of the modem function Function Overview TA Initializes the modem TA using the user designated initialization data AT commano Auto Modem TA initialization 4 initialization of the modem TA is possible Dials the partner telephone number according to the user designated connection data and Line connection dialing enables data communication after establishing the line connection When the modem TA is not initialized performs initialization Performs communication with an external device u
503. vice BD 400 4th Transmission count designation area 5th 6th Transmission area 400 data count word unit byte unit 401 42 B 41H A 09 4029 44 D 434 Transmission data 1 When sending data that was written to the transmission area 8000u is used as a temporary user frame number Refer to b 5 When the ASCII BIN conversion is not performed User frame User frame Arbitrary data User frame 1 2nd 4th eel Figure at left is for byte units Sis E x cL For word units the optional data section is sent in the sequence ABCD TIZ B C DIT 2 5 2 X E R E 5 o o 02 OOH 3 41 A 42H 43H 24 03H 4 0DH OAH 2 3E8H 8000H 400 Corresponding frame 11 38 11 38 11 DATA COMMUNICATIONS USING USER FRAMES b Transmission user frame designation The following explains application of the buffer memory to be used when sending data using user frames along with the designated and stored values 1 User frame being transmitted storage area addresses 156 What number of the transmission frame number designation area is being sent is stored in the data transmission via user frames b15 to bO Buffer memory address to 64H 1 side 156 to 64H 2 side 0 Not sent 1uto 64H 1 to 100 User frame being transmitted designati
504. vice data or the programmable controller CPU status Cycle time designation gt K sequence scan time processing time data transmission time When notifying through combined use of the modem function when notifying Cycle time designation gt K sequence scan time processing time data transmission time data transmission delay time of the modem modem connection and disconnection time when sending data Cycle time designation gt K sequence scan time processing time data transmission time data transmission delay time of the modem modem connection and disconnection time circuit disconnection wait time When modem initialization has not been performed the modem initialization time will be added We recommend that the modem initialization be performed in advance The items that appear in the above expressions are explained below eK 60 ms constant internal processing time of the Q series C24 Processing time Processing time for the Multiple block batch read word unit command 0406 For 1 point 11 3 ms For 480 points 23 4 ms For 960 points 36 2 ms Data transmission time 1 transmission rate x bit count for one byte portion during transmission x byte count for transmission data Bit count for one byte portion during transmission 1 data bit count parity bit stop bit count parity bit 1 no parity bit 0 Data transmission delay time by the modem Depends on the modem specifications line s
505. xecution error 7FFOu IDIN occurs in the dedicated instruction attempted later CSET UTE GETE CPRTCL UFRCVS PBUSY UINI x e The next instruction will be ignored until the active instruction has been completed Available X Not available 5 Before executing the UINI instruction set the transmission setting modification to Enabled in the GX Developer switch setting When the switch setting has not yet been made the transmission setting modification is processed as Enabled 17 39 17 DEDICATED INSTRUCTIONS 6 Do not use the UINI instruction and mode switching request signal Y2 Y9 together to execute mode switching 7 To use the current communication protocol transmission specifications and host station No obtain the values from the following status storage areas current of the buffer memory and set them to the control data Address Decimal Hexadecimal Application 591 24 Station No instruction setting 594 252 610 262 Communication protocol status current 595 253 611 263 Transmission status current 17 40 17 40 APPENDIX APPENDIX Appendix 1 Specification Comparisons between the Q Series C24 and L series C24 The functions of the L series C24 are corresponding to those of the Q series C24 whose first five digits of the serial number is 11062 and the function version is B or later The following table shows specification comparisons between the series C24
506. xplains the arrangement of the transmission data and transmission procedure when transmitting data using a user frame 11 4 1 Send data The following describes the data list codes and handling of the Q series C24 send data during user frame data transmission 1 Send data list Only the data list combinations shown below are allowed during user frame data transmission Arbitrary data area Send data designation area data User frame first n frames User frame last m frames Data name User frame User frame Combination a first n frames mM m frames A Oe E E Total 100 frames Designated data exists When ASCII BIN conversion disabled i i Codes that can Codes when i be designated transmitting Note 00H to FFH Added by the Q series C24 00h to FF When ASCII BIN conversion enabled Codes that can Codes when Added by the Q series C24 to 94 Auto Fu 30H to 39H The codes shown at the left 41H to 46H are 4 bit codes Transmission area data to 9 to 30H to 39H The codes shown at the left at 41 to 46H are 4 bit codes 1 Four bits of OH to FH data are converted to 30H to 39H and 41H to 46H ASCII data and transmitted as the data codes of the data to be transmitted including the transparent code data 2 Send data arbitrary data area 1 When the send data count designated by the programmab
507. xternal device 1 No Local station No item When accessing another external device interlock communications P Communications using Communications using 14 QnA compatible 2C 3C 4C frame A compatible 1C frame Station No Station No of access destination external device 1 Local station Station No of access source Designation unnecessary No external device No Local station No item 1 A station No within the 0 to 31 OOH to 1FH range not set to Q series C24 on the programmable controller CPU side is used as the external device No in the Station No and Local station No items in the message Select and designate the No of each external device The designation method is described in Contents of the data designation items of each frame in the MELSEC Q L MELSEC Communication Protocol Reference Manual Station No Designates the No of the transmit destination external device e Local station No Designates the No of the transmit source external device Does not have to be designated when A compatible 1C frame is used 14 2 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M N CONFIGURATION 14 2 External Devices Interlock Conditions When using a multidrop line to communicate data between external devices and the programmable controller CPU in an m n configuration interlocks must be provided between the external devices so that multiple e
508. xternal devices cannot communicate data with the programmable controller CPU at the same time This section describes the conditions for providing the interlocks between the external devices so that any one of the external devices can communicate data with the programmable controller CPU Conditions for priority use obtaining line ownership of the line from the start to the end of data communications with the programmable controller CPU 14 2 1 Maximum communications time per external device station This condition determines the maximum time each external device can communicate with the programmable controller CPU after obtaining line ownership Time in the illustration below This prevents loss of data communications between other external devices and the programmable controller CPU by shutdown of the external device that obtained line ownership Example Indicates the range within aoe ore which the target device External device cannot obtain line ownership Pxtemal device Indicates the range within to which the target device can External device 5 4 obtain line ownership and can have data communication Start of data communications with the programmable controller CPU 1 Make the maximum data communications time per external device station the maximum time of the external device that r
509. y completed Notification data je Notification issued request signal Y14 OFF Notification See Section 3 4 7 Line connection normally completed Connection in progress signal X12 ON reception e Line disconnect Line disconnect completed TEN Line disconnect completed Notification issued request Y 14 ON Modem initialization completion signal X10 ON Shows the value stored for the modem function sequence status address 546 221 4 If accessing the QCPU from the GX Developer Perform the processing up to the point where the modem TA is initialized by the procedure in 1 Modem initialization Line connection wait state Modem initialization completion signal X10 ON Line connection normal response Connection in progress signal X12 ON Line disconnect response Connection in progress signal X12 OFF Line connection wait state Modem initialization completion signal X10 ON Dl indicates processing performed by the user Q Series C24 Modem Modem GX Developer Line connection side Initialize the personal computer side modem Registration of the modem connected to the personal computer Registration complete Execute line connection Connect to the line after setting the necessary items in the line connection screen Line connection normal response Line connection Password check for the system Normal re

Download Pdf Manuals

image

Related Search

Related Contents

MagicSpeed MS880  JOURNAL ENTRY GENERAL LEDGER USER MANUAL The  27 TE Operator`s man.. - Marlow  Siig JK-US0911-S1    System Library User`s Manual  User Manual  avertissement  Helpdesk for ArchiCAD User Manual - ProFM Helpdesk  MCA-Tanzania MIS user manual  

Copyright © All rights reserved.
Failed to retrieve file