Device control
Parameter | Description | Required |
---|---|---|
action | ctrlDevice | True |
pn | Datalogger number | True |
devcode | Device protocol encoding | True |
devaddr | Device address (485 bus) | True |
sn | Device serial number | True |
id | Field ID to be set | True |
val | The value of the field id to be set | True |
response:
Parameter | Description | Required |
---|---|---|
dat | Response after command issuance, The format is an uppercase hexadecimal string, such as "AA BB CC DD EE FF". The system will not parse or modify this response, and will directly pass a callback to the user.Additionally, some instructions do not bring a response and return 'null' at this time | True |
status | The default is -1 (not processed), with a value of 0 for successful distribution and 1 for failed distribution | True |
{
"err":0,
"desc":"ERR_NONE",
"dat":{
"dat":"00 01 02",
"status":-1
}
}
Possible errors:
Response error code | Description | Details |
---|---|---|
0x0001 | ERR_FAIL | Fail |
0x0006 | ERR_FORMAT_ERROR | format error |
0x0009 | ERR_UNSUPPORTED | Operation not supported |
0x0008 | ERR_FORBIDDEN | refuse |
0x0107 | ERR_COLLECTOR_OFFLINE | The Datalogger has been taken offline |
0x000B | ERR_NO_PERMISSION | No permissions |
0x0002 | ERR_TIMEOUT | Timeout |