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

7.8.16 Program Signatures<br />

scan times, two separate scans can be used with logic to jump between them. If a<br />

PulseCount() is used in both scans, then a PulseCountReset is used prior to<br />

entering each scan.<br />

A program signature is a unique integer calculated from all characters in a given<br />

set of code. When a character changes, the signature changes. Incorporating<br />

signature data into a the <strong>CR1000</strong> data set allows system administrators to track<br />

program changes and assure data quality. The following program signatures are<br />

available.<br />

• text signature<br />

• binary-runtime signature<br />

• executable-code signatures<br />

7.8.16.1 Text Signature<br />

The text signature is the most-widely used program signature. This signature is<br />

calculated from all text in a program, including blank lines and comments. The<br />

program text signature is found in the Status table as ProgSignature. See CRBasic<br />

example Program Signatures (p. 242).<br />

7.8.16.2 Binary Runtime Signature<br />

7.8.16.3 Executable Code Signatures<br />

The binary runtime signature is calculated only from program code. It does not<br />

include comments or blank lines. See CRBasic example Program Signatures (p.<br />

242).<br />

Executable code signatures allow signatures to be calculated on discrete sections<br />

of executable code. Executable code is code that resides between BeginProg and<br />

EndProg instructions. See CRBasic example Program Signatures (p. 242).<br />

CRBasic Example 51.<br />

Program Signatures<br />

'Program reports the program text signature (ProgSig = Status.ProgSignature), the<br />

'binary run-time signature (RunSig = Status.RunSignature), and calculates two<br />

'executable code segment signatures (ExeSig(1), ExeSig(2))<br />

'Define Public Variables<br />

Public RunSig, ProgSig, ExeSig(2),x,y<br />

'Define Data Table<br />

DataTable(Signatures,1,1000)<br />

DataInterval(0,1,Day,10)<br />

Sample(1,ProgSig,FP2)<br />

Sample(1,RunSig,FP2)<br />

Sample(2,ExeSig(),FP2)<br />

EndTable<br />

'Program<br />

BeginProg<br />

ExeSig() = Signature<br />

'initialize executable code signature<br />

242

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

Saved successfully!

Ooh no, something went wrong!