Skip to main content

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

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

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 NameDescriptionData TypeNotes
brewStation (parameter)Which brewing stationIntegerIdentifier for 20 possible brewing stations, numbered 1-20.
brewTypeWhat product is being brewedStringTag data, values entered by users
waterTempWater temperatureDoubleTag data
statusMachine statusInteger
  • Tag data with the following values
  • 0 = off
  • 1 = brew
  • 2 = clean
  • highSPUpper setpoint for temperature, in degrees FahrenheitDoubleMemory Tag, default value = 80
    lowSPLower setpoint for temperature, in degrees FahrenheitDoubleMemory 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.

    StationbrewTypewaterTempstatus
    Station 1S0/S0:5T8/T8:5N7/N7:10
    Station 2S0/S0:6T8/T8:6N7/N7:11
    Station 3S0/S0:7T8/T8:7N7/N7:12
    ............
    Station 20S0/S0:24T8/T8:24N7/N7:29