Placing a Powerup event flag in the Alarm List/Alarm History
While we're on the topic, I had something related that I tested this week and wanted to mention. It's very simple in retrospect, but I had not done it until now.
Step 1: I created an HMI Tag called 'Powerup_Flag'. It's a Digital type tag, with Memory selected as the data source. The Initial Value is zero, and the Retentive checkbox is cleared.
Step 2: I created a FactoryTalk View Macro called 'Startup'. All it does is set Powerup_Flag equal to 1.
Step 3: I configured the FactoryTalk View ME project to run the Startup macro when it started up. This is done in the Startup section of the project tree by choosing the name of the Startup macro in the 'Startup Macro' field, and checking the box next to that field to indicate you want that to run at startup.
Step 4: I used Powerup_Flag as an Alarm Trigger, with a message containing text to the effect of 'PanelView Plus has Rebooted'.
When the terminal powers up, the Powerup_Flag is set =1 and detected by the Alarm subsystem. This places a timestamped entry into the Alarm History where I can find it later, telling me that the terminal has been restarted or that the FactoryTalk View ME application has been restarted.
Because the tag is a Memory Tag with an initial value of 0, and it is not set to be Retentive, the tag is set back to zero the next time FactoryTalk View ME is started, so it can be detected as a value of 1 by the Alarm subsystem again.
Very often when I'm troubleshooting, I am told 'we never had a power outage, and we never shut the machine off'. This helps me tell customers exactly when one of those two things happened.