3-3SectionCommand Format
31
Example:
@02RDH1000528
∗
Header Text FCSController
@ 0100 0000
EOR
0 0000
EOR
2 0011 0010
EOR
R 0101 0010
EOR
D 0100 0100
EOR
H 0100 1000
EOR
1 0011 0001
EOR
0 0011 0000
EOR
0 0011 0000
EOR
0 0011 0000
EOR
5 0011 0101
0010 1000
28
Computation
result
ASCII
code
3-3-4 FCS Computation Program Example (V600-CA2A-Vj Only)
See
the test program example (page
50) for an example of an FCS computation
program
for transmission. An example of an incoming data FCS check subrou
-
tine is given below.
1000 *******FCSCHECK*******
1010 *FCSCHECK
1020 Q=0:FCSCK$=”OK”
1030 PRINT RESPONSE$
1040 LENGS=LEN (RESPONSE$)–3
1050 FCSP$=MID$ (RESPONSE$.LENGS+1, 2) Response data FCS.
. . . . . . . . . . . . . . . . . . . . . . . . . .
1060 FOR I=1 TO LENGS FCS computation range.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1070 Q=ASC (MID$ (RESPONSE$, I, 1) XOR Q
1080 NEXT I
1090 FCSD$=HEX$ (Q)
1100 IF LEN (FCSD$)=1 THEN FCSD$=”0”+FCSD$ FCS computed by software.
. . . . . . . . . .
1110 IF FCSD$<>FCSP$ THEN FCSCK$=”ERR”
1120 PRINT ”FCSD$=”FCSD$, ”FCSP$=”FCSP$, ”FCSCK$=”FCSCK$: OK for correct FCS.
. . .
ERR for in correct FCS
1130 RETURN
Note In this example, CR (CHR$(13)) is not included in RESPONSE$. To insert it,
change line 1040.
3-3-5 Data Code Specification
The command needs to include a specification indicating how the data to be
read
or written is to be handled, either as ASCII code character data, or as hexa
-
decimal code numerical data.
ASCII Code Specification
• When
the
data length is set to seven bits using the ID Controller DIP switches
(page
83), this specifies ASCII code, and when the data length is set to eight
bits, this specifies JIS code.