User guide

SAA CR Logger Integration Guide
May 2012 24
Appendix I: Integrating other Sensors into the Main Program (Advanced)
** Please contact Measurand if you need assistance in this procedure. The below example is not exactly
how the code looks today, but it is similar. **
When adding additional sensor programming to the main SAA program, conflicts can arise with existing
programming. The SAA_Include references COM Ports 1-4. If any of these ports are used for connecting
other sensors, then all references to these ports must be commented out of the serial port subroutines
in the SAA_Include file. Provided is an example program that reads data from piezometers, crackmeters,
tiltmeters, a barometer, a temperature and relative humidity sensor, a wind speed sensor, and SAAs.
Note: The SAAF-related code in the following example is not the most recent code. This example
is meant to give an idea as to how to add other sensors into the ‘Main Program’. Please consult
Measurand for assistance when trying to combine measurements from various sensors into a
single program.
The SAA data is collected over Scan Interval 1 (15 minutes) and is averaged using Data Tables over 16 x
Scan Interval 1 (4 hours). 50 samples are taken per scan, so 800 samples are averaged every 4 hours.
The piezometer data is collected at a less frequent interval than the other sensors (every 8 hours) using
a ‘SlowSequence’. Data from all other sensors is collected every 15 minutes.
'DECLARE USER SPECIFIED CONSTANTS (must be modified by user to match application specifications):
'---------------------------------------------------------------------------------------------------------------------------------
'Enter the number of preliminary samples to capture
Const NUM_PRELIM_SAMPLES = 5
' Enter the number of SAAs to be monitored:
Const NUM_SAAS = 2
' Enter the number of PZ strings to be monitored (has to be at least 1 even if there are no PZ strings !!!)
Const NUM_PIEZO_STRINGS = 0
' Enter the number of total devices (number of SAAs + PZ strings):
Const NUM_DEVICES = 2
' Enter the number of Earth Pressure Cells (EPC) to be monitored:
Const NUM_EPCS = 4