265
Appendix B
FCS Check Program Examples
(BASIC)
Calculation Examples for Sending FCS
100 ’*****CALCULATE FCS*****
110 ’*FCSSET
120 L=LEN(DATA$)
130 A=0
140 FOR J=1 TO L
150 CODE$=MID$(DATA$,J,1)
160 A=ASC(CODE$)XOR A
170 NEXT J
180 FCS$=HEX$(A)
190 IF LEN(FCS$)=1 THEN FCS$=”0”+FCS$
200 RETURN
FCS Check Sub Routine Examples for Received Data
1000 ’*****FCSHECK*****
1010 ’*FCSHECK
1020 Q=0:FCSCK$=”OK”
1030 PRINT RESPONSE $
1040 LENGS=LEN(RESPONSE$)–3
1050 FCSP$=MID$(RESPONSE$,LENGS+1,2) ......Response Data of FCS
1060 FOR J=1 TO LENGS .....................Calculation Range of FCS
1070 Q=ASC(MID$(RESPONSE$,J,1))XOR Q
1080 NEXT J
1090 FCSD$=HEX$(Q)
1100 IF LEN(FCSD$)=1 THEN FCSD$=”0”+FCSD$ .FCS calculated in a program
1110 IF FCSD$ < > FCSP$ THEN FCSCK$=”ERR”
1120 PRINT ”FCSD$=”;FCSD$;”FCSP$=”;FCSP$;
”FCSCK$=”;FCSCK$; ...
FCS correctly received :OK
1130 RETURN
FCS not received correctly:ERR
DATA$
Sample Data Line
L
Data Length
CODE$
Data Character
A
Exclusive Operation
Содержание V530-R150E-3 -
Страница 1: ...Cat No Z155 E1 01 2 Dimensional Code Reader Fixed Type V530 R150E 3 V530 R150EP 3 OPERATION MANUAL...
Страница 2: ...V530 R150E 3 V530 R150EP 3 2 Dimensional Code Reader Fixed Type Operation Manual Produced August 2001...
Страница 7: ......
Страница 9: ......
Страница 17: ......
Страница 27: ......
Страница 47: ......
Страница 63: ......
Страница 224: ...207 System Section 6 4 2 Set each item 3 Select End before leaving this screen...
Страница 226: ...209 System Section 6 4 2 Select the error method 3 Select End to leave this screen...
Страница 247: ...230 2 Dimensional Code Reader Section 8 1 8 1 2 Dimensional Code Reader V530 R150 Four 4 5 dia 165 min Unit mm...
Страница 263: ......
Страница 279: ......
Страница 281: ......
Страница 283: ......
Страница 289: ......