Campbell-scientific CR3000 Micrologger Manuale Utente Pagina 230

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 229
Section 7. Installation
230
'Program
BeginProg
Scan(1,Sec,0,0)
TimeVar = FirstTable.TimeStamp
CallTable FirstTable
CallTable SecondTable
NextScan
EndProg
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.
Vedere la pagina 229
1 2 ... 225 226 227 228 229 230 231 232 233 234 235 ... 589 590

Commenti su questo manuale

Nessun commento