Rockwell-automation 2708-NBD VBASIC Language Development Kit Instrukcja Użytkownika Strona 72

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 84
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 71
Appendix C
Application Library Subroutines
C4
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 . . .
Przeglądanie stron 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 83 84

Komentarze do niniejszej Instrukcji

Brak uwag