How can we help?

Connection Time Expressions

You are here:
< All Topics

Overview

DataXchange is always monitoring the connection from the DX Service to the equipment data sources. Any time a connection is attempted, whether successful or unsuccessful, is recorded to the database.

The last time a connection was successful is stored in the following variables, depending on the source:

  • [Focas.connect_time]
  • [MTC.connect_time]
  • [SRC.connect_time]
  • [SRCE.connect_time]
  • [HaasNGC.connect_time]
  • [OPCUA.connect_time]
  • [DWM.connect_time]
  • [TMAC.connect_time]

The amount of time since the last successful connection, in seconds, is stored in the following variables:

  • [Focas.connected_time]
  • [MTC.connected_time]
  • [SRC.connected_time]
  • [SRCE.connected_time]
  • [HaasNGC.connected_time]
  • [OPCUA.connected_time]
  • [DWM.connected_time]
  • [TMAC.connected_time]

All of the above variables have a Previous equivalent, which returns the value at the time of the previous evaluation.

Connection Monitoring Notifications

The following expression addresses the issue of the DataXchange Service losing its connection to a Source. If the connection to a Source is lost, no further data can be read from the machine. This causes the equipment associated with the source to stay in the last known status and without an expression to send out a notification, no one may be aware of the issue. Connection monitoring expressions enable action to be taken when this scenario occurs.

For example, an email can be sent if the DX Service has not successfully polled the machine in the last 5 minutes.

Create the expression:

([Focas.connected_time] > 300) AND ([Focas.prev_connected_time] <= 300)

With the Target set to Email. Replace “Focas” with the source type of your machine.

Connectivity Monitoring Expressions for the RTV

The connectivity of the DX Service and the DX Commands are automatically collected and displayed within the RTV by DataXchange. In order to monitor the connection to an equipment, expressions will need to be added to that equipment. Additional information about the connectivity export can be found here. More information on monitoring connectivity via the RTV can be found here.

Each source will have an expression to mark when connectivity was established and when connectivity was lost. These expressions will usually exist by default, but if they need to be recreated use the examples below. Focas and SRC can be swapped out for the relevant source used by your equipment.

FOCAS Examples

Use this expression to record when there is a connection to the equipment. (Focas – Connection Time – Start):

([Focas.connected_time] < 10) AND ([PCSDB.poll_count] > 3) AND (([PCSDB.connectivity] != True) OR ([PCSDB.connectivity_status]  != 1))

With the Result:

[PCSDB.send_connectivity_start] 

Use the following expression to record when there is NOT a connection to the equipment. (Focas – Connection Time – End):

([Focas.connected_time] > 30) AND ([PCSDB.poll_count] > 3) AND (([PCSDB.connectivity] != False) OR ([PCSDB.connectivity_status]  != 0))

With the Result:

[PCSDB.send_connectivity_end] 

SRCE Examples

Use the expression written below to record when there is a connection to the equipment. (SRCE – Connection Time – Start):

([SRCE.connected_time] < 10) AND ([PCSDB.poll_count] > 3) AND (([PCSDB.connectivity] != True) OR ([PCSDB.connectivity_status]  != 1))

With the Result:

[PCSDB.send_connectivity_start] 

Use the expression written below to record when there is NOT a connection to the equipment. (SRCE – Connection Time – End):

([SRCE.connected_time] > 30) AND ([PCSDB.poll_count] > 3) AND (([PCSDB.connectivity] != False) OR ([PCSDB.connectivity_status]  != 0))

With the Result:

[PCSDB.send_connectivity_end] 

Table of Contents