(wip)
Table of Contents |
---|
The blocks are elements used in Logic Builder that, interconnected, build routines and programs.
...
If the routine is set to run On Event, the block will also include a Condition port. This is useful when the routine needs to run if some conditions are met. The condition can be a Get block, a macro or an operator block
...
Program Variable Blocks
...
The Get block can be used as a condition on a runtime. An example is this Alarm Routine where roomTemp get is used as a trigger for the alarm.
...
String - Gold
Time/Date -Teal
...
Number Blocks
These blocks are representations of number type variables. The Set Block can be completed with a numerical value, either manually or via a routine.
...
Boolean Blocks
These blocks are representations of boolean type variables. The Set Block can be completed with a true
or false
value, either manually or via a routine.
...
String Blocks
These blocks are representations of string or enum type variables. The Set Block can be completed with string values, either manually or via a routine.
...
Time/Date Blocks
These blocks are representations of date or time type variables. The Set Block can be set to a point in time or on a calendar date.
...
Macro Blocks
These are special blocks that can contain entire routines or expressions (double-clicking on a macro in the Variable/Routines will open a new workspace). These blocks are coloured dark blue
...
Built in blocks
These are presented in the Block Library. These are used to channel conditions and commands between other types of blocks. These are coloured grey.
To lookup a block in the library, users can either look them up using the search bar or can
...
The complete list of built-in blocks is presented below.
...
condDelay- Add delay to condition after a transition from false to true before evaluating to true. Units Units to use are: sec, min, hr
email - Send an email using the configured SMTP connector. More details about this block here.
setDelay - Variable set with a delay. It only delays if there is a change of value on the set block. Setting same value will not make it delay. Recommend to use wait block instead for static set value.
setExternal - Variable set from an external program
wait - Pause the routine for a specific amount of time. Units to use are: sec, min, hr, and day?
...
if - If block performs boolean condition flow control between then and else. If Block example.
return - Return exits the routine and returns given expression value
...
gridSelectCol - Selects the column of a grid
gridSize - Number of rows in a grid.
leadLag - LeadLag is used to schedule a number of units on/off. The 'units' property should be set to a bundle variable that imports the list units the command from the *unit program*. The unit program must have three variables for each unit:-
unit stage number used to determine start order
...
unit alarm status as true/false (anything not true is considered false)
...
variable used to command the unit; this variable must be set via 'setExternal' block in the unit program
This block's 'numOn' property is used to command all the units on or off.
...
alarmBlock - Generate an alarm based on a boolean variable. More details about this block here. Further info about alarms can be found here. Alarm program example.
boolLatch - Latch a boolean input when it transitions to true after a configurable delay period. Once latched the output remains true until the reset is triggered to true.
...
all - returns if all items in a collection matches a condition
and - Logical-and of boolean values
any - Returns if any item in a collection matches a condition
cmpEq - Equality comparison
cmpGt -Greater than comparison
cmpGtEq - Greater than or equal comparison
cmpLt - Less than comparison
cmpLtEq - Less than or equal comparison
cmpNotEq - Not equal comparison
More details about the comparison blocks here.
inRange - Return if val is between an inclusive min and max
not - Logical not of boolean value
or - Logical-or of boolean values
xor - Logical exclusive-or of two boolean values
isType - Checks if a value is an instance of a given type
Math
add - Addition: '∑ vals'. Any val which doesn't evaluate to a number is ignored. If no vals evaluate to a number then return null.
...
neg - Negate: '-val'. Return null if val doesn't evaluate to number.
sineWave - Generate a sine wave
sub - Subtract: 'a - b'. Return null if a or b doesn't evaluate to number.
threshold - Threshold returns true when input is above or below a setpoint with configurable deadband.
aboveBy - Check Check if the base number is above the input number by a threshold
abs - Return the absolute value of the number
belowBy - Check Check if the base number is below the input number by a threshold
limit - Limit val between an inclusive min and max
...
invoke - Invokes an arbitrary Fantom or Axon function.The invoke block will apply certain execution time restrictions on the function invoked.
ternary - Check if condition is true and evaluates the true block, otherwise evaluates the false block
analogToDigital - Converts an Analog value (number) to a Digital value (boolean). Output FALSE only if output is 0, otherwise the output will be 1.
digitalToAnalog - Converts a Digital value (boolean) to an Analog value (number). A value of TRUE returns 1 and a value of FALSE returns 0.
dewPoint - Receives in input a dry bulb temperature value (°C) and a relative humidity value (%) and it calculates the Dew Point (°C).
onHolder - If input is TRUE, holds the TRUE output for a defined amount of time. If both durations are set, onDuration (seconds) wins over onStatusDuration.
recordMaxValue - Holds the max value received in input.
recordMinValue - Holds the min value received in input.
amountOfHeat - Start from pulse input and defined both scaling and scalingMultiplier, the pulse input is used to define a pulsesPerMinute variable. Output value is calculated and updated every minute. If the reset input is set to TRUE, the output value goes back to 0.
deltaAmountOfHeat - Starting from pulse input and defined both scaling and scalingMultiplier, the pulse input is used to define a pulsesPerMinute variable. Output value is added to the previous value and it's updated every minute. If the reset input is set to TRUE, the output value goes back to 0.
thermalOutput - Starting from pulse input and defined both scaling and scalingMultiplier, the pulse input is used to define a pulsesPerInterval variable. Output value (kWh) is updated every thermalOutputCalculationInterval.
historyValue - Calculates operations on History Values (Max, Min, Average). This block concats the hisRead function with the hisRollUp function and then applies Max, Min, or Avg.
upAndDownCounter - The output is a numeric value that increases or deceases based on rising edge of the given inputs. The output won't go below zero.
runtimeCounter - If input is TRUE, the output turns to TRUE only when time expires.
enthalpy - Calculates the Enthalpy when given in input a temperature (°C) and a humidity (%). Output will be in kJ/kg measure.
Strings
strCapitalize - Changes first letter of a string to upper case character.
strConcat - String concatenation
strContains - Compares if a val string contains substring
strDecapitalize - Changes first letter of a string to lower case character.
strEndsWith - Compares if a val string ends with substring
strFormat - String format - see `format()`
strLower - Changes all ASCII letters to lower case
strMacro - Str macro pattern which uses the same syntax as `disMacro` and `haystack::Etc.macro`. The macro variables are resolves against the task's variables.
strReplace - String replace
strSize - Number of characters in a string
strStartsWith - Compares if a val string starts with substring
strUpper - Changes all ASCI letters to upper case
Time
date - Get the Date part of a DateTime
dateTimeAdd - Add a duration from a DateTime. If no units are supplied, then minutes will be assumed.
...