beautypg.com

Campbell Scientific SDM-AO4A Four Channel Analog Output Module User Manual

Page 17

background image

SDM-AO4A Four Channel Analog Output

10: Sample (P70)

; Sample RH

1: 1

Reps

2: 4

Loc [ RH ]


; Routine to convert 0-360 deg. Direction to 0-540 deg.

11: Do (P86)
1: 21

Set Flag 1 Low


12: If (X<=>F) (P89)

; Set Flag 1 if previous

1: 9

X Loc [ WD_0_540 ]

; reading was > 270

2: 3

>=

3: 270

F

4: 11

Set Flag 1 High


13: Z=X (P31)

; Set 0-540 value to current 0-360 reading

1: 2

X Loc [ WD_0_360 ]

2: 9

Z Loc [ WD_0_540 ]


14: If (X<=>F) (P89)

; If current reading is <180

1: 9

X Loc [ WD_0_540 ]

2: 4

<

3: 180

F

4: 30

Then

Do


15: If Flag/Port (P91)

; And if previous reading

1: 11

Do if Flag 1 is High

; was > 270

2: 30

Then

Do


16: Z=X+F (P34)

; Add 360 to the current reading

1: 9

X Loc [ WD_0_540 ]

; otherwise, the current reading

2: 360

F

; is left alone

3: 9

Z Loc [ WD_0_540 ]


17: End (P95)

18: End (P95)

; Scale the measurements for the SDM-AO4A to output 0 to 1000 mV

19: Z=X*F (P37)

; Scale WS: 0-50 mps = 0-1000 mV

1: 1

X Loc [ WS_ms ]

2: 20

F

3: 5

Z Loc [ WSoutput ]


20: Z=X*F (P37)

; Scale WD: 0-540 deg = 0-1000 mV

1: 9

X Loc [ WD_0_540 ]

2: 1.859

F

3: 6

Z Loc [ WDoutput ]


21: Z=X+F (P34)

; Scale Temperature: -40-60 deg C = 0-1000 mV

1: 3

X Loc [ Temp_C ]

2: 40

F

3: 7

Z Loc [ TempOut ]

13