Puddle
Member
Made a rookie mistake with trusting an implicit conversion and thought I'd post it here for google results.
I've never had an implicit conversion fail before, but here because the IN1 on the calculation is a UInt data type, the whole thing has defaulted to UInt and I missed it. The other three tags are Real data type which apparently stops this from working.
Changing the data type of the block to Real solves the issue.
If somebody has an explanation as to why this happens it would be greatly appreciated.
EDIT: Also just realised I should add that I need to update the tag names. Speed is not calculated from nameplate speed (1440rpm) but from the theoretical maximum (1500rpm).
I've never had an implicit conversion fail before, but here because the IN1 on the calculation is a UInt data type, the whole thing has defaulted to UInt and I missed it. The other three tags are Real data type which apparently stops this from working.
Changing the data type of the block to Real solves the issue.
If somebody has an explanation as to why this happens it would be greatly appreciated.
EDIT: Also just realised I should add that I need to update the tag names. Speed is not calculated from nameplate speed (1440rpm) but from the theoretical maximum (1500rpm).
Last edited: