ControlByWeb WebRelay-Quad X-WR-4R1-5 User Manual page 27

Hide thumbs Also See for WebRelay-Quad X-WR-4R1-5:
Table of Contents

Advertisement

Revision 2.2b
<relayXstate>
0=off(coil off)
1=on (coil energized)
Commands can be sent to WebRelay-Quad
relay1State, relay2State, relay3State and relay4State. Examples of using relayXState (X represents the appropriate
relay) are given here.
Turn relay 1 'off': http://192.168.1.2/state.xml?relay1State=0
Turn relay 1 'on': http://192.168.1.2/state.xml?relay1State=1
Turn relay 1 'on' and turn relay3 'off': http://192.168.1.2/state.xml?relay1State=1&relay3State=0
Commands can be issued to pulse the relays instead of simply turning them on or off by setting the relayXState to 2.
Pulse relay 1: http://192.168.1.2/state.xml?relay1State=2
The example above will cause relay 1 to pulse. The pulse time is specified in the setup page for each relay.
Commands can also specify pulse times so that the relay can be pulsed for times other than the times specified in the
relay setup pages. This is done by sending an additional variable called pulseTimeX (once again, X represents the
appropriate relay).
Pulse relay1: http://192.168.1.2/state.xml?relay1State=2&pulseTime1=5.5
The example above will cause relay 1 to pulse for 5.5 seconds.
Note that the pulseTimeX variable does not change the pulse time specified in the setup page and it is not stored or
recorded. The pulseTimeX variable only changes the pulse duration for the single pulse initiated by that command.
In other words, you must issue the pulseTimeX for each pulse command that differs from the preset pulse time. For
example, suppose the pulse time is set to 1.5 seconds in the configuration pages. To issue one 1.5 second pulse, three
five second pulses, and a 1.5 second pulse once again, you would issue the following commands...
state.xml?relay1State=2
state.xml?relay1State=2&pulseTime1=5
state.xml?relay1State=2&pulseTime1=5
state.xml?relay1State=2&pulseTime1=5
state.xml?relay1State=2
(Note that http://192.168.1.2/ would be included on all commands above)
Multiple relays can be changed with a single command by submitting multiple relayXState variables separated by an
ampersand symbol (&). All four relayXState variables or a subset of the relayXState variables can be included. The
relayXState variables can be in any order. Relays that are already in the desired state will not be affected by on/off
commands. Note that pulse commands will reset the pulse timer each time a command is received.
The following line illustrates how to turn 'on' relay 1, turn 'on' relay 2, and turn 'off' relay 4.
http://192.168.1.2/state.xml?relay1State=1&relay4State=0&relay2State=1
When the above commands are sent to WebRelay-Quad
The commands can also be sent without having WebRelay-Quad
adding the noReply field as follows.
Turn relay3 'on' without returning state: http://192.168.1.2/state.xml?relay3State=1&noReply=1
Turn relay3 'off' without returning state: http://192.168.1.2/state.xml?relay3State=0&noReply=1
Password :
If the control password is enabled in the WebRelay-Quad
Xytronix Research & Design, Inc.
TM
to control the relays. Commands are sent using variables called
This will pulse the relay for the preset time (1.5 seconds)
This will pulse the relay for 5 seconds.
This will pulse the relay for 5 seconds
This will pulse the relay for 5 seconds
This will pulse the relay for the preset time (1.5 seconds)
, its current state is returned in the form of an XML page.
TM
return the XML page. This is accomplished by
TM
unit and the XML page is requested through a browser,
TM
WebRelay-Quad
Users Manual
TM
page 26

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WebRelay-Quad X-WR-4R1-5 and is the answer not in the manual?

This manual is also suitable for:

Webrelay-quad x-wr-4r1-iWebrelay-quad x-wr-4r1-e

Table of Contents