How-To Guides
DeviceHub Guides

Use the PLC-Status Topic to Verify Connection Status

3min
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 the plc status topic is used to verify the connection of devicehub devices user scenario you'd like to verify the connection status of a plc to manufacturing connect edge from a remote location set up and use the plc status topic to set up and use the plc status topic follow the steps to connect a device docid\ nm1lqfefya dsiffitity for this user scenario, a simulator generator device is used navigate to devicehub in the generator device tile, click the action menu , click copy topics , and then select the plc status topic this will copy the plc status topic you will refer to this topic later on navigate to flows manager for a flows manager, click the go to flow definition icon the flow canvas opens in a new browser tab on the flow canvas, drag the datahub subscribe node and debug node onto the canvas then, connect the two nodes double click the datahub subscribe node the edit datahub subscribe node dialog box appears in the topic field, paste the plc status topic you copied in step 3 if needed, configure the datahub subscribe connection see the step 3 configure connector nodes section in create a flow docid\ veeod3n3slcasdleedzbr to learn more click done , and then click deploy expand the message window beneath the flow click the debug icon to view debug messages confirm the debug node is activated the debug window displays a "success" true message, which means the device is successfully connected to manufacturing connect edge if the device is not connected, did not respond in time, or is not properly configured in manufacturing connect edge, "success" false will display the rest of the payload displays the following information from the device data type the data type used to verify the plc status the bit data type displays two values 0 for on/connected and 1 for off/disconnected value the bit value that displays the status of the device the value 0 means the device is on/connected device name the device name you configured in manufacturing connect edge timestamp date and time data for the plc status message device id the device id for the datahub device generated in manufacturing connect edge description the default description for the plc status topic (poll register)