From OpenSCADAWiki
Jump to: navigation, search

Configuring and using

1. Create an output transport of the type "Serial" and set its Identifier like to "SMS", one transport suitable for more receivers.
2. Set for proper address. The serial port speed, asynchronous data format and timeouts will adjusted by the function.
3. Create of need user protocol object based on the templates, with Identifier like to "SMS".
4. Place some requesting commands directly into presented or a new internal OpenSCADA-procedure like to:
req = SYS.XMLNode("send"); req.setAttr("ProtIt","SMS").setAttr("pin","1111").setAttr("tel","+380XXXXXXXXX").setText("Notify message");
SYS.Transport.Serial.out_SMS.messIO(req, "UserProtocol");
rez = req.attr("err").toInt() ? req.attr("err") : "OK";
5. RESULT: In the variable rez you will get "OK" if no errors occur and the message successfully transmitted to the receiver.