Connect to a MQTT broker and map points.

TutorialsDevices | Tutorial | How-to Guide | Reference


This Tutorial Teaches how to:

  • Configure MQTT client
  • Subscribe to topics
  • Publish tag values using Sparkplug B
  • Map topics to tags

Prerequisites:


1. Configure MQTT Client

  1. Navigate to Devices → Protocols
  2. Select MQTT Message Queuing Telemetry Transport 
  3. Create channel:
    • Name: MQTTClient
    • Protocol: MQTT Client
  4. Go to Device → Nodes
    1. Name: IoT_Sensors
  5. Open PrimaryStation and configure:
    1. BrokerURL: 127.0.0.1
    2. Port: 502
    3. ClientID: FrameworX



2. Create Points

  1. Navigate to Devices → Points
  2. Add points for each expected topic:

Temperature Tank 1 Sensor:

  • TagName: TankFarm/Tank1/Temp
  • Node: IoT_Sensors
  • Topic: TankFarm/Tank1/temperature
  • AccessType: Read

Temperature Tank 2 Sensor:

  • Name: TankFarm/Tank2/Temp
  • Node: IoT_Sensors
  • Topic: TankFarm/Tank2/temperature
  • AccessType: Read

Temperature Tank 3 Sensor (write):

  • Name: TankFarm/Tank3/Temp
  • Node: IoT_Sensors
  • Topic: TankFarm/Tank3/temperature
  • AccessType: Write



3. Test Connection

  1. Start Runtime
  2. Open Devices → Devices Monitor
  3. Use MQTT client tool (like MQTT Explorer) to:
    • Publish test messages
    • Verify FrameworX publishes

In this section...