beautypg.com

2 cr10x program – Campbell Scientific IRS21 Road Weather User Manual

Page 24

background image

IRS21 Lufft Intelligent Road Surface Sensor

'rts hi to send polling string, dtr hi to power the road sensor

SDMSIO4

(sio4result,1,0,4,1027,0022,0000,0,1.0,0)

Delay (1,1,Sec)

SDMSIO4

(sio4result,1,0,4,1027,0010,0,0,1.0,0)

'rts lo to send data to the sensor

SDMSIO4

(sio4result,1,0,4,1024,0001,0000,0,1.0,0)

Delay

(1,1,mSec)

'rts hi to receive data from the sensor

SDMSIO4

(sio4result,1,0,4,1027,0020,0000,0,1.0,0)

Delay (1,1,Sec)

'dtr lo to turn the sensor off

SDMSIO4

(sio4result,1,0,4,1027,0001,0000,0,1.0,0)

Delay (1,1,Sec)

'send

the

filter

SDMSIO4

(datafilter(),1,0,4,2054,9002,0000,18,1.0,0)

'read

the

sio4

SDMSIO4

(sensordata(),1,0,4,4,0000,0000,8,1.0,0)

Delay (1,1,Sec)

SurTmp0=(SurTmp0*.1)-50
SurSal0=(SurSal0*.1)
SurFrePn0=(SurFrePn0*.1)*-1
SurWatDp0=((1560)-(16.55*SurWatDp0)+(.041*SurWatDp0^2))/1000

CallTable

road

NextScan

EndProg

6.2 CR10X Program

;{CR10X-TD}
;
*Table 1 Program
01: 60

Execution

Interval

(seconds)


;nosensor initialization

1: If (X<=>F) (P89)
1: 93

X Loc [ inp_init ]

2: 1

=

3: 0

F

4: 1

Call

Subroutine

1


2: Z=F x 10^n (P30)
1: 1

F

2: 0

n,

Exponent

of

10

3: 93

Z Loc [ inp_init ]


*Table 2 Program
02: 120

Execution

Interval

(seconds)

20