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 10. Troubleshooting<br />

CRBasic Example 69.<br />

Using NAN to Filter Data<br />

'Declare Variables and Units<br />

Public TC_RefC<br />

Public TC_TempC<br />

Public DisVar As Boolean<br />

'Define Data Tables<br />

DataTable(TempC_Data,True,-1)<br />

DataInterval(0,30,Sec,10)<br />

Average(1,TC_TempC,FP2,DisVar)<br />

EndTable<br />

'Output process<br />

'Main Program<br />

BeginProg<br />

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

'Measure Thermocouple Reference Temperature<br />

PanelTemp(TC_RefC,250)<br />

'Measure Thermocouple Temperature<br />

TCDiff(TC_TempC,1,mV20,1,TypeT,TC_RefC,True,0,250,1.0,0)<br />

'DisVar Filter<br />

If TC_TempC = NAN Then<br />

DisVar = True<br />

Else<br />

DisVar = False<br />

EndIf<br />

'Call Data Tables and Store Data<br />

CallTable(TempC_Data)<br />

NextScan<br />

EndProg<br />

10.4 Communications<br />

10.4.1 RS-232<br />

Baud rate mis-match between the <strong>CR1000</strong> and datalogger support software is<br />

often the root of communication problems through the RS-232 port. By default,<br />

the <strong>CR1000</strong> attempts to adjust its baud rate to that of the software. However,<br />

settings changed in the <strong>CR1000</strong> to accommodate a specific RS-232 device, such<br />

as a smart sensor, display or modem, may confine the RS-232 port to a single<br />

baud rate. If the baud rate can be guessed at and entered into support software<br />

parameters, communications may be established. Once communications is<br />

established, <strong>CR1000</strong> baud rate settings can be changed. Clues as to what the baud<br />

rate may be set at can be found by analyzing current and previous <strong>CR1000</strong><br />

programs for the SerialOpen() instruction; SerialOpen() specifies a baud rate.<br />

Documentation provided by the manufacturer of the previous RS-232 device may<br />

also hint at the baud rate.<br />

431

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

Saved successfully!

Ooh no, something went wrong!