Introduction
The GPI IO driver can be used to access I/O boards, such as the I/Os from a Raspberry PI computer.
Driver Configuration
No additional software must be installed to access IO devices.
Task Processor
The driver requires one task processor to read the status of the I/O board.
Content of the setting.json:
{
"Disabled": false,
"Devices": [
{
"MainTaskProcessor": {
"Name": "Main TaskProcessor",
"ProcessingPriority": "Normal",
"MaxSchedulingTimeSlice": 200,
"MinSchedulingTimeSlice": 10
}
}
]
}
Device Configuration
Header
The header of the device information declares the
- Device id
- Driver id (always
{50C53868-7CB8-4FCA-A3CA-1BA6E1F5A9AE}
) - The device address is not used. Specify
localhost
Example:
{
"Id": "974f33ad-38e8-4d82-b3a4-37b22869651d",
"Name": "RaspberryPI",
"DriverId": "50C53868-7CB8-4FCA-A3CA-1BA6E1F5A9AE",
"Address": "localhost",
...
}
Data Access
Following addresses can beused to configure the data access:
Address Base | Description | Example |
---|---|---|
Global | Global addresses of the plugin | Global.0 |
GPIO | Reading an input from the I/Os | GPIO.13 |
RevPi | Reading/Writing variables for Revolution Pi | RevPi.I_1 |
Global Addresses
Global addresses of the GPIO driver:
Address | Description | Data Type |
---|---|---|
Global.0 | Available flag: 0 = Off; 1 = On | System.Boolean |
Global.1 | Sign of life. Toggles in 1Hz | System.Boolean |
GPIO Addresses
The GPIO addresses access directly the GPIO files on the host system.
Address | Description | Data Type |
---|---|---|
GPIO.{x} | Reads the x-th GPIO flag | System.Boolean |
Revolution PI Addresses
Especially for Revolution PI, the GPIO Driver plugin supports reading and writing variables defined in the Hardware Configuration.
Address | Description | Data Type |
---|---|---|
RevPi.{name} | Reads a variable {name} . The datatype is specified in the hardware configuration and dynamically read by the GPIO Driver plugin. | System.Boolean System.Byte System.UInt16 System.UInt32 System.String |
The hardware configuration is written by the application
PiCtory
. Access the application using the web access on the RevolutionPI.
Reading RevPi
addresses are on a higher abstraction level than GPIOs:
:::caution** IMPORTANT
Use rather
RevPi
addresses instead ofGPIO
because GPIOs can change along different hardware configurations. :::