Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data, use the success/error callback.
Gets alarms inside a time interval
Parameters:
Name
Type
Description
startTime
Date
Start time of the interval from which alarms are returned
endTime
Date
End time of the interval from which alarms are returned
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Allows to call a self implemented Method in /scripts/libs/classes/WssServer/WssUserRequestHandler.ctl
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Calls a callback function whenever the passed data point values/attributes change.
Parameters:
Name
Type
Description
dpName
String
|
Array
Name of the Data Point Element
answer
bool
Specifies if the callback function should be executed the first time already when the dpConnect() is called or first every time a value changes
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Disconnects the hotlink
The list of the first argument of multiple datapoints (dpName) has to be the in the same order as in dpConnect.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns the historic values that were valid at that time
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Get descriptions of data point elements
Parameters:
Name
Type
Description
dpName
String
|
Array
Name of the Data Point Element(s)
mode
Number
Description mode (see WinCC OA Help for dpGetDescription()). Pass null to get default mode as specified by server
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Querying DP attributes over a particular time period
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns all the data point names or data point element names that match a pattern. The data point structures are written to the array in alphabetical order
Parameters:
Name
Type
Attributes
Description
dpPattern
String
Pattern
dpType
String
<optional>
Data point type. Allows to restrict the returned data points to a specific data point type. When using the parameter only data points that are matching the pattern and the selected data point type will be returned.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
[
[
"",
":_original.._value"
],
[
"System1:ExampleDP_Arg1.",
1234
],
[
"System1:ExampleDP_Arg2.",
50
]
]
Retrieves attribute values with the help of SQL statements
var params={
query: "SELECT '_original.._value' FROM 'ExampleDP_Arg*' WHERE _DPT= \"ExampleDP_Float\"",
};
oaJsApi.dpQuery("SELECT '_original.._value' FROM 'ExampleDP_Arg*' WHERE _DPT= \"ExampleDP_Float\"", {
success: function(data) {
console.log(data);
},
error: function() {
console.error(arguments);
}
});
(static) dpSet(dpName, value, optionsopt)
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Reads graphics attribute values for a graphics object in variables
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful use the success/error callback.
Set locale to be used for returning langStrings. This can only be used when connected to a
WSS server (will raise an error when used inside a WebView EWO)
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
The function setValue() sets any number of graphics attributes of a graphics object
Parameters:
Name
Type
Attributes
Description
shapeName
string
Name of the graphics object as it can be specified in the attribute editor. " " (empty string) addresses its own object
property
string
Name of the basic attribute
value
Parameters that describe the graphics attribute. The number of parameters depends on the graphics attribute
Returns: → {boolean} Defines whether the server has accepted the message or not. In order to know if the command was successful or to retrieve the data use the success/error callback.
Triggers the messageReceived Event on the WebView Ewo
Parameters:
Name
Type
Attributes
Description
params
Object
Object which will be forwarded to the messageReceived event of the WebView EWO
options
Object
<optional>
Properties
Name
Type
Attributes
Description
success
requestCallback
<optional>
Success Callback; Only triggered if msgToJs() is called within the messageReceived Event. If a success callback is given but msgToJs() is not called, some memory allocated for handling the callback will not be freed.
// in case of Number
4
// in case of multple Arguments: oaJsApi.dpGet(['System1:_MemoryCheck.AvailKB:_original.._value','System1:_MemoryCheck.UsedKB:_original.._value','System1:_MemoryCheck.AvailKB:_original.._value', ...]
[
22783640,
10559852,
22783640
]
// in case of Number
4
// in case of multple Arguments: oaJsApi.dpGet(['System1:_MemoryCheck.AvailKB:_original.._value','System1:_MemoryCheck.UsedKB:_original.._value','System1:_MemoryCheck.AvailKB:_original.._value',...]
[
22783640,
10559852,
22783640
]
dpGetDescriptionCallback(data)
Parameters:
Name
Type
Description
data
String
|
Array
returned descriptions by Server for dpGetDescription.