Mitsubishi Electric AJ71QC24 Manual page 48

Melsec qna serial communications module
Table of Contents

Advertisement

4.
COMMUNICATIONS
USING
A
DEDICATED
PROTOCOL
MELSEC
QnA
1530
NEXT I%
1540
GOTO *FIN
1550 ,
_ _ _ _ - _ _ _ _ _ _ _ - - - - - - -
Data display when error data received----------------------!
1560 *ERFIN
1570
LOCATE 25,lO :PRINT "Data cannot
be
received. Stop."
1580
GOTO *FIN
1590
16 0 0 *EIICODE
1620
ERCD$=M;DS(BUF$,12,4)
1633
LOCATE 27,8
:
PRINT "Error code="
;EF.CD$
1643
GCTO
*FIN
1650
1660 *ERDISI
1670 LOCATE
25,lO :PRINT "Received data is abnorrcal. Stop.
"
1680
GOTO *FIN
1690
1610
LOCATE
27,4
:
PRINT "Batch read abnormal end"
1700
t
!
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RS-232C close-----------_------------------_---
I
1710 *FIN
172 0 CLOSE
#CH%
1730
1740 END
1750
'
17712 *JYUSIN
178C
FOR I %=1 TO W?CNT%
1790
FOR J%=l TO DLCNT%
:
'Data receive wait
1803
NEXT J%
1810
IF LOC(CH%)
-+
RTICNT% THEN *BUFIN
:
'Jump if Cesignated number
of
characters,
1760
1
! . . . . . . . . . . . . . . . . . . . . . . . . .
~
~
t
a
reception subroutine__------------_-------------
or more, received.
1820
NEXT
I%
1830
ERFLG%
=
9 9
:
RETURN
:'Data not received error
1840
1850 *BUFIN
1860
RCV$=INPUT$ (;IS'CNT%, CE%
)
:'Read receive data
1870
XETURN
1880
BASIC commands must be changed according to BASIC software,
4 - 1 5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Aj71qc24-r2Aj71qc24-r4

Table of Contents