The API.VARIABLEMONITOR namespace provides a set of interfaces for easily and quickly adding RAPID variable monitoring and processing transactions
- Source
Methods
monitorVariable(variableObjopt, callbackopt)
Subscribes to a RAPID variable.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
variableObj | object | <optional> | The variable attributes including the variable name and other necessary information. |
callback | function | <optional> | The callback function that is called when the variable changes. |
- Source
Example
API.VARIABLEMONITOR.monitorVariable(
{type: 'tooldata', task: 'task1', module: 'module1', name: 'Wobj_1'},
(v)=>{
console.log(v);
}
)