ADAM-6200 User Manual 182
C.2.2 Analog Output
C.2.2.1 GET /analogoutput/(all|{id})/value
C.2.2.2 POST /analogoutput/all/value
Request
Thecontent‐typewillbe‘application/x‐www‐form‐urlencoded’.
{id}:istheAOchannelIDstartingfrom0
Examples:
UsethefollowingURItogettheAO‐0value.
http://10.0.0.1/analogoutput/0/value
UsethefollowingURItogettheallAOvalues.
http://10.0.0.1/analogoutput/all/value
Response
The content-type will be ‘text/xml’
IfresultisOK,thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM-6224 status=”OK”>
<AO>
<ID>0</ID>
<VALUE>0FFF</VALUE>
</AO>
</ADAM-6224>
Ifresultisfailed,thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM‐6224status=”{error}”>
</ADAM-6224>
{error}:Theerrormessage.
Remarks
Ifthe{id}isoutofrange,theresponsewillreturnHTTPstatuscode501
(Notimplemented)
Request
Thecontent‐typewillbe‘application/x‐www‐form‐urlencoded’.
Examples:
UsethefollowingURItosettheAOvalue(s).
http://10.0.0.1/analogoutput/all/value
Thecomingdatawiththerequestwillbe{name}={value}pair(s).
{name}:Thenameofthechannel,forexampleAO0.
{value}:Thevaluetobesettotheindicatedchannel.
Forexample,
iftherequestisgoingtosetchannel0,1,2at+‐5Voutput
rangeto0V,‐2Vand 5Vrespectively,thenthename‐valuepairswi ll
looklikebelow:
AO0=0800&AO1=04CC&AO2=0FFF
Response
The content-type will be ‘text/xml’
Thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM‐6224status=”{status} ”>
</ADAM-6224>
{status}:Theresult.Ifsucceed,theresult
willbe‘OK’;otherwise,the
resultwill betheerrormessage.
Remarks