This section describes how to configure connections to OPC UA Servers and selection of OPC UA variables to be accessible from Grafana and/or to log into the database.
To access cocnfiguration web GUI, open web browser, and navigate to the address http://localhost:4880
Here and further below
localhost is host name or IP address of the machine where ogamma Visual Logger is running.
Web GUI of the ogamma Visual Logger is optimized and tested for screen resolution 1920x1080 in full size mode, in Google Chrome and Microsoft Edge. GUI layout might be disrupted in other combinations of browse and screen resolution. If this becomes blocking issue for you, please report it at https://github.com/onewayautomation/ogamma-logger/issues.
Connections to OPC UA Servers.¶
To add new connection, in the left side panel, click on
In the opened dialog window edit connection details as required and click
Timeout is connection timeout in milliseconds. Checkbox
Active allows to turn on and off logging of variable values for this server to the database.
tag can be used for automatic generation of Topic Name for Apache Kafka or measurement for InfluxDB.
OPC UA Servers should be accessible from the host (or Docker container) where ogamma Visual Logger is running. In case when it runs in Docker container, you might need to add option
extra_hosts in file
docker-compose.yml to resolve host name of the OPC UA Server to IP address.
Default value in the
Endpoint URL field (
opc.tcp://opcuaserver.com:48010) points to the Demo OPC UA Server, which runs in the host avaiable from the Internet. It might be protected by firewall and allow connections only from IP addresses included into whilelist. If you cannot connect to it, please contact Support with IP address of your client (not local address like 192.168.x.x.m but the address how it is seen from the Internet, which you can determine by using sites like https://ipstack.com/)
To connect to the OPC-PLC UA Server installed and running in the docker container (Endpoint URL
opc.tcp://opcplc:50000), please turn on check-box
Secure mode, because it is configured to allow only secured connections.
Currently web page is refreshed in order to refresh the
Address Space tree after adding/editing/deleting of an entry for OPC UA Server connection.
Connecting to classic OPC DA Servers.¶
If you need collect real time data from classic OPC DA Servers, it is possible too! There are various OPC DA to OPC UA protocol converter applications available in the market. Using them, data becomes accessible over OPC UA protocol. ogamma Visual Logger for OPC was tested with the following below applications:
Browsing OPC UA Server address space and selecting variables to log.¶
To browse OPC UA Server’s address space, expand server node. Then select one or more OPC UA Variable nodes which has numeric data type (those, for which value can be converted into
float data type, for example, Byte, Int16, Int32, float, double. String type is supported toofor InfluxDb and Apache Kafka. Complex type values can be logged too, but they are not decoded, instead their string representation is used as a value.
Once one or more OPC UA Variables are selected, the button
Log will be enabled. If you click on it, selected nodes will be used to create new records in the right side
Logged Variables grid table.
When variables selected in the Address Space panel added by clicking on the
Log button to the
Logged Variables table, options for them such as publishing interval, sampling interval, queue size will be set according to corresponding valus in the currently selected (default)
To select range of nodes, first press on the
Shift key, then click by mouse on selection checkbox for the first node, and then scroll up or down to the last node of desired range and click on its selection checkbox. Whole range of nodes will be selected.
Logged Variables table.¶
Logged Variables table defines list of OPC UA Variables for which values are collected and logged into time-series database. Some features of the table are highlighted below.
Order of columns can be changed by drag ad drop.
Visibility of columns is configurable: click on Column Chooser icon to select what columns to display.
Sorting by most columns is possible: click on column header in order to sort by that column.
Grouping of logged variables¶
Grouping by one or more columns is possible. In order to group by a column, drag column header and drop it into the grouping area:
Groups and sub-groups can be collapsed or expanded:
Filtering by OPC UA Server.¶
Only Logged Variables belonging to selected OPC UA server can be displayed, or all of them:
How to set default values for logging options.¶
Default values for new records added to the Logged Variables table from address space panel can be set by selecting of a group with desired logging options:
Display real time data.¶
Collector Engine keeps last value received from OCP UA Servers in in-memory buffer. Those values with status code and timestamp can be displayed in the Logged Variables table:
- If a record has field
Log to TSDBchecked, then its value will be monitored by ogamma Visual Logger, and written (logged) into the time-series database (PostgreSQL).
Get History fromdefines where data values should be read from when SimpleJson requests from Grafana are processed:
UA(OPC UA server).
If data values should be read from OPC UA Server, then how it is read depends on value of the column
R means call Read service, and
H means call HistoryRead service.
Display Nameis displayed on Grafana when variable is selected as a metric for SimpleJson data source:
- Records in the
Logged Variablestable can be edited and deleted, as well added manually.
The following below screenshot illustrates typical GUI with brief comments on available controls:
If you want to log data for hundreds or thousands of nodes, it might be time consuming to configure variables using the GUI. For those cases, you can prepare your data in Excel spreadsheet or other tools in CSV format, and then import into ogamma Visual Logger configuration database, table