Remote-processing CAMBASIC Uživatelský manuál Strana 125

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 208
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 124
Commands - 92
OPTO
Process Statement
SYNTAX: OPTO channel, value
PURPOSE: To turn output modules on and off on 24 position opto-isolator racks that are external to the card.
REMARK S: The channel parameter ranges from 0 to 23 (0-3 on RPC-30) or 100 to 123 and corresponds to the
position numbers on the opto-module racks.
The value is the state of the output. To turn an output on, enter a 1 or ON. To tur n the output off,
enter a 0 or OFF. The ON and O FF execute faster than 1 or 0.
Inputs and outputs are ac tive low when interfacing with opto-isolator r acks. Thus, writing a “1” to
an opto output module will turn it off. This confusion is eliminated with the OPTO statement. It
automatically inverts the logic so that a “1” represents on and a “0” represents off.
The OPT O statement is similar to the BIT statement in that individual I/O bits or channels can be
controlled. It differs in that it is used specifically with opto-isolator racks and it executes much
faster.
RELATED: OPTO function
EXAMPLE: 10 OPTO 3,ON
20 PRINT OPTO(103)
RUN
1
In this example channel 3 was turned on. Thus, a 1 is returned.
ERROR: < Data negative> channel and value
< Data out of range> - if channel > 23 or value > 1 or ON/OFF
Zobrazit stránku 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 207 208

Komentáře k této Příručce

Žádné komentáře