Programming examples – Campbell Scientific CSBUOY-NS Buoy System User Manual
Page 16

Section 4. Communication
Programming Examples
The following example allows the CR1000 to communicate with one
CSBUOY-NS, measuring the parameters.
‘CR1000 Series Datalogger
Public Result, Remotedata (3)
DataTable (Test,1,-1)
DataInterval
(0,60,Sec,10)
Sample
(3,Remotedata(),FP2)
EndTable
Alias Remotedata(1) = pH
Alias Remotedata(2) = WaterTempC
Alias Remotedata(3) = BatteryVolt
BeginProg
Scan
(30,Sec,0,0)
GetVariables
(Result,ComSDC7,0,1,0000,0,“Public”,“Buoydata()”,Remotedata(),3)
‘where 1 is the PakBus address of the CSBUOY-NS
CallTable
Test
NextScan
EndProg
This example allows the CR10X to communicate with one CSBUOY-NS.
;{CR10X-PB}
;
*Table 1 Program
01: 30
Execution
Interval
(seconds)
1: Batt Voltage (P10)
1: 1
Loc [ Batt ]
2: PakBus - Wireless Network Master (P193)
1: 1
Number
of
Remotes
2: 10
First
Remote
Address
3: 0
Time Into Transmit Interval (sec)
4: 300
Transmit Interval (sec, 0 = use execution interval)
5: 0
Transmit Delay Between Remotes (sec)
6: 5
Swath
to
Receive
7: 7
First Loc for Data Received [ RID_1 ]
8: 0
Swath
to
Send
9: 18
First Loc to Send [ Scratch ]
10: 2
Result Code Loc [ RCom_1 ]
3: Data Table (P84)
1: 0
Seconds
into
Interval
2: 300
Seconds
Interval
3: 0
(0 = auto allocate, -x = redirect to inloc x)
4: Hist
Table
Name
4-2