//
if (value!=undefined) {
//...do something with s
}
var state = new State();
project.getTag("Tag1", state, -1,
function(tagName, tagState) { fnTagReady(tagName, tagState); });
function fnTagReady(tagName, tagState) {
if (tagName=="Tag1") {
var myValue = tagState.getValue();
}
}
(Available on web pages)
setTag
number setTag( tagName, tagValue, [index], [forceWrite] )
Sets the given tag in the project. Name and value are in strings.
Parameter Description
tagName String of tag name
tagValue Object containing the value to write
index Index if the tag is of array type. -1 pass the complete array. Default = 0.
forceWrite Boolean value for enabling force write of tags, the function will wait for the value to be written before it
returns back. Default = false.
Return value
Interger value for denoting success and failure of action when forceWrite is true. 0 means success and -1 means failure. If
forceWrite is false, returned value will be undefined.
var val = [1,2,3,4,5];
var status = project.setTag("Tag1", val, -1, true);
if (status == 0) {
// Success
} else {
// Failure
}
var val = "value";
project.setTag("Tag1", val);
360
HMWIN Studio |User Manual|v206 (2017-06-30) |EN|© 2014-2017 Panasonic Electric Works Europe AG
Project object methods