Specifications

Section 5. Program Declarations
5-9
'Subroutine to convert temperature in degrees C to degrees F
Sub ConvertCtoF (TmpC, TmpF)
TmpF = TmpC*1.8 +32
EndSub
BeginProg
Scan (1,Sec,3,0)
'Measure Temperatures (panel and 4 thermocouples) in deg C
PanelTemp (RefT,250)
TCDiff (TC_C(),4,mV2_5C,1,TypeT,RefT,True ,0,250,1.0,0)
'Call Output Table for C
CallTable TempsC
'Convert Temperatures to F using Subroutine:
'Subroutine call using Call statement,
'RefT is used for both source and destination.
Call ConvertCtoF(RefT, RefT)
For I = 1 to 4
'Subroutine call without Call statement:
ConvertCtoF(TC_C(I),TC_F(I))
Next I
CallTable TempsF
NextScan
EndProg
Units
Used to assign a unit name to a field associated with a variable.
Syntax
Units Variable = UnitName
Remarks
Units allows assigning a unit name to a field. The unit name appears in the
header of the output files. The unit name is a text field that allows the user to
label data. When the user modifies the units, the text entered is not checked by
the CRBasic editor or the CR3000.
Example
Dim TCTemp( 1 )
Units TCTemp( 1 ) = Deg_C