Home
fxzn-2321f rs-232c interface block
Contents
1. looo K 20 2000 to 2019 in special unit B FROM Read FROM 2 50200 to D219 Read of BEM command m1 Special unit block No KO to K7 from the one nearest the basic unit m2 Head specification No in BFM m2 KO to K32 766 Head element No in transfer destination Either one can be selected among T D KnM KnY 5 V and Z The element No can be modified using the index n Number of transfer points n Ki to K32 767 In the FX2N PC whose version is 2 00 or more when the FROM TO instruction is executed while the M8164 is turned on the contents of the D8164 are treated as the number of transfer points n m X011 m1 m2 CS n BFM 3 in special unit No 2 Write of BFM command m1 m2 n Same as above S Head element No in transfer destination Either one can be selected among T C D KnX KnM KnY KnS V Z K and H The element No can be modified using the index When X010 and X011 are turned off transfer is not executed and the data in the transfer destination is not changed When a large quantity of data is read written using the FROM TO instruction the watch dog timer 08000 in the PC should be rewritten to a large value a MITSUBISHI 6 3 FX2N 232IF RS 232C INTERFACE BLOCK APPENDIX 6 MEMO MITSUBISHI 6 4 FX2N 232IF RS 232C INTERFACE BLOCK Under no circumstances will MITSUBISHI ELECTRIC be liable responsible for any consequ
2. ne Sum CRI Le formats 210 are available K lt a MITSUBISHI 4 5 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 to b7 data length parity stop bit and baud rate bO to b7 should be aligned with the communication specifications of the connected counterpart equipment b9 and b8 control line For examples of connecting the equipment corresponding to each setting refer to Paragraph 3 3 e When not used b9 0 b8 0 is specified communication is performed using only the SD and RD signals without using the control line e When standard RS 232C mode b9 0 b8 1 is specified a cross cable is required to connect the equipment of terminal specifications and a straight through cable is required to connect the equipment of modem specifications e When RS 232C interlink connection mode b9 1 b8 1 is specified the request to send RS signal functions as the signal to enable receive the 2321F When receiving data exceeding the receive upper limit byte count BFM 2 the 2321 sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send operation At this time when the data saved in the receive buffers is read to data registers in the PC using the sequence program the remaining data can be received Make sure to perform the RS 232C interlink connection when specifying this mode b11 and b 10 addition of CR and LF Set t
3. FNC 79 H03 Receivie terminator 03 4 SFM a Send command Send command input 1 Send byte count FNC 9 0200 1 as follows in the same way Transfer of communication format 409 7876 of receive upper limit byte count 8 gt 2 MOV HDF 0202 2 MOV HBF 0203 3 Send data as many as 9 bytes MOV HBA D204 4 123456789 MOV HDD 0205 5 MOV H20 D206 6 MOV HC3 D207 7 MOV HBD D208 8 MOV HC4 D209 9 s MITSUBISHI 5 12 FX2N 232IF 5 232 INTERFACE BLOCK TRANSMISSION PROGRAM 5 FNC 79 Transfer of send byte count and send data FNC 79 K1000 0200 10 D200 K 9 gt 1000 D205 5 1005 D201 1 BFM 1001 D206 6 gt 1006 D202 2 BFM 1002 0207 7 1007 0203 3 BFM 1003 D208 8 gt 1008 D204 4 BFM 1004 D209 9 1009 M8003 M8000 Send receive enable RUN iti Initial pulse NC contact monitor Read of status FNC 78 Frou K28 Kav K1 BPM628 2 Transfer Num Block No No destination Number points XT completion Status monitor upon necessity Error occurrence X001 3 Error reset Error reset input M11 FNC 78 Read of receive buffers D301 BFM 2001 D301 2005 gt 030 2002 gt 0302 BFM 2006 gt D306 2003 gt 0303 2007 gt 0307 2004 gt 03
4. PROGRAMMABLE FX2N 232lF 5 232 INTERFACE BLOCK Foreword e This manual contain diagrams and explanations which will guide the reader in the correct installation and operation of the FX2n 2321F RS 232C Interface Block It should be read and understood before attempting to install or use the unit ISO 9001 Further information can be found in the FX PROGRAMMING MANUAL 2 series hardware manuals If in doubt stage during the installation of the 2 2321 RS 232C Interface Block always consult a professional electrical engineer who is qualified and trained to the local and national standards 2 tin ou rn om the operation or use of the FX2n 232IF RS 232C Interface Block please consult the nearest Mitsubishi ectric distributor This manual is subject to change without notice s MITSUBISHI FX2N 232lF RS 232C INTERFACE BLOCK 2 2321 RS 232C INTERFACE BLOCK Manual number JY992D66701 U S E RS MAN UA L Manual revision A Date October 1997 S MITSUBISHI FX2N 232lF RS 232C INTERFACE BLOCK Guidelines for the safety of the user and protection of the FX2N 232IF RS 232C Interface Block This manual provides information for the installation and use of the 2 2321 RS 232C Interface Block The manual has been written to be used by trained and competent personnel The definition of such a person or persons is as follows c Note Any engineer who
5. 4 MITSUBISHI 5 4 FX2N 232IF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 Example of sequence program M8002 79 HoogF K 1 Transfer of communication format Initial TO 009 gt pulse Block No No BFM No BFM No Transfer Transfer Numb lumber of FNC 79 Transfer of receive upper limit byte count mor Ke eo TO STX 02H BFM 4 FNC 79 Send terminator 03 28 MIO FNC 79 H02 Receive header FM FNC 79 H03 Receive terminator Go B MIO x909 Send command Send command input M1 FNC 12 K9 Send byte count 9 gt 0200 Peg eem oan e 0 12 Send data as many as 9 bytes 65 71423456789 em 09 7 FNC 12 i iov 208 C Uea a MITSUBISHI 5 5 FX2N 232lF 5 232 INTERFACE BLOCK TRANSMISSION PROGRAM 5 79 Transfer of send byte count and send data oon D201 2 1 gt 1001 D202 4 D203 6 5 gt BFM 1003 D204 8 004 205 9 1005 Send receive enable Initia p pulse NC contact Read of status FNC 78 EMS BIS o bo M2S to MIO Transfer M10 Block BFM No destination Nummer of r points M8000 bes rts RUN monitor d completion Status monitor upon necessity B GD Error occurrence Error reset Error reset input 11 Receive 9 Read of receive buffers
6. BFM 3 Receive time out time Setting range 1 to 32 767 x 10 ms O eliminates time out time The initial value is O BFM 3 specifies the receive data waiting time limit When the next data is not received within the receive time out time starting from the receive edge of each data the receive time out flag BFM 28 b2 is set to ON it is regarded that receive is completed and the receive completion status BFM 28 b1 is set a MITSUBISHI 4 12 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFMs 5 upper and 4 lower Send header Setting range 4 bytes maximum zero suppression The initial value is not provided For the send data of the 2321F 4 headers maximum can be specified When the number of headers is less than 4 the upper O s are ignored zero suppression and not transferred N E 5 upper 2 bytes 4 lower 2 bytes M 0 06 ee 6 0 ma 4th J 2nd edie 1st Exampie 02H STX e The transmission order is fourth header third header second header first header when 4 headers are specified BFMs 7 upper and 6 lower Send terminator Setting range 4 bytes maximum zero suppression The initial value is O not provided For the send data of the 2321 4 terminators maximum can be specified When the number of terminators is less than 4 the upper O s are ignored zero suppression and not transferred
7. When data exceeding the receive upper limit byte count BFM 2 is received in the RS 232C interlink connection mode BFM 0 b9 1 b8 1 the 2321 sets the request to send RS signal to OFF requests the counterpart equipment to suspend the send operation then sets b4 after the receive suspension waiting time BFM 12 has expired To receive the excess data in the interlink connection the rising edge of the b4 is required to be monitored using the sequence program The data as much as the receive byte count BFM 2000 in the receive buffers BFMs 2001 to 2271 or the data as much as the number of receive buffers BFM 14 should be read to data registers in the PC and the receive completion command executed BFM 1 b2 b6 being sent b6 is turned on after the send command BFM 1 b1 is given until the send completion status BFM 28 bO is set b7 being received b7 is turned on after the head data is received until the receive completion status BFM 28 b1 is set 08 RS b9 ER b12 DR b13 CD b14 CS b15 These bits indicate the ON OFF status of the control signals s MITSUBISHI 4 20 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 29 Error code Code Description Causes and countermeasures 0 No error Communication format such as baud rate is not matched Control timing is not matched 1 Receive parity error overrun error framing error Undefined Defectiv
8. bO send receive enable While is turned on the 232lF can send and receive data The contents of the following setting items are determined on the rising edge of bO Make sure to set the contents using the TO instruction before setting bO to ON e BFM 0 communication format e BFMs 9 and 8 receive header e 5 11 and 10 receive terminator On the rising edge of bO the error occurrence BFM 28 b3 and the error code BFM 29 are cleared b1 send command On the rising edge of b1 the contents of the send buffers BFMs 1001 to 1256 are sent to the counterpart equipment up to the send byte count BFM 1000 When send is completed the send completion status BFM 28 bO is set BFM 28 bO is automatically reset when the next send command b1 is given When b1 is given the contents of the following setting items are determined e BFMs 5 and 4 send header e BFMs 7 and 6 send terminator 4 MITSUBISHI 4 10 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 222 7776 52 receive completion eset command When b2 is set to ON the following items are cleared e 28 b1 receive completion e 2000 receive byte count 2001 to 2256 receive buffers When receive is completed b2 should be set to ON to clear the receive completion status BFM 28 b1 If BFM 28 51 is not reset the next data cannot be received When b2 is set to ON
9. As the first terminator specify code from O1H to 1FH As the second to fourth terminators any ASCII code can be specified The register structure and the transmission order are equivalent to those of the send header described above S MITSUBISHI 4 13 FX2N 232lF 5 232 INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFMs 49 upper and 48 lower Receive header Setting range 4 bytes maximum zero suppression The initial value is O not provided For the receive data of the 232IF 4 headers maximum can be specified When the number of headers is less than 4 the upper O s are ignored zero suppression The register structure and the transmission order are equivalent to those of the send header described above BFMs 11 upper and 10 lower Receive terminator Setting range 4 bytes maximum zero suppression The initial value is O not provided For the receive data of the 232lF 4 terminators maximum can be specified When the number of terminators is less than 4 the upper O s are ignored zero suppression As the first terminator specify an code from 01H to 1FH As the second to fourth terminators any ASCII code be specified The register structure and the transmission order are equivalent to those of the send header described above s MITSUBISHI 4 14 FX2N 232IF RS 232C INTERFACE BLOCK BFM 12 Receive suspension waiting time Setting range 01 32 767 x 10
10. 2 C RD RXD With regard to the CD signal the 2321F RS RTS 7 RS RTS indicates the status exclusively CS CTS 8 8 CS CTS 3 When the signal is not required the copen D 2 lt 2 _ FETTE ith regard to the signal the ER DTR 4 cc PEEL O ER DTR indicates the status exclusively DR DSR 1 1 0 DR DSR SG 6 O 8G 003 lt 3 4 MITSUBISHI 3 6 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 4 ALLOCATION OF BUFFER MEMORIES BFMs 4 1 BFM List The RS 232C interface block FXan 232IF 2321 transmits data with the PC via the buffer memories BFMs 16 bit RAM memories in the 232IF FNC78 FROM and FNC79 TO instructions are used to read and write the buffer memories For read _ craz 7 0 Communication format LL W 1 Command 1 to 512 when data length is 16 bits 2 Receive upper limit byte count 1 to 256 when data length is 8 bits W Q is treated as 512 or 256 110 32 767 X 10 ms 4 Send header lower 2 bytes 0 no header 5 Send header upper 2 bytes 4 bytes max zero suppression W 6 Send terminator lower 2 bytes terminator d Send terminator upper 2 bytes T Dy SS mix 28 0 Receive header lower 2 bytes 0 no header Receive header upper 2 bytes 4 bytes max zero suppression Bo ced
11. 2001 0301 BFMit2002 D302 comple 2003 0303 tion 2004 gt 030 M25 Receive completion reset command M8000 FNC 79 Transfer of command to MO gt BFM 1 b3 to b0 a MITSUBISHI 9 6 FX2N 232IF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 Operation chart M0 Send receive enable BFM 1 51 M1 Send command BFM 13 Number of remaining eiu Send completion status is also gt BFM 1001 to 41256 5 5 5 e reset by next send command Send buffers 28 bO 1000 M10 Sand com pletion Send byte count BFM 14 Number of receive BFM 2000 _ 5 Receive byte count 7 1677 Contents of receive buffers a are cleared When not reset Receive x E B BFM 2001 to 2256 5 SERRE s SES 5 5 Heceive buffers SIS BFM 28 b1 C Em USE 11 Receive completion Roc give up count BFM 1 52 M2 Receive completion s MITSUBISHI 5 7 FX2N 232lF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 5 2 Example of sending receiving the data of 8 bit buffer length This paragraph describes an example in which data of 8 bit buffer length is sent and received between the equipment of the terminal specifications In this example the ASCII code saved in the data registers D201 to D209 in the PC is sent to the counterpart equipment and the data received fro
12. 3 3 Wiring of RS 232C Equipment ode 3 3 4 ALLOCATION OF BUFFER MEMORIES 5 4 1 A TBFM HSE MI iE 4 1 4 2 Details of Buffer Memories 4 3 5 TRANSMISSION 1 5 1 5 1 Example of sending receiving the data of 16 bit buffer length 5 1 5 2 Example of sending receiving the data of 8 bit bufferlength 5 8 B APPENDIX eios dd dod coda ca a SUPR Ub E DOREM t ak EN a iO clc HOD dO rien 6 1 s MITSUBISHI 1 1 1 FX2N 232lF 5 232 INTERFACE BLOCK INTRODUCTION 1 INTRODUCTION The RS 232C interface block 232IF hereinafter referred to as 232IF is connected to the FX2n programmable controller to realize full duplex serial data communication with another RS 232C interface such as a personal computer bar code reader printer etc Outline of Product Applicable PC The 232IF can be connected as a special block of the FX2n programmable controller Control instructions Send receive data is received and sent and diversified control commands are manipulated using the FROM TO instruction Number of I O points Connection method The number of I O points occupied is 8 in all either input or output However the capacity of the 5 V power supplied from the PC is limited The current consumption
13. sp RO FX2N 48MR ES UL 2 2321 FX2N 16EX FX2N 232lF X000 X027 Special block ES UL Special block 000 027 030 047 Aa MITSUBISHI 3 1 FX2N 232IF RS 232C INTERFACE BLOCK CONNECTION AND WIRING 3 3 2 Power Supply Wiring Service power supply for sensor Solid grounding 100 9 or less 7 24V DC 10 80mA 24VDC service power supply of PC may be used 6 2mm Handling of the crimp style terminal 0 24 Use crimp style terminals of the dimensions shown on the figure on the left Make sure that the tightening torque of the terminal is 0 5 to 0 8 5 to Tighten each terminal securely to avoid malfunction a MITSUBISHI 3 2 FX2N 232IF RS 232C INTERFACE BLOCK CONNECTION AND WIRING 3 3 3 Wiring of RS 232C Equipment Pin arrangement of communication connector Signal direction Pin No Signal name Function 232IF Counterpart 5 equipment 1 Carrier detection 2 RD RXD data LED indication provided 3 SD TXD Send data LED indication provided 4 ER DTR Data terminal ready gt 5 SG Signal ground 6 DR DSR Data set ready 7 RS RTS Request to send or clear to receive Clear to send m 9 CI RI Calling indication Ring indication 2 MITSUBISHI 3 3 FX2N 232lF RS 232C INTERFACE BLOCK CONNECTION AND WIRING 3 Connection example The signal wiring of the RS 232C equipment varies dep
14. the contents of the following setting items are determined e BFMs 9 and 8 receive header e BFMs 11 and 10 receive terminator In the RS 232C interlink connection mode BFM 0 b9 1 b 8 1 b2 functions as the receive continuation command to receive data exceeding the receive upper limit byte count BFM 2 and clears the following items BFM 28 54 receive suspended e BFM 2000 receive byte count BFMs 2001 to 2256 receive buffers e 5 2257 to 2271 spare receive buffers When b2 is set to the request to send RS signal is automatically set to also b3 error reset When b3 is set to ON the error occurrence status BFM 28 b3 and error code BFM 29 are cleared aa MITSUBISHI 4 11 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 2 Receive upper limit byte count Setting range 110512 when buffer data length is 16 bits 1 to 256 when buffer data length is 8 bits O is regarded as 512 or 256 The initial value is O BFM 2 specifies the maximum byte count received by the 232IF When data is received up to the receive upper limit byte count the receive completion status BFM 28 b1 is set When the receive terminator BFMs 11 and 10 or the receive time out time BFM 3 is set and the set condition is satisfied it is regarded that receive is completed even if the data received is within the receive upper limit byte count
15. W 10 Receive terminator lower 2 bytes O no terminator 11 Receive terminator upper 2 bytes MAKT zoro SUDDIESSIOR lt 12 Receive suspension waiting time in interlink connection 10 to 32 327 X 10 ms W p Number of remaining send data siam R 14 INumber of receive buffers Oto 256 15 71 R 15 sum result R 16 sum result R A MITSUBISHI 4 1 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 R For read W write Setting range Initial value 20 Time from CS to j0t032327 XQ 0ms 0 W uu from completion of actual send to RS OFF 0 to 512 when data length is 16 bits O to 256 Anon data length is 8 bits 2000 Receive byte count Se arte toe GRE EN D E 215 i 1 Receive buffers 42256 iere Spare receive buffers for interlink connection mode 2271 Note W For write be used for read also Undefined BFM Nos not allowed to be used in the program 1 Spare buffers used in the interlink connection mode MITSUBISHI 4 2 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 42 Details of Buffer Memories BFM 0 Communication format Bit Description 0 t ntalvaue 70 Data length 7b b1 00 None b2 Parity 01 Odd 11 Even 11 Even Stop
16. of the 5 V power of the 2321F is 40 mA Make sure that the total current consumption of the 5 V power including other special blocks is equivalent to or less than that available Communication method Full duplex start stop synchronization and non protocol procedure are used The communication format can be specified using the buffer memories BFMs Send receive buffer The send receive buffer can accommodate 512 bytes 256 words When the RS 232C interlink connection mode is used data exceeding 512 bytes 256 words can also be received s MITSUBISHI 1 1 FX2N 232IF RS 232C INTERFACE BLOCK INTRODUCTION 1 conversion function The function to convert and send a hexadecimal numeric 0 to F saved in the send data buffer as well as the function to convert a received ASCII code into a hexadecimal numeric 0 to F and save it to the receive buffer are provided oa MITSUBISHI 1 2 FX2N 232lF RS 232C INTERFACE BLOCK SPECIFICATIONS 2 2 SPECIFICATIONS 2 1 Appearance and Name of Each Portion Weight Approx 0 3 kg Accessory Special block No label External 24 VDC 55 2 17 85 3 35 Terminal screws M3 0 12 ground terminal a 8 3 eo S 5 mounting sloe 1 38 2 04 5 0 18 Mounting hole Dimensions mm inches Front face of top cover Side inside of top cover POWER LED Lt when both the 5 VDC power supplied from the PC basic unit and
17. to 2321F enly shows status in BFMs Indication LED POWER SD TXD RD RXD e Full duplex start stop synchronization non protocol procedure Communication format is specified by buffer memories BFMs Transmission speed 300 600 1200 2400 4800 9600 19200 Number of VO points occupied 8 PC points total either input or output Applicable PC FX2N programmable controller Communication is performed by FROM TO instruction given by PC via buffer memories Each of Communication send receive buffer accommodates 256 words A MITSUBISHI 2 2 FX2N 232lF RS 232C INTERFACE BLOCK CONNECTION AND WIRING 3 3 CONNECTION AND WIRING 3 1 Connection with the PC Connecting the extension cable The 232lF can be directly connected to the basic unit of the PC or connected on the right side of another extension block unit number is assigned to each special unit block counting from the one nearest the basic unit in the way of No 0 No 1 No 7 Up to eight special units blocks in all can be connected in principle However the capacity of the 5 VDC power supplied from the PC is limited The current consumption of the 5 VDC power in the 232IF is 40 mA Make sure that the total current consumption of the 5 VDC power supply including other special blocks is equivalent to or less than that available 2921 FXn 232IF POWER POWER CO RD O
18. 04 2008 0308 M 2 Receive completion reset command 8000 79 K1 Transfer of command to MO gt BFM 1 b3 to a MITSUBISHI FX2N 232lF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 Operation chart BFM 1 50 MO Send receive enable BFM 1 b1 T 1 Send command BFM 13 Number of remaining Send Send completion status is also reset by next send command BFM 1001 to 1256 Send buffers 28 bO M10 Send completion 1000 Send byte count BFM 14 Number of receive buffers D Le BFM 2000 Receive byte count gle Contents of receive buffers are also cleared When not reset Receive x gt AE Receive buffers 95989896 BFM 28 b1 r 11 Receive completion limit b o dunt 1 52 M2 Receive completion i s MITSUBISHI FX2N 232IF 5 232 INTERFACE BLOCK 6 APPENDIX ASCII code table s MITSUBISHI gt lt NI lt APPENDIX 6 HX o 2 3 4 5 7 m o 6 1 FX2N 232IF RS 232C INTERFACE BLOCK APPENDIX 6 ASCII code table Sx 0 EX 9 ASCII ASCII Alphabet hexadecimal Alphabet eee Aa MITSUBISHI 6 2 FX2N 2321F RS 232C INTEHFACE BLOCK APPENDIX 6 Outline of FROM TO command m1 m2 n FNC78
19. 5 232 INTERFACE BLOCK Interlink serial cross cable used BFM 0 communication format b9 1 b8 1 RS 232C interlink connection mode SD TXD 8 RD RXD 2 RS RTS CS CTS 8 DR DSR 1 ER DTR 2 SG s MITSUBISHI Counter part equipment gt awe RD RXD M esc RS RTS CS CTS C DR DSR C ER DTR CONNECTION AND WIRING 3 In the interlink connection mode data exceeding 512 bytes upper limit of the receive buffer in the 232lF can be received 1 The 232lF only indicates the status 2 In this mode the request to send RS signal functions as the signal to enable receive in the 2321F When receiving data exceeding 512 bytes upper limit of the receive buffer in the 23212 the 232IF sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send operation When the data saved in the receive buffers is read by the sequence program the remaining data can be received 232 5 232 INTERFACE BLOCK CONNECTION AND WIRING 3 Connection with counterpart equipment of modem specifications Control line is essential Straight cable used BFM 0 communication format b9 0 b8 1 standard RS 232C mode FX 232lF Counter part equipment 1 The 2321 indicates the status exclusively SD TXD 3 C SD TXD 2 When the CD signal is not monitored the CD signal pin is not required to be connected RD RXD
20. ER DTR b2 gt M12 Receive time out b10 gt M20 Undefined b3 M13 Error occurrence b11 gt M21 Undefined 54 gt M14 Receive suspended b12 M22 DR DSR b5 gt M15 Undefined 613 gt M23 CD DCD 56 gt M16 Being sent 514 gt M24 CS CTS b7 gt M17 Being received b15 M25 BFM 1000 Send byte count 9 bytes 4 MITSUBISHI 5 10 FX2N 232lF 5 232 INTERFACE BLOCK TRANSMISSION PROGRAM 5 BFMs 1001 Send buffers Nine byte send data 123456789 is prepared in the ASCII code in accordance with the send byte count specified above Upper byte Lower byte BFM 1001 Ignored 1 30H 2b BFM 1002 Ignored 3 1003 3 329 o 4b BFM 1004 Ignored 5b 5 34H 5 34h BFM 1005 Ignored e BFM 1006 Ignored 6 35H 7 byte BFM 1007 7 36H 8 byte BFM 1008 9 byte Ignored _ BFM 1009 lgnored BFMs 2001 Receive buffers Eight byte receive data specified in accordance with the receive upper limit byte count BFM 2 is read to the data registers D301 to D308 in the PC A MITSUBISHI 5 11 FX2N 232lF 5 232 INTERFACE BLOCK TRANSMISSION PROGRAM 5 Example of sequence program m Initial pulse Block BFM No Transtar Number o Socio FNC 79 Send header 5 02H BFM84 79 4 Send terminator ETX 6 79 Receive header
21. bit 1 bit 2 bit 0 1 bit 0011 300 b4 0100 600 b5 0101 1200 b6 Baud rate bps 0110 2400 1000 9600 bps b7 0111 4800 1000 9600 1001 19200 b8 00 Not used pg Control line 01 Standard RS 232C 00 Not used 11 RS 232C interlink connection mode ns 00 Not added OU SCR only 00 Not added 11 CR and LF Not available b12 Availability of check ASCII HEX conversion available TN 11 Check sum available ASCII HEX conversion available Send receive buffer pra Sendreceive buer b15 Undefined disabled 0 Undefined s MITSUBISHI 4 3 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 The communication format is determined on the rising edge of the send receive enable command BFM 1 bO Accordingly the setting of the communication format should be preliminary transferred using the TO instruction before BFM 1 bO is turned on Also the send header and the send terminator are determined in the rising edge of the send command BFM 1 b1 The receive header and the receive terminator are determined on the rising edge of BFM 1 bO or on the rising edge of the receive completion reset command 1 52 Accordingly when only the header and the terminator exclusively are changed it is not necessary to turn BFM 1 bO off The change becomes valid from the next send receive operation Setting example of communicat
22. d BFM 1 b2 s MITSUBISHI 4 23 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 MEMO sa MITSUBISHI 4 24 FX2N 232lF 5 232 INTERFACE BLOCK TRANSMISSION PROGRAM 5 5 TRANSMISSION PROGRAM 5 1 Example of sending receiving the data of 16 bit buffer length This paragraph describes an example in which data of 16 bit buffer length is sent and received between the equipment of the terminal specifications this example the ASCII code saved in the data registers D201 to 0205 in the PC is sent to the counterpart equipment and the data received from the counterpart equipment is saved to the data registers D301 to D304 in the PC System configuration FX2NPC Cross cable s MITSUBISHI 5 1 FX2N 232lF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 Setting example of buffer memories The items not described here are set to the initial value respectively BFM 0 Communication format Data length 1 8 bits b1 04 1001 19200 bps Baud rate gt Control line 0 0 Not used do Addition of CR and LF Not added b12 Availability of check sum and ASCII HEX conversion 0 0 Not available Send receive buffer data Undefined b15 08 57 Du Specification item for 16 bit length s MITSUBISHI 5 2 FX2N 232IF 5 232 INTERFACE BLOCK BFM 1 Command MO gt b0 Send receive enable ER ON M1 b1 S
23. e receive character Receive data is not ASCII code Receive sum check error Receive sum is not equal calculated sum result BFM 16 Receive byte count exceeds 512 30 bytes Decrease receive upper byte count BFM 42 and increase spare receive buffer area S Baud rate soning over NoeWsgemdmeisspdHed s notplacedin corect poston U 8 9 Receive buffer overflow only in interlink connection mode Receive LF error LF is not placed in correct position Send receive initial terminator setting error Initial terminator is other than 01H to 1FH 10 Receive terminator error Receive terminator is not placed in correct position or not matched 11 Undefined 12 Transmission sequence error Transmission sequence is not matched A MITSUBISHI 4 21 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 30 Model code The model code of the 232lF is K7030 The model code is a fixed code assigned to each special extension equipment handled by the FROM TO instruction The PC can distinguish the equipment type by reading this code BFM 1000 Send byte count Setting range 010512 when buffer data length is 16 bits to 256 when buffer data length is 8 bits The BFM 1000 specifies how many bytes out of 512 bytes 256 words in the 16 bit send buffers BFMs 1001 to 1256 are to be sent BFMs 1001 to 1256 Send buffers Each of them is a 16 bit buffer to save the s
24. ed Being received b0 send completion When send of data up to the send byte count BFM 1000 is completed the send completion status bO is set The send completion status bO is automatically reset when the next send command BFM 1 b1 is set to ON b1 receive completion When receive of data up to the receive upper limit byte count BFM 2 is completed the receive completion status b1 is set If the receive terminator BFMs 11 and 10 or the receive time out time BFM 3 is set itis regarded that receive is completed when the set condition is satisfied then the receive completion status b1 is set in the same way This status is required to be reset using the sequence program If it is not reset the next data cannot be received This status can be reset using the receive completion reset command BFM 1 b2 a MITSUBISHI 4 19 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 b2 receive time out When the receive time out time BFM 3 is reached while data is received the receive time out status b2 is set At the same time the receive completion status b1 is also set This status is automatically reset when the receive completion reset command BFM 1 b2 is executed b3 error occurrence When an error occurs while data is sent or received b3 is set to ON and the error is saved to the error code BFM 29 b4 receive suspended
25. end command 2 gt b2 Receive completion reset command gt b3 Error reset BFM 2 Receive upper limit byte count 8 bytes BFMs 4 to 11 Header and terminator TRANSMISSION PROGRAM 5 BFMs 4 and 8 send receive header 02H STX BFMs 6 and 10 send receive terminator ETX BFM 28 Status gt M10 Send completion bi gt M11 Receive completion b2 gt M12 Receive time out b3 M13 Error occurrence b4 gt M14 Receive suspended b5 gt M15 Undefined b6 gt M16 Being sent b7 M17 Being received BFM 1000 Send byte count 9 bytes Aa MITSUBISHI b8 gt M18 RS RTS b9 gt M19 ER DTR b10 M20 Undefined b11 gt M21 Undefined 612 gt M22 DR DSR b13 gt M23 CD DCD b14 M24 CS CTS b15 gt M25 5 3 FX2N 232IF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 BFMs 1001 Send buffers Nine byte send data 123456789 is prepared in ASCH code in accordance with the send byte count specified above Upper byte Lower byte 2nd byte ist byte BFM 1001 2 32H 4th byte ard byte BFM 1002 4 34H 6th byte BFM 1003 6 36H 8th byte 7th byte 1004 8 38H 10th byte is not sent 9th byte 1005 9 39H 5 anh D ep BFMs 2001 Receive buffers Eight byte receive data specified in accordance with the receive upper limit byte count BFM 42 is read to the data registers D301 to D304 in the PC
26. end data and accommodates 512 bytes 256 words Send receive buffer structure 1001 16 buffer b15 Upper bits Lower bits bO 0 011 1 0 0 11010 110 0 0 0 0 1 3 2 4 1 32H 2 41H A 1 byte 1 byte 1 word A numeric in the send receive buffer is treated as hexadecimal HEX s MITSUBISHI 4 22 FX2N 232IF 5 232 INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 2000 Receive byte count Saved value Oto 512 99 when buffer data length is 16 bits 010256727 when buffer data length is 8 bits The byte count received from the counterpart equipment is saved This value is cleared by the receive completion reset command BFM 1 b2 1 Spare buffers in the interlink connection mode BFMs 2001 to 2256 Receive buffers Each of them is a 16 bit buffer to save the data received from the counterpart equipment and accommodates 512 bytes 256 words The buffer structure is equivalent to that of the send buffers The receive contents are cleared by the receive completion reset command BFM 1 52 BFMs 2257 to 2271 Spare receive buffers for interlink connection mode Each of them is a spare buffer for the interlink connection in the case where the data exceeding 512 bytes is received and is used to receive the data after the request to send RS signal is turned off until the send operation of the counterpart equipment is suspended The receive contents are cleared by the receive completion reset comman
27. ending on the RS 232C specifications connected Check the specifications of the RS 232C equipment used then connect the signals correctly Representative wiring examples are shown below Connection with counterpart equipment of terminal specifications when control line is not used BFM 0 communication format b9 0 b8 0 without control line 2321 Counter equipment SD TXD 3 O SD TXD Communication is performed in accordance with the condition determined by the software in the 2321F and RD RXD 2 C RD RXD the counterpart equipment SG 6 _ signal ground signal ground Connection with counterpart equipment of terminal specifications when control line is used Cross cable used BFM 0 communication format b9 0 b8 1 standard RS 232C mode FX 232lF Counter part equipment Because the carrier to send CS signal pin of the 232lF itself receives the request to send RS signal SD TXD 3 i jou li Q SD TXD signal transfer is performed as if the counterpart RD RXD 2 RD RXD equipment is functioning RS RTS 7 lt RS RTS 1 When the CD signal is not monitored the CD CS CTS 8 4 CS CTS signal pin is not required to be connected With CD DCD CD OCD DCD regard to the CD signal the 2321F only indicates ER DTR 4 39 0 ER DTR the status DR DSR 7 DR DSR 2 The 232lF only indicates the status SG O 80 s MITSUBISHI 3 4 FX2N 232IF
28. ential damage that may arise as a result of the installation or use of this equipment All examples and diagrams shown in this manual are intended only as an aid to understanding the text not to guarantee operation MITSUBISHI ELECTRIC will accept no responsibility for actual use of the product based on these illustrative examples Owing to the very great variety in possible application of this equipment you must satisfy yourself as to its suitability for your specific application MITSUBISHI USER S MANUAL RS 232C INTERFACE BLOCK 232 ae MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 TELEX J24532 CABLE MELCO TOKYO WORKS 840 CHIYODA CHO HIMEJI JAPAN JY992D66701A Effective OCT 1997 MEE 9710 am Specifications are subject to without notice
29. he integrity of the equipment Whenever any of the following symbols are encountered its associated note must be read and understood Each of the symbols used will now be listed with a brief description of its meaning Hardware warnings A 1 Indicates that the identified danger WILL cause physical and property damage 2 indicates that the identified danger POSSIBLY cause physical and property damage 3 Indicates a point of further interest or further expianation Software warnings 1 Indicates special care must be taken when using this element of software 2 Indicates a special point of which the user of the associate software element should be aware 3 Indicates a point of interest or turther explanation aa MITSUBISHI FX2N 232lF RS 232C INTERFACE BLOCK CONTENTS LIN ERO DUCTION cies atri aeq as t ode aed OS eek Ga wate apis Moa bas 1 1 E OUIS Sr PEOUUCE ru ccc ee euer See RH VER odd 1 1 2 9PESGIFICATIONS 1 etae Doe AO ed eb UP Bowe dee a eed E d dae e doe xar 2 1 2 1 Appearance and of Each 2 1 2 2 General Specifications and Performance 2 2 3 CONNEC TION AND WIRING uice CN CR T e ca a Oo s 3 1 S T CONNECCION WII INO PO eru RAPERE RI e Ra Ce Co omo ad 3 1 3 2 u o dto gn RE SEA 3 2
30. hese bits as follows e Not added 611 20 b10 2 O e CR only is added b11 0 610 1 e ChRandLF are added b11 1 b10 1 For the CR LF addition format refer to the communication format list shown above A MITSUBISHI FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 b13 and b12 Availability of check sum and ASCII HEX conversion Set these bits as follows e Neither the check sum nor the ASCII HEX conversion is available b13 0 b12 0 e ASCII HEX conversion only is available b13 0 b12 1 e Thecheck sum only is available 013 1 b12 0 e Both the check sum and the ASCII HEX conversion are available b13 1 b12 1 For the check sum addition format refer to the communication format list shown above 4 MITSUBISHI FX2N 232lF RS 232C BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 When execution of the ASCII HEX conversion is specified the hexadecimal numeric data 0 to F inside the send buffers BFMs 1001 to 1256 is converted into the ASCII code then sent The received ASCII code is converted into hexadecimal numeric data 0 to F then saved to the receive buffers BFMs 2001 to 2256 At this time the send receive byte count indicates the number of hexadecimal data Send format when hexadecimal data is converted into ASCII code Example When the send data 1 the header STX and the terminator ETX are sent Send da
31. ion format hexadecimal constant specification Data length 8 bits b15 b12 b11 b8 b7 b4 b3 Parity Odd BFM 0 Stop bit 1 bit 0 6 3 Baud rate 2 400 bps 4063H Control line Not used CR LF Not added 6 79 Check sum and ASCII HEX conversion Not available IRI 4063 i nitla Buffer data length 8 bits pulse Block No BFM Set Number of value transfer points aa MITSUBISHI 4 4 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 Communication format list TOS Select the communication format used to send receive data in Di the 2321 among 9 types shown on the left RSS Termi e header can be specified in the portion in the Qi Jj communication format er oo e inthe communication format type hexadecimal data binary Temi CR and ASCII code be send and received MES In the communication format types to the send receive Non Termi CR LF data should be ASCII code except the header the OR LF terminator CR and LF Communication can be performed using the ASCII HEX 6 lem Sum conversion function by specifying the BFM 0 b13 and the BFM de nator 0 512 6 Heal Temi sum cn ASCII codes available for the initial terminator are 01H to de nator 1FH Hea Termi e Inthe RS 232C interlink connection mode the communication
32. is responsible for the planning design and construction of automatic equipment using the product associated with this manual should be of a competent nature trained and qualified to the local and national standards required to fulfil that role These engineers should be fully aware of safety with regards to automated equipment Any commissioning or service engineer must be of a competent nature trained and qualified to the local and national standards required to fulfill that job These engineers should also be trained in the use and maintenance of the completed product This includes being completely familiar with all associated documentation for the said product All maintenance should be carried out in accordance with established safety practices All operators of the compliance product should be trained to use that product in a safe and coordinated manner in compliance to established safety practices The operators should also be familiar with all documentation which is connected with the actual operation of the completed equipment The term completed equipment refers to a third party constructed device which contains or uses the product associated with this manual aa MITSUBISHI FX2N 232IF 5 232 INTERFACE BLOCK Note s on the symbology used in this manual At various times through out this manual certain symbols will be used to highlight points of information which are intended to ensure the users personal safety and protect t
33. m the counterpart equipment is saved to the data registers D301 to D308 in the PC System configuration FX2NPC FX2N 232lF Cross cab e L Personal computer s MITSUBISHI FX2N 232lF 5 232 INTERFACE BLOCK TRANSMISSION PROGRAM 5 Setting example of buffer memories The items not described here are set to the initial value respectively BFM 0 Communication format bO Data length 1 8 bits b1 b2 1 1 Stop bit 1 2 bits b4 05 Baud rate 1001 19200 bps b7 b8 bo Control line 0 0 Not used 010 Addition of CR and LF 0 0 Not added b12 Availability of check sum and b13 ASCII HEX conversion 0 0 Not available Send receive buffer data UC b14 1 8 bits Specification item for length B 8 bit length 615 jUndefined b15 b8 b7 bO 9 1 0 0 00 0 011 0 071 11111 1 4 9 O F 409FH a MITSUBISHI 5 9 FX2N 232IF RS 232C INTERFACE BLOCK TRANSMISSION PROGRAM 5 BFM 1 Command gt Send receive enable ER ON M1 61 Send command M2 b2 Receive completion reset command gt b3 Error reset BFM 42 Receive upper limit byte count 8 bytes BFMs 4 to 11 Header and terminator BFMs 4 and 8 send receive header 02H STX BFMs 6 and 10 send receive terminator ETX BFM 28 Status gt M10 Send completion 58 gt M18 RS RTS bi M11 Receive completion b9 gt M19
34. ms The initial value is O ms ASSIGNMENT OF BUFFER MEMORIES BFMs 4 In the RS 232C interlink connection mode BFM 0 b9 1 b8 1 when receiving data exceeding the receive upper limit byte count BFM 2 the 232IF sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send operation BFM 12 specifies the time after the request to send RS signal is turned off until the receive suspended status BFM 28 b4 is turned The value set to the BFM 12 should be equivalent to or more than the time after the 232lF sets the request to send RS signal to OFF until the send operation of the counterpart equipment is completely suspended If the time times out and the receive suspended status BFM 28 b4 is set to ON before the send operation of the counterpart equipment is not suspended the remaining data cannot be received Spare receive buffers BFM 2257 to 2271 Receive byte __ A Receive upper Set to the time in which count limit byte count the send operation of BFM 2000 BFM 2 the counterpart equipment is Data receive 8 completely suspended Requesttosend RS suspended Receive suspended 28 b4 Suspension waiting time BFM 12 0 to 32 767 x10ms Aa MITSUBISHI 4 15 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 13 Number of remaining send data Saved val
35. n the check sum added to the receive data is different from the receive sum result receive sum check error occurs The sum check target range and the calculation method are equivalent to those for the send sum result described above BFM 20 Time from CS ON to send start Set value to 32 767 x 10 ms The initial value is O ms The time after the clear to send CS signal is turned on until the 2321 starts the send operation can be set When control line not used is specified the time after the send command is given until the send operation is started is specified Set BFM 20 when is required by a modem etc BFM 21 Time from completion of actual send to RS OFF completion flag ON Set value O to 32 767 x 10 ms The initial value is 0 ms The time after the 2321F sends the data until the RS signal is turned off and the send completion flag BFM 28 bO is turned on can be specified Set BFM 21 when it is required by a modem etc Aa MITSUBISHI 4 18 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 28 Status Bit Description Description Sena compen AS ATS ER DTR bi Receive completion _ 611 Undefined Receive suspended DR DSR b13 DCD EL Being sent 514 DS CTS b15 CI RI The 2321F status and the send receive result are saved as status information This information can be read from the PC using the FROM instruction then utiliz
36. ta buffer BFM 1001 b15 bO Converted into ASCII code before send The send byte count is 4 Receive format when ASCII code is converted into hexadecimal data Example When the receive data 1 the header STX and the terminator ETX are received S E b15 bO T T ire 0 11010100 101 110 11 1 42 31 Receive data buffer 1 0 BFM 2001 1 byte 1 byte The receive byte count is 2 s MITSUBISHI 4 8 FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 b14 send receive buffer data length The data is treated as follows in accordance with the buffer data length e Inthe case of 16 bits 614 0 Send receive buffer LLL 16 bit data is divided into Upper 8 bits Lower8 bits UPPer 8 bits and lower 8 bits then sent and received Example of send buffers 1002 81002 e Inthe case of 8 bits b14 1 Send receive buffer i ower 8 bits only sent and received as valid data Example of send buffers BFM BFM BFM E 1003 1004 lower lower X 1002 oa MITSUBISHI 4 9 lower FX2N 232lF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 41 Command bO Send receive enable ER ON Receive completion reset command Error reset BFM 1 gives the command for send receive and the status information reset command to the 2321F
37. the 24 VDC power supplied from the external terminal are supplied SD TXD LED Lt while data is sent to the RS 232C equipment connected to the 2321F RD RXD LED Lt while data is received from the RS 232C equipment connected to the 2321F ata MITSUBISHI 2 1 FX2N 232IF RS 232C INTERFACE BLOCK SPECIFICATIONS 2 2 2 General Specifications and Performance Specifications General specifications Insulating withstand voltage 500 VAC 1 minute between the entire external terminal and the ground terminal Other specifications are equivalent to those of the PC basic unit Performance specifications CD DCD Carrier detection RD Receive data Bini each other that SD TXD Send data DSR 2321F sets request to send RS signal to ON Counterpart DTR Data terminal read Rune thera estem sus semen hie carter a y While to send CS signal remains ON Sent Arrangement of D sub 9 pin connector Operation of each signal SG signal ground wv receiving carrier to send CS signal 2321 sends data DR DSR Data set ready RS RTS Request to send CS CTS Carrier to send en send is finished 2321 sets request to send RS signal to 2321 detects receive carrier 2321 receives receive data RO signal O Q G From 232lF to counterpart equipment RI Calling indicator Eem counterpart equipment
38. ue 010512 when buffer data length is 16 bits 010 256 when buffer data length is 8 bits The send byte count BFM 1000 reduced by the number of data actually sent is during transmission BFM 14 Number of receive buffers Saved value 010256115 fer spare receive buffers The number of buffers which have actually received data is saved in tum with regard to the receive buffers BFM 2001 to 2256 and the spare receive buffers BFM 2257 to 2271 for interlink connection mode s MITSUBISHI 4 16 FX2N 232IF RS 232C INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 15 Send sum result Initial value 0 check sum value added to the send data is saved The sum check target range and the calculation method are shown below Sum check target range and calculation method Example Header Terminator Check sum S E T T X A 1 5T X 2 41 31 5 5 Target range 30H 41H 31H 32H 35H 46H 03H 152H The total value including the terminator and excluding the header 1st byte of the header only is calculated Then the lower 1 byte is converted into the code and sent or received The data converted into the ASCII code is placed in the order of upper digit and lower digit s MITSUBISHI FX2N 232lF 5 232 INTERFACE BLOCK ASSIGNMENT OF BUFFER MEMORIES BFMs 4 BFM 16 Receive sum result Initial value 0 The sum check value of the receive data is saved Whe
Download Pdf Manuals
Related Search
Related Contents
VX-HG166 User Manual FICHE PRODUIT MORTIER - MAP SERVICE MANUAL - Utensils Direct PDF-File 649A Pressure Controller with Mass Flow Meter User Manual Manuale utente Dragon 12 TS-109 Turbo Station User Manual (Version: 1.1.0) ANALOG TURNTABLE IRM-102 取説 Copyright © All rights reserved.
Failed to retrieve file