
Equations
130
2005 ACR Systems Inc.
7.8 APPENDIX A Equation Language
7.8.1 Equation Language Introduction
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
references imported, so any functionality and definitions
under these two references can be implemented. For detailed information please refer to
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:
'Calculate engineering value from [1] 8bit Logger-> [0] Any Channel-> [38] 8bit
Eqn ("CF717AC31D0B479c94AD902D349BDF20", X)
'Convert user selected subunit to default subunit
These lines denote the start and end of the equation code.
This line declares a variable X to be used in the code.
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 "
" button and select the equation from the
The result of your equation must be assigned to ANSWER0 in the line just before
Comentários a estes Manuais