21
1550 RETURN
1560 CCP=CCP+1:IF CCP=CMAX THEN CCP=1:GOSUB 1590
1570 LOCATE CRP+CRPB,CCP
1580 RETURN
1590 CRP=CRP+4:IF CRP=CRPMAX THEN CRP=1:CLS
1600 GOSUB 1690
1610 RETURN
1620 CRPB=0
1630 IF KD$(B) < " " THEN GOSUB 1650 ELSE GOSUB 1670
1640 RETURN
1650 GOSUB 1560:PRINT "^";:GOSUB 1560:PRINT CHR$(ASC(KD$(B))+ASC("@"));
1660 RETURN
1670 GOSUB 1560:PRINT KD$(B);
1680 RETURN
1690 LOCATE CRP+1,CCP:PRINT STRING$(CMAX,"-");
1700 LOCATE CRP+CRPB,CCP
1710 RETURN
1720 '************************************************
1730 '* Make SUM *
1740 '************************************************
1750 SUM=0
1760 FOR LS=2 TO B-1
1770 SUM=SUM+ASC(KD$(LS))
1780 NEXT LS
1790 SUMC$=RIGHT$("0"+HEX$(((NOT SUM)+1) AND &HFF),2)
1800 KD$(B)=LEFT$(SUMC$,1):GOSUB 1620:B=B+1
1810 KD$(B)=RIGHT$(SUMC$,1):GOSUB 1620:B=B+1
1820 RETURN
1830 END
7.2 Operation method of the sample program
(1) Before executing the sample program, check the following.
• S
ettings such as data transfer rate, instrument number are correct (option C5 for RS-485). (See p.6.)
• W
iring connections are correct.
When checking is completed, turn the power on.
(2) Start up the GW-BASIC.
Prepare the GW-BASIC and input as BASIC by key operation, and then press the
(Enter) key.
(3) Input the sample program and save the program as
“
SAMPLE1A. BAS".
OK
1000 '*************************************************************************************************
1010 ' <SAMPLE1A.BAS>
1020 '
•
This program is a communication example for DCL-300, FCD-100, FCR-100,
1030 ' FCL-100, GCS-300, HCD-100, JCD-100, JCR-100, JCS-200, JCD-300,
:
:
:
1800 KD$(B)=LEFT$(SUMC$,1):GOSUB 1620:B=B+1
1810 KD$(B)=RIGHT$(SUMC$,1):GOSUB 1620:B=B+1
1820 RETURN
1830 END
SAVE
“
SAMPLE1A.BAS",A
OK
(4) Load the sample program.
Input as underlined by key, and press the
(Enter) key.
OK
load "SAMPLE1A.BAS"
When the load is completed, the display will be as follows.