No-Protocol Communications - Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

SRM1(-V2) Communications Functions
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

Communications Procedure
1, 2, 3...
1, 2, 3...
272
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.
Transmissions
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
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
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. Confirm that AR 0806 (RS-232C Reception Complete Flag) or AR 0814 (Pe-
ripheral Reception Complete Flag) is ON.
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
256 bytes max.
Data
Section
4-4
End code

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?

Questions and answers

Table of Contents