Campbell-scientific CR1000 Measurement and Control System Uživatelský manuál Strana 225

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 588
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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.
Zobrazit stránku 224
1 2 ... 220 221 222 223 224 225 226 227 228 229 230 ... 587 588

Komentáře k této Příručce

Žádné komentáře