Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual
Page 171

Appendix M
Application Library Subroutines
M–4
SetDTR
Sets the state of Data Terminal Ready.
SetRTS
Sets the state of Request To Send for a comm port.
Set state = TRUE to turn DTR or RTS on. You may examine the global
variables RTS1%, DTR1%, RTS2%, and DTR2% to get the current state.
n% is 1 for COM and 2 for AUX.
SetDTR n%, state%
SetRTS n%, state%
SUB SetDTR ( n%, s% )
SUB SetRTS ( n%, s% )
GetDSR%
Gets Data Ready status for a comm port.
A TRUE is returned if DSR is ON. n% is 1 for COM and 2 for AUX.
state = GetDSR%(n%)
FUNCTION etDSR% ( n% )
SendCom
Sends a record to a comm line.
A string is sent to the comm line. The string is sent exactly as is, so append
CR or CR and LF if you are sending a line. n% is 1 for COM and 2 for AUX.
Note that COMOPEN% must be true for a send to COM to work.
COMOPEN% is true only if the TERMTYPE% is TypeNormal.
SendCom n%, s$
SUB SendCom ( n%, s$ + CHR$(CR) )
ONLINE%
TRUE if the workstation is online.
IF ONLINE% THEN . . .
MEMFULL%
TRUE if less than 1024 bytes remain in RAM.
This should be checked before any SendQue or outputs to the RAM files to
prevent memory full.
IF MEMFULL% THEN . . .