beautypg.com

11 system signatures, 4 tips, 1 use of variable arrays to conserve code space – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 150: 2 use of move() to conserve code space

background image

Section 7. Installation

150 

 

 

7.7.3.11 System Signatures

Signatures help assure system integrity and security. The following resources
provide information on using signatures.

Signature() instruction in Diagnostics

(p. 483).

RunSignature entry in table Status Table Fields and Descriptions

(p. 528).

ProgSignature entry in table Status Table Fields and Descriptions

(p. 528).

OSSignature entry in table Status Table Fields and Descriptions

(p. 528).

Security

(p. 70)

Many signatures are recorded in the Status table, which is a type of data table.
Signatures recorded in the Status table can copied to a variable using the
programming technique described in the Program Access to Data Tables

(p. 148).

Once in variable form, signatures can be sampled as part of another data table for
archiving.

7.7.4 Tips

7.7.4.1 Use of Variable Arrays to Conserve Code Space

CRBasic example Use of Variable Arrays to Conserve Code Space

(p. 150)

shows

example code to convert twenty temperatures in a variable array from °C to °F.

Note When using the () syntax, whether on the disable parameter or with
multiplier and offset on measurement instructions, if the parameter expression is
more than a simple reference to a variable, e.g., disvar() + 5, or multiplier() * 4, or
NOT enable_var(), the () syntax is ignored and reps will not take place for the
expression.

CRBasic Example 24. Use of Variable Arrays to Conserve Code Space 

For

I = 1

to

20

TCTemp(I) = TCTemp(I) * 1.8 + 32

Next

I

 

7.7.4.2 Use of Move() to Conserve Code Space

The Move() instruction can be used to set an array or partial array to a single
value or to copy to another array or partial array as shown in CRBasic example
Use of Move() to Conserve Code Space

(p. 150).

CRBasic Example 25. Use of Move() to Conserve Code Space 

Move

(counter(1),6,0,1)

'Reset six counters to zero. Keep array

'filled with the ten most current readings

Move

(TempC(2),9,TempC(1),9)

'Shift previous nine readings to make room

'for new measurement

'New measurement:

TCDiff

(TempC(1),1,mV2_5C,8,TypeT,PTemp,True,0,_60Hz,1.0,0)