![ICP DAS USA PMD series User Manual Download Page 344](http://html1.mh-extra.com/html/icp-das-usa/pmd-series/pmd-series_user-manual_3622279344.webp)
ICP DAS PMC-523x/PMC-224x/PMD Series User Manual
329
In the CGI Query command, it consist two parameters: “job=get_ir_val” and
“ir_no=1”. For “job=get_ir_val”, “job” is the name of the first parameter,
“get_ir_val” is the value of the first parameter. The first parameter is used to query
the value of Internal Register of PMC. And then for “ir_no=1”, “ir_no” is the name
of the second parameter, “1” is the value of the second parameter. The combination
of first parameter and second parameter indicates to query the value of Internal
Register 1 of PMC. When PMC receives the CGI Query command, it will reply the
following message to the command sender.
{
"status": "OK",
"result": {
"value": 2.3
}
}
The returned value will be shown in the JSON format. In the above example, the
value of Internal Register 1 is 2.3. It is located in “value” section of the “result”
area.
JSONP Supported
If user wants to enable the JSONP, he/she can add an extra parameter “callback” to
the original CGI command, and then assign the value of the “callback” parameter
to the function which is used to receive the returned values. The following is an
example to enable the JSONP.
http://192.168.255.1/dll/query.dll?id=admin&password=Admi
n&job=get_ir_val&ir_no=1&callback=foo
In this example, the function named “foo” is used to receive the returned values.
The returned values are as below.
foo({
"status": "OK",
"result": {
"value": 2.3
}
});
The following table gives detailed information of the query command, command
parameters and returned values. For parameters “id”, “password” and “callback”,
please refer to the examples in section above.