Industrial Automation
Industrial Automation | Europe

myKnowledge

Main > Product Type > Software > Visualisation
Minimize Text   Default    Enlarge Text
 

Print
E-mail

How To Keep Trying To Open A Device That Fails To Connect - CX-Supervisor


In CX-Supervisor when a device is successfully opened (either during start up, or from an OpenPLC() script command), CX-Supervisor starts a 'heartbeat communication' to monitor the status of the connection.  Therefore, if a subsequent communication error occurs a Timeout event is logged.
 
However if CX-Supervisor cannot communicate with a device when it is first opened, it remains closed (and a 'Failed to open' event logged).  If you want to make your application continue trying to open devices in this situation, add a Boolean memory point called "PLCConnected" and create a simple project level script:

  
 
This script will test every minute (at zero seconds) if 'PLCConnected' is FALSE (which indicates the device is not currently open). If this is the case then it attempts to open the device. The outcome of the OpenPLC will be stored in the PLCConnected memory point. Once the PLC is successfully open, this script will stop running.
 
 

Note: If you are using VBScript make sure you upgrade to the latest version as there were fixes added to ensure this works properly.

 

 




Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2010-08-09
Modified 2017-12-08
Views 7756

 

You are not logged in.