0

Data Generation (version 25)

If wanting to generate simulated data for testing purposes, Canary offers three options:

  1. Data Generation Tool
  2. Data Generation Service
  3. OPC DA SimDataServer

Options 2 and 3 are more sustainable and can run in the background while option 1 is better suited for ad hoc data generation.

Data Generation Tool

The Data Generation Tool can be used to write simulated data to the Historian using the Store and Forward (SaF) service or to an MQTT broker using a SparkplugB or JSON payload. To run the application:

  1. Ensure the Data Generator is installed. (The user may also want to install the 3rd-party Mosquitto MQTT Server which is included in the Canary installer if wanting to test the MQTT portion of the Data Generation Tool.)

  2. Open C:\Program Files\Canary\Collectors\Data Generator\Canary.Collector.DataGeneration.UI.exe if using the default install location.
  3. By default, a sample tag list is already created. Select a tag from the list to edit its properties or to add/remove tags.

  4. The Target field is used to determine the payload method for logging data. If wishing to write to the Historian using the SaF service, no action is required. Otherwise, the user can select between MQTT, MQTT_JSON_Canary, or MQTT_JSON_Kepware. This may be useful when wanting to collect data using Canary's MQTT Collector. The MQTT option will publish a SparkplugB payload to the broker. The Canary and Kepware option will publish a JSON payload that corresponds to the message parser options which Canary's MQTT Collector can consume. (See MQTT Collector Tile for more information regarding message parsing.)

  5. If choosing an MQTT option, the corresponding C:\ProgramData\Canary\DataGeneration\LogTarget file must be edited to configure the host name of the MQTT server along with the topic where data will be published and other settings. If using a local Mosquitto broker, Host can be left as Localhost.


    If choosing the SAF2 option, the user can specify the Historian server name and the Data Set where it will be stored.

  6. Once the desired tags and configuration is set, select Logging>Start to begin logging. The Data Generation Tool will log data until the application is closed.

  7. (Optional) If wishing to save the logging configuration for future use select File>Save. The .dgf file can also be used in the next section when running the Data Generation Service.


Data Generation Service

The Data Generation Service logs simulated data using .dgf files that are created using the Data Generation Tool mentioned above. To start, first complete the 7 steps above then:

  1. Open the C:\ProgramData\Canary\DataGeneration\data_generation.service.json file.
  2. Add the entire file path of the .dgf file to the RunFiles array.

     
  3. Open Windows Services and start the Canary Data Generation service.

    If wishing to automatically start logging after a system reboot, set the Startup Type to Automatic (Delayed).

OPC DA SimDataServer

Using the Logger Administrator (OPC DA Collector), a user can connect and consume data from the CanaryLabs.SimDataServer. The Logger Admin is Canary's OPC DA client. To log data using the client, the following steps can be taken:

  1. Ensure the OPC DA Collector is installed.

  2. Open the Canary Admin and create a new DataSet within the Historian in which the data will be stored. (The OPC DA Collector is the one Collector which will NOT automatically create the DataSet when logging begins. It must be created first.)

  3. Open the Logger Administrator and create a New Log Session.

  4. Edit the Name, Historian Computer, Group Name, Update Rate, and Normalization Time as desired. If the Historian is local to the Logger Admin, the Historian Computer field can be left blank as it will default to localhost. Otherwise, provide the server name or IP address of the Historian.

  5. Click the ellipsis button next to the OPC Server field to browse and select the CanaryLabs.SimDataServer.

  6. Select Edit>Browse OPC Server...

  7. In the Name Prefix field, type in the name of the DataSet created in Step 2 or select it from the drop-down menu.

  8. Selecting a branch from the left Server Nodes window will reveal tags on the right side which users can then select individually or in groups using Shift+Click. Click Apply if wishing to add more tags from other branches, or OK to add the tags and close the window.

  9. With the desired tags added to the table, click Apply then Save the session.

  10. Start the session. With the session saved and started, the Logger Admin may be closed without interrupting data collection.
  11. (Optional) If wishing to configure the session so that it automatically starts after a server reboot, navigate back to the Canary Admin and open the Logger tile. Provide the entire file path of the saved session from Step 9. The path must be enclosed in "double quotes" if it contains a space.

Reply

null