04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A. CRBasic Programming Instructions<br />

SerialInBlock<br />

Stores incoming serial data. This function returns the number of bytes received.<br />

Syntax<br />

SerialInBlock(ComPort, Dest, MaxNumberBytes)<br />

SerialInChk<br />

Returns the number of characters available in the datalogger serial buffer.<br />

Syntax<br />

SerialInChk(ComPort)<br />

SerialInRecord<br />

Reads incoming serial data on a COM port and stores the data in a destination<br />

variable.<br />

Syntax<br />

SerialInRecord(COMPort, Dest, BeginWord, NBytes, EndWord,<br />

NBytesReturned, LoadNAN)<br />

SerialOpen<br />

Sets up a datalogger port for communication with a non‐PakBus device.<br />

Syntax<br />

SerialOpen(ComPort, BaudRate, Format, TXDelay, BufferSize)<br />

SerialOut<br />

Transmits a string over a datalogger communication port.<br />

Syntax<br />

SerialOut(ComPort, OutString, WaitString, NumberTries,<br />

TimeOut)<br />

SerialOutBlock<br />

Send binary data out a communications port. Used to support a transparent<br />

serial talk‐through mode.<br />

Syntax<br />

SerialOutBlock(ComPort, Expression, NumberBytes)<br />

A.12 Peer-to-Peer PakBus Communications<br />

Read More! See section PakBus Overview (p. 351) for more information. Also see<br />

<strong>Campbell</strong> <strong>Scientific</strong> PakBus® Networking Guide available at<br />

www.campbellsci.com.<br />

PakBus ® is a proprietary network communications protocol designed to maximize<br />

synergies between <strong>Campbell</strong> <strong>Scientific</strong> dataloggers and peripherals. It features<br />

auto-discovery and self-healing. Following is a list of CRBasic instructions that<br />

control PakBus ® processes. Each instruction specifies a PakBus ® address and a<br />

COM port. The PakBus ® address is a variable that can be used in CRBasic like<br />

any other variable. The COM port sets a default communications port when a<br />

route to the remote node is not known. The following COM port arguments are<br />

available:<br />

• ComRS-232<br />

• ComME<br />

510

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

Saved successfully!

Ooh no, something went wrong!