Remote-processing BASIC 52 Instrukcja Użytkownika Strona 73

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 163
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 72
RPBASIC-52 PROGRAMMING GUIDE
2-54
LINE# (Function)
Syntax: A = LINE#(line)
Where: line = connecto r number from 101 to 125 (Line ranges m ay vary. Check your hardw are
manual.)
Function: Returns status of a line at the digital I/O c onnector.
Mode: Command,Run
Use: A = LINE#(103) Reads level from digital I/O port connector number 3.
Card: Function ava ilable on all cards. Ranges will vary from card to card. See hardw are manual.
DESCRIPTION
The '#' modifier to LINE specifies the actua l line number at the d igital I/O port connector. line must range
from 101 to 125 or else a BAD ARGUMENT is returned. Line 102 is also not valid. LINE# cannot be used
for the on card opto rack (0 - 3). The line number is com puted by simply adding 100 to the connector pin
number.
LINE# returns a '0' or a '1', which correspond directly to the logic level at the connector. When using LINE#
to return the status of an opto output line, a '0' means the module is ON w hile a '1' indicates it is OFF. This is
in contrast to th e LIN E state ment which turns o n a module with a '1'. Whe n reading an opto input module , a
'0' indicates there is no voltage applied to the inputs.
The following example returns the status at digital I/O connec tor J3, pin 19 (82C5 5 port A, bit 0);
A = LINE#(119)
See LINE function for more program exam ples.
RELATED
LINE, LINEB functions, LINE, LINE#, LINEB statements, CONFIG LINE
ERRORS
BAD SYNTAX When # is used for on card positions.
BAD DATA When line is out of range for a port.
Przeglądanie stron 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 162 163

Komentarze do niniejszej Instrukcji

Brak uwag