13.07.2015 Views

E2 User's Manual Supplement: Flexible Combiner ... - icemeister.net

E2 User's Manual Supplement: Flexible Combiner ... - icemeister.net

E2 User's Manual Supplement: Flexible Combiner ... - icemeister.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

left to right.6. All logical operators (!, NOT, &&, ||) from left toright.If you cannot arrange an equation’s operators in a waythat parses them in the order you need (or if you simplywant to remove all doubt), you may use parenthesis tospecify a different order of operator execution. Expressionsthat are in parenthesis are executed first before anyoperators outside of parenthesis are used. For example,“5+2*3” without parenthesis results in 11 because themultiplication is executed first before the addition. However,in the equation “(5+2)*3” the addition is executedfirst because it is in parenthesis, resulting in 21.Equations and operators in parenthesis can themselvescontain other operators and equations in parenthesis. Forexample “((5+2)*3)^2” executes the addition first, followedby the multiplication, and finally the exponent,resulting in 441.EXAMPLE EQUATIONS: INPUTS,CONSTANTS, AND OPERATORSEquationDescriptionAI4+60 The value of AI4 plus 60.2.4 FunctionsEquations for most applications can be built usingnothing but inputs, constants, and operators. However, insome cases it is not always practical or easy to use nothingbut these components (and in some cases, the equationyou’d have to build would exceed the 80-character limit).Furthermore, you may sometimes need equations to domore complicated things (such as converting a floatingpointnumber to an integer or converting a temperature todewpoint) that cannot be handled with operators alone.For these reasons, the <strong>Flexible</strong> <strong>Combiner</strong> offers a largenumber of functions that can be used in output equations.A function is essentially a small mathematical formula thataccepts one or more variables as inputs and returns anumeric result.In an equation, a function typically takes the form ofthe name of the function followed by a set of parenthesisthat contain the value or values the function will use asinputs. The values inside the parenthesis of a function maybe constants or inputs.Functions are always evaluated first in an equation(from left to right, unless parenthesis are used) beforeoperators are executed.!DI1=DI2(DI1&&DI2)*AI1The expression DI1=DI2returns a 1.0 when bothinputs are ON and a 0.0 ifonly one or the other is ON.The “!” at the beginning ofthis equation then inverts theresult of that expression. Thefinal result is a logical XORof DI1 and DI2. (Note: thiscan be done more elegantlywith the XOR function,which is explained later inthis section).Because DI1&&DI2 is inparenthesis, the logical ANDof DI1 and DI2 is performedfirst. The result of this ismultiplied with AI1. Thismeans the output will beequal to AI1 (1.0*AI1) whenDI1 and DI2 are both ON,and zero (0.0*AI1) when oneor both are OFF.Table 2-8 - Equation Examples: Inputs Using Constants2-6 • <strong>E2</strong> User’s <strong>Manual</strong> <strong>Supplement</strong>: <strong>Flexible</strong> <strong>Combiner</strong> 026-1620 Rev 0 09-15-05

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!