55
Communications Functions
Section 1-6
3.
The results of reading the data received will be stored in the AR area.
Check to see that the operation was successfully completed. The contents
of these bits will be reset each time RXD(47) is executed.
To reset the RS-232C port (i.e., to restore the initial status), turn ON SR
25209. To reset the peripheral port, turn ON SR 25208. These bits will turn
OFF automatically after the reset.
The start code and end code are not included in AR 09 or AR 10 (number of
bytes received).
Application Example
This example shows a program for using the RS-232C port in the no-protocol
mode to transmit 10 bytes of data (DM 0100 to DM 0104) to the computer,
and to store the data received from the computer in the DM area beginning
with DM 0200. Before executing the program, the following PC Setup setting
must be made.
DM 6645: 1000 (RS-232C port in no-protocol mode; standard communica-
tions conditions)
DM 6648: 2000 (No start code; end code CR/LF)
The default values are assumed for all other PC Setup settings. From DM
0100 to DM 0104, 3132 is stored in every word. From the computer, execute a
program to receive CQM1H data with the standard communications condi-
tions.
The data will be as follows: “31323132313231323132CR LF”
1-6-4
One-to-one Data Links
If a CQM1H is linked one-to-one by connecting it to another CPU Unit through
their RS-232C ports, they can share common LR areas. One of the PCs will
serve as the master and the other as the slave. A CQM1H can be linked one-
to-one with any of the following PCs: CQM1H, CQM1, C200HX/HG/HE,
C200HS, CPM1, CPM1A, CPM2A, CPM2C, or SRM1(-V2).
RS-232C
port
Peripheral
port
Error
AR 0800 to
AR 0803
AR 0808 to
AR 0811
RS-232C port error code (1 digit BCD) 0: Normal
completion 1: Parity error 2: Framing error 3:
Overrun error
AR 0804
AR0812
Communications error
AR 0807
AR0815
Reception Overrun Flag (After reception was
completed, the subsequent data was received
before the data was read by means of the
RXD(47) instruction.)
AR 09
AR10
Number of bytes received (4-digit BCD)
@TXD(48)
DM 0100
#0000
#0010
00101 AR0805
@RXD(47)
DM 0200
#0000
AR09
AR0806
DIFU(13) 00101
00100
If AR 0805 (the Transmission Enabled Flag) is
ON when IR 00100 turns ON, the ten bytes of
data (DM 0100 to DM 0104) will be transmitted,
leftmost bytes first.
When AR 0806 (Reception Completed Flag)
goes ON, the number of bytes of data specified in
AR 09 will be read from the CQM1H's reception
buffer and stored in memory starting at DM 0200,
leftmost bytes first.
Содержание SYSMAC CQM1H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 9: ......
Страница 11: ......
Страница 15: ...xvi...
Страница 87: ...62 Calculating with Signed Binary Data Section 1 7...
Страница 169: ...144 Serial Communications Board Section 2 6...
Страница 537: ......
Страница 565: ......
Страница 569: ......
Страница 573: ......
Страница 577: ......