Campbell CSIOPC Specifikace Strana 218

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 322
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 217
Section 11. Programming Resource Library
11-38
BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTempC,250)
MaxVar = FirstTable.PTempC_Max
TimeOfMaxVar = FirstTable.PTempC_TMx
CallTable FirstTable
CallTable SecondTable
NextScan
EndProg
EXAMPLE 11.12-3. CRBASIC Code: Using NSEC data type with a 7 element time array.
A timestamp 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.
Public rTime(9) As Long '(or Float)
Public rTime2(7) As Long '(or Float)
Dim x
DataTable (SecondTable,True,-1)
DataInterval (0,5,Sec,10)
Sample (1,rTime,Nsec)
Sample (1,rTime2,Nsec)
EndTable
BeginProg
Scan (1,Sec,0,0)
RealTime (rTime)
For x = 1 To 7
rTime2(x) = rTime(x)
Next
CallTable SecondTable
NextScan
EndProg
Zobrazit stránku 217
1 2 ... 213 214 215 216 217 218 219 220 221 222 223 ... 321 322

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

Žádné komentáře