54
Communications Functions
Section 1-6
Setting the Start Code, End Code, and Amount of Reception Data
Communications Procedure
Transmissions
1,2,3...
1.
Check to see that AR 0805 (the RS-232C Port Transmission Enabled Flag)
has turned ON.
2.
Use the TXD(48) instruction to transmit the data.
From the time this instruction is executed until the data transmission is com-
plete, AR 0805 (or AR0813 for the peripheral port) will remain OFF. (It will turn
ON again upon completion of the data transmission.)
Start and end codes are not included when the number of bytes to be trans-
mitted is specified. The largest transmission that can be sent with or without
start and end codes in 256 bytes, N will be between 254 and 256 depending
on the designations for start and end codes. If the number of bytes to be sent
is set to 0000, only the start and end codes will be sent.
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 bites will turn
OFF automatically after the reset.
Receptions
1,2,3...
1.
Confirm that AR 0806 (RS-232C Reception Completed Flag) or AR 0814
(Peripheral Reception Completed Flag) is ON.
2.
Use the RXD(47) instruction to receive the data.
15
0
Bit
End code or number of bytes to be received
For end code: (00 to FF)
For amount of reception data: 2 digits hexadecimal, 00 to FF (00: 256 bytes)
Start code 00 to FF
Defaults:
No start code; data reception complete at 256 bytes.
DM 6649: RS-232C port
DM 6654: Peripheral port
(@)TXD(48)
S
C
N
S: Leading word of data to be transmitted
C: Control data
N: Number of bytes to be transmitted (4 digits BCD), 0000 to 0256
Start code
Data
End code
256 bytes max.
(@)RXD(47)
D
C
N
D: Leading word for storing reception data
C: Control data
Bits 00 to 03
0: Leftmost bytes first
1: Rightmost bytes first
Bits 12 to 15
0: RS-232C port
1: Peripheral port
N: Number of bytes stored (4 digits BCD), 0000 to 0256