CS505 FUEL MOISTURE SENSOR
5
5.2 21X EXAMPLE PROGRAM
A program to measure a CS505 fuel moisture sensor using the Pulse Count Instruction
P3 of a 21X, CR10(X), CR500, or CR23X. The fuel moisture sensor is measured when
flag 1 is set high. The measurement is made then flag 1 is set low.
;{21X}
color
function
example 21X Program wiring connections
red power 12V
black ground
orange
enable
control port 5
green
signal
pulse channel 1
clear shield
*Table 1 Program
01:
1
Execution Interval (seconds)
1: If time is (P92
Set flag 1 high hourly, to measure CS505.
1:
0
Minutes into a
2:
60
Minute Interval
3:
11
Set Flag 1 High
2: If Flag/Port (P91)
If flag 1 is high, initiate the reading.
1:
11
Do if Flag 1 is High
2:
30
Then Do
3: Do (P86)
Turn on the CS505 by applying 5 volts to the enable lead.
1:
45
Set Port 5 High
4: Beginning of Loop (P87)
Delay for complete count interval.
1:
1
Delay
2:
2
Loop Count
5: End (P95)
End of loop to delay.
6: Pulse (P3)
Determine the CS505 output frequency.
1:
1
Reps
2:
1
Pulse Input Channel
3:
21
Low Level AC, Output Hz
4:
1
Loc [ CS505kHz ]
5:
0.001
Mult
Convert to kHz
6:
0.0
Offset
7: Do (P86)
Turn off the CS505
1:
55
Set Port 5 Low
8: Z=1/X (P42)
Convert frequency in kHz to period in milliseconds.
1:
1
X Loc [ CS505kHz ]
2:
2
Z Loc [ CS505mSec ]