Wednesday, October 14, 2015

Alternatives to Chrome for FBNavigator

As of September 1, Google has disabled the NPAPI plug-in interface required to support Java applets in the Chrome browser, saying "If you want to use a website that uses an NPAPI plugin, you’ll need to use a different web browser." (https://support.google.com/chrome/answer/6213033). (Does this qualify as "evil" yet?)
If you want to access the FBNavigator feature of the Holobloc website, you can use the Firefox browser with the Java plug-in for Windows (https://support.mozilla.org/en-US/kb/use-java-plugin-to-view-interactive-content) or the IcedTea plugin for Ubuntu.
For Raspbian, you can use the IcedTea plugin for the IceWeasel browser:
sudo apt-get install openjdk-7-jdk 
sudo apt-get install iceweasel 
sudo apt-get install icedtea-7-plugin
This also enables it for the Epiphany browser that comes with the NOOBS installation.

Saturday, September 19, 2015

Simplified command line formats

The command line formats for launching Systems and Devices have been simplified by taking advantage of the new system.jar and device.jar files, respectively. See http://www.holobloc.com/doc/fbdk2/systest.htm#Remote and http://www.holobloc.com/doc/fbdk2/systest.htm#System for details.

FBDK 2.3 Release

A new release (FBDK 2.3, version 20150919) is now available. To facilitate reuse of the codebase on multiple platforms, this release encapsulates platform dependencies in "manifest" files contained in the corresponding *.jar files, which now include fbrt.jar, editor.jar, system.jar and device.jar.
In order to obtain proper launching of this new configuration, you will need to replace your existing fbdk2.jar with the new version available at http://www.holobloc.com/fbdk2/. Updates of the other files will then occur upon launching the fbdk2.jar file.
Descriptions of the new features will be posted to this blog with links to corresponding pages of the online documentation.

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 http://www.holobloc.com/doc/despats/tags/tags.htm#Tools 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.


xxx

Tuesday, May 26, 2015

RPi Test #5: Separation of Concerns

In the previous example, you may have noticed the beginning of "diagram clutter", where the I/O interface blocks were taking up significantly more space than the actual program logic. This problem can become severe with more complicated logic and a greater amount of I/O, such that it can become extremely difficult to even figure out what the logic is supposed to be doing.
As shown in the current example (GPIO_TEST5), we can solve this problem by applying the principle of Separation of Concerns:
  • First, as shown below, we move all the I/O interface blocks into one or more Resources separate from the program logic (here the resource is named IO for obvious reasons).
  • Then we add Local Multicast blocks to transmit inputs to and receive outputs from other Resources.
  • The Tagged Data design pattern support in the FBDK helps to keep the use of Local Multicast channels consistent among Resources.
Now we add Local Multicast blocks to the LOGIC resource to receive data from inputs and transmit the results of the control logic to outputs. Notice the reduction of diagram clutter:
In the next example, we'll take advantage of this reduced clutter to make room for more complicated control logic.

Monday, May 25, 2015

RPi GPIO Test #4: Signal Inversion

In the previous example, a pushbutton was "soft wired" to an LED in such a way that the LED was ON when the pushbutton was up, and OFF when the pushbutton was down. This is the reverse of what you would usually expect, so in the present system configuration (GPIO_TEST4.sys), the signal is inverted using an instance of the FB_NOT function block type so that the LED is ON when the pushbutton is down.

RPi GPIO Test #3 : Soft Wiring

In this system configuration (GPIO_TEST3), the GPIO "loopback" connection of the previous example is replaced with connections to real devices, which replace the Graphical User Interface (GUI) elements:
  • Pin 3 is configured as an output connected to an LED (the yellow button) in series with a 100 Ohm resistor to ground.
  • Pin 5 is configured as an input with an internal pull-up resistor, connected to a normally open pushbutton (the green button) to ground.
  • The value of the pushbutton input (BUTTON.X) is passed to the LED output (LED.X) via the graphical connection, and the LED block is notified of the current pushbutton status by the BUTTON.CNF => LED.REQ event connection.
As a result of these "software connections", the state of the LED reflects that of the pushbutton:
  • When the button is up (open), the state of pin 5 is HIGH due to the internal pullup resistor on the input pin, and this is passed to the LED on pin 3 as an ON condition, as shown in the picture on the left below.
  • When the button is down (closed), it pulls pin 5 LOW and this is passed to the LED on pin 3 as an OFF condition, as shown in the picture on the right below (the green button is held down with transparent tape in order to take the picture).

Wednesday, May 20, 2015

RPi GPIO Test #2: Loopback Testing

In this system configuration (GPIO_TEST), the Raspberry Pi GPIO configuration and loopback connection are identical to those of the previous example, with the addition of HMI elements such that the operation is as follows:
  • Clicking on the OUTPUT check box causes the OUTPUT.OUT value to flip; this value is passed to the PIN3.X input.
  • An event is passed from OUTPUT.IND to PIN3.REQ; this causes the flipped value at PIN3.X to be written to pin 3 of the Raspberry Pi 2 GPIO header.
  • The output state is passed electrically from pin 3 to pin 5 of the GPIO header.
  • An event is passed from PIN3.CNF to PIN5.REQ, which causes the value of the input at pin 5 of the header to appear at PIN5.X, which is passed to INPUT.IN.
  • An event is passed from PIN5.CNF to INPUT.REQ, which causes the INPUT display to be updated with the new value of PIN5.IN.

RPi GPIO Test #1: Service Interfaces

Here's a shot of a test of the first two General Purpose I/O Service Interface Function Blocks (GPIO SIFBs) for the Raspberry Pi 2:
  • Pin 3 of the Raspberry Pi 2 GPIO header is configured as an output using an instance of the GP_OUT2 type.
  • Pin 5 is configured as an input using an instance of the GP_IN2 type.
  • The output on pin 3 is looped back to the input on pin 5 for testing.
  • The value at the X input (0=LOW, 1=HIGH) of the GP_OUT instance is written to pin 3 when the REQ input is triggered.
  • The value at pin 3 is conducted electrically to pin 5.
  • The value at pin 5 can be read at the X output of the GP_IN2 instance by triggering its REQ input.
  • For more information, see the following documentation: GP_IN, GP_OUT, PIN_PULL.

Saturday, May 9, 2015

RPi Testbed

Here's a shot of the testbed I'm putting together using the Pi Dish from Adafruit. So far I'm just checking out some 35-year-old LED-illuminated push buttons I had lying around from the old Strider Systems days. Next step - develop some Service Interface Function Block (SIFB) wrappers around the built-in file system access to GPIO.

Wednesday, April 29, 2015

FBDK on Raspberry Pi

For those of you who didn't already know, the FBDK runs "as is" on the Raspberry Pi 2 under the Raspbian "wheezy" OS, which comes with the Java 8 JDK "out of the box". Below is a partial screenshot . Note the X2Y2 and X2Y2_FBD tabs, which I used to check out the Java compilation.

Thursday, February 12, 2015

Matrix Framework Upgrade

The Matrix Framework has been significantly upgraded:
  • The internal structure of the MATRIX data type has been changed from Vector<float[]> to float[][] with internal methods for dynamic resizing.
  • A new M_OPS FB type with expanded functionality replaces the former M_COLS FB type.
  • A new data type M_OP is used to enumerate the functionality provided by the new M_OPS FB type.
  • Row and column indices and lengths are now restricted to the values {0..255} of the USINT data type to correspond to the single-octet elements used for this purpose in the ASN.1 encoding.
  • Matrix inversion is now performed using the Product Form of the Inverse (PFI). The PFI column pivot operation is also directly supported by the M_OPS FB type, which makes it potentially useful in the solution of linear programming optimization problems.
  • The OUT_MATRIX FB type is now capable of resizing and redisplaying itself when a REQ event is received, so the IVAL, ROWS and COLS inputs have been eliminated from this FB type, and no table is displayed initially until the first REQ event is received.
  • The TEST_MCOLS system configuration has been updated to M_OPS_DEMO to demonstrate all the operations possible on the new M_OPS FB type. 
  • The TEST_MATRIX system configuration has been renamed to the more descriptive MATRIX_DEMO.


Monday, February 9, 2015

PUBLISH/SUBSCRIBE in Applets

PUBLISH and SUBSCRIBE have been upgraded to switch automatically to local multicast channels when their environment does not support UDP communication, e.g., in Applets. See the PUBLISH_0 documentation in the net folder and the CODEC_TEST and CODEC_TEST2 examples in the ita folder of the FB Navigator.

Tuesday, February 3, 2015

PUBLISH/SUBSCRIBE Update

The implementation of PUBLISH and SUBSCRIBE has been updated to ensure that all data transfer can occur within a single Ethernet packet using UDP over IPv4. For details, see www.holobloc.com/doc/fb/rt/net/pubsub.htm and http://www.holobloc.com/doc/ita/s3.htm#3.5.

Monday, January 19, 2015

Enhanced RADIO_N

The functionality of the RADIO_N FB type has been enhanced:
  • The occurrence of an INIT+ event will cause the current set of radio buttons (if any) to be replaced with a new set of buttons and initial selection (OUT) as specified by the LABELS and IN inputs, respectively.
  • The occurrence of an INIT- event will delete the current set of buttons, and the QO and OUT values will be set to false and 0, respectively.

Copy and Paste Service Sequences

You can now copy and paste service sequences in the element navigation tree of the FBEditor. This is documented under the SIFBs heading of the FBDK 2 How To page.

Sunday, January 18, 2015

Metal Look and Feel

To ensure cross-platform consistency, the Look and Feel (LAF) of the FBEditor has been restricted to the Java "Metal" CrossPlatformLookAndFeel. Accordingly, the "lookAndFeel" entry in the Preferences dialog has been removed. This has been checked in both Windows 8.1 with the Oracle Java 7 runtime, and Ubuntu 14.04 LTS with the openjdk7 runtime. It has also been checked with the Java applets used in the FB Navigator in both Google Chrome on Windows 8.1 and Firefox with the icedTea plug-in on Ubuntu 14.04 LTS.

Help menu updates

Web links to this blog and to the "About FBDK" information have been added to the FBEditor Help menu.

Improved fbdk2.jar

You may want to download the updated bootstrap file fbdk2.jar, available on the FBDK2 Home Page. File updates will then be shown in the bootstrap window as soon as they occur, before the main FBEditor window opens and partially covers the bootstrap window. This will help you to notice when files are updated; then you can consult this blog to see what changes (improvements?!) have occurred.

Continuous Improvement

With the 2.2 release, the FBDK has reached a fairly stable "continuous improvement" stage, where it keeps itself current by automatically downloading new features from the Web at startup. To avoid cluttering the FBDK Discussion Group, new features will henceforth be announced on this blog as they become available (you can also use this blog to comment on these features as they are announced).