Binding KEPServer Tags to Thing Properties
Is there a way to automate below using JavaScript function?
- By selecting tags from the Industrial Connection Thing -> Discover and using the "Bind to New Entity" button
Related to previous topic
Is there a way to automate below using JavaScript function?
Related to previous topic
Hello,
There is a function/service available to set remote binding "SetRemotePropertyBinding", have you already tried to use that service?
Important parameter for this service is 'aspects', you might have to set that properly as it requires the JSON value. Just for reference I am providing the snippet of a service (custom, that you might like to have) which sets the 'aspects' param of "SetRemotePropertyBinding" (rest all the fields are quite understandable)
//service snippet for setting remote binding aspects
var myInfoTable= DataShapes["/*your datashape that holds aspect fields*/"].CreateValues();
myInfoTable.RemoveAllRows();
myInfoTable.AddRow(
{
industrialDataType: "Float",
tagAddress: /*your kepware complete tag address*/, /*you can see that in KEP client*/
scanRate: 1000,
tagType: "Static",
dataShape: ""
});
var result = myInfoTable.ToJSON().rows[0];
//Output of the service is STRING
var params = {
propertyName: 'your_property_name' /* STRING */,
pushThreshold: 0 /* NUMBER */,
aspects: 'use above reference to create aspects field' /* JSON */,
foldType: undefined /* STRING */,
sourcePropertyName: undefined /* STRING */,
timeout: 0 /* INTEGER */,
pushType: "VALUE" /* STRING */,
cacheTime: undefined /* INTEGER */
};
me.SetRemotePropertyBinding(params);
The important thing is you should already be having propert(y/ies); (as you have to specify the property_name as param in 'SetRemotePropertyBinding') in your remote thing to automate the binding process. If required you might want to create properties in the remote thing dynamically.
Hope it helps.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.