beautypg.com

Move(dest, destreps, source, sourcereps), Newfieldcal – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 374

background image

Section 9. Program Control Instructions

Move(Dest, DestReps, Source, SourceReps)

Moves the values from a range of elements of a variable array to a destination
variable array. It can also be used to fill a range of elements with a constant.

Syntax

Move(

Dest, DestReps, Source, SourceReps

)

Remarks
The Source and Destination variables are not required to be declared as the same
data types (Long, String, Boolean, or Float).

Parameter
& Data Type

Enter

MOVE PARAMETERS

Dest

Variable or Array

The first variable of an array in which to store the variable values being moved.

DestReps

Constant

The number of array elements that will be written to.

Source

Array

The name of the variable array that holds the values to be copied to the Source array. If a
constant is entered for the Source, then the Dest array will be filled with the constant's
value.

SourceReps

Constant

The number of variable values that will be copied into the Dest array. This parameter
normally should be set equal to the DestReps parameter. If this parameter is set to 1, the
same value will be placed in each variable of the Dest array.

Move Function Example:

Move(x, 20, y, 20)

'move array y into array x

Move(x, 20, 0.0, 1)

'fill x with 0.0.

NewFieldCal

Boolean variable used in conjunction with the FieldCal or FieldCalStrain
instructions. See either topic for an example program.

NewFieldCal's state changes to True when a Field Calibration has been
performed and a new FieldCal.Cal file has been created

Syntax

DataTable (

TableName, NewFieldCal, Size

)

SampleFieldCal

EndTable

Remarks

The NewFieldCal function is a Boolean value that is normally used as the
trigger variable for a DataTable so that FieldCal values can be stored to a user
defined DataTable when a new calibration has been performed. This data
table should not be confused with the *.Cal file that the logger uses to restore
the calibration values. Once the NewFieldCal function is tested, it will be set
back to false. It is recommended that the user upload the DataTable to his PC
when the calibration procedure is complete. See FieldCal for an Example
program that uses NewFieldCal.

9-44