Home
AJ71C24-S8 - User`s Manual
Contents
1. D Received data read request XA1 Received data length is stored Received data read completed PC CPU program PC CPU program example X1A1 AJ71C24 buffer Sequence program memory data memory 10 21 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A Example 2 Check sum disabled in byte units receive memory area allocation default To store AJ71C24 received from a computer to DO to D4 of aPC CPU AJ71C24 I O ad dress 80 to 9F i i L l i o007H AL Ji 7 itici2ata l t l t l 07 n 00u 41 uj hAm 370131 0430p 3201 34m eee ened Received data read request X81 Received data length Received data read completed Y91 A is stored PC CPU program PC CPU program example ath Fh AJ71C24 buffer memory e Even if send data units are set to byte units the FROM instruction in a sequence program operates in word units Therefore the received data length must be converted to the number of buffer memory points word units In the above example 7 bytes of data must be converted into 4 words 7 2 3 5 e When an odd number of bytes of data is received the higher 8 bits of the last address read by the FROM instruction are 00H 10 22 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 10 9 Transmitting Data in the Bidirectional Mode AJ71C24 gt Computer Transmitting means outputting data which was written to the bidirec ti
2. 3 6 I O Signals List for CPU The I O signals of the AJ71C24 for the PC CPU are listed below The numbers n number appended to X and Y are determined by the installing position of the AJ71C24 and the number of I O signals used by the I O signal signals used by the O modules installed in front of the AJ71C24 Example Xn0 gt XO when the AJ71C24 is loaded in slot 0 of the main base unit 1 Input signals AJ71C24 gt PC CPU There are 16 input signals XnO to XnF are turned ON OFF by the AJ71024 Table 3 5 Input Signals List Mode Reference Descri protocol Bidirectional Turns ON when the send from the AJ71C24 to the external completed device is completed when Y n 1 0 is turned ON 9 2 10 2 P Turns OFF when Y n 1 0 is turned OFF Turns ON when the completed code fixed length data or desig nated data length is received from the external device Turns OFF when Y n 1 1 is turned ON xna Global Turns ON OFF according to the message factor number when a signal global command is received from a computer Turns ON when the on demand transmission is executed accord ing to the request from the sequence program Turns OFF when the on demand transmission is completed Received data read demand function operating Set values 1 to 8 of the mode setting switches see Section 4 3 1 indicating the state of communications between the computer con nected to the inte
3. 8 8 7 Direct write to the extension file register AnACPU dedicated command Designation Method Designation in protocol 1 is shown below Extension file register batch write command Head device dbase re Ns No 7 Kinjer EEn pred snein 1 word dats ie expreceed ens hexadecimed ps 4 digits hexadecimal HIL Designation of the device range to be written 1 device point uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal To designate the device range the following conditions must be met e1 lt number of device points lt 64 Head device number number of device points lt maximum device number Designation Example To write data to 3 points R8190 and R8191 in extension file register block number 12 and RO in block number 13 in station number 3 Assume that extension file register block number 9 does not exist Message wait time is 0 msec Check sum is calculated within this range aR IOn Tr Iny Wr 31m I1 a On Dar Inj SO Sty Ln Inf 41r 42m Wu In ry Ia Sen Sed 4 AJ71C24 Indicates that The content to be written to R8190 of block Number 12 is 0123H 291 in decimal The content to be written to R8191 of block Number 12 is ABO7H 21753 in decimal The content to be written to RO of block Number 13 is 3322H 13090 in decimal MELSEC A 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 8 8 Testing random write the extension file register ACPU common command
4. Preset value a Middle bits Lower bits E2 t 40H The buffer memory of each special function module has its read and write area read only and write only areas and areas reserved for OS use which are not available to the use See the manual for each module before using the buffer memory PC CPU or special function module errors may occur if reading or writing is not done correctly Boece ee USING DEDICATED PROTOCOLS MESECA 8 10 2 Special function module numbers using control protocols 1 The special function module numbers designated by using control protocols are the upper 2 digits of the last special function module I O address expressed in 3 digits Special function module number OAH Special function module number 07H Power Special Specia PC CPU su Input ie t e t tunction input PPY module Pp utpu utpu vor P 16 points 32 points 16 points 32 points 16 points 32 points 00 to0F 10to2f SOtosSF 0to7F 80to8F 90toAF Power Spec supply Input Output Output module 16 points 32 points 32 points DO toDF EQ toFF 100to11F 120to13F 140 to15F BO to CF Special function module number H13 2 Precautions with special function modules occupying two slots For special function modules occupying two siots the number of points occupied by each slot is fixed for each module The special function module number is the upper 2 digits of the last address of the slot allo
5. When OH to FFH area is used 2H to 100H Bidirectional receive buffer memory length When 120H to 7FFH area is used 2H to 6EOH Bidirectional receive buffer memory length continued on page 10 6 10 5 Bidirectional mode designa tion area Time out check time designa tion area Data valid invalid designation area at simultaneous transmis sion Bidirectional mode check sum enable disable designation area Error storage area for data send Error storage area for data received 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A continued Whether the interface communications mode is no protocol or bidirec tional is designated with a TO instruction in a sequence program 0 No protoco mode default 1 Bidirectional mode The time out check time until the reception of a response after trans mission of data to the computer is designated with a TO instruction in a sequence program OH Time out is not checked default 1H to FFFFH Time out check time 100 msec units The most significant bit in the area is not regarded as the sign bit The set value is regarded to designate value in the range of 1 through 65535 How the receive and send data at an AJ71C24 is processed if data transmission at a computer and an AJ71C24 occurs simultaneously is designated with a TO instruction on a sequence program Section 10 6 covers silmultaneous transmission bis to bBb7 wm bo 114H default
6. 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 6 Character Area Data Transmission The concept of transmission data handled as character areas when using commands to carry out data communications between the computer and the PC CPU is explained in this section The data shown in the examples is contained in character area B in the case of read and monitor and in character area C in the case of write test and monitor data register 1 Bit device memory read and write The bit device memory can be handied in bit units 1 device point or word units 16 device points These units are described below a Bit units 1 point When the bit device memory is handied as bit units the specified number of device points from the specified head device in sequence from the left are represented as 1 31H if the device is ON or 0 30H if the device is OFF Example Indication of the ON OFF status of 5 points from M10 Number Head device of device Data points Moo 1 0 0 5 1 0 1 0 1 4DH 30H 30H 31H JOH 30H ISH 31H JOH 31H 130H 31H indicates that M14 is ON Indicates that M13 is OFF Indicates that M12 is ON Indicates that M11 is OFF Indicates that M10 is ON b Word units 16 points When the bit device memory is handled as word units each word is expressed sequentially in hexadecimal values in 4 bit units from the higher bit Example Indication of the ON OFF status of 32 points from M16 Number
7. Designation Method Designation in protocol 1 is shown below Device number Data 4 Device number Deta SUM 7 characters characters 7 characters characters code hi in 4 digits hexadecimal To designate the device range the following condition must be met e1 lt number of device points lt 10 Designation Example To write data to 3 points R1050 in extension file register block number 5 R2121 in block number 7 and R3210 in block number 10 in station number 3 Message wait time is 0 msec Check sum is calculated within this range Indicates that The content to be written to R1050 of block number 05 is 1234H The content to be written to R2121 of block number 07 is 1A1BH The content to be written to R3210 of block number 10 is 0506H 1286 in decimal 4660 in decimal 6683 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS __weicec 8 8 9 Monitoring the extension file register Monitor data registration is the function that registers the name and the number of the device to be monitored by the computer to the AJ71C24 The monitor is the function that a reads the data content of the device registered at the time the monitor read command is executed by the com puter and b executes the corresponding processing such as monitoring The device numbers must be consecutive when the device is read using the batch read ER or direct read NR command However when this function is u
8. indicates that message wait time has been set Check of PC CPU RUN STOP ete write N i This period is 0 if the mes 1 sage wait time is not set or i message wait time is shorter than communications time with the PC CPU END Step o END Step 0 END Step 0 As shown above communications between the AJ71C24 and the PC CPU is always made after END Therefore the scan time is extended by the time used for communications Appendix 5 gives the communications time Section 3 3 1 gives the number of points processed per communication after END 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Communications time This section describes how to calculate approximate communications time from the start of data transmission from the computer to the completion of all communications after a reply is sent from the AJ71024 For TO to T4 see 1 and 2 on the previous page a To read data from the PC CPU to the computer Communications time TO longer time of T1 T2 or TW T3 T4 where TO T3 T4 1 baud rate X the number of bits per character 1 7 8 0 1 ia x the character length Start bit Data length 7 or 8 Parity bit 0 or 1 Stop bit 1 or 2 T1 maximum 1 scan time since data entry to the PC CPU is made after END processing If the PC CPU is not running T1 is 0 T2 value in Appendix 5 Tw message wait time b To write data from the computer to the PC CPU Comm
9. 2 Functions available when using a PC CPU Interfaces for Dedicated Protocol Avaliable Functions b Interfaces used to set the no protocol mode Mode for stations set to 5 6 or 8 Functions available when using external devices and the PC CPU Interfaces for Available Functions No protoocol Mode PC CPU to To computers external printers and devices c Interfaces used to set the bidirectional mode Mode for stations set to 5 6 or 8 Functions available when using external devices and the PC CPU Interfaces for Bidirectional Mode PC CPU to jeme O ege oo o roms 4 Data communications is possible only with the 1 1 ratio configuration Avaliable Functions 2 18 2 SYSTEM CONFIGURATIONS MELSEC A 2 3 6 Links with an external device such as a computer through data link systems By installing the AJ71C24 to a PC CPU linked with other PC CPUs on data link systems communications is possible with other PC CPU stations on MELSECNET II MELSECNET B However communications is not possible with AOJ2CPUP23 R23 or AOJ2CPUP25 R25 modules Master station MELSECNET II Remote station 3 Loca station 2 third tier master station Local L2 m station 3 13 Remote station 2 r2 station Local station 1 11 gt Set the mode switches see Section 4 3 1 as follows When a multidrop link is formed 5 to 8 Ato D When a multidrop link is not formed 1 to 8
10. Data communications in the bidirectional mode is possible only in the system where a computer and the AJ71C24 are linked in a1 1 ratio The mode setting switch in the AJ71C24 shouid be set in any position of 1 to 8 or the mode switching function can be used to set the mode number from 1 to 8 see Sections 3 4 and 7 6 2 2 Usable with dedicated protocols When data communications is executed in the bidirectional mode data communications using the dedicated protocol is possible with the other interface Data communications using the bidirectional mode and the no protocol mode at the same time is not possible RS 232C communications with dedicated protocols 10 8 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 10 3 2 To write data to a special applications area in buffer memory 1 2 3 Example 4 5 Buffer memory is not battery backed up by a battery When the power is turned ON the PC CPU is reset or the mode is switched all data in the buffer memory is set to the default values Therefore any data changed from the default values must be written whenever the power is turned ON the PC CPU is reset or the mode is switched Except for mode switching areas only a TO instruction can be used to write data to the special applications area 100H to 11FH If data is written using the command in a computer program the AJ71C024 will not to operate correctiy Never try to write d
11. If the priority of transmission is set setting to buffer memory address 111H is not required The CD terminal check is set to Enabled Half duplex transmission is used and the priority of transmission is set AJ71C24 O addresses 80 to 9F Sequence Program L rop He mor Ki Ki JH Write1 to butter memory address 10FH Leave the setting of butfer memory addresses 10BH and 110H for defaults 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 2 2 Setting non priority of transmission to the AJ71C24 with the half duplex transmission The following shows how to set the AJ71C24 to discontinue transmission when the AJ71C24 and an external device using half duplex transmission have begun transmitting data to each other simultaneously 1 Setting half duplex transmission non priority and not resend 1 Transmission method b15 to b1 bO om T onem o Write 1 0 Full duplex transmission 1 Half duptex transmission eSet bits b1 to b15 of address 10FH to either 0 or 1 The AJ71C24 will ignore the settings 2 Priority setting when transmission has begun simultaneously b15 to bo ee Write 1 to 255 This data sets the send wait time when data transmission is started or restarted Unit 100 msec 3 Transmission method when data transmission is restarted b15 to b1 bO a CT e o Write 0 This can be omitted since the defauit is 0 eee resend 1 Resend
12. MELSEC A a AJ71C24 S3 S6 S8 computer link module Address Set with Buffer Memory Contents Address Set by Computer FROM TO Instructions Special applications area 1200H to 123FH 100H to 11FH except for the AJ71C24 computer link module See Section 3 7 Addresses 1000H to 1FFFH of the AJ71C24 set by a computer are the buffer memory addresses utilized when using a computer to execute read write from to an AJ71C24 not connected to a computer b AD61 S1 high speed counter module Address Set with FROM TO Adrena et by Compute Buffer Memory Contents Unused area unavailable a Current value write lower bits Current value write a mm register Current value read lower bits Current value read middle bits ee e bits 37 el value read write lower bits Set value read write middle bits Set value read write bits APP 15 APPENDICES MELSEC A c AD71 S1 and AD71 S2 positioning modules Address Set by Com Address Set with PASMA nse X axis positioning start data 392H ema Se _ Se I Y axis positioning start data Positioning information Positioning velocity X axis position ovine Positioning address Positioning information Positioning velocity Y axis position ing data Positioning address X axis parameter 7872 to 7887 Y axis parameter 7892 to 7907 X axis zero return data 7912 to 7917 Y axis zero return data
13. The sum check code is 2 digit ASCII representing the lower 1 byte 8 bits of the sum derived from the BIN code representing the checked data With DIP switch SW21 OFF the sum check code is not added Example If A B C and D are transferred in format 1 setting station number 0 PC CPU number FF command BR batch read of device memory and message wait time to 30 msec the sum check code value is as shown below born time Computer a ahjaa AS71024 30H 30H 46H 46H 42H 52H 33H 41H 42H 43H 44H 2BDH lt n St No Station number 8 Error code Indicates an error following a NAK transmission Error codes are transmitted as 2 digit ASCII hexadecimal in the range of OOH to FFH elf two or more errors occur simultaneously the error code of the lowest number is transmitted e For error code details see Section 11 1 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 5 Transmission Sequence Timing Charts and Communications Time PC CPU Sequence program 1 To read data from the PC CPU to the computer indicates that the message wait time has been set This period is O if the message wait time is not set or message wait time is shorter than communications time with the PC CPU END Step 0 END Step 0 END Step 0 For file register and parameter an extra 1 scan plus T2 is required 2 To write data from the computer to the PC CPU
14. Writes data to word devices D R T C etc in units of points by designating the devices and device numbers at random Bit Sets the bit devices X Y M etc to be inal Sets the bit devices X Y M etc to be 20 words Registration Word monitored in units of 16 points 320 points units Sets the word devices D R T C ete to ee Preis monitored in units of points por Note o Executable Keus Not executable 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Device ranges when AnACPU dedicated commands are used The devices and device number ranges that can be used for device memory access operation are described below The device designation code consists of 7 characters Leading zeros in the device number underlined zeros in X000070 for example can be expressed with a blank code 20H Device Device number 7 characters 1 character 6 characters 2 characters for T C 6 characters for T C Bit Device Word Device Device Number Decimal Device Number Decimal Range Hexadecimal Range Hexadecimal oharaciere Expression iEwarestets Expression X000000 to Timer TNOO000 to Y000000 to Counter CNO00000 to Output Y YOOO7FF Hexadecimal present value C CNO1023 Decimal pa Sn S008191 ig saa j Roost osema T ea i B000FFF m ai k Doos2ss z eme 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 1 To designate the bit device ranges i
15. o o o U S 1 Protocoit No protocoi For connection of computers to RS 232C and e T Prorocoi2 No protocoi_ RS 422 individually or for connection of a Protocol3 No protocol printer to the no protocol interface 3 Protocols No protocol Both interfaces work independently 4 Protocoia No protocoi No protocol Protocol 1 6 Noprotocol Protocol 2_ No protocol 8 Noprotocol Protocol 4 This mode is used to enabie a no protocol computer link with all devices connected to No protocol No protocol the RS 232C and RS 422 interfaces Data transmitted by a computer can be received by all AJ71C24 modules 1 a A Protocol 1 This mode is used to enable a dedicated B_ Protocol2 J Protocol 2 protocol computer link with all devices con Protocol 3 nected to the RS 232C and RS 422 inter Protocol 3 Protocol 3 faces Data transmitted by a computer can be received by the AJ71C24 designated b ee E For module test RS 232C and RS 422 operate independently 1 When the mode switch is set to 9 to D the RS 232C and the RS 422 interfaces operate as if interlocked with each other Mode Setting Switch Number 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A Key points when setting modes 1 The RS 232C and RS 422 transmission specification protocols are iden tical See Section 4 3 2 2 To use the RS 232C and the RS 422 with a single mode set
16. 2 Set the X10 switch to the number of tens in the station number 3 Set the X1 switch to the number of units in the station number 4 The station number may be set to any value which does not duplicate another station number It is not necessary to consider the order of connection when viewed from the computer Station numbers do not have to be sequential and may be skipped 5 tf the switches are set as shown on the left the station number is 25 1 n ratio m n ratio 1 Use caution not to set a station number which duplicates another station number This leads to destruction of transmission data and precludes correct data communications 2 When the computers and AJ71C24 modules are linked in an m n ratio set station numbers only for the AJ71C24s Set the station numbers for the computers to perform communications between them Setting range is 128 80H to 159 9FH See Section 6 2 1 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 4 4 Loading and Installation 4 4 1 Handling instructions 1 Protect the AJ71C24 and its terminal block impact 2 Do not touch or remove the printed circuit board from the case 3 Do not allow metal particles or wire offcuts to enter the AJ71C24 4 Tighten the module mounting and terminal screws as specified below Tightening Torque N cm kg em Ib inch 78 86 83 to 137 14 12 18 Module mounting screws optional M4 78 8 6 93 to 118 12 10 39
17. MELSEC A 10 2 Handshake Signals and Buffer Memory 1 Handshake signals in the bidirectional mode Signals known as I O handshake signals are required for communica tions in the bidirectional mode These signals output data received from the sequence program to a computer or detect signals from an external device to enable the sequence program to read them es Turned OFF by program PC CPU Y n 0 eA Turned ON by program Turned OFF by AJ71C24 Turned ON by AJ71024 Received data read Turned OFF by AJ71C24 j request Turned ON by AJ71C24 ieee OFF by program Y not 1 Receive data read complete Turned ON by program The number n appended to X and Y is determined according to the position where the AJ71C24 is loaded and the number of I O modules loaded prior to this module If this module AJ71C24 is loaded at slot 0 in a base module Xn0 is expressed as XO 10 4 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 2 Buffer memory used in the bidirectional mode a Special applications area 100H to 1FFH Word byte designation area for bidirectional mode Bidirectional mode send buffer memory area head address designation area Bidirectional mode send buffer memory length designation area Bidirectional mode receive buffer memory area head address designation area Bidirectional mode receive buffer memory length designa tion area The unit word byte of data length of a message transmittt
18. R8191 RO 204800 12th block to to 26th block R8191 212991 R8191 RO 212992 to to 27th block R8191 221183 R8191 aoe o FET g 23g J amp 238 sg zg 106496 221184 RO to 28th block 114687 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 8 3 Precautions during extension file register read write 1 The extension file register is not used by A1 and A1NCPU This function is not available during communications between A1 or A1NCPU and the PC CPU 2 Some types of memory cassette loaded to the PC CPU are unable to detect an error character area error O6H if an attempt is made to read or write after specifying a block number which does not exist In this case data which is read may not be correct and writing such incorrect data may destroy the PC CPU user memory Always check the type of memory cassette and the parameter settings before using this function Block Numbers Which do not Cause a Character Area Error 06H Type of A3H A2A S1 A3NMCA 12 No 10 No 11 el No 1010 No 28 amaa dd Neen Ne towne as No 21 to No 28 The UTLP FNi Operating Manual or the A2A S1 AS3ACPU User s Manual give details 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 8 4 Batch read of the extension file register ACPU common command Designation Method Designation in protocol 1 is shown below Extension file register batch read command To designate the device range the fo
19. The mark indicates controlling send receive data marked by b When DC1 DC3 transmission control is executed When the RS 232C is used When the RS 422 is used as the main channel as the main channel PC CPU AJ71C24 PC CPU AJ71C24 RS 232C RS 232C at ae Data flow Data flow RS 422 RS 422 The mark indicates controlling receive data marked by 3 SPECIFICATIONS MELSEC A c When DC1 DC3 receive control is executed When the RS 232C is used When the RS 422 is used as the main channel as the main channel PC CPU AJ71C24 PC CPU AJ71C24 RS 232C we Deaton PO maplias The mark indicates controlling send data marked by d When DC2 DC4 transmission control is executed When the RS 232C is used When the RS 422 is used as the main channel as the main channel PC CPU AJ71C24 PC CPU AJ71C24 RS 232 RS 232C OA ig flow Data flow tt Controlling send data marked by e When DC2 DC4 receive control is executed When the RS 232C is used When the RS 422 is used as the main channel as the main channel AS71024 PC CPU AS71024 RS 232C RS 232C an balled ie flow Data flow RS 422 Controlling receive data marked by 3 SPECIFICATIONS MELSEC A 3 5 2 DTR DSR ER DR control This appendix explains DTR DSR ER DR control 1 Explanation of DTR DSR control DTR DSR control enables and disables data communications with an external device via the AJ71C24 RS 232C by means of the DSR DR and DTR ER s
20. The modes used with the RS 422 and RS 232C interfaces can be switched after the AJ71C24 S8 is started up Mode switching Dedicated protocol Pi 2 No protocol A Bidirectional RS 232C interface RS 232C interface Transmission is Transmission control by the OTR DSR controlled by the control or the DC code control is Transmission controt DTR DSR control enabled RS 422 interface RS 422 interface Control is not Transmission control by the DC code available control is enabled APP 6 APPENDICES MELSEC A APPENDIX 4 ASCII Code Table Character codes used for the computer link are shown below 7 bit codes aw nN Rak 9 OzzZzrz c Ion moow pares eas 6 7 8 9 A B Cc D E F APPENDICES MELSEC A APPENDIX 5 Communications Time between a PC CPU and an AJ71C24 When the PC CPU is in the run state data is processed after executing the END instruction in response to a request from the AJ71C24 Section 3 3 1 gives the minimum number of devices processed per communications The intervening times i e by how much the scan time increases for each processing operation and its corresponding processing times indicated in number of scans are shown beiow 1 ACPU common command intervening Times Scan Time Increases Times Scan Time increases A2A ASA atthe 2 scans for Word 64 device R only devices 0 81 ms devices 160 2 scans enable during Word RUN is se
21. Write H100 to buffer memory address 114H Write 1 to buffer memory address 115H 2 Setting the bidirectional mode with the following conditions AJ71C24 I O addresses 110 to 12F 1 Set the bidirectional mode 2 Set the time out check time to infinite 3 Set the send data to valid and the received data to valid for simultaneous transmission 4 Set the check sum to enable Sequence Program TOP H11 H112 K Ki Write 1 to buffer memory address 112H Leave settings of buffer memory addresses 113H for 115H for defaults 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 6 Mode Switch Setting The following shows how to set items during mode switching and gives an example 7 6 1 Reading in the mode setting state This section explains how to read a currently executed mode number after the mode is switched Setting Method The mode number 1H to DH currently being executed is stored Before switching the mode the value that corresponds to the number 1 to D set by the mode setting switch is stored After switching the mode numbers designated during mode switching are stored Reading Example To read the mode number currently being executed AJ71C24 I O addresses 80 to 9F The mod ber i df FRomP He mne o K H jhe mode number is read from After switching the mode of the AJ71C24 as explained in Section 7 6 2 the curren
22. faeces cycle aah request is processed in the END processing of the sequence program Access faecew syes Therefore access cycle is 1 scan time Parity check present odd even absent Error detection Sum check present absent Present Absent RS 232C only Poedenespreet id mm ngg mre eroa po o C Up to 15 m 49 2 ft for RS 232C Transmission distance Up to 500 m 1640 5 ft for RS 422 Wweige feo g 1 39 e30 g 1 381 l E PP E ERA REER A MPC 0 2 x 3P Recommended RS 232C to RS 422 converter EL LINE M If the on demand function is used onty full duplex communications is available when full duplex communications is enabled 2 n for 1 n ratio is up to 32 Total of m and n for m n ratio is up to 32 3 Set the special function modules to have 32 inputs outputs when the 1 O allocation is set 4 Horizontal parity 3 SPECIFICATIONS MELSEC A al e e Abbreviation Computer mm e e DO ae o rem oe e Co reme ae o orem fewer eee on wusy oan om _ 7 enters se Receive carrier a te Gomer Data terminal Fig 3 1 RS 232C Connector Specifications 1 Signals are described below 3 2 2 RS 232C connector specifications 1 2 30 40 50 6 70 8 90 a FG signal Connect the cable shield to pin 1 of the AJ71C24 If both the computer and the AJ71C24 have an FG pin connect the cable shield to one of the FG pins only
23. 08 SDB gt PDA ect aoe RD RD RDB RoB rRe SG f SG j SG e E aaee oc LY ore e Dedicated Modes Ato D Main RS 232C Dedicated Modes 5 to 8 Dedicated Modes 5 to 8 No protocos Mode 9 Main RS 232C No protocol Modes 1 to 4 No protocol Modes 1 to 4 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A b A computer and station 0 AJ71C24 are connected through the RS 422 port Terminal resistance SW23 OFF SW23 OFF SW23 ON setting required Swe24 OFF SW24 OFF Sw24 ON Station 0 Station 1 Station n As7ic24 RS 422 Au7ic24 RS 422 AJ71C24 SDA A gt spa __ __spa SoB i S08 L SDB Roa 1 ttt pg tt RA l ee eyo l oe aaa Sane eae nee a aa ee Cee Dee ad Me Dedicated Modes 5 to 8 Dedicated Modes 5 to 8 Dedicated Modes 5 to 8 No protocol Modes 1 to 4 No protoco Modes 1 to 4 No protocol Modes 1 to 4 2 m n connection ratio a The computer and the AJ71C24 are connected through the RS 232C and the AJ71C24 modules are connected through the RS 422 m n mman ee Computer Computer Computer RS 232C RS 232C RS 232C SD sD sD l Ro wea oN swes oFF Ro awa F ao Ni a23 oN L To a SW24 OFF SW24 OFF L myst I SW24 OFF eee SW24 OFF station 9 esatton station 2 station a M71C24 AJ971024 AJ71C24 AJ71C24 RS 282C RS 232C RS 232C RS 232C s
24. A9H is written to address 5A2H Data BCH is written to address 5A3H E COMMUNICATIONS USING DEDICATER PROTOCOLS MELSECA 4 Parameter memory analysis request ACPU common command Designation Method Designation in protocol 1 is shown below Parameter memory analysis request command AJ71C24 Designation Example To request parameter memory analysis after writing parameter to the PC CPU in station number 5 Message wait time is 0 msec Check sum is calculated within this range AJ71C24 8 COMMUNICATIONS USING DEDICATED PROTOCOLS L MELSEC A 8 12 4 Sequence program read write 1 Commands and step allocation a ACPU common commands scll Code Except T C Reads main sequence pro Reads T C set values used in z Batch T C set value main R programs ae 53H Reads Roade subsequence program program on eaae ea Se n oe o e a tet enana ees fe dede Note Ouens Executable Karais Not executable Number of Points Processed Durin per Com STOP awaz munication Writing during a program run may executed out if all the follow ing conditions are met 1 The PC CPU is A3 ASN ASH A3M A73 or A3A 2 The program is not the currently running program indicates a subprogram called by the main program if the main program is being run 3 The PC CPU special relay is in the following state i M9050 signal flow conversion contact OFF A3CPU only il M
25. Fig 2 7 System Configurations VI 2 19 2 SYSTEM CONFIGURATIONS MELSEC A Range of PC CPUs with which communications is possible PC CPUs equipped with AJ71C24 MELSECNET Il MELSECNET B stations with which communications is possible M station master station 1 The self 2 Ali second tier local stations L1 L2 m 3 Second tier remote I O stations equipped with a special function module R3 e L stations local stations 1 The self 2 Second tier master station M station e L m station local third tier master station 1 The self 2 Second tier master station M station 3 All third tier local stations 11 13 4 Third tier remote I O stations equipped with a special function module r2 e station third tier local stations 1 The self 2 Third tier master station M station L2 m 2 SYSTEM CONFIGURATIONS MELSEC A MEMO 3 SPECIFICATIONS 3 3 1 MELSEC A SPECIFICATIONS General Specifications Table 3 1 General Specifications Operating ambient z Storage ambient A S os j i Operating ambient 10 to 90 RH no condensation Storage ambient 10 to 90 RH no condensation Accelera Sweep l 0 075 mm 0 003 inch 10 times ste aca Conforms to JIS C 0911 Vibration resistance 9 8 m s minute Shock resistance Conforms to JIS C 0912 98 m s 10g x 3 times in 3 directions By noise simu
26. Speci 64 words function 128 bytes ma sere ng vee ee et Reads main sequence programs 64 steps Reads T C set values used in main se 3 4 points 64 steps Other than T C set value Other than T C set value Reads subsequence programs 53H 52H Reads T C set values used in subsequence T C set value set T C set value programs Other than ER Writes main sequence programs T C set value EN yy 4DH 57H 64 points 64 steps Writes T C set values used in main se T C set value set value quence programs Other than A Writes subsequence programs l T C set value Ee ow 53H 57H 64 points 64 steps Writes T C set values used in subsequence T C set value set value programs Main UR SSH 52H Reads main microcomputer programs Sub vR 56H 52H Reads submicrocomputer programs 128 bytes Main UW 55H 57H Writes main microcomputer programs sn WW 56H 57H Writes submicrocomputer programs Peaches eH 128 bytes PR 50H 52H Reads parameters from PC CPU 128 bytes Batch write Pw 50H 57H Writes parameters to PC CPU Causes PC CPU to acknowledge and check Remote RUN 64 points Batch read Parameter E acon remote run stop of PC CPU Remote STOP PC CPU read Phy Reads the type of PC CPU A1N A2N ASN aa ON and OFF the global signat of the p
27. T C and device number in units of 1 10 nt device at random and sets resets the points evice Sets bit devices to be monitored such as X Y M in units of 1 device Sets bit devices to be monitored such 2n words as X Y M in units of 16 devices 320 points Sets word devices to be monitored ei as D R T C in units of 1 device aa data from devices for which device data has been registered Reads data in units of 1 device by desig nating the device numbers continuously regardiess of the extension file register block numbers 64 points vee cew n nans of EE bd by ously nating the device numbers continuous regardless of the extension file register 64 points block numbers Batoh read on 4 Reads the extension comment data 128 bytes Batch write ow Hi Writes the extension comment data The commands given in Table 3 4 can be used when the AJ71C24 is used together with the A2ACPU S1 or ASACPU The whole range of device memory is accessible using these commands For functions other than those listed in Table 3 4 use the commands given in Table 3 3 3 SPECIFICATIONS MELSEC A 3 3 2 Functions available in the no protocol mode 1 Functions in the no protocol mode Number of Point Processed per ouri During RUN eee Communications Yuring Sect ON Send PC APC CPU uses the TO instruction to 127 words CPU ex output data written to an AJ71C24 default value ternal buffer memory are
28. While receiving data from an external device in half duplex communications data is not transmitted from the AJ71C24 to the external device The key points for doing half duplex communications between an external device and the AJ71C24 using the RS 232C connector are as follows eSystem configurations and functions eBuffer memory settings eWiring eON OFF timing of the CD and RS signals of the AJ71C24 5 1 System Configurations and Functions The following figure shows a the system configurations of the external device and the PC CPU that can do half duplex communications and b the func tions of the AJ71C24 i No protocoi Dedicated Protocol Mode Bidirec tional Mode Data Communications by a Command Transmitted from the External Device Data Send from the PC Data Send CPU by the On and Data demand Function Receive o Usable x Unusable 1 During data communicates the send timing of data that a sequence program requested to send changes due to the on demand function See Section 8 14 2 The send timing also changes as mentioned in 2 below 2 Send timing of data sent from the AJ71C24 and the external device changes according to the set timing of priority non priority at the simul taneous transmission set with the AJ71C24 See Section 5 4 5 HALF DUPLEX SOMMUNICATIONS USING THE RS 232C INTERFACE MELSEC A 5 2 Buffer Memory Settings The following describes the buffer settings of the
29. Y60 and T123 contact in station number 5 Message wait time is 0 msec Check sum is calculated within this range J Pee ae ea ee On Sw Ao Hop YOn he Dre SOn Don Xor IEn I 54 m Sr 3 Rr i aA Indicates monitor registration in units of bits 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A Example 2 To register monitor data for D15 W11E T123 present value and Y60 to Y6F in station number 25 Message wait time is O0 msec Check sum is calculated within this range I t L tcf rpms peere 1 EIT N 1 sovooeopo A ABr A574 Be IOn y Ho n ruy Dra Stn 57 JO m SS vn SA SHB Th 54 Da oy Hoa 302g Indicates monitor registration in units of word The station number is designated in hexadecimal Therefore the desig nation of station number 25 should be made in 19H 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Using the JM or QM commands AnACPU dedicated commands Designation Method Designation in protocol 1 is shown below Monitor data registration bit command Designates the head device when a bit Monitor data registration word command device is designated in units of words Exampte Y000060 for the range of Y60 to 6F 1 To designate the device range the following conditions must be met e JM command 1 lt number of device points lt 40 QM command 1 lt number of device points lt 20 2 With the QM command word devices and bit devices 16 point units c
30. 14F lt 2 From buffer memory GOH From buffer memory area beginning with 81H ome l NO PROTOCOL M 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 2 Writing data to the send area TO TOP DTO DTOP Data written to the no protocol send area default OH to 7FH PC CPU AJ71C24 Buffer memory no protocol send area 5 Y n 1 0 Send request 3 5 Xn0 Send completed ok Send Send Send commend completed request X Xn0 Y 741 0 Write data Sets the send data and send data length when the send command signal X is turned ON _Oatasize 1 Writing data length setting QWriting send cata Writes the send data length and send data to the buffer memory hians the send request signal Y n 1 0 after Send completed is written aias 5 Canceling send request Tums OFF the send request signal when the data send completed signal Xn0 is turned ON 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A Example To transmit 5 word data after writing ABCDEFG CR LF to the buffer memory area from 1H when the AJ71C24 I O numbers are allocated to 60 to 7F Send command X60 Y70 To buffer memory With an A2ACPU S1 and A3ACPU it is possible to execute communica tions with an external device using the dedicated instructions for the A2ACPU S1 and A3ACPU For these dedicated instructions see the AJ71C24 S3 computer link module co
31. 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 4 5 4 Connecting a multidrop link and setting modes and terminal resistance The following gives an example of the multidrop link which consists of com puters and AJ71C24 modules Sections 4 5 2 and 4 5 3 explain the connection of the signal cables which are not shown in the figure SW23 SW24 shown above the AJ71C24 indicate the terminal resistance settings Mode to Main shown below the AJ71C24 indicate the ranges of the mode setting switches and the interface setting with the main channel setting switch only for related stations when a multidrop link is constructed Values in on the top row are for the dedicated protocol Those on the bottom row are for the no protocol mode Mode to Setting range of the mode setting switch for that station see Section 4 3 1 Main The interface on the main channel setting of that station see Section 4 3 2 Only those for related stations are shown Set the terminal resistance of the stations which are connected to both ends of the RS 422 line to Enable when a multidrop link is constructed 1 1 n connection ratio a A computer and station 0 AJ71024 are connected through the RS 232C port SW23 ON SW23 OFF SW23 ON SW24 ON Sw24 OFF SW24 ON Computer l Stationo EA Station RS 2320 agic24 RM422 Anoa PS42 AICA SD sD SDA ATTN sa On SDA SDB
32. 5 Toload the AJ71C24 onto the base press the AJ71C24 against the base so that the latch is securely locked To unload the AJ71C24 push the latch and after the latch is disengaged from the base pull the AJ71C024 toward you 4 4 2 installation environment Never install the system in the following environments 1 Locations where ambient temperature is outside the range 0 to 55 C 32 to 131 F 2 Locations where ambient humidity is outside the range of 10 to 90 RH 3 Locations where dew condensation takes place due to sudden tempera ture changes 4 Locations where there are corrosive gasses and combustible gasses 5 Locations where there is a high level of conductive powder such as dust and iron filings oil mist salt and organic solvent 6 Locations exposed to the direct rays of the sun 7 Locations where strong power and magnetic fields are generated 8 Locations where vibration and shock are directly transmitted to the main unit 4 10 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 4 5 External Wiring 4 5 1 Precautions during wiring Externa wiring which is resistant to external noise effects is a prerequisite for reliable AJ71C24 operations full use of all available functions When doing external wiring of the AJ71C24 the following precautions must be taken 1 Keep main circuit wiring high voltage wiring and other load carrying wiring outside the PC CPU separate fr
33. 500 m 1640 5 ft and the RS 232C is used to connect short distances up to maximum of 15 m 49 2 ft 3 To have the RS 232C communicate over a distance greater than 15 m 49 2 ft use a modem or RS 232C RS 422 converter between the external device and the AJ71C24 Fig 2 3 System Configurations Il 2 7 2 TEM CONFIGURATIONS sb MELSEC A 2 The following tables list the functions available when an external device is linked with the PC CPU modules to make a 1 n configuration a The interface used to set dedicated protocols 1 to 4 1 Functions available when using an external device interfaces for Dedicated Protocol Availabte Functions Read write Extension file register Test tion module s Read write buffer memory Sequence microcomputer Read write program Including exten Parameter Read write Remote RUN STOP PC CPU PC CPU type read Input signal X ON OFF Self loopback Transmission test of received data Including exten sion devices Buffer memory AJ71024 of the self Special func M CONFIGURATION 2 SYSTEM C G ONS MELSEC A 2 Functions available when using a PC CPU Interfaces for Dedicated Available Functions Protocol Cea e b Interfaces used to set the no protocol mode Data transmis sion to external devices Functions available when using an external device and a PC CPU
34. 7922 to 7928 APP 16 APPENDICES MELSEC A d A616DAI digital analog converter module A616DAI digital analog converter module Address Set by Address Set with Computer FROM TO instruction CH 3 digital value SH CH 4 digital value fen Seighaiveiwe E fen raighalvae PE fon eaigtalvae T one aigiaivane a 2H CH A digital value 44H Bufter Memory Contents D A conversion enable disable channel Analog output enable disable channe Unused area unavailable CH 0 digital value 30H CH 1 digital value CH 2 digital value PAH CH B digital value 46H BH CH C digital value 48H CH E digital value 4CH Unsed area unavailable to 2FH CH O set value check code 7u OH CH 1 set value check code 72H STH CH 2 set value check code 74H 2H CH 3 set value check code 76H SSH CH 4 set value check code 78H CH 5 set value check code 7 AH oH Seeivalue checkeode TCC eH Sevan shock sose wad CH A set value check code 3AH 3BH CH C set value check code 88H 3CH CH D set value check code CH B set value check code CH E set value check code c I CH F set value check code 3FH APP 17 APPENDICES MELSEC A APPENDIX 8 Sequence Program Examples Showing How to Output Word Device Data to the Printer in the No protocol Mode This program gives an example of outputting the data registers D link registers W and file registers R and
35. AJ71C24 for doing half duplex communications Perform the following settings with the sequence program only when the AJ71C24 READY signal is turned ON after the CPU is reset or when the PC CPU is turned ON or b the higher byte in the mode switching designation area address 119H of the AJ71C24 s buffer changes to 02H when the mode is switched Section 7 2 gives setting details 1 2 Communications setting using the RS 232C interface Address 10FH Set 1 to do half duplex communications Setting of priority non priority at the simultaneous transmission Address 110H When the AJ71C24 and the external device begin transmitting data simultaneously in half duplex communications designate a continua tion priority of the send from the AJ71C24 or b interruption non priority Set 0 to designate priority Set 1 to 225 to designate non priority This set value is the send wait time unit 10 msec until data transmis sion starts after the data send state is restarted When an AJ71C24 is set to priority the AJ71C24 keeps on transmitting data and ignoring received data Even if data is transmitted from the external device after the AJ71C24 has started data transmission The external device that transmits data must execute the following so that the AJ71C24 does not ignore received data eTransmit response messages to start communications eResend data when a time out error of a response m
36. Hsoso ASSH Stored data using the sequence program in 1 above Buffer memory TO instruction Write the data to the buffer memory Print out D10 1234 APPENDICES MELSEC A 8 2 When the AnACPU is Used The following is a program example using A2A S1 A3ACPU dedicated instruction BINDA to execute the same processing as the program shown in 8 1 To output data stored in register D10 to K6PR print data D10 X0C7 A byte is set as a unit of the send data a RS 232C CD terminal check disabled is set X000 M9039 19 t PLS Mo MO 24 ser m Lasc bios 031 Print command is converted to pulse M1 for print instructions is set Index title is converted to ASCII CR LF code is set for printing MOVP HOAOD D36 The processing method of D 3 of BINDA SET _ M9049 Adarre Output data is converted to ASCII LEDA BINDA a converting D10 to ASCII a Tepe bio character string is stored in D33 to D35 M1 X0CO X0C7 YODO akan Data is transmitted Head VO address of AJ71C24 is set Send data length 12 bytes is set Send data storage head device is set Bit device turned ON at send completion is set When transmission is completed print command M1 is reset CIRCUIT END Appendix 8 1 gives the AJ71C24 transmission specification setting for outputting data to the printer PP ICES sella lake
37. MELSEC A APPENDIX 9 Example of a Sequence Program for Data Communications in the Bidirectional Mode The following figure gives the example of a sequence program for transmit ting data received from the computer and the data of the data register D100 of a PC CPU to the computer in the bidirectional mode PC CPU AJ71C24 AS71C24 Computer Received data read _ FROM Send data write TO SS Send result read FROM 1 Settings to the buffer memory The figure below describes settings at the special applications area of AJ71C24 buffer memory Appendix 11 gives details of the memory setting record form APP 21 APPENDICES MELSEC A Dedi No Bidirec Default ipa tn T ia No protocol receive compieted code setting ie area mes LF ErrorLEDON status storage area lt Error LED Error LED ON status storage area status storage area ee eee ea Neprotovs word byte sening aroa No protocol send buffer memory head ad dress setting area No protocol send buffer memory length set ting area No protocol receive buffer memory head ad dress setting area No protocol receive buffer memory length setting area No protocol receive compietion data length 127 setting area words On demand buffer memory head address setting area On demand data length setting area On demand data length setting area demand data length setting area e
38. Mode Available Functions sma computer ee sees computer Receive Computer to From computers PC CPU 2 SYSTEM CONTIGURATIONS MELSEC A 2 3 2 1 n ratio of an external device to PC CPUs 1 The system configurations for a 1 n up to 32 stations ratio of an external device such as a computer to PC CPUs are shown in Fig 2 3 below Mode to in the figure the range of setting set with the mode setting switch of an AJ71C24 see Section 4 3 1 System configuration 1 The external device is connected to the AJ71C24 modules using the RS 232C External Set all AJ71C24s to the device computer same protocol Gea RS 232C interlace Computer link modules AJ71C24 RS 422 interface RS 422 cable RS 422 interface RS 422 cable RS 422 interface Maximum of 32 stations System configuration 2 The external device is connected to the AJ71C24 modules using the RS 422 ind Set the RS 422 of all AJ71C24s computer to the same protocol Computer link modules C2 RS 422 cable Mode 1 to 8 Mode 1 to 8 RS 422 interface RS 422 cable RS 422 interface Maximum of 32 stations 1 When the mode setting is 5 to 8 the RS 232C interface which is not used for the multidrop link can be used for communications with a computer a printer or a CRT in a no protocol bidirectional mode 2 Use of the RS 232C and the RS 422 interfaces differs in that the RS 422 is used to connect long distances up to
39. O1F4H in hexadecimal AJ71024 Indicates that 1055H is written to step 500 1F 4H 40FAH is written to step 501 1F5H 2A05H is written to step 502 1F6EH 70A8H is written to step 503 1F7H 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A Example 2 To write set values to 4 points T100 to T103 of the main sequence program of the PC CPU in station number 5 Message wait time is 0 msec Check sum is calculated within this range 1 I Computer Be ae ene t AR N n3 De 31m o Duy Da Pa Dry Ba Day Ba Eny S32 5 35 T100 is designated as FE64H Indicates that 4001H K16385 is set to T100 8002H D1 is set to T101 0502H K1282 is set to T102 832E D407 is set to T103 8 ATIONS USING DEDICATED PROTOCOLS 8 COMMUNICATIONS USING DEDICATE EEGA 8 12 5 Microcomputer program read write 1 Commands and addresses Commands and program addresses to read and write microcomputer programs are explained below a ACPU common commands Sym ASCII bol Code Main UR 55 52H Reads microcomputer main programs 128 bytes sub vR 56H 52H Reads microcomputer subprograms Main SSH 57H Writes microcomputer main programs Batch write 128 bytes sub w 56H 57H Writes microcomputer subprograms Note C Executable Kseavecis Not executable Number of Points Processed per Communice ti Writing during a program run may be executed if all the following c
40. PC CPU on the data link system is replaced by a different model PC CPU start up the AJ71C24 again First reset the power supply to the self station s PC CPU then reset the CPU and then switch the mode of the AJ71C24 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 3 Basics of Dedicated Protocol Control Procedures 1 Reading data by the computer from the AJ71C24 a Areas A and C indicate transmission from the external device to the AJ71C24 b Area B indicates transmission from the AJ71C24 to the external device c Computer programs are created so that all data is transmitted from left to right Example In area A data is transmitted to the right after the ENQ signal d Area C of the program completes data communications whether communications are being carried out or not and permits the next data communications to be carried out 2 Writing data by the computer to the AJ71C24 a Area A indicates transmission from the external device to the AJ71C24 b Area B indicates transmission from the AJ71C24 to the external device c Computer programs are created so that all data is transmitted from left to right Example In Area A data is transmitted to the right after the ENQ signal l T S COMMUNICATIONS a eee a 8 4 Basic Formats of Dedicated Protocol There are 4 formats of control protocol Any of these formats can be designated by selecting the mode setting switch Sectio
41. PR EPEA programs Execute subsequence T C set value read command SR Execute microcomputer main program read command UR Execute microcomputer sub program read command VR Execute comment data read command KR if there are no microcomputer programs _ if there is no comment data it there is no extension comment data Execution possible only with pate A2A CPU and A3A CPU S COMMUNICATIONS USING DEDICATED PROTOCOLS _ MEISEC A 2 Writing Place the PC CPU in the STOP status using the remote STOP function see Section 8 11 Execute parameter data write Execute parameter analysis Execute main sequence program write command MW Execute main sequence T C set value write command MW if there are no subeequence programs Execute subsequence program write command SW Execute subsequence T C set value write command SW if there are no microcomputer programs Execute microcomputer main program write command UW Execute microcomputer sub program write command VW if there is no comment data Execute comment data write command KW if there is no extension comment data Execute extension comment Execution possible only with data write command DW A2A CPU and A3A CPU feta After writing the program return the READ COMPLETE PC CPU to the RUN status see section 8 11 T R 9 COMMUNICATIONS USING DEDICA TED PROTOCOL
42. RS 422 interfaces can be switched to another mode 4 No protocol mode Dedicated protocol Between formats 1 to 4 bS Bidirectional mode 1 1 5 Transmission control function Data communications between the AJ71C24 and an external device can be controlled by using DC codes or DTR DSR signals 1 Control using DC1 DC3 or DC2 DC4 codes This function can be used for controlling data communications with an external device connected to the AJ71C24 at the RS 232C RS 422 interface e DC1 DC3 control refers to using the DC1 and DC3 codes to notify the communicating device of the enabled disabled state of data receive e DC2 DC4 control refers to using DC2 and DC4 codes to indicate the valid range of send receive data e Data to be sent received must begin with DC2 code and end with DC4 code a w Je 2 Control using DTR DSR signals This function can be used for data communications with an external device connected to the AJ71C24 at the RS 232C interface DTR DSR control refers to using the DTR and DSR signals to notify the communicating device of the enabled disabled state of data receive of the AJ71C24 or external device e The AJ71C24 controis the DTR signal as follows When data can be received Turns ON the DTR signal When data cannot be received Turns OFF the DTR signal The AJ71C24 controls the DSR signal as follows When the DSR signal is ON Sends when send data exists When the DSR signal is OFF Sends on
43. Set bits b1 to b15 of address 111H either to 0 or 1 The AJ71C24 will ignore the settings The CD terminal check is set to Enabled Half duplex transmission is used and the non priority of transmission and not resend are set Send wait time 300 msec AJ71C24 I O addresses 80 to 9F Sequence Program oe doe eee Write 1 to buffer memory address 10FH top Hs Hno k k Write 3 to buffer memory address 110H Leave the setting of buffer memory addresses 10BH and 111H for defauits INITIAL SETTING OF TRANSMISSION CONTROL DATA TO 7 BUFFER MEMORY 2 To set half duplex transmission non priority and resend Setting Method 1 Transmission method b1 bO b15 to Write 1 C Full duplex transmission 1 Halt duptex transmission Set bits b1 to b15 of address 10FH to either O or 1 The AJ71C24 will ignore the settings 2 Priority setting when transmission has begun simultaneously bo b15 to ii a Write 1 to 255 This data sets the transmission wait time when data pls is started or restarted Unit 10 msec 3 Transmission method when data transmission is restarted b1 bO b15 to Write 0 This can be omitted since the defaut is 0 0 Not resend amp Resend Set bits 61 to b15 of address 111H to either O or 1 The AJ71C24 will ignore the settings The CD terminal check is set to Enabled Half duplex transmission is used and the non priority of transmission an
44. a no protocol mode and a bidirectional mode are also available The user can select and set these independently for the RS 232C and RS 422 ports When using a dedicated transmission protocol or the no protocol mode bidirectional mode data is transmitted using the codes as shown below Computer Transmission data ASCII code Transmission control codes Transmitted data RS 232C or RS 422 cable Automatic communications after the sequence program ASCII code Read Write Transmitted data Transmitted data A PTET TELE eames ce sae reed Fig 1 1 Data Transmission with the Dedicated Protocol RS 232C or RS 422 cable Sequence program External device TO FROM instructions such as a computer printer Data is transmitted in unchanged code through the bufter memory Fig 1 2 Data Transmission in the No Protocol Mode Bidirectional Mode 1 GENERAL DESCRIPTION MELSEC A Compared with the AJ71C24 S3 and AJ71C24 S6 computer link modules the AJ71C24 S8 supports the following six additional functions 1 to 6 are the additional functions when compared with the AJ71C24 S3 1 2 3 4 Commands dedicated for use with the AZACPU S1 and ASACPU All memory devices of the A2ACPU S1 and ASACPU the AnACPU in this manual are accessible using these dedicated commands Data transmission in the bidirectional mode This feature allows the AJ71C24 S8 to interface
45. are used eSection 9 5 5 gives details about the no protocol received data clear request area when the no protocol mode is used eSection 10 gives details about the special applications area when the bidirectional mode is used 1 This section also discusses changing the default values set in the special applications area in the buffer and reading the present values of the special applications area It is not necessary to write setting values to an area where default values do not have to be changed 2 When changing a setting except for the two areas indicated below either a turn ON the power supply or reset the PC CPU and change the setting after the AJ71C24 READY signal Xn7 goes ON or b switch the AJ71C24 mode and change the setting after the higher bytes in the designated mode switching area of the AJ71C24 buffer are moved into 02H e Error LED turn OFF request area address 102H eMode switching designation area address 119H Example How to disable the RS 232C CD terminal check function Xn7 interlock signal top He Hi0B K ki 3 Buffer memory addresses 10E and 11DH to 11FH are reserved for the system only Writing data to these addresses precludes normal opera tion of the AJ71C24 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 1 Setting RS 232C CD Terminal Check Enable Disable Setting this RS 232C CD terminal check function to enable or disable deter min
46. as X Y 20 words 1 M in units of 16 devices 320 points 57H 4DH Sets word devices to be monitored such as D R 20 point T C in units of 1 device poins Reads data from devices for which device data 10 points Exten sion file register 10 points Batch write Aes wes extension file registers R in units of 1 64 points gister makes a random write Word registration has been made units Reads extension file registers R in units of 1 Test Specifies the extension file registers R in units random write of 1 register using block or device number and Monitor data Sets the extension file registers R device num 20 points registration bers to be monitored in units of 1 register po Monitors the extension file register after monitor data registration 3 SPECIFICATIONS aoan MELSEC A PC CPUs with Which the Command can be Executed a esl CPU State Reference A73 Fa ee ced cee SW22 ON are 3 SPECIFICATIONS MELSEC A Table 3 3 Functions List When Using a Dedicated Protocol Continued ASCII Code Reads data from Al ble for com Buffer memory the sequence program memory Writes data to the and the external Batch write 43H 57H AJ71C24 buffer devices when a multi memory drop link is made Reads the contents of the special function Number of Point Processed per Communications 64 words 128 bytes
47. c When the above mentioned OS area has no vacant area receiving data causes an error and the data is ignored until the OS area has enough vacant area When this happens the 2 SIO LED goes ON see Section 4 2 2 4 AJ71C24 DSR control a When the AJ71C24 DSR signal is ON if there is send data that data will be sent to an external device b When the AJ71C24 DSR signal is OFF even if send data exists that data will not be sent to an external device 3 SPECIFICATIONS MELSEC A 3 5 3 DC1 DC3 transmission control This section describes DC1 DC3 transmission control 1 What is DC1 DC3 transmission control When data communications is executed in the no protocol mode this notifies the external devices whether the AJ71C24 can or cannot receive data using the DC1 DC3 code 2 Received data flow and control operations a Received data flows in the same way shown in Section 3 5 2 2 Data transmission is controlled in the same way as the DTR control shown in Section 3 5 2 3 The AJ71C24 sends DC1 or DC3 to the external device without turning the DTR signal ON OFF Section 3 5 2 gives details about DC1 DC3 transmission timing DTR signal state corresponds to the data transmission as shown below DTR control DC1 DC3 transmission control DTR signal is OFF DC3 transmission DTR signalis ON DCi transmission After reading from the sequence program b Clear the received data as shown in Section 9 5 This
48. characters number of bytes number icheck hexadecimal hexadecimal of bytes x 2 characters code Destination of the device range for writing 1 byte uses 2 characters Therefore 1 byte data is ex _ pressed in 2 digits hexadecimal To set the number of bytes the following conditions must be met 1 lt number of bytes lt 128 e Head address number of bytes 1 lt extension comment memory capacity Designation Example To write 4 bytes of extension comment to the extension comment memory area beginning with OBB8H 3000 in decimal in station number 0 Message wait time is 0 msec Check sum is caiculated within this range F FIO W coos Besos cia als sii aires Computer 6 Ove 46 tEn 4410157 nf Wuj Or Du 42a 2 l On Hu Sn Pap ula Ine CELTES AJ71024 M 2 B 4 Indicates that 1 56H is written to address OBBSH 2 SAH is written to address OBB9H 3 B5H is written to address OBBAH and 4 12H is written to address OBBBH 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 13 Global Function The global function is used to switch the Xn2 input signal at each AJ71C24 in all stations connected to the computer by the multidrop link This function is used for emergency instructions simultaneous start etc to the PC CPU 8 13 1 Commands and control 1 ACPU common commands State of PC CPU or PC CPU Processing During os mis EIE TAA EAEE AET Xn2 of the AJ7
49. correct the connection E 8 Does AJ71C24 CD signal repeatedly switch ON OFF NO When the AJ71C24 CD signal in the YES ful duptex transmission is controlled by the computer either a control the signal so that it is o always ON or b set the CD Consult the nearest Mitsubishi termina check to disabled representative Set the RS 232C CD terminal check to enabled in the half duplex communications Also set the computer so that the signal turns ON OFF at the timing mentioned in Section 5 4 11 8 11 TROUBLESHOOTING MELSEC A 11 3 6 When undecoded data is transmitted Use this flow chart when the AJ71C24 in response to data from the com puter transmits code and data which is not included in the control code Undecoded data is transmitted Correct the parity setting Correct the data length setting Correct the stop bit setting Match the computer and the AJ71C24 transmission speed settings terminal resistance set to present at the end stations of the munidrop ink Set the termina resistance to YES present Are all interfaces set to mode 1 to 8 to work Set the modes correctly YES Consult the nearest Mitsubishi if mode 9 to D is set when interfaces representative are working independently noise interference may occur between used and unused interfaces 11 9 APPENDICES APPENDICES MELSEC A APPENDIX 1 Precaution
50. differs between the AJ71C24 and the AJ71C24 S8 The User s Manual for each type of module gives details APPENDICES MELSEC A 1 3 Function Comparison SS Xn7 of the I O signals for the PC Set whether or not the AJ71C24 S8 2 RS 232C CD terminal check Always checked checks the CD signal Em Since the ON OFF status of the Error occurrence is error LED is stored in buffer Display area confirmed by the memory communications errors play LED on the front can be checked with the PC CPU panel of the module by reading the buffer memory with a sequence program To turn OFF The request signal to turn the error the error ne ore must display OFF can be output with a display F sequence program Com mand Extension file registers R are Batchread ER read in units of each register Batch wrie Ew Data is written to extension file registers R in units of each register Test random write Transmission error information To write data block numbers and device numbers are designated for the extension file registers R at random in units of each register The extension file registers R to Monar ee be monitored are set in units of 9 each register Exten sion file registers The extension file registers FR set for monitoring are monitored Batch Main UR Main microcomputer program is read read Sub VR Sub microcomputer program is
51. disabied Send request Y n 1 0 Send completed Xn0 TO processing The send completed signal Xn0 eee data length Turned ON OFF by program is turned ON when the response Data to be send message is received 1 An error occurs if the send data length is a greater than the send area or b equal to 0 In this case 1 is written as send error information to the most significant bit bit 15 of address 116H data send error storage area in the special applications memory area see Sections 10 2 and 11 2 The send data length written to the head address is transmitted as the data length 10 24 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 3 Transmission program examples Example 1 Check sum enabled In word units buffer memory area allocation default To transmit AJ71C024 from the PC CPU to a computer after writing it to buffer memory AJ71C24 I O address 80 to 9F PC CPU program example XO xao YSO If M100 is on error processing is executed according to error code stored in D100 10 25 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A Example 2 Check sum disabled in byte units send data area allocation default To transmit character data AJ71C24 and integer data 123 decimal from the PC CPU to a computer after writing it to buffer memory AJ71C24 I O address 80 to 9F 1 t 1 i i i OOOAH JA TJ 1711 C 12 4 If 0O7BH t i
52. eee ee eens APP 6 APPENDIX4 ASCII Code Table 00 ccc ce ccc eee te ete eee etre n enna APP 7 APPENDIX 5 Communications Time between a PC CPU and an AJ71024 APP 8 APPENDIX6 Precautions During Communications When Using RS 422 Interface APP 11 APPENDIX 7 Special Function Module Buffer Memory Addresses 06 APP 13 APPENDIX8 Sequence Program Example Showing How to Output Word Device Data to the Printer in the No Protocol Mode APP 18 8 1 When Other Than AnNACPU is Used 2 0 eee eee cere cee reece APP 18 82 When the ANACPU is Used 2 0 ccc ccc cece cece ete nent eee eee eneee APP 20 APPENDIX 9 Example of a Sequence Program for Data Communications in the Bidirectional Mode 26 cece eee eee e ee tee eee enee APP 21 APPENDIX 10 External View 20 6 ccc ccc rete eee e eer e ete e nee e eee seeerencs APP 24 APPENDIX 11 AJ71C24 Setting Record Form cece cece cece rene enes APP 25 Vvi 1 GENERAL DESCRIPTION MELSEC A 1 GENERAL DESCRIPTION This User s Manual describes the specifications handling and transmission control protocols of the AJ71C24 S8 computer link module The AJ71C24 S8 has one RS 232C port and one RS 422 port It is the interface between a PC CPU and an external device such as a computer or printer or to the CPU of another PC station Dedicated transmission protocols 1 to 4 are used as transmission control procedures on the AJ71C24 S8 and
53. external device at every timing mentioned by 1 to 6 in the above figure The signal name is the signal of the AJ71C24 As described in 1 turn ON OFF the CD signal of the AJ71C24 with the external device and do data transmission to the AJ71C24 Note that 5 and 6 are different in the non priority setting 1 When not transmitting data from the external device to the AJ71C24 turn the CD signal OFF 2 When doing a data send check the RS signal If the RS signal is OFF turn the CD signal ON If the RS signal is ON wait until it turns OFF After the RS is turned OFF turn the CD signal ON 3 After turning the CD signal ON transmit data 4 After completing the data send turn OFF the CD signal 5 Even if the RS signal turns ON during data transmission continue the data send to the AJ71C24 This occurs when the AJ71C24 and the external device start data transmission simultaneously 6 After the send from the external device is completed transmit data from the AJ71C24 to the external device Section 5 4 2 gives details When OTR DSR control is being executed When a starting or during data transmission to the AJ71C24 and b if the OTR ER signal of AJ71C24 turns OFF interrupt data transmission until the DTR signal turns ON See Section 3 5 2 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE MELSEC A 5 4 2 Data transmission timing from an AJ71C24 External device AJ71024 SD send d
54. following timing the timing at which the X1A1 signal in the program example in 4 is turned on When the data length in the message and the set data length bytes or words as set in address 103H have been received e if the check sum is processed when the check sum has been received with the above mentioned data area Example Word byte setting Word units Data length in message 10 in this case the AJ71C24 makes a read request to the the sequence program at the time 10 words of data pius the check sum have been received When the read request Xn1 for the received data is made read the data length and that length of data with a FROM instruction in a sequence program and turn OFF the received data read completed signal Y n 1 1 10 20 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 3 Data receive processing Data Data ZS ee AJ71C24 Check sum disabled Turns ON read request signal Xn1 after the set data length has been received Received data read request Xn1 Received data read completed Yia 1 1 amp FROM Turns ON OFF 4 Data receive program examples Example 1 Check sum enabled in word units buffer memory area allocation default To store AJ71C24 received from a computer to DO to D4 of a PC CPU AJ71C24 I O address 1A0 to 1BF l t i i 04 6 000 41 4A 370 3m 43u 320 540200 COm Ol u Data area a eea e AJ71C24
55. following opera tions e AJ71C24 initial processing Returning the data in the special applications area to the default state except for the mode switching designation area address 119H Clears received data Mode switching Setting the switched mode number to the mode setting state storage area address 118H 5 After completing step 4 the AJ71C24 turns ON its READY signal overwriting 02H to the higher bytes in the buffer s mode switching designation area Mode switching completed Switched to this mode number designated in step 2 6 Write the set data for communicating data in the switched mode in accordance with the higher bytes changed to 02H to the AJ71C24 buffer s special applications area using a sequence program However writing the set data is unnecessary if data can be communi cated using the default data in the special applications area 7 Use a sequence program to read the data in the AJ71C24 buffer s mode switching designation area and write OOH to the higher bytes FROM P 119H 02H O JH 02H O JH WAND 16 bit logical OOFFH product TOW Sets the higher bytes to OOH 8 After switching the mode communicate data to provide an interlock between an external device and the AJ71C24 This operation notifies all connected devices that the special applica tions area setting has been completed and that data communications is enabled in the switched mode
56. from a computer to an AJ71C24 The AJ71C24 checks and processes the check sum received It is not possible to read the check sum from a sequence program When the setting is check sum is disabled the received data following the data of the designated length is ignored up to the next control code Example Check sum when transmitting AJ71C24 and value 100 units bytes is processed as follows 4 OAH OOH 41H 4AH 37H 31H 43H 32H 34H 3AH 64H OOH Sum 0244H b15 b8 b7 Q bi bo H to Memory contents o o o o o o o o a o jojo 1 o 1 o at 0144H 02H 44H D 5 Error code An error code indicates the error content when an NAK response is received The code is transmitted and received in the range of 0001H to OOFFH Section 11 2 gives error code details a Data send from an AJ71C24 to a computer The AJ71C24 appends the error code When transmitting an error code the AJ71 C24 writes the same error code to its error code storage area in the received data buffer memory area b Data send from a computer to an AJ71C24 The AJ71C24 writes the received error code to the error code storage area in its send data buffer memory area In bidirectional communications check sum and error codes are all binary data Note that in the dedicated protocol they are handled in ASCII code 10 16 MELSEC A 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 10 6 Processing an A
57. from the PC CPU to the computer Block St PC Error No No No code LO Sn Ph LIH L Ores ee ae el es PS i jejee s ps H LIH LTH L H L HOL To write data Bk a re from the od No No No computer to M LH LIH L the PC CPU Transmission sequence N Block se PC Enor K No No No code HLTH LIM LHL 1 The sum check is enabled by DIP switch 21 The sum check code only exists when the sum check is enabled by turning DIP switch 21 ON 2 The sum check is made for characters marked in these diagrams 3 In these diagrams the contents of character area A character area B and character area C depend on the individual system For details see the relevant sections The contents of all character areas are the same for all 4 formats Remarks USING DEDICATED PROTOCOLS 8 COMMUNICATIONS MELSEC A 8 4 3 Control format 3 St No Station number Control Protocol S amp ec E K T Transmission sequence x No No xX eee H LIH E To read data No No mand x code from the PC HitlHtlH Lt HL CPU to the computer To write data from the computer to ae the PC CPU Transmission sequence s Pc Error E No No code x H L H L Hot The sum check code only exists when the sum check is enabled by turning DIP switch 21 ON 1 The sum check is enabled by DIP switch 21 2 The sum check is made for characters marked in these diagram
58. have begun sending data to each other at the same time Priority non priority setting at simultaneous transmission eWhether or not the AJ71C24 transmits data again from the beginning or from the point where transmission stopped when it restarts transmission Trans mission method when the transmission restarts Set the transmission method which conforms to the specifications of the connected device eWhen full dupiex transmission is used settings with buffer memory addresses 10FH 110H and 111H are not required eSection 5 2 gives settings required for half duplex transmission eWhen using half duplex transmission set the RS 232C CD terminal check to Enabled see Section 7 1 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 2 1 Setting priority of transmission to the AJ71C24 using half duplex transmission The following shows how to set the AJ71C24 to continue transmission when the AJ71C24 and an external device using half duplex transmission have begun sending data to each other simultaneously Setting Method 1 Transmission method b15 to b1 bO lt lt Dota 0 Write 1 0 Full duplex transmission 1 Half duplex transmission Set bits b1 to b15 of address 10FH to either O or 1 The AJ71C24 will ignore the settings 2 Priority setting when transmission has begun at the same time b15 to bo a Detaute 0 Write 0 This can be omitted since the default is 0
59. if the cable shield is connected to both FG pins the resulting noise may prevent correct data communications b RS signal The AJ71C24 system turns ON OFF the RS signal according to the setting of the CD terminal check see Section 7 1 and the transmis sion method see Section 7 2 as shown below Trans iol of mission eee nay st he CD RS Signal ON OFF Control Method 9 Signal on AN the AJ71C24 is in the ready state the Emsa on A system turns RS signal ON eu emsa ON The AJ71C24 system turns the RS signal OFF P Disabled ON When the AJ71C24 is in the ready state the AJ71C24 veo OFF system turns the RS signal ON normally ON Enabled aia always set See Section 5 p to enabled E Data transmission from the external device should be done confirm ing the RS signal controlled by the AJ71C24 c CS signal Data is only transmitted from the AJ71C24 when this signal is ON 3 SPECIFICATIONS re MELSEC A Sea d DSR signal e During DTR DSR control when this signal is OFF data is not transmitted from the AJ71C24 to an external device If DTR DSR control is not executed the DSR signal status will be ignored When the external device can receive data make sure that this signal is ON e CD signal eee CD Terminai Check Enabled CD Terminal Check Disabled Half i oe ee ERIN The AJ71C24 operates according to the setting of the CD termi
60. is necessary to send a turn off request to address 102H of the buffer memory using the sequence program TO instruction to turn OFF the LED LEDs RUN to 4 RD LED Nos 0 to 11 and CPU R W LED No 25 above light corresponding to the relevant status LEDs 2 C N and 4 C N LED Nos 16 and 20 above light in the following circumstances a When the AJ71C24 attempts to make an illegal access while the PC CPU is running a write during program execution for example b During abnormal PC CPU access The initial state column indicates the status when the power is turned ON or the PC CPU is reset wa om EE 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 43 Settings This section describes the setting methods and explains the settings of the transmission contro protocol and communications specifications data length sum check etc After changing the settings turn the PC CPU power supply OFF and back ON or reset the PC CPU 4 3 1 Setting the dedicated protocol no protocol mode or bidirectional mode 1 The method of setting the transmission control protocol and the meaning of the switch settings are described in the table below When the mode switch is set to 1 to 8 and the bidirectional mode setting area in the buffer memory is set to 1 the no protocol mode in the following table changes to the bidirectional mode All mode settings in the following table are in the no protocol mode Mode Settings
61. length of data data receive in fixed length a By receiving the receive completed code variable length The AJ71C24 makes a request to read the received data to the sequence program when it receives the receive completed code predetermined by the user and set to the AJ71C24 buffer memory The default receive completed code is CR LF ODOAH but this may be changed to any value in the range of OOOOH to OOFFH For the procedure to change the read completed code see Section 7 4 1 9 COMMUNICATIONS IN THE NO PROTOCOL MODE AJ71C24 program XY 1 Setting received data length MELSEC A Buffer memory no protocol data receive area 1 OS area Received data Data 1 _ ____ Data 2 Data 3 Data n 1 Data n ai Data n 1 Completed code L Data n 2 PC CPU 2 Received data read request 2 279 bytes b By receiving the set data length fixed length The AJ71C24 makes a request to read the received data to the sequence program when it has received the set length of data from an external device Using this method it is possibie to receive fixed length data Default setting is 127 words but this value may be changed as required For the procedure to change the data length setting see Section 7 4 2 AJ71024 Buffer memory no protocol data receive area 1 os area jo ___ ______ __ Data 1 Received data Sequence
62. mode switching cece cece een eens 3 16 3 4 2 Procedure for switching the mode from an external device 3 20 3 4 3 Procedure for switching the mode from aPC CPU cc eee ee 3 22 3 5 Data Communications Transmission Control Function 0 0 c cece eens 3 24 3 5 1 Precautions when controlling transmission cee ee eee err 3 24 3 5 2 DTR DSR ER DR Control 6 ec cece eee eee e teens 3 28 3 5 3 DC1 DC3 transmission control 2 0 ccc ccc eee e teen eee neeee 3 30 3 5 4 DC1 DCS receive control 20 ec eee tee tect ene eeneees 3 31 3 5 5 DC2 DC4 send control ccc cece cee tee eee ee eet eeteene 3 32 3 5 6 DC2 DC4 receive control cc cece cece eet renee reese eeeeees 3 32 3 6 WO Signals List for CPU seose cc cece cree e eee ee et E A 3 33 3 7 Buffer Memory Applications and Aliocation 0 cece cere eee eee 3 36 SETTINGS AND PROCEDURES BEFORE OPERATION 0 0005 4 1 4 21 4 1 Settings and Procedures before Operation cece cece cette tree ees 4 1 4 2 Nomenclature no cee tenin ace iE EE E E ee CED Ree donee ate da eg ae aes 4 2 4 2 1 NOMONCIATUIG n nsi sea sce ee ema od eae ENEE eee Kare Re ee ae 4 2 4 2 2 LED signals and displays 0 cece ccc cece cece eee eee tneae 4 3 4 3 Settings weaker a tetas ti 4 a REN Teed ea eae MA Nees 4 5 4 3 1 Setting the dedicated protocol no protocol mode or bidirectional mode 4 5 4 3 2 Setting of transmission s
63. of device points is 02 because memory is used in units of word A B 1 2 3 4 e 2 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 2 Word device memory read and write In the word device memory each word is expressed sequentially in hexadecimal values in 4 bit units from the higher bit Example Indication of the contents of the 0350 and D351 registers Number of device points is 02 because memory is used in units of word 5 6 A B 1 7 0 i F 815 B14 B13 B12 B11 BIO BS B6 87 86 BS B4 BS B2 B BO B15 B14 B13 B12 B11 810 BO BS B7 BS BS B4 BS Be Bi BO Indicates that the content of register indicates that the content of register D350 is 56ABH 22187 in decimal D351 is 170FH 5903 in decimal 1 Extension file memory read and write buffer memory read and write and on demand data when word units are specified are handled ac cording to the same principie as the word device memory 2 To output a character string with the PR instruction externally after transmitting it from the computer to the PC CPU the processing should be as shown below 1 The character string to be transmitted is developed into 2 byte codes in units of characters Example To transmit 18AFH CR toa sequence program 4 n g A pe H Cor Codes 31H 38H 41H 46H 48H ODH a 33H 31H 33H 38H MH STH JMH 36H S4H 38H SOH 44H ge mr gh uga ugh ugah uga ge ugh gn ugh p
64. registration area are cleared when the power supply is turned OFF the PC CPU is reset or the mode is switched 3 For monitor registration five types of registration are possible They are device memory in bit units BM or JM device memory in word units WM or QM and the extension file register EM 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 2 Registering monitor data of device memory a Using the BM or WM command ACPU common command Designation Method Designation in protocol 1 is shown below Number of i i RE Computer o re device points Device i Device i i Device Lom ifa 2 characters C charactar S charnciar Pomerat code HILIHIL st Pc Monitor data registration bit command Designates the heed device when a bit alale Monitor data registration word command device is designated in units of words HILIHIL Example YOO6O for the range of Y8O to 6F St No Station number 1 To designate the device range the following conditions must be met With PC CPUs other than ASHCPU A2ACPU S1 and ASACPU 1 point of device X input is counted as 2 points for processing e BM command 1 lt number of device points lt 40 WM command 1 lt s number of device points lt 20 2 With the WM command word devices and bit devices 16 point units can be used in combination as shown in Example 2 Designation Examples Example 1 To display monitor registration for X40
65. reset switch or the mode is switched e Data communications has completed normally e The response message ACK or NAK is transmitted During full duplex communications through the RS 232C interface the CD signal is turned OFF The ON OFF status of the CD signal is ignored if the CD terminal check function is disabled Send request signal made by the computer To transmit data from an AJ71C24 send area to a computer receive area follow the steps described in Section 10 9 Once the send request signal Y n 1 0 is turned ON do not turn it OFF until the send completed signal Xn0 is turned ON When the send request signal is turned OFF by turning ON the send completed signal read the error code storage area 116H for data transmission to check the send result Data send from the computer send area or AJ71024 send area To transmit data from a computer or AJ71C24 in the bidirectional mode start data communications in sequence only after the receive send of the response for the previous data send receive has been completed Data length The data length in a message must be smaller than the send or receive data storage area that is set at the special applications area a Data transmitted from an AJ71C24 send area to a computer receive area Data length must be smaller than the send data storage area length set value at buffer memory address 105H 1 words b Data transmitted from a computer send area to AJ71C24 re
66. reset or switching the mode default values are written to this special applications area Default values can be changed to suit the purposes and applica tions of data transmission and the specifications of the external device Section 7 gives details 3 SPECIFICATIONS MELSEC A 2 Buffer memory allocation The buffer memory consists of 16 bit addresses The buffer memory has no back up battery The buffer memory address names and values for each address are listed in the following table IMPORTANT Buffer memory addresses 10EH 11DH to 11FH are reserved for system use only Data written to this area will prevent correct operation of the AJ71024 The following table shows the contents of the buffer memory allocation The memory areas which are used with the no protocol mode or the bidirec tional mode are listed as those to be used with the no protocol mode The memory areas function the same way in either mode When the bidirec tional mode is required see the following table changing no protocol to bidirectional 3 SPECIFICATIONS MELSEC A Table 3 7 Buffer Memory Buffer Memory Address Names Default Values Osdicsted No Bidirec No protocol send data length i storage area LOUM T ee protocol No protocol send buffer memory Area tor __8fea Send data storage area default No protocol received data length storage area a No protocol receive buffer memory area Receiv
67. send turn OFF the RS signal 5 If the CD signal turns ON during the data send continue transmit ting data send to the AJ71C24 This occurs when the AJ71C24 and the external device start data transmission simultaneously 6 Transmit all interrupted data from the external device to the AJ71C24 after data send from the AJ71C24 is completed 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE 1 The time from when the RS signal turns ON until communica tions start varies with the data transmission speed The faster the transmission speed is the sooner communica tions will start When DTR DSR control is being executed When a starting or during the data transmission to the AJ71C24 and b if the DSR DR signal of AJ71C24 turns OFF interrupt data transmission until the DSR signal turns ON See section 3 5 2 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE MELSEC A 2 AJ71C24 is set to non priority Continue data transmission Because AJ71C24 ie set to non priority data transmission is in Data C External device AJ71024 SD send data T RS send request CS clear to send CD check CD check AJ71C24 stores CD check __ CD receive carrier received data detect Data C RD received data 6 The following steps describe the operations performed by AJ71C24 at every thing The signal names are of the signals of the AJ71C24 As described in 1
68. simultaneous transmission address 114H Set the data transmitted and received by the AJ71C24 to valid invalid when a computer and the AJ71C24 begin simultaneously full dupiex send in the bidirectional mode see Section 10 6 4 Setting the check sum enable disable address 115H Set whether the check sum code is added or not added to the message when transmitted between the AJ71C24 and a computer in the bidirec tional mode see Section 10 5 2 4 This setting is unrelated to the check sum setting for dedicated protocol with SW21 of the AJ71C24 Sections 7 4 3 to 7 4 5 give the settings of the following areas used in the bidirectional mode Since the explanations in Sections 7 4 3 to 7 4 5 are for the no protocol mode change the mode from non protocol to bidirectional when referring to these sections Bidirectional word byte setting area Section 7 4 3 Bidirectional send area Section 7 4 4 Bidirectional receive area Section 7 4 5 The mode with the dedicated protocol which is set with the mode setting switch is always valid for the interface set to the dedicated protocol 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 1 Bidirectional mode b15 Buffer memory address 112H Defauit 0 Write 1 k No protocol mode 1 Bidirectional mode When the bidirectional mode is set settings with buffer memory addres ses 113H to 115H are valid 2 Time out
69. t 1 l l L Ohn y On 49m dAn 37w IAD 2n Muse Bey Dn Transmit A instruction J 7 4 1 gt 2 4 servo Send 6 data Sequence program Data memory Buffer memory LFROMP H8 H116 D100 K1 SS e set mo seeeneee f M100 is ON error processing is executed according to error code stored in D100 Even if send data units are set to byte units the TO instruction in a sequence program operates in word units Therefore the length of send data differs from the data length designated by the TO instruction 10 26 11 TROUBLESHOOTING 11 TROUBLESHOOTING This chapter describes errors which can occur with the AJ71C24 proce dures 11 1 NAK Error Codes with Dedicated Protocols Table 11 1 gives the error codes and their descriptions when the NAK code is transmitted between the computer and the PC CPU as 2 digit ASCII hexadecimal between OOH and FFH If several errors occur simultaneously the code with the lowest number takes precedence and is transmitted if any of the following errors occur the transmission sequences are initial ized and LEDs 2 N3U and 4 NEU LED Nos 4 and 7 are turned ON Table 11 1 Error Code List Invalid access has been made during RUN 1 Start communicationss Disable 1 Data has been written to a PC CPU with after turning ON SW22 during the SW22 OFF write disable during RUN n 2 Write paramet
70. the external device and the AJ71C24 Fig 2 5 System Configurations IV 2 SYSTEM CONFIGURATIONS MELSEC A 2 The following tables list the functions available when the external devices are linked with the PC CPU modules making a 2 n configura tion a The interface used to set dedicated protocols 1 to 4 1 Functions available when using external devices Interfaces for Dedicated Protocol ran e i Including exten Available Functions Extension file register Buffer memory AJ71C24 of the self Special func tion module s Read write buffer memory Sequence microcomputer Read write program Including exten Spore pee Pie ee Parameter Read write 6 o Remote RUN STOP PC CPU PC CPU type read Input signal X ON OFF Self ioopback Transmission test of received data 2 SYSTEM CONFIGURATIONS MELSEC A 2 Functions available when using PC CPUs Interfaces for Dedicated Available Functions Protocol Data transmis On demand sion to external devices 1 Data communications is possible only with the system which has a 1 1 configuration one external device to one PC CPU as shown in Fig 2 5 b Interfaces used to set the no protocol mode Functions available when using external devices and PC CPUs interfaces for No protocol Mode Available Functions PC CPU to external devices External device From computers iis SPN ERTA and h
71. tier Local station 3rd tier Local station 3rd tier Remote I O station 3rd tier 3rd tier eT er re PC CPU loaded PC CPUs to which a link is possible PC CPU number with AJ71C24 ted Self L2 m to computer Mo ee 185 0a ay ea oe PM UE PK Plo Po fT co fot x x x x Access to all devices possible by setting appropriate PC CPU numbers Access to special function module buffer memory possible by setting appropriate PC CPU numbers if MELSECNET II is replaced by MELSECNET B in either tier the range of PC CPUs which can be accessed remains the same 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 5 Command Used to specify the operation required e g read write etc Com mands must be in 2 digit ASCII 6 Message wait time This is a time delay required for some computers to switch from send to receive states The message wait time determines the minimum waiting time before the AJ71C24 sends data after receiving it from the computer Set this time in accordance with the computer specifica tions The message wait time may be set between 0 and 150 msec in units of 10 msec The time is set from OH to FH 0 to 15 in 1 digit hexadecimal where 1 corresponds to 10 msec Example Setting the message wait time Message waittime Waiting time 100 msec not required Computer AJ71024 Transmission starts 100 msec later 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 7 Sum check code
72. transmitted from ENQ to right 2 Transmitting data from a computer to an AJ71C24 Computer a Area A Data send from a computer to an AJ71C24 b Area B Data send from an AJ71C24 to a computer c Write a program so that the data is transmitted from left to right Example For area A data is transmitted from ENQ to right 10 12 10 COMMUNICATIONS IN THE BIDJRECTIONAL MODE MELSEC A 10 5 Bidirectional Communications Basics 10 5 1 Control protocols abnormal send Error code L H normal send Transmission from a PC CPU to a computer Data area Designated Time out check time transmission data is sot at address 113H of the buffer Addition within this range An AJ71C24 receives data from a computer Received data read request M1 Received data read completed Yin 11 1 Check sum exists only when O is set to address 115H of buffer memory 2 Check sum is calculated within the area indicated by 1 3 The AJ71C24 returns an NAK immediately if it detects an error as in 2 while communications is made in the full duplex mode In half duplex mode communication it returns an NAK only after the data has been received The AJ71C24 ignores receive data if it detects an error Section 10 3 3 5 Therefore it does not give a received data read request to the PC CPU 10 13 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 10 5 2 Message format 1 Contro
73. turn ON OFF the RS signal of the AJ71C24 and do data transmission to the external device Note that 5 is different 1 When not transmitting data from the external device to the AJ71C24 turn the RS signal OFF 2 When doing a data send check the CD signal f the CD signal is OFF turn the RS signal ON If the CD signal is ON wait until it turns OFF After the CD is turned OFF turn ON the RS signal 3 After turning the RS signal ON transmit data 4 After completing the data send turn OFF the RS signal 5 If the CD signal turns ON during data send stop the data send Then turn the RS signal OFF and perform data receive process ing This occurs when the AJ71C24 and an external device start data transmission simultaneously 6 After transmission from the external device is completed resend all data from the beginning or transmit data remaining after the send interruption in 5 1 Data set at buffer address 110H is not transmitted 2 Resend all data from the beginning or transmit data remaining after the send interruption according to the setting of buffer address 111H When OTR DSR control is being executed When a starting or during the data transmission to the external device and b if the DSR DR signal of AJ71C24 turns OFF interrupt data transmission until the OSR signal turns ON See section 3 5 2 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK 6 6 1 DATA COMMUNICATIONS USING AN M
74. turned OFF or the PC CPU is reset See USING DEDICATED FROTOCOLS a MELSEDA 2 Remote RUN STOP designations and designation examples ACPU common command Designation Method Designation in protocol 1 is shown below RR PC CPU remote RUN designation command RS PC CPU remote STOP designation command Designation Examples Example 1 Remote RUN control of PC CPU in station number 5 Message wait time is O msec Sum check is calculated within this range Example 2 Remote STOP control of PC CPU in station number 0 Message wait time is 0 msec Sum check is calculated within this range Wu 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 11 3 Reading PC CPU model name 1 PC CPU model name and corresponding codes C S A S Ce a C dic e S T T S O ravens i 2 Reading PC CPU model name ACPU common commands Designation Method Designation in protocol 1 is shown below PC CPU module read command AJ71C24 Designation Example To read PC CPU model name at station number 30 Message wait time is 0 msec This indicates station number 30 1E in hexadecimal This indicates PC CPU module name of A3 or ASN CPU 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 12 Program Read Write MELSEC A This function is used to transfer all types of programs main and sub sequence programs microcomputer main and sub programs parameters and comment data from t
75. turned ON 5 Canceling send request 4 Send completed Xno Example To transmit 4 word data after writing ABCDEFG1 to the buffer memory area from 1H when the AJ71C24 I O numbers are allo cated to 60 to 7F Send command 10 19 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 10 8 Receiving Data in the Bidirectional Mode Computer gt AJ71C24 1 Data receive area 2 The AJ71C24 stores the received data length and the received data in the data receive area With a default setting 80H to FFH in the buffer memory is allocated as the data receive area This area may be changed as needed Section 7 4 5 gives procedure for changing the data receive area The unit of received data length e depends on the setting at address 103H of the word byte setting area Received data length storage area the data length in the received message is stored Received data storage area Buffer memory Received data is stored sequentially from the lowest address if the length of the data area in the message transmitted from the computer is greater than the received data storage area default 127 words split the data area into several blocks so that its length is smaller than the received data storage area and append the block number to specify each data area block Message format example Data area Reading received data The AJ71C24 makes a read request to the PC CPU at the
76. 0D0AH 1 byte if changed L H LH L HA Read request signal Xn1 is turned AJ771024 ON when the set length of data has been received oars data read Xal lien data read Xal Received data read b jeceived data read com pleted or Yen 1 1 amp Dimpo Yas1 1 Turned PC CPU ON OFF by program 4 Data receive program examples Example 1 By receiving completed code in word units buffer memory allocation default To store AJ71C24 CR LF received from an external device to DO to D5 of PC CPU AJ71C24 I O addresses 1A0 to 1BF 10 bytes 2 5 words Received data read request X1A1 i Receive data length is stored Received data read completed Y1B1 PC CPU program AJ71C24 buffer memory Sequence program data memory 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A Example 2 By receiving the set length of data in byte units receive area allocation default To receive AJ71C24 from an external device and to store it to DO to D4 of PC CPU with the following setting AJ71C24 I O address 80 to SF tarred Algi7isiaeg rttre en oe Aton Mise Ji ond 2u Received data read request Received data read completed Y91 PC CPU program e Even if transmission data units are set to byte units the FROM instruction in a sequence program operates in word units Therefore the length of receive data must be converted to the number of buffer memory points word units In the above ex
77. 1 8 112 8 1 Data Flow in Communications with Dedicated Protocols cece e eee eee 8 1 8 2 Programming HIMS cic cece sce eee ewig eehiye cada eet ee eddie celeste hale ae weg 8 2 8 2 1 To write data to the special use area in buffer memory 05 8 2 8 2 2 PC CPU operation during data communications eee e eee 8 3 8 2 3 Precautions during data communications 0 ccc eee eee eee 8 4 8 3 Basics of Dedicated Protocol Control Procedures ccc cece e eee ee 8 5 8 4 Basic Formats of Dedicated Protocol 2 0 ce eee cee eee tne en eae 8 6 8 41 Controlfonmat f i ch0 cose eG ake Chane sad ha Peeled dal es ces 8 7 8 4 2 Control format 2 ON tee eee eee erent nee nee ene ne tees 8 8 8 4 3 Comntrot format 3 oo cece cece eee ene nee e te eeenes 8 9 8 4 4 Comtrol format g o o ccc eee tenet teen eee neeaes 8 10 8 4 5 Setting protocol data 2 0 cece cece cee nee e eee neeee 8 11 8 5 Transmission Sequence Timing Charts and Communications Time 8 16 8 6 Character Area Data Transmission 0c ccc eee ence ee etn e ee nneeees 8 19 8 7 Device Memory Read Write 0 cc ccc ccc ce cece eet eee ne tenes 8 22 8 7 1 Commands and device ranges 0 ccc ccc cee ee teen tence 8 22 8 7 2 Batch read in units of bits 2 0 0 ccc ete cnet neees 8 28 8 7 3 Batch read in units Of words 20 ccc ee ee ee ete nen ees 8 30 8 7 4 Batch write in units Of Bits ccc eee eee eens 8 34 8 8 8 9 8 10
78. 1 1 data communica tions using the ACK code between a PC CPU and a computer When data is transmitted from the AJ71C24 S8 to a computer a control code ENQ the data length code and a check sum are added respec tively to the beginning the middie and the end of the send message The check sum is optional When the AJ71C24 S8 receives data from a computer it transmits a control code ACK NAK back to the computer This indicates the result of the receive normal abnormal The AJ71C24 S8 thus adds the ENQ code data length and check sum and checks the reception of the response message at the data trans mission It checks the received data and sends the response message after it received data The length of a data communications sequence program can be shor tened by using the bidirectional mode The communications mode using the RS 232C interface can be set to either full duplex or half duplex The communications mode using the RS 232C interface of the AJ71C24 S8 can be switched either to full duplex or half duplex accord ing to the specifications of the peripheral device Multidrop link with more than one computer is possible More than one computer can be put into a multidrop link with the AJ71024 S8 The PC CPU modules in the multidrop link can be accessed from the computers for read write of device data and sequence programs 1 GENERAL DESCRIPTION 5 and 6 are the additional functions when compared with the AJ7
79. 11 setting value D30 to D10 800AH Ladder Example in Program Setting in Program Setting In Protocol K1 Calculation of protocol setting value Km 0000H n Dm 8000H 2n where m n device number hexadecimal value of device number MELSEC A 8 COMMUNICATIONS USIN 2 Sequence program batch read ACPU common command Designation Method St No Station number Designation in protocol 1 is shown below Number of characters Number of steps x 4 1 step 16 bits uses 4 characters Computer Sequence program batch read command MR for main and SR for sub program 1 To designate the number of steps the following condition must be met e1 lt number of steps lt 64 2 Timers counters and a sequence program cannot be used in combination Only one of these may be set Designation Examples Example 1 To read 3 steps step 100 to step 102 of the main sequence program of the PC CPU in station number 0 Message wait time is 0 msec Check sum is calculated within this range EF oosa oats Check sum is calculated within this range Sn Dry Xr Min tEn On Xn Ory 36 Hu Ory In Suy Ba Step 100 is expressed as 0064H in hexadecima AJ71C24 Indicates that The content of step 100 64H is 4001H The content of step 101 65H is 8002H The content of step 102 66H is 1011H See DEDICATED PROTOCOLS WELsEe A Example 2 To read set values at 3 points T50 to T52 of the subsequen
80. 1C24 S6 5 Mode switching function when the AJ71C24 S8 operates The AJ71C24 S8 s RS 232C RS 422 interface can be switched between the following modes after a start up No protocol mode Bidirectional mode Dedicated protocol mode formats 1 to 4 6 Transmission control function using DC1 DC3 and DC2 DC4 Data communications between the AJ71C24 and an external device can be controlled by using the DC1 DC3 and DC2 DC4 codes DC1 DC3 send control DC1 DC3 receive control Enabies or disables data send and receive DC2 DC4 send control 0DC2 DC4 receive control Controls the valid range of send receive data f any existing programs are used with the AJ71C24 S8 see Appendix 1 2 3 for interchan geability between the AJ71C24 S8 and the following devices e AJ71C24 computer link modules e AJ71C24 S3 computer link modules AJ71C24 S6 computer link modules 1 GENERAL DESCRIPTION MELSEC A 1 1 Features The features of the AJ71C24 S8 computer link module hereafter called the AJ71C24 in this manual are given below 1 1 1 Control operations in data communications Data transmission operations between an AJ71C24 and external devices e g Computers can be controlled using either the dedicated protocols 1 or in the no protocol bidirectional mode These control operations can be selected individually with the RS 232C and RS 422 ports of an AJ71C24 1 Communications using the dedicated protocols a Communicatio
81. 1C24 loaded in each PC anaa A A RES 2 Control This function switches the Xn2 input signal at each AJ71C24 in all stations linked to the computer a Xn2 is determined by the O addresses of the AJ71C24s Example If the I O addresses are 90 to AF Xn2 is X92 b Designate the station number in the control protocol as FFH Designating a number other than FFH causes the Xn2 of the AJ71C24 at the designated station number to turn ON OFF c This function is a command from the computer A reply is not given by the AJ71C24 d When the power supply to a PC CPU is turned OFF the PC CPU is reset or the mode of the AJ71C24 is switched the Xn2 signal at all stations is turned OFF and the global function processing request is cleared 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 13 2 Setting the global function ACPU common command Designation Method St No Station Number Designation in protocol 1 is shown below Global function command Character area A Factor number 1 character Xn2 is turned ON when datavalue is 1 31H Xn2 is turned OFF when datavalue is O 30H Designation Example To turn the Xn2 of AJ71C24 ON at all stations Message wait time is 0 msec Check sum is caiculated within this range 46n j 46n 46 Hn 470 570 Designate FFH to turn ON Xn2 at ail stations Indicates that the Xn2 of To turn the Xn2 of a specific station ON desig AJ71C24 at all stations i
82. 2 The character string developed into 2 byte codes is arranged in units of 2 characters and sent to the AJ71C24 Example The character string used in the above example in 1 31 38 41 46 48 0D 383146410D48 Er E E 383146410D48 is sent from the computer to the AJ71C24 8 COMMUNICATIONS USING DEDICATED PROTOCOLS er iah weg pee ee tae MRS fot MELSEC A The AJ71C24 converts the data sent from the computer into binary data and writes it to the designated device Example To write the data composed in the above example in 2 to DO to D2 in the PC CPU Data received b es the Adica gt 3 8 0 D 4 8 wow VW VW NV and written to zie the devices i i b15 to bO b15 bO b15 to bo D0 01 De Characters m ae represented b g qn pr A Ca u each 1 byte of data 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 Device Memory Read Write 8 7 1 Commands and device ranges 1 The ACPU common commands and device ranges used for device memory read write are described below a ACPU common commands Command EEEE Points ASCII Processing Contents Processed Code per Com munications 42H 52H egg al a aad 2 pine ints ae po Reads a PANERO Y M etc in units of 32 words Suon Rend Word ible cae its 57H 52H un Reads word devices D R T C ete in SA osais units of points poi Bit Writes data to bit devices X Y M etc in
83. 2 in the above equations for the first data communications after the power supply to the relevant station has been turned ON after the PC CPU has been reset If fewer than 11 stations are communicating substitute x 1 for x 2 for the second and subsequent communications Example The transmission time for MELSECNET master station equipped wit AJ71C24 to read a local station device memory Conditions L lt LS lt M M 80 msec a1 10 msec Transmission time Ti Mx4 a1x4 M x2 80x4 10x4 80 x2 880 The transmission time is 880 msec Where M MELSECNET master station scan time a1 MELSECNET master station link refresh time LS Link scan time L MELSECNET local station scan time e Causes of delayed transmission time T1 Instructions requiring 2 scans for transmission writing to device R etc need double the time derived from the equations above When other stations in the link are being monitored by an A6GPP the transmission time doubles for each station to be monitored The Data Link Reference Manual gives details of the data link Under some conditions data transmission to a PC CPU on MELSEC NET H MELSECNET B not equipped with an AJ71C24 can cause a con siderable time delay This time delay can be reduced by carrying out all communications from the computer to PC CPUs to stations equipped with an AJ71C24 PC CPU station number FFH and all other data communications using the data link B W
84. 2 i program E l on aA Data 2 eae Data 3 ae eee Data n 1 _S Data n ___ st aa a 1 Setting received data length 2 Received data read request F bat T data length Data A bytes 1 When both the receive completed code and the receive completed data iength are set to the special application area in buffer memory both of them are effective in this case the one which is met first triggers the read request signal Xn1 to the sequence program See Section 7 4 1 and 7 4 2 2 The data received after the reception of the receive completed code or the set length of data has been received is stored in the OS area 279 bytes of the AJ71C24 The data stored in the OS area is transferred to the data receive area after the data previously stored in this area has been read by the sequence program In data communications through the RS 232C interface the DTR signal is turned OFF when DTR DSR control is executed DC3 code is sent when DC1 DC3 transmission control is executed to request disconnection of data transmission from an external device because the OS area where receive data is stored is smaller than 10 bytes See Sections 3 5 2 and 3 5 3 R 3 ge TOCOL MODE 9 COMMUNICATIONS IN THE NO P MELSEC A 3 Data receive procedure Reading data by the read completed code Reading data by the set data length r Completed code Default CR LF
85. 2H oo 11DH to System area Unusable 11FH 120H to 7FFH User area 1760 words The o A and symbols in the table indicate the following o PC CPUs and computers can read write from to this area A PC CPUs and computers can only read from this area PC CPUs and computers do not need to read write from to this area 1 The unit of the transmission send receive data in the no protoco mode or bidirectional mode or of the send data when the on demand function of the dedicated protocol is used 2 Set this when the RS 232C interface is set to half duplex communications 2 3 Areas should be allocated so that they do not overlap with each other when a data is transmitted in the no protocol mode or bidirectional mode or b when more than one function of data transmission using the on demand function of the dedicated protocol is used 4 Change the default values marked by the dot symbol attached to the right of the address only when the READY signal of the AJ71C24 is turned ON after the power is turned ON or the PC CPU is reset Or change the default values when the higher bytes of the buffer s mode switching designation area address 119H change into 02H after the AJ71C24 READY signal is turned ON by switching the mode of the AJ71C24 5 Values 1H to DH that correspond to set values 1 to D of the mode setting switch see Section 4 3 1 are stored as default values 6 Qis stored before swi
86. 300 to buffer memory address 106H Write H120 to buffer memory address 107H Address Butfer memory OH 106H 300H Shows that the leading address is 300H 120H Shows that the memory length is 120H ss Data length siorage area for the no protocol receive Area for no protocel send 120H addresses the no protocol receive received data storage area oe 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 5 Settings in the Bidirectional Mode This section describes how to set items in the bidirectional mode and gives examples The defaults set with the buffer memory section are for the no protocol mode When the interface mentioned in 1 is used in the no protocol mode all settings mentioned in this section are not necessary 1 Setting the bidirectional mode address 112H When the mode setting switch see Section 4 3 1 is set to 1 to 8 set the mode for the following interfaces to the bidirectional mode see Section 4 3 1 e When the mode switch setting is 1 to 4 RS 422 interface e When the mode switch setting is 5 to 8 RS 232C interface 2 Setting the time out check time address 113H Set the time out check time which specifies the time from the beginning of data send to a computer connected through the bidirectional mode interface until the reception of the response message see the figure in Section 10 5 1 3 Valid invalid setting of data at
87. 71C24 the maximum number of connec table AJ71C24 modules cannot exceed 2 or AOJ2H 6 See previous column Al AIN Ais AD51 S3 AD51H Intelligent Communica A2 S1 A2N S1 tion Module AS A3N A3H A3M AD57G Graphic controller Module A73 AJ71C21 S1 Terminal Interface Module AJ71C22 S1 Multidrop Link System Module e AJ71C23 Higher Controller High Speed Link Module A2A S1 A3A AJ71C24 S3 S6 Computer Link Module AJ71E71 Ethernet Interface Module AOJ2CPU and A2CCPU are not applicable 2 Applicable base unit The AJ71C24 can be inserted into any siot of a main base unit or extension base unit with these two exceptions a The power supply capacity may be insufficient to load the AJ71C24 into an extension base unit with no built in power supply A55B or A58B Wherever possible avoid loading an AJ71C24 module into this type of extension base unit If it is necessary to use an AJ71C024 module in an extension base unit with no built in power supply it is important to consider a the power supply capacity of the main base unit and b the voltage drop along the extension cables when selecting the extension cables b The User s Manual of the respective CPU module employed gives details 2 SYSTEM CONFIGURATIONS 7 MELSEC A c The AJ71C24 should not be loaded into the last slot of the ASCPU extension level 7 1 The AJ71C24 can also be loaded into the A81CPU base unit A78B The A81
88. 8 11 8 12 8 13 8 14 8 15 8 7 5 Batch write in units Of WordS 1 0 ccc cc cc eee eee tee eet n eee eees 8 7 6 Testing device memory in units of bit random write cece eee eee 8 7 7 Testing device memory in units of words random write 8 7 8 Monitoring device memory cee ccc eee eet teen e een eeee Extension File Register Read and Write 0 cece ccc ce eee ee eee e nt anes 8 8 1 ACPU common commands and addresses cece cee 8 8 2 AnACPU dedicated commands and device numbers 05 8 8 3 Precautions during extension file register read write 0 0 e eee 8 8 4 Batch read of the extension file register ACPU common command 8 8 5 Batch write of the extension file register ACPU common command 8 8 6 Direct read of the extension file register AnACPU dedicated command 8 8 7 Direct write to the extension file register AnACPU dedicated command 8 8 8 8 Testing random write the extension file register ACPU common command ccc cece eee cece eee teen nen ens 8 8 9 Monitoring the extension file register 2 0 ccc cect e ee teen eens Buffer Memory Read and Write 2 0 cece cece eee rene een e en eeee 8 9 1 Commands and buffer memory 0 eee eect eee nee n eens 8 9 2 Reading data from buffer memory ACPU common command 8 9 3 Writing data to buffer memory ACPU common command 6 Special Function Module Buffer Memor
89. 9051 CHG instruction disable ON When reading or writing the timer counter setting values using the se quence program read write command range designations of TO to T255 or CO to C255 are possible Extended ranges of T256 to T2047 and C256 to C1023 for AnA CPU should be used for storing the setting values read or write the set values using the batch read write command for devices D W R allocated by parameter setting see section 8 7 Beene DEDICATED CROTOC Os uelcer a b Designating the head address The division between sequence programs and T C set values and their addresses in 4 digit ASCII are shown in the table below Example To read the set values TO to T63 Head address FEOOH Command MR Sequence Program Designated Step for Protocol TO set value FEOOH T1 set value to T255 set value FEO1H to FEFFH CO set value FFOOH C1 set value to C255 set value FFO1H to FFFFH Step 0 0000H Step 1 to Step 30718 30K 0001H to 77FEH Calculation of designated step Timer Tm FEOOH n Counter Cm FFOOH n where m device number n hexadecimal value of device number c Meaning of T C set values T C set values are stored as hexadecimal values as shown in the table below When rewriting the PC CPU set values from the computer via the AJ71C24 designate the set value in 4 digit ASCII Example Data designated to change T10 setting value K10 to K20 0014H Data designated to change T
90. A Series Programmable Controllers ate MITSUBISHI Cat No UMCM 8 REVISIONS The manual number is given on the bottom left of the back cover Manual Number Jan 1992 1B NA 66360 A INTRODUCTION Thank you for choosing the Mitsubishi MELSEC A Series of General Purpose Programmable Controllers Please read this manual carefully so that the equipment is used to its optimum A copy of this manual should be forwarded to the end User CONTENTS GENERAL DESCRIPTION cc ccc ccc c ccc w renee ese reesesereeres 1 1 1 10 a o A ol 10 T E TE gt rr gee ee E 1 4 1 1 1 Control operations in data communications 0 cc cee eee eee 1 4 1 1 2 System configuration and the number of stations when a computer link system is constructed 0 0 6 cece cece eter e teenies 1 7 1 1 3 Link with a computer through data link systems 0 0 cee eee eee 1 9 1 1 4 Mode switching function 0 ccc cece etc ce eee e ete eeenees 1 10 1 1 5 Transmission control function esssesesssuesrereseressecressrs 1 10 SYSTEM CONFIGURATIONS sssssssesoo EEEO NAN N 2 1 2 21 2 1 Overall Configurations 2 0 0 ccc cc eect nee ete eee eee e te ntanes 2 1 2 2 _ Applicable Systems coe iii sii eve ee eee tia Bere ee ele hae RAN ie eae es 2 2 2 3 System Configurations and Available Functions 0 0 cee cece eee eee 2 4 2 3 1 1 1 ratio of an external device computer to a PC CPU 2 4 2 3 2 1 nratio
91. C RS 232C CD terminai check setting area CD PEA No protocol COTTE te data clear request area Systemarea unavailable System area unavailable ae o Full TESE RS 232C communications mode setting area on duplex Simultaneous transmission priority non 0 priority setting area Priority 0 Not Transmission method at transmission resume retransmit ted Bidirectional mode setting area Simultaneous transmission data valid in O Data valid setting area valid 0 Check Check sum enable disable setting area sum enabled Switch settings APPENDICES MELSEC A 2 Sequence program example RS 232C CD terminal check is disabled Bidirectional mode is set Time out check time at response is set 10 sec Check sum is disabled Data to check received data is stored in D1 to D4 The received data length number of words is read by the received data read request The received data length is stored in Z Received data is read The read completed signal is turned ON Processing jumps to the received data check routine When received data is normal the received data data in D100 and the send data number of words are written to the AJ71C24 send area Send request is set Send request is reset when send is completed Send result is read If the processing is not completed normally M1 is set 4 Received data AJ71C24
92. CPU User s Manual gives the commands available when the AJ71C24 is loaded 2 The AJ71C24 cannot be used in a remoto I O station 2 NFIGURATION SYSTEM CO U ONS MELSEC A 2 3 System Configurations and Available Functions The AJ71C24 is a link module to connect an external device such as a computer and aPC CPU The system can consist of a single external device and from 1 to 32 PC CPU stations 1 1 to 32 ratio system or two external devices and from 1 to 32 PC CPU stations 2 1 to 32 ratio system The connection may be made in two ways using the RS 232C port or the RS 422 port 2 3 1 1 1 ratio of an external device computer to a PC CPU 1 The system configuration for a1 1 ratio of an external device such as a computer to a PC CPU is shown in Fig 2 2 below Mode in the figure indicates the range of setting set with the mode setting switch of an AJ71C24 see Section 4 3 1 External device such as a computer inter C printer GT RS 232C or RS 422 interface Computer link module AJ71C24 RS 232C or RS 422 interface To extension base 1 Use of the RS 232C and the RS 422 interfaces differs in that the RS 422 is used to connect long distances up to 500 m 1640 5 ft and the RS 232C is used to connect short distances a maximum of 15 m 49 2 ft 2 To have the RS 232C communicate over a distance greater than 15 m 49 2 ft use a modem or RS 232C RS 422 converter between the e
93. D sD sD so RO RD RO RD l I t l RS 422 RS 422 RS 422 RS 422 SDA SDA we AAA SDA Ama SDA SOB HH S08 qisse 808 aH soa 3j ROA fy 4 ROA F 1 ROA 7 it i ROA Ros ly 4 pos i mos i aos ee i l S I 8G ee eee l s ac Lo SS x ORE a ea a i K r Modes A B D odes 5 6 8 Dedicates Modo ABD oaieatoa Mom 82 win Rasta earn aoe 4 15 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A b The computer and the AJ71C24 are connected through the RS 232C and RS 422 and the AJ71C24 modules are connected through the RS 422 seme resistance setting required Computer uter Computer RS 422 a RS 422 SDA SOA SdB SDB RDA Wd RDA J ROB sa i 2 awa ak aarc E swes or FG awa on SW24 OFF SW24 OFF SW24 OFF SW24 OFF station o station 1 Station 2 station n AJ71C24 AJ71024 AJ71C24 AJ71C24 RS 2320 RS 2320 RS 2320 RS 232C sD sD so sD RD RD RD RD RS 422 RS 422 RS 422 RS 422 SOA SDA SDA SDA 808 qtte 808 SDB vy TT TT S084 i 1 RDA 7 RDA ee RDA 1 RDA 14 ROB L RDB tJ ROB LI ROB be a Segoe eet sl a eae ra ae fq oO eS SS ra Fo Dedicated Modes 5 6 8 Dedicated Modes A B Dedicated Modes 5 6 8 Dedicated Modes 5 6 8 Main Aiz c The c
94. Designation of the range to be read from Character area B To set the number of bytes the following conditions must be met 1 lt number of bytes lt 128 e Head address number of bytes 1 lt microcomputer program capacity Designation Example To read 6 bytes of a microcomputer program beginning with address O3E8H 1000 in decimal in the PC CPU of station number 0 Message wait time is 0 msec Check sum is calculated within this range 036806 Sum check code is added by Computer Le the AJ71C24 D R n AJ71024 Check sum is calculated l E within this range BRS Ae BRE 1 abet Posed Indicates that 1 the contents of address O3E8H is 34H 1 2 8 4 5 6 2 the contents of address O3E9H is 1AH 3 the contents of address OSEAH is 7BH 4 the contents of address O3EBH is BFH 5 the contents of address OSECH is 12H and 6 the contents of address O3EDH is 58H 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Microcomputer program batch write ACPU common command Designation Method Designation in protocol 1 is shown below Microcomputer program batch read command UW for main and VW for sub program Character area C ET RETR Sey Ty a Designation of the range to be read form Number of characters Number of bytes x 2 1 address uses 2 characters Therefore 1 address is expressed in 2 digits hexadecimal To set the number of bytes the
95. During RUN Per Com During munication STOP Sw22 Sw22 ON OFF Reads from the extension comment Batch Batch write aes areal 44H 57H Writes to the extension comment memory to the extension comment memory repos o o x Note ou Executable Kiisi Not executable b Extension comment memory addresses The extension comment data storage area is managed in relative addresses with the head address 00H For example the range that can be set to the head address for an extension comment memory of 3K bytes is 00H to BFFH 1 The maximum extension comment memory area is 63K bytes The address range for the extension comment data is deter mined in accordance with the paraemter set capacity 2 Designation of the extension comment memory address is made by converting 5 digit hexadecimal into ASCII code 00000 to OFFFF 3 A character error 06H occurs if the extension comment memory capacity is not equal to or greater than head address set number of bytes 1 Reading or writing extension comment data by designating specific devices or device numbers is not possible Always read or write extension comment data beginning with address OH NS USING DEDICATED PROTOCOL 8 COMMUNICATIONS US DICATED COLS MELSEC A 2 Extension comment memory batch read Batch read of the extension comment memory using an AnACPU dedi cated command is shown below Designation Method Designation in protoc
96. E Sa D oy Ira D n JO O Dny Ra 1 Check sum is calculated 123 44ABCOD E within this range x l x Ou H medu Buy Hoes di m AZ hey hha Oe re 3S poss ts pO sfelalh ole is is a ols ole eo Ie bss Mts sole nnan x x xX XXX XK X x xX XxX 44 444455 5 5 5 E D 3210F EOD 321 EI x 5 x 4 F The QR command is used for word unit designation The designation for 32 points of devices from X40 to X5F is 02 1 for 16 points COMMUNICATIONS USING DEDICATED PROTOCOLS Example 2 To read the present values at 2 points of T123 and T124 in station 5 78 Bn 52 _ i s l E Check sum is calculated 7 cols1234ltle3 within this range x x CA Mee ote ASW Mn Se Bred Be ne Indicates the present value of 7BCOH for T123 31689 in decimal and 1234H for T124 4660 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 4 Batch write in units of bits a Using the BW command ACPU common command Designation Method Si hiss sialon aun Designation in protocol 1 is shown below Batch read bit command range to be read 0 30H indicates OFF and 1 31H indicates ON To designate the device range the following conditions must be met e1 lt number of device points lt 160 e Head device number number of device points 1 lt maximum device number Designation Example To write data to 5 points from M903 to M907 in station 0 Message wait time i
97. ELSEC A 8 2 2 PC CPU operation during data communications 1 2 PC CPU scan time in response to the access request from the AJ71C24 the PC CPU processes only a single request in each END processing while the PC CPU is running Therefore the scan time is extended by the time used for processing For intervening and processing times required for communications between the AJ71C24 and PC CPU see Appendix 5 The scan time is extended approximately 0 2 msec if an AJ71C24 is instalied 0 1 msec for an ASH A2A S1 or ASACPU even if the PC CPU is not linked Simultaneous access Because the PC CPU executes only a single processing in END processing if the PC CPU is accessed by more than one AJ71C24 access to the PC CPU is suspended until other processing is com pleted Thus the number of times scanning is done is increased 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 2 3 Precautions during data communications 1 The conditions under which the AJ71C24 transmission sequence is 2 3 4 5 6 initialized are as follows eThe power supply is turned ON the PC CPU is reset with the reset switch or the mode of the AJ71C24 is switched e Data communications is completed normally e The control code EOT or CL is received e The NAK control code is received e aring full duplex communications through the RS 232C interface the CD signal is turned OFF The ON OFF status of t
98. Interfaces for No protocol Mode PC CPU to j Paron and External device From computers ag re ore poe fo ong keyboards 1 Ifthe external device is capable of performing full duplex transmission data communications in the no protocol mode can be performed Available Functions To computers c Interfaces used to set the bidirectional mode Functions available when using an external device and a PC CPU Interfaces for Bidirectional Mode PC CPU to tert FIGURATI 2 SYSTEM CONFIGURATIONS MELSEC A 2 3 3 2 1 ratio of external devices to a PC CPU 1 The system configuration for a 2 1 ratio of external devices such as a computer to a PC CPU is shown in Fig 2 4 below Mode to in the figure indicates the range of setting designated with the mode setting switch of an AJ71C24 see Section 4 3 1 A combination of two systems each of which has a 1 1 configuration External device External device such as a com such as a com puter printer CRT puter printer CRT RS 232C interface RS 422 interface Mode 1 to 8 To extension base Computer link module RS 422 interface AJ71024 1 One of the two interfaces is set to a dedicated protocol 1 2 3 or 4 The other is set to a no protocol bidirectional mode 2 The use of the RS 232C and the RS 422 interfaces differs in that the RS 422 is used to connect long distances up to 500 m 1640 5 ft and the RS 232C i
99. J71C24 for Simultaneous Send In Full Duplex Mode Processing by the AJ71C24 varies depending on the setting valid invalid setting at simultaneous transmission when the computer and the AJ71C24 transmit data at the same time to each other Example 2 1 1 2 Buffer Processing by AJ71C24 Memory Setting Address 114H Send data Received data Send data Received data Send data Received data Send data Received data Invalid Valid Valid Invalid Invatid invalid After completing data send 1 1 the AJ71C24 waits for response 1 2 while checking time out error Normal or abnonnal send com pletion is confirmed by response and its status is transmitted to the sequence program via the buffer memory After completing data send 1 1 the AJ71 C24 transmits the se quence program of a simultaneous transmission error error code 3 via the buffer memory The AJ71C24 does not wait for a response 1 2 After completing data send 1 1 the AJ71C24 waits for a response 1 2 while checking time out error Normal or abnormal send com pletion is confirmed by a response and its status is trans mitted to the sequence program via the buffer memory After completing data send 1 1 the AJ71C24 transmits the se quence program of a simultaneous transmission error error code 3 via the buffer memory The AJ71C24 does not wait for a response 1 2 10 17 Send Proce
100. MELSEC A 3 Data transmission program examples Example 1 Transmitting data in word units buffer memory allocation default To write AJ71C24 CR LF by sequence program and transmit it to an external device AJ71C24 I O addresses 80 to 9F As 71 102 4 BE 1 1 i 41 me Aan Srey 310 Sry ag roay 2004 OD var aNO4NC m t Send data 3 Sequence program AJ71C24 data memory buffer memory 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A Example 2 Transmitting data in byte units buffer memory allocation default To write AJ71C24 CR LF by sequence program and transmit it to an external device AJ71024 I O addresses 80 to SF Send completed X80 Transmitted data length Send request Y90 PC CPU Program PC CPU program example XO X80 Y90 Pere ceded 1 OOH 07H J A 2 D 4AH 41H 7 0 31H 37H a 3 32 43H 32H 43H 4 AD 4 20H 34H 5 Gac Sequence program AJ71C24 Send data data memory buffer memory Even if transmission data units are set byte units the TO instruction in a sequence program operates in word units Therefore the length of send data differs from the data length set with the TO instruction 10 COMMUNICATIONS IN THE BIDIRECTI 0 CO IDIRECTIONAL MODE popes 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE Bidirectional communications with a computer is possible only when a computer and an AJ71C24 are li
101. MELSEC A 3 4 2 Procedure for switching the mode from an external device Mode switching is executed via the interface of dedicated protocol formats 1 to 4 using the CW command Before and after switching the mode provide an interlock between sequence program operations and the mode switching operation see Section 3 4 1 1 3 The mode switching procedure is shown below CW command See Section 8 9 AS71024 READY signal xn7 Data in AJ71C24 buffer address 119H This section describes steps 1 to 8 in the above figure 1 Before switching the mode communicate the data to provide an inter lock between the external device and the AJ71C24 sequence pro gram This is because the mode switching conditions must be set for all connected devices 2 By using the CW command write the next mode number and the mode switching request from the external device to the mode switching desig nation area address 119H 119H O10 JH The next mode number to be switched The same number as the mode setting switch number shown in Section 4 3 1 is specified Example j ae mode armas __ Nepretesetmese ede tiome __ Request to switch the mode See Section 7 6 2 3 SPECIFICATIONS MELSEC A 3 The AJ71C24 completes the CW command execution normally and turns OFF its READY signal Xn7 after transmitting the response message 4 The AJ71C24 starts switching the mode executing the
102. MP n1 n2 D n3 data length storage area of buffer memory when the read request Pee MovP o Zz FROMP n1 n2 D Koz Example To read the data of n 1 words from the area beginning with buffer memory address 80H to the area beginning with DO when the AJ71C24 I O numbers are allocated to 130 to 14F unit word Stores the read data length to the index register Z Reads the received data of the read received data length from the received data storage area of buffer memory Turns ON the read completed signal Y n 1 1 after the recieved data has been read Data read by program 3 is processed as the recieved data E From buffer memory 80H From buffer memory ons area beginning with 81H ICATIONS IN THE BIDIRECTIONAL MODE 10 COMMUNIC 5 IN THE BIDIRECTIONAL M TEISEGA 2 Writing data to the send area TO TOP DTO DTOP Data written to the bidirectional send area default OH to 7FH 3 5 Yin 1 0 Send request 3 5 xno Send completed wit Send Send Send command completed request XI Xn0 Ymen 0 Sets the send data and send data the send command signal XI is tumed ON 1 Writing data length setting 2 Writing send data Writes the send data length and send data to the buffer memory Turns ON the send request signa Y n 1 0 after the data is written Turns OFF the send request signal when the data send completed signal Xn0 is
103. N MULTIDROP LINK Key Points This section describes how to do data communications using an m n multidrop link This section only applies to m n multilink data communica tions An AJ71C24 can perform data communications with several external devices by constructing a multidrop link consisting of several external devices m stations and several AJ71C24s n stations The maximum number of m and n stations is 32 A computer link can be made with the full duplex communications method using the RS 232C and RS 422 lines by constructing an m n multidrop link In addition data transmission is initiated by a command from the external device in the dedicated protocol The key points for constructing an m n multidrop link system involve e Methods of data communications e Conditions and methods for interlocking external devices computers 1 When using an m n multidrop link system only one computer can perform data communications with a single PC CPU Set up the computers so that a computer and a PC CPU can do 1 1 communications Sections 6 2 and 6 3 give the conditions and proce dures for computer interlocking 2 Data communications between a computer and a PC CPU can only be done in the following way Full duplex communications must be used m n data communica tions cannot be done with half duplex communications Transmit a command from a computer using the dedicated protocol except for protocol 3 Data
104. NSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 4 4 Setting a buffer memory area for no protocoi send This section describes how to set the AJ71C24 buffer memory area to store data transmitted from the PC CPU to an external device in the no protocol mode and gives an example When the bidirectionat mode setting area address 112H is set to 1 this memory area is set for bidirectional mode transmission Cs Write the head address in hexadecimal fe bo 104H Head address setting Default OH 105H Buffer size setting Default 80H Setting Method Write the memory size number of addresses in hexadecimal 1 Buffer memory addresses 100H to 11FH are for the special applica tions area and should not be set 2 When other kinds of devices are also used make sure that the specified range does not overlap the no protocol receive area or the on demand data area 3 Buffer memory address 105H should include the storage area of the no protocol send data length 4 If any range except the user area is set the AJ71C24 will execute operations with defaults including the areas mentioned in 2 above To set the head address to 120H and the memory size to 100H AJ71C24 I O addresses 80 to 9F Sequence Program Write H120 to buffer memory address 104H 00 Write H100 to buffer memory address 105H Address Buffer memory OH 120H Shows that the head address is 120H 100H Shows that the memory size is 100H Data
105. ON YES ts there a PC CPU error NO YES NO ls the PC CPU in RUN YES Has invalid data been transmitted during RUN YES ls communications done with a special function module NO YES special function module with buffer memory located NO module operating property Consult the nearest Mitsubishi representative 11 7 Replace the PC CPU with the type of PC CPU mentioned in Section 2 2 of with an AJ72P25 R25 Reset the relevant PC CPU Stop the PC CPU or depending on communications data set write during RUN of the AJ71C24 to enabled Check and correct the VO number Special function module control bus error Possible PC CPU module base unit or special function module error Change moduies Consult the nearest Mitsubishi representative 11 TROUBLESHOOTING MELSEC A 11 3 5 When communications sometimes falis Communications sometimes fails YES is mode setting with AJ71C24 either of 1 to 8 7 Set mode to 1 to 8 ts the computer connected to a PC CPU with a multidrop link YES Link the PC CPU with a computer in NO a 1 1 ratio f communications is normal between every station the PC CPU and the computer may be transmitting data simultaneously to eech other Interiock them to avoid simultaneous transmission Is the signal cable connection No OK Change the cable or
106. OOOH _ L Receive data 00H valid 01H Invalid Send data OOH valid 01H Invalid Whether or not check sum is appended for bidirectional mode com munications is designated with a TO instruction in a sequence pro gram This designation is not related to the setting of DIP switch SW21 0 Check sum enabled default 1 Check sum disabled if an error occurs during data communications the error code is transmitted by an AJ71C24 The area designated in 117H retains the error code of the last data receive error OH Normal termination no error 0001H Abnormal termination error Section 11 2 gives error code details to 0083H The area described above is the special applications area for bidirectional mode communications For other special applications areas used for data communications see Section 3 5 section 5 and section 7 10 6 MELSEC A 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE b User areas OH to FFH and 120H to 7FFH The length words or bytes of data written to the send data storage area to be transmitted from the AJ71C24 to the computer is desig nated with a TO instruction in a sequence program The set value is used as it is to designate data length in a message Send data length storage area to be sent to the computer The unit of data length is determined by the value set at address 103H Set the send data length within the send data storage area leng
107. PUs check the transmission of the communications completed code During this checking the slave stations must not perform data com munications with the master station The master station that received the communications completed code transmits a response to the slave station that transmitted the com munications completed code An example of data communications using dedicated protocol 1 1 The command symbol ZY in this example is indicated only for ex planation Use any desired symbol for the communications com pleted code 7 After the processing given in 6 is completed or when the access right time of a slave station with the access 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 communications request the processing mentioned in 2 is executed b Until data communications with PC CPUs is required a slave station does not perform data communications with the master station When data communications with PC CPUs is required the process ings in and after 1 are executed 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK MELSEC A 8 if no slave station obtains the access right the master station transmits broadcast data to all stations and obtains the access right and performs data communications with PC CPUs The master station transmits the broadcast data to all computers aft
108. S This chapter explains the details and methods of specifying control protocols 1 to 4 along with examples 8 1 Data Flow in Communications with Dedicated Protocols 1 The computer reads data from the PC CPU Computer 7 Various data Device memory informa tion Extension file register information Sequence program Microcomputer program e Comment Parameter PC CPU information munications program 2 The computer sends data to the PC CPU 2 Commands data etc 6 Response Device memory information e Extension file register infor mation Sequence program Microcomputer program Data com eComment munications Parameter Program PC CPU information Computer 5 Data On demand data 1 Send request The OS operating system shown in the above illustrations is the software that uses resources such as the PC CPU memory terminals files and network efficiently In this manual this software is described as the system program or system 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 2 Programming Hints MELSEC A 8 2 1 To write data to the special use area in buffer memory 1 2 3 4 Buffer memory is not backed up by a battery When the power is turned ON the PC CPU is reset or the mode is switched ali data in the buffer is set to default values Therefore whenever the power is turned ON the CPU is reset or the m
109. S WELSECA 8 12 3 Parameter memory read write 1 Commands and addresses a ACPU common commands Processing ASCII ae aa Es eel iner paranese bytes Baten write write Seth we Wortes parameters Anal Causes the PC CPU to acknow Analysis ledge and check rewritten 4 parameters Note 0 Executable Kisin Unavailable PC CPU State puring Oene RUN STOP Number of Points Processed per Communica tion b Parameter addresses There are 3K bytes of parameter memory addresses OOOOOH to OOBFFH For addresses use 5 digit ASCII hexadecimal After changing parameters always call the parameter analysis request command PS If this is not done the parameters in PC CPU user memory will be changed but the parameters stored in the work area by the ACPU for operation will remain unchanged Therefore if a peripheral device is loaded and operated after the parameters are changed processing will be executed with the previous parameters which are still stored in the work area 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 2 Parameter memory batch read ACPU common command Designation Method l St No Station number Designation in protocol 1 is shown below Parameter memory read command Character area A To designate the byte length the following condition must be met 1 lt byte length lt 128 Designation Example To read 4 byte parameter data in pa
110. SEC A 2 Buffer memory address tables of special function modules This section gives the address tables of the following special function modules e AJ71C24 S3 S6 S8 computer link module e AD61 high speed counter module e AD71 S1 and AD71 S2 positioning module e A616DAI DAV digital analog converter module Calculate the addresses of special function modules not mentioned above by using the following formuia and the head addresses given in a on the next page Formula The following formula converts the address hexadecimal to be designated in a computer using the address for the FROM TO instruc tions Designated address hexadecimal Address used with FROM TO instructions x 2 converted into hexadecimal Head address of each module The User s Manual for each module gives details about the addresses of FROM TO instructions Calculation example 1 To designate the head address the designated address of the FROM TO instructions is 100H of the special applications area of the AJ71C24 S8 Designated address 1200H Address used with FROM TO instructions 100H x 2 200H Head address 1000H Calculation example 2 To designate the preset value storage address the designated ad dress of the FROM TO instructions is 1H of CH1 of the AD61 high speed counter module Designated address 82H Address used with FROM TO instructions 1H x 2 2H Head address 80H APP 14 APPENDICES
111. TED PROTOCOLS __ MELSEC A Designation Exampies Example 2 To start transmission of data stored in buffer memory at addresses 120H and 121H by the sequence program Station number is 0 AJ71C24 I O addresses are 80 to OF transmission data is designated in byte units Computer AJ71C24 appends PC number FE automatically AJ71024 l E 34 1 2 7 e s ait o2 l i I x i Day Bho M6 Bn 33a She Jap a Moe Bos So 0 Ba 1 is written if a transmission error On demand occurs command Data is transmitted in the order of lower 8 bits and higher 8 bits Request to turn OFF error indicator LED Sets byte unit for data transmission X000 M9039 a Converts start signal to PLS MO xXoc3 Sets transmission data 1 Designates head address of the transmission data storage area and data length Resets the on demand error Start is disabled if the content at address 10CH is 1 2 Starts the on demand function Transmission completed flag Reads the transmission error storage area to check transmission status CIRCUIT END Correct transmission Data not transmitted due to an error Address 10CH 8 111 PL COMMUNICATIONS USING DEDICATED FROTOCOIS ES ECA 8 15 Loopback Test 1 ACPU common command Number of State of PC CPU Pointe Processed per Communica tion Echoes back the characters to the computer as they are received Designation in protocol 1 is shown bel
112. TIONS MELSEC A 2 Output signals PC CPU gt AJ71C024 There are 16 output signals Y n 1 0 to Y n 1 F are turned ON OFF by the AJ71C24 Table 3 6 Output Signals List Eales protocol Bidirectional Send Ei ae This signal turns ON in the no protocol mode bidirectional Received mode when the PC CPU has completed reading the data Y m 1 1 data read received from an external device This data is stored in the completed AJ71C24 buffer memory After Xni is turned OFF Yin 1 1 is Refer ence Sections When this signal is turned ON by the sequence program in the no protoco mode bidirectional mode data written to the buffer memory is transmitted from the AJ71C24 to an external device After Xn0 is turned ON Y n 1 0 is turned OFF turned OFF Y n 2 to Reserved Y n 1 F IMPORTANT Yin 1 2 to Y n 1 F are reserved for system use only AJ71C24 functions cannot be guaranteed if these signals are turned ON or OFF by a se quence program Example Use of input signals Xn4 to Xn6 Request from computer Computer Message wait time AJ71C24 Request to PC Repl from Bc Pe i i Xn6 ee en ee E l Xn5 Xn4 l Lon 3 SPECIFICATIONS as MELSEC A 3 7 Buffer Memory Applications and Allocation The term buffer memory used in this manual refers to a memory area of an AJ71C24 used to store the control and communications data which is tran
113. TTINGS AND PROCEDURES BEFORE OPERATION MELSEC A Step 3 Execute the self loopback test 1 Turn the PC CPU power supply ON or reset the PC CPU 2 3 4 The test starts automatically when the AJ71C24 READY signal turns ON The READY signal turns ON a few seconds after the power supply is turned ON or the PC CPU is reset Check sequence Checks are executed out in the following order 1 PC CPU communications check 2 RS 232C communications check 3 RS 422 communications check The checks are then repeated The checks are completed within one second The checks are executed automatically by the AJ71C24 Check the LED display status as described in Section 4 6 2 Normal Follow procedure 4 to end the test Error Correct the error and repeat the self loopback test When checks are completed 1 Turn the power supply OFF 2 Disconnect the cables Connect the cabies to link with the computers 3 Change the setting of the mode setting switch 1 to D When the A2A S1 or ASACPU is used up to 6 AJ71C024 modules can be connected to each PC CPU When other types of PC CPUs are used 1 or 2 AJ71C24 modules can be loaded to each PC CPU However do not execute the self loopback test with both modules simultaneously this will result in a PC CPU communications check error 4 18 4 SETTINGS AND PROCEDURES BEFORE OPERATION 4 6 2 Self loopback test operations check nome Check Description
114. The AJ71C24 mode can be switched when the PC CPU is in the STOP state 3 SPECIFICATIONS MELSEC A 3 4 3 Procedure for switching the mode from a PC CPU The mode is switched by using a FROM TO instruction Before and after switching the mode provide an interlock between sequence program operations and the mode switching operation see Section 3 4 1 1 3 The mode switching procedure is shown below to This section describes steps 1 to 8 shown in the above figure 1 Before switching the mode communicate the data to provide an interlock between the external device and the AJ71C24 sequence program This is because the mode switching conditions must be set for all connected devices 2 By using the CW command write the next mode number and the mode switching request from the external device to the mode switching desig nation area address 119h The next mode number to be switched The same number as the mode setting switch number shown in Section 4 3 1 is specified Example Designated RS 232C RS 422 Dedicated protocol hss a mode format 1 No protocol mode Dedicated protocol os No protocol mode mode format 1 Request to switch the mode See Section 7 6 2 3 SPECIFICATIONS MELSEC A 3 The AJ71C24 turns OFF its READY signal Xn7 4 The AJ71C24 starts switching the mode executing the following opera tions e AJ71C24 initial processing Returning the data in the specia
115. Ty Oy The On indicates that X44 is ON Indicates that X43 is OFF Indicates that X42 is ON Indicates that X41 is ON Indicates that X40 is OFF The message wait time is designated in the range of 0 to 150 msec in units of 10 msec using hexadecimal notation of 0 to FH Therefore 100 msec corresponds to A 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 3 Batch read in units of words The method for specifying the control protocol and examples are shown below for a batch read of word device memory and batch read of bit device memory 16 point units a Using the WR command ACPU common command Designation Method St No Station number Designation in protocol 1 is shown below Character area A 1 point of the device uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal m MM Designation of device Batch read word range to be read command To designate the device range the following conditions must be met e1 lt number of device points lt 64 32 for a bit device Head device number number of device points 1 s maximum device number number of device points x 16 for a bit device Designation Examples Example 1 To read data at 32 points from X40 to X5F in station 5 Message wait time is 0 msec Check sum is calculated Computer within this range Check sum is calculated within this range p03 pte 2 8 e o
116. U Printer CRT computer AJ71024 Computer keyboard Read 2 Receiving data length can be set to variable or fixed The Length of the data transmitted from an external device and received by the PC CPU can be set to variable or fixed i Receiving variable length data Data receive stops when the receive completed code set by the user is received ii Receiving fixed length data Data receive stops when the fixed length of data set by the user is received Both the receive completed code and the receive completion data length can be freely set by the user 3 Variable communications memory area The user memory area can be allocated to suit the purpose and application of the data transmission 1 GENERAL DESCRIPTION a MELSEC A b Bidirectional communications 1 Data communications can be initiated by a PC CPU Data communications can be initiated by a computer or any PC CPU Data can be transmitted from a PC CPU to an external device by using the TO instruction in the sequence program to write data to the buffer memory The data send operation is completed when the response mes sage to the sent received data is received from the computer The result of the send normal end error is stored in the buffer memory and can be read out The data received from the computer can be read with the FROM instruction of the sequence program Data send Computer When data is transmitted b
117. Writes data to bit devices X Y M etc in PEME Pre units of 16 points 100 points its 57H 57H un Writes data to word devices D R T C di boin etc in units of points Pey Bit Sets resets bit devices X Y M etc in units units of points by designating the devices and device numbers at random Test Sets resets bit devices X Y M etc in Random units of 16 points by designating the Write Word devices and device numbers at random WT 57h 54H units Writes data to word devices D R T C etc in units of points by designating the devices and device numbers at random Sets the bit devices X Y M i sopeins I ee eee aoa Sets the bit devices X Y M etc to be monitored in units of 16 points 320 points Seca pate 57H 4DH un Sets the word devices D R T C etc to 20 points be monitored in units of points poi Monitors the devices registered for monitoring R cA TOP AE n Fa aos a 42H Word eo For the number of processing points indicated by an asterisk the number is one halif of the values indicated in the table for the input device x when PC CPUs other than the A3H CPU A2ACPU S1 and A3ACPU are used See 1 in 3 3 1 1 Kiisiasais Not executable 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A When ACPU common commands are used to access the devices in an A2ACPU S1 or ASACPU the device number ranges described i
118. a in unchanged Can be g device code to an external device changed with 7 buffer size set Section 9 Receive A PC CPU uses the FROM instruction ting see Sec External to read from an AJ71C24 buffer tions 7 4 4 and device gt memory which was transmitted from 7 4 5 ney PC CPU an external device ee 2 Receive completion by the completed code and by the completion data length There are two ways to complete the data receive when an AJ71C24 is receiving data from an external device a Reading the received data using the receive completed code receive of variable length data When an AJ71C24 receives the receive completed code which is set in the buffer memory by the user from an external device the AJ71024 transmits a received data read request to the sequence program The sequence program in response to the read request reads the received data up to the receive completed code transmitted by the external device The user can freely set the receive completed code b Reading the received data using the receive completion data length receive of fixed length data When an AJ71C24 receives data of a designated length which is set in the buffer memory by the user from an external device the AJ71C24 transmits a received data read request to the sequence program The sequence program in response to the read request reads the received data of the designated length transmitted by the external device The re
119. a is not received 11 6 11 3 4 When the 2 C N LED No 16 or 4 C N LED No 20 is tumed ON 11 7 11 3 5 When communications sometimes fails 2 0 cc cece eee e eee eee eee 11 8 11 3 6 When undecoded data is transmitted cc ee cc cee eens 11 9 APPENDICES Sp ee LD i APP 1 APP 27 APPENDIX 1 Precautions Concerning Compatibility and the Use of Existing Programs Prepared for the AJ71C24 Computer Link Module APP 1 1 1 Compatibility osos c5 cece iad siner a tee e ake a wees wae Ee oa APP 1 1 2 Precautions When Using Existing Programs 0 cece ccc cece teens APP 1 1 3 Function Comparison ccc ccc ect ee eee e ee eee nent eee eeeneeeees APP 2 Precautions Conceming Compatibility and the Use of Existing APPENDIX 2 Programs Prepared for the AJ71C24 S3 Computer Link Module APP 4 2 10 Compatibility issen diareeha aie Macaca as BIAS SWE CMe Wee a EEA APP 4 2 2 Precautions When Using Existing Programs 0 cece cece eee ee eeeee APP 4 2 3 Function Comparison 2 0 0 ccc eter ete ee s ee eterna reaes APP 5 APPENDIX 3 Precautions Concerning Compatibility and the Use of Existing Programs Prepared for the AJ71C24 S6 Computer Link Module APP 6 3 1 Compatibility seuss aiaiai tines bau Ruled a is bee ww acd te teehee kaw APP 6 3 2 Precautions When Using Existing Programs ee cece cece eee APP 6 3 3 Function Comparison 2 0 ccc ccc cece e ene e nee eet et
120. aha he bibedea the broadcast are data to all computers so that the master station starts completes data communications with Approval PC CPUs 2 Master station computer Communications request agonal Slave station computer 1 Com a Slave station computer 2 Approval response Start Slave station computer m 1 ak communications with ES CPUs Data communications Hoa S The following example shows how each computer performs data com munications with PC CPUs After the start of data communications between a computer and PC CPUs each computer executes the time out check of the maximum data com munications time A computer at a slave station that is not performing data communications with a PC CPU checks the communications completed code which is trans mitted from the computer when it has completed data communications with PC CPUs In the following figure the computer at the minimum station number 80H is set as the master station and other computers are set as slave stations Computers with the access right Master station Before 2 After 2 Computer station number 81H 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK 1 2 3 4 A slave station that requires data communications with a PC CPU transmits a communications request to obtain the access right to the master station An example of the message format is shown in 2 below The master station transmits
121. aia ble di h ified in the Send request is initiated by a PC CPU specie On demand sequence pro Available in a 1 1 ratio system gram Max 1760 words Loopback test Tr san san aan oe characters back to the 254 characters 3 SPECIFICATIONS MELSEC A PC CPUs with Which the Command can be Executed at tty ht oe am oe Pe seo Sense pe fe fe oe 3 SPECIFICATIONS MELSEC A 1 When the CPU modules other than A3H A2A S1 and A3A are used devices X input are allocated with 2 inputs per device To include devices X in designated devices set as follows number of designated X devices x 2 number of other designated devices lt 40 if only devices X are designated the number of inputs usable for one communications time is half the value mentioned in the table 2 Writing during a program run may be carried out if all the following conditions are met This is different from the write during PC RUN with a MELSEC A series peripheral device e g AGGPP a The PC CPU is type A3 A3N A3H A3M A73 or ASA b The program is not the currently running program includes subprograms called by the currently running main pro gram c The PC CPU special relay is in the following states 1 M9050 signal flow exchange contact OFF A3CPU only 2 M9051 CHG instruction disable ON When the AJ71C24 is used together with the A2ZACPU S1 or ASACPU use the comman
122. ample 7 bytes of data must be converted into 4 words 7 2 3 5 e When an odd number of bytes of data is received the higher 8 bits of the last address read by the FROM instruction are OOH 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A if the receive data length exceeds the no protocol mode receive buffer memory size the data is processed as described below 1 When the receive completed code is used tf the AJ71C24 receives data that exceeds the receive area size it turns ON the received data read request signal Xn1 when data equivalent to the receive area size has been received Reading the remaining data is enabled at the time the sequence program turns the receive data read completed signal Y n 1 1 ON These steps are repeated until the receive completed code is received Set the receive area size so that receive completion data length is less than no protocol mode receive buffer memory size Example To receive 150 words of data while receive area is set at 80H to FFH default Read completed code Reads 127 words of data Read 23 words of data 2 When receive completion data length is used If the receive completion data length is set greater than the receive area size the no protocol receive buffer memory size default 127 words which is set at buffer memory address 107H is taken as the receive completion data length Set the receive area size so that receive compl
123. an approval response to the Slave station that made the communications request An example of data communications using dedicated protocol 1 1 The command symbol ZX in this exampie is indicated only for ex planation Use any desired symbol for the transfer command to obtain the access right Section 8 3 telis how to read the message format figure Computer with the access right After 6 4 4 Computer station number 81H After performing data communications with a PC CPU within the maxi mum data communications time set among computers the slave station that received an approval response executes the processing as shown in 5 below The master station that transmitted the approval response and the slave stations that do not have the access right check the access right time of the slave station that obtains the access right and ignore received data which is addressed to other stations if the access right time of a computer with the access right exceeds the maximum data communications time each computer executes the processing mentioned in 7 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK computer 80H MELSEC A 5 A slave station that has finished data communications with PC CPUs 6 transmits the communications completed code to the master station An example of the message format is shown in 6 below Slave stations which are not performing data communications with PC C
124. an be used in combination as shown in Example 2 Designation Examples Example 1 To register monitor data for X40 Y60 and T123 contact in station number 5 Message wait time is 0 msec Check sum is calculated within this range i I t if cont e slr elano slee 20 oh seeeedires esa des I On Br M8r Andee 301 3O ro 3 30 w 3O m 30 m IO 30a 3O m Brar 36 D 3 Oru 310 32 35 eB Indicates monitor registration in units of bits 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A Example 2 To register monitor data for D15 W11E T123 present value and Y60 to Y6F in Station number 25 Message wait time is 0 msec Check sum is calculated within this range l t 1 37 Bry 57 Dy 24 31 4 Soy An E 32 n 330 SI ra JO vars Tear 0 D Bn bu Ab Ou 30 31 Indicates monitor registration in units of words Age Sip Bu bos The station number is designated in hexadecimal Therefore the designation of station number 25 should be made in 19H 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Monitoring device memory in units of bits a Monitoring the devices registered by the BM command ACPU common command Designation Method Designation in protocol 1 is shown below Monitor bi command The number of characters for the number of points designated by monitor registration BM OFF when the value is O 30H ON when the value is 1 31H Designation Example Monitoring is executed after register
125. area is written to the no protocol send data length storage area in either words or bytes b The data to be transmitted is written to the send data storage area When the send request signal Y n 1 0 is turned ON after a and b have been executed the AJ71C24 transmits the set length of set data from the send data storage area in the order of address number By default buffer memory area OH to 7FH is allocated to the AJ71C24 send area It is however possible to change the send area allocation See Section 7 4 4 The unit word byte of send data Address pites length depends on the setting defaut Buffer memory __ address 103H j Use the TO instruction to set the length of data to be transmitted Send data Data to be transmitted is stored Sidra sequentially from the lowest ad dress 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 2 Data sending procedure 1 word data is expressed in 2 characters Send complete Xn0 Send request Y n 1 0 Program 1 An error occurs if the send data length is greater than the send area or equal to 0 In this case 1 is written as transmission error information to the most significant bit bit 15 of address 101H error LED display area in the special application memory area See Section 7 3 1 2 The send data length written to the head address of the send area is not transmitted 9 COMMUNICATIONS IN THE NO PROTOCOL MODE ee
126. area of 100H to 11FH Head address OH jA Fixed at 127 words 254 bytes Setting is possible as required Defauit 127 words Fixed as below Head address OH Buffer memory size 80H Setting the send buffer memory No Protoco Default Buffer memory size 80H Setting is possible as required Fixed as below excluding the memory area of 100H to pt At Head address 80H 11FH one y Buffer memory size 80H Head address 80H Default Butter memory size 80H yy To clear the received data after an error occurs the CPU must be reset This means that the data received using the dedicated protocol is also cleared at the same The data received in the no protocol mode can only be cleared without influencing the communications using the dedicated protocol by using a sequence program Receive data clear request Data communications control with a computer RS 232C or RS 422 Data communications with a computer in the bidirectional mode is possible Possible in e 1 to 1 base system configuration Bidirec tional The modes used with the RS 422 and RS 232C interfaces can be switched after the AJ71C24 S8 is started up wax RS 232C interface Transmission control by the DTR DSR control or the DC code control is enabled RS 422 interface Transmiss
127. area sum a ae Datasenderrorstoragesrean Data send error storage area i send error storage area eee ee O Mode setting status storage area imion Mode switching settingarea pO 0 OTR Te T emir tetra e e BC7668 contrat code soning aoa iit o o o _ 62 0C4 control code sening area tman APP 26 MELSEC A Set value of switch 1 Station number setting 2 Transmission specification setting switch see Section 4 3 2 See Section 4 3 3 digit of station number Avnicas s3 digit of s ON OFF station number ON OFF agagguege ON OFF a avepaune 8 ON OFF 388 ON OFF ON OFF Write during RUN ON OFF Send side terminal resistance ON OFF Protocol 2 mode No protocol mode Protocol 4 mode No protocol mode j 6 No protocolmode mode Protocol 2 mode a O7 No protocol mode Protocol 3 mode a No protocol mode mode F Protocol 4 mode No protocol mode No protocol mode Protocol 1 mode Protocol 2 mode Protocol 3 mode Protocol 4 mode APP 27 EX MITSUBISHI ELECTRONICS AMERICA INC Mount Prospect IL 60056 Printed in U S A Industrial Automation Division
128. arity sum Communica RS 232C protocol error Pranas error Overrun prore Resuit of RS 422 and PC Parity sum See 4 RS 422 parity sum check Parity sum Communica tion 4 PRO RS 422 protocol error protocol Normal OFF error Overrun 23 esio As42e sio oror Peete reed Normal OFF Flashes during com ommunications wit CPUR W PC CPU munications with PC CPU varies according to the switch setting as shown in the following table o RUN 1 2 80 2 2AD Unused 4 2 NEU s 2ACK 8 2 NAK 7 4NEU 8 44K 9 4 NAK 10 80 n 4FO Unused Q Q Q ie Q Q Q Q Q Q Q Q O Q Q Q MOOONOO0N0C0000000 ON at no communica tions 4 SETTINGS AND PROCEDURES BEFORE OPERATION 1 2 3 4 5 Mode Setti ___MeseSattiral_tt04 stoe o atop Main Channel Setting nazan RS 232C RS ere RS232C EA E ee A MELSEC A LEDs 2 C N to 4 SIO LED Nos 16 to 23 above light when an error occurs Sections 3 5 2 and 3 5 3 also give details about 2 SIO and 4 S10 The ON OFF status of the LED Nos 16 to 23 are stored in the buffer memory at address 101H The status can be read using the PC CPU instruction which permits checking by a sequence program Section 11 gives details about processing when an error is indicated After any LED 2 C N to 4 SIO LED Nos 16 to 23 is ON they remain ON even when the cause of the error is eliminated It
129. ata RS send request E CS clear to send CD received carrier detect RD received data When doing half duplex communications data transmission timing from an AJ71C24 is shown by using the CD signal and RS signal of the AJ71024 Control the CD signal of the AJ71C24 by setting the buffer memory of the AJ71C24 to priority non priority at simultaneous transmission for data trans mission 1 AJ71C24 is set to priority Data C 1 the data send Resend Because AJ 1C24 is set to priority Data B even if the CO signal is turned ON transmission is continued Data A inaa External device must store Cony rere this data yee Data A che i Data B A 4 ope Cna co AJ71C24 stores AJ71C24 ignores received data Data C 1 M received data Data C iT The following steps describe the operation at every timing mentioned by 1 to 6 in the above figure The signal names are of the signals of the AJ71C24 As described in 1 turn ON OFF the RS signal of the AJ71C24 with the external device and transmit data to the AJ71C24 1 When not transmitting data from the external device to the AJ71C24 turn the RS signal OFF 2 When doing a data send check the CD signal if the CD signal is OFF turn the CD signal ON When the CD signal is ON wait until it turns OFF After the CD is turned OFF turn the RS signal ON 3 After turning the RS signal ON transmit data 4 After completing the data
130. ata using a computer program If the following functions are used in combination with the dedicated protocol allocate the user area in buffer memory so that the same area will not be used by different functions if the same area is allocated to different functions the data in this area is rewritten and communications will not be correctly executed e Bidirectional mode send Bidirectional mode receive Buffer memory read write CR CW command function On demand function The memory areas preceding and following the special applications area cannot be allocated as a single area The areas of OH to FFH and 120H to 7FFH must be recognized as independent areas DS The buffer area cannot be allocated P in this number If designation is made to process the send receive data in the bidirec tional mode in units of words or bytes the on demand data with the dedicated protocol is processed in the same designated unit Do not write 1 request to clear to the bidirectiona received data clear request area address 10DH If 1 is written all received data may be cleared and data communica tions might not be correctly executed 10 9 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 10 3 3 Precautions during data communications 1 2 3 4 The conditions under which the AJ71C24 transmission sequence is initialized are as follows The power supply is turned ON the PC CPU is reset with the
131. ated within this range reset OFF if 0 and set ON if 1 indicates to change the data in C100 to 64H 100 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 8 Monitoring device memory Monitor data registration is the function that registers the name and the number of the device to be monitored by the computer to the AJ71C24 The monitor is the function that a reads the data content of the device registered at the time the monitor read command is executed by the com puter and b executes the corresponding processing such as monitoring The device numbers must be consecutive when the device is read using the batch read BR WR JR QR command However when this function is used it is possible to read and monitor the devices by designating the device numbers at random 1 Control procedure for monitoring Registration processing Editing registration commands and transmitting device designations Commands common to the ACPU BM WM Dedicated commands for the AnACPU JM QM Commands common to the ACPU MB MN Dedicated commands for the ANACPU MJ MQ Read processing Executing monitor commands Data processing CRT display etc YES 1 As the flowchart shows monitor data registration must be executed before monitoring Attempting to execute monitoring without register ing the monitor data will cause a protocol error 2 The contents of the monitor data
132. below St No Station number Character area C Batch read word Designation of device range to be read command 1 point of the device uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal To designate the device range the following conditions must be met 1 lt number of device points lt 64 10 for a bit device Head device number number of device points 1 lt maximum device number number of device points x 16 for a bit device Designation Examples Example 1 To write data to 32 points from M640 to M671 in station 0 Message wait time is 0 msec t seepule wees ssjedee rane SOs Abc 91157 300 4D Oriy Doy Dre 36m Ord Weg Se 32s Bw Hoy Tn Al A233 SMe Sne hb gt Check sum is calculated within this range The QW command is used for word unit designation The designation for the number of device point to write data to 32 points from M640 to M671 is 02 1 for 16 points 8 COMMUNICATIONS USING DEDICATED PROTOCOLS Example 2 To write data to 2 points of DO and D1 in station 0 Message wait time 0 mesc cea aie Indicates to write 1234H 4660 in decimal to DO and ACD7H 21289 in decimal to D1 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 6 Testing device memory in units of bit random write a Using the BT command ACPU common command Designation Method St No Station number Designatio
133. bers to be written differ depending on the communications method The mode switching completed in 02H is written to OOH The mode switching flag is reset 7 INITIAL SETTNA OF TRANSMISSION CONTROL DATA TO BUFFER MEMOR 7 7 Transmission Control Setting The following shows how to set items during transmission control and gives an example 7 7 1 How to set transmission control This section explains how to designate transmission control and gives an example of a sequence program Setting Method b15 to b10 b9 b8 b7 to b1 bO Defauit 0 O or 1 is written 0 DTR DSR control is executed DC code control is executed Oor 1 is written Ceo Dee contro DC1 DC3 send contro and DC1 DC3 1 With DC1 DC3 control receive control are designated O or 1 is written i Without DC2 DC4 control 1 With DC2 DC4 control receive control are designated AJ71C24 VO addresses 80 to 9F 1 When DC1 DC3 send control and receive control are executed Sequence program m vop Hs Hna Horoi Ki HO101 is written to buffer address 11AH 2 When DC1 DC3 and DC2 DC4 send control and receive control are executed Sequence program ToP He H14A Hos01 Ki Hooor is written to buffer address 11AH 3 When DTR DSR control is executed Sequence program L ror He mna Hooo Ki HOO0O is written to buffer address 11AH 4 When the transmission control function is not used Sequence program H
134. cated to the special function module The User s Manual for each special function module gives details about the allocation of slots to each module a Modules with the front slot allocated as the vacant siot AD72 A84AD etc Special Vacant slot function module we Special function module number 02H 16 points 32 points 00 to OF 10 to 2F b Modules with the rear slot allocated as the empty slot A61LS etc Special function Vacant slot module Special function module number 01H 32 points 16 points OO to 1F 20 to 2F Z COMMNICATIONS USING DEDICATED PROTOCOLS MELSECA c Modules with the special function module allocation and I O alloca tion mixed A81CPU etc Input module PTAR Special function module number OSH 64 points 64 points 00 to 3F 40 to 7F 3 Module numbers of special function modules at MELSECNET ll remote i O stations The module numbers of special function modules at MELSECNET iI remote stations are determined by link parameters setting at the MEL SENET Il master station Special function module number H44 5 COMNNICA TIONS USING DEDICATED ne ree MELSEC A 8 10 3 Reading data from the special function module buffer memory ACPU common command Designation Method Designation in protocol 1 is shown below Special function module buffer memory read command hexadecimal Character area A Number of characters byte length x 2 1 word data uses 2
135. cation setting switches Mode setting switch RS 232C connector RS 422 terminal block MELSEC A Reference isi as Display the operating status computer communications underway and alarms Switch to set the station number in a computer link system The station number may be set to any value which does not duplicate another station number Setting range 0 to 31 Factory set to 0 Used to select RS 422 RS 232C data bit parity presence absence stop bit sum check etc Switch for selecting transmission con trol protocol RS 422 terminal block for connecting an AJ71C24 with an external device or another AJ71C24 Terminal biock screws are M4 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 4 2 2 LED signals and displays Meaning LED Area Details of LED LED ON Display EEMETA i fesse Tar 2 2D RS 232C receiving E E d ta Transmis sion se Eno quence RS 232C neutral initial state received big for After send After send Ez SON REGED ing ACK ___ ing NAK OFF After send After send EJ ENAR eee ing NAK _ ing ACK OFF Transmis sion se ave quence 7 4 NEU RS 422 neutral initial state received waiting for NQ After send After send e 4 ACK RS 422 ACK ing ACK ing NAK After send After send RS 422 transmission Flashes during data status transmission RS 422 received data Flashes during data Result of RS 232C and See 4 RS 232C parity sum P
136. ce memory The functions in Tables 3 3 and 3 4 are also available when a multidrop link of 1 n or m n ratio configuration is made and when a computer link is made using the data link system 3 SPECIFICATIONS MELSEC A 1 Functions available with the ACPU common commands Table 3 3 Functions List When Using a Dedicated Protocol Number of Point Description Processed per Communications Bit Reads bit devices faa ee nner as X Y M in units of 1 F Batch Reads bit devices an el as X Y M in units of 16 32 words read devices 512 points Reads word devices such as D R T C in units of 1 device Writes bit devices such as X Y M in units of 1 SEE device 160 points Batch Writes bit devices such as X Y M in units of 16 10 words write Word devices 160 points units z a Writes word devices such as D R T C in units of 1 device 64 points Specifies bit devices such as X Y M and device number in units of 1 device at random and sets resets the device Specifies bit devices such as X Y M and device number in units of 16 devices at random and sets resets the device 64 points 20 points Device memory 10 words 160 points Specifies word devices such as D A T C and device number in units of 1device at random and sets resets the device Bit Sets bit devices to be monitored such as X Y eli Sets bit devices to be monitored such
137. ce program of the PC CPU in station number 0 Message wait time is 0 msec Check sum is calculated within this range Check sum is calculated Bony In Ae Aa 53m 52 IOn 46m AS 33 32 Dory 3 AJ71024 wo s i i E T50 is designated as FE32H y 00 301 sis 17 42 002 T C2 3 30n Mr An SI 3 31m Bm Buy 3e 37n n Poy Dry Kar Pa Oh 5 Indicates that The set value of T50 is 3015H K12309 The set value of T51 is 8174H D186 The set value of T52 is 2002H K8194 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Sequence program batch write ACPU common command Designation Method Designation in protocol 1 is shown below Designation of the step range to be write Sequence program batch write command MW for main and SW for sub program Number of characters Number of sore x 4 1 step 16 bits uses 4 characters Talen in excreased in 4 dicks Crasmdentoral 1 To designate the number of steps the following condition must be met e1 lt number of steps lt 64 2 Timers counters and the sequence program cannot be used in combination Only one of these may be set Designation Examples Example 1 To write a program to 4 steps step 500 to step 503 of the subsequence program of the PC CPU in station number 0 Message wait time is 0 msec Check sum is calculated within this range Heerde ia z ie aL EPES Xa 34 315 30 Ba Bu Hn Oua dln 41 Yu 37 XA 3 37 Bo Step 500 is expressed as
138. ceive area Data length must be smaller than the received data storage area length set value at buffer memory address 107H 1 words 10 10 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 5 6 7 8 9 MELSEC A NAK code a Transmitting NAK from an AJ71C24 to a computer The NAK response is given from an AJ71C24 to a computer if an error is detected Therefore the NAK response might be given while the computer is transmitting data if communications is made in the full duplex mode An AJ71C24 ignores the designated length of received data if it detects an error while receiving data If the data length is incor rect the data received is ignored until the ENQ code is received b Transmitting NAK from a computer to an AJ71C24 To transmit the NAK from a computer to an AJ71C24 transmit a 2 byte error code following the NAK code if the NAK code is received as the response execute error processing according to the error code received directly after the NAK code The error codes related to the bidirectional mode communications are described in Section 11 2 Time out check by a computer If a time out check is made for data transmitted from a computer send area to an AJ71C24 receive area in the bidirectional mode the time out check time to be set must be longer than the value shown below Maximum scan time of the PC CPU x 2 100 msec NULL code send from an AJ71C24 A framing error might
139. ceive completion data length can be set within the buffer memory area allocated for the no protocoi receive 3 SPECIFICATIONS l MELSEC A 1 The functions available with the no protocol mode cannot be used together with the functions available with the bidirectional mode men tioned in Section 3 3 3 Select either mode using the mode setting switch see Section 4 3 1 switching the mode see section 3 4 and by setting the bidirectional mode setting area in the special applica tions buffer memory area see Sections 3 5 and 10 2 2 The receive completed code and the receive completion data iength can be set and enabled at the same time When both of them are enabied the received data read request to the sequence program is made in response to whichever is received first by the AJ71C24 3 3 3 Functions available in the bidirectional mode 1 Functions in the bidirectional mode Number of Point Description Processed per puri aa se Communications sro ewar A PC CPU uses the TO instruction to output data written to the AJ71C24 buffer memory area in unchanged Send PC code to a computer CPU gt When the AJ71C24 receives the computer response message from a computer 127 words after data send the AJ71C24 trans default value Can be mits a send completed signal to the sequence program changed with A PC CPU uses the FROM instruction Setting wee Sec to read data from the AJ71C24 buffer tions 7 4 4 and memory
140. characters Therefore a 1 byte data is ex pressed in 2 digits hexadecimal Designation of the special function module buffer memory address range to be read from Character area B 1 To designate the byte length the following condition must be met 1 lt byte length lt 128 2 With some special function modules 2 or 3 bytes are used to express the data Therefore designate the byte length by referring to the manuals for each individual module Designation Example To read the data from buffer memory address 07FOH to 07F3H 4 bytes of the special function module module number 13H loaded at I O numbers 120 to 13F in station number 0 Message wait time is O msec Check sum is calculated within this range Computer T RI0 0 07 Fojo sji 3 9 7 Check sum is calculated within this range 0 An Sle On Dry Da 37m 64 300 Dry u 31 3 AJ71C24 This indicates that specia function module I O allocation is 120 to 13F Indicates that The contents of buffer memory address 007FOH is 12H The contents of buffer memory address 007F1H is 78H The contents of buffer memory address 007F2H is 43H The contents of buffer memory address 007F3H is 65H 5 COMMNICATIONS USING DEDICATED PROTOCOLES uereecn 8 10 4 Writing data to the special function module buffer memory ACPU common command Designation Method Designation in protocol 1 is shown below Special function module buffer memory write command Memory data to be H
141. check time b15 to bo Buffer memory i address 113H Ed Default OH Write CH to FFFFH OH Time out check disabled infinite wait 1H to FFFFH Time out check enabled Set value is processed as 1 to 65535 which is the time out check time Time out check is executed during the sesponse message wait Unit 100 msec 3 Data valid invalid at simultaneous transmission b16 to b8 b7 to bo Buffer memory address 114H Default OOOOH Write 1 or 0 0 Received data valid l The ACK code is transmitted after receiving ama 1 Received data invalid Received data is ignored Write 1 or 0 0 Send data valid Waits for the reeponse message after sending data 4 Check sum enable disable 1 Send data invalid Data send error occurs and the operation ends b15 Buffer memory address 115H Default 0 Write 1 or 0 B Check sum enable added 1 Check sum disabled not added 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A Setting Method 1 Setting the bidirectional mode with the following conditions AJ71C24 I O addresses 80 to 9F 1 Set the bidirectional mode 2 Set the time out check time to 2 seconds The setting value is 20 14H 3 Set the send data to invalid and the received data to valid for simultaneous transmission 4 Set the check sum to disable Sequence Program Write 1 to buffer memory address 112H Write H14 to buffer memory address 113H
142. cification switch settings Circle ON or OFF according to switch setting from SW11 to SW24 in the ON OFF column Transmission m 4800BPS CON OFF speed setting 3 Mode switch settings Enter the set value value indicated by the arrow in the mode setting switch column APP 25 APPENDICES ie MELSEC A No Date Record of AJ71C24 settings pear No Bidirec Protocol protocol tional ee ooo oa naan ERT C o T Eror ED ON iatus orago aroa iT o E E ee e e e Noprotosoi word byte setting arsa o woran _ No protoco send buffer memory head ad dress setting area No protocol send buffer memory length set ting area No protocol receive buffer memory head ad dress setting area No protocol receive buffer memory length set ting area No protocol receive completion data length 127 setting area words ting area on demand date length setting aroa fo 2 nock RS 232C CD terminal check setting area na ae eae eae On demand error storage area ae ae ee ee ee ee I svatem aren unavaianie a E Le jo o RS 232C communications mode setting area a api Simultaneous transmission priority non 0 Not Lae need ee Transmission method at transmission resume me o No Bidirectional mode setting area Bocal mode o meon check time soning aren 100 o dint Simultaneous transmission data valid invalid O Data setting area valid O Check Check sum enable disable setting
143. ck test is as follows Step 1 Step 2 Step 3 Step 4 Step 5 Connect the computer and AJ71024 Connect the cable between the computer and AJ71C24 as described in Section 4 5 Mode switch settings Set the mode switch to 1 to D to set the testing interface for the dedicated protocol Section 4 3 1 gives detail of the setting method PC CPU start up Turn the power to the PC CPU ON or reset the PC CPU The AJ71C24 ready signal turns ON ready for operation after which the loopback test can be executed The ready signal turns ON at a few seconds after the AJ71C24 is turned ON or reset Execute the loopback test command 1 Create a program to be tested and transmit the command and data to the AJ71C24 Section 8 4 gives the message structure of formats 1 to 4 and Section 8 15 gives the loopback command TT 2 The AJ71C24 transmits the unchanged data back to the com puter Computer consistency check 1 Check at the computer if data transmitted from the computer to the AJ71C24 is identical with the data transmitted back from the AJ71C24 to the computer identical data indicates that the communication between the computer and AJ71C24 is normal if the data transmitted from the computer to the AJ71C24 and the data transmitted back from the AJ71C24 to the computer are not identical the transmission specification settings probably do not match or the CD terminal is repeatedly turning ON OFF Use the t
144. communications with protocol 3 and data transmission from the sequence program using the on demand function cannot be done 3 All computers including the computer that transmitted the data receive data from either computer In addition all computers receive data transmitted from a PC CPU Therefore every computer that receives data addressed to other stations as specified by the station number in the message must ignore that data The AJ71C24 which is connected to the PC CPU ignores the receive data which is addressed to other stations 4 The station number of a computer is expressed as eight bit data Use switch SW12 to set the data bit for communications to eight bits see Section 6 2 1 Section 4 3 2 gives details about switch SW12 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK MELSEC A 6 2 Conditions for Computer Interlock When constructing an m n multidrop link using computers and PC CPUs all computers must be interlocked to prevent several computers from simul taneously communicating with PC CPUs This section explains how to interlock computers to allow data communica tions between a computer and a PC CPU The term interlocking used in this section means the procedure which provides a computer priority to use a communications line This priority is called an access right 6 2 1 Computer station number allocation For data communications with a designated computer allocate a station number wit
145. culated within this range aa Bl eh ei ce eae eles E De dn Sre So 57 m Braj Du ny Siy I7 my IOn r 31 my Wor Won any Seay See 4 A420 Ke 57 35 ng Sy 2s SZ METEL AJ71C24 Indicates that The content to be written to R7010 of block Number 05 is 0123H 291 in decimal The content to be written to R7011 of block Number 05 is ABO7H 21753 in decimal The content to be written to R7012 of biock Number 05 is 3322H 13090 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS ra MELSEC A 8 8 6 Direct read of the extension file register AnACPU dedicated command Designation Method Designation in protocol 1 is shown below Extension file register To designate the device range the following conditions must be met e 1 lt number of device points lt 64 e Head device number number of device points lt maximum device number Designation Example To read the data at points of R8190 and R8191 of extension file register block number 2 in station number 0 Message wait time is 0 msec Check sum is caiculated within Computer feere 01638 eaea this range The AJ71C24 adds the sum check code Had Bry Xori Eng An En 30 Woy 3h Fin Lin Ba a Check sum is calculated te eee pase es within this range x a0 31a Ra Mn indicates that The content of R8190 of block Number 2 is 1234H 4660 in decimal The content of R8191 of block Number 2 is 7ABCH 31420 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A
146. d On demand FUNCTION 2 0 ccc cee ee eee erence tee eee e eee eneees 8 14 1 On demand handshake signal and buffer memory 0 8 14 2 On demand function control procedure 20 cece cee ee eee ees 8 14 3 On demand function designation ccc ce cece cece we tee nc ees Loopback Test o narasi cha Sik ea we eit We eee ene Meee eee ea eee ne ew 9 COMMUNICATIONS WITH A COMPUTER IN THE NO PROTOCOL MODE 9 1 9 18 9 1 Basics of the No Protocol Mode 00 cee cece cece eee ener eee eeeeenaees 9 1 9 2 Handshake O Signals 2 ccc cece e eee ee etter eee eee e eens 9 2 9 3 Programming HINS cece cece cert ee ree eee eee e nett teen eens 9 3 9 3 1 To write data to the special use area in buffer memory 0000 9 3 9 3 2 Precautions during data COMMUNICATIONS ccc tenet eee 9 4 9 4 Basic Program to Read Write Buffer Memory 00 c cece ence e eee nees 9 6 9 5 Receiving Data in the No Protocol Mode External Device AJ71C24 9 9 9 6 Sending Data in the No Protocoi Mode AJ71C24 gt External Device 9 15 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 0005 10 1 10 26 10 1 Bidirectional Mode Basics 0 0 ccc cece rete nner e ene e eee senna 10 2 10 2 Handshake Signals and Buffer Memory ccc ccc cee cee eee ee 10 4 10 3 Programming Hints 0 0 cece cece cece cence nent n eee eee e eee eens 10 8 10 3 1 System configuration and commu
147. d resend are set Send wait time 100 msec AJ71C24 1 O addresses 80 to 9F Sequence Program Write 1 to buffer memory address 10FH Write 10 to buffer memory address 110H Write 1 to buffer memory address 111H Leave the setting of buffer memory address 10BH for default 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 3 Reading Transmission Error Data This section explains the contents of the buffer memory area where the ON OFF status of the error LEDs are stored it also shows how to turn LEDS which are lit OFF 7 3 1 Reading the error LED display status 1 Error LED display status storage area The ON OFF status of the error LEDs are stored in address 101H of the buffer memory see below b15 bi4tob8 b7 b6 b5 b4 b3 b2 bi bO 101H 2 C N LED No 16 2 P S LED No 17 2 PRO LED No 18 2 SIO LED No 19 4 C N LED No 20 4 P S LED No 21 4 PRO LED No 22 4 SIO LED No 23 1 LED lit error occurred No protoco send data length error 0 LED not lit Section 9 6 gives details no error 2 Program example to read the error LED display status storage area This gives an example of a program using the sequence program FROM to read the error LED display ON OFF status stored in buffer memory address 101H Program example to read the error LED display status storage area AJ71C2 4 I O addresses 80 to SF FROMP He Wo1 bo K1 Read the contents of th
148. d daca 1 If full duplex transmission is possible with the external device data com munications in the no protocel mode is possible with the system which has the 1 n configuration external device 2 to PC CPUs as shown in Fig 2 5 To computers Benet and c Interface used to set the bidirectional mode Functions available when using external devices and PC CPUs interfaces for Available Functions Bidirectional Mode Rs 422 PC CPU to 1 Data communications is possible only with the system which has a 1 configuration external device 1 to one PC CPU as shown in Fig 2 P 2 15 2 SYSTEM CONFIGURATIONS MELSEC A 2 3 5 m n ratio of external devices to PC CPUs 1 The system configuration for a m n up to 32 stations ratio of external devices such as a computer to PC CPUs is shown in Fig 2 6 below Mode in the figure indicates setting set with the mode setting switch of an AJ71C24 see Section 4 3 1 Set all AJ71C24s to the same protocol External device External device Externa device External device computer computer computer RS 232C interface RS 232C cable N pompar ies module RS 422 interface RS 422 cable RS 422 interface RS 422 cable RS 422 interface Maximum of 32 stations 1 All the external devices and AJ71C24 modules are connected to form a multidrop link in the above example which uses dedicated protocols 1 2 or 4 The multidrop link
149. data transmission Computer is receiving data On demand data Xn3 TO instruction to buffer memory Pe CPU addresses 109H and 10AH 1 The on demand function executing signal Xn3 turns ON imme diately when the on demand request is made 2 Transmission of the on demand data is suspended until the completion of the response data beginning with STX to the command data beginning with ENQ 3 Transmission of the response data beginning with ACK from the computer in response to the response data beginning with STX from the AJ71C24 is possible while the on demand data is received 8 107 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Half duplex communications Computer is transmitting data On demand function executing PC CPU 1 2 3 TO instruction to buffer memory addresses 109H and 10AH Xn3 The on demand function executing signal Xn3 turns on imme diately when the on demand request is made Transmission of on demand data is suspended until the comple tion of command data receive beginning with ENQ from the computer Transmission of response data beginning with STX to the command data beginning with ENQ is suspended until the completion of on demand data transmission Computer is receiving data PC CPU 1 2 3 Xn3 TO instruction to buffer memory addresses 109H and 10AH The on demand function executing signal Xn3 turns ON imme diately whe
150. ds in Table 3 4 to perform the following functions Batch read write test monitor data registration and monitor of device memory e Batch read write of extension file registers by designating device num bers continuous numbers Batch read write of extension comments When the commands in Table 3 3 are used the available functions and the range of devices which can be designated are limited to those avail able with the ASHCPU Accordingly AZACPU S1 and A3ACPU external devices are not acces sible SPECIFICATIONS a MELSEC A 2 Functions available with the AnACPU dedicated commands Table 3 4 Functions List When Using a Dedicated Protocol ge E Z bit devices a aea as X Y M in Z a aea 1 device 256 256 pointe Batch Reads bit devices such as X Y M in 32 words read units of 16 devices 512 points Reads word devices such as D R T C in units of 1 device Writes bit devices such as X Y M in Be ow e West dasan 160 point Writes bit devices such as X Y M in 10 oe 51H Units of 16 devices oe points 57H Writes word devices such as D R T C in unite of 1 device 64 nang Specifies bit devices such as X Y M and device number in units of 1 PNA 20 Zopo at random and sets resets the device Specifies bit devices such as X Y M and device number in units of 16 10 words devices at random and sets resets the 190 points 51H device 54H Specifies word devices such as D R
151. duplex communications connections dis cussed in this section Cable Connections and Signal Directions eee ee ee Signal controlled by the system AJ71C24 pe oe armen e Example of Connections 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE MELSEC A 5 4 1 Data transmission timing from an external device When doing half duplex communications the data transmission timing from the external device is shown by using the CD and RS signals of the AJ71C24 Setting the buffer memory of the AJ71C24 to priority non priority at simul taneous transmission controls the CD signal of the AJ71C24 1 AJ71C24 is set to priority Data B Resend External device O omaa A AJ71024 Data omc Because aay AJ71C24 is set to priority even if the 5 CO signal is tumed ON Store this data in transmission is continued E external SD send data H Data C RS send request a nf CS crear to send CD receive carrier wy u detect AJ71C24 ignores A Data A pi received data Daan Data B RD received data The following steps describe the operations required for an external device at every timing mentioned by 1 to 6 in the above figure The signal names are of the signals of the AJ71C24 1 When not transmitting data from the external device to the AJ71C24 turn the CD signal OFF 2 When doing a data send check the RS signal f the RS signa
152. e AJ71C24 with the half duplex transmission 2 0 ccc tenet eee tee eee e eens 7 5 7 3 Reading Transmission Error Data ccc cece teeter treet eee enes 7 7 7 3 1 Reading the error LED display status 0 ccc eect e eee nee e ene 7 7 73 2 Tuming OFF error LEDS iiss 3 3646 aa gins haa e KORN ped ow ere Eee s 7 8 7 4 Settings in the No Protocol Mode 0 cc ccc cece cece eee eee e tenet teeneeens 7 9 7 4 1 Setting the no protoco mode receive completed code for receive with variable length data 0 0 0 ccc cece cece e eee eens 7 9 7 4 2 Specifying no protocol receive completion data length fixed length 7 10 7 4 3 Setting a word or byte unit in the no protocol mode ee eee eee 7 11 7 4 4 Setting a buffer memory area for no protocol send cece eee ee 7 12 7 4 5 Setting a buffer memory area for no protocol receive 0 eee eee 7 13 7 5 Settings in the Bidirectional Mode 20 0 cece cere eee een e eee 7 14 7 6 Mode Switch Setting 0 0 0 0 ccc cece ree eee ence eee e eee taees 7 17 7 6 1 Reading in the mode setting state 2 0 0 cc eect ete ene 7 17 7 6 2 Mode switching designation ccc ec eee cece nee ene e eens 7 18 7 7 Transmission Control Setting 0 ccc cece eee cece eee eee neees 7 20 7 7 1 Howto set transmission control 0 ccc eee ee cece eens 7 20 7 7 2 Settings for changing the addresses of DC1 to DC4 codes 7 21 COMMUNICATIONS USING DEDICATED PROTOCOLS 8
153. e and obtained the access right executes the processing mentioned in 2 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK MELSEC A 7 When the access right time of a computer with the access right exceeds the maximum data communications time a The computer at the next station number transmits broadcast data to all computers obtains the access right and executes the processing mentioned in 2 An example of data communications using dedicated protocol 1 To station From Message s m check number Sumbar Command g hayes a o OH Aa 3H re SAH b Other computers check if they received the data transmitted to all computers 1 Station number for transmission to all computers broadcasting 2 See 1 in previous figure Computers which received the data execute the processing men tioned in 3 If a computer failed to receive the data the next computer transmits data to ali computers obtains the access right and executes the processing mentioned in 2 Other computers execute the check mentioned above 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK MELSEC A 6 3 2 Data communications with PC CPUs by setting a master station and siave stations One of the computers is set as a master station and the other computers are set as slave stations which need the approval of the master station to perform data communications with PC CPUs Exampie lt lt lt lt lt lt lt Time a
154. e error LED display i K status storage area to address DO I b15 b14 to b8 b7 b6 b5 b b3 b2 bl This shows that the 2 PRO Do ase EC SC SRRSOSEC ercicsol ener bac occurred Section 4 2 2 gives details about the ON OFF state of each bit in the error LED display area Section 11 gives details about error processing Sections 3 5 2 and 3 5 3 give details about 2 SIO LED No 19 and 4 SIO LED No 23 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY 7 3 2 Turning OFF error LEDs When an error LED turns ON it stays ON lit even when the cause of the error has been eliminated To turn OFF the lit LED 1 must be written to the appropriate bit of address 102H of the buffer memory using the sequence program TO instruction 1 Error LED turn OFF request area b15 b14tob8 b7 b amp b5 b4 b3 b2 bi bO 102H 2 C N LED No 18 2 P S LED No 17 2 PRO LED No 18 2 S1O LED No 19 4 C N LED No 20 4 P S LED No 21 4 PRO LED No 22 4 SIO LED No 23 1 Turn OFF request 0 No processing No protocol send data error clear ie Clear request 0 No processing 2 Program example to turn OFF error LEDs A sequence program example to turn OFF LED 2 C N LED No 16 and LED 4 PRO LED No 22 is given below H H ror He moe Hoon Ki b15 b14 to b8 b7 b2 bli 102H CE A 1 The LED turn OFF request is only valid when it is written 2 Relevant data in the error LED display status storage area at addre
155. ead add Special function module written TW characters leii ea al number 2 characters o N o creck hexadecimal nexadecimal hexadecimal code Oe a a I AE A A Designation of the special function module st pc buffer memory address range to be written No No HILJHIL Number of characters byte length x 20 1 word data uses 2 characters Therefore a 1 byte data is expressed in 2 digits hexadecimal 1 To designate the byte length the following condition must be met e1 lt byte length lt 128 2 With some special function modules 2 or 3 bytes are used to express the data Therefore designate the byte length by referring to the manuals for each individual module Designation Example To write the data to buffer memory address 27FAH to 27FDH 4 bytes of the special function module module number 13H loaded at O numbers 120 to 13F in station number 5 Message wait time is 0 msec Check sum is calculated within this range t l i Computer Ble sle lel 27F eaat 11C DIA BIE FIA A On En En Mond St 57 Ka Xoy a 57 in 343 Su 334 4 2S AJ71C24 This indicates that special function module I O allocation is 120 to 13F Indicates that Data 01H is written to address 27FAH Data CDH is written to address 27FBH Data ABH is written to address 27FCH Data EFH is written to address 27FDH gece e 2AM 2 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSECA 8 11 Remote Run Stop o
156. ecial applications area of the AJ71C24 buffer Read the value in the mode switching Wh designation area en necessary Change the higher bytes of the read value from 02H to OOH Write the higher bytes after changed to OOH to the mode switching designation area When necessary all connected devices are iomes that mode switching has been completed COMPLETED 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY Setting Method MELSEC A The number 1H to DH of the mode to be switched is written ored 1H to DH correspond to the set values 1 to D of the mode setting switch see Section 4 3 1 OH Without a mode switching request 1H With a mode switching request Ois stored when the AJ71C24 starts up After switching the mode the changed mode number is stored here 2H Mode switching completed written by the AJ71C24 when the mode is switched from a PC CPU to mode number 1 AJ71C24 I O addresses 80 to 9F X87 Mode switching request o a MO TO He Hite Horor Ki The set value of the switched mode is written to the special applica tions area of the buffer to He mis o2 kt 7 19 The switching request is changed into pulses A mode switching request is written The mode switching fiag is set Initial processing starts After the initial processing is completed mode switch ing completed is read The data num
157. ed between a computer and a PC CPU is designated with a TO instruction in a sequence program This sets the unit of data to be stored in the send data length storage area default address OH and the received data length storage area default address 80H 0 Word default 1 Byte The head address of the area used for bidirectional mode send buffer memory area send data length storage area and send data strage area is designated with a TO instruction in a sequence program The area of the designated address is set as the send data length storage area 0 to FEH or 20H to 7FEH Bidirectional send buffer memory head address default OH The length of the area used for bidirectional mode send is designated with a TO instruction in a sequence program default 80H When OH to FFH area is used 2H to 100H Bidirectional send buffer memory When 120H to 7FFH area is used 2H to GEOH Bidirectional send buffer memory length The head address of the area used for bidirectional mode receive buffer area receive data length storage area and receive data storage area is designated with a TO instruction in a sequence program The area of the designated address is set as the receive data length storage area OH to FEH 20H to 7FEH Bidirectional mode receive buffer memory head address default 80H The length of the area used for bidirectional mode data receive is designated with a TO instruction in a sequence program default 80H
158. ed data storage area seep coe coraa oode n romaoo nose oon Eror teo aap rFemaonwae S EwiDemorrmamtwe O o e ee heao wore manrope owen fon e Area to specify head address of send buffer memory for no o protocol mode Area to specify send buffer size for no protocol mode o ol Area to specify head address of receive buffer memory for no protocol mode Area to specify receive completion 1 on data length in no protocol mode net speet raaa eaire or amaramen eit prense oeo oraemarannore paoe Pome o emo OOOO oaoa e o omama r oranan o a Se ee es System area unavailable Sen 0 Full duplex RS 232C communications mode setting area transmission mn O Priority Send method setting area when transmission is resumed 2 We transmission a Bidirectional mode setting area ETAT mode Time out check time setting area O Infinite Simultaneous transmission data valid invalid setting area 0 valid ol Check sum enable disable setting area Crec oo reese J e pason ororo SSP o panone o e 3 SPECIFICATIONS MELSEC A Addresses Butter Memory Address Names ee e tera Rete 118 Mode setting state storage area 1H to DH 5 anA 119H_ Mode change specification area 0 8 SEES Transmission control specification area TIAH DTR DSR control and DC code control 11BHe DC1 DC3 control code specification area 1311H olo o 11CHe DC2 DC4 control code specification area 141
159. eived YES See Section 11 3 4 when the 2 C N LED No 16 or 4 C N LED No 20 is turned ON ls communications sometimes made and sometimes not YES See Section 11 3 5 when the communications sometimes fails NO YES tf only NAK is received an error code is Is onty NAK received transmitted according to the protocol Check the error codes in Sections 11 1 or 11 2 NO is undecoded data See Section 11 3 6 when undecoded data is transmitted transmitted 11 4 11 TROUBLESHOOTING MELSEC A 11 3 2 When the RUN LED Is turned OFF The RUN LED is OFF After correcting the switch setting reset the PC CPU is the RUN LED ON NO Eliminate the error and reset Turn the power ON Is the RUN LED ON ls there a PC CPU error NO Is the power ON Voltage within the designated A possible cause may be insufficient power capacity Calculate current consumption ls the RUN LED ON Replace with a higher capacity power supply module Is the line capacity of the power supply module OK External noise may have influenced the AJ71C24 s operation To reset switch power OFF then ON Is the RUN LED ON Consul the nearest Mitsubishi representative 11 5 11 TROUBLESHOOTING MELSEC A 11 3 3 When the neutral state does not change or data is not received The AJ71C24 LED remains ON i
160. em A mark consisting of 2 or more characters High impedance state a High impedance state Composition of 1 character j Vw kt Character Stop bit 1 to 2 bits Start bit 1 bit Parity 0 to 1 bit 7 to 8 bits Transmission from the AJ71C24 APP 11 APPENDICES MELSEC A 3 Ignoring wrong data When any station is not transmitting data the send line is in the high impedance state Thus the send line may become unstable due to noise causing a computer to receive wrong data Since a parity error or a framing error may occur in this case error data must be ignored When using protocol 1 to 4 either ACK NAK or STX code is transmitted first Therefore until an ACK NAK or STX code is received other codes must be ignored When a computer has a pull up down register wrong data is not received When a computer does not have a pull up down register insert a resis tance 4 7 KQ 1 4W as a standard resistance value to prevent a receive of wrong data APP 12 _ APPENDICES MELSEC A APPENDIX 7 Special Function Module Buffer Memory Addresses The special function module buffer memory addresses are listed below They are used to read and write commands TR TW data to and from the special function module buffer memory with protocols 1 to 4 The appropriate manuals give details about buffer memory contents 1 Linkable special function modules buffer memory head address and module nu
161. er completing data communications with PC CPUs to inform slave stations of the completion of data communications with PC CPUs An example of data communications using dedicated protocol 1 1 1 The command symbols ZX 7 at and ZY in this example are Ao 80H pa 0 BBH a aR ron ay 41H 3H 38H 30H SAH 58H 30H 42H 40H communications between the master station and slave stations A E To station From station Mossa Sum check N number number Command Sak une code AOH 80H ZY 0 CH OSH 41H 30H 38H SOH SAH SoH 30H 424 GH MELSEC A 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY The buffer memory has a special applications area for setting transmission control data for communications with external devices see Section 3 7 Each transmission data item has a default value However depending on the purpose and application of data transmission using default values not only makes data communications more complicated but may even preclude them This section describes the settings of all items in the buffer memory special applications area shows how to make changes and gives specific examples The following sections give detailed information about the special applications area eSection 8 14 gives details about the special applications area used for the on demand function when dedicated protocols
162. ers after set RUN 2 Sequence program and parameters have ting the PC CPU to STOP been written a Mail Check control protocol With the SW16 ON parity enabled the change the SW setting ai parity check result does not match the data state of SW17 odd even parity 2 Sum check error With the SW21 ON sum check enabled Check data transmitted from the sum check result of received data e computer and sum check does not match the sum check code of 4P S result Correct invalid data transmitted data i e send data is dif A ferent from received data Communications protocol not valid Check and correct the mode Protocol Communications have been made with a setting switch position and error protocol different from the one set by the control protoco and restart mode setting switch data communications Framing error Framing Data does not match the setting of SW18 Change the setting of SW18 error stop bit 4S10 or the control protocol Ov veriun error i Decrease the data transmis oran New data has been transmitted before sion speed and restart data error AJ71C24 receives all the preceding data communications A AENEA OET AAR 1 Check and correct the char acter area A B or C and res 1 The designation of the character area A tart data communications B or C for the contro protocol set with the s ae mode setting switch is not correct 2 ses hd cae ee a ion 3 3 1 and the 2 Pe imens used with the protocol d
163. es whether or not the AJ71C24 checks the ON OFF status of the CD signal receive carrier detection signal Disabling the RS 232C CD terminal check function If a 1 is written to buffer memory address 10BH the AJ71C24 does not check the ON OFF status of the CD signal It operates as if the CD signal were ON Setting Method b15 to b1 bO 08H a Default 0 Write 0 or 1 b Signal status checked Present 1 Signal status not checked Absent Set bits b1 to b15 of address 10BH to either 0 or 1 The AJ71C24 will ignore the settings How to disable the RS 232C CD terminal check function AJ71C24 I O addresses 80 to 9F Sequence Program oe e a a O aa When the RS 232C is set to use half duplex transmission see Section 7 2 set the CD terminal check to Enabled Section 4 5 2 explains the con necting procedure If the CD terminal check is set to Disabled the transmission method is automatically set to full duplex transmission 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 2 Setting the Transmission Method for RS 232C Set the transmission method used with the RS 232C interface which connects the AJ71C24 to the external device Both half duplex and full duplex transmis sions can be used for setting If the half duplex transmission is used the following settings should be made eWhether or not the AJ71C24 continues or stops transmission when the AJ71C24 and the external device
164. ess leading zeros the underlined Os in 0008200 Designation example 2 To designate R8 in block number 2 0008200 1 The AnACPU dedicated commands NR and NW can only be used for read write operations at the extension file registers of block numbers 1 to 256 They can be used regardless of the parameter s file register setting 2 Use the commands described in Section 8 8 1 to access the parameter set file registers R or to access a file register by designating a block number 3 The following equation is used to calculate the head device number to be designated with the AnACPU dedicated commands NR and NW To designate device number m 0 to 8191 in the nth block n 1 Head device number n 1 x 8192 m 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A i The range of device numbers up to the 28th biock that can be designated with the NR or NW commands is shown below Objective Block Device No Objective Block 0 RO 114688 RO to to to to 8191 R8191 122879 R8191 RO RO 8192 122880 to to to to 16383 R8191 131071 R8191 A sg RO 131072 RO to to 17th block to R8191 139263 R8191 139264 to 18th block 455 R8191 R N 334 8 238 z sa amp Bs g h s ae g 238 8 238 RO 163840 7th block to to R8191 172031 RO 172032 RO 8th block to to 22nd block to R8191 180223 R8191 RO 80224 to 88415 88416 JiS N Ne o 38 sg
165. essage occurs 3 Setting the method of resend Address 111H When setting half duplex communications non priority according to 1 and 2 this setting becomes valid As for simultaneous transmission from the external device and the AJ71C24 when the AJ71C24 restarts the send after interruption of the send designate whether the interrupted message is transmitted again from the beginning resend or only the remaining part is transmitted not resend Set 1 to designate resend Set 0 to designate not resend 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE 5 3 Wiring MELSEC A The following describes the wiring for connecting the external device to the AJ71C24 To do half duplex communications the CD signal of the AJ71C24 must be controlled by the external device Connect them according to Connections to a device which can turn the CD terminal signal ON shown in Section 4 5 2 Section 5 4 describes the ON OFF timing of the CD signal of the AJ71C24 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE MELSEC A 5 4 ON OFF Timing of the CD and RS Signals of the AJ71C24 When doing half duplex communications the data transmission timing is shown by using the CD and RS signals of the AJ71C24 In half duplex communications an external device controls the CD signal of the AJ71C24 The AJ71C24 system controls the RS signal of the AJ71C24 The table below shows the half
166. etion data length is less than no protocol mode receive buffer memory size Example To receive 150 words of data while receive area is set at 80H to FFH default setting Data transmitted for the first time Data transmitted for the second time Data transmitted for the third time device Received data read request Xn1 Receive data read completed Y n 1 1 Reads 127 words of data Read 23 words of the first of the first transmission transmission and 104 words of the second transmission 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 5 Clearing the receive buffer memory If and error occurs due to failure of an external device for example while receiving data from an external device in the no protocol mode the data received up to the error may be incorrect or interrupted To received up to the error may be incorrect or interrupted To recover after an error has occurred it is possible to cleaa all received data and initialized the AJ71C24 buffer memory a Error detection The following methods are used to detect errors while data is being received 1 Reading the error LED display area To detect errors the PC CPU can read the LED ON OFF statuses stored at buffer memory address 101H as transmission error data 2 PC input signals Signals such as READY signals from external devices are con nected to the PC CPU as input signals The PC CPU can detect errors from the ON OFF status of these si
167. f PC CPU and Reading PC CPU Model Name 8 11 1 Commands 1 ACPU common commands Processing During Remote RUN Remote RUN a eem remote Requests remote RUN of PC CPU of PC CPU Remote Remote STOP 52H 53H Requests remote STOP of PC CPU PC CPU Reads if the PC CPU is model modile mode ATN A2N ASN A3H or AJ72P25 R25 Note ou Executable 8 COMMUNICATIONS USING DEDICATED PRO eS MELSECA 8 11 2 Remote RUN STOP 1 Remote RUN STOP control a RUN STOP PAUSE and STEP RUN states are produced by the following combinations of PC CPU key switch positions and com puter commands Command from computer a When aPC CPU is stopped by the remote STOP command given by an external com puter that PC CPU cannot be put into the RUN state by the computer connected to the PC CPU b The clearing of data memories on receiving a remote RUN instruction depends on the states of special relays M9016 and M9017 as shown below PC CPU enters the RUN state without clearing remote STOP data Remote STOP data is cleared outside the latch range set in parameters In this case Link X image is not cleared ECH ON OFF PC CPU enters the RUN state after data memory is cleared Always reset special relays M9016 and M9017 when data memory clearing is not required After operations remote RUN STOP control from the computer are com pleted the remote data will be lost if the power supply is
168. f address 07D0H is 12H 2 the content of address 0701H is ABH 3 the content of address 07D2H is 43H 4 the content of address 07D3H is EFH 8 the content of address 07D4H is 1CH and 6 the content of address 07D5H is 57H 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 3 Comment memory batch write ACPU common command Designation Method Designation in protocol 1 is shown below Comment memory batch read command Data for the designated number of Cri of bytes x 2 characters Designation of the tange to be read Therefore 1 byte data is ex 1 byte uses 2 characters pressed in 2 digits hexadecimal To set the number of bytes the following conditions must be met 1 lt number of bytes lt 128 e Head address number of bytes 1 lt Comment memory capacity Designation Exampie To write 4 bytes of comments to the area beginning with address OBB8H 3000 in decimal in the PC CPU of station number 0 Message wait time is 0 msec Check sum is calculated within this range AJ71C24 Indicates that 1 56H is written to address OBBSH 2 9AH is written to address OBB9H 3 BSH is written to address OBBAH and 4 12H is written to address OBBBH l DICATED PROTOCOLS 8 COMMUNICATIONS USING DEDICATE co MELSEC A 8 12 7 Extension comment memory read write 1 Commands and addresses a AnACPU dedicated commands Points Processing Processed
169. faces used to set the bidirectional mode Functions available when using external devices and a PC CPU Available Functions C computer a ae ipa aid computer Computer to peas Re cai Bsa af ee PER 2 SYSTEM CONFIGURATIONS MELSEC A 2 3 4 2 nratio of external devices to PC CPUs 1 The system configuration for a 2 n up to 32 stations ratio of external devices such as a computer to PC CPUs is shown in Fig 2 5 below Mode to in the figure indicates the range of setting set with the mode setting switch of an AJ71C24 see Section 4 3 1 A combination of two systems one of which has a 1 1 configuration and the other has a 1 n configuration Set the RS 422 of all AJ71C24s to the same protocol RS 422 cable Computer link modules 1 PC CPL 1 Mode 1 to 8 AJ71C24 PC CPULn ALHIEL module Pals module ij RS 422 interface RS 422 cable RS 422 interface Maximum of 32 stations 1 One of the two interfaces of the AJ71C24 which is connected to the external devices is set to a dedicated protocols 1 2 3 or 4 The other is set to a no protocol bidirectional mode 2 When the mode setting is 5 to 8 the RS 232C interface which is not used for the multidrop link can be used for communications with a computer a printer or a CRT in a no protocol bidirectional mode 3 To have the RS 232C communicate over a distance greater than 15 m 49 2 ft use a modem or RS 232C RS 422 converter between
170. following conditions must be met e 1 lt number of bytes lt 128 e Head address number of bytes 1 lt Microcomputer program capacity Designation Example To write 6 bytes of a microcomputer program to the area beginning with address 1338H 5000 in decimal in the PC CPU of station number 2 Message wait time is 0 msec Check sum is calculated within this range Computer iJ za T AJ71C24 MBa wA Indicates that 1 12H is written to address 1388H 2 ABH is written to address 1389H 3 5FH is written to address 138AH 4 7CH is written to address 138BH 5 43H is written to address 138CH and 6 9AH is written to address 138DH 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 12 6 Comment memroy read write 1 Commands and addresses Commands and comment data addresses to read and write comment data are explained below a ACPU common commands State of PC CPU puring 22r RUA STOP ret ES Ese Min R 4BH 52H Reads from comment memory 128 bytes Pe fe eri su mw ia bs ee REAA ge oe eee Note E E Executable EA Not executable b Comment memory addresses The area to store comment data is managed using relative addres ses from the head address 00H For example for 2K bytes of parameter comments the range in which the addresses may be specified for the head address is 00H to 7FHH 1 Comment memory capacity is 64K bytes The comment data address range
171. for the received data is transmitted when the completed code or the set data length whichever comes first is received Xn1 is ON 4 To read the received data by fixed length without setting the com pleted code do the following setting p Write FFFFH bi5 to b8 b7 to bO Write the length of received data default 127 words To set the fixed length at which data receive is complete to 15 words in the case of the read of received data only by fixed length AJ71C24 I O addresses 80 to 9F Sequence Program rop He Hioo Heere ki fA to biher nemon address 10H ro me moe Kis x Write 15 to buffer memory address 108H 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 4 3 Setting a word or byte unit in the no protocol mode This section shows how to set the word or byte unit for data communications and gives an example Setting Method b15 to bt bO Buffer memory address 103H mae l ee 0 word unit Write 1 0 word unit i byte unit 1 The word or byte unit set here only applies to comunications data in the no protocol bidirectional mode and on demand data using a dedicated protocol 2 Set bits b1 to b15 of address 103H to either 0 or 1 The AJ71C24 will ignore the settings To set the byte unit AJ71C24 I O addresses 80 to 9F Sequence Program Write 1 b it to buff roe ns J mos K Ta Hite 1 yi uni o butter memory 7 INITIAL SETTING OF TRA
172. from the AJ71C24 by how tong it takes to process the FROM TO instruction 9 COMMUNICATIONS IN THE NO PROTOCOL MODE 9 4 The following describes MELSEC A Basic Program to Read Write Buffer Memory a basic sequence program to read and write data to and from the AJ71C24 buffer memory 1 Reading data from the receive area FROM FROMP DFRO DFROP Data is read from the buffer memory no protocol receive area default 80H to FFH PC CPU AJ71C24 Buffer memory no protocol receive area No protocol received data length storage pm eee 1 end Received data read request p 4 Yasni Received data read completed 4 e 1 Read request 2 Received data length read Xn1 4 Read completed Example X131 Reads the received data length from the no protocol received data tength storage area of buffer memory when the read request signal Xn1 is turned ON Stores the read data length to the index register Z Reads the received data of the read received data length from the received data storage area of buffer memory Turns ON the read completed signal Y n 1 1 after the received data has been read gt Data read by program 3 is processed as the received data To read the data of n 1 words from the area beginning with buffer memory address 80H to the area beginning with DO when the AJ71C24 1 0 numbers are allocated to 130 to
173. g OS area is cleared In full duplex communications keep the CD signal ON The ON OFF status of the CD signal is ignored if CD terminal check disabled is set at 10BH of the buffer memory address 3 NULL code transmission from the AJ71C24 A framing error might occur at the AJ71C24 if nothing is sent from the computer to the AJ71C24 via the RS 422 interface In this case the AJ71C24 sends OOH NULL code to the computer This NULL code should be ignored by the computer 4 Combined use with dedicated protocols When data communications is executed in the no protocol mode if the AJ71C24 mode setting switch see Section 4 3 1 is placed in any position from 1 to 8 or any mode number from 1 to 8 is designated by the mode switching function data communications with the other inter face can be executed using the dedicated protocoi Data communications cannot be executed by setting one interface to the bidirectional mode and the other to the no protocol mode 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 5 Using a FROM TO instruction to access the AJ71C24 A FROM TO instruction to access the AJ71C24 from a PC CPU should only be used when absolutely necessary This is because when data is transmitted from the AJ71C24 to an external device at the same time a FROM TO instruction from a PC CPU to the AJ71C24 is executed the FROM TO instruction has priority and is processed first This delays the data send time
174. g type 3 SPECIFICATIONS MELSEC A 3 2 3 RS 422 terminal block specifications om fem Sl ee ee el Sign grou le ee erat ec Fig 3 2 RS 422 Terminal Block Specifications 1 Fig 3 3 shows the RS 422 function block diagram 94 Sec 4 3 2 SW23 2 Sec 4 3 2 SW24 Fig 3 3 RS 422 Function Block Diagram 3 2 4 RS 422 cable specifications An RS 422 cable is recommended in Section 3 2 1 Other types of cabies may be used instead if they conform to the specifications listed in the following table a Fig 3 4 RS 422 Cable Specifications Km 0 621 mille TIONS 3 SPECIFICATIO e MELSEC A 3 3 Data Communications Functions The tables below list the data communications functions available when an external device such as a computer and a PC CPU are connected by an AJ71C24 module 3 3 1 Functions available using dedicated protocols and commands The functions available using dedicated protocols 1 to 4 are listed in Tables 3 3 and 3 4 The commands in Table 3 3 are the ACPU common commands that are employed when a CPU module see Section 2 2 is used together with an AJ71C024 The commands in Table 3 4 are the AnACPU dedicated commands that are employed when the A2ZACPU P21 R21 S1 or ASACPU P21 R21 is used together with an AJ71C24 Use the commands in Table 3 4 to access the AnACPU device memory Read write of data can be done with the whole area of each devi
175. ge wait time is 0 msec Check sum is calculated within this range giia e a a vea eee en 465 Sm O Dl D O 30520 31 Ru Da Ra EE TEN TELTE S 3 ns Sn 82 Ony B Dal 31 0 57 ny 52y Ben Wu ay Wal 339 38 AJ71C24 The station number is designated in hexadecimal Therefore the desig nation of station number 10 should be made in OAH S COMMUNICATIONS USING DEDICATED FROTOCOLS MELSEGA 3 Monitoring the extension file register ACPU common command Designation Method Designation in protocol 1 is shown below Monitor extension file register Monitor Monitor n results results t 1 The number of characters for the number of points designated by monitor data registration EM 1 point of device uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal Designation Example Monitoring after registering the monitor data word units as mentioned in item 2 Message wait time is 0 msec Check sum is calculated within this range Check sum is calculated within this range Computer AJ71C24 automatically adds the sum check code AJ71024 S a a amour 2 3 1 the content of R1234 of extension file register block number 05 is 3501H 13569 in decimal 2 the content of R2345 of extension file register block number 06 is 4F5BH 20315 in decimal 3 the content of R3055 of extension file register block number 15 is 0150H 336 in decimal 4 the content of R8000 of extension file reg
176. gnals b Clearing received data 1 Range of data cleared 2 All data already received by the AJ71C24 is cleared and the no prptocol mode receive buffer memory area is initialized See Section 3 5 2 and 3 5 3 for details How to clear received data Received data is cleared by writing 1 to buffer memory address 10DH using the TO instruction After clearing received data the AJ71C24 clears the 1 that was written to buffer memory address 10DH The received data may be cleared while the receive data read request signal Xn1 and received data read completed signal Y n 1 1 are OFF Use Xn1 and Y n 1 1 as an interlock for TO instruction Clear instruction Xn 1 Y n 1 1 4h st st a 00 Te Te AJ71024 PC CPU Program TO instruction Write 1 to buffer memory address 10Dx Received data clear processing Address 10Dx Address 100n i IN THE NO PR E 9 COMMUNICATIONS OTOCOL MOD ETERECA 9 6 Sending Data in the No Protocol Mode AJ71C24 gt External Device In this section sending means outputting data which is in the no protocol mode AJ71C24 send area to an external device receive area This is in response to turning the PC CPU send request signal Y n 1 0 ON 1 Send area and writing send data The send data length and send data are written to the send area a The length of send data to be written or having been written to the send data storage
177. hannel setting is valid only for modes Ato D In other modes the setting switch may be in the ON or OFF position Section 4 5 4 gives the setting examples for different system configura tions Setting the main channel defines data flow as shown below Data received through the main channel is automatically transmitted through the sub channel Data received through the sub channel is automatically transmitted through the main channel When the mode switch is set to A to D only the processing request commands transmitted from other stations and received through the main channel of the self are valid with the set mode The AJ71C24 executes the requested processing and transmits the result through the main channel RS 232C RS 232C A Data flow Data flow RS 422 RS 422 PC CPU AJ71C24 PC CPU AJ71C24 RS 232C is set to the main channel RS 422 is set to the main channel Transmission specifications The RS 232C and RS 422 use the same transmission specifications They cannot operate with two different transmission specifications set tings Do not set the unusable baud rate setting SW13 14 and 15 ON If these switches are set the RUN indicator LED LED No 0 is turned OFF and operation is not possible Sum check Set whether the sum check code is added or not added to the end of the message when the computer link operates with the dedicated protocol Sections 8 4 1 to 8 4 4 and 8 4 5 7 give the message s
178. he CD signal is ignored if the CD terminal check function is disabled NULL code transmission from the AJ71C24 A framing error might occur in the AJ71C24 if nothing is sent from the computer to the AJ71C24 via the RS 422 interface In this case the AJ71C24 sends 00H NULL code to the computer These NULL codes should be ignored by the computer The computer should also ignore all data sent from the AJ71C24 prior to an STX ACK or NAK code NAK response from the AJ71C24 The NAK response is given from the AJ71C24 to the computer using the dedicated protocol if an error is detected Therefore the NAK response may be output even while the computer is sending data in the full duplex communications mode Data link error processing The AJ71C24 enters the standby state see Section 3 6 I O list for programmable controller CPU if a data link error occurs during data communications with a PC CPU the PC CPU number being other than FFH on MELSECNET II MELSECNET B If an error is detected by the computer when executing the time check send a clear command EOT or CL see Section 8 4 5 1 to initialize the transmission sequence Sending a command from the computer When sending a command from the computer to the AJ71C24 using the dedicated protocol send the command only after the data communica tions called by the preceding command is completed Replacing a PC CPU on the data link system After starting up the AJ71C24 if a
179. he PC CPU and store them in the computer The computer then carries out the appropriate controls by writing programs parameters and comment data to the PC CPU 8 12 1 Precautions during program read write 1 2 3 When reading programs that have been written to the PC CPU read all sequence programs microcomputer programs parameter data and comment data from all areas When writing programs write all stored data to the PC CPU If all areas have not been written to the PC CPU will not work correctly Before writing programs write parameter data and execute a parameter analysis request Otherwise the parameters in the PC CPU user memory will be changed but the parameters stored in the work area by the ACPU for operation will remain unchanged Therefore if a peripheral device is loaded and operated after the parameters are changed processing will be carried out with the previous parameters which are still stored in the work area The number of points which can be processed per communications is fixed When reading or writing data divide the data into several groups to read or write the entire area Parameter data should be divided into 3K bytes Other data shoule be divided into units of data determined by parameter setting 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 12 2 Program read write control procedures 1 Reading Execute main sequence T C set value read command MR if there are no
180. he extension file register in units of points words by designating the extension file register in successive numbers Note o Executable x Not executable 2 Device numbers of extension file registers a Device number range Range 0 through the number of usable blocks x 8192 1 Device numbers used with APCU Device numbers used with AnACPU common commands mentioned in Sec dedicated commands mentioned in Sec tion 8 8 1 tion 8 8 2 4 l 0 0 sd Block No 1 to Block No 1 to ene 8191 0 to Block No 2 8191 1 word Device numbers are allocated in 1 word ascending order from the blocks assigned a smaller block number 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A The device numbers that can be designated vary according to the type of memory cassette and the PC CPU parameter setting The UTLP FN1 Operating Manual or the A2A S1 A3A CPU User s Manual give details For block numbers that do not exist in the memory cassette device numbers are not allocated In this case the device numbers are allocated as indi cated below skipping non existent block numbers Device numbers Block No 1 area Block No 2 area Blocks Nos 3 to 9 do not exist due to low memory capacity to 24575 24576 to 32767 32768 b A device number is designated in 7 characters Designation example 1 To designate R10 in block number 1 0000010 A blank code 20H can be used to expr
181. heck Mode error request from the computer normal data for noise and or other causes communications is not performed between or b replace the AJ71C24 the AJ71C24 and PC CPU due to noise or Restart data communications some other reason Special function module designation error Special A special function module having butter function memory and capable of performing data Check control protocol data module communications is not placed in the or change the special func designa designated special function module tion module location tion error number s position Or the module number is wrong gt Error in the designation of a sequence pro 1 Designate a step number gram step number which lies within the desig 1 A step number was designated which lies nated range or change the outside the program range designated by parameters and restart trans the PC CPU parameters mission 2 A subsequence program that does not i 2 Check the model name and exist or cannot be designated was desig the set parameter values of nated the corresponding PC CPU Remote RUN STOP Impossible Check for and reset remote Remote Remote STOP PAUSE has already been ex R STOP PAUSE from another error ecuted from another module such as 4 PRO module another AJ71C24 Data Access was made to a station with which link error communications has been discontinued Check the state of data link Special Memory access to the special functio
182. herefore a 1 word data is expressed in 4 digits hexadecimal To designate the device range the following conditions must be met e1 lt number of device points lt 64 10 for a bit device Head device number number of device points 1 s maximum device number number of device points x 16 for a bit device Designation Examples Example 1 To write data to 32 points from M640 to M671 in station 0 Message wait time is 0 msec Tears pve epee 37457 w rep Dn Ent EIR EIRAN Check sum is calculated within this range cansaoAnAnBodonnagnnAooapananaD MM MMMMMMM MMM 66 6666 6 6 6 666 5 44477 5 5 5 4 21010 87 6 M 6 5 5 The WW command is used for word unit designation The designation for the number of device point to write data to the 32 points to M640 to M671 is 02 1 for 16 points 8 COMMUNICATIONS USING DEDICATED PROTOCOLS Example 2 To write data te 2 points of DO and D1 in station 0 Message wait time 0 mesc t Computer corte eseccceqiasiacorey Wi Joo Abad Ton STuc BOn Aer Ku X30 HN p52 39 Sn The Hrs An Sy he 37 Check sum is calculated within this range indicates to write 1234H 4660 in decimal to DO and ACD7H 21289 in decimal to D1 MELSEC A 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Using the QW command AnACPU dedicated command Designation Method Designation in protocol 1 is shown
183. hin the range of 128 to 159 80H to 9FH to each computer Set the station number for broadcasting to all computers at 160 AOH Example m n 5 27 shows each station number of a computer and an AJ71C24 Decimal hexadecimal 128 80H 129 81H 132 84H 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK E desi MELSEC A 6 2 2 Maximum data communications time per computer Set the maximum time so that after obtaining an access right each com puter can perform data communications with PC CPUs In the following figure each of these m means time duration Even if the computer that obtains the access right malfunctions data com munications can be done between other computers and PC CPUs by setting the maximum data communications time This shows the range within eee Example Time Which a computer does not Computer 1 tt ene obtain the access right Set the maximum data communications time per computer to a time that is sufficient for data communications with PC CPUs in the computer link system After the computer link system starts the computer that obtains the access right must complete data communications with PC CPUs within the maximum data communications time When unable to complete data communications the computer with the access right transmits the CL code to communicating PC CPUs within the maximum data communications time and initializes a transmission seq
184. ignals DTR DSR control is not available for the RS 422 2 Receive data flow Data received from an external device is stored in the AJ71C24 no protocol receive buffer memory area via the OS memory area Under the following conditions the AJ71C24 temporarily stores received data to its OS area When transfer to the no protocol receive buffer memory is enabled read request signal Xni is OFF data is transferred until the receive completed code is received or untii the fixed length of data has been transmitted Conditions 1 When there is too much data for the buffer memory because the received data length exceeds the no protocol receive buffer memory area 2 When data is transmitted from an external device before the PC CPU reads the data received previously 3 AJ71C24 DTR control a The size of the receive data storage area of AJ71C24 OS area is 279 bytes It turns the DTR signal ON and OFF as follows iess than 10 bytes storage area free OFF e more than 41 bytes storage area free ON ON ON OFF OFF DTR signal i i i ON receive enabled OFF receive disabled 1 i 1 Receive ready AS71024 memory AJ71C24 memory OS area OS area Data storage 41 bytes Free area or higher 3 SPECIFICATIONS MELSEC A b When received data is cleared as described in Section 9 5 5 all data in the OS area is cleared at the same time as data in the no protocol receive buffer memory area
185. in a sequence program is output to an external device in the same code e Data received from an external device is read from the no protocol AJ71C24 receive area in buffer memory using the FROM instruction in a sequence program OOH to FFH In the no protocol mode data is not converted to ASCII code in the AJ71C24 if ASCII code is required data must be processed into ASCII code in a PC CPU or external device 2 Designating a word byte unit for no protocol mode communication For data communications in the no protocol mode a unit of data to be transmitted may be selected between words and bytes Default setting for data unit selection is word but selection is possible by writing 1 or 0 to address 103H in the buffer memory area Section 7 4 3 gives details about the program to make this setting 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 9 2 Handshake I O Signals Signals known as I O handshake signals are required for no protocol com munications These signals a output data received from the sequence program to an external device or b detect signals from an external device to enable the sequence program to read them Turned OFF by ram PC CPU Yin 1 0 Send request prog t External Turned ON by program Turned OFF by AJ71C24 device omple ed AJ71C24 Sen c urned ON by Received data read request Tumed OFF by AJ71C24 Turned ON by AJ71C24 Turned OFF by program Yin 1 1 Rece
186. ing for 256 points is OOH e Head device number number of device points 1 lt maximum device number Designation Example To read the data at 5 points from X40 to X44 in station 5 Message wait time is 100 msec Assume that X40 and X43 are OFF and X41 X42 and X44 are ON Check sum is calculated Check sum is calculated auba oea E giy within this range x 0 Seg Wve Sin jIin y Du jIin Oe SH indicates that X44 is ON Indicates that X43 is OFF indicates that X42 is ON Indicates that X41 is ON Indicates that X40 is OFF The message wait time is designated in the range of 0 to 150 msec in units of 10 msec using hexadecimal notation of 0 through FH Therefore 100 msec corresponds to A 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Using the JR command AnACPU dedicated command Designation Method Designation in protocol 1 is shown below 0 30H indicates OFF and 1 31H indicates ON To designate the device range the following conditions must be met e1 s number of device points 256 setting for 256 points is 00H Head device number number of device points 1 lt maximum device number Designation Example To read the data at 5 points from X40 to X44 in station 5 Message wait time is 100 msec Assume that X40 and X43 are OFF and X41 X42 and X44 are ON within this range Check sum is calculated s A within this range x ay PRENA See 3D 31
187. ing the monitor data bit units in Example 1 of 2 a Message wait time is 0 msec Check sum is caiculated within this range Check sum is calculated within this range X s E T 7 8 6 x Ge Hn Mu Sty Wu j Se TO that T123 contact is ON Indicates that Y60 is OFF Indicates that X40 is ON 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Monitoring the devices registered by the JM command AnACPU dedicated command Designation Method Designation in protocol 1 is shown below Monitor bit command The number of characters for the number of points desig nated by monitor registration JM OFF when the value is 0 30H ON when the value is 1 31H Designation Example Monitoring is executed after registering the monitor data bit units in Example 1 of 2 b Message wait time is 0 msec Check sum is calculated within this range Check sum is calculated within this range Indicates that T123 contact is ON Indicates that Y60 is OFF Indicates that X40 is ON 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 4 Monitoring device memory in units of words a Monitoring the device registered by the WM command ACPU com mon command Designation Method Designation in protocol 1 is shown below Monitor bit command St No Station number ood The number of characters for the number of points designated by monitor registration WM 1 point of device
188. ion control by the DC code control is enabled Mode switching Bidirectional RS 232C interface Transmission is Transmission control Ein eae eta AS 422 interface Control is not available Data communications with an external device supporting the half duplex transmission function can be controlied according to the setting by the user Data communications control in the half duplex transmission RS 232C Data communications in the multidrop link in which the ratio of computers to PC CPUs is m n is possible m n multidrop link APPENDICES MELSEC A APPENDIX 2 Precautions Concerning tg mrad ang the Use of Existing Programs Prepared for the AJ71C2 Computer Link Module The following sections describe precautions which should be taken when using the AJ71C24 S8 computer link module These precautions cover compatibility with the AJ71C24 S3 computer link module hereafter called the AJ71C24 S3 the use of existing programs prepared for the AJ71C24 3 and procedures for changing adding and installing modules to the existing network 2 1 Compatibility The AJ71C24 S8 and the AJ71C24 S3 have the same dimensions and can be installed in the same way They also use the same basic programs PC CPU programs and computer programs Compatibility is maintained within the functions supported by the AJ71C24 S3 2 2 Precautions When Using Existing Program
189. is checked Hf an error is found MO is set 1 When an error occurs in the data send result Perform error correction according to the error code read from buffer memory address 116H APP 23 APPENDICES wate MELSEC A APPENDIX 10 External View 4 2 0 17 2 Z Asica Byeneun Printed circuit board EEEE AUP LPL LELOLPL rrr 0 17 106 4 17 42 M4 0 16 x 0 7 0 03 x 8 0 31 Terminal screw Unit mm inch APP 24 APPENDICES MELSEC A APPENDIX 11 AJ71C24 Setting Record Form Use this form to keep record of settings of the AJ71C24 or to create computer link programs for PC CPUs and computers Make duplications of this form and use them Method of entry 1 No and Data 2 Enter the number of the record form and the date on the top right corner of the form Settings of the buffer memory special applications area Enter the set values which change default settings when the AJ71C24 READY signal Xn7 is turned ON in the set value s column The settings required for the dedicated protocol and the no protocol bidirectional mode at the start of the AJ71C24 are indicated with mark in the columns next to the address s column 3 Switch settings 1 Station number setting switch Enter set values value indicated by the arrow in the columns of the tens digit and the ones digit of each station number 2 Transmission spe
190. is determined by the parameter setting 2 Comment memory addresses are designated in 4 digit ASCH 0000 to FFFF 3 A character area error O6H occurs if the following condition is not met Head address designated number of bytes lt comment memory capacity It is not possible to designate a particular device or device number when reading or writing comment data Always read or write all data from address OH 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 2 Comment memory batch read ACPU common command Designation Method St No Station number Designation in protocol 1 is shown below Comment memory batch read command Number of characters Number of bytes x 2 Head step Number of bytes 1 address is expressed in 4 ch wait time 4 robo g charactere 1byte 2 characters Designation of the range to be read Character area 8 To designate the number of bytes the following conditions must be met 1 lt number of bytes lt 128 e Head address number of bytes 1 lt Comment memory capacity Designation Example To read 6 bytes of comment memory data beginning with address 7D0H 2000 in decimal in the PC CPU of station number 1 Message wait time is 0 msec Check sum is calculated within this range Sum check code is added by the AJ71C24 AJ71024 Check sum is calculated Ve ke at within this range 1 2 w 5 8 Indicates that 1 the content o
191. ister block number 17 is 1C2DH 7213 in decimal S COMMNICATIONS USING DEDICATED PROTOCTLS MELSECA 8 9 Buffer Memory Read and Write This function is used to read from and write to the AJ71C24 buffer memory When this function is used communications between the computer and AJ71C24 commences immediately when the computer sends a read or write request without waiting for the PC CPU END processing Therefore the time T1 described in Section 8 5 is always equal to zero The PC CPU carries out buffer memory read and write using TO and FROM instructions The method for specifying the control protocol meanings and examples for carrying out this function are shown beiow 8 9 1 Commands and buffer memory 1 ACPU common commands ca state of PC CPU Processing STOP Batch Bur on feon sen dibdi an PN till 128 bytes bytes er ow 43H 57H Writes to buffer memory Note 0 Executable 2 Buffer memory Buffer memory addresses are OH to 7FFH see see Section 3 5 One address consists of 1 word 16 bits Read and write are both executed in word units regardiess of the word byte unit setting 1 When accessing the user area in buffer memory simultaneously by using this function in the no protocol mode see Section 9 or the bidirectional mode see Section 10 the buffer memory address in the following area should not be designated by the command described in item 1 in Section 8 9 1 No prot
192. ive data read completed Turned ON by program 9 COMMUNICATIONS IN THE NO PROTOCOL MODE 9 3 Programming Hints MELSEC A 9 3 1 To write data to the special use area in buffer memory 1 2 3 4 Buffer memory is not backed up by a battery When the power is turned ON the PC CPU is reset or the mode is switched all data in the buffer is set to default value Therefore whenever the power is turned ON the CPU is reset or the mode is switched any data which has been changed from a default value must be written to the buffer Except for the mode switching area data can only be written to the speciai applications area 100H to 11FH using the TO instruction in a sequence program If data is written to the buffer memory using the command in a computer program the AJ71C24 will not operate correctly Never try to write data using a computer program If the following functions are used in combination with the dedicated protocol make sure to allocate the user area in buffer memory so that the same area will not be used by different functions If the same area is allocated to different functions the data in this area is rewritten and communications will not be correctly executed No protocol mode transmission or bidirectional mode transmission No protocol mode receive or bidirectional mode receive Buffer memory read write CR CW command function On demand function The memory areas preceding and follo
193. l applications area to the default state except for the mode switching designation area address 119H Clears received data Mode switching e Setting the switched mode number to the mode setting status storage area address 118H 5 After completing step 4 the AJ71C24 turns ON its READY signal overwriting 02H to the higher bytes in the buffer s mode switching designation area Switched to this mode number designated in step 2 Mode switching completed 6 Write the set data for communicating data in the switched mode in accordance with the higher bytes switched to 02H to the AJ71C24 buffer s special applications area using the sequence program However writing the set data is unnecessary if data can be communi cated using the default data in the special applications area 7 Use the sequence program to read the data in the AJ71C24 buffer s mode switching designation area and write OOH to the higher bytes FROM P 119H 02H ol H 02H Of JH WAND 16 bit logical OOFFH product TO P Sets the higher bytes to OOH 8 After switching the mode communicate data to provide an interlock between the external device and the AJ71C24 This operation notifies all connected devices that the special applica tions area setting has been completed and that data communications is enabled in the switched mode TION 3 SPECIFICATIONS MELSEC A 3 5 Data Communications Transmission Control Function Thi
194. l code Code hexadecimal ena o Enquiry The code used to begin data send The code returned to the mating station nce ce Acknowledge when data has been received correctly Nagative The code returned to the sending stations NAK Asknowied e When data has not been receiving correctly immediately followed by an error code a Data send from an AJ71C24 to a computer The AJ71C24 appends the control code to be transmitted b Data send from a computer to an AJ71C24 The AJ71C24 checks the control code received It is not possible to read the control code from a sequence program 2 Data length Data length expresses the number of bytes or words of data in the data area in 2 byte binary data Data Jength units are determined according to the setting at address 103H of the buffer memory a Data send from an AJ71C24 to a computer The data length to be transmitted is the value written to the send data length storage area of the AJ71C24 buffer memory by the TO instruction in a sequence program The AJ71C24 transmits the written value as it is from the lower byte L b Data send from a computer to an AJ71C24 The AJ71C24 checks the received data length When it is correct the AJ71C24 writes the first 1 byte to the lower byte position L of the received data length storage area of the AJ71C24 buffer memory Example Data length when transmitting AJ71C24 and value 100 units bytes Data
195. l is OFF turn the CD signal ON If the RS signal is ON wait until it turns OFF After the RS is turned OFF turn the CD signal ON 3 After turning the CO signal ON transmit data 4 After completing the data send turn OFF the CD signal 5 Ifthe RS signal turns ON during the data send stop the data send Then turn the CD signal OFF and perform data receive process ing When the AJ71C24 and an external device start data transmission simultaneously the RS signal turns ON 6 Retransmit all interrupted data from the external device to the AJ71C24 after the data send from the AJ71C24 is completed When DTR DSR control is being executed When a starting or during data transmission to the AJ71C24 b if the DTR ER signal of AJ71C24 turns OFF interrupt data transmission until the DTR signal turns ON See Section 3 5 2 5 HALF DUPLEX COMMUNICATIONS ING THE RS 232C INTERFACE MELSEC A 2 AJ71C24 is set to non priority Continue data send Data A Dae External device Data Ct Dae AJ71C24 SD send data Ei send request CS clear to send CD receive carrier detect RD received data Because the AS71026 I set to Data C 2 nonpriority transmission is Resend a Section 5 4 2 gives ON contents of the send a Data C 1 Data C 2 z A 1 6 a AJ71C24 stores received J Data A Data B data The following steps describe the operations required for an
196. lator 1500 V P P noise voltage 1 usec noise width and 25 to 60 Hz noise frequency Dielectric withstand 500 VAC for 1 minute across batch of DC external terminals and voltage ground 5 i 50 MQ or more with 500 VDC insulation resistance tester at the Insulation resistance same location as dielectric strength Operating ambience No corrosive gases or dust Cooling method Self cooling Noise resistance i 1 One octave marked indicates a change from the initial frequency to double or half frequency For example any of the changes from 10 Hz to 20 Hz 20 Hz to 40 Hz 40 Hz to 20 Hz and 20 Hz to 10 Hz are referred to as one octave 2 The noise durability and dielectric withstand voltage values were obtained with the RS 232C and AS 422 interfaces unconnected JIS Japanese Industrial Standard 3 SPECIFICATIONS MELSEC A 3 2 Performance Specifications 3 2 1 Transmission specifications Table 3 2 Transmission Specifications Conform to RS 232C Conform to RS 422 Dedicated protoco Half duplex communications system 1 No protocol bidirectional Full halt duplex buffer memory setting Dedicated protocol Half duplex communications system 1 RS 422 No protocol bidirectional Full duplex communications system ee system Asynchronous system Transmission cae 300 600 1200 2400 4800 9600 19200 BPS switch selected Specifications Transmission method start bit bit Data format eee
197. length sar ujo ugnuna uor ugn wgn a 0064H O00AH 1 100 Ou 00 a a Sbu et b b7 bi bO expressing dono condana 2anE m a 10 14 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 3 Data area 4 The data of 00H to FFH code can be processed in a string of 1 byte data as the send data a Data send from an AJ71C24 to a computer The data area to be transmitted is the value written to the send data storage area of the AJ71C24 buffer memory by the TO instruction in a sequence program The AJ71C24 transmits the data according to the designated length and byte word units sequentially from the lower address in un changed codes b Data send from a computer to an AJ71C24 The data area received is written to the received data storage area sequentially from the lower address in unchanged codes as they are received The data length to be written is determined by the data length in the received message and the designated word byte units Check sum The check sum is the lower 2 bytes 16 bits of the result obtained by adding the data length and the data area in the message as binary data If the setting at address 115H is 1 the check sum is not required a Data send from an AJ71C24 to a computer The AJ71C24 caiculates and adds the check sum if the check sum is not processed the check sum is not transmitted 10 15 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A b Data send
198. length storage area for the no protoco send Buffer memory area for the no protocol send send data storage area od Area for no protocol send 100H addresses 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 4 5 Setting a buffer memory area for no protocol receive This section shows how to set the AJ71C24 buffer memory area to store data the PC CPU received from the external device in the no protocol mode An example is also given When the bidirectional mode setting area address 112H is set to 1 this memory area is set for bidirectional mode transmission Setting Method mo Write the head address in hexadecimal to bo 106H Head address setting Default 80H 107H Buffer size setting Default 80H Write the memory size number of addresses in hexadecimal 1 Buffer memory addresses 100H to 11FH are for the special applica tion area and should not be set 2 Make sure that the specified range does not overlap the no protocol mode send area or the on demand data area 3 Buffer memory address 107H should inciude the storage area of the no protocol receive data length 4 If any range except the user area is set the AJ71C24 will execute operations with defaults including the areas mentioned in 2 above To set the head address to 300H and the memory size to 120H AJ71C24 I O addresses 80 to 9F Sequence Program TOP Ha H106 H300 Ki Write H
199. llowing conditions must be met e1 lt number of device points lt 64 o Head device number number of device points lt maximum device number Designation Example To read the data at 2 points of R8190 and R8191 of extension file register block number 12 in station number 0 Message wait time is 0 msec Check sum is calculated within 0o 12 A8190 this range The AJ71C24 adds the sum check code Oral Xu Wuj 46n 46 Da Vg 32 San MBa J a Dnr Haf X AJ71C24 Check sum is calculated 1234 within this range CAE 6 Slus Ri Dny Ha uj n w m indicates that The content of R8190 of block Number 12 is 1234H 4660 in decimal The content of R8191 of block Number 12 is 7ABCH 31420 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 8 5 Batch write of the extension file register ACPU common command Designation Method Designation in protocol 1 is shown below Extension file register batch write command No No 1 device point uses 4 characters Ale Ie Lt Therefore a 1 word data is expressed in 4 digits hexadecimal To designate the device range the following conditions must be met 1 lt number of device points lt 64 e Head device number number of device points lt maximum device number Designation Example To write data to 3 points R7010 to R7012 in the extension file register block number 05 in station number 3 Message wait time is 0 msec Check sum is cal
200. lock number 0 b The range of block numbers which can be designated varies ac cording to the type of memory cassette and the PC CPU parameter setting The UTLP FN1 Operating Manual or A2A S1 AS3ACPU User s Manual give details 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A c Each address is designated in 7 characters consisting of the block and device numbers Block number of 2 digits or less Block number 2 digits R Device number 4 digits Block number of 3 digits Block number 3 digits Device number 4 digits Exampie Block number of 2 digits or less Block number of 3 digits 05 R8190 102 8190 Device number Device number Block number Block number 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 8 2 AnACPU dedicated commends and device numbers 1 The AnACPU dedicated commands used for direct read and direct write of extension file registers are described below These dedicated commands are used to access the extension file register of block numbers 1 to 256 by directly designating the address which begins with address 0 in block number 1 as the device number The address numbers used to access the extension file register go from 0 to the usable number of blocks x 8192 points Number of State of PC CPU sessed During RUN Processed per During Communica tions Reads in units of points words by designating the extension file register in successive num Writes data to t
201. ltidrop link system of 1 n 2 n or m n ratios communications data in control protocols 1 to 4 and on demand transmission data will be destroyed and correct data trans mission is precluded 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A Designation Examples Example 1 To start transmission of data stored in buffer memory at addresses 120H and 121H by the sequence program Station number is 0 AJ71C24 I O addresses are CO to DF transmission data is designated in word units Computer Yai C24 appends PC number FE automatically AJ71C24 1 is written if a transmission error On demand D2 120 occurs _ _ _ gt command W Cos 2 a 10CH Data is transmitted 120H _1234H sequentially in units of 4 121H __5678H bits from the higher bit Request to turn OFF error indicator LED Sets word unit for data transmission X000 M9039 Converts the start signal to PLS MO xXoc3 Sets transmission data 1 Designates head address of the transmission data storage area and data length Resets the on demand error Start is disabled if the content at address 10CH is 1 2 Starts the on demand function Transmission completed flag Reads the transmission error storage area to check transmission status CIRCUIT END Address 10CH Data not transmitted Correct transmission due to an error 8 110 8 COMMUNICATIONS USING DEDICA
202. ly if the DSR is ON when send data exists 1 10 2 SYSTEM CONFIGURATIONS 2 SYSTEM CONFIGURATIONS This section describes system configurations which can be combined with the AJ71C24 2 1 Overall Configurations Fig 2 1 shows the overall configuration of the A series system which is loaded with the AJ71C24 External device such as a computer printer CRT etc Building type PC CPU modules A32B T A35B yPe A38B i i Type AJ71C24 S8 Main base units Computer link module 1 When loading the AJ71C24 into type A55B or AS8B extension base unit see Section 2 2 Ap plicable System An extension base unit cannot be connected to a type A32B main base unit because an ex tension connector is not provided Extension base units Fig 2 1 A Series System Overall Configuration NFIGURATION 2 SYSTEM CONFIGURATIONS MELSEC A 2 2 Applicable Systems The AJ71C24 can only be used in the systems described below 1 Applicable PC CPU modules and the number of AJ71C24 modules The tabie below shows the PC CPU modules to which the AJ71C24 is applicable and the number of AJ71C24 modules which can be con nected to the PC CPU modules The PC CPU modules listed below include those which have the MEL SECNET link function e g AICPU includes A1CPUP21 R21 to which an AJ71C24 can be connected Number of PC CPU Modules Connectable AJ71C24s If the following modules are used with the AJ
203. m binary BIN to ASCII Data is output from the buffer memory to the printer sequentially from the lowest address head address with the lower 8 bits to the higher 8 bits Therefore use the sequence program to reorganize the order of the data output to the printer The following program described in 1 gives an example of this conversion Example Converting 1234 stored in the data register to ASCII 0 4 D 2H BIN AEE D10 1 2 3 4 BCD instruction o o o 1 ojo 1Jo ojo 1 1lol1 ojo o10 nS Lowers bits 0 1 o o oeo lo jo t 1 ber jolo 1 0 pee SFLP instruction o o o olo 1 o o 4o o o o o 1 o 0 o o 0 0 o ojo 0 oz olofofolojafojojojojojojojo r oar 8 bits to convert ue enna Lower 8 bits HigherSbits 7 Lower8 bits higher 6 bisot LeLololojolojsjo o o ojojojol1jojojojojojojolo o oz higher bit Lower 8 bits bk HigherSbits 7 LowerSbits P one oJojojojojo s ojojojojojojojoja oz Gata to word deta aoe fojojojolojolojojojojojojojojo s o2 ofofojojo sjojojojojojojojals 1 D20 ojofojojajoj jojojolojojofojo s oes msan ololofojo 1jojejojojolojolo sj1 os elol 1lolofi olololi i ololo i oss 1 y a eolit olo ojofojo i 1 olo o Hsos esih the data to ASCII pe efefololo lofolofolololofo s i oss ojojojojojoj jojojejojejojojo 1 oss ofofo ojojs sjolsfojojoio s sjojol1 pss fofof ofojojolojo s jojojojo
204. mbers Special Function Module Name Buffer Memory Head Address Module Number When Loaded hexadecimal in Slot No 0 AD61 S1 high speed counter module 01H A616AD analog digital converter module A616DAI digital analog converter module O1H AB16DAV digital analog converter module A616TD temperature digital converter module A62DA S1 digital analog converter module A68AD S2 analog digital converter module A68ADN analog digital converter module A84AD analog digital converter module A amp 81CPU PID control module A61LS position detection module A62LS position detection module AD70 D positioning module AD71 S1 positioning module AD71 S2 positioning module AD72 positioning module AJ71PT32 MELSECNET MINI master module AJ71C22 multidrop link module AI71 24 89 86 computer ink modue moon V o ADS S3 intelligent communications modus son lt o ADSTH inteligent communications modue son lt V o ADS7G graphie controller modue ao M on A371021 61 terminal intotace modue son M o AIT B62 B NET interface module ooo oS VAITIP41 SUMINET interface meau so om PAITIET Ethernet interface modue so V o AVSDG high speed counter modus s O o AYS6QDA aigtalranalog converter mosas s lt o FAISS2ROS 4 tomperaturedigitl convener modus 10 o AYSGAAD analog digital converter modue sw ow A SJ71G24 R2 computer ink modue soa Lo APP 13 APPENDICES MEL
205. me Good ae ee a The NUL code 00H is ignored in all messages If a NUL code is included in a message it is processed as if it did not exist b In format 3 control code GG is equivalent to ACK and NN is equivalent to NAK c After receiving an EOT or CL code the AJ71C24 initializes transmis sion but does not answer The initializing code depends on the format as indicated below At this time there is no answer from the AJ71C024 2 Block number The block number is an optional number assigned as a data reference number for the computer Block numbers are used to arrange data etc Block numbers may be from OOH to FFH in 2 digit ASCII hexadecimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Station number The station number is set by the station number setting switch on the front of the AJ71C24 It identify file which AJ71C24 in a station to access Station numbers must be in the range of OOH to 1FH 0 to 31 in 2 digit ASCII hexadecimal 1 The station number setting switch is set to a decimal value but the station number is specified in hexadecimal Example Switch setting 10 corresponds to station number OAH specified in the protocol 2 For the global operation specify station number FFH If 0 to 31 OOH to 1FH is specified Xn2 turns ON at that station number only For details see Section 8 13 3 To execute data communications between the comp
206. me as when DC1 code has already been sent 3 SPECIFICATIONS MELSEC A 3 5 5 DC2 DC4 send controi This section describes DC2 DC4 send control 1 What is DC2 DC4 send control When data is sent from the AJ71C24 to an external device the AJ71C24 adds DC2 and DC4 codes at the beginning and end of data respectively Transmission sequence Transmission sequence in the no protocol mode in the bidirectional mode 3 5 6 DC2 DC4 receive control This section describes DC2 DC4 receive control 1 What is DC2 DC4 receive control By using DC2 and DC4 codes this function determines the data range when the AJ71C24 receives data from an external device 2 Control operations a When the AJ71C24 receives DC2 code from an external device the AJ71C24 handles data in the range between DC2 and DC4 as valid data The received DC2 code is not available to the user b When DC4 code is received from the external device the AJ71C24 will ignore subsequent received data until another DC2 code is received The received DC4 code is not available to the user In no protocol mode 1 Stored in the AJ71C24 ignored by the Stored in the buffer or OS receive area AJ71024 AJS71C24 buffer or OS receive area c After DC2 code is received if another DC2 code is received that code will be ignored and will be removed from the received data 1 Message in dedicated protocol format 1 SPECIFICATIONS st 7 MELSEC A
207. ming of the CD and RS Signals of the AU71C24 oo kee 5 4 5 4 1 Data transmission timing from an external device eee eee 5 5 5 4 2 Data transmission timing from an AJ710024 seseseesessnusoresesess 5 7 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK 6 1 6 11 6 1 Ky POMS eenen es E ele ieee BS are lols aha ete Weg eee IAG AS seas 6 1 6 2 Conditions for Computer Interlock 0 cc ccc cece tee rece teen eee eee 6 2 6 2 1 Computer station number allocation 6 cece eee eet eens 6 2 6 2 2 Maximum data communications time per computer 060 c eee cece eee 6 3 6 2 3 Command and message format for data communications AMONG COMPUTES o sientas a anar EE oe SG eee Oa Wee ee Hea eee eS 6 4 6 3 Procedure for Data Communications with a PC CPU cece cece eee eee 6 5 6 3 1 Communications between each computer and PC CPUS 008 6 5 6 3 2 Data communications with PC CPUs by setting a master station and Sl ve Stations seco es hack eed eV ASG OG EAE EEEE AEAEE EE Nae 6 8 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY 0 ccc cece cece cece eee e nett reer eeteeres 7 1 7 21 7 1 Setting RS 232C CD Terminal Check Enable Disable cece ee eee e eens 7 2 7 2 Setting the Transmission Method for RS 232C 0 cece eee enter eeeeee 7 3 7 2 1 Saling priority of transmission to the AJ71C24 using half duplex transmission 6c ees 7 4 7 2 2 Setting non priority of transmission to th
208. ms 1 GENERAL DESCRIPTION MELSEC A 1 1 3 Link with a computer through data link systems Two tier system Master station Local station Remote l o station Local master station for the third tier Third tier local station D Station that can send receve data Three tier system In a system connected through the following data link system if the system contains a PC CPU connected to a computer via an AJ71C24 data com munications is possible between the computer and a PC CPU not equipped with the AJ71C24 However communications is not possible with AOJ2CPUP23 R23 or A0J2P25 R25 modules 1 PC CPU in the MELSECNET II e Master Local stations Can communicate all data device memory programs etc Remote O station Can communicate only special function module s buffer data 2 PC CPU in the MELSECNET B Master Local stations Can communicate ail data device memory programs etc When a computer is connected to When a computer is connected to a master station a local station When a computer is connected to When a computer is connected to a master station for the third tie a third tier local station The station that can send receive data does not vary even if the second tier uses a MELSECNET B and the third tier uses a MELSECNET I 1 GENERAL DESCRIPTION MELSEC A 1 1 4 Mode switching function After the AJ71C24 has started operating the AJ71C24 s RS 232C
209. n 2 1 2 n and m n 1 When the connection ratio is 1 n or 2 n up to 32 PC CPU stations can be tied to one link system When the connection ratio is m n up to 32 stations of computers and PC CPU modules can be tied to one link system 1 When the connection ratio of the computer to the PC CPU module is 1 n This method of linking uses one computer and multiple PC CPU modules for up to 32 stations Data communications is executed between the computer and designated PC CPU stations This link system is called a multidrop link system AJ71C24 Station 0 AJS71C24 Station 1 AJ71C24 Station 2 AJ71C24 Station 31 Max 32 stations Number of PC CPU stations 1 GENERAL DESCRIPTION MELSEC A 2 When the connection ratio of the computer to the PC CPU module is m n This method of linking uses more than one computers and mul tiple PC CPU modules for up to 32 stations Data communications is executed between a computer which has acquired the access right through the communications with other computers and designated PC CPU stations This system is also called a multidrop link system Station 128 AJ71C24 Station 0 AJ71C24 Station 1 AJ71C24 Station 2 AJ71C24 Station 24 Max 32 stations Number of PC CPU stations e 1 The on demand function and the data communications in the bidirectional mode mentioned respectively in Section 1 1 1 1 b and 2 b cannot be used with the multidrop link sys te
210. n b can be used Use the AnACPU dedicated commands described in 2 to access the extension devices b Device ranges when ACPU common commands are used The devices and device number ranges that can be used for the device memory access operation are described below The device designation code consists of 5 characters Leading zeros in the device number underlined zeros in X0070 for example can be expressed with a blank code 20H Device Device number 5 characters 7 1 character 4 characters 2 characters for T C 3 characters for T C Device Number Decimal Device Number Decimal Ranges Hexadecimal Range Hexadecimal Characters Expression Characters Expression mer pee ee a Internal internal relay M internal relay M M0000 to M000 to M2047 Data Data register D D0000 to D1023 Decimal ee eee a ee en a ee ee sono sar Hewcecina Spe giner mmo ones beimat enone ore rn 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 1 To designate the bit device ranges in units of words the bit device number must be a multiple of 16 2 Although the ranges are designated for M L and S if the range for M is designated by L or S the same processing occurs This is also true for the ranges for L and S 3 The ranges of special relays M9000 to M9255 and special registers D9000 to D9255 are divided into the areas for read only write only and sy
211. n 4 3 1 or mode number during mode switching The differences between the control for mats based on format 1 are as follows Format 2 Format 1 with block number added Format 3 Format 1 with STX and ETX added Format 4 Format 1 with CR and LF added The following sections describe details of the four control protocols and the meanings of individual items 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 4 1 Control format 1 Description To read data from the PC CPU to the computer To write data from the computer to the PC CPU St No Station number Control Protocol Transmission sequence i i mc Computer PC Com rawi H LIM tH L H L _ _ eeee amp PC Com H LIH LIH L Transmission sequence 1 The sum check is enabled by DIP switch 21 The sum check code only exists when the sum check is enabled by turning DIP switch 21 ON 2 The sum check is made for characters marked in these diagrams 3 In these diagrams the contents of character area A character area B and character area C depend on the individual system For details see the relevant sections The contents of all character areas are the same for all 4 formats 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 4 2 Control format 2 St No Station number Control Protocol Transmission sequence lt To read data
212. n decimal 8 COMMNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 9 3 Writing data to buffer memory ACPU common command Designation Method Designation in protocol 1 is shown below range where data is to be written Number of characters word length x 4 1 word data uses 4 characters Thertre word daim ia exposed in 4 digits hexadecimal To designate the word length the following conditions must be met 1 lt word length lt 64 Head address word length 1 s maximum address number 7FFH Designation Example To write 3 word data to buffer memory address 3A0H to 3A2H in the AJ71C24 of station number 15 Message wait time is 0 msec Check sum is calculated within this range l 1 Computer Ee rle elevele 03 nel Boo 23 46 780 Dnt IOn 3 33an In XS yt An Hn 332 a Ans Sou 37 SB B Indicates that ASCDH 21555 in decimal is written to buffer memory address 3A0H 1234H 4660 in decimal is written to buffer memory address 3A1H 6789H 26505 in decimal is written to buffer memory address 3A2H 8 COMMNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 10 Special Function Module Buffer Memory Read and Write 8 10 1 Commands and designation 1 ACPU common commands Processed per During Communications Batch Reads from Fa aaa a function module buffer mog road a e a 64 words Batch 54H 57H reas to special function module buffer 128 bytes write emor
213. n extension file register refers to an empty area of the PC CPU user memory area used as a file register The extension file register is used to store necessary data results of the calculation for data processing executed using the SWOGHP UTLPC FN1 software package and dedicated instruc tions for extension files used in the AZACPU S1 and ASACPU 8 8 1 ACPU common commands and addresses 1 ACPU common commands used for read write of extension file registers Number of State of PC CPU ested During RUN Processing Processed per ae tions STOP SW22 OFF Batch 45H Reads from extension file registers R in units read 52H of 1 point Batch 45H Writes to extension file registers R in units of write 57H 1 point pae Specifies the extension file registers R in units of 1 point using block or device number and aT makes a random write oe 45H Sets the device numbers to be monitored in entry 4DH units of 1 point 40H Monitors the extension file registers after 45H monitor data entry Note o Executable x Not executable 2 Extension file register addresses a The extension file register comprises blocks number 0 to n with n varying according to the memory cassette Block number 0 contains the number of points designated by the PC CPU parameters and each block with numbers 1 to n has 8192 points of registers Read write is possible in the range of parameters designated in b
214. n in protocol 1 is shown below Test random write bit command Character area C 1 character 0 30H indicates OFF and 1 31H indicates ON To designate the device range the following condition must be met 1 lt number of device points lt 20 Designation Example To write ON to M50 OFF to B31A and ON to Y2F in station 5 Message wait time is O msec Check sum is calculated within this range 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Using the JT command AnACPU dedicated command ee gonad St No Statio Designation in protocol 1 is shown below 2 nnumber Test random write bit command Character area C 1 character O 30H indicates OFF and 1 31H indicates ON To designate the device range the following condition must be met 1 lt number of device points lt 20 Designation Example To write ON to M50 OFF to B31A and ON to Y2F in station 5 Message wait time is 0 msec Check sum is calculated within this range he Sted Msn y Du Wm y Du p Doa z Bu 4 Da Jn 42s y hey Hh Sey Iu Tony Ady JO Reset OFF 1 Y00002 Fit l SBm 1 Fna Was Iu y Fw y I2m y d n 31u 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 7 Testing device memory in units of words random write a Using the WT command ACPU common command Designation Method Designation in protocol 1 is shown below Test random write word command Character area C Desig
215. n module PC CPU base unit special aration cannot be made for command TR TW function module or AJ71C24 module 1 Special function module contro bus error 4 C N hardware fault Consult the bus error 2 Special function module breakdown LED No 20 OS eee repre 1 Error codes OOH to O8H are transmitted to a computer after diagnosis by an AJ71C24 when access is made by the computer to the AJ71C24 2 Error codes 10H to 21H are transmitted from an AJ71C24 to a computer after diagnosis by a PC CPU when access is made by an AJ71C24 to the PC CPU 11 2 11 TROUBLESHOOTING 11 2 Bidirectional Mode Error Codes Table 11 2 gives the error codes error descriptions and corrective actions for errors which may occur during bidirectional mode communications The following error codes 1 word integers are transmitted in order of the lower byte and the higher byte immediately following the NAK code when an error has occurred e g when the error code is 01 01H is transmitted first and then 00 is transmitted Table 11 2 Error Code List Send data length error Response message time out error Simultaneous transmission error Error code is not received when the NAK code is received Errors designated by the user SIO error at data receive Framing error Overrun error Check sum error Parity error only at data receive Received data length error Received data time out error Either a make the setting size of
216. n the on demand request is made Transmission of the on demand data is suspended unil the completion of the response data beginning with STX to the command data beginning with ENQ Transmission of the response data beginning with ACK from the computer in response to the response data beginning with STX from the AJ71C24 should be made after the completion of on demand data receive 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSECA 8 14 3 On demand function designation Designation Method Designation in protocol 1 is shown below AJ71C24 adds these fields of data Computer processing The following is written to AJ71C24 buffer memory 109H Head address of transmission data storage area 10AH Data length POINTS 1 Buffer memory area 100H to 11FH is the special applications area Do not use this area to store the data to be transmitted with the on demand function 2 Data length setting range must meet the following criteria e When the buffer memory area of OH to FFH is used Head address data length 1 s FFH When the buffer memory area of 120H to 7FFH is used Head address data length 1 s 7FFH 3 The AJ71C24 appends FE as the PC CPU number 4 The block number is OOH when protocol 2 is used IMPORTANT The on demand function may be used only when the system configura tion is a 1 1 ratio of computers to PC CPUs If the on demand function is used in a mu
217. n units of words the bit device number must be a multiple of 16 For special relays M whose device number is M9000 or greater designation is possible by using 9000 multiples of 16 2 Although the ranges are designated for M L and S if the range for M is designated by L or S the same processing occurs This is also true for the ranges for L and S 3 The ranges of special relays M9000 to M9255 and special registers D9000 to D9255 are divided into the areas for read only write only and system use Trying to write data to the ranges outside the write only area might cause the PC CPU to malfunction The ACPU programming manual gives details concerning special relays and special registers 4 When using an extension file register to read write file register data from to a PC CPU use the commands explained in Section 8 8 for file register R read write operations use the commands explained in Section 8 8 for read and write operations for the file register R 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 2 Batch read In units of bits a Using the BR command ACPU common commands Designation Method St No Station number Designation in protocol 1 is shown below Batch read bit command Character area A ee Designation of device range to be read Character area B To designate the device range the following conditions must be met 1 lt number of device points lt 256 sett
218. nable disable setting area address 115H in the AJ71C24 buffer memory to disable so that the check sum is not transmitted e Transmit data from the computer according to settings with SW16 and SW17 of the AJ71C24 Either a make the data part length and the set value of the data part length of the receive message less than the size of the received data storage area or b transmit correctly the data length 0001H or more contained in the message which is transmitted to the AJ71C24 Data which does not have the data part cannot be transmitted using the bidirectional mode When data is transmitted from the computer set the actual length of the data part to the data length part The AJ71C24 executes the time out check as set with address 113H of the buffer memory if it fails to receive data of a set length This error occurs when it fails to receive the next data within the set time 11 3 11 TROUBLESHOOTING MELSEC A 11 3 Troubleshooting OFF This section describes basic troubleshooting procedures for the AJ71C24 The User s Manuals give information on PC CPU module troubleshooting 11 3 1 Troubleshooting flow chart The state of errors is described as follows YES See Section 11 3 2 when the RUN LED is tumed OFF ts the RUN LED of the AJ71C24 OFF See Section 11 3 3 when the neutral state does not change YES See Section 11 3 3 when the data is not Has the data not been received rec
219. nal RS 232C interface Transmission contro by the DTR DSR control or the DC code control is enabled RS 422 interface Transmission control by the DC code control is enabled Data communications with an external device supporting the half duplex transmission function can be controlled according to the setting by the user Data communications in the multidrop link in which the ratio of computers to PC CPUs is m n is possible APPENDICES MELSEC A APPENDIX 3 Precautions Concerning Compatibility and the Use of Existing Programs Prepared for the AJ71C24 S6 Computer Link Module The following sections describe precautions which should be taken when using the AJ71C24 S8 computer link module These precautions cover compatibility with the AJ71C24 S6 computer link module hereafter called the AJ71C24 S6 the use of existing programs prepared for the AJ71C24 S6 and procedure for changing or adding modules in the existing network 3 1 Compatibility The AJ71C24 S8 and the AJ71C24 S6 have the same dimensions and can be installed in the same way They also use the same basic programs on a PC CPU and a computer Compatibility is maintained within the functions supported by the AJ71C24 S6 3 2 Precautions When Using Existing Programs None when the AJ71C24 S6 is replaced by an AJ71C24 S8 3 3 Function Comparison The following table compares the functions of the AJ71C24 S6 and AJ71024 S8 mea E f nease meses Stn
220. nal check The AJ71C24 pertorms transmission processing when the CD signal receive carrier detection is ON The transmission sequence of the AJ71 C24 is initialized when the CD signal is tumed OFF during data com munications in the dedicated protocol The AJ71C24 performs transmission processing regardiess of the ON OFF state of the CD signal This enables data communications with those external devices which cannot controt ON OFF the CD signal f DTR signal The AJ71C24 system controls the DTR signal as follows The AJ71C24 system turns ON the DTR signal when communica tions is enabled if the dedicated protocol or bidirectional mode is currently used When DTR DSR control is executed the AJ71C24 system turns ON OFF the DTR signal according to the size of available area of the receive data storage OS area during communications in the no protocol mode The DTR signal turns ON when the data com munications of the AJ71C24 is enabled Section 3 5 2 gives for the ON OFF timing of the DTR signal Since the received data is stored in the OS area when the DTR signal is OFF read the received data using the sequence program See Section 9 This signal is ON during DTR DSR control 2 ON OFF definitions are as follows 3 ON 5V to 15 VDC OFF 5 V to 15 VDC Interface connector The following type of RS 232C connector is used Use a matching connector 25 pin D sub female screw fixin
221. nates the head device when the bit 1 point of device uses 4 characters device is designated Therefore a 1 word data is expressed in 4 digits hexadecimal To designate the device range the following condition must be met 1 lt number of device points lt 10 10 units for bit devices where 1 unit corresponds to 16 points Designation Example To change the present value in station number 5 as indicated below Message wait time is 0 msec Check sum is calculated within this range wees c A 9 amoo wrm Lit ti Teki tes ee inica to change yY Y the data in C100 to 4660 in decimal 64H 100 in decimal Y y Y 1 4 41 0 0 o0 C B A Each bit indicates reset OFF if 0 and set ON if 1 1 1 0o o 9 8 8 COMMUNICATIONS USING DEDICATED PROTOCOLS hatha cheshire MELSEC A b Using the QT command AnACPU dedicated command Designation Method Designation in protocol 1 is shown below Batch read random write word command Hit JHIL aAa a a phen the bit device is designated 1 point of device uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal To designate the device range the following condition must be met e 1 lt number of device points lt 10 10 units for bit devices where 1 unit corresponds to 16 points Designation Example To change the present value in station number 5 as indicated below Message wait time is 0 msec Check sum is calcul
222. ndicating a the neutral state or b that communications is disabled even though a communications request is made to the AJ71C24 The computer cannot receive data NO Match the computer and AJ71C24 settings see Section 4 3 2 NO ls the signa line connected k Connect the signal line see Section 4 5 NO Transmit data from the computer Either a set the CD signal so that it is always ON during check to enabled during half duplex communications Also set the computer so that the signal turns ON OFF using the timing mentioned in Section 5 4 Perform the loopback test is the result OK NO Consult the nearest Mitsubishi representative is the signal line NO connected 2 YES Connect the signal line see Section 4 5 Send data which complies with the set dedicated protocol NO Keep the data terminal ready signal ON POINTS 1 Check point 1 Make sure the AJ71C24 RD signal line is connected to the computer SD signal line Check the multidrop line connection 2 Check point 2 e Make sure the AJ71C24 SD signal line is connected to the computer RD signal line e Check the multidrop line connection 11 6 11 TROUBLESHOOTING 11 3 4 When the 2 C N LED No 16 or 4 C N LED No 20 Is turned ON Flow chart to use when the 2 C N LED No 16 or 4 C N LED No 20 on the AJ71C24 panel turns ON Is LED No 16 of No 20
223. ng area in the special applications buffer memory area see Sections 3 5 and 10 2 3 3 4 Transmission error data read function This function permits the sequence program to read error data when the error LEDs on the front panel of the module are lit and permits the sequence program to turn OFF an error LED which is lit Section 7 3 gives details about sequence programs 1 Reading transmission error data The display status of the error LEDs is stored in buffer memory The sequence program can read this data to permit the PC CPU to execute error checking and interlocking with data communication sequence programs 2 Function to turn off error LEDs This function permits the sequence program to turn off error LEDs which are lit without resetting the PC CPU 3 SPECIFICATIONS MELSEC A 3 4 Mode Switching Function During AJ71024 Operations After an AJ71C24 started operations AJ71C24 s RS 232C RS 422 interfaces can be switched to another mode Mode switching when the AJ71C24 is online As shown below this operation can be executed from an external device and a PC CPU we No protocol mode Dedicated protocol One of formats 1 to 4 er Bidirectional mode 3 4 1 Precautions when mode switching This section gives the precautions to take when data communications is continued after switching the AJ71C24 mode during AJ71C24 operations 1 Settings between an external device and a PC CPU Set the following item
224. nications mode for bidirectional COMMUNICARIONS oi arere THe sk Ca ee eek EEA Hie es wea aes 10 8 10 3 2 To write data to a special applications area in buffer memory 10 9 10 3 3 Precautions during data communications eee eee eee eee 10 10 10 4 Bidirectional Control Procedure Basics 20 ccc ccc cece t eee teens 10 12 10 5 Bidirectional Communications Basics 2 0 0 ccc cece eee eee neees 10 13 10 5 1 Control protocols susesesrsreosesorseseerinssorsessrersree 10 13 10 5 2 Message format cece ccc c eee e ree teeeeeececencusetrneutas 10 14 10 6 Processing an AJ71C24 for Simultaneous Send in Full Duplex Mode 10 17 10 7 Basic Program to Read Write Buffer Memory 0 c cece cece een eee 10 18 10 8 Receiving Data in the Bidirectional Mode Computer gt AJ71C24 10 20 10 9 Transmitting Data in the Bidirectional Mode AJ71C24 gt Computer 10 23 11 TROUBLESHOOTING ccc cee cee cece eee e eee cree eeeennes 11 1 11 9 11 1 NAK Error Codes with Dedicated Protocols 0 0 cece cece cette eee tenes 11 1 11 2 Bidirectional Mode Error Codes usureseerresseresreserrssrerrrreso 11 3 11 3 Troubleshooting OFF ssussesssresesrrssesesersererrsorrserrssere 11 4 11 3 1 Troubleshooting flow chart 0 ccc cee cece tcc cette te eenees 11 4 11 3 2 When the RUN LED is turned OFF 0 cece ec nece eect eee 11 5 11 3 3 When the neutral state does not change or dat
225. nked in a 1 1 ratio Always read this section when the RS 422 and RS 232C interfaces are used with a dedicated protocol and in the bidirectional mode with the mode setting switch of the AJ71C24 being set to any position from 1 to 8 or with the mode switching function being used to set the mode number to any of 1 to 8 It is not necessary to read this section when the interfaces are used with a dedicated protocol and in the no protocol mode Buffer memory used in the bidirectional mode In sections other than this buffer memory used in the bidirectional mode is described as the buffer memory used for the no protoco mode Be cause the application purposes are the same simply think of the no protocol mode as the bidirectional mode Examples e No protocol mode send area gt Bidirectional mode send area No protocol send buffer memory head address setting area gt Bidirectional send buffer memory head address setting area 10 1 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE 10 1 Bidirectional Mode Basics 1 What bidirectional mode means In bidirectional communications MELSEC A The bidirectional receive send area in an AJ71C24 buffer memory is used for data commuications with a computer The data written to an AJ71C24 buffer memory by the TO instruction in a sequence program is transmitted to a computer in the same code with the control code ENQ 05h prefixed to the data to be tran
226. ns at the request of the computer Data communications is always initiated by the computer Designated data is transmitted according to the request command transmitted from a computer to an AJ71C24 It is not necessary to create and change special sequence programs in order to use an AJ71C24 1 Read and write possible to and from ali PC CPU devices Data can be read from all PC CPU devices This permits obser vation and monitoring of all operations as well as the collection and analysis of data Data can be written to all PC CPU devices This permits production control and production directives to be carried out 2 An AJ71C24 can upload and download programs from a PC CPU PC CPU programs main sequence and subsequence control programs and microcomputer programs parameter data and comment data are read by the computer and stored When required they can be written to the PC CPU to change the program Remote RUN and STOP control of the PC CPU The PC CPU can be remote controlled by means of RUN and STOP instructions from the computer 3 4 When multiple computers and PC CPU modules are connected to a link with an AJ71C24 module the input X signais of the CPUs in the link can be turned ON OFF using any computer in the link This function can immediately stop or simultaneously Start all CPUs in the link This function is called the global function of the AJ71C24 b Communications at the request of
227. ntrol instructions in the A2A S1 A3A Programming Manual Dedicated Instructions 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 9 5 Receiving Data in the No Protocol Mode External Device gt AJ71C24 1 Data receive area Address default 2 The AJ71C24 stores the received data length and received data in the data receive area With default setting buffer memory area 80H to FFH is allocated as the receive area This area may be changed as needed See Section 6 4 5 for the procedure to change the data receive area For example if the data to be received is greater than the AJ71C24 receive area 127 words in default setting data is received in more than one transmission It is advisable to set as data receive area is larger than received data length The unit word byte of received data length 4 depends on the setting with the word byte set ting area address 103H Buffer memory The actual length of received data is written 4 when the receive completed code is received or the set length of data has been received Se er Received data Received data is stored sequentially from the lowest address until the completed code is received or the set length of data has been received Reading received data There are two ways of making a request to read the received data eBy receiving the receive completed code data receive in variable length and By receiving the set
228. occur at the AJ71C24 if nothing is transmitted from a computer to an AJ71C24 via the RS 422 interface In this case the AJ71C24 sends 00H NULL code to the computer receive area These NULL codes should be ignored by the computer The computer should also ignore all data transmitted from the AJ71C24 prior to an ENQ ACK or NAK code Using a FROM TO instruction to access the AJ71C24 Using a FROM TO instruction to access the AJ71C24 should not be done unless absolutely necessary This is because when data is sent from the AJ71C24 to an external device at the same time as a FROM TO instruction from a PC CPU is executed to the AJ71C24 the FROM TO instruction has priority and is executed first Therefore the data send time from the AJ71C24 to the external device is delayed by the process ing time of the FROM TO instruction Data bit setting If a checksum is communicated during data communications with a computer set the data bit set with the SW12 switch to eight bits Section 4 3 2 gives details about switch SW12 10 11 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 10 4 Bidirectional Control Procedure Basics 1 Transmitting data from an AJ71C24 to a computer Area B A gt Z or Computer AJ71C24 a Area A Data send from an AJ71C24 to a computer b Area B Data send from a computer to an AJ71C24 c Write a program so that data is transmitted from left to right Example For area A data is
229. ocol mode send area or bidirectional mode send area No protoco mode receive area or bidirectional mode receive area e On demand area 2 Buffer addresses 100H to 11FH comprise the special applications area The AJ71C24 will not operate correctly if any operations other than those described in the following sections are executed S COMMNICATIONS USING DEDICATED PROTOCOLS ui MECSECA 8 9 2 Reading data from buffer memory ACPU common command Designation Method St No Station number Designation in protocol 1 is shown below Buffer memory read command Character area A Number of characters word length x 4 1 word data uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal Designation of the buffer memory address range to be read from Character area B To designate the word length the following conditions must be met e1 lt word length lt 64 e Head address word length 1 s maximum address number 7FFH Designation Example To read 2 word data from buffer memory addresses 180H and 181H in the AJ71C24 of station number 10 Message wait time is 0 msec Check sum is calculated within this range Computer CRIOiIO0 0180 within this range 05 Sny Mn 45 Suf Kn Ha On 31n Ba D 1 AJ71C24 a aea E t CAEP US 3ta 32a In Hl indicates that The content of buffer memory address 180H is ABCDH 21555 in decimal The content of buffer memory address 181H is 1234H 4660 i
230. ode is switched any data which has been changed from a default value must be written to the buffer Except for the mode switching area data can only be written to the special applications area using the TO instruction in a sequence pro gram If data is written to the buffer memory using the command in a computer program the AJ71C24 will not operate correctly Never try to write data using a computer program If the following functions are used in combination with the dedicated protocol make sure to allocate the user area in buffer memory so that the same area will not be used by different functions If the same area is allocated to different functions the data in this area is rewritten and communications will not be correctly executed No protocol mode transmission or bidirectional mode transmis sion e No protocoi mode receive or bidirectional mode receive e Buffer memory read write CR CW command function On demand function The memory areas preceding and following the special use area cannot be allocated as a single area The areas OH to FFH and 120H to 7FFH must be recognized as independent areas Example The on demand buffer area cannot be allocated in this manner If the designation is made to process the send receive data in the no protocol mode or bidirectional mode in units of words or bytes the on demand data is processed in the same designated unit 8 COMMUNICATIONS USING DEDICATED PROTOCOLS M
231. oes User s Manual to correct p the designated commands character The number of processing points is outside and restart data communice the allowable range or the designated ti device number does not exist in the desig HON nated PC CPU See Section 8 7 1 to correct The set device number does not exist in the the number of setting char set PC CPU acters of the device num 3 The device number is not set with the re ber and restart data quired number of characters communications ACPU common command 5 characters AnACPU dedicated command 7 characters Error Code Heaxiecimad 11 1 11 TROUBLESHOOTING MELSEC A Character error received A character other than A to Z 0 to 9 4P Check and correct data and control codes in Section 8 4 5 1 has been Buffer memory is unable to make communica tions with the PC CPU Use a PC CPU which can per The PC CPU is not the type mentioned in form data communications Section 2 2 Defined PC CPU number does not exist Change the PC CPU number The PC GPU number designated with the 16 t0 the self FFH or a station protocol was not the seif FFH or a station 4 C N number set with the MELSEC number set with the MELSECNET link NET link parameters and res parameters tart data communications Incorrect communications between an AJ71C24 and a PC CPU Restart data communications After the AJ71C24 has correctly received a H the error recurs a c
232. of an external device to PC CPUS cece cece eee ee 2 7 23 3 2 1 ratio of external devices to a PC CPU 0 ice et ene 2 10 2 3 4 2 n ratio of external devices to PC CPUs cece cece eee enes 2 13 2 3 5 m n ratio of external devices to PC CPUS cc cece 2 16 2 3 6 Links with an external device such as a computer through data link systems 2 0 ccc eee eee e renee e eee reene 2 19 SPECIFICATIONS sso aoceoeddcerese ose wo tne oaa bd 60 Soe 0 wi go Syeiase nse 9 8 3 1 3 39 3 1 General Specifications 0 0 ccc cece cece ore e eee tee eee easeeeeeens 3 1 3 2 Performance Specifications 0 cc cece e eee e eee eee ee renee 3 2 3 2 1 Transmission specifications 0 0 ec eee ne eee e een enetens 3 2 3 2 2 RS 232C connector specifications 0 cece cece eee ene ees 3 3 3 2 3 RS 422 terminal block Specifications 1 cee cee eee eee 3 5 3 2 4 RS 422 cable specifications 0 ccc cee cette ee ee eens 3 5 3 3 Data Communications Functions 0 ccc cece eee ee teen ee eee nenes 3 6 3 3 1 Functions available using dedicated protocols and commands 3 6 3 3 2 Functions available in the no protocol mode 6 cece cee eee eee 3 13 3 3 3 Functions available in the bidirectional mode 0 cc cece eee 3 14 3 3 4 Transmission error data read function 0 cece cece eee 3 15 3 4 Mode Switching Function During AJ71C24 Operations cee cece eee 3 16 3 4 1 Precautions when
233. of the m n ratio system configuration cannot use dedicated protocol 3 When multiple external devices and AJ71C24 modules are used to form a multidrop tink the procedure to exercise the access right with a specific station should be provided 2 When the mode setting is 5 to 8 the RS 232C interface which is not used for the multidrop link can be used for communications with a computer a printer or a CRT in a no protocol bidirectional mode 3 To have the RS 232C communicate over a distance greater than 15 m 49 2 ft use a modem or RS 232C RS 422 converter between the external device and the AJ71C24 Fig 2 6 System Configurations V 2 SYSTEM CONFI MELSEC A 2 The following tables list the functions available when the external devices are linked with the PC CPU modules making an m n configuration a The interface used to set dedicated protocols 1 2 4 1 Functions available when using external devices Interfaces for Dedicated Avaliable Functions Protocol nese nome i Inciuding exten Extension file register Buffer memory AJ71024 of the Read write self Special func tion module s Read write buffer memory Sequence microcomputer Read write program including exten if full duplex transmission is possible with the external device data com munications in the dedicated protocol mode is possible with the RS 232C inter face 2 17 2 SYSTEM CONFIGURATIONS MELSEC A
234. ol 1 is shown below Extension comment memory batch read Number of characters Number of bytes x 2 Heed addrese 1 address is expressed in Computer cone 2 characters ies ibyte 2 characters Designation of the range to be read e a Character area B To set the number of bytes the following conditions must be met e 1 lt number of bytes lt 128 e Head address number of bytes 1 lt extension coment memory capacity Designation Example To read 6 bytes of data from the extension comment memory beginning with 7D0H 2000 in decimal in station 1 Message wait time is 0 msec Check sum is calculated within this range Sum check code is added by Computer AJ71C24 Check sum is calculated within this range M 8 amp Indicates that 1 the content of address 07DOH is 12H 2 the content of address 07D1H is ABH 3 the content of address 0702H is 43H 4 the content of address 07D3H is EFH 5 the content of address 07D4H is 1CH and 6 the content of address 0705H is 57H 8 101 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Extension comment memory batch write Batch write of data to the extension comment memory using an ANACPU dedicated command is shown below Designation Method Designation in protocol 1 is shown below Extension comment memory batch write command Head address Number of bytes Data for the designated Sum characters 2
235. om AJ71C24 wiring Never bundle them together This prevents noise and surge induction effects 2 Ground the shield of shielded wires and cables at only one point 3 The RS 422 terminal has M4 screw connectors Fasten suitably sized crimped terminals to the ends of the cables before connecting the cables to the terminals 4 5 2 Connecting the RS 232C connectors Precautions and examples of connections to an RS 232C connector is shown in the diagram below 1 Precautions during connections a If the FG and SG terminals are connected inside a device connected to the RS 232C connector do not use terminal No 1 of the RS 232C connector of the AJ71C24 b If half duplex transmission see Section 7 2 for the setting method is used perform wiring so that the CD signal of the AJ71C24 can be controlled by the external device Also set the AJ71C24 to execute the CD terminal check see Section 7 1 Section 5 4 gives the ON OFF timing control of the CD signal of the AJ71C24 using the external device 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 2 Examples a Connections to a device which can turn the CD terminal signal ON for full half duplex transmissions AJ71024 Cable Connections and Signal Directions Pin Numbers Eee oma e om pe eat e a a ese a RD RXD RD RXD cs cts E Ex CS CTS n 8 e oa AiR DOTS a eg Oo o O DTR ER Sr a DTR ER b Connections to adevice which cannot tu
236. om ae Vacdavicee aang RUN is set exclud data eee D Monitor data registration 1 scan device R 1 scan for device R only fe nR 4 scans when a set range Ba a ae eee Scan Count Required for Processing register covers several blocks 1 The PC CPU can only process one of these operations with each END processing If the AGGPP and AJ71C24 access a given PC CPU at the same time one processing must wait until the other processing is completed Therefore the scan count required for processing further increases 2 Even though communications using AJ71C24 is not performed scan time increases 0 2 msec 0 1 msec with ASHCPU A2ACPU S1 and A3ACPU APP 10 APPENDICE APPENDICI MELSEC A APPENDIX 6 Precautions During Communications When Using RS 422 Interface 1 The following figure shows the hardware structure for the data trans mission from the AJ71C24 to the computer Send data High impedance control AJ71C24 AJ71C24 Send Circult 2 Data transmission methods When each station of the AJ71C24 is not transmitting data set the transmission line to the high impedance state so that one send data does not interfere with other send data in a multidrop link When all stations transmit data the high impedance state must be canceled Then after transmitting a mark consisting of 2 or more characters each station transmits data This method applies also to a 1 1 link syst
237. omputer and the AJ71C24 are connected through the RS 422 Terminal resistance setting required Computer Computer RS 422 RS 232C SDA SOA SDA y i SDB SOB red ROA RDB ROB sG swz9 OFF swza oFF axa oN FG SW24 OFF SW24 OFF SW24 OFF l sisien 0 sstaion Station n AJT1C24 A971024 AJ711024 RS 232C RS 2320 RS 232C sD so so RD RD RO RS ee RS 422 RS 422 SDA SOA SDA ala S08 y SD8 i od RDA U We yanl RDA Y RDA 1 Rop4 yf I RoB roe Vif tio sG L se so on FG re re Deditated Modes 5 6 8 Dedicated Modes 5 6 8 Dedicated Modes 5 6 8 Dedicated Modes 5 6 8 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 4 6 Self loopback Test The self loopback test function is used when the AJ71C24 is not connected to the computer to check that the AJ7C24 module is operating normally This function is selected by setting the mode setting switch to F 4 6 1 Procedure to carry out the self loopback test The procedure to carry out the self loopback test is as follows Step 1 Connect the cables Connect cables to the RS 232C and RS 422 connectors as shown below RS 232C Cable Connections RS 422 Cable Connections Cable Connections Step 2 Set the mode setting switch Set the mode setting switch to F to select the self loopback test Section 4 3 1 tells details of how to set this switch 4 SE
238. onal mode send buffer memory area hereafter referred to as the send area from the AJ71C24 to a computer in response to turning ON the PC CPU send request signal Y n 1 0 1 Send area and writing send data The send data length and send data are written to the send area a The length of data to be written having been written to the bidirec tional send data length storage area in either words or bytes b The data to be transmitted is written to the send data storage area When the send request signal Y n 1 0 is turned ON after a and b have been executed the AJ71C24 transmits the designated length of designated data from the send data storage area sequen tially from the lower address By default the buffer memory area OH to 7FH is allocated to the send area This area may be changed as needed Section 7 4 4 gives the procedure for changing the send area addresses The unit of send data length depends on the setting at address 103H of the word byte setting area Buffer memory l dite i Send data length storage area I Addresses Designate the length of data to be detaut fo J LLL 3 sent with the TO instruction OH Designated value is transmitted as 1H the data length Send data storage area TER A a e Seaan Send data is transmitted sequentially from the lowest address 10 23 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 2 Data transmitting procedure Procedure Check sum
239. onditions are met 1 The PC CPU is A3 A3N A3H A3M or A73 2 The program is not currently running program indicates a sub program called by the main program if the main program is being run 3 The PC CPU special relay is in the following state M9050 signal flow conversion contact OFF A3CPU only M9051 CHG instruction disable ON b Microcomputer program address Microcomputer addresses are designated in the protocol as fol lows 1 The range of addresses that can be set for each PC CPU is shown in the table on the next page 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A Microcomputer Program Microcomputer Program Capacity Addresses AOJ2HCPU A1SCPU Max 14K bytes 0000H to 37FEH A2CCPU A1CPU A2CPU S1 A3CPU A3NCPU A3HCPU gies aa Gre 0000H to E7FEH ASMCPU A73CPU 2 Addresses are set by converting 4 digit hexadecimals into ASCII 3 A character area error 06H occurs if the following condition is not met Head address number of bytes 1 microcomputer pro gram capacity 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 2 Microcomputer program batch read ACPU common command Designation Method Designation in protocol 1 is shown below Microcomputer program batch read command UR for main and VR for sub program Number of characters Number of bytes x 2 1 address uses 2 characters Therefore 1 address is expressed in 2 digits hexadecimal
240. operation is not only executed in the no protocol receive buffer but in the OS area as well c When the above mentioned OS area has no vacant area receiving data causes an error and the data is ignored until the OS area has enough vacant area When this happens the 2 SIO and 4 SIO LEDs go ON see Section 4 2 2 3 SPECIFICATIONS MELSEC A 1 When power to the PC CPU is turned ON the PC CPU is reset or the mode is switched DC1 code is not sent to the external device This is the same state as when DC1 has already been sent 2 DC1 DC3 codes to be sent can be changed Section 7 7 2 teils how to change codes 3 5 4 DC1 DC3 receive control This section describes DC1 DC3 receive control 1 What is DC1 DC3 receive control This function notifies the AJ71C24 whether or not an external device can receive data using DC1 0C3 codes 2 Control operations a Receiving DC3 code from an external device suspends AJ71C24 data send The received DC3 code is not available to the user b Receiving DC1 code from an external device resumes AJ71C24 data send The received DC1 code is not available to the user External device c After DC1 code is received if another DC1 code is received that code will be ignored and will be removed from the received data When power to the PC CPU is turned ON the PC CPU is reset or the mode is switched even if a DC1 code is not transmitted the state will be the sa
241. ow Loopback test command Character area A 2 Characters Data data of hexadecimal Computer designated P gt length character tength 2 characters hexadecimal Character area B To set the characer length the following condition must be met 1 lt character length lt 254 Designation Example To execute the loopback test with the ABCDE at station number 0 Message wait time is O msec Check sum is calculated within this range Computer o o TT O 5A B C D E 8 Check sum is calculated within this range Wu u An n We nj Stn 420 30 y My 45m 37m en s E AJ71C24 Tlo ojf Flo sjaa coelTla 3 x x On Hu y Iy 46m 46n IOn Bn bin y 42u 43n y bhu y 45u Oe 41n 33K The same data 8 112 9 COMMUNICATIONS IN THE NO PROTOCOL MODE 9 1 MELSEC A COMMUNICATIONS WITH A COMPUTER IN THE NO PROTOCOL MODE Read this section if the RS 422 and RS 232C interfaces are used with the dedicated protocol in the no protocol mode by a setting the AJ71C24 mode setting switch at any position from 1 to 8 or b using the mode switching function to set any mode number from 1 to 9 If these interfaces are used with the dedicated protocol in the bidirectional mode it is not necessary to read this section Basics of the No Protocol Mode 1 What no protocol mode means In no protocol communication Data written to the no protocol AJ71C24 send area in buffer memory using the TO instruction
242. pecifications main channels and terminal resistance 2 0 ccc cece cee eee e enn eeee 4 6 4 3 3 Station number setting 0 cee cece en eee eee e eee eens 4 9 4 4 Loading and Installation 20 cece eee tebe e ete een nnees 4 10 4 4 1 Handling instructions 0 ccc cee eee teen e ne tee eeenes 4 10 4 4 2 Installation environment 2 0 0 0 ccc cece ee eee ene e eee nena tnes 4 10 4 5 External Wining ai renea heel cee wy eww nn esis hes Wis WR alee Saal ee 4 11 4 5 1 Precautions during wiring sesessseressesseseseserreseress 4 11 4 5 2 Connecting the RS 232C connectors ssesesereesesseessse so 4 11 4 5 3 Connecting the RS 422 Connectors 0 cece eee eee eee eens 4 13 4 5 4 Connecting a multidrop link and setting modes and terminal resistance 4 14 4 6 Self loopback Test occ edsie see ade Se ec ea ee cde ne eee ee tees 4 17 4 6 1 Procedure to carry out the self loopback test 6 ccc cece eee 4 17 4 6 2 Self loopback test operations 0 ccc cece e een teens 4 19 4 7 gt Loopback Test orrs oes nierien eee Aare eae Meee ee E AGA aaa we 4 20 4 8 Inspection and Maintenance cece ee ee tree rene reser ee eeees 4 21 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE 5 1 5 9 5 1 System Configurations and Functions 0 cece cece e ee eee eee eens 5 1 5 2 Buffer Memory Settings ccc ccc eee reece erect ete e eee enenes 5 2 53 10 i ease iaai e e er eee ae E a 5 3 5 4 ON OFF Ti
243. pleted code or the set length of data whichever comes first is received Xn1 is ON 3 If the completed code is not set set buffer memory address 100H to FFFFH This enables only the setting of data length to complete receive and the read of received data by fixed data length is enabled To set the end code to ETX 03H AJ71C24 I O addresses 80 to 9F Sequence Program Write the ASCII code for ETX 03H to IH Top Ha H100 Hooos K1 1 butter memory address 100H 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY sai MELSEC A 7 4 2 Specifying no protocol receive completion data length fixed length How to complete the data receive and set the data length are given below along with a sequence program example Setting Method b15 to bO Buffer memory address 108H N Write the amount of received data default 127 words 1 Set the length of data to complete the data receive in the following ranges Length of data received lt no protocol mode buffer size when word units are set Length of data received lt no protocol mode buffer size x 2 when byte units are set If the received data length is larger than the no protocol mode buffer size then it is automatically set equal to the no protocol mode buffer size 2 Section 7 4 3 describes the selection of a word or byte unit for the data length to complete data receive 3 If the receive completed code is set the read request
244. pon x 5 1 x x x 4 5 5 F 2 o The WR command is used for word unit designation The designation for 32 points of devices from X40 to X5F is 02 1 for 16 points COMMUNICATIONS USING DEDICATED PROTOCOLS Example 2 To read the present values at 2 points of T123 and T124 in station 5 Check sum is calculated 9 S44 En 31e S200 In On Se as Check sum is calculated 1 E OVA SU 7B8C 9 123 4 T within this range 1 x Bn An Ain Hig SH Ra Idn Me Or _ Ee Indicates the present value of 7BCSH for T123 31689 in decimal and 1234H for T124 4660 in decimal MELSEC A 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Using the QR command AnACPU dedicated command Designation Method Designation in protocol 1 is shown below St No Station number Character atoa A 1 point of the device uses 4 characters Designation of device Batch read word fase to be read command o ea_a _ _ Character area B To designate the device range the following conditions must be met e 1 lt number of device points lt 64 32 for a bit device e Head device number number of device points 1 lt maximum device number number of device points x 16 for a bit device Designation Exampies Example 1 To read data at 32 points from X40 to X5F in station 5 Message wait time is 0 msec aR sodne a Check sum is calculated within this range D SE
245. present values of timers and counters to the printer in the no protoco mode 8 1 When Other Than AnACPU is Used 1 Sequence program example FOP Hoc Hoos ki Ki JH RS 2820 CD terminal check disable is set PLS Mo Print command is converted to pulses asc Dio T ost Index title is converted to ASCII Target register contents are converted to BOP D10 010 BOD a osp Do 020 K4 H 16 bit data is divided into 4 bit groups SFLP D20 kB SFuP D22 ks Xoco X0C7 YODO Data is reorganized and converted to Cap pe pes pee wor unite 16 bi P Deo D21 D34 P_ H3030 033 033 _ P_ H3030 D34 D34 MOVP HOAGD Das j CALF code ie set MOVE KS Da j Send data length is set ToP Hoooc Hoooo D30 Ke Data is output to send buffer memory SET Yono Send handshake signal is turned ON RST YoOo Transmission completed Output data is converted to ASCII ee ee eee 5 g AJ71C24 transmission specification settings for output to printer re ere emare esoo ao Party enoou Even Even None fe comments E APP 18 APPENDICES DISP instruction owes the 16 bit i into 4 bit groups MELSEC A 2 Procedure for converting data stored in a data register to printer output data Since the PC CPU handies numerical data in binary it is necessary to convert data to be printed out fro
246. r transmission data formats when word or byte units are selected Write to buffer memory address OH to FFH or 120H to EEEE 7FFH 1 seeeeene 1 is written to buffer memory address 10CH an error occurs and the data is not transmitted No error 4 if data communications is executed at the same time in either the no protocol mode or the bidirectional mode 2 Computer control procedure the area must not overlap with the following area No protocol send area bidirectional send area No protocol receive area bidirectional receive area Determine if the received data was received due to on demand function or command The AJ71C24 appends FE as the PC CPU number e Process data as on demand data only if the PC CPU number of the received data is FE Set transmission data word or byte units 8 COMMUNICATIONS USING DEDICAT D PROTOCOLS MELSEC A 3 On demand request processing timing chart a Full duplex communications Computer is transmitting data Computer AJ710024 On demand function executing Xn3 TO instruction to buffer memory addresses 109H and 10AH 1 The on demand function executing signal Xn3 turns ON imme diately and the on demand data is transmitted when the on demand request is made PC CPU 2 Transmission of response data beginning with STX to the command data beginning with ENQ is suspended until the completion of on demand
247. rameter memory addresses 280H to 283H of the PC CPU in station number 5 Message wait time is 0 msec Check sum is calculated within this range P Rolo 0280 Check sum is calculated within this range On i S2 Xn j IOn W Ra i Bas Wa L i it He let a oles 1 t i x on By Bu Bn Ha dlu Ba Gu af On Indicates that The contents of parameter memory address 280H is OFH The contents of parameter memory address 281H is EDH The contents of parameter memory address 282H is ASH The contents of parameter memory address 283H is CBH 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Parameter memory batch write ACPU common command Designation Method Designation in protocol 1 is shown below Computer memory address range to be written Number of characters Byte length x 2 1 word data uses 2 characters Therefore a 1 byte data is expressed in 2 digits hexadecimal To designate the byte length the following condition must be met e1 lt byte length lt 128 Designation Example To write 4 byte data to parameter memory addresses 5A0H to 5A3H of the PC CPU in station 0 Message wait time is 0 msec Check sum is calculated within this range t i 1 Computer i oe rlr el os A se a SIE OlA o18 eje ny Wn SDa 57m Duf In z 30m Ia 41 Jn 3a 35 14S I 4 38 42w y 43u IOn IIu AJ71C24 Indicates that Data 35H is written to address SAOH Data EOH is written to address SA1H Data
248. read Sub microcomputer program is read program is read Main microcomputer program is Batch written write Sub microcomputer vw puter program is written Com Batch read KR Comments are read from memory ole men Batch write KW Comments are written to memory The send request can be output On demand Data transmission start is controlled by the computer from the PC CPU for data transmission with dedicated protocols 1 to 4 Communications is possible only with the PC CPU which is loaded with the AJ71C24 Communications is possible with a PC CPU which is not loaded with the AJ71C24 in MELSECNET Il or MELSECNET B Communications with the PC CPU in MELSECNET II or MELSEC NET B Using AnACPU dedicated commands data communications is possible with all device memories extension file registers and extension comments of an A2A A3ACPU Data communications using AnACPU dedicated commands with an A2ACPU S1 and A3ACPU APPENDICES MELSEC A Setting the receive Fixed at CR LF Setting is possible as required completed code ODH OAH Default CR LF 0DH OAH Setting the teceive completion data length Date receive by fixed length Send receive data Setting is possible as required unit setting Fixed at words words or bytes word byte Default Words Setting is possible as required excluding the memory
249. rface on the dedicated protocol side and the AJ71024 Set values A to D of the mode setting switches indicating the state of communications between the computer connected to the interface on the main channel side set with SW11 a transmission specifica tion setting switch see Section 4 3 2 and the AJ71C24 Used by a sequence program to check communications status etc es al eee leror on aara atletw lee Waiting for ENQ e ore on Orr Receivesena i e oF on On Received station number oth C e forfor cea after receiving all data 5 oN oFF ON Waiting for message Waiting for message e on on orr unsee o 7 on Ton on oms C Xn4 AJ71C24 message sequence 3 SPECIFICATIONS MELSEC A fo St eee protocol Bidirectional 1 Turns ON when the AJ71C24 becomes READY after the PC CPU is enabled Turns ON a few seconds after the power is turned ON Turns OFF when an error which discontinues the AJ71C24 s opera tion occurs Used for the READY communications signal when the no protoco mode bidirectional mode or the on demand function of the dedi cated protocol is used rs Xn Watch dog ee ON when the AJ71C24 watch Tare chet a ces meen autre timer error occurs timer error ie eae OFF Tare chet a ces meen autre normal operation XnE A Xn7 Y YNO to YnF corresponding to Xn0 to XnF may be used as internal relays 3 SPECIFICA
250. rn the CD terminal signal ON for full duplex transmission 1 When wired as in step a above disable the RS 232C CD terminal check 2 If the RS 232C CD terminal check function is enabled wire the connectors as shown below fee 1 est mee ane rene SO Se a aa E veea a m ee e Coca l a EP osrom s N se ae ae 7 xc eee Get ee ee ae OO eee DTR IER 20 DTR ER 4 12 4 SETTINGS AND PROCEDURES BEFORE OPERATION PROCEDURES BEFORE OPERA MELSEC A 4 5 3 Connecting the RS 422 connectors When connecting to an RS 422 connector the following precautions must be taken Connection examples are given in the diagram below 1 Precautions during connections a To transmit FG and SG signals of the AJ71C24 to an external device perform connections conforming to the specifications of the external device b The following example uses a 1 1 connection ratio between a com puter and an AJ71C24 Section 4 5 4 explains 1 n n is up to 32 and m n connection ratios total of m and n is a maximum of 32 between computers and AJ71024 modules Cable Connections and S Signal Directions parame a ____ RDB Receive data SDA Senate RSA Request to send _ ASB Request to send pt esa Clearto send SG Signal ground 2 Example if gt D oO o 21 Section 3 2 3 gives the signal assignment of the RS 422 terminal on the AJ71C24 4 13
251. ror ne mra Hooor ri F Hooor ie writen to butor adres 11an 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 7 2 Settings for changing the addresses of DC1 to DC4 codes This section describes how to change the addresses of DC1 to DC4 codes and gives an example of a sequence program When changing a DC code address designate the corresponding DC code Thus when changing DC1 designate DC1 and DC3 Setting Method DC1 code default 11H DC3 code default 13H DC2 code default 12H DC4 code default 14H The DC1 to DC4 codes which are to be changed can be set in the range of OOH to FFH AJ71C24 VO addresses 80 to SF 1 To change the DC1 code address to 91H and the DC3 code address to 93H Sequence program Code 91H of DC1 and code 93H of DC3 are written to buffer address 11BH TOP Ha Hna Hooi Ki 101H is written to buffer address 11AH 2 To change the DC1 to DC4 code addresses to 91H through 94H Sequence program Code 91H of DC1 and code 93H of os Code 92H of DC2 and code 94H of DC4 fee are written to buffer address 11CH Top na Hna Hosoi Kt 301H is written to buffer address 11AH When changing the default values of DC codes designate DC1 DC3 control and DC2 DC4 control to buffer address 11AH after changing the values in buffer addresses 11BH to 11CH 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 COMMUNICATIONS USING DEDICATED PROTOCOL
252. roubleshooting charts in Sections 11 3 5 and 11 3 6 to determine and correct the problem Then repeat the loopback test 4 SETTINGS AND PROCEDURES BEFORE OPERATION 2 3 48 Inspection and Maintenance MELSEC A If data communications is not possible The hardware settings or cable connections have probably not been done correctly Use the troubleshooting charts in Sections 11 3 2 11 3 3 and 11 3 4 to determine and correct the problem and then repeat the loopback test After the loopback test is finished a computer link which uses the dedicated protocol is enabled When a computer link uses the no protocol bidirectional mode do the following eSet the mode switches eTurn the power to the PC CPU OFF ON or reset the PCCPU After doing the above the computer link operation is enabled The AJ71C24 module itself requires no particular inspection procedures However carry out the inspections listed in the PC CPU User s Manual to ensure optimum system performance 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE MELSEC A 5 HALF DUPLEX COMMUNICATIONS USING THE RS 232C INTERFACE This section explains how to do half duplex communications using an RS 232C interface to connect an external device and an AJ71C24 This section does not apply to full duplex communications AJ71C24 can do half duplex communications with an external device by using the RS 232C interface by setting buffer memory
253. s 3 in these diagrams the contents of character area A character area B and character area C depend on the individual system For details see the relevant sections The contents of all character areas are the same for all 4 formats Remarks 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 4 4 Control format 4 St No Station number Control Protocol Transmission sequence en To read data from the PC CPU to the computer To write data from the computer to Ti ees the PC CPU ransmission sequence se PC Emo Co L No No code p p H CIH LIW G 1 The sum check is enabled by DIP switch 21 The sum check code only exists when the sum check is enabled by turning DIP switch 21 ON 2 The sum check is made for characters marked in these diagrams 3 In these diagrams the contents of character area A character area B and character area C depend on the individual system For details see the relevant sections The contents of all character areas are the same for all 4 formats Remarks 8 COMMUNICATIONS USING DEDICATED PROTOCOLS a MELSEC A 8 4 5 Setting protocol data 1 Control code All control codes are sent and received in hexadecimal They are shown in the following table ee ae oH Line Feed pes fe H EndotTet e of Text ODH Carriage Return Return End of Negative Transmission a oH Enquiry a
254. s 1 Communications time The time required for communications with a PC CPU differs between the AJ71C2 S3 and the AJ71C24 S8 The User s Manual for each type of module gives details 2 PC CPU model name read function command PC When reading the PC mode name of the PC CPU using the PC com mand the model name codes for the AZACPU S1 ASACPU etc are changed ero wedst E _Ammicaess cc a E S E C S E C E E e OT men Sd mewn o p oo a oo o APP 4 APPENDICES 2 3 Function Comparison Data communications Dedicated using AnACPU protocols 1 dedicated to 4 commands with the A2ACPU S1 and A3ACPU Data communications control with e computer RS 232C or RS 422 Bidirectional Mode switching RS 232C interface Transmission is controlled by the Transmission control OTR DSR control RS 422 interface Control is not available Data communications control in the half duplex transmission RS 232C m n multidrop tink APP 5 MELSEC A Using the AnACPU dedicated commands data communications is possible with all device memories extension file registers and extension comments of the A2A A3ACPU Data communications with a computer in the bidirectional mode is possible Possible in a 1 to 1 base system configuration The modes used with the RS 422 and RS 232C interfaces can be switched after the AJ71C24 S8 is started up Dedicated protocol a No protoco Bidirectio
255. s mitted between an external device e g a computer and a PC CPU The buffer memory can be accessed from the sequence program by using the FROM TO instruction The buffer memory can be accessed from an external device by using the buffer memory read write command CR CW with dedicated protocols 1 to 4 1 Buffer memory applications There are two types of buffer memory area One area may be used freely by the user but the other area has a special application a User area There are four applications of the user area which can be categorized as follows 1 Data receive area in no protocol mode bidirectional mode This area stores data transmitted from an external device in the no protocol mode or bidirectional mode 2 No protocol mode bidirectional mode data send area This area stores data from the PC CPU to be transmitted to an external device 3 On demand data storage area This area stores send data to be transmitted from the sequence program to an external device using the on demand function 4 Area when using buffer memory read write commands This area stores data when communication is made using protocols 1 to 4 for buffer memory read write commands CR CW b Special applications area The applications of this memory area are fixed They are used to determine the data communications format and to change the al location of the memory area for section a above When the power is turned ON the PC CPU is
256. s nate that station number 00 to 1F turned ON AJ71024 8 COMMUNICATIONS USING DEDICATED PROTOCOLS _ MELSEC A 8 14 On demand Function The on demand function is used when the PC CPU has data to transmit to the computer In this case the PC CPU specifies the buffer memory area in which the data to be transmitted is stored and then starts transmission During data transmission between the computer and PC CPU using dedi cated protocols 1 to 4 communications is normally initiated by the computer Hf the PC CPU has emergency data to transmit to the computer the on demand function is used AS71024 Address Buffer memory Dedicated TO protocols PC CPU instruction 1 to 4 Sequence Computer program This function is available only when there is a 1 1 ratio of computers to PC CPUs 8 14 1 On demand handshake signal and buffer memory 1 On demand handshake signal The on demand handshake signal turns ON when the PC CPU transmits a data send request to the computer to start transmission and turns OFF when transmission of the data specified by the AJ71C24 is com pleted It acts as an interlock to prevent on demand requests being made simultaneously Handshake Signai Description Signal Turned ON OFF by During execution of on demand function ON transmission underway AJ71C24 OFF transmission completed n in Xn3 is determined by the slot location of the AJ71C24 2 Buffer memor
257. s 0 msec Check sum is calculated within this range KEN ota ees ae Abe 465 42657 n LTE NE C Wn Be Be ay Mey uy Stn 6 Designation to tum OFF vos Designation to turn ON M904 Designation to turn ON M905 Designation to turn OFF M906 Designation to turn ON M907 COMMUNICATIONS USING DEDICATED PROTOCOLS 8 COMMU ONS DEDICATED PROTO HELSECA b Using the JW command AnACPU common command Designation Method Designation in protocol 1 is shown below St No Station number Batch read bij command and 1 31H indicates ON To designate the device range the following conditions must be met e1 lt number of device points lt 160 Head device number number of device points 1 lt maximum device number Designation Example To write data to 5 points from M903 to M907 in station 0 Message wait time is 0 msec Check sum is calculated within this range Ce See ECEN ETEL LNE EE TE TELTE FEL Boa Sto Tn Duy Itn bed Designation to turn OFF M903 Designation to turn ON M904 Designation to turn ON M905 Designation to turn OFF M906 Designation to turn ON M907 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 7 5 Batch write in units of words a Using the WW command ACPU common command Designation Method Designation in protocol 1 is shown below ey Designation of device range to be read Batch read word oem 1 point of the device uses 4 characters T
258. s 100H to 11FH is returned to the default state except for address 119H Received data stored in the AJ71C24 s buffer and the OS area during data communications in the no protocol bidirectional mode is cleared Turns ON the AJ71C24 READY signal Xn7 Switches the higher bytes in the AJ71C24 buffer s mode switching designation area address 119H from 01H to 02H The mode switching operation is completed Example When switching the RS 232C to the no protocol mode and the RS 422 to the dedicated protocol format 1 mode respectively Initial processing 2 AJ71C24 gt READY signal Xn T Approx 6 sec 1 3 Must be set to OOH by the PC CPU Data in AJ71C24 buffer address 119H 3 Mode switching from an external device a After switching the mode an external device cannot be used to switch set data in the AJ71C24 buffer s special applications area If set data must be changed after switching the mode write neces sary data from the PC CPU see Section 3 4 2 for the write timing When set data is not changed from the PC CPU communicate by using the default data in the special applications area 3 SPECIFICATIONS b When both the RS 232C and RS 422 are set to the no protocol mode mode switching designation data in 0109H the mode can not be switched by using an external device This is because data cannot be written from the external device to the buffer s special application
259. s Concerning Compatibility and the Use of Existing Programs Prepared for the AJ71C24 Computer Link Module The following sections describe precautions which should be taken when using the AJ71C24 S8 computer link module hereafter called the AJ71C24 8 These precautions cover compatibility with the AJ71C24 computer link module hereafter called the AJ71C24 the use of existing programs prepared for the AJ71C24 and procedures for changing adding and install ing modules to the existing network 1 1 Compatibility The AJ71C24 S8 and the AJ71C24 have the same dimensions and can be installed in the same way They also use the same basic programs PC CPU programs and computer programs Compatibility is maintained within the functions supported by the AJ71C24 1 2 Precautions When Using Existing Programs 1 2 3 Buffer memory read write operations CR and CW commands Addresses 100H to 11FH in the buffer memory of the AJ71C24 S8 are allocated for special applications Therefore to read buffer memory or write data to the buffer memory using the CR or CW commands use the memory areas in addresses 120H and above Input output for PC CPU The READY signal Xn7 is provided for the AJ71C24 S8 For the link operating in the no protoco l mode this READY signal should be inserted as the interlock signal in the sequence program which uses the AJ71C24 Communications time The time required for communications with a PC CPU
260. s area Mitsubishi recommends using a PC CPU for mode switching 4 Operations in response to a mode switching request when the data communications has not been completed a When data communications in the dedicated protocol has not been compieted receiving a mode switch request will switch the mode after data communications has been completed after transmitting data in area B see Section 8 3 Example 010 JH O o current mode number Mode number of the request to switch b When communicating data in the no protocol bidirectional modes the AJ71C24 switches the mode under the following conditions 1 When the AJ71C24 request to send signal Y n 1 0 is ON turn ing OFF the send completed signal Xn0 switches the mode Request to send signal n 1 0 Send completed signal no the inal processing mode Srecno ie executed When this happens if the request to send signal to the PC CPU has not been turned ON the received data stored in the AJ71C24 buffer and the OS area will be cleared 3 SPECIFICATIONS MELSEC A 2 When the AJ71C24 received data read request signal Xn1 is ON turning OFF the received data read completed signal Y n 1 1 executes the mode switching 1 plated signal Y n 1 1 When the received data read com goes OFF the initial processing mode In this case if the received data remains in the AJ71C24 s OS area that data will be cleared 3 SPECIFICATIONS
261. s eee e Error indicator LED Information Flow After writing data to special 2 C N data register 09072 the LED No 16 AJ71C24 reads and verifies it If the data matches it is changed and the procedure is repeated if data does not match an error is indicated PC CPU communication check 2 C N LED No 16 PC CPU R W LED No 28 Checks data sent from RS 2 SIO 232C connector If normal LED No 1a OF AJ71C24 changes data and RS 232C com the procedure is repeated 2 SD 2 SIO ij munications if not normal an error is indi LED No 1 LED No 19 check cated An error is indicated Flashing if no cable is connected buch at PTA LED No buch at Checks data sent from RS 4 SIO OFF 422 connector If normal LED No 23 AJ71C24 changes data and RS 422 com the procedure is repeated 4 SD 4 SIO munications if not normal an error is indi LED No 10 LED No 23 check cated An error is indicated Flashing if no cable is connected AJ71C24 na 4a a a No 11 The test continues even if an error occurred with a checking item 4 SETTINGS AND PROCEDURES BEFORE OPERATION 4 7 Loopback Test MELSEC A The loopback test checks the correctness of data communications between the computer and the AJ71C24 using the dedicated command TT with the dedicated protocols 1 to 4 The procedure to execute the loopba
262. s function uses the DC codes 0C1 DC3 DC2 DC4 or DTR DSR signals to control data communications between the AJ71C24 and an external device The AJ71C24 controls its data communications by using this function The following table shows the interfaces used and modes where transmis sion controls are enabled Trans Modes note aes E Transmission mission note aes E are Valid Type of Control Control Function No Bidirec Dedicated Protocol tional Protocol ake RS 422 is ignored e E LG E E DC1 DC3 transmission control oj code RS 422 control DC2 DC4 transmission contro EJET O Enabled Transmission is controlled Disabled DTR DSR control or DC code control can be used Controlled via both the RS 232C and RS 422 3 5 1 Precautions when controlling transmission This section gives the precautions to take when using the AJ71C24 trans mission control function 1 Deciding which items are required to control data communications between the external device and the PC CPU a Is the transmission control function used If so which type of control is used b How is transmission controlled c If DC code control is used which combination of codes is utilized DC1 to DC4 codes can be switched 2 Conditions for using the transmission control function a Transmission cannot be controlled using both DTR DSR signals and DC codes at the same time Selec
263. s how to read the message format figures 6 DATA COMMUNICATIONS USING ANM N MULTIDROP LINK 6 3 Procedure for Data Communications with a PC CPU This section explains the procedure for computer interlocking and data communications with a PC CPU when constructing an m n multidrop link 6 3 1 Communications between each computer and PC CPUs Each computer obtains the access right one after another according to the order of the station number of each computer and then does data com munications with PC CPUs Computer peace EAN Tranerniesion Computer TE wa Data communications with the PC CPU Ca eral adGhe 1 T The following example shows the procedure for data communications between each computer and PC CPUs Computer with the access right 3 1 When starting a system the computer allocated with the minimum station number 80H obtains the access right 2 The computer which has the access right a Performs data communications with PC CPUs within the maximum data communications time set among computers and then starts procedure 4 b Starts procedure 4 if it does not perform data communications with PC CPUs 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK MELSEC A 3 Each computer without the access right checks the access right time the maximum data communications time of the computer with the access right and ignores incoming data which is addressed to others When
264. s required to switch the mode between an external device and a PC CPU a Is the mode switched from an external device or a PC CPU b At what intervals are modes switched for each mode switching c pattern Dedicated protocol formats 1 to 4 mode Dedicated protocol formats 1 to 4 mode Dedicated protocol formats 1 to 4 mode No protocol Bidirectional mode No protocol Bidirectional mode Dedicated protocol formats 1 to 4 mode No protocol mode Bidirectional mode Bidirectional mode No protocol mode How is an interlock provided for all connected devices Method and message used to notify all connected stations of mode switching Method and message used to notify ail connected stations that mode switching has been completed Device number and data description when PC CPU word devices are used 3 SPECIFICATIONS MELSEC A 2 AJ71C24 operation contents when a request to switch the mode is accepted AJ71C24 mode switching is requested by using the AJ71C24 buffer s mode switching designation area address 119H When a mode switching request is accepted the AJ71C24 executes the following operations a First turns OFF the AJ71C24 READY signal Xn7 b Initializes the AJ71C24 and starts it up takes about six seconds c d w w During this operation the following processings take place at the same time Set data in the special applications area of the AJ71C24 buffer addresse
265. s used to connect short distances maximum of 15 m 49 2 ft 3 To have the RS 232C communicate over a distance greater than 15 m 49 2 ft use a modem or RS 232C RS 422 converter between the external device and the AJ71C24 Fig 2 4 System Configurations Ill SYSTEM CONFIG TION 2 SYS C URATIONS MELSEC A 2 The following tabies list the functions available when the external devices are linked with the PC CPU modules to make a 2 1 configura tion a The interface used to set dedicated protocols 1 to 4 1 Functions available when using external devices Interfaces for Dedicated Available Functions Protocol Read write Device memory Test Including exten sion devices Read write Extension file register Test Buffer memory AJ71C24 of the Read write self Special func tion module s Read write buffer memory Sequence microcomputer Read write program Including exten ee ee Remote RUN STOP PC CPU type read Input signal X ON OFF Self loopback Transmission test of received data 2 SYSTEM CONFIGURATIONS MELSEC A 2 Functions available when using a PC CPU interfaces for Dedicated Protocol Data transmis On demand sion to external devices b Interfaces used to set the no protocol mode Functions available when using external devices and a PC CPU interfaces for Available Functions No protocol Mode To computers printers and external device c Inter
266. sed it is possible to read and monitor the devices by designating the device numbers at random 1 Control procedure for monitoring Editing EM command and trans mitting device designation Read processing Executing EM commands Data processing CRT display etc Change monitor device YES 1 As the flowchart shows monitor data registration must be executed before monitoring Attempting to execute monitoring without register ing the monitor data will cause a protocol error 2 The contents of the monitor data registration area are cleared when the power supply is turned OFF the PC CPU is reset or the mode is switched 3 For monitor registration five types of registration are possible They are device memory in bit units BM or JM device memory in word units WM or QM and the extension file register EM 8 COMMUNICATIONS USING DEDICATED PROTOCOLS _ MELSEC A 2 Registering Monitor data of the extension file register ACPU common command Designation Method St No Station number Designation in protocol 1 is shown below Extension file register monitor To designate the device range the following condition must be met 1 lt s number of device points lt 20 Designation Example To register monitor data for R1234 in extension file register block number 5 R2345 in block number 6 R3055 in block number 15 and R8000 in block number 17 in station number 10 Messa
267. smitted PC CPU Sequence program Write TO instruction Send request signal ON PC CPU Sequence program ROM instruction complete signal ON AJ71024 buffer memory HFF Bidirectional H An AJ71C24 receives a response from a computer The data received from a computer is stored in an AJ71C24 received area and read by the FROM instruction in the sequence program the data received is transferred in the code as received The response data is transmitted to a computer in response to the read completed signal AJ71C24 buffer memory Bidirectional mode OOH to FFH receive area I Read request norma E Data Check laize Data Q sum abnormal ignored Eror N code 8 00H to FFH A hee dt 10 2 10 COMMUNICA TONS ee esecn In the bidirectional mode data is not converted to ASCII code in the AJ71C24 When ASCII code is required the data must be processed into ASCII code in a PC CPU or computer 2 Designating word byte units for bidirectional mode communications For data communications in the bidirectional mode units of data to be transmitted may be seiected between words and bytes Default setting for data unit selection is word but selection is possible by writing 1 or 0 to address 103H in the buffer memory area Section 7 4 3 gives details of the program to make this setting 10 3 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE
268. ss 101H is cleared when the LED turn OFF request is made Data at address 102H remains as written 3 If the error data has not been cleared after the LED turn OFF request is made the corresponding bit in the error LED display status storage area turns the error LED ON again 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY MELSEC A 7 4 Settings in the No Protocol Mode This section describes setting methods and gives no protocol mode ex amples 7 4 1 Setting the no protocol mode receive completed code for receive with variable length data How to set and modify the receive completed code and the sequence program for the receive processing with variable length data are shown below Setting Method b15 to b8 b7 to bo Butter memory address 100H o o Default ODOAH CR LF Enter the required completed code Always write OOH to the higher 8 bits 1 The completed code can be set to any vaiue which makes 1 byte in the range of 00H to FFH Since the default value setting is ODOAH when the CR and LF codes are received during the data receive the read request is transmitted to the sequence program Xn1 is ON If the default setting has been changed when a modified completed code is received during the data receive the read request is trans mitted to the sequence program 2 If the length of data to complete data receive is also set the read request for the received data is transmitted when the com
269. ssing Receive Processing After completing data receive 1 the AJ71C24 transmits the response 2 2 The received data and receive result are transmitted to the se quence program via the buffer memory After completing data receive 2 1 the AJ71C24 transmits the response 2 2 The receive data and receive result are transmitted to the se quence program via the buffer memory Data receive 2 1 is ignored and received data is discarded The response 2 2 is not trans mitted Data receive is not transmitted to the sequence program Data receive 2 1 is ignored and received data is discarded The response 2 2 is not trans mitted Data receive is not transmitted to the sequence program 10 COMMUNICATIONS IN THE BIDIRECTIONAL MODE MELSEC A 10 7 Basic Program to Read Write Buffer Memory The following describes a basic sequence program to bidirectional read and write data to and from the AJ71C24 buffer memory 1 Reading data from the receive area FROM FROMP DFRO DFROP Data is read from the buffer memory bidirectional receive area default 80H to FFH PC CPU AJ71C24 Buffer memory bidirectional receive area ae Sequel pean SSS ES SS SS SS SS SS SS SS SS SS SS 8 Be fe Essl ae ees 1 Xn1 Received data read request Y nes 1 Received data read completed 4 1 Read request Xn 2 Received data length read R ho vedeived data length tromi the ns a FRO
270. stem use Trying to write data to the ranges outside the write only area might cause the PC CPU to malfunction The ACPU programming manual gives details concerning special relays and special registers 4 When using an extension file register to read write file register data from to a PC CPU use the commands explained in Section 8 8 for file register R read write operations use the commands explained in Section 8 8 for read and write operations for the file register R 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 2 The AnACPU dedicated commands and device ranges used for device memory read write are described below a AnACPU dedicated commands Number of PC CPU Status cate purmg joa RUN Processing Contents Processed During per Com STOP SW22 munications OFF Bit Reads bit devices X Y M etc in units of R E AE ale 32 words Reads word devices D R T C ete in ans We data to bit devices X Y M etc in Se ow aanas S7H units of points 169 points Writes data to bit devices X Y M etc in 10 words units of 16 points 160 points Writes data to word devices D R T C etc in units of points Sets resets bit devices X Y M etc in units of points by designating the devices and device numbers at random Sets resets bit devices X Y M etc in units of 16 points by designating the devices and device numbers at random
271. t ex devices 0 84 ms cluding R BT 0 90 Pate 29 me 1 scan when enable during Word RUN is set ex devices 090 me 90 ms R Monitor data registra Ee 1 scan DEER device Device tion devices R only data Word AR AE Scan Count Re quired for Processing Device memory Batch read 1 27 ms 0 76 ms PE see pce e we ar em Test Random write 0 87 ms 0 97 ms Monitor data registration iva we on ae oe Batch read Batch write CW APP 8 2 scan 3 scans for ET onty AnACPU Extension file register APPENDICES gt MELSEC A Scan Count Re quired for Processing Batch read tr i struction struction j struction hd on process process process 2 scans i MEMS A ing time ing time ing time 1 scan when ry Batch write TW 41 13 0 81 0 75 enable during msec msec msec RUN is set pis wm same 078m vom se on rome eee arom Sequence 64 steps program 2 scans write enable during 0 49 ms RUN is set puter pro gram bytes Batch 0 76 ms write a ow e Coa bytes 2 scans eee 128 Parameter SS et Analysis request Ps Remote RUN AR PC CPU Remote STOP Sp APPENDICES MELSEC A 2 AnACPU dedicated command Intervening Times cea Time nba Aza asa A3A 256 devices ae ee scan l 2 scans a during RUN is set exclud 64 devices ing RJ 2 scans striae Test a 1 scan when enable Device rand
272. t mode number can be confirmed by reading the value in the designated mode switching area address 119H of the buffer The lower four bits of the mode number are stored in 1H to OH 7 17 7 INITIAL SETTING OF TRANSMISSION CONTROL DATA TO BUFFER MEMORY RE aren f E SECA 7 6 2 Mode switching designation The following shows how to designate mode switching and gives an example of a sequence program This section explains how to specify the designated mode switching area address 1194 The following flowchart shows how to switch the mode START Write the following value to the mode switch ing designation area When necessary all connected devices are informed that mode switching is being executed 010 JH Tt ___ Switching request mode number Check the AJ71C24 READY signal Xn7 Did the READY signal go OFF YES OFP YES ON When mode switch processing starts the AJ71C24 tums the READY signal Xn7 OFF Check the AJ71C24 ready signal About six seconds NO ON NO Did the READY signal go ON OFF Read the vaiue in the mode switching when the initial part of the mode switch we AJ71C24 tums the READY signal ON processing has been completed designation area NO Are the higher bytes o 01H the read value in 02H The AJ71C24 completes mode switch YES 02H processing Setting of the special applications area is Write the set value of the switched mode to enabled the sp
273. t one type of control using the AJ71C24 buffer s transmission control designation area address 11AH See item 3 below b Transmission is controlled via the RS 232 in the same way as via the RS 422 SPE 3 SPECIFICATIONS MELSEC A 3 Settings when the transmission control function is is not used These settings specify whether or not the AJ71C24 transmission control function uses the AJ71C24 buffer s data communications control desig nation area address 11AH These settings must be executed when power to the PC CPU is turned ON the PC CPU is reset or the AJ71C24 mode is switched See Sec eomunn me ano aa ooo ee ao oe eee ae No No protocol B idirec tional Dedi Mode cated protocol Dedicated cated No protocol protocol protoco DTR DSR control OOOOH default Data setfor DC code control 0101H 0201H or 0301H wans Section mis When the trans sion 7 7 1 control mission control function is not used 4 OTR DSR control Since there are no OTR DSR signals in the RS 422 interface when DTR DSR control is designated data cannot be communicated via the RS 422 AJ71C24 Can be controlied i l i 1 5 DC code control a DC1 DC3 transmission codes and DC1 DC3 receive codes can be controlled when executing full duplex data communications be tween the AJ71C24 and its communicating device Data comm
274. tching the mode The values 1H to DH of the mode number that correspond to the current mode are stored after switching the mode 1H to DH correspond to the set vaiues 1 to D of the mode setting switch see Section 4 3 1 4 SETTINGS AND PROCEDURES DEFORE OPERATION 4 SETTINGS AND PROCEDURES BEFORE OPERATION 4 1 Settings and Procedures before Operation The settings and procedures which have to be done before a system using the AJ71C24 can be started are described below Determine the system configuration Set up the hardware 1 Set the transmission specifications Specify the main channel Specify the data length Specify the number of stop bits Specify the sum check Specify write during RUN Specity sending area terminal resistance Specify receiving area terminal resistance Create a data communications program Appendix 12 contains the form sheet for recording the setting values of the AJ71C24 A sequence program for data transmis sion or switching the mode must use the following functions e Data transmission in the no protocol bidirectional mode Data transmission using the on demand function of the dedicated protocol e Signal input using the global function of the dedicated protocol e Switching the mode 4 SETTINGS AND PROCEDURES BEFORE OPERATION 4 2 Nomenclature 4 2 1 Nomenclature Au71 24 58 i indicator LEDs Station number setting switches Transmission specifi
275. th described below The data to be transmitted to the computer is designated with a TO instruction in a sequence program The buffer memory length and length of the send data and send data length storage areas are determined by the values set at 104H to Send data length storage area nu 9 y Default Send data length storage area address OH Send data storage area address gt 1H to 7FH The data length in the message received from the computer is written by an AJ71C24 as it is as the received data length Data length expresses the number of words bytes at the data section Received data length storage in the message area The unit of data length is determined by the value set at address 103H Transmit the data from the computer within the receive data storage area length described below The data in the data section in the message received from a computer is transmitted by the AJ71C24 as it is received The buffer memory length and length of the received data and Received data length storage received data length storage areas are determined by the values set atea at 106H to 107H Defauit Received data length stora area address 80H Received data storage area address 81H to FFH 10 7 f TIONS IN THE BIDIRECTI 10 COMMUNICATIONS EB ECTIONAL MODE MELSEC A 10 3 Programming Hints 10 3 1 System configuration and communications mode for bidirectional mode communications 1 System configuration and the AJ71C24 mode setting
276. the PC CPU The PC CPU transmits the data send request When the emergency data needs to be transmitted from a PC CPU to a computer the PC CPU transmits a send request to the AJ71C24 to make the computer execute an interrupt processing 1 GENERAL DESCRIPTION F Con Fren SAS ARTE Ag nipapa gsi Aee 4 t MELSEC A This is the on demand function of the AJ71C24 Itis availabe only when one computer is connected to one PC CPU 1 The dedicated protocols consist of four different protocols The term dedicated protocols used in this manual is the col lective term for these protocols 2 Communications in the no protocol bidirectional modes Either the no protocol mode or the bidirectional mode can be set a Communications in the no protocol mode 1 Data communications can be initiated by a PC CPU Data communications can be initiated by a computer or any PC CPU Data can be transmitted from a PC CPU to an external device by using the TO instruction in the sequence program to write data to the buffer memory Data transmitted from an external device can be read by a PC CPU using the FROM instruction in the sequence program The following example shows a system with a printer CRT and keyboard terminal connected in a 1 1 ratio Data can be output from the buffer memory to the printer or a CRT display using the TO instruction Data input from the keyboard to the buffer memory can be read using a FROM instruction from the PC CP
277. the access right time exceeds the maximum data communica tions time each computer executes the processing mentioned in 7 Computer with the access right Computer oven station number 81H 4 The computer that has finished data communications with PC CPUs and the computers that do not need data communications with PC CPUs transmit the access right transfer data to the computer at the next station number When a computer is unable to receive a response message from the next computer to which the access right is to be transferred it keeps on transmitting the access right transfer data to the following com puters in the order of station numbers until the access right transfer is completed 5 The computer to which the access right is given transmits a response message to the computer that gave the access right An example of data communications using dedicated protocol 1 Message mentioned in 4 Computer that 1 The command symbol F j M Sum check ZZ in this example is transfers the umber Command aa time Codo indicated only for ex access right 60H 22 2 87H planation Use any 80H IH H SAN 32H desired symbol for the transfer command to R eaii Pms ber Mea aat obtain the access right right is tr cee se 81H 82 See Section 8 3 telis how 3H 31H 38H 3H to read the message 81H Message mentioned in 5 format figure 6 The computer that transmitted a response messag
278. the mode switch to 1 to 8 3 If there is any interface which is not connected to any external device when the mode setting is at 9 to D noise will come in through such an interface and normal communications cannot be done In such a case change the mode setting to 1 to 8 4 When the computers and the AJ71C24 modules are connected in an m n multidrop link with the dedicated protocol do not use protocol 3 7 C 5 Sections 2 3 1 to 2 3 6 and 4 5 4 give the examples of settings with different system configurations 4 3 2 Setting of transmission specifications main channels and terminal resistance Setting song rae c anne Position of a Switch Switches Valid for ya channe RS 422 RS 232C modes gs A D swi Data Data length 8 ooo abe o 7 rite OE SW13 F swia_ sion speed Ton oFF a ore oar swis setting e Lore Por on PERE e e ETE EE Parity setting swis Parity check Enabled Disabled Eoo when parity check enabled is swea wt swee te RUN Enabled Disabled Pod Receive area terminal Valid only selected Send area Valid only Sw23 terminal Present when RS 422 resistance is used resistance Present 4 SETTINGS AND PROCEDURES BEFORE OPERATION a srs 1 2 3 MELSEC A Main channel The main channel in the above table refers to the interface to which the computer is connected The main c
279. the send data length storage area in the buffer memory for bidirectional transmission smaller than the size of the send data storage area or b set the send data length to 1 or greater Data which does not have a data part cannot be transmitted using the bidirectional mode Set the computer so that it transmits the response message in response to the data received from the AJ71C24 to the AJ71C24 within the set value of the time out time setting area address 113H in the AJ71C24 buffer memory Either a interlock the computer with the AJ71C24 so that they cannot begin transmitting data simultaneously to each other or b set the data valid invalid setting area address 114H in the AJ71C24 buffer memory to valid When the computer transmits the NAK code to the AJ71C24 in response to the data received from the AJ71C024 an error code should be added immediately after the NAK code These error codes are added to immediately after the NAK code Take corrective actions according to the procedure fixed by user Transmit data from the computer according to the follow ing settings with the AJ71C24 see Section 4 3 2 for SW12 to SW18 Data bit length with SW12 Transmission speed with SW13 to SW15 Stop bit length with Sw18 Use insulation transformers noise cutting transformers to eliminate noise To transmit the check sum to the AJ71C24 obtain the check sum as described in Section 10 5 2 Set the check sum e
280. tructure and sum check code when the sum check setting is Enabled 4 SETTINGS AND PROCEDURES BEFORE OPERATION MELSEC A 4 Write during RUN Set whether a processing requested by the external device is executed or not executed by the PC CPU in the RUN state when the computer link operates with the dedicated protocol Section 3 3 1 gives the functions available with this setting 5 Terminal resistance at send and receive When using the RS 422 cable set the terminal resistance to Present at the stations connected to the both sides of the station which is linked with the RS 422 cable If this setting is not correct normal computer link operations cannot be done The following chart shows examples of settings Shaded boxes indicate the stations where terminal resistance needs to be set and white boxes indicate the stations where terminal resistance need not be set Appen dix 6 gives the settings to be done on the computers Setting of AJ71024 Where Terminal Computer Resistance to PC CPU System Configurations Needs to be Set Computer OFF or OFF ON Set either to ON 4 SETTINGS AND PROCEDURES BEFORE OPERATION 4 3 3 Station number setting The station number is set on all AJ71C24s so that the computer knows which AJ71C24 to access in a 1 n ratio computer link system Station Number Setting Switches 1 Set the station number in the range 0 to 31 Never set a station number to more than 32
281. uence to an AJ71C24 While a computer and PC CPUs are performing data communications the time out check function must be used with other computers to block data transmission from those computers 6 DATA COMMUNICATIONS USING AN M N MULTIDROP LINK MELSEC A 6 2 3 Command and message format for data communications among computers A command and message format for data communications among com puters with the dedicated protocol must be set Use any command except the commands used with the dedicated protocol of an AJ71C24 See Section 3 3 1 The message format basically follows the control procedure set by the mode setting switch of each AJ71C24 See Section 8 4 Set the data arrangement after the PC number in the message as desired 1 Protocol 1 when doing data communications Station Computer Tambor Se meses arapommen 2 Example of a message format when station numbers 80H and 81H perform data communications Computer 2 Station number 81H 1 Hf the mode setting switch of an AJ71C24 is set for the dedicated protocol mode 1 to 4 and if the station number written in a message to be transmitted from computer 1 is OOH to 31H designating AJ71C24 then the designated station AJ71C24 determines that message to be a faulty message and it transmits back a message beginning with NAK to computer 1 Always use station numbers 80H to 9FH for communications between the computers 2 Section 8 3 tell
282. unications cannot be controlled using DC1 DC3 codes when executing half duplex data communications b Avoid using DC1 to DC4 codes in the user s data If those codes must be used take one of the following measures e Use DTR DSR controls e Switch DC codes see Section 7 7 2 Do not use the transmission control function 3 SPECIFICATIONS MELSEC A When using a DC1 DC3 code to control data receive or DC2 DC4 code to control data receive the AJ71C24 will execute the corresponding DC code control if the user s data received from the external device contains a DC code However if the user s data whose request to send was transmitted by a PC CPU contains a DC code that data will be transmitted 6 Handling DTR DSR signals when OTR DSR controls are not used When DTR DSR controls are not used the AJ71C24 handles DTR DSR signals as follows a DTR signal is normally ON b The DSR signal ON OFF state is ignored 7 Transmission control when the AJ71C24 mode number is 9 to D When the AJ71C24 RS 232C and RS 422 are set to the same mode the AJ71C24 controls data communications as shown below mode number 9 no protocol mode modes A to D dedicated protocol formats 1 to 4 a When DTR DSR controls are executed When the RS 232C is used When the RS 422 is used as the main channel as the main channel PC CPU AJ71C24 PC CPU AJ71C24 RS 232C RS 232C an Data flow Data flow e RS 422 RS 422
283. unications time TO longer time of T1 T2 T3 T5 or TW T4 where TO T4 1 baud rate X the number of bits per character t 7 8 O 1 gi x the character length Start bit Data length 7 or 8 Parity bit 0 or 1 Stop bit 1 or 2 T1 maximum 1 scan time since data entry to the PC CPU is made after END processing Ifthe PC CPU is not running T1 is 0 T2 T3 value in Appendix 5 For tunctions processed in 1 scan T3 is 0 TW message wait time T5 1 scan time For functions processed in one scan T5 is 0 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 4 Transmission time through Data link systems a The transmission time T1 for data transmission by specifying the PC CPU number to a PC CPU on MELSECNET II MELSECNET B not equipped with an AJ71C24 is calculated as follows Local station Transmission time T1 Transmission delay time A 1 scan time for station 1 loaded with AJ71C24 x 2 2 Remote station Transmission time T1 Transmission delay time B 1 MELSECNET master station scan time x 2 2 1 See the sections of the Data Link Reference Manual that explain corresponding data link system transmission delay times Transmission delay time A See the table which describes LRDP instruction processing time Transmission delay time B See the table which describes RFRP instruction processing time 2 Substitute x 3 for x
284. uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal Monitoring is executed after registering the monitor data word units as in Example 2 of 2 a Message wait time is 0 msec Check sum is calculated i 123400500064076 313 SSH 30 Ii 3 Wa Oo Hw Ba Doa Tra F Indicates that the data in D15 is 1234H 4660 in decimal Indicates that the data in W11E is 0050H 80 in decimal indicates that the present value in T123 is 0064H 100 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A b Monitoring the devices registered by the QM command AnACPU dedicated command Designation Method St No Station number Designation in protocol 1 is shown below Monitor word command The number of characters for the number of points designated by monitor registration QM 1 point of device uses 4 characters Therefore a 1 word data is expressed in 4 digits hexadecimal Designation Example Monitoring is executed after registering the monitor data word units as in Example 2 of 2 b Message wait time is 0 msec Check sum is calculated within this range Bn 46 ORY Indicates that the data in D15 is 1234H ans 4660 in decimal Indicates that the data in W11E is 0050H 80 in decimal Indicates that the presert value in T123 is 0064H 100 in decimal 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 8 Extension File Register Read and Write A
285. uters in the m n multi drop link set the station number at the computer side in the range of 128 to 159 80H to 9FH In this setting the station numbers are determined according to the rule set by the computers For details see Section 6 2 1 AJ71024 AJ71024 AJ71 024 AJ71024 Station No 0 Station No 1 Station No 2 Station No 31 PC CPU No FFH PC CPU No FFH PC CPU No FFH PC CPU No FFH Station numbers do not need to be sequential 8 COMMUNICATIONS USING DEDICATED PROTOCOLS 4 PC CPU number The PC CPU number determines which PC CPU on MELSECNETIi I MELSECNET B to access The PC CPU number may be from 00H to 40H 20H 00 to 64 32 in 2 digit ASCII hexadecimal a Accessing PC CPUs equipped with AJ71C24 to which a computer is connected Set all PC CPU numbers to FF self using the computer Use any function except the on demand function b Accessing PC CPUs on MELSECNETIi II MELSECNET B equipped with AJ71C24 1 When computer and master station are connecterd MELSECNETI II local and remote 1 O stations MELSECNET B local stations Set each siave link station number 1 to 64 32 in hexadecimal 01H to 40H 20H 2 When computer and local station are connected MELSECNET II master stations MELSECNET B master sta tions Set the PC CPU number to 00H c The range of PC CPUs which can be accessed by setting the PC CPU numbers is shown below 1st tier 2nd tien 2nd tier Remote I O station 2nd
286. which was transmitted by a 7 4 5 Receive computer Computer When the AJ71C24 receives the data PC CPU read compieted signal from the se quence program the AJ71C24 trans mits a response message for the data receive to a computer 2 Setting data length setting for data send The length of the data to be transmitted between an AJ71C24 and a computer is set within the send message see Section 1 1 1 2 b a When data is transmitted to a computer When the data to be transmitted to a computer is output from the sequence program to an AJ71C24 the data length is written to the buffer memory of the AJ71C24 The AJ71C24 sets the data length to a send message and transmits it along with the data to a computer This allows the length of a send message to vary according to the content and kind of data to be transmitted 3 SPECIFICATIONS MELSEC A b When data is received from a computer When an AJ71C24 receives data from a computer the AJ71C24 writes the data length contained in the message to its buffer memory The sequence program reads the data length from the buffer memory to read all the received data The functions available with the bidirectional mode cannot be used together with the functions available with the no protocol mode mentioned in Section 3 3 2 Select either mode using the mode setting switch see Section 4 3 1 switching the mode see section 3 4 and by setting the bidirectional mode setti
287. wing the special use area cannot be allocated as a single area The areas OH to FFH and 120H to 7FFH must be recognized as independent areas FFH 100H The on demand buffer area cannot be allocated in this manner 11FH 120H If the designation is made to process the send receive data in the no protocol mode or bidirectional mode in units of words or bytes the on demand data is processed in the same designated unit 9 COMMUNICATIONS IN THE NO PROTOCOL MODE MELSEC A 9 3 2 Precautions during data communications 1 Communications with the computer in multidrop link In the 1 n multi drop link the data sent from the computer is received by each AJ71C24 The message must contain the objective PC CPU where the data is sent and at the same time it is necessary to write the sequence program that ignores the received data addressed to other stations Message exarnple Station number Data length STX Spece o 2 Binary data OR LF ery 20H pOH R 00H OAH 2 Conditions when the AJ71C24 transmission sequence is initialized The transmission sequence is initialized in the following cases e When the power is turned ON the PC CPU is reset by the reset switch or the mode is switched eThe AJ71C24 CD signal is turned OFF during RS 232C fuli duplex communications If the CD signal is turned OFF during send or receive processing data being processed for transmission or the data stored in the AJ71C24 receive data storin
288. xternal device and the AJ71C24 Fig 2 2 System Configurations I 2 SYSTEM CONFIGURATIONS MELSEC A 2 The following tables list the functions available when an external device is linked with a PC CPU module to make a 1 1 configuration a The interface used to set dedicated protocols 1 to 4 1 Functions available when using an external device este eet for Dedicated este eet Readiwrite Including exten Device memory Test sion devices Read write Extension file registe Test Buffer memory AJ71C24 of the Read write self Special func tion module s Read write buffer memory Sequence Microcomputer Read write program including exten ee ee Remote RUN STOP PC CPU PC CPU type read Input signal X ON OFF Self loopback Transmission test of received data 2 SYSTEM CONFIGURATIONS MELSEC A 2 Functions available when using a PC CPU interfaces for Dedicated Available Functions Protocol Data transmis sion to external devices b Interfaces used to set the no protocol mode Functions available when using an external device and a PC CPU Interfaces for No protocol Mode Available Functions To computers printers and CRTs External device From computers c Interfaces used to set the bidirectional mode PC CPU to external device Functions available when using an external device and a PC CPU Interfaces for Bidirectional
289. y Note Osee Executable gt E Not executable 2 Linkable special function modules buffer memory head address and module numbers See the list shown in Appendix 7 8 COMMNICATIONS USING DEDICATED PROTOCOLS MELSEC A 3 Special function module buffer memory The special function module buffer memory is comprised of 16 bit one word addresses Read and write of the special function module buffer memory is executed by TO and FROM instructions transmitted between the PC CPU and special function module When the computer reads from and writes to the special function module buffer memory via the AJ71C24 it is done in byte units 1 address 8 bits The addresses specified in the computer hexadecimal are converted from FROM TO instruction addresses as shown below Designated address hexadecimal Module head address FROM TO instruction address x 2 converted into hexadecimal Example To designate AD61 high speed counter module FROM TO in struction address 1 CH 1 preset value Specified address FROM TO instruction address 1 x2 Head address 82H 2H 80H The data format when the computer makes a read or write to or from the special function module buffer memory via the AJ71C24 is explained below using the AD61 module as an example Message format at computer Sa UAR Data Data Data Data Data Data i i 0008 2 0 ejo 5 4 OE 2 10 110 0 1 2 00 Ol 3 On ig Wu Sn
290. y Read and Write ccc eee eee 8 10 1 Commands and designation cc cece cece eee e ent eras 8 10 2 Special function module numbers using control protocols 6 8 10 3 Reading data from the special function module buffer memory ACPU common Command cc ccc cece eter e tee eens 8 10 4 Writing data to the special function module buffer memory ACPU common command 6 cece cette tee e eee e eerie Remote Run Stop of PC CPU and Reading PC CPU Model Name 8 11 Commands aere sen ee sein Seta eye a OE Nee Oa OEE eee 8 11 2 Remote RUN STOP 2 0 cece cece rete ee teeter renee een eens 8 11 3 Reading PC CPU model name cece cece ce eee t eens Program Read Write ss ce 2 2 iiien Er iy Pave ve tie edb EA en Bae 8 12 1 Precautions during program read write 6 0 cee ee 8 12 2 Program read write control procedures ccc c eee cree teen eee 8 12 3 Parameter memory read write 2 6 cc cece eee eee een et eens 8 12 4 Sequence program read write ccc cee teeter eter ee eee 8 12 5 Microcomputer program read write 0 ccc cc cece cence ee nenes 8 12 6 Comment memroy read write EE A te vemmion hvitadae nares 8 12 7 Extension comment memory read write 1 cece cee et eens Global FUNCION sic eco ciste eee rarr e eda Wise easel WNT NO A ig ee dose sete EAA 8 13 1 Commands and control 0 cece cece tere ne ener tenes 8 13 2 Setting the global function ACPU common comman
291. y an AJ71C24 TO instruction PC CPU Send completed AJ71C24 FROM instruction Send result 2 Data length is set within the send message Data length is set within the send message when the data is transmitted to a device The receiving side recognizes the data length by the send mes sage Order of transmission The send data of the AJ71C24 is processed as follows ENQ aisia Added to the head Data length The send data length set in the buffermemory is transmitted Data ansarin The send data stored in the buffer memoryis transmitted Sum check Computed with the sum checking range in a message The data transmitted by a computer and received by an AJ71C24 is processed as follows ENQ sisioecriiisiisss Checked and removed from the received data Data length Stored in the buffer memory as the received data length Datti Stored in the buffer memory as the received data Sum check Checked and removed from the received data 3 Variable communications memory area The user memory area can be allocated to suit the purposes and applications of the data transmission L DESCRIPTION iiaiai MELSEC A 1 1 2 System configuration and the number of stations when a computer link system is constructed A computer link system using the dedicated protocol no protocol mode or bidirectional mode can be constructed by connecting the computer to the PC CPU in the ratios of 1 1 1
292. y used by the on demand function Area to specify head The head address of the data stored in the buffer memory address in on demand to be transmitted by the on demand function is specified buffer memory by the TO instruction of the Sequence program The length of the data to be transmitted by the on demand function is specified by the PC CPU TO in struction of the sequence program The AJ71C24 writes a 1 to this address if a trans mission error occurs during on demand data trans mission 0 No error 1 Error Area to specify data length On demand error storage area 8 105 8 COMMUNICATIONS USING DEDICATED PROTOCOLS MELSEC A 8 14 2 On demand function control procedure 1 PC CPU control procedure On demand data transmission Set transmission data word or byte units bona Write the data to be transferred to the user memory area Clear the on demand buffer memory address 10CH Reset the on demand errors eeeress Start is disabled if the contents of this address are 1 Write the head address where the data is stored to buff er memory address 109H and the data length to ad sara When a data transmission request from the PC CPU is sent to the computer the XnS signal goes ON When data transmission is completed the Xn3 signal goes OFF Error Check and if necessary change the contents of buffer memory address 103H See Exampies 1 and 2 in Sec tion 8 14 3 fo
Download Pdf Manuals
Related Search
Related Contents
Dioxin ELISA Kit -For Gas-/-For Ash- を用い Cols Bleus n° 3036 février 2015 OPERATING INSTRUCTIONS Warehouse of Tiffany RL7998 Instructions / Assembly 型式TAD-22CW EDAM5000 User's Manual V13 Copyright © All rights reserved.
Failed to retrieve file