ACR Electronics SmartReader Plus Bedienungsanleitung Seite 141

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 198
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 140
Equations
130
2005 ACR Systems Inc.
7.8 APPENDIX A Equation Language
Equation Language
7.8.1 Equation Language Introduction
Equations in
TrendReader Standard 2
use the VB.Net language. Therefore, any code in an
equation must be compliant with the syntax of VB.Net. Although the equation script is VB.Net
compliant, you cannot use all VB.Net methods and functions because some method related
references may not be added to the equation project. Currently, all equation projects have
Microsoft.VisualBasic
and
System
references imported, so any functionality and definitions
under these two references can be implemented. For detailed information please refer to
VB.Net documentation.
An equation is a block of code, formatted in the VB.Net language, that is saved in the system
database with a unique ID. Prior to the execution of the equation, it is compiled into a dynamic
link library (dll) and instantiated as an executable object.
A standard equation looks like:
Sub
EQN101( )
'Calculate engineering value from [1] 8bit Logger-> [0] Any Channel-> [38] 8bit
Raw Value
Dim
X
As
Double
Eqn ("CF717AC31D0B479c94AD902D349BDF20", X)
ANSWER0= 2 + 2*X
'Convert user selected subunit to default subunit
ANSWER0=(ANSWER0-0)/1000
End
Sub
1.
Sub
EQN101( ) and
End
These lines denote the start and end of the equation code.
2.
Dim
X
As
Double
This line declares a variable X to be used in the code.
3.
Eqn ("CF717AC31D0B479c94AD902D349BDF20", X)
This line calculates the engineering value of the current reading from the logger using
another equation and assigns it to the variable X. The equation is identified using a
unique ID -- "CF717AC31D0B479c94AD902D349BDF20". This type of statement is used
when you need to use the engineering value for the reading in your equation. For
example, if you had a transducer that output a voltage proportional to pressure, you would
typically use the voltage channel. To calculate the pressure, you would first need to
convert the data logger reading into a voltage using such a statement. To call another
equation in your code, click the "
Insert Equation
" button and select the equation from the
pop up window.
4.
ANSWER0 = 2 + 2*X
The result of your equation must be assigned to ANSWER0 in the line just before
'== end
Seitenansicht 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 197 198

Kommentare zu diesen Handbüchern

Keine Kommentare