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 />

• Buffer-size margin (one extra record + one byte).<br />

SerialOutBlock() 1,3<br />

• Binary<br />

• Can run in pipeline mode inside the digital measurement task (along with<br />

SDM instructions) if the COMPort parameter is set to a constant argument<br />

such as COM1, COM2, COM3, or COM4, and the number of bytes is also<br />

entered as constant.<br />

SerialOut()<br />

• Handy for ASCII command and a known response, e.g., Hayes-modem<br />

commands.<br />

• Returns 0 if not open, else the number of bytes sent<br />

SerialInRecord() 2<br />

• Can run in pipeline mode inside the digital measurement task (along with<br />

SDM instructions) if the COMPort parameter is set to a constant argument<br />

such as COM1, COM2, COM3, or COM4, and the number of bytes is also<br />

entered as a constant.<br />

• Simplifies synchronization with one way.<br />

• Simplifies working with protocols that send a "record" of data with known<br />

start and/or end characters, or a fixed number of records in response to a poll<br />

command.<br />

• If a start and end word is not present, then a time gap is the only remaining<br />

separator of records. Using COM1, COM2, COM3, or COM4 coincidentally<br />

detects a time gap of >100 bits if the records are less than 256 bytes.<br />

• Buffer size margin (one extra record + one byte).<br />

1 Processing instructions<br />

2 Measurement instruction in the pipeline mode<br />

3<br />

Measurement instruction if expression evaluates to a constant<br />

7.8.8.5.2 Input Programming Basics<br />

Applications with the purpose of receiving data from another device usually<br />

include the following procedures. Other procedures may be required depending on<br />

the application.<br />

1. Know what the sensor supports and exactly what the data are. Most sensors<br />

work well with TTL voltage levels and RS-232 logic. Some things to<br />

consider:<br />

• Become thoroughly familiar with the data to be captured.<br />

• Can the sensor be polled<br />

• Does the sensor send data on its own schedule<br />

• Are there markers at the beginning or end of data Markers are very useful<br />

for identifying a variable length record.<br />

206

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

Saved successfully!

Ooh no, something went wrong!