43 all_sent@ function, 44 write_tune function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 109

7Ć21
This function returns false only under the following conditions:
D #n is not assigned to an opened port
D #n is not assigned to a serial communication port (PORTA on the
leftmost Processor; PORTA or PORTB on other Processors)
The following example would turn RTS on, wait 55ms, send the text,
wait for all characters to be sent, wait 110ms, then turn RTS off.
10 OPEN "PORTA" AS FILE #1, SETUP=0,9600
30 CONTROL_VAL% = 1
/turn RTS on
40 STATUS@ = RTS_CONTROL@(#1, CONTROL_VAL%)
50 DELAY 10 TICKS
/delay 55 ms
60 PRINT #1, SEND$
/send text out port A
65 IF (ALL_SENT(#1)) THEN GOTO 70
66 DELAY 1 TICK : GOTO 65
/wait for all sent
70 DELAY 20 TICKS
/delay 110 ms
80 CONTROL_VAL% = 0
/turn RTS off
90 STATUS@ = RTS_CONTROL@(#1, CONTROL_VAL%)
7.43
ALL_SENT@ Function
Format:
ALL_SENT@(#n)
where:
#n is the logical number assigned to the port in the OPEN
statement.
This function provides a method to detect when all characters in a
message are sent.
This function returns true if all of the characters from the previous
print statement have been transmitted (that is, the transmit queue is
empty).
This function returns false only under the following conditions:
D Some characters have not yet been transferred.
D #n is not assigned to an opened port
D #n is not assigned to a serial communication port (PORTA on the
leftmost Processor; PORTA or PORTB on other Processors)
Refer to the OPEN statement for a description of the purpose of the
RTS signal.
7.44
WRITE_TUNE Function
Format:
WRITE_TUNE(tunable, new_value, in_limit@)
where:
tunable is the tunable variable. It can be an integer, double
integer, or real.
new_value is the new value for the tunable variable. It can be a
variable, an expression, or a literal value. The compiler will
report an error if 'tunable' and 'new_value' are not the same
data type.