Use of the Building Operation Script editor and general Script programming is covered in the Training courses and technical reference guide, what other techniques can be used to debug a program?
EcoStruxure Building Operation
Building Operation Script editor.
Often additional techniques are required to debug Script programs, especially when attempting to analyze, modify or fault find other people's code.
Some techniques you can use for debugging your program and isolating problems are:
- Add in additional line labels to the program to isolate where the program is disabling or failing, if it disables you will be able to see the "CurrentLine" it has failed on and therefore know which line of code is causing the problem.
- Use the Trace feature to step through a program and monitor the binding variables, stepping through each line of code to ensure the values are all set as expected.
- Even if a program does not disable you can use the "Stop" keyword in the program, it will act as a break in the code and you can look at the values of the various variables, this may be a useful alternative to the Trace feature.
- Use the Watch window and the Binding Variables window to show the values of the various objects, when used with the above two techniques it allows you to accurately trace a program flow.
- Ensure all of the code used is compatible with the Script programming rules and that Continuum Plain English programs are not just used without conversion. Check the Plain English and Script Difference Guide.
- For programs in an i2 or b3 controller, ensure none of the Program size limitations are exceeded, see Plain English program limitations on number of characters in program and line labels.