Campbell-scientific CR1000 Measurement and Control System Manual de usuario Pagina 225

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 588
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 224
Section 7. Installation
225
CRBasicExample44. NSECTwoElementTimeArray
'TimeStamp is retrieved into variables TimeOfMaxVar(1) and TimeOfMaxVar(2). Because
'the variable is dimensioned to 2, NSEC assumes,
'1) TimeOfMaxVar(1) = seconds since 00:00:00 1 January 1990, and
'2) TimeOfMaxVar(2) = μsec into a second.
'Declarations
Public PTempC
Public MaxVar
Public TimeOfMaxVar(2) As Long
DataTable(FirstTable,True,-1)
DataInterval(0,1,Min,10)
Maximum(1,PTempC,FP2,False,True)
EndTable
DataTable(SecondTable,True,-1)
DataInterval(0,5,Min,10)
Sample(1,MaxVar,FP2)
Sample(1,TimeOfMaxVar,Nsec)
EndTable
'Program
BeginProg
Scan(1,Sec,0,0)
PanelTemp(PTempC,250)
MaxVar = FirstTable.PTempC_Max
TimeOfMaxVar = FirstTable.PTempC_TMx
CallTable FirstTable
CallTable SecondTable
NextScan
EndProg
CRBasicExample45. NSECSevenandNineElementTimeArrays
'Application: Demonstrate how to sample a time stamp into Final Data Storage using
'an array dimensioned 7 or 9.
'Solution:
'A time stamp is retrieved into variable rTime(1) through rTime(9) as year, month, day,
'hour, minutes, seconds, and microseconds using the RealTime() instruction. The first
'seven time values are copied to variable rTime2(1) through rTime2(7). Because the
'variables are dimensioned to 7 or greater, NSEC assumes the first seven time factors
'in the arrays are year, month, day, hour, minutes, seconds, and microseconds.
Vista de pagina 224
1 2 ... 220 221 222 223 224 225 226 227 228 229 230 ... 587 588

Comentarios a estos manuales

Sin comentarios