Section 7. Installation
Scan
(1,Sec,1,0)
'Measurements
'Battery Voltage
Battery
(Batt_Volt)
'Wiring Panel Temperature
PanelTemp
(PTemp_C,_60Hz)
'Type T Thermocouple measurements:
TCDiff
(AirTemp_C,1,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1,0)
TCDiff
(AirTemp_F,1,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1.8,32)
'Convert from degree C to degree F
AirTemp2_F = AirTemp_C * 1.8 + 32
'Count the number of times through the program. This demonstrates the use of a
'Long integer variable in counters.
Counter = C 1
'Calculate the difference between air and panel temps
DeltaT_C = AirTemp_C - PTemp_C
'Control the flag based on the difference in temperature. If DeltaT >= 3 then
'set Flag 1 high, otherwise set it low
If
DeltaT_C >= 3
Then
Flag(1) = high
Else
Flag(1) = low
EndIf
'Turn LED connected to Port 1 on when Flag 1 is high
If
Flag(1) = high
Then
PortSet
(1,1)
'alternate syntax: PortSet(1,high)
Else
PortSet
(1,0)
'alternate syntax: PortSet(1,low)
EndIf
'Count how many times the DataEvent “DeltaT_C>=3” has occurred. The
'TableName.EventCount syntax is used to return the number of data storage events
'that have occurred for an event driven table. This example looks in the data
'table “Event”, which is declared above, and reports the event count. The (1,1)
'after EventCount just needs to be included.
HowMany = Event.EventCount(1,1)
'Call Data Tables
CallTable
(OneMin)
CallTable
(Event)
NextScan
EndProg
176
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......