3 tips on programming – Alpha Technologies Cordex Controller Ver.3.1x User Manual
Page 101
99
0700015-J0 Rev B
Mathematical operators:
+ = Add
- = Subtract
* = Multiply
/ = Divide
7.3 Tips on Programming
Square parenthesis [ ] are reserved for CXC signal names.
Use only round parenthesis ( ) for manipulating the order of operations in an equation.
The counters will increment approximately every half-second by default. A cascading counter can be
written to create a longer time between increments.
Here is a delay counter for AC fail alarm. The “AC Fail Delay” works by counting up from 0 to 30 when
Rect. AC Mains Fail alarm is true. When Rect. AC Mains Fail is false it will count down to 0.
[AC Fail Delay] + ( ( [AC Fail Delay] < 30) * [Rect. AC Mains Fail] ) - ( ( [AC Fail Delay] > 0 ) * ![Rect. AC
Mains Fail] )
Here is a custom signal set up to filter the battery voltage. "Filtered Battery Voltage" is the custom signal
name:
( ( [Filtered Battery Voltage] * 15 ) + [Battery Voltage] ) / 16
Keypad will change
from numeric to symbol
Select Sym for mathematical and
logic operators
Select 123 to return to numeric
keypad
Figure 125 — Equation builder keypad symbol key
Select + key for ad-
dition functions
Figure 126 — Equation builder keypad function keys
Mathematical operators
+
Add
-
Subtract
*
Multiply
/
Divide
Logical operators:
&
AND
|
OR
!
NOT TRUE
=
EQUAL TO, compare for equality
<
LESS THAN
>
GREATER THAN
(
OPEN PARENTHESIS, used with a close
parenthesis to set apart arguments to a math-
ematical function
)
CLOSE PARENTHESIS, see open parenthe-
sis; used to clarify the order of operations