SFC Transition execution timing and expression type casting

I have been developing a project in v7.8.1 with extensive use of SFC’s. I have encountered a couple of behaviors that I would like to identify as either expected or anomalies.

  1. Transition execution timing - my understanding is that an SFC has a top down, left right bias for execution. So if two transitions are side by side in the same row, the one on the left is processed first. I am trying to use this as a flowchart yes/no decision block, where the first transition processes a condition, and if true continues down that chain, but if false continues down the second chain. The technique I am using is putting the test expression in the first transition, and simply placing a ‘true’ in the second transition. What I am finding is that upon first execution the first transition expression always evaluates to false (even though it should be true) and the path continues down the second transition (which is true). If the flow loops back around then the first transition properly evaluates to true and flow continues correctly.

The transition logic is evaluating tag values, for example:

tag({chart.looptag} + "SP") >= tag({chart.pathsp} + "looptag_SP1") ||
tag({chart.looptag} + "SP") - tag({chart.looptag} + "PV") > tag({chart.pathsp} + "looptag_ERR")

I have many logical expressions and do not want to replicate the expression code with a not (!) version in the second transition. However if I do use this method the flow executes properly. Attached is a screen shot of a sample SFC. Perhaps there is a better method of performing the decision block?

  1. Occasionally the transitions do not process correctly unless I explicitly cast the tags to the correct type. In this case the above expression would need to be written as follows to process correctly:
toFloat(tag({chart.looptag} + "SP")) >= toFloat(tag({chart.pathsp} + "looptag_SP1")) ||
(toFloat(tag({chart.looptag} + "SP")) - toFloat(tag({chart.looptag} + "PV"))) > toFloat(tag({chart.pathsp} + "looptag_ERR"))

This does not happen very often, but when it does it is always consistent for a specific expression. Is tag type casting always good practice? It makes the code much more verbose and less easily read.

Any suggestions would be appreciated.