Campbell CS115 Manuel d'utilisateur Page 15

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 20
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 14
CS115 Barometric Pressure Sensor
11
5.1.4 Period Averaging Measurement Example for CR5000 in a Fast
Executing Program at 10Hz
EXAMPLE 4. Sample Program for CR5000
‘CR5000
'
'Sample Program to Measure CS115 Barometric Pressure Sensor
'
'
Public CS115_Freq, Pressure
Units Pressure = mb
BeginProg
Scan (100,mSec,3,0)
'Turn CS115 ON one minute before every hour
'
If (IfTime (59,60,min)) Then WriteIO (1,1)
'Period Avgeraging instruction must be executed every scan, and
'cannot be inside the "If" statement. The measured value, therefore, is
'first written into a temporary variable called "CS115_Freq".
PeriodAvg (CS115_Freq,1,mV5000,33,0,1,10,20,1.0,0)
'Once CS115 is turned on one minute before every hour, and
'the correct measurement is made, it is copied into the current variable
'called "Pressure". The sensor is, then, turned off.
'
If IfTime(0,60,min) Then
Pressure = CS115_Freq
'Turns CS115 OFF
'
WriteIO (1,0)
EndIf
NextScan
EndProg
Vue de la page 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20

Commentaires sur ces manuels

Pas de commentaire