Example: Restarting the iFIX Collector Using a Heartbeat

Overview

Many applications commonly use a heartbeat to indicate when a program stops. If you want to use a heartbeat with the iFIX Collector, you need to configure it through the Historian Administrator and the iFIX Database Manager.

In the iFIX Database Manager, configure this address to an Analog Output (AO) block and use a separate Program (PG) block to check the status of the collector heartbeat output and restart the collector if it stopped. Then, in the Historian Administrator, define a Heartbeat Output Address on the Advanced tab of the Collector Maintenance screen for the specified iFIX Collector

Once configured and started, the Historian iFIX Collector sends a value of 1 to the specified Heartbeat Output Address every 60 seconds. If that heartbeat value is not sent, then iFIX detects this status and restarts the iFIX Collector.

If your iFIX database PDB is quite large, you may need to increase the Delay Collection at Startup field on the Advanced tab of the Collector Maintenance screen in the Historian Administrator. Doing so prevents excessive collector log entries if Historian cannot obtain a value before it initializes the source address.

In this example, an iFIX Collector runs on NODE1 and the heartbeat output address is NODE1.HOA_2.F_ CV. We create an Analog Output Block is named HOA_2 and the Program block is named HB_HOA_1 in a new iFIX database. There are two parts to this example: configuration in iFIX and then the Historian Administrator.

Part A Configuration in iFIX

Follow these steps to configure the heartbeat for an iFIX Data Collector:

  1. Start iFIX.
  2. From the iFIX WorkSpace, open the Database Manager.
  3. Select New from the Database menu.
  4. Select Add from the Block menu. The Select Block Type dialog box appears.
  5. Select AO and click OK. The Analog Output dialog box appears.
  6. Enter HOA_2 as the Tag Name and click Save.
  7. Select Add from the Block menu. The Select Block Type dialog box appears.
  8. Select PG and click OK. The Program dialog box appears.
  9. Enter HB_HOA_1 as the Tag Name for the block.
  10. (Optional) Enter a description for the tag name.
  11. Enter the programming statements shown in the following figure for lines 0 through 8.
  12. Enter the programming statements shown in the following figure for lines 0 through 8.
  13. Click Save. A message box appears asking you if you want to put the block on scan.
  14. Click No.
  15. Select Reload from the Database menu in the iFIX Database Manager. The Reload dialog box appears
  16. Select the database you currently have loaded and click Reload. A message box appears to confirm the reload.
  17. Click Yes to continue.

In about a minute, you should notice the iFIX Collector start. The status of the Collector should change on the Collector Maintenance screen of the Historian Administrator.

Part B Configuration in the Historian Administrator

Follow these steps to configure the heartbeat in the Historian Administrator:

  1. From the Historian Administrator, click on the Collector Maintenance screen.
  2. Select the iFIX Collector.
  3. Click the Advanced tab.
  4. Enter NODE1.HOA_2.F_CV in the Heartbeat Output Address field as shown in the following figure.

  5. Click Update.