From OpenSCADAWiki
Jump to: navigation, search

And a procedure of sending the DCON request directly, through the previous protocol procedure. This procedure should be placed in the desired task or an interim function of OpenSCADA, for example, in the procedure of the controller object DAQ.JavaLikeCalc:

//Preparing the first request
req = SYS.XMLNode("#").setAttr("ProtIt","DCON").setAttr("addr",10);
//Sending the request
SYS.Transport["Serial"]["out_TestDCON"].messIO(req,"UserProtocol");
if(!req.attr("err").length) SYS.messDebug("TEST REQ","RES: "+req.text());