User Manual
289 Appendix D
D.2.3 Analogoutput
D.2.3.1 GET /analogoutput/(all|{id})/value
D.3.3.2 POST /analogoutput/all/value
Request The content-type will be ‘application/x-www-form-urlencoded’.
{id} : is the AO channel ID starting from 0
Examples:
Use the following URI to get the AO-0 value.
http://10.0.0.1/analogoutput/0/value
Use the following URI to get the all AO values.
http://10.0.0.1/analogoutput/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-6224 status=”OK”>
<AO>
<ID>0</ID>
<VALUE>0FFF</VALUE>
</AO>
</ADAM-6224>
If result is failed , the content will look like below
<?xml version="1.0" ?>
<ADAM-6224 status=”{error}”>
</ADAM-6224>
{error} : The error message.
Remarks If the {id} is out of range, the response will return HTTP status code
501 (Not implemented)
The content of <VALUE> is in HEX format and from 0000 to 0FFF,
which maps to the minimal to maximal value of the range. (Analog
output value is 12 bits)
Request The content-type will be ‘application/x-www-form-urlencoded’.
Examples:
Use the following URI to set the AO value(s).
http://10.0.0.1/analogoutput/all/value
The coming data with the request will be {name}={value} pair(s).
{name} : The name of the channel, for example AO0.
{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
3, then the name-value pairs will look like below:
AO0=00FF&AO1=0000&AO2=0FFF
Response The content-type will be ‘text/xml’
The content will look like below
<?xml version="1.0" ?>
<ADAM-6224 status=”{status}”>
</ADAM-6224>
{status} : The result. If succeed, the result will be ‘OK’; otherwise,
the result will be the error message.
Remarks The {value} of the post data is in HEX format and from 0000 to
0FFF, which maps to the minimal to maximal value of the range.
(Analog output value is 12 bits)