11 - 419 11 - 419
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' This program specifies the status of the RS/ER control signals to ON or OFF
20 DIM TBL1%(2),TBL2%(3),TBL3%(1)
:
' Defines arrays
30 A%=1
:
' Defines a channel number
40 TBL1%(0)=9600
:
' Sets the baud rate
50 TBL1%(1)=&H108
:
' Sets the character length and the parity bit
60 TBL1%(2)=&H1
:
' Sets the stop bit
70 ZOPEN #A%,TBL1%( )
:
' Opens the communication channel
80 TBL2%(0)=18
:
' Specifies to set the communication control
parameters
90 TBL2%(1)=&H0
:
' Control by the RS/ER control signals
disabled
100 TBL2%(3)=1024
:
' Sets the receive buffer size to 1024 bytes
110 ZCNTL #A%,0,TBL2%( )
:
' Executes
120 TBL3%(0)=32
:
' Specifies to turn ON/OFF the RS/ER
control signals
130 TBL3%(1)=&H101
:
' Turns ON the RS and ER control signals
140 ZCNTL #A%,0,TBL3%( )
:
' Executes
150 ZCLOSE #A%
160 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...