Top | Previous | Next |
Output Console |
The Output Console is the script-writer's best friend. It is a dockable panel, and can be opened via the Tools > Console menu or the Ctrl-Shift-C keyboard shortcut.
The output console is most frequently used to test and debug Python scripts in Ignition. By using the print keyword in your script, you can observe the inner workings of your script as it executes. For example, if you executed the following script:
# A function that intercepts tag writes, printing out the previous value first def writeToTag(path, value): import system prevValue = system.tag.getTagValue(path) print "Writing value '%s' to %s, was previously '%s'" % (value, path, prevValue) system.tag.writeToTag(path, value)
writeToTag("Compressor/HOA", 2) writeToTag("Compressor/HOA", 1)
It would print the following to the console:
Writing value '2' to Compressor/HOA, was previously '0' Writing value '1' to Compressor/HOA, was previously '2'
Note that the output console is also available in the Vision Client, via the Diagnostics window.
See also: |