scripting
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting [2020/09/17 01:02] – wikiadmin | scripting [2025/05/20 11:12] (current) – wikiadmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | **Scripting** | + | **TransSECS |
| + | |||
| + | See also: [[TransSECScriptingMethodList | Common TransSECS JavaScript Methods List]] | ||
| + | |||
| + | Also see: Why you need to [[add_incomingValue_last_lineofscript|add " | ||
| The Devices version of TransSECS (TransSECS Devices) enables java scripting on the data sources, messages, and message data. | The Devices version of TransSECS (TransSECS Devices) enables java scripting on the data sources, messages, and message data. | ||
| Look at the sample scripts on the messages and data sources in the sample PLCTool. | Look at the sample scripts on the messages and data sources in the sample PLCTool. | ||
| + | |||
| + | **Controller Reference** | ||
| + | |||
| + | For all scripts where you need a reference to the tool interface (or host definition) you will need to get this interface using TransSECSController.getSingleController() or TransSECSController.findController(" | ||
| + | |||
| + | |||
| + | <code javascript> | ||
| + | var TransSecsController = Java.type(" | ||
| + | |||
| + | secsInterface=TransSecsController.findController(" | ||
| + | </ | ||
| + | |||
| + | where " | ||
| + | |||
| + | <code javascript> | ||
| + | var TransSecsController = Java.type(" | ||
| + | |||
| + | secsInterface=TransSecsController.getSingleController(); | ||
| + | </ | ||
| + | |||
| **Common Problems** | **Common Problems** | ||
| Line 10: | Line 34: | ||
| TypeError: null has no such function " | TypeError: null has no such function " | ||
| For example: | For example: | ||
| - | TypeError: null has no such function " | + | TypeError: null has no such function " |
| <code javascript> | <code javascript> | ||
| var TransSecsController = Java.type(" | var TransSecsController = Java.type(" | ||
| </ | </ | ||
| - | before you do this: | ||
| - | < | ||
| - | secsInterface=TransSecsController.findController(" | ||
| - | </ | ||
| - | |||
| - | where " | ||
| - | |||
| **Register to Receive All Events in a TransSECS host application** | **Register to Receive All Events in a TransSECS host application** | ||
| Line 48: | Line 65: | ||
| var TransSecsController = Java.type(" | var TransSecsController = Java.type(" | ||
| - | | + | |
| | | ||
| | | ||
scripting.1600318929.txt.gz · Last modified: by wikiadmin
