Mitsubishi QD51 Programming Manual page 595

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Processing Code 80
Program Example
5 ' This program reads the receive buffer size and the number of characters stored in it
10 DIM TBL1%(10),TBL2%(10)
20 CH%=1
30 TBL1%(0)=9600
40 TBL1%(1)=&H108
50 TBL1%(2)=&H1
60 ZOPEN #CH%,TBL1%( )
70 TBL2%(0)=80
80 ZCNTL #CH%,0,TBL2%( )
90 PRINT "The size of receive buffer=";TBL2%(1)
100 PRINT "The number of characters=";TBL2%(2)
110 ZCLOSE #CH%
120 END
11 - 425
Reading the receive buffer size and the number of characters
Control table format definition
Element position
Item
%(0)
Processing code
%(1)
Receive buffer
%(2)
Number of characters
• It is possible to read the size of the receive buffer and the number of characters
stored in the receive buffer using this code.
• Specify 80 for the processing code.
• The reading operation can be performed on CH1 (RS-232C), CH2 (RS-232C),
and CH3 (RS-422/485).
Description
Specify the processing code.
Read the size of the receive buffer.
Read the number of characters stored in the
receive buffer.
:
' Defines arrays
:
' Specifies the communication channel
:
' Opens the communication channel
:
' Specifies to read the size and the number
of characters
:
' Executes the read operation
:
' Displays the result
:
' Closes the communication channel
MELSEC-Q
11 - 425

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents