Campbell CSIOPC Spécifications Page 113

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 322
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 112
Section 9. CR1000 Programming
9-5
EXAMPLE 9.5-1 demonstrates the proper structure of a CRBASIC program.
E
XAMPLE 9.5-1. CRBASIC Code: Proper Program Structure
‘Declarations
‘Define constants
Const RevDiff=1
Const Del=0 'default
Const Integ=250
Const Mult=1
Const Offset=0
‘Define public variables
Public RefTemp
Public TC(6)
‘Define units
Units RefTemp=degC
Units TC=DegC
‘Define data tables
DataTable (Temp,1,2000)
DataInterval (0,10,min,10)
Average (1,RefTemp,FP2,0)
Average (6,TC(),FP2,0)
EndTable
‘Begin Program
BeginProg
‘Set scan interval
Scan (1,Sec,3,0)
‘Measurements
PanelTemp (RefTemp, 250)
TCDiff (TC(),6,mV2_5C ,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset)
‘Processing (None)
‘Call data table
CallTable Temp
‘Initiate controls (None)
‘Loop to next scan
NextScan
‘End Program
End Prog
Declare constants
Declare public variables,
dimension array, and
declare units.
Define Data Table
Declarations
Call Data Table
Scan loop
Measure
Vue de la page 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 321 322

Commentaires sur ces manuels

Pas de commentaire