beautypg.com

CTEK Automation Control Application APN007 User Manual

Page 36

background image

Application Note – Automation Control Application

APN007 25 July, 2014

31

Max – Min Units:
The value (Maximum Units - Minimum Units) becomes the next operand

(fn) Average Memory 1 and (fn) Average Memory 2
Both functions do the same thing but each can only be used by one pin so the 2 environments
allow for a total of 2 averaging inputs. These are functions are performed on the value in the X
register with the results being returned to the X register. Just like on a calculator when you have a
value on the screen and you hit a function key like square root. This means that operator field
(Ent, Sub, Add, etc.) is optional if the function is the last step in a formula. However, if it is an
intermediate step you can use an operator on the average value or push it on the stack (Ent) for
further calculations. The variable field of the formula step must contain a value between 1 and
100 indicating how many samples should be averaged. During the first N samples (1 – 100 as
defined in the formula) a value of zero will be returned. Once N samples have been processed, a
new average value, based on the last N samples will be returned with each execution of the
function.

Operators

Ent
Enter the defined operands value

Sub
Subtract

Add
Add

Mul
Multiply

Div
Divide

Xch
Exchange the current operand with the previous one

An explanation of the standard conversion formula
The standard formula is releases with the Automation Control application. In many cases it will
provide all of the input processing required. The standard conversion formula is shown below on
the edit screen. An explanation follows.