Campbell-scientific CR1000 Measurement and Control System Manuel d'utilisateur Page 224

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 588
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 223
Section 7. Installation
224
produce a time stamp that may be accessed from the program after being
written to a data table. The time of other events, such as alarms, can be stored
using the RealTime() instruction.
Accessing and storing a time stamp from another datalogger in a PakBus
network.
7.8.10.1 NSEC Options
NSEC is used in a CRBasic program one of the following three ways. In all
cases, the time variable is only sampled with a Sample() instruction, Reps = 1.
1. Time variable is declared As Long. Sample() instruction assumes the time
variable holds seconds since 1990 and microseconds into the second is 0. The
value stored in final data storage is a standard time stamp. See CRBasic
example NSEC — One Element Time Array
(p. 224).
2. Time-variable array dimensioned to (2) and As LongSample() instruction
assumes the first time variable array element holds seconds since 1990 and the
second element holds microseconds into the second. See CRBasic example
NSEC — Two Element Time Array
(p. 225).
3. Time-variable array dimensioned to (7) or (9) and As Long or As Float
Sample() instruction assumes data are stored in the variable array in the
sequence year, month, day of year, hour, minutes, seconds, and milliseconds.
See CRBasic example NSEC — Seven and Nine Element Time Arrays
(p. 225).
CRBasic example NSEC — Convert Time Stamp to Universal Time
(p. 224) shows
one of several practical uses of the NSEC data type.
CRBasicExample43. NSECOneElementTimeArray
'A time stamp is retrieved into variable TimeVar(1) as seconds since 00:00:00
'1 January 1990. Because the variable is dimensioned to 1, NSEC assumes the value =
'seconds since 00:00:00 1 January 1990.
'Declarations
Public PTemp
Public TimeVar(1) As Long
DataTable(FirstTable,True,-1)
DataInterval(0,1,Sec,10)
Sample(1,PTemp,FP2)
EndTable
DataTable(SecondTable,True,-1)
DataInterval(0,5,Sec,10)
Sample(1,TimeVar,Nsec)
EndTable
'Program
BeginProg
Scan(1,Sec,0,0)
TimeVar = FirstTable.TimeStamp
CallTable FirstTable
CallTable SecondTable
NextScan
EndProg
Vue de la page 223
1 2 ... 219 220 221 222 223 224 225 226 227 228 229 ... 587 588

Commentaires sur ces manuels

Pas de commentaire