Campbell-scientific CR9000X Measurement and Control System Manual de usuario Pagina 262

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 442
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 261
Section 7. Measurement Instructions
7-38
See Section 3.4 Pulse Count Measurements for more info on PulseCount.
If the running averaging is in use, the over-range or erroneous high pulse count
value will be included in the average for the duration of the averaging period
(e.g., with a 1000 millisecond running average, the over-range will be the
value from the PulseCount(...) instruction until 1 second has passed).
When using multiple scans within the main program area, resetting the
counters and averages with the PulseCountReset instruction prior to restarting
the Scan avoids this (see PulseCountReset Example 1 below).
For cases involving Scans that have calls to subroutines, the
PulseCountReset should be placed in a conditional prior to the PulseCount
instruction, and the Subroutine call should be placed after the PulseCount
instruction. If possible, calls to DataTables that store the results from the
PulseCount instruction should be placed prior to the Subroutine call (see
PulseCountReset Example 2 below).
The first Scan after the PulseCountReset instruction is
encountered, the PulseCount destination variable’s value remains
unchanged from its previous value. If this variable’s value is
used for logic control, it may need to be changed through
program control to 0 or NAN (example programs set it to 0.
This instruction cannot be used in a SubScan or Slow Sequence
Scan.
PulseCountReset Example 1
Public PulseHz, Flag(8) 'Declare Public Variables
DataTable (Table1,Flag(3) = False,-1) 'Define Data Tables
DataInterval (0,0,0,10)
Sample (1,PulseHz,IEEE4)
EndTable
'Main Program
BeginProg
Do
Scan(1,Sec,0,0)
‘Insert Measurement Instructions Here
If NOT Flag(1) Then
ExitScan
EndIf
Flag(3) = True Disable output with first scan
NextScan
PulseHz = 0 Set PulseCount variable value to 0
PULSECOUNTRESET ‘Reset Pulse Counters prior to entering scan
Scan (1,Sec,100,0)
PulseCount (PulseHz,1,6,1,0,2000,1,0)
CallTable Table1
If Flag(1) Then ExitScan
Flag(3) = False
NextScan
Loop
EndProg
NOTE
Vista de pagina 261
1 2 ... 257 258 259 260 261 262 263 264 265 266 267 ... 441 442

Comentarios a estos manuales

Sin comentarios