You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 13
Next »
This Tutorial Teaches you to:
- Start the MQTT internal broker
- Start the MQTT SpB Simulator
- Set up publishers using Device channels
- Set up collectors using Device channels
- Set up TagProvider Services
1. Setup MQTT Environment
Start Built-in MQTT Broker
- Go to DataExplorer → MQTT Tools
- Click Start button for Local Built-in Broker (check the message on the right side or the icons to make sure it's not already running)
- Status shows "TMQTTBroker is Running"
Start MQTT Simulator
- In same panel, find MQTT Publisher Simulator section
- Click Start for simulator
- Status show "Simulator is Running
Create Device Channel
- Go to Devices → Channels
- Click New Channel
- Configure:
- Protocol: Mqtt SparkplugB Publisher
- Channel Name: SpbPublisher
- Group ID: SpbPublisherGroup
- Click OK
Create Device Node
- Go to Devices → Nodes
- Click New Item
- Configure:
- Node Name: SpB_Publisher_Node
- Channel: SpbPublisher
- Node ID: SpbNode
- Click OK
- On Primary Station, once its using the local broker, just by pressing Test it should show the OK message
Create Tag User Type
- Go to Unified Namespace → User Types
- Click on Insert new
- New Name: MotorSpb
- Create new UserType
- In the MotorSpb UserType add:
Name | Type |
---|
Temperature | Double |
Pressure | Double |
RPM | Integer |
Create Tag using UserType
- Go to Unified Namespace → Tags
- Add the tag Motor1 and set type to use MotorSpb UserType
- Go to Devices → Points
- Add:
- TagName: Motor1
- Node: SpB_Publisher_Node
- Address: Motor1SpB
3. Test Publisher
Start Runtime
- Press F5 to start test mode
- Open Property Watch
- Navigate to Tag.Motor1
- Change Values
Verify Publishing
- Return to DataExplorer → MQTT Tools
- Click Refresh on connected browser
- Navigate to topic:
LocalBroker/spBv1.0/SpbPublisherGroup/SpbNode/Motor1SpB
- See published metrics:
- Change values in the property watch to see them reflecting here
Create TagProvider Services Connection
- Go to Unified Namespace → TagProvider Services
- Click New Item...
- Configure:
- Name: MqttSpB_Collector
- Provider: MQTT SparkplugB Collector
- Access Mode: Read
- Click Test (the OK message should show up)
- Click OK
Create Asset Folder
- Go to Unified Namespace → AssetTree
- Create folder MqttSpb
- Click on Insert Data from TagProvider
- Navigate the tree TagProvider Services → MQTTspB and select this folder
- Now you can navigate into the tree and the entire structure will be available to use
In this section...
The root page @parent could not be found in space 93Draft.