Friday, June 5, 2015

Drag and Drop (DnD) Tagging

The latest (20150602) FBDK2 self-update now supports DnD tagging of FB instances in the Tagged Data Design Pattern. See the documentation at for details.
Previous versions of the FBDK tried to support automatic application of tags under certain conditions, but this turned out to result in unanticipated and sometimes undesirable results.

Monday, June 1, 2015

RPi Test #6: Bit Toggling

In this example (GPIO_TEST6), at each press of a pushbutton the state of an LED is toggled from OFF to ON or vice versa.
  • The Tagged Data and Local Multicast design patterns are reused from the previous example to simplify the system configuration.
  • An instance of the E_F_TRIG function block (FB) type is used to detect the keypress by issuing an EO event when a falling edge of the button state (BUTTON.RD_1) occurs.
  • The TRIGGER.EO event fires the OUTPUT.REQ event block to toggle the OUTPUT.OUT value, which is then passed to the LED.
    • The OUTPUT block is an instance of the E_TOGGLE FB type, whose interface and implementation are documented in the second and third figures below.
    • Although the E_TOGGLE implementation is modeled using instances of the E_SWITCH and E_SR FB types, the actual implementation uses optimized Java code.