From OpenSCADAWiki
Subsystem "DAQ" (SYS.DAQ)
Functions of the subsystem object (SYS.DAQ):
- TCntrNodeObj daqAt(string path, string sep = "", waitForAttr = true) — attaches to a DAQ node (controller object, parameter, attribute) in the path or the separated string by the separator sep, from the DAQ-subsystem. Check for an attribute in the path last element, at waitForAttr.
- bool funcCall(string progLang, TVarObj args, string prog, string fixId = "", string err = ""); — executes the function text prog with the arguments args on the program language progLang and with the function fixing identifier fixId (automatic if it is empty). Returns "true" when it is executed correctly or "false" and set err. The fixed function differ from the automatic one by it does not remove after execution and uses repeatedly by an address into fixId, which replaces that original identifier in first call. To recreate the function, you must change the program or clear the fixId in its original id.
var args = new Object(); args.y = 0; args.x = 123; SYS.DAQ.funcCall("JavaLikeCalc.JavaScript",args,"y=2*x;"); SYS.messDebug("TEST Calc","TEST Calc rezult: "+args.y);
- string funcSnthHgl(string progLang); — requesting the program language progLang syntax highlight rules in the XML-tag SnthHgl.