For this purpose, you can now add ‘metadata’ to each tag in your resource file which will become part of the flow message. Once the metadata is part of the message, you can apply specific processing based on it.
Add metadata to your data tags in resource file.
Metadata will be added to flow messages.
Define processing logic in your flow that uses the metadata.
Simplify your flows.
Gain advantages in regards to scalability.
Fully controllable via API.
Once the concept is understood, you need to think about what metadata is useful in your specific use case. We will show two use case examples by the end of this article to give you some ideas.
Example S7 resource file
The above example shows the required information needed to define a tag for the S7 Reader module. Any additional properties you add to the tag definition will be treated as custom metadata and will be copied to the output messages for this tag. You can add basic data types (numbers, strings and booleans), but also objects and arrays.
Let's say we now want to add the ‘site’ and ‘production_line’ because we want to be able to run analytics for specific production lines in specific sites. In addition to that, we add the unit because some values have to be converted, ie. °C to °F. Beside that, we want to route different data tags to different topics on the local MQTT broker to make them available for other flows or external applications.
Example S7 resource file with custom metadata
Resource files are often created with external tools outside of Crosser and are then uploaded to the Crosser Control Center via the API or through the UI. Once the resource file is available, you can map it into the module configuration (either direct or via parameter overwrite).
Some modules expect settings to either be configured, or to be available on the incoming flow message on a specific topic. As an example, the MQTT Pub Client module will check the topic which is configured. If the setting is not specified, it expects the topic information to be part of the flow message, on the property ‘topic’. You can also use the template syntax in other modules to pick up the value from the incoming message {topic}.
The module will use the tag-specific topic from the resource file
Different production sites across the globe.
Main-Meters and Trafos connected via Modbus TCP, Sub-Meters via Modbus RTU to Main-Meters.
Energy meters separated into different levels.
Requirements:
Create topic hierarchy within the flow.
Label every data tag for advanced analytics in cloud.
Introduce tag-specific logic due to transformer ratios.
Unify flows to re-use across all sites.
Crosser Node runs on distributed assets in end-customer environments.
S7 PLC controls different physical assets (Scanners, Sensors,..).
Requirements:
Separate data acquisition from processing.
One processing flow per physical asset.
End-customer specific data routing to cloud.
End-customer specific processing in cloud.