WebRelay Wireless Users Manual
Section 6: Auxiliary Operations......................................................................................................................... 58
6.1 XML......................................................................................................................................................... 58
6.1.1 state.xml........................................................................................................................................... 58
6.1.2 XML Control...................................................................................................................................... 59
6.1.3 Message Acknowledgment...............................................................................................................60
6.2 HTTP GET Requests (for custom applications)..................................................................................61
6.2.1 Using GET for Control and Monitoring.............................................................................................. 61
6.3 External Server and Remote Services................................................................................................. 62
6.3.1 Accessing the WebRelay Wireless with custom software or third party applications........................62
6.3.2 Using an External Web Server..........................................................................................................62
6.3.3 Direct Server Control........................................................................................................................ 62
6.3.4 Remote Services.............................................................................................................................. 62
6.3.5 Connection String............................................................................................................................. 63
6.4 Email Notification.................................................................................................................................. 64
6.4.1 Email Notification Description........................................................................................................... 64
6.4.2 Email Notification Setup ................................................................................................................... 65
6.5 LogFile................................................................................................................................................... 66
6.5.1 Data Log File – log.txt....................................................................................................................... 66
6.6 Modbus/TCP.......................................................................................................................................... 68
6.6.1 WebRelay Wireless Modbus Function Code Summary....................................................................68
6.6.2 PLC Device Addressing.................................................................................................................... 69
6.6.3 WebRelay Wireless Full Address Table............................................................................................70
6.6.4 Read Coils - Modbus Function Code 01 (0x01)................................................................................71
6.6.5 Read Discrete Inputs – Modbus Function Code 02 (0x02)...............................................................72
6.6.6 Read Sensors – Modbus Function Code 03 (0x03) .........................................................................73
6.6.7 Write Single Coil – Modbus Function Code 05 (0x05)......................................................................74
6.6.8 Write Multiple Coils - Modbus Function Code 15 (0x0F)...................................................................75
6.6.9 Write Multiple Registers – Modbus Function Code 16 (0x10)...........................................................76
6.7 Basic Scripts.......................................................................................................................................... 77
6.7.1 Structure........................................................................................................................................... 77
6.7.2 Line Format....................................................................................................................................... 77
6.7.3 Supported Statements...................................................................................................................... 78
6.7.4 User-Defined Variables..................................................................................................................... 80
6.7.5 Predefined Variables........................................................................................................................ 80
6.7.5.1 Timer Variables.......................................................................................................................... 80
6.7.5.2 Relay Variables.......................................................................................................................... 80
6.7.5.3 Input Variables........................................................................................................................... 81
6.7.5.4 Counter Variables......................................................................................................................81
6.7.5.5 Vin Variable............................................................................................................................... 81
6.7.5.6 Temperature/Other Sensor Variables........................................................................................81
6.7.5.7 Date and Time Variables........................................................................................................... 81
6.7.5.8 Event Variables.......................................................................................................................... 82
6.7.6 Registers........................................................................................................................................... 82
6.7.7 Testing and Debugging..................................................................................................................... 83
Appendix A: Specifications............................................................................................................................... 84
Appendix B: Trademark and Copyright Information........................................................................................ 87
Appendix C: Warranty........................................................................................................................................ 88
Appendix D: FCC Statement.............................................................................................................................. 89
Appendix E: Mechanical Dimensions............................................................................................................... 90
Page 4 Xytronix Research & Design, Inc.