Template:X-Series/7/IO

From ZaberWiki
Jump to navigation Jump to search

I/O Usage and Examples

The {{{Device}}} features one digital input and two digital outputs that operate on a +5 V supply are TTL compatible. The input and output capabilities of the {{{Device}}} can also be used with triggers to perform actions based on the current value of the I/O channel.

Digital Inputs

The input will draw up to 1 mA during operation.

Input circuit for D12.png

Reading the input is accomplished by sending the unit an io get di command, as shown below.

/1 io get di 1↵
@01 0 OK IDLE -- 0

This command queries the input on the device, in this case input 1, which is low.

Digital Outputs

The digital outputs use an open collector buffer with a pre-installed 1 kΩ pull up resistor to +5 V. Each output can sink up to 20 mA.

Output circuit for D12.png

The digital outputs are set through the io set do command, as shown below.

/1 io set do 2 1↵
@01 0 OK IDLE –- 0
/1 io set do 1 0↵
@01 0 OK IDLE –- 0

The first command sets the second digital output high (5 V). The second command sets the first digital output low (0 V).