SlowSequence
Do
SDI12SensorSetup(1,7,3,95)
Delay(1,95,Sec)
SDI12SensorResponse(Temp(4))
Loop
EndSequence
CRBasic Example 56. Using Alternate Concurrent Command (aC)
'This program example demonstrates the use of the special SDI-12 concurrent measurement
'command (aC) when back-to-back measurements are not desired, as can occur in an application
'that has a tight power budget. To make full use of the aC command, measurement control
'logic is used.
'Declare variables
Dim X
Public RunSDI12
Public Cmd(4)
Public Temp_Tmp(4)
Public Retry(4)
Public IndDone(4)
Public Temp_Meas(4)
Public GroupDone
'Main Program
BeginProg
'Preset first measurement command to C!
For X = 1 To 4
cmd(X) = "C!"
Next X
'Set five-second scan rate
Scan(5,Sec,0,0)
'Other measurements here
'Set five-minute SDI-12 measurement rate
If TimeIntoInterval(0,5,Min) Then RunSDI12 = True
'Begin measurement sequence
If RunSDI12 = True Then
For X = 1 To 4
Temp_Tmp(X) = 2e9 'when 2e9 changes, indicates a change
Next X
277