Skip to main content

SQLite3 Driver

Driver that can read and write on an SQLite3 database table. The table should include at least two TEXT columns including the name and value of the variables. The value in TEXT format will be converted by the driver to the defined datatype.

Parameters

Aside from the common parameters described in the communication_driver docs, this driver includes:

ParameterDefault ValueDescription
addressmydb.dbThis is the path of the database.
tablevariablesThis is the name of the database table where the variables are located.
variable_columnnameThis is the name of the column which includes the variable names.
value_columnvalueThis is the name of the column which includes the variable values.

Setup data

The setup data will give values to the parameters required and will specify the I/O variables info.

{
"parameters": {
"address": "C:\\TEMP\\mydb.db",
"table": "variables",
"variable_column": "name",
"value_column": "value"
},
"variables": {
"inputs": {
"datatype": "byte",
"size": 1,
"operation": "write"
},
"outputs": {
"datatype": "byte",
"size": 1,
"operation": "read"
}
}
}
note

The setup_params in the generic PLC components for sqlite3_conn will need the following format:

{ "address": "C:\\TEMP\\mydb.db", "table": "variables", "variable_column": "name", "value_column": "value" }