Intercepting the "No Communication" message

Discussion of configuring and troubleshooting communication to PLC's or other devices using iX Developer.
Post Reply
mwilk
Posts: 15
Joined: Fri Apr 05, 2013 1:48 pm

Intercepting the "No Communication" message

Post by mwilk »

When the HMI loses communications with the controller, we get a "No Communication" popup message.

I would like to intercept that and replace it with a screen on our HMI that lets our service personnel know what is happening and how they can test/restore communications with our controller.

How can I catch the popup and replace it with our own?

Thanks.

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Intercepting the "No Communication" message

Post by mark.monroe »

There is no way to alter the Comm error message box. Some Controller drivers allow you to disable/enable the Comm error message box. You can check the controller driver to see if you have the option. There is a system tag which you can use that will alert you to any communication errors.

You could use the Comm error system tag to open a popup screen/dialog box by associating the screen show action with the tag. That could be done even if you cannot disable the comm error in the controller driver, you would just get the comm error and your dialog box at the same time.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

mwilk
Posts: 15
Joined: Fri Apr 05, 2013 1:48 pm

Re: Intercepting the "No Communication" message

Post by mwilk »

Mark,

Thanks. I just found under "Tags > Controllers > Settings > Advanced > Hide Comm Error (True/False)"

If this works the way I expect, then I can turn off the system pop-up message.

Now, I'd like enable our own screen to pop-up.

How do I enable the Comm Error System tag to generate a pop-up? Do I add it to the alarms and set an action? Are there other, better ways?

I don't want to have to do this for each of our screens, I'd like this comm error action to be able to happen regardless of the screen that is being displayed.

Thanks again.

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Intercepting the "No Communication" message

Post by mark.monroe »

As I already mentioned, you can associate actions with tags. When the comm error system tag goes higher than 0, then your action associated with the tag will fire. It does not matter what screen is open, as the action fires when the tag reaches a specific value.
Snap 2013-10-17 at 10.30.57.jpg
Snap 2013-10-17 at 10.30.57.jpg (41.96 KiB) Viewed 22789 times
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

mwilk
Posts: 15
Joined: Fri Apr 05, 2013 1:48 pm

Re: Intercepting the "No Communication" message

Post by mwilk »

Perfect. I'll try it now.

Thanks

mwilk
Posts: 15
Joined: Fri Apr 05, 2013 1:48 pm

Re: Intercepting the "No Communication" message

Post by mwilk »

OK - that system tag works great.

But...

What it will tell me is there is a physical loss of communication with the PLC (power off, disconnected Ethernet cable). But it does not tell me anything about the status of the program inside the PLC.

The next question:

How do I set up a watchdog so that I can monitor if the program inside the PLC is running or stopped?

The PLC can be programmed to toggle a tag on/off, but what can I do in the HMI to monitor that tag and take an action (like display a "PLC has stopped" screen) if that tag doesn't toggle after a certain amount of time?

I know I can take an action on a tag on a condition, but is there a method to monitor that condition and take an action if it doesn't change?

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Intercepting the "No Communication" message

Post by mark.monroe »

There is no built in Watchdog functionality in iX Developer. You will have to create a program in C# to monitor the tag. You could create a timer and have the timer monitor the tag.

Pseudo code assuming a cyclical counter for the watchdog:
Timer checks value of tag and records it.
Timer checks value of tag and compares old value and current value.
If old value and new value match, PLC has stopped. If they do not, record current value.

By using a cyclical counter for the watch dog issues with how fast you poll the watchdog are eliminated.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

mwilk
Posts: 15
Joined: Fri Apr 05, 2013 1:48 pm

Re: Intercepting the "No Communication" message

Post by mwilk »

Thanks Mark.

That's the direction I was heading next anyway.

Post Reply