User Manual

ADAM-6000 Series User Manual 292
D.2.5 Digitaloutput
D.2.5.1 GET /digitaloutput/(all|{id})/value
D.2.5.2 POST /digitaloutput/all/value
Request The content-type will be ‘application/x-www-form-urlencoded’.
{id} : is the DO channel ID starting from 0
Examples:
Use the following URI to get the DO-0 value.
http://10.0.0.1/digitaloutput/0/value
Use the following URI to get the all DO values.
http://10.0.0.1/digitaloutput/all/value
Response The content-type will be ‘text/xml’
If result is OK, the content will look like below
<?xml version="1.0" ?>
<ADAM-6050 status=”OK”>
<DO>
<ID>0</ID>
<VALUE>1</VALUE>
</DO>
</ADAM-6050>
If result is failed , the content will look like below
<?xml version="1.0" ?>
<ADAM-6050 status=”{error}”>
</ADAM-6050>
{error} : The error message.
Remarks If the {id} is out of range, the response will return HTTP status
code 501 (Not implemented)
Request The content-type will be ‘application/x-www-form-urlencoded’.
Examples:
Use the following URI to set the DO value(s).
http://10.0.0.1/digitaloutput/all/value
The coming data with the request will be {name}={value} pair(s).
{name} : The name of the channel, for example DO0.
{value} : The value to be set to the indicated channel.
For example, if the request is going to set channel 0, 1, 2 to value
1, then the name-value pairs will look like below:
DO0=1&DO1=1&DO2=1
Response The content-type will be ‘text/xml’
The content will look like below
<?xml version="1.0" ?>
<ADAM-6050 status=”{status}”>
</ADAM-6050>
{status} : The result. If succeed, the result will be ‘OK’; otherwise,
the result will be the error message.
Remarks