Top  | Previous | Next

Local Client Fallback

Ignition clients are fully dependent on being able to communicate with a Gateway. If Gateway communication is lost, the client will suspend operation while it attempts to reconnect with the Gateway. This can be a problem when you need the client to monitor critical operations on a plant floor.

 

Ignition features a local client fallback mechanism that allows you to use a Gateway running on the local machine. In normal operation, your client can connect to a central Gateway located somewhere on the network. The central Gateway would be responsible for all data aggregation (such as storing historical data in a database). But if communication to the central Gateway is lost, the client can automatically retarget to a project that you specify in the local Gateway. This project should contain the minimal realtime information that you need to keep your operation running. Note that in order to use local fallback, port 6501 must be open on the local machine.

 

To enable local fallback, you must navigate to Configuration > Gateway Settings in the local Gateway. Scroll down to the Local Client Fallback section and check the Enable Local Fallback checkbox. Select a Fallback Project from the dropdown list. Note that the project that you select must be published in the local Gateway and it must have at least one main window. Optionally, you can change the Seconds to Failover setting to a value other than 60 seconds. This setting controls the number of seconds to wait before fallback automatically starts. During comm failure, you can also click a button to load the local fallback project immediately.

 

When local fallback is enabled, the client attempts to open port 6501 on the local machine. If the port can be opened successfully, the client reads fallback settings from the local Gateway and shows a "Fallback Project" button on the bottom of the Gateway Connection Lost window. You can click this button at any time to load the fallback project, or simply wait for the fallback project to automatically load. You may want to set the local client to automatically log in to avoid typing in a username and password when the client loads. This can be set in the Login section of the project's properties.

 

Testing

Testing local fallback is highly recommended before you start to depend on it in a production setting. The easiest way to test fallback is to simply unplug the network cable to the client machine, or disable the network card on the machine. If the Fallback Project button is not visible on the Gateway Connection Lost window, check your local Gateway console and verify that the message Started Fallback Socket on port 6501 is present in the console. Any other error message related to the FallbackSocketController indicates that some other problem has occurred (most likely the port cannot be reserved) and local fallback is not available to clients.

 

Reconnect to Central

In many circumstances, the comm loss to the central Gateway is only a temporary event. To minimize the amount of time that you need to run the local client, you can add some functionality to the client that allows you to check on the status of the central Gateway. One way to do this would be to add a timer script to your local client. The script would call the system.util.getGatewayStatus() function at regular intervals and update an item such as a client tag with the gateway status. From there, you can bind an indicator component to the client tag and get ongoing visual feedback on the central Gateway status. As soon as you can confirm that the central Gateway is running again, you can call the system.util.retarget() function in a button to seamlessly direct the client back to the central Gateway.