04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 7. Installation<br />

Table 26. SDI12Recorder() Commands<br />

SDIRecorder() Instruction<br />

SDICommand Entry<br />

Actions Internal to<br />

<strong>CR1000</strong> and Sensor<br />

2 Use variable replacement in program to use same instance of SDI12Recorder() as issued aCV!<br />

(see the CRBasic example Using SDI12Recorder() C Command ).<br />

Alternate Start Measurement Command (Cv)<br />

The SDIRecorder() aCv (not C!) command facilitates using the SDI-12 standard<br />

Start Concurrent command (aCv!) without the back-to-back measurement<br />

sequence normal to the <strong>CR1000</strong> implementation of aCv!.<br />

Consider an application wherein four SDI-12 temperature sensors need to be nearsimultaneously<br />

measured at a 5 minute interval within a program that scans every<br />

5 seconds. The sensors requires 95 seconds to respond with data after a<br />

measurement request. Complicating the application is the need for minimum<br />

power usage, so the sensors must power down after each measurement.<br />

This application provides a focal point for considering several measurement<br />

strategies. The simplest measurement is to issue a M! measurement command to<br />

each sensor as follows:<br />

Public BatteryVolt<br />

Public Temp1, Temp2, Temp3, Temp4<br />

BeginProg<br />

Scan(5,Sec,0,0)<br />

'Non-SDI-12 measurements here<br />

SDI12Recorder(Temp1,1,0,"M!",1.0,0)<br />

SDI12Recorder(Temp2,1,1,"M!",1.0,0)<br />

SDI12Recorder(Temp3,1,2,"M!",1.0,0)<br />

SDI12Recorder(Temp4,1,3,"M!",1.0,0)<br />

NextScan<br />

EndProg<br />

However, the code sequence has three problems:<br />

1. It does not allow measurement of non-SDI-12 sensors at the required<br />

frequency.<br />

2. It does not achieve required 5-minute sample rate because each<br />

SDI12Recorder() instruction will take about 95 s to complete before the next<br />

SDI12Recorder() instruction begins, resulting is a real scan rate of about 6.5<br />

minutes.<br />

3. There is a 95-second time skew between each sensor measurements.<br />

Problem 1 can be remedied by putting the SDI-12 measurements in a<br />

SlowSequence scan. Doing so allows the SDI-12 routine to run its course<br />

without affecting measurement of other sensors, as follows:<br />

Public BatteryVolt<br />

Public Temp(4)<br />

BeginProg<br />

179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!