// do something with the value
}
}
var g = new Group();
var status = project.getGroup ("enginesettings", g,
function (groupName, group) { fnGroupReady(groupName, group);} );
function fnGroupReady(groupName, group) {
var val = group.getTag("Tag1");
if (val!=undefined) {
// do something with the value
}
}
(Available on web pages)
getTag
object getTag( tagName, state, index, forceRefresh)
void getTag( tagName, state, index, callback, forceRefresh)
It returns the tag value or the complete array if index value is -1 of the given tagName.
Parameter Description
tagName String of tag name
state State element to be filled
index Index if the tag is of array type. -1 returns the complete array. Default = 0.
callback Function name if an asynchronous read is required. Default = “".
forceRefresh (Optional parameter) True = the Runtime will read an updated value of the tag directly from the device.
Default is false.
Return value
Tags value is returned. If tag is array type and index = -1 then the complete array is returned. For non-array tags provide
index as 0.
var state = new State();
var value = project.getTag("Tag1", state, 0);
//
//for non array type
//tags index is not considered, so can be left as 0
HMWIN Studio |User Manual| v206 (2017-06-30) | EN| © 2014-2017 Panasonic Electric Works Europe AG
359
35 JavaScript