Campbell Scientific IRS21 Road Weather User Manual
Page 23

IRS21 Lufft Intelligent Road Surface Sensor
'Declare Other Variables
'Example:
'Dim Counter
'Declare Constants
'Example:
'CONST PI = 3.141592654
DataTable (road,True,10)
Sample
(1,temperature1,FP2)
Sample
(1,temperature2,FP2)
Sample
(1,SurTmp0,FP2)
Sample
(1,SurSal0,FP2)
Sample
(1,SurFrePn0,FP2)
Sample
(1,SurWatDp0,FP2)
Sample
(1,SurSta0,FP2)
Sample
(1,PavSenEr0,FP2)
EndTable
'Define Subroutines
'Sub
Sub sio4setup
'request data string &&A^M^J #1
data
115,116,114,115,116,32,49,32,34,38,38,65,94,77,94,74,34
for a=1 to 17 : read reqdata(a) : next a
SDMSIO4
(reqdata(),1,0,4,321,0000,0000,17,1.0,0)
Delay
(1,2,Sec)
'data fillter string ffffffff #2
data
102,108,116,115,116,32,50,32,34,102,102,102,102,102,102,102,102,34
for a=1 to 18 : read datafilter(a) : next a
SDMSIO4
(datafilter(),1,0,4,321,0000,0000,18,1.0,0)
Delay
(1,2,Sec)
'port setup for port 4 4 13 3 0 0 9 0
data
112,111,114,116,115,101,116,32,52,32,49,51,32,51,32,48,32,48,32,57,32,48
for a=1 to 22 : read portset(a) : next a
SDMSIO4
(portset(),1,0,4,321,0000,0000,22,1.0,0)
Delay
(1,2,Sec)
EndSub
'Main Program
BeginProg
'Enter
other
measurement
instructions
'Call
Output
Tables
'Example:
SlowSequence
Scan
(120,Sec,3,0) 'irs21
19