Function blocks

General about KNX_Read_DPT_xx

The usage of all KNX_Read_DPT_xx function blocks follows a similar pattern:

  1. Configure group address:

    • Set byAdrMainGroup (0-31)

    • Set byAdrMiddleGroup (0-7)

    • Set byAdrGroup (0-255)

  2. Select DPT format:

    • Select the desired format via eDPT_Format

  3. Configure read behavior:

    • For cyclic reading: Set tRequestTime to the desired interval

    • For event-based reading: Use xRequest or xRequestVisu if necessary

  4. Configure initialization:

    • Set eInitOption on InitOption.PollingOnStartUp or InitOption.InitValue

    • When InitOption.InitValue: Set the corresponding initial value:

      • DPT_13x: diInitValue

      • DPT_14x: rInitValue

      • DPT_19x: dtInitValue (not effective)

  5. Monitor outputs:

    • Check tNextRequest for the time of the next read operation

    • Monitor the corresponding value outputs:

      • DPT_13x: diValue, rValue

      • DPT_14x: rValue

      • DPT_19x: wYear, wMonth, wDayOfMonth, wDayOfWeek, wHourOfDay, wMinutes, wSeconds

    • For DPT_13x and DPT_14x: Note sUnit for the unit

  6. Error handling:

    • Monitor the error outputs of the parent SlaveBasic block

General about KNX_Write_DPT_xx

The usage of all KNX_Write_DPT_xx function blocks follows a similar pattern:

  1. Configure group address:

    • Set byAdrMainGroup (0-31)

    • Set byAdrMiddleGroup (0-7)

    • Set byAdrGroup (0-255)

  2. Select DPT format:

    • Select the desired format via eDPT_Format

  3. Set transmit value:

    • Set the value to send at the corresponding input:

      • DPT_1x: xValue (BOOL)

      • DPT_2x: xValue (BOOL) and xPrio (BOOL)

      • DPT_6x: iValue (INT)

      • DPT_9x: rValue (REAL)

      • DPT_13x: diValue (DINT)

      • DPT_14x: rValue (REAL)

  4. Configure send behavior:

    • For cyclic sending: Set tTimeUpdateSetp to the desired interval

    • For event-based sending: Set xUpdateSetp or xWriteVisu if necessary

    • Optional: Adjust tPauseTimeUntilNextSend to configure the send pause

  5. Monitor outputs:

    • Check tNextWrite for the time of the next send operation

    • Monitor the corresponding *LastBusValueoutput for the last received value

    • For DPT_1x: Also note Encoding for the textual representation

    • For DPT_2x: Also note xControlBit for the priority status

  6. Consider unit:

    • For DPT_6x, DPT_9x, DPT_13x, DPT_14x: Check sUnit for the current unit

  7. Error handling:

    • Monitor the error outputs of the parent SlaveBasicWr block

Last updated