Campbell CR800 Especificaciones Pagina 109

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 324
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 108
Section 4. CRBasic - Native Language Programming
Public Pressure(3), Mult(3), Offset(3)
DataTable (AvgPress,1,-1)
DataInterval (0,60,Min,10)
Average (3,Pressure(),IEEE4,0)
EndTable
BeginProg
'Calibration Factors:
Mult(1)=0.123 : Offset(1)=0.23
Mult(2)=0.115 : Offset(2)=0.234
Mult(3)=0.114 : Offset(3)=0.224
Scan (1,Sec,10,0)
'VoltSe instruction using array of multipliers and offsets:
VoltSe (Pressure(),3,mV5000,1,True,0,_60Hz,Mult(),Offset())
CallTable AvgPress
NextScan
EndProg
4.9 Program Access to Data Tables
Data stored in a table can be accessed from within the program. The format
used is:
Tablename.Fieldname(fieldname index,records back)
Where Tablename is the name of the table in which the desired value is stored.
Fieldname is the name of the field in the table. The fieldname is always an
array even if it consists of only one variable; the fieldname index must always
be specified. Records back is the number of records back in the data table
from the current time (1 is the most recent record stored, 2 is the record stored
prior to the most recent). For example, the expression:
Tdiff=Temp.TC_Avg(1,1)–Temp.TC_Avg(1,101)
could be used in the example program (Section 4.3) to calculate the change in
the 10 ms average temperature of the first thermocouple between the most
recent average and the one that occurred a second (100 x 10 ms) earlier.
In addition to accessing the data actually output in a table, there is additional
information about the data table that can be retrieved using the same
Tablename.fieldname syntax.
Tablename.record(1,n) = the record number of the record output n records ago.
Tablename.output(1,1) = -1 if data were output to the table the last time the
table was called, = 0 if data were not output.
4-13
Vista de pagina 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 323 324

Comentarios a estos manuales

Sin comentarios