SDI-12 command basics
SDI-12 commands have three components:
- Sensor address (a) – a single character and the first character of the command. Use the default address of zero (0) unless multiple sensors are connected to the same port.
- Command body – an upper case letter (the “command”), optionally followed by one or more alphanumeric qualifiers.
- Command termination (!) – an exclamation mark.
An active sensor responds to each command. Responses have several standard forms and always terminate with <CR><LF> (carriage return and line feed). Standard SDI-12 commands are listed in Campbell Scientific sensor SDI-12 command and response set.
NOTE:
The CS451/CS456 does not support all variants of the commands in the following table.
Name |
Command |
Response1 |
---|---|---|
Acknowledge Active | a!
|
a<CR><LF> |
Send Identification | aI!
|
allccccccccmmmmmmvvvxxx...xx <CR><LF> |
Start Verification | aV!
|
atttn <CR><LF> |
Address Query | ?!
|
a<CR><LF> |
Change Address | aAb!
|
b<CR><LF> |
Start Measurement | aM!
aM1!...aM9!
|
atttn<CR><LF> |
Start Measurement and Request CRC |
aMC!
aMC1!...aMC9!
|
atttn <CR><LF> |
Start Concurrent Measurement | aC!
aC1!...aC9!
|
atttnn<CR><LF> |
Start Concurrent Measurement and Request CRC |
aCC!
aCC1!...aCC9!
|
atttnn<CR><LF> |
Send Data | aD0!...aD9!
|
a<values><CR><LF> or a<values><CRC><CR><LF> |
Continuous Measurement | aR0!...aR9!
|
a<values><CR><LF> |
Continuous Measurement and Request CRC |
aRC0!...aRC9!
|
a<values><CRC><CR><LF> |
Extended Commands | aXNNN!
|
a<values><CR><LF> |