Campbell CR800 Especificações Página 236

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 324
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 235
Section 8. Processing and Math Instructions
Tan Function Example
The example uses Tan to calculate the tangent of an angle from a Volt(1) input.
Dim Degrees, Pi, Radians, Ans 'Declare variables.
Pi = 4 * Atn(1) 'Calculate Pi.
Degrees = Volt(1) 'Get user input.
Radians = Degrees * (Pi / 180) 'Convert to radians.
Ans = Tan(Radians) ‘The Tangent of Degrees.
TANH (Source)
The TANH function returns the hyperbolic tangent of an expression or value.
Syntax
x = TANH (Source)
Remarks
The TANH function returns the hyperbolic tangent [ tanh(x) = sinh(x)/cosh(h) ]
for the value defined in Source.
TANH Function Example
The example uses TANH to calculate the hyperbolic tangent of a voltage input.
Public Volt1, Ans 'Declare variables.
VoltDiff(Volt1,1,mV5000,1,True,100,500,1,0)
'Returns voltage on Channel(1) to Volt(1)
Ans = TANH( Volt1 ) 'The Hyperbolic Tangent of Volt1.
TimeIntoInterval (TintoInt, Interval, Units)
The TimeIntoInterval (or IfTime) instruction is used to return a logic level of
True or False based on the datalogger's real-time clock.
Syntax
Variable = TimeIntoInterval( TintoInt, Interval, Units )
or
If TimeIntoInterval ( TintoInt, Interval, Units )
Remarks
When encountered by the datalogger program, the TimeIntoInterval statement
is evaluated True (-1) or False (0) based on the datalogger's real-time clock.
Time is kept internally by the datalogger as the elapsed time since January 1,
1990, at 00:00:00 hours. When the Interval divides evenly into this elapsed
time, the TimeIntoInterval is set True. The TimeIntoInterval instruction can be
used to set the value of a variable to -1 or 0 (first syntax example), or it can be
used as an expression for a Condition (second syntax example).
8-34
Vista de página 235
1 2 ... 231 232 233 234 235 236 237 238 239 240 241 ... 323 324

Comentários a estes Manuais

Sem comentários