I've gone through the Graphical Blocks as they currently exist for Beta Version #4 (Build 23)
COMMON ISSUES FOR ALL BLOCKS:
1) Some input type choices may not apply to the block type
2) Input and Output names (in/out) can be changed, but the settings value reverts back
to (in/out), while the block slot name will maintain the change.
3) Inputs and outputs start with an index of 00. Would prefer that it starts with 01.
4) The amount of block outputs can become greater than 1 if you change the input type so
that the "save" button lights up and then you change the number of outputs followed by
a save. The quantity of public numerics created will equal the number of outputs. Internally,
all outputs of the block will be pointing to the first public numeric created.
***************************************************************
LOGIC BLOCKS:
Scripting Syntax:
AND: Utility1_out00 = BinaryInput1 And BinaryInput2
OR: Utility1_out00 = BinaryInput1 or BinaryInput2
XOR: Utility1_out00 = BinaryInput1 bitxor BinaryInput2
NOT: Utility1_out00 = BinaryInput1
Greater Than: Utility1_out00 = FloatInput1 > FloatInput2
Greater Than/Equal: Utility1_out00 = FloatInput1 >= FloatInput2
Equals: Utility1_out00 = FloatInput1 equals FloatInput2
Less Than/Equal: Utility1_out00 = FloatInput1 <= FloatInput2
Less Than: Utility1_out00 = FloatInput1 < FloatInput2
Not Equal: Utility1_out00 = FloatInput1 <> FloatInput2
Specific Block Issues:
1) NOT block: Value in equals the value out. Output is set as an
Integer and isn't changeable. Problem can be seen in above script.
2) Output is set as an Integer and not changeable for
GreaterThan
GreaterThan/Equal
LessThan
LessThan/Equal
Not Equal
***************************************************************
MATH BLOCKS:
Scripting Syntax:
Addition: Utility1_out00 = FloatInput1 + FloatInput2
Subtraction: Utility1_out00 = FloatInput1 - FloatInput2
Multiplication: Utility1_out00 = FloatInput1 * FloatInput2
Division: Utility1_out00 = FloatInput1 / FloatInput2
Average: Utility1_out00 = AVERAGE(FloatInput1 , FloatInput2
Maximum: Utility1_out00 = MAXIMUM(FloatInput1 , FloatInput2)
Minimum: Utility1_out00 = MINIMUM(FloatInput1 , FloatInput2)
Absolute: Utility1_out00 = ABS(FloatInput1)
Negative: Utility1_out00 = -FloatInput1
Power: Utility1_out00 = FloatInput1 ^ FloatInput2
Square Root: Utility1_out00 = SQRT(FloatInput1)
Modulus: Utility1_out00 = FloatInput1 MOD FloatInput2
Sine: Utility1_out00 = SIN(FloatInput1)
Cosine: Utility1_out00 = COS(FloatInput1)
Tangent: Utility1_out00 = TAN(FloatInput1)
Arc Cosine: Utility1_out00 = ACOS(FloatInput1)
Arc Sine: Utility1_out00 = ASIN(FloatInput1)
Arc Tangent: Utility1_out00 = ATAN(FloatInput1)
Exponential: Utility1_out00 = EXPONENTIAL(FloatInput1)
Factoral: Utility1_out00 = FACTORIAL(FloatInput1)
LogBase10: Utility1_out00 = LOG(FloatInput1)
LogNatural: Utility1_out00 = LN(FloatInput1)
Specific Block Issues:
1) Average: Max number of inputs is 15 due to function limit
2) Maximum: Max number of inputs is 15 due to function limit
3) Minimum: Max number of inputs is 15 due to function limit
4) Sine/Cosine/Tangent/ArcSin/ArcCos/ArcTan: Need a conversion factor when considering
a typical user, since the most common method is to use degrees. The script function by
default uses radians instead of degrees. There should be a conversion formula applied
ahead of time.
Radians = Deg * (3.1415/180)
Degrees = Rad * (180/3.14159)
Example:
Typical Calculation: Sin(90deg) = 1
Script Calculation: Sin((90deg) * (3.14159 / 180)) = 1
***************************************************************
PROCESS CONTROL BLOCKS (SELECT BLOCK):
Scripting Syntax:
1) Normal Link:
If BinaryInput1 Then Utility1_out00 = FloatInput1 Else Utility1_out00 = FloatInput2
2) False setting,no link:
If false Then Utility1_out00 = FloatInput1 Else Utility1_out00 = FloatInput2
3) True setting,no link:
If true Then Utility1_out00 = FloatInput1 Else Utility1_out00 = FloatInput2
Specific Block Issues:
1) Inputs and outputs remain analog no matter what the input/output settings are changed to.
2) If switch slot is linked to an object, then an OFF value will send Input2 and ON Value will
send Input1 (see above)
3) If switch slot is not linked and set for FALSE or set for TRUE, then Input1 will be passed no
matter what. (see above)
4) If/Then/Else argument may need to focus on the value instead of the link name being injected
into the syntax since that changes the overall meaning of the line. (see above)
***************************************************************
STRING BLOCKS:
Scripting Syntax:
Concatenate (Wrong): Utility1_out00 = ;(StringInput1 , StringInput2)
Concatenate (Right): Utility1_out00 = (StringInput1 ; StringInput2)
IndexOf: Utility1_out00 = FIND(StringInput1 , StringInput2)
Length: Utility1_out00 = LENGTH(StringInput1)
Numeric to String: Utility1_out00 = NUMTOSTR(FloatInput1)
String Select: If BinaryInput1 Then Utility1_out00 = StringInput1 Else Utility1_out00 = StringInput2
String to Numeric: Utility1_out00 = STRTONUM(StringInput1)
Sub String: Utility1_out00 = MID(StringInput1 , FloatInput1 , FloatInput2)
Specific Block Issues:
1) Concatenate: Block won't compile due to the ";" being in the wrong spot in the script. Proper
syntax is shown below the incorrect one. Once changed, the block works.
2) IndexOf: Output needs to be numeric instead of string
Example usage: Find(abcde,bc)
Result: 2
3) IndexOf: "Find" syntax will find case insensitive items while "Search syntax will find case sensitive
items. May need an more options to handle both scenarios.
4) String Select: Has same issues as Process Control Select Block
5) Sub String: Output needs to be string instead of numeric.
Example usage: Mid(abcde,2,3)
Result: bcd
***************************************************************
TIMER BLOCKS:
Scripting Syntax:
Current Time: Utility1_out00 = DATE
DateTime Select: If BinaryInput1 Then Utility1_out00 = DateTimeInput1 Else Utility1_out00 = DateTimeInput2
DifTime: (Wrong): Utility1_out00 = DIFTIME(DateTimeInput1 , DateTimeInput2 , MINUTE)
DiffTime (Right): Utility1_out00 = DIFFTIME(MINUTE,DateTimeInput1,DateTimeInput2)
Specific Block Issues:
1) Datetime Select: Has same issues as Process Control Select Block
2) DifTime: Function is misspelled and syntax is incorrect (see above)
***************************************************************
Solved! Go to Solution.
Thank you for sharing the results of your testing. Most of the issues that you have found have already been reported to Tridium and should be fixed in future build 24.
The one issue that had not been reported before was with Concatenate. I will added that one to the tracker list.
The feedback on Radians vs Degrees is good. I will submit to Tridium for it to default to Degrees.
Thank you for sharing the results of your testing. Most of the issues that you have found have already been reported to Tridium and should be fixed in future build 24.
The one issue that had not been reported before was with Concatenate. I will added that one to the tracker list.
The feedback on Radians vs Degrees is good. I will submit to Tridium for it to default to Degrees.
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!