4-4
Section
SRM1(-V2) Communications Functions
272
1300 TMP$=”No response!!”+CHR$(13)
1310 *DRECEND
1320 RECV$=TMP$
1330 PRINT ”receive data:”;RECV$
1340 ’
Go to transmission data input
1350 GOTO *REPEAT
1360 ’
Processing complete
1370 CLOSE #1
1380 END
4-4-2 No-protocol Communications
This section explains no-protocol (RS-232C) communications. No-protocol
communications allow data to be exchanged with standard RS-232C devices
such as printers and bar code readers. Data can be printed out by a printer or
read by a bar code reader. Handshaking is not supported for no-protocol com-
munications.
Communications Procedure
Transmissions
1, 2, 3...
1. Check to see that AR 0805 (the RS-232C Port Transmit Ready Flag) has
turned ON.
2. Use the TXD(48) instruction to transmit the data.
(@)TXD(48)
S
C
N
S: Leading word no. of data to be transmitted
C: Control data
N: Number of bytes to be transmitted (4 digits BCD), 0000 to 0256
From the time this instruction is executed until the data transmission is complete,
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 transmitted
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 desig-
nations 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.
Start code
Data
End code
256 bytes max.
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 automati-
cally after the reset.
Receptions
1, 2, 3...
1. Confirm that AR 0806 (RS-232C Reception Complete Flag) or AR 0814 (Pe-
ripheral Reception Complete Flag) is ON.
Содержание SRM1 - PROGRAMING 02-2001
Страница 1: ...Programmable Controllers Cat No W353 E1 06 SYSMAC CPM1 CPM1A CPM2A CPM2C SRM1 V2 PROGRAMMING MANUAL ...
Страница 2: ...CPM1 CPM1A CPM2A CPM2C SRM1 V2 Programmable Controllers Programming Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 9: ...x ...
Страница 15: ...xvi ...