03.03.2021
Internal scripts are written in JavaScript using ES3. Scripts can be executed periodically (according to the schedule or time period you can edit) or triggered by a change of the SCADA system variable (SCADA system variables are called “tags”).
getTag(tagName) The function returns the value of a SCADA tag |
||
Parameter name | Parameter type | Description |
tagName | String | The name of a SCADA tag |
Example of getting the SCADA tag value.
// Value of the “tag1” tag is 100 getTag(“tag1”); // returns 100
setTag(tagName, newTagValue) The function sets the new value to a SCADA tag. |
||
Parameter name | Parameter type | Description |
tagName | String | The name of a SCADA tag |
newTagValue | String | Number | The new value of a SCADA tag |
Example of setting the SCADA tag value (from the internal script or the frontend).
// “tag1” value is 100 setTag(“tag1”, 200); // “tag1” value is 200
getSql(query,{dbgroup: dbgroupName, outfmt: outFmtName}) The function sets the new value to a SCADA tag. |
||
Parameter name | Parameter type | Description |
query | String | The SQL query |
dbgroupName | String | Name of the configured database (can be seen in the “Name” column of the “Database” tab in the Integraxor Project Editor) |
outFmtName | String | Name of the format the query result will be returned in. |
If the DOM node that was clicked (
event.target
) was neither our container div (this.wrapperRef.current) nor was it any node inside of it (!this.wrapperRef.current.contains(event.target)), we call the onOutsideClick prop.
Yes, I have. What's the deal?!