Hardware I/O smartCORE module
Description
The "hwio" module
- writes the content of Boolean smartCHANNELs to digital outputs
- reads the content of digital inputs into Boolean smartCHANNELs
Interfaces & protocols used
Different GPIO pins depending on smartDEVICE, in the following digital inputs
- DIGITAL_IN_0
- DIGITAL_IN_1
and digital outputs
- DIGITAL_OUT_0
- DIGITAL_OUT_1
- STATUS_LED_0
- STATUS_LED_1
- STATUS_LED_2
In addition, any number of persistent cloud channels (in terms of system restart) are supported. are supported, these have the type
- CLOUD_IN
JSON configuration
The following section describes the entire JSON configuration of the module and explains the individual parameters.
Example configuration
{
"module": "HWIO",
"factory": "hwio",
"config":{
"timeoutMs":100,
"inChannels":[
{
"name": "DIGITAL IN 0",
"id": "DIGITAL_IN_0",
"persistent":false,
"bufferSize":10
},
{
"name": "CLOUD IN 0",
"id": "CLOUD_IN",
"persistent":false,
"bufferSize":10,
"stateFile":"/sdi/config/cloudInChannels.ini"
}
],
"outChannels":[
{
"name": "Some Boolean channel",
"ids":[
"DIGITAL_OUT_1",
"STATUS_LED_2"
]
},
{
"name": "CLOUD IN 0",
"ids":[
"STATUS_LED_0"
]
}
]
}
}
Parameter list
parameter name | required | data type | meaningful value range | default | description |
---|---|---|---|---|---|
timeoutMs | No | INT | 1 - | 1000 | Polling Interval [ms] |
inChannels | No | see below | Specification of the digital inputs / cloud channels | ||
outChannels | No | see below | Specification of the digital outputs |
Configuration of the digital inputs
Parameter name | Required | Data type | Meaningful value range | Default | Description |
---|---|---|---|---|---|
name | YES | String | valid unique channel name | ||
id | YES | string | hardware ID of the digital input (see above) | ||
persistent | no | BOOL | false, true | false | should the channel (with regard to all stateMACHINE transitions) be created persistently? |
bufferSize | No | INT | 1 - | 10 | Buffer size of the channel |
Configuration of the cloud input channels
Cloud channels for transmitting Boolean signals from the dashboard to the hwio module also support the following attributes
Parameter Name | Required | Data Type | Meaningful Value Range | Default | Description |
---|---|---|---|---|---|
stateFile | No | String | Valid path to persistent state storage (regarding system restart) |
Configuration of the digital outputs
Parameter Name | Required | Data Type | Meaningful Value Range | Default | Description |
---|---|---|---|---|---|
name | YES | String | valid channel name of a Boolean channel | ||
ids | JA | JSON Array | List with hardware IDs of the digital outputs (see above) |
Module information
Information | Value |
---|---|
Author | optiMEAS Measurement and Automation Systems GmbH |
since smartCORE | 0.125 |
Module type | Consumer & Producer |
Dependencies | supported smartDEVICE, optiCLOUD module (optional) |