5 edlog set relay example – Campbell Scientific LR4 Four Channel Latching Relay Module User Manual
Page 14

LR4 Four Channel Latching Relay Module
• The CR200(X) does not support setting all four relays in one command.
The individual relay commands can only be used on the CR200(X).
'CR200(X) Set Relay #4 to State 1.
SDI12Recorder(RelayState_4, "0XR;4,1!", 1.0, 0)
7.5 Edlog Set Relay Example
Although this example is for the CR10X datalogger, the CR510 and CR23X
are programmed similarly. Edlog dataloggers use Instruction 68 after
Instruction 105 to send the extended commands.
;A P68 following this P105 sends extended commands
;Use program control to set the Relay3Val variable to either 0 or 1
1: SDI-12 Recorder (P105)
1: 0
SDI-12
Address
2: 0
Start Measurement (aM!) ;Leave at zero
3: 1
Port
4: 13
Loc [ Relay3Val ] ; This location contains the desired state value
5: 1.0
Multiplier
6: 0.0
Offset
2: Extended Parameters 4 Digit (P68)
1: 88
Option
;Decimal for Character 'X'
2: 82
Option
;Decimal for Character 'R'
3: 59
Option
;Decimal for Character ';'
4: 51
Option
;Decimal for Character '3' (49 for#1, 50 for #2, and 52 for #4 )
5: 44
Option
;Decimal for Character ','
6: 128
Option
;Relay state value from input location
7: 0000
Option
8: 0000
Option
;Read the state of all 4 relays
3: SDI-12 Recorder (P105)
1: 0
SDI-12
Address
2: 0
Start
Measurement
(aM!)
3: 1
Port
4: 1
Loc [ ReadRel1 ]
5: 1.0
Multiplier
6: 0.0
Offset
8