TN 017: Creating a “Watchdog” between a PLC/HMI and Dream Report

You can use Dream Report’s ability to write back to a tag/item/register, exposed through a real-time data source, when a report runs. The approach is to create a “dummy” report, that either runs on a schedule (e.g., every 1 minute) or Event-generated from a value in the PLC/HMI, and then use that report to write a value back to the PLC/HMI.

1. In Dream Report Studio, create a new report, and in the “Report Time Definition” of the Report Properties, set the report to “Execute Report Each” 00:01:00 (every 1 minute, for example):

2. In the Report Properties, for the “Report Name Format”, make sure to use a fixed string, which will ensure that the report gets overwritten each time it executes – for example:

3. Add one Expression Object to the report, and set it to a constant value, such as 0:

4. On the “Appearance” tab of the Expression object, use the “Write Result Back to Data Item” feature to point to the PLC/HMI tag you want to poke this value into:

5. Save and reload the project.


Once the Dream Report project is running, the “dummy” report will run every minute, and write a “0” into that PLC/HMI tag. It’s then up to the user to create some watchdog logic in the PLC or HMI – for example, logic that periodically increments the value of the register, and if the logic doesn’t see a value of “0” within some timeout period (or sees the register constantly increasing and never being reset to 0), then you can assume that either:
• The Dream Report project is not running; or
• That Dream Report is running, but can’t see the register in the PLC/HMI to write back to – i.e., communication issues between Dream Report and the PLC/HMI. 

There are other ways of doing the watchdog logic, but the key is using the “Write Result Back to Data Item” feature in any approach you take.