11 - 417 11 - 417
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Program Example
100 ' This program specifies and reads continuous break characters
110 DIM TBL1%(2),TBL2%(4),TBL3%(4)
:
' Defines arrays
120 A%=1
:
' Communication channel CH1 (RS-232C)
130 TBL1%(0)=9600
:
' Sets the baud rate
140 TBL1%(1)=&H107
:
' Sets the character length and parity bit
150 TBL1%(2)=&H1
:
' Sets the stop bit
160 ZOPEN #A%,TBL1%( )
:
' Opens the communication channel
170 TBL2%(0)=24
:
' Specifies to set continuous break
characters
180 TBL2%(1)=1
:
' Sets the number of break characters
190 TBL2%(2)=2
200 TBL2%(3)=&H30D
210 ZCNTL #A%,0,TBL2%( )
220 TBL3%(0)=25
230 ZCNTL #A%,0,TBL3%( )
240 PRINT"Number of break characters=";TBL3%(1)
250 PRINT"Break character=&H";HEX$(TBL3%(2))
260 ZCLOSE #A%
270 END
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...