Product Features
...
DeviceHub
Tags

Default Topics and Descriptions

11min

Review the following information on default topics and descriptions.

To review use cases for topics, see Topic Use Cases.

Notes:

  • You need to follow the following guidelines for topic names: Subject-Based Messaging.
  • When publishing structured data such as JSON, you must convert to a byte array (string) first. To do this in a flow, you can use the json node.

Data Publishing Formats

DeviceHub collects data from PLCs and sends data to a message broker for further distribution. Data flows trigger using an API call or execute according to a schedule. Manufacturing Connect Edge supports multiple data formats.

Refer to the following formats used for data in devices.

Raw Topics

DeviceHub Tags generate a Raw Topic, which is a local topic for publishing and subscribing data through the message broker.

Manufacturing Connect Edge publishes each value to a tag-specific topic in the following topic format: devicehub.raw.{deviceID}.{tagID}.

Device Raw Topics

When you copy a raw topic for a device in Manufacturing Connect Edge, the topic is copied in the following format: devicehub.raw.{DeviceID}.>. The ">" character represents a wildcard. This means that the topic will be used for any tag associated with the device.

Example of a Raw Topic

devicehub.raw.F7F72687-2F29-46E7-95E2-B5532471EBAA.2d7473c0-83a0-4174-83cc-b48a63c1b1cf

Example of a Raw Device Topic

devicehub.raw.16AC16F7-5E36-4EA0-8D00-17386C051281.>

Alias Topics

When you Connect a Device, you have the option of using the Enable alias topics option. If you select to use alias topics for a device, then you won't be able to use raw topics as well. Each connected device can either use alias topics or raw topics, not both.

Important: When alias topics are enabled for a device, you can't use batch write topics. To use batch write topics, you must not select the Enable alias topics check box in the device configuration. See Connect a Device and Manage Devices for more information.

When the Enable alias topics check box is selected:

  • deviceId in the raw topic format is replaced with deviceName
  • tagId in the raw topic format is replaced with tagName

Alias topics use the following format: devicehub.alias.{devicename}.{tagname}.

Example of an Alias Topic

devicehub.alias.plc2.tag1

Write Topics

Write topics write data to a tag-specific topic in the following topic format: devicehub.write.{deviceID}.{tagID}. Each device instance on the devicehub.write.{deviceID}.* topic receives all messages for the corresponding device. The device instance executes a write to the specified tag on the connected device.

Example of a Write Topic

devicehub.write.F7F72687-2F29-46E7-95E2-B5532471EBAA.2d7473c0-83a0-4174-83cc-b48a63c1b1cf

Batch Write Topics

Batch write topics can send multiple write requests simultaneously in the following format: devicehub.batch_write.{deviceID}.

Important:

  • Only Gen 2 drivers can use batch write topics. See the Industrial Systems Connection Guide to review available Gen 2 drivers.
  • This is only available for devices that don't select the Enable Alias Topics check box in the device configuration. You must use tags in the raw topic format. See Connect a Device and Manage Devices for more information.

Example of a Batch Write Topic

devicehub.batch_write.710B913B-B915-4450-9122-8D57E803499B

Poll-Once Topics

Poll-once topics can be used to trigger a poll to a tag for data in the following topic formats:

  • If raw topics are enabled: devicehub.pollonce.{deviceID}.{tagID}
  • If alias topics are enabled: devicehub.pollonce.{deviceName}.{tagName}

When a poll-once topic is triggered by a message, Manufacturing Connect Edge will get data for that tag and publish a message to the raw or alias topic for that tag.

Example of a Poll-Once Topic

devicehub.pollonce.F7F72687-2F29-46E7-95E2-B5532471EBAA.2d7473c0-83a0-4174-83cc-b48a63c1b1cf

Topic Formats

The following table summarizes the types of device-level and tag-level topics, either with or without aliases. You have the option of using raw topics or alias topics.

Category

Topics

Notes

Device

devicehub.plcstatus.{DeviceID}

Subscription to a device status

Device

devicehub.manage.{DeviceID}

To START/STOP the device's CONNECTION

Device

devicehub.raw.{DeviceID}.>

Publish/Subscribe to all data from a specific Device. The ">" character represents a wildcard.

Device

devicehub.plcstatus.{DeviceName}

To monitor the device's CONNECTION/DISCONNECTION status with Alias topics enabled

Device

devicehub.manage.{DeviceName}

To START/STOP the device CONNECTION with Alias topics enabled

Device

devicehub.raw.{DeviceName}.>

A wildcard to receive messages from all tags added to the device with Alias topics enabled. The ">" character represents a wildcard.

Device

devicehub.batch_write.{DeviceID}

Send multiple write requests simultaneously

Tag

devicehub.pollonce.{DeviceID}.{TagID}

Trigger this topic to get data from a tag one time

Tag

devicehub.pollonce.{DeviceName}.{TagName}

To receive data from a poll-once raw topic with Alias topics enabled

Tag

devicehub.raw.{DeviceID}.{TagID}

To receive data in raw format

Tag

devicehub.write.{DeviceID}.{TagID}

To write data

Tag

devicehub.alias.{DeviceName}.{TagName}

To receive data in raw format with Alias topics enabled

Tag

devicehub.write.{DeviceName}.{TagName}

To write data with Alias topics enabled

Events

system.events

Subscription to all system events