Troubleshooting Logic Programs
When configuring a Logic program, you can use the compile feature to check the validity of your program. For more information, see:
- Compiling an ST Program or ST Library
- Compiling a Ladder Diagram
- Compiling a Function Block Diagram or Function Block Library
- Compiling a Sequential Function Chart.
However, it is possible to have a program compile successfully at the time of configuration, but be unable to execute correctly at a later date. If your program is unable to execute correctly, there are various possible causes, including:
- A database item that is referenced by the Logic program has been deleted from the database. In this situation, you need to either reconfigure the program to reference a different item or create a new item with the same address and name as the item that was deleted.
- The program refers to a database item that has an unpaired parenthesis in its name (see Limitation for Database Item Names Referenced in Logic Programs)
- The program is set to execute On Input Processed and does not contain a valid input (see Define the Execution Method for a Logic Program)
- The program cannot read from, or write to, a property tag that is referenced in the program
- The program contains a calculation that is attempting to divide by 0
- A subscript value for an array exceeds the range specified for the array
- The order of execution is not as expected. This is often due to the use of ‘feedback loops’ where an output is also used as an input. You can use the Compile with Diagnostics option to view the actual order in which Geo SCADA Expert executes your program and then adjust your program accordingly (see Execution Order for Logic Programs).
In many cases, you will need to reconfigure your Logic program.
To find out more information about the specific configuration issue that is affecting the execution of your Logic program, we recommend that you:
- Display the Logic Execution Status List (display the Queries Bar, expand the Queries branch, then display the Logic Execution Status List).
- Locate the entry that corresponds to your Logic program
- Examine the Error Message entry for your program. The Error Message provides a brief description of the cause of the Logic program’s inability to execute.
- Re-configure the Logic program so that the issue described in the Error Message is resolved.