10 program examples, Cr1000 example – discrete outputs – Campbell Scientific 0871LH1 Freezing Rain Sensor User Manual
Page 12

9
If the application requires the monitoring of the discrete outputs the 5Vdc
connection must be made.
Isolate wires that are not connected as they may cause problems if
shorted to ground.
10 Program Examples
It is possible to collect icing information either by the discrete outputs of
the 0871LH1, or the available RS422 output.
1
10.1
CR1000 Example – Discrete Outputs
Monitor the discrete outputs of the 0871LH1 for icing events and changes
to the sensor status. Data tables are updated only after an icing event or
status change occurs.
'Declare Public Variables
Public TimeCount
Public IceSignal
'ice signal: Open = no ice, Ground = ice
Public StatusSignal
'status signal: Ground = okay, Open = fault
'Define Data Tables
DataTable (Sensor_Status,True,-1)
Sample (1,StatusSignal,FP2)
EndTable
DataTable (Ice_Condition,True,-1)
Sample (1,IceSignal,FP2)
EndTable
'Main Program
BeginProg
'In order for the datalogger to receive data from the 0871LH1, 'ports 1 & 2 must be configured as inputs.
PortsConfig (&B11,&B00)
NOTE:
WARNING:
Table 5. Power Connections to Terminal Expander
Description
Pin
Colour
Connection
24VDC A
Red
V+
24VDC Return
B
Black
V-
Table 6. SC110 Connections
Description
Colour
MD485
CR1000/CR3000
DB9 Male Connector
RS-232 (to DTE)
N/C
CR1000 Tx
Brown N/C
C3
CR1000 Rx
White N/C
C4
CR1000 Gnd
Yellow N/C
G
Shield
Clear N/C
G