Updates to the ScriptDataItemSource

One, quite useful, element in the “Master Server” is the script datasource. It basically consists of a number of input sources that trigger the “update command”, an optional timer that triggers the “timer command” and “write command” that is executed when someone writes on the script datasource and of course an “init command” which is executed once the data source is initialized. As script languages all script languages supported by Java are possible. The default is JavaScript.

Script datasources can be easily configured using the openSCADA configurator (from the org.openscada.deploy repository) with an Spreadsheet or EMF XMI file as source.

Typical uses are adding some small logic items to the deployment: “wait for a change on datasource A, store updated value, periodically write stored value to B”. Or a simple watchdog “init A with 0, increment A by one with timer”.

The trick is that each script data source has a value itself (like formula items) but can also actively write to other items. Which allowed us to implement a time request/response system in one project without the need to write custom code in the openSCADA base. The logic was a back and forth in several steps acknowledging requests and replying with the current system time when requested.

For OpenSCADA 0.17.0 we added some more polish to the script data source.

This entry was posted in News. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *