Campbell Scientific CWS220 Wireless Sensor Network (CWB100, CWS220, and CWS900 - Page 33

Programming the Datalogger

Page 33 highlights

Wireless Sensor Network transmitted by wireless sensors. See Section 4.2.1 for more information on the format and use of the configuration string. After the configuration settings have been sent to the base station and wireless sensors, the sensor configuration file may be sent to the datalogger. The datalogger must then be programmed to access that file using the third parameter of the CWB100 instruction. See Section 5 for programming details. To send the sensor configuration file to the datalogger, connect a serial cable or USB-to-serial cable to the RS-232 port between the computer and the datalogger. Select the Send a sensor configuration file to the datalogger attached item in the Configure Devices list, then select Click Here. Enter the correct COM port number for the cable that attaches to the datalogger. Ensure that the datalogger is powered as described in the dialog box. The datalogger's PakBus address does not need to be specified for this transaction but if a security code is present in the datalogger, that code needs to be entered in the Datalogger Security Code field. Click Connect to send the configuration file to the datalogger. 3.5 Programming the Datalogger The datalogger program must include a destination array large enough to store all the values returned by the wireless sensors and a scan that includes a CWB100() instruction. The scan interval must be large enough to allow the sensors time to transmit. In this example, the program will simply collect data from the two wireless sensors once per minute and store a sample of each value collected. For additional details and advanced programming examples, see Section 4. Begin by opening the CRBasic editor in LoggerNet, PC400 or RTDAQ software. Select New CR1000 Program File to begin editing the datalogger program. For information on writing datalogger programs or using the CRBasic editor, see the CR1000 and LoggerNet manuals. Additionally, the CRBasic editor help file has an example program for the wireless sensor instructions. 25

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70

Wireless Sensor Network
transmitted by wireless sensors.
See Section 4.2.1 for more information on the
format and use of the configuration string.
After the configuration settings have been sent to the base station and wireless
sensors, the sensor configuration file may be sent to the datalogger.
The
datalogger must then be programmed to access that file using the third
parameter of the CWB100 instruction.
See Section 5 for programming details.
To send the sensor configuration file to the datalogger, connect a serial cable or
USB-to-serial cable to the RS-232 port between the computer and the
datalogger.
Select the
Send a sensor configuration file to the datalogger attached
item
in the Configure Devices list, then select
Click Here
.
Enter the correct COM
port number for the cable that attaches to the datalogger.
Ensure that the
datalogger is powered as described in the dialog box.
The datalogger’s PakBus
address does not need to be specified for this transaction but if a security code
is present in the datalogger, that code needs to be entered in the Datalogger
Security Code field.
Click Connect to send the configuration file to the
datalogger.
3.5
Programming the Datalogger
The datalogger program must include a destination array large enough to store
all the values returned by the wireless sensors and a scan that includes a
CWB100() instruction.
The scan interval must be large enough to allow the
sensors time to transmit.
In this example, the program will simply collect data from the two wireless
sensors once per minute and store a sample of each value collected.
For
additional details and advanced programming examples, see Section 4.
Begin by opening the CRBasic editor in LoggerNet, PC400 or RTDAQ
software.
Select New CR1000 Program File to begin editing the datalogger
program.
For information on writing datalogger programs or using the
CRBasic editor, see the CR1000 and LoggerNet manuals.
Additionally, the
CRBasic editor help file has an example program for the wireless sensor
instructions.
25