ADwin-Gold II
, Manual February 2013
169
RSxxx interface
Write_FIFO
ADwin
Write_FIFO
Write_FIFO
writes a value into the send-FIFO of a specified RSxxx interface.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
Write_FIFO
(
interface
,
value
)
Parameters
Notes
The instruction checks first if there is at least one free memory cell in the
send-FIFO. If so, the transferred value is written into the FIFO (return
value 0); otherwise a 1 is returned, indicating that the FIFO is full and
writing is not possible.
See also
,
Valid for
Gold II-CAN
Example
Rem Please select the appropriate include for ADbasic /
TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Dim
val
As
Long
Init:
RS_Reset
()
RS_Init
(
1
,
9600
,
0
,
8
,
0
,
1
)
'Initialization of RSxxx
'interface 1
'with 9600 Baud, no parity,
'8 data bits, 1 stop bit and
'hardware handshake.
Event:
Par_1
=
Write_FIFO
(
1
,
val
)
'If the FIFO is not full, [val]
'is written into the FIFO.
'Otherwise
'a 1 in Par_1 indicates that
'writing
'into the FIFO ist not possible
'(FIFO full).
T11 TiCo
interface
RSxxx interface number (1, 2) to whose send-
FIFO data are transferred.
LONG
value
Value to be written into the send-FIFO.
LONG
ret_val
Status message:
0: Data are transferred successfully.
1: Data were not transferred, send-FIFO is full.
LONG