GPI | Gets the state of a GPIO Board's input pin of the given Index. |
The GPI Node can be used to get the state of a GPIO Board's input pin (General Purpose Input/Output). It's Index property defines to which pin to listen to. State returns whether the pin is in high (true) or low (false) state.
Ventuz only supports General Purpose Inputs even though the hardware is able to support both Inputs and Outputs.
At the time of writing Ventuz supports the DLP Design IO8 and the Numato 16 Channel USB GPIO boards.
To use a GPIO Board you will need to create a configuration file that provides Ventuz with information on which GPIO Board and which pins are used. To do so copy one of the following XML files to this location:
[Public Documents]\Ventuz5\Configuration\GpioConfig\gpio.xml
Adjust the COM Port and the number of pins used if needed.
DLP Design IO8:
<GPIO> <Devices> <Device> <LogLevel>Info</LogLevel> <Class>Ventuz.Kernel.GPIO.DLPDesign_DLP_IO8, Ventuz.Kernel.Shared</Class> <Port>COM4</Port> <Channels> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> </Channels> </Device> </Devices> </GPIO>
Numato 16 Channel USB GPIO:
<GPIO> <Devices> <Device> <LogLevel>Info</LogLevel> <Class>Ventuz.Kernel.GPIO.NumatoLab_USB_GPIO16, Ventuz.Kernel.Shared</Class> <Port>COM5</Port> <Channels> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> <ChannelType>DigitalInput</ChannelType> </Channels> </Device> </Devices> </GPIO>