Mitsubishi Electronics QJ71C24/-R2 Network Card User Manual


 
App. - 39 App. - 39
MELSEC-Q
APPENDIX
Appendix 9.5 When sending data using nonprocedural or bidirectional protocol
The following program example sends data under the nonprocedural protocol (or
bidirectional protocol) using the REMFR/REMTO instruction and I/O signals.
Refer to Chapter 6 for the communication using the nonprocedural protocol, and to
Chapter 7 for the communication using the bidirectional protocol.
(1) Program conditions
The following program sends data from the CH1 side when the transmission
signal (X1024) turns ON.
(a) Devices used
:
• Transmission command ......................................................... X1024
• Transmission command pulse signal..................................... M10
• Transmission result acquisition command............................. M11
• Completion device for REMFR/REMTO instruction .............. M100 to 103
• Normal/abnormal completion flag for REMFR/REMTO
instruction................................................................................ M200 to 202
• Normal/abnormal completion of transmission........................ M300, M301
• Transmission data count ........................................................ D10
• Transmission data (5 words) .................................................. D11 to D15
• Data transmission result ......................................................... D20
(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
or
bidirectional protocol
0006
H
or
0007
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
162 (A2
H
) Transmission buffer memory head address designation 0400
H
163 (A3
H
) Transmission buffer memory length designation 0200
H
599 (257
H
) Data transmission result