Mitsubishi Electric MELSEC FX2N-232-BD User Manual

FX2N-232-BD COMMUNICATION BOARD

USER’S GUIDE
JY992D66001A
This manual contains text, diagramsandexplanations which will guide the reader in the correct installationand operation of the FX Further informationcanbefoundinthe FX SERIESPROGRAMMINGMANUAL,FX and FX-485PC-IF USER’S MANUAL.
2N-232-BD and shouldbe readand understoodbefore attempting to install or use the unit.
2N SERIES HARDWARE MANUAL
3

SPECIFICATION

3.1 General specification

General specificationsissameas those for the FX
2N series programmable controller.

3.2 Power supply specification

5 V DC, 60 mA is required from the programmable controller.

3.3 Specification

Transmission standard Conforming to RS232C Transmission distance Max. 15m Connector 9-pin D-SUB type
Pin layout of connector LED indicators RXD, TXD
Communication method Half-duplex communication system Protocol Programming protocol, dedicated protocol (format 1 or 4), non protocol Isolation Noisolation
1:CD(DCD) 2:RD(RXD)3:SD(TXD)4:ER(DTR) 5:SG(GND) 6:DR(DSR) 7,8,9:NC(No connection)
The control line is set by b12. b12 = 0 : No hardware hand shaking. Send and receive are controlled by software protocol. b12 = 1 : Hardware hand shaking. Signal lines ER(DTR)and DR(DSR)are used to control send and receive of data.
b12 1 b11 0
b12 1 b11 1
When sending
Pin No.
3 SD (TXD)
4 ER (DTR)
6 DR (DSR)
Pin No.
3 SD (TXD)
2 RD (RXD)
4 ER (DTR)
6 DR (DSR)
Send
Send
Data Data
Data
When receiving
Pin No.
2 RD (RXD)
4 ER (DTR)
6 DR (DSR)
Receive
Receive
Data Data
Data
1
The communication board FX2N-232-BDfor RS232C (hereinafter referredto as “232BD”)can be connectedtothe main unit of the FX

INTRODUCTION

(1) To perform data transfer between RS232C devicessuchas personalcomputers, bar code readers and printers. (2) To perform data transfer using the dedicatedprotocolbetween RS232C devices. For details of the dedicated
protocol, refer to the users manual of the FX-485PC-IF. (3) To connect a programming tool. And when the 232BD is used for the application (1) or (2) above, the communicationformat including the baud rate, the
parity and the data lengthis specifiedby the parametersorthecontentsofthespecialdataregister D8120 of the FX programmable controller.
Only one 232BD can be connected to one base unit. Accordingly,the232BDcannotbe used togetherwiththe
2N-485-BD or the FX2N-422-BD. Whentwo ormoreRS232Cunitsarerequired to be connected for the application,
FX use the special block for RS232C communication.
2N

1.1 EXTERNAL DIMENSIONS

Dimensions : mm (inches) Accessory :M3 self-tappingscrews×2,mountingbracket × 2
Mounting holes <2-φ 4.0 (0.16")>Connector for programmable controllerRXD LED : Flashes at high speed during sending.TXD LED : Flashes at high speed during sending.Connector (9-pin D-SUB type) for peripheralunit
The top face of this connector is higher than the top face of the panel cover of the programmable controllerby approximately 3 mm (0.12") or by approximately 50 mm when the cable is connected.
39
Mounting holes of connector <2 - M2.7 (0.11") × 0.635 (0.025")>
54(2.13")
46(1.81")
1
2
3
4 5
24.99(0.98")±0.3(0.012")
6
35
1

3.4 Related flag and data registers

Diagnostic
devices
M8121 Data transmission delayed (RS instruction) M8122 Data transmission flag (RS instruction) M8123 Finished receiving data (RS instruction) M8124 Carrier detectionflag (RS instruction) M8126 Global flag (dedicated protocol) M8127 On demand handshake flag (dedicated protocol) M8128 On demand error flag (dedicated protocol) M8129 On demand Byte/Word flag (dedicated protocol)
Selection of 8 bit operations for applied instructions
M8161
ASC, RS, ASCI, HEX, CCD (RS instruction)
Operation
Diagnostic
devices
D8120 Communications format (RS instruction, dedicated protocol) D8121 Local station number (dedicated protocol) D8122 Amount of data to be transmitted (RS instruction) D8123 Amount of remaining data already received (RS instruction) D8124 Data header <default STX (02H)> (RS instruction) D8125 Data terminator <default ETX (03H)> (RS instruction) D8127 On demand head device register (dedicated protocol) D8128 On demand data length register (dedicated protocol) D8129 Data network ‘time-out’ timer value (dedicated protocol)
Operation

3.5 Communication format D8120

To send and receive the data between the RS232C unit using the 232BD, the communication format including the transmission speed (baud rate) and the parity must be consistent between the 232BD and the RS232C unit. The communication format can be set using parameters or the contents of special data register D8120 of the FX programmablecontroller. Make sure to set appropriately the communication format in accordance with the RS232C unit used. For the setting method using the parameters of the FX peripheralunit used. Make sure to turn off the power of the programmable controllerand turn it on again after modifying the setting.
Bit
Meaning
No. b0 Data length 7 bit 8 bit
b1
Parity
b2 b3 Stop bit 1 bit 2 bit b4
b5
Baud rate (bps)
b6 b7
b2,b1 b2,b1 (0, 0) : None (1, 1) : Even (0, 1) : Odd
b7,b6,b5,b4 b7,b6,b5,b4 (0, 0, 1, 1): 300 (0, 1, 1, 1) : 4,800 (0, 1, 0, 0): 600 (1, 0, 0, 0) : 9,600 (0, 1, 0, 1): 1,200 (1, 0, 0, 1): 19,200 (0, 1, 1, 0): 2,400
Contents
0 (OFF) 1 (ON)
2N programmable controller, refer to the manual of the
Bit No.
b8
b9 b10 Reserved b11 b12 Control line *4 None H / W
b13 Sum check *5
b14 Protocol No protocol Dedicated protocol b15
Meaning
Header character *1
Terminator character *1
DTR check (Control line) *4
Transmission control protocol*5
None D8124 *2
None D8125 *3
Send and receive Receive
Sum check code is not added
Protocol format 1 Protocol format 4
Contents
0 (OFF) 1 (ON)
2N
Sum check code is added automatically
*1 Setto “0" when using the dedicated protocol. *2 Effectiveonly when no protocol (RS instruction) is selected, and has an initial value of STX (02H: Can be modified by
the user).
4
To connect the 232BD to RS232C device use an RS232C cable. Make sure that the shield of cables is connected to ground (100 or less).
The connector of the 232BD is 9-pin D-SUB (see Section 1.2 and Chapter 2). The connections of RS232C devices varies with each device being used. Check the specification of the device, and connect.

WIRING

4.1 Connection examples

4.1.1 Terminal specificationdevice

RS232C device
9-pin
Meaning
RD (RXD) SD (TXD) SD (TXD) ER (DTR) SG (GND) DR (DSR) When using ER and DR signals, please also check if RS and CS signals are needed according to the
*
RS232C device's specifications.
25-pin
D-SUB
D-SUB
2 2
3
3
2
4
20
5
7 6
6 85
Uses RS, CSUses ER, DR *
Meaning
RD (RXD)
RS (RTS)
SG (GND)
CS (CTS)
25-pin D-SUB
3
9-pin
D-SUB
32 74 57
232BD
9-pin D-SUB
2 RD (RXD) 3 SD (TXD) 4 ER (DTR) 5 SG (GND) 6 DR (DSR)

4.1.2 Modem specification device

RS232C device
9-pin
Meaning
CD (DCD) CD (DCD) RD (RXD) SD (TXD) SD (TXD) ER (DTR) SG (GND) DR (DSR) When using ER and DR signals, please also check if RS and CS signals are needed according to the
*
RS232C device's specifications.
25-pin
D-SUB
D-SUB
18 18 2 2
3
3
2
4
20
5
7 6
6 85
Uses RS, CSUses ER, DR *
Meaning
RD (RXD)
RS (RTS)
SG (GND)
CS (CTS)
25-pin D-SUB
3
9-pin
D-SUB
32 74 57
232BD
9-pin D-SUB
1 CD (DCD) 2 RD (RXD) 3 SD (TXD) 4 ER (DTR) 5 SG (GND) 6 DR (DSR)

4.1.3 When programming or monitoring

2-232CAB-1 and 25-pin D-SUB to 9-pin D-SUB adapter or make a suitable cable.
Use F
5

MOUNTING PROCEDURE

Turn off the power of the programmable controller, and mount the 232BD using the following procedure.
2

TERMINAL LAYOUTS

The connector is a 9-pin D-SUB type, and the pin configurationis as shown below.
Pin No. Signal Meaning Function

1 CD(DCD) Carrier detection ON when carrier is detected for data reception

1
6
2
7
3
8
4
9
5
2 RD(RXD) Receive data Receive data (RS232C device to 232BD) 3 SD(TXD) Send data Send data (232BD to RS232C device)
4 ER(DTR) Sendrequest 5 SG(GND) Signal ground Signal ground
6 DR(DSR) Send enable Shows RS232C device is ready to receive
7,8,9 NC No connection
Signal requesting preparation for data sending to RS232C device
*3 Effectiveonly when no protocol (RS instruction) is selected, and has an initial value of ETX (03H: Can be modified by
the user). *4 Setto (b11, b12) = (1, 0) when using the dedicated protocol. *5 Setto “0" when using no protocol.
3.5.1 Example program of setting
The communication format is set by special data register D8120. Setting the communication format using D8120 is effective only at the time the RS instruction is driven, and therefore if changed after driving, it is not actually accepted.
An example of setting D8120 is shown below.
M8002
MOV H138F D8120
H138F = 0001 0011 1000 1111(binary) The settings for the above program are as right.
Data length 8 bit
Parity Even
Stop bit 2 bit
Baud rate 9,600
Protocol No protocol
Header Used
Terminator Used
Control line H/W
DTR check Send and receive
Remove the panel cover from the top face of the main unit.Connect the 232BD to the board mounting connector provided on the base unit.Fix the 232BD to the main unit using the M3 self-tapping screws provided,
fitting the mounting bracket and the round crimp-style terminal with the ground cable as shown in the figure on the right. Make sure that the crimp-style terminal is attached in the direction shown in the figure on the right, and that the ground cable extends from the unit shown in the figure below. Tightening torque: 0.3 to 0.6 Nm (3 to 6 kgfcm)
For M3(0.14")
") or less
16mm(0.63") or less
5.5mm(0.22
Cut out the hole provided on the left portionof the panel cover using a tool
such as nippers and cutter so that the terminal block can be seen. The top face of this connector is higher than the top face of the panel cover of the programmable controller by approximately 7 mm (0.27").
Grounding Cable
232BD
4
1
3
X1 X3
Y2
Y1
Y0
2
6
1) When programming tool is connected the 232BD, do not use any other communication format or parameters. If communicationformat or parameters is set, programming is not possible.
2) Only one programming tool (such as FX-10P, FX-20P, etc.) should be connected to either the programming port or the port provided on the 232BD. If a programming tool is connected to both connectors, the following may occur.
a) The program inside the programmable controller may not be consistent with the program inside the
programming tool. If the program is modified or the set value for the timer or the counter is modified, a part of the program may be damaged and the programmable controller may malfunction.
b) When the sampling trace function of the programmable controller is used from both ports, the correct sampling
trace result cannot be obtained.

CAUTION FOR USE

2) Connect 232BD and a personal computer, and exchange data with PC. Preparation of software
Use ordinary communication software (terminal
emulator) or dedicated program in the personal computer.
Send
The communication format of the PC for this example is as follows.
2N
Receive data
Send data
Receive
232BD FX
Send data
Receive data
Data length 8 bit
Parity Even
Stop bit 1 bit
Baud rate 2400

8.3 When communication is performed between the computer using the no protocol

1) Make sure that the communication format is consistent between the external unit (RS232C unit) and the programmable controller (D8120). If it is not consistent, correct the setting of the communication parameters or correct the contents of the D8120. When the D8120 is modified, turn on the RS instruction again. When the communication parameters are modified, turn off the power of the programmablecontroller, then turn it on again.
2) Check the timing for sending and receiving the data. For example, confirm that the counterpart unit is ready for receiving before sending the data.
3) If a terminator is not used, make sure that the send data quantity is consistent with the receivable data quantity. If both quantities are not consistent with each other, make them be consistent. (If the send data quantity varies, use a terminator.)
4) Make sure that the external unit is operating correctly.
5) Make sure that the data format transferred is equivalent. Ifit is not equivalent, correct it.
6) When the RS instruction is used twice or more in the program, make sure that only one RS instruction is turned on in one calculation cycle. Never set the RS instruction to OFF state while the data is being received or sent.
7

PROGRAM EXAMPLES

1) Connecting 232BD and a printer, andprinting out the data sent from the PC.
Send
Receive data
232BD FX
Send data
2N
The communication format of the serial printer isas follows.
Data length 8 bit
Parity Even
Stop bit 1 bit
Baud rate 2400 bps
Sequence program
Use the communication cable suited to the connector pin configurationof the personal computer. (For representativewiring see section 4.)
Sequence program
M8000
0
M8002
3
X000
9
X001
19
M0
22
M8123
81
X002
89
M1
92 96
[MOV H0067 D8120]
[RS D200 K11 D500 K0]
[MOV H0074 D200]
[MOV H000D D209] [MOV H000A D210]
[MOV D500 K4Y000]
M8161
[PLS M0]
[SET M8122]
[PLS M1]
[RST M8123]
[END]
Handled by 8-bit data 1 Setting of communication format 2 RS instruction drive 3
Writing of send data 4 Herein, "test line" is sent.
Send request 5 Output of receive data 6 Receive completion reset 7
Operation
If the communication format of the soft ware cannot be adjusted to this setting, adjust the PC and the software to be the same.

8.4 When the dedicated protocol is used for communication between the computer

1) Make sure that the communication format is consistent between the computer (RS232C unit) and the programmable controller (D8120). If it is not consistent, correct the setting of either the computer or the programmable controller. When the programmable controller is modified, turn off the power of the programmable controller, then turn it on again.
2) Make sure that the station No. of the programmable controller which is the target of data transfer is equivalent to the station No. set in the communicationprocedure. If they are not equivalent, correct the wrong one.
3) Make sure that the communication procedure is correct. If it is not correct, modify the setting of the RS232 unit to realize correct procedure.
4) Check whether errors have occurred in the RS232 unit and the programmable controller. For the check method and the countermeasures, referto the users manual of the FX-485PC-IF.
5) If the RS instruction is used in the program, delete it, turn off the power of the programmable controller, then turn it on again.
M8000
0
M8002
3
X000
9
X001
19
M0
22
80
Operation
Power on
X000, ON
RS instruction drive
X001, ON
Data send
M8161
[MOV H0067 D8120]
[RS D200 K11 D500 K0]
[PLS M0] [MOV H0074 D200] [MOV H0065 D201]
[MOV H006E D207]
[MOV H0065 D208] [MOV H000D D209] [MOV H000A D210]
[SET M8122]
[END]
Turn on the power of the PC and printer, check the printer is on line and switch the PC to RUN.
Turn on X000, and drive RS instruction.
Every time X001 is turned on, the contents of D200 to D210 are sent to the printer, and "test line" is printed.
Handled by 8-bit data 1 Setting of communication format 2 RS instruction drive 3
Writing of send data 4 Herein, "test line" is sent.
Send request 5
Inthis example, CR (H000D) and LF
1 2
(H000A) are written at the end of the message. The printer movesdown one line for each message.
CR : Carriage Return LF : Line Feed
3
4 5
Note: Itmay be necessary to set the DIP
switches of your printer. Check your printer manual for how to configure the serial communications.
Power on
X000, ON
RS instruction drive
X001, ON
Data send
Personal computer operation
Data send
8
Turn on the power of the PC and printer, check the printer is on line and switch the PC to RUN.
Turn on X000, and drive RS instruction.
Every time X001 is turned on, the contents of D200 to D210 are sent to the personal computer, and "test data" is displayed.
After receiving and storing data from personal computer in D500, it is output to Y000 to Y017. When input X002 is turned on, the receive completion flag is reset.

DIAGNOSTICS

1 2
3
4 5
6 7

8.1 Common items

1) Make sure that the programmablecontroller is connected and that the POWER LED is lighted on the programmable controller.
2) Make sure that the VRRD or VRSC instruction is not used in the program. If such an instruction is used, delete it, turn off the power of the programmable controller, then turn it on again.
3) When the special auxiliary relay M8070 or M8071 is turned on, turn off the relay using the peripheral unit, turn off the power of the programmable controller, then turn on the power again.
4) Make sure that wiring is performed correctly. Refer to Section 4.
5) Make sure using the peripheral unit that the communication parameters are set correctly in accordance with the application.If the setting is not correct, set the parameters correctly using the peripheral unit.

8.2 When the parallel link function is used

1) Make sure that the communicationformat is in the initial state (D8120 = K0). Check using the peripheral unit how the communication parameters are set. If the no protocol (RS instruction) or the dedicated protocol is selected, set the parameters correctly using the peripheral unit.
2) If the RS instruction is used in the program, delete it, turn off the power of the programmable controller, then turn it on again.

Guidelines for the safety of the user and protection of the FX2N-232-BD

This manual has been written to be used by trained and competent personnel. This is defined by the European directives for machinery, low voltage and EMC.
If in doubt at any stage during the installation of the FX electrical engineer who is qualified and trained to the local and national standards. If in doubt about the operation or use of the FX distributor.
Under no circumstances will Mitsubishi Electric be liable or responsible for any consequential 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.
2N-232-BD please consult the nearest Mitsubishi Electric
Manual number : JY992D66001 Manual revision : A Date : JUNE 1997
HEAD OFFICE:MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 TELEX:J24532 CABLE MELCO TOKYO HIMEJI WORKS:840, CHIYODA CHO, HIMEJI, JAPAN
JY992D66001A
2N-232-BD always consult a professional
Effective JUN. 1997 Specifications are subject to change without notice
Loading...