API Commands Appendix A
A-44 ChartScan User’s Manual
O - Set Digital Outputs
TYPE
System
EXECUTION
Immediate
SYNTAX
Obank1,
bank2,
bank3,
bank4
Set any of the 32 digital outputs (separated into four 8-bit banks) to a
specified setting, where bankn (for n = 1, 2, 3, 4) is an argument in the
form of the number nnn such that 000 < nnn < 255 when converted to
binary format represents the desired settings for the 8-bit bank.
O?
Query current state of digital output.
DESCRIPTION
The Set Digital Outputs (O) command may be used to force any of the 32 digital outputs (separated int o four 8-bit
banks) on the unit to a certain setting. The Bank to Digital Output mapping is as follows:
Bank
Digital Output
1
01 - 08
2
09 - 16
3
17 - 24
4
25 - 32
Each argument bankn represents the desired bit mapping for the corresponding bank of digital outputs. The
argument is a decimal number, which, when converted to binary format is the desired settings for t hat bank of
digital outputs. For example, an argument of 201 for bank2 would be interpreted in binary as 11001001 (with
1 as active high and 0 as active low). This would affect the digital outputs of Bank 2 as follows:
Bank 2 Digital Outputs
9
10
11
12
13
14
15
16
high
high
low
low
high
low
low
high
Note: The setting of a bank will force the digital outputs to the specified setting regardless of the current state of
the digital outputs (such as if an alarm has been assigned to the output).
If it is desired to not affect a certain bank (maybe because it is being used for alarm out puts), a value of 999 can
be used for the argument for that bank. This will effectively “mask off” that bank from being updated.
There are 8 digital input lines and 32 digital output lines available on a rear panel DB50 connector. The digital
output can be controlled either “automatically” via the alarm settings or manually using the Set Digital Outputs (O)
command. To determine the digital output state, use the User Status (U) comm ands.
The Set Digital Outputs (O) command allows you to enter an output range and specify whether the output should
be cleared (logic false) or set (logic true). This command will force the specified digital output to the specified
condition. A 1 will drive the corresponding digital output(s) high. Conversely, a 0 will drive the corresponding
digital output(s) low.
Each digital output line will drive 5 standard TTL loads. All digital input lines are one-eighth (0.125) TTL loads. All
inputs are protected against damage from high static voltages. Normal precautions shoul d be taken to limit the
input voltages to 0.3 to 5.3 volts. All digital I/O lines are referenced to digital ground.
EXAMPLE
PRINT#1, “OUTPUT07;O?X”
‘ Get the current state of the digital outputs banks
PRINT#1, “ENTER07"
‘ Screen shows O128,255,065,024
LINE INPUT #2, N$
PRINT N$
PRINT#1, “OUTPUT07;O0,999,76,234X”
‘ Set Banks 1, 3, and 4
PRINT#1, “OUTPUT07;O?X”
‘ Get the current state of the digital outputs
PRINT#1
‘ Screen shows O000,255,076,234
‘ Note that Bank 2 did not change
LINE INPUT #2, O$
PRINT O$