5-4
IM 34M6H21-01E
2nd Edition : Aug, 2001-00
340
EOT@ STATUS SLOT, PORT, 4; IOUT
:! Interrupt raised because end
of output
350
IF IOUT <> 0 THEN
360
DISP
“
Transfer error !!
”
, HEX$(IOUT)
370
ELSE
380
DISP
“
Transfer end
”
390
ENDIF
400
IEND = 1
410
RETURN
420
END
100
! F3RS22=0N Example RECEIVE (1)
110
!
120
DIM
REC$256
130
SLOT = 3 : PORT = 2
140
!
150
! Set communication conditions
160
ASSIGN RS22 = SLOT
:! Assign Card
170
CONTROL SLOT, PORT, 14; 7
:! 9600bps
180
CONTROL SLOT, PORT, 13; 0
:! No parity
190
CONTROL SLOT, PORT, 12; 2
:! 2 stop bits
200
SET TIMEOUT SLOT. PORT; 3000
:! Timeout 3 seconds
210
RESET SLOT, PORT, 1
:! Reset buffer
220
!
230
! Receiving (Complete Return Type)
240
SET STATUS ERR
250
ENTER SLOT, PORT FORMAT; REC$
:! Receive (Type II)
260
IF ERR = 82 THEN
270
IF ERRCE <> $E6 THEN
280
DISP
“
error
”
, HEX$(ERRCE)
290
ELSE
300
GOTO 250
310
ENDIF
320
ELSE
330
DP
“
time
”
; TIME$,
“
receive data
”
; REC$
340
ENDIF
350
RESET
STATUS
360
END
100
! F3RS22-0N Example RECEIVE (2)
110
!
120
DEFINT
I
130
DIM
REC$256
140
SLOT = 3 : PORT = 2
150
!
160
! Set communication conditions
170
ASSIGN RS22 = SLOT
:! Assign card
180
CONTROL SLOT, PORT, 14; 7
:! 9600bps
190
CONTROL SLOT, PORT, 12; 2
:! 2 stop bits
200
SET TIMEOUT SLOT. PORT; 3000
:! Timeout 3 seconds
210
RESET SLOT, PORT, 1
:! Reset buffer
220
!
230
! Interrupt Declaration
240
ON INT SLOT, PORT GOSUB REC@
250
ENABLE INTR SLOT, PORT;
“
111
”
260
!
270
WHILE IEND = 0
Summary of Contents for F3RS22-0N
Page 11: ...Blank Page...
Page 15: ...Blank Page...
Page 28: ...3 3 IM 34M6H21 01E 2nd Edition Aug 2001 00 External Dimensions Unit mm 83 2 28 9 2 12 1 100...
Page 31: ...Blank Page...
Page 59: ...Blank Page...
Page 63: ...Appx 3 2 IM 34M6H21 01E 2nd Edition Aug 2001 00 Blank Page...
Page 65: ...Blank Page...