EasyManuals Logo
Home>Omron>Controller>CQM1H - PROGRAM

Omron CQM1H - PROGRAM User Manual

Omron CQM1H - PROGRAM
602 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #78 background imageLoading...
Page #78 background image
53
Communications Functions Section 1-6
10 ’CQM1H SAMPLE PROGRAM FOR EXCEPTION
20 CLOSE 1
30 CLS
40 OPEN ”COM:E73” AS #1
50 *KEYIN
60 INPUT ”DATA ––––––––”,S$
70 IF S$=” ” THEN GOTO 190
80 PRINT ”SEND DATA = ”;S$
90 ST$=S$
100 INPUT ”SEND OK? Y or N?=”,B$
110 IF B$=”Y” THEN GOTO 130 ELSE GOTO *KEYIN
120 S$=ST$
130 PRINT #1,S$ ’Sends command to PC
140 INPUT #1,R$ ’Receives response from PC
150 PRINT ”RECV DATA = ”;R$
160 IF MID$(R$,4,2)=”EX” THEN GOTO 210 ’Identifies command from PC
170 IF RIGHT$(R$,1)<>”*” THEN S$=” ”:GOTO 130
180 GOTO *KEYIN
190 CLOSE 1
200 END
210 PRINT ”EXCEPTION!! DATA”
220 GOTO 140
The data received by the computer will be as shown below. (FCS is “59.”)
“@00EX1234123412341234123459*CR
1-6-3 No-protocol Communications Settings and Procedures
This section explains the PC Setup settings and procedure required for No-
protocol communications. No-protocol communications allow data to be
exchanged with standard devices. For example, data can be output to a
printer or input from a bar code reader.
PC Setup Settings Be sure to write 10 in the leftmost digits of DM 6645 (RS-232C port) or
DM 6650 (peripheral port) to specify No-protocol communications. Other
communications parameters are set in the rightmost two digits of DM 6645/
DM 6650 and DM 6646/DM 6651.
The start and end codes or the amount of data to be received can be set as
shown in the following diagrams if required for no-protocol communications.
This setting is required only for no-protocol communications. These settings
are valid only when pin 5 on the DIP Switch is OFF.
Enabling Start and End Codes
Specify whether or not a start code is to be set at the beginning of the data,
and whether or not an end code is to be set at the end. Instead of setting the
end code, it is possible to specify the number of bytes to be received before
the reception operation is completed. Both the codes and the number of bytes
of data to be received are set in DM 6649 or DM 6654.
15 0
Bit
0 0
End code
0: Not set (Amount of reception data specified.)
1: Set (End code specified.)
2: CR/LF
Start code
0: Not set
1: Set (Start code specified.)
Defaults: No start or end code (Specif
y
number of b
y
tes to receive.)
DM 6648: RS-232C port
DM 6653: Peripheral port

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CQM1H - PROGRAM and is the answer not in the manual?

Omron CQM1H - PROGRAM Specifications

General IconGeneral
BrandOmron
ModelCQM1H - PROGRAM
CategoryController
LanguageEnglish

Related product manuals