Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums
Small_clear_logo_llc

DLP-IO8-G Device

The DLP-IO8-G is a general purpose sensing and control device supporting up to eight separate physical connections. The connections are called "1", "2", ... "8". Each connection can be independently configured as a digital input, digital output, analog input, or a temperature sensor(input). When used as a temperature sensor, it requires an external DS18B20 sensor (widely available on the internet). Consult the DLP website for details on connecting temperature sensors.

Terminals Description

The Virtual Wiring IO8-G Device has sixteen terminals. Eight of the terminals are inputs, and eight are outputs. The inputs are called "1", "2", ... "8". The outputs are called "1S", "2S", .. "8S" (see above illustration). At any given time, only eight of the Device's terminals are active. When one of the device's physical pins (1-8) is configured as an input, the corresponding Device output (1S-8S) is active. When a physical pin is configured as an output, the corresponding Device input (1-8) terminal is active.

The IO8-G device pins are configured by calling the Device's "write_read" method (see the DLP Device Shared Methods section) with the appropriate configuration value. On power up, the device defaults to all digital inputs.

Device Operation

Each of the 8 physical pins on the DLP-IO8-G can be either an input or an output.

Input Pins

When a device pin is in input, mode, the pin is polled by the system at regular intervals. After polling, the corresponding Device output terminals are updated with the polled values. Polling is how Device output terminals are updated. The interval is set by the Device installation Script's "poll_interval" parameter. All device input pins are polled at the same interval, and intervals are multiples of 10 seconds (Virtual Wiring releases 1.5.0 and lower), or 1 second (releases 1.5.1 and above).

The value assigned to a Device's output terminal is dependent on the pin mode of the device. When a pin is a digital input, the Device output is assigned on or off values. When a pin is an analog input, the Device output is assigned floating point values from 0.000 to 5.000 (for input voltages from 0V to 5V). Temperature inputs are assigned Fahrenheit or Celsuis floating point values.

Output Pins

When a device pin is a digital output, the pin will have an electrical value equivalent to the logical value (on or off) of the Device's input terminal. The electrical values track the terminal on and off values in real time. When a device pin is an digital output, its Device output terminal is never assigned anything (it's not used)

Installation

To install a DLP-IO8-G device, plug one into a spare USB port on your host system. Next run the IO8 Script in the DLP directory. The parameters for the IO8 Script are:

port_location :

  • the location of the DLP-IO8-G USB port. In *nix systems, this is in the /dev directory with a name like /dev/ttyUSB0 or /dev/cu.usbserial-00001004. Type "ls -lrt /dev" for hints.

poll_interval :

  • the period in seconds for polling the device's inputs. For Virtual Wiring releases 1.5.0 and earlier, the poll interval can be as short as 10 seconds (lesser intervals will be rounded up to 10 seconds). Releases 1.5.1 and later support polling intervals as short as 1 second (lesser intervals will be rounded up to 1 second).

Once you have installed your Device, call the Device's "write_read" method to configure its device pins (see DLP Device Shared Methods). When you "write_read", you will be sending odd little quoted character strings. These characters are commands taken from the DLP-IO8-G data sheet. When you issue a "write_read" command which reads a certain type of value from a pin, that pin becomes an input pin of that type. Similarly, issuing a command that writes a certain output value to a pin makes that pin an output pin initialized to that value.

Example

To add a DLP-IO8-G Device with ID "io8", port_location "/dev/ttyUSB0", and a poll interval of 30 seconds, run the IO8 Script with the following parameters:

id: "io8"
poll_interval: 30
port_location: "/dev/ttyUSB0"

If you want the device to have 8 temperature sensing input pins, type the following into your Console or into a Script:

run_script("", text:"write_read \"90-=OP[]\"", on_device:"io8")

If you wanted 8 digital outputs, starting in the on state:

run_script("", text:"write_read \"12345678\"", on_device:"io8")

If you wanted pins 1-3 analog inputs, 4 & 5 digital inputs, 6 & 7 temperature inputs, and 8 a digital output initialized low:

run_script("", text:"write_read \"ZXCFGP[I\"", on_device:"io8")

Celsius Temperature Output

The temperatures reported by DLP-IO8-G are by default reported in Fahrenheit. If you wish to have your values reported in Celsius, configure your IO8 to report in Celsius. If you write a ";" to your device, it will report temperatures in Celsius (see data sheet). From the Console or from a Script type:

run_script("", text:"write_read \";\"", on_device:<device ID goes here.>)

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)




Page last updated: Thu Jun 5 18:39:05 2014 (UTC)