Mitsubishi Programmable Controllers FX-232ADP Скачать руководство пользователя страница 6

PROGRAM EXAMPLES

• Receive data

FX, FX

2C

 series PC

Send

• Send data

Connecting 232ADP and a printer,and printing out the data sent from the PC.

Common pin out for printer communication

Sequencer program

Operation

X000,ON

X000,ON

Power on

RS instruction

drive

Data send

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.

In this example, CR (H000D) and LF

(H000A) are written at the end of the

message.The printer moves down

one line for each message.

      CR:   Carriage Return

       LF:   Line Feed

Note:It may be necessary to set the

DIP switches of your printer.

Check your printer manual for how to

configure the serial communications.

The communication format of the serial printer is as follows.

POWER

RUN

BATT¥V

L

SG

24+

RUN

COM

COM

N

PROG E
CPU E

SD

RD

POWER

M8000

M8002

X000

X001

M 0

[ MOV  H0067  D8120 ]

Setting of communication format 

RS instruction drive 

[ RS  D200  K11  D500  K0 ]

[ PLS  M0 ]

Handled by 8-bit data 

[ MOV  H0074  D200 ]

Writing of send data 

Herein, "test line" is sent.

[ MOV  H0065  D201 ]

[ MOV  H006E  D207 ]

[ MOV  H0065  D208 ]

[ MOV  H000D  D209 ]

[ MOV  H000A  D210 ]

[ SET  M8122 ]

[ END ]

0

3

9

19

22

Send request 

80

M8161

Содержание FX-232ADP

Страница 1: ...der in the correct installation and operation of the FX 232ADP and should be read and understood before attempting to install or use the unit Further information can be found in the FX SERIES PROGRAMM...

Страница 2: ...ted to the product RS232C connector Used for connection between the product and RS 232C device EXTERNAL DIMENSIONS TERMINAL LAYOUTS The connector is a 25 pin D SUB type and the pin configuration is as...

Страница 3: ...ase unit Related flag and data registers M8121 Send wait flag D8120 Communication format M8122 Send flag D8122 Remainder of send data M8123 Receive completion D8123 Number of received data M8124 Carri...

Страница 4: ...receive of data H138F 0001 0011 1000 1111 binary The settings for the above program are as right b0 b12 1 b11 0 SD TXD H W Ordinary mode Pin No ER DTR DR DSR When sending RD RXD ER DTR DR DSR When re...

Страница 5: ...2 ADP The connections of RS232C devices varies with each device being used Check the specification of the device and connect Connection examples Terminal specification device Modem specification devic...

Страница 6: ...D and LF H000A are written at the end of the message The printer moves down one line for each message CR Carriage Return LF Line Feed Note It may be necessary to set the DIP switches of your printer C...

Страница 7: ...software Use ordinary communication software terminal emulator or dedicated program in the personal computer The communication format of the PC for this example is as follows If the communication form...

Страница 8: ...is output to Y000 to Y017 When input X002 is turned on the receive completion flag is reset Personal computer operation Operation Sequence program M8000 M8161 M8002 X000 X001 M 0 MOV H0067 D8120 Sett...

Страница 9: ...ing Write the data to be sent to D 0 to D 19 before operating Send request Set the communication format according to the external device to be used M8002 M8000 M8013 M0 MOV H D8120 RS D0 K20 D100 K0 P...

Страница 10: ...line Check timing of send receive Change RS instruction from OFF to ON Make sure the received data length matches with the receive data area length NO Is M8063 turned on There is a possibility of sen...

Страница 11: ...the external sending device is sending the terminator Make sure the terminator value matches Match the communication format Check the timing of control line Check if the send data length is not zero w...

Страница 12: ...sponsible for any consequential damage that may arise as a result of the installation or use of this equipment All example and diagrams shown in this manual are intended only as an aid to understandin...

Отзывы: