Section 7. Installation
247
BeginProg
Scan
(1,Sec,0,0)
For
i = 1 To 2
'For each column of the source array A(), copy the column into a row of the
'destination array At()
At(i,-1)() = A(-1,i)()
Next
i
NextScan
EndProg
Array Assigned Expression: Comparison / Boolean Evaluation
'Example: Comparison / Boolean Evaluation
'Element-wise comparisons is performed through scalar expansion or by comparing each
'element in one array to a similarly located element in another array to generate a
'resultant boolean array to be used for decision making and control, such as
'an array input to a SDM-CD16AC.
Public
TempC(3) = {15.1234,20.5678,25.9876}
Public
TempC_Rounded(3)
Public
TempDiff(3)
Public
TempC_Alarm(3) As Boolean
Public
TempF_Thresh(3) = {55,60,80}
Public
TempF_Alarm(3) As Boolean
BeginProg
Scan
(1,Sec,0,0)
'element-wise comparison of each temperature in the array to a scalar value
'set corresponding alarm boolean value true if temperature exceeds 20 degC
TempC_Alarm() = TempC() > 20
'some, not all or most, instructions will accept this array notation to auto-index
'through the array
'round each temperature to the nearest tenth of a degree
TempC_Rounded() = Round(TempC(),1)
'element-wise subtraction
'each element in TempC_Rounded is subtracted from the similarly located element inTempC
'calculate the difference between each TempC value and the rounded counterpart
TempDiff() = TempC() - TempC_Rounded()
'element-wise operations can be mixed with scalar expansion operations
'set corresponding alarm boolean value true if temperature, after being
'converted to degF, exceeds it's corresponding alarm threshold value in degF
TempF_Alarm() = (TempC() * 1.8 + 32) > TempF_Thresh()
NextScan
EndProg
Summary of Contents for CR6 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 76: ...Section 5 Overview 76 FIGURE 20 Half Bridge Wiring Example Wind Vane Potentiometer ...
Page 80: ...Section 5 Overview 80 FIGURE 23 Pulse Input Wiring Example Anemometer ...
Page 136: ......
Page 454: ...Section 8 Operation 454 FIGURE 104 Narrow Sweep High Noise ...
Page 459: ...Section 8 Operation 459 FIGURE 106 Vibrating Wire Sensor Calibration Report ...
Page 535: ...Section 8 Operation 535 8 11 2 Data Display FIGURE 121 CR1000KD Displaying Data ...
Page 537: ...Section 8 Operation 537 FIGURE 123 CR1000KD Real Time Custom ...
Page 538: ...Section 8 Operation 538 8 11 2 3 Final Storage Data FIGURE 124 CR1000KD Final Storage Data ...
Page 539: ...Section 8 Operation 539 8 11 3 Run Stop Program FIGURE 125 CR1000KD Run Stop Program ...
Page 541: ...Section 8 Operation 541 FIGURE 127 CR1000KD File Edit ...
Page 546: ......
Page 552: ......
Page 610: ...Section 11 Glossary 610 FIGURE 137 Relationships of Accuracy Precision and Resolution ...
Page 612: ......
Page 648: ......
Page 650: ......
Page 688: ......
Page 689: ......