EasyManua.ls Logo

Advantech ADAM-6266 - C.2.2 Analog Output Resources

Advantech ADAM-6266
192 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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
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)
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๎˜ƒat๎˜ƒ+โ€๎˜ƒ5V๎˜ƒoutput๎˜ƒ
range๎˜ƒto๎˜ƒ0V,๎˜ƒโ€2V๎˜ƒand ๎˜ƒ5V๎˜ƒrespectively,๎˜ƒthen๎˜ƒthe๎˜ƒnameโ€value๎˜ƒpairs๎˜ƒwi ll๎˜ƒ
look๎˜ƒlike๎˜ƒbelow:
AO0=0800&AO1=04CC&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

Table of Contents

Related product manuals