Melsec-q, 1) program conditions – MITSUBISHI ELECTRIC QJ71C24N User Manual

Page 331

Advertising
background image

App. - 37 App. - 37

MELSEC-Q

APPENDIX

Appendix 9.4 When receiving data using nonprocedural or bidirectional protocol

The following program example receives data under the nonprocedural protocol (or

bidirectional protocol) using the REMFR instruction and I/O signals.

Refer to Chapter 6 for the communication using the nonprocedural protocol.

Refer to Chapter 7 for the communication using the bidirectional protocol.

Refer to Chapter 11 of the User's Manual (Application) for data communication using

the user frames.

(1) Program conditions

The following program receives data from the external device by communication

using the nonprocedural protocol, then turns ON the receive read request signal

(X1003), and reads the received data from the QJ71C24N buffer memory to the

PLC CPU.
(a) Devices used

:

• Error code read signal ............................................................ X1023

• Receive read request signal ................................................... M10

• Received data acquisition command ..................................... M11

• Receive result acquisition command...................................... M12

• Completion device for REMFR instruction............................. M100 to 105

• Normal/abnormal completion flag for REMFR instruction ..... M200 to 203

• Normal/abnormal completion of receive ................................ M300, M301

• Received data count ............................................................... D0

• Received data (when 5-word data are received)................... D1 to D5

• Data reception result............................................................... D8000

(b) Intelligent function module switch settings (Refer to Section 4.5.2)

Bit

Switch No.

Position

Designated value

Description

Setting

value

b0

OFF

Operation setting

Independent

b1

OFF

Data bit

7 bits

b2

OFF

Parity bit

No

b3

OFF

Even/odd parity

Odd

b4

OFF

Stop bit

1 bit

b5

OFF

Sum check code

No

b6

ON

Write during RUN

Enabled

b7

ON

Transmission

setting

Setting modifications

Enabled

Switch 1

b8 to b15

Communication rate setting

19200bps

07C0

H

Switch 2

Communication protocol setting

Non-procedure protocol

0006

H

Switch 5

Station number setting

Station 0

0000

H

(c) Buffer memory settings used in this example

Address Decimal (Hexadecimal)

CH1

Name

Setting

value

150 (96

H

)

Word/byte units designation

Word units

164 (A4

H

)

Received data count designation

01FF

H

165 (A5

H

)

Receive complete code designation

0D0A

H

166 (A6

H

)

Receive buffer memory head address designation

0600

H

167 (A7

H

)

Receive buffer memory length designation

0200

H

600 (258

H

)

Data reception result

Advertising
This manual is related to the following products: