Knowledge Center

Calculated Timeout – Is Data Moving?

A data flow receives data, but how do we know if it’s continuing to do so regularly? A user might want to know if periods of time go by where data is not flowing.

Data Flow

Let’s assume we have some data arriving. It could be coming in via UDP, or Serial channel, or something else. We’ll use Serial for this example, but the logic applies to any upstream component.

We start by reading the data and capturing some time information.

Get the Time

The Timer provides a steady 1Hz pulse to compare against, causing the downstream Time Converter to forward Seconds (Unix Time seconds). The Time Converter downstream of our Pull Reader serves the same function. Both these paths are sending a count forward when the upstream component does something (ticks, or receives a packet).

Note: There’s more than one way to gather and compare time, but this example normalizes the time values using the converter.

Evaluate

Now we need to compare the time values.

What we want to know is if the last time coming from the Pull Reader‘s flow line is more than 2 seconds behind the one from the Timer‘s flow line. I.e., the Pull Reader has not received any data and has fallen behind.

Result: Output parameter Timeout will be 1 (true) if the reader is behind by more than 2 seconds and 0 (false) if it’s keeping up.

Consuming the Information

Now that we have a Boolean equivalent for a data timeout, it’s possible to use that in multiple ways. You could use that in further logical processing in the data flow, or perhaps display the state for an operator to see. Let’s take a look at the latter using MissionView, but first let’s use the final two outputs to provide friendly time text.

In this scenario we’re providing human-readable text to display the times being compared. You could choose to view this in various displays.

Alarm

Note: Before I get started, my scenario will ensure that data is flowing into my data flow.

Click Alarms -> Manage, then click Add and let’s find the publication Timeout.

We’ll select a Limit Type of Comparison and configure the Detected state to be “1”meaning that when timeout is true, the alarm will trigger. We’ll also enable the Latching feature so the alarm stay persistent until we acknowledge it.

Click Commit, then back to the Alarms menu and select Display Alarms.

Now when I stop the data and wait a few seconds, the alarm triggers.

Is NetAcquire a good fit for your project?

Our applications engineers will discuss your needs and offer advice and pricing for the solutions we can provide.
NetAcquire provides quick responses to phone and email queries during Pacific Time business hours.

Call us toll free: 888-675-1122 or email [email protected]

For Employment, Business Affairs and other NetAcquire Contacts, CONTACT US

NetAcquire Corporation