Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Point conversions are used to convert between the representations of external systems (the different Connectors List) and the normalized representation. 

...

The point conversion is used by the connector framework with the curConvert, writeConvert, and hisConvert tags. Use cases include:

  • mathematical conversions of raw modbus registers

  • sensor voltage resets

  • sensor thermistor tables

  • unit conversion from fieldbus devices

So depending on the level where the user wants to make the conversion, meaning: the current value,write value or the history value, he will just add a string property tag for that point.

Example

If the user wants to convert the current value, for the numeric point in our screenshot, he will just add a curConvert string with the desired converted value ( let's say we want the value multiplied by 100)Image Removed

...

Other examples of possible conversions:

  • multiply raw value by 100 and add 75: * 100 + 75

  • convert °C to °F:

     °C

     °C => °F

  • reset 5-10 to 0-100:

     reset

     reset(5, 10, 0, 100)

  • thermistor table; run pointThermistorTables() for full list:

     thermistor

     thermistor(10k-2)

  • invert bool true -> false, vise versa:

     invert

     invert()

  • swap endianness of unsigned two byte integer:

     u2SwapEndian

     u2SwapEndian()

  • swap endianness of unsigned four byte integer:

     u4SwapEndian

     u4SwapEndian()

...

All available functions are:

Info
  1. invert()

  2. reset(inLo, inHi, outLo, outHi)

  3. thermistor(table-name)

  4. u2SwapEndian()

  5. u4SwapEndian()