TN 000022573
TN 000022573
TN 000022573
Doc Id TN000022573
PROBLEM
Title
SOLUTION
Summary
This Tech Note discusses two ways to monitor the communication between InTouch and a PLC or other type of end device.
The first option uses status bits built into InTouch and DAServers to determine connection status.
The second option uses a heartbeat tag between InTouch and the PLC using InTouch scripts.
This Tech Note describes how to use both methods to produce the best results.
Situation
Procedure
This example illustrates monitoring the connection between a PLC and an InTouch application using the ABCIP DAServer. The application name
and I/O items will differ depending on what DAServer is used. Follow these steps to set up the PLC $SYS$STATUS bit, InTouch IOStatus bit, and
heartbeat so that they can monitor the communication status between InTouch and a PLC.
DAServers have a Device-Specific System Item called $SYS$STATUS. This is a binary status indication of the connection to the PLC or end
device. Once you have requested items and have received initial data from the PLC, this item changes to FALSE if there is an error
communicating with the device.
Note: This Tech Note assumes that you have already installed and configured a DAServer to get data from a PLC or other end device.
In your InTouch application, create an Access name that points to a device group in your DAServer. If one already exists go on to the next step.
2. Add a new Access Name that will be used to get data from your DAServer.
In this example (Figure 1 below) the Access Name is SLC500, and DASABCIP is used along with a device group called SLC500_Group1.
The SLC500_Group1 device group has been previously added to the DAServer configuration. SuiteLink is the protocol and only active
items are advised.
Note: If there is more than one Access name in the InTouch application that is configured to get data from the same PLC or end device, only one
Access Name/device group per PLC needs to be monitored for connection status.
Note: Repeat the procedure in step 1 for each PLC or end device to be monitored.
InTouch has built-in functionality to monitor SuiteLink connections. Configure an Access Name in order to connect to the InTouch View process.
4. Select SuiteLink for the protocol and other settings included in Figure 3 (below):
This Access Group can be used to monitor the connection to any application. The Access Name is arbitrary, but the Application Name and
Topic Name must be view and IOStatus.
5. Click OK to save.
6. Click Special/Tagname Dictionary.
7. Click the New button and create an I/O Discrete tag. This tag will be used to monitor the SuiteLink connection to your DAServer.
8. Select IOStatus for the Access Name. For the item name, enter the Access name that was created in Step 2 to communicate with the PLC
or end device. SLC500 is used for this example. Repeat this step for each DAServer to be monitored.
A heartbeat tag can be used to monitor the connection of InTouch all the way to the PLC or end device.
The heartbeat tag can provide additional information on the status of the PLC. For example, if the PLC program stops, the connection to the PLC is
still good so the DAServer $SYS$Status tag will indicate a Good status. However, the heartbeat tag will stop updating. This indicates a problem
at the PLC.
3. Click the New button and create an I/O Integer tag. For this example the Item is the t4:0.acc counter in the SLC500 PLC, and the tag is
called SLC500Timer (Figure 5 below).
5. Create and save a Memory Integer tag called Counter (Figure 6 below).
6. Click Special > Scripts > Data Change Scripts. Create a Data Change script for the tag SLC500Timer that resets Counter to zero
(Figure 7 below).
8. Create another Data Change script for the InTouch system tag $Second that increments Counter by one (Figure 8 below).
10. In the Tagname Dictionary create a Memory Discrete tag called WatchdogStatus and set the initial value to On (Figure 9 below).
12. Create an OnTrue Condition Script. If the Counter is greater than 9, set the WatchdogStatus to 0 (Figure 10 below).
14. Create another OnTrue Condition Script: If Counter is less than or equal to 9 set it to 1 (Figure 11 below).
The WatchdogStatus will be set to FALSE if 10 seconds lapse without an updated value from the PLC.
Once the status tags have been configured in the InTouch application, they can be displayed or used in other logic to generate messages to
indicate a problem with communications to a PLC or end device.
The following graphic shows an example InTouch window that displays the status indicators (Figure 12 below).