Basic SECS/GEM Troubleshooting
Equipment Connections
On Equipment Connection Startup Database Tables Cannot be Created
If you are using MySQL, make sure the latest MySQL JDBC driver is installed in Ignition. If not, you can download it from the MySQL website at http://dev.mysql.com/downloads/connector/j/, or from the Configure > Databases > Drivers section of the Gateway webpage.
Unable to Establish Equipment Connection at Setup
If you are unable to create an equipment connection after configuring the connection settings, check the Active and Passive Port numbers. Verify that these port numbers are not being used by another piece of equipment or simulator. Everytime you configure another piece of equipment, the Active and Passive Ports numbers must be unique. They cannot be the same as another piece of existing equipment.
To check the port numbers, go to the Configure > SECS/GEM Equipment section of the Gateway webpage. Locate your equipment name, and open the Equipment Connection page. Verify that the Active and Passive Port numbers are not being used by another piece of equipment. If so, change the Active and Passive Ports to a unique number, then save your changes. The Equipment Connections page will update and your equipment will have a status of "Communicating."
Logging
Each Equipment Connection has a logger associated with it. The Equipment Connection loggers and their severity level can be seen in the Status section of the Gateway webpage under Diagnostics > Logs. By default, only messages with a severity level of INFO or more severe such as WARNING or ERROR are logged. A lot of data about what an Equipment Connection is doing can be logged by changing the log level of the Equipment Connection to a less severe level. At the TRACE log level, all SECS messages sent and received by an Equipment Connection are logged.
To change the severity level of a logger, click the Settings button to open the Log Configuration window. Locate the logger you want change, and click on the dropdown arrow on the right side of the window, and select the severity you want to update.
Wrapper.log File
Messages and log events can be viewed from Ignition's log file called "wrapper.log" as well as the Status section of the Gateway webpage under Diagnostic > Logs. If something is not working as expected, it can be very useful to turn on ALL logging for an Equipment Connection and view the wrapper.log file. Often an exception error or log message will explain what is happening.
The file path location of the wrapper.log file is different for each operating system:
- Windows -
Program Files\Inductive Automation\Ignition\logs
- Linux -
/var/log/ignition
- Mac OS X -
/user/local/ignition/logs
When logging data on Linux it can be useful to run the command tail -f /var/log/ignition/wrapper.log
. This command displays current log messages on the screen as they occur. A similar tail program can be used on Windows.
Failure to Send a SECS Message
All SECS messages that are sent and received are validated against the SECS Definition Language (SDL) file. A common reason for failure to send and receive a SECS message is it is either not defined or doesn't match a definition in the SDL file. Any messages that fail to validate against the SDL file will be inserted into the Errors database table for the equipment connection as a validation error along with information about why it didn't validate. If either a sent or received message occurs, a log message describing the problem is written to the wrapper.log file, as well as displayed in the Diagnostic Logs for the equipment connection.
To define or update a SECS message, the SDL file can be edited in the Gateway Webpage from the Equipment Connections page using the built in SDL editor, or downloaded from the Equipment Connections page so it can be edited in a text editor and re-uploaded.