Mitsubishi QD51 Programming Manual page 594

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
5 ' This program reads the causes of reception errors
10 DIM TBL1%(2),TBL2%(1)
20 CH%=1
30 TBL1%(0)=9600
40 TBL1%(1)=&H108
50 TBL1%(2)=&H1
60 ZOPEN #CH%,TBL1%( )
70 TBL2%(0)=64
80 ZCNTL #CH%,0,TBL2%( )
90 A=RDSET(3,TBL2%(1))
100 B=RDSET(4,TBL2%(1))
110 C=RDSET(5,TBL2%(1))
120 IF A=1 THEN PRINT "There is a parity error!"
130 IF B=1 THEN PRINT "There is an overrun error!"
140 IF C=1 THEN PRINT "There is a framing error!"
150 IF A<>1 AND B<>1 AND C<>1 THEN PRINT "No error"
160 ZCLOSE #CH%
170 END
11 - 424
:
' Defines arrays
:
' Specifies the communication channel
:
' Opens the communication channel
:
' Specifies to read the causes of reception
errors
:
' Executes the read operation
:
' Reads the bits
:
' Displays the results
:
' Closes the communication channel
MELSEC-Q
11 - 424

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents