Sample Program; Program For Data Communication - Mitsubishi Electric MELSEC iQ-R Series User Manual

Serial communication module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

7.5

Sample program

Program for data communication

The following shows sample programs to test the connection between C24s.
Each program contains a minimum set of processing necessary for performing a communication test.
Modify the data for initialization and data for connection in accordance with the system. When adding error-handling
procedures, add them separately by referring to the following explanations.
System configuration
The system configuration used in this program is shown below.
Ò Line connection
Ó Communications by
the non-procedure protocol
Ô Line disconnection
Modem
Ó
RJ71C24-R2
Connection request station side (RJ71C24-R2) program example
Perform the initialization of the modem connected to the CH1 side interface, line connection, data communication using the
nonprocedural protocol, and line disconnection by the command from the user.
■Parameter list
The following shows the parameters of this sample program.
• Module parameter
Category
Setting item
Basic settings
Communication protocol setting
Communication speed setting
Transmission setting
Station number setting (CH1, 2 in common: 0 to 31)
Application
Modem function
settings
setting
• Module extended parameter
Category
Setting item
Modem
Modem connection
connection data
data No.3000
7 COMMUNICATIONS BY THE MODEM FUNCTION
206
7.5 Sample program
Modem
Ò
RJ71C24-R2
Data bit
Parity bit
Odd/even parity
Stop bit
Sum check code
Online change
Setting change
Modem function
Modem connection CH specification
specification 1
Data No. for initialization designation
Data No. for connection designation
Telephone number
Setting content
Nonprocedural protocol
19200 bps
8
None
Odd
1
Yes
Enable
Enable
0
1CH
07D5H
0BB8H
Setting contents
0123456789

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents