Tracking MQTT Server Connection Status in Aveva InTouch: Resolve Connectivity Issue with Access Name Tag $SYS$STATUS

Question:

Hello, AVEVA OI system offers drivers like ABCIP and MBTCP with a specific register named $SYS$STATUS, which can be linked to a Discrete tag in Intouch to track the driver's connection status to the PLC. However, attempting to create a similar tag for the MQTT driver's Access Name consistently results in a False value. The SMC diagnostics further indicate that the $SYS$STATUS value has poor Quality, suggesting that it is not accessible from the driver. Despite adding other MQTT tags successfully, this issue persists. While I have reviewed the driver manuals, there appears to be no mention of monitoring the connection status. The only reference to $SYS is in terms of priority, without specifying the actual $SYS tag names. The driver does monitor the connection, as evidenced by log entries in the SMC when the MQTT server is stopped or restarted. Is there a method to track the MQTT server connection status within the InTouch application? Any guidance on this matter would be greatly appreciated.

Top Replies

It is essential for $sys$status to function consistently at a high quality, irrespective of the broker's status. The status itself should be indicated by the values 0 or 1. Occasionally, the server may mistakenly perceive system items to be inactive. To address this issue, navigate to Global Parameters and follow these steps: disable System Items, save the changes, re-enable System Items, save again, and then reactivate OI MQTT.

Thank you for your response @ynpmoosethank. I followed your instructions, but unfortunately, the issue persists. The $sys$status parameter continues to show "bad" quality in the SMC dashboard. Despite all other MQTT tags displaying good quality, the $SYS$STATUS tag consistently reports as bad and stays as False. I tried restarting the OI.MQTT.1 driver, disabling and re-enabling System Items, but to no avail. I am seeking alternative solutions to have it switch to False when the connection to the MQTT server is lost. As a temporary fix, I set up a cron script on my cloud-based Moquitto MQTT server to publish the unix timestamp to the "heartbeat" topic every minute. In addition, I created a runtime script in InTouch to increment a Memory Integer "counter" every second, and an On-Change script to reset the counter whenever the "heartbeat" topic updates. An alarm triggers if the counter exceeds 60 seconds, indicating a lost connection with the MQTT server. Although this workaround is effective, I would prefer to utilize the $SYS$STATUS variable for this purpose. I am also utilizing the IOStatus topic to monitor the MQTT driver status, ensuring it reflects the correct status in case of service interruption or crashes.

In some of the early versions of Intouch drivers, a common practice was to use the item name "STATUS" instead of "$sys$status." Have you attempted to test this method to see if it is effective?

If you encounter issues with the $sys$status tag, it's recommended to reach out to AVEVA support for assistance. Your workaround involving timestamps is a valuable solution. The unexpected behavior you are experiencing may require further investigation.

Hi there, the issue you've encountered is indeed interesting. Based on my experience, it's important to remember that MQTT differs from other traditional industrial automation protocols. While ABCIP or MBTCP are designed to have constant contact with individual PLC tags, MQTT is more of a publish-subscribe pattern where the client may not have a direct connection link like we're used to with other protocols. So, checking the connection status may not behave as expected. Try looking into MQTT's concept of "Last Will and Testament," which allows a broker to notify other clients about an ungracefully disconnected client. This process should give you a rudimentary MQTT connection status monitoring, albeit a more indirect and convoluted approach.

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. Can I track the MQTT server connection status in Aveva InTouch using a similar method as with other drivers like ABCIP and MBTCP?

Answer: While drivers like ABCIP and MBTCP allow tracking the connection status using the $SYS$STATUS register, attempting to create a similar tag for the MQTT driver's Access Name may result in a False value and poor Quality indication.

FAQ: 2. Why does the MQTT driver in Aveva InTouch show poor Quality for the $SYS$STATUS value, despite successfully adding other MQTT tags?

Answer: The MQTT driver may not provide direct access to the $SYS$STATUS value for monitoring connection status within InTouch, as observed through SMC diagnostics indicating poor Quality for this particular tag.

FAQ: 3. Are there specific references or methods in the driver manuals for monitoring MQTT server connection status in Aveva InTouch?

Answer: There may not be explicit references in the driver manuals regarding monitoring the MQTT server connection status using $SYS tags. However, the driver does monitor the connection, which is evident from log entries in the SMC when the MQTT server is stopped or restarted.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’