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.
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.
Each of the 8 physical pins on the DLP-IO8-G can be either an input or an output.
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
When a device pin is a digital output, the pin will have an electrical value equivalent to the logical value (
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:
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.
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:
If you want the device to have 8 temperature sensing input pins, type the following into your Console or into a Script:
If you wanted 8 digital outputs, starting in the
If you wanted pins 1-3 analog inputs, 4 & 5 digital inputs, 6 & 7 temperature inputs, and 8 a digital output initialized low:
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: