EasyManua.ls Logo

Campbell CR800 Series - Dimensioning Numeric Variables

Campbell CR800 Series
598 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section 7. Installation
131
'Boolean Variable Examples
Public Switches(8) As Boolean
Public FLAGS(16) As Boolean
'String Variable Example
Public FirstName As String * 16 'allows a string up to 16 characters long
DataTable(TableName,True,-1)
'FP2 Data Storage Example
Sample(1,Z,FP2)
'IEEE4 / Float Data Storage Example
Sample(1,X,IEEE4)
'UINT2 Data Storage Example
Sample(1,PosCounter,UINT2)
'LONG Data Storage Example
Sample(1,PosNegCounter,Long)
'STRING Data Storage Example
Sample(1,FirstName,String)
'BOOLEAN Data Storage Example
Sample(8,Switches(),Boolean)
'BOOL8 Data Storage Example
Sample(2,FLAGS(),Bool8)
'NSEC Data Storage Example
Sample(1,CR800Time,Nsec)
EndTable
BeginProg
'Program logic goes here
EndProg
7.6.3.3.2 Dimensioning Numeric Variables
Some applications require multi-dimension arrays. Array dimensions are
analogous to spatial dimensions (distance, area, and volume). A single-dimension
array, declared as,
Public VariableName(x)
with (x) being the index, denotes x number of variables as a series.
A two-dimensional array, declared as,
Public VariableName(x,y)
with (x,y) being the indices, denotes (x y) number of variables in a square x-by-y
matrix.
Three-dimensional arrays, declared as
Public VariableName (x,y,z)

Table of Contents

Related product manuals