Number 118 September 4, 1998
Number 118 September 4, 1998
Heartbeat
The status bit is built into the I/O Server. It monitors the communication status between the I/O
Server and the PLC. A status bit is available for each I/O topic that is configured in an I/O Server.
The IOStatus bit is also built into the I/O Server. In the illustration above, it is monitoring the
communication status between InTouch and the I/O Server. It can also monitor the communication
status between two InTouch nodes or between InTouch and another DDE-aware program, such as
Microsoft Excel. Each I/O Access Name that is defined in an InTouch application has its own
IOStatus bit. The value of the bit will be 1 when there is an active conversation or 0 when the
communication is lost.
The heartbeat monitors the communication status between InTouch and the PLC. The heartbeat is
created by writing a script in InTouch.
Procedure
In this example, we have used a Texas Instruments PLC with a TI Direct I/O Server. The application
name and the I/O items will differ depending on what I/O Server is used. Follow these steps to set up the
status bit, IOStatus bit, and heartbeat so that they can monitor the communication status between
InTouch and a PLC.
Step 1 Configuring the Status Bit
1. In WindowMaker, on the Special Menu, select Access Names. Click the Add button and create an
Access Name called TIPLC. Type TIDIR for the Application Name and type TIPLC for the Topic
Name. Click the OK button.
2. Next, on the Special menu, select Tagname Dictionary. Click the New button and create an I/O
Discrete tag called status. Set the Access Name to TIPLC and select the box Use Tagname as Item
Name. Configure the tag as shown below.
2. Next, on the Special menu, select Tagname Dictionary. Click the New button and create an I/O
Discrete tag called IOSTATUS1. Set the Access Name to Server_Monitor. For the Item, type the
name of the conversation you want to monitor. In this example, the item is tiplc.
Note It is possible to create an IOStatus bit for every topic that is defined in the I/O Server. Just
remember to create a new I/O Discrete tag for each topic and then set the Item name to the proper
Access Name that contains that topic in the InTouch application.
4. Create a data change script for the tag $Second that increments counter by one.
5. Create a popup window called plc_fail that contains a simple text message, such as The PLC has
failed.
6. Create a condition script that will make the window plc_fail popup every 3 seconds if the counter
value is greater than ten and the tag status is equal to zero.
7. Create another popup window called server_fail that contains a simple text message, such as The
server has failed.
8. Create a condition script that will make the window server_fail pop up every 3 seconds if the counter
value is greater than ten and the tag IOSTATUS1 is equal to zero.
After you set up the status bit, IOStatus bit, and the heartbeat according to these steps, one of the popup
windows you created will appear whenever there is communication trouble between InTouch, the PLC,
or the I/O Server.
The Technical Support Tech Note is published occasionally by the Wonderware Technical Support group. Editors: Mari
Fujii and Sabrina Haag; Director, Technical Support: Sheila Kester; Publisher: Wonderware Corporation, 100 Technology
Drive, Irvine CA 92618.
There is also technical information on the Wonderware software products on the Wonderware Technical Services web page
at www.wonderware.com/support, the WonderFax fax-on-demand system at (949) 450-5050, Wonderwares Bulletin Board
Service at (949) 727-0726 and the Wonderware Comprehensive Support Knowledge Base CD. Call Wonderware Technical
Support at (949) 727-3299 or send an e-mail to [email protected] for more information.
Copyright 1998 Wonderware Corporation. All Rights Reserved. Wonderware is a registered trademark of the Wonderware
Corporation in the United States of America and/or other countries. September 4, 1998 Number
118