Here is a short description of how SDI12 works - see official SDI12 spec is here http://www.sdi-12.org/current%20specification/SDI-12_version1_3%20January%2026,%202013.pdf
Commands:
- aM! - measurement command with a = address. Tells sensor to take a measurement. Sensor responds with how long it will take to do the measurement, how and how many values will be returned.
- aMx! - additional or expanded measurement command, with additional parameter that allows sensor to have different types of measurements. For example, aM1! could be temperature, aM2! could be soil moisture at several levels. Arbitrary defined by sensor manufacturer.
- aCx! - concurrent measurement. A concurrent measurement is one which occurs while other SDI12 sensors ont he bus are also taking measurements. The sensor does not return the measurement to the data recorder after this command but only returns the time until all measurements will be ready and the number of measurements that it will make.
- aDx! - send data command to get groups of data from sensor. Each aD can have multiple results in it, depending on sensor design. This command must be preceded with an M! command.
- aRx! - continuous measurements command. Each command is an independent command. This command is not preceded with an M! command.
SDI Channels
Outpost WASP2-series and COBRA2-series with SDI channel inputs have the following input channel types:
- PIC SDI12
- PIC SDI12 Bulk
- PIC SDI12 Ultra
PIC SDI12 input always uses the aM! "measurement" command. The aMx! "additional measurement" command is therefore unavailable.
When a channel has completed the measurement request, the outpost sends the request data commands aD0!. No further aDx! command follows limiting the number of sensors that could possibly be read by the method. From the request data response the individual value is parsed based on the position parameter selected.
For example, for a Tekbox temperature and humidity sensor with command aM1! followed by aD0! will give a result 0+44.24+25.13
A position 0 would give 44.24 and position 1 would be 25.13.
This provides a logical 1-to-1 relationship for the PIC SDI input.
PIC SDI12 Bulk channel inputs are similar to the PIC SDI12 input except they log all responses across log entries using incremental aDx! command to fetch all possible data.
This input channel also uses the "position" parameter (set on the website) to specify the "additional" portion of the measurement command with the use of aCx! (additional concurrent measurement) instead of aMx!.
PIC SDI12 Ultra channel inputs gives the users the flexibility of choosing the required command - C!, or M!, or R! supported by the attached sensor. For example, C! command is similar to a PIC SDI12 Bulk channel. PIC SDI12 Ultra channel also gives the user the flexibility to enter a stabilization time - time required for the sensor to stabilize before a command should be sent.
This input channel is only supported by the PIC Firmware Version 5.12 and above.