Specifications

Commands - 85
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.
REMARKS: Inputs and outputs are active low when interfacing with opto-isolator racks. 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 OPTO 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.
The channel parameter ranges from 0 to 3 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 turn the output off,
enter a 0 or OFF. The ON and OFF execute faster than 1 or 0.
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