Issue
How can a communication heartbeat time be detected in Menta?
Can you detect if a value has not changed for more then a specified time period?
Environment
Menta
Cause
There are multiple methods to detect a timeout scenario and which method to use will likely depend on the specific criteria of your application. The included examples are intended to indicate some of the options available that can be built upon to customize your application.
Resolution
These methods can be used to detect if another device has stopped communicating or if another portion of your process logic is stuck.
Timeout Simple
(Click image for AUT file)
This macro block will output a value of one when the input value has not changed for the DelayOn time period and you do not require the previous value for processing.
Timeout Complex
(Click image for AUT file)
This macro block will preserve the last value for use in your process logic if that is necessary.