Mitsubishi Electric MELSEC-A Manual Book page 41

Hide thumbs Also See for MELSEC-A:
Table of Contents

Advertisement

4. DATA COMMUNICATIONS
USING DEDICATED PROTOCOLS
MELSEC-A
1450
LOCATE 27, 8
:
PRINT 'D$='
:
D$
1460
LOCATE 7,12
: PRINT 'LIST OF PRESENT VALUES OF D O TO 04'
1470
FOR l%=l TO 5
1480
DAT%=VAL (.6H*+MID$(D$, (1%-1)'4+1,
4))
:
'
Data
(four
hexadecimal digits) is converted into decimal.
1500
LOCATE
15,14+1%
1520
NEXT I%
1530
.
GOT0 'FIN
1540
1
I
....__...._________...-..-...-..---------
Data in Case of reception error is displayed.
__.__________
I
1490
DNO%=I%-l
:
'
Data register number.
1510
PRINT USING 'Dit=####' ; DNO%, DAT%
"One-point
advice"
T
1 3 8 0
IP
25 characters
Weived data BUFS
The details of the line numbers 1320 and 1380 in the
program are as follows:
1320 IF BUF$xSTX$ THEN RVCNT%=STCNT%-1
As soon as the computer receives the STX
code from the AJ71 UC24, it sets 25 repre-
senting the number of characters (data
remaining
to
be received.
IF LEFTS(BUF6, 5)=STX$+'OOFF' AND RIGHT$(BUFS,
1)
=ETX$ THEN +DISP
The first five characters
o f
the data received
from the AJ71 UC24 are arranged as shown
in the left figure.
If
the last character is the
ETX code, the program jumps to the line
labelled
'DISP.
4 - 14

Advertisement

Table of Contents
loading

Table of Contents