Skip to main content

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 namerequireddata typemeaningful value rangedefaultdescription
timeoutMsNoINT1 -1000Polling Interval [ms]
inChannelsNosee belowSpecification of the digital inputs / cloud channels
outChannelsNosee belowSpecification of the digital outputs

Configuration of the digital inputs

Parameter nameRequiredData typeMeaningful value rangeDefaultDescription
nameYESStringvalid unique channel name
idYESstringhardware ID of the digital input (see above)
persistentnoBOOLfalse, truefalseshould the channel (with regard to all stateMACHINE transitions) be created persistently?
bufferSizeNoINT1 -10Buffer 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 NameRequiredData TypeMeaningful Value RangeDefaultDescription
stateFileNoStringValid path to persistent state storage (regarding system restart)

Configuration of the digital outputs

Parameter NameRequiredData TypeMeaningful Value RangeDefaultDescription
nameYESStringvalid channel name of a Boolean channel
idsJAJSON ArrayList with hardware IDs of the digital outputs (see above)

Module information

InformationValue
AuthoroptiMEAS Measurement and Automation Systems GmbH
since smartCORE0.125
Module typeConsumer & Producer
Dependenciessupported smartDEVICE, optiCLOUD module (optional)