EasyManuals Logo
Home>Omron>Controller>E5CK

Omron E5CK User Manual

Omron E5CK
186 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 #144 background imageLoading...
Page #144 background image
CHAPTER 6 USING THE COMMUNICATIONS FUNCTION
E5CK
6–18
JProgram list (language: IBM PC Compatible Machine)
1000 ’
1010 ’ PROGRAM : E5CK-T COMMUNICATION PROGRAM
1020 FOR IBM PC COMPATBLE MACHINE
1050 ’
1060 ’ Default RS-232C SPEED: 9600BPS, PARITY: EVEN, DATA: 7, STOP: 2
1070 OPEN “COM: E73” AS #1
1080 *REPEAT
1090 ’ Enter send data
1100 INPUT “send data : ” , SEND$
1110’ FCS calculation
1120 FCS=0
1130 FOR IFCS=1 TO LEN (SEND$)
1140 FCS=FCS XOR ASC (MID$ (SEND$, IFCS, 1))
1150 NEXT
1160 FCS$=RIGHT$ (“0”+HEX$ (FCS), 2)
1170 ’ Execute communications
1180 ZZZ$=SEND$+FCS$+“*”+CHR$ (13)
1190 PRINT #1, ZZZ$;
1120’ Check response
1210 RECCNT=0: TMP$=“”
1220 *DRECLOOP:
1230 IF LOC (1) < > 0 THEN DREC1
1240 RECCNT=RECCNT+1
1250 IF RECCNT=5000 THEN *DRECERR ELSE DRECLOOP
1260 *DREC1
1270 TMP$=TMP$+INPUT$ (LOC (1), #1)
1280 IF RIGHT$ (TMP$, 1)=CHR$ (13) THEN *DRECEND
ELSE RECCNT=0: GOTO *DRECLOOP
1290 *DRECERR
1300 TMP$=“No response !!” +CHR$ (13)
1310 *DRECEND
1320 RECV$=TMP$
1330 PRINT “receive data : ” ; RECV$
1340 ’ Repeat to make Command
1350’ GOTO *REPEAT
1360 ’ END
1370 CLOSE #1
1380 END

Table of Contents

Other manuals for Omron E5CK

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron E5CK and is the answer not in the manual?

Omron E5CK Specifications

General IconGeneral
BrandOmron
ModelE5CK
CategoryController
LanguageEnglish

Related product manuals