Powervision provides a powerful scripting interface allowing the developer to write Angelscript code to accomplish programming tasks. Angelscript is very similar to C++ so will look familiar to most programmers.
Powervision has a built in function library that allows scripting code to interact with Powervision applications, events, and variables. These are detailed in the Function Reference tab in the scripting interface. Examples of how to implement the library functions can be found in the Example: Script Library Functions Article.
The Scripting Syntax Reference tab has a complete listing of the Angels Script syntax, standard and extended library functions. Many example configurations listed in the Examples section of our support site use scripting functions that provide a good examples, use the search function to search on key words script or scripting. Online tutorials are available for Angel Script as well.
The following scripting example is a continuation of our engine temperature control system. We have previously demonstrated how to implement this same logic using State Machines and Activity Programs, this example shows how to perform the same functions using scripting. If you are familiar with scripting this is the easiest way of all three to implement this function.
In this video we will show how to use a Script Program to monitor an engines coolant temperature and determine if it is too cold or too hot and either turn on a heater or fan cooling. There are three states the engine can exist in, nominal, under temp, and over temp. The script if/else comparison statements to determine which state it is in and if the fan or heater needs to be turned on.