Connections and Tags
Device and Database Connection
Rio Oso needs to set up a tag data source and a means to store those tags in a database for later use.
Criteria
- Create an OPC device connection named RioOso using the Programmable Device Simulator option.
- Download this document RioOso.csv and then load the simulator file to your device to create the needed tags.
- Create a database connection using a MySQL or MSSQL connection type.
Click here for general help with the Device and Database Connection
- Create devices in Device Connections, located on the Config page in the OPC UA section of the Gateway
- The programmable device simulator allows for loading of CSV simulations of tags
- Databases can be connected in Connections, located on the Config page in the Databases section of the Gateway
- A database needs to be set up in Microsoft SQL or MySQL before it can be connected to the Gateway
- For help with device connections OPC UA
- For help with the programmable device simulator Programmable Device Simulator
- For help with database connections Connecting to Databases
- For help with installing databases Installing Databases
Click here for more specific help with the Device and Database Connection
UDTs and Tags
For data efficiency, Rio Oso now needs to aggregate related data for each of their brewing stations, using a new User Defined Type (UDT). They need to create UDT instances for each of their brewing stations, as well as store historical brewing data.
Criteria
- Create a dedicated folder in the Tag Browser for all brewing-related tags
- Create a UDT definition as described in the table below, using the connected RioOso simulator device
- There are 20 stations, each with identical sensor instances. Create 20 UDT instances using the stations and tags described below. Do not allow overrides on any of the instances
- Configure tag history on all tags using the ColdBrewUDT definition from the prior step, using the existing database connection
Click here for general help with UDTs and Tags
- Tag folders can be created within the tag browser through the Add icon
- Browse Devices allows for tags to be added from devices on the Gateway
- Tags can be verified by opening up the tag folder and checking for data
- Tag history can be created in the UDT
- For help with UDTs User Defined Types - UDTs
- For help with the Multi-Instance Wizard UDT Multi-Instance Wizard
- For help with Tag History Tag History
Click here for more specific help with UDTs and Tags
ColdBrewUDT
This table shows the structure of the UDT. The member names noted as tag data will come from device tags on the OPC-UA Server, matching the specific tag information in the Station/Tags section below.
Member Name | Description | Data Type | Notes |
---|---|---|---|
brewStation (parameter) | Which brewing station | Integer | Identifier for 20 possible brewing stations, numbered 1-20. |
brewType | What product is being brewed | String | Tag data, values entered by users |
waterTemp | Water temperature | Double | Tag data |
status | Machine status | Integer | |
highSP | Upper setpoint for temperature, in degrees Fahrenheit | Double | Memory Tag, default value = 80 |
lowSP | Lower setpoint for temperature, in degrees Fahrenheit | Double | Memory Tag, default value = 60 |
Stations/Tags
This table shows how the UDT instances should align with the tags on the devices. Please note that there are 20 total stations, with the tags starting at different numbers within a range.
Station | brewType | waterTemp | status |
---|---|---|---|
Station 1 | S0/S0:5 | T8/T8:5 | N7/N7:10 |
Station 2 | S0/S0:6 | T8/T8:6 | N7/N7:11 |
Station 3 | S0/S0:7 | T8/T8:7 | N7/N7:12 |
... | ... | ... | ... |
Station 20 | S0/S0:24 | T8/T8:24 | N7/N7:29 |