DOCA0275EN-00

Function Blocks

Overview

The FBD editor uses various functions blocks accessible through the Function bar in the Toolbox:

Block

Description

Counter

Counter NV

Volatile Latch

Non Volatile Latch

Multiplexer

TimerSeconds

TimerTenthSeconds

NOTE: Placing cursor over the icon will reveal a tool tip defining the icon. This will help you distinguish which type of block is represented by that icon.

Counter Block

The function performs a comparative count, saving both the counter current and counter preset values to temporary registers.

FBD symbol

Arguments

Description

Properties

K: Counter preset value (UINT 0 to 65,535).

Inputs

  • Inc: Increments the counter current value on a rising edge. Counter current value shall roll over from 0 to 65,535.

  • Dec: Decrements the counter current value on a falling edge. Counter current value shall roll over from 65,535 to 0.

  • Set: Sets the current counter value to the preset value on a rising edge.

Outputs

  • Count: Counter current value (UINT 0 to 65,535). Count is initialized to zero on power-up.

  • <K: The counter current value is lower than the preset value K.

  • =K: The counter current value is equal to the preset value K.

  • >K: The counter current value is greater than the preset value K.

NOTE: The Counter preset value range is from 0 to 65,535. Cascading counters and compare functions can be used if you need larger values or multiple preset values.

Counter NV Block

The function performs a comparative count, saving both the counter current and counter preset values to non-volatile registers.

FBD symbol

Arguments

Description

Properties

K: Counter preset value (UINT 0 to 65,535).

Inputs

  • Inc: Increments the counter current value on a rising edge. Counter current value shall roll over from 0 to 65,535.

  • Dec: Decrements the counter current value on a falling edge. Counter current value shall roll over from 65,535 to 0.

  • Set: Sets the current counter value to the preset value on a rising edge.

Outputs

  • Count: Counter current value (UINT 0 to 65,535). This value is saved in non-volatile memory and initialized to the previous value on power-up.

  • <K: The counter current value is lower than the preset value K.

  • =K: The counter current value is equal to the preset value K.

  • >K: The counter current value is greater than the preset value K.

NOTE: The Counter preset value range is from 0 to 65,535. Cascading counters and compare functions can be used if you need larger values or multiple preset values

Volatile Latch Block

The function records and retains signal history in a temporary register.

FBD symbol

Arguments

Description

Inputs

  • Set: ON/OFF input value. The latch value is set ON when this input transitions from OFF to ON.

  • Clear: ON/OFF input value. The latch value is set OFF when this input transitions from OFF to ON.

Outputs

  • Q: ON or OFF latch value which represents the state of this latch. This value remains ON/OFF until the next rising edge of Set or Clear. This value is initialized to OFF.

Non Volatile Latch Block

The function records and retains signal history in a non-volatile register.

FBD symbol

Arguments

Description

Inputs

  • Set: ON/OFF input value. The latch value is set ON when this input transitions from OFF to ON.

  • Clear: ON/OFF input value. The latch value is set OFF when this input transitions from OFF to ON.

Outputs

  • Q: ON or OFF non-volatile register bit value that represents the state of this latch. This value remains ON/OFF until the next rising edge of Set or Clear. This value is saved in non-volatile memory and initialized to previous state on power-up.

Multiplexer Block

The function enables you to choose between two 16-bit unsigned values.

FBD symbol

Arguments

Description

Inputs

  • A: 16-bit unsigned value (0 to 65,535).

  • B: 16-bit unsigned value (0 to 65,535).

  • A/B: ON/OFF input value that selects value A or B.

Outputs

  • Out: Selected 16-bit value:

    • If A/B is ON then Out = A.

    • If A/B is OFF then Out = B.

Timer Seconds Block

The function measures time in intervals of seconds.

FBD symbol

Timing diagram

Arguments

Description

Inputs

  • Time: 16-bit unsigned value (0 to 65,535) that specifies time period in seconds.

  • Enable: ON/OFF input value. The time period is loaded on the rising edge of the Enable input. Time measuring continues while Enable is ON. Timing stops and outputs are OFF when Enable is OFF.

Outputs

  • Timed - ON/OFF value which turns ON after time period expires. It is OFF while enable is OFF
  • Timing - ON/OFF value that is ON while ,Enable is ON & while measuring time. It is OFF after measuring time expires.
NOTE: Both outputs can never be simultaneously ON.

Timer Tenths Seconds Block

The function measures time in intervals of tenths of seconds.

NOTE: The multiplication factor for the TIMER_TENTHS command is 10. For example, if the required value is 6 seconds, the input value should be multiplied by a factor of 10, meaning the input value provided should be 60 seconds.

FBD symbol

Timing diagram

Arguments

Description

Inputs

  • Time: 16-bit unsigned value (0 to 65,535) that specifies time periods in tenths of seconds.

  • Enable: ON/OFF input value. The time period is loaded on the rising edge of the Enable input. Time measuring continues while Enable is ON. Timing stops and outputs are OFF when Enable is OFF.

Outputs

  • Timed - ON/OFF value which turns ON after time period expires. It is OFF while enable is OFF
  • Timing - ON/OFF value that is ON while ,Enable is ON & while measuring time. It is OFF after measuring time expires.
NOTE: Both outputs can never be simultaneously ON.
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?