Download Print this page

Mitsubishi Electric MELSEC FX2N-232-BD User Manual page 2

Communication board
Hide thumbs Also See for MELSEC FX2N-232-BD:

Advertisement

6
CAUTION FOR USE
1)
When programming tool is connected the 232BD, do not use any other communication format or parameters. If
communication format 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.
7
PROGRAM EXAMPLES
1)
Connecting 232BD and a printer, and printing out the data sent from the PC.
Send
232BD
FX
2N
• Receive data
• Send data
• The communication format of the serial printer is as follows.
Data length
8 bit
Parity
Even
Stop bit
1 bit
Baud rate
2400 bps
Sequence program
M8000
0
M8161
Handled by 8-bit data 1
M8002
3
[MOV H0067 D8120]
Setting of communication format 2
X000
9
[RS D200 K11 D500 K0]
RS instruction drive 3
X001
19
[PLS M0]
M 0
22
[MOV H0074 D200]
[MOV H0065 D201]
Writing of send data 4
Herein, "test line" is sent.
[MOV H006E D207]
[MOV H0065 D208]
[MOV H000D D209]
[MOV H000A D210]
80
[SET M8122]
Send request 5
[END]
Operation
• In this example, CR (H000D) and LF
Turn on the power of the PC
1
and printer, check the printer
Power on
is on line and switch the PC to
2
RUN.
X000, ON
Turn on X000, and drive RS
RS instruction drive
3
instruction.
X001, ON
Every time X001 is turned on,
the contents of D200 to D210
4
Data send
are sent to the printer, and
5
Note: It may be necessary to set the DIP
"test line" is printed.
2)
Connect 232BD and a personal computer, and exchange data with PC.
• Receive data
• Send data
• Use the communication cable suited to the connector
pin configuration of the personal computer.
(For representative wiring see section 4.)
Sequence program
M8000
0
M8002
3
X000
9
X001
19
M 0
22
M8123
81
X002
89
M 1
92
96
Operation
Power on
X000, ON
RS instruction drive
X001, ON
Data send
Personal
computer
operation
Data send
8
8.1 Common items
(H000A) are written at the end of the
1)
Make sure that the programmable controller is connected and that the POWER LED is lighted on the programmable
message. The printer moves down one
controller.
line for each message.
2)
Make sure that the VRRD or VRSC instruction is not used in the program. If such an instruction is used, delete it,
CR : Carriage Return
turn off the power of the programmable controller, then turn it on again.
LF : Line Feed
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 communication format 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
switches of your printer.
the parameters correctly using the peripheral unit.
Check your printer manual for how
to configure the serial
2)
If the RS instruction is used in the program, delete it, turn off the power of the programmable controller, then turn it
communications.
on again.
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.
Receive
Data length
232BD
FX
2N
Parity
Stop bit
• Send data
• Receive data
Baud rate
If the communication format of the soft ware cannot be
adjusted to this setting, adjust the PC and the software
to be the same.
M8161
Handled by 8-bit data 1
[MOV H0067 D8120]
Setting of communication format 2
[RS D200 K11 D500 K0]
RS instruction drive 3
[PLS M0]
[MOV H0074 D200]
Writing of send data 4
Herein, "test line" is sent.
[MOV H000D D209]
[MOV H000A D210]
[SET M8122]
Send request 5
[MOV D500 K4Y000]
Output of receive data 6
[PLS M1]
Receive completion reset 7
[RST M8123]
[END]
Turn on the power of the PC and printer, check the printer
1
is on line and switch the PC to RUN.
2
Turn on X000, and drive RS instruction.
3
Every time X001 is turned on, the contents of D200 to
4
D210 are sent to the personal computer, and "test data" is
5
displayed.
After receiving and storing data from personal computer in
6
D500, it is output to Y000 to Y017. When input X002 is
7
turned on, the receive completion flag is reset.
DIAGNOSTICS
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 programmable controller, 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.)
8 bit
4)
Make sure that the external unit is operating correctly.
Even
5)
Make sure that the data format transferred is equivalent. If it is not equivalent, correct it.
1 bit
6)
When the RS instruction is used twice or more in the program, make sure that only one RS instruction is turned on
2400
in one calculation cycle. Never set the RS instruction to OFF state while the data is being received or sent.
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 communication procedure. 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, refer to 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.
Guidelines for the safety of the user and protection of the FX
• 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.
Manual number
Manual revision
Date
HEAD OFFICE:MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 TELEX:J24532 CABLE MELCO TOKYO
HIMEJI WORKS:840, CHIYODA CHO, HIMEJI, JAPAN
JY992D66001A
-232-BD
2N
-232-BD always consult a professional
2N
-232-BD please consult the nearest Mitsubishi Electric
2N
: JY992D66001
: A
: JUNE 1997
Effective JUN. 1997
Specifications are subject to
change without notice

Advertisement

loading