Mitsubishi QD51 Programming Manual page 599

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' This program outputs Kanji code to a printer connected to CH1
20 DIM TBL%(15)
30 CH%=1
40 TBL%(0)=9600
50 TBL%(1)=&H108
60 TBL%(2)=&H1
70 ZOPEN #CH%,TBL%( )
80 TBL%(0)=18
90 TBL%(1)=0
100 TBL%(3)=1024
110 ZCNTL #CH%,0,TBL%( )
120 TBL%(0)=32
130 TBL%(1)=&H101
140 ZCNTL #CH%,0,TBL%( )
150 TBL%(0)=100
160 TBL%(1)=1
170 TBL%(2)=3
180 TBL%(3)=3
190 TBL%(4)=&H241B:TBL%(5)=&H40
200 TBL%(9)=&H481C:TBL%(10)=&H18
210 ZCNTL #CH%,0,TBL%( )
220 TBL%(0)=96
230 TBL%(1)=1
240 ZCNTL #CH%,0,TBL%( )
250 KMODE 1
260 ZLDV 1
270 SD$="Kanji"+CHR$(13)
280 PRINT SD$
290 LPRINT SD$
300 ZCLOSE #CH%
310 END
11 - 429
:
' Defines an array
:
' Opens the communication channel
:
' Specifies to set the communication control
parameters
:
' Executes the setting
:
' Specifies to set the RS and ER control
signals to ON/OFF
:
' Executes the setting
:
' Specifies to set Kanji shift in/shift out
codes
:
' Specifies to change the codes
:
' Specifies the number of characters for
shift in codes
:
' Specifies the number of characters for
shift out codes
:
' Specifies the shift in codes
:
' Specifies the shift out codes
:
' Executes the setting
:
' Specifies to set Kanji code conversion
:
' Enables the Kanji code conversion
:
' Executes the setting
:
' Kanji code conversion
:
' Defines data
:
' Outputs to the printer
:
' Closes the communication channel
MELSEC-Q
11 - 429

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents