XML/JSON Operation
X-600M Users Manual
Password Protection is enabled, then the control access depends on how the user has authenticated
himself.
If the http basic authentication is used to request state.xml and control I/O on the X-600M, then only
those I/O that belong to the access group “cbw” can actually be changed. All other I/O will remain in their
current states regardless of the commands sent to change them. For example, if a user “John” uses http
basic authentication to access state.xml, and relay 2 and 4 belong to the special access group “cbw”,
then John can controll relays 2 and 4. John cannot control relays 1 and 3.
If the user logs in using the X-600M secure login screen, then that user can control I/O if those I/O
belong to at least one of the access groups that the user also belongs to. For example, if a user “John”
belongs to the “user” access group and relays 1 and 3 belong to the “user” access group, then John can
control relays 1 and 3. John cannot control relays 2 and 4.
Relay State Control
To control a relay or other I/Os on the X-600M you need to know the name assigned to the relay or I/O.
For example, if a relay has been registered with the X-600M and given the name
doorLock
, then we
could energize the relay by issuing the following command:
http://192.168.1.2/state.xml?doorLockState=1
The response to this command is the file state
.xml
and would look something like this:
<datavalues>
<doorLock>1</doorLock>
</datavalues>
Where: 1 = Relay On, 0 = Relay Off, 5 = Relay Toggle
Notice that the word State is appended to the name of the relay.
Pulse Relay
When the pulse command is sent (relayState = 2), the output will turn
ON
for the Pulse Duration
specified in the command.
For example, to pulse to the relay named
doorLock
for 5 seconds, issue the following command:
Command
Description
state.xml?
doorLockState=2&doorLockPulseTime=5
Pulse doorLock for 5 seconds.
Notice that the word “State” is appended to the name of the relay “doorLockState” in order to changes
it's state and that the words “PulseTime” are appended to the name of the relay “doorLockPulseTime” to
define the pulse duration.
Setting the value of other I/O and Registers
The state of other I/Os and registers previously configured on the X-600M can be changed using the
same method above, accept that the word “State” does not need to be appened to the name of the I/O.
For example, to set an I/O named
count1
to the value of
200
, issue the following command:
Command
Description
state.xml?count1=200
Set counter1 to 200.
Page 108
Xytronix Research & Design, Inc.
Содержание X-600M
Страница 1: ...X 600MTitle Page Goes Here...
Страница 6: ...X 600M Users Manual Page 4 Xytronix Research Design Inc...
Страница 99: ...X 600M Users Manual Setup Pages Xytronix Research Design Inc Page 97...
Страница 116: ...Appendix B Installing New Firmware X 600M Users Manual Page 114 Xytronix Research Design Inc...