Formulas

Profile™ lets you add simple formulas to fields when both reading and writing to them. eg if an RTU stores a decimal value with 2dps as an integer ie 123.45 = 12345 the value must be divided by 100 before it can be displayed.

Conversely the display format must be converted into the RTU format when writing the value back to the RTU. Using the example above; if the user writes the value 543.21 into the field it must be first converted back into an integer ie 54321 before sending it to the RTU.

To edit a formula:

  • Click the 'Edit' button next to either the read formula or write formula field.

This will display the edit formula dialogue:

Formulas

Formulas are in the format:

value := 1 + 1

Fields can also be inserted into the formula. To add a field:

  • Click the 'Add Field' button. This will allow you to select a field from the current RTU's Modbus map.

Formulas with fields are in the format:

value := field ("Gross Flowrate") - field("Net Flowrate")

Formulas must be valid before they will run.

To validate a formula:

  • Click the 'Validate Formula' button.

To save the formula:

  • Click the 'OK' button.

Note: Invalid formulas can be saved, but will not return a value.



Profile™ Configuration Manual