Campbell CR800 Especificaciones Pagina 125

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 324
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 124
Section 6. Data Table Declarations and Output Processing Instructions
6-7
WorstCase Example
This program demonstrates the Worst Case Instruction. Five type T
thermocouples are measured. The event is similar to that in the example for
the DataEvent instruction; the trigger for the start of a data event is when
TC(1) exceeds 30 degrees C. However in this example, the stop trigger is set
immediately true. This is done to set a fixed size for the event which can be
duplicated in the worst case tables. To use the worst case instruction with
events of varying duration, the event table size must be selected to
accommodate the maximum duration expected (or needed). The event consists
of 20 records prior to the start trigger and continues until 100 records
following the start trigger.
The ranking criteria is the number of readings following the trigger that TC(1)
stays above 30 degrees C. The greater the number the “worse” the event.
'CR800 Series Datalogger
Const NumCases = 5 'Number of Worst Cases to save
Const Max = 1 'A constant to indicate ranking maximum values in worst case
Public RefTemp 'Declare the variable used for reference temperature
Public TC(5) 'Declare the variable used for thermocouple measurements
Public I, NumAbove30 'Declare index and the ranking variable
Units RefTemp = degC
Units TC = degC
DataTable (Evnt,1,125)
DataInterval(0,00,msec,10) 'Set the sample interval equal to the scan
DataEvent(20,TC(1)>30,-1,100) '20 records before TC(1)>30,
'100 records after TC(1)>30
Sample(1,RefTemp,IEEE4) 'Sample the reference temperature
Sample(5,TC,IEEE4) 'Sample the 5 thermocouple temperatures
EndTable
BeginProg
Scan(500,mSec,10,0)
PanelTemp (RefTemp,250)
TCDiff(TC(),5,mV2_5C,1,TypeT,RefTemp,True,0,250,1,0)
CallTable Evnt
IF Evnt.EventEnd(1,1) then 'Check if an Event just Ended
I=100 'Initialize Index
NumAbove30=0 'Zero Ranking Variable
Do 'Loop through the Event table
NumAbove30=NumAbove30+1 'Counting the # of times TC(1)>30
I=I-1
Loop While I>0 and Evnt.TC(1,I)>=30 'Quit looping when at end or TC(1)<30
WorstCase(Evnt,NumCases,Max,0,NumAbove30) 'Check for worst case
EndIf
NextScan
EndProg
Vista de pagina 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 323 324

Comentarios a estos manuales

Sin comentarios