More information on custom equations
Custom Equations:
Source0 channel data
Source1 time between successive readings, in seconds
Source2 low calibration byte
Source3 mid calibration byte
Source4 high calibration byte
Source5 span calibration byte
Source6 temperature compensation byte
Source7 OWL range byte
Source8 OWL gain byte
Source9 time between successive readings, in minutes
Compound Equations:
Source0 to Source9 identify data channels
Both Custom and Compound Equations:
Answer0 is the final answer that gets plotted on a graph
Answer1 to Answer9 are temporary variables that store intermediate values. Since these do not get erased between datapoints, they may be used to pass information from one datapoint to the next.
Arithmetic (+,-,*,/) as well as trignometric (SIN, COS, TAN) operators are supported, as are logic (AND, OR, NOT) and control structures (GOTO, IF THEN ELSE). User variables are supported as are labels and comments.
A function, EQN, is supported which returns the results of another equation using the current source byte and calibration bytes. This allows the TrendReader built in equations to be used to convert the data byte to engineering units which can then be converted to user units in the custom equation. In its simplest form, you can call EQN as follows:
Answer0 = EQN(45)
This would return the temperature (in Celcius) as calculated by equation 45. If the logger is a SmartReader Plus, you must add three hundred (300) to the equation number. Thus you would use
Answer0 = EQN(345)
The value returned by EQN is always in standard units. The standard unit is the unit which is first in the list for a particular catagory. For instance, PSI is the standard unit for pressure while °C is the standard unit for Temperature.
A typical use for this function is to convert 4-20 mA signals into user units. For instance, a SmartReader Plus 7 logger normally uses equation 6 to return readings for its 0-25mA channel. If we connect a flowmeter to this logger which outputs 4mA at 0 flow and 20mA at full (1000gpm) flow, we can write the equation as follows.
Answer0 = (EQN(306)-4)/20 *1000
This outputs the flow in gpm. Note that the equation number is 306 instead of 6 since this is for a SmartReader Plus. Another example is a SmartReader 3 which is measuring AC current through a clamp-on ammeter set to read 100A at full scale (equation 65). This ammeter is reading current which is reduced by passing it through a 50:1 transformer. In other words, the true current is actually 50 times larger than what the ammeter reports. We can take this into account by writing a custom equation as follows:
Answer0=EQN(65)*50
Note: SmartReader and OWL loggers are 8-bit loggers so they record values between 0 and 255 inclusive. SmartReader Plus loggers are 12-bit loggers so they record values between 0 and 4095 inclusive. However, to allow the SmartReader Plus to use the same equations as the other loggers, these values are normalized to values between 0.0 and 255.0.


