Unexpected UDT Tag Parameter Arithmetic


Long-Time Lurker, first time Poster!


I am running into an issue with UDT–>Reference Tag–>Source Tag Path -->Parameter Math

Here is my Source Tag Path

{Gateway_Number}, {Node_Number} and {Node_Num_Again} (yes, I know: Node Num Again…) are all Integers on my UDT Parameter Types. I am receiving three, two-byte messages of Bit-Packed Data from my Device so I need an algorithm to take the Node Number (1-47) and figure out which group # it belongs to first before retrieving the value on the data array. Note: Element [0] of first group should be ignored (it’s the gateway device I am using). So I figured I’d do this:

Ex: Node 17
Parameters: Gateway_Number = 2 // Node_Number = 17 // Node_Num_Again = 17

My math: { (Node_Number / 16) + 1} → { (17 / 16) + 1} → { 1 + 1} → {2}.
Thus, I should get something like this :

What I actually get:

When I read the documentation, it says Division within UDT Parameters is allowed, and all Parameters are Integers… What gives? *Also, I have tried Parameter Formatting, e.g. { (9/16) + 1 |0} which will yield 2 instead of 1.